hi-ucs/node_modules/pako/dist/pako_deflate.es5.min.js

3 lines
28 KiB
JavaScript
Raw Normal View History

2022-12-16 09:31:38 +08:00
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).pako={})}(this,(function(t){"use strict";function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=256,r=286,n=30,i=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),_=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),o=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=new Array(576);e(l);var d=new Array(60);e(d);var u=new Array(512);e(u);var f=new Array(256);e(f);var c=new Array(29);e(c);var p,g,w,m=new Array(n);function b(t,e,a,r,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=r,this.max_length=n,this.has_stree=t&&t.length}function v(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(m);var y=function(t){return t<256?u[t]:u[256+(t>>>7)]},z=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},k=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,z(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},x=function(t,e,a){k(t,a[2*e],a[2*e+1])},A=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=function(t,e,a){var r,n,s=new Array(16),_=0;for(r=1;r<=i;r++)_=_+a[r-1]<<1,s[r]=_;for(n=0;n<=e;n++){var h=t[2*n+1];0!==h&&(t[2*n]=A(s[h]++,h))}},Z=function(t){var e;for(e=0;e<r;e++)t.dyn_ltree[2*e]=0;for(e=0;e<n;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},S=function(t){t.bi_valid>8?z(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},U=function(t,e,a,r){var n=2*e,i=2*a;return t[n]<t[i]||t[n]===t[i]&&r[e]<=r[a]},R=function(t,e,a){for(var r=t.heap[a],n=a<<1;n<=t.heap_len&&(n<t.heap_len&&U(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!U(e,r,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=r},T=function(t,e,r){var n,i,h,o,l=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+l++],n+=(255&t.pending_buf[t.sym_buf+l++])<<8,i=t.pending_buf[t.sym_buf+l++],0===n?x(t,i,e):(h=f[i],x(t,h+a+1,e),0!==(o=s[h])&&(i-=c[h],k(t,i,o)),n--,h=y(n),x(t,h,r),0!==(o=_[h])&&(n-=m[h],k(t,n,o)))}while(l<t.sym_next);x(t,256,e)},L=function(t,e){var a,r,n,s=e.dyn_tree,_=e.stat_desc.static_tree,h=e.stat_desc.has_stree,o=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<o;a++)0!==s[2*a]?(t.heap[++t.heap_len]=l=a,t.depth[a]=0):s[2*a+1]=0;for(;t.heap_len<2;)s[2*(n=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[n]=0,t.opt_len--,h&&(t.static_len-=_[2*n+1]);for(e.max_code=l,a=t.heap_len>>1;a>=1;a--)R(t,s,a);n=o;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],R(t,s,1),r=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=r,s[2*n]=s[2*a]+s[2*r],t.depth[n]=(t.depth[a]>=t.depth[r]?t.depth[a]:t.depth[r])+1,s[2*a+1]=s[2*r+1]=n,t.heap[1]=n++,R(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,r,n,s,_,h,o=e.dyn_tree,l=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(s=0;s<=i;s++)t.bl_count[s]=0;for(o[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=o[2*o[2*(r=t.heap[a])+1]+1]+1)>p&&(s=p,g++),o[2*r+1]=s,r>l||(t.bl_count[s]++,_=0,r>=c&&(_=f[r-c]),h=o[2*r],t.opt_len+=h*(s+_),u&&(t.static_len+=h*(d[2*r+1]+_)));if(0!==g){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(s=p;0!==s;s--)for(r=t.bl_count[s];0!==r;)(n=t.heap[--a])>l||(o[2*n+1]!==s&&(t.opt_len+=(s-o[2*n+1])*o[2*n],o[2*n+1]=s),r--)}}(t,e),E(s,l,t.bl_count)},F=function(t,e,a){var r,n,i=-1,s=e[1],_=0,h=7,o=4;for(0===s&&(h=138,o=3),e[2*(a+1)+1]=65535,r=0;r<=a;r++)n=s,s=e[2*(r+1)+1],++_<h&&n===s||(_<o?t.bl_tree[2*n]+=_:0!==n?(n!==i&&t.bl_tree[2*n]++,t.bl_tree[32]++):_<=10?t.bl_tree[34]++:t.bl_tree[36]++,_=0,i=n,0===s?(h=138,o=3):n===s?(h=6,o=3):(h=7,