@zip.js/zip.js 2.8.44 → 2.8.46
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 +28 -2
- package/deno.json +32 -2
- package/dist/zip-core-external.js +199 -149
- package/dist/zip-core-external.min.js +1 -1
- package/dist/zip-core.js +196 -120
- package/dist/zip-core.min.js +1 -1
- package/dist/zip-fs-core-external.js +251 -157
- package/dist/zip-fs-core-external.min.js +1 -1
- package/dist/zip-fs-core.js +227 -126
- package/dist/zip-fs-core.min.js +1 -1
- package/dist/zip-fs-external.js +272 -1751
- package/dist/zip-fs-external.min.js +1 -1
- package/dist/zip-fs-native.js +273 -1726
- package/dist/zip-fs-native.min.js +1 -1
- package/dist/zip-fs.js +273 -1726
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-legacy.js +198 -122
- package/dist/zip-legacy.min.js +1 -1
- package/dist/zip-native.js +200 -124
- 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 +200 -124
- package/dist/zip.min.js +1 -1
- package/eslint.config.mjs +31 -2
- package/index-native.cjs +273 -1726
- package/index-native.min.js +1 -1
- package/index.cjs +273 -1726
- package/index.d.cts +140 -2
- package/index.d.ts +140 -2
- package/index.min.js +1 -1
- package/lib/core/codec-pool.js +3 -2
- package/lib/core/codec-worker.js +30 -14
- package/lib/core/configuration.js +20 -2
- package/lib/core/constants.js +4 -0
- package/lib/core/options.js +2 -0
- package/lib/core/streams/aes-crypto-stream.js +15 -18
- package/lib/core/streams/codec-stream.js +2 -2
- package/lib/core/streams/zip-entry-stream.js +13 -18
- 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 +29 -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-native.js +7 -9
- package/lib/core/web-worker-wasm.js +9 -12
- package/lib/core/zip-entry.js +8 -1
- package/lib/core/zip-fs.js +62 -5
- package/lib/core/zip-reader.js +45 -17
- package/lib/core/zip-writer.js +58 -44
- package/lib/{core/web-worker-inline-template.js → zip-core-custom.js} +13 -20
- package/lib/zip-core-external.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/lib/zip-module-native.js +3 -3
- package/lib/zip-module-wasm-base.js +3 -3
- package/package.json +28 -4
- package/worker-message-property-names.js +1 -1
- package/lib/core/web-worker-inline-template-native.js +0 -48
- package/lib/core/zlib-streams-inline-template.js +0 -45
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;
|
|
@@ -168,6 +170,7 @@ const CONFIGURABLE_PROPERTY_NAMES = [
|
|
|
168
170
|
"baseURI",
|
|
169
171
|
"wasmURI",
|
|
170
172
|
"workerURI",
|
|
173
|
+
"createWorker",
|
|
171
174
|
"chunkSize",
|
|
172
175
|
"maxWorkers",
|
|
173
176
|
"terminateWorkerTimeout",
|
|
@@ -178,8 +181,8 @@ const CONFIGURABLE_PROPERTY_NAMES = [
|
|
|
178
181
|
"transferStreams",
|
|
179
182
|
"CompressionStream",
|
|
180
183
|
"DecompressionStream",
|
|
181
|
-
"
|
|
182
|
-
"
|
|
184
|
+
"CompressionStreamFallback",
|
|
185
|
+
"DecompressionStreamFallback"
|
|
183
186
|
];
|
|
184
187
|
|
|
185
188
|
const config = { ...DEFAULT_CONFIGURATION };
|
|
@@ -193,6 +196,7 @@ function getChunkSize(config) {
|
|
|
193
196
|
}
|
|
194
197
|
|
|
195
198
|
function configure(configuration) {
|
|
199
|
+
configuration = normalizeConfiguration(configuration);
|
|
196
200
|
for (const propertyName of CONFIGURABLE_PROPERTY_NAMES) {
|
|
197
201
|
const propertyValue = configuration[propertyName];
|
|
198
202
|
if (propertyValue !== UNDEFINED_VALUE) {
|
|
@@ -201,7 +205,23 @@ function configure(configuration) {
|
|
|
201
205
|
}
|
|
202
206
|
}
|
|
203
207
|
|
|
208
|
+
function normalizeConfiguration(configuration) {
|
|
209
|
+
const { CompressionStreamZlib, DecompressionStreamZlib } = configuration;
|
|
210
|
+
if (CompressionStreamZlib === UNDEFINED_VALUE && DecompressionStreamZlib === UNDEFINED_VALUE) {
|
|
211
|
+
return configuration;
|
|
212
|
+
}
|
|
213
|
+
const normalizedConfiguration = Object.assign({}, configuration);
|
|
214
|
+
if (normalizedConfiguration.CompressionStreamFallback === UNDEFINED_VALUE) {
|
|
215
|
+
normalizedConfiguration.CompressionStreamFallback = CompressionStreamZlib;
|
|
216
|
+
}
|
|
217
|
+
if (normalizedConfiguration.DecompressionStreamFallback === UNDEFINED_VALUE) {
|
|
218
|
+
normalizedConfiguration.DecompressionStreamFallback = DecompressionStreamZlib;
|
|
219
|
+
}
|
|
220
|
+
return normalizedConfiguration;
|
|
221
|
+
}
|
|
222
|
+
|
|
204
223
|
function setDefaultConfiguration(configuration) {
|
|
224
|
+
configuration = normalizeConfiguration(configuration);
|
|
205
225
|
for (const propertyName of CONFIGURABLE_PROPERTY_NAMES) {
|
|
206
226
|
const propertyValue = configuration[propertyName];
|
|
207
227
|
if (propertyValue !== UNDEFINED_VALUE) {
|
|
@@ -218,7 +238,7 @@ function resetConfiguration() {
|
|
|
218
238
|
Object.assign(config, DEFAULT_CONFIGURATION);
|
|
219
239
|
}
|
|
220
240
|
|
|
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:u,TextEncoder:w,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,u;const w=new ArrayBuffer(o),h=new l(w);let p=0;const d=V;for(e=K.bytes.A(e),u=1;(o||1)>p;u++){for(c=i=t.encrypt(d.concat(e,[u])),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 w.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 u=16843009*f^65537*a^257*i^16843008*l,w=257*r[o]^16843008*o;for(let n=0;4>n;n++)t[n][l]=w=w<<24^w>>>8,e[n][o]=u=u<<24^u>>>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],u=c[4];let w,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++)w=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=w,y=h,m=p;for(let t=0;4>t;t++)o[e?3&-t:t]=u[d>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&g]^n[S++],w=d,d=y,y=m,m=g,g=w;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 ut 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 u=s.length<tt?1:0;for(let t=0;tt>t;t++)u|=l[t]^a[t];if(u&&c)throw new r(H);t.enqueue(f)}}})}}class wt extends d{constructor({password:t,rawPassword:e,encryptionStrength:n}){let s;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:r,ready:o}=this;if(n&&e){await o;let c=z;if(r.length){const t=e.update(St(ot,r));n.update(t),c=gt(ot,t)}s.signature=gt(ot,n.digest()).slice(0,tt),t.enqueue(_(c,s.signature))}}}),s=this}}function ht(t,n,s,r){e.assign(t,{ready:new u(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 u;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)),u=0;l-q>=u;u+=q){const t=St(ot,mt(e,u,u+q));c&&a.update(t);const r=i.update(t);c||a.update(r),n.set(gt(ot,r),u+s)}return t.pending=mt(e,u),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])),u=St(ot,mt(f,$[s],2*$[s])),w=mt(f,2*$[s]);return e.assign(n,{keys:{key:l,ct:u,passwordVerification:w},st:new it(new ct(l),t.from(et)),ot:new at(u)}),w}function yt(t,e){return e===v?(t=>{if(typeof w==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 w).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:u,format:w,compressionMethod:h}=t,p=this;let d,y,m,g=super.readable;const S=w&&Bt(w),v=a&&r&&!u&&!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,w,{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 wt(t),g=jt(g,y))),Ft(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 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.signature=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,signature:f,compressed:w,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 ut(t),C=jt(C,z))),w){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 w=new u((t,e)=>{i=t,a=e});w.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 w}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})}}),u=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{signature:t}=a;e.assign(s,{signature:t,inputSize:i})}});e.defineProperty(s,"readable",{get:()=>f.pipeThrough(l).pipeThrough(a).pipeThrough(u)})}}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 u(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 u(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:w}=$t;await l.pipeThrough(e).pipeThrough(new Jt((t=>s.max(t.chunkSize,64))(i))).pipeTo(o,{signal:w,preventClose:!0,preventAbort:!0}),await o.getWriter().close();const{signature:h,inputSize:p,outputSize:d}=e;ie({type:Nt,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{}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.ut=new o(i),t?(this.wt=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.wt=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.wt=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.wt,l=this.ht,u=this.lt,w=this.ut;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,u,i,0),p=16777215&o;if(p&&(w.set(a.subarray(u,u+p),0),n.enqueue(w.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.wt,c=this.lt,a=this.ut;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 ue{constructor(t="deflate",e){return fe(!1,t,e)}}le.St=!0,ue.St=!0;let we=!1;self.initModule=async t=>{const e=await(async(t,{baseURI:e})=>{if(!we)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),we=!0}catch(t){throw(t=>{re=t})(t),t}})(t.wasmURI,t);return t.CompressionStreamZlib=le,t.DecompressionStreamZlib=ue,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)}});}
|
|
241
|
+
const t$1=new Uint8Array(288);t$1.fill(8,0,144),t$1.fill(9,144,256),t$1.fill(7,256,280),t$1.fill(8,280,288),new Uint8Array(30).fill(5);const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n$1=t=>t({workerURI:t=>{const n="text/javascript";let s='(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:S,DecompressionStream:g}=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,D,B,F]=C;class R{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=F[255&t]^B[t>>>8&255]^D[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 U extends d{constructor(){let t;const e=new R;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 W(t,e){const n=new o(t.length+e.length);return n.set(t),n.set(e,t.length),n}function _(t){return new l(t.buffer,t.byteOffset,t.byteLength)}const T={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],s=T.l(n);return 32===s?t.concat(e):T.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)+T.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]=T.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=T.l(r);return s.push(T.v(e+o&31,e+o>32?n:s.pop(),1)),s}},V={bytes:{C(t){const e=T.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(T.v(8*(3&n),s)),e}}},K=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.D=t.D.slice(0),e.B=t.B):e.reset()}reset(){const t=this;return t.P=t.I.slice(0),t.D=[],t.B=0,t}update(t){const e=this;"string"==typeof t&&(t=V.F.A(t));const n=e.D=T.concat(e.D,t),s=e.B,o=e.B=s+T.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.R(c.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),e}U(){const t=this;let e=t.D;const n=t.P;e=T.concat(e,[T.v(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(s.floor(t.B/4294967296)),e.push(0|t.B);e.length;)t.R(e.splice(0,16));return t.reset(),n}W(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,e){return e<<t|e>>>32-t}R(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._(1,o[t-3]^o[t-8]^o[t-14]^o[t-16]));const e=n._(5,c)+n.W(t,i,a,f)+l+o[t]+n.M[s.floor(t/20)]|0;l=f,f=a,a=n._(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}},E={importKey:t=>new E.T(V.bytes.A(t)),V(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=T;for(e=V.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)},T:class{constructor(t){const e=this,n=e.K=K,s=[[],[]];e.L=[new n,new n];const r=e.L[0].blockSize/32;t.length>r&&(t=(new n).update(t).U());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.K(t.L[0]),t.j=!1}update(t){this.j=!0,this.O.update(t)}digest(){const t=this,e=t.O.U(),n=new t.K(t.L[1]).update(e).U();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,N="zipjs-abort-check-password";function q(t){if(L)return h.getRandomValues(t);throw new r("Crypto API not supported")}const G=16,J={name:"PBKDF2"},Q=e.assign({hash:{name:"HMAC"}},J),X=e.assign({iterations:1e3,hash:{name:"SHA-1"}},J),Y=["deriveBits"],Z=[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=V.bytes,ct=class{constructor(t){const e=this;e.H=[[[],[],[],[],[]],[[],[],[],[],[]]],e.H[0][0][0]||e.N();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.G(t,0)}decrypt(t){return this.G(t,1)}N(){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)}G(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],S=t[e?1:3]^n[3],g=4;for(let t=0;s>t;t++)u=i[d>>>24]^a[y>>16&255]^f[m>>8&255]^l[255&S]^n[g],h=i[y>>>24]^a[m>>16&255]^f[S>>8&255]^l[255&d]^n[g+1],p=i[m>>>24]^a[S>>16&255]^f[d>>8&255]^l[255&y]^n[g+2],S=i[S>>>24]^a[d>>16&255]^f[y>>8&255]^l[255&m]^n[g+3],g+=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&S]^n[g++],u=d,d=y,y=m,m=S,S=u;return o}},it=class{constructor(t,e){this.J=t,this.X=e,this.Y=e}reset(){this.Y=this.X}update(t){return this.Z(this.J,t,this.Y)}$(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]))}Z(t,e,n){let s;if(!(s=e.length))return[];const r=T.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 T.S(e,r)}},at=E.T;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,Z[e])),c=mt(s,Z[e]);if(o[0]!=c[0]||o[1]!=c[1])throw new r(O)})(n,i,c,mt(t,0,Z[i]+2)),t=mt(t,Z[i]+2),s?e.error(new r(N)):a()):await f;const l=new o(t.length-tt-(t.length-tt)%G);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=gt(ot,i);n.update(t);const s=e.update(t);f=St(ot,s)}const l=mt(St(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=q(new o(Z[e]));return W(s,await dt(t,e,n,s))})(n,r,s),c()):await i;const f=new o(a.length+t.length-t.length%G);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(gt(ot,s));n.update(t),o=St(ot,t)}const c=St(ot,n.digest()).slice(0,tt);t.enqueue(W(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=W(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%G)),w=0;l-G>=w;w+=G){const t=gt(ot,mt(e,w,w+G));c&&a.update(t);const r=i.update(t);c||a.update(r),n.set(St(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 E.importKey(e);try{return await st.importKey("raw",e,n,!1,r)}catch{return ft=!1,E.importKey(e)}})(0,r,Q,0,Y),a=await(async(t,e,n)=>{if(!lt)return E.V(e,t.salt,X.iterations,n);try{return await st.deriveBits(t,e,n)}catch{return lt=!1,E.V(e,t.salt,X.iterations,n)}})(e.assign({salt:c},X),i,8*(2*$[s]+2)),f=new o(a),l=gt(ot,mt(f,0,$[s])),w=gt(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 St(t,e){return t.C(e)}function gt(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(N)):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=q(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 R(r[0]),ft:new R(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 Dt(t){return Pt.get(t)}const Bt="Invalid uncompressed size",Ft=j,Rt="deflate-raw",Ut="gzip",Wt=[31,139,8];class _t extends d{constructor(t,{chunkSize:e,CompressionStreamFallback: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,S=super.readable;const g=u&&Dt(u),v=a&&r&&!w&&!g&&(!o||i)&&!(!c||!s);if(o&&!i||!a||v||(d=new U,S=jt(S,d)),r)if(g)S=Ht(S,Lt(g.CompressionStream,u,{level:f,chunkSize:e,compressionMethod:h}));else if(v)m=new Tt,S=Ht(S,new s(Ut)),S=jt(S,m);else try{S=Ot(S,c,{level:f,chunkSize:e},s,n)}catch(t){let e;try{e=new s(Ut)}catch{throw t}S=Ht(S,e),S=jt(S,new Tt)}o&&(i?S=jt(S,new bt(t)):(y=new ut(t),S=jt(S,y))),Et(p,S,()=>{o&&!i||!a||(p.crc32=v?m.crc32:new l(d.value.buffer).getUint32(0))})}}class Tt 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=W(n,t));const c=o-8,i=s.min(c,n.length);r.enqueue(W(n.subarray(0,i),t.subarray(0,c-i))),n=W(n.subarray(i),t.subarray(c-i))},flush(){const e=_(n);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Vt extends d{constructor(t,{chunkSize:e,DecompressionStreamFallback:n,DecompressionStream:s}){super({});const{zipCrypto:c,encrypted:i,checkCrc32:a,crc32:f,compressed:u,useCompressionStream:h,deflate64:p,format:m,compressionMethod:S,rawBitFlag:g,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&&Dt(m);if(t)C=Ht(C,Lt(t.DecompressionStream,m,{chunkSize:e,compressionMethod:S,rawBitFlag:g,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(Ut)}catch{throw t}C=((t,e,n)=>{const s=new R;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(Wt),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=_(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(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)}a&&(k=new U,C=jt(C,k)),Et(this,C,()=>{if(a){const t=new l(k.value.buffer);if(f!=t.getUint32(0,!1))throw new r(Ft)}})}}const Kt=new f;function Et(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":Rt;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 Nt="data",qt="close",Gt="deflate";class Jt extends d{constructor(t,n){super({});const s=this,{codecType:o}=t;let c;o.startsWith(Gt)?c=_t:o.startsWith("inflate")&&(c=Vt),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{crc32:t}=a;e.assign(s,{crc32: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 Xt=2;try{typeof navigator!=b&&navigator.hardwareConcurrency&&(Xt=navigator.hardwareConcurrency)}catch{}const Yt=new f,Zt=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=Kt.get(t);n||(n=new f,Kt.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(Gt)?i.CompressionStream:i.DecompressionStream,Rt))try{await self.initModule(t.config)}catch{}}else try{await self.initModule(t.config)}catch{c.useCompressionStream=!0}!i.CompressionStreamFallback&&i.CompressionStreamZlib&&(i.CompressionStreamFallback=i.CompressionStreamZlib),!i.DecompressionStreamFallback&&i.DecompressionStreamZlib&&(i.DecompressionStreamFallback=i.DecompressionStreamZlib);const a={highWaterMark:1},l=t.readable||new y({async pull(t){const e=new w(t=>Yt.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);Zt.set(oe,e),ie({type:Nt,value:t,messageId:oe}),oe=(oe+1)%n.MAX_SAFE_INTEGER,await s}},a),e=new Jt(c,i),$t=new AbortController;const{signal:u}=$t;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{crc32:h,inputSize:p,outputSize:d}=e;ie({type:qt,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.St=te.deflate_new(),n="gzip"===e?te.deflate_init_gzip(this.St,c):"deflate-raw"===e?te.deflate_init_raw(this.St,c):te.deflate_init(this.St,c)):"deflate64-raw"===e?(this.ut=te.inflate9_process,this.ht=te.inflate9_last_consumed,this.yt=te.inflate9_end,this.St=te.inflate9_new(),n=te.inflate9_init_raw(this.St)):(this.ut=te.inflate_process,this.ht=te.inflate_last_consumed,this.yt=te.inflate_end,this.St=te.inflate_new(),n="deflate-raw"===e?te.inflate_init_raw(this.St):"gzip"===e?te.inflate_init_gzip(this.St):te.inflate_init(this.St)),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.St,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.St);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.St,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.St&&t.yt&&(e=t.yt(t.St)),t.St=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==Nt){const t=Yt.get(n);Yt.delete(n),t({value:s||new o,done:r})}if("ack"==e){const t=Zt.get(n);Zt.delete(n),t()}e==qt&&$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.gt=!0,we.gt=!0;let ue=!1;((t={})=>{const{init:e}=t,n=t.CompressionStreamFallback||t.CompressionStreamZlib,s=t.DecompressionStreamFallback||t.DecompressionStreamZlib;self.initModule=async t=>{e&&await e(t),n&&(t.CompressionStreamFallback=n),s&&(t.DecompressionStreamFallback=s)}})({CompressionStreamFallback:le,DecompressionStreamFallback:we,init:t=>(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)})});\n';if("string"==typeof s&&(s=(new TextEncoder).encode(s)),t){const t=new Blob([s],{type:n});return URL.createObjectURL(t)}return "data:"+n+";base64,"+(t=>{let n="";const s=t.length;let r=0;for(;s>r+2;r+=3){const s=t[r]<<16|t[r+1]<<8|t[r+2];n+=e[s>>18&63]+e[s>>12&63]+e[s>>6&63]+e[63&s];}const o=s-r;if(1===o){const s=t[r]<<16;n+=e[s>>18&63]+e[s>>12&63]+"==";}else if(2===o){const s=t[r]<<16|t[r+1]<<8;n+=e[s>>18&63]+e[s>>12&63]+e[s>>6&63]+"=";}return n})(s)}});
|
|
222
242
|
|
|
223
243
|
/*
|
|
224
244
|
Copyright (c) 2025 Gildas Lormeau. All rights reserved.
|
|
@@ -1416,7 +1436,7 @@ const DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: H
|
|
|
1416
1436
|
const DERIVED_BITS_USAGE = ["deriveBits"];
|
|
1417
1437
|
const SALT_LENGTH = [8, 12, 16];
|
|
1418
1438
|
const KEY_LENGTH = [16, 24, 32];
|
|
1419
|
-
const
|
|
1439
|
+
const AUTHENTICATION_CODE_LENGTH = 10;
|
|
1420
1440
|
const COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];
|
|
1421
1441
|
// deno-lint-ignore valid-typeof
|
|
1422
1442
|
const CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;
|
|
@@ -1456,8 +1476,8 @@ class AESDecryptionStream extends TransformStream {
|
|
|
1456
1476
|
} else {
|
|
1457
1477
|
await ready;
|
|
1458
1478
|
}
|
|
1459
|
-
const output = new Uint8Array(chunk.length -
|
|
1460
|
-
controller.enqueue(append(aesCrypto, chunk, output, 0,
|
|
1479
|
+
const output = new Uint8Array(chunk.length - AUTHENTICATION_CODE_LENGTH - ((chunk.length - AUTHENTICATION_CODE_LENGTH) % BLOCK_LENGTH));
|
|
1480
|
+
controller.enqueue(append(aesCrypto, chunk, output, 0, AUTHENTICATION_CODE_LENGTH, true));
|
|
1461
1481
|
},
|
|
1462
1482
|
async flush(controller) {
|
|
1463
1483
|
const {
|
|
@@ -1468,8 +1488,8 @@ class AESDecryptionStream extends TransformStream {
|
|
|
1468
1488
|
} = this;
|
|
1469
1489
|
if (hmac && ctr) {
|
|
1470
1490
|
await ready;
|
|
1471
|
-
const chunkToDecrypt = subarray(pending, 0, pending.length -
|
|
1472
|
-
const
|
|
1491
|
+
const chunkToDecrypt = subarray(pending, 0, pending.length - AUTHENTICATION_CODE_LENGTH);
|
|
1492
|
+
const originalAuthenticationCode = subarray(pending, pending.length - AUTHENTICATION_CODE_LENGTH);
|
|
1473
1493
|
let decryptedChunkArray = EMPTY_UINT8_ARRAY;
|
|
1474
1494
|
if (chunkToDecrypt.length) {
|
|
1475
1495
|
const encryptedChunk = toBits(codecBytes, chunkToDecrypt);
|
|
@@ -1477,12 +1497,12 @@ class AESDecryptionStream extends TransformStream {
|
|
|
1477
1497
|
const decryptedChunk = ctr.update(encryptedChunk);
|
|
1478
1498
|
decryptedChunkArray = fromBits(codecBytes, decryptedChunk);
|
|
1479
1499
|
}
|
|
1480
|
-
const
|
|
1481
|
-
let
|
|
1482
|
-
for (let
|
|
1483
|
-
|
|
1500
|
+
const authenticationCode = subarray(fromBits(codecBytes, hmac.digest()), 0, AUTHENTICATION_CODE_LENGTH);
|
|
1501
|
+
let invalidAuthenticationCode = pending.length < AUTHENTICATION_CODE_LENGTH ? 1 : 0;
|
|
1502
|
+
for (let indexByte = 0; indexByte < AUTHENTICATION_CODE_LENGTH; indexByte++) {
|
|
1503
|
+
invalidAuthenticationCode |= authenticationCode[indexByte] ^ originalAuthenticationCode[indexByte];
|
|
1484
1504
|
}
|
|
1485
|
-
if (
|
|
1505
|
+
if (invalidAuthenticationCode && checkAuthenticationCode) {
|
|
1486
1506
|
throw new Error(ERR_INVALID_AUTHENTICATION_CODE);
|
|
1487
1507
|
}
|
|
1488
1508
|
controller.enqueue(decryptedChunkArray);
|
|
@@ -1495,8 +1515,6 @@ class AESDecryptionStream extends TransformStream {
|
|
|
1495
1515
|
class AESEncryptionStream extends TransformStream {
|
|
1496
1516
|
|
|
1497
1517
|
constructor({ password, rawPassword, encryptionStrength }) {
|
|
1498
|
-
// deno-lint-ignore prefer-const
|
|
1499
|
-
let stream;
|
|
1500
1518
|
super({
|
|
1501
1519
|
start() {
|
|
1502
1520
|
initAesCrypto(this, password, rawPassword, encryptionStrength);
|
|
@@ -1535,12 +1553,11 @@ class AESEncryptionStream extends TransformStream {
|
|
|
1535
1553
|
hmac.update(encryptedChunk);
|
|
1536
1554
|
encryptedChunkArray = fromBits(codecBytes, encryptedChunk);
|
|
1537
1555
|
}
|
|
1538
|
-
|
|
1539
|
-
controller.enqueue(concat(encryptedChunkArray,
|
|
1556
|
+
const authenticationCode = fromBits(codecBytes, hmac.digest()).slice(0, AUTHENTICATION_CODE_LENGTH);
|
|
1557
|
+
controller.enqueue(concat(encryptedChunkArray, authenticationCode));
|
|
1540
1558
|
}
|
|
1541
1559
|
}
|
|
1542
1560
|
});
|
|
1543
|
-
stream = this;
|
|
1544
1561
|
}
|
|
1545
1562
|
}
|
|
1546
1563
|
|
|
@@ -1553,7 +1570,7 @@ function initAesCrypto(aesCrypto, password, rawPassword, encryptionStrength) {
|
|
|
1553
1570
|
});
|
|
1554
1571
|
}
|
|
1555
1572
|
|
|
1556
|
-
function append(aesCrypto, input, output, paddingStart, paddingEnd,
|
|
1573
|
+
function append(aesCrypto, input, output, paddingStart, paddingEnd, verifyAuthenticationCode) {
|
|
1557
1574
|
const {
|
|
1558
1575
|
ctr,
|
|
1559
1576
|
hmac,
|
|
@@ -1567,11 +1584,11 @@ function append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignat
|
|
|
1567
1584
|
let offset;
|
|
1568
1585
|
for (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {
|
|
1569
1586
|
const inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));
|
|
1570
|
-
if (
|
|
1587
|
+
if (verifyAuthenticationCode) {
|
|
1571
1588
|
hmac.update(inputChunk);
|
|
1572
1589
|
}
|
|
1573
1590
|
const outputChunk = ctr.update(inputChunk);
|
|
1574
|
-
if (!
|
|
1591
|
+
if (!verifyAuthenticationCode) {
|
|
1575
1592
|
hmac.update(outputChunk);
|
|
1576
1593
|
}
|
|
1577
1594
|
output.set(fromBits(codecBytes, outputChunk), offset + paddingStart);
|
|
@@ -1933,7 +1950,7 @@ const GZIP_OUTPUT_STALL_TIMEOUT = 5000;
|
|
|
1933
1950
|
|
|
1934
1951
|
class DeflateStream extends TransformStream {
|
|
1935
1952
|
|
|
1936
|
-
constructor(options, { chunkSize,
|
|
1953
|
+
constructor(options, { chunkSize, CompressionStreamFallback, CompressionStream }) {
|
|
1937
1954
|
super({});
|
|
1938
1955
|
const { compressed, encrypted, useCompressionStream, zipCrypto, computeCrc32, level, deflate64, format, compressionMethod } = options;
|
|
1939
1956
|
const stream = this;
|
|
@@ -1955,7 +1972,7 @@ class DeflateStream extends TransformStream {
|
|
|
1955
1972
|
readable = pipeThrough(readable, gzipCrc32Stream);
|
|
1956
1973
|
} else {
|
|
1957
1974
|
try {
|
|
1958
|
-
readable = pipeThroughCompressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStream,
|
|
1975
|
+
readable = pipeThroughCompressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStream, CompressionStreamFallback);
|
|
1959
1976
|
} catch (error) {
|
|
1960
1977
|
let gzipStream;
|
|
1961
1978
|
try {
|
|
@@ -1977,14 +1994,9 @@ class DeflateStream extends TransformStream {
|
|
|
1977
1994
|
}
|
|
1978
1995
|
}
|
|
1979
1996
|
setReadable(stream, readable, () => {
|
|
1980
|
-
let signature;
|
|
1981
|
-
if (encrypted && !zipCrypto) {
|
|
1982
|
-
signature = encryptionStream.signature;
|
|
1983
|
-
}
|
|
1984
1997
|
if ((!encrypted || zipCrypto) && computeCrc32) {
|
|
1985
|
-
|
|
1998
|
+
stream.crc32 = useGzipCrc32 ? gzipCrc32Stream.crc32 : new DataView(crc32Stream.value.buffer).getUint32(0);
|
|
1986
1999
|
}
|
|
1987
|
-
stream.signature = signature;
|
|
1988
2000
|
});
|
|
1989
2001
|
}
|
|
1990
2002
|
}
|
|
@@ -2022,7 +2034,7 @@ class GzipToRawDeflateStream extends TransformStream {
|
|
|
2022
2034
|
},
|
|
2023
2035
|
flush() {
|
|
2024
2036
|
const dataView = getDataView(trailerCandidate);
|
|
2025
|
-
stream.
|
|
2037
|
+
stream.crc32 = dataView.getUint32(0, true);
|
|
2026
2038
|
stream.uncompressedSize = dataView.getUint32(4, true);
|
|
2027
2039
|
}
|
|
2028
2040
|
});
|
|
@@ -2102,9 +2114,9 @@ function pipeThroughGzipDecompressionStream(readable, gzipStream, outputSize) {
|
|
|
2102
2114
|
|
|
2103
2115
|
class InflateStream extends TransformStream {
|
|
2104
2116
|
|
|
2105
|
-
constructor(options, { chunkSize,
|
|
2117
|
+
constructor(options, { chunkSize, DecompressionStreamFallback, DecompressionStream }) {
|
|
2106
2118
|
super({});
|
|
2107
|
-
const { zipCrypto, encrypted, checkCrc32,
|
|
2119
|
+
const { zipCrypto, encrypted, checkCrc32, crc32, compressed, useCompressionStream, deflate64, format, compressionMethod, rawBitFlag, outputSize } = options;
|
|
2108
2120
|
let crc32Stream, decryptionStream;
|
|
2109
2121
|
let readable = super.readable;
|
|
2110
2122
|
if (encrypted) {
|
|
@@ -2121,7 +2133,7 @@ class InflateStream extends TransformStream {
|
|
|
2121
2133
|
readable = pipeThroughBackpressured(readable, createCodecStream(codecStreams.DecompressionStream, format, { chunkSize, compressionMethod, rawBitFlag, uncompressedSize: outputSize }));
|
|
2122
2134
|
} else {
|
|
2123
2135
|
try {
|
|
2124
|
-
readable = pipeThroughCompressionStream(readable, useCompressionStream, { chunkSize, deflate64 }, DecompressionStream,
|
|
2136
|
+
readable = pipeThroughCompressionStream(readable, useCompressionStream, { chunkSize, deflate64 }, DecompressionStream, DecompressionStreamFallback);
|
|
2125
2137
|
} catch (error) {
|
|
2126
2138
|
if (deflate64 || outputSize === UNDEFINED_VALUE) {
|
|
2127
2139
|
throw error;
|
|
@@ -2143,8 +2155,8 @@ class InflateStream extends TransformStream {
|
|
|
2143
2155
|
}
|
|
2144
2156
|
setReadable(this, readable, () => {
|
|
2145
2157
|
if (checkCrc32) {
|
|
2146
|
-
const
|
|
2147
|
-
if (
|
|
2158
|
+
const computedCrc32View = new DataView(crc32Stream.value.buffer);
|
|
2159
|
+
if (crc32 != computedCrc32View.getUint32(0, false)) {
|
|
2148
2160
|
throw new Error(ERR_INVALID_CRC32);
|
|
2149
2161
|
}
|
|
2150
2162
|
}
|
|
@@ -2200,17 +2212,17 @@ function createCodecStream(CodecStreamClass, format, options) {
|
|
|
2200
2212
|
return new CodecStreamClass(format, options);
|
|
2201
2213
|
}
|
|
2202
2214
|
|
|
2203
|
-
function pipeThroughCompressionStream(readable, useCompressionStream, options, CompressionStreamNative,
|
|
2215
|
+
function pipeThroughCompressionStream(readable, useCompressionStream, options, CompressionStreamNative, CompressionStreamFallback) {
|
|
2204
2216
|
const Stream = useCompressionStream && CompressionStreamNative ?
|
|
2205
2217
|
CompressionStreamNative :
|
|
2206
|
-
|
|
2218
|
+
CompressionStreamFallback || CompressionStreamNative;
|
|
2207
2219
|
const format = options.deflate64 ? FORMAT_DEFLATE64_RAW : FORMAT_DEFLATE_RAW;
|
|
2208
2220
|
let codecStream;
|
|
2209
2221
|
try {
|
|
2210
2222
|
codecStream = new Stream(format, options);
|
|
2211
2223
|
} catch (error) {
|
|
2212
|
-
if (useCompressionStream &&
|
|
2213
|
-
codecStream = new
|
|
2224
|
+
if (useCompressionStream && CompressionStreamFallback && Stream != CompressionStreamFallback) {
|
|
2225
|
+
codecStream = new CompressionStreamFallback(format, options);
|
|
2214
2226
|
} else {
|
|
2215
2227
|
throw error;
|
|
2216
2228
|
}
|
|
@@ -2369,9 +2381,9 @@ class CodecStream extends TransformStream {
|
|
|
2369
2381
|
}
|
|
2370
2382
|
},
|
|
2371
2383
|
flush() {
|
|
2372
|
-
const {
|
|
2384
|
+
const { crc32 } = stream;
|
|
2373
2385
|
Object.assign(codec, {
|
|
2374
|
-
|
|
2386
|
+
crc32,
|
|
2375
2387
|
inputSize
|
|
2376
2388
|
});
|
|
2377
2389
|
}
|
|
@@ -2473,7 +2485,7 @@ const ERROR_EVENT_TYPE = "error";
|
|
|
2473
2485
|
const MESSAGE_ERROR_EVENT_TYPE = "messageerror";
|
|
2474
2486
|
const ERR_WORKER_STARTUP_TIMEOUT = "Worker startup timeout";
|
|
2475
2487
|
|
|
2476
|
-
let webWorkerSupported, webWorkerSource, webWorkerURI, webWorkerOptions;
|
|
2488
|
+
let webWorkerSupported, webWorkerSource, webWorkerURI, webWorkerOptions, createWorkerFailed;
|
|
2477
2489
|
let transferStreamsSupported = true;
|
|
2478
2490
|
try {
|
|
2479
2491
|
transferStreamsSupported = typeof structuredClone == FUNCTION_TYPE && structuredClone(new DOMException("", "AbortError")).code !== UNDEFINED_VALUE;
|
|
@@ -2487,14 +2499,14 @@ function configureWorker({ initModule: initModuleFunction }) {
|
|
|
2487
2499
|
}
|
|
2488
2500
|
|
|
2489
2501
|
async function supportsDeflate(config) {
|
|
2490
|
-
const { CompressionStream: NativeStream,
|
|
2491
|
-
if (
|
|
2502
|
+
const { CompressionStream: NativeStream, CompressionStreamFallback: FallbackStream } = config;
|
|
2503
|
+
if (FallbackStream && !FallbackStream.requiresModule) {
|
|
2492
2504
|
return true;
|
|
2493
2505
|
}
|
|
2494
2506
|
if (supportsDeflateRaw(NativeStream) || supportsGzip(NativeStream)) {
|
|
2495
2507
|
return true;
|
|
2496
2508
|
}
|
|
2497
|
-
if (
|
|
2509
|
+
if (FallbackStream) {
|
|
2498
2510
|
try {
|
|
2499
2511
|
await initModule$1(config);
|
|
2500
2512
|
return true;
|
|
@@ -2507,12 +2519,16 @@ async function supportsDeflate(config) {
|
|
|
2507
2519
|
|
|
2508
2520
|
function resetWebWorkerSupport() {
|
|
2509
2521
|
webWorkerSupported = UNDEFINED_VALUE;
|
|
2522
|
+
createWorkerFailed = false;
|
|
2510
2523
|
}
|
|
2511
2524
|
|
|
2512
2525
|
class CodecWorker {
|
|
2513
2526
|
|
|
2514
|
-
constructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, workerURI }, onTaskFinished) {
|
|
2527
|
+
constructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, workerURI, createWorker }, onTaskFinished) {
|
|
2515
2528
|
const { signal } = streamOptions;
|
|
2529
|
+
if (createWorkerFailed) {
|
|
2530
|
+
createWorker = UNDEFINED_VALUE;
|
|
2531
|
+
}
|
|
2516
2532
|
Object.assign(workerData, {
|
|
2517
2533
|
busy: true,
|
|
2518
2534
|
generation: (workerData.generation || 0) + 1,
|
|
@@ -2522,6 +2538,7 @@ class CodecWorker {
|
|
|
2522
2538
|
writable,
|
|
2523
2539
|
options: Object.assign({}, options),
|
|
2524
2540
|
workerURI,
|
|
2541
|
+
createWorker,
|
|
2525
2542
|
transferStreams,
|
|
2526
2543
|
terminate() {
|
|
2527
2544
|
return new Promise(resolve => {
|
|
@@ -2557,7 +2574,7 @@ class CodecWorker {
|
|
|
2557
2574
|
// deno-lint-ignore valid-typeof
|
|
2558
2575
|
webWorkerSupported = typeof Worker != UNDEFINED_TYPE;
|
|
2559
2576
|
}
|
|
2560
|
-
return (useWebWorkers && webWorkerSupported ? createWebWorkerInterface : createWorkerInterface)(workerData, config);
|
|
2577
|
+
return (useWebWorkers && ((webWorkerSupported && workerURI) || createWorker) ? createWebWorkerInterface : createWorkerInterface)(workerData, config);
|
|
2561
2578
|
}
|
|
2562
2579
|
}
|
|
2563
2580
|
|
|
@@ -2614,7 +2631,11 @@ function createWebWorkerInterface(workerData, config) {
|
|
|
2614
2631
|
try {
|
|
2615
2632
|
worker = getWebWorker(workerData.workerURI, baseURI, workerData);
|
|
2616
2633
|
} catch {
|
|
2617
|
-
|
|
2634
|
+
if (workerData.createWorker) {
|
|
2635
|
+
createWorkerFailed = true;
|
|
2636
|
+
} else {
|
|
2637
|
+
webWorkerSupported = false;
|
|
2638
|
+
}
|
|
2618
2639
|
return createWorkerInterface(workerData, config);
|
|
2619
2640
|
}
|
|
2620
2641
|
Object.assign(workerData, {
|
|
@@ -2627,7 +2648,11 @@ function createWebWorkerInterface(workerData, config) {
|
|
|
2627
2648
|
return await runWebWorker(workerData, { chunkSize, wasmURI, baseURI, workerStartupTimeout });
|
|
2628
2649
|
} catch (error) {
|
|
2629
2650
|
if (error && error.workerStartupFailed) {
|
|
2630
|
-
|
|
2651
|
+
if (workerData.createWorker) {
|
|
2652
|
+
createWorkerFailed = true;
|
|
2653
|
+
} else {
|
|
2654
|
+
webWorkerSupported = false;
|
|
2655
|
+
}
|
|
2631
2656
|
const { reader } = workerData;
|
|
2632
2657
|
if (reader) {
|
|
2633
2658
|
reader.releaseLock();
|
|
@@ -2650,17 +2675,17 @@ async function runWorker$1({ options, readable, writable, onTaskFinished }, conf
|
|
|
2650
2675
|
try {
|
|
2651
2676
|
if (options.compressed && !options.format) {
|
|
2652
2677
|
const deflate = options.codecType.startsWith(CODEC_DEFLATE);
|
|
2653
|
-
const
|
|
2678
|
+
const FallbackStream = deflate ? config.CompressionStreamFallback : config.DecompressionStreamFallback;
|
|
2654
2679
|
const NativeStream = deflate ? config.CompressionStream : config.DecompressionStream;
|
|
2655
2680
|
if (!options.useCompressionStream) {
|
|
2656
2681
|
try {
|
|
2657
2682
|
await initModule$1(config);
|
|
2658
2683
|
} catch {
|
|
2659
|
-
if (!
|
|
2684
|
+
if (!FallbackStream || FallbackStream.requiresModule) {
|
|
2660
2685
|
options.useCompressionStream = true;
|
|
2661
2686
|
}
|
|
2662
2687
|
}
|
|
2663
|
-
} else if (
|
|
2688
|
+
} else if (FallbackStream && FallbackStream.requiresModule && !supportsDeflateRaw(NativeStream)) {
|
|
2664
2689
|
try {
|
|
2665
2690
|
await initModule$1(config);
|
|
2666
2691
|
} catch {
|
|
@@ -2674,12 +2699,12 @@ async function runWorker$1({ options, readable, writable, onTaskFinished }, conf
|
|
|
2674
2699
|
.pipeThrough(new ChunkStream(getChunkSize(config)))
|
|
2675
2700
|
.pipeTo(writable, { preventClose: true, preventAbort: true });
|
|
2676
2701
|
const {
|
|
2677
|
-
|
|
2702
|
+
crc32,
|
|
2678
2703
|
inputSize,
|
|
2679
2704
|
outputSize
|
|
2680
2705
|
} = codecStream;
|
|
2681
2706
|
return {
|
|
2682
|
-
|
|
2707
|
+
crc32,
|
|
2683
2708
|
inputSize,
|
|
2684
2709
|
outputSize
|
|
2685
2710
|
};
|
|
@@ -2785,8 +2810,11 @@ function terminateWorker$1(workerData) {
|
|
|
2785
2810
|
}
|
|
2786
2811
|
|
|
2787
2812
|
function getWebWorker(url, baseURI, workerData, isModuleType, useBlobURI = true) {
|
|
2813
|
+
const { createWorker } = workerData;
|
|
2788
2814
|
let worker, resolvedURI, resolvedOptions;
|
|
2789
|
-
if (
|
|
2815
|
+
if (createWorker) {
|
|
2816
|
+
worker = createWorker();
|
|
2817
|
+
} else if (webWorkerURI === UNDEFINED_VALUE || webWorkerSource !== url) {
|
|
2790
2818
|
// deno-lint-ignore valid-typeof
|
|
2791
2819
|
const isFunctionURI = typeof url == FUNCTION_TYPE;
|
|
2792
2820
|
if (isFunctionURI) {
|
|
@@ -3041,7 +3069,7 @@ let indexWorker = 0;
|
|
|
3041
3069
|
async function runWorker(stream, workerOptions) {
|
|
3042
3070
|
const { options, config } = workerOptions;
|
|
3043
3071
|
const { transferStreams, useWebWorkers, useCompressionStream, compressed, checkCrc32, computeCrc32, encrypted, format, codecURI } = options;
|
|
3044
|
-
const { workerURI, maxWorkers } = config;
|
|
3072
|
+
const { workerURI, createWorker, maxWorkers } = config;
|
|
3045
3073
|
if (format) {
|
|
3046
3074
|
if (codecURI) {
|
|
3047
3075
|
options.codecURI = resolveCodecURI(codecURI, config.baseURI);
|
|
@@ -3053,6 +3081,7 @@ async function runWorker(stream, workerOptions) {
|
|
|
3053
3081
|
const workerSupported = format === UNDEFINED_VALUE || Boolean(options.codecURI);
|
|
3054
3082
|
workerOptions.useWebWorkers = !streamCopy && workerSupported && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));
|
|
3055
3083
|
workerOptions.workerURI = workerOptions.useWebWorkers && workerURI ? workerURI : UNDEFINED_VALUE;
|
|
3084
|
+
workerOptions.createWorker = workerOptions.useWebWorkers && createWorker ? createWorker : UNDEFINED_VALUE;
|
|
3056
3085
|
options.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);
|
|
3057
3086
|
return (await getWorker()).run();
|
|
3058
3087
|
|
|
@@ -3116,7 +3145,7 @@ function onWorkerStarvation() {
|
|
|
3116
3145
|
starvationTimeout = null;
|
|
3117
3146
|
if (pendingRequests.length) {
|
|
3118
3147
|
const [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);
|
|
3119
|
-
const inlineWorkerOptions = Object.assign({}, workerOptions, { useWebWorkers: false, workerURI: UNDEFINED_VALUE });
|
|
3148
|
+
const inlineWorkerOptions = Object.assign({}, workerOptions, { useWebWorkers: false, workerURI: UNDEFINED_VALUE, createWorker: UNDEFINED_VALUE });
|
|
3120
3149
|
resolve(new CodecWorker({}, stream, inlineWorkerOptions, onInlineTaskFinished));
|
|
3121
3150
|
armStarvationTimeout();
|
|
3122
3151
|
}
|
|
@@ -4277,6 +4306,8 @@ const PROPERTY_NAME_CRC32 = "crc32";
|
|
|
4277
4306
|
const PROPERTY_NAME_EXTRA_FIELD = "extraField";
|
|
4278
4307
|
const PROPERTY_NAME_EXTRA_FIELD_INFOZIP = "extraFieldInfoZip";
|
|
4279
4308
|
const PROPERTY_NAME_EXTRA_FIELD_UNIX = "extraFieldUnix";
|
|
4309
|
+
const PROPERTY_NAME_EXTRA_FIELD_UNIX_TYPE1 = "extraFieldUnixType1";
|
|
4310
|
+
const PROPERTY_NAME_EXTRA_FIELD_PKWARE_UNIX = "extraFieldPkwareUnix";
|
|
4280
4311
|
const PROPERTY_NAME_UID = "uid";
|
|
4281
4312
|
const PROPERTY_NAME_GID = "gid";
|
|
4282
4313
|
const PROPERTY_NAME_UNIX_MODE = "unixMode";
|
|
@@ -4293,6 +4324,7 @@ const PROPERTY_NAME_EXTRA_FIELD_UNICODE_COMMENT = "extraFieldUnicodeComment";
|
|
|
4293
4324
|
const PROPERTY_NAME_EXTRA_FIELD_AES = "extraFieldAES";
|
|
4294
4325
|
const PROPERTY_NAME_EXTRA_FIELD_NTFS = "extraFieldNTFS";
|
|
4295
4326
|
const PROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP = "extraFieldExtendedTimestamp";
|
|
4327
|
+
const PROPERTY_NAME_EXTRA_FIELD_USDZ = "extraFieldUSDZ";
|
|
4296
4328
|
|
|
4297
4329
|
const PROPERTY_NAMES = [
|
|
4298
4330
|
PROPERTY_NAME_FILENAME,
|
|
@@ -4304,6 +4336,7 @@ const PROPERTY_NAMES = [
|
|
|
4304
4336
|
PROPERTY_NAME_COMMENT,
|
|
4305
4337
|
PROPERTY_NAME_RAW_COMMENT,
|
|
4306
4338
|
PROPERTY_NAME_LAST_ACCESS_DATE,
|
|
4339
|
+
PROPERTY_NAME_RAW_LAST_ACCESS_DATE,
|
|
4307
4340
|
PROPERTY_NAME_CREATION_DATE,
|
|
4308
4341
|
PROPERTY_NAME_RAW_CREATION_DATE,
|
|
4309
4342
|
PROPERTY_NAME_OFFSET,
|
|
@@ -4326,6 +4359,8 @@ const PROPERTY_NAMES = [
|
|
|
4326
4359
|
PROPERTY_NAME_EXTRA_FIELD,
|
|
4327
4360
|
PROPERTY_NAME_EXTRA_FIELD_UNIX,
|
|
4328
4361
|
PROPERTY_NAME_EXTRA_FIELD_INFOZIP,
|
|
4362
|
+
PROPERTY_NAME_EXTRA_FIELD_UNIX_TYPE1,
|
|
4363
|
+
PROPERTY_NAME_EXTRA_FIELD_PKWARE_UNIX,
|
|
4329
4364
|
PROPERTY_NAME_UID,
|
|
4330
4365
|
PROPERTY_NAME_GID,
|
|
4331
4366
|
PROPERTY_NAME_UNIX_MODE,
|
|
@@ -4341,7 +4376,8 @@ const PROPERTY_NAMES = [
|
|
|
4341
4376
|
PROPERTY_NAME_EXTRA_FIELD_UNICODE_COMMENT,
|
|
4342
4377
|
PROPERTY_NAME_EXTRA_FIELD_AES,
|
|
4343
4378
|
PROPERTY_NAME_EXTRA_FIELD_NTFS,
|
|
4344
|
-
PROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP
|
|
4379
|
+
PROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP,
|
|
4380
|
+
PROPERTY_NAME_EXTRA_FIELD_USDZ
|
|
4345
4381
|
];
|
|
4346
4382
|
|
|
4347
4383
|
class Entry {
|
|
@@ -4415,6 +4451,7 @@ const OPTION_ENCODE_TEXT = "encodeText";
|
|
|
4415
4451
|
const OPTION_OFFSET = "offset";
|
|
4416
4452
|
const OPTION_USDZ = "usdz";
|
|
4417
4453
|
const OPTION_UNIX_EXTRA_FIELD_TYPE = "unixExtraFieldType";
|
|
4454
|
+
const OPTION_LOCAL_EXTRA_FIELD = "localExtraField";
|
|
4418
4455
|
const OPTION_STRICTNESS = "strictness";
|
|
4419
4456
|
const OPTION_MAX_APPENDED_DATA_SIZE = "maxAppendedDataSize";
|
|
4420
4457
|
const STRICTNESS_STRICT = "strict";
|
|
@@ -4467,7 +4504,7 @@ const CHARSET_UTF8 = "utf-8";
|
|
|
4467
4504
|
const PROPERTY_NAME_UTF8_SUFFIX = "UTF8";
|
|
4468
4505
|
const CHARSET_CP437 = "cp437";
|
|
4469
4506
|
const BITFLAG_AMBIGUITY_MASK = BITFLAG_ENCRYPTED | BITFLAG_DATA_DESCRIPTOR | BITFLAG_LANG_ENCODING_FLAG;
|
|
4470
|
-
const VENDOR_VERSION_AE_1 = 1;
|
|
4507
|
+
const VENDOR_VERSION_AE_1$1 = 1;
|
|
4471
4508
|
const ZIP64_PROPERTIES = [
|
|
4472
4509
|
[PROPERTY_NAME_UNCOMPRESSED_SIZE, MAX_32_BITS],
|
|
4473
4510
|
[PROPERTY_NAME_COMPRESSED_SIZE, MAX_32_BITS],
|
|
@@ -4860,7 +4897,7 @@ let ZipEntry$1 = class ZipEntry {
|
|
|
4860
4897
|
config,
|
|
4861
4898
|
bitFlag,
|
|
4862
4899
|
rawBitFlag,
|
|
4863
|
-
|
|
4900
|
+
crc32,
|
|
4864
4901
|
rawLastModDate,
|
|
4865
4902
|
uncompressedSize,
|
|
4866
4903
|
compressedSize
|
|
@@ -4951,7 +4988,7 @@ let ZipEntry$1 = class ZipEntry {
|
|
|
4951
4988
|
const checkCrc32 = (checkCrc32Option === UNDEFINED_VALUE ?
|
|
4952
4989
|
getOptionValue$1(zipEntry, options, OPTION_CHECK_SIGNATURE) :
|
|
4953
4990
|
checkCrc32Option) && !passThrough &&
|
|
4954
|
-
(!encrypted || zipCrypto || (extraFieldAES && extraFieldAES.vendorVersion == VENDOR_VERSION_AE_1));
|
|
4991
|
+
(!encrypted || zipCrypto || (extraFieldAES && extraFieldAES.vendorVersion == VENDOR_VERSION_AE_1$1));
|
|
4955
4992
|
const workerOptions = {
|
|
4956
4993
|
options: {
|
|
4957
4994
|
codecType: CODEC_INFLATE,
|
|
@@ -4961,9 +4998,9 @@ let ZipEntry$1 = class ZipEntry {
|
|
|
4961
4998
|
encryptionStrength: extraFieldAES && extraFieldAES.strength,
|
|
4962
4999
|
checkCrc32,
|
|
4963
5000
|
checkAuthenticationCode: getOptionValue$1(zipEntry, options, OPTION_CHECK_AUTHENTICATION_CODE),
|
|
4964
|
-
passwordVerification: zipCrypto && (dataDescriptor ? ((rawLastModDate >>> 8) & MAX_8_BITS) : ((
|
|
5001
|
+
passwordVerification: zipCrypto && (dataDescriptor ? ((rawLastModDate >>> 8) & MAX_8_BITS) : ((crc32 >>> 24) & MAX_8_BITS)),
|
|
4965
5002
|
outputSize: passThrough ? compressedSize : uncompressedSize,
|
|
4966
|
-
|
|
5003
|
+
crc32,
|
|
4967
5004
|
compressed: compressionMethod != 0 && !passThrough,
|
|
4968
5005
|
encrypted,
|
|
4969
5006
|
useWebWorkers: getOptionValue$1(zipEntry, options, OPTION_USE_WEB_WORKERS),
|
|
@@ -4985,7 +5022,7 @@ let ZipEntry$1 = class ZipEntry {
|
|
|
4985
5022
|
fileEntry,
|
|
4986
5023
|
index,
|
|
4987
5024
|
offset: localHeaderOffset,
|
|
4988
|
-
|
|
5025
|
+
crc32,
|
|
4989
5026
|
compressedSize,
|
|
4990
5027
|
uncompressedSize,
|
|
4991
5028
|
dataOffset,
|
|
@@ -5102,6 +5139,16 @@ function readCommonFooter(fileEntry, directory, dataView, offset, localDirectory
|
|
|
5102
5139
|
} else {
|
|
5103
5140
|
directory.compressionMethod = compressionMethod;
|
|
5104
5141
|
}
|
|
5142
|
+
const extraFieldPkwareUnix = extraField.get(EXTRAFIELD_TYPE_PKWARE_UNIX);
|
|
5143
|
+
if (extraFieldPkwareUnix) {
|
|
5144
|
+
readExtraFieldUnixDates(extraFieldPkwareUnix, directory);
|
|
5145
|
+
directory.extraFieldPkwareUnix = extraFieldPkwareUnix;
|
|
5146
|
+
}
|
|
5147
|
+
const extraFieldUnixType1 = extraField.get(EXTRAFIELD_TYPE_UNIX_TYPE1);
|
|
5148
|
+
if (extraFieldUnixType1) {
|
|
5149
|
+
readExtraFieldUnixDates(extraFieldUnixType1, directory);
|
|
5150
|
+
directory.extraFieldUnixType1 = extraFieldUnixType1;
|
|
5151
|
+
}
|
|
5105
5152
|
const extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);
|
|
5106
5153
|
if (extraFieldNTFS) {
|
|
5107
5154
|
readExtraFieldNTFS(extraFieldNTFS, directory);
|
|
@@ -5151,15 +5198,15 @@ function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName,
|
|
|
5151
5198
|
return;
|
|
5152
5199
|
}
|
|
5153
5200
|
const extraFieldView = getDataView(extraFieldUnicode.data);
|
|
5154
|
-
const
|
|
5155
|
-
|
|
5156
|
-
const
|
|
5157
|
-
|
|
5158
|
-
const
|
|
5201
|
+
const computedCrc32 = new Crc32();
|
|
5202
|
+
computedCrc32.append(fileEntry[rawPropertyName]);
|
|
5203
|
+
const computedCrc32View = getDataView(new Uint8Array(4));
|
|
5204
|
+
computedCrc32View.setUint32(0, computedCrc32.get(), true);
|
|
5205
|
+
const nameCrc32 = getUint32(extraFieldView, 1);
|
|
5159
5206
|
Object.assign(extraFieldUnicode, {
|
|
5160
5207
|
version: getUint8(extraFieldView, 0),
|
|
5161
5208
|
[propertyName]: decodeText(extraFieldUnicode.data.subarray(5)),
|
|
5162
|
-
valid: !fileEntry.bitFlag.languageEncodingFlag &&
|
|
5209
|
+
valid: !fileEntry.bitFlag.languageEncodingFlag && nameCrc32 == getUint32(computedCrc32View, 0)
|
|
5163
5210
|
});
|
|
5164
5211
|
if (extraFieldUnicode.valid) {
|
|
5165
5212
|
directory[propertyName] = extraFieldUnicode[propertyName];
|
|
@@ -5178,7 +5225,7 @@ function readExtraFieldAES(extraFieldAES, directory, compressionMethod) {
|
|
|
5178
5225
|
compressionMethod: getUint16(extraFieldView, 5)
|
|
5179
5226
|
});
|
|
5180
5227
|
directory.compressionMethod = extraFieldAES.compressionMethod;
|
|
5181
|
-
if (extraFieldAES.vendorVersion != VENDOR_VERSION_AE_1) {
|
|
5228
|
+
if (extraFieldAES.vendorVersion != VENDOR_VERSION_AE_1$1) {
|
|
5182
5229
|
directory.crc32 = UNDEFINED_VALUE;
|
|
5183
5230
|
}
|
|
5184
5231
|
}
|
|
@@ -5218,6 +5265,22 @@ function readExtraFieldNTFS(extraFieldNTFS, directory) {
|
|
|
5218
5265
|
}
|
|
5219
5266
|
}
|
|
5220
5267
|
|
|
5268
|
+
function readExtraFieldUnixDates(extraField, directory) {
|
|
5269
|
+
if (extraField.data.length < 8) {
|
|
5270
|
+
return;
|
|
5271
|
+
}
|
|
5272
|
+
const extraFieldView = getDataView(extraField.data);
|
|
5273
|
+
const lastAccessDate = new Date(getUint32(extraFieldView, 0) * 1000);
|
|
5274
|
+
const lastModDate = new Date(getUint32(extraFieldView, 4) * 1000);
|
|
5275
|
+
const extraFieldData = { lastAccessDate, lastModDate };
|
|
5276
|
+
if (extraField.data.length >= 12) {
|
|
5277
|
+
extraFieldData.uid = getUint16(extraFieldView, 8);
|
|
5278
|
+
extraFieldData.gid = getUint16(extraFieldView, 10);
|
|
5279
|
+
}
|
|
5280
|
+
Object.assign(extraField, extraFieldData);
|
|
5281
|
+
Object.assign(directory, extraFieldData);
|
|
5282
|
+
}
|
|
5283
|
+
|
|
5221
5284
|
function readExtraFieldUnix(extraField, directory, isInfoZip) {
|
|
5222
5285
|
try {
|
|
5223
5286
|
const view = getDataView(extraField.data);
|
|
@@ -5296,7 +5359,7 @@ async function detectOverlappingEntry({
|
|
|
5296
5359
|
fileEntry,
|
|
5297
5360
|
index,
|
|
5298
5361
|
offset,
|
|
5299
|
-
|
|
5362
|
+
crc32,
|
|
5300
5363
|
compressedSize,
|
|
5301
5364
|
uncompressedSize,
|
|
5302
5365
|
dataOffset,
|
|
@@ -5317,7 +5380,7 @@ async function detectOverlappingEntry({
|
|
|
5317
5380
|
const dataDescriptorSignature = dataDescriptorArray.length == dataDescriptorLength + DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH &&
|
|
5318
5381
|
getUint32(getDataView(dataDescriptorArray), 0) == DATA_DESCRIPTOR_RECORD_SIGNATURE;
|
|
5319
5382
|
if (dataDescriptorSignature) {
|
|
5320
|
-
const
|
|
5383
|
+
const readCrc32 = getUint32(getDataView(dataDescriptorArray), 4);
|
|
5321
5384
|
let readCompressedSize;
|
|
5322
5385
|
let readUncompressedSize;
|
|
5323
5386
|
if (extraFieldZip64) {
|
|
@@ -5327,8 +5390,8 @@ async function detectOverlappingEntry({
|
|
|
5327
5390
|
readCompressedSize = getUint32(getDataView(dataDescriptorArray), 8);
|
|
5328
5391
|
readUncompressedSize = getUint32(getDataView(dataDescriptorArray), 12);
|
|
5329
5392
|
}
|
|
5330
|
-
const
|
|
5331
|
-
if (
|
|
5393
|
+
const matchCrc32 = (fileEntry.encrypted && !fileEntry.zipCrypto) || readCrc32 == crc32;
|
|
5394
|
+
if (matchCrc32 &&
|
|
5332
5395
|
readCompressedSize == compressedSize &&
|
|
5333
5396
|
readUncompressedSize == uncompressedSize) {
|
|
5334
5397
|
dataDescriptorLength += DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH;
|
|
@@ -5497,11 +5560,11 @@ function checkLocalDirectory(zipEntry, localDirectory, rawLocalFilename) {
|
|
|
5497
5560
|
throwAmbiguousArchive("mismatched local file header (compression method)");
|
|
5498
5561
|
}
|
|
5499
5562
|
if (!localDirectory.bitFlag.dataDescriptor &&
|
|
5500
|
-
(localDirectory.
|
|
5501
|
-
(localDirectory.
|
|
5563
|
+
(localDirectory.crc32 || localDirectory.compressedSize || localDirectory.uncompressedSize) &&
|
|
5564
|
+
(localDirectory.crc32 != zipEntry.crc32 ||
|
|
5502
5565
|
localDirectory.compressedSize != zipEntry.compressedSize ||
|
|
5503
5566
|
localDirectory.uncompressedSize != zipEntry.uncompressedSize)) {
|
|
5504
|
-
throwAmbiguousArchive("mismatched local file header (
|
|
5567
|
+
throwAmbiguousArchive("mismatched local file header (crc32 or sizes)");
|
|
5505
5568
|
}
|
|
5506
5569
|
}
|
|
5507
5570
|
|
|
@@ -5621,7 +5684,9 @@ const ERR_INVALID_MSDOS_ATTRIBUTES = "Invalid msdosAttributesRaw (must be intege
|
|
|
5621
5684
|
const ERR_INVALID_MSDOS_DATA = "Invalid msdosAttributes (must be an object with boolean flags)";
|
|
5622
5685
|
|
|
5623
5686
|
const EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);
|
|
5624
|
-
const
|
|
5687
|
+
const EXTRAFIELD_OFFSET_AES_VENDOR_VERSION = 4;
|
|
5688
|
+
const VENDOR_VERSION_AE_1 = 1;
|
|
5689
|
+
const INFOZIP_EXTRA_FIELD_TYPE$1 = "infozip";
|
|
5625
5690
|
const UNIX_EXTRA_FIELD_TYPE = "unix";
|
|
5626
5691
|
|
|
5627
5692
|
let workers = 0;
|
|
@@ -5715,9 +5780,9 @@ class ZipWriter {
|
|
|
5715
5780
|
zip64UncompressedSize,
|
|
5716
5781
|
extraFieldLength
|
|
5717
5782
|
});
|
|
5718
|
-
const {
|
|
5719
|
-
if (
|
|
5720
|
-
setUint32(headerView, HEADER_OFFSET_SIGNATURE,
|
|
5783
|
+
const { crc32 } = entry;
|
|
5784
|
+
if (crc32 !== UNDEFINED_VALUE) {
|
|
5785
|
+
setUint32(headerView, HEADER_OFFSET_SIGNATURE, crc32);
|
|
5721
5786
|
}
|
|
5722
5787
|
Object.assign(entry, {
|
|
5723
5788
|
zip64UncompressedSize,
|
|
@@ -5902,6 +5967,7 @@ async function addFile(zipWriter, name, reader, options) {
|
|
|
5902
5967
|
internalFileAttribute: metadataInfo.resolvedOptions.internalFileAttributes,
|
|
5903
5968
|
externalFileAttribute: attributesInfo.resolvedOptions.externalFileAttributes,
|
|
5904
5969
|
signature: options[PROPERTY_NAME_SIGNATURE],
|
|
5970
|
+
crc32: options.crc32 === UNDEFINED_VALUE ? options[PROPERTY_NAME_SIGNATURE] : options.crc32,
|
|
5905
5971
|
offset: zipWriter.offset - diskOffset,
|
|
5906
5972
|
diskNumberStart: diskNumber
|
|
5907
5973
|
});
|
|
@@ -5938,7 +6004,7 @@ function resolveAttributes(zipWriter, name, options) {
|
|
|
5938
6004
|
if (unixMode !== UNDEFINED_VALUE && (unixMode < 0 || unixMode > MAX_16_BITS)) {
|
|
5939
6005
|
throw new Error(ERR_INVALID_UNIX_MODE);
|
|
5940
6006
|
}
|
|
5941
|
-
if (unixExtraFieldType !== UNDEFINED_VALUE && unixExtraFieldType !== INFOZIP_EXTRA_FIELD_TYPE && unixExtraFieldType !== UNIX_EXTRA_FIELD_TYPE) {
|
|
6007
|
+
if (unixExtraFieldType !== UNDEFINED_VALUE && unixExtraFieldType !== INFOZIP_EXTRA_FIELD_TYPE$1 && unixExtraFieldType !== UNIX_EXTRA_FIELD_TYPE) {
|
|
5942
6008
|
throw new Error(ERR_INVALID_UNIX_EXTRA_FIELD_TYPE);
|
|
5943
6009
|
}
|
|
5944
6010
|
if (unixExtraFieldType === UNIX_EXTRA_FIELD_TYPE &&
|
|
@@ -5946,7 +6012,7 @@ function resolveAttributes(zipWriter, name, options) {
|
|
|
5946
6012
|
throw new Error(ERR_INVALID_UNIX_ID_SIZE);
|
|
5947
6013
|
}
|
|
5948
6014
|
if (unixExtraFieldType === UNDEFINED_VALUE && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {
|
|
5949
|
-
unixExtraFieldType = INFOZIP_EXTRA_FIELD_TYPE;
|
|
6015
|
+
unixExtraFieldType = INFOZIP_EXTRA_FIELD_TYPE$1;
|
|
5950
6016
|
}
|
|
5951
6017
|
let msdosAttributesRaw = getOptionValue(zipWriter, options, PROPERTY_NAME_MSDOS_ATTRIBUTES_RAW);
|
|
5952
6018
|
let msdosAttributes = getOptionValue(zipWriter, options, PROPERTY_NAME_MSDOS_ATTRIBUTES);
|
|
@@ -6118,27 +6184,8 @@ function resolveMetadata(zipWriter, name, options) {
|
|
|
6118
6184
|
if (!zipCrypto && (password !== UNDEFINED_VALUE || rawPassword !== UNDEFINED_VALUE) && !(encryptionStrength >= 1 && encryptionStrength <= 3)) {
|
|
6119
6185
|
throw new Error(ERR_INVALID_ENCRYPTION_STRENGTH);
|
|
6120
6186
|
}
|
|
6121
|
-
|
|
6122
|
-
const
|
|
6123
|
-
if (extraField) {
|
|
6124
|
-
let extraFieldSize = 0;
|
|
6125
|
-
let offset = 0;
|
|
6126
|
-
extraField.forEach(data => extraFieldSize += 4 + getLength(data));
|
|
6127
|
-
rawExtraField = new Uint8Array(extraFieldSize);
|
|
6128
|
-
const rawExtraFieldView = getDataView(rawExtraField);
|
|
6129
|
-
extraField.forEach((data, type) => {
|
|
6130
|
-
if (type > MAX_16_BITS) {
|
|
6131
|
-
throw new Error(ERR_INVALID_EXTRAFIELD_TYPE);
|
|
6132
|
-
}
|
|
6133
|
-
if (getLength(data) > MAX_16_BITS) {
|
|
6134
|
-
throw new Error(ERR_INVALID_EXTRAFIELD_DATA);
|
|
6135
|
-
}
|
|
6136
|
-
setUint16(rawExtraFieldView, offset, type);
|
|
6137
|
-
setUint16(rawExtraFieldView, offset + 2, getLength(data));
|
|
6138
|
-
arraySet(rawExtraField, data, offset + 4);
|
|
6139
|
-
offset += 4 + getLength(data);
|
|
6140
|
-
});
|
|
6141
|
-
}
|
|
6187
|
+
const rawExtraField = serializeExtraField(options[PROPERTY_NAME_EXTRA_FIELD]);
|
|
6188
|
+
const rawLocalExtraField = serializeExtraField(options[OPTION_LOCAL_EXTRA_FIELD]);
|
|
6142
6189
|
return {
|
|
6143
6190
|
comment,
|
|
6144
6191
|
resolvedOptions: {
|
|
@@ -6172,11 +6219,36 @@ function resolveMetadata(zipWriter, name, options) {
|
|
|
6172
6219
|
useCompressionStream,
|
|
6173
6220
|
dataDescriptor,
|
|
6174
6221
|
zip64,
|
|
6175
|
-
rawExtraField
|
|
6222
|
+
rawExtraField,
|
|
6223
|
+
rawLocalExtraField
|
|
6176
6224
|
}
|
|
6177
6225
|
};
|
|
6178
6226
|
}
|
|
6179
6227
|
|
|
6228
|
+
function serializeExtraField(extraField) {
|
|
6229
|
+
if (!extraField) {
|
|
6230
|
+
return EMPTY_UINT8_ARRAY;
|
|
6231
|
+
}
|
|
6232
|
+
let extraFieldSize = 0;
|
|
6233
|
+
let offset = 0;
|
|
6234
|
+
extraField.forEach(data => extraFieldSize += 4 + getLength(data));
|
|
6235
|
+
const rawExtraField = new Uint8Array(extraFieldSize);
|
|
6236
|
+
const rawExtraFieldView = getDataView(rawExtraField);
|
|
6237
|
+
extraField.forEach((data, type) => {
|
|
6238
|
+
if (type > MAX_16_BITS) {
|
|
6239
|
+
throw new Error(ERR_INVALID_EXTRAFIELD_TYPE);
|
|
6240
|
+
}
|
|
6241
|
+
if (getLength(data) > MAX_16_BITS) {
|
|
6242
|
+
throw new Error(ERR_INVALID_EXTRAFIELD_DATA);
|
|
6243
|
+
}
|
|
6244
|
+
setUint16(rawExtraFieldView, offset, type);
|
|
6245
|
+
setUint16(rawExtraFieldView, offset + 2, getLength(data));
|
|
6246
|
+
arraySet(rawExtraField, data, offset + 4);
|
|
6247
|
+
offset += 4 + getLength(data);
|
|
6248
|
+
});
|
|
6249
|
+
return rawExtraField;
|
|
6250
|
+
}
|
|
6251
|
+
|
|
6180
6252
|
async function resolveSizes(zipWriter, reader, { resolvedOptions: metadata }, options) {
|
|
6181
6253
|
const { passThrough, zipCrypto, password, rawPassword, encryptionStrength } = metadata;
|
|
6182
6254
|
let { dataDescriptor, zip64, level, compressionMethod } = metadata;
|
|
@@ -6501,12 +6573,9 @@ async function createFileEntry(reader, writer, { diskNumberStart, lock }, entryI
|
|
|
6501
6573
|
msdosAttributes
|
|
6502
6574
|
};
|
|
6503
6575
|
let {
|
|
6504
|
-
crc32
|
|
6576
|
+
crc32,
|
|
6505
6577
|
uncompressedSize
|
|
6506
6578
|
} = options;
|
|
6507
|
-
if (signature === UNDEFINED_VALUE) {
|
|
6508
|
-
({ signature } = options);
|
|
6509
|
-
}
|
|
6510
6579
|
let compressedSize = 0;
|
|
6511
6580
|
if (!passThrough) {
|
|
6512
6581
|
uncompressedSize = 0;
|
|
@@ -6544,7 +6613,7 @@ async function createFileEntry(reader, writer, { diskNumberStart, lock }, entryI
|
|
|
6544
6613
|
if (!passThrough) {
|
|
6545
6614
|
uncompressedSize = result.inputSize;
|
|
6546
6615
|
if (!encrypted || zipCrypto) {
|
|
6547
|
-
|
|
6616
|
+
crc32 = result.crc32;
|
|
6548
6617
|
}
|
|
6549
6618
|
}
|
|
6550
6619
|
if ((!zip64CompressedSize && compressedSize >= MAX_32_BITS) ||
|
|
@@ -6560,7 +6629,7 @@ async function createFileEntry(reader, writer, { diskNumberStart, lock }, entryI
|
|
|
6560
6629
|
|
|
6561
6630
|
}
|
|
6562
6631
|
setEntryInfo({
|
|
6563
|
-
|
|
6632
|
+
crc32,
|
|
6564
6633
|
compressedSize,
|
|
6565
6634
|
uncompressedSize,
|
|
6566
6635
|
headerInfo,
|
|
@@ -6583,8 +6652,8 @@ async function createFileEntry(reader, writer, { diskNumberStart, lock }, entryI
|
|
|
6583
6652
|
version,
|
|
6584
6653
|
headerArray,
|
|
6585
6654
|
headerView,
|
|
6586
|
-
signature,
|
|
6587
|
-
crc32: encrypted && !zipCrypto ? UNDEFINED_VALUE :
|
|
6655
|
+
signature: crc32,
|
|
6656
|
+
crc32: encrypted && !zipCrypto && !passThrough ? UNDEFINED_VALUE : crc32,
|
|
6588
6657
|
extraFieldExtendedTimestampFlag,
|
|
6589
6658
|
zip64UncompressedSize,
|
|
6590
6659
|
zip64CompressedSize
|
|
@@ -6605,6 +6674,7 @@ function getHeaderInfo(options) {
|
|
|
6605
6674
|
dataDescriptor,
|
|
6606
6675
|
directory,
|
|
6607
6676
|
rawExtraField,
|
|
6677
|
+
rawLocalExtraField,
|
|
6608
6678
|
encryptionStrength,
|
|
6609
6679
|
extendedTimestamp,
|
|
6610
6680
|
ntfsTimestamp,
|
|
@@ -6612,7 +6682,8 @@ function getHeaderInfo(options) {
|
|
|
6612
6682
|
encrypted,
|
|
6613
6683
|
zip64UncompressedSize,
|
|
6614
6684
|
zip64CompressedSize,
|
|
6615
|
-
uncompressedSize
|
|
6685
|
+
uncompressedSize,
|
|
6686
|
+
crc32
|
|
6616
6687
|
} = options;
|
|
6617
6688
|
let { version, compressionMethod } = options;
|
|
6618
6689
|
const compressed = !directory && (compressionMethod === UNDEFINED_VALUE
|
|
@@ -6700,7 +6771,7 @@ function getHeaderInfo(options) {
|
|
|
6700
6771
|
let rawExtraFieldUnix;
|
|
6701
6772
|
try {
|
|
6702
6773
|
const { uid, gid, unixExtraFieldType } = options;
|
|
6703
|
-
if (unixExtraFieldType == INFOZIP_EXTRA_FIELD_TYPE && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {
|
|
6774
|
+
if (unixExtraFieldType == INFOZIP_EXTRA_FIELD_TYPE$1 && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {
|
|
6704
6775
|
const uidBytes = packUnixId(uid);
|
|
6705
6776
|
const gidBytes = packUnixId(gid);
|
|
6706
6777
|
const payloadLength = 3 + uidBytes.length + gidBytes.length;
|
|
@@ -6738,11 +6809,14 @@ function getHeaderInfo(options) {
|
|
|
6738
6809
|
}
|
|
6739
6810
|
if (encrypted && !zipCrypto) {
|
|
6740
6811
|
version = version > VERSION_AES ? version : VERSION_AES;
|
|
6812
|
+
if (passThrough && crc32 !== UNDEFINED_VALUE) {
|
|
6813
|
+
rawExtraFieldAES[EXTRAFIELD_OFFSET_AES_VENDOR_VERSION] = VENDOR_VERSION_AE_1;
|
|
6814
|
+
}
|
|
6741
6815
|
rawExtraFieldAES[9] = compressionMethod;
|
|
6742
6816
|
compressionMethod = COMPRESSION_METHOD_AES;
|
|
6743
6817
|
}
|
|
6744
6818
|
const localExtraFieldZip64Length = writeLocalExtraFieldZip64 ? getLength(rawLocalExtraFieldZip64) : 0;
|
|
6745
|
-
const extraFieldLength = localExtraFieldZip64Length + getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraFieldUnix, rawExtraField);
|
|
6819
|
+
const extraFieldLength = localExtraFieldZip64Length + getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraFieldUnix, rawExtraField, rawLocalExtraField);
|
|
6746
6820
|
if (extraFieldLength > MAX_16_BITS) {
|
|
6747
6821
|
throw new Error(ERR_INVALID_EXTRAFIELD_DATA);
|
|
6748
6822
|
}
|
|
@@ -6776,6 +6850,7 @@ function getHeaderInfo(options) {
|
|
|
6776
6850
|
localHeader.bytes(rawExtraFieldNTFS);
|
|
6777
6851
|
localHeader.bytes(rawExtraFieldUnix);
|
|
6778
6852
|
localHeader.bytes(rawExtraField);
|
|
6853
|
+
localHeader.bytes(rawLocalExtraField);
|
|
6779
6854
|
if (dataDescriptor) {
|
|
6780
6855
|
if (!zip64CompressedSize) {
|
|
6781
6856
|
setUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, 0);
|
|
@@ -6894,7 +6969,7 @@ function getDataDescriptorInfo({
|
|
|
6894
6969
|
}
|
|
6895
6970
|
|
|
6896
6971
|
function setEntryInfo({
|
|
6897
|
-
|
|
6972
|
+
crc32,
|
|
6898
6973
|
compressedSize,
|
|
6899
6974
|
uncompressedSize,
|
|
6900
6975
|
headerInfo,
|
|
@@ -6902,6 +6977,7 @@ function setEntryInfo({
|
|
|
6902
6977
|
}, {
|
|
6903
6978
|
zip64,
|
|
6904
6979
|
zipCrypto,
|
|
6980
|
+
passThrough,
|
|
6905
6981
|
dataDescriptor
|
|
6906
6982
|
}) {
|
|
6907
6983
|
const {
|
|
@@ -6912,10 +6988,10 @@ function setEntryInfo({
|
|
|
6912
6988
|
dataDescriptorView,
|
|
6913
6989
|
dataDescriptorOffset
|
|
6914
6990
|
} = dataDescriptorInfo;
|
|
6915
|
-
if ((!encrypted || zipCrypto) &&
|
|
6916
|
-
setUint32(headerView, HEADER_OFFSET_SIGNATURE,
|
|
6991
|
+
if ((!encrypted || zipCrypto || passThrough) && crc32 !== UNDEFINED_VALUE) {
|
|
6992
|
+
setUint32(headerView, HEADER_OFFSET_SIGNATURE, crc32);
|
|
6917
6993
|
if (dataDescriptor) {
|
|
6918
|
-
setUint32(dataDescriptorView, dataDescriptorOffset,
|
|
6994
|
+
setUint32(dataDescriptorView, dataDescriptorOffset, crc32);
|
|
6919
6995
|
}
|
|
6920
6996
|
}
|
|
6921
6997
|
if (zip64) {
|
|
@@ -6938,15 +7014,15 @@ function updateLocalHeader({
|
|
|
6938
7014
|
encrypted,
|
|
6939
7015
|
zip64,
|
|
6940
7016
|
localExtraFieldZip64Length,
|
|
6941
|
-
|
|
7017
|
+
crc32,
|
|
6942
7018
|
compressedSize,
|
|
6943
7019
|
uncompressedSize,
|
|
6944
7020
|
zip64UncompressedSize,
|
|
6945
7021
|
zip64CompressedSize
|
|
6946
|
-
}, localHeaderView, { dataDescriptor }) {
|
|
7022
|
+
}, localHeaderView, { dataDescriptor, passThrough }) {
|
|
6947
7023
|
if (!dataDescriptor) {
|
|
6948
|
-
if (!encrypted) {
|
|
6949
|
-
setUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + LOCAL_HEADER_COMMON_OFFSET,
|
|
7024
|
+
if (!encrypted || (passThrough && crc32 !== UNDEFINED_VALUE)) {
|
|
7025
|
+
setUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + LOCAL_HEADER_COMMON_OFFSET, crc32);
|
|
6950
7026
|
}
|
|
6951
7027
|
if (!zip64CompressedSize) {
|
|
6952
7028
|
setUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, compressedSize);
|
|
@@ -8208,8 +8284,8 @@ configureWorker({
|
|
|
8208
8284
|
}
|
|
8209
8285
|
});
|
|
8210
8286
|
setDefaultConfiguration({
|
|
8211
|
-
CompressionStreamZlib,
|
|
8212
|
-
DecompressionStreamZlib
|
|
8287
|
+
CompressionStreamFallback: CompressionStreamZlib,
|
|
8288
|
+
DecompressionStreamFallback: DecompressionStreamZlib
|
|
8213
8289
|
});
|
|
8214
8290
|
|
|
8215
8291
|
function terminateWorkersAndModule() {
|
|
@@ -8280,6 +8356,20 @@ U(setDefaultConfiguration);
|
|
|
8280
8356
|
|
|
8281
8357
|
const ERR_ENTRY_EXISTS = "Entry filename already exists";
|
|
8282
8358
|
const ERR_READABLE_CONSUMED = "Readable stream already consumed";
|
|
8359
|
+
const INFOZIP_EXTRA_FIELD_TYPE = "infozip";
|
|
8360
|
+
const INTERPRETED_EXTRA_FIELD_TYPES = new Set([
|
|
8361
|
+
EXTRAFIELD_TYPE_ZIP64,
|
|
8362
|
+
EXTRAFIELD_TYPE_AES,
|
|
8363
|
+
EXTRAFIELD_TYPE_NTFS,
|
|
8364
|
+
EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,
|
|
8365
|
+
EXTRAFIELD_TYPE_UNICODE_PATH,
|
|
8366
|
+
EXTRAFIELD_TYPE_UNICODE_COMMENT,
|
|
8367
|
+
EXTRAFIELD_TYPE_USDZ,
|
|
8368
|
+
EXTRAFIELD_TYPE_INFOZIP,
|
|
8369
|
+
EXTRAFIELD_TYPE_UNIX,
|
|
8370
|
+
EXTRAFIELD_TYPE_UNIX_TYPE1,
|
|
8371
|
+
EXTRAFIELD_TYPE_PKWARE_UNIX
|
|
8372
|
+
]);
|
|
8283
8373
|
|
|
8284
8374
|
class ZipEntry {
|
|
8285
8375
|
|
|
@@ -9017,6 +9107,20 @@ function detach(entry) {
|
|
|
9017
9107
|
}
|
|
9018
9108
|
}
|
|
9019
9109
|
|
|
9110
|
+
function getUserExtraField(extraField) {
|
|
9111
|
+
if (extraField) {
|
|
9112
|
+
const userExtraField = new Map();
|
|
9113
|
+
extraField.forEach((field, type) => {
|
|
9114
|
+
if (!INTERPRETED_EXTRA_FIELD_TYPES.has(type)) {
|
|
9115
|
+
userExtraField.set(type, field.data);
|
|
9116
|
+
}
|
|
9117
|
+
});
|
|
9118
|
+
if (userExtraField.size) {
|
|
9119
|
+
return userExtraField;
|
|
9120
|
+
}
|
|
9121
|
+
}
|
|
9122
|
+
}
|
|
9123
|
+
|
|
9020
9124
|
async function exportZip(zipWriter, entry, totalSize, options, readers) {
|
|
9021
9125
|
const selectedEntry = entry;
|
|
9022
9126
|
const entryOffsets = new Map();
|
|
@@ -9054,9 +9158,13 @@ async function exportZip(zipWriter, entry, totalSize, options, readers) {
|
|
|
9054
9158
|
uncompressedSize,
|
|
9055
9159
|
encrypted,
|
|
9056
9160
|
zipCrypto,
|
|
9057
|
-
|
|
9161
|
+
crc32,
|
|
9058
9162
|
compressionMethod,
|
|
9059
|
-
extraFieldAES
|
|
9163
|
+
extraFieldAES,
|
|
9164
|
+
internalFileAttributes,
|
|
9165
|
+
extraField,
|
|
9166
|
+
uid,
|
|
9167
|
+
gid
|
|
9060
9168
|
} = child.data;
|
|
9061
9169
|
zipEntryOptions = {
|
|
9062
9170
|
externalFileAttributes,
|
|
@@ -9064,8 +9172,20 @@ async function exportZip(zipWriter, entry, totalSize, options, readers) {
|
|
|
9064
9172
|
comment,
|
|
9065
9173
|
lastModDate,
|
|
9066
9174
|
creationDate,
|
|
9067
|
-
lastAccessDate
|
|
9175
|
+
lastAccessDate,
|
|
9176
|
+
internalFileAttributes
|
|
9068
9177
|
};
|
|
9178
|
+
const userExtraField = getUserExtraField(extraField);
|
|
9179
|
+
if (userExtraField) {
|
|
9180
|
+
zipEntryOptions.extraField = userExtraField;
|
|
9181
|
+
}
|
|
9182
|
+
if (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE) {
|
|
9183
|
+
Object.assign(zipEntryOptions, {
|
|
9184
|
+
uid,
|
|
9185
|
+
gid,
|
|
9186
|
+
unixExtraFieldType: options.unixExtraFieldType || INFOZIP_EXTRA_FIELD_TYPE
|
|
9187
|
+
});
|
|
9188
|
+
}
|
|
9069
9189
|
if (child.passThrough) {
|
|
9070
9190
|
let level, encryptionStrength;
|
|
9071
9191
|
if (compressionMethod === 0) {
|
|
@@ -9078,7 +9198,7 @@ async function exportZip(zipWriter, entry, totalSize, options, readers) {
|
|
|
9078
9198
|
passThrough: true,
|
|
9079
9199
|
encrypted,
|
|
9080
9200
|
zipCrypto,
|
|
9081
|
-
|
|
9201
|
+
crc32,
|
|
9082
9202
|
uncompressedSize,
|
|
9083
9203
|
level,
|
|
9084
9204
|
encryptionStrength,
|
|
@@ -9265,6 +9385,8 @@ function addChild(parent, name, params, directory) {
|
|
|
9265
9385
|
}
|
|
9266
9386
|
}
|
|
9267
9387
|
|
|
9388
|
+
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";
|
|
9389
|
+
|
|
9268
9390
|
/*
|
|
9269
9391
|
Copyright (c) 2022 Gildas Lormeau. All rights reserved.
|
|
9270
9392
|
|
|
@@ -9294,1589 +9416,6 @@ function addChild(parent, name, params, directory) {
|
|
|
9294
9416
|
*/
|
|
9295
9417
|
|
|
9296
9418
|
|
|
9297
|
-
const table = {
|
|
9298
|
-
"application": {
|
|
9299
|
-
"andrew-inset": "ez",
|
|
9300
|
-
"annodex": "anx",
|
|
9301
|
-
"atom+xml": "atom",
|
|
9302
|
-
"atomcat+xml": "atomcat",
|
|
9303
|
-
"atomserv+xml": "atomsrv",
|
|
9304
|
-
"bbolin": "lin",
|
|
9305
|
-
"cu-seeme": "cu",
|
|
9306
|
-
"davmount+xml": "davmount",
|
|
9307
|
-
"dsptype": "tsp",
|
|
9308
|
-
"ecmascript": [
|
|
9309
|
-
"es",
|
|
9310
|
-
"ecma"
|
|
9311
|
-
],
|
|
9312
|
-
"futuresplash": "spl",
|
|
9313
|
-
"hta": "hta",
|
|
9314
|
-
"java-archive": "jar",
|
|
9315
|
-
"java-serialized-object": "ser",
|
|
9316
|
-
"java-vm": "class",
|
|
9317
|
-
"m3g": "m3g",
|
|
9318
|
-
"mac-binhex40": "hqx",
|
|
9319
|
-
"mathematica": [
|
|
9320
|
-
"nb",
|
|
9321
|
-
"ma",
|
|
9322
|
-
"mb"
|
|
9323
|
-
],
|
|
9324
|
-
"msaccess": "mdb",
|
|
9325
|
-
"msword": [
|
|
9326
|
-
"doc",
|
|
9327
|
-
"dot",
|
|
9328
|
-
"wiz"
|
|
9329
|
-
],
|
|
9330
|
-
"mxf": "mxf",
|
|
9331
|
-
"oda": "oda",
|
|
9332
|
-
"ogg": "ogx",
|
|
9333
|
-
"pdf": "pdf",
|
|
9334
|
-
"pgp-keys": "key",
|
|
9335
|
-
"pgp-signature": [
|
|
9336
|
-
"asc",
|
|
9337
|
-
"sig"
|
|
9338
|
-
],
|
|
9339
|
-
"pics-rules": "prf",
|
|
9340
|
-
"postscript": [
|
|
9341
|
-
"ps",
|
|
9342
|
-
"ai",
|
|
9343
|
-
"eps",
|
|
9344
|
-
"epsi",
|
|
9345
|
-
"epsf",
|
|
9346
|
-
"eps2",
|
|
9347
|
-
"eps3"
|
|
9348
|
-
],
|
|
9349
|
-
"rar": "rar",
|
|
9350
|
-
"rdf+xml": "rdf",
|
|
9351
|
-
"rss+xml": "rss",
|
|
9352
|
-
"rtf": "rtf",
|
|
9353
|
-
"xhtml+xml": [
|
|
9354
|
-
"xhtml",
|
|
9355
|
-
"xht"
|
|
9356
|
-
],
|
|
9357
|
-
"xml": [
|
|
9358
|
-
"xml",
|
|
9359
|
-
"xsl",
|
|
9360
|
-
"xsd",
|
|
9361
|
-
"xpdl"
|
|
9362
|
-
],
|
|
9363
|
-
"xspf+xml": "xspf",
|
|
9364
|
-
"zip": "zip",
|
|
9365
|
-
"vnd.android.package-archive": "apk",
|
|
9366
|
-
"vnd.cinderella": "cdy",
|
|
9367
|
-
"vnd.google-earth.kml+xml": "kml",
|
|
9368
|
-
"vnd.google-earth.kmz": "kmz",
|
|
9369
|
-
"vnd.mozilla.xul+xml": "xul",
|
|
9370
|
-
"vnd.ms-excel": [
|
|
9371
|
-
"xls",
|
|
9372
|
-
"xlb",
|
|
9373
|
-
"xlt",
|
|
9374
|
-
"xlm",
|
|
9375
|
-
"xla",
|
|
9376
|
-
"xlc",
|
|
9377
|
-
"xlw"
|
|
9378
|
-
],
|
|
9379
|
-
"vnd.ms-pki.seccat": "cat",
|
|
9380
|
-
"vnd.ms-pki.stl": "stl",
|
|
9381
|
-
"vnd.ms-powerpoint": [
|
|
9382
|
-
"ppt",
|
|
9383
|
-
"pps",
|
|
9384
|
-
"pot",
|
|
9385
|
-
"ppa",
|
|
9386
|
-
"pwz"
|
|
9387
|
-
],
|
|
9388
|
-
"vnd.oasis.opendocument.chart": "odc",
|
|
9389
|
-
"vnd.oasis.opendocument.database": "odb",
|
|
9390
|
-
"vnd.oasis.opendocument.formula": "odf",
|
|
9391
|
-
"vnd.oasis.opendocument.graphics": "odg",
|
|
9392
|
-
"vnd.oasis.opendocument.graphics-template": "otg",
|
|
9393
|
-
"vnd.oasis.opendocument.image": "odi",
|
|
9394
|
-
"vnd.oasis.opendocument.presentation": "odp",
|
|
9395
|
-
"vnd.oasis.opendocument.presentation-template": "otp",
|
|
9396
|
-
"vnd.oasis.opendocument.spreadsheet": "ods",
|
|
9397
|
-
"vnd.oasis.opendocument.spreadsheet-template": "ots",
|
|
9398
|
-
"vnd.oasis.opendocument.text": "odt",
|
|
9399
|
-
"vnd.oasis.opendocument.text-master": [
|
|
9400
|
-
"odm",
|
|
9401
|
-
"otm"
|
|
9402
|
-
],
|
|
9403
|
-
"vnd.oasis.opendocument.text-template": "ott",
|
|
9404
|
-
"vnd.oasis.opendocument.text-web": "oth",
|
|
9405
|
-
"vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx",
|
|
9406
|
-
"vnd.openxmlformats-officedocument.spreadsheetml.template": "xltx",
|
|
9407
|
-
"vnd.openxmlformats-officedocument.presentationml.presentation": "pptx",
|
|
9408
|
-
"vnd.openxmlformats-officedocument.presentationml.slideshow": "ppsx",
|
|
9409
|
-
"vnd.openxmlformats-officedocument.presentationml.template": "potx",
|
|
9410
|
-
"vnd.openxmlformats-officedocument.wordprocessingml.document": "docx",
|
|
9411
|
-
"vnd.openxmlformats-officedocument.wordprocessingml.template": "dotx",
|
|
9412
|
-
"vnd.smaf": "mmf",
|
|
9413
|
-
"vnd.stardivision.calc": "sdc",
|
|
9414
|
-
"vnd.stardivision.chart": "sds",
|
|
9415
|
-
"vnd.stardivision.draw": "sda",
|
|
9416
|
-
"vnd.stardivision.impress": "sdd",
|
|
9417
|
-
"vnd.stardivision.math": [
|
|
9418
|
-
"sdf",
|
|
9419
|
-
"smf"
|
|
9420
|
-
],
|
|
9421
|
-
"vnd.stardivision.writer": [
|
|
9422
|
-
"sdw",
|
|
9423
|
-
"vor"
|
|
9424
|
-
],
|
|
9425
|
-
"vnd.stardivision.writer-global": "sgl",
|
|
9426
|
-
"vnd.sun.xml.calc": "sxc",
|
|
9427
|
-
"vnd.sun.xml.calc.template": "stc",
|
|
9428
|
-
"vnd.sun.xml.draw": "sxd",
|
|
9429
|
-
"vnd.sun.xml.draw.template": "std",
|
|
9430
|
-
"vnd.sun.xml.impress": "sxi",
|
|
9431
|
-
"vnd.sun.xml.impress.template": "sti",
|
|
9432
|
-
"vnd.sun.xml.math": "sxm",
|
|
9433
|
-
"vnd.sun.xml.writer": "sxw",
|
|
9434
|
-
"vnd.sun.xml.writer.global": "sxg",
|
|
9435
|
-
"vnd.sun.xml.writer.template": "stw",
|
|
9436
|
-
"vnd.symbian.install": [
|
|
9437
|
-
"sis",
|
|
9438
|
-
"sisx"
|
|
9439
|
-
],
|
|
9440
|
-
"vnd.visio": [
|
|
9441
|
-
"vsd",
|
|
9442
|
-
"vst",
|
|
9443
|
-
"vss",
|
|
9444
|
-
"vsw",
|
|
9445
|
-
"vsdx",
|
|
9446
|
-
"vssx",
|
|
9447
|
-
"vstx",
|
|
9448
|
-
"vssm",
|
|
9449
|
-
"vstm"
|
|
9450
|
-
],
|
|
9451
|
-
"vnd.wap.wbxml": "wbxml",
|
|
9452
|
-
"vnd.wap.wmlc": "wmlc",
|
|
9453
|
-
"vnd.wap.wmlscriptc": "wmlsc",
|
|
9454
|
-
"vnd.wordperfect": "wpd",
|
|
9455
|
-
"vnd.wordperfect5.1": "wp5",
|
|
9456
|
-
"x-123": "wk",
|
|
9457
|
-
"x-7z-compressed": "7z",
|
|
9458
|
-
"x-abiword": "abw",
|
|
9459
|
-
"x-apple-diskimage": "dmg",
|
|
9460
|
-
"x-bcpio": "bcpio",
|
|
9461
|
-
"x-bittorrent": "torrent",
|
|
9462
|
-
"x-cbr": [
|
|
9463
|
-
"cbr",
|
|
9464
|
-
"cba",
|
|
9465
|
-
"cbt",
|
|
9466
|
-
"cb7"
|
|
9467
|
-
],
|
|
9468
|
-
"x-cbz": "cbz",
|
|
9469
|
-
"x-cdf": [
|
|
9470
|
-
"cdf",
|
|
9471
|
-
"cda"
|
|
9472
|
-
],
|
|
9473
|
-
"x-cdlink": "vcd",
|
|
9474
|
-
"x-chess-pgn": "pgn",
|
|
9475
|
-
"x-cpio": "cpio",
|
|
9476
|
-
"x-csh": "csh",
|
|
9477
|
-
"x-director": [
|
|
9478
|
-
"dir",
|
|
9479
|
-
"dxr",
|
|
9480
|
-
"cst",
|
|
9481
|
-
"cct",
|
|
9482
|
-
"cxt",
|
|
9483
|
-
"w3d",
|
|
9484
|
-
"fgd",
|
|
9485
|
-
"swa"
|
|
9486
|
-
],
|
|
9487
|
-
"x-dms": "dms",
|
|
9488
|
-
"x-doom": "wad",
|
|
9489
|
-
"x-dvi": "dvi",
|
|
9490
|
-
"x-httpd-eruby": "rhtml",
|
|
9491
|
-
"x-freemind": "mm",
|
|
9492
|
-
"x-gnumeric": "gnumeric",
|
|
9493
|
-
"x-go-sgf": "sgf",
|
|
9494
|
-
"x-graphing-calculator": "gcf",
|
|
9495
|
-
"x-gtar": [
|
|
9496
|
-
"gtar",
|
|
9497
|
-
"taz"
|
|
9498
|
-
],
|
|
9499
|
-
"x-hdf": "hdf",
|
|
9500
|
-
"x-httpd-php": [
|
|
9501
|
-
"phtml",
|
|
9502
|
-
"pht",
|
|
9503
|
-
"php"
|
|
9504
|
-
],
|
|
9505
|
-
"x-httpd-php-source": "phps",
|
|
9506
|
-
"x-httpd-php3": "php3",
|
|
9507
|
-
"x-httpd-php3-preprocessed": "php3p",
|
|
9508
|
-
"x-httpd-php4": "php4",
|
|
9509
|
-
"x-httpd-php5": "php5",
|
|
9510
|
-
"x-ica": "ica",
|
|
9511
|
-
"x-info": "info",
|
|
9512
|
-
"x-internet-signup": [
|
|
9513
|
-
"ins",
|
|
9514
|
-
"isp"
|
|
9515
|
-
],
|
|
9516
|
-
"x-iphone": "iii",
|
|
9517
|
-
"x-iso9660-image": "iso",
|
|
9518
|
-
"x-java-jnlp-file": "jnlp",
|
|
9519
|
-
"x-jmol": "jmz",
|
|
9520
|
-
"x-killustrator": "kil",
|
|
9521
|
-
"x-latex": "latex",
|
|
9522
|
-
"x-lyx": "lyx",
|
|
9523
|
-
"x-lzx": "lzx",
|
|
9524
|
-
"x-maker": [
|
|
9525
|
-
"frm",
|
|
9526
|
-
"fb",
|
|
9527
|
-
"fbdoc"
|
|
9528
|
-
],
|
|
9529
|
-
"x-ms-wmd": "wmd",
|
|
9530
|
-
"x-msdos-program": [
|
|
9531
|
-
"com",
|
|
9532
|
-
"exe",
|
|
9533
|
-
"bat",
|
|
9534
|
-
"dll"
|
|
9535
|
-
],
|
|
9536
|
-
"x-netcdf": [
|
|
9537
|
-
"nc"
|
|
9538
|
-
],
|
|
9539
|
-
"x-ns-proxy-autoconfig": [
|
|
9540
|
-
"pac",
|
|
9541
|
-
"dat"
|
|
9542
|
-
],
|
|
9543
|
-
"x-nwc": "nwc",
|
|
9544
|
-
"x-object": "o",
|
|
9545
|
-
"x-oz-application": "oza",
|
|
9546
|
-
"x-pkcs7-certreqresp": "p7r",
|
|
9547
|
-
"x-python-code": [
|
|
9548
|
-
"pyc",
|
|
9549
|
-
"pyo"
|
|
9550
|
-
],
|
|
9551
|
-
"x-qgis": [
|
|
9552
|
-
"qgs",
|
|
9553
|
-
"shp",
|
|
9554
|
-
"shx"
|
|
9555
|
-
],
|
|
9556
|
-
"x-quicktimeplayer": "qtl",
|
|
9557
|
-
"x-redhat-package-manager": [
|
|
9558
|
-
"rpm",
|
|
9559
|
-
"rpa"
|
|
9560
|
-
],
|
|
9561
|
-
"x-ruby": "rb",
|
|
9562
|
-
"x-sh": "sh",
|
|
9563
|
-
"x-shar": "shar",
|
|
9564
|
-
"x-shockwave-flash": [
|
|
9565
|
-
"swf",
|
|
9566
|
-
"swfl"
|
|
9567
|
-
],
|
|
9568
|
-
"x-silverlight": "scr",
|
|
9569
|
-
"x-stuffit": "sit",
|
|
9570
|
-
"x-sv4cpio": "sv4cpio",
|
|
9571
|
-
"x-sv4crc": "sv4crc",
|
|
9572
|
-
"x-tar": "tar",
|
|
9573
|
-
"x-tex-gf": "gf",
|
|
9574
|
-
"x-tex-pk": "pk",
|
|
9575
|
-
"x-texinfo": [
|
|
9576
|
-
"texinfo",
|
|
9577
|
-
"texi"
|
|
9578
|
-
],
|
|
9579
|
-
"x-trash": [
|
|
9580
|
-
"~",
|
|
9581
|
-
"%",
|
|
9582
|
-
"bak",
|
|
9583
|
-
"old",
|
|
9584
|
-
"sik"
|
|
9585
|
-
],
|
|
9586
|
-
"x-ustar": "ustar",
|
|
9587
|
-
"x-wais-source": "src",
|
|
9588
|
-
"x-wingz": "wz",
|
|
9589
|
-
"x-x509-ca-cert": [
|
|
9590
|
-
"crt",
|
|
9591
|
-
"der",
|
|
9592
|
-
"cer"
|
|
9593
|
-
],
|
|
9594
|
-
"x-xcf": "xcf",
|
|
9595
|
-
"x-xfig": "fig",
|
|
9596
|
-
"x-xpinstall": "xpi",
|
|
9597
|
-
"applixware": "aw",
|
|
9598
|
-
"atomsvc+xml": "atomsvc",
|
|
9599
|
-
"ccxml+xml": "ccxml",
|
|
9600
|
-
"cdmi-capability": "cdmia",
|
|
9601
|
-
"cdmi-container": "cdmic",
|
|
9602
|
-
"cdmi-domain": "cdmid",
|
|
9603
|
-
"cdmi-object": "cdmio",
|
|
9604
|
-
"cdmi-queue": "cdmiq",
|
|
9605
|
-
"docbook+xml": "dbk",
|
|
9606
|
-
"dssc+der": "dssc",
|
|
9607
|
-
"dssc+xml": "xdssc",
|
|
9608
|
-
"emma+xml": "emma",
|
|
9609
|
-
"epub+zip": "epub",
|
|
9610
|
-
"exi": "exi",
|
|
9611
|
-
"font-tdpfr": "pfr",
|
|
9612
|
-
"gml+xml": "gml",
|
|
9613
|
-
"gpx+xml": "gpx",
|
|
9614
|
-
"gxf": "gxf",
|
|
9615
|
-
"hyperstudio": "stk",
|
|
9616
|
-
"inkml+xml": [
|
|
9617
|
-
"ink",
|
|
9618
|
-
"inkml"
|
|
9619
|
-
],
|
|
9620
|
-
"ipfix": "ipfix",
|
|
9621
|
-
"jsonml+json": "jsonml",
|
|
9622
|
-
"lost+xml": "lostxml",
|
|
9623
|
-
"mads+xml": "mads",
|
|
9624
|
-
"marc": "mrc",
|
|
9625
|
-
"marcxml+xml": "mrcx",
|
|
9626
|
-
"mathml+xml": [
|
|
9627
|
-
"mathml",
|
|
9628
|
-
"mml"
|
|
9629
|
-
],
|
|
9630
|
-
"mbox": "mbox",
|
|
9631
|
-
"mediaservercontrol+xml": "mscml",
|
|
9632
|
-
"metalink+xml": "metalink",
|
|
9633
|
-
"metalink4+xml": "meta4",
|
|
9634
|
-
"mets+xml": "mets",
|
|
9635
|
-
"mods+xml": "mods",
|
|
9636
|
-
"mp21": [
|
|
9637
|
-
"m21",
|
|
9638
|
-
"mp21"
|
|
9639
|
-
],
|
|
9640
|
-
"mp4": "mp4s",
|
|
9641
|
-
"oebps-package+xml": "opf",
|
|
9642
|
-
"omdoc+xml": "omdoc",
|
|
9643
|
-
"onenote": [
|
|
9644
|
-
"onetoc",
|
|
9645
|
-
"onetoc2",
|
|
9646
|
-
"onetmp",
|
|
9647
|
-
"onepkg"
|
|
9648
|
-
],
|
|
9649
|
-
"oxps": "oxps",
|
|
9650
|
-
"patch-ops-error+xml": "xer",
|
|
9651
|
-
"pgp-encrypted": "pgp",
|
|
9652
|
-
"pkcs10": "p10",
|
|
9653
|
-
"pkcs7-mime": [
|
|
9654
|
-
"p7m",
|
|
9655
|
-
"p7c"
|
|
9656
|
-
],
|
|
9657
|
-
"pkcs7-signature": "p7s",
|
|
9658
|
-
"pkcs8": "p8",
|
|
9659
|
-
"pkix-attr-cert": "ac",
|
|
9660
|
-
"pkix-crl": "crl",
|
|
9661
|
-
"pkix-pkipath": "pkipath",
|
|
9662
|
-
"pkixcmp": "pki",
|
|
9663
|
-
"pls+xml": "pls",
|
|
9664
|
-
"prs.cww": "cww",
|
|
9665
|
-
"pskc+xml": "pskcxml",
|
|
9666
|
-
"reginfo+xml": "rif",
|
|
9667
|
-
"relax-ng-compact-syntax": "rnc",
|
|
9668
|
-
"resource-lists+xml": "rl",
|
|
9669
|
-
"resource-lists-diff+xml": "rld",
|
|
9670
|
-
"rls-services+xml": "rs",
|
|
9671
|
-
"rpki-ghostbusters": "gbr",
|
|
9672
|
-
"rpki-manifest": "mft",
|
|
9673
|
-
"rpki-roa": "roa",
|
|
9674
|
-
"rsd+xml": "rsd",
|
|
9675
|
-
"sbml+xml": "sbml",
|
|
9676
|
-
"scvp-cv-request": "scq",
|
|
9677
|
-
"scvp-cv-response": "scs",
|
|
9678
|
-
"scvp-vp-request": "spq",
|
|
9679
|
-
"scvp-vp-response": "spp",
|
|
9680
|
-
"sdp": "sdp",
|
|
9681
|
-
"set-payment-initiation": "setpay",
|
|
9682
|
-
"set-registration-initiation": "setreg",
|
|
9683
|
-
"shf+xml": "shf",
|
|
9684
|
-
"sparql-query": "rq",
|
|
9685
|
-
"sparql-results+xml": "srx",
|
|
9686
|
-
"srgs": "gram",
|
|
9687
|
-
"srgs+xml": "grxml",
|
|
9688
|
-
"sru+xml": "sru",
|
|
9689
|
-
"ssdl+xml": "ssdl",
|
|
9690
|
-
"ssml+xml": "ssml",
|
|
9691
|
-
"tei+xml": [
|
|
9692
|
-
"tei",
|
|
9693
|
-
"teicorpus"
|
|
9694
|
-
],
|
|
9695
|
-
"thraud+xml": "tfi",
|
|
9696
|
-
"timestamped-data": "tsd",
|
|
9697
|
-
"vnd.3gpp.pic-bw-large": "plb",
|
|
9698
|
-
"vnd.3gpp.pic-bw-small": "psb",
|
|
9699
|
-
"vnd.3gpp.pic-bw-var": "pvb",
|
|
9700
|
-
"vnd.3gpp2.tcap": "tcap",
|
|
9701
|
-
"vnd.3m.post-it-notes": "pwn",
|
|
9702
|
-
"vnd.accpac.simply.aso": "aso",
|
|
9703
|
-
"vnd.accpac.simply.imp": "imp",
|
|
9704
|
-
"vnd.acucobol": "acu",
|
|
9705
|
-
"vnd.acucorp": [
|
|
9706
|
-
"atc",
|
|
9707
|
-
"acutc"
|
|
9708
|
-
],
|
|
9709
|
-
"vnd.adobe.air-application-installer-package+zip": "air",
|
|
9710
|
-
"vnd.adobe.formscentral.fcdt": "fcdt",
|
|
9711
|
-
"vnd.adobe.fxp": [
|
|
9712
|
-
"fxp",
|
|
9713
|
-
"fxpl"
|
|
9714
|
-
],
|
|
9715
|
-
"vnd.adobe.xdp+xml": "xdp",
|
|
9716
|
-
"vnd.adobe.xfdf": "xfdf",
|
|
9717
|
-
"vnd.ahead.space": "ahead",
|
|
9718
|
-
"vnd.airzip.filesecure.azf": "azf",
|
|
9719
|
-
"vnd.airzip.filesecure.azs": "azs",
|
|
9720
|
-
"vnd.amazon.ebook": "azw",
|
|
9721
|
-
"vnd.americandynamics.acc": "acc",
|
|
9722
|
-
"vnd.amiga.ami": "ami",
|
|
9723
|
-
"vnd.anser-web-certificate-issue-initiation": "cii",
|
|
9724
|
-
"vnd.anser-web-funds-transfer-initiation": "fti",
|
|
9725
|
-
"vnd.antix.game-component": "atx",
|
|
9726
|
-
"vnd.apple.installer+xml": "mpkg",
|
|
9727
|
-
"vnd.apple.mpegurl": "m3u8",
|
|
9728
|
-
"vnd.aristanetworks.swi": "swi",
|
|
9729
|
-
"vnd.astraea-software.iota": "iota",
|
|
9730
|
-
"vnd.audiograph": "aep",
|
|
9731
|
-
"vnd.blueice.multipass": "mpm",
|
|
9732
|
-
"vnd.bmi": "bmi",
|
|
9733
|
-
"vnd.businessobjects": "rep",
|
|
9734
|
-
"vnd.chemdraw+xml": "cdxml",
|
|
9735
|
-
"vnd.chipnuts.karaoke-mmd": "mmd",
|
|
9736
|
-
"vnd.claymore": "cla",
|
|
9737
|
-
"vnd.cloanto.rp9": "rp9",
|
|
9738
|
-
"vnd.clonk.c4group": [
|
|
9739
|
-
"c4g",
|
|
9740
|
-
"c4d",
|
|
9741
|
-
"c4f",
|
|
9742
|
-
"c4p",
|
|
9743
|
-
"c4u"
|
|
9744
|
-
],
|
|
9745
|
-
"vnd.cluetrust.cartomobile-config": "c11amc",
|
|
9746
|
-
"vnd.cluetrust.cartomobile-config-pkg": "c11amz",
|
|
9747
|
-
"vnd.commonspace": "csp",
|
|
9748
|
-
"vnd.contact.cmsg": "cdbcmsg",
|
|
9749
|
-
"vnd.cosmocaller": "cmc",
|
|
9750
|
-
"vnd.crick.clicker": "clkx",
|
|
9751
|
-
"vnd.crick.clicker.keyboard": "clkk",
|
|
9752
|
-
"vnd.crick.clicker.palette": "clkp",
|
|
9753
|
-
"vnd.crick.clicker.template": "clkt",
|
|
9754
|
-
"vnd.crick.clicker.wordbank": "clkw",
|
|
9755
|
-
"vnd.criticaltools.wbs+xml": "wbs",
|
|
9756
|
-
"vnd.ctc-posml": "pml",
|
|
9757
|
-
"vnd.cups-ppd": "ppd",
|
|
9758
|
-
"vnd.curl.car": "car",
|
|
9759
|
-
"vnd.curl.pcurl": "pcurl",
|
|
9760
|
-
"vnd.dart": "dart",
|
|
9761
|
-
"vnd.data-vision.rdz": "rdz",
|
|
9762
|
-
"vnd.dece.data": [
|
|
9763
|
-
"uvf",
|
|
9764
|
-
"uvvf",
|
|
9765
|
-
"uvd",
|
|
9766
|
-
"uvvd"
|
|
9767
|
-
],
|
|
9768
|
-
"vnd.dece.ttml+xml": [
|
|
9769
|
-
"uvt",
|
|
9770
|
-
"uvvt"
|
|
9771
|
-
],
|
|
9772
|
-
"vnd.dece.unspecified": [
|
|
9773
|
-
"uvx",
|
|
9774
|
-
"uvvx"
|
|
9775
|
-
],
|
|
9776
|
-
"vnd.dece.zip": [
|
|
9777
|
-
"uvz",
|
|
9778
|
-
"uvvz"
|
|
9779
|
-
],
|
|
9780
|
-
"vnd.denovo.fcselayout-link": "fe_launch",
|
|
9781
|
-
"vnd.dna": "dna",
|
|
9782
|
-
"vnd.dolby.mlp": "mlp",
|
|
9783
|
-
"vnd.dpgraph": "dpg",
|
|
9784
|
-
"vnd.dreamfactory": "dfac",
|
|
9785
|
-
"vnd.ds-keypoint": "kpxx",
|
|
9786
|
-
"vnd.dvb.ait": "ait",
|
|
9787
|
-
"vnd.dvb.service": "svc",
|
|
9788
|
-
"vnd.dynageo": "geo",
|
|
9789
|
-
"vnd.ecowin.chart": "mag",
|
|
9790
|
-
"vnd.enliven": "nml",
|
|
9791
|
-
"vnd.epson.esf": "esf",
|
|
9792
|
-
"vnd.epson.msf": "msf",
|
|
9793
|
-
"vnd.epson.quickanime": "qam",
|
|
9794
|
-
"vnd.epson.salt": "slt",
|
|
9795
|
-
"vnd.epson.ssf": "ssf",
|
|
9796
|
-
"vnd.eszigno3+xml": [
|
|
9797
|
-
"es3",
|
|
9798
|
-
"et3"
|
|
9799
|
-
],
|
|
9800
|
-
"vnd.ezpix-album": "ez2",
|
|
9801
|
-
"vnd.ezpix-package": "ez3",
|
|
9802
|
-
"vnd.fdf": "fdf",
|
|
9803
|
-
"vnd.fdsn.mseed": "mseed",
|
|
9804
|
-
"vnd.fdsn.seed": [
|
|
9805
|
-
"seed",
|
|
9806
|
-
"dataless"
|
|
9807
|
-
],
|
|
9808
|
-
"vnd.flographit": "gph",
|
|
9809
|
-
"vnd.fluxtime.clip": "ftc",
|
|
9810
|
-
"vnd.framemaker": [
|
|
9811
|
-
"fm",
|
|
9812
|
-
"frame",
|
|
9813
|
-
"maker",
|
|
9814
|
-
"book"
|
|
9815
|
-
],
|
|
9816
|
-
"vnd.frogans.fnc": "fnc",
|
|
9817
|
-
"vnd.frogans.ltf": "ltf",
|
|
9818
|
-
"vnd.fsc.weblaunch": "fsc",
|
|
9819
|
-
"vnd.fujitsu.oasys": "oas",
|
|
9820
|
-
"vnd.fujitsu.oasys2": "oa2",
|
|
9821
|
-
"vnd.fujitsu.oasys3": "oa3",
|
|
9822
|
-
"vnd.fujitsu.oasysgp": "fg5",
|
|
9823
|
-
"vnd.fujitsu.oasysprs": "bh2",
|
|
9824
|
-
"vnd.fujixerox.ddd": "ddd",
|
|
9825
|
-
"vnd.fujixerox.docuworks": "xdw",
|
|
9826
|
-
"vnd.fujixerox.docuworks.binder": "xbd",
|
|
9827
|
-
"vnd.fuzzysheet": "fzs",
|
|
9828
|
-
"vnd.genomatix.tuxedo": "txd",
|
|
9829
|
-
"vnd.geogebra.file": "ggb",
|
|
9830
|
-
"vnd.geogebra.tool": "ggt",
|
|
9831
|
-
"vnd.geometry-explorer": [
|
|
9832
|
-
"gex",
|
|
9833
|
-
"gre"
|
|
9834
|
-
],
|
|
9835
|
-
"vnd.geonext": "gxt",
|
|
9836
|
-
"vnd.geoplan": "g2w",
|
|
9837
|
-
"vnd.geospace": "g3w",
|
|
9838
|
-
"vnd.gmx": "gmx",
|
|
9839
|
-
"vnd.grafeq": [
|
|
9840
|
-
"gqf",
|
|
9841
|
-
"gqs"
|
|
9842
|
-
],
|
|
9843
|
-
"vnd.groove-account": "gac",
|
|
9844
|
-
"vnd.groove-help": "ghf",
|
|
9845
|
-
"vnd.groove-identity-message": "gim",
|
|
9846
|
-
"vnd.groove-injector": "grv",
|
|
9847
|
-
"vnd.groove-tool-message": "gtm",
|
|
9848
|
-
"vnd.groove-tool-template": "tpl",
|
|
9849
|
-
"vnd.groove-vcard": "vcg",
|
|
9850
|
-
"vnd.hal+xml": "hal",
|
|
9851
|
-
"vnd.handheld-entertainment+xml": "zmm",
|
|
9852
|
-
"vnd.hbci": "hbci",
|
|
9853
|
-
"vnd.hhe.lesson-player": "les",
|
|
9854
|
-
"vnd.hp-hpgl": "hpgl",
|
|
9855
|
-
"vnd.hp-hpid": "hpid",
|
|
9856
|
-
"vnd.hp-hps": "hps",
|
|
9857
|
-
"vnd.hp-jlyt": "jlt",
|
|
9858
|
-
"vnd.hp-pcl": "pcl",
|
|
9859
|
-
"vnd.hp-pclxl": "pclxl",
|
|
9860
|
-
"vnd.hydrostatix.sof-data": "sfd-hdstx",
|
|
9861
|
-
"vnd.ibm.minipay": "mpy",
|
|
9862
|
-
"vnd.ibm.modcap": [
|
|
9863
|
-
"afp",
|
|
9864
|
-
"listafp",
|
|
9865
|
-
"list3820"
|
|
9866
|
-
],
|
|
9867
|
-
"vnd.ibm.rights-management": "irm",
|
|
9868
|
-
"vnd.ibm.secure-container": "sc",
|
|
9869
|
-
"vnd.iccprofile": [
|
|
9870
|
-
"icc",
|
|
9871
|
-
"icm"
|
|
9872
|
-
],
|
|
9873
|
-
"vnd.igloader": "igl",
|
|
9874
|
-
"vnd.immervision-ivp": "ivp",
|
|
9875
|
-
"vnd.immervision-ivu": "ivu",
|
|
9876
|
-
"vnd.insors.igm": "igm",
|
|
9877
|
-
"vnd.intercon.formnet": [
|
|
9878
|
-
"xpw",
|
|
9879
|
-
"xpx"
|
|
9880
|
-
],
|
|
9881
|
-
"vnd.intergeo": "i2g",
|
|
9882
|
-
"vnd.intu.qbo": "qbo",
|
|
9883
|
-
"vnd.intu.qfx": "qfx",
|
|
9884
|
-
"vnd.ipunplugged.rcprofile": "rcprofile",
|
|
9885
|
-
"vnd.irepository.package+xml": "irp",
|
|
9886
|
-
"vnd.is-xpr": "xpr",
|
|
9887
|
-
"vnd.isac.fcs": "fcs",
|
|
9888
|
-
"vnd.jam": "jam",
|
|
9889
|
-
"vnd.jcp.javame.midlet-rms": "rms",
|
|
9890
|
-
"vnd.jisp": "jisp",
|
|
9891
|
-
"vnd.joost.joda-archive": "joda",
|
|
9892
|
-
"vnd.kahootz": [
|
|
9893
|
-
"ktz",
|
|
9894
|
-
"ktr"
|
|
9895
|
-
],
|
|
9896
|
-
"vnd.kde.karbon": "karbon",
|
|
9897
|
-
"vnd.kde.kchart": "chrt",
|
|
9898
|
-
"vnd.kde.kformula": "kfo",
|
|
9899
|
-
"vnd.kde.kivio": "flw",
|
|
9900
|
-
"vnd.kde.kontour": "kon",
|
|
9901
|
-
"vnd.kde.kpresenter": [
|
|
9902
|
-
"kpr",
|
|
9903
|
-
"kpt"
|
|
9904
|
-
],
|
|
9905
|
-
"vnd.kde.kspread": "ksp",
|
|
9906
|
-
"vnd.kde.kword": [
|
|
9907
|
-
"kwd",
|
|
9908
|
-
"kwt"
|
|
9909
|
-
],
|
|
9910
|
-
"vnd.kenameaapp": "htke",
|
|
9911
|
-
"vnd.kidspiration": "kia",
|
|
9912
|
-
"vnd.kinar": [
|
|
9913
|
-
"kne",
|
|
9914
|
-
"knp"
|
|
9915
|
-
],
|
|
9916
|
-
"vnd.koan": [
|
|
9917
|
-
"skp",
|
|
9918
|
-
"skd",
|
|
9919
|
-
"skt",
|
|
9920
|
-
"skm"
|
|
9921
|
-
],
|
|
9922
|
-
"vnd.kodak-descriptor": "sse",
|
|
9923
|
-
"vnd.las.las+xml": "lasxml",
|
|
9924
|
-
"vnd.llamagraphics.life-balance.desktop": "lbd",
|
|
9925
|
-
"vnd.llamagraphics.life-balance.exchange+xml": "lbe",
|
|
9926
|
-
"vnd.lotus-1-2-3": "123",
|
|
9927
|
-
"vnd.lotus-approach": "apr",
|
|
9928
|
-
"vnd.lotus-freelance": "pre",
|
|
9929
|
-
"vnd.lotus-notes": "nsf",
|
|
9930
|
-
"vnd.lotus-organizer": "org",
|
|
9931
|
-
"vnd.lotus-screencam": "scm",
|
|
9932
|
-
"vnd.lotus-wordpro": "lwp",
|
|
9933
|
-
"vnd.macports.portpkg": "portpkg",
|
|
9934
|
-
"vnd.mcd": "mcd",
|
|
9935
|
-
"vnd.medcalcdata": "mc1",
|
|
9936
|
-
"vnd.mediastation.cdkey": "cdkey",
|
|
9937
|
-
"vnd.mfer": "mwf",
|
|
9938
|
-
"vnd.mfmp": "mfm",
|
|
9939
|
-
"vnd.micrografx.flo": "flo",
|
|
9940
|
-
"vnd.micrografx.igx": "igx",
|
|
9941
|
-
"vnd.mif": "mif",
|
|
9942
|
-
"vnd.mobius.daf": "daf",
|
|
9943
|
-
"vnd.mobius.dis": "dis",
|
|
9944
|
-
"vnd.mobius.mbk": "mbk",
|
|
9945
|
-
"vnd.mobius.mqy": "mqy",
|
|
9946
|
-
"vnd.mobius.msl": "msl",
|
|
9947
|
-
"vnd.mobius.plc": "plc",
|
|
9948
|
-
"vnd.mobius.txf": "txf",
|
|
9949
|
-
"vnd.mophun.application": "mpn",
|
|
9950
|
-
"vnd.mophun.certificate": "mpc",
|
|
9951
|
-
"vnd.ms-artgalry": "cil",
|
|
9952
|
-
"vnd.ms-cab-compressed": "cab",
|
|
9953
|
-
"vnd.ms-excel.addin.macroenabled.12": "xlam",
|
|
9954
|
-
"vnd.ms-excel.sheet.binary.macroenabled.12": "xlsb",
|
|
9955
|
-
"vnd.ms-excel.sheet.macroenabled.12": "xlsm",
|
|
9956
|
-
"vnd.ms-excel.template.macroenabled.12": "xltm",
|
|
9957
|
-
"vnd.ms-fontobject": "eot",
|
|
9958
|
-
"vnd.ms-htmlhelp": "chm",
|
|
9959
|
-
"vnd.ms-ims": "ims",
|
|
9960
|
-
"vnd.ms-lrm": "lrm",
|
|
9961
|
-
"vnd.ms-officetheme": "thmx",
|
|
9962
|
-
"vnd.ms-powerpoint.addin.macroenabled.12": "ppam",
|
|
9963
|
-
"vnd.ms-powerpoint.presentation.macroenabled.12": "pptm",
|
|
9964
|
-
"vnd.ms-powerpoint.slide.macroenabled.12": "sldm",
|
|
9965
|
-
"vnd.ms-powerpoint.slideshow.macroenabled.12": "ppsm",
|
|
9966
|
-
"vnd.ms-powerpoint.template.macroenabled.12": "potm",
|
|
9967
|
-
"vnd.ms-project": [
|
|
9968
|
-
"mpp",
|
|
9969
|
-
"mpt"
|
|
9970
|
-
],
|
|
9971
|
-
"vnd.ms-word.document.macroenabled.12": "docm",
|
|
9972
|
-
"vnd.ms-word.template.macroenabled.12": "dotm",
|
|
9973
|
-
"vnd.ms-works": [
|
|
9974
|
-
"wps",
|
|
9975
|
-
"wks",
|
|
9976
|
-
"wcm",
|
|
9977
|
-
"wdb"
|
|
9978
|
-
],
|
|
9979
|
-
"vnd.ms-wpl": "wpl",
|
|
9980
|
-
"vnd.ms-xpsdocument": "xps",
|
|
9981
|
-
"vnd.mseq": "mseq",
|
|
9982
|
-
"vnd.musician": "mus",
|
|
9983
|
-
"vnd.muvee.style": "msty",
|
|
9984
|
-
"vnd.mynfc": "taglet",
|
|
9985
|
-
"vnd.neurolanguage.nlu": "nlu",
|
|
9986
|
-
"vnd.nitf": [
|
|
9987
|
-
"ntf",
|
|
9988
|
-
"nitf"
|
|
9989
|
-
],
|
|
9990
|
-
"vnd.noblenet-directory": "nnd",
|
|
9991
|
-
"vnd.noblenet-sealer": "nns",
|
|
9992
|
-
"vnd.noblenet-web": "nnw",
|
|
9993
|
-
"vnd.nokia.n-gage.data": "ngdat",
|
|
9994
|
-
"vnd.nokia.n-gage.symbian.install": "n-gage",
|
|
9995
|
-
"vnd.nokia.radio-preset": "rpst",
|
|
9996
|
-
"vnd.nokia.radio-presets": "rpss",
|
|
9997
|
-
"vnd.novadigm.edm": "edm",
|
|
9998
|
-
"vnd.novadigm.edx": "edx",
|
|
9999
|
-
"vnd.novadigm.ext": "ext",
|
|
10000
|
-
"vnd.oasis.opendocument.chart-template": "otc",
|
|
10001
|
-
"vnd.oasis.opendocument.formula-template": "odft",
|
|
10002
|
-
"vnd.oasis.opendocument.image-template": "oti",
|
|
10003
|
-
"vnd.olpc-sugar": "xo",
|
|
10004
|
-
"vnd.oma.dd2+xml": "dd2",
|
|
10005
|
-
"vnd.openofficeorg.extension": "oxt",
|
|
10006
|
-
"vnd.openxmlformats-officedocument.presentationml.slide": "sldx",
|
|
10007
|
-
"vnd.osgeo.mapguide.package": "mgp",
|
|
10008
|
-
"vnd.osgi.dp": "dp",
|
|
10009
|
-
"vnd.osgi.subsystem": "esa",
|
|
10010
|
-
"vnd.palm": [
|
|
10011
|
-
"pdb",
|
|
10012
|
-
"pqa",
|
|
10013
|
-
"oprc"
|
|
10014
|
-
],
|
|
10015
|
-
"vnd.pawaafile": "paw",
|
|
10016
|
-
"vnd.pg.format": "str",
|
|
10017
|
-
"vnd.pg.osasli": "ei6",
|
|
10018
|
-
"vnd.picsel": "efif",
|
|
10019
|
-
"vnd.pmi.widget": "wg",
|
|
10020
|
-
"vnd.pocketlearn": "plf",
|
|
10021
|
-
"vnd.powerbuilder6": "pbd",
|
|
10022
|
-
"vnd.previewsystems.box": "box",
|
|
10023
|
-
"vnd.proteus.magazine": "mgz",
|
|
10024
|
-
"vnd.publishare-delta-tree": "qps",
|
|
10025
|
-
"vnd.pvi.ptid1": "ptid",
|
|
10026
|
-
"vnd.quark.quarkxpress": [
|
|
10027
|
-
"qxd",
|
|
10028
|
-
"qxt",
|
|
10029
|
-
"qwd",
|
|
10030
|
-
"qwt",
|
|
10031
|
-
"qxl",
|
|
10032
|
-
"qxb"
|
|
10033
|
-
],
|
|
10034
|
-
"vnd.realvnc.bed": "bed",
|
|
10035
|
-
"vnd.recordare.musicxml": "mxl",
|
|
10036
|
-
"vnd.recordare.musicxml+xml": "musicxml",
|
|
10037
|
-
"vnd.rig.cryptonote": "cryptonote",
|
|
10038
|
-
"vnd.rn-realmedia": "rm",
|
|
10039
|
-
"vnd.rn-realmedia-vbr": "rmvb",
|
|
10040
|
-
"vnd.route66.link66+xml": "link66",
|
|
10041
|
-
"vnd.sailingtracker.track": "st",
|
|
10042
|
-
"vnd.seemail": "see",
|
|
10043
|
-
"vnd.sema": "sema",
|
|
10044
|
-
"vnd.semd": "semd",
|
|
10045
|
-
"vnd.semf": "semf",
|
|
10046
|
-
"vnd.shana.informed.formdata": "ifm",
|
|
10047
|
-
"vnd.shana.informed.formtemplate": "itp",
|
|
10048
|
-
"vnd.shana.informed.interchange": "iif",
|
|
10049
|
-
"vnd.shana.informed.package": "ipk",
|
|
10050
|
-
"vnd.simtech-mindmapper": [
|
|
10051
|
-
"twd",
|
|
10052
|
-
"twds"
|
|
10053
|
-
],
|
|
10054
|
-
"vnd.smart.teacher": "teacher",
|
|
10055
|
-
"vnd.solent.sdkm+xml": [
|
|
10056
|
-
"sdkm",
|
|
10057
|
-
"sdkd"
|
|
10058
|
-
],
|
|
10059
|
-
"vnd.spotfire.dxp": "dxp",
|
|
10060
|
-
"vnd.spotfire.sfs": "sfs",
|
|
10061
|
-
"vnd.stepmania.package": "smzip",
|
|
10062
|
-
"vnd.stepmania.stepchart": "sm",
|
|
10063
|
-
"vnd.sus-calendar": [
|
|
10064
|
-
"sus",
|
|
10065
|
-
"susp"
|
|
10066
|
-
],
|
|
10067
|
-
"vnd.svd": "svd",
|
|
10068
|
-
"vnd.syncml+xml": "xsm",
|
|
10069
|
-
"vnd.syncml.dm+wbxml": "bdm",
|
|
10070
|
-
"vnd.syncml.dm+xml": "xdm",
|
|
10071
|
-
"vnd.tao.intent-module-archive": "tao",
|
|
10072
|
-
"vnd.tcpdump.pcap": [
|
|
10073
|
-
"pcap",
|
|
10074
|
-
"cap",
|
|
10075
|
-
"dmp"
|
|
10076
|
-
],
|
|
10077
|
-
"vnd.tmobile-livetv": "tmo",
|
|
10078
|
-
"vnd.trid.tpt": "tpt",
|
|
10079
|
-
"vnd.triscape.mxs": "mxs",
|
|
10080
|
-
"vnd.trueapp": "tra",
|
|
10081
|
-
"vnd.ufdl": [
|
|
10082
|
-
"ufd",
|
|
10083
|
-
"ufdl"
|
|
10084
|
-
],
|
|
10085
|
-
"vnd.uiq.theme": "utz",
|
|
10086
|
-
"vnd.umajin": "umj",
|
|
10087
|
-
"vnd.unity": "unityweb",
|
|
10088
|
-
"vnd.uoml+xml": "uoml",
|
|
10089
|
-
"vnd.vcx": "vcx",
|
|
10090
|
-
"vnd.visionary": "vis",
|
|
10091
|
-
"vnd.vsf": "vsf",
|
|
10092
|
-
"vnd.webturbo": "wtb",
|
|
10093
|
-
"vnd.wolfram.player": "nbp",
|
|
10094
|
-
"vnd.wqd": "wqd",
|
|
10095
|
-
"vnd.wt.stf": "stf",
|
|
10096
|
-
"vnd.xara": "xar",
|
|
10097
|
-
"vnd.xfdl": "xfdl",
|
|
10098
|
-
"vnd.yamaha.hv-dic": "hvd",
|
|
10099
|
-
"vnd.yamaha.hv-script": "hvs",
|
|
10100
|
-
"vnd.yamaha.hv-voice": "hvp",
|
|
10101
|
-
"vnd.yamaha.openscoreformat": "osf",
|
|
10102
|
-
"vnd.yamaha.openscoreformat.osfpvg+xml": "osfpvg",
|
|
10103
|
-
"vnd.yamaha.smaf-audio": "saf",
|
|
10104
|
-
"vnd.yamaha.smaf-phrase": "spf",
|
|
10105
|
-
"vnd.yellowriver-custom-menu": "cmp",
|
|
10106
|
-
"vnd.zul": [
|
|
10107
|
-
"zir",
|
|
10108
|
-
"zirz"
|
|
10109
|
-
],
|
|
10110
|
-
"vnd.zzazz.deck+xml": "zaz",
|
|
10111
|
-
"voicexml+xml": "vxml",
|
|
10112
|
-
"widget": "wgt",
|
|
10113
|
-
"winhlp": "hlp",
|
|
10114
|
-
"wsdl+xml": "wsdl",
|
|
10115
|
-
"wspolicy+xml": "wspolicy",
|
|
10116
|
-
"x-ace-compressed": "ace",
|
|
10117
|
-
"x-authorware-bin": [
|
|
10118
|
-
"aab",
|
|
10119
|
-
"x32",
|
|
10120
|
-
"u32",
|
|
10121
|
-
"vox"
|
|
10122
|
-
],
|
|
10123
|
-
"x-authorware-map": "aam",
|
|
10124
|
-
"x-authorware-seg": "aas",
|
|
10125
|
-
"x-blorb": [
|
|
10126
|
-
"blb",
|
|
10127
|
-
"blorb"
|
|
10128
|
-
],
|
|
10129
|
-
"x-bzip": "bz",
|
|
10130
|
-
"x-bzip2": [
|
|
10131
|
-
"bz2",
|
|
10132
|
-
"boz"
|
|
10133
|
-
],
|
|
10134
|
-
"x-cfs-compressed": "cfs",
|
|
10135
|
-
"x-chat": "chat",
|
|
10136
|
-
"x-conference": "nsc",
|
|
10137
|
-
"x-dgc-compressed": "dgc",
|
|
10138
|
-
"x-dtbncx+xml": "ncx",
|
|
10139
|
-
"x-dtbook+xml": "dtb",
|
|
10140
|
-
"x-dtbresource+xml": "res",
|
|
10141
|
-
"x-eva": "eva",
|
|
10142
|
-
"x-font-bdf": "bdf",
|
|
10143
|
-
"x-font-ghostscript": "gsf",
|
|
10144
|
-
"x-font-linux-psf": "psf",
|
|
10145
|
-
"x-font-pcf": "pcf",
|
|
10146
|
-
"x-font-snf": "snf",
|
|
10147
|
-
"x-font-ttf": [
|
|
10148
|
-
"ttf",
|
|
10149
|
-
"ttc"
|
|
10150
|
-
],
|
|
10151
|
-
"x-font-type1": [
|
|
10152
|
-
"pfa",
|
|
10153
|
-
"pfb",
|
|
10154
|
-
"pfm",
|
|
10155
|
-
"afm"
|
|
10156
|
-
],
|
|
10157
|
-
"x-freearc": "arc",
|
|
10158
|
-
"x-gca-compressed": "gca",
|
|
10159
|
-
"x-glulx": "ulx",
|
|
10160
|
-
"x-gramps-xml": "gramps",
|
|
10161
|
-
"x-install-instructions": "install",
|
|
10162
|
-
"x-lzh-compressed": [
|
|
10163
|
-
"lzh",
|
|
10164
|
-
"lha"
|
|
10165
|
-
],
|
|
10166
|
-
"x-mie": "mie",
|
|
10167
|
-
"x-mobipocket-ebook": [
|
|
10168
|
-
"prc",
|
|
10169
|
-
"mobi"
|
|
10170
|
-
],
|
|
10171
|
-
"x-ms-application": "application",
|
|
10172
|
-
"x-ms-shortcut": "lnk",
|
|
10173
|
-
"x-ms-xbap": "xbap",
|
|
10174
|
-
"x-msbinder": "obd",
|
|
10175
|
-
"x-mscardfile": "crd",
|
|
10176
|
-
"x-msclip": "clp",
|
|
10177
|
-
"x-ms-installer": "msi",
|
|
10178
|
-
"x-msmediaview": [
|
|
10179
|
-
"mvb",
|
|
10180
|
-
"m13",
|
|
10181
|
-
"m14"
|
|
10182
|
-
],
|
|
10183
|
-
"x-msmetafile": [
|
|
10184
|
-
"wmf",
|
|
10185
|
-
"wmz",
|
|
10186
|
-
"emf",
|
|
10187
|
-
"emz"
|
|
10188
|
-
],
|
|
10189
|
-
"x-msmoney": "mny",
|
|
10190
|
-
"x-mspublisher": "pub",
|
|
10191
|
-
"x-msschedule": "scd",
|
|
10192
|
-
"x-msterminal": "trm",
|
|
10193
|
-
"x-mswrite": "wri",
|
|
10194
|
-
"x-nzb": "nzb",
|
|
10195
|
-
"x-pkcs12": [
|
|
10196
|
-
"p12",
|
|
10197
|
-
"pfx"
|
|
10198
|
-
],
|
|
10199
|
-
"x-pkcs7-certificates": [
|
|
10200
|
-
"p7b",
|
|
10201
|
-
"spc"
|
|
10202
|
-
],
|
|
10203
|
-
"x-research-info-systems": "ris",
|
|
10204
|
-
"x-silverlight-app": "xap",
|
|
10205
|
-
"x-sql": "sql",
|
|
10206
|
-
"x-stuffitx": "sitx",
|
|
10207
|
-
"x-subrip": "srt",
|
|
10208
|
-
"x-t3vm-image": "t3",
|
|
10209
|
-
"x-tex-tfm": "tfm",
|
|
10210
|
-
"x-tgif": "obj",
|
|
10211
|
-
"x-xliff+xml": "xlf",
|
|
10212
|
-
"x-xz": "xz",
|
|
10213
|
-
"x-zmachine": [
|
|
10214
|
-
"z1",
|
|
10215
|
-
"z2",
|
|
10216
|
-
"z3",
|
|
10217
|
-
"z4",
|
|
10218
|
-
"z5",
|
|
10219
|
-
"z6",
|
|
10220
|
-
"z7",
|
|
10221
|
-
"z8"
|
|
10222
|
-
],
|
|
10223
|
-
"xaml+xml": "xaml",
|
|
10224
|
-
"xcap-diff+xml": "xdf",
|
|
10225
|
-
"xenc+xml": "xenc",
|
|
10226
|
-
"xml-dtd": "dtd",
|
|
10227
|
-
"xop+xml": "xop",
|
|
10228
|
-
"xproc+xml": "xpl",
|
|
10229
|
-
"xslt+xml": "xslt",
|
|
10230
|
-
"xv+xml": [
|
|
10231
|
-
"mxml",
|
|
10232
|
-
"xhvml",
|
|
10233
|
-
"xvml",
|
|
10234
|
-
"xvm"
|
|
10235
|
-
],
|
|
10236
|
-
"yang": "yang",
|
|
10237
|
-
"yin+xml": "yin",
|
|
10238
|
-
"envoy": "evy",
|
|
10239
|
-
"fractals": "fif",
|
|
10240
|
-
"internet-property-stream": "acx",
|
|
10241
|
-
"olescript": "axs",
|
|
10242
|
-
"vnd.ms-outlook": "msg",
|
|
10243
|
-
"vnd.ms-pkicertstore": "sst",
|
|
10244
|
-
"x-compress": "z",
|
|
10245
|
-
"x-perfmon": [
|
|
10246
|
-
"pma",
|
|
10247
|
-
"pmc",
|
|
10248
|
-
"pmr",
|
|
10249
|
-
"pmw"
|
|
10250
|
-
],
|
|
10251
|
-
"ynd.ms-pkipko": "pko",
|
|
10252
|
-
"gzip": [
|
|
10253
|
-
"gz",
|
|
10254
|
-
"tgz"
|
|
10255
|
-
],
|
|
10256
|
-
"smil+xml": [
|
|
10257
|
-
"smi",
|
|
10258
|
-
"smil"
|
|
10259
|
-
],
|
|
10260
|
-
"vnd.debian.binary-package": [
|
|
10261
|
-
"deb",
|
|
10262
|
-
"udeb"
|
|
10263
|
-
],
|
|
10264
|
-
"vnd.hzn-3d-crossword": "x3d",
|
|
10265
|
-
"vnd.sqlite3": [
|
|
10266
|
-
"db",
|
|
10267
|
-
"sqlite",
|
|
10268
|
-
"sqlite3",
|
|
10269
|
-
"db-wal",
|
|
10270
|
-
"sqlite-wal",
|
|
10271
|
-
"db-shm",
|
|
10272
|
-
"sqlite-shm"
|
|
10273
|
-
],
|
|
10274
|
-
"vnd.wap.sic": "sic",
|
|
10275
|
-
"vnd.wap.slc": "slc",
|
|
10276
|
-
"x-krita": [
|
|
10277
|
-
"kra",
|
|
10278
|
-
"krz"
|
|
10279
|
-
],
|
|
10280
|
-
"x-perl": [
|
|
10281
|
-
"pm",
|
|
10282
|
-
"pl"
|
|
10283
|
-
],
|
|
10284
|
-
"yaml": [
|
|
10285
|
-
"yaml",
|
|
10286
|
-
"yml"
|
|
10287
|
-
]
|
|
10288
|
-
},
|
|
10289
|
-
"audio": {
|
|
10290
|
-
"amr": "amr",
|
|
10291
|
-
"amr-wb": "awb",
|
|
10292
|
-
"annodex": "axa",
|
|
10293
|
-
"basic": [
|
|
10294
|
-
"au",
|
|
10295
|
-
"snd"
|
|
10296
|
-
],
|
|
10297
|
-
"flac": "flac",
|
|
10298
|
-
"midi": [
|
|
10299
|
-
"mid",
|
|
10300
|
-
"midi",
|
|
10301
|
-
"kar",
|
|
10302
|
-
"rmi"
|
|
10303
|
-
],
|
|
10304
|
-
"mpeg": [
|
|
10305
|
-
"mpga",
|
|
10306
|
-
"mpega",
|
|
10307
|
-
"mp3",
|
|
10308
|
-
"m4a",
|
|
10309
|
-
"mp2a",
|
|
10310
|
-
"m2a",
|
|
10311
|
-
"m3a"
|
|
10312
|
-
],
|
|
10313
|
-
"mpegurl": "m3u",
|
|
10314
|
-
"ogg": [
|
|
10315
|
-
"oga",
|
|
10316
|
-
"ogg",
|
|
10317
|
-
"spx"
|
|
10318
|
-
],
|
|
10319
|
-
"prs.sid": "sid",
|
|
10320
|
-
"x-aiff": "aifc",
|
|
10321
|
-
"x-gsm": "gsm",
|
|
10322
|
-
"x-ms-wma": "wma",
|
|
10323
|
-
"x-ms-wax": "wax",
|
|
10324
|
-
"x-pn-realaudio": "ram",
|
|
10325
|
-
"x-realaudio": "ra",
|
|
10326
|
-
"x-sd2": "sd2",
|
|
10327
|
-
"adpcm": "adp",
|
|
10328
|
-
"mp4": "mp4a",
|
|
10329
|
-
"s3m": "s3m",
|
|
10330
|
-
"silk": "sil",
|
|
10331
|
-
"vnd.dece.audio": [
|
|
10332
|
-
"uva",
|
|
10333
|
-
"uvva"
|
|
10334
|
-
],
|
|
10335
|
-
"vnd.digital-winds": "eol",
|
|
10336
|
-
"vnd.dra": "dra",
|
|
10337
|
-
"vnd.dts": "dts",
|
|
10338
|
-
"vnd.dts.hd": "dtshd",
|
|
10339
|
-
"vnd.lucent.voice": "lvp",
|
|
10340
|
-
"vnd.ms-playready.media.pya": "pya",
|
|
10341
|
-
"vnd.nuera.ecelp4800": "ecelp4800",
|
|
10342
|
-
"vnd.nuera.ecelp7470": "ecelp7470",
|
|
10343
|
-
"vnd.nuera.ecelp9600": "ecelp9600",
|
|
10344
|
-
"vnd.rip": "rip",
|
|
10345
|
-
"webm": "weba",
|
|
10346
|
-
"x-caf": "caf",
|
|
10347
|
-
"x-matroska": "mka",
|
|
10348
|
-
"x-pn-realaudio-plugin": "rmp",
|
|
10349
|
-
"xm": "xm",
|
|
10350
|
-
"aac": "aac",
|
|
10351
|
-
"aiff": [
|
|
10352
|
-
"aiff",
|
|
10353
|
-
"aif",
|
|
10354
|
-
"aff"
|
|
10355
|
-
],
|
|
10356
|
-
"opus": "opus",
|
|
10357
|
-
"wav": "wav"
|
|
10358
|
-
},
|
|
10359
|
-
"chemical": {
|
|
10360
|
-
"x-alchemy": "alc",
|
|
10361
|
-
"x-cache": [
|
|
10362
|
-
"cac",
|
|
10363
|
-
"cache"
|
|
10364
|
-
],
|
|
10365
|
-
"x-cache-csf": "csf",
|
|
10366
|
-
"x-cactvs-binary": [
|
|
10367
|
-
"cbin",
|
|
10368
|
-
"cascii",
|
|
10369
|
-
"ctab"
|
|
10370
|
-
],
|
|
10371
|
-
"x-cdx": "cdx",
|
|
10372
|
-
"x-chem3d": "c3d",
|
|
10373
|
-
"x-cif": "cif",
|
|
10374
|
-
"x-cmdf": "cmdf",
|
|
10375
|
-
"x-cml": "cml",
|
|
10376
|
-
"x-compass": "cpa",
|
|
10377
|
-
"x-crossfire": "bsd",
|
|
10378
|
-
"x-csml": [
|
|
10379
|
-
"csml",
|
|
10380
|
-
"csm"
|
|
10381
|
-
],
|
|
10382
|
-
"x-ctx": "ctx",
|
|
10383
|
-
"x-cxf": [
|
|
10384
|
-
"cxf",
|
|
10385
|
-
"cef"
|
|
10386
|
-
],
|
|
10387
|
-
"x-embl-dl-nucleotide": [
|
|
10388
|
-
"emb",
|
|
10389
|
-
"embl"
|
|
10390
|
-
],
|
|
10391
|
-
"x-gamess-input": [
|
|
10392
|
-
"inp",
|
|
10393
|
-
"gam",
|
|
10394
|
-
"gamin"
|
|
10395
|
-
],
|
|
10396
|
-
"x-gaussian-checkpoint": [
|
|
10397
|
-
"fch",
|
|
10398
|
-
"fchk"
|
|
10399
|
-
],
|
|
10400
|
-
"x-gaussian-cube": "cub",
|
|
10401
|
-
"x-gaussian-input": [
|
|
10402
|
-
"gau",
|
|
10403
|
-
"gjc",
|
|
10404
|
-
"gjf"
|
|
10405
|
-
],
|
|
10406
|
-
"x-gaussian-log": "gal",
|
|
10407
|
-
"x-gcg8-sequence": "gcg",
|
|
10408
|
-
"x-genbank": "gen",
|
|
10409
|
-
"x-hin": "hin",
|
|
10410
|
-
"x-isostar": [
|
|
10411
|
-
"istr",
|
|
10412
|
-
"ist"
|
|
10413
|
-
],
|
|
10414
|
-
"x-jcamp-dx": [
|
|
10415
|
-
"jdx",
|
|
10416
|
-
"dx"
|
|
10417
|
-
],
|
|
10418
|
-
"x-kinemage": "kin",
|
|
10419
|
-
"x-macmolecule": "mcm",
|
|
10420
|
-
"x-macromodel-input": "mmod",
|
|
10421
|
-
"x-mdl-molfile": "mol",
|
|
10422
|
-
"x-mdl-rdfile": "rd",
|
|
10423
|
-
"x-mdl-rxnfile": "rxn",
|
|
10424
|
-
"x-mdl-sdfile": "sd",
|
|
10425
|
-
"x-mdl-tgf": "tgf",
|
|
10426
|
-
"x-mmcif": "mcif",
|
|
10427
|
-
"x-mol2": "mol2",
|
|
10428
|
-
"x-molconn-Z": "b",
|
|
10429
|
-
"x-mopac-graph": "gpt",
|
|
10430
|
-
"x-mopac-input": [
|
|
10431
|
-
"mop",
|
|
10432
|
-
"mopcrt",
|
|
10433
|
-
"zmt"
|
|
10434
|
-
],
|
|
10435
|
-
"x-mopac-out": "moo",
|
|
10436
|
-
"x-ncbi-asn1": "asn",
|
|
10437
|
-
"x-ncbi-asn1-ascii": [
|
|
10438
|
-
"prt",
|
|
10439
|
-
"ent"
|
|
10440
|
-
],
|
|
10441
|
-
"x-ncbi-asn1-binary": "val",
|
|
10442
|
-
"x-rosdal": "ros",
|
|
10443
|
-
"x-swissprot": "sw",
|
|
10444
|
-
"x-vamas-iso14976": "vms",
|
|
10445
|
-
"x-vmd": "vmd",
|
|
10446
|
-
"x-xtel": "xtel",
|
|
10447
|
-
"x-xyz": "xyz"
|
|
10448
|
-
},
|
|
10449
|
-
"font": {
|
|
10450
|
-
"otf": "otf",
|
|
10451
|
-
"woff": "woff",
|
|
10452
|
-
"woff2": "woff2"
|
|
10453
|
-
},
|
|
10454
|
-
"image": {
|
|
10455
|
-
"gif": "gif",
|
|
10456
|
-
"ief": "ief",
|
|
10457
|
-
"jpeg": [
|
|
10458
|
-
"jpeg",
|
|
10459
|
-
"jpg",
|
|
10460
|
-
"jpe",
|
|
10461
|
-
"jfif",
|
|
10462
|
-
"jfif-tbnl",
|
|
10463
|
-
"jif"
|
|
10464
|
-
],
|
|
10465
|
-
"pcx": "pcx",
|
|
10466
|
-
"png": "png",
|
|
10467
|
-
"svg+xml": [
|
|
10468
|
-
"svg",
|
|
10469
|
-
"svgz"
|
|
10470
|
-
],
|
|
10471
|
-
"tiff": [
|
|
10472
|
-
"tiff",
|
|
10473
|
-
"tif"
|
|
10474
|
-
],
|
|
10475
|
-
"vnd.djvu": [
|
|
10476
|
-
"djvu",
|
|
10477
|
-
"djv"
|
|
10478
|
-
],
|
|
10479
|
-
"vnd.wap.wbmp": "wbmp",
|
|
10480
|
-
"x-canon-cr2": "cr2",
|
|
10481
|
-
"x-canon-crw": "crw",
|
|
10482
|
-
"x-cmu-raster": "ras",
|
|
10483
|
-
"x-coreldraw": "cdr",
|
|
10484
|
-
"x-coreldrawpattern": "pat",
|
|
10485
|
-
"x-coreldrawtemplate": "cdt",
|
|
10486
|
-
"x-corelphotopaint": "cpt",
|
|
10487
|
-
"x-epson-erf": "erf",
|
|
10488
|
-
"x-icon": "ico",
|
|
10489
|
-
"x-jg": "art",
|
|
10490
|
-
"x-jng": "jng",
|
|
10491
|
-
"x-nikon-nef": "nef",
|
|
10492
|
-
"x-olympus-orf": "orf",
|
|
10493
|
-
"x-portable-anymap": "pnm",
|
|
10494
|
-
"x-portable-bitmap": "pbm",
|
|
10495
|
-
"x-portable-graymap": "pgm",
|
|
10496
|
-
"x-portable-pixmap": "ppm",
|
|
10497
|
-
"x-rgb": "rgb",
|
|
10498
|
-
"x-xbitmap": "xbm",
|
|
10499
|
-
"x-xpixmap": "xpm",
|
|
10500
|
-
"x-xwindowdump": "xwd",
|
|
10501
|
-
"bmp": "bmp",
|
|
10502
|
-
"cgm": "cgm",
|
|
10503
|
-
"g3fax": "g3",
|
|
10504
|
-
"ktx": "ktx",
|
|
10505
|
-
"prs.btif": "btif",
|
|
10506
|
-
"sgi": "sgi",
|
|
10507
|
-
"vnd.dece.graphic": [
|
|
10508
|
-
"uvi",
|
|
10509
|
-
"uvvi",
|
|
10510
|
-
"uvg",
|
|
10511
|
-
"uvvg"
|
|
10512
|
-
],
|
|
10513
|
-
"vnd.dwg": "dwg",
|
|
10514
|
-
"vnd.dxf": "dxf",
|
|
10515
|
-
"vnd.fastbidsheet": "fbs",
|
|
10516
|
-
"vnd.fpx": "fpx",
|
|
10517
|
-
"vnd.fst": "fst",
|
|
10518
|
-
"vnd.fujixerox.edmics-mmr": "mmr",
|
|
10519
|
-
"vnd.fujixerox.edmics-rlc": "rlc",
|
|
10520
|
-
"vnd.ms-modi": "mdi",
|
|
10521
|
-
"vnd.ms-photo": "wdp",
|
|
10522
|
-
"vnd.net-fpx": "npx",
|
|
10523
|
-
"vnd.xiff": "xif",
|
|
10524
|
-
"webp": "webp",
|
|
10525
|
-
"x-3ds": "3ds",
|
|
10526
|
-
"x-cmx": "cmx",
|
|
10527
|
-
"x-freehand": [
|
|
10528
|
-
"fh",
|
|
10529
|
-
"fhc",
|
|
10530
|
-
"fh4",
|
|
10531
|
-
"fh5",
|
|
10532
|
-
"fh7"
|
|
10533
|
-
],
|
|
10534
|
-
"x-pict": [
|
|
10535
|
-
"pic",
|
|
10536
|
-
"pct"
|
|
10537
|
-
],
|
|
10538
|
-
"x-tga": "tga",
|
|
10539
|
-
"cis-cod": "cod",
|
|
10540
|
-
"avif": [
|
|
10541
|
-
"avif",
|
|
10542
|
-
"avifs"
|
|
10543
|
-
],
|
|
10544
|
-
"heic": [
|
|
10545
|
-
"heif",
|
|
10546
|
-
"heic"
|
|
10547
|
-
],
|
|
10548
|
-
"pjpeg": [
|
|
10549
|
-
"pjpg"
|
|
10550
|
-
],
|
|
10551
|
-
"vnd.adobe.photoshop": "psd",
|
|
10552
|
-
"x-adobe-dng": "dng",
|
|
10553
|
-
"x-fuji-raf": "raf",
|
|
10554
|
-
"x-icns": "icns",
|
|
10555
|
-
"x-kodak-dcr": "dcr",
|
|
10556
|
-
"x-kodak-k25": "k25",
|
|
10557
|
-
"x-kodak-kdc": "kdc",
|
|
10558
|
-
"x-minolta-mrw": "mrw",
|
|
10559
|
-
"x-panasonic-raw": [
|
|
10560
|
-
"raw",
|
|
10561
|
-
"rw2",
|
|
10562
|
-
"rwl"
|
|
10563
|
-
],
|
|
10564
|
-
"x-pentax-pef": [
|
|
10565
|
-
"pef",
|
|
10566
|
-
"ptx"
|
|
10567
|
-
],
|
|
10568
|
-
"x-sigma-x3f": "x3f",
|
|
10569
|
-
"x-sony-arw": "arw",
|
|
10570
|
-
"x-sony-sr2": "sr2",
|
|
10571
|
-
"x-sony-srf": "srf"
|
|
10572
|
-
},
|
|
10573
|
-
"message": {
|
|
10574
|
-
"rfc822": [
|
|
10575
|
-
"eml",
|
|
10576
|
-
"mime",
|
|
10577
|
-
"mht",
|
|
10578
|
-
"mhtml",
|
|
10579
|
-
"nws"
|
|
10580
|
-
]
|
|
10581
|
-
},
|
|
10582
|
-
"model": {
|
|
10583
|
-
"iges": [
|
|
10584
|
-
"igs",
|
|
10585
|
-
"iges"
|
|
10586
|
-
],
|
|
10587
|
-
"mesh": [
|
|
10588
|
-
"msh",
|
|
10589
|
-
"mesh",
|
|
10590
|
-
"silo"
|
|
10591
|
-
],
|
|
10592
|
-
"vrml": [
|
|
10593
|
-
"wrl",
|
|
10594
|
-
"vrml"
|
|
10595
|
-
],
|
|
10596
|
-
"x3d+vrml": [
|
|
10597
|
-
"x3dv",
|
|
10598
|
-
"x3dvz"
|
|
10599
|
-
],
|
|
10600
|
-
"x3d+xml": "x3dz",
|
|
10601
|
-
"x3d+binary": [
|
|
10602
|
-
"x3db",
|
|
10603
|
-
"x3dbz"
|
|
10604
|
-
],
|
|
10605
|
-
"vnd.collada+xml": "dae",
|
|
10606
|
-
"vnd.dwf": "dwf",
|
|
10607
|
-
"vnd.gdl": "gdl",
|
|
10608
|
-
"vnd.gtw": "gtw",
|
|
10609
|
-
"vnd.mts": "mts",
|
|
10610
|
-
"vnd.usdz+zip": "usdz",
|
|
10611
|
-
"vnd.vtu": "vtu"
|
|
10612
|
-
},
|
|
10613
|
-
"text": {
|
|
10614
|
-
"cache-manifest": [
|
|
10615
|
-
"manifest",
|
|
10616
|
-
"appcache"
|
|
10617
|
-
],
|
|
10618
|
-
"calendar": [
|
|
10619
|
-
"ics",
|
|
10620
|
-
"icz",
|
|
10621
|
-
"ifb"
|
|
10622
|
-
],
|
|
10623
|
-
"css": "css",
|
|
10624
|
-
"csv": "csv",
|
|
10625
|
-
"h323": "323",
|
|
10626
|
-
"html": [
|
|
10627
|
-
"html",
|
|
10628
|
-
"htm",
|
|
10629
|
-
"shtml",
|
|
10630
|
-
"stm"
|
|
10631
|
-
],
|
|
10632
|
-
"iuls": "uls",
|
|
10633
|
-
"plain": [
|
|
10634
|
-
"txt",
|
|
10635
|
-
"text",
|
|
10636
|
-
"brf",
|
|
10637
|
-
"conf",
|
|
10638
|
-
"def",
|
|
10639
|
-
"list",
|
|
10640
|
-
"log",
|
|
10641
|
-
"in",
|
|
10642
|
-
"bas",
|
|
10643
|
-
"diff",
|
|
10644
|
-
"ksh"
|
|
10645
|
-
],
|
|
10646
|
-
"richtext": "rtx",
|
|
10647
|
-
"scriptlet": [
|
|
10648
|
-
"sct",
|
|
10649
|
-
"wsc"
|
|
10650
|
-
],
|
|
10651
|
-
"texmacs": "tm",
|
|
10652
|
-
"tab-separated-values": "tsv",
|
|
10653
|
-
"vnd.sun.j2me.app-descriptor": "jad",
|
|
10654
|
-
"vnd.wap.wml": "wml",
|
|
10655
|
-
"vnd.wap.wmlscript": "wmls",
|
|
10656
|
-
"x-bibtex": "bib",
|
|
10657
|
-
"x-boo": "boo",
|
|
10658
|
-
"x-c++hdr": [
|
|
10659
|
-
"h++",
|
|
10660
|
-
"hpp",
|
|
10661
|
-
"hxx",
|
|
10662
|
-
"hh"
|
|
10663
|
-
],
|
|
10664
|
-
"x-c++src": [
|
|
10665
|
-
"c++",
|
|
10666
|
-
"cpp",
|
|
10667
|
-
"cxx",
|
|
10668
|
-
"cc"
|
|
10669
|
-
],
|
|
10670
|
-
"x-component": "htc",
|
|
10671
|
-
"x-dsrc": "d",
|
|
10672
|
-
"x-diff": "patch",
|
|
10673
|
-
"x-haskell": "hs",
|
|
10674
|
-
"x-java": "java",
|
|
10675
|
-
"x-literate-haskell": "lhs",
|
|
10676
|
-
"x-moc": "moc",
|
|
10677
|
-
"x-pascal": [
|
|
10678
|
-
"p",
|
|
10679
|
-
"pas",
|
|
10680
|
-
"pp",
|
|
10681
|
-
"inc"
|
|
10682
|
-
],
|
|
10683
|
-
"x-pcs-gcd": "gcd",
|
|
10684
|
-
"x-python": "py",
|
|
10685
|
-
"x-scala": "scala",
|
|
10686
|
-
"x-setext": "etx",
|
|
10687
|
-
"x-tcl": [
|
|
10688
|
-
"tcl",
|
|
10689
|
-
"tk"
|
|
10690
|
-
],
|
|
10691
|
-
"x-tex": [
|
|
10692
|
-
"tex",
|
|
10693
|
-
"ltx",
|
|
10694
|
-
"sty",
|
|
10695
|
-
"cls"
|
|
10696
|
-
],
|
|
10697
|
-
"x-vcalendar": "vcs",
|
|
10698
|
-
"x-vcard": "vcf",
|
|
10699
|
-
"n3": "n3",
|
|
10700
|
-
"prs.lines.tag": "dsc",
|
|
10701
|
-
"sgml": [
|
|
10702
|
-
"sgml",
|
|
10703
|
-
"sgm"
|
|
10704
|
-
],
|
|
10705
|
-
"troff": [
|
|
10706
|
-
"t",
|
|
10707
|
-
"tr",
|
|
10708
|
-
"roff",
|
|
10709
|
-
"man",
|
|
10710
|
-
"me",
|
|
10711
|
-
"ms"
|
|
10712
|
-
],
|
|
10713
|
-
"turtle": "ttl",
|
|
10714
|
-
"uri-list": [
|
|
10715
|
-
"uri",
|
|
10716
|
-
"uris",
|
|
10717
|
-
"urls"
|
|
10718
|
-
],
|
|
10719
|
-
"vcard": "vcard",
|
|
10720
|
-
"vnd.curl": "curl",
|
|
10721
|
-
"vnd.curl.dcurl": "dcurl",
|
|
10722
|
-
"vnd.curl.scurl": "scurl",
|
|
10723
|
-
"vnd.curl.mcurl": "mcurl",
|
|
10724
|
-
"vnd.dvb.subtitle": "sub",
|
|
10725
|
-
"vnd.fly": "fly",
|
|
10726
|
-
"vnd.fmi.flexstor": "flx",
|
|
10727
|
-
"vnd.graphviz": "gv",
|
|
10728
|
-
"vnd.in3d.3dml": "3dml",
|
|
10729
|
-
"vnd.in3d.spot": "spot",
|
|
10730
|
-
"x-asm": [
|
|
10731
|
-
"s",
|
|
10732
|
-
"asm"
|
|
10733
|
-
],
|
|
10734
|
-
"x-c": [
|
|
10735
|
-
"c",
|
|
10736
|
-
"h",
|
|
10737
|
-
"dic"
|
|
10738
|
-
],
|
|
10739
|
-
"x-fortran": [
|
|
10740
|
-
"f",
|
|
10741
|
-
"for",
|
|
10742
|
-
"f77",
|
|
10743
|
-
"f90"
|
|
10744
|
-
],
|
|
10745
|
-
"x-opml": "opml",
|
|
10746
|
-
"x-nfo": "nfo",
|
|
10747
|
-
"x-sfv": "sfv",
|
|
10748
|
-
"x-uuencode": "uu",
|
|
10749
|
-
"webviewhtml": "htt",
|
|
10750
|
-
"javascript": "js",
|
|
10751
|
-
"json": "json",
|
|
10752
|
-
"markdown": [
|
|
10753
|
-
"md",
|
|
10754
|
-
"markdown",
|
|
10755
|
-
"mdown",
|
|
10756
|
-
"markdn"
|
|
10757
|
-
],
|
|
10758
|
-
"vnd.wap.si": "si",
|
|
10759
|
-
"vnd.wap.sl": "sl"
|
|
10760
|
-
},
|
|
10761
|
-
"video": {
|
|
10762
|
-
"3gpp": "3gp",
|
|
10763
|
-
"annodex": "axv",
|
|
10764
|
-
"dl": "dl",
|
|
10765
|
-
"dv": [
|
|
10766
|
-
"dif",
|
|
10767
|
-
"dv"
|
|
10768
|
-
],
|
|
10769
|
-
"fli": "fli",
|
|
10770
|
-
"gl": "gl",
|
|
10771
|
-
"mpeg": [
|
|
10772
|
-
"mpeg",
|
|
10773
|
-
"mpg",
|
|
10774
|
-
"mpe",
|
|
10775
|
-
"m1v",
|
|
10776
|
-
"m2v",
|
|
10777
|
-
"mp2",
|
|
10778
|
-
"mpa",
|
|
10779
|
-
"mpv2"
|
|
10780
|
-
],
|
|
10781
|
-
"mp4": [
|
|
10782
|
-
"mp4",
|
|
10783
|
-
"mp4v",
|
|
10784
|
-
"mpg4"
|
|
10785
|
-
],
|
|
10786
|
-
"quicktime": [
|
|
10787
|
-
"qt",
|
|
10788
|
-
"mov"
|
|
10789
|
-
],
|
|
10790
|
-
"ogg": "ogv",
|
|
10791
|
-
"vnd.mpegurl": [
|
|
10792
|
-
"mxu",
|
|
10793
|
-
"m4u"
|
|
10794
|
-
],
|
|
10795
|
-
"x-flv": "flv",
|
|
10796
|
-
"x-la-asf": [
|
|
10797
|
-
"lsf",
|
|
10798
|
-
"lsx"
|
|
10799
|
-
],
|
|
10800
|
-
"x-mng": "mng",
|
|
10801
|
-
"x-ms-asf": [
|
|
10802
|
-
"asf",
|
|
10803
|
-
"asx",
|
|
10804
|
-
"asr"
|
|
10805
|
-
],
|
|
10806
|
-
"x-ms-wm": "wm",
|
|
10807
|
-
"x-ms-wmv": "wmv",
|
|
10808
|
-
"x-ms-wmx": "wmx",
|
|
10809
|
-
"x-ms-wvx": "wvx",
|
|
10810
|
-
"x-msvideo": "avi",
|
|
10811
|
-
"x-sgi-movie": "movie",
|
|
10812
|
-
"x-matroska": [
|
|
10813
|
-
"mpv",
|
|
10814
|
-
"mkv",
|
|
10815
|
-
"mk3d",
|
|
10816
|
-
"mks"
|
|
10817
|
-
],
|
|
10818
|
-
"3gpp2": "3g2",
|
|
10819
|
-
"h261": "h261",
|
|
10820
|
-
"h263": "h263",
|
|
10821
|
-
"h264": "h264",
|
|
10822
|
-
"jpeg": "jpgv",
|
|
10823
|
-
"jpm": [
|
|
10824
|
-
"jpm",
|
|
10825
|
-
"jpgm"
|
|
10826
|
-
],
|
|
10827
|
-
"mj2": [
|
|
10828
|
-
"mj2",
|
|
10829
|
-
"mjp2"
|
|
10830
|
-
],
|
|
10831
|
-
"vnd.dece.hd": [
|
|
10832
|
-
"uvh",
|
|
10833
|
-
"uvvh"
|
|
10834
|
-
],
|
|
10835
|
-
"vnd.dece.mobile": [
|
|
10836
|
-
"uvm",
|
|
10837
|
-
"uvvm"
|
|
10838
|
-
],
|
|
10839
|
-
"vnd.dece.pd": [
|
|
10840
|
-
"uvp",
|
|
10841
|
-
"uvvp"
|
|
10842
|
-
],
|
|
10843
|
-
"vnd.dece.sd": [
|
|
10844
|
-
"uvs",
|
|
10845
|
-
"uvvs"
|
|
10846
|
-
],
|
|
10847
|
-
"vnd.dece.video": [
|
|
10848
|
-
"uvv",
|
|
10849
|
-
"uvvv"
|
|
10850
|
-
],
|
|
10851
|
-
"vnd.dvb.file": "dvb",
|
|
10852
|
-
"vnd.fvt": "fvt",
|
|
10853
|
-
"vnd.ms-playready.media.pyv": "pyv",
|
|
10854
|
-
"vnd.uvvu.mp4": [
|
|
10855
|
-
"uvu",
|
|
10856
|
-
"uvvu"
|
|
10857
|
-
],
|
|
10858
|
-
"vnd.vivo": "viv",
|
|
10859
|
-
"webm": "webm",
|
|
10860
|
-
"x-f4v": "f4v",
|
|
10861
|
-
"x-m4v": "m4v",
|
|
10862
|
-
"x-ms-vob": "vob",
|
|
10863
|
-
"x-smv": "smv",
|
|
10864
|
-
"mp2t": "ts"
|
|
10865
|
-
},
|
|
10866
|
-
"x-conference": {
|
|
10867
|
-
"x-cooltalk": "ice"
|
|
10868
|
-
},
|
|
10869
|
-
"x-world": {
|
|
10870
|
-
"x-vrml": [
|
|
10871
|
-
"vrm",
|
|
10872
|
-
"flr",
|
|
10873
|
-
"wrz",
|
|
10874
|
-
"xaf",
|
|
10875
|
-
"xof"
|
|
10876
|
-
]
|
|
10877
|
-
}
|
|
10878
|
-
};
|
|
10879
|
-
|
|
10880
9419
|
let mimeTypes;
|
|
10881
9420
|
|
|
10882
9421
|
function getMimeType(filename) {
|
|
@@ -10885,17 +9424,25 @@ function getMimeType(filename) {
|
|
|
10885
9424
|
|
|
10886
9425
|
function getMimeTypes() {
|
|
10887
9426
|
if (!mimeTypes) {
|
|
10888
|
-
mimeTypes =
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
9427
|
+
mimeTypes = decodeMimeTypes(encodedMimeTypes);
|
|
9428
|
+
}
|
|
9429
|
+
return mimeTypes;
|
|
9430
|
+
}
|
|
9431
|
+
|
|
9432
|
+
function decodeMimeTypes(data) {
|
|
9433
|
+
const mimeTypes = Object.create(null);
|
|
9434
|
+
for (const block of data.split(";")) {
|
|
9435
|
+
const colonIndex = block.indexOf(":");
|
|
9436
|
+
const type = block.slice(0, colonIndex);
|
|
9437
|
+
let previousSubtype = "";
|
|
9438
|
+
for (const entry of block.slice(colonIndex + 1).split(",")) {
|
|
9439
|
+
const tokens = entry.split(" ");
|
|
9440
|
+
const subtype = previousSubtype.slice(0, Number.parseInt(tokens[0][0], 36)) + tokens[0].slice(1);
|
|
9441
|
+
previousSubtype = subtype;
|
|
9442
|
+
const expandedSubtype = subtype.replace(/!/g, "+xml");
|
|
9443
|
+
const extensions = tokens.length > 1 ? tokens.slice(1) : [expandedSubtype.split("+")[0]];
|
|
9444
|
+
for (const extension of extensions) {
|
|
9445
|
+
mimeTypes[extension] = type + "/" + expandedSubtype;
|
|
10899
9446
|
}
|
|
10900
9447
|
}
|
|
10901
9448
|
}
|
|
@@ -10931,7 +9478,7 @@ function getMimeTypes() {
|
|
|
10931
9478
|
*/
|
|
10932
9479
|
|
|
10933
9480
|
|
|
10934
|
-
|
|
9481
|
+
n$1(setDefaultConfiguration);
|
|
10935
9482
|
|
|
10936
9483
|
exports.BlobReader = BlobReader;
|
|
10937
9484
|
exports.BlobWriter = BlobWriter;
|