Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

960 B
Raw Blame
var type=self.data.type,bin=self.data.bin,unzipFiles=function(){var e,r,i,a=[];for(this.Y(),e=0,r=(i=this.i).length;e<r;++e)a[e]=i[e].filename+(i[e].J?" ({formatSize("+i[e].J+")})":"");return a},tarFiles=function(e){function r(e){return String.fromCharCode.apply(null,e).replace(/\0+$/,"")}for(var i,a,n,s=[],l=e.length,t=0;t<l&&0!==e[t];)i=r((n=e.subarray(t,t+512)).subarray(0,100)),(a=r(n.subarray(345,500)))&&(i=a+i),a=parseInt(r(n.subarray(124,136)),8),n=512*Math.ceil(a/512),"pax_global_header"!==(i="././@LongLink"===i?r(e.subarray(t+512,t+512+n)):i)&&s.push(i+(a?" ({formatSize("+a+")})":"")),t=t+512+n;return s};self.res={},"tar"===type?self.res.files=tarFiles(new Uint8Array(bin)):"zip"===type?self.res.files=unzipFiles.call(new Zlib.Unzip(new Uint8Array(bin))):"gzip"===type?self.res.files=tarFiles(new Zlib.Gunzip(new Uint8Array(bin)).decompress()):"bzip2"===type&&(self.res.files=tarFiles(self.bzip2.simple(self.bzip2.array(new Uint8Array(bin)))));