Files
mixly3/common/modules/web-modules/browserfs.min.js

84 lines
385 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var BrowserFS=(()=>{var Zi=Object.defineProperty,nd=Object.defineProperties,od=Object.getOwnPropertyDescriptor,ad=Object.getOwnPropertyDescriptors,sd=Object.getOwnPropertyNames,yu=Object.getOwnPropertySymbols,ud=Object.getPrototypeOf,wu=Object.prototype.hasOwnProperty,cd=Object.prototype.propertyIsEnumerable,ld=Reflect.get;var Re=Math.pow,bu=(r,t,e)=>t in r?Zi(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Xe=(r,t)=>{for(var e in t||(t={}))wu.call(t,e)&&bu(r,e,t[e]);if(yu)for(var e of yu(t))cd.call(t,e)&&bu(r,e,t[e]);return r},rt=(r,t)=>nd(r,ad(t)),u=(r,t)=>Zi(r,"name",{value:t,configurable:!0});var Wi=(r,t)=>{for(var e in t)Zi(r,e,{get:t[e],enumerable:!0})},fd=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of sd(t))!wu.call(r,n)&&n!==e&&Zi(r,n,{get:()=>t[n],enumerable:!(i=od(t,n))||i.enumerable});return r};var hd=r=>fd(Zi({},"__esModule",{value:!0}),r);var _u=(r,t,e)=>ld(ud(r),e,t);var C=(r,t,e)=>new Promise((i,n)=>{var o=m=>{try{l(e.next(m))}catch(y){n(y)}},a=m=>{try{l(e.throw(m))}catch(y){n(y)}},l=m=>m.done?i(m.value):Promise.resolve(m.value).then(o,a);l((e=e.apply(r,t)).next())}),vu=(r,t,e)=>(t=r[Symbol.asyncIterator],e=(i,n)=>(n=r[i])&&(t[i]=o=>new Promise((a,l,m)=>(o=n.call(r,o),m=o.done,Promise.resolve(o.value).then(y=>a({value:y,done:m}),l)))),t?t.call(r):(r=r[Symbol.iterator](),t={},e("next"),e("return"),t));var qy={};Wi(qy,{ActionType:()=>ri,ApiError:()=>T,AsyncKeyValueFile:()=>Ii,AsyncKeyValueFileSystem:()=>Ti,AsyncMirror:()=>Sr,BaseFile:()=>$r,BaseFileSystem:()=>gt,Cred:()=>Ye,Dropbox:()=>xr,Emscripten:()=>Ir,EmscriptenFS:()=>Ai,ErrorCode:()=>tt,ErrorStrings:()=>mt,FileFlag:()=>We,FileSystem:()=>Zr,FileSystemAccess:()=>Tr,FileType:()=>je,FolderAdapter:()=>rr,HTTPRequest:()=>dr,InMemory:()=>Kt,IndexedDB:()=>ur,IsoFS:()=>Mr,OverlayFS:()=>lr,SimpleSyncRWTransaction:()=>Wr,Stats:()=>Me,Storage:()=>cr,SyncKeyValueFile:()=>xi,SyncKeyValueFileSystem:()=>Hr,SynchronousFileSystem:()=>kt,WorkerFS:()=>Rr,XMLHTTPRequest:()=>dr,ZipFS:()=>Qt,backends:()=>ha,configure:()=>Wy,default:()=>Hy,fs:()=>to,getFileSystem:()=>id,initialize:()=>rd,registerBackend:()=>Zy});var Oe={};Wi(Oe,{_debugEnd:()=>uc,_debugProcess:()=>sc,_events:()=>Fc,_eventsCount:()=>xc,_exiting:()=>$u,_fatalExceptions:()=>ic,_getActiveHandles:()=>qu,_getActiveRequests:()=>Hu,_kill:()=>Ku,_linkedBinding:()=>ju,_maxListeners:()=>Sc,_preload_modules:()=>_c,_rawDebug:()=>Uu,_startProfilerIdleNotifier:()=>cc,_stopProfilerIdleNotifier:()=>lc,_tickCallback:()=>ac,abort:()=>pc,addListener:()=>Ic,allowedNodeEnvironmentFlags:()=>ec,arch:()=>Iu,argv:()=>Ru,argv0:()=>wc,assert:()=>tc,binding:()=>Nu,chdir:()=>Lu,config:()=>Zu,cpuUsage:()=>Un,cwd:()=>Pn,debugPort:()=>bc,default:()=>Dc,dlopen:()=>Wu,domain:()=>zu,emit:()=>Bc,emitWarning:()=>Cu,env:()=>Au,execArgv:()=>Ou,execPath:()=>yc,exit:()=>Ju,features:()=>rc,hasUncaughtExceptionCaptureCallback:()=>oc,hrtime:()=>Ln,kill:()=>Xu,listeners:()=>Nc,memoryUsage:()=>Yu,moduleLoadList:()=>Mu,nextTick:()=>Su,off:()=>Ac,on:()=>vr,once:()=>Tc,openStdin:()=>Qu,pid:()=>mc,platform:()=>Tu,ppid:()=>gc,prependListener:()=>kc,prependOnceListener:()=>Cc,reallyExit:()=>Vu,release:()=>Pu,removeAllListeners:()=>Oc,removeListener:()=>Rc,resourceUsage:()=>Gu,setSourceMapsEnabled:()=>vc,setUncaughtExceptionCaptureCallback:()=>nc,stderr:()=>hc,stdin:()=>dc,stdout:()=>fc,title:()=>xu,umask:()=>Du,uptime:()=>Ec,version:()=>Bu,versions:()=>ku});function ma(r){throw new Error("Node.js process "+r+" is not supported by JSPM core outside of Node.js")}u(ma,"unimplemented");var _r=[],vi=!1,Yr,Dn=-1;function dd(){!vi||!Yr||(vi=!1,Yr.length?_r=Yr.concat(_r):Dn=-1,_r.length&&Eu())}u(dd,"cleanUpNextTick");function Eu(){if(!vi){var r=setTimeout(dd,0);vi=!0;for(var t=_r.length;t;){for(Yr=_r,_r=[];++Dn<t;)Yr&&Yr[Dn].run();Dn=-1,t=_r.length}Yr=null,vi=!1,clearTimeout(r)}}u(Eu,"drainQueue");function Su(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];_r.push(new Fu(r,t)),_r.length===1&&!vi&&setTimeout(Eu,0)}u(Su,"nextTick");function Fu(r,t){this.fun=r,this.array=t}u(Fu,"Item");Fu.prototype.run=function(){this.fun.apply(null,this.array)};var xu="browser",Iu="x64",Tu="browser",Au={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},Ru=["/usr/bin/node"],Ou=[],Bu="v16.8.0",ku={},Cu=u(function(r,t){console.warn((t?t+": ":"")+r)},"emitWarning"),Nu=u(function(r){ma("binding")},"binding"),Du=u(function(r){return 0},"umask"),Pn=u(function(){return"/"},"cwd"),Lu=u(function(r){},"chdir"),Pu={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};function It(){}u(It,"noop");var Uu=It,Mu=[];function ju(r){ma("_linkedBinding")}u(ju,"_linkedBinding");var zu={},$u=!1,Zu={};function Wu(r){ma("dlopen")}u(Wu,"dlopen");function Hu(){return[]}u(Hu,"_getActiveRequests");function qu(){return[]}u(qu,"_getActiveHandles");var Vu=It,Ku=It,Un=u(function(){return{}},"cpuUsage"),Gu=Un,Yu=Un,Xu=It,Ju=It,Qu=It,ec={};function tc(r,t){if(!r)throw new Error(t||"assertion error")}u(tc,"assert");var rc={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},ic=It,nc=It;function oc(){return!1}u(oc,"hasUncaughtExceptionCaptureCallback");var ac=It,sc=It,uc=It,cc=It,lc=It,fc=void 0,hc=void 0,dc=void 0,pc=It,mc=2,gc=1,yc="/bin/usr/node",bc=9229,wc="node",_c=[],vc=It,jr={now:typeof performance!="undefined"?performance.now.bind(performance):void 0,timing:typeof performance!="undefined"?performance.timing:void 0};jr.now===void 0&&(da=Date.now(),jr.timing&&jr.timing.navigationStart&&(da=jr.timing.navigationStart),jr.now=()=>Date.now()-da);var da;function Ec(){return jr.now()/1e3}u(Ec,"uptime");var pa=1e9;function Ln(r){var t=Math.floor((Date.now()-jr.now())*.001),e=jr.now()*.001,i=Math.floor(e)+t,n=Math.floor(e%1*1e9);return r&&(i=i-r[0],n=n-r[1],n<0&&(i--,n+=pa)),[i,n]}u(Ln,"hrtime");Ln.bigint=function(r){var t=Ln(r);return typeof BigInt=="undefined"?t[0]*pa+t[1]:BigInt(t[0]*pa)+BigInt(t[1])};var Sc=10,Fc={},xc=0;function vr(){return Dc}u(vr,"on");var Ic=vr,Tc=vr,Ac=vr,Rc=vr,Oc=vr,Bc=It,kc=vr,Cc=vr;function Nc(r){return[]}u(Nc,"listeners");var Dc={version:Bu,versions:ku,arch:Iu,platform:Tu,release:Pu,_rawDebug:Uu,moduleLoadList:Mu,binding:Nu,_linkedBinding:ju,_events:Fc,_eventsCount:xc,_maxListeners:Sc,on:vr,addListener:Ic,once:Tc,off:Ac,removeListener:Rc,removeAllListeners:Oc,emit:Bc,prependListener:kc,prependOnceListener:Cc,listeners:Nc,domain:zu,_exiting:$u,config:Zu,dlopen:Wu,uptime:Ec,_getActiveRequests:Hu,_getActiveHandles:qu,reallyExit:Vu,_kill:Ku,cpuUsage:Un,resourceUsage:Gu,memoryUsage:Yu,kill:Xu,exit:Ju,openStdin:Qu,allowedNodeEnvironmentFlags:ec,assert:tc,features:rc,_fatalExceptions:ic,setUncaughtExceptionCaptureCallback:nc,hasUncaughtExceptionCaptureCallback:oc,emitWarning:Cu,nextTick:Su,_tickCallback:ac,_debugProcess:sc,_debugEnd:uc,_startProfilerIdleNotifier:cc,_stopProfilerIdleNotifier:lc,stdout:fc,stdin:dc,stderr:hc,abort:pc,umask:Du,chdir:Lu,cwd:Pn,env:Au,title:xu,argv:Ru,execArgv:Ou,pid:mc,ppid:gc,execPath:yc,debugPort:bc,hrtime:Ln,argv0:wc,_preload_modules:_c,setSourceMapsEnabled:vc};var Hi={},Lc=!1;function pd(){if(Lc)return Hi;Lc=!0,Hi.byteLength=l,Hi.toByteArray=y,Hi.fromByteArray=v;for(var r=[],t=[],e=typeof Uint8Array!="undefined"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=i.length;n<o;++n)r[n]=i[n],t[i.charCodeAt(n)]=n;t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;function a(S){var E=S.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var A=S.indexOf("=");A===-1&&(A=E);var O=A===E?0:4-A%4;return[A,O]}u(a,"getLens");function l(S){var E=a(S),A=E[0],O=E[1];return(A+O)*3/4-O}u(l,"byteLength");function m(S,E,A){return(E+A)*3/4-A}u(m,"_byteLength");function y(S){var E,A=a(S),O=A[0],U=A[1],j=new e(m(S,O,U)),W=0,se=U>0?O-4:O,Y;for(Y=0;Y<se;Y+=4)E=t[S.charCodeAt(Y)]<<18|t[S.charCodeAt(Y+1)]<<12|t[S.charCodeAt(Y+2)]<<6|t[S.charCodeAt(Y+3)],j[W++]=E>>16&255,j[W++]=E>>8&255,j[W++]=E&255;return U===2&&(E=t[S.charCodeAt(Y)]<<2|t[S.charCodeAt(Y+1)]>>4,j[W++]=E&255),U===1&&(E=t[S.charCodeAt(Y)]<<10|t[S.charCodeAt(Y+1)]<<4|t[S.charCodeAt(Y+2)]>>2,j[W++]=E>>8&255,j[W++]=E&255),j}u(y,"toByteArray");function g(S){return r[S>>18&63]+r[S>>12&63]+r[S>>6&63]+r[S&63]}u(g,"tripletToBase64");function w(S,E,A){for(var O,U=[],j=E;j<A;j+=3)O=(S[j]<<16&16711680)+(S[j+1]<<8&65280)+(S[j+2]&255),U.push(g(O));return U.join("")}u(w,"encodeChunk");function v(S){for(var E,A=S.length,O=A%3,U=[],j=16383,W=0,se=A-O;W<se;W+=j)U.push(w(S,W,W+j>se?se:W+j));return O===1?(E=S[A-1],U.push(r[E>>2]+r[E<<4&63]+"==")):O===2&&(E=(S[A-2]<<8)+S[A-1],U.push(r[E>>10]+r[E>>4&63]+r[E<<2&63]+"=")),U.join("")}return u(v,"fromByteArray"),Hi}u(pd,"dew$2");var Mn={},Pc=!1;function md(){if(Pc)return Mn;Pc=!0;return Mn.read=function(r,t,e,i,n){var o,a,l=n*8-i-1,m=(1<<l)-1,y=m>>1,g=-7,w=e?n-1:0,v=e?-1:1,S=r[t+w];for(w+=v,o=S&(1<<-g)-1,S>>=-g,g+=l;g>0;o=o*256+r[t+w],w+=v,g-=8);for(a=o&(1<<-g)-1,o>>=-g,g+=i;g>0;a=a*256+r[t+w],w+=v,g-=8);if(o===0)o=1-y;else{if(o===m)return a?NaN:(S?-1:1)*(1/0);a=a+Math.pow(2,i),o=o-y}return(S?-1:1)*a*Math.pow(2,o-i)},Mn.write=function(r,t,e,i,n,o){var a,l,m,y=o*8-n-1,g=(1<<y)-1,w=g>>1,v=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=i?0:o-1,E=i?1:-1,A=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,a=g):(a=Math.floor(Math.log(t)/Math.LN2),t*(m=Math.pow(2,-a))<1&&(a--,m*=2),a+w>=1?t+=v/m:t+=v*Math.pow(2,1-w),t*m>=2&&(a++,m/=2),a+w>=g?(l=0,a=g):a+w>=1?(l=(t*m-1)*Math.pow(2,n),a=a+w):(l=t*Math.pow(2,w-1)*Math.pow(2,n),a=0));n>=8;r[e+S]=l&255,S+=E,l/=256,n-=8);for(a=a<<n|l,y+=n;y>0;r[e+S]=a&255,S+=E,a/=256,y-=8);r[e+S-E]|=A*128},Mn}u(md,"dew$1");var Xr={},Uc=!1;function gd(){if(Uc)return Xr;Uc=!0;let r=pd(),t=md(),e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Xr.Buffer=a,Xr.SlowBuffer=U,Xr.INSPECT_MAX_BYTES=50;let i=2147483647;Xr.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=n(),!a.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function n(){try{let f=new Uint8Array(1),s={foo:function(){return 42}};return Object.setPrototypeOf(s,Uint8Array.prototype),Object.setPrototypeOf(f,s),f.foo()===42}catch(f){return!1}}u(n,"typedArraySupport"),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(f){if(f>i)throw new RangeError('The value "'+f+'" is invalid for option "size"');let s=new Uint8Array(f);return Object.setPrototypeOf(s,a.prototype),s}u(o,"createBuffer");function a(f,s,c){if(typeof f=="number"){if(typeof s=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(f)}return l(f,s,c)}u(a,"Buffer"),a.poolSize=8192;function l(f,s,c){if(typeof f=="string")return w(f,s);if(ArrayBuffer.isView(f))return S(f);if(f==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f);if(He(f,ArrayBuffer)||f&&He(f.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(He(f,SharedArrayBuffer)||f&&He(f.buffer,SharedArrayBuffer)))return E(f,s,c);if(typeof f=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let p=f.valueOf&&f.valueOf();if(p!=null&&p!==f)return a.from(p,s,c);let _=A(f);if(_)return _;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof f[Symbol.toPrimitive]=="function")return a.from(f[Symbol.toPrimitive]("string"),s,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f)}u(l,"from"),a.from=function(f,s,c){return l(f,s,c)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function m(f){if(typeof f!="number")throw new TypeError('"size" argument must be of type number');if(f<0)throw new RangeError('The value "'+f+'" is invalid for option "size"')}u(m,"assertSize");function y(f,s,c){return m(f),f<=0?o(f):s!==void 0?typeof c=="string"?o(f).fill(s,c):o(f).fill(s):o(f)}u(y,"alloc"),a.alloc=function(f,s,c){return y(f,s,c)};function g(f){return m(f),o(f<0?0:O(f)|0)}u(g,"allocUnsafe"),a.allocUnsafe=function(f){return g(f)},a.allocUnsafeSlow=function(f){return g(f)};function w(f,s){if((typeof s!="string"||s==="")&&(s="utf8"),!a.isEncoding(s))throw new TypeError("Unknown encoding: "+s);let c=j(f,s)|0,p=o(c),_=p.write(f,s);return _!==c&&(p=p.slice(0,_)),p}u(w,"fromString");function v(f){let s=f.length<0?0:O(f.length)|0,c=o(s);for(let p=0;p<s;p+=1)c[p]=f[p]&255;return c}u(v,"fromArrayLike");function S(f){if(He(f,Uint8Array)){let s=new Uint8Array(f);return E(s.buffer,s.byteOffset,s.byteLength)}return v(f)}u(S,"fromArrayView");function E(f,s,c){if(s<0||f.byteLength<s)throw new RangeError('"offset" is outside of buffer bounds');if(f.byteLength<s+(c||0))throw new RangeError('"length" is outside of buffer bounds');let p;return s===void 0&&c===void 0?p=new Uint8Array(f):c===void 0?p=new Uint8Array(f,s):p=new Uint8Array(f,s,c),Object.setPrototypeOf(p,a.prototype),p}u(E,"fromArrayBuffer");function A(f){if(a.isBuffer(f)){let s=O(f.length)|0,c=o(s);return c.length===0||f.copy(c,0,0,s),c}if(f.length!==void 0)return typeof f.length!="number"||ot(f.length)?o(0):v(f);if(f.type==="Buffer"&&Array.isArray(f.data))return v(f.data)}u(A,"fromObject");function O(f){if(f>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return f|0}u(O,"checked");function U(f){return+f!=f&&(f=0),a.alloc(+f)}u(U,"SlowBuffer"),a.isBuffer=u(function(s){return s!=null&&s._isBuffer===!0&&s!==a.prototype},"isBuffer"),a.compare=u(function(s,c){if(He(s,Uint8Array)&&(s=a.from(s,s.offset,s.byteLength)),He(c,Uint8Array)&&(c=a.from(c,c.offset,c.byteLength)),!a.isBuffer(s)||!a.isBuffer(c))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(s===c)return 0;let p=s.length,_=c.length;for(let d=0,x=Math.min(p,_);d<x;++d)if(s[d]!==c[d]){p=s[d],_=c[d];break}return p<_?-1:_<p?1:0},"compare"),a.isEncoding=u(function(s){switch(String(s).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},"isEncoding"),a.concat=u(function(s,c){if(!Array.isArray(s))throw new TypeError('"list" argument must be an Array of Buffers');if(s.length===0)return a.alloc(0);let p;if(c===void 0)for(c=0,p=0;p<s.length;++p)c+=s[p].length;let _=a.allocUnsafe(c),d=0;for(p=0;p<s.length;++p){let x=s[p];if(He(x,Uint8Array))d+x.length>_.length?(a.isBuffer(x)||(x=a.from(x)),x.copy(_,d)):Uint8Array.prototype.set.call(_,x,d);else if(a.isBuffer(x))x.copy(_,d);else throw new TypeError('"list" argument must be an Array of Buffers');d+=x.length}return _},"concat");function j(f,s){if(a.isBuffer(f))return f.length;if(ArrayBuffer.isView(f)||He(f,ArrayBuffer))return f.byteLength;if(typeof f!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof f);let c=f.length,p=arguments.length>2&&arguments[2]===!0;if(!p&&c===0)return 0;let _=!1;for(;;)switch(s){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return Pe(f).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return et(f).length;default:if(_)return p?-1:Pe(f).length;s=(""+s).toLowerCase(),_=!0}}u(j,"byteLength"),a.byteLength=j;function W(f,s,c){let p=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,s>>>=0,c<=s))return"";for(f||(f="utf8");;)switch(f){case"hex":return D(this,s,c);case"utf8":case"utf-8":return $(this,s,c);case"ascii":return pe(this,s,c);case"latin1":case"binary":return P(this,s,c);case"base64":return B(this,s,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,s,c);default:if(p)throw new TypeError("Unknown encoding: "+f);f=(f+"").toLowerCase(),p=!0}}u(W,"slowToString"),a.prototype._isBuffer=!0;function se(f,s,c){let p=f[s];f[s]=f[c],f[c]=p}u(se,"swap"),a.prototype.swap16=u(function(){let s=this.length;if(s%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let c=0;c<s;c+=2)se(this,c,c+1);return this},"swap16"),a.prototype.swap32=u(function(){let s=this.length;if(s%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let c=0;c<s;c+=4)se(this,c,c+3),se(this,c+1,c+2);return this},"swap32"),a.prototype.swap64=u(function(){let s=this.length;if(s%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let c=0;c<s;c+=8)se(this,c,c+7),se(this,c+1,c+6),se(this,c+2,c+5),se(this,c+3,c+4);return this},"swap64"),a.prototype.toString=u(function(){let s=this.length;return s===0?"":arguments.length===0?$(this,0,s):W.apply(this,arguments)},"toString"),a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=u(function(s){if(!a.isBuffer(s))throw new TypeError("Argument must be a Buffer");return this===s?!0:a.compare(this,s)===0},"equals"),a.prototype.inspect=u(function(){let s="",c=Xr.INSPECT_MAX_BYTES;return s=this.toString("hex",0,c).replace(/(.{2})/g,"$1 ").trim(),this.length>c&&(s+=" ... "),"<Buffer "+s+">"},"inspect"),e&&(a.prototype[e]=a.prototype.inspect),a.prototype.compare=u(function(s,c,p,_,d){if(He(s,Uint8Array)&&(s=a.from(s,s.offset,s.byteLength)),!a.isBuffer(s))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof s);if(c===void 0&&(c=0),p===void 0&&(p=s?s.length:0),_===void 0&&(_=0),d===void 0&&(d=this.length),c<0||p>s.length||_<0||d>this.length)throw new RangeError("out of range index");if(_>=d&&c>=p)return 0;if(_>=d)return-1;if(c>=p)return 1;if(c>>>=0,p>>>=0,_>>>=0,d>>>=0,this===s)return 0;let x=d-_,Z=p-c,oe=Math.min(x,Z),k=this.slice(_,d),z=s.slice(c,p);for(let b=0;b<oe;++b)if(k[b]!==z[b]){x=k[b],Z=z[b];break}return x<Z?-1:Z<x?1:0},"compare");function Y(f,s,c,p,_){if(f.length===0)return-1;if(typeof c=="string"?(p=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,ot(c)&&(c=_?0:f.length-1),c<0&&(c=f.length+c),c>=f.length){if(_)return-1;c=f.length-1}else if(c<0)if(_)c=0;else return-1;if(typeof s=="string"&&(s=a.from(s,p)),a.isBuffer(s))return s.length===0?-1:he(f,s,c,p,_);if(typeof s=="number")return s=s&255,typeof Uint8Array.prototype.indexOf=="function"?_?Uint8Array.prototype.indexOf.call(f,s,c):Uint8Array.prototype.lastIndexOf.call(f,s,c):he(f,[s],c,p,_);throw new TypeError("val must be string, number or Buffer")}u(Y,"bidirectionalIndexOf");function he(f,s,c,p,_){let d=1,x=f.length,Z=s.length;if(p!==void 0&&(p=String(p).toLowerCase(),p==="ucs2"||p==="ucs-2"||p==="utf16le"||p==="utf-16le")){if(f.length<2||s.length<2)return-1;d=2,x/=2,Z/=2,c/=2}function oe(z,b){return d===1?z[b]:z.readUInt16BE(b*d)}u(oe,"read");let k;if(_){let z=-1;for(k=c;k<x;k++)if(oe(f,k)===oe(s,z===-1?0:k-z)){if(z===-1&&(z=k),k-z+1===Z)return z*d}else z!==-1&&(k-=k-z),z=-1}else for(c+Z>x&&(c=x-Z),k=c;k>=0;k--){let z=!0;for(let b=0;b<Z;b++)if(oe(f,k+b)!==oe(s,b)){z=!1;break}if(z)return k}return-1}u(he,"arrayIndexOf"),a.prototype.includes=u(function(s,c,p){return this.indexOf(s,c,p)!==-1},"includes"),a.prototype.indexOf=u(function(s,c,p){return Y(this,s,c,p,!0)},"indexOf"),a.prototype.lastIndexOf=u(function(s,c,p){return Y(this,s,c,p,!1)},"lastIndexOf");function q(f,s,c,p){c=Number(c)||0;let _=f.length-c;p?(p=Number(p),p>_&&(p=_)):p=_;let d=s.length;p>d/2&&(p=d/2);let x;for(x=0;x<p;++x){let Z=parseInt(s.substr(x*2,2),16);if(ot(Z))return x;f[c+x]=Z}return x}u(q,"hexWrite");function ee(f,s,c,p){return ct(Pe(s,f.length-c),f,c,p)}u(ee,"utf8Write");function J(f,s,c,p){return ct(Se(s),f,c,p)}u(J,"asciiWrite");function te(f,s,c,p){return ct(et(s),f,c,p)}u(te,"base64Write");function ye(f,s,c,p){return ct(ve(s,f.length-c),f,c,p)}u(ye,"ucs2Write"),a.prototype.write=u(function(s,c,p,_){if(c===void 0)_="utf8",p=this.length,c=0;else if(p===void 0&&typeof c=="string")_=c,p=this.length,c=0;else if(isFinite(c))c=c>>>0,isFinite(p)?(p=p>>>0,_===void 0&&(_="utf8")):(_=p,p=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let d=this.length-c;if((p===void 0||p>d)&&(p=d),s.length>0&&(p<0||c<0)||c>this.length)throw new RangeError("Attempt to write outside buffer bounds");_||(_="utf8");let x=!1;for(;;)switch(_){case"hex":return q(this,s,c,p);case"utf8":case"utf-8":return ee(this,s,c,p);case"ascii":case"latin1":case"binary":return J(this,s,c,p);case"base64":return te(this,s,c,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ye(this,s,c,p);default:if(x)throw new TypeError("Unknown encoding: "+_);_=(""+_).toLowerCase(),x=!0}},"write"),a.prototype.toJSON=u(function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},"toJSON");function B(f,s,c){return s===0&&c===f.length?r.fromByteArray(f):r.fromByteArray(f.slice(s,c))}u(B,"base64Slice");function $(f,s,c){c=Math.min(f.length,c);let p=[],_=s;for(;_<c;){let d=f[_],x=null,Z=d>239?4:d>223?3:d>191?2:1;if(_+Z<=c){let oe,k,z,b;switch(Z){case 1:d<128&&(x=d);break;case 2:oe=f[_+1],(oe&192)===128&&(b=(d&31)<<6|oe&63,b>127&&(x=b));break;case 3:oe=f[_+1],k=f[_+2],(oe&192)===128&&(k&192)===128&&(b=(d&15)<<12|(oe&63)<<6|k&63,b>2047&&(b<55296||b>57343)&&(x=b));break;case 4:oe=f[_+1],k=f[_+2],z=f[_+3],(oe&192)===128&&(k&192)===128&&(z&192)===128&&(b=(d&15)<<18|(oe&63)<<12|(k&63)<<6|z&63,b>65535&&b<1114112&&(x=b))}}x===null?(x=65533,Z=1):x>65535&&(x-=65536,p.push(x>>>10&1023|55296),x=56320|x&1023),p.push(x),_+=Z}return _e(p)}u($,"utf8Slice");let ne=4096;function _e(f){let s=f.length;if(s<=ne)return String.fromCharCode.apply(String,f);let c="",p=0;for(;p<s;)c+=String.fromCharCode.apply(String,f.slice(p,p+=ne));return c}u(_e,"decodeCodePointsArray");function pe(f,s,c){let p="";c=Math.min(f.length,c);for(let _=s;_<c;++_)p+=String.fromCharCode(f[_]&127);return p}u(pe,"asciiSlice");function P(f,s,c){let p="";c=Math.min(f.length,c);for(let _=s;_<c;++_)p+=String.fromCharCode(f[_]);return p}u(P,"latin1Slice");function D(f,s,c){let p=f.length;(!s||s<0)&&(s=0),(!c||c<0||c>p)&&(c=p);let _="";for(let d=s;d<c;++d)_+=Ut[f[d]];return _}u(D,"hexSlice");function K(f,s,c){let p=f.slice(s,c),_="";for(let d=0;d<p.length-1;d+=2)_+=String.fromCharCode(p[d]+p[d+1]*256);return _}u(K,"utf16leSlice"),a.prototype.slice=u(function(s,c){let p=this.length;s=~~s,c=c===void 0?p:~~c,s<0?(s+=p,s<0&&(s=0)):s>p&&(s=p),c<0?(c+=p,c<0&&(c=0)):c>p&&(c=p),c<s&&(c=s);let _=this.subarray(s,c);return Object.setPrototypeOf(_,a.prototype),_},"slice");function V(f,s,c){if(f%1!==0||f<0)throw new RangeError("offset is not uint");if(f+s>c)throw new RangeError("Trying to access beyond buffer length")}u(V,"checkOffset"),a.prototype.readUintLE=a.prototype.readUIntLE=u(function(s,c,p){s=s>>>0,c=c>>>0,p||V(s,c,this.length);let _=this[s],d=1,x=0;for(;++x<c&&(d*=256);)_+=this[s+x]*d;return _},"readUIntLE"),a.prototype.readUintBE=a.prototype.readUIntBE=u(function(s,c,p){s=s>>>0,c=c>>>0,p||V(s,c,this.length);let _=this[s+--c],d=1;for(;c>0&&(d*=256);)_+=this[s+--c]*d;return _},"readUIntBE"),a.prototype.readUint8=a.prototype.readUInt8=u(function(s,c){return s=s>>>0,c||V(s,1,this.length),this[s]},"readUInt8"),a.prototype.readUint16LE=a.prototype.readUInt16LE=u(function(s,c){return s=s>>>0,c||V(s,2,this.length),this[s]|this[s+1]<<8},"readUInt16LE"),a.prototype.readUint16BE=a.prototype.readUInt16BE=u(function(s,c){return s=s>>>0,c||V(s,2,this.length),this[s]<<8|this[s+1]},"readUInt16BE"),a.prototype.readUint32LE=a.prototype.readUInt32LE=u(function(s,c){return s=s>>>0,c||V(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+this[s+3]*16777216},"readUInt32LE"),a.prototype.readUint32BE=a.prototype.readUInt32BE=u(function(s,c){return s=s>>>0,c||V(s,4,this.length),this[s]*16777216+(this[s+1]<<16|this[s+2]<<8|this[s+3])},"readUInt32BE"),a.prototype.readBigUInt64LE=Ke(u(function(s){s=s>>>0,I(s,"offset");let c=this[s],p=this[s+7];(c===void 0||p===void 0)&&R(s,this.length-8);let _=c+this[++s]*Re(2,8)+this[++s]*Re(2,16)+this[++s]*Re(2,24),d=this[++s]+this[++s]*Re(2,8)+this[++s]*Re(2,16)+p*Re(2,24);return BigInt(_)+(BigInt(d)<<BigInt(32))},"readBigUInt64LE")),a.prototype.readBigUInt64BE=Ke(u(function(s){s=s>>>0,I(s,"offset");let c=this[s],p=this[s+7];(c===void 0||p===void 0)&&R(s,this.length-8);let _=c*Re(2,24)+this[++s]*Re(2,16)+this[++s]*Re(2,8)+this[++s],d=this[++s]*Re(2,24)+this[++s]*Re(2,16)+this[++s]*Re(2,8)+p;return(BigInt(_)<<BigInt(32))+BigInt(d)},"readBigUInt64BE")),a.prototype.readIntLE=u(function(s,c,p){s=s>>>0,c=c>>>0,p||V(s,c,this.length);let _=this[s],d=1,x=0;for(;++x<c&&(d*=256);)_+=this[s+x]*d;return d*=128,_>=d&&(_-=Math.pow(2,8*c)),_},"readIntLE"),a.prototype.readIntBE=u(function(s,c,p){s=s>>>0,c=c>>>0,p||V(s,c,this.length);let _=c,d=1,x=this[s+--_];for(;_>0&&(d*=256);)x+=this[s+--_]*d;return d*=128,x>=d&&(x-=Math.pow(2,8*c)),x},"readIntBE"),a.prototype.readInt8=u(function(s,c){return s=s>>>0,c||V(s,1,this.length),this[s]&128?(255-this[s]+1)*-1:this[s]},"readInt8"),a.prototype.readInt16LE=u(function(s,c){s=s>>>0,c||V(s,2,this.length);let p=this[s]|this[s+1]<<8;return p&32768?p|4294901760:p},"readInt16LE"),a.prototype.readInt16BE=u(function(s,c){s=s>>>0,c||V(s,2,this.length);let p=this[s+1]|this[s]<<8;return p&32768?p|4294901760:p},"readInt16BE"),a.prototype.readInt32LE=u(function(s,c){return s=s>>>0,c||V(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},"readInt32LE"),a.prototype.readInt32BE=u(function(s,c){return s=s>>>0,c||V(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},"readInt32BE"),a.prototype.readBigInt64LE=Ke(u(function(s){s=s>>>0,I(s,"offset");let c=this[s],p=this[s+7];(c===void 0||p===void 0)&&R(s,this.length-8);let _=this[s+4]+this[s+5]*Re(2,8)+this[s+6]*Re(2,16)+(p<<24);return(BigInt(_)<<BigInt(32))+BigInt(c+this[++s]*Re(2,8)+this[++s]*Re(2,16)+this[++s]*Re(2,24))},"readBigInt64LE")),a.prototype.readBigInt64BE=Ke(u(function(s){s=s>>>0,I(s,"offset");let c=this[s],p=this[s+7];(c===void 0||p===void 0)&&R(s,this.length-8);let _=(c<<24)+this[++s]*Re(2,16)+this[++s]*Re(2,8)+this[++s];return(BigInt(_)<<BigInt(32))+BigInt(this[++s]*Re(2,24)+this[++s]*Re(2,16)+this[++s]*Re(2,8)+p)},"readBigInt64BE")),a.prototype.readFloatLE=u(function(s,c){return s=s>>>0,c||V(s,4,this.length),t.read(this,s,!0,23,4)},"readFloatLE"),a.prototype.readFloatBE=u(function(s,c){return s=s>>>0,c||V(s,4,this.length),t.read(this,s,!1,23,4)},"readFloatBE"),a.prototype.readDoubleLE=u(function(s,c){return s=s>>>0,c||V(s,8,this.length),t.read(this,s,!0,52,8)},"readDoubleLE"),a.prototype.readDoubleBE=u(function(s,c){return s=s>>>0,c||V(s,8,this.length),t.read(this,s,!1,52,8)},"readDoubleBE");function ie(f,s,c,p,_,d){if(!a.isBuffer(f))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>_||s<d)throw new RangeError('"value" argument is out of bounds');if(c+p>f.length)throw new RangeError("Index out of range")}u(ie,"checkInt"),a.prototype.writeUintLE=a.prototype.writeUIntLE=u(function(s,c,p,_){if(s=+s,c=c>>>0,p=p>>>0,!_){let Z=Math.pow(2,8*p)-1;ie(this,s,c,p,Z,0)}let d=1,x=0;for(this[c]=s&255;++x<p&&(d*=256);)this[c+x]=s/d&255;return c+p},"writeUIntLE"),a.prototype.writeUintBE=a.prototype.writeUIntBE=u(function(s,c,p,_){if(s=+s,c=c>>>0,p=p>>>0,!_){let Z=Math.pow(2,8*p)-1;ie(this,s,c,p,Z,0)}let d=p-1,x=1;for(this[c+d]=s&255;--d>=0&&(x*=256);)this[c+d]=s/x&255;return c+p},"writeUIntBE"),a.prototype.writeUint8=a.prototype.writeUInt8=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,1,255,0),this[c]=s&255,c+1},"writeUInt8"),a.prototype.writeUint16LE=a.prototype.writeUInt16LE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,2,65535,0),this[c]=s&255,this[c+1]=s>>>8,c+2},"writeUInt16LE"),a.prototype.writeUint16BE=a.prototype.writeUInt16BE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,2,65535,0),this[c]=s>>>8,this[c+1]=s&255,c+2},"writeUInt16BE"),a.prototype.writeUint32LE=a.prototype.writeUInt32LE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,4,4294967295,0),this[c+3]=s>>>24,this[c+2]=s>>>16,this[c+1]=s>>>8,this[c]=s&255,c+4},"writeUInt32LE"),a.prototype.writeUint32BE=a.prototype.writeUInt32BE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,4,4294967295,0),this[c]=s>>>24,this[c+1]=s>>>16,this[c+2]=s>>>8,this[c+3]=s&255,c+4},"writeUInt32BE");function me(f,s,c,p,_){xe(s,p,_,f,c,7);let d=Number(s&BigInt(4294967295));f[c++]=d,d=d>>8,f[c++]=d,d=d>>8,f[c++]=d,d=d>>8,f[c++]=d;let x=Number(s>>BigInt(32)&BigInt(4294967295));return f[c++]=x,x=x>>8,f[c++]=x,x=x>>8,f[c++]=x,x=x>>8,f[c++]=x,c}u(me,"wrtBigUInt64LE");function Fe(f,s,c,p,_){xe(s,p,_,f,c,7);let d=Number(s&BigInt(4294967295));f[c+7]=d,d=d>>8,f[c+6]=d,d=d>>8,f[c+5]=d,d=d>>8,f[c+4]=d;let x=Number(s>>BigInt(32)&BigInt(4294967295));return f[c+3]=x,x=x>>8,f[c+2]=x,x=x>>8,f[c+1]=x,x=x>>8,f[c]=x,c+8}u(Fe,"wrtBigUInt64BE"),a.prototype.writeBigUInt64LE=Ke(u(function(s,c=0){return me(this,s,c,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64LE")),a.prototype.writeBigUInt64BE=Ke(u(function(s,c=0){return Fe(this,s,c,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64BE")),a.prototype.writeIntLE=u(function(s,c,p,_){if(s=+s,c=c>>>0,!_){let oe=Math.pow(2,8*p-1);ie(this,s,c,p,oe-1,-oe)}let d=0,x=1,Z=0;for(this[c]=s&255;++d<p&&(x*=256);)s<0&&Z===0&&this[c+d-1]!==0&&(Z=1),this[c+d]=(s/x>>0)-Z&255;return c+p},"writeIntLE"),a.prototype.writeIntBE=u(function(s,c,p,_){if(s=+s,c=c>>>0,!_){let oe=Math.pow(2,8*p-1);ie(this,s,c,p,oe-1,-oe)}let d=p-1,x=1,Z=0;for(this[c+d]=s&255;--d>=0&&(x*=256);)s<0&&Z===0&&this[c+d+1]!==0&&(Z=1),this[c+d]=(s/x>>0)-Z&255;return c+p},"writeIntBE"),a.prototype.writeInt8=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,1,127,-128),s<0&&(s=255+s+1),this[c]=s&255,c+1},"writeInt8"),a.prototype.writeInt16LE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,2,32767,-32768),this[c]=s&255,this[c+1]=s>>>8,c+2},"writeInt16LE"),a.prototype.writeInt16BE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,2,32767,-32768),this[c]=s>>>8,this[c+1]=s&255,c+2},"writeInt16BE"),a.prototype.writeInt32LE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,4,2147483647,-2147483648),this[c]=s&255,this[c+1]=s>>>8,this[c+2]=s>>>16,this[c+3]=s>>>24,c+4},"writeInt32LE"),a.prototype.writeInt32BE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),this[c]=s>>>24,this[c+1]=s>>>16,this[c+2]=s>>>8,this[c+3]=s&255,c+4},"writeInt32BE"),a.prototype.writeBigInt64LE=Ke(u(function(s,c=0){return me(this,s,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64LE")),a.prototype.writeBigInt64BE=Ke(u(function(s,c=0){return Fe(this,s,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64BE"));function Ne(f,s,c,p,_,d){if(c+p>f.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}u(Ne,"checkIEEE754");function Ae(f,s,c,p,_){return s=+s,c=c>>>0,_||Ne(f,s,c,4),t.write(f,s,c,p,23,4),c+4}u(Ae,"writeFloat"),a.prototype.writeFloatLE=u(function(s,c,p){return Ae(this,s,c,!0,p)},"writeFloatLE"),a.prototype.writeFloatBE=u(function(s,c,p){return Ae(this,s,c,!1,p)},"writeFloatBE");function Le(f,s,c,p,_){return s=+s,c=c>>>0,_||Ne(f,s,c,8),t.write(f,s,c,p,52,8),c+8}u(Le,"writeDouble"),a.prototype.writeDoubleLE=u(function(s,c,p){return Le(this,s,c,!0,p)},"writeDoubleLE"),a.prototype.writeDoubleBE=u(function(s,c,p){return Le(this,s,c,!1,p)},"writeDoubleBE"),a.prototype.copy=u(function(s,c,p,_){if(!a.isBuffer(s))throw new TypeError("argument should be a Buffer");if(p||(p=0),!_&&_!==0&&(_=this.length),c>=s.length&&(c=s.length),c||(c=0),_>0&&_<p&&(_=p),_===p||s.length===0||this.length===0)return 0;if(c<0)throw new RangeError("targetStart out of bounds");if(p<0||p>=this.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("sourceEnd out of bounds");_>this.length&&(_=this.length),s.length-c<_-p&&(_=s.length-c+p);let d=_-p;return this===s&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(c,p,_):Uint8Array.prototype.set.call(s,this.subarray(p,_),c),d},"copy"),a.prototype.fill=u(function(s,c,p,_){if(typeof s=="string"){if(typeof c=="string"?(_=c,c=0,p=this.length):typeof p=="string"&&(_=p,p=this.length),_!==void 0&&typeof _!="string")throw new TypeError("encoding must be a string");if(typeof _=="string"&&!a.isEncoding(_))throw new TypeError("Unknown encoding: "+_);if(s.length===1){let x=s.charCodeAt(0);(_==="utf8"&&x<128||_==="latin1")&&(s=x)}}else typeof s=="number"?s=s&255:typeof s=="boolean"&&(s=Number(s));if(c<0||this.length<c||this.length<p)throw new RangeError("Out of range index");if(p<=c)return this;c=c>>>0,p=p===void 0?this.length:p>>>0,s||(s=0);let d;if(typeof s=="number")for(d=c;d<p;++d)this[d]=s;else{let x=a.isBuffer(s)?s:a.from(s,_),Z=x.length;if(Z===0)throw new TypeError('The value "'+s+'" is invalid for argument "value"');for(d=0;d<p-c;++d)this[d+c]=x[d%Z]}return this},"fill");let M={};function L(f,s,c){M[f]=u(class extends c{constructor(){super(),Object.defineProperty(this,"message",{value:s.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${f}]`,this.stack,delete this.name}get code(){return f}set code(_){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:_,writable:!0})}toString(){return`${this.name} [${f}]: ${this.message}`}},"NodeError")}u(L,"E"),L("ERR_BUFFER_OUT_OF_BOUNDS",function(f){return f?`${f} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),L("ERR_INVALID_ARG_TYPE",function(f,s){return`The "${f}" argument must be of type number. Received type ${typeof s}`},TypeError),L("ERR_OUT_OF_RANGE",function(f,s,c){let p=`The value of "${f}" is out of range.`,_=c;return Number.isInteger(c)&&Math.abs(c)>Re(2,32)?_=re(String(c)):typeof c=="bigint"&&(_=String(c),(c>Re(BigInt(2),BigInt(32))||c<-Re(BigInt(2),BigInt(32)))&&(_=re(_)),_+="n"),p+=` It must be ${s}. Received ${_}`,p},RangeError);function re(f){let s="",c=f.length,p=f[0]==="-"?1:0;for(;c>=p+4;c-=3)s=`_${f.slice(c-3,c)}${s}`;return`${f.slice(0,c)}${s}`}u(re,"addNumericalSeparator");function be(f,s,c){I(s,"offset"),(f[s]===void 0||f[s+c]===void 0)&&R(s,f.length-(c+1))}u(be,"checkBounds");function xe(f,s,c,p,_,d){if(f>c||f<s){let x=typeof s=="bigint"?"n":"",Z;throw d>3?s===0||s===BigInt(0)?Z=`>= 0${x} and < 2${x} ** ${(d+1)*8}${x}`:Z=`>= -(2${x} ** ${(d+1)*8-1}${x}) and < 2 ** ${(d+1)*8-1}${x}`:Z=`>= ${s}${x} and <= ${c}${x}`,new M.ERR_OUT_OF_RANGE("value",Z,f)}be(p,_,d)}u(xe,"checkIntBI");function I(f,s){if(typeof f!="number")throw new M.ERR_INVALID_ARG_TYPE(s,"number",f)}u(I,"validateNumber");function R(f,s,c){throw Math.floor(f)!==f?(I(f,c),new M.ERR_OUT_OF_RANGE(c||"offset","an integer",f)):s<0?new M.ERR_BUFFER_OUT_OF_BOUNDS:new M.ERR_OUT_OF_RANGE(c||"offset",`>= ${c?1:0} and <= ${s}`,f)}u(R,"boundsError");let ae=/[^+/0-9A-Za-z-_]/g;function ge(f){if(f=f.split("=")[0],f=f.trim().replace(ae,""),f.length<2)return"";for(;f.length%4!==0;)f=f+"=";return f}u(ge,"base64clean");function Pe(f,s){s=s||1/0;let c,p=f.length,_=null,d=[];for(let x=0;x<p;++x){if(c=f.charCodeAt(x),c>55295&&c<57344){if(!_){if(c>56319){(s-=3)>-1&&d.push(239,191,189);continue}else if(x+1===p){(s-=3)>-1&&d.push(239,191,189);continue}_=c;continue}if(c<56320){(s-=3)>-1&&d.push(239,191,189),_=c;continue}c=(_-55296<<10|c-56320)+65536}else _&&(s-=3)>-1&&d.push(239,191,189);if(_=null,c<128){if((s-=1)<0)break;d.push(c)}else if(c<2048){if((s-=2)<0)break;d.push(c>>6|192,c&63|128)}else if(c<65536){if((s-=3)<0)break;d.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((s-=4)<0)break;d.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return d}u(Pe,"utf8ToBytes");function Se(f){let s=[];for(let c=0;c<f.length;++c)s.push(f.charCodeAt(c)&255);return s}u(Se,"asciiToBytes");function ve(f,s){let c,p,_,d=[];for(let x=0;x<f.length&&!((s-=2)<0);++x)c=f.charCodeAt(x),p=c>>8,_=c%256,d.push(_),d.push(p);return d}u(ve,"utf16leToBytes");function et(f){return r.toByteArray(ge(f))}u(et,"base64ToBytes");function ct(f,s,c,p){let _;for(_=0;_<p&&!(_+c>=s.length||_>=f.length);++_)s[_+c]=f[_];return _}u(ct,"blitBuffer");function He(f,s){return f instanceof s||f!=null&&f.constructor!=null&&f.constructor.name!=null&&f.constructor.name===s.name}u(He,"isInstance");function ot(f){return f!==f}u(ot,"numberIsNaN");let Ut=function(){let f="0123456789abcdef",s=new Array(256);for(let c=0;c<16;++c){let p=c*16;for(let _=0;_<16;++_)s[p+_]=f[c]+f[_]}return s}();function Ke(f){return typeof BigInt=="undefined"?bt:f}u(Ke,"defineBigIntMethod");function bt(){throw new Error("BigInt not supported")}return u(bt,"BufferBigIntNotDefined"),Xr}u(gd,"dew");var Jr=gd();Jr.Buffer;Jr.SlowBuffer;Jr.INSPECT_MAX_BYTES;Jr.kMaxLength;var fe=Jr.Buffer,Qy=Jr.INSPECT_MAX_BYTES,eb=Jr.kMaxLength;var Yi={};Wi(Yi,{_toUnixTimestamp:()=>Hc,access:()=>$p,accessSync:()=>Em,appendFile:()=>bp,appendFileSync:()=>Qp,chmod:()=>Pp,chmodSync:()=>bm,chown:()=>Dp,chownSync:()=>gm,close:()=>_p,closeSync:()=>tm,constants:()=>Si,createReadStream:()=>qp,createWriteStream:()=>Vp,exists:()=>lp,existsSync:()=>Gc,fchmod:()=>Tp,fchmodSync:()=>um,fchown:()=>Ip,fchownSync:()=>sm,fdatasync:()=>Sp,fdatasyncSync:()=>nm,fstat:()=>wp,fstatSync:()=>em,fsync:()=>Ep,fsyncSync:()=>im,ftruncate:()=>vp,ftruncateSync:()=>rm,futimes:()=>Ap,futimesSync:()=>cm,getMount:()=>Fi,getMounts:()=>Vc,initialize:()=>Kc,lchmod:()=>Up,lchmodSync:()=>wm,lchown:()=>Lp,lchownSync:()=>ym,link:()=>kp,linkSync:()=>dm,lstat:()=>hp,lstatSync:()=>Yp,lutimes:()=>jp,lutimesSync:()=>vm,mkdir:()=>Op,mkdirSync:()=>fm,mount:()=>Gn,open:()=>mp,openSync:()=>Jp,promises:()=>Gi,read:()=>xp,readFile:()=>gp,readFileSync:()=>Xc,readSync:()=>am,readdir:()=>Bp,readdirSync:()=>hm,readlink:()=>Np,readlinkSync:()=>mm,realpath:()=>zp,realpathSync:()=>Xa,rename:()=>cp,renameSync:()=>Kp,rmdir:()=>Rp,rmdirSync:()=>lm,stat:()=>fp,statSync:()=>Gp,symlink:()=>Cp,symlinkSync:()=>pm,truncate:()=>dp,truncateSync:()=>Xp,umount:()=>Ea,unlink:()=>pp,unlinkSync:()=>Yc,unwatchFile:()=>Wp,utimes:()=>Mp,utimesSync:()=>_m,watch:()=>Hp,watchFile:()=>Zp,write:()=>Fp,writeFile:()=>yp,writeFileSync:()=>Jc,writeSync:()=>om});var tt=(A=>(A[A.EPERM=1]="EPERM",A[A.ENOENT=2]="ENOENT",A[A.EIO=5]="EIO",A[A.EBADF=9]="EBADF",A[A.EACCES=13]="EACCES",A[A.EBUSY=16]="EBUSY",A[A.EEXIST=17]="EEXIST",A[A.ENOTDIR=20]="ENOTDIR",A[A.EISDIR=21]="EISDIR",A[A.EINVAL=22]="EINVAL",A[A.EFBIG=27]="EFBIG",A[A.ENOSPC=28]="ENOSPC",A[A.EROFS=30]="EROFS",A[A.ENOTEMPTY=39]="ENOTEMPTY",A[A.ENOTSUP=95]="ENOTSUP",A))(tt||{}),mt={};mt[1]="Operation not permitted.";mt[2]="No such file or directory.";mt[5]="Input/output error.";mt[9]="Bad file descriptor.";mt[13]="Permission denied.";mt[16]="Resource busy or locked.";mt[17]="File exists.";mt[20]="File is not a directory.";mt[21]="File is a directory.";mt[22]="Invalid argument.";mt[27]="File is too big.";mt[28]="No space left on disk.";mt[30]="Cannot modify a read-only file system.";mt[39]="Directory is not empty.";mt[95]="Operation is not supported.";var T=class extends Error{constructor(e,i=mt[e],n){super(i);this.syscall="";this.errno=e,this.code=tt[e],this.path=n,this.message=`Error: ${this.code}: ${i}${this.path?`, '${this.path}'`:""}`}static fromJSON(e){let i=new T(e.errno,e.message,e.path);return i.code=e.code,i.stack=e.stack,i}static fromBuffer(e,i=0){return T.fromJSON(JSON.parse(e.toString("utf8",i+4,i+4+e.readUInt32LE(i))))}static FileError(e,i){return new T(e,mt[e],i)}static EACCES(e){return this.FileError(13,e)}static ENOENT(e){return this.FileError(2,e)}static EEXIST(e){return this.FileError(17,e)}static EISDIR(e){return this.FileError(21,e)}static ENOTDIR(e){return this.FileError(20,e)}static EPERM(e){return this.FileError(1,e)}static ENOTEMPTY(e){return this.FileError(39,e)}toString(){return this.message}toJSON(){return{errno:this.errno,code:this.code,path:this.path,stack:this.stack,message:this.message}}writeToBuffer(e=fe.alloc(this.bufferSize()),i=0){let n=e.write(JSON.stringify(this.toJSON()),i+4);return e.writeUInt32LE(n,i),e}bufferSize(){return 4+fe.byteLength(JSON.stringify(this.toJSON()))}};u(T,"ApiError");var ga={},Mc=!1,Ei=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:global;function yd(){if(Mc)return ga;Mc=!0;var r=ga={},t,e;function i(){throw new Error("setTimeout has not been defined")}u(i,"defaultSetTimout");function n(){throw new Error("clearTimeout has not been defined")}u(n,"defaultClearTimeout"),function(){try{typeof setTimeout=="function"?t=setTimeout:t=i}catch(A){t=i}try{typeof clearTimeout=="function"?e=clearTimeout:e=n}catch(A){e=n}}();function o(A){if(t===setTimeout)return setTimeout(A,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(A,0);try{return t(A,0)}catch(O){try{return t.call(null,A,0)}catch(U){return t.call(this||Ei,A,0)}}}u(o,"runTimeout");function a(A){if(e===clearTimeout)return clearTimeout(A);if((e===n||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(A);try{return e(A)}catch(O){try{return e.call(null,A)}catch(U){return e.call(this||Ei,A)}}}u(a,"runClearTimeout");var l=[],m=!1,y,g=-1;function w(){!m||!y||(m=!1,y.length?l=y.concat(l):g=-1,l.length&&v())}u(w,"cleanUpNextTick");function v(){if(!m){var A=o(w);m=!0;for(var O=l.length;O;){for(y=l,l=[];++g<O;)y&&y[g].run();g=-1,O=l.length}y=null,m=!1,a(A)}}u(v,"drainQueue"),r.nextTick=function(A){var O=new Array(arguments.length-1);if(arguments.length>1)for(var U=1;U<arguments.length;U++)O[U-1]=arguments[U];l.push(new S(A,O)),l.length===1&&!m&&o(v)};function S(A,O){(this||Ei).fun=A,(this||Ei).array=O}u(S,"Item"),S.prototype.run=function(){(this||Ei).fun.apply(null,(this||Ei).array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={};function E(){}return u(E,"noop"),r.on=E,r.addListener=E,r.once=E,r.off=E,r.removeListener=E,r.removeAllListeners=E,r.emit=E,r.prependListener=E,r.prependOnceListener=E,r.listeners=function(A){return[]},r.binding=function(A){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(A){throw new Error("process.chdir is not supported")},r.umask=function(){return 0},ga}u(yd,"dew");var Ve=yd();Ve.platform="browser";Ve.addListener;Ve.argv;Ve.binding;Ve.browser;Ve.chdir;Ve.cwd;Ve.emit;Ve.env;Ve.listeners;Ve.nextTick;Ve.off;Ve.on;Ve.once;Ve.prependListener;Ve.prependOnceListener;Ve.removeAllListeners;Ve.removeListener;Ve.title;Ve.umask;Ve.version;Ve.versions;var ya={},jc=!1;function bd(){if(jc)return ya;jc=!0;var r=Ve;function t(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}u(t,"assertPath");function e(o,a){for(var l="",m=0,y=-1,g=0,w,v=0;v<=o.length;++v){if(v<o.length)w=o.charCodeAt(v);else{if(w===47)break;w=47}if(w===47){if(!(y===v-1||g===1))if(y!==v-1&&g===2){if(l.length<2||m!==2||l.charCodeAt(l.length-1)!==46||l.charCodeAt(l.length-2)!==46){if(l.length>2){var S=l.lastIndexOf("/");if(S!==l.length-1){S===-1?(l="",m=0):(l=l.slice(0,S),m=l.length-1-l.lastIndexOf("/")),y=v,g=0;continue}}else if(l.length===2||l.length===1){l="",m=0,y=v,g=0;continue}}a&&(l.length>0?l+="/..":l="..",m=2)}else l.length>0?l+="/"+o.slice(y+1,v):l=o.slice(y+1,v),m=v-y-1;y=v,g=0}else w===46&&g!==-1?++g:g=-1}return l}u(e,"normalizeStringPosix");function i(o,a){var l=a.dir||a.root,m=a.base||(a.name||"")+(a.ext||"");return l?l===a.root?l+m:l+o+m:m}u(i,"_format");var n={resolve:u(function(){for(var a="",l=!1,m,y=arguments.length-1;y>=-1&&!l;y--){var g;y>=0?g=arguments[y]:(m===void 0&&(m=r.cwd()),g=m),t(g),g.length!==0&&(a=g+"/"+a,l=g.charCodeAt(0)===47)}return a=e(a,!l),l?a.length>0?"/"+a:"/":a.length>0?a:"."},"resolve"),normalize:u(function(a){if(t(a),a.length===0)return".";var l=a.charCodeAt(0)===47,m=a.charCodeAt(a.length-1)===47;return a=e(a,!l),a.length===0&&!l&&(a="."),a.length>0&&m&&(a+="/"),l?"/"+a:a},"normalize"),isAbsolute:u(function(a){return t(a),a.length>0&&a.charCodeAt(0)===47},"isAbsolute"),join:u(function(){if(arguments.length===0)return".";for(var a,l=0;l<arguments.length;++l){var m=arguments[l];t(m),m.length>0&&(a===void 0?a=m:a+="/"+m)}return a===void 0?".":n.normalize(a)},"join"),relative:u(function(a,l){if(t(a),t(l),a===l||(a=n.resolve(a),l=n.resolve(l),a===l))return"";for(var m=1;m<a.length&&a.charCodeAt(m)===47;++m);for(var y=a.length,g=y-m,w=1;w<l.length&&l.charCodeAt(w)===47;++w);for(var v=l.length,S=v-w,E=g<S?g:S,A=-1,O=0;O<=E;++O){if(O===E){if(S>E){if(l.charCodeAt(w+O)===47)return l.slice(w+O+1);if(O===0)return l.slice(w+O)}else g>E&&(a.charCodeAt(m+O)===47?A=O:O===0&&(A=0));break}var U=a.charCodeAt(m+O),j=l.charCodeAt(w+O);if(U!==j)break;U===47&&(A=O)}var W="";for(O=m+A+1;O<=y;++O)(O===y||a.charCodeAt(O)===47)&&(W.length===0?W+="..":W+="/..");return W.length>0?W+l.slice(w+A):(w+=A,l.charCodeAt(w)===47&&++w,l.slice(w))},"relative"),_makeLong:u(function(a){return a},"_makeLong"),dirname:u(function(a){if(t(a),a.length===0)return".";for(var l=a.charCodeAt(0),m=l===47,y=-1,g=!0,w=a.length-1;w>=1;--w)if(l=a.charCodeAt(w),l===47){if(!g){y=w;break}}else g=!1;return y===-1?m?"/":".":m&&y===1?"//":a.slice(0,y)},"dirname"),basename:u(function(a,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');t(a);var m=0,y=-1,g=!0,w;if(l!==void 0&&l.length>0&&l.length<=a.length){if(l.length===a.length&&l===a)return"";var v=l.length-1,S=-1;for(w=a.length-1;w>=0;--w){var E=a.charCodeAt(w);if(E===47){if(!g){m=w+1;break}}else S===-1&&(g=!1,S=w+1),v>=0&&(E===l.charCodeAt(v)?--v===-1&&(y=w):(v=-1,y=S))}return m===y?y=S:y===-1&&(y=a.length),a.slice(m,y)}else{for(w=a.length-1;w>=0;--w)if(a.charCodeAt(w)===47){if(!g){m=w+1;break}}else y===-1&&(g=!1,y=w+1);return y===-1?"":a.slice(m,y)}},"basename"),extname:u(function(a){t(a);for(var l=-1,m=0,y=-1,g=!0,w=0,v=a.length-1;v>=0;--v){var S=a.charCodeAt(v);if(S===47){if(!g){m=v+1;break}continue}y===-1&&(g=!1,y=v+1),S===46?l===-1?l=v:w!==1&&(w=1):l!==-1&&(w=-1)}return l===-1||y===-1||w===0||w===1&&l===y-1&&l===m+1?"":a.slice(l,y)},"extname"),format:u(function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return i("/",a)},"format"),parse:u(function(a){t(a);var l={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return l;var m=a.charCodeAt(0),y=m===47,g;y?(l.root="/",g=1):g=0;for(var w=-1,v=0,S=-1,E=!0,A=a.length-1,O=0;A>=g;--A){if(m=a.charCodeAt(A),m===47){if(!E){v=A+1;break}continue}S===-1&&(E=!1,S=A+1),m===46?w===-1?w=A:O!==1&&(O=1):w!==-1&&(O=-1)}return w===-1||S===-1||O===0||O===1&&w===S-1&&w===v+1?S!==-1&&(v===0&&y?l.base=l.name=a.slice(1,S):l.base=l.name=a.slice(v,S)):(v===0&&y?(l.name=a.slice(1,w),l.base=a.slice(1,S)):(l.name=a.slice(v,w),l.base=a.slice(v,S)),l.ext=a.slice(w,S)),v>0?l.dir=a.slice(0,v-1):y&&(l.dir="/"),l},"parse"),sep:"/",delimiter:":",win32:null,posix:null};return n.posix=n,ya=n,ya}u(bd,"dew");var Ft=bd();var Tb=Ft._makeLong,_t=Ft.basename,Ab=Ft.delimiter,Ze=Ft.dirname,Rb=Ft.extname,Ob=Ft.format,Bb=Ft.isAbsolute,Bt=Ft.join,kb=Ft.normalize,Cb=Ft.parse,Qr=Ft.posix,zc=Ft.relative,qt=Ft.resolve,ei=Ft.sep,Nb=Ft.win32;var ri=(n=>(n[n.NOP=0]="NOP",n[n.THROW_EXCEPTION=1]="THROW_EXCEPTION",n[n.TRUNCATE_FILE=2]="TRUNCATE_FILE",n[n.CREATE_FILE=3]="CREATE_FILE",n))(ri||{}),ti=class{static getFileFlag(t){return ti.flagCache.has(t)||ti.flagCache.set(t,new ti(t)),ti.flagCache.get(t)}constructor(t){if(this.flagStr=t,ti.validFlagStrs.indexOf(t)<0)throw new T(22,"Invalid flag: "+t)}getFlagString(){return this.flagStr}getMode(){let t=0;return t<<=1,t+=+this.isReadable(),t<<=1,t+=+this.isWriteable(),t<<=1,t}isReadable(){return this.flagStr.indexOf("r")!==-1||this.flagStr.indexOf("+")!==-1}isWriteable(){return this.flagStr.indexOf("w")!==-1||this.flagStr.indexOf("a")!==-1||this.flagStr.indexOf("+")!==-1}isTruncating(){return this.flagStr.indexOf("w")!==-1}isAppendable(){return this.flagStr.indexOf("a")!==-1}isSynchronous(){return this.flagStr.indexOf("s")!==-1}isExclusive(){return this.flagStr.indexOf("x")!==-1}pathExistsAction(){return this.isExclusive()?1:this.isTruncating()?2:0}pathNotExistsAction(){return(this.isWriteable()||this.isAppendable())&&this.flagStr!=="r+"?3:1}},We=ti;u(We,"FileFlag"),We.flagCache=new Map,We.validFlagStrs=["r","r+","rs","rs+","w","wx","w+","wx+","a","ax","a+","ax+"];var $r=class{sync(){return C(this,null,function*(){throw new T(95)})}syncSync(){throw new T(95)}datasync(){return C(this,null,function*(){return this.sync()})}datasyncSync(){return this.syncSync()}chown(t,e){return C(this,null,function*(){throw new T(95)})}chownSync(t,e){throw new T(95)}chmod(t){return C(this,null,function*(){throw new T(95)})}chmodSync(t){throw new T(95)}utimes(t,e){return C(this,null,function*(){throw new T(95)})}utimesSync(t,e){throw new T(95)}};u($r,"BaseFile");var Zr=class{constructor(t){}};u(Zr,"FileSystem");var ba=class extends Zr{constructor(e){super();this._ready=Promise.resolve(this)}get metadata(){return{name:this.constructor.name,readonly:!1,synchronous:!1,supportsProperties:!1,supportsLinks:!1,totalSpace:0,freeSpace:0}}whenReady(){return this._ready}openFile(e,i,n){return C(this,null,function*(){throw new T(95)})}createFile(e,i,n,o){return C(this,null,function*(){throw new T(95)})}open(e,i,n,o){return C(this,null,function*(){try{let a=yield this.stat(e,o);switch(i.pathExistsAction()){case 1:throw T.EEXIST(e);case 2:let l=yield this.openFile(e,i,o);if(!l)throw new Error("BFS has reached an impossible code path; please file a bug.");return yield l.truncate(0),yield l.sync(),l;case 0:return this.openFile(e,i,o);default:throw new T(22,"Invalid FileFlag object.")}}catch(a){switch(i.pathNotExistsAction()){case 3:let l=yield this.stat(Ze(e),o);if(l&&!l.isDirectory())throw T.ENOTDIR(Ze(e));return this.createFile(e,i,n,o);case 1:throw T.ENOENT(e);default:throw new T(22,"Invalid FileFlag object.")}}})}access(e,i,n){return C(this,null,function*(){throw new T(95)})}accessSync(e,i,n){throw new T(95)}rename(e,i,n){return C(this,null,function*(){throw new T(95)})}renameSync(e,i,n){throw new T(95)}stat(e,i){return C(this,null,function*(){throw new T(95)})}statSync(e,i){throw new T(95)}openFileSync(e,i,n){throw new T(95)}createFileSync(e,i,n,o){throw new T(95)}openSync(e,i,n,o){let a;try{a=this.statSync(e,o)}catch(l){switch(i.pathNotExistsAction()){case 3:if(!this.statSync(Ze(e),o).isDirectory())throw T.ENOTDIR(Ze(e));return this.createFileSync(e,i,n,o);case 1:throw T.ENOENT(e);default:throw new T(22,"Invalid FileFlag object.")}}if(!a.hasAccess(n,o))throw T.EACCES(e);switch(i.pathExistsAction()){case 1:throw T.EEXIST(e);case 2:return this.unlinkSync(e,o),this.createFileSync(e,i,a.mode,o);case 0:return this.openFileSync(e,i,o);default:throw new T(22,"Invalid FileFlag object.")}}unlink(e,i){return C(this,null,function*(){throw new T(95)})}unlinkSync(e,i){throw new T(95)}rmdir(e,i){return C(this,null,function*(){throw new T(95)})}rmdirSync(e,i){throw new T(95)}mkdir(e,i,n){return C(this,null,function*(){throw new T(95)})}mkdirSync(e,i,n){throw new T(95)}readdir(e,i){return C(this,null,function*(){throw new T(95)})}readdirSync(e,i){throw new T(95)}exists(e,i){return C(this,null,function*(){try{return yield this.stat(e,i),!0}catch(n){return!1}})}existsSync(e,i){try{return this.statSync(e,i),!0}catch(n){return!1}}realpath(e,i){return C(this,null,function*(){if(this.metadata.supportsLinks){let n=e.split(ei);for(let o=0;o<n.length;o++){let a=n.slice(0,o+1);n[o]=Bt(...a)}return n.join(ei)}else{if(!(yield this.exists(e,i)))throw T.ENOENT(e);return e}})}realpathSync(e,i){if(this.metadata.supportsLinks){let n=e.split(ei);for(let o=0;o<n.length;o++){let a=n.slice(0,o+1);n[o]=Bt(...a)}return n.join(ei)}else{if(this.existsSync(e,i))return e;throw T.ENOENT(e)}}truncate(e,i,n){return C(this,null,function*(){let o=yield this.open(e,We.getFileFlag("r+"),420,n);try{yield o.truncate(i)}finally{yield o.close()}})}truncateSync(e,i,n){let o=this.openSync(e,We.getFileFlag("r+"),420,n);try{o.truncateSync(i)}finally{o.closeSync()}}readFile(e,i,n,o){return C(this,null,function*(){let a=yield this.open(e,n,420,o);try{let l=yield a.stat(),m=fe.alloc(l.size);return yield a.read(m,0,l.size,0),yield a.close(),i===null?m:m.toString(i)}finally{yield a.close()}})}readFileSync(e,i,n,o){let a=this.openSync(e,n,420,o);try{let l=a.statSync(),m=fe.alloc(l.size);return a.readSync(m,0,l.size,0),a.closeSync(),i===null?m:m.toString(i)}finally{a.closeSync()}}writeFile(e,i,n,o,a,l){return C(this,null,function*(){let m=yield this.open(e,o,a,l);try{typeof i=="string"&&(i=fe.from(i,n)),yield m.write(i,0,i.length,0)}finally{yield m.close()}})}writeFileSync(e,i,n,o,a,l){let m=this.openSync(e,o,a,l);try{typeof i=="string"&&(i=fe.from(i,n)),m.writeSync(i,0,i.length,0)}finally{m.closeSync()}}appendFile(e,i,n,o,a,l){return C(this,null,function*(){let m=yield this.open(e,o,a,l);try{typeof i=="string"&&(i=fe.from(i,n)),yield m.write(i,0,i.length,null)}finally{yield m.close()}})}appendFileSync(e,i,n,o,a,l){let m=this.openSync(e,o,a,l);try{typeof i=="string"&&(i=fe.from(i,n)),m.writeSync(i,0,i.length,null)}finally{m.closeSync()}}chmod(e,i,n){return C(this,null,function*(){throw new T(95)})}chmodSync(e,i,n){throw new T(95)}chown(e,i,n,o){return C(this,null,function*(){throw new T(95)})}chownSync(e,i,n,o){throw new T(95)}utimes(e,i,n,o){return C(this,null,function*(){throw new T(95)})}utimesSync(e,i,n,o){throw new T(95)}link(e,i,n){return C(this,null,function*(){throw new T(95)})}linkSync(e,i,n){throw new T(95)}symlink(e,i,n,o){return C(this,null,function*(){throw new T(95)})}symlinkSync(e,i,n,o){throw new T(95)}readlink(e,i){return C(this,null,function*(){throw new T(95)})}readlinkSync(e,i){throw new T(95)}},gt=ba;u(gt,"BaseFileSystem"),gt.Name=ba.name;var kt=class extends gt{get metadata(){return rt(Xe({},super.metadata),{synchronous:!0})}access(t,e,i){return C(this,null,function*(){return this.accessSync(t,e,i)})}rename(t,e,i){return C(this,null,function*(){return this.renameSync(t,e,i)})}stat(t,e){return C(this,null,function*(){return this.statSync(t,e)})}open(t,e,i,n){return C(this,null,function*(){return this.openSync(t,e,i,n)})}unlink(t,e){return C(this,null,function*(){return this.unlinkSync(t,e)})}rmdir(t,e){return C(this,null,function*(){return this.rmdirSync(t,e)})}mkdir(t,e,i){return C(this,null,function*(){return this.mkdirSync(t,e,i)})}readdir(t,e){return C(this,null,function*(){return this.readdirSync(t,e)})}chmod(t,e,i){return C(this,null,function*(){return this.chmodSync(t,e,i)})}chown(t,e,i,n){return C(this,null,function*(){return this.chownSync(t,e,i,n)})}utimes(t,e,i,n){return C(this,null,function*(){return this.utimesSync(t,e,i,n)})}link(t,e,i){return C(this,null,function*(){return this.linkSync(t,e,i)})}symlink(t,e,i,n){return C(this,null,function*(){return this.symlinkSync(t,e,i,n)})}readlink(t,e){return C(this,null,function*(){return this.readlinkSync(t,e)})}};u(kt,"SynchronousFileSystem");var wa=class{constructor(t,e,i,n,o,a){this.uid=t;this.gid=e;this.suid=i;this.sgid=n;this.euid=o;this.egid=a}},Ye=wa;u(Ye,"Cred"),Ye.Root=new wa(0,0,0,0,0,0);var Si={};Wi(Si,{COPYFILE_EXCL:()=>vd,COPYFILE_FICLONE:()=>Ed,COPYFILE_FICLONE_FORCE:()=>Sd,F_OK:()=>wd,O_APPEND:()=>Bd,O_CREAT:()=>Td,O_DIRECT:()=>Ud,O_DIRECTORY:()=>kd,O_DSYNC:()=>Ld,O_EXCL:()=>Ad,O_NOATIME:()=>Cd,O_NOCTTY:()=>Rd,O_NOFOLLOW:()=>Nd,O_NONBLOCK:()=>Md,O_RDONLY:()=>Fd,O_RDWR:()=>Id,O_SYMLINK:()=>Pd,O_SYNC:()=>Dd,O_TRUNC:()=>Od,O_WRONLY:()=>xd,R_OK:()=>sr,S_IFBLK:()=>zd,S_IFCHR:()=>jd,S_IFDIR:()=>zn,S_IFIFO:()=>$d,S_IFLNK:()=>$n,S_IFMT:()=>Vt,S_IFREG:()=>jn,S_IFSOCK:()=>Zd,S_IRGRP:()=>Gd,S_IROTH:()=>Qd,S_IRUSR:()=>Hd,S_IRWXG:()=>Kd,S_IRWXO:()=>Jd,S_IRWXU:()=>Wd,S_IWGRP:()=>Yd,S_IWOTH:()=>ep,S_IWUSR:()=>qd,S_IXGRP:()=>Xd,S_IXOTH:()=>tp,S_IXUSR:()=>Vd,W_OK:()=>ii,X_OK:()=>_d});var wd=0,sr=4,ii=2,_d=1,vd=1,Ed=2,Sd=4,Fd=0,xd=1,Id=2,Td=64,Ad=128,Rd=256,Od=512,Bd=1024,kd=65536,Cd=262144,Nd=131072,Dd=1052672,Ld=4096,Pd=32768,Ud=16384,Md=2048,Vt=61440,jn=32768,zn=16384,jd=8192,zd=24576,$d=4096,$n=40960,Zd=49152,Wd=448,Hd=256,qd=128,Vd=64,Kd=56,Gd=32,Yd=16,Xd=8,Jd=7,Qd=4,ep=2,tp=1;var je=(i=>(i[i.FILE=32768]="FILE",i[i.DIRECTORY=16384]="DIRECTORY",i[i.SYMLINK=40960]="SYMLINK",i))(je||{}),Me=class{constructor(t,e,i,n,o,a,l,m,y){this.dev=0;this.ino=0;this.rdev=0;this.nlink=1;this.blksize=4096;this.uid=0;this.gid=0;this.fileData=null;this.size=e;let g=0;if(typeof n!="number"&&(g=Date.now(),n=g),typeof o!="number"&&(g||(g=Date.now()),o=g),typeof a!="number"&&(g||(g=Date.now()),a=g),typeof y!="number"&&(g||(g=Date.now()),y=g),typeof l!="number"&&(l=0),typeof m!="number"&&(m=0),this.atimeMs=n,this.ctimeMs=a,this.mtimeMs=o,this.birthtimeMs=y,i)this.mode=i;else switch(t){case je.FILE:this.mode=420;break;case je.DIRECTORY:default:this.mode=511}this.blocks=Math.ceil(e/512),this.mode&61440||(this.mode|=t)}static fromBuffer(t){let e=t.readUInt32LE(0),i=t.readUInt32LE(4),n=t.readDoubleLE(8),o=t.readDoubleLE(16),a=t.readDoubleLE(24),l=t.readUInt32LE(32),m=t.readUInt32LE(36);return new Me(i&61440,e,i&-61441,n,o,a,l,m)}static clone(t){return new Me(t.mode&61440,t.size,t.mode&-61441,t.atimeMs,t.mtimeMs,t.ctimeMs,t.uid,t.gid,t.birthtimeMs)}get atime(){return new Date(this.atimeMs)}get mtime(){return new Date(this.mtimeMs)}get ctime(){return new Date(this.ctimeMs)}get birthtime(){return new Date(this.birthtimeMs)}toBuffer(){let t=fe.alloc(32);return t.writeUInt32LE(this.size,0),t.writeUInt32LE(this.mode,4),t.writeDoubleLE(this.atime.getTime(),8),t.writeDoubleLE(this.mtime.getTime(),16),t.writeDoubleLE(this.ctime.getTime(),24),t.writeUInt32LE(this.uid,32),t.writeUInt32LE(this.gid,36),t}isFile(){return(this.mode&61440)===32768}isDirectory(){return(this.mode&61440)===16384}isSymbolicLink(){return(this.mode&61440)===40960}hasAccess(t,e){if(e.euid===0||e.egid===0)return!0;let i=this.mode&-61441,n=15,o=15,a=15;if(e.euid==this.uid){let y=(3840&i)>>8;n=(t^y)&t}if(e.egid==this.gid){let y=(240&i)>>4;o=(t^y)&t}let l=15&i;return a=(t^l)&t,!(n&o&a)}getCred(t=this.uid,e=this.gid){return new Ye(t,e,this.uid,this.gid,t,e)}chmod(t){this.mode=this.mode&61440|t}chown(t,e){!isNaN(+t)&&0<=+t&&+t<Re(2,32)&&(this.uid=t),!isNaN(+e)&&0<=+e&&+e<Re(2,32)&&(this.gid=e)}isSocket(){return!1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isFIFO(){return!1}};u(Me,"Stats");var Mt=class{constructor(t,e,i,n,o,a,l,m){this.id=t;this.size=e;this.mode=i;this.atime=n;this.mtime=o;this.ctime=a;this.uid=l;this.gid=m}static fromBuffer(t){if(t===void 0)throw new Error("NO");return new Mt(t.toString("ascii",38),t.readUInt32LE(0),t.readUInt16LE(4),t.readDoubleLE(6),t.readDoubleLE(14),t.readDoubleLE(22),t.readUInt32LE(30),t.readUInt32LE(34))}toStats(){return new Me((this.mode&61440)===je.DIRECTORY?je.DIRECTORY:je.FILE,this.size,this.mode,this.atime,this.mtime,this.ctime,this.uid,this.gid)}getSize(){return 38+this.id.length}toBuffer(t=fe.alloc(this.getSize())){return t.writeUInt32LE(this.size,0),t.writeUInt16LE(this.mode,4),t.writeDoubleLE(this.atime,6),t.writeDoubleLE(this.mtime,14),t.writeDoubleLE(this.ctime,22),t.writeUInt32LE(this.uid,30),t.writeUInt32LE(this.gid,34),t.write(this.id,38,this.id.length,"ascii"),t}update(t){let e=!1;this.size!==t.size&&(this.size=t.size,e=!0),this.mode!==t.mode&&(this.mode=t.mode,e=!0);let i=t.atime.getTime();this.atime!==i&&(this.atime=i,e=!0);let n=t.mtime.getTime();this.mtime!==n&&(this.mtime=n,e=!0);let o=t.ctime.getTime();return this.ctime!==o&&(this.ctime=o,e=!0),this.uid!==t.uid&&(this.uid=t.uid,e=!0),this.uid!==t.uid&&(this.uid=t.uid,e=!0),e}isFile(){return(this.mode&61440)===je.FILE}isDirectory(){return(this.mode&61440)===je.DIRECTORY}};u(Mt,"Inode");var Tt=class extends $r{constructor(e,i,n,o,a){super();this._pos=0;this._dirty=!1;if(this._fs=e,this._path=i,this._flag=n,this._stat=o,this._buffer=a||fe.alloc(0),this._stat.size!==this._buffer.length&&this._flag.isReadable())throw new Error(`Invalid buffer: Buffer is ${this._buffer.length} long, yet Stats object specifies that file is ${this._stat.size} long.`)}getBuffer(){return this._buffer}getStats(){return this._stat}getFlag(){return this._flag}getPath(){return this._path}getPos(){return this._flag.isAppendable()?this._stat.size:this._pos}advancePos(e){return this._pos+=e}setPos(e){return this._pos=e}sync(){return C(this,null,function*(){this.syncSync()})}syncSync(){throw new T(95)}close(){return C(this,null,function*(){this.closeSync()})}closeSync(){throw new T(95)}stat(){return C(this,null,function*(){return Me.clone(this._stat)})}statSync(){return Me.clone(this._stat)}truncate(e){if(this.truncateSync(e),this._flag.isSynchronous()&&!Fi("/").metadata.synchronous)return this.sync()}truncateSync(e){if(this._dirty=!0,!this._flag.isWriteable())throw new T(1,"File not opened with a writeable mode.");if(this._stat.mtimeMs=Date.now(),e>this._buffer.length){let n=fe.alloc(e-this._buffer.length,0);this.writeSync(n,0,n.length,this._buffer.length),this._flag.isSynchronous()&&Fi("/").metadata.synchronous&&this.syncSync();return}this._stat.size=e;let i=fe.alloc(e);this._buffer.copy(i,0,0,e),this._buffer=i,this._flag.isSynchronous()&&Fi("/").metadata.synchronous&&this.syncSync()}write(e,i,n,o){return C(this,null,function*(){return this.writeSync(e,i,n,o)})}writeSync(e,i,n,o){if(this._dirty=!0,o==null&&(o=this.getPos()),!this._flag.isWriteable())throw new T(1,"File not opened with a writeable mode.");let a=o+n;if(a>this._stat.size&&(this._stat.size=a,a>this._buffer.length)){let m=fe.alloc(a);this._buffer.copy(m),this._buffer=m}let l=e.copy(this._buffer,o,i,i+n);return this._stat.mtimeMs=Date.now(),this._flag.isSynchronous()?(this.syncSync(),l):(this.setPos(o+l),l)}read(e,i,n,o){return C(this,null,function*(){return{bytesRead:this.readSync(e,i,n,o),buffer:e}})}readSync(e,i,n,o){if(!this._flag.isReadable())throw new T(1,"File not opened with a readable mode.");o==null&&(o=this.getPos()),o+n>this._stat.size&&(n=this._stat.size-o);let l=this._buffer.copy(e,i,o,o+n);return this._stat.atimeMs=Date.now(),this._pos=o+n,l}chmod(e){return C(this,null,function*(){this.chmodSync(e)})}chmodSync(e){if(!this._fs.metadata.supportsProperties)throw new T(95);this._dirty=!0,this._stat.chmod(e),this.syncSync()}chown(e,i){return C(this,null,function*(){this.chownSync(e,i)})}chownSync(e,i){if(!this._fs.metadata.supportsProperties)throw new T(95);this._dirty=!0,this._stat.chown(e,i),this.syncSync()}isDirty(){return this._dirty}resetDirty(){this._dirty=!1}};u(Tt,"PreloadFile");var er=class extends Tt{constructor(t,e,i,n,o){super(t,e,i,n,o)}sync(){return C(this,null,function*(){})}syncSync(){}close(){return C(this,null,function*(){})}closeSync(){}};u(er,"NoSyncFile");var Er="/",_a=null;function $c(){return _a||(_a=fe.from("{}"))}u($c,"getEmptyDirNode");function Wn(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){let t=Math.random()*16|0;return(r==="x"?t:t&3|8).toString(16)})}u(Wn,"GenerateRandomID");var qi=class{constructor(t,e){this.key=t;this.value=e;this.prev=null;this.next=null}};u(qi,"LRUNode");var Zn=class{constructor(t){this.limit=t;this.size=0;this.map={};this.head=null;this.tail=null}set(t,e){let i=new qi(t,e);this.map[t]?(this.map[t].value=i.value,this.remove(i.key)):this.size>=this.limit&&(delete this.map[this.tail.key],this.size--,this.tail=this.tail.prev,this.tail.next=null),this.setHead(i)}get(t){if(this.map[t]){let e=this.map[t].value,i=new qi(t,e);return this.remove(t),this.setHead(i),e}else return null}remove(t){let e=this.map[t];e&&(e.prev!==null?e.prev.next=e.next:this.head=e.next,e.next!==null?e.next.prev=e.prev:this.tail=e.prev,delete this.map[t],this.size--)}removeAll(){this.size=0,this.map={},this.head=null,this.tail=null}setHead(t){t.next=this.head,t.prev=null,this.head!==null&&(this.head.prev=t),this.head=t,this.tail===null&&(this.tail=t),this.size++,this.map[t.key]=t}};u(Zn,"LRUCache");var Wr=class{constructor(t){this.store=t;this.originalData={};this.modifiedKeys=[]}get(t){let e=this.store.get(t);return this.stashOldValue(t,e),e}put(t,e,i){return this.markModified(t),this.store.put(t,e,i)}del(t){this.markModified(t),this.store.del(t)}commit(){}abort(){for(let t of this.modifiedKeys){let e=this.originalData[t];e?this.store.put(t,e,!0):this.store.del(t)}}_has(t){return Object.prototype.hasOwnProperty.call(this.originalData,t)}stashOldValue(t,e){this._has(t)||(this.originalData[t]=e)}markModified(t){this.modifiedKeys.indexOf(t)===-1&&(this.modifiedKeys.push(t),this._has(t)||(this.originalData[t]=this.store.get(t)))}};u(Wr,"SimpleSyncRWTransaction");var xi=class extends Tt{constructor(t,e,i,n,o){super(t,e,i,n,o)}syncSync(){this.isDirty()&&(this._fs._syncSync(this.getPath(),this.getBuffer(),this.getStats()),this.resetDirty())}closeSync(){this.syncSync()}};u(xi,"SyncKeyValueFile");var Hr=class extends kt{constructor(e){super();this.store=e.store,this.makeRootDirectory()}static isAvailable(){return!0}getName(){return this.store.name()}isReadOnly(){return!1}supportsSymlinks(){return!1}supportsProps(){return!0}supportsSynch(){return!0}empty(){this.store.clear(),this.makeRootDirectory()}accessSync(e,i,n){let o=this.store.beginTransaction("readonly");if(!this.findINode(o,e).toStats().hasAccess(i,n))throw T.EACCES(e)}renameSync(e,i,n){let o=this.store.beginTransaction("readwrite"),a=Ze(e),l=_t(e),m=Ze(i),y=_t(i),g=this.findINode(o,a),w=this.getDirListing(o,a,g);if(!g.toStats().hasAccess(2,n))throw T.EACCES(e);if(!w[l])throw T.ENOENT(e);let v=w[l];if(delete w[l],(m+"/").indexOf(e+"/")===0)throw new T(16,a);let S,E;if(m===a?(S=g,E=w):(S=this.findINode(o,m),E=this.getDirListing(o,m,S)),E[y]){let A=this.getINode(o,i,E[y]);if(A.isFile())try{o.del(A.id),o.del(E[y])}catch(O){throw o.abort(),O}else throw T.EPERM(i)}E[y]=v;try{o.put(g.id,fe.from(JSON.stringify(w)),!0),o.put(S.id,fe.from(JSON.stringify(E)),!0)}catch(A){throw o.abort(),A}o.commit()}statSync(e,i){let n=this.findINode(this.store.beginTransaction("readonly"),e).toStats();if(!n.hasAccess(4,i))throw T.EACCES(e);return n}createFileSync(e,i,n,o){let a=this.store.beginTransaction("readwrite"),l=fe.alloc(0),m=this.commitNewFile(a,e,je.FILE,n,o,l);return new xi(this,e,i,m.toStats(),l)}openFileSync(e,i,n){let o=this.store.beginTransaction("readonly"),a=this.findINode(o,e),l=o.get(a.id);if(!a.toStats().hasAccess(i.getMode(),n))throw T.EACCES(e);if(l===void 0)throw T.ENOENT(e);return new xi(this,e,i,a.toStats(),l)}unlinkSync(e,i){this.removeEntry(e,!1,i)}rmdirSync(e,i){if(this.readdirSync(e,i).length>0)throw T.ENOTEMPTY(e);this.removeEntry(e,!0,i)}mkdirSync(e,i,n){let o=this.store.beginTransaction("readwrite"),a=fe.from("{}");this.commitNewFile(o,e,je.DIRECTORY,i,n,a)}readdirSync(e,i){let n=this.store.beginTransaction("readonly"),o=this.findINode(n,e);if(!o.toStats().hasAccess(4,i))throw T.EACCES(e);return Object.keys(this.getDirListing(n,e,o))}chmodSync(e,i,n){this.openFileSync(e,We.getFileFlag("r+"),n).chmodSync(i)}chownSync(e,i,n,o){this.openFileSync(e,We.getFileFlag("r+"),o).chownSync(i,n)}_syncSync(e,i,n){let o=this.store.beginTransaction("readwrite"),a=this._findINode(o,Ze(e),_t(e)),l=this.getINode(o,e,a),m=l.update(n);try{o.put(l.id,i,!0),m&&o.put(a,l.toBuffer(),!0)}catch(y){throw o.abort(),y}o.commit()}makeRootDirectory(){let e=this.store.beginTransaction("readwrite");if(e.get(Er)===void 0){let i=new Date().getTime(),n=new Mt(Wn(),4096,511|je.DIRECTORY,i,i,i,0,0);e.put(n.id,$c(),!1),e.put(Er,n.toBuffer(),!1),e.commit()}}_findINode(e,i,n,o=new Set){let a=Qr.join(i,n);if(o.has(a))throw new T(5,"Infinite loop detected while finding inode",a);o.add(a);let l=u(m=>{let y=this.getDirListing(e,i,m);if(y[n])return y[n];throw T.ENOENT(qt(i,n))},"readDirectory");return i==="."&&(i=Pn()),i==="/"?n===""?Er:l(this.getINode(e,i,Er)):l(this.getINode(e,i+ei+n,this._findINode(e,Ze(i),_t(i),o)))}findINode(e,i){return this.getINode(e,i,this._findINode(e,Ze(i),_t(i)))}getINode(e,i,n){let o=e.get(n);if(o===void 0)throw T.ENOENT(i);return Mt.fromBuffer(o)}getDirListing(e,i,n){if(!n.isDirectory())throw T.ENOTDIR(i);let o=e.get(n.id);if(o===void 0)throw T.ENOENT(i);return JSON.parse(o.toString())}addNewNode(e,i){let o;for(;0<5;)try{return o=Wn(),e.put(o,i,!1),o}catch(a){}throw new T(5,"Unable to commit data to key-value store.")}commitNewFile(e,i,n,o,a,l){let m=Ze(i),y=_t(i),g=this.findINode(e,m),w=this.getDirListing(e,m,g),v=new Date().getTime();if(!g.toStats().hasAccess(4,a))throw T.EACCES(i);if(i==="/")throw T.EEXIST(i);if(w[y])throw T.EEXIST(i);let S;try{let E=this.addNewNode(e,l);S=new Mt(E,l.length,o|n,v,v,v,a.uid,a.gid);let A=this.addNewNode(e,S.toBuffer());w[y]=A,e.put(g.id,fe.from(JSON.stringify(w)),!0)}catch(E){throw e.abort(),E}return e.commit(),S}removeEntry(e,i,n){let o=this.store.beginTransaction("readwrite"),a=Ze(e),l=this.findINode(o,a),m=this.getDirListing(o,a,l),y=_t(e);if(!m[y])throw T.ENOENT(e);let g=m[y],w=this.getINode(o,e,g);if(!w.toStats().hasAccess(2,n))throw T.EACCES(e);if(delete m[y],!i&&w.isDirectory())throw T.EISDIR(e);if(i&&!w.isDirectory())throw T.ENOTDIR(e);try{o.del(w.id),o.del(g),o.put(l.id,fe.from(JSON.stringify(m)),!0)}catch(v){throw o.abort(),v}o.commit()}};u(Hr,"SyncKeyValueFileSystem");var Ii=class extends Tt{constructor(t,e,i,n,o){super(t,e,i,n,o)}sync(){return C(this,null,function*(){this.isDirty()&&(yield this._fs._sync(this.getPath(),this.getBuffer(),this.getStats()),this.resetDirty())})}close(){return C(this,null,function*(){this.sync()})}};u(Ii,"AsyncKeyValueFile");var Ti=class extends gt{constructor(e){super();this._cache=null;e>0&&(this._cache=new Zn(e))}static isAvailable(){return!0}init(e){return C(this,null,function*(){this.store=e,yield this.makeRootDirectory()})}getName(){return this.store.name()}isReadOnly(){return!1}supportsSymlinks(){return!1}supportsProps(){return!0}supportsSynch(){return!1}empty(){return C(this,null,function*(){this._cache&&this._cache.removeAll(),yield this.store.clear(),yield this.makeRootDirectory()})}access(e,i,n){return C(this,null,function*(){let o=this.store.beginTransaction("readonly"),a=yield this.findINode(o,e);if(!a)throw T.ENOENT(e);if(!a.toStats().hasAccess(i,n))throw T.EACCES(e)})}rename(e,i,n){return C(this,null,function*(){let o=this._cache;this._cache&&(this._cache=null,o.removeAll());try{let a=this.store.beginTransaction("readwrite"),l=Ze(e),m=_t(e),y=Ze(i),g=_t(i),w=yield this.findINode(a,l),v=yield this.getDirListing(a,l,w);if(!w.toStats().hasAccess(2,n))throw T.EACCES(e);if(!v[m])throw T.ENOENT(e);let S=v[m];if(delete v[m],(y+"/").indexOf(e+"/")===0)throw new T(16,l);let E,A;if(y===l?(E=w,A=v):(E=yield this.findINode(a,y),A=yield this.getDirListing(a,y,E)),A[g]){let O=yield this.getINode(a,i,A[g]);if(O.isFile())try{yield a.del(O.id),yield a.del(A[g])}catch(U){throw yield a.abort(),U}else throw T.EPERM(i)}A[g]=S;try{yield a.put(w.id,fe.from(JSON.stringify(v)),!0),yield a.put(E.id,fe.from(JSON.stringify(A)),!0)}catch(O){throw yield a.abort(),O}yield a.commit()}finally{o&&(this._cache=o)}})}stat(e,i){return C(this,null,function*(){let n=this.store.beginTransaction("readonly"),a=(yield this.findINode(n,e)).toStats();if(!a.hasAccess(4,i))throw T.EACCES(e);return a})}createFile(e,i,n,o){return C(this,null,function*(){let a=this.store.beginTransaction("readwrite"),l=fe.alloc(0),m=yield this.commitNewFile(a,e,je.FILE,n,o,l);return new Ii(this,e,i,m.toStats(),l)})}openFile(e,i,n){return C(this,null,function*(){let o=this.store.beginTransaction("readonly"),a=yield this.findINode(o,e),l=yield o.get(a.id);if(!a.toStats().hasAccess(i.getMode(),n))throw T.EACCES(e);if(l===void 0)throw T.ENOENT(e);return new Ii(this,e,i,a.toStats(),l)})}unlink(e,i){return C(this,null,function*(){return this.removeEntry(e,!1,i)})}rmdir(e,i){return C(this,null,function*(){if((yield this.readdir(e,i)).length>0)throw T.ENOTEMPTY(e);yield this.removeEntry(e,!0,i)})}mkdir(e,i,n){return C(this,null,function*(){let o=this.store.beginTransaction("readwrite"),a=fe.from("{}");yield this.commitNewFile(o,e,je.DIRECTORY,i,n,a)})}readdir(e,i){return C(this,null,function*(){let n=this.store.beginTransaction("readonly"),o=yield this.findINode(n,e);if(!o.toStats().hasAccess(4,i))throw T.EACCES(e);return Object.keys(yield this.getDirListing(n,e,o))})}chmod(e,i,n){return C(this,null,function*(){yield(yield this.openFile(e,We.getFileFlag("r+"),n)).chmod(i)})}chown(e,i,n,o){return C(this,null,function*(){yield(yield this.openFile(e,We.getFileFlag("r+"),o)).chown(i,n)})}_sync(e,i,n){return C(this,null,function*(){let o=this.store.beginTransaction("readwrite"),a=yield this._findINode(o,Ze(e),_t(e)),l=yield this.getINode(o,e,a),m=l.update(n);try{yield o.put(l.id,i,!0),m&&(yield o.put(a,l.toBuffer(),!0))}catch(y){throw yield o.abort(),y}yield o.commit()})}makeRootDirectory(){return C(this,null,function*(){let e=this.store.beginTransaction("readwrite");if((yield e.get(Er))===void 0){let i=new Date().getTime(),n=new Mt(Wn(),4096,511|je.DIRECTORY,i,i,i,0,0);yield e.put(n.id,$c(),!1),yield e.put(Er,n.toBuffer(),!1),yield e.commit()}})}_findINode(a,l,m){return C(this,arguments,function*(e,i,n,o=new Set){let y=Qr.join(i,n);if(o.has(y))throw new T(5,"Infinite loop detected while finding inode",y);if(o.add(y),this._cache){let g=this._cache.get(y);if(g)return g}if(i==="/"){if(n==="")return this._cache&&this._cache.set(y,Er),Er;{let g=yield this.getINode(e,i,Er),w=yield this.getDirListing(e,i,g);if(w[n]){let v=w[n];return this._cache&&this._cache.set(y,v),v}else throw T.ENOENT(qt(i,n))}}else{let g=yield this.findINode(e,i,o),w=yield this.getDirListing(e,i,g);if(w[n]){let v=w[n];return this._cache&&this._cache.set(y,v),v}else throw T.ENOENT(qt(i,n))}})}findINode(o,a){return C(this,arguments,function*(e,i,n=new Set){let l=yield this._findINode(e,Ze(i),_t(i),n);return this.getINode(e,i,l)})}getINode(e,i,n){return C(this,null,function*(){let o=yield e.get(n);if(!o)throw T.ENOENT(i);return Mt.fromBuffer(o)})}getDirListing(e,i,n){return C(this,null,function*(){if(!n.isDirectory())throw T.ENOTDIR(i);let o=yield e.get(n.id);try{return JSON.parse(o.toString())}catch(a){throw T.ENOENT(i)}})}addNewNode(e,i){return C(this,null,function*(){let n=0,o=u(()=>C(this,null,function*(){if(++n===5)throw new T(5,"Unable to commit data to key-value store.");{let a=Wn();return(yield e.put(a,i,!1))?a:o()}}),"reroll");return o()})}commitNewFile(e,i,n,o,a,l){return C(this,null,function*(){let m=Ze(i),y=_t(i),g=yield this.findINode(e,m),w=yield this.getDirListing(e,m,g),v=new Date().getTime();if(!g.toStats().hasAccess(2,a))throw T.EACCES(i);if(i==="/")throw T.EEXIST(i);if(w[y])throw yield e.abort(),T.EEXIST(i);try{let S=yield this.addNewNode(e,l),E=new Mt(S,l.length,o|n,v,v,v,a.uid,a.gid),A=yield this.addNewNode(e,E.toBuffer());return w[y]=A,yield e.put(g.id,fe.from(JSON.stringify(w)),!0),yield e.commit(),E}catch(S){throw e.abort(),S}})}removeEntry(e,i,n){return C(this,null,function*(){this._cache&&this._cache.remove(e);let o=this.store.beginTransaction("readwrite"),a=Ze(e),l=yield this.findINode(o,a),m=yield this.getDirListing(o,a,l),y=_t(e);if(!m[y])throw T.ENOENT(e);let g=m[y],w=yield this.getINode(o,e,g);if(!w.toStats().hasAccess(2,n))throw T.EACCES(e);if(delete m[y],!i&&w.isDirectory())throw T.EISDIR(e);if(i&&!w.isDirectory())throw T.ENOTDIR(e);try{yield o.del(w.id),yield o.del(g),yield o.put(l.id,fe.from(JSON.stringify(m)),!0)}catch(v){throw yield o.abort(),v}yield o.commit()})}};u(Ti,"AsyncKeyValueFileSystem");function ni(r,t=0,e=r.length){if(t<0||e<0||e>r.length||t>e)throw new TypeError(`Invalid slice bounds on buffer of length ${r.length}: [${t}, ${e}]`);return r.length===0?fe.alloc(0):r.subarray(t,e)}u(ni,"copyingSlice");function qn(r){return C(this,null,function*(){if(!fe.isBuffer(r))throw new T(22,"option must be a Buffer.")})}u(qn,"bufferValidator");function Hn(r,t,e,i,n){return Math.min(r+1,t+1,e+1,i===n?t:t+1)}u(Hn,"_min");function rp(r,t){if(r===t)return 0;r.length>t.length&&([r,t]=[t,r]);let e=r.length,i=t.length;for(;e>0&&r.charCodeAt(e-1)===t.charCodeAt(i-1);)e--,i--;let n=0;for(;n<e&&r.charCodeAt(n)===t.charCodeAt(n);)n++;if(e-=n,i-=n,e===0||i===1)return i;let o=new Array(e<<1);for(let v=0;v<e;)o[e+v]=r.charCodeAt(n+v),o[v]=++v;let a,l,m,y,g;for(a=0;a+3<i;){let v=t.charCodeAt(n+(l=a)),S=t.charCodeAt(n+(m=a+1)),E=t.charCodeAt(n+(y=a+2)),A=t.charCodeAt(n+(g=a+3)),O=a+=4;for(let U=0;U<e;){let j=o[e+U],W=o[U];l=Hn(W,l,m,v,j),m=Hn(l,m,y,S,j),y=Hn(m,y,g,E,j),O=Hn(y,g,O,A,j),o[U++]=O,g=y,y=m,m=l,l=W}}let w=0;for(;a<i;){let v=t.charCodeAt(n+(l=a));w=++a;for(let S=0;S<e;S++){let E=o[S];o[S]=w=E<l||w<l?E>w?w+1:E+1:v===o[e+S]?l:l+1,l=E}}return w}u(rp,"levenshtein");function Zc(r,t){return C(this,null,function*(){let e=r.Options,i=r.Name,n=0,o=!1,a=!1;for(let l in e)if(Object.prototype.hasOwnProperty.call(e,l)){let m=e[l],y=t&&t[l];if(y==null){if(!m.optional){let g=Object.keys(t).filter(w=>!(w in e)).map(w=>({str:w,distance:rp(l,w)})).filter(w=>w.distance<5).sort((w,v)=>w.distance-v.distance);if(o)return;throw o=!0,new T(22,`[${i}] Required option '${l}' not provided.${g.length>0?` You provided unrecognized option '${g[0].str}'; perhaps you meant to type '${l}'.`:""}
Option description: ${m.description}`)}}else{let g=!1;if(Array.isArray(m.type)?g=m.type.indexOf(typeof y)!==-1:g=typeof y===m.type,g){if(m.validator){n++;try{yield m.validator(y)}catch(w){if(!o){if(w)throw o=!0,w;if(n--,n===0&&a)return}}}}else{if(o)return;throw o=!0,new T(22,`[${i}] Value provided for option ${l} is not the proper type. Expected ${Array.isArray(m.type)?`one of {${m.type.join(", ")}}`:m.type}, but received ${typeof y}
Option description: ${m.description}`)}}}a=!0})}u(Zc,"checkOptions");function Vi(r){return new Promise(t=>{setTimeout(t,r)})}u(Vi,"wait");var Yw=typeof globalThis.setImmediate=="function"?globalThis.setImmediate:r=>setTimeout(r,0);function Je(r,t){t=typeof r=="function"?r:t,Zc(this,r);let e=new this(typeof r=="function"?{}:r);if(typeof t!="function")return e.whenReady();e.whenReady().then(i=>t(null,i)).catch(i=>t(i))}u(Je,"CreateBackend");var Vn=class{constructor(){this.store=new Map}name(){return Kt.Name}clear(){this.store.clear()}beginTransaction(t){return new Wr(this)}get(t){return this.store.get(t)}put(t,e,i){return!i&&this.store.has(t)?!1:(this.store.set(t,e),!0)}del(t){this.store.delete(t)}};u(Vn,"InMemoryStore");var va=class extends Hr{constructor(){super({store:new Vn})}},Kt=va;u(Kt,"InMemoryFileSystem"),Kt.Name="InMemory",Kt.Create=Je.bind(va),Kt.Options={};function Hc(r){if(typeof r=="number")return r;if(r instanceof Date)return r.getTime()/1e3;throw new Error("Cannot parse time: "+r)}u(Hc,"_toUnixTimestamp");function jt(r,t){switch(typeof r){case"number":return r;case"string":let e=parseInt(r,8);return isNaN(e)?t:e;default:return t}}u(jt,"normalizeMode");function Ct(r){if(r instanceof Date)return r;if(typeof r=="number")return new Date(r*1e3);throw new T(22,"Invalid time.")}u(Ct,"normalizeTime");function lt(r){if(r.indexOf("\0")>=0)throw new T(22,"Path must be a string without null bytes.");if(r==="")throw new T(22,"Path must not be empty.");return r=r.replaceAll(/\/+/g,"/"),Qr.resolve(r)}u(lt,"normalizePath");function qr(r,t,e,i){switch(r===null?"null":typeof r){case"object":return{encoding:typeof r.encoding!="undefined"?r.encoding:t,flag:typeof r.flag!="undefined"?r.flag:e,mode:jt(r.mode,i)};case"string":return{encoding:r,flag:e,mode:i};case"null":case"undefined":case"function":return{encoding:t,flag:e,mode:i};default:throw new TypeError(`"options" must be a string or an object, got ${typeof r} instead.`)}}u(qr,"normalizeOptions");function Ue(){}u(Ue,"nop");var Ce;function qc(r){Ce=r}u(qc,"setCred");var oi=new Map,ip=100;function Kn(r){let t=ip++;return oi.set(t,r),t}u(Kn,"getFdForFile");function st(r){if(!oi.has(r))throw new T(9,"Invalid file descriptor.");return oi.get(r)}u(st,"fd2file");var tr=new Map;Kt.Create().then(r=>Gn("/",r));function Fi(r){return tr.get(r)}u(Fi,"getMount");function Vc(){return Object.fromEntries(tr.entries())}u(Vc,"getMounts");function Gn(r,t){if(r[0]!=="/"&&(r="/"+r),r=Qr.resolve(r),tr.has(r))throw new T(22,"Mount point "+r+" is already in use.");tr.set(r,t)}u(Gn,"mount");function Ea(r){if(r[0]!=="/"&&(r=`/${r}`),r=Qr.resolve(r),!tr.has(r))throw new T(22,"Mount point "+r+" is already unmounted.");tr.delete(r)}u(Ea,"umount");function Gt(r){let t=[...tr].sort((e,i)=>e[0].length>i[0].length?-1:1);for(let[e,i]of t)if(e.length<=r.length&&r.startsWith(e))return r=r.slice(e.length>1?e.length:0),r===""&&(r="/"),{fs:i,path:r,mountPoint:e};throw new T(5,"BrowserFS not initialized with a file system")}u(Gt,"resolveFS");function Wc(r,t){for(let[e,i]of Object.entries(t))r=r.replaceAll(e,i);return r}u(Wc,"fixPaths");function Vr(r,t){return r.stack=Wc(r.stack,t),r.message=Wc(r.message,t),r}u(Vr,"fixError");function Kc(r){r["/"]&&Ea("/");for(let[t,e]of Object.entries(r)){if(!e.constructor.isAvailable())throw new T(22,`Can not mount "${t}" since the filesystem is unavailable.`);Gn(t,e)}}u(Kc,"initialize");var Gi={};Wi(Gi,{access:()=>Ya,appendFile:()=>Aa,chmod:()=>qa,chown:()=>Wa,close:()=>Oa,constants:()=>Si,createReadStream:()=>sp,createWriteStream:()=>up,exists:()=>Yn,fchmod:()=>La,fchown:()=>Da,fdatasync:()=>Ca,fstat:()=>Ra,fsync:()=>ka,ftruncate:()=>Ba,futimes:()=>Pa,lchmod:()=>Va,lchown:()=>Ha,link:()=>za,lstat:()=>xa,lutimes:()=>Ga,mkdir:()=>Ma,open:()=>Ta,read:()=>Na,readFile:()=>Jn,readdir:()=>ja,readlink:()=>Za,realpath:()=>Ki,rename:()=>Sa,rmdir:()=>Ua,stat:()=>Fa,symlink:()=>$a,truncate:()=>Ia,unlink:()=>Xn,unwatchFile:()=>op,utimes:()=>Ka,watch:()=>ap,watchFile:()=>np,write:()=>eo,writeFile:()=>Qn});function ft(){return C(this,arguments,function*(...[r,t,e,...i]){e=lt(e);let{fs:n,path:o}=Gt(t&&(yield Yn(e))?yield Ki(e):e);try{return n[r](o,...i)}catch(a){throw Vr(a,{[o]:e})}})}u(ft,"doOp");function Sa(r,t){return C(this,null,function*(){r=lt(r),t=lt(t);let e=Gt(r),i=Gt(t),n={[e.path]:r,[i.path]:t};try{if(e.fs===i.fs)return e.fs.rename(e.path,i.path,Ce);let o=yield Jn(r);yield Qn(t,o),yield Xn(r)}catch(o){throw Vr(o,n)}})}u(Sa,"rename");function Yn(r){return C(this,null,function*(){r=lt(r);try{let{fs:t,path:e}=Gt(r);return t.exists(e,Ce)}catch(t){if(t.errno==2)return!1;throw t}})}u(Yn,"exists");function Fa(r){return C(this,null,function*(){return ft("stat",!0,r,Ce)})}u(Fa,"stat");function xa(r){return C(this,null,function*(){return ft("stat",!1,r,Ce)})}u(xa,"lstat");function Ia(r,t=0){return C(this,null,function*(){if(t<0)throw new T(22);return ft("truncate",!0,r,t,Ce)})}u(Ia,"truncate");function Xn(r){return C(this,null,function*(){return ft("unlink",!1,r,Ce)})}u(Xn,"unlink");function Ta(r,t,e=420){return C(this,null,function*(){let i=yield ft("open",!0,r,We.getFileFlag(t),jt(e,420),Ce);return Kn(i)})}u(Ta,"open");function Jn(e){return C(this,arguments,function*(r,t={}){let i=qr(t,null,"r",null),n=We.getFileFlag(i.flag);if(!n.isReadable())throw new T(22,"Flag passed to readFile must allow for reading.");return ft("readFile",!0,r,i.encoding,n,Ce)})}u(Jn,"readFile");function Qn(r,t,e){return C(this,null,function*(){let i=qr(e,"utf8","w",420),n=We.getFileFlag(i.flag);if(!n.isWriteable())throw new T(22,"Flag passed to writeFile must allow for writing.");return ft("writeFile",!0,r,t,i.encoding,n,i.mode,Ce)})}u(Qn,"writeFile");function Aa(r,t,e){return C(this,null,function*(){let i=qr(e,"utf8","a",420),n=We.getFileFlag(i.flag);if(!n.isAppendable())throw new T(22,"Flag passed to appendFile must allow for appending.");return ft("appendFile",!0,r,t,i.encoding,n,i.mode,Ce)})}u(Aa,"appendFile");function Ra(r){return C(this,null,function*(){return st(r).stat()})}u(Ra,"fstat");function Oa(r){return C(this,null,function*(){yield st(r).close(),oi.delete(r)})}u(Oa,"close");function Ba(r,t=0){return C(this,null,function*(){let e=st(r);if(t<0)throw new T(22);return e.truncate(t)})}u(Ba,"ftruncate");function ka(r){return C(this,null,function*(){return st(r).sync()})}u(ka,"fsync");function Ca(r){return C(this,null,function*(){return st(r).datasync()})}u(Ca,"fdatasync");function eo(r,t,e,i,n){return C(this,null,function*(){let o,a=0,l,m;if(typeof t=="string"){m=typeof e=="number"?e:null;let g=typeof i=="string"?i:"utf8";a=0,o=fe.from(t,g),l=o.length}else o=t,a=e,l=i,m=typeof n=="number"?n:null;let y=st(r);return m==null&&(m=y.getPos()),y.write(o,a,l,m)})}u(eo,"write");function Na(r,t,e,i,n){return C(this,null,function*(){let o=st(r);return isNaN(+n)&&(n=o.getPos()),o.read(t,e,i,n)})}u(Na,"read");function Da(r,t,e){return C(this,null,function*(){return st(r).chown(t,e)})}u(Da,"fchown");function La(r,t){return C(this,null,function*(){let e=typeof t=="string"?parseInt(t,8):t;return st(r).chmod(e)})}u(La,"fchmod");function Pa(r,t,e){return C(this,null,function*(){return st(r).utimes(Ct(t),Ct(e))})}u(Pa,"futimes");function Ua(r){return C(this,null,function*(){return ft("rmdir",!0,r,Ce)})}u(Ua,"rmdir");function Ma(r,t){return C(this,null,function*(){return ft("mkdir",!0,r,jt(t,511),Ce)})}u(Ma,"mkdir");function ja(r){return C(this,null,function*(){r=lt(r);let t=yield ft("readdir",!0,r,Ce),e=[...tr.keys()];for(let i of e)if(i.startsWith(r)){let n=i.slice(r.length);if(n.includes("/")||n.length==0)continue;t.push(n)}return t})}u(ja,"readdir");function za(r,t){return C(this,null,function*(){return t=lt(t),ft("link",!1,r,t,Ce)})}u(za,"link");function $a(r,t,e="file"){return C(this,null,function*(){if(!["file","dir","junction"].includes(e))throw new T(22,"Invalid type: "+e);return t=lt(t),ft("symlink",!1,r,t,e,Ce)})}u($a,"symlink");function Za(r){return C(this,null,function*(){return ft("readlink",!1,r,Ce)})}u(Za,"readlink");function Wa(r,t,e){return C(this,null,function*(){return ft("chown",!0,r,t,e,Ce)})}u(Wa,"chown");function Ha(r,t,e){return C(this,null,function*(){return ft("chown",!1,r,t,e,Ce)})}u(Ha,"lchown");function qa(r,t){return C(this,null,function*(){let e=jt(t,-1);if(e<0)throw new T(22,"Invalid mode.");return ft("chmod",!0,r,e,Ce)})}u(qa,"chmod");function Va(r,t){return C(this,null,function*(){let e=jt(t,-1);if(e<1)throw new T(22,"Invalid mode.");return ft("chmod",!1,lt(r),e,Ce)})}u(Va,"lchmod");function Ka(r,t,e){return C(this,null,function*(){return ft("utimes",!0,r,Ct(t),Ct(e),Ce)})}u(Ka,"utimes");function Ga(r,t,e){return C(this,null,function*(){return ft("utimes",!1,r,Ct(t),Ct(e),Ce)})}u(Ga,"lutimes");function Ki(e){return C(this,arguments,function*(r,t={}){r=lt(r);let{fs:i,path:n,mountPoint:o}=Gt(r);try{if(!(yield i.stat(n,Ce)).isSymbolicLink())return r;let l=o+lt(yield i.readlink(n,Ce));return Ki(l)}catch(a){throw Vr(a,{[n]:r})}})}u(Ki,"realpath");function np(i,n){return C(this,arguments,function*(r,t,e=Ue){throw new T(95)})}u(np,"watchFile");function op(e){return C(this,arguments,function*(r,t=Ue){throw new T(95)})}u(op,"unwatchFile");function ap(i,n){return C(this,arguments,function*(r,t,e=Ue){throw new T(95)})}u(ap,"watch");function Ya(r,t=384){return C(this,null,function*(){return ft("access",!0,r,t,Ce)})}u(Ya,"access");function sp(r,t){return C(this,null,function*(){throw new T(95)})}u(sp,"createReadStream");function up(r,t){return C(this,null,function*(){throw new T(95)})}u(up,"createWriteStream");function cp(r,t,e=Ue){Sa(r,t).then(()=>e()).catch(e)}u(cp,"rename");function lp(r,t=Ue){Yn(r).then(t).catch(()=>t(!1))}u(lp,"exists");function fp(r,t=Ue){Fa(r).then(e=>t(null,e)).catch(t)}u(fp,"stat");function hp(r,t=Ue){xa(r).then(e=>t(null,e)).catch(t)}u(hp,"lstat");function dp(r,t=0,e=Ue){e=typeof t=="function"?t:e,Ia(r,typeof t=="number"?t:0).then(()=>e()).catch(e)}u(dp,"truncate");function pp(r,t=Ue){Xn(r).then(()=>t()).catch(t)}u(pp,"unlink");function mp(r,t,e,i=Ue){let n=jt(e,420);i=typeof e=="function"?e:i,Ta(r,t,n).then(o=>i(null,o)).catch(i)}u(mp,"open");function gp(r,t={},e=Ue){e=typeof t=="function"?t:e,Jn(r,typeof t=="function"?null:t).then(i=>e(null,i)).catch(e)}u(gp,"readFile");function yp(r,t,e={},i=Ue){i=typeof e=="function"?e:i,Qn(r,t,typeof e=="function"?void 0:e).then(n=>i(null,n)).catch(i)}u(yp,"writeFile");function bp(r,t,e,i=Ue){i=typeof e=="function"?e:i,Aa(r,t,typeof e=="function"?null:e).then(n=>i(null,n)).catch(i)}u(bp,"appendFile");function wp(r,t=Ue){Ra(r).then(e=>t(null,e)).catch(t)}u(wp,"fstat");function _p(r,t=Ue){Oa(r).then(()=>t()).catch(t)}u(_p,"close");function vp(r,t,e=Ue){let i=typeof t=="number"?t:0;e=typeof t=="function"?t:e,Ba(r,i)}u(vp,"ftruncate");function Ep(r,t=Ue){ka(r).then(()=>t()).catch(t)}u(Ep,"fsync");function Sp(r,t=Ue){Ca(r).then(()=>t()).catch(t)}u(Sp,"fdatasync");function Fp(r,t,e,i,n,o=Ue){let a,l,m,y=null,g;if(typeof t=="string"){switch(g="utf8",typeof e){case"function":o=e;break;case"number":y=e,g=typeof i=="string"?i:"utf8",o=typeof n=="function"?n:o;break;default:o=typeof i=="function"?i:typeof n=="function"?n:o,o(new T(22,"Invalid arguments."));return}a=fe.from(t,g),l=0,m=a.length;let w=o;eo(r,a,l,m,y).then(v=>w(null,v,a.toString(g))).catch(w)}else{a=t,l=e,m=i,y=typeof n=="number"?n:null;let w=typeof n=="function"?n:o;eo(r,a,l,m,y).then(v=>w(null,v,a)).catch(w)}}u(Fp,"write");function xp(r,t,e,i,n,o=Ue){Na(r,t,e,i,n).then(({bytesRead:a,buffer:l})=>o(null,a,l)).catch(o)}u(xp,"read");function Ip(r,t,e,i=Ue){Da(r,t,e).then(()=>i()).catch(i)}u(Ip,"fchown");function Tp(r,t,e){La(r,t).then(()=>e()).catch(e)}u(Tp,"fchmod");function Ap(r,t,e,i=Ue){Pa(r,t,e).then(()=>i()).catch(i)}u(Ap,"futimes");function Rp(r,t=Ue){Ua(r).then(()=>t()).catch(t)}u(Rp,"rmdir");function Op(r,t,e=Ue){Ma(r,t).then(()=>e()).catch(e)}u(Op,"mkdir");function Bp(r,t=Ue){ja(r).then(e=>t(null,e)).catch(t)}u(Bp,"readdir");function kp(r,t,e=Ue){za(r,t).then(()=>e()).catch(e)}u(kp,"link");function Cp(r,t,e,i=Ue){let n=typeof e=="string"?e:"file";i=typeof e=="function"?e:i,$a(r,t,typeof e=="function"?null:e).then(()=>i()).catch(i)}u(Cp,"symlink");function Np(r,t=Ue){Za(r).then(e=>t(null,e)).catch(t)}u(Np,"readlink");function Dp(r,t,e,i=Ue){Wa(r,t,e).then(()=>i()).catch(i)}u(Dp,"chown");function Lp(r,t,e,i=Ue){Ha(r,t,e).then(()=>i()).catch(i)}u(Lp,"lchown");function Pp(r,t,e=Ue){qa(r,t).then(()=>e()).catch(e)}u(Pp,"chmod");function Up(r,t,e=Ue){Va(r,t).then(()=>e()).catch(e)}u(Up,"lchmod");function Mp(r,t,e,i=Ue){Ka(r,t,e).then(()=>i()).catch(i)}u(Mp,"utimes");function jp(r,t,e,i=Ue){Ga(r,t,e).then(()=>i()).catch(i)}u(jp,"lutimes");function zp(r,t,e=Ue){let i=typeof t=="object"?t:{};e=typeof t=="function"?t:e,Ki(r,typeof t=="function"?null:t).then(n=>e(null,n)).catch(e)}u(zp,"realpath");function $p(r,t,e=Ue){let i=typeof t=="number"?t:4;e=typeof t=="function"?t:e,Ya(r,typeof t=="function"?null:t).then(()=>e()).catch(e)}u($p,"access");function Zp(r,t,e=Ue){throw new T(95)}u(Zp,"watchFile");function Wp(r,t=Ue){throw new T(95)}u(Wp,"unwatchFile");function Hp(r,t,e=Ue){throw new T(95)}u(Hp,"watch");function qp(r,t){throw new T(95)}u(qp,"createReadStream");function Vp(r,t){throw new T(95)}u(Vp,"createWriteStream");function ht(...[r,t,e,...i]){e=lt(e);let{fs:n,path:o}=Gt(t&&Gc(e)?Xa(e):e);try{return n[r](o,...i)}catch(a){throw Vr(a,{[o]:e})}}u(ht,"doOp");function Kp(r,t){r=lt(r),t=lt(t);let e=Gt(r),i=Gt(t),n={[e.path]:r,[i.path]:t};try{if(e===i)return e.fs.renameSync(e.path,i.path,Ce);let o=Xc(r);Jc(t,o),Yc(r)}catch(o){throw Vr(o,n)}}u(Kp,"renameSync");function Gc(r){r=lt(r);try{let{fs:t,path:e}=Gt(r);return t.existsSync(e,Ce)}catch(t){if(t.errno==2)return!1;throw t}}u(Gc,"existsSync");function Gp(r){return ht("statSync",!0,r,Ce)}u(Gp,"statSync");function Yp(r){return ht("statSync",!1,r,Ce)}u(Yp,"lstatSync");function Xp(r,t=0){if(t<0)throw new T(22);return ht("truncateSync",!0,r,t,Ce)}u(Xp,"truncateSync");function Yc(r){return ht("unlinkSync",!1,r,Ce)}u(Yc,"unlinkSync");function Jp(r,t,e=420){let i=ht("openSync",!0,r,We.getFileFlag(t),jt(e,420),Ce);return Kn(i)}u(Jp,"openSync");function Xc(r,t={}){let e=qr(t,null,"r",null),i=We.getFileFlag(e.flag);if(!i.isReadable())throw new T(22,"Flag passed to readFile must allow for reading.");return ht("readFileSync",!0,r,e.encoding,i,Ce)}u(Xc,"readFileSync");function Jc(r,t,e){let i=qr(e,"utf8","w",420),n=We.getFileFlag(i.flag);if(!n.isWriteable())throw new T(22,"Flag passed to writeFile must allow for writing.");return ht("writeFileSync",!0,r,t,i.encoding,n,i.mode,Ce)}u(Jc,"writeFileSync");function Qp(r,t,e){let i=qr(e,"utf8","a",420),n=We.getFileFlag(i.flag);if(!n.isAppendable())throw new T(22,"Flag passed to appendFile must allow for appending.");return ht("appendFileSync",!0,r,t,i.encoding,n,i.mode,Ce)}u(Qp,"appendFileSync");function em(r){return st(r).statSync()}u(em,"fstatSync");function tm(r){st(r).closeSync(),oi.delete(r)}u(tm,"closeSync");function rm(r,t=0){let e=st(r);if(t<0)throw new T(22);e.truncateSync(t)}u(rm,"ftruncateSync");function im(r){st(r).syncSync()}u(im,"fsyncSync");function nm(r){st(r).datasyncSync()}u(nm,"fdatasyncSync");function om(r,t,e,i,n){let o,a=0,l,m;if(typeof t=="string"){m=typeof e=="number"?e:null;let g=typeof i=="string"?i:"utf8";a=0,o=fe.from(t,g),l=o.length}else o=t,a=e,l=i,m=typeof n=="number"?n:null;let y=st(r);return m==null&&(m=y.getPos()),y.writeSync(o,a,l,m)}u(om,"writeSync");function am(r,t,e,i,n){let o=st(r),a=e;return typeof e=="object"&&({offset:a,length:i,position:n}=e),isNaN(+n)&&(n=o.getPos()),o.readSync(t,a,i,n)}u(am,"readSync");function sm(r,t,e){st(r).chownSync(t,e)}u(sm,"fchownSync");function um(r,t){let e=typeof t=="string"?parseInt(t,8):t;st(r).chmodSync(e)}u(um,"fchmodSync");function cm(r,t,e){st(r).utimesSync(Ct(t),Ct(e))}u(cm,"futimesSync");function lm(r){return ht("rmdirSync",!0,r,Ce)}u(lm,"rmdirSync");function fm(r,t){ht("mkdirSync",!0,r,jt(t,511),Ce)}u(fm,"mkdirSync");function hm(r){r=lt(r);let t=ht("readdirSync",!0,r,Ce),e=[...tr.keys()];for(let i of e)if(i.startsWith(r)){let n=i.slice(r.length);if(n.includes("/")||n.length==0)continue;t.push(n)}return t}u(hm,"readdirSync");function dm(r,t){return t=lt(t),ht("linkSync",!1,r,t,Ce)}u(dm,"linkSync");function pm(r,t,e){if(!["file","dir","junction"].includes(e))throw new T(22,"Invalid type: "+e);return t=lt(t),ht("symlinkSync",!1,r,t,e,Ce)}u(pm,"symlinkSync");function mm(r){return ht("readlinkSync",!1,r,Ce)}u(mm,"readlinkSync");function gm(r,t,e){ht("chownSync",!0,r,t,e,Ce)}u(gm,"chownSync");function ym(r,t,e){ht("chownSync",!1,r,t,e,Ce)}u(ym,"lchownSync");function bm(r,t){let e=jt(t,-1);if(e<0)throw new T(22,"Invalid mode.");ht("chmodSync",!0,r,e,Ce)}u(bm,"chmodSync");function wm(r,t){let e=jt(t,-1);if(e<1)throw new T(22,"Invalid mode.");ht("chmodSync",!1,r,e,Ce)}u(wm,"lchmodSync");function _m(r,t,e){ht("utimesSync",!0,r,Ct(t),Ct(e),Ce)}u(_m,"utimesSync");function vm(r,t,e){ht("utimesSync",!1,r,Ct(t),Ct(e),Ce)}u(vm,"lutimesSync");function Xa(r,t={}){r=lt(r);let{fs:e,path:i,mountPoint:n}=Gt(r);try{if(!e.statSync(i,Ce).isSymbolicLink())return r;let a=lt(n+e.readlinkSync(i,Ce));return Xa(a)}catch(o){throw Vr(o,{[i]:r})}}u(Xa,"realpathSync");function Em(r,t=384){return ht("accessSync",!0,r,t,Ce)}u(Em,"accessSync");var Sm=Yi,to=Sm;var ro=class{constructor(t){this.efs=t;this.nodefs=t.getNodeFS(),this.FS=t.getFS(),this.PATH=t.getPATH(),this.ERRNO_CODES=t.getERRNO_CODES()}open(t){let e=this.efs.realPath(t.node),i=this.FS;try{i.isFile(t.node.mode)&&(t.nfd=this.nodefs.openSync(e,this.efs.flagsToPermissionString(t.flags)))}catch(n){throw n.code?new i.ErrnoError(this.ERRNO_CODES[n.code]):n}}close(t){let e=this.FS;try{e.isFile(t.node.mode)&&t.nfd&&this.nodefs.closeSync(t.nfd)}catch(i){throw i.code?new e.ErrnoError(this.ERRNO_CODES[i.code]):i}}read(t,e,i,n,o){try{return this.nodefs.readSync(t.nfd,fe.from(e),i,n,o)}catch(a){throw new this.FS.ErrnoError(this.ERRNO_CODES[a.code])}}write(t,e,i,n,o){try{return this.nodefs.writeSync(t.nfd,fe.from(e),i,n,o)}catch(a){throw new this.FS.ErrnoError(this.ERRNO_CODES[a.code])}}llseek(t,e,i){let n=e;if(i===1)n+=t.position;else if(i===2&&this.FS.isFile(t.node.mode))try{let o=this.nodefs.fstatSync(t.nfd);n+=o.size}catch(o){throw new this.FS.ErrnoError(this.ERRNO_CODES[o.code])}if(n<0)throw new this.FS.ErrnoError(this.ERRNO_CODES.EINVAL);return t.position=n,n}};u(ro,"BFSEmscriptenStreamOps");var io=class{constructor(t){this._fs=t;this.nodefs=t.getNodeFS(),this.FS=t.getFS(),this.PATH=t.getPATH(),this.ERRNO_CODES=t.getERRNO_CODES()}getattr(t){let e=this._fs.realPath(t),i;try{i=this.nodefs.lstatSync(e)}catch(n){throw n.code?new this.FS.ErrnoError(this.ERRNO_CODES[n.code]):n}return{dev:i.dev,ino:i.ino,mode:i.mode,nlink:i.nlink,uid:i.uid,gid:i.gid,rdev:i.rdev,size:i.size,atime:i.atime,mtime:i.mtime,ctime:i.ctime,blksize:i.blksize,blocks:i.blocks}}setattr(t,e){let i=this._fs.realPath(t);try{if(e.mode!==void 0&&(this.nodefs.chmodSync(i,e.mode),t.mode=e.mode),e.timestamp!==void 0){let n=new Date(e.timestamp);this.nodefs.utimesSync(i,n,n)}}catch(n){if(!n.code)throw n;if(n.code!=="ENOTSUP")throw new this.FS.ErrnoError(this.ERRNO_CODES[n.code])}if(e.size!==void 0)try{this.nodefs.truncateSync(i,e.size)}catch(n){throw n.code?new this.FS.ErrnoError(this.ERRNO_CODES[n.code]):n}}lookup(t,e){let i=this.PATH.join2(this._fs.realPath(t),e),n=this._fs.getMode(i);return this._fs.createNode(t,e,n)}mknod(t,e,i,n){let o=this._fs.createNode(t,e,i,n),a=this._fs.realPath(o);try{this.FS.isDir(o.mode)?this.nodefs.mkdirSync(a,o.mode):this.nodefs.writeFileSync(a,"",{mode:o.mode})}catch(l){throw l.code?new this.FS.ErrnoError(this.ERRNO_CODES[l.code]):l}return o}rename(t,e,i){let n=this._fs.realPath(t),o=this.PATH.join2(this._fs.realPath(e),i);try{this.nodefs.renameSync(n,o),t.name=i,t.parent=e}catch(a){throw a.code?new this.FS.ErrnoError(this.ERRNO_CODES[a.code]):a}}unlink(t,e){let i=this.PATH.join2(this._fs.realPath(t),e);try{this.nodefs.unlinkSync(i)}catch(n){throw n.code?new this.FS.ErrnoError(this.ERRNO_CODES[n.code]):n}}rmdir(t,e){let i=this.PATH.join2(this._fs.realPath(t),e);try{this.nodefs.rmdirSync(i)}catch(n){throw n.code?new this.FS.ErrnoError(this.ERRNO_CODES[n.code]):n}}readdir(t){let e=this._fs.realPath(t);try{let i=this.nodefs.readdirSync(e);return i.push(".",".."),i}catch(i){throw i.code?new this.FS.ErrnoError(this.ERRNO_CODES[i.code]):i}}symlink(t,e,i){let n=this.PATH.join2(this._fs.realPath(t),e);try{this.nodefs.symlinkSync(i,n)}catch(o){throw o.code?new this.FS.ErrnoError(this.ERRNO_CODES[o.code]):o}}readlink(t){let e=this._fs.realPath(t);try{return this.nodefs.readlinkSync(e)}catch(i){throw i.code?new this.FS.ErrnoError(this.ERRNO_CODES[i.code]):i}}};u(io,"BFSEmscriptenEntryOps");var Ai=class{constructor(t=globalThis.FS,e=globalThis.PATH,i=globalThis.ERRNO_CODES,n=Yi){this.flagsToPermissionStringMap={0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"};this.nodefs=n,this.FS=t,this.PATH=e,this.ERRNO_CODES=i,this.node_ops=new io(this),this.stream_ops=new ro(this)}mount(t){return this.createNode(null,"/",this.getMode(t.opts.root),0)}createNode(t,e,i,n){let o=this.FS;if(!o.isDir(i)&&!o.isFile(i)&&!o.isLink(i))throw new o.ErrnoError(this.ERRNO_CODES.EINVAL);let a=o.createNode(t,e,i);return a.node_ops=this.node_ops,a.stream_ops=this.stream_ops,a}getMode(t){let e;try{e=this.nodefs.lstatSync(t)}catch(i){throw i.code?new this.FS.ErrnoError(this.ERRNO_CODES[i.code]):i}return e.mode}realPath(t){let e=[];for(;t.parent!==t;)e.push(t.name),t=t.parent;return e.push(t.mount.opts.root),e.reverse(),this.PATH.join.apply(null,e)}flagsToPermissionString(t){let e=typeof t=="string"?parseInt(t,10):t;return e&=8191,e in this.flagsToPermissionStringMap?this.flagsToPermissionStringMap[e]:t}getNodeFS(){return this.nodefs}getFS(){return this.FS}getPATH(){return this.PATH}getERRNO_CODES(){return this.ERRNO_CODES}};u(Ai,"BFSEmscriptenFS");var no=class extends Tt{constructor(t,e,i,n,o){super(t,e,i,n,o)}syncSync(){this.isDirty()&&(this._fs._syncSync(this),this.resetDirty())}closeSync(){this.syncSync()}};u(no,"MirrorFile");var Xi=class extends kt{constructor({sync:e,async:i}){super();this._queue=[];this._queueRunning=!1;this._isInitialized=!1;this._initializeCallbacks=[];this._sync=e,this._async=i,this._ready=this._initialize()}static isAvailable(){return!0}get metadata(){return rt(Xe({},super.metadata),{name:Xi.Name,synchronous:!0,supportsProperties:this._sync.metadata.supportsProperties&&this._async.metadata.supportsProperties})}_syncSync(e){let i=e.getStats();this._sync.writeFileSync(e.getPath(),e.getBuffer(),null,We.getFileFlag("w"),i.mode,i.getCred(0,0)),this.enqueueOp({apiMethod:"writeFile",arguments:[e.getPath(),e.getBuffer(),null,e.getFlag(),i.mode,i.getCred(0,0)]})}renameSync(e,i,n){this._sync.renameSync(e,i,n),this.enqueueOp({apiMethod:"rename",arguments:[e,i,n]})}statSync(e,i){return this._sync.statSync(e,i)}openSync(e,i,n,o){return this._sync.openSync(e,i,n,o).closeSync(),new no(this,e,i,this._sync.statSync(e,o),this._sync.readFileSync(e,null,We.getFileFlag("r"),o))}unlinkSync(e,i){this._sync.unlinkSync(e,i),this.enqueueOp({apiMethod:"unlink",arguments:[e,i]})}rmdirSync(e,i){this._sync.rmdirSync(e,i),this.enqueueOp({apiMethod:"rmdir",arguments:[e,i]})}mkdirSync(e,i,n){this._sync.mkdirSync(e,i,n),this.enqueueOp({apiMethod:"mkdir",arguments:[e,i,n]})}readdirSync(e,i){return this._sync.readdirSync(e,i)}existsSync(e,i){return this._sync.existsSync(e,i)}chmodSync(e,i,n){this._sync.chmodSync(e,i,n),this.enqueueOp({apiMethod:"chmod",arguments:[e,i,n]})}chownSync(e,i,n,o){this._sync.chownSync(e,i,n,o),this.enqueueOp({apiMethod:"chown",arguments:[e,i,n,o]})}utimesSync(e,i,n,o){this._sync.utimesSync(e,i,n,o),this.enqueueOp({apiMethod:"utimes",arguments:[e,i,n,o]})}_initialize(){return C(this,null,function*(){if(!this._isInitialized){let e=u((o,a)=>C(this,null,function*(){if(o!=="/"){let m=yield this._async.stat(o,Ye.Root);this._sync.mkdirSync(o,a,m.getCred())}let l=yield this._async.readdir(o,Ye.Root);for(let m of l)yield n(Bt(o,m))}),"copyDirectory"),i=u((o,a)=>C(this,null,function*(){let l=yield this._async.readFile(o,null,We.getFileFlag("r"),Ye.Root);this._sync.writeFileSync(o,l,null,We.getFileFlag("w"),a,Ye.Root)}),"copyFile"),n=u(o=>C(this,null,function*(){let a=yield this._async.stat(o,Ye.Root);a.isDirectory()?yield e(o,a.mode):yield i(o,a.mode)}),"copyItem");try{yield e("/",0),this._isInitialized=!0}catch(o){throw this._isInitialized=!1,o}}return this})}enqueueOp(e){if(this._queue.push(e),!this._queueRunning){this._queueRunning=!0;let i=u(n=>{if(n)throw new Error(`WARNING: File system has desynchronized. Received following error: ${n}
$`);if(this._queue.length>0){let o=this._queue.shift();o.arguments.push(i),this._async[o.apiMethod].apply(this._async,o.arguments)}else this._queueRunning=!1},"doNextOp");i()}}},Sr=Xi;u(Sr,"AsyncMirror"),Sr.Name="AsyncMirror",Sr.Create=Je.bind(Xi),Sr.Options={sync:{type:"object",description:"The synchronous file system to mirror the asynchronous file system to.",validator:e=>C(Xi,null,function*(){if(!(e!=null&&e.metadata.synchronous))throw new T(22,"'sync' option must be a file system that supports synchronous operations")})},async:{type:"object",description:"The asynchronous file system to mirror."}};function Fr(r){return r==="/"?"":r}u(Fr,"fixPath");function Kr(r){let t=r.error;if(t[".tag"])return t;if(t.error){let e=t.error;return e[".tag"]?e:e.reason&&e.reason[".tag"]?e.reason:e}else if(typeof t=="string")try{let e=JSON.parse(t);if(e.error&&e.error.reason&&e.error.reason[".tag"])return e.error.reason}catch(e){}return t}u(Kr,"extractError");function ut(r){if(r.user_message)return r.user_message.text;if(r.error_summary)return r.error_summary;if(typeof r.error=="string")return r.error;if(typeof r.error=="object")return ut(r.error);throw new Error(`Dropbox's servers gave us a garbage error message: ${JSON.stringify(r)}`)}u(ut,"getErrorMessage");function Ji(r,t,e){switch(r[".tag"]){case"malformed_path":return new T(9,e,t);case"not_found":return T.ENOENT(t);case"not_file":return T.EISDIR(t);case"not_folder":return T.ENOTDIR(t);case"restricted_content":return T.EPERM(t);case"other":default:return new T(5,e,t)}}u(Ji,"convertLookupError");function Ri(r,t,e){switch(r[".tag"]){case"malformed_path":case"disallowed_name":return new T(9,e,t);case"conflict":case"no_write_permission":case"team_folder":return T.EPERM(t);case"insufficient_space":return new T(28,e);case"other":default:return new T(5,e,t)}}u(Ri,"convertWriteError");function oo(r,t){return C(this,null,function*(){let e={path:Fr(t)};try{yield r.filesDeleteV2(e)}catch(i){let n=Kr(i);switch(n[".tag"]){case"path_lookup":throw Ji(n.path_lookup,t,ut(i));case"path_write":throw Ri(n.path_write,t,ut(i));case"too_many_write_operations":yield Vi(500),yield oo(r,t);break;case"other":default:throw new T(5,ut(i),t)}}})}u(oo,"deleteFiles");var Qi=class extends Tt{constructor(t,e,i,n,o){super(t,e,i,n,o)}sync(){return C(this,null,function*(){yield this._fs._syncFile(this.getPath(),this.getBuffer())})}close(){return C(this,null,function*(){yield this.sync()})}};u(Qi,"DropboxFile");var ao=class extends gt{constructor(e){super();this._client=e}static isAvailable(){return typeof globalThis.Dropbox!="undefined"}get metadata(){return rt(Xe({},super.metadata),{name:ao.Name})}empty(){return C(this,null,function*(){let e=yield this.readdir("/",Ye.Root);for(let i of e)yield oo(this._client,i)})}rename(e,i,n){return C(this,null,function*(){let o=u(()=>C(this,null,function*(){let a={from_path:Fr(e),to_path:Fr(i)};try{yield this._client.filesMoveV2(a)}catch(l){let m=Kr(l);switch(m[".tag"]){case"from_lookup":throw Ji(m.from_lookup,e,ut(l));case"from_write":throw Ri(m.from_write,e,ut(l));case"to":throw Ri(m.to,i,ut(l));case"cant_copy_shared_folder":case"cant_nest_shared_folder":throw new T(1,ut(l),e);case"cant_move_folder_into_itself":case"duplicated_or_nested_paths":throw new T(9,ut(l),e);case"too_many_files":throw new T(28,ut(l),e);case"other":default:throw new T(5,ut(l),e)}}}),"rename");try{if((yield this.stat(i,n)).isDirectory())throw T.EISDIR(i);yield this.unlink(i,n),o()}catch(a){if(e===i)throw T.ENOENT(i);o()}})}stat(e,i){return C(this,null,function*(){if(e==="/")return new Me(je.DIRECTORY,4096);let n={path:Fr(e)};try{let o=yield this._client.filesGetMetadata(n);switch(o[".tag"]){case"file":let a=o;return new Me(je.FILE,a.size);case"folder":return new Me(je.DIRECTORY,4096);case"deleted":throw T.ENOENT(e);default:throw new T(22,"Invalid file type",e)}}catch(o){let a=Kr(o);switch(a[".tag"]){case"path":throw Ji(a.path,e,ut(o));default:throw new T(5,ut(o),e)}}})}openFile(e,i,n){return C(this,null,function*(){let o={path:Fr(e)};try{let l=yield(yield this._client.filesDownload(o)).fileBlob.arrayBuffer();return new Qi(this,e,i,new Me(je.FILE,l.byteLength),fe.from(l))}catch(a){let l=Kr(a);switch(l[".tag"]){case"path":throw Ji(l.path,e,ut(a));case"other":default:throw new T(5,ut(a),e)}}})}createFile(e,i,n,o){return C(this,null,function*(){let a=fe.alloc(0),m={contents:new Blob([a],{type:"octet/stream"}),path:Fr(e)};try{let y=yield this._client.filesUpload(m);return new Qi(this,e,i,new Me(je.FILE,y.size,420,Date.now(),Date.parse(y.server_modified)),a)}catch(y){let g=Kr(y);switch(g[".tag"]){case"path":throw Ri(g.path.reason,e,ut(y));case"too_many_write_operations":yield Vi(500),yield this.createFile(e,i,n,o);break;case"other":default:throw new T(5,ut(y),e)}}})}unlink(e,i){return C(this,null,function*(){if((yield this.stat(e,i)).isDirectory())throw T.EISDIR(e);yield oo(this._client,e)})}rmdir(e,i){return C(this,null,function*(){if((yield this.readdir(e,i)).length>0)throw T.ENOTEMPTY(e);yield oo(this._client,e)})}mkdir(e,i,n){return C(this,null,function*(){let o=Ze(e),a=yield this.stat(o,n);if(a&&!a.isDirectory())throw T.ENOTDIR(o);let l={path:Fr(e)};try{yield this._client.filesCreateFolderV2(l)}catch(m){let y=Kr(m);if(y[".tag"]==="too_many_write_operations")yield Vi(500),yield this.mkdir(e,i,n);else throw Ri(y.path,e,ut(m))}})}readdir(e,i){return C(this,null,function*(){let n={path:Fr(e)};try{let o=yield this._client.filesListFolder(n);return yield el(this._client,o,e,[])}catch(o){throw Qc(o,e)}})}_syncFile(e,i){return C(this,null,function*(){let o={contents:new Blob([i],{type:"octet/stream"}),path:Fr(e),mode:{".tag":"overwrite"}};try{yield this._client.filesUpload(o)}catch(a){let l=Kr(a);switch(l[".tag"]){case"path":throw Ri(l.path.reason,e,ut(a));case"too_many_write_operations":yield Vi(500),yield this._syncFile(e,i);break;case"other":default:throw new T(5,ut(a),e)}}})}},xr=ao;u(xr,"DropboxFileSystem"),xr.Name="DropboxV2",xr.Create=Je.bind(ao),xr.Options={client:{type:"object",description:"An *authenticated* Dropbox client. Must be from the 2.5.x JS SDK."}};function Qc(r,t){let e=Kr(r);switch(e[".tag"]){case"path":return Ji(e.path,t,ut(r));case"other":default:return new T(5,ut(r),t)}}u(Qc,"convertListFolderError");function el(r,t,e,i){return C(this,null,function*(){try{let n=r.entries.map(l=>l.path_display).filter(l=>!!l),o=i.concat(n);if(!r.has_more)return o;let a={cursor:r.cursor};return yield t.filesListFolderContinue(a),yield el(t,r,e,o)}catch(n){throw Qc(n,e)}})}u(el,"_readdir");function it(r,t=""){let e=r.errno,i=r.node,n=[];for(;i&&(n.unshift(i.name),i!==i.parent);)i=i.parent;return new T(e,mt[e],n.length>0?"/"+n.join("/"):t)}u(it,"convertError");var so=class extends $r{constructor(e,i,n,o){super();this._fs=e;this._FS=i;this._path=n;this._stream=o}getPos(){}close(){return C(this,null,function*(){return this.closeSync()})}closeSync(){try{this._FS.close(this._stream)}catch(e){throw it(e,this._path)}}stat(){return C(this,null,function*(){return this.statSync()})}statSync(){try{return this._fs.statSync(this._path,Ye.Root)}catch(e){throw it(e,this._path)}}truncate(e){return C(this,null,function*(){return this.truncateSync(e)})}truncateSync(e){try{this._FS.ftruncate(this._stream.fd,e)}catch(i){throw it(i,this._path)}}write(e,i,n,o){return C(this,null,function*(){return this.writeSync(e,i,n,o)})}writeSync(e,i,n,o){try{let a=o===null?void 0:o;return this._FS.write(this._stream,e,i,n,a)}catch(a){throw it(a,this._path)}}read(e,i,n,o){return C(this,null,function*(){return{bytesRead:this.readSync(e,i,n,o),buffer:e}})}readSync(e,i,n,o){try{let a=o===null?void 0:o;return this._FS.read(this._stream,e,i,n,a)}catch(a){throw it(a,this._path)}}sync(){return C(this,null,function*(){this.syncSync()})}syncSync(){}chown(e,i){return C(this,null,function*(){return this.chownSync(e,i)})}chownSync(e,i){try{this._FS.fchown(this._stream.fd,e,i)}catch(n){throw it(n,this._path)}}chmod(e){return C(this,null,function*(){return this.chmodSync(e)})}chmodSync(e){try{this._FS.fchmod(this._stream.fd,e)}catch(i){throw it(i,this._path)}}utimes(e,i){return C(this,null,function*(){return this.utimesSync(e,i)})}utimesSync(e,i){this._fs.utimesSync(this._path,e,i,Ye.Root)}};u(so,"EmscriptenFile");var Ja=class extends kt{constructor({FS:e}){super();this._FS=e}static isAvailable(){return!0}get metadata(){return rt(Xe({},super.metadata),{name:this._FS.DB_NAME(),supportsProperties:!0,supportsLinks:!0})}renameSync(e,i,n){try{this._FS.rename(e,i)}catch(o){throw o.errno===2?it(o,this.existsSync(e,n)?i:e):it(o)}}statSync(e,i){try{let n=this._FS.stat(e),o=this.modeToFileType(n.mode);return new Me(o,n.size,n.mode,n.atime.getTime(),n.mtime.getTime(),n.ctime.getTime())}catch(n){throw it(n,e)}}openSync(e,i,n,o){try{let a=this._FS.open(e,i.getFlagString(),n);return new so(this,this._FS,e,a)}catch(a){throw it(a,e)}}unlinkSync(e,i){try{this._FS.unlink(e)}catch(n){throw it(n,e)}}rmdirSync(e,i){try{this._FS.rmdir(e)}catch(n){throw it(n,e)}}mkdirSync(e,i,n){try{this._FS.mkdir(e,i)}catch(o){throw it(o,e)}}readdirSync(e,i){try{return this._FS.readdir(e).filter(n=>n!=="."&&n!=="..")}catch(n){throw it(n,e)}}truncateSync(e,i,n){try{this._FS.truncate(e,i)}catch(o){throw it(o,e)}}readFileSync(e,i,n,o){try{let a=this._FS.readFile(e,{flags:n.getFlagString()}),l=fe.from(a);return i?l.toString(i):l}catch(a){throw it(a,e)}}writeFileSync(e,i,n,o,a,l){try{n&&(i=fe.from(i,n)),this._FS.writeFile(e,i,{flags:o.getFlagString(),encoding:"binary"}),this._FS.chmod(e,a)}catch(m){throw it(m,e)}}chmodSync(e,i,n){try{this._FS.chmod(e,i)}catch(o){throw it(o,e)}}chownSync(e,i,n,o){try{this._FS.chown(e,i,n)}catch(a){throw it(a,e)}}symlinkSync(e,i,n,o){try{this._FS.symlink(e,i)}catch(a){throw it(a)}}readlinkSync(e,i){try{return this._FS.readlink(e)}catch(n){throw it(n,e)}}utimesSync(e,i,n,o){try{this._FS.utime(e,i.getTime(),n.getTime())}catch(a){throw it(a,e)}}modeToFileType(e){if(this._FS.isDir(e))return je.DIRECTORY;if(this._FS.isFile(e))return je.FILE;if(this._FS.isLink(e))return je.SYMLINK;throw T.EPERM(`Invalid mode: ${e}`)}},Ir=Ja;u(Ir,"EmscriptenFileSystem"),Ir.Name="EmscriptenFileSystem",Ir.Create=Je.bind(Ja),Ir.Options={FS:{type:"object",description:"The Emscripten file system to use (the `FS` variable)"}};var uo=u((r="",t)=>{throw t.name==="NotFoundError"?T.ENOENT(r):t},"handleError"),co=class extends Tt{constructor(t,e,i,n,o){super(t,e,i,n,o)}sync(){return C(this,null,function*(){this.isDirty()&&(yield this._fs._sync(this.getPath(),this.getBuffer(),this.getStats(),Ye.Root),this.resetDirty())})}close(){return C(this,null,function*(){yield this.sync()})}};u(co,"FileSystemAccessFile");var lo=class extends gt{constructor({handle:e}){super();this._handles={"/":e}}static isAvailable(){return typeof FileSystemHandle=="function"}get metadata(){return rt(Xe({},super.metadata),{name:lo.Name})}_sync(e,i,n,o){return C(this,null,function*(){let a=yield this.stat(e,o);n.mtime!==a.mtime&&(yield this.writeFile(e,i,null,We.getFileFlag("w"),a.mode,o))})}rename(e,i,n){return C(this,null,function*(){try{let o=yield this.getHandle(e);if(o instanceof FileSystemDirectoryHandle){let a=yield this.readdir(e,n);if(yield this.mkdir(i,"wx",n),a.length===0)yield this.unlink(e,n);else for(let l of a)yield this.rename(Bt(e,l),Bt(i,l),n),yield this.unlink(e,n)}if(o instanceof FileSystemFileHandle){let a=yield o.getFile(),l=yield this.getHandle(Ze(i));if(l instanceof FileSystemDirectoryHandle){let y=yield(yield l.getFileHandle(_t(i),{create:!0})).createWritable(),g=yield a.arrayBuffer();yield y.write(g),y.close(),yield this.unlink(e,n)}}}catch(o){uo(e,o)}})}writeFile(e,i,n,o,a,l,m){return C(this,null,function*(){let y=yield this.getHandle(Ze(e));if(y instanceof FileSystemDirectoryHandle){let w=yield(yield y.getFileHandle(_t(e),{create:!0})).createWritable();yield w.write(i),yield w.close()}})}readFile(e,i,n){return C(this,null,function*(){let o=yield this.getHandle(e);return o instanceof FileSystemFileHandle?yield(yield o.getFile()).text():""})}createFile(e,i,n,o){return C(this,null,function*(){return yield this.writeFile(e,fe.alloc(0),null,i,n,o,!0),this.openFile(e,i,o)})}stat(e,i){return C(this,null,function*(){let n=yield this.getHandle(e);if(!n)throw T.FileError(22,e);if(n instanceof FileSystemDirectoryHandle)return new Me(je.DIRECTORY,4096);if(n instanceof FileSystemFileHandle){let{lastModified:o,size:a}=yield n.getFile();return new Me(je.FILE,a,void 0,void 0,o)}})}exists(e,i){return C(this,null,function*(){try{return yield this.getHandle(e),!0}catch(n){return!1}})}openFile(e,i,n){return C(this,null,function*(){let o=yield this.getHandle(e);if(o instanceof FileSystemFileHandle){let a=yield o.getFile(),l=yield a.arrayBuffer();return this.newFile(e,i,l,a.size,a.lastModified)}})}unlink(e,i){return C(this,null,function*(){let n=yield this.getHandle(Ze(e));if(n instanceof FileSystemDirectoryHandle)try{yield n.removeEntry(_t(e),{recursive:!0})}catch(o){uo(e,o)}})}rmdir(e,i){return C(this,null,function*(){return this.unlink(e,i)})}mkdir(e,i,n){return C(this,null,function*(){let o=i&&i.flag&&i.flag.includes("w")&&!i.flag.includes("x"),a=null;try{a=yield this.getHandle(e)}catch(m){}if(a&&!o)throw T.EEXIST(e);let l=yield this.getHandle(Ze(e));l instanceof FileSystemDirectoryHandle&&(yield l.getDirectoryHandle(_t(e),{create:!0}))})}readdir(e,i){return C(this,null,function*(){let n=yield this.getHandle(e);if(n instanceof FileSystemDirectoryHandle){let y=[];try{for(var o=vu(n.keys()),a,l,m;a=!(l=yield o.next()).done;a=!1){let g=l.value;y.push(g)}}catch(l){m=[l]}finally{try{a&&(l=o.return)&&(yield l.call(o))}finally{if(m)throw m[0]}}return y}})}newFile(e,i,n,o,a){return new co(this,e,i,new Me(je.FILE,o||0,void 0,void 0,a||new Date().getTime()),fe.from(n))}getHandle(e){return C(this,null,function*(){if(e==="/")return this._handles["/"];let i="/",[,...n]=e.split("/"),o=u(m=>C(this,[m],function*([a,...l]){let y=i,g=u(v=>C(this,null,function*(){return i=Bt(i,a),this._handles[i]=v,l.length===0?this._handles[i]:yield o(l)}),"continueWalk"),w=this._handles[i];try{return yield g(yield w.getDirectoryHandle(a))}catch(v){if(v.name==="TypeMismatchError")try{return yield g(yield w.getFileHandle(a))}catch(S){uo(y,S)}else{if(v.message==="Name is not allowed.")throw new T(2,v.message,y);uo(y,v)}}}),"getHandleParts");return yield o(n)})}},Tr=lo;u(Tr,"FileSystemAccessFileSystem"),Tr.Name="FileSystemAccess",Tr.Create=Je.bind(lo),Tr.Options={};var Qa=class extends gt{constructor({folder:e,wrapped:i}){super();this._folder=e,this._wrapped=i,this._ready=this._initialize()}static isAvailable(){return!0}get metadata(){return rt(Xe(Xe({},super.metadata),this._wrapped.metadata),{supportsLinks:!1})}_initialize(){return C(this,null,function*(){if(!(yield this._wrapped.exists(this._folder,Ye.Root))&&this._wrapped.metadata.readonly)throw T.ENOENT(this._folder);return yield this._wrapped.mkdir(this._folder,511,Ye.Root),this})}},rr=Qa;u(rr,"FolderAdapter"),rr.Name="FolderAdapter",rr.Create=Je.bind(Qa),rr.Options={folder:{type:"string",description:"The folder to use as the root directory"},wrapped:{type:"object",description:"The file system to wrap"}};function tl(r,t){if(t!==null&&typeof t=="object"){let e=t,i=e.path;i&&(i="/"+zc(r,i),e.message=e.message.replace(e.path,i),e.path=i)}return t}u(tl,"translateError");function Fm(r,t){return typeof t=="function"?function(e){arguments.length>0&&(arguments[0]=tl(r,e)),t.apply(null,arguments)}:t}u(Fm,"wrapCallback");function rl(r,t,e){return r.slice(r.length-4)!=="Sync"?function(){return arguments.length>0&&(t&&(arguments[0]=Bt(this._folder,arguments[0])),e&&(arguments[1]=Bt(this._folder,arguments[1])),arguments[arguments.length-1]=Fm(this._folder,arguments[arguments.length-1])),this._wrapped[r].apply(this._wrapped,arguments)}:function(){try{return t&&(arguments[0]=Bt(this._folder,arguments[0])),e&&(arguments[1]=Bt(this._folder,arguments[1])),this._wrapped[r].apply(this._wrapped,arguments)}catch(i){throw tl(this._folder,i)}}}u(rl,"wrapFunction");["diskSpace","stat","statSync","open","openSync","unlink","unlinkSync","rmdir","rmdirSync","mkdir","mkdirSync","readdir","readdirSync","exists","existsSync","realpath","realpathSync","truncate","truncateSync","readFile","readFileSync","writeFile","writeFileSync","appendFile","appendFileSync","chmod","chmodSync","chown","chownSync","utimes","utimesSync","readlink","readlinkSync"].forEach(r=>{rr.prototype[r]=rl(r,!0,!1)});["rename","renameSync","link","linkSync","symlink","symlinkSync"].forEach(r=>{rr.prototype[r]=rl(r,!0,!0)});var xm=(()=>{try{return globalThis.indexedDB||globalThis.mozIndexedDB||globalThis.webkitIndexedDB||globalThis.msIndexedDB}catch(r){return null}})();function en(r,t=r.toString()){switch(r.name){case"NotFoundError":return new T(2,t);case"QuotaExceededError":return new T(28,t);default:return new T(5,t)}}u(en,"convertError");function rn(r,t=5,e=null){return function(i){i.preventDefault(),r(new T(t,e!==null?e:void 0))}}u(rn,"onErrorHandler");var tn=class{constructor(t,e){this.tx=t;this.store=e}get(t){return new Promise((e,i)=>{try{let n=this.store.get(t);n.onerror=rn(i),n.onsuccess=o=>{let a=o.target.result;e(a===void 0?a:fe.from(a))}}catch(n){i(en(n))}})}};u(tn,"IndexedDBROTransaction");var fo=class extends tn{constructor(t,e){super(t,e)}put(t,e,i){return new Promise((n,o)=>{try{let a=i?this.store.put(e,t):this.store.add(e,t);a.onerror=rn(o),a.onsuccess=()=>{n(!0)}}catch(a){o(en(a))}})}del(t){return new Promise((e,i)=>{try{let n=this.store.delete(t);n.onerror=rn(i),n.onsuccess=()=>{e()}}catch(n){i(en(n))}})}commit(){return new Promise(t=>{setTimeout(t,0)})}abort(){return new Promise((t,e)=>{try{this.tx.abort(),t()}catch(i){e(en(i))}})}};u(fo,"IndexedDBRWTransaction");var Oi=class{constructor(t,e){this.db=t;this.storeName=e}static Create(t,e){return new Promise((i,n)=>{let o=e.open(t,1);o.onupgradeneeded=a=>{let l=a.target.result;l.objectStoreNames.contains(t)&&l.deleteObjectStore(t),l.createObjectStore(t)},o.onsuccess=a=>{i(new Oi(a.target.result,t))},o.onerror=rn(n,13)})}name(){return ur.Name+" - "+this.storeName}clear(){return new Promise((t,e)=>{try{let i=this.db.transaction(this.storeName,"readwrite"),n=i.objectStore(this.storeName),o=n.clear();o.onsuccess=()=>{setTimeout(t,0)},o.onerror=rn(e)}catch(i){e(en(i))}})}beginTransaction(t="readonly"){let e=this.db.transaction(this.storeName,t),i=e.objectStore(this.storeName);if(t==="readwrite")return new fo(e,i);if(t==="readonly")return new tn(e,i);throw new T(22,"Invalid transaction type.")}};u(Oi,"IndexedDBStore");var es=class extends Ti{static isAvailable(t=globalThis.indexedDB){try{if(!(t instanceof IDBFactory)||!xm.open("__browserfs_test__"))return!1}catch(e){return!1}}constructor({cacheSize:t=100,storeName:e="browserfs",idbFactory:i=globalThis.indexedDB}){super(t),this._ready=Oi.Create(e,i).then(n=>(this.init(n),this))}},ur=es;u(ur,"IndexedDBFileSystem"),ur.Name="IndexedDB",ur.Create=Je.bind(es),ur.Options={storeName:{type:"string",optional:!0,description:"The name of this file system. You can have multiple IndexedDB file systems operating at once, but each must have a different name."},cacheSize:{type:"number",optional:!0,description:"The size of the inode cache. Defaults to 100. A size of 0 or below disables caching."},idbFactory:{type:"object",optional:!0,description:"The IDBFactory to use. Defaults to globalThis.indexedDB."}};var ho=class{constructor(t){this._storage=t}name(){return cr.Name}clear(){this._storage.clear()}beginTransaction(t){return new Wr(this)}get(t){let e=this._storage.getItem(t);if(typeof e=="string")return fe.from(e)}put(t,e,i){try{return!i&&this._storage.getItem(t)!==null?!1:(this._storage.setItem(t,e.toString()),!0)}catch(n){throw new T(28,"Storage is full.")}}del(t){try{this._storage.removeItem(t)}catch(e){throw new T(5,"Unable to delete key "+t+": "+e)}}};u(ho,"StorageStore");var ts=class extends Hr{static isAvailable(t=globalThis.localStorage){return t instanceof Storage}constructor({storage:t=globalThis.localStorage}){super({store:new ho(t)})}},cr=ts;u(cr,"StorageFileSystem"),cr.Name="Storage",cr.Create=Je.bind(ts),cr.Options={storage:{type:"object",optional:!0,description:"The Storage to use. Defaults to globalThis.localStorage."}};var Bi=class{constructor(){this._locks=new Map}lock(t){return new Promise(e=>{this._locks.has(t)?this._locks.get(t).push(e):this._locks.set(t,[])})}unlock(t){if(!this._locks.has(t))throw new Error("unlock of a non-locked mutex");let e=this._locks.get(t).shift();if(e){setTimeout(e,0);return}this._locks.delete(t)}tryLock(t){return this._locks.has(t)?!1:(this._locks.set(t,[]),!0)}isLocked(t){return this._locks.has(t)}};u(Bi,"Mutex");var ki=class{constructor(t){this._ready=Promise.resolve(this);this._fs=t,this._mu=new Bi}whenReady(){return this._ready}get metadata(){return rt(Xe({},this._fs.metadata),{name:"LockedFS<"+this._fs.metadata.name+">"})}get fs(){return this._fs}rename(t,e,i){return C(this,null,function*(){yield this._mu.lock(t),yield this._fs.rename(t,e,i),this._mu.unlock(t)})}renameSync(t,e,i){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.renameSync(t,e,i)}stat(t,e){return C(this,null,function*(){yield this._mu.lock(t);let i=yield this._fs.stat(t,e);return this._mu.unlock(t),i})}statSync(t,e){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.statSync(t,e)}access(t,e,i){return C(this,null,function*(){yield this._mu.lock(t),yield this._fs.access(t,e,i),this._mu.unlock(t)})}accessSync(t,e,i){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.accessSync(t,e,i)}open(t,e,i,n){return C(this,null,function*(){yield this._mu.lock(t);let o=yield this._fs.open(t,e,i,n);return this._mu.unlock(t),o})}openSync(t,e,i,n){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.openSync(t,e,i,n)}unlink(t,e){return C(this,null,function*(){yield this._mu.lock(t),yield this._fs.unlink(t,e),this._mu.unlock(t)})}unlinkSync(t,e){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.unlinkSync(t,e)}rmdir(t,e){return C(this,null,function*(){yield this._mu.lock(t),yield this._fs.rmdir(t,e),this._mu.unlock(t)})}rmdirSync(t,e){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.rmdirSync(t,e)}mkdir(t,e,i){return C(this,null,function*(){yield this._mu.lock(t),yield this._fs.mkdir(t,e,i),this._mu.unlock(t)})}mkdirSync(t,e,i){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.mkdirSync(t,e,i)}readdir(t,e){return C(this,null,function*(){yield this._mu.lock(t);let i=yield this._fs.readdir(t,e);return this._mu.unlock(t),i})}readdirSync(t,e){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.readdirSync(t,e)}exists(t,e){return C(this,null,function*(){yield this._mu.lock(t);let i=yield this._fs.exists(t,e);return this._mu.unlock(t),i})}existsSync(t,e){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.existsSync(t,e)}realpath(t,e){return C(this,null,function*(){yield this._mu.lock(t);let i=yield this._fs.realpath(t,e);return this._mu.unlock(t),i})}realpathSync(t,e){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.realpathSync(t,e)}truncate(t,e,i){return C(this,null,function*(){yield this._mu.lock(t),yield this._fs.truncate(t,e,i),this._mu.unlock(t)})}truncateSync(t,e,i){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.truncateSync(t,e,i)}readFile(t,e,i,n){return C(this,null,function*(){yield this._mu.lock(t);let o=yield this._fs.readFile(t,e,i,n);return this._mu.unlock(t),o})}readFileSync(t,e,i,n){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.readFileSync(t,e,i,n)}writeFile(t,e,i,n,o,a){return C(this,null,function*(){yield this._mu.lock(t),yield this._fs.writeFile(t,e,i,n,o,a),this._mu.unlock(t)})}writeFileSync(t,e,i,n,o,a){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.writeFileSync(t,e,i,n,o,a)}appendFile(t,e,i,n,o,a){return C(this,null,function*(){yield this._mu.lock(t),yield this._fs.appendFile(t,e,i,n,o,a),this._mu.unlock(t)})}appendFileSync(t,e,i,n,o,a){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.appendFileSync(t,e,i,n,o,a)}chmod(t,e,i){return C(this,null,function*(){yield this._mu.lock(t),yield this._fs.chmod(t,e,i),this._mu.unlock(t)})}chmodSync(t,e,i){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.chmodSync(t,e,i)}chown(t,e,i,n){return C(this,null,function*(){yield this._mu.lock(t),yield this._fs.chown(t,e,i,n),this._mu.unlock(t)})}chownSync(t,e,i,n){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.chownSync(t,e,i,n)}utimes(t,e,i,n){return C(this,null,function*(){yield this._mu.lock(t),yield this._fs.utimes(t,e,i,n),this._mu.unlock(t)})}utimesSync(t,e,i,n){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.utimesSync(t,e,i,n)}link(t,e,i){return C(this,null,function*(){yield this._mu.lock(t),yield this._fs.link(t,e,i),this._mu.unlock(t)})}linkSync(t,e,i){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.linkSync(t,e,i)}symlink(t,e,i,n){return C(this,null,function*(){yield this._mu.lock(t),yield this._fs.symlink(t,e,i,n),this._mu.unlock(t)})}symlinkSync(t,e,i,n){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.symlinkSync(t,e,i,n)}readlink(t,e){return C(this,null,function*(){yield this._mu.lock(t);let i=yield this._fs.readlink(t,e);return this._mu.unlock(t),i})}readlinkSync(t,e){if(this._mu.isLocked(t))throw new Error("invalid sync call");return this._fs.readlinkSync(t,e)}};u(ki,"LockedFS");var Ar="/.deletedFiles.log";function il(r){return 146|r}u(il,"makeModeWritable");function zt(r){return We.getFileFlag(r)}u(zt,"getFlag");var nn=class extends Tt{constructor(t,e,i,n,o){super(t,e,i,n,o)}sync(){return C(this,null,function*(){this.isDirty()&&(yield this._fs._syncAsync(this),this.resetDirty())})}syncSync(){this.isDirty()&&(this._fs._syncSync(this),this.resetDirty())}close(){return C(this,null,function*(){yield this.sync()})}closeSync(){this.syncSync()}};u(nn,"OverlayFile");var on=class extends gt{constructor({writable:e,readable:i}){super();this._isInitialized=!1;this._deletedFiles={};this._deleteLog="";this._deleteLogUpdatePending=!1;this._deleteLogUpdateNeeded=!1;this._deleteLogError=null;if(this._writable=e,this._readable=i,this._writable.metadata.readonly)throw new T(22,"Writable file system must be writable.")}static isAvailable(){return!0}get metadata(){return rt(Xe({},super.metadata),{name:lr.Name,synchronous:this._readable.metadata.synchronous&&this._writable.metadata.synchronous,supportsProperties:this._readable.metadata.supportsProperties&&this._writable.metadata.supportsProperties})}getOverlayedFileSystems(){return{readable:this._readable,writable:this._writable}}_syncAsync(e){return C(this,null,function*(){let i=e.getStats();return yield this.createParentDirectoriesAsync(e.getPath(),i.getCred(0,0)),this._writable.writeFile(e.getPath(),e.getBuffer(),null,zt("w"),i.mode,i.getCred(0,0))})}_syncSync(e){let i=e.getStats();this.createParentDirectories(e.getPath(),i.getCred(0,0)),this._writable.writeFileSync(e.getPath(),e.getBuffer(),null,zt("w"),i.mode,i.getCred(0,0))}_initialize(){return C(this,null,function*(){if(!this._isInitialized){try{let e=yield this._writable.readFile(Ar,"utf8",zt("r"),Ye.Root);this._deleteLog=e}catch(e){if(e.errno!==2)throw e}this._isInitialized=!0,this._reparseDeletionLog()}})}getDeletionLog(){return this._deleteLog}restoreDeletionLog(e,i){this._deleteLog=e,this._reparseDeletionLog(),this.updateLog("",i)}rename(e,i,n){return C(this,null,function*(){if(this.checkInitialized(),this.checkPath(e),this.checkPath(i),e===Ar||i===Ar)throw T.EPERM("Cannot rename deletion log.");let o=yield this.stat(e,n);if(o.isDirectory()){if(e===i)return;let a=511;if(yield this.exists(i,n)){let l=yield this.stat(i,n);if(a=l.mode,l.isDirectory()){if((yield this.readdir(i,n)).length>0)throw T.ENOTEMPTY(i)}else throw T.ENOTDIR(i)}if((yield this._writable.exists(e,n))?yield this._writable.rename(e,i,n):(yield this._writable.exists(i,n))||(yield this._writable.mkdir(i,a,n)),yield this._readable.exists(e,n))for(let l of yield this._readable.readdir(e,n))yield this.rename(qt(e,l),qt(i,l),n)}else{if((yield this.exists(i,n))&&(yield this.stat(i,n)).isDirectory())throw T.EISDIR(i);yield this.writeFile(i,yield this.readFile(e,null,zt("r"),n),null,zt("w"),o.mode,n)}e!==i&&(yield this.exists(e,n))&&(yield this.unlink(e,n))})}renameSync(e,i,n){if(this.checkInitialized(),this.checkPath(e),this.checkPath(i),e===Ar||i===Ar)throw T.EPERM("Cannot rename deletion log.");let o=this.statSync(e,n);if(o.isDirectory()){if(e===i)return;let a=511;if(this.existsSync(i,n)){let l=this.statSync(i,n);if(a=l.mode,l.isDirectory()){if(this.readdirSync(i,n).length>0)throw T.ENOTEMPTY(i)}else throw T.ENOTDIR(i)}this._writable.existsSync(e,n)?this._writable.renameSync(e,i,n):this._writable.existsSync(i,n)||this._writable.mkdirSync(i,a,n),this._readable.existsSync(e,n)&&this._readable.readdirSync(e,n).forEach(l=>{this.renameSync(qt(e,l),qt(i,l),n)})}else{if(this.existsSync(i,n)&&this.statSync(i,n).isDirectory())throw T.EISDIR(i);this.writeFileSync(i,this.readFileSync(e,null,zt("r"),n),null,zt("w"),o.mode,n)}e!==i&&this.existsSync(e,n)&&this.unlinkSync(e,n)}stat(e,i){return C(this,null,function*(){this.checkInitialized();try{return this._writable.stat(e,i)}catch(n){if(this._deletedFiles[e])throw T.ENOENT(e);let o=Me.clone(yield this._readable.stat(e,i));return o.mode=il(o.mode),o}})}statSync(e,i){this.checkInitialized();try{return this._writable.statSync(e,i)}catch(n){if(this._deletedFiles[e])throw T.ENOENT(e);let o=Me.clone(this._readable.statSync(e,i));return o.mode=il(o.mode),o}}open(e,i,n,o){return C(this,null,function*(){if(this.checkInitialized(),this.checkPath(e),e===Ar)throw T.EPERM("Cannot open deletion log.");if(yield this.exists(e,o))switch(i.pathExistsAction()){case 2:return yield this.createParentDirectoriesAsync(e,o),this._writable.open(e,i,n,o);case 0:if(yield this._writable.exists(e,o))return this._writable.open(e,i,n,o);{let a=yield this._readable.readFile(e,null,zt("r"),o),l=Me.clone(yield this._readable.stat(e,o));return l.mode=n,new nn(this,e,i,l,a)}default:throw T.EEXIST(e)}else switch(i.pathNotExistsAction()){case 3:return yield this.createParentDirectoriesAsync(e,o),this._writable.open(e,i,n,o);default:throw T.ENOENT(e)}})}openSync(e,i,n,o){if(this.checkInitialized(),this.checkPath(e),e===Ar)throw T.EPERM("Cannot open deletion log.");if(this.existsSync(e,o))switch(i.pathExistsAction()){case 2:return this.createParentDirectories(e,o),this._writable.openSync(e,i,n,o);case 0:if(this._writable.existsSync(e,o))return this._writable.openSync(e,i,n,o);{let a=this._readable.readFileSync(e,null,zt("r"),o),l=Me.clone(this._readable.statSync(e,o));return l.mode=n,new nn(this,e,i,l,a)}default:throw T.EEXIST(e)}else switch(i.pathNotExistsAction()){case 3:return this.createParentDirectories(e,o),this._writable.openSync(e,i,n,o);default:throw T.ENOENT(e)}}unlink(e,i){return C(this,null,function*(){if(this.checkInitialized(),this.checkPath(e),yield this.exists(e,i))(yield this._writable.exists(e,i))&&(yield this._writable.unlink(e,i)),(yield this.exists(e,i))&&this.deletePath(e,i);else throw T.ENOENT(e)})}unlinkSync(e,i){if(this.checkInitialized(),this.checkPath(e),this.existsSync(e,i))this._writable.existsSync(e,i)&&this._writable.unlinkSync(e,i),this.existsSync(e,i)&&this.deletePath(e,i);else throw T.ENOENT(e)}rmdir(e,i){return C(this,null,function*(){if(this.checkInitialized(),yield this.exists(e,i)){if((yield this._writable.exists(e,i))&&(yield this._writable.rmdir(e,i)),yield this.exists(e,i)){if((yield this.readdir(e,i)).length>0)throw T.ENOTEMPTY(e);this.deletePath(e,i)}}else throw T.ENOENT(e)})}rmdirSync(e,i){if(this.checkInitialized(),this.existsSync(e,i)){if(this._writable.existsSync(e,i)&&this._writable.rmdirSync(e,i),this.existsSync(e,i)){if(this.readdirSync(e,i).length>0)throw T.ENOTEMPTY(e);this.deletePath(e,i)}}else throw T.ENOENT(e)}mkdir(e,i,n){return C(this,null,function*(){if(this.checkInitialized(),yield this.exists(e,n))throw T.EEXIST(e);yield this.createParentDirectoriesAsync(e,n),yield this._writable.mkdir(e,i,n)})}mkdirSync(e,i,n){if(this.checkInitialized(),this.existsSync(e,n))throw T.EEXIST(e);this.createParentDirectories(e,n),this._writable.mkdirSync(e,i,n)}readdir(e,i){return C(this,null,function*(){if(this.checkInitialized(),!(yield this.stat(e,i)).isDirectory())throw T.ENOTDIR(e);let o=[];try{o=o.concat(yield this._writable.readdir(e,i))}catch(l){}try{o=o.concat((yield this._readable.readdir(e,i)).filter(l=>!this._deletedFiles[`${e}/${l}`]))}catch(l){}let a={};return o.filter(l=>{let m=!a[l];return a[l]=!0,m})})}readdirSync(e,i){if(this.checkInitialized(),!this.statSync(e,i).isDirectory())throw T.ENOTDIR(e);let o=[];try{o=o.concat(this._writable.readdirSync(e,i))}catch(l){}try{o=o.concat(this._readable.readdirSync(e,i).filter(l=>!this._deletedFiles[`${e}/${l}`]))}catch(l){}let a={};return o.filter(l=>{let m=!a[l];return a[l]=!0,m})}exists(e,i){return C(this,null,function*(){return this.checkInitialized(),(yield this._writable.exists(e,i))||(yield this._readable.exists(e,i))&&this._deletedFiles[e]!==!0})}existsSync(e,i){return this.checkInitialized(),this._writable.existsSync(e,i)||this._readable.existsSync(e,i)&&this._deletedFiles[e]!==!0}chmod(e,i,n){return C(this,null,function*(){this.checkInitialized(),yield this.operateOnWritableAsync(e,n),yield this._writable.chmod(e,i,n)})}chmodSync(e,i,n){this.checkInitialized(),this.operateOnWritable(e,n),this._writable.chmodSync(e,i,n)}chown(e,i,n,o){return C(this,null,function*(){this.checkInitialized(),yield this.operateOnWritableAsync(e,o),yield this._writable.chown(e,i,n,o)})}chownSync(e,i,n,o){this.checkInitialized(),this.operateOnWritable(e,o),this._writable.chownSync(e,i,n,o)}utimes(e,i,n,o){return C(this,null,function*(){this.checkInitialized(),yield this.operateOnWritableAsync(e,o),yield this._writable.utimes(e,i,n,o)})}utimesSync(e,i,n,o){this.checkInitialized(),this.operateOnWritable(e,o),this._writable.utimesSync(e,i,n,o)}deletePath(e,i){this._deletedFiles[e]=!0,this.updateLog(`d${e}
`,i)}updateLog(e,i){this._deleteLog+=e,this._deleteLogUpdatePending?this._deleteLogUpdateNeeded=!0:(this._deleteLogUpdatePending=!0,this._writable.writeFile(Ar,this._deleteLog,"utf8",We.getFileFlag("w"),420,i).then(()=>{this._deleteLogUpdateNeeded&&(this._deleteLogUpdateNeeded=!1,this.updateLog("",i))}).catch(n=>{this._deleteLogError=n}).finally(()=>{this._deleteLogUpdatePending=!1}))}_reparseDeletionLog(){this._deletedFiles={},this._deleteLog.split(`
`).forEach(e=>{this._deletedFiles[e.slice(1)]=e.slice(0,1)==="d"})}checkInitialized(){if(this._isInitialized){if(this._deleteLogError!==null){let e=this._deleteLogError;throw this._deleteLogError=null,e}}else throw new T(1,"OverlayFS is not initialized. Please initialize OverlayFS using its initialize() method before using it.")}checkPath(e){if(e===Ar)throw T.EPERM(e)}createParentDirectories(e,i){let n=Ze(e),o=[];for(;!this._writable.existsSync(n,i);)o.push(n),n=Ze(n);o=o.reverse();for(let a of o)this._writable.mkdirSync(a,this.statSync(a,i).mode,i)}createParentDirectoriesAsync(e,i){return C(this,null,function*(){let n=Ze(e),o=[];for(;!(yield this._writable.exists(n,i));)o.push(n),n=Ze(n);o=o.reverse();for(let a of o){let l=yield this.stat(a,i);yield this._writable.mkdir(a,l.mode,i)}})}operateOnWritable(e,i){if(!this.existsSync(e,i))throw T.ENOENT(e);this._writable.existsSync(e,i)||this.copyToWritable(e,i)}operateOnWritableAsync(e,i){return C(this,null,function*(){if(!(yield this.exists(e,i)))throw T.ENOENT(e);if(!(yield this._writable.exists(e,i)))return this.copyToWritableAsync(e,i)})}copyToWritable(e,i){let n=this.statSync(e,i);n.isDirectory()?this._writable.mkdirSync(e,n.mode,i):this.writeFileSync(e,this._readable.readFileSync(e,null,zt("r"),i),null,zt("w"),n.mode,i)}copyToWritableAsync(e,i){return C(this,null,function*(){let n=yield this.stat(e,i);n.isDirectory()?yield this._writable.mkdir(e,n.mode,i):yield this.writeFile(e,yield this._readable.readFile(e,null,zt("r"),i),null,zt("w"),n.mode,i)})}};u(on,"UnlockedOverlayFS");var po=class extends ki{static isAvailable(){return on.isAvailable()}constructor(t){super(new on(t)),this._ready=this._initialize()}getOverlayedFileSystems(){return super.fs.getOverlayedFileSystems()}getDeletionLog(){return super.fs.getDeletionLog()}resDeletionLog(){return super.fs.getDeletionLog()}unwrap(){return super.fs}_initialize(){return C(this,null,function*(){return yield _u(po.prototype,this,"fs")._initialize(),this})}},lr=po;u(lr,"OverlayFS"),lr.Name="OverlayFS",lr.Create=Je.bind(po),lr.Options={writable:{type:"object",description:"The file system to write modified files to."},readable:{type:"object",description:"The file system that initially populates this file system."}};function Im(r){return typeof r=="object"&&"isBFS"in r&&!!r.isBFS}u(Im,"isRPCMessage");var an=class extends gt{constructor({worker:e}){super();this._currentID=0;this._requests=new Map;this._isInitialized=!1;this._worker=e,this._worker.onmessage=i=>{if(!Im(i.data))return;let{id:n,method:o,value:a}=i.data;if(o==="metadata"){this._metadata=a,this._isInitialized=!0;return}let{resolve:l,reject:m}=this._requests.get(n);if(this._requests.delete(n),a instanceof Error||a instanceof T){m(a);return}l(a)}}static isAvailable(){return typeof importScripts!="undefined"||typeof Worker!="undefined"}get metadata(){return rt(Xe(Xe({},super.metadata),this._metadata),{name:an.Name,synchronous:!1})}_rpc(e,...i){return C(this,null,function*(){return new Promise((n,o)=>{let a=this._currentID++;this._requests.set(a,{resolve:n,reject:o}),this._worker.postMessage({isBFS:!0,id:a,method:e,args:i})})})}rename(e,i,n){return this._rpc("rename",e,i,n)}stat(e,i){return this._rpc("stat",e,i)}open(e,i,n,o){return this._rpc("open",e,i,n,o)}unlink(e,i){return this._rpc("unlink",e,i)}rmdir(e,i){return this._rpc("rmdir",e,i)}mkdir(e,i,n){return this._rpc("mkdir",e,i,n)}readdir(e,i){return this._rpc("readdir",e,i)}exists(e,i){return this._rpc("exists",e,i)}realpath(e,i){return this._rpc("realpath",e,i)}truncate(e,i,n){return this._rpc("truncate",e,i,n)}readFile(e,i,n,o){return this._rpc("readFile",e,i,n,o)}writeFile(e,i,n,o,a,l){return this._rpc("writeFile",e,i,n,o,a,l)}appendFile(e,i,n,o,a,l){return this._rpc("appendFile",e,i,n,o,a,l)}chmod(e,i,n){return this._rpc("chmod",e,i,n)}chown(e,i,n,o){return this._rpc("chown",e,i,n,o)}utimes(e,i,n,o){return this._rpc("utimes",e,i,n,o)}link(e,i,n){return this._rpc("link",e,i,n)}symlink(e,i,n,o){return this._rpc("symlink",e,i,n,o)}readlink(e,i){return this._rpc("readlink",e,i)}syncClose(e,i){return this._rpc("syncClose",e,i)}},Rr=an;u(Rr,"WorkerFS"),Rr.Name="WorkerFS",Rr.Create=Je.bind(an),Rr.Options={worker:{type:"object",description:"The target worker that you want to connect to, or the current worker if in a worker context.",validator:e=>C(an,null,function*(){if(typeof(e==null?void 0:e.postMessage)!="function")throw new T(22,"option must be a Web Worker instance.")})}};var nl=typeof fetch!="undefined"&&fetch!==null;function mo(r){throw new T(5,r.message)}u(mo,"convertError");function rs(r,t){return C(this,null,function*(){let e=yield fetch(r).catch(mo);if(!e.ok)throw new T(5,`fetch error: response returned code ${e.status}`);switch(t){case"buffer":let i=yield e.arrayBuffer().catch(mo);return fe.from(i);case"json":return yield e.json().catch(mo);default:throw new T(22,"Invalid download type: "+t)}})}u(rs,"fetchFile");function ol(r){return C(this,null,function*(){let t=yield fetch(r,{method:"HEAD"}).catch(mo);if(!t.ok)throw new T(5,`fetch HEAD error: response returned code ${t.status}`);return parseInt(t.headers.get("Content-Length")||"-1",10)})}u(ol,"fetchFileSize");var hr=class{static fromListing(t){let e=new hr,i=new fr;e._index["/"]=i;let n=[["",t,i]];for(;n.length>0;){let o,a=n.pop(),l=a[0],m=a[1],y=a[2];for(let g in m)if(Object.prototype.hasOwnProperty.call(m,g)){let w=m[g],v=`${l}/${g}`;w?(e._index[v]=o=new fr,n.push([v,w,o])):o=new Ci(new Me(je.FILE,-1,365)),y&&(y._ls[g]=o)}}return e}constructor(){this._index={},this.addPath("/",new fr)}fileIterator(t){for(let e in this._index)if(Object.prototype.hasOwnProperty.call(this._index,e)){let i=this._index[e],n=i.getListing();for(let o of n){let a=i.getItem(o);Or(a)&&t(a.getData())}}}addPath(t,e){if(!e)throw new Error("Inode must be specified");if(t[0]!=="/")throw new Error("Path must be absolute, got: "+t);if(Object.prototype.hasOwnProperty.call(this._index,t))return this._index[t]===e;let i=this._split_path(t),n=i[0],o=i[1],a=this._index[n];return a===void 0&&t!=="/"&&(a=new fr,!this.addPath(n,a))||t!=="/"&&!a.addItem(o,e)?!1:($t(e)&&(this._index[t]=e),!0)}addPathFast(t,e){let i=t.lastIndexOf("/"),n=i===0?"/":t.substring(0,i),o=t.substring(i+1),a=this._index[n];return a===void 0&&(a=new fr,this.addPathFast(n,a)),a.addItem(o,e)?(e.isDir()&&(this._index[t]=e),!0):!1}removePath(t){let e=this._split_path(t),i=e[0],n=e[1],o=this._index[i];if(o===void 0)return null;let a=o.remItem(n);if(a===null)return null;if($t(a)){let l=a.getListing();for(let m of l)this.removePath(t+"/"+m);t!=="/"&&delete this._index[t]}return a}ls(t){let e=this._index[t];return e===void 0?null:e.getListing()}getInode(t){let e=this._split_path(t),i=e[0],n=e[1],o=this._index[i];return o===void 0?null:i===t?o:o.getItem(n)}_split_path(t){let e=Ze(t),i=t.substr(e.length+(e==="/"?0:1));return[e,i]}};u(hr,"FileIndex");var Ci=class{constructor(t){this.data=t}isFile(){return!0}isDir(){return!1}getData(){return this.data}setData(t){this.data=t}toStats(){return new Me(je.FILE,4096,438)}};u(Ci,"FileInode");var fr=class{constructor(t=null){this.data=t;this._ls={}}isFile(){return!1}isDir(){return!0}getData(){return this.data}getStats(){return new Me(je.DIRECTORY,4096,365)}toStats(){return this.getStats()}getListing(){return Object.keys(this._ls)}getItem(t){let e=this._ls[t];return e||null}addItem(t,e){return t in this._ls?!1:(this._ls[t]=e,!0)}remItem(t){let e=this._ls[t];return e===void 0?null:(delete this._ls[t],e)}};u(fr,"DirInode");function Or(r){return!!r&&r.isFile()}u(Or,"isFileInode");function $t(r){return!!r&&r.isDir()}u($t,"isDirInode");var go=class extends gt{constructor({index:e,baseUrl:i=""}){super();e||(e="index.json");let n=typeof e=="string"?rs(e,"json"):Promise.resolve(e);this._ready=n.then(o=>(this._index=hr.fromListing(o),this)),i.length>0&&i.charAt(i.length-1)!=="/"&&(i=i+"/"),this.prefixUrl=i,this._requestFileInternal=rs,this._requestFileSizeInternal=ol}static isAvailable(){return nl}get metadata(){return rt(Xe({},super.metadata),{name:go.Name,readonly:!0})}empty(){this._index.fileIterator(function(e){e.fileData=null})}preloadFile(e,i){let n=this._index.getInode(e);if(Or(n)){if(n===null)throw T.ENOENT(e);let o=n.getData();o.size=i.length,o.fileData=i}else throw T.EISDIR(e)}stat(e,i){return C(this,null,function*(){let n=this._index.getInode(e);if(n===null)throw T.ENOENT(e);if(!n.toStats().hasAccess(4,i))throw T.EACCES(e);let o;if(Or(n))o=n.getData(),o.size<0&&(o.size=yield this._requestFileSize(e));else if($t(n))o=n.getStats();else throw T.FileError(22,e);return o})}open(e,i,n,o){return C(this,null,function*(){if(i.isWriteable())throw new T(1,e);let a=this._index.getInode(e);if(a===null)throw T.ENOENT(e);if(!a.toStats().hasAccess(i.getMode(),o))throw T.EACCES(e);if(Or(a)||$t(a))switch(i.pathExistsAction()){case 1:case 2:throw T.EEXIST(e);case 0:if($t(a)){let y=a.getStats();return new er(this,e,i,y,y.fileData||void 0)}let l=a.getData();if(l.fileData)return new er(this,e,i,Me.clone(l),l.fileData);let m=yield this._requestFile(e,"buffer");return l.size=m.length,l.fileData=m,new er(this,e,i,Me.clone(l),m);default:throw new T(22,"Invalid FileMode object.")}else throw T.EPERM(e)})}readdir(e,i){return C(this,null,function*(){return this.readdirSync(e,i)})}readFile(e,i,n,o){return C(this,null,function*(){let a=yield this.open(e,n,420,o);try{let m=a.getBuffer();return i===null?ni(m):m.toString(i)}finally{yield a.close()}})}_getHTTPPath(e){return e.charAt(0)==="/"&&(e=e.slice(1)),this.prefixUrl+e}_requestFile(e,i){return this._requestFileInternal(this._getHTTPPath(e),i)}_requestFileSize(e){return this._requestFileSizeInternal(this._getHTTPPath(e))}},dr=go;u(dr,"HTTPRequest"),dr.Name="HTTPRequest",dr.Create=Je.bind(go),dr.Options={index:{type:["string","object"],optional:!0,description:"URL to a file index as a JSON file or the file index object itself, generated with the make_http_index script. Defaults to `index.json`."},baseUrl:{type:"string",optional:!0,description:"Used as the URL prefix for fetched files. Default: Fetch files relative to the index."}};var dl,pl,Ni=typeof Reflect=="object"?Reflect:null,al=Ni&&typeof Ni.apply=="function"?Ni.apply:function(r,t,e){return Function.prototype.apply.call(r,t,e)};pl=Ni&&typeof Ni.ownKeys=="function"?Ni.ownKeys:Object.getOwnPropertySymbols?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:function(r){return Object.getOwnPropertyNames(r)};var sl=Number.isNaN||function(r){return r!=r};function Ge(){Ge.init.call(this)}u(Ge,"o");dl=Ge,Ge.EventEmitter=Ge,Ge.prototype._events=void 0,Ge.prototype._eventsCount=0,Ge.prototype._maxListeners=void 0;var ul=10;function yo(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}u(yo,"u");function ml(r){return r._maxListeners===void 0?Ge.defaultMaxListeners:r._maxListeners}u(ml,"f");function cl(r,t,e,i){var n,o,a,l;if(yo(e),(o=r._events)===void 0?(o=r._events=Object.create(null),r._eventsCount=0):(o.newListener!==void 0&&(r.emit("newListener",t,e.listener?e.listener:e),o=r._events),a=o[t]),a===void 0)a=o[t]=e,++r._eventsCount;else if(typeof a=="function"?a=o[t]=i?[e,a]:[a,e]:i?a.unshift(e):a.push(e),(n=ml(r))>0&&a.length>n&&!a.warned){a.warned=!0;var m=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");m.name="MaxListenersExceededWarning",m.emitter=r,m.type=t,m.count=a.length,l=m,console&&console.warn&&console.warn(l)}return r}u(cl,"v");function Tm(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}u(Tm,"a");function ll(r,t,e){var i={fired:!1,wrapFn:void 0,target:r,type:t,listener:e},n=Tm.bind(i);return n.listener=e,i.wrapFn=n,n}u(ll,"l");function fl(r,t,e){var i=r._events;if(i===void 0)return[];var n=i[t];return n===void 0?[]:typeof n=="function"?e?[n.listener||n]:[n]:e?function(o){for(var a=new Array(o.length),l=0;l<a.length;++l)a[l]=o[l].listener||o[l];return a}(n):gl(n,n.length)}u(fl,"h");function hl(r){var t=this._events;if(t!==void 0){var e=t[r];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}u(hl,"p");function gl(r,t){for(var e=new Array(t),i=0;i<t;++i)e[i]=r[i];return e}u(gl,"c");Object.defineProperty(Ge,"defaultMaxListeners",{enumerable:!0,get:function(){return ul},set:function(r){if(typeof r!="number"||r<0||sl(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");ul=r}}),Ge.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ge.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||sl(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this},Ge.prototype.getMaxListeners=function(){return ml(this)},Ge.prototype.emit=function(r){for(var t=[],e=1;e<arguments.length;e++)t.push(arguments[e]);var i=r==="error",n=this._events;if(n!==void 0)i=i&&n.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=n[r];if(l===void 0)return!1;if(typeof l=="function")al(l,this,t);else{var m=l.length,y=gl(l,m);for(e=0;e<m;++e)al(y[e],this,t)}return!0},Ge.prototype.addListener=function(r,t){return cl(this,r,t,!1)},Ge.prototype.on=Ge.prototype.addListener,Ge.prototype.prependListener=function(r,t){return cl(this,r,t,!0)},Ge.prototype.once=function(r,t){return yo(t),this.on(r,ll(this,r,t)),this},Ge.prototype.prependOnceListener=function(r,t){return yo(t),this.prependListener(r,ll(this,r,t)),this},Ge.prototype.removeListener=function(r,t){var e,i,n,o,a;if(yo(t),(i=this._events)===void 0)return this;if((e=i[r])===void 0)return this;if(e===t||e.listener===t)--this._eventsCount==0?this._events=Object.create(null):(delete i[r],i.removeListener&&this.emit("removeListener",r,e.listener||t));else if(typeof e!="function"){for(n=-1,o=e.length-1;o>=0;o--)if(e[o]===t||e[o].listener===t){a=e[o].listener,n=o;break}if(n<0)return this;n===0?e.shift():function(l,m){for(;m+1<l.length;m++)l[m]=l[m+1];l.pop()}(e,n),e.length===1&&(i[r]=e[0]),i.removeListener!==void 0&&this.emit("removeListener",r,a||t)}return this},Ge.prototype.off=Ge.prototype.removeListener,Ge.prototype.removeAllListeners=function(r){var t,e,i;if((e=this._events)===void 0)return this;if(e.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):e[r]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete e[r]),this;if(arguments.length===0){var n,o=Object.keys(e);for(i=0;i<o.length;++i)(n=o[i])!=="removeListener"&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(t=e[r])=="function")this.removeListener(r,t);else if(t!==void 0)for(i=t.length-1;i>=0;i--)this.removeListener(r,t[i]);return this},Ge.prototype.listeners=function(r){return fl(this,r,!0)},Ge.prototype.rawListeners=function(r){return fl(this,r,!1)},Ge.listenerCount=function(r,t){return typeof r.listenerCount=="function"?r.listenerCount(t):hl.call(r,t)},Ge.prototype.listenerCount=hl,Ge.prototype.eventNames=function(){return this._eventsCount>0?pl(this._events):[]};var vt=dl;vt.EventEmitter;vt.defaultMaxListeners;vt.init;vt.listenerCount;vt.EventEmitter;vt.defaultMaxListeners;vt.init;vt.listenerCount;var bl,kr,Cr,Li=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:global,dt=bl={};function is(){throw new Error("setTimeout has not been defined")}u(is,"i");function ns(){throw new Error("clearTimeout has not been defined")}u(ns,"u");function wl(r){if(kr===setTimeout)return setTimeout(r,0);if((kr===is||!kr)&&setTimeout)return kr=setTimeout,setTimeout(r,0);try{return kr(r,0)}catch(t){try{return kr.call(null,r,0)}catch(e){return kr.call(this||Li,r,0)}}}u(wl,"c");(function(){try{kr=typeof setTimeout=="function"?setTimeout:is}catch(r){kr=is}try{Cr=typeof clearTimeout=="function"?clearTimeout:ns}catch(r){Cr=ns}})();var ai,Nr=[],Di=!1,bo=-1;function Am(){Di&&ai&&(Di=!1,ai.length?Nr=ai.concat(Nr):bo=-1,Nr.length&&_l())}u(Am,"h");function _l(){if(!Di){var r=wl(Am);Di=!0;for(var t=Nr.length;t;){for(ai=Nr,Nr=[];++bo<t;)ai&&ai[bo].run();bo=-1,t=Nr.length}ai=null,Di=!1,function(e){if(Cr===clearTimeout)return clearTimeout(e);if((Cr===ns||!Cr)&&clearTimeout)return Cr=clearTimeout,clearTimeout(e);try{Cr(e)}catch(i){try{return Cr.call(null,e)}catch(n){return Cr.call(this||Li,e)}}}(r)}}u(_l,"d");function yl(r,t){(this||Li).fun=r,(this||Li).array=t}u(yl,"m");function Br(){}u(Br,"p");dt.nextTick=function(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];Nr.push(new yl(r,t)),Nr.length!==1||Di||wl(_l)},yl.prototype.run=function(){(this||Li).fun.apply(null,(this||Li).array)},dt.title="browser",dt.browser=!0,dt.env={},dt.argv=[],dt.version="",dt.versions={},dt.on=Br,dt.addListener=Br,dt.once=Br,dt.off=Br,dt.removeListener=Br,dt.removeAllListeners=Br,dt.emit=Br,dt.prependListener=Br,dt.prependOnceListener=Br,dt.listeners=function(r){return[]},dt.binding=function(r){throw new Error("process.binding is not supported")},dt.cwd=function(){return"/"},dt.chdir=function(r){throw new Error("process.chdir is not supported")},dt.umask=function(){return 0};var Qe=bl;Qe.addListener;Qe.argv;Qe.binding;Qe.browser;Qe.chdir;Qe.cwd;Qe.emit;Qe.env;Qe.listeners;Qe.nextTick;Qe.off;Qe.on;Qe.once;Qe.prependListener;Qe.prependOnceListener;Qe.removeAllListeners;Qe.removeListener;Qe.title;Qe.umask;Qe.version;Qe.versions;var Rm=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",cs=Object.prototype.toString,Bo=u(function(r){return!(Rm&&r&&typeof r=="object"&&Symbol.toStringTag in r)&&cs.call(r)==="[object Arguments]"},"o"),kl=u(function(r){return!!Bo(r)||r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&cs.call(r)!=="[object Array]"&&cs.call(r.callee)==="[object Function]"},"n"),Om=function(){return Bo(arguments)}();Bo.isLegacyArguments=kl;var Bm=Om?Bo:kl,km=Object.prototype.toString,Cm=Function.prototype.toString,Nm=/^\s*(?:function)?\*/,Cl=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",Nl=Object.getPrototypeOf,vl=function(){if(!Cl)return!1;try{return Function("return function*() {}")()}catch(r){}}(),Dm=vl?Nl(vl):{},Lm=u(function(r){return typeof r=="function"&&(!!Nm.test(Cm.call(r))||(Cl?Nl(r)===Dm:km.call(r)==="[object GeneratorFunction]"))},"i"),Pm=typeof Object.create=="function"?function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:function(r,t){if(t){r.super_=t;var e=u(function(){},"o");e.prototype=t.prototype,r.prototype=new e,r.prototype.constructor=r}},Dl=u(function(r){return r&&typeof r=="object"&&typeof r.copy=="function"&&typeof r.fill=="function"&&typeof r.readUInt8=="function"},"i$1"),ze={},Um=Dl,Mm=Bm,jm=Lm;function ci(r){return r.call.bind(r)}u(ci,"c$1");var Ll=typeof BigInt!="undefined",ls=typeof Symbol!="undefined",Zt=ls&&Symbol.toStringTag!==void 0,Nt=typeof Uint8Array!="undefined",zm=typeof ArrayBuffer!="undefined";if(Nt&&Zt)var $m=Object.getPrototypeOf(Uint8Array.prototype),Yt=ci(Object.getOwnPropertyDescriptor($m,Symbol.toStringTag).get);var nt=ci(Object.prototype.toString),Zm=ci(Number.prototype.valueOf),Wm=ci(String.prototype.valueOf),Hm=ci(Boolean.prototype.valueOf);if(Ll)var qm=ci(BigInt.prototype.valueOf);if(ls)var Vm=ci(Symbol.prototype.valueOf);function ln(r,t){if(typeof r!="object")return!1;try{return t(r),!0}catch(e){return!1}}u(ln,"O");function El(r){return Nt&&Zt?Yt(r)!==void 0:Pl(r)||Ul(r)||Ml(r)||jl(r)||zl(r)||$l(r)||Zl(r)||Wl(r)||Hl(r)||ql(r)||Vl(r)}u(El,"S");function Pl(r){return Nt&&Zt?Yt(r)==="Uint8Array":nt(r)==="[object Uint8Array]"||Um(r)&&r.buffer!==void 0}u(Pl,"B");function Ul(r){return Nt&&Zt?Yt(r)==="Uint8ClampedArray":nt(r)==="[object Uint8ClampedArray]"}u(Ul,"k");function Ml(r){return Nt&&Zt?Yt(r)==="Uint16Array":nt(r)==="[object Uint16Array]"}u(Ml,"E");function jl(r){return Nt&&Zt?Yt(r)==="Uint32Array":nt(r)==="[object Uint32Array]"}u(jl,"D");function zl(r){return Nt&&Zt?Yt(r)==="Int8Array":nt(r)==="[object Int8Array]"}u(zl,"U");function $l(r){return Nt&&Zt?Yt(r)==="Int16Array":nt(r)==="[object Int16Array]"}u($l,"P");function Zl(r){return Nt&&Zt?Yt(r)==="Int32Array":nt(r)==="[object Int32Array]"}u(Zl,"x");function Wl(r){return Nt&&Zt?Yt(r)==="Float32Array":nt(r)==="[object Float32Array]"}u(Wl,"I");function Hl(r){return Nt&&Zt?Yt(r)==="Float64Array":nt(r)==="[object Float64Array]"}u(Hl,"M");function ql(r){return Nt&&Zt?Yt(r)==="BigInt64Array":nt(r)==="[object BigInt64Array]"}u(ql,"z");function Vl(r){return Nt&&Zt?Yt(r)==="BigUint64Array":nt(r)==="[object BigUint64Array]"}u(Vl,"F");function wo(r){return nt(r)==="[object Map]"}u(wo,"T");function _o(r){return nt(r)==="[object Set]"}u(_o,"N");function vo(r){return nt(r)==="[object WeakMap]"}u(vo,"W");function os(r){return nt(r)==="[object WeakSet]"}u(os,"$");function xo(r){return nt(r)==="[object ArrayBuffer]"}u(xo,"C");function Sl(r){return typeof ArrayBuffer!="undefined"&&(xo.working?xo(r):r instanceof ArrayBuffer)}u(Sl,"V");function Io(r){return nt(r)==="[object DataView]"}u(Io,"G");function Fl(r){return typeof DataView!="undefined"&&(Io.working?Io(r):r instanceof DataView)}u(Fl,"R");function To(r){return nt(r)==="[object SharedArrayBuffer]"}u(To,"J");function xl(r){return typeof SharedArrayBuffer!="undefined"&&(To.working?To(r):r instanceof SharedArrayBuffer)}u(xl,"_");function Il(r){return ln(r,Zm)}u(Il,"H");function Tl(r){return ln(r,Wm)}u(Tl,"Z");function Al(r){return ln(r,Hm)}u(Al,"q");function Rl(r){return Ll&&ln(r,qm)}u(Rl,"K");function Ol(r){return ls&&ln(r,Vm)}u(Ol,"L");ze.isArgumentsObject=Mm,ze.isGeneratorFunction=jm,ze.isPromise=function(r){return typeof Promise!="undefined"&&r instanceof Promise||r!==null&&typeof r=="object"&&typeof r.then=="function"&&typeof r.catch=="function"},ze.isArrayBufferView=function(r){return zm&&ArrayBuffer.isView?ArrayBuffer.isView(r):El(r)||Fl(r)},ze.isTypedArray=El,ze.isUint8Array=Pl,ze.isUint8ClampedArray=Ul,ze.isUint16Array=Ml,ze.isUint32Array=jl,ze.isInt8Array=zl,ze.isInt16Array=$l,ze.isInt32Array=Zl,ze.isFloat32Array=Wl,ze.isFloat64Array=Hl,ze.isBigInt64Array=ql,ze.isBigUint64Array=Vl,wo.working=typeof Map!="undefined"&&wo(new Map),ze.isMap=function(r){return typeof Map!="undefined"&&(wo.working?wo(r):r instanceof Map)},_o.working=typeof Set!="undefined"&&_o(new Set),ze.isSet=function(r){return typeof Set!="undefined"&&(_o.working?_o(r):r instanceof Set)},vo.working=typeof WeakMap!="undefined"&&vo(new WeakMap),ze.isWeakMap=function(r){return typeof WeakMap!="undefined"&&(vo.working?vo(r):r instanceof WeakMap)},os.working=typeof WeakSet!="undefined"&&os(new WeakSet),ze.isWeakSet=function(r){return os(r)},xo.working=typeof ArrayBuffer!="undefined"&&xo(new ArrayBuffer),ze.isArrayBuffer=Sl,Io.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&Io(new DataView(new ArrayBuffer(1),0,1)),ze.isDataView=Fl,To.working=typeof SharedArrayBuffer!="undefined"&&To(new SharedArrayBuffer),ze.isSharedArrayBuffer=xl,ze.isAsyncFunction=function(r){return nt(r)==="[object AsyncFunction]"},ze.isMapIterator=function(r){return nt(r)==="[object Map Iterator]"},ze.isSetIterator=function(r){return nt(r)==="[object Set Iterator]"},ze.isGeneratorObject=function(r){return nt(r)==="[object Generator]"},ze.isWebAssemblyCompiledModule=function(r){return nt(r)==="[object WebAssembly.Module]"},ze.isNumberObject=Il,ze.isStringObject=Tl,ze.isBooleanObject=Al,ze.isBigIntObject=Rl,ze.isSymbolObject=Ol,ze.isBoxedPrimitive=function(r){return Il(r)||Tl(r)||Al(r)||Rl(r)||Ol(r)},ze.isAnyArrayBuffer=function(r){return Nt&&(Sl(r)||xl(r))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(r){Object.defineProperty(ze,r,{enumerable:!1,value:function(){throw new Error(r+" is not supported in userland")}})});var sn=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:global,Q={},pr=Qe,Bl=Object.getOwnPropertyDescriptors||function(r){for(var t=Object.keys(r),e={},i=0;i<t.length;i++)e[t[i]]=Object.getOwnPropertyDescriptor(r,t[i]);return e},Km=/%[sdj%]/g;Q.format=function(r){if(!Ro(r)){for(var t=[],e=0;e<arguments.length;e++)t.push(Gr(arguments[e]));return t.join(" ")}e=1;for(var i=arguments,n=i.length,o=String(r).replace(Km,function(l){if(l==="%%")return"%";if(e>=n)return l;switch(l){case"%s":return String(i[e++]);case"%d":return Number(i[e++]);case"%j":try{return JSON.stringify(i[e++])}catch(m){return"[Circular]"}default:return l}}),a=i[e];e<n;a=i[++e])ko(a)||!Pi(a)?o+=" "+a:o+=" "+Gr(a);return o},Q.deprecate=function(r,t){if(pr!==void 0&&pr.noDeprecation===!0)return r;if(pr===void 0)return function(){return Q.deprecate(r,t).apply(this||sn,arguments)};var e=!1;return function(){if(!e){if(pr.throwDeprecation)throw new Error(t);pr.traceDeprecation?console.trace(t):console.error(t),e=!0}return r.apply(this||sn,arguments)}};var Eo={},Kl=/^$/;pr.env.NODE_DEBUG&&(So=pr.env.NODE_DEBUG,So=So.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Kl=new RegExp("^"+So+"$","i"));var So;function Gr(r,t){var e={seen:[],stylize:Ym};return arguments.length>=3&&(e.depth=arguments[2]),arguments.length>=4&&(e.colors=arguments[3]),fs(t)?e.showHidden=t:t&&Q._extend(e,t),ui(e.showHidden)&&(e.showHidden=!1),ui(e.depth)&&(e.depth=2),ui(e.colors)&&(e.colors=!1),ui(e.customInspect)&&(e.customInspect=!0),e.colors&&(e.stylize=Gm),Ao(e,r,e.depth)}u(Gr,"oe");function Gm(r,t){var e=Gr.styles[t];return e?"\x1B["+Gr.colors[e][0]+"m"+r+"\x1B["+Gr.colors[e][1]+"m":r}u(Gm,"ue");function Ym(r,t){return r}u(Ym,"fe");function Ao(r,t,e){if(r.customInspect&&t&&Fo(t.inspect)&&t.inspect!==Q.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(e,r);return Ro(i)||(i=Ao(r,i,e)),i}var n=function(v,S){if(ui(S))return v.stylize("undefined","undefined");if(Ro(S)){var E="'"+JSON.stringify(S).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return v.stylize(E,"string")}if(Yl(S))return v.stylize(""+S,"number");if(fs(S))return v.stylize(""+S,"boolean");if(ko(S))return v.stylize("null","null")}(r,t);if(n)return n;var o=Object.keys(t),a=function(v){var S={};return v.forEach(function(E,A){S[E]=!0}),S}(o);if(r.showHidden&&(o=Object.getOwnPropertyNames(t)),cn(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return as(t);if(o.length===0){if(Fo(t)){var l=t.name?": "+t.name:"";return r.stylize("[Function"+l+"]","special")}if(un(t))return r.stylize(RegExp.prototype.toString.call(t),"regexp");if(Oo(t))return r.stylize(Date.prototype.toString.call(t),"date");if(cn(t))return as(t)}var m,y="",g=!1,w=["{","}"];return Gl(t)&&(g=!0,w=["[","]"]),Fo(t)&&(y=" [Function"+(t.name?": "+t.name:"")+"]"),un(t)&&(y=" "+RegExp.prototype.toString.call(t)),Oo(t)&&(y=" "+Date.prototype.toUTCString.call(t)),cn(t)&&(y=" "+as(t)),o.length!==0||g&&t.length!=0?e<0?un(t)?r.stylize(RegExp.prototype.toString.call(t),"regexp"):r.stylize("[Object]","special"):(r.seen.push(t),m=g?function(v,S,E,A,O){for(var U=[],j=0,W=S.length;j<W;++j)Xl(S,String(j))?U.push(ss(v,S,E,A,String(j),!0)):U.push("");return O.forEach(function(se){se.match(/^\d+$/)||U.push(ss(v,S,E,A,se,!0))}),U}(r,t,e,a,o):o.map(function(v){return ss(r,t,e,a,v,g)}),r.seen.pop(),function(v,S,E){var A=0;return v.reduce(function(O,U){return A++,U.indexOf(`
`)>=0&&A++,O+U.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?E[0]+(S===""?"":S+`
`)+" "+v.join(`,
`)+" "+E[1]:E[0]+S+" "+v.join(", ")+" "+E[1]}(m,y,w)):w[0]+y+w[1]}u(Ao,"ae");function as(r){return"["+Error.prototype.toString.call(r)+"]"}u(as,"ce");function ss(r,t,e,i,n,o){var a,l,m;if((m=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?l=m.set?r.stylize("[Getter/Setter]","special"):r.stylize("[Getter]","special"):m.set&&(l=r.stylize("[Setter]","special")),Xl(i,n)||(a="["+n+"]"),l||(r.seen.indexOf(m.value)<0?(l=ko(e)?Ao(r,m.value,null):Ao(r,m.value,e-1)).indexOf(`
`)>-1&&(l=o?l.split(`
`).map(function(y){return" "+y}).join(`
`).substr(2):`
`+l.split(`
`).map(function(y){return" "+y}).join(`
`)):l=r.stylize("[Circular]","special")),ui(a)){if(o&&n.match(/^\d+$/))return l;(a=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=r.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=r.stylize(a,"string"))}return a+": "+l}u(ss,"se");function Gl(r){return Array.isArray(r)}u(Gl,"pe");function fs(r){return typeof r=="boolean"}u(fs,"ye");function ko(r){return r===null}u(ko,"le");function Yl(r){return typeof r=="number"}u(Yl,"de");function Ro(r){return typeof r=="string"}u(Ro,"ge");function ui(r){return r===void 0}u(ui,"be");function un(r){return Pi(r)&&hs(r)==="[object RegExp]"}u(un,"me");function Pi(r){return typeof r=="object"&&r!==null}u(Pi,"he");function Oo(r){return Pi(r)&&hs(r)==="[object Date]"}u(Oo,"je");function cn(r){return Pi(r)&&(hs(r)==="[object Error]"||r instanceof Error)}u(cn,"Ae");function Fo(r){return typeof r=="function"}u(Fo,"we");function hs(r){return Object.prototype.toString.call(r)}u(hs,"ve");function us(r){return r<10?"0"+r.toString(10):r.toString(10)}u(us,"Oe");Q.debuglog=function(r){if(r=r.toUpperCase(),!Eo[r])if(Kl.test(r)){var t=pr.pid;Eo[r]=function(){var e=Q.format.apply(Q,arguments);console.error("%s %d: %s",r,t,e)}}else Eo[r]=function(){};return Eo[r]},Q.inspect=Gr,Gr.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Gr.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},Q.types=ze,Q.isArray=Gl,Q.isBoolean=fs,Q.isNull=ko,Q.isNullOrUndefined=function(r){return r==null},Q.isNumber=Yl,Q.isString=Ro,Q.isSymbol=function(r){return typeof r=="symbol"},Q.isUndefined=ui,Q.isRegExp=un,Q.types.isRegExp=un,Q.isObject=Pi,Q.isDate=Oo,Q.types.isDate=Oo,Q.isError=cn,Q.types.isNativeError=cn,Q.isFunction=Fo,Q.isPrimitive=function(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||r===void 0},Q.isBuffer=Dl;var Xm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Jm(){var r=new Date,t=[us(r.getHours()),us(r.getMinutes()),us(r.getSeconds())].join(":");return[r.getDate(),Xm[r.getMonth()],t].join(" ")}u(Jm,"Be");function Xl(r,t){return Object.prototype.hasOwnProperty.call(r,t)}u(Xl,"ke");Q.log=function(){console.log("%s - %s",Jm(),Q.format.apply(Q,arguments))},Q.inherits=Pm,Q._extend=function(r,t){if(!t||!Pi(t))return r;for(var e=Object.keys(t),i=e.length;i--;)r[e[i]]=t[e[i]];return r};var si=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;function Qm(r,t){if(!r){var e=new Error("Promise was rejected with a falsy value");e.reason=r,r=e}return t(r)}u(Qm,"De");Q.promisify=function(r){if(typeof r!="function")throw new TypeError('The "original" argument must be of type Function');if(si&&r[si]){var t;if(typeof(t=r[si])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,si,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var e,i,n=new Promise(function(l,m){e=l,i=m}),o=[],a=0;a<arguments.length;a++)o.push(arguments[a]);o.push(function(l,m){l?i(l):e(m)});try{r.apply(this||sn,o)}catch(l){i(l)}return n}return u(t,"t"),Object.setPrototypeOf(t,Object.getPrototypeOf(r)),si&&Object.defineProperty(t,si,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,Bl(r))},Q.promisify.custom=si,Q.callbackify=function(r){if(typeof r!="function")throw new TypeError('The "original" argument must be of type Function');function t(){for(var e=[],i=0;i<arguments.length;i++)e.push(arguments[i]);var n=e.pop();if(typeof n!="function")throw new TypeError("The last argument must be of type Function");var o=this||sn,a=u(function(){return n.apply(o,arguments)},"o");r.apply(this||sn,e).then(function(l){pr.nextTick(a.bind(null,null,l))},function(l){pr.nextTick(Qm.bind(null,l,a))})}return u(t,"t"),Object.setPrototypeOf(t,Object.getPrototypeOf(r)),Object.defineProperties(t,Bl(r)),t};Q._extend;Q.callbackify;Q.debuglog;Q.deprecate;Q.format;Q.inherits;Q.inspect;Q.isArray;Q.isBoolean;Q.isBuffer;Q.isDate;Q.isError;Q.isFunction;Q.isNull;Q.isNullOrUndefined;Q.isNumber;Q.isObject;Q.isPrimitive;Q.isRegExp;Q.isString;Q.isSymbol;Q.isUndefined;Q.log;Q.promisify;var OS=Q._extend,BS=Q.callbackify,kS=Q.debuglog,CS=Q.deprecate,NS=Q.format,DS=Q.inherits,LS=Q.inspect,PS=Q.isArray,US=Q.isBoolean,MS=Q.isBuffer,jS=Q.isDate,zS=Q.isError,$S=Q.isFunction,ZS=Q.isNull,WS=Q.isNullOrUndefined,HS=Q.isNumber,qS=Q.isObject,VS=Q.isPrimitive,KS=Q.isRegExp,GS=Q.isString,YS=Q.isSymbol,XS=Q.isUndefined,JS=Q.log,QS=Q.promisify,e1=Q.types,t1=self.TextEncoder,r1=self.TextDecoder;for(lf={byteLength:function(r){var t=ef(r),e=t[0],i=t[1];return 3*(e+i)/4-i},toByteArray:function(r){var t,e,i=ef(r),n=i[0],o=i[1],a=new Jl(function(y,g,w){return 3*(g+w)/4-w}(0,n,o)),l=0,m=o>0?n-4:n;for(e=0;e<m;e+=4)t=Wt[r.charCodeAt(e)]<<18|Wt[r.charCodeAt(e+1)]<<12|Wt[r.charCodeAt(e+2)]<<6|Wt[r.charCodeAt(e+3)],a[l++]=t>>16&255,a[l++]=t>>8&255,a[l++]=255&t;return o===2&&(t=Wt[r.charCodeAt(e)]<<2|Wt[r.charCodeAt(e+1)]>>4,a[l++]=255&t),o===1&&(t=Wt[r.charCodeAt(e)]<<10|Wt[r.charCodeAt(e+1)]<<4|Wt[r.charCodeAt(e+2)]>>2,a[l++]=t>>8&255,a[l++]=255&t),a},fromByteArray:function(r){for(var t,e=r.length,i=e%3,n=[],o=0,a=e-i;o<a;o+=16383)n.push(eg(r,o,o+16383>a?a:o+16383));return i===1?(t=r[e-1],n.push(ir[t>>2]+ir[t<<4&63]+"==")):i===2&&(t=(r[e-2]<<8)+r[e-1],n.push(ir[t>>10]+ir[t>>4&63]+ir[t<<2&63]+"=")),n.join("")}},ir=[],Wt=[],Jl=typeof Uint8Array!="undefined"?Uint8Array:Array,Co="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",li=0,Ql=Co.length;li<Ql;++li)ir[li]=Co[li],Wt[Co.charCodeAt(li)]=li;var lf,ir,Wt,Jl,Co,li,Ql;function ef(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return e===-1&&(e=t),[e,e===t?0:4-e%4]}u(ef,"u$2");function eg(r,t,e){for(var i,n,o=[],a=t;a<e;a+=3)i=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(255&r[a+2]),o.push(ir[(n=i)>>18&63]+ir[n>>12&63]+ir[n>>6&63]+ir[63&n]);return o.join("")}u(eg,"c$1");Wt["-".charCodeAt(0)]=62,Wt["_".charCodeAt(0)]=63;var tg={read:function(r,t,e,i,n){var o,a,l=8*n-i-1,m=(1<<l)-1,y=m>>1,g=-7,w=e?n-1:0,v=e?-1:1,S=r[t+w];for(w+=v,o=S&(1<<-g)-1,S>>=-g,g+=l;g>0;o=256*o+r[t+w],w+=v,g-=8);for(a=o&(1<<-g)-1,o>>=-g,g+=i;g>0;a=256*a+r[t+w],w+=v,g-=8);if(o===0)o=1-y;else{if(o===m)return a?NaN:1/0*(S?-1:1);a+=Math.pow(2,i),o-=y}return(S?-1:1)*a*Math.pow(2,o-i)},write:function(r,t,e,i,n,o){var a,l,m,y=8*o-n-1,g=(1<<y)-1,w=g>>1,v=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=i?0:o-1,E=i?1:-1,A=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,a=g):(a=Math.floor(Math.log(t)/Math.LN2),t*(m=Math.pow(2,-a))<1&&(a--,m*=2),(t+=a+w>=1?v/m:v*Math.pow(2,1-w))*m>=2&&(a++,m/=2),a+w>=g?(l=0,a=g):a+w>=1?(l=(t*m-1)*Math.pow(2,n),a+=w):(l=t*Math.pow(2,w-1)*Math.pow(2,n),a=0));n>=8;r[e+S]=255&l,S+=E,l/=256,n-=8);for(a=a<<n|l,y+=n;y>0;r[e+S]=255&a,S+=E,a/=256,y-=8);r[e+S-E]|=128*A}},Pr={},ms=lf,Ui=tg,tf=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Pr.Buffer=ue,Pr.SlowBuffer=function(r){return+r!=r&&(r=0),ue.alloc(+r)},Pr.INSPECT_MAX_BYTES=50;function Dr(r){if(r>2147483647)throw new RangeError('The value "'+r+'" is invalid for option "size"');var t=new Uint8Array(r);return Object.setPrototypeOf(t,ue.prototype),t}u(Dr,"f$2");function ue(r,t,e){if(typeof r=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return gs(r)}return ff(r,t,e)}u(ue,"u$1$1");function ff(r,t,e){if(typeof r=="string")return function(o,a){if(typeof a=="string"&&a!==""||(a="utf8"),!ue.isEncoding(a))throw new TypeError("Unknown encoding: "+a);var l=0|df(o,a),m=Dr(l),y=m.write(o,a);return y!==l&&(m=m.slice(0,y)),m}(r,t);if(ArrayBuffer.isView(r))return ds(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(Lr(r,ArrayBuffer)||r&&Lr(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Lr(r,SharedArrayBuffer)||r&&Lr(r.buffer,SharedArrayBuffer)))return rf(r,t,e);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var i=r.valueOf&&r.valueOf();if(i!=null&&i!==r)return ue.from(i,t,e);var n=function(o){if(ue.isBuffer(o)){var a=0|ws(o.length),l=Dr(a);return l.length===0||o.copy(l,0,0,a),l}if(o.length!==void 0)return typeof o.length!="number"||_s(o.length)?Dr(0):ds(o);if(o.type==="Buffer"&&Array.isArray(o.data))return ds(o.data)}(r);if(n)return n;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return ue.from(r[Symbol.toPrimitive]("string"),t,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}u(ff,"s$1");function hf(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}u(hf,"h$1$1");function gs(r){return hf(r),Dr(r<0?0:0|ws(r))}u(gs,"a$2");function ds(r){for(var t=r.length<0?0:0|ws(r.length),e=Dr(t),i=0;i<t;i+=1)e[i]=255&r[i];return e}u(ds,"p");function rf(r,t,e){if(t<0||r.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<t+(e||0))throw new RangeError('"length" is outside of buffer bounds');var i;return i=t===void 0&&e===void 0?new Uint8Array(r):e===void 0?new Uint8Array(r,t):new Uint8Array(r,t,e),Object.setPrototypeOf(i,ue.prototype),i}u(rf,"c$1$1");function ws(r){if(r>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|r}u(ws,"l$1");function df(r,t){if(ue.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||Lr(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);var e=r.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&e===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return ys(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return yf(r).length;default:if(n)return i?-1:ys(r).length;t=(""+t).toLowerCase(),n=!0}}u(df,"y");function rg(r,t,e){var i=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0)<=(t>>>=0))return"";for(r||(r="utf8");;)switch(r){case"hex":return fg(this,t,e);case"utf8":case"utf-8":return mf(this,t,e);case"ascii":return cg(this,t,e);case"latin1":case"binary":return lg(this,t,e);case"base64":return ug(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return hg(this,t,e);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0}}u(rg,"g");function fi(r,t,e){var i=r[t];r[t]=r[e],r[e]=i}u(fi,"w");function nf(r,t,e,i,n){if(r.length===0)return-1;if(typeof e=="string"?(i=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),_s(e=+e)&&(e=n?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(n)return-1;e=r.length-1}else if(e<0){if(!n)return-1;e=0}if(typeof t=="string"&&(t=ue.from(t,i)),ue.isBuffer(t))return t.length===0?-1:of(r,t,e,i,n);if(typeof t=="number")return t&=255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):of(r,[t],e,i,n);throw new TypeError("val must be string, number or Buffer")}u(nf,"d");function of(r,t,e,i,n){var o,a=1,l=r.length,m=t.length;if(i!==void 0&&((i=String(i).toLowerCase())==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(r.length<2||t.length<2)return-1;a=2,l/=2,m/=2,e/=2}function y(S,E){return a===1?S[E]:S.readUInt16BE(E*a)}if(u(y,"h"),n){var g=-1;for(o=e;o<l;o++)if(y(r,o)===y(t,g===-1?0:o-g)){if(g===-1&&(g=o),o-g+1===m)return g*a}else g!==-1&&(o-=o-g),g=-1}else for(e+m>l&&(e=l-m),o=e;o>=0;o--){for(var w=!0,v=0;v<m;v++)if(y(r,o+v)!==y(t,v)){w=!1;break}if(w)return o}return-1}u(of,"v");function ig(r,t,e,i){e=Number(e)||0;var n=r.length-e;i?(i=Number(i))>n&&(i=n):i=n;var o=t.length;i>o/2&&(i=o/2);for(var a=0;a<i;++a){var l=parseInt(t.substr(2*a,2),16);if(_s(l))return a;r[e+a]=l}return a}u(ig,"b");function ng(r,t,e,i){return Lo(ys(t,r.length-e),r,e,i)}u(ng,"m");function pf(r,t,e,i){return Lo(function(n){for(var o=[],a=0;a<n.length;++a)o.push(255&n.charCodeAt(a));return o}(t),r,e,i)}u(pf,"E");function og(r,t,e,i){return pf(r,t,e,i)}u(og,"B");function ag(r,t,e,i){return Lo(yf(t),r,e,i)}u(ag,"A");function sg(r,t,e,i){return Lo(function(n,o){for(var a,l,m,y=[],g=0;g<n.length&&!((o-=2)<0);++g)a=n.charCodeAt(g),l=a>>8,m=a%256,y.push(m),y.push(l);return y}(t,r.length-e),r,e,i)}u(sg,"U");function ug(r,t,e){return t===0&&e===r.length?ms.fromByteArray(r):ms.fromByteArray(r.slice(t,e))}u(ug,"T");function mf(r,t,e){e=Math.min(r.length,e);for(var i=[],n=t;n<e;){var o,a,l,m,y=r[n],g=null,w=y>239?4:y>223?3:y>191?2:1;if(n+w<=e)switch(w){case 1:y<128&&(g=y);break;case 2:(192&(o=r[n+1]))==128&&(m=(31&y)<<6|63&o)>127&&(g=m);break;case 3:o=r[n+1],a=r[n+2],(192&o)==128&&(192&a)==128&&(m=(15&y)<<12|(63&o)<<6|63&a)>2047&&(m<55296||m>57343)&&(g=m);break;case 4:o=r[n+1],a=r[n+2],l=r[n+3],(192&o)==128&&(192&a)==128&&(192&l)==128&&(m=(15&y)<<18|(63&o)<<12|(63&a)<<6|63&l)>65535&&m<1114112&&(g=m)}g===null?(g=65533,w=1):g>65535&&(g-=65536,i.push(g>>>10&1023|55296),g=56320|1023&g),i.push(g),n+=w}return function(v){var S=v.length;if(S<=4096)return String.fromCharCode.apply(String,v);for(var E="",A=0;A<S;)E+=String.fromCharCode.apply(String,v.slice(A,A+=4096));return E}(i)}u(mf,"I");Pr.kMaxLength=2147483647,ue.TYPED_ARRAY_SUPPORT=function(){try{var r=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(r,t),r.foo()===42}catch(e){return!1}}(),ue.TYPED_ARRAY_SUPPORT||typeof console=="undefined"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(ue.prototype,"parent",{enumerable:!0,get:function(){if(ue.isBuffer(this))return this.buffer}}),Object.defineProperty(ue.prototype,"offset",{enumerable:!0,get:function(){if(ue.isBuffer(this))return this.byteOffset}}),ue.poolSize=8192,ue.from=function(r,t,e){return ff(r,t,e)},Object.setPrototypeOf(ue.prototype,Uint8Array.prototype),Object.setPrototypeOf(ue,Uint8Array),ue.alloc=function(r,t,e){return function(i,n,o){return hf(i),i<=0?Dr(i):n!==void 0?typeof o=="string"?Dr(i).fill(n,o):Dr(i).fill(n):Dr(i)}(r,t,e)},ue.allocUnsafe=function(r){return gs(r)},ue.allocUnsafeSlow=function(r){return gs(r)},ue.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==ue.prototype},ue.compare=function(r,t){if(Lr(r,Uint8Array)&&(r=ue.from(r,r.offset,r.byteLength)),Lr(t,Uint8Array)&&(t=ue.from(t,t.offset,t.byteLength)),!ue.isBuffer(r)||!ue.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;for(var e=r.length,i=t.length,n=0,o=Math.min(e,i);n<o;++n)if(r[n]!==t[n]){e=r[n],i=t[n];break}return e<i?-1:i<e?1:0},ue.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ue.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return ue.alloc(0);var e;if(t===void 0)for(t=0,e=0;e<r.length;++e)t+=r[e].length;var i=ue.allocUnsafe(t),n=0;for(e=0;e<r.length;++e){var o=r[e];if(Lr(o,Uint8Array)&&(o=ue.from(o)),!ue.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,n),n+=o.length}return i},ue.byteLength=df,ue.prototype._isBuffer=!0,ue.prototype.swap16=function(){var r=this.length;if(r%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<r;t+=2)fi(this,t,t+1);return this},ue.prototype.swap32=function(){var r=this.length;if(r%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<r;t+=4)fi(this,t,t+3),fi(this,t+1,t+2);return this},ue.prototype.swap64=function(){var r=this.length;if(r%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<r;t+=8)fi(this,t,t+7),fi(this,t+1,t+6),fi(this,t+2,t+5),fi(this,t+3,t+4);return this},ue.prototype.toString=function(){var r=this.length;return r===0?"":arguments.length===0?mf(this,0,r):rg.apply(this,arguments)},ue.prototype.toLocaleString=ue.prototype.toString,ue.prototype.equals=function(r){if(!ue.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r||ue.compare(this,r)===0},ue.prototype.inspect=function(){var r="",t=Pr.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"},tf&&(ue.prototype[tf]=ue.prototype.inspect),ue.prototype.compare=function(r,t,e,i,n){if(Lr(r,Uint8Array)&&(r=ue.from(r,r.offset,r.byteLength)),!ue.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),e===void 0&&(e=r?r.length:0),i===void 0&&(i=0),n===void 0&&(n=this.length),t<0||e>r.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=e)return 0;if(i>=n)return-1;if(t>=e)return 1;if(this===r)return 0;for(var o=(n>>>=0)-(i>>>=0),a=(e>>>=0)-(t>>>=0),l=Math.min(o,a),m=this.slice(i,n),y=r.slice(t,e),g=0;g<l;++g)if(m[g]!==y[g]){o=m[g],a=y[g];break}return o<a?-1:a<o?1:0},ue.prototype.includes=function(r,t,e){return this.indexOf(r,t,e)!==-1},ue.prototype.indexOf=function(r,t,e){return nf(this,r,t,e,!0)},ue.prototype.lastIndexOf=function(r,t,e){return nf(this,r,t,e,!1)},ue.prototype.write=function(r,t,e,i){if(t===void 0)i="utf8",e=this.length,t=0;else if(e===void 0&&typeof t=="string")i=t,e=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(e)?(e>>>=0,i===void 0&&(i="utf8")):(i=e,e=void 0)}var n=this.length-t;if((e===void 0||e>n)&&(e=n),r.length>0&&(e<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return ig(this,r,t,e);case"utf8":case"utf-8":return ng(this,r,t,e);case"ascii":return pf(this,r,t,e);case"latin1":case"binary":return og(this,r,t,e);case"base64":return ag(this,r,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return sg(this,r,t,e);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},ue.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function cg(r,t,e){var i="";e=Math.min(r.length,e);for(var n=t;n<e;++n)i+=String.fromCharCode(127&r[n]);return i}u(cg,"S");function lg(r,t,e){var i="";e=Math.min(r.length,e);for(var n=t;n<e;++n)i+=String.fromCharCode(r[n]);return i}u(lg,"R");function fg(r,t,e){var i=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>i)&&(e=i);for(var n="",o=t;o<e;++o)n+=pg[r[o]];return n}u(fg,"O");function hg(r,t,e){for(var i=r.slice(t,e),n="",o=0;o<i.length;o+=2)n+=String.fromCharCode(i[o]+256*i[o+1]);return n}u(hg,"L");function Et(r,t,e){if(r%1!=0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}u(Et,"x");function Dt(r,t,e,i,n,o){if(!ue.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(e+i>r.length)throw new RangeError("Index out of range")}u(Dt,"C");function gf(r,t,e,i,n,o){if(e+i>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}u(gf,"P");function af(r,t,e,i,n){return t=+t,e>>>=0,n||gf(r,0,e,4),Ui.write(r,t,e,i,23,4),e+4}u(af,"k");function sf(r,t,e,i,n){return t=+t,e>>>=0,n||gf(r,0,e,8),Ui.write(r,t,e,i,52,8),e+8}u(sf,"M");ue.prototype.slice=function(r,t){var e=this.length;(r=~~r)<0?(r+=e)<0&&(r=0):r>e&&(r=e),(t=t===void 0?e:~~t)<0?(t+=e)<0&&(t=0):t>e&&(t=e),t<r&&(t=r);var i=this.subarray(r,t);return Object.setPrototypeOf(i,ue.prototype),i},ue.prototype.readUIntLE=function(r,t,e){r>>>=0,t>>>=0,e||Et(r,t,this.length);for(var i=this[r],n=1,o=0;++o<t&&(n*=256);)i+=this[r+o]*n;return i},ue.prototype.readUIntBE=function(r,t,e){r>>>=0,t>>>=0,e||Et(r,t,this.length);for(var i=this[r+--t],n=1;t>0&&(n*=256);)i+=this[r+--t]*n;return i},ue.prototype.readUInt8=function(r,t){return r>>>=0,t||Et(r,1,this.length),this[r]},ue.prototype.readUInt16LE=function(r,t){return r>>>=0,t||Et(r,2,this.length),this[r]|this[r+1]<<8},ue.prototype.readUInt16BE=function(r,t){return r>>>=0,t||Et(r,2,this.length),this[r]<<8|this[r+1]},ue.prototype.readUInt32LE=function(r,t){return r>>>=0,t||Et(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+16777216*this[r+3]},ue.prototype.readUInt32BE=function(r,t){return r>>>=0,t||Et(r,4,this.length),16777216*this[r]+(this[r+1]<<16|this[r+2]<<8|this[r+3])},ue.prototype.readIntLE=function(r,t,e){r>>>=0,t>>>=0,e||Et(r,t,this.length);for(var i=this[r],n=1,o=0;++o<t&&(n*=256);)i+=this[r+o]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*t)),i},ue.prototype.readIntBE=function(r,t,e){r>>>=0,t>>>=0,e||Et(r,t,this.length);for(var i=t,n=1,o=this[r+--i];i>0&&(n*=256);)o+=this[r+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*t)),o},ue.prototype.readInt8=function(r,t){return r>>>=0,t||Et(r,1,this.length),128&this[r]?-1*(255-this[r]+1):this[r]},ue.prototype.readInt16LE=function(r,t){r>>>=0,t||Et(r,2,this.length);var e=this[r]|this[r+1]<<8;return 32768&e?4294901760|e:e},ue.prototype.readInt16BE=function(r,t){r>>>=0,t||Et(r,2,this.length);var e=this[r+1]|this[r]<<8;return 32768&e?4294901760|e:e},ue.prototype.readInt32LE=function(r,t){return r>>>=0,t||Et(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},ue.prototype.readInt32BE=function(r,t){return r>>>=0,t||Et(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},ue.prototype.readFloatLE=function(r,t){return r>>>=0,t||Et(r,4,this.length),Ui.read(this,r,!0,23,4)},ue.prototype.readFloatBE=function(r,t){return r>>>=0,t||Et(r,4,this.length),Ui.read(this,r,!1,23,4)},ue.prototype.readDoubleLE=function(r,t){return r>>>=0,t||Et(r,8,this.length),Ui.read(this,r,!0,52,8)},ue.prototype.readDoubleBE=function(r,t){return r>>>=0,t||Et(r,8,this.length),Ui.read(this,r,!1,52,8)},ue.prototype.writeUIntLE=function(r,t,e,i){r=+r,t>>>=0,e>>>=0,i||Dt(this,r,t,e,Math.pow(2,8*e)-1,0);var n=1,o=0;for(this[t]=255&r;++o<e&&(n*=256);)this[t+o]=r/n&255;return t+e},ue.prototype.writeUIntBE=function(r,t,e,i){r=+r,t>>>=0,e>>>=0,i||Dt(this,r,t,e,Math.pow(2,8*e)-1,0);var n=e-1,o=1;for(this[t+n]=255&r;--n>=0&&(o*=256);)this[t+n]=r/o&255;return t+e},ue.prototype.writeUInt8=function(r,t,e){return r=+r,t>>>=0,e||Dt(this,r,t,1,255,0),this[t]=255&r,t+1},ue.prototype.writeUInt16LE=function(r,t,e){return r=+r,t>>>=0,e||Dt(this,r,t,2,65535,0),this[t]=255&r,this[t+1]=r>>>8,t+2},ue.prototype.writeUInt16BE=function(r,t,e){return r=+r,t>>>=0,e||Dt(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=255&r,t+2},ue.prototype.writeUInt32LE=function(r,t,e){return r=+r,t>>>=0,e||Dt(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=255&r,t+4},ue.prototype.writeUInt32BE=function(r,t,e){return r=+r,t>>>=0,e||Dt(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=255&r,t+4},ue.prototype.writeIntLE=function(r,t,e,i){if(r=+r,t>>>=0,!i){var n=Math.pow(2,8*e-1);Dt(this,r,t,e,n-1,-n)}var o=0,a=1,l=0;for(this[t]=255&r;++o<e&&(a*=256);)r<0&&l===0&&this[t+o-1]!==0&&(l=1),this[t+o]=(r/a>>0)-l&255;return t+e},ue.prototype.writeIntBE=function(r,t,e,i){if(r=+r,t>>>=0,!i){var n=Math.pow(2,8*e-1);Dt(this,r,t,e,n-1,-n)}var o=e-1,a=1,l=0;for(this[t+o]=255&r;--o>=0&&(a*=256);)r<0&&l===0&&this[t+o+1]!==0&&(l=1),this[t+o]=(r/a>>0)-l&255;return t+e},ue.prototype.writeInt8=function(r,t,e){return r=+r,t>>>=0,e||Dt(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=255&r,t+1},ue.prototype.writeInt16LE=function(r,t,e){return r=+r,t>>>=0,e||Dt(this,r,t,2,32767,-32768),this[t]=255&r,this[t+1]=r>>>8,t+2},ue.prototype.writeInt16BE=function(r,t,e){return r=+r,t>>>=0,e||Dt(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=255&r,t+2},ue.prototype.writeInt32LE=function(r,t,e){return r=+r,t>>>=0,e||Dt(this,r,t,4,2147483647,-2147483648),this[t]=255&r,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4},ue.prototype.writeInt32BE=function(r,t,e){return r=+r,t>>>=0,e||Dt(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=255&r,t+4},ue.prototype.writeFloatLE=function(r,t,e){return af(this,r,t,!0,e)},ue.prototype.writeFloatBE=function(r,t,e){return af(this,r,t,!1,e)},ue.prototype.writeDoubleLE=function(r,t,e){return sf(this,r,t,!0,e)},ue.prototype.writeDoubleBE=function(r,t,e){return sf(this,r,t,!1,e)},ue.prototype.copy=function(r,t,e,i){if(!ue.isBuffer(r))throw new TypeError("argument should be a Buffer");if(e||(e=0),i||i===0||(i=this.length),t>=r.length&&(t=r.length),t||(t=0),i>0&&i<e&&(i=e),i===e||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-t<i-e&&(i=r.length-t+e);var n=i-e;if(this===r&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(t,e,i);else if(this===r&&e<t&&t<i)for(var o=n-1;o>=0;--o)r[o+t]=this[o+e];else Uint8Array.prototype.set.call(r,this.subarray(e,i),t);return n},ue.prototype.fill=function(r,t,e,i){if(typeof r=="string"){if(typeof t=="string"?(i=t,t=0,e=this.length):typeof e=="string"&&(i=e,e=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!ue.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(r.length===1){var n=r.charCodeAt(0);(i==="utf8"&&n<128||i==="latin1")&&(r=n)}}else typeof r=="number"?r&=255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<e)throw new RangeError("Out of range index");if(e<=t)return this;var o;if(t>>>=0,e=e===void 0?this.length:e>>>0,r||(r=0),typeof r=="number")for(o=t;o<e;++o)this[o]=r;else{var a=ue.isBuffer(r)?r:ue.from(r,i),l=a.length;if(l===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(o=0;o<e-t;++o)this[o+t]=a[o%l]}return this};var dg=/[^+/0-9A-Za-z-_]/g;function ys(r,t){var e;t=t||1/0;for(var i=r.length,n=null,o=[],a=0;a<i;++a){if((e=r.charCodeAt(a))>55295&&e<57344){if(!n){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&o.push(239,191,189);continue}n=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),n=e;continue}e=65536+(n-55296<<10|e-56320)}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}u(ys,"_");function yf(r){return ms.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(dg,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(r))}u(yf,"z");function Lo(r,t,e,i){for(var n=0;n<i&&!(n+e>=t.length||n>=r.length);++n)t[n+e]=r[n];return n}u(Lo,"D");function Lr(r,t){return r instanceof t||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===t.name}u(Lr,"F");function _s(r){return r!=r}u(_s,"N");var pg=function(){for(var r=new Array(256),t=0;t<16;++t)for(var e=16*t,i=0;i<16;++i)r[e+i]="0123456789abcdef"[t]+"0123456789abcdef"[i];return r}();Pr.Buffer;Pr.INSPECT_MAX_BYTES;Pr.kMaxLength;var No={},Do=Pr,mr=Do.Buffer;function uf(r,t){for(var e in r)t[e]=r[e]}u(uf,"t");function hi(r,t,e){return mr(r,t,e)}u(hi,"f");mr.from&&mr.alloc&&mr.allocUnsafe&&mr.allocUnsafeSlow?No=Do:(uf(Do,No),No.Buffer=hi),hi.prototype=Object.create(mr.prototype),uf(mr,hi),hi.from=function(r,t,e){if(typeof r=="number")throw new TypeError("Argument must not be a number");return mr(r,t,e)},hi.alloc=function(r,t,e){if(typeof r!="number")throw new TypeError("Argument must be a number");var i=mr(r);return t!==void 0?typeof e=="string"?i.fill(t,e):i.fill(t):i.fill(0),i},hi.allocUnsafe=function(r){if(typeof r!="number")throw new TypeError("Argument must be a number");return mr(r)},hi.allocUnsafeSlow=function(r){if(typeof r!="number")throw new TypeError("Argument must be a number");return Do.SlowBuffer(r)};var mg=No,Mi={},bs=mg.Buffer,cf=bs.isEncoding||function(r){switch((r=""+r)&&r.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function fn(r){var t;switch(this.encoding=function(e){var i=function(n){if(!n)return"utf8";for(var o;;)switch(n){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return n;default:if(o)return;n=(""+n).toLowerCase(),o=!0}}(e);if(typeof i!="string"&&(bs.isEncoding===cf||!cf(e)))throw new Error("Unknown encoding: "+e);return i||e}(r),this.encoding){case"utf16le":this.text=yg,this.end=bg,t=4;break;case"utf8":this.fillLast=gg,t=4;break;case"base64":this.text=wg,this.end=_g,t=3;break;default:return this.write=vg,this.end=Eg,void 0}this.lastNeed=0,this.lastTotal=0,this.lastChar=bs.allocUnsafe(t)}u(fn,"a");function ps(r){return r<=127?0:r>>5==6?2:r>>4==14?3:r>>3==30?4:r>>6==2?-1:-2}u(ps,"r");function gg(r){var t=this.lastTotal-this.lastNeed,e=function(i,n,o){if((192&n[0])!=128)return i.lastNeed=0,"\uFFFD";if(i.lastNeed>1&&n.length>1){if((192&n[1])!=128)return i.lastNeed=1,"\uFFFD";if(i.lastNeed>2&&n.length>2&&(192&n[2])!=128)return i.lastNeed=2,"\uFFFD"}}(this,r);return e!==void 0?e:this.lastNeed<=r.length?(r.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(r.copy(this.lastChar,t,0,r.length),this.lastNeed-=r.length,void 0)}u(gg,"n$1");function yg(r,t){if((r.length-t)%2==0){var e=r.toString("utf16le",t);if(e){var i=e.charCodeAt(e.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1],e.slice(0,-1)}return e}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=r[r.length-1],r.toString("utf16le",t,r.length-1)}u(yg,"h");function bg(r){var t=r&&r.length?this.write(r):"";if(this.lastNeed){var e=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,e)}return t}u(bg,"l");function wg(r,t){var e=(r.length-t)%3;return e===0?r.toString("base64",t):(this.lastNeed=3-e,this.lastTotal=3,e===1?this.lastChar[0]=r[r.length-1]:(this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1]),r.toString("base64",t,r.length-e))}u(wg,"u$1");function _g(r){var t=r&&r.length?this.write(r):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}u(_g,"o$1");function vg(r){return r.toString(this.encoding)}u(vg,"f$1");function Eg(r){return r&&r.length?this.write(r):""}u(Eg,"c");Mi.StringDecoder=fn,fn.prototype.write=function(r){if(r.length===0)return"";var t,e;if(this.lastNeed){if((t=this.fillLast(r))===void 0)return"";e=this.lastNeed,this.lastNeed=0}else e=0;return e<r.length?t?t+this.text(r,e):this.text(r,e):t||""},fn.prototype.end=function(r){var t=r&&r.length?this.write(r):"";return this.lastNeed?t+"\uFFFD":t},fn.prototype.text=function(r,t){var e=function(n,o,a){var l=o.length-1;if(l<a)return 0;var m=ps(o[l]);return m>=0?(m>0&&(n.lastNeed=m-1),m):--l<a||m===-2?0:(m=ps(o[l]))>=0?(m>0&&(n.lastNeed=m-2),m):--l<a||m===-2?0:(m=ps(o[l]))>=0?(m>0&&(m===2?m=0:n.lastNeed=m-3),m):0}(this,r,t);if(!this.lastNeed)return r.toString("utf8",t);this.lastTotal=e;var i=r.length-(e-this.lastNeed);return r.copy(this.lastChar,0,i),r.toString("utf8",t,i)},fn.prototype.fillLast=function(r){if(this.lastNeed<=r.length)return r.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);r.copy(this.lastChar,this.lastTotal-this.lastNeed,0,r.length),this.lastNeed-=r.length};Mi.StringDecoder;Mi.StringDecoder;var hn={},bf=!1;function Sg(){if(bf)return hn;bf=!0,hn.byteLength=l,hn.toByteArray=y,hn.fromByteArray=v;for(var r=[],t=[],e=typeof Uint8Array!="undefined"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=i.length;n<o;++n)r[n]=i[n],t[i.charCodeAt(n)]=n;t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;function a(S){var E=S.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var A=S.indexOf("=");A===-1&&(A=E);var O=A===E?0:4-A%4;return[A,O]}u(a,"getLens");function l(S){var E=a(S),A=E[0],O=E[1];return(A+O)*3/4-O}u(l,"byteLength");function m(S,E,A){return(E+A)*3/4-A}u(m,"_byteLength");function y(S){var E,A=a(S),O=A[0],U=A[1],j=new e(m(S,O,U)),W=0,se=U>0?O-4:O,Y;for(Y=0;Y<se;Y+=4)E=t[S.charCodeAt(Y)]<<18|t[S.charCodeAt(Y+1)]<<12|t[S.charCodeAt(Y+2)]<<6|t[S.charCodeAt(Y+3)],j[W++]=E>>16&255,j[W++]=E>>8&255,j[W++]=E&255;return U===2&&(E=t[S.charCodeAt(Y)]<<2|t[S.charCodeAt(Y+1)]>>4,j[W++]=E&255),U===1&&(E=t[S.charCodeAt(Y)]<<10|t[S.charCodeAt(Y+1)]<<4|t[S.charCodeAt(Y+2)]>>2,j[W++]=E>>8&255,j[W++]=E&255),j}u(y,"toByteArray");function g(S){return r[S>>18&63]+r[S>>12&63]+r[S>>6&63]+r[S&63]}u(g,"tripletToBase64");function w(S,E,A){for(var O,U=[],j=E;j<A;j+=3)O=(S[j]<<16&16711680)+(S[j+1]<<8&65280)+(S[j+2]&255),U.push(g(O));return U.join("")}u(w,"encodeChunk");function v(S){for(var E,A=S.length,O=A%3,U=[],j=16383,W=0,se=A-O;W<se;W+=j)U.push(w(S,W,W+j>se?se:W+j));return O===1?(E=S[A-1],U.push(r[E>>2]+r[E<<4&63]+"==")):O===2&&(E=(S[A-2]<<8)+S[A-1],U.push(r[E>>10]+r[E>>4&63]+r[E<<2&63]+"=")),U.join("")}return u(v,"fromByteArray"),hn}u(Sg,"dew$2$1");var Po={},wf=!1;function Fg(){if(wf)return Po;wf=!0;return Po.read=function(r,t,e,i,n){var o,a,l=n*8-i-1,m=(1<<l)-1,y=m>>1,g=-7,w=e?n-1:0,v=e?-1:1,S=r[t+w];for(w+=v,o=S&(1<<-g)-1,S>>=-g,g+=l;g>0;o=o*256+r[t+w],w+=v,g-=8);for(a=o&(1<<-g)-1,o>>=-g,g+=i;g>0;a=a*256+r[t+w],w+=v,g-=8);if(o===0)o=1-y;else{if(o===m)return a?NaN:(S?-1:1)*(1/0);a=a+Math.pow(2,i),o=o-y}return(S?-1:1)*a*Math.pow(2,o-i)},Po.write=function(r,t,e,i,n,o){var a,l,m,y=o*8-n-1,g=(1<<y)-1,w=g>>1,v=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=i?0:o-1,E=i?1:-1,A=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,a=g):(a=Math.floor(Math.log(t)/Math.LN2),t*(m=Math.pow(2,-a))<1&&(a--,m*=2),a+w>=1?t+=v/m:t+=v*Math.pow(2,1-w),t*m>=2&&(a++,m/=2),a+w>=g?(l=0,a=g):a+w>=1?(l=(t*m-1)*Math.pow(2,n),a=a+w):(l=t*Math.pow(2,w-1)*Math.pow(2,n),a=0));n>=8;r[e+S]=l&255,S+=E,l/=256,n-=8);for(a=a<<n|l,y+=n;y>0;r[e+S]=a&255,S+=E,a/=256,y-=8);r[e+S-E]|=A*128},Po}u(Fg,"dew$1$1");var di={},_f=!1;function xg(){if(_f)return di;_f=!0;let r=Sg(),t=Fg(),e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;di.Buffer=a,di.SlowBuffer=U,di.INSPECT_MAX_BYTES=50;let i=2147483647;di.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=n(),!a.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function n(){try{let f=new Uint8Array(1),s={foo:function(){return 42}};return Object.setPrototypeOf(s,Uint8Array.prototype),Object.setPrototypeOf(f,s),f.foo()===42}catch(f){return!1}}u(n,"typedArraySupport"),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(f){if(f>i)throw new RangeError('The value "'+f+'" is invalid for option "size"');let s=new Uint8Array(f);return Object.setPrototypeOf(s,a.prototype),s}u(o,"createBuffer");function a(f,s,c){if(typeof f=="number"){if(typeof s=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(f)}return l(f,s,c)}u(a,"Buffer"),a.poolSize=8192;function l(f,s,c){if(typeof f=="string")return w(f,s);if(ArrayBuffer.isView(f))return S(f);if(f==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f);if(He(f,ArrayBuffer)||f&&He(f.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(He(f,SharedArrayBuffer)||f&&He(f.buffer,SharedArrayBuffer)))return E(f,s,c);if(typeof f=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let p=f.valueOf&&f.valueOf();if(p!=null&&p!==f)return a.from(p,s,c);let _=A(f);if(_)return _;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof f[Symbol.toPrimitive]=="function")return a.from(f[Symbol.toPrimitive]("string"),s,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f)}u(l,"from"),a.from=function(f,s,c){return l(f,s,c)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function m(f){if(typeof f!="number")throw new TypeError('"size" argument must be of type number');if(f<0)throw new RangeError('The value "'+f+'" is invalid for option "size"')}u(m,"assertSize");function y(f,s,c){return m(f),f<=0?o(f):s!==void 0?typeof c=="string"?o(f).fill(s,c):o(f).fill(s):o(f)}u(y,"alloc"),a.alloc=function(f,s,c){return y(f,s,c)};function g(f){return m(f),o(f<0?0:O(f)|0)}u(g,"allocUnsafe"),a.allocUnsafe=function(f){return g(f)},a.allocUnsafeSlow=function(f){return g(f)};function w(f,s){if((typeof s!="string"||s==="")&&(s="utf8"),!a.isEncoding(s))throw new TypeError("Unknown encoding: "+s);let c=j(f,s)|0,p=o(c),_=p.write(f,s);return _!==c&&(p=p.slice(0,_)),p}u(w,"fromString");function v(f){let s=f.length<0?0:O(f.length)|0,c=o(s);for(let p=0;p<s;p+=1)c[p]=f[p]&255;return c}u(v,"fromArrayLike");function S(f){if(He(f,Uint8Array)){let s=new Uint8Array(f);return E(s.buffer,s.byteOffset,s.byteLength)}return v(f)}u(S,"fromArrayView");function E(f,s,c){if(s<0||f.byteLength<s)throw new RangeError('"offset" is outside of buffer bounds');if(f.byteLength<s+(c||0))throw new RangeError('"length" is outside of buffer bounds');let p;return s===void 0&&c===void 0?p=new Uint8Array(f):c===void 0?p=new Uint8Array(f,s):p=new Uint8Array(f,s,c),Object.setPrototypeOf(p,a.prototype),p}u(E,"fromArrayBuffer");function A(f){if(a.isBuffer(f)){let s=O(f.length)|0,c=o(s);return c.length===0||f.copy(c,0,0,s),c}if(f.length!==void 0)return typeof f.length!="number"||ot(f.length)?o(0):v(f);if(f.type==="Buffer"&&Array.isArray(f.data))return v(f.data)}u(A,"fromObject");function O(f){if(f>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return f|0}u(O,"checked");function U(f){return+f!=f&&(f=0),a.alloc(+f)}u(U,"SlowBuffer"),a.isBuffer=u(function(s){return s!=null&&s._isBuffer===!0&&s!==a.prototype},"isBuffer"),a.compare=u(function(s,c){if(He(s,Uint8Array)&&(s=a.from(s,s.offset,s.byteLength)),He(c,Uint8Array)&&(c=a.from(c,c.offset,c.byteLength)),!a.isBuffer(s)||!a.isBuffer(c))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(s===c)return 0;let p=s.length,_=c.length;for(let d=0,x=Math.min(p,_);d<x;++d)if(s[d]!==c[d]){p=s[d],_=c[d];break}return p<_?-1:_<p?1:0},"compare"),a.isEncoding=u(function(s){switch(String(s).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},"isEncoding"),a.concat=u(function(s,c){if(!Array.isArray(s))throw new TypeError('"list" argument must be an Array of Buffers');if(s.length===0)return a.alloc(0);let p;if(c===void 0)for(c=0,p=0;p<s.length;++p)c+=s[p].length;let _=a.allocUnsafe(c),d=0;for(p=0;p<s.length;++p){let x=s[p];if(He(x,Uint8Array))d+x.length>_.length?(a.isBuffer(x)||(x=a.from(x)),x.copy(_,d)):Uint8Array.prototype.set.call(_,x,d);else if(a.isBuffer(x))x.copy(_,d);else throw new TypeError('"list" argument must be an Array of Buffers');d+=x.length}return _},"concat");function j(f,s){if(a.isBuffer(f))return f.length;if(ArrayBuffer.isView(f)||He(f,ArrayBuffer))return f.byteLength;if(typeof f!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof f);let c=f.length,p=arguments.length>2&&arguments[2]===!0;if(!p&&c===0)return 0;let _=!1;for(;;)switch(s){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return Pe(f).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return et(f).length;default:if(_)return p?-1:Pe(f).length;s=(""+s).toLowerCase(),_=!0}}u(j,"byteLength"),a.byteLength=j;function W(f,s,c){let p=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,s>>>=0,c<=s))return"";for(f||(f="utf8");;)switch(f){case"hex":return D(this,s,c);case"utf8":case"utf-8":return $(this,s,c);case"ascii":return pe(this,s,c);case"latin1":case"binary":return P(this,s,c);case"base64":return B(this,s,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,s,c);default:if(p)throw new TypeError("Unknown encoding: "+f);f=(f+"").toLowerCase(),p=!0}}u(W,"slowToString"),a.prototype._isBuffer=!0;function se(f,s,c){let p=f[s];f[s]=f[c],f[c]=p}u(se,"swap"),a.prototype.swap16=u(function(){let s=this.length;if(s%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let c=0;c<s;c+=2)se(this,c,c+1);return this},"swap16"),a.prototype.swap32=u(function(){let s=this.length;if(s%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let c=0;c<s;c+=4)se(this,c,c+3),se(this,c+1,c+2);return this},"swap32"),a.prototype.swap64=u(function(){let s=this.length;if(s%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let c=0;c<s;c+=8)se(this,c,c+7),se(this,c+1,c+6),se(this,c+2,c+5),se(this,c+3,c+4);return this},"swap64"),a.prototype.toString=u(function(){let s=this.length;return s===0?"":arguments.length===0?$(this,0,s):W.apply(this,arguments)},"toString"),a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=u(function(s){if(!a.isBuffer(s))throw new TypeError("Argument must be a Buffer");return this===s?!0:a.compare(this,s)===0},"equals"),a.prototype.inspect=u(function(){let s="",c=di.INSPECT_MAX_BYTES;return s=this.toString("hex",0,c).replace(/(.{2})/g,"$1 ").trim(),this.length>c&&(s+=" ... "),"<Buffer "+s+">"},"inspect"),e&&(a.prototype[e]=a.prototype.inspect),a.prototype.compare=u(function(s,c,p,_,d){if(He(s,Uint8Array)&&(s=a.from(s,s.offset,s.byteLength)),!a.isBuffer(s))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof s);if(c===void 0&&(c=0),p===void 0&&(p=s?s.length:0),_===void 0&&(_=0),d===void 0&&(d=this.length),c<0||p>s.length||_<0||d>this.length)throw new RangeError("out of range index");if(_>=d&&c>=p)return 0;if(_>=d)return-1;if(c>=p)return 1;if(c>>>=0,p>>>=0,_>>>=0,d>>>=0,this===s)return 0;let x=d-_,Z=p-c,oe=Math.min(x,Z),k=this.slice(_,d),z=s.slice(c,p);for(let b=0;b<oe;++b)if(k[b]!==z[b]){x=k[b],Z=z[b];break}return x<Z?-1:Z<x?1:0},"compare");function Y(f,s,c,p,_){if(f.length===0)return-1;if(typeof c=="string"?(p=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,ot(c)&&(c=_?0:f.length-1),c<0&&(c=f.length+c),c>=f.length){if(_)return-1;c=f.length-1}else if(c<0)if(_)c=0;else return-1;if(typeof s=="string"&&(s=a.from(s,p)),a.isBuffer(s))return s.length===0?-1:he(f,s,c,p,_);if(typeof s=="number")return s=s&255,typeof Uint8Array.prototype.indexOf=="function"?_?Uint8Array.prototype.indexOf.call(f,s,c):Uint8Array.prototype.lastIndexOf.call(f,s,c):he(f,[s],c,p,_);throw new TypeError("val must be string, number or Buffer")}u(Y,"bidirectionalIndexOf");function he(f,s,c,p,_){let d=1,x=f.length,Z=s.length;if(p!==void 0&&(p=String(p).toLowerCase(),p==="ucs2"||p==="ucs-2"||p==="utf16le"||p==="utf-16le")){if(f.length<2||s.length<2)return-1;d=2,x/=2,Z/=2,c/=2}function oe(z,b){return d===1?z[b]:z.readUInt16BE(b*d)}u(oe,"read");let k;if(_){let z=-1;for(k=c;k<x;k++)if(oe(f,k)===oe(s,z===-1?0:k-z)){if(z===-1&&(z=k),k-z+1===Z)return z*d}else z!==-1&&(k-=k-z),z=-1}else for(c+Z>x&&(c=x-Z),k=c;k>=0;k--){let z=!0;for(let b=0;b<Z;b++)if(oe(f,k+b)!==oe(s,b)){z=!1;break}if(z)return k}return-1}u(he,"arrayIndexOf"),a.prototype.includes=u(function(s,c,p){return this.indexOf(s,c,p)!==-1},"includes"),a.prototype.indexOf=u(function(s,c,p){return Y(this,s,c,p,!0)},"indexOf"),a.prototype.lastIndexOf=u(function(s,c,p){return Y(this,s,c,p,!1)},"lastIndexOf");function q(f,s,c,p){c=Number(c)||0;let _=f.length-c;p?(p=Number(p),p>_&&(p=_)):p=_;let d=s.length;p>d/2&&(p=d/2);let x;for(x=0;x<p;++x){let Z=parseInt(s.substr(x*2,2),16);if(ot(Z))return x;f[c+x]=Z}return x}u(q,"hexWrite");function ee(f,s,c,p){return ct(Pe(s,f.length-c),f,c,p)}u(ee,"utf8Write");function J(f,s,c,p){return ct(Se(s),f,c,p)}u(J,"asciiWrite");function te(f,s,c,p){return ct(et(s),f,c,p)}u(te,"base64Write");function ye(f,s,c,p){return ct(ve(s,f.length-c),f,c,p)}u(ye,"ucs2Write"),a.prototype.write=u(function(s,c,p,_){if(c===void 0)_="utf8",p=this.length,c=0;else if(p===void 0&&typeof c=="string")_=c,p=this.length,c=0;else if(isFinite(c))c=c>>>0,isFinite(p)?(p=p>>>0,_===void 0&&(_="utf8")):(_=p,p=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let d=this.length-c;if((p===void 0||p>d)&&(p=d),s.length>0&&(p<0||c<0)||c>this.length)throw new RangeError("Attempt to write outside buffer bounds");_||(_="utf8");let x=!1;for(;;)switch(_){case"hex":return q(this,s,c,p);case"utf8":case"utf-8":return ee(this,s,c,p);case"ascii":case"latin1":case"binary":return J(this,s,c,p);case"base64":return te(this,s,c,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ye(this,s,c,p);default:if(x)throw new TypeError("Unknown encoding: "+_);_=(""+_).toLowerCase(),x=!0}},"write"),a.prototype.toJSON=u(function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},"toJSON");function B(f,s,c){return s===0&&c===f.length?r.fromByteArray(f):r.fromByteArray(f.slice(s,c))}u(B,"base64Slice");function $(f,s,c){c=Math.min(f.length,c);let p=[],_=s;for(;_<c;){let d=f[_],x=null,Z=d>239?4:d>223?3:d>191?2:1;if(_+Z<=c){let oe,k,z,b;switch(Z){case 1:d<128&&(x=d);break;case 2:oe=f[_+1],(oe&192)===128&&(b=(d&31)<<6|oe&63,b>127&&(x=b));break;case 3:oe=f[_+1],k=f[_+2],(oe&192)===128&&(k&192)===128&&(b=(d&15)<<12|(oe&63)<<6|k&63,b>2047&&(b<55296||b>57343)&&(x=b));break;case 4:oe=f[_+1],k=f[_+2],z=f[_+3],(oe&192)===128&&(k&192)===128&&(z&192)===128&&(b=(d&15)<<18|(oe&63)<<12|(k&63)<<6|z&63,b>65535&&b<1114112&&(x=b))}}x===null?(x=65533,Z=1):x>65535&&(x-=65536,p.push(x>>>10&1023|55296),x=56320|x&1023),p.push(x),_+=Z}return _e(p)}u($,"utf8Slice");let ne=4096;function _e(f){let s=f.length;if(s<=ne)return String.fromCharCode.apply(String,f);let c="",p=0;for(;p<s;)c+=String.fromCharCode.apply(String,f.slice(p,p+=ne));return c}u(_e,"decodeCodePointsArray");function pe(f,s,c){let p="";c=Math.min(f.length,c);for(let _=s;_<c;++_)p+=String.fromCharCode(f[_]&127);return p}u(pe,"asciiSlice");function P(f,s,c){let p="";c=Math.min(f.length,c);for(let _=s;_<c;++_)p+=String.fromCharCode(f[_]);return p}u(P,"latin1Slice");function D(f,s,c){let p=f.length;(!s||s<0)&&(s=0),(!c||c<0||c>p)&&(c=p);let _="";for(let d=s;d<c;++d)_+=Ut[f[d]];return _}u(D,"hexSlice");function K(f,s,c){let p=f.slice(s,c),_="";for(let d=0;d<p.length-1;d+=2)_+=String.fromCharCode(p[d]+p[d+1]*256);return _}u(K,"utf16leSlice"),a.prototype.slice=u(function(s,c){let p=this.length;s=~~s,c=c===void 0?p:~~c,s<0?(s+=p,s<0&&(s=0)):s>p&&(s=p),c<0?(c+=p,c<0&&(c=0)):c>p&&(c=p),c<s&&(c=s);let _=this.subarray(s,c);return Object.setPrototypeOf(_,a.prototype),_},"slice");function V(f,s,c){if(f%1!==0||f<0)throw new RangeError("offset is not uint");if(f+s>c)throw new RangeError("Trying to access beyond buffer length")}u(V,"checkOffset"),a.prototype.readUintLE=a.prototype.readUIntLE=u(function(s,c,p){s=s>>>0,c=c>>>0,p||V(s,c,this.length);let _=this[s],d=1,x=0;for(;++x<c&&(d*=256);)_+=this[s+x]*d;return _},"readUIntLE"),a.prototype.readUintBE=a.prototype.readUIntBE=u(function(s,c,p){s=s>>>0,c=c>>>0,p||V(s,c,this.length);let _=this[s+--c],d=1;for(;c>0&&(d*=256);)_+=this[s+--c]*d;return _},"readUIntBE"),a.prototype.readUint8=a.prototype.readUInt8=u(function(s,c){return s=s>>>0,c||V(s,1,this.length),this[s]},"readUInt8"),a.prototype.readUint16LE=a.prototype.readUInt16LE=u(function(s,c){return s=s>>>0,c||V(s,2,this.length),this[s]|this[s+1]<<8},"readUInt16LE"),a.prototype.readUint16BE=a.prototype.readUInt16BE=u(function(s,c){return s=s>>>0,c||V(s,2,this.length),this[s]<<8|this[s+1]},"readUInt16BE"),a.prototype.readUint32LE=a.prototype.readUInt32LE=u(function(s,c){return s=s>>>0,c||V(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+this[s+3]*16777216},"readUInt32LE"),a.prototype.readUint32BE=a.prototype.readUInt32BE=u(function(s,c){return s=s>>>0,c||V(s,4,this.length),this[s]*16777216+(this[s+1]<<16|this[s+2]<<8|this[s+3])},"readUInt32BE"),a.prototype.readBigUInt64LE=Ke(u(function(s){s=s>>>0,I(s,"offset");let c=this[s],p=this[s+7];(c===void 0||p===void 0)&&R(s,this.length-8);let _=c+this[++s]*Re(2,8)+this[++s]*Re(2,16)+this[++s]*Re(2,24),d=this[++s]+this[++s]*Re(2,8)+this[++s]*Re(2,16)+p*Re(2,24);return BigInt(_)+(BigInt(d)<<BigInt(32))},"readBigUInt64LE")),a.prototype.readBigUInt64BE=Ke(u(function(s){s=s>>>0,I(s,"offset");let c=this[s],p=this[s+7];(c===void 0||p===void 0)&&R(s,this.length-8);let _=c*Re(2,24)+this[++s]*Re(2,16)+this[++s]*Re(2,8)+this[++s],d=this[++s]*Re(2,24)+this[++s]*Re(2,16)+this[++s]*Re(2,8)+p;return(BigInt(_)<<BigInt(32))+BigInt(d)},"readBigUInt64BE")),a.prototype.readIntLE=u(function(s,c,p){s=s>>>0,c=c>>>0,p||V(s,c,this.length);let _=this[s],d=1,x=0;for(;++x<c&&(d*=256);)_+=this[s+x]*d;return d*=128,_>=d&&(_-=Math.pow(2,8*c)),_},"readIntLE"),a.prototype.readIntBE=u(function(s,c,p){s=s>>>0,c=c>>>0,p||V(s,c,this.length);let _=c,d=1,x=this[s+--_];for(;_>0&&(d*=256);)x+=this[s+--_]*d;return d*=128,x>=d&&(x-=Math.pow(2,8*c)),x},"readIntBE"),a.prototype.readInt8=u(function(s,c){return s=s>>>0,c||V(s,1,this.length),this[s]&128?(255-this[s]+1)*-1:this[s]},"readInt8"),a.prototype.readInt16LE=u(function(s,c){s=s>>>0,c||V(s,2,this.length);let p=this[s]|this[s+1]<<8;return p&32768?p|4294901760:p},"readInt16LE"),a.prototype.readInt16BE=u(function(s,c){s=s>>>0,c||V(s,2,this.length);let p=this[s+1]|this[s]<<8;return p&32768?p|4294901760:p},"readInt16BE"),a.prototype.readInt32LE=u(function(s,c){return s=s>>>0,c||V(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},"readInt32LE"),a.prototype.readInt32BE=u(function(s,c){return s=s>>>0,c||V(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},"readInt32BE"),a.prototype.readBigInt64LE=Ke(u(function(s){s=s>>>0,I(s,"offset");let c=this[s],p=this[s+7];(c===void 0||p===void 0)&&R(s,this.length-8);let _=this[s+4]+this[s+5]*Re(2,8)+this[s+6]*Re(2,16)+(p<<24);return(BigInt(_)<<BigInt(32))+BigInt(c+this[++s]*Re(2,8)+this[++s]*Re(2,16)+this[++s]*Re(2,24))},"readBigInt64LE")),a.prototype.readBigInt64BE=Ke(u(function(s){s=s>>>0,I(s,"offset");let c=this[s],p=this[s+7];(c===void 0||p===void 0)&&R(s,this.length-8);let _=(c<<24)+this[++s]*Re(2,16)+this[++s]*Re(2,8)+this[++s];return(BigInt(_)<<BigInt(32))+BigInt(this[++s]*Re(2,24)+this[++s]*Re(2,16)+this[++s]*Re(2,8)+p)},"readBigInt64BE")),a.prototype.readFloatLE=u(function(s,c){return s=s>>>0,c||V(s,4,this.length),t.read(this,s,!0,23,4)},"readFloatLE"),a.prototype.readFloatBE=u(function(s,c){return s=s>>>0,c||V(s,4,this.length),t.read(this,s,!1,23,4)},"readFloatBE"),a.prototype.readDoubleLE=u(function(s,c){return s=s>>>0,c||V(s,8,this.length),t.read(this,s,!0,52,8)},"readDoubleLE"),a.prototype.readDoubleBE=u(function(s,c){return s=s>>>0,c||V(s,8,this.length),t.read(this,s,!1,52,8)},"readDoubleBE");function ie(f,s,c,p,_,d){if(!a.isBuffer(f))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>_||s<d)throw new RangeError('"value" argument is out of bounds');if(c+p>f.length)throw new RangeError("Index out of range")}u(ie,"checkInt"),a.prototype.writeUintLE=a.prototype.writeUIntLE=u(function(s,c,p,_){if(s=+s,c=c>>>0,p=p>>>0,!_){let Z=Math.pow(2,8*p)-1;ie(this,s,c,p,Z,0)}let d=1,x=0;for(this[c]=s&255;++x<p&&(d*=256);)this[c+x]=s/d&255;return c+p},"writeUIntLE"),a.prototype.writeUintBE=a.prototype.writeUIntBE=u(function(s,c,p,_){if(s=+s,c=c>>>0,p=p>>>0,!_){let Z=Math.pow(2,8*p)-1;ie(this,s,c,p,Z,0)}let d=p-1,x=1;for(this[c+d]=s&255;--d>=0&&(x*=256);)this[c+d]=s/x&255;return c+p},"writeUIntBE"),a.prototype.writeUint8=a.prototype.writeUInt8=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,1,255,0),this[c]=s&255,c+1},"writeUInt8"),a.prototype.writeUint16LE=a.prototype.writeUInt16LE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,2,65535,0),this[c]=s&255,this[c+1]=s>>>8,c+2},"writeUInt16LE"),a.prototype.writeUint16BE=a.prototype.writeUInt16BE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,2,65535,0),this[c]=s>>>8,this[c+1]=s&255,c+2},"writeUInt16BE"),a.prototype.writeUint32LE=a.prototype.writeUInt32LE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,4,4294967295,0),this[c+3]=s>>>24,this[c+2]=s>>>16,this[c+1]=s>>>8,this[c]=s&255,c+4},"writeUInt32LE"),a.prototype.writeUint32BE=a.prototype.writeUInt32BE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,4,4294967295,0),this[c]=s>>>24,this[c+1]=s>>>16,this[c+2]=s>>>8,this[c+3]=s&255,c+4},"writeUInt32BE");function me(f,s,c,p,_){xe(s,p,_,f,c,7);let d=Number(s&BigInt(4294967295));f[c++]=d,d=d>>8,f[c++]=d,d=d>>8,f[c++]=d,d=d>>8,f[c++]=d;let x=Number(s>>BigInt(32)&BigInt(4294967295));return f[c++]=x,x=x>>8,f[c++]=x,x=x>>8,f[c++]=x,x=x>>8,f[c++]=x,c}u(me,"wrtBigUInt64LE");function Fe(f,s,c,p,_){xe(s,p,_,f,c,7);let d=Number(s&BigInt(4294967295));f[c+7]=d,d=d>>8,f[c+6]=d,d=d>>8,f[c+5]=d,d=d>>8,f[c+4]=d;let x=Number(s>>BigInt(32)&BigInt(4294967295));return f[c+3]=x,x=x>>8,f[c+2]=x,x=x>>8,f[c+1]=x,x=x>>8,f[c]=x,c+8}u(Fe,"wrtBigUInt64BE"),a.prototype.writeBigUInt64LE=Ke(u(function(s,c=0){return me(this,s,c,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64LE")),a.prototype.writeBigUInt64BE=Ke(u(function(s,c=0){return Fe(this,s,c,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64BE")),a.prototype.writeIntLE=u(function(s,c,p,_){if(s=+s,c=c>>>0,!_){let oe=Math.pow(2,8*p-1);ie(this,s,c,p,oe-1,-oe)}let d=0,x=1,Z=0;for(this[c]=s&255;++d<p&&(x*=256);)s<0&&Z===0&&this[c+d-1]!==0&&(Z=1),this[c+d]=(s/x>>0)-Z&255;return c+p},"writeIntLE"),a.prototype.writeIntBE=u(function(s,c,p,_){if(s=+s,c=c>>>0,!_){let oe=Math.pow(2,8*p-1);ie(this,s,c,p,oe-1,-oe)}let d=p-1,x=1,Z=0;for(this[c+d]=s&255;--d>=0&&(x*=256);)s<0&&Z===0&&this[c+d+1]!==0&&(Z=1),this[c+d]=(s/x>>0)-Z&255;return c+p},"writeIntBE"),a.prototype.writeInt8=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,1,127,-128),s<0&&(s=255+s+1),this[c]=s&255,c+1},"writeInt8"),a.prototype.writeInt16LE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,2,32767,-32768),this[c]=s&255,this[c+1]=s>>>8,c+2},"writeInt16LE"),a.prototype.writeInt16BE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,2,32767,-32768),this[c]=s>>>8,this[c+1]=s&255,c+2},"writeInt16BE"),a.prototype.writeInt32LE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,4,2147483647,-2147483648),this[c]=s&255,this[c+1]=s>>>8,this[c+2]=s>>>16,this[c+3]=s>>>24,c+4},"writeInt32LE"),a.prototype.writeInt32BE=u(function(s,c,p){return s=+s,c=c>>>0,p||ie(this,s,c,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),this[c]=s>>>24,this[c+1]=s>>>16,this[c+2]=s>>>8,this[c+3]=s&255,c+4},"writeInt32BE"),a.prototype.writeBigInt64LE=Ke(u(function(s,c=0){return me(this,s,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64LE")),a.prototype.writeBigInt64BE=Ke(u(function(s,c=0){return Fe(this,s,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64BE"));function Ne(f,s,c,p,_,d){if(c+p>f.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}u(Ne,"checkIEEE754");function Ae(f,s,c,p,_){return s=+s,c=c>>>0,_||Ne(f,s,c,4),t.write(f,s,c,p,23,4),c+4}u(Ae,"writeFloat"),a.prototype.writeFloatLE=u(function(s,c,p){return Ae(this,s,c,!0,p)},"writeFloatLE"),a.prototype.writeFloatBE=u(function(s,c,p){return Ae(this,s,c,!1,p)},"writeFloatBE");function Le(f,s,c,p,_){return s=+s,c=c>>>0,_||Ne(f,s,c,8),t.write(f,s,c,p,52,8),c+8}u(Le,"writeDouble"),a.prototype.writeDoubleLE=u(function(s,c,p){return Le(this,s,c,!0,p)},"writeDoubleLE"),a.prototype.writeDoubleBE=u(function(s,c,p){return Le(this,s,c,!1,p)},"writeDoubleBE"),a.prototype.copy=u(function(s,c,p,_){if(!a.isBuffer(s))throw new TypeError("argument should be a Buffer");if(p||(p=0),!_&&_!==0&&(_=this.length),c>=s.length&&(c=s.length),c||(c=0),_>0&&_<p&&(_=p),_===p||s.length===0||this.length===0)return 0;if(c<0)throw new RangeError("targetStart out of bounds");if(p<0||p>=this.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("sourceEnd out of bounds");_>this.length&&(_=this.length),s.length-c<_-p&&(_=s.length-c+p);let d=_-p;return this===s&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(c,p,_):Uint8Array.prototype.set.call(s,this.subarray(p,_),c),d},"copy"),a.prototype.fill=u(function(s,c,p,_){if(typeof s=="string"){if(typeof c=="string"?(_=c,c=0,p=this.length):typeof p=="string"&&(_=p,p=this.length),_!==void 0&&typeof _!="string")throw new TypeError("encoding must be a string");if(typeof _=="string"&&!a.isEncoding(_))throw new TypeError("Unknown encoding: "+_);if(s.length===1){let x=s.charCodeAt(0);(_==="utf8"&&x<128||_==="latin1")&&(s=x)}}else typeof s=="number"?s=s&255:typeof s=="boolean"&&(s=Number(s));if(c<0||this.length<c||this.length<p)throw new RangeError("Out of range index");if(p<=c)return this;c=c>>>0,p=p===void 0?this.length:p>>>0,s||(s=0);let d;if(typeof s=="number")for(d=c;d<p;++d)this[d]=s;else{let x=a.isBuffer(s)?s:a.from(s,_),Z=x.length;if(Z===0)throw new TypeError('The value "'+s+'" is invalid for argument "value"');for(d=0;d<p-c;++d)this[d+c]=x[d%Z]}return this},"fill");let M={};function L(f,s,c){M[f]=u(class extends c{constructor(){super(),Object.defineProperty(this,"message",{value:s.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${f}]`,this.stack,delete this.name}get code(){return f}set code(_){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:_,writable:!0})}toString(){return`${this.name} [${f}]: ${this.message}`}},"NodeError")}u(L,"E"),L("ERR_BUFFER_OUT_OF_BOUNDS",function(f){return f?`${f} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),L("ERR_INVALID_ARG_TYPE",function(f,s){return`The "${f}" argument must be of type number. Received type ${typeof s}`},TypeError),L("ERR_OUT_OF_RANGE",function(f,s,c){let p=`The value of "${f}" is out of range.`,_=c;return Number.isInteger(c)&&Math.abs(c)>Re(2,32)?_=re(String(c)):typeof c=="bigint"&&(_=String(c),(c>Re(BigInt(2),BigInt(32))||c<-Re(BigInt(2),BigInt(32)))&&(_=re(_)),_+="n"),p+=` It must be ${s}. Received ${_}`,p},RangeError);function re(f){let s="",c=f.length,p=f[0]==="-"?1:0;for(;c>=p+4;c-=3)s=`_${f.slice(c-3,c)}${s}`;return`${f.slice(0,c)}${s}`}u(re,"addNumericalSeparator");function be(f,s,c){I(s,"offset"),(f[s]===void 0||f[s+c]===void 0)&&R(s,f.length-(c+1))}u(be,"checkBounds");function xe(f,s,c,p,_,d){if(f>c||f<s){let x=typeof s=="bigint"?"n":"",Z;throw d>3?s===0||s===BigInt(0)?Z=`>= 0${x} and < 2${x} ** ${(d+1)*8}${x}`:Z=`>= -(2${x} ** ${(d+1)*8-1}${x}) and < 2 ** ${(d+1)*8-1}${x}`:Z=`>= ${s}${x} and <= ${c}${x}`,new M.ERR_OUT_OF_RANGE("value",Z,f)}be(p,_,d)}u(xe,"checkIntBI");function I(f,s){if(typeof f!="number")throw new M.ERR_INVALID_ARG_TYPE(s,"number",f)}u(I,"validateNumber");function R(f,s,c){throw Math.floor(f)!==f?(I(f,c),new M.ERR_OUT_OF_RANGE(c||"offset","an integer",f)):s<0?new M.ERR_BUFFER_OUT_OF_BOUNDS:new M.ERR_OUT_OF_RANGE(c||"offset",`>= ${c?1:0} and <= ${s}`,f)}u(R,"boundsError");let ae=/[^+/0-9A-Za-z-_]/g;function ge(f){if(f=f.split("=")[0],f=f.trim().replace(ae,""),f.length<2)return"";for(;f.length%4!==0;)f=f+"=";return f}u(ge,"base64clean");function Pe(f,s){s=s||1/0;let c,p=f.length,_=null,d=[];for(let x=0;x<p;++x){if(c=f.charCodeAt(x),c>55295&&c<57344){if(!_){if(c>56319){(s-=3)>-1&&d.push(239,191,189);continue}else if(x+1===p){(s-=3)>-1&&d.push(239,191,189);continue}_=c;continue}if(c<56320){(s-=3)>-1&&d.push(239,191,189),_=c;continue}c=(_-55296<<10|c-56320)+65536}else _&&(s-=3)>-1&&d.push(239,191,189);if(_=null,c<128){if((s-=1)<0)break;d.push(c)}else if(c<2048){if((s-=2)<0)break;d.push(c>>6|192,c&63|128)}else if(c<65536){if((s-=3)<0)break;d.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((s-=4)<0)break;d.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return d}u(Pe,"utf8ToBytes");function Se(f){let s=[];for(let c=0;c<f.length;++c)s.push(f.charCodeAt(c)&255);return s}u(Se,"asciiToBytes");function ve(f,s){let c,p,_,d=[];for(let x=0;x<f.length&&!((s-=2)<0);++x)c=f.charCodeAt(x),p=c>>8,_=c%256,d.push(_),d.push(p);return d}u(ve,"utf16leToBytes");function et(f){return r.toByteArray(ge(f))}u(et,"base64ToBytes");function ct(f,s,c,p){let _;for(_=0;_<p&&!(_+c>=s.length||_>=f.length);++_)s[_+c]=f[_];return _}u(ct,"blitBuffer");function He(f,s){return f instanceof s||f!=null&&f.constructor!=null&&f.constructor.name!=null&&f.constructor.name===s.name}u(He,"isInstance");function ot(f){return f!==f}u(ot,"numberIsNaN");let Ut=function(){let f="0123456789abcdef",s=new Array(256);for(let c=0;c<16;++c){let p=c*16;for(let _=0;_<16;++_)s[p+_]=f[c]+f[_]}return s}();function Ke(f){return typeof BigInt=="undefined"?bt:f}u(Ke,"defineBigIntMethod");function bt(){throw new Error("BigInt not supported")}return u(bt,"BufferBigIntNotDefined"),di}u(xg,"dew$g");var gr=xg();gr.Buffer;gr.INSPECT_MAX_BYTES;gr.kMaxLength;var Uo={},vf=!1;function mi(){return vf||(vf=!0,typeof Object.create=="function"?Uo=u(function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):Uo=u(function(t,e){if(e){t.super_=e;var i=u(function(){},"TempCtor");i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}},"inherits")),Uo}u(mi,"dew$f");var vs={},Ef=!1;function Pf(){return Ef||(Ef=!0,vs=vt.EventEmitter),vs}u(Pf,"dew$e");var Es={},Sf=!1;function Ig(){if(Sf)return Es;Sf=!0;function r(v,S){var E=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);S&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),E.push.apply(E,A)}return E}u(r,"ownKeys");function t(v){for(var S=1;S<arguments.length;S++){var E=arguments[S]!=null?arguments[S]:{};S%2?r(Object(E),!0).forEach(function(A){e(v,A,E[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(E)):r(Object(E)).forEach(function(A){Object.defineProperty(v,A,Object.getOwnPropertyDescriptor(E,A))})}return v}u(t,"_objectSpread");function e(v,S,E){return S in v?Object.defineProperty(v,S,{value:E,enumerable:!0,configurable:!0,writable:!0}):v[S]=E,v}u(e,"_defineProperty");function i(v,S){if(!(v instanceof S))throw new TypeError("Cannot call a class as a function")}u(i,"_classCallCheck");function n(v,S){for(var E=0;E<S.length;E++){var A=S[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(v,A.key,A)}}u(n,"_defineProperties");function o(v,S,E){return S&&n(v.prototype,S),E&&n(v,E),v}u(o,"_createClass");var a=gr,l=a.Buffer,m=Q,y=m.inspect,g=y&&y.custom||"inspect";function w(v,S,E){l.prototype.copy.call(v,S,E)}return u(w,"copyBuffer"),Es=function(){function v(){i(this,v),this.head=null,this.tail=null,this.length=0}return u(v,"BufferList"),o(v,[{key:"push",value:u(function(E){var A={data:E,next:null};this.length>0?this.tail.next=A:this.head=A,this.tail=A,++this.length},"push")},{key:"unshift",value:u(function(E){var A={data:E,next:this.head};this.length===0&&(this.tail=A),this.head=A,++this.length},"unshift")},{key:"shift",value:u(function(){if(this.length!==0){var E=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,E}},"shift")},{key:"clear",value:u(function(){this.head=this.tail=null,this.length=0},"clear")},{key:"join",value:u(function(E){if(this.length===0)return"";for(var A=this.head,O=""+A.data;A=A.next;)O+=E+A.data;return O},"join")},{key:"concat",value:u(function(E){if(this.length===0)return l.alloc(0);for(var A=l.allocUnsafe(E>>>0),O=this.head,U=0;O;)w(O.data,A,U),U+=O.data.length,O=O.next;return A},"concat")},{key:"consume",value:u(function(E,A){var O;return E<this.head.data.length?(O=this.head.data.slice(0,E),this.head.data=this.head.data.slice(E)):E===this.head.data.length?O=this.shift():O=A?this._getString(E):this._getBuffer(E),O},"consume")},{key:"first",value:u(function(){return this.head.data},"first")},{key:"_getString",value:u(function(E){var A=this.head,O=1,U=A.data;for(E-=U.length;A=A.next;){var j=A.data,W=E>j.length?j.length:E;if(W===j.length?U+=j:U+=j.slice(0,E),E-=W,E===0){W===j.length?(++O,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=j.slice(W));break}++O}return this.length-=O,U},"_getString")},{key:"_getBuffer",value:u(function(E){var A=l.allocUnsafe(E),O=this.head,U=1;for(O.data.copy(A),E-=O.data.length;O=O.next;){var j=O.data,W=E>j.length?j.length:E;if(j.copy(A,A.length-E,0,W),E-=W,E===0){W===j.length?(++U,O.next?this.head=O.next:this.head=this.tail=null):(this.head=O,O.data=j.slice(W));break}++U}return this.length-=U,A},"_getBuffer")},{key:g,value:u(function(E,A){return y(this,t({},A,{depth:0,customInspect:!1}))},"value")}]),v}(),Es}u(Ig,"dew$d");var Ss={},Ff=!1;function Uf(){if(Ff)return Ss;Ff=!0;var r=Ve;function t(l,m){var y=this,g=this._readableState&&this._readableState.destroyed,w=this._writableState&&this._writableState.destroyed;return g||w?(m?m(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(o,this,l)):r.nextTick(o,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(v){!m&&v?y._writableState?y._writableState.errorEmitted?r.nextTick(i,y):(y._writableState.errorEmitted=!0,r.nextTick(e,y,v)):r.nextTick(e,y,v):m?(r.nextTick(i,y),m(v)):r.nextTick(i,y)}),this)}u(t,"destroy");function e(l,m){o(l,m),i(l)}u(e,"emitErrorAndCloseNT");function i(l){l._writableState&&!l._writableState.emitClose||l._readableState&&!l._readableState.emitClose||l.emit("close")}u(i,"emitCloseNT");function n(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}u(n,"undestroy");function o(l,m){l.emit("error",m)}u(o,"emitErrorNT");function a(l,m){var y=l._readableState,g=l._writableState;y&&y.autoDestroy||g&&g.autoDestroy?l.destroy(m):l.emit("error",m)}return u(a,"errorOrDestroy"),Ss={destroy:t,undestroy:n,errorOrDestroy:a},Ss}u(Uf,"dew$c");var Fs={},xf=!1;function ji(){if(xf)return Fs;xf=!0;let r={};function t(a,l,m){m||(m=Error);function y(w,v,S){return typeof l=="string"?l:l(w,v,S)}u(y,"getMessage");class g extends m{constructor(v,S,E){super(y(v,S,E))}}u(g,"NodeError"),g.prototype.name=m.name,g.prototype.code=a,r[a]=g}u(t,"createErrorType");function e(a,l){if(Array.isArray(a)){let m=a.length;return a=a.map(y=>String(y)),m>2?`one of ${l} ${a.slice(0,m-1).join(", ")}, or `+a[m-1]:m===2?`one of ${l} ${a[0]} or ${a[1]}`:`of ${l} ${a[0]}`}else return`of ${l} ${String(a)}`}u(e,"oneOf");function i(a,l,m){return a.substr(!m||m<0?0:+m,l.length)===l}u(i,"startsWith");function n(a,l,m){return(m===void 0||m>a.length)&&(m=a.length),a.substring(m-l.length,m)===l}u(n,"endsWith");function o(a,l,m){return typeof m!="number"&&(m=0),m+l.length>a.length?!1:a.indexOf(l,m)!==-1}return u(o,"includes"),t("ERR_INVALID_OPT_VALUE",function(a,l){return'The value "'+l+'" is invalid for option "'+a+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(a,l,m){let y;typeof l=="string"&&i(l,"not ")?(y="must not be",l=l.replace(/^not /,"")):y="must be";let g;if(n(a," argument"))g=`The ${a} ${y} ${e(l,"type")}`;else{let w=o(a,".")?"property":"argument";g=`The "${a}" ${w} ${y} ${e(l,"type")}`}return g+=`. Received type ${typeof m}`,g},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Fs.codes=r,Fs}u(ji,"dew$b");var xs={},If=!1;function Mf(){if(If)return xs;If=!0;var r=ji().codes.ERR_INVALID_OPT_VALUE;function t(i,n,o){return i.highWaterMark!=null?i.highWaterMark:n?i[o]:null}u(t,"highWaterMarkFrom");function e(i,n,o,a){var l=t(n,a,o);if(l!=null){if(!(isFinite(l)&&Math.floor(l)===l)||l<0){var m=a?o:"highWaterMark";throw new r(m,l)}return Math.floor(l)}return i.objectMode?16:16*1024}return u(e,"getHighWaterMark"),xs={getHighWaterMark:e},xs}u(Mf,"dew$a");var Is={},Tf=!1,Ts=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:global;function Tg(){if(Tf)return Is;Tf=!0,Is=r;function r(e,i){if(t("noDeprecation"))return e;var n=!1;function o(){if(!n){if(t("throwDeprecation"))throw new Error(i);t("traceDeprecation")?console.trace(i):console.warn(i),n=!0}return e.apply(this||Ts,arguments)}return u(o,"deprecated"),o}u(r,"deprecate");function t(e){try{if(!Ts.localStorage)return!1}catch(n){return!1}var i=Ts.localStorage[e];return i==null?!1:String(i).toLowerCase()==="true"}return u(t,"config"),Is}u(Tg,"dew$9");var As={},Af=!1,Ag=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:global;function Ps(){if(Af)return As;Af=!0;var r=Ve;As=J;function t(M){var L=this;this.next=null,this.entry=null,this.finish=function(){Le(L,M)}}u(t,"CorkedRequest");var e;J.WritableState=q;var i={deprecate:Tg()},n=Pf(),o=gr.Buffer,a=Ag.Uint8Array||function(){};function l(M){return o.from(M)}u(l,"_uint8ArrayToBuffer");function m(M){return o.isBuffer(M)||M instanceof a}u(m,"_isUint8Array");var y=Uf(),g=Mf(),w=g.getHighWaterMark,v=ji().codes,S=v.ERR_INVALID_ARG_TYPE,E=v.ERR_METHOD_NOT_IMPLEMENTED,A=v.ERR_MULTIPLE_CALLBACK,O=v.ERR_STREAM_CANNOT_PIPE,U=v.ERR_STREAM_DESTROYED,j=v.ERR_STREAM_NULL_VALUES,W=v.ERR_STREAM_WRITE_AFTER_END,se=v.ERR_UNKNOWN_ENCODING,Y=y.errorOrDestroy;mi()(J,n);function he(){}u(he,"nop");function q(M,L,re){e=e||pi(),M=M||{},typeof re!="boolean"&&(re=L instanceof e),this.objectMode=!!M.objectMode,re&&(this.objectMode=this.objectMode||!!M.writableObjectMode),this.highWaterMark=w(this,M,"writableHighWaterMark",re),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var be=M.decodeStrings===!1;this.decodeStrings=!be,this.defaultEncoding=M.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(xe){P(L,xe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=M.emitClose!==!1,this.autoDestroy=!!M.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}u(q,"WritableState"),q.prototype.getBuffer=u(function(){for(var L=this.bufferedRequest,re=[];L;)re.push(L),L=L.next;return re},"getBuffer"),function(){try{Object.defineProperty(q.prototype,"buffer",{get:i.deprecate(u(function(){return this.getBuffer()},"writableStateBufferGetter"),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(M){}}();var ee;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ee=Function.prototype[Symbol.hasInstance],Object.defineProperty(J,Symbol.hasInstance,{value:u(function(L){return ee.call(this,L)?!0:this!==J?!1:L&&L._writableState instanceof q},"value")})):ee=u(function(L){return L instanceof this},"realHasInstance");function J(M){e=e||pi();var L=this instanceof e;if(!L&&!ee.call(J,this))return new J(M);this._writableState=new q(M,this,L),this.writable=!0,M&&(typeof M.write=="function"&&(this._write=M.write),typeof M.writev=="function"&&(this._writev=M.writev),typeof M.destroy=="function"&&(this._destroy=M.destroy),typeof M.final=="function"&&(this._final=M.final)),n.call(this)}u(J,"Writable"),J.prototype.pipe=function(){Y(this,new O)};function te(M,L){var re=new W;Y(M,re),r.nextTick(L,re)}u(te,"writeAfterEnd");function ye(M,L,re,be){var xe;return re===null?xe=new j:typeof re!="string"&&!L.objectMode&&(xe=new S("chunk",["string","Buffer"],re)),xe?(Y(M,xe),r.nextTick(be,xe),!1):!0}u(ye,"validChunk"),J.prototype.write=function(M,L,re){var be=this._writableState,xe=!1,I=!be.objectMode&&m(M);return I&&!o.isBuffer(M)&&(M=l(M)),typeof L=="function"&&(re=L,L=null),I?L="buffer":L||(L=be.defaultEncoding),typeof re!="function"&&(re=he),be.ending?te(this,re):(I||ye(this,be,M,re))&&(be.pendingcb++,xe=$(this,be,I,M,L,re)),xe},J.prototype.cork=function(){this._writableState.corked++},J.prototype.uncork=function(){var M=this._writableState;M.corked&&(M.corked--,!M.writing&&!M.corked&&!M.bufferProcessing&&M.bufferedRequest&&V(this,M))},J.prototype.setDefaultEncoding=u(function(L){if(typeof L=="string"&&(L=L.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((L+"").toLowerCase())>-1))throw new se(L);return this._writableState.defaultEncoding=L,this},"setDefaultEncoding"),Object.defineProperty(J.prototype,"writableBuffer",{enumerable:!1,get:u(function(){return this._writableState&&this._writableState.getBuffer()},"get")});function B(M,L,re){return!M.objectMode&&M.decodeStrings!==!1&&typeof L=="string"&&(L=o.from(L,re)),L}u(B,"decodeChunk"),Object.defineProperty(J.prototype,"writableHighWaterMark",{enumerable:!1,get:u(function(){return this._writableState.highWaterMark},"get")});function $(M,L,re,be,xe,I){if(!re){var R=B(L,be,xe);be!==R&&(re=!0,xe="buffer",be=R)}var ae=L.objectMode?1:be.length;L.length+=ae;var ge=L.length<L.highWaterMark;if(ge||(L.needDrain=!0),L.writing||L.corked){var Pe=L.lastBufferedRequest;L.lastBufferedRequest={chunk:be,encoding:xe,isBuf:re,callback:I,next:null},Pe?Pe.next=L.lastBufferedRequest:L.bufferedRequest=L.lastBufferedRequest,L.bufferedRequestCount+=1}else ne(M,L,!1,ae,be,xe,I);return ge}u($,"writeOrBuffer");function ne(M,L,re,be,xe,I,R){L.writelen=be,L.writecb=R,L.writing=!0,L.sync=!0,L.destroyed?L.onwrite(new U("write")):re?M._writev(xe,L.onwrite):M._write(xe,I,L.onwrite),L.sync=!1}u(ne,"doWrite");function _e(M,L,re,be,xe){--L.pendingcb,re?(r.nextTick(xe,be),r.nextTick(Ne,M,L),M._writableState.errorEmitted=!0,Y(M,be)):(xe(be),M._writableState.errorEmitted=!0,Y(M,be),Ne(M,L))}u(_e,"onwriteError");function pe(M){M.writing=!1,M.writecb=null,M.length-=M.writelen,M.writelen=0}u(pe,"onwriteStateUpdate");function P(M,L){var re=M._writableState,be=re.sync,xe=re.writecb;if(typeof xe!="function")throw new A;if(pe(re),L)_e(M,re,be,L,xe);else{var I=ie(re)||M.destroyed;!I&&!re.corked&&!re.bufferProcessing&&re.bufferedRequest&&V(M,re),be?r.nextTick(D,M,re,I,xe):D(M,re,I,xe)}}u(P,"onwrite");function D(M,L,re,be){re||K(M,L),L.pendingcb--,be(),Ne(M,L)}u(D,"afterWrite");function K(M,L){L.length===0&&L.needDrain&&(L.needDrain=!1,M.emit("drain"))}u(K,"onwriteDrain");function V(M,L){L.bufferProcessing=!0;var re=L.bufferedRequest;if(M._writev&&re&&re.next){var be=L.bufferedRequestCount,xe=new Array(be),I=L.corkedRequestsFree;I.entry=re;for(var R=0,ae=!0;re;)xe[R]=re,re.isBuf||(ae=!1),re=re.next,R+=1;xe.allBuffers=ae,ne(M,L,!0,L.length,xe,"",I.finish),L.pendingcb++,L.lastBufferedRequest=null,I.next?(L.corkedRequestsFree=I.next,I.next=null):L.corkedRequestsFree=new t(L),L.bufferedRequestCount=0}else{for(;re;){var ge=re.chunk,Pe=re.encoding,Se=re.callback,ve=L.objectMode?1:ge.length;if(ne(M,L,!1,ve,ge,Pe,Se),re=re.next,L.bufferedRequestCount--,L.writing)break}re===null&&(L.lastBufferedRequest=null)}L.bufferedRequest=re,L.bufferProcessing=!1}u(V,"clearBuffer"),J.prototype._write=function(M,L,re){re(new E("_write()"))},J.prototype._writev=null,J.prototype.end=function(M,L,re){var be=this._writableState;return typeof M=="function"?(re=M,M=null,L=null):typeof L=="function"&&(re=L,L=null),M!=null&&this.write(M,L),be.corked&&(be.corked=1,this.uncork()),be.ending||Ae(this,be,re),this},Object.defineProperty(J.prototype,"writableLength",{enumerable:!1,get:u(function(){return this._writableState.length},"get")});function ie(M){return M.ending&&M.length===0&&M.bufferedRequest===null&&!M.finished&&!M.writing}u(ie,"needFinish");function me(M,L){M._final(function(re){L.pendingcb--,re&&Y(M,re),L.prefinished=!0,M.emit("prefinish"),Ne(M,L)})}u(me,"callFinal");function Fe(M,L){!L.prefinished&&!L.finalCalled&&(typeof M._final=="function"&&!L.destroyed?(L.pendingcb++,L.finalCalled=!0,r.nextTick(me,M,L)):(L.prefinished=!0,M.emit("prefinish")))}u(Fe,"prefinish");function Ne(M,L){var re=ie(L);if(re&&(Fe(M,L),L.pendingcb===0&&(L.finished=!0,M.emit("finish"),L.autoDestroy))){var be=M._readableState;(!be||be.autoDestroy&&be.endEmitted)&&M.destroy()}return re}u(Ne,"finishMaybe");function Ae(M,L,re){L.ending=!0,Ne(M,L),re&&(L.finished?r.nextTick(re):M.once("finish",re)),L.ended=!0,M.writable=!1}u(Ae,"endWritable");function Le(M,L,re){var be=M.entry;for(M.entry=null;be;){var xe=be.callback;L.pendingcb--,xe(re),be=be.next}L.corkedRequestsFree.next=M}return u(Le,"onCorkedFinish"),Object.defineProperty(J.prototype,"destroyed",{enumerable:!1,get:u(function(){return this._writableState===void 0?!1:this._writableState.destroyed},"get"),set:u(function(L){this._writableState&&(this._writableState.destroyed=L)},"set")}),J.prototype.destroy=y.destroy,J.prototype._undestroy=y.undestroy,J.prototype._destroy=function(M,L){L(M)},As}u(Ps,"dew$8");var Rs={},Rf=!1;function pi(){if(Rf)return Rs;Rf=!0;var r=Ve,t=Object.keys||function(g){var w=[];for(var v in g)w.push(v);return w};Rs=l;var e=Us(),i=Ps();mi()(l,e);for(var n=t(i.prototype),o=0;o<n.length;o++){var a=n[o];l.prototype[a]||(l.prototype[a]=i.prototype[a])}function l(g){if(!(this instanceof l))return new l(g);e.call(this,g),i.call(this,g),this.allowHalfOpen=!0,g&&(g.readable===!1&&(this.readable=!1),g.writable===!1&&(this.writable=!1),g.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",m)))}u(l,"Duplex"),Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:u(function(){return this._writableState.highWaterMark},"get")}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:u(function(){return this._writableState&&this._writableState.getBuffer()},"get")}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:u(function(){return this._writableState.length},"get")});function m(){this._writableState.ended||r.nextTick(y,this)}u(m,"onend");function y(g){g.end()}return u(y,"onEndNT"),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:u(function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},"get"),set:u(function(w){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=w,this._writableState.destroyed=w)},"set")}),Rs}u(pi,"dew$7");var Os={},Of=!1;function Mo(){if(Of)return Os;Of=!0;var r=ji().codes.ERR_STREAM_PREMATURE_CLOSE;function t(o){var a=!1;return function(){if(!a){a=!0;for(var l=arguments.length,m=new Array(l),y=0;y<l;y++)m[y]=arguments[y];o.apply(this,m)}}}u(t,"once");function e(){}u(e,"noop");function i(o){return o.setHeader&&typeof o.abort=="function"}u(i,"isRequest");function n(o,a,l){if(typeof a=="function")return n(o,null,a);a||(a={}),l=t(l||e);var m=a.readable||a.readable!==!1&&o.readable,y=a.writable||a.writable!==!1&&o.writable,g=u(function(){o.writable||v()},"onlegacyfinish"),w=o._writableState&&o._writableState.finished,v=u(function(){y=!1,w=!0,m||l.call(o)},"onfinish"),S=o._readableState&&o._readableState.endEmitted,E=u(function(){m=!1,S=!0,y||l.call(o)},"onend"),A=u(function(W){l.call(o,W)},"onerror"),O=u(function(){var W;if(m&&!S)return(!o._readableState||!o._readableState.ended)&&(W=new r),l.call(o,W);if(y&&!w)return(!o._writableState||!o._writableState.ended)&&(W=new r),l.call(o,W)},"onclose"),U=u(function(){o.req.on("finish",v)},"onrequest");return i(o)?(o.on("complete",v),o.on("abort",O),o.req?U():o.on("request",U)):y&&!o._writableState&&(o.on("end",g),o.on("close",g)),o.on("end",E),o.on("finish",v),a.error!==!1&&o.on("error",A),o.on("close",O),function(){o.removeListener("complete",v),o.removeListener("abort",O),o.removeListener("request",U),o.req&&o.req.removeListener("finish",v),o.removeListener("end",g),o.removeListener("close",g),o.removeListener("finish",v),o.removeListener("end",E),o.removeListener("error",A),o.removeListener("close",O)}}return u(n,"eos"),Os=n,Os}u(Mo,"dew$6");var Bs={},Bf=!1;function Rg(){if(Bf)return Bs;Bf=!0;var r=Ve,t;function e(j,W,se){return W in j?Object.defineProperty(j,W,{value:se,enumerable:!0,configurable:!0,writable:!0}):j[W]=se,j}u(e,"_defineProperty");var i=Mo(),n=Symbol("lastResolve"),o=Symbol("lastReject"),a=Symbol("error"),l=Symbol("ended"),m=Symbol("lastPromise"),y=Symbol("handlePromise"),g=Symbol("stream");function w(j,W){return{value:j,done:W}}u(w,"createIterResult");function v(j){var W=j[n];if(W!==null){var se=j[g].read();se!==null&&(j[m]=null,j[n]=null,j[o]=null,W(w(se,!1)))}}u(v,"readAndResolve");function S(j){r.nextTick(v,j)}u(S,"onReadable");function E(j,W){return function(se,Y){j.then(function(){if(W[l]){se(w(void 0,!0));return}W[y](se,Y)},Y)}}u(E,"wrapForNext");var A=Object.getPrototypeOf(function(){}),O=Object.setPrototypeOf((t={get stream(){return this[g]},next:u(function(){var W=this,se=this[a];if(se!==null)return Promise.reject(se);if(this[l])return Promise.resolve(w(void 0,!0));if(this[g].destroyed)return new Promise(function(ee,J){r.nextTick(function(){W[a]?J(W[a]):ee(w(void 0,!0))})});var Y=this[m],he;if(Y)he=new Promise(E(Y,this));else{var q=this[g].read();if(q!==null)return Promise.resolve(w(q,!1));he=new Promise(this[y])}return this[m]=he,he},"next")},e(t,Symbol.asyncIterator,function(){return this}),e(t,"return",u(function(){var W=this;return new Promise(function(se,Y){W[g].destroy(null,function(he){if(he){Y(he);return}se(w(void 0,!0))})})},"_return")),t),A),U=u(function(W){var se,Y=Object.create(O,(se={},e(se,g,{value:W,writable:!0}),e(se,n,{value:null,writable:!0}),e(se,o,{value:null,writable:!0}),e(se,a,{value:null,writable:!0}),e(se,l,{value:W._readableState.endEmitted,writable:!0}),e(se,y,{value:u(function(q,ee){var J=Y[g].read();J?(Y[m]=null,Y[n]=null,Y[o]=null,q(w(J,!1))):(Y[n]=q,Y[o]=ee)},"value"),writable:!0}),se));return Y[m]=null,i(W,function(he){if(he&&he.code!=="ERR_STREAM_PREMATURE_CLOSE"){var q=Y[o];q!==null&&(Y[m]=null,Y[n]=null,Y[o]=null,q(he)),Y[a]=he;return}var ee=Y[n];ee!==null&&(Y[m]=null,Y[n]=null,Y[o]=null,ee(w(void 0,!0))),Y[l]=!0}),W.on("readable",S.bind(null,Y)),Y},"createReadableStreamAsyncIterator");return Bs=U,Bs}u(Rg,"dew$5");var ks={},kf=!1;function Og(){return kf||(kf=!0,ks=u(function(){throw new Error("Readable.from is not available in the browser")},"exports$4")),ks}u(Og,"dew$4");var Cs={},Cf=!1,Bg=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:global;function Us(){if(Cf)return Cs;Cf=!0;var r=Ve;Cs=te;var t;te.ReadableState=J,vt.EventEmitter;var e=u(function(R,ae){return R.listeners(ae).length},"EElistenerCount"),i=Pf(),n=gr.Buffer,o=Bg.Uint8Array||function(){};function a(I){return n.from(I)}u(a,"_uint8ArrayToBuffer");function l(I){return n.isBuffer(I)||I instanceof o}u(l,"_isUint8Array");var m=Q,y;m&&m.debuglog?y=m.debuglog("stream"):y=u(function(){},"debug");var g=Ig(),w=Uf(),v=Mf(),S=v.getHighWaterMark,E=ji().codes,A=E.ERR_INVALID_ARG_TYPE,O=E.ERR_STREAM_PUSH_AFTER_EOF,U=E.ERR_METHOD_NOT_IMPLEMENTED,j=E.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,W,se,Y;mi()(te,i);var he=w.errorOrDestroy,q=["error","close","destroy","pause","resume"];function ee(I,R,ae){if(typeof I.prependListener=="function")return I.prependListener(R,ae);!I._events||!I._events[R]?I.on(R,ae):Array.isArray(I._events[R])?I._events[R].unshift(ae):I._events[R]=[ae,I._events[R]]}u(ee,"prependListener");function J(I,R,ae){t=t||pi(),I=I||{},typeof ae!="boolean"&&(ae=R instanceof t),this.objectMode=!!I.objectMode,ae&&(this.objectMode=this.objectMode||!!I.readableObjectMode),this.highWaterMark=S(this,I,"readableHighWaterMark",ae),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=I.emitClose!==!1,this.autoDestroy=!!I.autoDestroy,this.destroyed=!1,this.defaultEncoding=I.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,I.encoding&&(W||(W=Mi.StringDecoder),this.decoder=new W(I.encoding),this.encoding=I.encoding)}u(J,"ReadableState");function te(I){if(t=t||pi(),!(this instanceof te))return new te(I);var R=this instanceof t;this._readableState=new J(I,this,R),this.readable=!0,I&&(typeof I.read=="function"&&(this._read=I.read),typeof I.destroy=="function"&&(this._destroy=I.destroy)),i.call(this)}u(te,"Readable"),Object.defineProperty(te.prototype,"destroyed",{enumerable:!1,get:u(function(){return this._readableState===void 0?!1:this._readableState.destroyed},"get"),set:u(function(R){this._readableState&&(this._readableState.destroyed=R)},"set")}),te.prototype.destroy=w.destroy,te.prototype._undestroy=w.undestroy,te.prototype._destroy=function(I,R){R(I)},te.prototype.push=function(I,R){var ae=this._readableState,ge;return ae.objectMode?ge=!0:typeof I=="string"&&(R=R||ae.defaultEncoding,R!==ae.encoding&&(I=n.from(I,R),R=""),ge=!0),ye(this,I,R,!1,ge)},te.prototype.unshift=function(I){return ye(this,I,null,!0,!1)};function ye(I,R,ae,ge,Pe){y("readableAddChunk",R);var Se=I._readableState;if(R===null)Se.reading=!1,P(I,Se);else{var ve;if(Pe||(ve=$(Se,R)),ve)he(I,ve);else if(Se.objectMode||R&&R.length>0)if(typeof R!="string"&&!Se.objectMode&&Object.getPrototypeOf(R)!==n.prototype&&(R=a(R)),ge)Se.endEmitted?he(I,new j):B(I,Se,R,!0);else if(Se.ended)he(I,new O);else{if(Se.destroyed)return!1;Se.reading=!1,Se.decoder&&!ae?(R=Se.decoder.write(R),Se.objectMode||R.length!==0?B(I,Se,R,!1):V(I,Se)):B(I,Se,R,!1)}else ge||(Se.reading=!1,V(I,Se))}return!Se.ended&&(Se.length<Se.highWaterMark||Se.length===0)}u(ye,"readableAddChunk");function B(I,R,ae,ge){R.flowing&&R.length===0&&!R.sync?(R.awaitDrain=0,I.emit("data",ae)):(R.length+=R.objectMode?1:ae.length,ge?R.buffer.unshift(ae):R.buffer.push(ae),R.needReadable&&D(I)),V(I,R)}u(B,"addChunk");function $(I,R){var ae;return!l(R)&&typeof R!="string"&&R!==void 0&&!I.objectMode&&(ae=new A("chunk",["string","Buffer","Uint8Array"],R)),ae}u($,"chunkInvalid"),te.prototype.isPaused=function(){return this._readableState.flowing===!1},te.prototype.setEncoding=function(I){W||(W=Mi.StringDecoder);var R=new W(I);this._readableState.decoder=R,this._readableState.encoding=this._readableState.decoder.encoding;for(var ae=this._readableState.buffer.head,ge="";ae!==null;)ge+=R.write(ae.data),ae=ae.next;return this._readableState.buffer.clear(),ge!==""&&this._readableState.buffer.push(ge),this._readableState.length=ge.length,this};var ne=1073741824;function _e(I){return I>=ne?I=ne:(I--,I|=I>>>1,I|=I>>>2,I|=I>>>4,I|=I>>>8,I|=I>>>16,I++),I}u(_e,"computeNewHighWaterMark");function pe(I,R){return I<=0||R.length===0&&R.ended?0:R.objectMode?1:I!==I?R.flowing&&R.length?R.buffer.head.data.length:R.length:(I>R.highWaterMark&&(R.highWaterMark=_e(I)),I<=R.length?I:R.ended?R.length:(R.needReadable=!0,0))}u(pe,"howMuchToRead"),te.prototype.read=function(I){y("read",I),I=parseInt(I,10);var R=this._readableState,ae=I;if(I!==0&&(R.emittedReadable=!1),I===0&&R.needReadable&&((R.highWaterMark!==0?R.length>=R.highWaterMark:R.length>0)||R.ended))return y("read: emitReadable",R.length,R.ended),R.length===0&&R.ended?re(this):D(this),null;if(I=pe(I,R),I===0&&R.ended)return R.length===0&&re(this),null;var ge=R.needReadable;y("need readable",ge),(R.length===0||R.length-I<R.highWaterMark)&&(ge=!0,y("length less than watermark",ge)),R.ended||R.reading?(ge=!1,y("reading or ended",ge)):ge&&(y("do read"),R.reading=!0,R.sync=!0,R.length===0&&(R.needReadable=!0),this._read(R.highWaterMark),R.sync=!1,R.reading||(I=pe(ae,R)));var Pe;return I>0?Pe=L(I,R):Pe=null,Pe===null?(R.needReadable=R.length<=R.highWaterMark,I=0):(R.length-=I,R.awaitDrain=0),R.length===0&&(R.ended||(R.needReadable=!0),ae!==I&&R.ended&&re(this)),Pe!==null&&this.emit("data",Pe),Pe};function P(I,R){if(y("onEofChunk"),!R.ended){if(R.decoder){var ae=R.decoder.end();ae&&ae.length&&(R.buffer.push(ae),R.length+=R.objectMode?1:ae.length)}R.ended=!0,R.sync?D(I):(R.needReadable=!1,R.emittedReadable||(R.emittedReadable=!0,K(I)))}}u(P,"onEofChunk");function D(I){var R=I._readableState;y("emitReadable",R.needReadable,R.emittedReadable),R.needReadable=!1,R.emittedReadable||(y("emitReadable",R.flowing),R.emittedReadable=!0,r.nextTick(K,I))}u(D,"emitReadable");function K(I){var R=I._readableState;y("emitReadable_",R.destroyed,R.length,R.ended),!R.destroyed&&(R.length||R.ended)&&(I.emit("readable"),R.emittedReadable=!1),R.needReadable=!R.flowing&&!R.ended&&R.length<=R.highWaterMark,M(I)}u(K,"emitReadable_");function V(I,R){R.readingMore||(R.readingMore=!0,r.nextTick(ie,I,R))}u(V,"maybeReadMore");function ie(I,R){for(;!R.reading&&!R.ended&&(R.length<R.highWaterMark||R.flowing&&R.length===0);){var ae=R.length;if(y("maybeReadMore read 0"),I.read(0),ae===R.length)break}R.readingMore=!1}u(ie,"maybeReadMore_"),te.prototype._read=function(I){he(this,new U("_read()"))},te.prototype.pipe=function(I,R){var ae=this,ge=this._readableState;switch(ge.pipesCount){case 0:ge.pipes=I;break;case 1:ge.pipes=[ge.pipes,I];break;default:ge.pipes.push(I);break}ge.pipesCount+=1,y("pipe count=%d opts=%j",ge.pipesCount,R);var Pe=(!R||R.end!==!1)&&I!==r.stdout&&I!==r.stderr,Se=Pe?et:s;ge.endEmitted?r.nextTick(Se):ae.once("end",Se),I.on("unpipe",ve);function ve(c,p){y("onunpipe"),c===ae&&p&&p.hasUnpiped===!1&&(p.hasUnpiped=!0,ot())}u(ve,"onunpipe");function et(){y("onend"),I.end()}u(et,"onend");var ct=me(ae);I.on("drain",ct);var He=!1;function ot(){y("cleanup"),I.removeListener("close",bt),I.removeListener("finish",f),I.removeListener("drain",ct),I.removeListener("error",Ke),I.removeListener("unpipe",ve),ae.removeListener("end",et),ae.removeListener("end",s),ae.removeListener("data",Ut),He=!0,ge.awaitDrain&&(!I._writableState||I._writableState.needDrain)&&ct()}u(ot,"cleanup"),ae.on("data",Ut);function Ut(c){y("ondata");var p=I.write(c);y("dest.write",p),p===!1&&((ge.pipesCount===1&&ge.pipes===I||ge.pipesCount>1&&xe(ge.pipes,I)!==-1)&&!He&&(y("false write response, pause",ge.awaitDrain),ge.awaitDrain++),ae.pause())}u(Ut,"ondata");function Ke(c){y("onerror",c),s(),I.removeListener("error",Ke),e(I,"error")===0&&he(I,c)}u(Ke,"onerror"),ee(I,"error",Ke);function bt(){I.removeListener("finish",f),s()}u(bt,"onclose"),I.once("close",bt);function f(){y("onfinish"),I.removeListener("close",bt),s()}u(f,"onfinish"),I.once("finish",f);function s(){y("unpipe"),ae.unpipe(I)}return u(s,"unpipe"),I.emit("pipe",ae),ge.flowing||(y("pipe resume"),ae.resume()),I};function me(I){return u(function(){var ae=I._readableState;y("pipeOnDrain",ae.awaitDrain),ae.awaitDrain&&ae.awaitDrain--,ae.awaitDrain===0&&e(I,"data")&&(ae.flowing=!0,M(I))},"pipeOnDrainFunctionResult")}u(me,"pipeOnDrain"),te.prototype.unpipe=function(I){var R=this._readableState,ae={hasUnpiped:!1};if(R.pipesCount===0)return this;if(R.pipesCount===1)return I&&I!==R.pipes?this:(I||(I=R.pipes),R.pipes=null,R.pipesCount=0,R.flowing=!1,I&&I.emit("unpipe",this,ae),this);if(!I){var ge=R.pipes,Pe=R.pipesCount;R.pipes=null,R.pipesCount=0,R.flowing=!1;for(var Se=0;Se<Pe;Se++)ge[Se].emit("unpipe",this,{hasUnpiped:!1});return this}var ve=xe(R.pipes,I);return ve===-1?this:(R.pipes.splice(ve,1),R.pipesCount-=1,R.pipesCount===1&&(R.pipes=R.pipes[0]),I.emit("unpipe",this,ae),this)},te.prototype.on=function(I,R){var ae=i.prototype.on.call(this,I,R),ge=this._readableState;return I==="data"?(ge.readableListening=this.listenerCount("readable")>0,ge.flowing!==!1&&this.resume()):I==="readable"&&!ge.endEmitted&&!ge.readableListening&&(ge.readableListening=ge.needReadable=!0,ge.flowing=!1,ge.emittedReadable=!1,y("on readable",ge.length,ge.reading),ge.length?D(this):ge.reading||r.nextTick(Ne,this)),ae},te.prototype.addListener=te.prototype.on,te.prototype.removeListener=function(I,R){var ae=i.prototype.removeListener.call(this,I,R);return I==="readable"&&r.nextTick(Fe,this),ae},te.prototype.removeAllListeners=function(I){var R=i.prototype.removeAllListeners.apply(this,arguments);return(I==="readable"||I===void 0)&&r.nextTick(Fe,this),R};function Fe(I){var R=I._readableState;R.readableListening=I.listenerCount("readable")>0,R.resumeScheduled&&!R.paused?R.flowing=!0:I.listenerCount("data")>0&&I.resume()}u(Fe,"updateReadableListening");function Ne(I){y("readable nexttick read 0"),I.read(0)}u(Ne,"nReadingNextTick"),te.prototype.resume=function(){var I=this._readableState;return I.flowing||(y("resume"),I.flowing=!I.readableListening,Ae(this,I)),I.paused=!1,this};function Ae(I,R){R.resumeScheduled||(R.resumeScheduled=!0,r.nextTick(Le,I,R))}u(Ae,"resume");function Le(I,R){y("resume",R.reading),R.reading||I.read(0),R.resumeScheduled=!1,I.emit("resume"),M(I),R.flowing&&!R.reading&&I.read(0)}u(Le,"resume_"),te.prototype.pause=function(){return y("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(y("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function M(I){var R=I._readableState;for(y("flow",R.flowing);R.flowing&&I.read()!==null;);}u(M,"flow"),te.prototype.wrap=function(I){var R=this,ae=this._readableState,ge=!1;I.on("end",function(){if(y("wrapped end"),ae.decoder&&!ae.ended){var ve=ae.decoder.end();ve&&ve.length&&R.push(ve)}R.push(null)}),I.on("data",function(ve){if(y("wrapped data"),ae.decoder&&(ve=ae.decoder.write(ve)),!(ae.objectMode&&ve==null)&&!(!ae.objectMode&&(!ve||!ve.length))){var et=R.push(ve);et||(ge=!0,I.pause())}});for(var Pe in I)this[Pe]===void 0&&typeof I[Pe]=="function"&&(this[Pe]=u(function(et){return u(function(){return I[et].apply(I,arguments)},"methodWrapReturnFunction")},"methodWrap")(Pe));for(var Se=0;Se<q.length;Se++)I.on(q[Se],this.emit.bind(this,q[Se]));return this._read=function(ve){y("wrapped _read",ve),ge&&(ge=!1,I.resume())},this},typeof Symbol=="function"&&(te.prototype[Symbol.asyncIterator]=function(){return se===void 0&&(se=Rg()),se(this)}),Object.defineProperty(te.prototype,"readableHighWaterMark",{enumerable:!1,get:u(function(){return this._readableState.highWaterMark},"get")}),Object.defineProperty(te.prototype,"readableBuffer",{enumerable:!1,get:u(function(){return this._readableState&&this._readableState.buffer},"get")}),Object.defineProperty(te.prototype,"readableFlowing",{enumerable:!1,get:u(function(){return this._readableState.flowing},"get"),set:u(function(R){this._readableState&&(this._readableState.flowing=R)},"set")}),te._fromList=L,Object.defineProperty(te.prototype,"readableLength",{enumerable:!1,get:u(function(){return this._readableState.length},"get")});function L(I,R){if(R.length===0)return null;var ae;return R.objectMode?ae=R.buffer.shift():!I||I>=R.length?(R.decoder?ae=R.buffer.join(""):R.buffer.length===1?ae=R.buffer.first():ae=R.buffer.concat(R.length),R.buffer.clear()):ae=R.buffer.consume(I,R.decoder),ae}u(L,"fromList");function re(I){var R=I._readableState;y("endReadable",R.endEmitted),R.endEmitted||(R.ended=!0,r.nextTick(be,R,I))}u(re,"endReadable");function be(I,R){if(y("endReadableNT",I.endEmitted,I.length),!I.endEmitted&&I.length===0&&(I.endEmitted=!0,R.readable=!1,R.emit("end"),I.autoDestroy)){var ae=R._writableState;(!ae||ae.autoDestroy&&ae.finished)&&R.destroy()}}u(be,"endReadableNT"),typeof Symbol=="function"&&(te.from=function(I,R){return Y===void 0&&(Y=Og()),Y(te,I,R)});function xe(I,R){for(var ae=0,ge=I.length;ae<ge;ae++)if(I[ae]===R)return ae;return-1}return u(xe,"indexOf"),Cs}u(Us,"dew$3");var Ns={},Nf=!1;function Ms(){if(Nf)return Ns;Nf=!0,Ns=l;var r=ji().codes,t=r.ERR_METHOD_NOT_IMPLEMENTED,e=r.ERR_MULTIPLE_CALLBACK,i=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=r.ERR_TRANSFORM_WITH_LENGTH_0,o=pi();mi()(l,o);function a(g,w){var v=this._transformState;v.transforming=!1;var S=v.writecb;if(S===null)return this.emit("error",new e);v.writechunk=null,v.writecb=null,w!=null&&this.push(w),S(g);var E=this._readableState;E.reading=!1,(E.needReadable||E.length<E.highWaterMark)&&this._read(E.highWaterMark)}u(a,"afterTransform");function l(g){if(!(this instanceof l))return new l(g);o.call(this,g),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,g&&(typeof g.transform=="function"&&(this._transform=g.transform),typeof g.flush=="function"&&(this._flush=g.flush)),this.on("prefinish",m)}u(l,"Transform");function m(){var g=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(w,v){y(g,w,v)}):y(this,null,null)}u(m,"prefinish"),l.prototype.push=function(g,w){return this._transformState.needTransform=!1,o.prototype.push.call(this,g,w)},l.prototype._transform=function(g,w,v){v(new t("_transform()"))},l.prototype._write=function(g,w,v){var S=this._transformState;if(S.writecb=v,S.writechunk=g,S.writeencoding=w,!S.transforming){var E=this._readableState;(S.needTransform||E.needReadable||E.length<E.highWaterMark)&&this._read(E.highWaterMark)}},l.prototype._read=function(g){var w=this._transformState;w.writechunk!==null&&!w.transforming?(w.transforming=!0,this._transform(w.writechunk,w.writeencoding,w.afterTransform)):w.needTransform=!0},l.prototype._destroy=function(g,w){o.prototype._destroy.call(this,g,function(v){w(v)})};function y(g,w,v){if(w)return g.emit("error",w);if(v!=null&&g.push(v),g._writableState.length)throw new n;if(g._transformState.transforming)throw new i;return g.push(null)}return u(y,"done"),Ns}u(Ms,"dew$2");var Ds={},Df=!1;function jf(){if(Df)return Ds;Df=!0,Ds=t;var r=Ms();mi()(t,r);function t(e){if(!(this instanceof t))return new t(e);r.call(this,e)}return u(t,"PassThrough"),t.prototype._transform=function(e,i,n){n(null,e)},Ds}u(jf,"dew$1");var Ls={},Lf=!1;function zf(){if(Lf)return Ls;Lf=!0;var r;function t(v){var S=!1;return function(){S||(S=!0,v.apply(void 0,arguments))}}u(t,"once");var e=ji().codes,i=e.ERR_MISSING_ARGS,n=e.ERR_STREAM_DESTROYED;function o(v){if(v)throw v}u(o,"noop");function a(v){return v.setHeader&&typeof v.abort=="function"}u(a,"isRequest");function l(v,S,E,A){A=t(A);var O=!1;v.on("close",function(){O=!0}),r===void 0&&(r=Mo()),r(v,{readable:S,writable:E},function(j){if(j)return A(j);O=!0,A()});var U=!1;return function(j){if(!O&&!U){if(U=!0,a(v))return v.abort();if(typeof v.destroy=="function")return v.destroy();A(j||new n("pipe"))}}}u(l,"destroyer");function m(v){v()}u(m,"call");function y(v,S){return v.pipe(S)}u(y,"pipe");function g(v){return!v.length||typeof v[v.length-1]!="function"?o:v.pop()}u(g,"popCallback");function w(){for(var v=arguments.length,S=new Array(v),E=0;E<v;E++)S[E]=arguments[E];var A=g(S);if(Array.isArray(S[0])&&(S=S[0]),S.length<2)throw new i("streams");var O,U=S.map(function(j,W){var se=W<S.length-1,Y=W>0;return l(j,se,Y,function(he){O||(O=he),he&&U.forEach(m),!se&&(U.forEach(m),A(O))})});return S.reduce(y)}return u(w,"pipeline"),Ls=w,Ls}u(zf,"dew");vt.once=function(r,t){return new Promise((e,i)=>{function n(...a){o!==void 0&&r.removeListener("error",o),e(a)}u(n,"eventListener");let o;t!=="error"&&(o=u(a=>{r.removeListener(name,n),i(a)},"errorListener"),r.once("error",o)),r.once(t,n)})};vt.on=function(r,t){let e=[],i=[],n=null,o=!1,a={next(){return C(this,null,function*(){let g=e.shift();if(g)return createIterResult(g,!1);if(n){let w=Promise.reject(n);return n=null,w}return o?createIterResult(void 0,!0):new Promise((w,v)=>i.push({resolve:w,reject:v}))})},return(){return C(this,null,function*(){r.removeListener(t,l),r.removeListener("error",m),o=!0;for(let g of i)g.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)})},throw(g){n=g,r.removeListener(t,l),r.removeListener("error",m)},[Symbol.asyncIterator](){return this}};return r.on(t,l),r.on("error",m),a;function l(...g){let w=i.shift();w?w.resolve(createIterResult(g,!1)):e.push(g)}u(l,"eventHandler");function m(g){o=!0;let w=i.shift();w?w.reject(g):n=g,a.return()}u(m,"errorHandler")};var{EventEmitter:F1,defaultMaxListeners:x1,init:I1,listenerCount:T1,on:A1,once:R1}=vt;var js={},$f=!1,zs=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:global;function kg(){if($f)return js;$f=!0,js=e;var r=vt.EventEmitter,t=mi();t(e,r),e.Readable=Us(),e.Writable=Ps(),e.Duplex=pi(),e.Transform=Ms(),e.PassThrough=jf(),e.finished=Mo(),e.pipeline=zf(),e.Stream=e;function e(){r.call(this||zs)}return u(e,"Stream"),e.prototype.pipe=function(i,n){var o=this||zs;function a(S){i.writable&&i.write(S)===!1&&o.pause&&o.pause()}u(a,"ondata"),o.on("data",a);function l(){o.readable&&o.resume&&o.resume()}u(l,"ondrain"),i.on("drain",l),!i._isStdio&&(!n||n.end!==!1)&&(o.on("end",y),o.on("close",g));var m=!1;function y(){m||(m=!0,i.end())}u(y,"onend");function g(){m||(m=!0,typeof i.destroy=="function"&&i.destroy())}u(g,"onclose");function w(S){if(v(),r.listenerCount(this||zs,"error")===0)throw S}u(w,"onerror"),o.on("error",w),i.on("error",w);function v(){o.removeListener("data",a),i.removeListener("drain",l),o.removeListener("end",y),o.removeListener("close",g),o.removeListener("error",w),i.removeListener("error",w),o.removeListener("end",v),o.removeListener("close",v),i.removeListener("close",v)}return u(v,"cleanup"),o.on("end",v),o.on("close",v),i.on("close",v),i.emit("pipe",o),i},js}u(kg,"dew");var Lt=kg();var V1=Q._extend,K1=Q.callbackify,G1=Q.debuglog,Y1=Q.deprecate,X1=Q.format,J1=Q.inherits,Q1=Q.inspect,e2=Q.isArray,t2=Q.isBoolean,r2=Q.isBuffer,i2=Q.isDate,n2=Q.isError,o2=Q.isFunction,a2=Q.isNull,s2=Q.isNullOrUndefined,u2=Q.isNumber,c2=Q.isObject,l2=Q.isPrimitive,f2=Q.isRegExp,h2=Q.isString,d2=Q.isSymbol,p2=Q.isUndefined,m2=Q.log,$s=Q.promisify,g2=Q.types,y2=Q.TextEncoder=globalThis.TextEncoder,b2=Q.TextDecoder=globalThis.TextDecoder;var Zf=Lt.Readable;Zf.wrap=function(r,t){return t=Object.assign({objectMode:r.readableObjectMode!=null||r.objectMode!=null||!0},t),t.destroy=function(e,i){r.destroy(e),i(e)},new Zf(t).wrap(r)};var N2=Lt.Writable,D2=Lt.Duplex,L2=Lt.Transform,P2=Lt.PassThrough,U2=Lt.finished,M2=Lt.pipeline,j2=Lt.Stream,z2={finished:$s(Lt.finished),pipeline:$s(Lt.pipeline)};function Wf(r,t){if(r==null)throw new TypeError("Cannot convert first argument to object");for(var e=Object(r),i=1;i<arguments.length;i++){var n=arguments[i];if(n!=null)for(var o=Object.keys(Object(n)),a=0,l=o.length;a<l;a++){var m=o[a],y=Object.getOwnPropertyDescriptor(n,m);y!==void 0&&y.enumerable&&(e[m]=n[m])}}return e}u(Wf,"e");var Cg={assign:Wf,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:Wf})}},Eh,Hf=Object.prototype.toString,Sh=u(function(r){var t=Hf.call(r),e=t==="[object Arguments]";return e||(e=t!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&Hf.call(r.callee)==="[object Function]"),e},"r$1");Object.keys||(dn=Object.prototype.hasOwnProperty,Zs=Object.prototype.toString,qf=Sh,Ws=Object.prototype.propertyIsEnumerable,Vf=!Ws.call({toString:null},"toString"),Kf=Ws.call(function(){},"prototype"),pn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],jo=u(function(r){var t=r.constructor;return t&&t.prototype===r},"f"),Gf={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Yf=function(){if(typeof window=="undefined")return!1;for(var r in window)try{if(!Gf["$"+r]&&dn.call(window,r)&&window[r]!==null&&typeof window[r]=="object")try{jo(window[r])}catch(t){return!0}}catch(t){return!0}return!1}(),Eh=u(function(r){var t=r!==null&&typeof r=="object",e=Zs.call(r)==="[object Function]",i=qf(r),n=t&&Zs.call(r)==="[object String]",o=[];if(!t&&!e&&!i)throw new TypeError("Object.keys called on a non-object");var a=Kf&&e;if(n&&r.length>0&&!dn.call(r,0))for(var l=0;l<r.length;++l)o.push(String(l));if(i&&r.length>0)for(var m=0;m<r.length;++m)o.push(String(m));else for(var y in r)a&&y==="prototype"||!dn.call(r,y)||o.push(String(y));if(Vf)for(var g=function(v){if(typeof window=="undefined"||!Yf)return jo(v);try{return jo(v)}catch(S){return!1}}(r),w=0;w<pn.length;++w)g&&pn[w]==="constructor"||!dn.call(r,pn[w])||o.push(pn[w]);return o},"t"));var dn,Zs,qf,Ws,Vf,Kf,pn,jo,Gf,Yf,Ng=Eh,Dg=Array.prototype.slice,Lg=Sh,Xf=Object.keys,Wo=Xf?function(r){return Xf(r)}:Ng,Jf=Object.keys;Wo.shim=function(){return Object.keys?function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2)||(Object.keys=function(r){return Lg(r)?Jf(Dg.call(r)):Jf(r)}):Object.keys=Wo,Object.keys||Wo};var Pg=Wo,Ug=Pg,Mg=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",jg=Object.prototype.toString,zg=Array.prototype.concat,Xs=Object.defineProperty,Fh=Xs&&function(){var r={};try{for(var t in Xs(r,"x",{enumerable:!1,value:r}),r)return!1;return r.x===r}catch(e){return!1}}(),$g=u(function(r,t,e,i){var n;(!(t in r)||typeof(n=i)=="function"&&jg.call(n)==="[object Function]"&&i())&&(Fh?Xs(r,t,{configurable:!0,enumerable:!1,value:e,writable:!0}):r[t]=e)},"l$1"),xh=u(function(r,t){var e=arguments.length>2?arguments[2]:{},i=Ug(t);Mg&&(i=zg.call(i,Object.getOwnPropertySymbols(t)));for(var n=0;n<i.length;n+=1)$g(r,i[n],t[i[n]],e[i[n]])},"u$1");xh.supportsDescriptors=!!Fh;var Ko=xh,Zg=u(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),e=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(e)!=="[object Symbol]")return!1;for(t in r[t]=42,r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var i=Object.getOwnPropertySymbols(r);if(i.length!==1||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var n=Object.getOwnPropertyDescriptor(r,t);if(n.value!==42||n.enumerable!==!0)return!1}return!0},"t$1"),Qf=(typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:global).Symbol,Wg=Zg,Hg=u(function(){return typeof Qf=="function"&&typeof Symbol=="function"&&typeof Qf("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&Wg()},"l$2"),qg="Function.prototype.bind called on incompatible ",Hs=Array.prototype.slice,Vg=Object.prototype.toString,Kg=u(function(r){var t=this;if(typeof t!="function"||Vg.call(t)!=="[object Function]")throw new TypeError(qg+t);for(var e,i=Hs.call(arguments,1),n=function(){if(this instanceof e){var y=t.apply(this,i.concat(Hs.call(arguments)));return Object(y)===y?y:this}return t.apply(r,i.concat(Hs.call(arguments)))},o=Math.max(0,t.length-i.length),a=[],l=0;l<o;l++)a.push("$"+l);if(e=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(n),t.prototype){var m=u(function(){},"y");m.prototype=t.prototype,e.prototype=new m,m.prototype=null}return e},"r$3"),Ih=Function.prototype.bind||Kg,yn=TypeError,bi=Object.getOwnPropertyDescriptor;if(bi)try{bi({},"")}catch(r){bi=null}var qs=u(function(){throw new yn},"n$3"),Gg=bi?function(){try{return arguments.callee,qs}catch(r){try{return bi(arguments,"callee").get}catch(t){return qs}}}():qs,gi=Hg(),yi=Object.getPrototypeOf||function(r){return r.__proto__},Vs=typeof Uint8Array=="undefined"?void 0:yi(Uint8Array),Ks={"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?void 0:ArrayBuffer,"%ArrayBufferPrototype%":typeof ArrayBuffer=="undefined"?void 0:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":gi?yi([][Symbol.iterator]()):void 0,"%ArrayPrototype%":Array.prototype,"%ArrayProto_entries%":Array.prototype.entries,"%ArrayProto_forEach%":Array.prototype.forEach,"%ArrayProto_keys%":Array.prototype.keys,"%ArrayProto_values%":Array.prototype.values,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":void 0,"%AsyncFunctionPrototype%":void 0,"%AsyncGenerator%":void 0,"%AsyncGeneratorFunction%":void 0,"%AsyncGeneratorPrototype%":void 0,"%AsyncIteratorPrototype%":void 0,"%Atomics%":typeof Atomics=="undefined"?void 0:Atomics,"%Boolean%":Boolean,"%BooleanPrototype%":Boolean.prototype,"%DataView%":typeof DataView=="undefined"?void 0:DataView,"%DataViewPrototype%":typeof DataView=="undefined"?void 0:DataView.prototype,"%Date%":Date,"%DatePrototype%":Date.prototype,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%ErrorPrototype%":Error.prototype,"%eval%":eval,"%EvalError%":EvalError,"%EvalErrorPrototype%":EvalError.prototype,"%Float32Array%":typeof Float32Array=="undefined"?void 0:Float32Array,"%Float32ArrayPrototype%":typeof Float32Array=="undefined"?void 0:Float32Array.prototype,"%Float64Array%":typeof Float64Array=="undefined"?void 0:Float64Array,"%Float64ArrayPrototype%":typeof Float64Array=="undefined"?void 0:Float64Array.prototype,"%Function%":Function,"%FunctionPrototype%":Function.prototype,"%Generator%":void 0,"%GeneratorFunction%":void 0,"%GeneratorPrototype%":void 0,"%Int8Array%":typeof Int8Array=="undefined"?void 0:Int8Array,"%Int8ArrayPrototype%":typeof Int8Array=="undefined"?void 0:Int8Array.prototype,"%Int16Array%":typeof Int16Array=="undefined"?void 0:Int16Array,"%Int16ArrayPrototype%":typeof Int16Array=="undefined"?void 0:Int8Array.prototype,"%Int32Array%":typeof Int32Array=="undefined"?void 0:Int32Array,"%Int32ArrayPrototype%":typeof Int32Array=="undefined"?void 0:Int32Array.prototype,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":gi?yi(yi([][Symbol.iterator]())):void 0,"%JSON%":typeof JSON=="object"?JSON:void 0,"%JSONParse%":typeof JSON=="object"?JSON.parse:void 0,"%Map%":typeof Map=="undefined"?void 0:Map,"%MapIteratorPrototype%":typeof Map!="undefined"&&gi?yi(new Map()[Symbol.iterator]()):void 0,"%MapPrototype%":typeof Map=="undefined"?void 0:Map.prototype,"%Math%":Math,"%Number%":Number,"%NumberPrototype%":Number.prototype,"%Object%":Object,"%ObjectPrototype%":Object.prototype,"%ObjProto_toString%":Object.prototype.toString,"%ObjProto_valueOf%":Object.prototype.valueOf,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?void 0:Promise,"%PromisePrototype%":typeof Promise=="undefined"?void 0:Promise.prototype,"%PromiseProto_then%":typeof Promise=="undefined"?void 0:Promise.prototype.then,"%Promise_all%":typeof Promise=="undefined"?void 0:Promise.all,"%Promise_reject%":typeof Promise=="undefined"?void 0:Promise.reject,"%Promise_resolve%":typeof Promise=="undefined"?void 0:Promise.resolve,"%Proxy%":typeof Proxy=="undefined"?void 0:Proxy,"%RangeError%":RangeError,"%RangeErrorPrototype%":RangeError.prototype,"%ReferenceError%":ReferenceError,"%ReferenceErrorPrototype%":ReferenceError.prototype,"%Reflect%":typeof Reflect=="undefined"?void 0:Reflect,"%RegExp%":RegExp,"%RegExpPrototype%":RegExp.prototype,"%Set%":typeof Set=="undefined"?void 0:Set,"%SetIteratorPrototype%":typeof Set!="undefined"&&gi?yi(new Set()[Symbol.iterator]()):void 0,"%SetPrototype%":typeof Set=="undefined"?void 0:Set.prototype,"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?void 0:SharedArrayBuffer,"%SharedArrayBufferPrototype%":typeof SharedArrayBuffer=="undefined"?void 0:SharedArrayBuffer.prototype,"%String%":String,"%StringIteratorPrototype%":gi?yi(""[Symbol.iterator]()):void 0,"%StringPrototype%":String.prototype,"%Symbol%":gi?Symbol:void 0,"%SymbolPrototype%":gi?Symbol.prototype:void 0,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":Gg,"%TypedArray%":Vs,"%TypedArrayPrototype%":Vs?Vs.prototype:void 0,"%TypeError%":yn,"%TypeErrorPrototype%":yn.prototype,"%Uint8Array%":typeof Uint8Array=="undefined"?void 0:Uint8Array,"%Uint8ArrayPrototype%":typeof Uint8Array=="undefined"?void 0:Uint8Array.prototype,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,"%Uint8ClampedArrayPrototype%":typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray.prototype,"%Uint16Array%":typeof Uint16Array=="undefined"?void 0:Uint16Array,"%Uint16ArrayPrototype%":typeof Uint16Array=="undefined"?void 0:Uint16Array.prototype,"%Uint32Array%":typeof Uint32Array=="undefined"?void 0:Uint32Array,"%Uint32ArrayPrototype%":typeof Uint32Array=="undefined"?void 0:Uint32Array.prototype,"%URIError%":URIError,"%URIErrorPrototype%":URIError.prototype,"%WeakMap%":typeof WeakMap=="undefined"?void 0:WeakMap,"%WeakMapPrototype%":typeof WeakMap=="undefined"?void 0:WeakMap.prototype,"%WeakSet%":typeof WeakSet=="undefined"?void 0:WeakSet,"%WeakSetPrototype%":typeof WeakSet=="undefined"?void 0:WeakSet.prototype},eh=Ih.call(Function.call,String.prototype.replace),Yg=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Xg=/\\(\\)?/g,Jg=u(function(r){var t=[];return eh(r,Yg,function(e,i,n,o){t[t.length]=n?eh(o,Xg,"$1"):i||e}),t},"v"),Qg=u(function(r,t){if(!(r in Ks))throw new SyntaxError("intrinsic "+r+" does not exist!");if(Ks[r]===void 0&&!t)throw new yn("intrinsic "+r+" exists, but is not available. Please file an issue!");return Ks[r]},"P"),ey=u(function(r,t){if(typeof r!="string"||r.length===0)throw new TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new TypeError('"allowMissing" argument must be a boolean');for(var e=Jg(r),i=Qg("%"+(e.length>0?e[0]:"")+"%",t),n=1;n<e.length;n+=1)if(i!=null)if(bi&&n+1>=e.length){var o=bi(i,e[n]);if(!t&&!(e[n]in i))throw new yn("base intrinsic for "+r+" exists, but the property is not available.");i=o?o.get||o.value:i[e[n]]}else i=i[e[n]];return i},"c$2"),Th,th=Ih,Ah=ey("%Function%"),ty=Ah.apply,ry=Ah.call;(Th=u(function(){return th.apply(ry,arguments)},"t$4")).apply=function(){return th.apply(ty,arguments)};var iy=Th,Js,Qs,rh=u(function(r){return r!=r},"i$3"),ny=(Js=u(function(r,t){return r===0&&t===0?1/r==1/t:r===t||!(!rh(r)||!rh(t))},"r$4"),Js),oy=(Qs=u(function(){return typeof Object.is=="function"?Object.is:ny},"n$4"),Qs),ay=Ko,sy=Ko,uy=Js,Rh=Qs,cy=u(function(){var r=oy();return ay(Object,{is:r},{is:function(){return Object.is!==r}}),r},"l$5"),Oh=iy(Rh(),Object);sy(Oh,{getPolyfill:Rh,implementation:uy,shim:cy});var Bh=Oh;ru=u(function(r){return r!=r},"N");var ru,iu,ly=ru,fy=(iu=u(function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:ly},"e$5"),Ko),hy=iu,dy=Ko,py=ru,kh=iu,my=u(function(){var r=hy();return fy(Number,{isNaN:r},{isNaN:function(){return Number.isNaN!==r}}),r},"o$6"),Ch=kh();dy(Ch,{getPolyfill:kh,implementation:py,shim:my});var gy=Ch,Gs={},ih=!1;function Nh(){if(ih)return Gs;function r(y){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g})(y)}u(r,"e");function t(y,g){return!g||r(g)!=="object"&&typeof g!="function"?function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(y):g}u(t,"n");function e(y){return(e=Object.setPrototypeOf?Object.getPrototypeOf:function(g){return g.__proto__||Object.getPrototypeOf(g)})(y)}u(e,"r");function i(y,g){return(i=Object.setPrototypeOf||function(w,v){return w.__proto__=v,w})(y,g)}u(i,"o"),ih=!0;var n,o,a={};function l(y,g,w){w||(w=Error);var v=function(S){function E(A,O,U){var j;return function(W,se){if(!(W instanceof se))throw new TypeError("Cannot call a class as a function")}(this,E),(j=t(this,e(E).call(this,function(W,se,Y){return typeof g=="string"?g:g(W,se,Y)}(A,O,U)))).code=y,j}return u(E,"a"),function(A,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(O&&O.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),O&&i(A,O)}(E,S),E}(w);a[y]=v}u(l,"f");function m(y,g){if(Array.isArray(y)){var w=y.length;return y=y.map(function(v){return String(v)}),w>2?"one of ".concat(g," ").concat(y.slice(0,w-1).join(", "),", or ")+y[w-1]:w===2?"one of ".concat(g," ").concat(y[0]," or ").concat(y[1]):"of ".concat(g," ").concat(y[0])}return"of ".concat(g," ").concat(String(y))}return u(m,"s"),l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",function(y,g,w){var v,S,E;if(n===void 0&&(n=tu()),n(typeof y=="string","'name' must be a string"),typeof g=="string"&&(S="not ",g.substr(0,S.length)===S)?(v="must not be",g=g.replace(/^not /,"")):v="must be",function(O,U,j){return(j===void 0||j>O.length)&&(j=O.length),O.substring(j-U.length,j)===U}(y," argument"))E="The ".concat(y," ").concat(v," ").concat(m(g,"type"));else{var A=function(O,U,j){return typeof j!="number"&&(j=0),!(j+U.length>O.length)&&O.indexOf(U,j)!==-1}(y,".")?"property":"argument";E='The "'.concat(y,'" ').concat(A," ").concat(v," ").concat(m(g,"type"))}return E+=". Received type ".concat(r(w))},TypeError),l("ERR_INVALID_ARG_VALUE",function(y,g){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=Q);var v=o.inspect(g);return v.length>128&&(v="".concat(v.slice(0,128),"...")),"The argument '".concat(y,"' ").concat(w,". Received ").concat(v)},TypeError),l("ERR_INVALID_RETURN_VALUE",function(y,g,w){var v;return v=w&&w.constructor&&w.constructor.name?"instance of ".concat(w.constructor.name):"type ".concat(r(w)),"Expected ".concat(y,' to be returned from the "').concat(g,'"')+" function but got ".concat(v,".")},TypeError),l("ERR_MISSING_ARGS",function(){for(var y=arguments.length,g=new Array(y),w=0;w<y;w++)g[w]=arguments[w];n===void 0&&(n=tu()),n(g.length>0,"At least one arg needs to be specified");var v="The ",S=g.length;switch(g=g.map(function(E){return'"'.concat(E,'"')}),S){case 1:v+="".concat(g[0]," argument");break;case 2:v+="".concat(g[0]," and ").concat(g[1]," arguments");break;default:v+=g.slice(0,S-1).join(", "),v+=", and ".concat(g[S-1]," arguments")}return"".concat(v," must be specified")},TypeError),Gs.codes=a,Gs}u(Nh,"i$5");var nh={},oh=!1;function yy(){if(oh)return nh;oh=!0;var r=Qe;function t(q,ee,J){return ee in q?Object.defineProperty(q,ee,{value:J,enumerable:!0,configurable:!0,writable:!0}):q[ee]=J,q}u(t,"r");function e(q,ee){for(var J=0;J<ee.length;J++){var te=ee[J];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(q,te.key,te)}}u(e,"o");function i(q,ee){return!ee||g(ee)!=="object"&&typeof ee!="function"?n(q):ee}u(i,"c");function n(q){if(q===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q}u(n,"a");function o(q){var ee=typeof Map=="function"?new Map:void 0;return(o=u(function(J){if(J===null||(te=J,Function.toString.call(te).indexOf("[native code]")===-1))return J;var te;if(typeof J!="function")throw new TypeError("Super expression must either be null or a function");if(ee!==void 0){if(ee.has(J))return ee.get(J);ee.set(J,ye)}function ye(){return l(J,arguments,y(this).constructor)}return u(ye,"r"),ye.prototype=Object.create(J.prototype,{constructor:{value:ye,enumerable:!1,writable:!0,configurable:!0}}),m(ye,J)},"f"))(q)}u(o,"f");function a(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(q){return!1}}u(a,"s");function l(q,ee,J){return(l=a()?Reflect.construct:function(te,ye,B){var $=[null];$.push.apply($,ye);var ne=new(Function.bind.apply(te,$));return B&&m(ne,B.prototype),ne}).apply(null,arguments)}u(l,"p");function m(q,ee){return(m=Object.setPrototypeOf||function(J,te){return J.__proto__=te,J})(q,ee)}u(m,"g");function y(q){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(ee){return ee.__proto__||Object.getPrototypeOf(ee)})(q)}u(y,"h");function g(q){return(g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ee){return typeof ee}:function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee})(q)}u(g,"y");var w=Q.inspect,v=Nh().codes.ERR_INVALID_ARG_TYPE;function S(q,ee,J){return(J===void 0||J>q.length)&&(J=q.length),q.substring(J-ee.length,J)===ee}u(S,"d");var E="",A="",O="",U="",j={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function W(q){var ee=Object.keys(q),J=Object.create(Object.getPrototypeOf(q));return ee.forEach(function(te){J[te]=q[te]}),Object.defineProperty(J,"message",{value:q.message}),J}u(W,"O");function se(q){return w(q,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}u(se,"x");function Y(q,ee,J){var te="",ye="",B=0,$="",ne=!1,_e=se(q),pe=_e.split(`
`),P=se(ee).split(`
`),D=0,K="";if(J==="strictEqual"&&g(q)==="object"&&g(ee)==="object"&&q!==null&&ee!==null&&(J="strictEqualObject"),pe.length===1&&P.length===1&&pe[0]!==P[0]){var V=pe[0].length+P[0].length;if(V<=10){if(!(g(q)==="object"&&q!==null||g(ee)==="object"&&ee!==null||q===0&&ee===0))return"".concat(j[J],`
`)+"".concat(pe[0]," !== ").concat(P[0],`
`)}else if(J!=="strictEqualObject"&&V<(r.stderr&&r.stderr.isTTY?r.stderr.columns:80)){for(;pe[0][D]===P[0][D];)D++;D>2&&(K=`
`.concat(function(I,R){if(R=Math.floor(R),I.length==0||R==0)return"";var ae=I.length*R;for(R=Math.floor(Math.log(R)/Math.log(2));R;)I+=I,R--;return I+=I.substring(0,ae-I.length)}(" ",D),"^"),D=0)}}for(var ie=pe[pe.length-1],me=P[P.length-1];ie===me&&(D++<2?$=`
`.concat(ie).concat($):te=ie,pe.pop(),P.pop(),pe.length!==0&&P.length!==0);)ie=pe[pe.length-1],me=P[P.length-1];var Fe=Math.max(pe.length,P.length);if(Fe===0){var Ne=_e.split(`
`);if(Ne.length>30)for(Ne[26]="".concat(E,"...").concat(U);Ne.length>27;)Ne.pop();return"".concat(j.notIdentical,`
`).concat(Ne.join(`
`),`
`)}D>3&&($=`
`.concat(E,"...").concat(U).concat($),ne=!0),te!==""&&($=`
`.concat(te).concat($),te="");var Ae=0,Le=j[J]+`
`.concat(A,"+ actual").concat(U," ").concat(O,"- expected").concat(U),M=" ".concat(E,"...").concat(U," Lines skipped");for(D=0;D<Fe;D++){var L=D-B;if(pe.length<D+1)L>1&&D>2&&(L>4?(ye+=`
`.concat(E,"...").concat(U),ne=!0):L>3&&(ye+=`
`.concat(P[D-2]),Ae++),ye+=`
`.concat(P[D-1]),Ae++),B=D,te+=`
`.concat(O,"-").concat(U," ").concat(P[D]),Ae++;else if(P.length<D+1)L>1&&D>2&&(L>4?(ye+=`
`.concat(E,"...").concat(U),ne=!0):L>3&&(ye+=`
`.concat(pe[D-2]),Ae++),ye+=`
`.concat(pe[D-1]),Ae++),B=D,ye+=`
`.concat(A,"+").concat(U," ").concat(pe[D]),Ae++;else{var re=P[D],be=pe[D],xe=be!==re&&(!S(be,",")||be.slice(0,-1)!==re);xe&&S(re,",")&&re.slice(0,-1)===be&&(xe=!1,be+=","),xe?(L>1&&D>2&&(L>4?(ye+=`
`.concat(E,"...").concat(U),ne=!0):L>3&&(ye+=`
`.concat(pe[D-2]),Ae++),ye+=`
`.concat(pe[D-1]),Ae++),B=D,ye+=`
`.concat(A,"+").concat(U," ").concat(be),te+=`
`.concat(O,"-").concat(U," ").concat(re),Ae+=2):(ye+=te,te="",L!==1&&D!==0||(ye+=`
`.concat(be),Ae++))}if(Ae>20&&D<Fe-2)return"".concat(Le).concat(M,`
`).concat(ye,`
`).concat(E,"...").concat(U).concat(te,`
`)+"".concat(E,"...").concat(U)}return"".concat(Le).concat(ne?M:"",`
`).concat(ye).concat(te).concat($).concat(K)}u(Y,"q");var he=function(q){function ee(ye){var B;if(function(Ne,Ae){if(!(Ne instanceof Ae))throw new TypeError("Cannot call a class as a function")}(this,ee),g(ye)!=="object"||ye===null)throw new v("options","Object",ye);var $=ye.message,ne=ye.operator,_e=ye.stackStartFn,pe=ye.actual,P=ye.expected,D=Error.stackTraceLimit;if(Error.stackTraceLimit=0,$!=null)B=i(this,y(ee).call(this,String($)));else if(r.stderr&&r.stderr.isTTY&&(r.stderr&&r.stderr.getColorDepth&&r.stderr.getColorDepth()!==1?(E="\x1B[34m",A="\x1B[32m",U="\x1B[39m",O="\x1B[31m"):(E="",A="",U="",O="")),g(pe)==="object"&&pe!==null&&g(P)==="object"&&P!==null&&"stack"in pe&&pe instanceof Error&&"stack"in P&&P instanceof Error&&(pe=W(pe),P=W(P)),ne==="deepStrictEqual"||ne==="strictEqual")B=i(this,y(ee).call(this,Y(pe,P,ne)));else if(ne==="notDeepStrictEqual"||ne==="notStrictEqual"){var K=j[ne],V=se(pe).split(`
`);if(ne==="notStrictEqual"&&g(pe)==="object"&&pe!==null&&(K=j.notStrictEqualObject),V.length>30)for(V[26]="".concat(E,"...").concat(U);V.length>27;)V.pop();B=V.length===1?i(this,y(ee).call(this,"".concat(K," ").concat(V[0]))):i(this,y(ee).call(this,"".concat(K,`
`).concat(V.join(`
`),`
`)))}else{var ie=se(pe),me="",Fe=j[ne];ne==="notDeepEqual"||ne==="notEqual"?(ie="".concat(j[ne],`
`).concat(ie)).length>1024&&(ie="".concat(ie.slice(0,1021),"...")):(me="".concat(se(P)),ie.length>512&&(ie="".concat(ie.slice(0,509),"...")),me.length>512&&(me="".concat(me.slice(0,509),"...")),ne==="deepEqual"||ne==="equal"?ie="".concat(Fe,`
`).concat(ie,`
should equal
`):me=" ".concat(ne," ").concat(me)),B=i(this,y(ee).call(this,"".concat(ie).concat(me)))}return Error.stackTraceLimit=D,B.generatedMessage=!$,Object.defineProperty(n(B),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),B.code="ERR_ASSERTION",B.actual=pe,B.expected=P,B.operator=ne,Error.captureStackTrace&&Error.captureStackTrace(n(B),_e),B.stack,B.name="AssertionError",i(B)}u(ee,"e");var J,te;return function(ye,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");ye.prototype=Object.create(B&&B.prototype,{constructor:{value:ye,writable:!0,configurable:!0}}),B&&m(ye,B)}(ee,q),J=ee,(te=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:w.custom,value:function(ye,B){return w(this,function($){for(var ne=1;ne<arguments.length;ne++){var _e=arguments[ne]!=null?arguments[ne]:{},pe=Object.keys(_e);typeof Object.getOwnPropertySymbols=="function"&&(pe=pe.concat(Object.getOwnPropertySymbols(_e).filter(function(P){return Object.getOwnPropertyDescriptor(_e,P).enumerable}))),pe.forEach(function(P){t($,P,_e[P])})}return $}({},B,{customInspect:!1,depth:0}))}}])&&e(J.prototype,te),ee}(o(Error));return nh=he}u(yy,"f$6");function ah(r,t){return function(e){if(Array.isArray(e))return e}(r)||function(e,i){var n=[],o=!0,a=!1,l=void 0;try{for(var m,y=e[Symbol.iterator]();!(o=(m=y.next()).done)&&(n.push(m.value),!i||n.length!==i);o=!0);}catch(g){a=!0,l=g}finally{try{o||y.return==null||y.return()}finally{if(a)throw l}}return n}(r,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}u(ah,"s$3");function nr(r){return(nr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}u(nr,"p$3");var by=/a/g.flags!==void 0,Vo=u(function(r){var t=[];return r.forEach(function(e){return t.push(e)}),t},"h$1"),sh=u(function(r){var t=[];return r.forEach(function(e,i){return t.push([i,e])}),t},"y$2"),uh=Object.is?Object.is:Bh,Ho=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},eu=Number.isNaN?Number.isNaN:gy;function nu(r){return r.call.bind(r)}u(nu,"m$2");var gn=nu(Object.prototype.hasOwnProperty),qo=nu(Object.prototype.propertyIsEnumerable),ch=nu(Object.prototype.toString),Rt=Q.types,wy=Rt.isAnyArrayBuffer,_y=Rt.isArrayBufferView,lh=Rt.isDate,zo=Rt.isMap,fh=Rt.isRegExp,$o=Rt.isSet,vy=Rt.isNativeError,Ey=Rt.isBoxedPrimitive,hh=Rt.isNumberObject,dh=Rt.isStringObject,ph=Rt.isBooleanObject,mh=Rt.isBigIntObject,Sy=Rt.isSymbolObject,Fy=Rt.isFloat32Array,xy=Rt.isFloat64Array;function Iy(r){if(r.length===0||r.length>10)return!0;for(var t=0;t<r.length;t++){var e=r.charCodeAt(t);if(e<48||e>57)return!0}return r.length===10&&r>=Math.pow(2,32)}u(Iy,"U");function Zo(r){return Object.keys(r).filter(Iy).concat(Ho(r).filter(Object.prototype.propertyIsEnumerable.bind(r)))}u(Zo,"G");function gh(r,t){if(r===t)return 0;for(var e=r.length,i=t.length,n=0,o=Math.min(e,i);n<o;++n)if(r[n]!==t[n]){e=r[n],i=t[n];break}return e<i?-1:i<e?1:0}u(gh,"V");function Xt(r,t,e,i){if(r===t)return r!==0||!e||uh(r,t);if(e){if(nr(r)!=="object")return typeof r=="number"&&eu(r)&&eu(t);if(nr(t)!=="object"||r===null||t===null||Object.getPrototypeOf(r)!==Object.getPrototypeOf(t))return!1}else{if(r===null||nr(r)!=="object")return(t===null||nr(t)!=="object")&&r==t;if(t===null||nr(t)!=="object")return!1}var n,o,a,l,m=ch(r);if(m!==ch(t))return!1;if(Array.isArray(r)){if(r.length!==t.length)return!1;var y=Zo(r),g=Zo(t);return y.length===g.length&&mn(r,t,e,i,1,y)}if(m==="[object Object]"&&(!zo(r)&&zo(t)||!$o(r)&&$o(t)))return!1;if(lh(r)){if(!lh(t)||Date.prototype.getTime.call(r)!==Date.prototype.getTime.call(t))return!1}else if(fh(r)){if(!fh(t)||(a=r,l=t,!(by?a.source===l.source&&a.flags===l.flags:RegExp.prototype.toString.call(a)===RegExp.prototype.toString.call(l))))return!1}else if(vy(r)||r instanceof Error){if(r.message!==t.message||r.name!==t.name)return!1}else{if(_y(r)){if(e||!Fy(r)&&!xy(r)){if(!function(S,E){return S.byteLength===E.byteLength&&gh(new Uint8Array(S.buffer,S.byteOffset,S.byteLength),new Uint8Array(E.buffer,E.byteOffset,E.byteLength))===0}(r,t))return!1}else if(!function(S,E){if(S.byteLength!==E.byteLength)return!1;for(var A=0;A<S.byteLength;A++)if(S[A]!==E[A])return!1;return!0}(r,t))return!1;var w=Zo(r),v=Zo(t);return w.length===v.length&&mn(r,t,e,i,0,w)}if($o(r))return!(!$o(t)||r.size!==t.size)&&mn(r,t,e,i,2);if(zo(r))return!(!zo(t)||r.size!==t.size)&&mn(r,t,e,i,3);if(wy(r)){if(o=t,(n=r).byteLength!==o.byteLength||gh(new Uint8Array(n),new Uint8Array(o))!==0)return!1}else if(Ey(r)&&!function(S,E){return hh(S)?hh(E)&&uh(Number.prototype.valueOf.call(S),Number.prototype.valueOf.call(E)):dh(S)?dh(E)&&String.prototype.valueOf.call(S)===String.prototype.valueOf.call(E):ph(S)?ph(E)&&Boolean.prototype.valueOf.call(S)===Boolean.prototype.valueOf.call(E):mh(S)?mh(E)&&BigInt.prototype.valueOf.call(S)===BigInt.prototype.valueOf.call(E):Sy(E)&&Symbol.prototype.valueOf.call(S)===Symbol.prototype.valueOf.call(E)}(r,t))return!1}return mn(r,t,e,i,0)}u(Xt,"B");function yh(r,t){return t.filter(function(e){return qo(r,e)})}u(yh,"z");function mn(r,t,e,i,n,o){if(arguments.length===5){o=Object.keys(r);var a=Object.keys(t);if(o.length!==a.length)return!1}for(var l=0;l<o.length;l++)if(!gn(t,o[l]))return!1;if(e&&arguments.length===5){var m=Ho(r);if(m.length!==0){var y=0;for(l=0;l<m.length;l++){var g=m[l];if(qo(r,g)){if(!qo(t,g))return!1;o.push(g),y++}else if(qo(t,g))return!1}var w=Ho(t);if(m.length!==w.length&&yh(t,w).length!==y)return!1}else{var v=Ho(t);if(v.length!==0&&yh(t,v).length!==0)return!1}}if(o.length===0&&(n===0||n===1&&r.length===0||r.size===0))return!0;if(i===void 0)i={val1:new Map,val2:new Map,position:0};else{var S=i.val1.get(r);if(S!==void 0){var E=i.val2.get(t);if(E!==void 0)return S===E}i.position++}i.val1.set(r,i.position),i.val2.set(t,i.position);var A=Ry(r,t,e,o,i,n);return i.val1.delete(r),i.val2.delete(t),A}u(mn,"C");function bh(r,t,e,i){for(var n=Vo(r),o=0;o<n.length;o++){var a=n[o];if(Xt(t,a,e,i))return r.delete(a),!0}return!1}u(bh,"Y");function Dh(r){switch(nr(r)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":r=+r;case"number":if(eu(r))return!1}return!0}u(Dh,"W");function Ty(r,t,e){var i=Dh(e);return i!=null?i:t.has(i)&&!r.has(i)}u(Ty,"H");function Ay(r,t,e,i,n){var o=Dh(e);if(o!=null)return o;var a=t.get(o);return!(a===void 0&&!t.has(o)||!Xt(i,a,!1,n))&&!r.has(o)&&Xt(i,a,!1,n)}u(Ay,"J");function wh(r,t,e,i,n,o){for(var a=Vo(r),l=0;l<a.length;l++){var m=a[l];if(Xt(e,m,n,o)&&Xt(i,t.get(m),n,o))return r.delete(m),!0}return!1}u(wh,"K");function Ry(r,t,e,i,n,o){var a=0;if(o===2){if(!function(g,w,v,S){for(var E=null,A=Vo(g),O=0;O<A.length;O++){var U=A[O];if(nr(U)==="object"&&U!==null)E===null&&(E=new Set),E.add(U);else if(!w.has(U)){if(v||!Ty(g,w,U))return!1;E===null&&(E=new Set),E.add(U)}}if(E!==null){for(var j=Vo(w),W=0;W<j.length;W++){var se=j[W];if(nr(se)==="object"&&se!==null){if(!bh(E,se,v,S))return!1}else if(!v&&!g.has(se)&&!bh(E,se,v,S))return!1}return E.size===0}return!0}(r,t,e,n))return!1}else if(o===3){if(!function(g,w,v,S){for(var E=null,A=sh(g),O=0;O<A.length;O++){var U=ah(A[O],2),j=U[0],W=U[1];if(nr(j)==="object"&&j!==null)E===null&&(E=new Set),E.add(j);else{var se=w.get(j);if(se===void 0&&!w.has(j)||!Xt(W,se,v,S)){if(v||!Ay(g,w,j,W,S))return!1;E===null&&(E=new Set),E.add(j)}}}if(E!==null){for(var Y=sh(w),he=0;he<Y.length;he++){var q=ah(Y[he],2),ee=(j=q[0],q[1]);if(nr(j)==="object"&&j!==null){if(!wh(E,g,j,ee,v,S))return!1}else if(!(v||g.has(j)&&Xt(g.get(j),ee,!1,S)||wh(E,g,j,ee,!1,S)))return!1}return E.size===0}return!0}(r,t,e,n))return!1}else if(o===1)for(;a<r.length;a++){if(!gn(r,a)){if(gn(t,a))return!1;for(var l=Object.keys(r);a<l.length;a++){var m=l[a];if(!gn(t,m)||!Xt(r[m],t[m],e,n))return!1}return l.length===Object.keys(t).length}if(!gn(t,a)||!Xt(r[a],t[a],e,n))return!1}for(a=0;a<i.length;a++){var y=i[a];if(!Xt(r[y],t[y],e,n))return!1}return!0}u(Ry,"Q");var _h={isDeepEqual:function(r,t){return Xt(r,t,!1)},isDeepStrictEqual:function(r,t){return Xt(r,t,!0)}},Ys={},vh=!1;function tu(){if(vh)return Ys;vh=!0;var r=Qe;function t(P){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D})(P)}u(t,"c");var e,i,n=Nh().codes,o=n.ERR_AMBIGUOUS_ARGUMENT,a=n.ERR_INVALID_ARG_TYPE,l=n.ERR_INVALID_ARG_VALUE,m=n.ERR_INVALID_RETURN_VALUE,y=n.ERR_MISSING_ARGS,g=yy(),w=Q.inspect,v=Q.types,S=v.isPromise,E=v.isRegExp,A=Object.assign?Object.assign:Cg.assign,O=Object.is?Object.is:Bh;function U(){e=_h.isDeepEqual,i=_h.isDeepStrictEqual}u(U,"j");var j=!1,W=Ys=q,se={};function Y(P){throw P.message instanceof Error?P.message:new g(P)}u(Y,"R");function he(P,D,K,V){if(!K){var ie=!1;if(D===0)ie=!0,V="No value argument passed to `assert.ok()`";else if(V instanceof Error)throw V;var me=new g({actual:K,expected:!0,message:V,operator:"==",stackStartFn:P});throw me.generatedMessage=ie,me}}u(he,"A");function q(){for(var P=arguments.length,D=new Array(P),K=0;K<P;K++)D[K]=arguments[K];he.apply(void 0,[q,D.length].concat(D))}u(q,"k"),W.fail=u(function P(D,K,V,ie,me){var Fe,Ne=arguments.length;if(Ne===0)Fe="Failed";else if(Ne===1)V=D,D=void 0;else{if(j===!1){j=!0;var Ae=r.emitWarning?r.emitWarning:console.warn.bind(console);Ae("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}Ne===2&&(ie="!=")}if(V instanceof Error)throw V;var Le={actual:D,expected:K,operator:ie===void 0?"fail":ie,stackStartFn:me||P};V!==void 0&&(Le.message=V);var M=new g(Le);throw Fe&&(M.message=Fe,M.generatedMessage=!0),M},"t"),W.AssertionError=g,W.ok=q,W.equal=u(function P(D,K,V){if(arguments.length<2)throw new y("actual","expected");D!=K&&Y({actual:D,expected:K,message:V,operator:"==",stackStartFn:P})},"t"),W.notEqual=u(function P(D,K,V){if(arguments.length<2)throw new y("actual","expected");D==K&&Y({actual:D,expected:K,message:V,operator:"!=",stackStartFn:P})},"t"),W.deepEqual=u(function P(D,K,V){if(arguments.length<2)throw new y("actual","expected");e===void 0&&U(),e(D,K)||Y({actual:D,expected:K,message:V,operator:"deepEqual",stackStartFn:P})},"t"),W.notDeepEqual=u(function P(D,K,V){if(arguments.length<2)throw new y("actual","expected");e===void 0&&U(),e(D,K)&&Y({actual:D,expected:K,message:V,operator:"notDeepEqual",stackStartFn:P})},"t"),W.deepStrictEqual=u(function P(D,K,V){if(arguments.length<2)throw new y("actual","expected");e===void 0&&U(),i(D,K)||Y({actual:D,expected:K,message:V,operator:"deepStrictEqual",stackStartFn:P})},"t"),W.notDeepStrictEqual=u(function P(D,K,V){if(arguments.length<2)throw new y("actual","expected");e===void 0&&U(),i(D,K)&&Y({actual:D,expected:K,message:V,operator:"notDeepStrictEqual",stackStartFn:P})},"t"),W.strictEqual=u(function P(D,K,V){if(arguments.length<2)throw new y("actual","expected");O(D,K)||Y({actual:D,expected:K,message:V,operator:"strictEqual",stackStartFn:P})},"t"),W.notStrictEqual=u(function P(D,K,V){if(arguments.length<2)throw new y("actual","expected");O(D,K)&&Y({actual:D,expected:K,message:V,operator:"notStrictEqual",stackStartFn:P})},"t");var ee=u(function P(D,K,V){var ie=this;(function(me,Fe){if(!(me instanceof Fe))throw new TypeError("Cannot call a class as a function")})(this,P),K.forEach(function(me){me in D&&(V!==void 0&&typeof V[me]=="string"&&E(D[me])&&D[me].test(V[me])?ie[me]=V[me]:ie[me]=D[me])})},"t");function J(P,D,K,V,ie,me){if(!(K in P)||!i(P[K],D[K])){if(!V){var Fe=new ee(P,ie),Ne=new ee(D,ie,P),Ae=new g({actual:Fe,expected:Ne,operator:"deepStrictEqual",stackStartFn:me});throw Ae.actual=P,Ae.expected=D,Ae.operator=me.name,Ae}Y({actual:P,expected:D,message:V,operator:me.name,stackStartFn:me})}}u(J,"T");function te(P,D,K,V){if(typeof D!="function"){if(E(D))return D.test(P);if(arguments.length===2)throw new a("expected",["Function","RegExp"],D);if(t(P)!=="object"||P===null){var ie=new g({actual:P,expected:D,message:K,operator:"deepStrictEqual",stackStartFn:V});throw ie.operator=V.name,ie}var me=Object.keys(D);if(D instanceof Error)me.push("name","message");else if(me.length===0)throw new l("error",D,"may not be an empty object");return e===void 0&&U(),me.forEach(function(Fe){typeof P[Fe]=="string"&&E(D[Fe])&&D[Fe].test(P[Fe])||J(P,D,Fe,K,me,V)}),!0}return D.prototype!==void 0&&P instanceof D||!Error.isPrototypeOf(D)&&D.call({},P)===!0}u(te,"P");function ye(P){if(typeof P!="function")throw new a("fn","Function",P);try{P()}catch(D){return D}return se}u(ye,"I");function B(P){return S(P)||P!==null&&t(P)==="object"&&typeof P.then=="function"&&typeof P.catch=="function"}u(B,"D");function $(P){return Promise.resolve().then(function(){var D;if(typeof P=="function"){if(!B(D=P()))throw new m("instance of Promise","promiseFn",D)}else{if(!B(P))throw new a("promiseFn",["Function","Promise"],P);D=P}return Promise.resolve().then(function(){return D}).then(function(){return se}).catch(function(K){return K})})}u($,"F");function ne(P,D,K,V){if(typeof K=="string"){if(arguments.length===4)throw new a("error",["Object","Error","Function","RegExp"],K);if(t(D)==="object"&&D!==null){if(D.message===K)throw new o("error/message",'The error message "'.concat(D.message,'" is identical to the message.'))}else if(D===K)throw new o("error/message",'The error "'.concat(D,'" is identical to the message.'));V=K,K=void 0}else if(K!=null&&t(K)!=="object"&&typeof K!="function")throw new a("error",["Object","Error","Function","RegExp"],K);if(D===se){var ie="";K&&K.name&&(ie+=" (".concat(K.name,")")),ie+=V?": ".concat(V):".";var me=P.name==="rejects"?"rejection":"exception";Y({actual:void 0,expected:K,operator:P.name,message:"Missing expected ".concat(me).concat(ie),stackStartFn:P})}if(K&&!te(D,K,V,P))throw D}u(ne,"N");function _e(P,D,K,V){if(D!==se){if(typeof K=="string"&&(V=K,K=void 0),!K||te(D,K)){var ie=V?": ".concat(V):".",me=P.name==="doesNotReject"?"rejection":"exception";Y({actual:D,expected:K,operator:P.name,message:"Got unwanted ".concat(me).concat(ie,`
`)+'Actual message: "'.concat(D&&D.message,'"'),stackStartFn:P})}throw D}}u(_e,"L");function pe(){for(var P=arguments.length,D=new Array(P),K=0;K<P;K++)D[K]=arguments[K];he.apply(void 0,[pe,D.length].concat(D))}return u(pe,"M"),W.throws=u(function P(D){for(var K=arguments.length,V=new Array(K>1?K-1:0),ie=1;ie<K;ie++)V[ie-1]=arguments[ie];ne.apply(void 0,[P,ye(D)].concat(V))},"t"),W.rejects=u(function P(D){for(var K=arguments.length,V=new Array(K>1?K-1:0),ie=1;ie<K;ie++)V[ie-1]=arguments[ie];return $(D).then(function(me){return ne.apply(void 0,[P,me].concat(V))})},"t"),W.doesNotThrow=u(function P(D){for(var K=arguments.length,V=new Array(K>1?K-1:0),ie=1;ie<K;ie++)V[ie-1]=arguments[ie];_e.apply(void 0,[P,ye(D)].concat(V))},"t"),W.doesNotReject=u(function P(D){for(var K=arguments.length,V=new Array(K>1?K-1:0),ie=1;ie<K;ie++)V[ie-1]=arguments[ie];return $(D).then(function(me){return _e.apply(void 0,[P,me].concat(V))})},"t"),W.ifError=u(function P(D){if(D!=null){var K="ifError got unwanted exception: ";t(D)==="object"&&typeof D.message=="string"?D.message.length===0&&D.constructor?K+=D.constructor.name:K+=D.message:K+=w(D);var V=new g({actual:D,expected:null,operator:"ifError",message:K,stackStartFn:P}),ie=D.stack;if(typeof ie=="string"){var me=ie.split(`
`);me.shift();for(var Fe=V.stack.split(`
`),Ne=0;Ne<me.length;Ne++){var Ae=Fe.indexOf(me[Ne]);if(Ae!==-1){Fe=Fe.slice(0,Ae);break}}V.stack="".concat(Fe.join(`
`),`
`).concat(me.join(`
`))}throw V}},"t"),W.strict=A(pe,W,{equal:W.strictEqual,deepEqual:W.deepStrictEqual,notEqual:W.notStrictEqual,notDeepEqual:W.notDeepStrictEqual}),W.strict.strict=W.strict,Ys}u(tu,"tt");var Be=tu();Be.AssertionError;Be.deepEqual;Be.deepStrictEqual;Be.doesNotReject;Be.doesNotThrow;Be.equal;Be.fail;Be.ifError;Be.notDeepEqual;Be.notDeepStrictEqual;Be.notEqual;Be.notStrictEqual;Be.ok;Be.rejects;Be.strict;Be.strictEqual;Be.throws;Be.AssertionError;Be.deepEqual;Be.deepStrictEqual;Be.doesNotReject;Be.doesNotThrow;Be.equal;Be.fail;Be.ifError;Be.notDeepEqual;Be.notDeepStrictEqual;Be.notEqual;Be.notStrictEqual;Be.ok;Be.rejects;Be.strict;Be.strictEqual;Be.throws;var G2=Be.AssertionError,Y2=Be.deepEqual,X2=Be.deepStrictEqual,J2=Be.doesNotReject,Q2=Be.doesNotThrow,eF=Be.equal,tF=Be.fail,rF=Be.ifError,iF=Be.notDeepEqual,nF=Be.notDeepStrictEqual,oF=Be.notEqual,aF=Be.notStrictEqual,sF=Be.ok,uF=Be.rejects,cF=Be.strict,lF=Be.strictEqual,fF=Be.throws;var ou={},Lh=!1;function Oy(){if(Lh)return ou;Lh=!0;function r(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}return u(r,"ZStream"),ou=r,ou}u(Oy,"dew$c");var At={},Ph=!1;function Go(){if(Ph)return At;Ph=!0;var r=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function t(n,o){return Object.prototype.hasOwnProperty.call(n,o)}u(t,"_has"),At.assign=function(n){for(var o=Array.prototype.slice.call(arguments,1);o.length;){var a=o.shift();if(a){if(typeof a!="object")throw new TypeError(a+"must be non-object");for(var l in a)t(a,l)&&(n[l]=a[l])}}return n},At.shrinkBuf=function(n,o){return n.length===o?n:n.subarray?n.subarray(0,o):(n.length=o,n)};var e={arraySet:function(n,o,a,l,m){if(o.subarray&&n.subarray){n.set(o.subarray(a,a+l),m);return}for(var y=0;y<l;y++)n[m+y]=o[a+y]},flattenChunks:function(n){var o,a,l,m,y,g;for(l=0,o=0,a=n.length;o<a;o++)l+=n[o].length;for(g=new Uint8Array(l),m=0,o=0,a=n.length;o<a;o++)y=n[o],g.set(y,m),m+=y.length;return g}},i={arraySet:function(n,o,a,l,m){for(var y=0;y<l;y++)n[m+y]=o[a+y]},flattenChunks:function(n){return[].concat.apply([],n)}};return At.setTyped=function(n){n?(At.Buf8=Uint8Array,At.Buf16=Uint16Array,At.Buf32=Int32Array,At.assign(At,e)):(At.Buf8=Array,At.Buf16=Array,At.Buf32=Array,At.assign(At,i))},At.setTyped(r),At}u(Go,"dew$b");var wi={},Uh=!1;function By(){if(Uh)return wi;Uh=!0;var r=Go(),t=4,e=0,i=1,n=2;function o(d){for(var x=d.length;--x>=0;)d[x]=0}u(o,"zero");var a=0,l=1,m=2,y=3,g=258,w=29,v=256,S=v+1+w,E=30,A=19,O=2*S+1,U=15,j=16,W=7,se=256,Y=16,he=17,q=18,ee=[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],J=[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],te=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ye=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],B=512,$=new Array((S+2)*2);o($);var ne=new Array(E*2);o(ne);var _e=new Array(B);o(_e);var pe=new Array(g-y+1);o(pe);var P=new Array(w);o(P);var D=new Array(E);o(D);function K(d,x,Z,oe,k){this.static_tree=d,this.extra_bits=x,this.extra_base=Z,this.elems=oe,this.max_length=k,this.has_stree=d&&d.length}u(K,"StaticTreeDesc");var V,ie,me;function Fe(d,x){this.dyn_tree=d,this.max_code=0,this.stat_desc=x}u(Fe,"TreeDesc");function Ne(d){return d<256?_e[d]:_e[256+(d>>>7)]}u(Ne,"d_code");function Ae(d,x){d.pending_buf[d.pending++]=x&255,d.pending_buf[d.pending++]=x>>>8&255}u(Ae,"put_short");function Le(d,x,Z){d.bi_valid>j-Z?(d.bi_buf|=x<<d.bi_valid&65535,Ae(d,d.bi_buf),d.bi_buf=x>>j-d.bi_valid,d.bi_valid+=Z-j):(d.bi_buf|=x<<d.bi_valid&65535,d.bi_valid+=Z)}u(Le,"send_bits");function M(d,x,Z){Le(d,Z[x*2],Z[x*2+1])}u(M,"send_code");function L(d,x){var Z=0;do Z|=d&1,d>>>=1,Z<<=1;while(--x>0);return Z>>>1}u(L,"bi_reverse");function re(d){d.bi_valid===16?(Ae(d,d.bi_buf),d.bi_buf=0,d.bi_valid=0):d.bi_valid>=8&&(d.pending_buf[d.pending++]=d.bi_buf&255,d.bi_buf>>=8,d.bi_valid-=8)}u(re,"bi_flush");function be(d,x){var Z=x.dyn_tree,oe=x.max_code,k=x.stat_desc.static_tree,z=x.stat_desc.has_stree,b=x.stat_desc.extra_bits,ce=x.stat_desc.extra_base,De=x.stat_desc.max_length,h,G,X,F,N,H,Ie=0;for(F=0;F<=U;F++)d.bl_count[F]=0;for(Z[d.heap[d.heap_max]*2+1]=0,h=d.heap_max+1;h<O;h++)G=d.heap[h],F=Z[Z[G*2+1]*2+1]+1,F>De&&(F=De,Ie++),Z[G*2+1]=F,!(G>oe)&&(d.bl_count[F]++,N=0,G>=ce&&(N=b[G-ce]),H=Z[G*2],d.opt_len+=H*(F+N),z&&(d.static_len+=H*(k[G*2+1]+N)));if(Ie!==0){do{for(F=De-1;d.bl_count[F]===0;)F--;d.bl_count[F]--,d.bl_count[F+1]+=2,d.bl_count[De]--,Ie-=2}while(Ie>0);for(F=De;F!==0;F--)for(G=d.bl_count[F];G!==0;)X=d.heap[--h],!(X>oe)&&(Z[X*2+1]!==F&&(d.opt_len+=(F-Z[X*2+1])*Z[X*2],Z[X*2+1]=F),G--)}}u(be,"gen_bitlen");function xe(d,x,Z){var oe=new Array(U+1),k=0,z,b;for(z=1;z<=U;z++)oe[z]=k=k+Z[z-1]<<1;for(b=0;b<=x;b++){var ce=d[b*2+1];ce!==0&&(d[b*2]=L(oe[ce]++,ce))}}u(xe,"gen_codes");function I(){var d,x,Z,oe,k,z=new Array(U+1);for(Z=0,oe=0;oe<w-1;oe++)for(P[oe]=Z,d=0;d<1<<ee[oe];d++)pe[Z++]=oe;for(pe[Z-1]=oe,k=0,oe=0;oe<16;oe++)for(D[oe]=k,d=0;d<1<<J[oe];d++)_e[k++]=oe;for(k>>=7;oe<E;oe++)for(D[oe]=k<<7,d=0;d<1<<J[oe]-7;d++)_e[256+k++]=oe;for(x=0;x<=U;x++)z[x]=0;for(d=0;d<=143;)$[d*2+1]=8,d++,z[8]++;for(;d<=255;)$[d*2+1]=9,d++,z[9]++;for(;d<=279;)$[d*2+1]=7,d++,z[7]++;for(;d<=287;)$[d*2+1]=8,d++,z[8]++;for(xe($,S+1,z),d=0;d<E;d++)ne[d*2+1]=5,ne[d*2]=L(d,5);V=new K($,ee,v+1,S,U),ie=new K(ne,J,0,E,U),me=new K(new Array(0),te,0,A,W)}u(I,"tr_static_init");function R(d){var x;for(x=0;x<S;x++)d.dyn_ltree[x*2]=0;for(x=0;x<E;x++)d.dyn_dtree[x*2]=0;for(x=0;x<A;x++)d.bl_tree[x*2]=0;d.dyn_ltree[se*2]=1,d.opt_len=d.static_len=0,d.last_lit=d.matches=0}u(R,"init_block");function ae(d){d.bi_valid>8?Ae(d,d.bi_buf):d.bi_valid>0&&(d.pending_buf[d.pending++]=d.bi_buf),d.bi_buf=0,d.bi_valid=0}u(ae,"bi_windup");function ge(d,x,Z,oe){ae(d),oe&&(Ae(d,Z),Ae(d,~Z)),r.arraySet(d.pending_buf,d.window,x,Z,d.pending),d.pending+=Z}u(ge,"copy_block");function Pe(d,x,Z,oe){var k=x*2,z=Z*2;return d[k]<d[z]||d[k]===d[z]&&oe[x]<=oe[Z]}u(Pe,"smaller");function Se(d,x,Z){for(var oe=d.heap[Z],k=Z<<1;k<=d.heap_len&&(k<d.heap_len&&Pe(x,d.heap[k+1],d.heap[k],d.depth)&&k++,!Pe(x,oe,d.heap[k],d.depth));)d.heap[Z]=d.heap[k],Z=k,k<<=1;d.heap[Z]=oe}u(Se,"pqdownheap");function ve(d,x,Z){var oe,k,z=0,b,ce;if(d.last_lit!==0)do oe=d.pending_buf[d.d_buf+z*2]<<8|d.pending_buf[d.d_buf+z*2+1],k=d.pending_buf[d.l_buf+z],z++,oe===0?M(d,k,x):(b=pe[k],M(d,b+v+1,x),ce=ee[b],ce!==0&&(k-=P[b],Le(d,k,ce)),oe--,b=Ne(oe),M(d,b,Z),ce=J[b],ce!==0&&(oe-=D[b],Le(d,oe,ce)));while(z<d.last_lit);M(d,se,x)}u(ve,"compress_block");function et(d,x){var Z=x.dyn_tree,oe=x.stat_desc.static_tree,k=x.stat_desc.has_stree,z=x.stat_desc.elems,b,ce,De=-1,h;for(d.heap_len=0,d.heap_max=O,b=0;b<z;b++)Z[b*2]!==0?(d.heap[++d.heap_len]=De=b,d.depth[b]=0):Z[b*2+1]=0;for(;d.heap_len<2;)h=d.heap[++d.heap_len]=De<2?++De:0,Z[h*2]=1,d.depth[h]=0,d.opt_len--,k&&(d.static_len-=oe[h*2+1]);for(x.max_code=De,b=d.heap_len>>1;b>=1;b--)Se(d,Z,b);h=z;do b=d.heap[1],d.heap[1]=d.heap[d.heap_len--],Se(d,Z,1),ce=d.heap[1],d.heap[--d.heap_max]=b,d.heap[--d.heap_max]=ce,Z[h*2]=Z[b*2]+Z[ce*2],d.depth[h]=(d.depth[b]>=d.depth[ce]?d.depth[b]:d.depth[ce])+1,Z[b*2+1]=Z[ce*2+1]=h,d.heap[1]=h++,Se(d,Z,1);while(d.heap_len>=2);d.heap[--d.heap_max]=d.heap[1],be(d,x),xe(Z,De,d.bl_count)}u(et,"build_tree");function ct(d,x,Z){var oe,k=-1,z,b=x[0*2+1],ce=0,De=7,h=4;for(b===0&&(De=138,h=3),x[(Z+1)*2+1]=65535,oe=0;oe<=Z;oe++)z=b,b=x[(oe+1)*2+1],!(++ce<De&&z===b)&&(ce<h?d.bl_tree[z*2]+=ce:z!==0?(z!==k&&d.bl_tree[z*2]++,d.bl_tree[Y*2]++):ce<=10?d.bl_tree[he*2]++:d.bl_tree[q*2]++,ce=0,k=z,b===0?(De=138,h=3):z===b?(De=6,h=3):(De=7,h=4))}u(ct,"scan_tree");function He(d,x,Z){var oe,k=-1,z,b=x[0*2+1],ce=0,De=7,h=4;for(b===0&&(De=138,h=3),oe=0;oe<=Z;oe++)if(z=b,b=x[(oe+1)*2+1],!(++ce<De&&z===b)){if(ce<h)do M(d,z,d.bl_tree);while(--ce!==0);else z!==0?(z!==k&&(M(d,z,d.bl_tree),ce--),M(d,Y,d.bl_tree),Le(d,ce-3,2)):ce<=10?(M(d,he,d.bl_tree),Le(d,ce-3,3)):(M(d,q,d.bl_tree),Le(d,ce-11,7));ce=0,k=z,b===0?(De=138,h=3):z===b?(De=6,h=3):(De=7,h=4)}}u(He,"send_tree");function ot(d){var x;for(ct(d,d.dyn_ltree,d.l_desc.max_code),ct(d,d.dyn_dtree,d.d_desc.max_code),et(d,d.bl_desc),x=A-1;x>=3&&d.bl_tree[ye[x]*2+1]===0;x--);return d.opt_len+=3*(x+1)+5+5+4,x}u(ot,"build_bl_tree");function Ut(d,x,Z,oe){var k;for(Le(d,x-257,5),Le(d,Z-1,5),Le(d,oe-4,4),k=0;k<oe;k++)Le(d,d.bl_tree[ye[k]*2+1],3);He(d,d.dyn_ltree,x-1),He(d,d.dyn_dtree,Z-1)}u(Ut,"send_all_trees");function Ke(d){var x=4093624447,Z;for(Z=0;Z<=31;Z++,x>>>=1)if(x&1&&d.dyn_ltree[Z*2]!==0)return e;if(d.dyn_ltree[9*2]!==0||d.dyn_ltree[10*2]!==0||d.dyn_ltree[13*2]!==0)return i;for(Z=32;Z<v;Z++)if(d.dyn_ltree[Z*2]!==0)return i;return e}u(Ke,"detect_data_type");var bt=!1;function f(d){bt||(I(),bt=!0),d.l_desc=new Fe(d.dyn_ltree,V),d.d_desc=new Fe(d.dyn_dtree,ie),d.bl_desc=new Fe(d.bl_tree,me),d.bi_buf=0,d.bi_valid=0,R(d)}u(f,"_tr_init");function s(d,x,Z,oe){Le(d,(a<<1)+(oe?1:0),3),ge(d,x,Z,!0)}u(s,"_tr_stored_block");function c(d){Le(d,l<<1,3),M(d,se,$),re(d)}u(c,"_tr_align");function p(d,x,Z,oe){var k,z,b=0;d.level>0?(d.strm.data_type===n&&(d.strm.data_type=Ke(d)),et(d,d.l_desc),et(d,d.d_desc),b=ot(d),k=d.opt_len+3+7>>>3,z=d.static_len+3+7>>>3,z<=k&&(k=z)):k=z=Z+5,Z+4<=k&&x!==-1?s(d,x,Z,oe):d.strategy===t||z===k?(Le(d,(l<<1)+(oe?1:0),3),ve(d,$,ne)):(Le(d,(m<<1)+(oe?1:0),3),Ut(d,d.l_desc.max_code+1,d.d_desc.max_code+1,b+1),ve(d,d.dyn_ltree,d.dyn_dtree)),R(d),oe&&ae(d)}u(p,"_tr_flush_block");function _(d,x,Z){return d.pending_buf[d.d_buf+d.last_lit*2]=x>>>8&255,d.pending_buf[d.d_buf+d.last_lit*2+1]=x&255,d.pending_buf[d.l_buf+d.last_lit]=Z&255,d.last_lit++,x===0?d.dyn_ltree[Z*2]++:(d.matches++,x--,d.dyn_ltree[(pe[Z]+v+1)*2]++,d.dyn_dtree[Ne(x)*2]++),d.last_lit===d.lit_bufsize-1}return u(_,"_tr_tally"),wi._tr_init=f,wi._tr_stored_block=s,wi._tr_flush_block=p,wi._tr_tally=_,wi._tr_align=c,wi}u(By,"dew$a");var au={},Mh=!1;function Gh(){if(Mh)return au;Mh=!0;function r(t,e,i,n){for(var o=t&65535|0,a=t>>>16&65535|0,l=0;i!==0;){l=i>2e3?2e3:i,i-=l;do o=o+e[n++]|0,a=a+o|0;while(--l);o%=65521,a%=65521}return o|a<<16|0}return u(r,"adler32"),au=r,au}u(Gh,"dew$9");var su={},jh=!1;function Yh(){if(jh)return su;jh=!0;function r(){for(var i,n=[],o=0;o<256;o++){i=o;for(var a=0;a<8;a++)i=i&1?3988292384^i>>>1:i>>>1;n[o]=i}return n}u(r,"makeTable");var t=r();function e(i,n,o,a){var l=t,m=a+o;i^=-1;for(var y=a;y<m;y++)i=i>>>8^l[(i^n[y])&255];return i^-1}return u(e,"crc32"),su=e,su}u(Yh,"dew$8");var uu={},zh=!1;function ky(){return zh||(zh=!0,uu={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}),uu}u(ky,"dew$7");var or={},$h=!1;function Cy(){if($h)return or;$h=!0;var r=Go(),t=By(),e=Gh(),i=Yh(),n=ky(),o=0,a=1,l=3,m=4,y=5,g=0,w=1,v=-2,S=-3,E=-5,A=-1,O=1,U=2,j=3,W=4,se=0,Y=2,he=8,q=9,ee=15,J=8,te=29,ye=256,B=ye+1+te,$=30,ne=19,_e=2*B+1,pe=15,P=3,D=258,K=D+P+1,V=32,ie=42,me=69,Fe=73,Ne=91,Ae=103,Le=113,M=666,L=1,re=2,be=3,xe=4,I=3;function R(h,G){return h.msg=n[G],G}u(R,"err");function ae(h){return(h<<1)-(h>4?9:0)}u(ae,"rank");function ge(h){for(var G=h.length;--G>=0;)h[G]=0}u(ge,"zero");function Pe(h){var G=h.state,X=G.pending;X>h.avail_out&&(X=h.avail_out),X!==0&&(r.arraySet(h.output,G.pending_buf,G.pending_out,X,h.next_out),h.next_out+=X,G.pending_out+=X,h.total_out+=X,h.avail_out-=X,G.pending-=X,G.pending===0&&(G.pending_out=0))}u(Pe,"flush_pending");function Se(h,G){t._tr_flush_block(h,h.block_start>=0?h.block_start:-1,h.strstart-h.block_start,G),h.block_start=h.strstart,Pe(h.strm)}u(Se,"flush_block_only");function ve(h,G){h.pending_buf[h.pending++]=G}u(ve,"put_byte");function et(h,G){h.pending_buf[h.pending++]=G>>>8&255,h.pending_buf[h.pending++]=G&255}u(et,"putShortMSB");function ct(h,G,X,F){var N=h.avail_in;return N>F&&(N=F),N===0?0:(h.avail_in-=N,r.arraySet(G,h.input,h.next_in,N,X),h.state.wrap===1?h.adler=e(h.adler,G,N,X):h.state.wrap===2&&(h.adler=i(h.adler,G,N,X)),h.next_in+=N,h.total_in+=N,N)}u(ct,"read_buf");function He(h,G){var X=h.max_chain_length,F=h.strstart,N,H,Ie=h.prev_length,we=h.nice_match,Ee=h.strstart>h.w_size-K?h.strstart-(h.w_size-K):0,$e=h.window,br=h.w_mask,at=h.prev,qe=h.strstart+D,wt=$e[F+Ie-1],xt=$e[F+Ie];h.prev_length>=h.good_match&&(X>>=2),we>h.lookahead&&(we=h.lookahead);do if(N=G,!($e[N+Ie]!==xt||$e[N+Ie-1]!==wt||$e[N]!==$e[F]||$e[++N]!==$e[F+1])){F+=2,N++;do;while($e[++F]===$e[++N]&&$e[++F]===$e[++N]&&$e[++F]===$e[++N]&&$e[++F]===$e[++N]&&$e[++F]===$e[++N]&&$e[++F]===$e[++N]&&$e[++F]===$e[++N]&&$e[++F]===$e[++N]&&F<qe);if(H=D-(qe-F),F=qe-D,H>Ie){if(h.match_start=G,Ie=H,H>=we)break;wt=$e[F+Ie-1],xt=$e[F+Ie]}}while((G=at[G&br])>Ee&&--X!==0);return Ie<=h.lookahead?Ie:h.lookahead}u(He,"longest_match");function ot(h){var G=h.w_size,X,F,N,H,Ie;do{if(H=h.window_size-h.lookahead-h.strstart,h.strstart>=G+(G-K)){r.arraySet(h.window,h.window,G,G,0),h.match_start-=G,h.strstart-=G,h.block_start-=G,F=h.hash_size,X=F;do N=h.head[--X],h.head[X]=N>=G?N-G:0;while(--F);F=G,X=F;do N=h.prev[--X],h.prev[X]=N>=G?N-G:0;while(--F);H+=G}if(h.strm.avail_in===0)break;if(F=ct(h.strm,h.window,h.strstart+h.lookahead,H),h.lookahead+=F,h.lookahead+h.insert>=P)for(Ie=h.strstart-h.insert,h.ins_h=h.window[Ie],h.ins_h=(h.ins_h<<h.hash_shift^h.window[Ie+1])&h.hash_mask;h.insert&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[Ie+P-1])&h.hash_mask,h.prev[Ie&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=Ie,Ie++,h.insert--,!(h.lookahead+h.insert<P)););}while(h.lookahead<K&&h.strm.avail_in!==0)}u(ot,"fill_window");function Ut(h,G){var X=65535;for(X>h.pending_buf_size-5&&(X=h.pending_buf_size-5);;){if(h.lookahead<=1){if(ot(h),h.lookahead===0&&G===o)return L;if(h.lookahead===0)break}h.strstart+=h.lookahead,h.lookahead=0;var F=h.block_start+X;if((h.strstart===0||h.strstart>=F)&&(h.lookahead=h.strstart-F,h.strstart=F,Se(h,!1),h.strm.avail_out===0)||h.strstart-h.block_start>=h.w_size-K&&(Se(h,!1),h.strm.avail_out===0))return L}return h.insert=0,G===m?(Se(h,!0),h.strm.avail_out===0?be:xe):(h.strstart>h.block_start&&(Se(h,!1),h.strm.avail_out===0),L)}u(Ut,"deflate_stored");function Ke(h,G){for(var X,F;;){if(h.lookahead<K){if(ot(h),h.lookahead<K&&G===o)return L;if(h.lookahead===0)break}if(X=0,h.lookahead>=P&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+P-1])&h.hash_mask,X=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),X!==0&&h.strstart-X<=h.w_size-K&&(h.match_length=He(h,X)),h.match_length>=P)if(F=t._tr_tally(h,h.strstart-h.match_start,h.match_length-P),h.lookahead-=h.match_length,h.match_length<=h.max_lazy_match&&h.lookahead>=P){h.match_length--;do h.strstart++,h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+P-1])&h.hash_mask,X=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart;while(--h.match_length!==0);h.strstart++}else h.strstart+=h.match_length,h.match_length=0,h.ins_h=h.window[h.strstart],h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+1])&h.hash_mask;else F=t._tr_tally(h,0,h.window[h.strstart]),h.lookahead--,h.strstart++;if(F&&(Se(h,!1),h.strm.avail_out===0))return L}return h.insert=h.strstart<P-1?h.strstart:P-1,G===m?(Se(h,!0),h.strm.avail_out===0?be:xe):h.last_lit&&(Se(h,!1),h.strm.avail_out===0)?L:re}u(Ke,"deflate_fast");function bt(h,G){for(var X,F,N;;){if(h.lookahead<K){if(ot(h),h.lookahead<K&&G===o)return L;if(h.lookahead===0)break}if(X=0,h.lookahead>=P&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+P-1])&h.hash_mask,X=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),h.prev_length=h.match_length,h.prev_match=h.match_start,h.match_length=P-1,X!==0&&h.prev_length<h.max_lazy_match&&h.strstart-X<=h.w_size-K&&(h.match_length=He(h,X),h.match_length<=5&&(h.strategy===O||h.match_length===P&&h.strstart-h.match_start>4096)&&(h.match_length=P-1)),h.prev_length>=P&&h.match_length<=h.prev_length){N=h.strstart+h.lookahead-P,F=t._tr_tally(h,h.strstart-1-h.prev_match,h.prev_length-P),h.lookahead-=h.prev_length-1,h.prev_length-=2;do++h.strstart<=N&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+P-1])&h.hash_mask,X=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart);while(--h.prev_length!==0);if(h.match_available=0,h.match_length=P-1,h.strstart++,F&&(Se(h,!1),h.strm.avail_out===0))return L}else if(h.match_available){if(F=t._tr_tally(h,0,h.window[h.strstart-1]),F&&Se(h,!1),h.strstart++,h.lookahead--,h.strm.avail_out===0)return L}else h.match_available=1,h.strstart++,h.lookahead--}return h.match_available&&(F=t._tr_tally(h,0,h.window[h.strstart-1]),h.match_available=0),h.insert=h.strstart<P-1?h.strstart:P-1,G===m?(Se(h,!0),h.strm.avail_out===0?be:xe):h.last_lit&&(Se(h,!1),h.strm.avail_out===0)?L:re}u(bt,"deflate_slow");function f(h,G){for(var X,F,N,H,Ie=h.window;;){if(h.lookahead<=D){if(ot(h),h.lookahead<=D&&G===o)return L;if(h.lookahead===0)break}if(h.match_length=0,h.lookahead>=P&&h.strstart>0&&(N=h.strstart-1,F=Ie[N],F===Ie[++N]&&F===Ie[++N]&&F===Ie[++N])){H=h.strstart+D;do;while(F===Ie[++N]&&F===Ie[++N]&&F===Ie[++N]&&F===Ie[++N]&&F===Ie[++N]&&F===Ie[++N]&&F===Ie[++N]&&F===Ie[++N]&&N<H);h.match_length=D-(H-N),h.match_length>h.lookahead&&(h.match_length=h.lookahead)}if(h.match_length>=P?(X=t._tr_tally(h,1,h.match_length-P),h.lookahead-=h.match_length,h.strstart+=h.match_length,h.match_length=0):(X=t._tr_tally(h,0,h.window[h.strstart]),h.lookahead--,h.strstart++),X&&(Se(h,!1),h.strm.avail_out===0))return L}return h.insert=0,G===m?(Se(h,!0),h.strm.avail_out===0?be:xe):h.last_lit&&(Se(h,!1),h.strm.avail_out===0)?L:re}u(f,"deflate_rle");function s(h,G){for(var X;;){if(h.lookahead===0&&(ot(h),h.lookahead===0)){if(G===o)return L;break}if(h.match_length=0,X=t._tr_tally(h,0,h.window[h.strstart]),h.lookahead--,h.strstart++,X&&(Se(h,!1),h.strm.avail_out===0))return L}return h.insert=0,G===m?(Se(h,!0),h.strm.avail_out===0?be:xe):h.last_lit&&(Se(h,!1),h.strm.avail_out===0)?L:re}u(s,"deflate_huff");function c(h,G,X,F,N){this.good_length=h,this.max_lazy=G,this.nice_length=X,this.max_chain=F,this.func=N}u(c,"Config");var p;p=[new c(0,0,0,0,Ut),new c(4,4,8,4,Ke),new c(4,5,16,8,Ke),new c(4,6,32,32,Ke),new c(4,4,16,16,bt),new c(8,16,32,32,bt),new c(8,16,128,128,bt),new c(8,32,128,256,bt),new c(32,128,258,1024,bt),new c(32,258,258,4096,bt)];function _(h){h.window_size=2*h.w_size,ge(h.head),h.max_lazy_match=p[h.level].max_lazy,h.good_match=p[h.level].good_length,h.nice_match=p[h.level].nice_length,h.max_chain_length=p[h.level].max_chain,h.strstart=0,h.block_start=0,h.lookahead=0,h.insert=0,h.match_length=h.prev_length=P-1,h.match_available=0,h.ins_h=0}u(_,"lm_init");function d(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=he,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(_e*2),this.dyn_dtree=new r.Buf16((2*$+1)*2),this.bl_tree=new r.Buf16((2*ne+1)*2),ge(this.dyn_ltree),ge(this.dyn_dtree),ge(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(pe+1),this.heap=new r.Buf16(2*B+1),ge(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(2*B+1),ge(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}u(d,"DeflateState");function x(h){var G;return!h||!h.state?R(h,v):(h.total_in=h.total_out=0,h.data_type=Y,G=h.state,G.pending=0,G.pending_out=0,G.wrap<0&&(G.wrap=-G.wrap),G.status=G.wrap?ie:Le,h.adler=G.wrap===2?0:1,G.last_flush=o,t._tr_init(G),g)}u(x,"deflateResetKeep");function Z(h){var G=x(h);return G===g&&_(h.state),G}u(Z,"deflateReset");function oe(h,G){return!h||!h.state||h.state.wrap!==2?v:(h.state.gzhead=G,g)}u(oe,"deflateSetHeader");function k(h,G,X,F,N,H){if(!h)return v;var Ie=1;if(G===A&&(G=6),F<0?(Ie=0,F=-F):F>15&&(Ie=2,F-=16),N<1||N>q||X!==he||F<8||F>15||G<0||G>9||H<0||H>W)return R(h,v);F===8&&(F=9);var we=new d;return h.state=we,we.strm=h,we.wrap=Ie,we.gzhead=null,we.w_bits=F,we.w_size=1<<we.w_bits,we.w_mask=we.w_size-1,we.hash_bits=N+7,we.hash_size=1<<we.hash_bits,we.hash_mask=we.hash_size-1,we.hash_shift=~~((we.hash_bits+P-1)/P),we.window=new r.Buf8(we.w_size*2),we.head=new r.Buf16(we.hash_size),we.prev=new r.Buf16(we.w_size),we.lit_bufsize=1<<N+6,we.pending_buf_size=we.lit_bufsize*4,we.pending_buf=new r.Buf8(we.pending_buf_size),we.d_buf=1*we.lit_bufsize,we.l_buf=(1+2)*we.lit_bufsize,we.level=G,we.strategy=H,we.method=X,Z(h)}u(k,"deflateInit2");function z(h,G){return k(h,G,he,ee,J,se)}u(z,"deflateInit");function b(h,G){var X,F,N,H;if(!h||!h.state||G>y||G<0)return h?R(h,v):v;if(F=h.state,!h.output||!h.input&&h.avail_in!==0||F.status===M&&G!==m)return R(h,h.avail_out===0?E:v);if(F.strm=h,X=F.last_flush,F.last_flush=G,F.status===ie)if(F.wrap===2)h.adler=0,ve(F,31),ve(F,139),ve(F,8),F.gzhead?(ve(F,(F.gzhead.text?1:0)+(F.gzhead.hcrc?2:0)+(F.gzhead.extra?4:0)+(F.gzhead.name?8:0)+(F.gzhead.comment?16:0)),ve(F,F.gzhead.time&255),ve(F,F.gzhead.time>>8&255),ve(F,F.gzhead.time>>16&255),ve(F,F.gzhead.time>>24&255),ve(F,F.level===9?2:F.strategy>=U||F.level<2?4:0),ve(F,F.gzhead.os&255),F.gzhead.extra&&F.gzhead.extra.length&&(ve(F,F.gzhead.extra.length&255),ve(F,F.gzhead.extra.length>>8&255)),F.gzhead.hcrc&&(h.adler=i(h.adler,F.pending_buf,F.pending,0)),F.gzindex=0,F.status=me):(ve(F,0),ve(F,0),ve(F,0),ve(F,0),ve(F,0),ve(F,F.level===9?2:F.strategy>=U||F.level<2?4:0),ve(F,I),F.status=Le);else{var Ie=he+(F.w_bits-8<<4)<<8,we=-1;F.strategy>=U||F.level<2?we=0:F.level<6?we=1:F.level===6?we=2:we=3,Ie|=we<<6,F.strstart!==0&&(Ie|=V),Ie+=31-Ie%31,F.status=Le,et(F,Ie),F.strstart!==0&&(et(F,h.adler>>>16),et(F,h.adler&65535)),h.adler=1}if(F.status===me)if(F.gzhead.extra){for(N=F.pending;F.gzindex<(F.gzhead.extra.length&65535)&&!(F.pending===F.pending_buf_size&&(F.gzhead.hcrc&&F.pending>N&&(h.adler=i(h.adler,F.pending_buf,F.pending-N,N)),Pe(h),N=F.pending,F.pending===F.pending_buf_size));)ve(F,F.gzhead.extra[F.gzindex]&255),F.gzindex++;F.gzhead.hcrc&&F.pending>N&&(h.adler=i(h.adler,F.pending_buf,F.pending-N,N)),F.gzindex===F.gzhead.extra.length&&(F.gzindex=0,F.status=Fe)}else F.status=Fe;if(F.status===Fe)if(F.gzhead.name){N=F.pending;do{if(F.pending===F.pending_buf_size&&(F.gzhead.hcrc&&F.pending>N&&(h.adler=i(h.adler,F.pending_buf,F.pending-N,N)),Pe(h),N=F.pending,F.pending===F.pending_buf_size)){H=1;break}F.gzindex<F.gzhead.name.length?H=F.gzhead.name.charCodeAt(F.gzindex++)&255:H=0,ve(F,H)}while(H!==0);F.gzhead.hcrc&&F.pending>N&&(h.adler=i(h.adler,F.pending_buf,F.pending-N,N)),H===0&&(F.gzindex=0,F.status=Ne)}else F.status=Ne;if(F.status===Ne)if(F.gzhead.comment){N=F.pending;do{if(F.pending===F.pending_buf_size&&(F.gzhead.hcrc&&F.pending>N&&(h.adler=i(h.adler,F.pending_buf,F.pending-N,N)),Pe(h),N=F.pending,F.pending===F.pending_buf_size)){H=1;break}F.gzindex<F.gzhead.comment.length?H=F.gzhead.comment.charCodeAt(F.gzindex++)&255:H=0,ve(F,H)}while(H!==0);F.gzhead.hcrc&&F.pending>N&&(h.adler=i(h.adler,F.pending_buf,F.pending-N,N)),H===0&&(F.status=Ae)}else F.status=Ae;if(F.status===Ae&&(F.gzhead.hcrc?(F.pending+2>F.pending_buf_size&&Pe(h),F.pending+2<=F.pending_buf_size&&(ve(F,h.adler&255),ve(F,h.adler>>8&255),h.adler=0,F.status=Le)):F.status=Le),F.pending!==0){if(Pe(h),h.avail_out===0)return F.last_flush=-1,g}else if(h.avail_in===0&&ae(G)<=ae(X)&&G!==m)return R(h,E);if(F.status===M&&h.avail_in!==0)return R(h,E);if(h.avail_in!==0||F.lookahead!==0||G!==o&&F.status!==M){var Ee=F.strategy===U?s(F,G):F.strategy===j?f(F,G):p[F.level].func(F,G);if((Ee===be||Ee===xe)&&(F.status=M),Ee===L||Ee===be)return h.avail_out===0&&(F.last_flush=-1),g;if(Ee===re&&(G===a?t._tr_align(F):G!==y&&(t._tr_stored_block(F,0,0,!1),G===l&&(ge(F.head),F.lookahead===0&&(F.strstart=0,F.block_start=0,F.insert=0))),Pe(h),h.avail_out===0))return F.last_flush=-1,g}return G!==m?g:F.wrap<=0?w:(F.wrap===2?(ve(F,h.adler&255),ve(F,h.adler>>8&255),ve(F,h.adler>>16&255),ve(F,h.adler>>24&255),ve(F,h.total_in&255),ve(F,h.total_in>>8&255),ve(F,h.total_in>>16&255),ve(F,h.total_in>>24&255)):(et(F,h.adler>>>16),et(F,h.adler&65535)),Pe(h),F.wrap>0&&(F.wrap=-F.wrap),F.pending!==0?g:w)}u(b,"deflate");function ce(h){var G;return!h||!h.state?v:(G=h.state.status,G!==ie&&G!==me&&G!==Fe&&G!==Ne&&G!==Ae&&G!==Le&&G!==M?R(h,v):(h.state=null,G===Le?R(h,S):g))}u(ce,"deflateEnd");function De(h,G){var X=G.length,F,N,H,Ie,we,Ee,$e,br;if(!h||!h.state||(F=h.state,Ie=F.wrap,Ie===2||Ie===1&&F.status!==ie||F.lookahead))return v;for(Ie===1&&(h.adler=e(h.adler,G,X,0)),F.wrap=0,X>=F.w_size&&(Ie===0&&(ge(F.head),F.strstart=0,F.block_start=0,F.insert=0),br=new r.Buf8(F.w_size),r.arraySet(br,G,X-F.w_size,F.w_size,0),G=br,X=F.w_size),we=h.avail_in,Ee=h.next_in,$e=h.input,h.avail_in=X,h.next_in=0,h.input=G,ot(F);F.lookahead>=P;){N=F.strstart,H=F.lookahead-(P-1);do F.ins_h=(F.ins_h<<F.hash_shift^F.window[N+P-1])&F.hash_mask,F.prev[N&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=N,N++;while(--H);F.strstart=N,F.lookahead=P-1,ot(F)}return F.strstart+=F.lookahead,F.block_start=F.strstart,F.insert=F.lookahead,F.lookahead=0,F.match_length=F.prev_length=P-1,F.match_available=0,h.next_in=Ee,h.input=$e,h.avail_in=we,F.wrap=Ie,g}return u(De,"deflateSetDictionary"),or.deflateInit=z,or.deflateInit2=k,or.deflateReset=Z,or.deflateResetKeep=x,or.deflateSetHeader=oe,or.deflate=b,or.deflateEnd=ce,or.deflateSetDictionary=De,or.deflateInfo="pako deflate (from Nodeca project)",or}u(Cy,"dew$6");var cu={},Zh=!1;function Ny(){if(Zh)return cu;Zh=!0;var r=30,t=12;return cu=u(function(i,n){var o,a,l,m,y,g,w,v,S,E,A,O,U,j,W,se,Y,he,q,ee,J,te,ye,B,$;o=i.state,a=i.next_in,B=i.input,l=a+(i.avail_in-5),m=i.next_out,$=i.output,y=m-(n-i.avail_out),g=m+(i.avail_out-257),w=o.dmax,v=o.wsize,S=o.whave,E=o.wnext,A=o.window,O=o.hold,U=o.bits,j=o.lencode,W=o.distcode,se=(1<<o.lenbits)-1,Y=(1<<o.distbits)-1;e:do{U<15&&(O+=B[a++]<<U,U+=8,O+=B[a++]<<U,U+=8),he=j[O&se];t:for(;;){if(q=he>>>24,O>>>=q,U-=q,q=he>>>16&255,q===0)$[m++]=he&65535;else if(q&16){ee=he&65535,q&=15,q&&(U<q&&(O+=B[a++]<<U,U+=8),ee+=O&(1<<q)-1,O>>>=q,U-=q),U<15&&(O+=B[a++]<<U,U+=8,O+=B[a++]<<U,U+=8),he=W[O&Y];r:for(;;){if(q=he>>>24,O>>>=q,U-=q,q=he>>>16&255,q&16){if(J=he&65535,q&=15,U<q&&(O+=B[a++]<<U,U+=8,U<q&&(O+=B[a++]<<U,U+=8)),J+=O&(1<<q)-1,J>w){i.msg="invalid distance too far back",o.mode=r;break e}if(O>>>=q,U-=q,q=m-y,J>q){if(q=J-q,q>S&&o.sane){i.msg="invalid distance too far back",o.mode=r;break e}if(te=0,ye=A,E===0){if(te+=v-q,q<ee){ee-=q;do $[m++]=A[te++];while(--q);te=m-J,ye=$}}else if(E<q){if(te+=v+E-q,q-=E,q<ee){ee-=q;do $[m++]=A[te++];while(--q);if(te=0,E<ee){q=E,ee-=q;do $[m++]=A[te++];while(--q);te=m-J,ye=$}}}else if(te+=E-q,q<ee){ee-=q;do $[m++]=A[te++];while(--q);te=m-J,ye=$}for(;ee>2;)$[m++]=ye[te++],$[m++]=ye[te++],$[m++]=ye[te++],ee-=3;ee&&($[m++]=ye[te++],ee>1&&($[m++]=ye[te++]))}else{te=m-J;do $[m++]=$[te++],$[m++]=$[te++],$[m++]=$[te++],ee-=3;while(ee>2);ee&&($[m++]=$[te++],ee>1&&($[m++]=$[te++]))}}else if(q&64){i.msg="invalid distance code",o.mode=r;break e}else{he=W[(he&65535)+(O&(1<<q)-1)];continue r}break}}else if(q&64)if(q&32){o.mode=t;break e}else{i.msg="invalid literal/length code",o.mode=r;break e}else{he=j[(he&65535)+(O&(1<<q)-1)];continue t}break}}while(a<l&&m<g);ee=U>>3,a-=ee,U-=ee<<3,O&=(1<<U)-1,i.next_in=a,i.next_out=m,i.avail_in=a<l?5+(l-a):5-(a-l),i.avail_out=m<g?257+(g-m):257-(m-g),o.hold=O,o.bits=U},"inflate_fast"),cu}u(Ny,"dew$5");var lu={},Wh=!1;function Dy(){if(Wh)return lu;Wh=!0;var r=Go(),t=15,e=852,i=592,n=0,o=1,a=2,l=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],m=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],y=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],g=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];return lu=u(function(v,S,E,A,O,U,j,W){var se=W.bits,Y=0,he=0,q=0,ee=0,J=0,te=0,ye=0,B=0,$=0,ne=0,_e,pe,P,D,K,V=null,ie=0,me,Fe=new r.Buf16(t+1),Ne=new r.Buf16(t+1),Ae=null,Le=0,M,L,re;for(Y=0;Y<=t;Y++)Fe[Y]=0;for(he=0;he<A;he++)Fe[S[E+he]]++;for(J=se,ee=t;ee>=1&&Fe[ee]===0;ee--);if(J>ee&&(J=ee),ee===0)return O[U++]=1<<24|64<<16|0,O[U++]=1<<24|64<<16|0,W.bits=1,0;for(q=1;q<ee&&Fe[q]===0;q++);for(J<q&&(J=q),B=1,Y=1;Y<=t;Y++)if(B<<=1,B-=Fe[Y],B<0)return-1;if(B>0&&(v===n||ee!==1))return-1;for(Ne[1]=0,Y=1;Y<t;Y++)Ne[Y+1]=Ne[Y]+Fe[Y];for(he=0;he<A;he++)S[E+he]!==0&&(j[Ne[S[E+he]]++]=he);if(v===n?(V=Ae=j,me=19):v===o?(V=l,ie-=257,Ae=m,Le-=257,me=256):(V=y,Ae=g,me=-1),ne=0,he=0,Y=q,K=U,te=J,ye=0,P=-1,$=1<<J,D=$-1,v===o&&$>e||v===a&&$>i)return 1;for(;;){M=Y-ye,j[he]<me?(L=0,re=j[he]):j[he]>me?(L=Ae[Le+j[he]],re=V[ie+j[he]]):(L=32+64,re=0),_e=1<<Y-ye,pe=1<<te,q=pe;do pe-=_e,O[K+(ne>>ye)+pe]=M<<24|L<<16|re|0;while(pe!==0);for(_e=1<<Y-1;ne&_e;)_e>>=1;if(_e!==0?(ne&=_e-1,ne+=_e):ne=0,he++,--Fe[Y]===0){if(Y===ee)break;Y=S[E+j[he]]}if(Y>J&&(ne&D)!==P){for(ye===0&&(ye=J),K+=q,te=Y-ye,B=1<<te;te+ye<ee&&(B-=Fe[te+ye],!(B<=0));)te++,B<<=1;if($+=1<<te,v===o&&$>e||v===a&&$>i)return 1;P=ne&D,O[P]=J<<24|te<<16|K-U|0}}return ne!==0&&(O[K+ne]=Y-ye<<24|64<<16|0),W.bits=J,0},"inflate_table"),lu}u(Dy,"dew$4");var Jt={},Hh=!1;function Ly(){if(Hh)return Jt;Hh=!0;var r=Go(),t=Gh(),e=Yh(),i=Ny(),n=Dy(),o=0,a=1,l=2,m=4,y=5,g=6,w=0,v=1,S=2,E=-2,A=-3,O=-4,U=-5,j=8,W=1,se=2,Y=3,he=4,q=5,ee=6,J=7,te=8,ye=9,B=10,$=11,ne=12,_e=13,pe=14,P=15,D=16,K=17,V=18,ie=19,me=20,Fe=21,Ne=22,Ae=23,Le=24,M=25,L=26,re=27,be=28,xe=29,I=30,R=31,ae=32,ge=852,Pe=592,Se=15,ve=Se;function et(k){return(k>>>24&255)+(k>>>8&65280)+((k&65280)<<8)+((k&255)<<24)}u(et,"zswap32");function ct(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}u(ct,"InflateState");function He(k){var z;return!k||!k.state?E:(z=k.state,k.total_in=k.total_out=z.total=0,k.msg="",z.wrap&&(k.adler=z.wrap&1),z.mode=W,z.last=0,z.havedict=0,z.dmax=32768,z.head=null,z.hold=0,z.bits=0,z.lencode=z.lendyn=new r.Buf32(ge),z.distcode=z.distdyn=new r.Buf32(Pe),z.sane=1,z.back=-1,w)}u(He,"inflateResetKeep");function ot(k){var z;return!k||!k.state?E:(z=k.state,z.wsize=0,z.whave=0,z.wnext=0,He(k))}u(ot,"inflateReset");function Ut(k,z){var b,ce;return!k||!k.state||(ce=k.state,z<0?(b=0,z=-z):(b=(z>>4)+1,z<48&&(z&=15)),z&&(z<8||z>15))?E:(ce.window!==null&&ce.wbits!==z&&(ce.window=null),ce.wrap=b,ce.wbits=z,ot(k))}u(Ut,"inflateReset2");function Ke(k,z){var b,ce;return k?(ce=new ct,k.state=ce,ce.window=null,b=Ut(k,z),b!==w&&(k.state=null),b):E}u(Ke,"inflateInit2");function bt(k){return Ke(k,ve)}u(bt,"inflateInit");var f=!0,s,c;function p(k){if(f){var z;for(s=new r.Buf32(512),c=new r.Buf32(32),z=0;z<144;)k.lens[z++]=8;for(;z<256;)k.lens[z++]=9;for(;z<280;)k.lens[z++]=7;for(;z<288;)k.lens[z++]=8;for(n(a,k.lens,0,288,s,0,k.work,{bits:9}),z=0;z<32;)k.lens[z++]=5;n(l,k.lens,0,32,c,0,k.work,{bits:5}),f=!1}k.lencode=s,k.lenbits=9,k.distcode=c,k.distbits=5}u(p,"fixedtables");function _(k,z,b,ce){var De,h=k.state;return h.window===null&&(h.wsize=1<<h.wbits,h.wnext=0,h.whave=0,h.window=new r.Buf8(h.wsize)),ce>=h.wsize?(r.arraySet(h.window,z,b-h.wsize,h.wsize,0),h.wnext=0,h.whave=h.wsize):(De=h.wsize-h.wnext,De>ce&&(De=ce),r.arraySet(h.window,z,b-ce,De,h.wnext),ce-=De,ce?(r.arraySet(h.window,z,b-ce,ce,0),h.wnext=ce,h.whave=h.wsize):(h.wnext+=De,h.wnext===h.wsize&&(h.wnext=0),h.whave<h.wsize&&(h.whave+=De))),0}u(_,"updatewindow");function d(k,z){var b,ce,De,h,G,X,F,N,H,Ie,we,Ee,$e,br,at=0,qe,wt,xt,Ot,Cn,Nn,pt,Ht,St=new r.Buf8(4),wr,ar,gu=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!k||!k.state||!k.output||!k.input&&k.avail_in!==0)return E;b=k.state,b.mode===ne&&(b.mode=_e),G=k.next_out,De=k.output,F=k.avail_out,h=k.next_in,ce=k.input,X=k.avail_in,N=b.hold,H=b.bits,Ie=X,we=F,Ht=w;e:for(;;)switch(b.mode){case W:if(b.wrap===0){b.mode=_e;break}for(;H<16;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}if(b.wrap&2&&N===35615){b.check=0,St[0]=N&255,St[1]=N>>>8&255,b.check=e(b.check,St,2,0),N=0,H=0,b.mode=se;break}if(b.flags=0,b.head&&(b.head.done=!1),!(b.wrap&1)||(((N&255)<<8)+(N>>8))%31){k.msg="incorrect header check",b.mode=I;break}if((N&15)!==j){k.msg="unknown compression method",b.mode=I;break}if(N>>>=4,H-=4,pt=(N&15)+8,b.wbits===0)b.wbits=pt;else if(pt>b.wbits){k.msg="invalid window size",b.mode=I;break}b.dmax=1<<pt,k.adler=b.check=1,b.mode=N&512?B:ne,N=0,H=0;break;case se:for(;H<16;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}if(b.flags=N,(b.flags&255)!==j){k.msg="unknown compression method",b.mode=I;break}if(b.flags&57344){k.msg="unknown header flags set",b.mode=I;break}b.head&&(b.head.text=N>>8&1),b.flags&512&&(St[0]=N&255,St[1]=N>>>8&255,b.check=e(b.check,St,2,0)),N=0,H=0,b.mode=Y;case Y:for(;H<32;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}b.head&&(b.head.time=N),b.flags&512&&(St[0]=N&255,St[1]=N>>>8&255,St[2]=N>>>16&255,St[3]=N>>>24&255,b.check=e(b.check,St,4,0)),N=0,H=0,b.mode=he;case he:for(;H<16;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}b.head&&(b.head.xflags=N&255,b.head.os=N>>8),b.flags&512&&(St[0]=N&255,St[1]=N>>>8&255,b.check=e(b.check,St,2,0)),N=0,H=0,b.mode=q;case q:if(b.flags&1024){for(;H<16;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}b.length=N,b.head&&(b.head.extra_len=N),b.flags&512&&(St[0]=N&255,St[1]=N>>>8&255,b.check=e(b.check,St,2,0)),N=0,H=0}else b.head&&(b.head.extra=null);b.mode=ee;case ee:if(b.flags&1024&&(Ee=b.length,Ee>X&&(Ee=X),Ee&&(b.head&&(pt=b.head.extra_len-b.length,b.head.extra||(b.head.extra=new Array(b.head.extra_len)),r.arraySet(b.head.extra,ce,h,Ee,pt)),b.flags&512&&(b.check=e(b.check,ce,Ee,h)),X-=Ee,h+=Ee,b.length-=Ee),b.length))break e;b.length=0,b.mode=J;case J:if(b.flags&2048){if(X===0)break e;Ee=0;do pt=ce[h+Ee++],b.head&&pt&&b.length<65536&&(b.head.name+=String.fromCharCode(pt));while(pt&&Ee<X);if(b.flags&512&&(b.check=e(b.check,ce,Ee,h)),X-=Ee,h+=Ee,pt)break e}else b.head&&(b.head.name=null);b.length=0,b.mode=te;case te:if(b.flags&4096){if(X===0)break e;Ee=0;do pt=ce[h+Ee++],b.head&&pt&&b.length<65536&&(b.head.comment+=String.fromCharCode(pt));while(pt&&Ee<X);if(b.flags&512&&(b.check=e(b.check,ce,Ee,h)),X-=Ee,h+=Ee,pt)break e}else b.head&&(b.head.comment=null);b.mode=ye;case ye:if(b.flags&512){for(;H<16;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}if(N!==(b.check&65535)){k.msg="header crc mismatch",b.mode=I;break}N=0,H=0}b.head&&(b.head.hcrc=b.flags>>9&1,b.head.done=!0),k.adler=b.check=0,b.mode=ne;break;case B:for(;H<32;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}k.adler=b.check=et(N),N=0,H=0,b.mode=$;case $:if(b.havedict===0)return k.next_out=G,k.avail_out=F,k.next_in=h,k.avail_in=X,b.hold=N,b.bits=H,S;k.adler=b.check=1,b.mode=ne;case ne:if(z===y||z===g)break e;case _e:if(b.last){N>>>=H&7,H-=H&7,b.mode=re;break}for(;H<3;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}switch(b.last=N&1,N>>>=1,H-=1,N&3){case 0:b.mode=pe;break;case 1:if(p(b),b.mode=me,z===g){N>>>=2,H-=2;break e}break;case 2:b.mode=K;break;case 3:k.msg="invalid block type",b.mode=I}N>>>=2,H-=2;break;case pe:for(N>>>=H&7,H-=H&7;H<32;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}if((N&65535)!==(N>>>16^65535)){k.msg="invalid stored block lengths",b.mode=I;break}if(b.length=N&65535,N=0,H=0,b.mode=P,z===g)break e;case P:b.mode=D;case D:if(Ee=b.length,Ee){if(Ee>X&&(Ee=X),Ee>F&&(Ee=F),Ee===0)break e;r.arraySet(De,ce,h,Ee,G),X-=Ee,h+=Ee,F-=Ee,G+=Ee,b.length-=Ee;break}b.mode=ne;break;case K:for(;H<14;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}if(b.nlen=(N&31)+257,N>>>=5,H-=5,b.ndist=(N&31)+1,N>>>=5,H-=5,b.ncode=(N&15)+4,N>>>=4,H-=4,b.nlen>286||b.ndist>30){k.msg="too many length or distance symbols",b.mode=I;break}b.have=0,b.mode=V;case V:for(;b.have<b.ncode;){for(;H<3;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}b.lens[gu[b.have++]]=N&7,N>>>=3,H-=3}for(;b.have<19;)b.lens[gu[b.have++]]=0;if(b.lencode=b.lendyn,b.lenbits=7,wr={bits:b.lenbits},Ht=n(o,b.lens,0,19,b.lencode,0,b.work,wr),b.lenbits=wr.bits,Ht){k.msg="invalid code lengths set",b.mode=I;break}b.have=0,b.mode=ie;case ie:for(;b.have<b.nlen+b.ndist;){for(;at=b.lencode[N&(1<<b.lenbits)-1],qe=at>>>24,wt=at>>>16&255,xt=at&65535,!(qe<=H);){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}if(xt<16)N>>>=qe,H-=qe,b.lens[b.have++]=xt;else{if(xt===16){for(ar=qe+2;H<ar;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}if(N>>>=qe,H-=qe,b.have===0){k.msg="invalid bit length repeat",b.mode=I;break}pt=b.lens[b.have-1],Ee=3+(N&3),N>>>=2,H-=2}else if(xt===17){for(ar=qe+3;H<ar;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}N>>>=qe,H-=qe,pt=0,Ee=3+(N&7),N>>>=3,H-=3}else{for(ar=qe+7;H<ar;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}N>>>=qe,H-=qe,pt=0,Ee=11+(N&127),N>>>=7,H-=7}if(b.have+Ee>b.nlen+b.ndist){k.msg="invalid bit length repeat",b.mode=I;break}for(;Ee--;)b.lens[b.have++]=pt}}if(b.mode===I)break;if(b.lens[256]===0){k.msg="invalid code -- missing end-of-block",b.mode=I;break}if(b.lenbits=9,wr={bits:b.lenbits},Ht=n(a,b.lens,0,b.nlen,b.lencode,0,b.work,wr),b.lenbits=wr.bits,Ht){k.msg="invalid literal/lengths set",b.mode=I;break}if(b.distbits=6,b.distcode=b.distdyn,wr={bits:b.distbits},Ht=n(l,b.lens,b.nlen,b.ndist,b.distcode,0,b.work,wr),b.distbits=wr.bits,Ht){k.msg="invalid distances set",b.mode=I;break}if(b.mode=me,z===g)break e;case me:b.mode=Fe;case Fe:if(X>=6&&F>=258){k.next_out=G,k.avail_out=F,k.next_in=h,k.avail_in=X,b.hold=N,b.bits=H,i(k,we),G=k.next_out,De=k.output,F=k.avail_out,h=k.next_in,ce=k.input,X=k.avail_in,N=b.hold,H=b.bits,b.mode===ne&&(b.back=-1);break}for(b.back=0;at=b.lencode[N&(1<<b.lenbits)-1],qe=at>>>24,wt=at>>>16&255,xt=at&65535,!(qe<=H);){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}if(wt&&!(wt&240)){for(Ot=qe,Cn=wt,Nn=xt;at=b.lencode[Nn+((N&(1<<Ot+Cn)-1)>>Ot)],qe=at>>>24,wt=at>>>16&255,xt=at&65535,!(Ot+qe<=H);){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}N>>>=Ot,H-=Ot,b.back+=Ot}if(N>>>=qe,H-=qe,b.back+=qe,b.length=xt,wt===0){b.mode=L;break}if(wt&32){b.back=-1,b.mode=ne;break}if(wt&64){k.msg="invalid literal/length code",b.mode=I;break}b.extra=wt&15,b.mode=Ne;case Ne:if(b.extra){for(ar=b.extra;H<ar;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}b.length+=N&(1<<b.extra)-1,N>>>=b.extra,H-=b.extra,b.back+=b.extra}b.was=b.length,b.mode=Ae;case Ae:for(;at=b.distcode[N&(1<<b.distbits)-1],qe=at>>>24,wt=at>>>16&255,xt=at&65535,!(qe<=H);){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}if(!(wt&240)){for(Ot=qe,Cn=wt,Nn=xt;at=b.distcode[Nn+((N&(1<<Ot+Cn)-1)>>Ot)],qe=at>>>24,wt=at>>>16&255,xt=at&65535,!(Ot+qe<=H);){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}N>>>=Ot,H-=Ot,b.back+=Ot}if(N>>>=qe,H-=qe,b.back+=qe,wt&64){k.msg="invalid distance code",b.mode=I;break}b.offset=xt,b.extra=wt&15,b.mode=Le;case Le:if(b.extra){for(ar=b.extra;H<ar;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}b.offset+=N&(1<<b.extra)-1,N>>>=b.extra,H-=b.extra,b.back+=b.extra}if(b.offset>b.dmax){k.msg="invalid distance too far back",b.mode=I;break}b.mode=M;case M:if(F===0)break e;if(Ee=we-F,b.offset>Ee){if(Ee=b.offset-Ee,Ee>b.whave&&b.sane){k.msg="invalid distance too far back",b.mode=I;break}Ee>b.wnext?(Ee-=b.wnext,$e=b.wsize-Ee):$e=b.wnext-Ee,Ee>b.length&&(Ee=b.length),br=b.window}else br=De,$e=G-b.offset,Ee=b.length;Ee>F&&(Ee=F),F-=Ee,b.length-=Ee;do De[G++]=br[$e++];while(--Ee);b.length===0&&(b.mode=Fe);break;case L:if(F===0)break e;De[G++]=b.length,F--,b.mode=Fe;break;case re:if(b.wrap){for(;H<32;){if(X===0)break e;X--,N|=ce[h++]<<H,H+=8}if(we-=F,k.total_out+=we,b.total+=we,we&&(k.adler=b.check=b.flags?e(b.check,De,we,G-we):t(b.check,De,we,G-we)),we=F,(b.flags?N:et(N))!==b.check){k.msg="incorrect data check",b.mode=I;break}N=0,H=0}b.mode=be;case be:if(b.wrap&&b.flags){for(;H<32;){if(X===0)break e;X--,N+=ce[h++]<<H,H+=8}if(N!==(b.total&4294967295)){k.msg="incorrect length check",b.mode=I;break}N=0,H=0}b.mode=xe;case xe:Ht=v;break e;case I:Ht=A;break e;case R:return O;case ae:default:return E}return k.next_out=G,k.avail_out=F,k.next_in=h,k.avail_in=X,b.hold=N,b.bits=H,(b.wsize||we!==k.avail_out&&b.mode<I&&(b.mode<re||z!==m))&&_(k,k.output,k.next_out,we-k.avail_out),Ie-=k.avail_in,we-=k.avail_out,k.total_in+=Ie,k.total_out+=we,b.total+=we,b.wrap&&we&&(k.adler=b.check=b.flags?e(b.check,De,we,k.next_out-we):t(b.check,De,we,k.next_out-we)),k.data_type=b.bits+(b.last?64:0)+(b.mode===ne?128:0)+(b.mode===me||b.mode===P?256:0),(Ie===0&&we===0||z===m)&&Ht===w&&(Ht=U),Ht}u(d,"inflate");function x(k){if(!k||!k.state)return E;var z=k.state;return z.window&&(z.window=null),k.state=null,w}u(x,"inflateEnd");function Z(k,z){var b;return!k||!k.state||(b=k.state,!(b.wrap&2))?E:(b.head=z,z.done=!1,w)}u(Z,"inflateGetHeader");function oe(k,z){var b=z.length,ce,De,h;return!k||!k.state||(ce=k.state,ce.wrap!==0&&ce.mode!==$)?E:ce.mode===$&&(De=1,De=t(De,z,b,0),De!==ce.check)?A:(h=_(k,z,b,b),h?(ce.mode=R,O):(ce.havedict=1,w))}return u(oe,"inflateSetDictionary"),Jt.inflateReset=ot,Jt.inflateReset2=Ut,Jt.inflateResetKeep=He,Jt.inflateInit=bt,Jt.inflateInit2=Ke,Jt.inflate=d,Jt.inflateEnd=x,Jt.inflateGetHeader=Z,Jt.inflateSetDictionary=oe,Jt.inflateInfo="pako inflate (from Nodeca project)",Jt}u(Ly,"dew$3");var fu={},qh=!1;function Py(){return qh||(qh=!0,fu={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}),fu}u(Py,"dew$2");var de={},Vh=!1;function Uy(){if(Vh)return de;Vh=!0;var r=gr.Buffer,t=Ve,e=Be,i=Oy(),n=Cy(),o=Ly(),a=Py();for(var l in a)de[l]=a[l];de.NONE=0,de.DEFLATE=1,de.INFLATE=2,de.GZIP=3,de.GUNZIP=4,de.DEFLATERAW=5,de.INFLATERAW=6,de.UNZIP=7;var m=31,y=139;function g(w){if(typeof w!="number"||w<de.DEFLATE||w>de.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=w,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}return u(g,"Zlib"),g.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}this.pending_close=!1,e(this.init_done,"close before init"),e(this.mode<=de.UNZIP),this.mode===de.DEFLATE||this.mode===de.GZIP||this.mode===de.DEFLATERAW?n.deflateEnd(this.strm):(this.mode===de.INFLATE||this.mode===de.GUNZIP||this.mode===de.INFLATERAW||this.mode===de.UNZIP)&&o.inflateEnd(this.strm),this.mode=de.NONE,this.dictionary=null},g.prototype.write=function(w,v,S,E,A,O,U){return this._write(!0,w,v,S,E,A,O,U)},g.prototype.writeSync=function(w,v,S,E,A,O,U){return this._write(!1,w,v,S,E,A,O,U)},g.prototype._write=function(w,v,S,E,A,O,U,j){if(e.equal(arguments.length,8),e(this.init_done,"write before init"),e(this.mode!==de.NONE,"already finalized"),e.equal(!1,this.write_in_progress,"write already in progress"),e.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,e.equal(!1,v===void 0,"must provide flush value"),this.write_in_progress=!0,v!==de.Z_NO_FLUSH&&v!==de.Z_PARTIAL_FLUSH&&v!==de.Z_SYNC_FLUSH&&v!==de.Z_FULL_FLUSH&&v!==de.Z_FINISH&&v!==de.Z_BLOCK)throw new Error("Invalid flush value");if(S==null&&(S=r.alloc(0),A=0,E=0),this.strm.avail_in=A,this.strm.input=S,this.strm.next_in=E,this.strm.avail_out=j,this.strm.output=O,this.strm.next_out=U,this.flush=v,!w)return this._process(),this._checkError()?this._afterSync():void 0;var W=this;return t.nextTick(function(){W._process(),W._after()}),this},g.prototype._afterSync=function(){var w=this.strm.avail_out,v=this.strm.avail_in;return this.write_in_progress=!1,[v,w]},g.prototype._process=function(){var w=null;switch(this.mode){case de.DEFLATE:case de.GZIP:case de.DEFLATERAW:this.err=n.deflate(this.strm,this.flush);break;case de.UNZIP:switch(this.strm.avail_in>0&&(w=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(w===null)break;if(this.strm.input[w]===m){if(this.gzip_id_bytes_read=1,w++,this.strm.avail_in===1)break}else{this.mode=de.INFLATE;break}case 1:if(w===null)break;this.strm.input[w]===y?(this.gzip_id_bytes_read=2,this.mode=de.GUNZIP):this.mode=de.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case de.INFLATE:case de.GUNZIP:case de.INFLATERAW:for(this.err=o.inflate(this.strm,this.flush),this.err===de.Z_NEED_DICT&&this.dictionary&&(this.err=o.inflateSetDictionary(this.strm,this.dictionary),this.err===de.Z_OK?this.err=o.inflate(this.strm,this.flush):this.err===de.Z_DATA_ERROR&&(this.err=de.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===de.GUNZIP&&this.err===de.Z_STREAM_END&&this.strm.next_in[0]!==0;)this.reset(),this.err=o.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},g.prototype._checkError=function(){switch(this.err){case de.Z_OK:case de.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===de.Z_FINISH)return this._error("unexpected end of file"),!1;break;case de.Z_STREAM_END:break;case de.Z_NEED_DICT:return this.dictionary==null?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},g.prototype._after=function(){if(this._checkError()){var w=this.strm.avail_out,v=this.strm.avail_in;this.write_in_progress=!1,this.callback(v,w),this.pending_close&&this.close()}},g.prototype._error=function(w){this.strm.msg&&(w=this.strm.msg),this.onerror(w,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},g.prototype.init=function(w,v,S,E,A){e(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),e(w>=8&&w<=15,"invalid windowBits"),e(v>=-1&&v<=9,"invalid compression level"),e(S>=1&&S<=9,"invalid memlevel"),e(E===de.Z_FILTERED||E===de.Z_HUFFMAN_ONLY||E===de.Z_RLE||E===de.Z_FIXED||E===de.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(v,w,S,E,A),this._setDictionary()},g.prototype.params=function(){throw new Error("deflateParams Not supported")},g.prototype.reset=function(){this._reset(),this._setDictionary()},g.prototype._init=function(w,v,S,E,A){switch(this.level=w,this.windowBits=v,this.memLevel=S,this.strategy=E,this.flush=de.Z_NO_FLUSH,this.err=de.Z_OK,(this.mode===de.GZIP||this.mode===de.GUNZIP)&&(this.windowBits+=16),this.mode===de.UNZIP&&(this.windowBits+=32),(this.mode===de.DEFLATERAW||this.mode===de.INFLATERAW)&&(this.windowBits=-1*this.windowBits),this.strm=new i,this.mode){case de.DEFLATE:case de.GZIP:case de.DEFLATERAW:this.err=n.deflateInit2(this.strm,this.level,de.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case de.INFLATE:case de.GUNZIP:case de.INFLATERAW:case de.UNZIP:this.err=o.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==de.Z_OK&&this._error("Init error"),this.dictionary=A,this.write_in_progress=!1,this.init_done=!0},g.prototype._setDictionary=function(){if(this.dictionary!=null){switch(this.err=de.Z_OK,this.mode){case de.DEFLATE:case de.DEFLATERAW:this.err=n.deflateSetDictionary(this.strm,this.dictionary);break}this.err!==de.Z_OK&&this._error("Failed to set dictionary")}},g.prototype._reset=function(){switch(this.err=de.Z_OK,this.mode){case de.DEFLATE:case de.DEFLATERAW:case de.GZIP:this.err=n.deflateReset(this.strm);break;case de.INFLATE:case de.INFLATERAW:case de.GUNZIP:this.err=o.inflateReset(this.strm);break}this.err!==de.Z_OK&&this._error("Failed to reset stream")},de.Zlib=g,de}u(Uy,"dew$1");var Te={},Kh=!1;function My(){if(Kh)return Te;Kh=!0;var r=Ve,t=gr.Buffer,e=Lt.Transform,i=Uy(),n=Q,o=Be.ok,a=gr.kMaxLength,l="Cannot create final Buffer. It would be larger than 0x"+a.toString(16)+" bytes";i.Z_MIN_WINDOWBITS=8,i.Z_MAX_WINDOWBITS=15,i.Z_DEFAULT_WINDOWBITS=15,i.Z_MIN_CHUNK=64,i.Z_MAX_CHUNK=1/0,i.Z_DEFAULT_CHUNK=16*1024,i.Z_MIN_MEMLEVEL=1,i.Z_MAX_MEMLEVEL=9,i.Z_DEFAULT_MEMLEVEL=8,i.Z_MIN_LEVEL=-1,i.Z_MAX_LEVEL=9,i.Z_DEFAULT_LEVEL=i.Z_DEFAULT_COMPRESSION;for(var m=Object.keys(i),y=0;y<m.length;y++){var g=m[y];g.match(/^Z/)&&Object.defineProperty(Te,g,{enumerable:!0,value:i[g],writable:!1})}for(var w={Z_OK:i.Z_OK,Z_STREAM_END:i.Z_STREAM_END,Z_NEED_DICT:i.Z_NEED_DICT,Z_ERRNO:i.Z_ERRNO,Z_STREAM_ERROR:i.Z_STREAM_ERROR,Z_DATA_ERROR:i.Z_DATA_ERROR,Z_MEM_ERROR:i.Z_MEM_ERROR,Z_BUF_ERROR:i.Z_BUF_ERROR,Z_VERSION_ERROR:i.Z_VERSION_ERROR},v=Object.keys(w),S=0;S<v.length;S++){var E=v[S];w[w[E]]=E}Object.defineProperty(Te,"codes",{enumerable:!0,value:Object.freeze(w),writable:!1}),Te.Deflate=U,Te.Inflate=j,Te.Gzip=W,Te.Gunzip=se,Te.DeflateRaw=Y,Te.InflateRaw=he,Te.Unzip=q,Te.createDeflate=function(B){return new U(B)},Te.createInflate=function(B){return new j(B)},Te.createDeflateRaw=function(B){return new Y(B)},Te.createInflateRaw=function(B){return new he(B)},Te.createGzip=function(B){return new W(B)},Te.createGunzip=function(B){return new se(B)},Te.createUnzip=function(B){return new q(B)},Te.deflate=function(B,$,ne){return typeof $=="function"&&(ne=$,$={}),A(new U($),B,ne)},Te.deflateSync=function(B,$){return O(new U($),B)},Te.gzip=function(B,$,ne){return typeof $=="function"&&(ne=$,$={}),A(new W($),B,ne)},Te.gzipSync=function(B,$){return O(new W($),B)},Te.deflateRaw=function(B,$,ne){return typeof $=="function"&&(ne=$,$={}),A(new Y($),B,ne)},Te.deflateRawSync=function(B,$){return O(new Y($),B)},Te.unzip=function(B,$,ne){return typeof $=="function"&&(ne=$,$={}),A(new q($),B,ne)},Te.unzipSync=function(B,$){return O(new q($),B)},Te.inflate=function(B,$,ne){return typeof $=="function"&&(ne=$,$={}),A(new j($),B,ne)},Te.inflateSync=function(B,$){return O(new j($),B)},Te.gunzip=function(B,$,ne){return typeof $=="function"&&(ne=$,$={}),A(new se($),B,ne)},Te.gunzipSync=function(B,$){return O(new se($),B)},Te.inflateRaw=function(B,$,ne){return typeof $=="function"&&(ne=$,$={}),A(new he($),B,ne)},Te.inflateRawSync=function(B,$){return O(new he($),B)};function A(B,$,ne){var _e=[],pe=0;B.on("error",D),B.on("end",K),B.end($),P();function P(){for(var V;(V=B.read())!==null;)_e.push(V),pe+=V.length;B.once("readable",P)}u(P,"flow");function D(V){B.removeListener("end",K),B.removeListener("readable",P),ne(V)}u(D,"onError");function K(){var V,ie=null;pe>=a?ie=new RangeError(l):V=t.concat(_e,pe),_e=[],B.close(),ne(ie,V)}u(K,"onEnd")}u(A,"zlibBuffer");function O(B,$){if(typeof $=="string"&&($=t.from($)),!t.isBuffer($))throw new TypeError("Not a string or buffer");var ne=B._finishFlushFlag;return B._processChunk($,ne)}u(O,"zlibBufferSync");function U(B){if(!(this instanceof U))return new U(B);J.call(this,B,i.DEFLATE)}u(U,"Deflate");function j(B){if(!(this instanceof j))return new j(B);J.call(this,B,i.INFLATE)}u(j,"Inflate");function W(B){if(!(this instanceof W))return new W(B);J.call(this,B,i.GZIP)}u(W,"Gzip");function se(B){if(!(this instanceof se))return new se(B);J.call(this,B,i.GUNZIP)}u(se,"Gunzip");function Y(B){if(!(this instanceof Y))return new Y(B);J.call(this,B,i.DEFLATERAW)}u(Y,"DeflateRaw");function he(B){if(!(this instanceof he))return new he(B);J.call(this,B,i.INFLATERAW)}u(he,"InflateRaw");function q(B){if(!(this instanceof q))return new q(B);J.call(this,B,i.UNZIP)}u(q,"Unzip");function ee(B){return B===i.Z_NO_FLUSH||B===i.Z_PARTIAL_FLUSH||B===i.Z_SYNC_FLUSH||B===i.Z_FULL_FLUSH||B===i.Z_FINISH||B===i.Z_BLOCK}u(ee,"isValidFlushFlag");function J(B,$){var ne=this;if(this._opts=B=B||{},this._chunkSize=B.chunkSize||Te.Z_DEFAULT_CHUNK,e.call(this,B),B.flush&&!ee(B.flush))throw new Error("Invalid flush flag: "+B.flush);if(B.finishFlush&&!ee(B.finishFlush))throw new Error("Invalid flush flag: "+B.finishFlush);if(this._flushFlag=B.flush||i.Z_NO_FLUSH,this._finishFlushFlag=typeof B.finishFlush!="undefined"?B.finishFlush:i.Z_FINISH,B.chunkSize&&(B.chunkSize<Te.Z_MIN_CHUNK||B.chunkSize>Te.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+B.chunkSize);if(B.windowBits&&(B.windowBits<Te.Z_MIN_WINDOWBITS||B.windowBits>Te.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+B.windowBits);if(B.level&&(B.level<Te.Z_MIN_LEVEL||B.level>Te.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+B.level);if(B.memLevel&&(B.memLevel<Te.Z_MIN_MEMLEVEL||B.memLevel>Te.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+B.memLevel);if(B.strategy&&B.strategy!=Te.Z_FILTERED&&B.strategy!=Te.Z_HUFFMAN_ONLY&&B.strategy!=Te.Z_RLE&&B.strategy!=Te.Z_FIXED&&B.strategy!=Te.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+B.strategy);if(B.dictionary&&!t.isBuffer(B.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new i.Zlib($);var _e=this;this._hadError=!1,this._handle.onerror=function(D,K){te(_e),_e._hadError=!0;var V=new Error(D);V.errno=K,V.code=Te.codes[K],_e.emit("error",V)};var pe=Te.Z_DEFAULT_COMPRESSION;typeof B.level=="number"&&(pe=B.level);var P=Te.Z_DEFAULT_STRATEGY;typeof B.strategy=="number"&&(P=B.strategy),this._handle.init(B.windowBits||Te.Z_DEFAULT_WINDOWBITS,pe,B.memLevel||Te.Z_DEFAULT_MEMLEVEL,P,B.dictionary),this._buffer=t.allocUnsafe(this._chunkSize),this._offset=0,this._level=pe,this._strategy=P,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!ne._handle},configurable:!0,enumerable:!0})}u(J,"Zlib"),n.inherits(J,e),J.prototype.params=function(B,$,ne){if(B<Te.Z_MIN_LEVEL||B>Te.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+B);if($!=Te.Z_FILTERED&&$!=Te.Z_HUFFMAN_ONLY&&$!=Te.Z_RLE&&$!=Te.Z_FIXED&&$!=Te.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+$);if(this._level!==B||this._strategy!==$){var _e=this;this.flush(i.Z_SYNC_FLUSH,function(){o(_e._handle,"zlib binding closed"),_e._handle.params(B,$),_e._hadError||(_e._level=B,_e._strategy=$,ne&&ne())})}else r.nextTick(ne)},J.prototype.reset=function(){return o(this._handle,"zlib binding closed"),this._handle.reset()},J.prototype._flush=function(B){this._transform(t.alloc(0),"",B)},J.prototype.flush=function(B,$){var ne=this,_e=this._writableState;(typeof B=="function"||B===void 0&&!$)&&($=B,B=i.Z_FULL_FLUSH),_e.ended?$&&r.nextTick($):_e.ending?$&&this.once("end",$):_e.needDrain?$&&this.once("drain",function(){return ne.flush(B,$)}):(this._flushFlag=B,this.write(t.alloc(0),"",$))},J.prototype.close=function(B){te(this,B),r.nextTick(ye,this)};function te(B,$){$&&r.nextTick($),B._handle&&(B._handle.close(),B._handle=null)}u(te,"_close");function ye(B){B.emit("close")}return u(ye,"emitCloseNT"),J.prototype._transform=function(B,$,ne){var _e,pe=this._writableState,P=pe.ending||pe.ended,D=P&&(!B||pe.length===B.length);if(B!==null&&!t.isBuffer(B))return ne(new Error("invalid input"));if(!this._handle)return ne(new Error("zlib binding closed"));D?_e=this._finishFlushFlag:(_e=this._flushFlag,B.length>=pe.length&&(this._flushFlag=this._opts.flush||i.Z_NO_FLUSH)),this._processChunk(B,_e,ne)},J.prototype._processChunk=function(B,$,ne){var _e=B&&B.length,pe=this._chunkSize-this._offset,P=0,D=this,K=typeof ne=="function";if(!K){var V=[],ie=0,me;this.on("error",function(M){me=M}),o(this._handle,"zlib binding closed");do var Fe=this._handle.writeSync($,B,P,_e,this._buffer,this._offset,pe);while(!this._hadError&&Le(Fe[0],Fe[1]));if(this._hadError)throw me;if(ie>=a)throw te(this),new RangeError(l);var Ne=t.concat(V,ie);return te(this),Ne}o(this._handle,"zlib binding closed");var Ae=this._handle.write($,B,P,_e,this._buffer,this._offset,pe);Ae.buffer=B,Ae.callback=Le;function Le(M,L){if(this&&(this.buffer=null,this.callback=null),!D._hadError){var re=pe-L;if(o(re>=0,"have should not go down"),re>0){var be=D._buffer.slice(D._offset,D._offset+re);D._offset+=re,K?D.push(be):(V.push(be),ie+=be.length)}if((L===0||D._offset>=D._chunkSize)&&(pe=D._chunkSize,D._offset=0,D._buffer=t.allocUnsafe(D._chunkSize)),L===0){if(P+=_e-M,_e=M,!K)return!0;var xe=D._handle.write($,B,P,_e,D._buffer,D._offset,D._chunkSize);xe.callback=Le,xe.buffer=B;return}if(!K)return!1;ne()}}u(Le,"callback")},n.inherits(U,J),n.inherits(j,J),n.inherits(W,J),n.inherits(se,J),n.inherits(Y,J),n.inherits(he,J),n.inherits(q,J),Te}u(My,"dew");var le=My();le.codes;le.Deflate;le.Inflate;le.Gzip;le.Gunzip;le.DeflateRaw;le.InflateRaw;le.Unzip;le.createDeflate;le.createInflate;le.createDeflateRaw;le.createInflateRaw;le.createGzip;le.createGunzip;le.createUnzip;le.deflate;le.deflateSync;le.gzip;le.gzipSync;le.deflateRaw;le.deflateRawSync;le.unzip;le.unzipSync;le.inflate;le.inflateSync;le.gunzip;le.gunzipSync;le.inflateRaw;le.inflateRawSync;var RF=le.Deflate,OF=le.DeflateRaw,BF=le.Gunzip,kF=le.Gzip,CF=le.Inflate,NF=le.InflateRaw,DF=le.Unzip,LF=le.Z_BEST_COMPRESSION,PF=le.Z_BEST_SPEED,UF=le.Z_BINARY,MF=le.Z_BLOCK,jF=le.Z_BUF_ERROR,zF=le.Z_DATA_ERROR,$F=le.Z_DEFAULT_CHUNK,ZF=le.Z_DEFAULT_COMPRESSION,WF=le.Z_DEFAULT_LEVEL,HF=le.Z_DEFAULT_MEMLEVEL,qF=le.Z_DEFAULT_STRATEGY,VF=le.Z_DEFAULT_WINDOWBITS,KF=le.Z_DEFLATED,GF=le.Z_ERRNO,YF=le.Z_FILTERED,XF=le.Z_FINISH,JF=le.Z_FIXED,QF=le.Z_FULL_FLUSH,ex=le.Z_HUFFMAN_ONLY,tx=le.Z_MAX_CHUNK,rx=le.Z_MAX_LEVEL,ix=le.Z_MAX_MEMLEVEL,nx=le.Z_MAX_WINDOWBITS,ox=le.Z_MIN_CHUNK,ax=le.Z_MIN_LEVEL,sx=le.Z_MIN_MEMLEVEL,ux=le.Z_MIN_WINDOWBITS,cx=le.Z_NEED_DICT,lx=le.Z_NO_COMPRESSION,fx=le.Z_NO_FLUSH,hx=le.Z_OK,dx=le.Z_PARTIAL_FLUSH,px=le.Z_RLE,mx=le.Z_STREAM_END,gx=le.Z_STREAM_ERROR,yx=le.Z_SYNC_FLUSH,bx=le.Z_TEXT,wx=le.Z_TREES,_x=le.Z_UNKNOWN,vx=le.Zlib,Ex=le.codes,Sx=le.createDeflate,Fx=le.createDeflateRaw,xx=le.createGunzip,Ix=le.createGzip,Tx=le.createInflate,Ax=le.createInflateRaw,Rx=le.createUnzip,Ox=le.deflate,Bx=le.deflateRaw,kx=le.deflateRawSync,Cx=le.deflateSync,Nx=le.gunzip,Dx=le.gunzipSync,Lx=le.gzip,Px=le.gzipSync,Ux=le.inflate,Mx=le.inflateRaw,Xh=le.inflateRawSync,jx=le.inflateSync,zx=le.unzip,$x=le.unzipSync;var jy=["\xC7","\xFC","\xE9","\xE2","\xE4","\xE0","\xE5","\xE7","\xEA","\xEB","\xE8","\xEF","\xEE","\xEC","\xC4","\xC5","\xC9","\xE6","\xC6","\xF4","\xF6","\xF2","\xFB","\xF9","\xFF","\xD6","\xDC","\xF8","\xA3","\xD8","\xD7","\u0192","\xE1","\xED","\xF3","\xFA","\xF1","\xD1","\xAA","\xBA","\xBF","\xAE","\xAC","\xBD","\xBC","\xA1","\xAB","\xBB","_","_","_","\xA6","\xA6","\xC1","\xC2","\xC0","\xA9","\xA6","\xA6","+","+","\xA2","\xA5","+","+","-","-","+","-","+","\xE3","\xC3","+","+","-","-","\xA6","-","+","\xA4","\xF0","\xD0","\xCA","\xCB","\xC8","i","\xCD","\xCE","\xCF","+","+","_","_","\xA6","\xCC","_","\xD3","\xDF","\xD4","\xD2","\xF5","\xD5","\xB5","\xFE","\xDE","\xDA","\xDB","\xD9","\xFD","\xDD","\xAF","\xB4","\xAD","\xB1","_","\xBE","\xB6","\xA7","\xF7","\xB8","\xB0","\xA8","\xB7","\xB9","\xB3","\xB2","_"," "],Jh={};var hu=(O=>(O[O.STORED=0]="STORED",O[O.SHRUNK=1]="SHRUNK",O[O.REDUCED_1=2]="REDUCED_1",O[O.REDUCED_2=3]="REDUCED_2",O[O.REDUCED_3=4]="REDUCED_3",O[O.REDUCED_4=5]="REDUCED_4",O[O.IMPLODE=6]="IMPLODE",O[O.DEFLATE=8]="DEFLATE",O[O.DEFLATE64=9]="DEFLATE64",O[O.TERSE_OLD=10]="TERSE_OLD",O[O.BZIP2=12]="BZIP2",O[O.LZMA=14]="LZMA",O[O.TERSE_NEW=18]="TERSE_NEW",O[O.LZ77=19]="LZ77",O[O.WAVPACK=97]="WAVPACK",O[O.PPMD=98]="PPMD",O))(hu||{});function Qh(r,t){let e=t&31,i=(t>>5&15)-1,n=(t>>9)+1980,o=r&31,a=r>>5&63,l=r>>11;return new Date(n,i,e,l,a,o)}u(Qh,"msdos2date");function ta(r,t,e,i){return i===0?"":t?r.toString("utf8",e,e+i):[...r].map(n=>n>127?jy[n-128]:String.fromCharCode(n)).join()}u(ta,"safeToString");var Yo=class{constructor(t){this.data=t;if(t.readUInt32LE(0)!==67324752)throw new T(22,"Invalid Zip file: Local file header has invalid signature: "+this.data.readUInt32LE(0))}versionNeeded(){return this.data.readUInt16LE(4)}flags(){return this.data.readUInt16LE(6)}compressionMethod(){return this.data.readUInt16LE(8)}lastModFileTime(){return Qh(this.data.readUInt16LE(10),this.data.readUInt16LE(12))}rawLastModFileTime(){return this.data.readUInt32LE(10)}crc32(){return this.data.readUInt32LE(14)}fileNameLength(){return this.data.readUInt16LE(26)}extraFieldLength(){return this.data.readUInt16LE(28)}fileName(){return ta(this.data,this.useUTF8(),30,this.fileNameLength())}extraField(){let t=30+this.fileNameLength();return this.data.subarray(t,t+this.extraFieldLength())}totalSize(){return 30+this.fileNameLength()+this.extraFieldLength()}useUTF8(){return(this.flags()&2048)===2048}};u(Yo,"FileHeader");var Xo=class{constructor(t,e,i){this.header=t;this.record=e;this.data=i}decompress(){let t=this.header.compressionMethod(),e=Jh[t];if(e)return e(this.data,this.record.compressedSize(),this.record.uncompressedSize(),this.record.flag());{let i=hu[t];throw i||(i=`Unknown: ${t}`),new T(22,`Invalid compression method on file '${this.header.fileName()}': ${i}`)}}getHeader(){return this.header}getRecord(){return this.record}getRawData(){return this.data}};u(Xo,"FileData");var Jo=class{constructor(t,e){this.zipData=t;this.data=e;if(this.data.readUInt32LE(0)!==33639248)throw new T(22,`Invalid Zip file: Central directory record has invalid signature: ${this.data.readUInt32LE(0)}`);this._filename=this.produceFilename()}versionMadeBy(){return this.data.readUInt16LE(4)}versionNeeded(){return this.data.readUInt16LE(6)}flag(){return this.data.readUInt16LE(8)}compressionMethod(){return this.data.readUInt16LE(10)}lastModFileTime(){return Qh(this.data.readUInt16LE(12),this.data.readUInt16LE(14))}rawLastModFileTime(){return this.data.readUInt32LE(12)}crc32(){return this.data.readUInt32LE(16)}compressedSize(){return this.data.readUInt32LE(20)}uncompressedSize(){return this.data.readUInt32LE(24)}fileNameLength(){return this.data.readUInt16LE(28)}extraFieldLength(){return this.data.readUInt16LE(30)}fileCommentLength(){return this.data.readUInt16LE(32)}diskNumberStart(){return this.data.readUInt16LE(34)}internalAttributes(){return this.data.readUInt16LE(36)}externalAttributes(){return this.data.readUInt32LE(38)}headerRelativeOffset(){return this.data.readUInt32LE(42)}produceFilename(){return ta(this.data,this.useUTF8(),46,this.fileNameLength()).replace(/\\/g,"/")}fileName(){return this._filename}rawFileName(){return this.data.subarray(46,46+this.fileNameLength())}extraField(){let t=44+this.fileNameLength();return this.data.subarray(t,t+this.extraFieldLength())}fileComment(){let t=46+this.fileNameLength()+this.extraFieldLength();return ta(this.data,this.useUTF8(),t,this.fileCommentLength())}rawFileComment(){let t=46+this.fileNameLength()+this.extraFieldLength();return this.data.subarray(t,t+this.fileCommentLength())}totalSize(){return 46+this.fileNameLength()+this.extraFieldLength()+this.fileCommentLength()}isDirectory(){let t=this.fileName();return!!(this.externalAttributes()&16)||t.charAt(t.length-1)==="/"}isFile(){return!this.isDirectory()}useUTF8(){return(this.flag()&2048)===2048}isEncrypted(){return(this.flag()&1)===1}getFileData(){let t=this.headerRelativeOffset(),e=new Yo(this.zipData.subarray(t));return new Xo(e,this,this.zipData.subarray(t+e.totalSize()))}getData(){return this.getFileData().decompress()}getRawData(){return this.getFileData().getRawData()}getStats(){return new Me(je.FILE,this.uncompressedSize(),365,Date.now(),this.lastModFileTime().getTime())}};u(Jo,"CentralDirectory");var Qo=class{constructor(t){this.data=t;if(this.data.readUInt32LE(0)!==101010256)throw new T(22,`Invalid Zip file: End of central directory record has invalid signature: ${this.data.readUInt32LE(0)}`)}diskNumber(){return this.data.readUInt16LE(4)}cdDiskNumber(){return this.data.readUInt16LE(6)}cdDiskEntryCount(){return this.data.readUInt16LE(8)}cdTotalEntryCount(){return this.data.readUInt16LE(10)}cdSize(){return this.data.readUInt32LE(12)}cdOffset(){return this.data.readUInt32LE(16)}cdZipCommentLength(){return this.data.readUInt16LE(20)}cdZipComment(){return ta(this.data,!0,22,this.cdZipCommentLength())}rawCdZipComment(){return this.data.slice(22,22+this.cdZipCommentLength())}};u(Qo,"EndOfCentralDirectory");var ea=class{constructor(t,e,i,n){this.index=t;this.directoryEntries=e;this.eocd=i;this.data=n}};u(ea,"ZipTOC");var Ur=class extends kt{constructor({zipData:e,name:i=""}){super();this._index=new hr;this._directoryEntries=[];this._eocd=null;this.name=i,this._ready=Ur._computeIndex(e).then(n=>(this._index=n.index,this._directoryEntries=n.directoryEntries,this._eocd=n.eocd,this.data=n.data,this))}static isAvailable(){return!0}static RegisterDecompressionMethod(e,i){Jh[e]=i}static _getEOCD(e){let n=Math.min(65557,e.length-1);for(let o=22;o<n;o++)if(e.readUInt32LE(e.length-o)===101010256)return new Qo(e.subarray(e.length-o));throw new T(22,"Invalid ZIP file: Could not locate End of Central Directory signature.")}static _addToIndex(e,i){let n=e.fileName();if(n.charAt(0)==="/")throw new T(1,"Unexpectedly encountered an absolute path in a zip file. Please file a bug.");n.charAt(n.length-1)==="/"&&(n=n.substr(0,n.length-1)),e.isDirectory()?i.addPathFast("/"+n,new fr(e)):i.addPathFast("/"+n,new Ci(e))}static _computeIndex(e){return C(this,null,function*(){let i=new hr,n=Ur._getEOCD(e);if(n.diskNumber()!==n.cdDiskNumber())throw new T(22,"ZipFS does not support spanned zip files.");let o=n.cdOffset();if(o===4294967295)throw new T(22,"ZipFS does not support Zip64.");let a=o+n.cdSize();return Ur._computeIndexResponsive(e,i,o,a,[],n)})}static _computeIndexResponsive(e,i,n,o,a,l){return C(this,null,function*(){if(n>=o)return new ea(i,a,l,e);let m=0;for(;m++<200&&n<o;){let y=new Jo(e,e.subarray(n));Ur._addToIndex(y,i),n+=y.totalSize(),a.push(y)}return Ur._computeIndexResponsive(e,i,n,o,a,l)})}get metadata(){return rt(Xe({},super.metadata),{name:Ur.Name+(this.name!==""?` ${this.name}`:""),readonly:!0,synchronous:!0,totalSpace:this.data.length})}getCentralDirectoryEntry(e){let i=this._index.getInode(e);if(i===null)throw T.ENOENT(e);if(Or(i))return i.getData();if($t(i))return i.getData();throw T.EPERM(`Invalid inode: ${i}`)}getCentralDirectoryEntryAt(e){let i=this._directoryEntries[e];if(!i)throw new RangeError(`Invalid directory index: ${e}.`);return i}getNumberOfCentralDirectoryEntries(){return this._directoryEntries.length}getEndOfCentralDirectory(){return this._eocd}statSync(e){let i=this._index.getInode(e);if(i===null)throw T.ENOENT(e);let n;if(Or(i))n=i.getData().getStats();else if($t(i))n=i.getStats();else throw new T(22,"Invalid inode.");return n}openSync(e,i,n){if(i.isWriteable())throw new T(1,e);let o=this._index.getInode(e);if(o)if(Or(o)||$t(o)){let a=$t(o)?o.getStats():o.getData().getStats(),l=$t(o)?o.getStats().fileData:o.getData().getData();switch(i.pathExistsAction()){case 1:case 2:throw T.EEXIST(e);case 0:return new er(this,e,i,a,l||void 0);default:throw new T(22,"Invalid FileMode object.")}}else throw T.EPERM(e);else throw T.ENOENT(e)}readdirSync(e){let i=this._index.getInode(e);if(i){if($t(i))return i.getListing();throw T.ENOTDIR(e)}else throw T.ENOENT(e)}readFileSync(e,i,n){let o=this.openSync(e,n,420);try{let l=o.getBuffer();return i===null?ni(l):l.toString(i)}finally{o.closeSync()}}},Qt=Ur;u(Qt,"ZipFS"),Qt.Name="ZipFS",Qt.Create=Je.bind(Ur),Qt.Options={zipData:{type:"object",description:"The zip file as a Buffer object.",validator:qn},name:{type:"string",optional:!0,description:"The name of the zip file (optional)."}},Qt.CompressionMethod=hu;Qt.RegisterDecompressionMethod(8,(r,t,e)=>Xh(r.subarray(0,t),{chunkSize:e}));Qt.RegisterDecompressionMethod(0,(r,t,e)=>ni(r,0,e));var zy="IEEE_P1282";function Pt(r,t,e){return r.toString("ascii",t,t+e).trim()}u(Pt,"getASCIIString");function du(r,t,e){if(e===1)return String.fromCharCode(r[t]);let i=Math.floor(e/2),n=new Array(i);for(let o=0;o<i;o++){let a=t+(o<<1);n[o]=String.fromCharCode(r[a+1]|r[a]<<8)}return n.join("")}u(du,"getJolietString");function yr(r,t){let e=parseInt(Pt(r,t,4),10),i=parseInt(Pt(r,t+4,2),10),n=parseInt(Pt(r,t+6,2),10),o=parseInt(Pt(r,t+8,2),10),a=parseInt(Pt(r,t+10,2),10),l=parseInt(Pt(r,t+12,2),10),m=parseInt(Pt(r,t+14,2),10);return new Date(e,i,n,o,a,l,m*100)}u(yr,"getDate");function _i(r,t){let e=r[t],i=r[t+1],n=r[t+2],o=r[t+3],a=r[t+4],l=r[t+5];return new Date(e,i-1,n,o,a,l)}u(_i,"getShortFormDate");function $y(r,t){let e=r.subarray(t),i=new yt(e);switch(i.signatureWord()){case 17221:return new Sn(e);case 20548:return new na(e);case 21328:return new Fn(e);case 21332:return new xn(e);case 17746:return new In(e);case 17747:return new oa(e);case 20568:return new An(e);case 20558:return new aa(e);case 21324:return new zi(e);case 20045:return new Rn(e);case 17228:return new $i(e);case 20556:return new ua(e);case 21061:return new On(e);case 21574:return new Bn(e);case 21318:return new ca(e);case 21074:return new Tn(e);default:return i}}u($y,"constructSystemUseEntry");function ed(r,t,e,i){e=e-4;let n=new Array;for(;t<e;){let o=$y(r,t),a=o.length();if(a===0)return n;if(t+=a,o instanceof xn)break;o instanceof Sn?n=n.concat(o.getEntries(i)):n.push(o)}return n}u(ed,"constructSystemUseEntries");var bn=class{constructor(t){this._data=t}type(){return this._data[0]}standardIdentifier(){return Pt(this._data,1,5)}version(){return this._data[6]}data(){return this._data.subarray(7,2048)}};u(bn,"VolumeDescriptor");var wn=class extends bn{constructor(e){super(e);this._root=null}systemIdentifier(){return this._getString32(8)}volumeIdentifier(){return this._getString32(40)}volumeSpaceSize(){return this._data.readUInt32LE(80)}volumeSetSize(){return this._data.readUInt16LE(120)}volumeSequenceNumber(){return this._data.readUInt16LE(124)}logicalBlockSize(){return this._data.readUInt16LE(128)}pathTableSize(){return this._data.readUInt32LE(132)}locationOfTypeLPathTable(){return this._data.readUInt32LE(140)}locationOfOptionalTypeLPathTable(){return this._data.readUInt32LE(144)}locationOfTypeMPathTable(){return this._data.readUInt32BE(148)}locationOfOptionalTypeMPathTable(){return this._data.readUInt32BE(152)}rootDirectoryEntry(e){return this._root===null&&(this._root=this._constructRootDirectoryRecord(this._data.subarray(156)),this._root.rootCheckForRockRidge(e)),this._root}volumeSetIdentifier(){return this._getString(190,128)}publisherIdentifier(){return this._getString(318,128)}dataPreparerIdentifier(){return this._getString(446,128)}applicationIdentifier(){return this._getString(574,128)}copyrightFileIdentifier(){return this._getString(702,38)}abstractFileIdentifier(){return this._getString(740,36)}bibliographicFileIdentifier(){return this._getString(776,37)}volumeCreationDate(){return yr(this._data,813)}volumeModificationDate(){return yr(this._data,830)}volumeExpirationDate(){return yr(this._data,847)}volumeEffectiveDate(){return yr(this._data,864)}fileStructureVersion(){return this._data[881]}applicationUsed(){return this._data.subarray(883,883+512)}reserved(){return this._data.subarray(1395,1395+653)}_getString32(e){return this._getString(e,32)}};u(wn,"PrimaryOrSupplementaryVolumeDescriptor");var ra=class extends wn{constructor(t){if(super(t),this.type()!==1)throw new T(5,"Invalid primary volume descriptor.")}name(){return"ISO9660"}_constructRootDirectoryRecord(t){return new vn(t,-1)}_getString(t,e){return this._getString(t,e)}};u(ra,"PrimaryVolumeDescriptor");var ia=class extends wn{constructor(t){if(super(t),this.type()!==2)throw new T(5,"Invalid supplementary volume descriptor.");let e=this.escapeSequence(),i=e[2];if(e[0]!==37||e[1]!==47||i!==64&&i!==67&&i!==69)throw new T(5,`Unrecognized escape sequence for SupplementaryVolumeDescriptor: ${e.toString()}`)}name(){return"Joliet"}escapeSequence(){return this._data.subarray(88,120)}_constructRootDirectoryRecord(t){return new En(t,-1)}_getString(t,e){return du(this._data,t,e)}};u(ia,"SupplementaryVolumeDescriptor");var _n=class{constructor(t,e){this._suEntries=null;this._fileOrDir=null;this._data=t,this._rockRidgeOffset=e}hasRockRidge(){return this._rockRidgeOffset>-1}getRockRidgeOffset(){return this._rockRidgeOffset}rootCheckForRockRidge(t){let e=this.getDirectory(t);this._rockRidgeOffset=e.getDotEntry(t)._getRockRidgeOffset(t),this._rockRidgeOffset>-1&&(this._fileOrDir=null)}length(){return this._data[0]}extendedAttributeRecordLength(){return this._data[1]}lba(){return this._data.readUInt32LE(2)*2048}dataLength(){return this._data.readUInt32LE(10)}recordingDate(){return _i(this._data,18)}fileFlags(){return this._data[25]}fileUnitSize(){return this._data[26]}interleaveGapSize(){return this._data[27]}volumeSequenceNumber(){return this._data.readUInt16LE(28)}identifier(){return this._getString(33,this._data[32])}fileName(t){if(this.hasRockRidge()){let n=this._rockRidgeFilename(t);if(n!==null)return n}let e=this.identifier();if(this.isDirectory(t))return e;let i=e.indexOf(";");return i===-1?e:e[i-1]==="."?e.slice(0,i-1):e.slice(0,i)}isDirectory(t){let e=!!(this.fileFlags()&2);return!e&&this.hasRockRidge()&&(e=this.getSUEntries(t).filter(i=>i instanceof $i).length>0),e}isSymlink(t){return this.hasRockRidge()&&this.getSUEntries(t).filter(e=>e instanceof zi).length>0}getSymlinkPath(t){let e="",i=this.getSUEntries(t),n=this._getGetString();for(let o of i)if(o instanceof zi){let a=o.componentRecords();for(let l of a){let m=l.flags();m&2?e+="./":m&4?e+="../":m&8?e+="/":(e+=l.content(n),m&1||(e+="/"))}if(!o.continueFlag())break}return e.length>1&&e[e.length-1]==="/"?e.slice(0,e.length-1):e}getFile(t){if(this.isDirectory(t))throw new Error("Tried to get a File from a directory.");return this._fileOrDir===null&&(this._fileOrDir=t.subarray(this.lba(),this.lba()+this.dataLength())),this._fileOrDir}getDirectory(t){if(!this.isDirectory(t))throw new Error("Tried to get a Directory from a file.");return this._fileOrDir===null&&(this._fileOrDir=this._constructDirectory(t)),this._fileOrDir}getSUEntries(t){return this._suEntries||this._constructSUEntries(t),this._suEntries}_rockRidgeFilename(t){let e=this.getSUEntries(t).filter(o=>o instanceof Rn);if(e.length===0||e[0].flags()&6)return null;let i="",n=this._getGetString();for(let o of e)if(i+=o.name(n),!(o.flags()&1))break;return i}_constructSUEntries(t){let e=33+this._data[32];e%2===1&&e++,e+=this._rockRidgeOffset,this._suEntries=ed(this._data,e,this.length(),t)}_getRockRidgeOffset(t){this._rockRidgeOffset=0;let e=this.getSUEntries(t);if(e.length>0){let i=e[0];if(i instanceof Fn&&i.checkBytesPass())for(let n=1;n<e.length;n++){let o=e[n];if(o instanceof Tn||o instanceof In&&o.extensionIdentifier()===zy)return i.bytesSkipped()}}return this._rockRidgeOffset=-1,-1}};u(_n,"DirectoryRecord");var vn=class extends _n{constructor(t,e){super(t,e)}_getString(t,e){return Pt(this._data,t,e)}_constructDirectory(t){return new la(this,t)}_getGetString(){return Pt}};u(vn,"ISODirectoryRecord");var En=class extends _n{constructor(t,e){super(t,e)}_getString(t,e){return du(this._data,t,e)}_constructDirectory(t){return new fa(this,t)}_getGetString(){return du}};u(En,"JolietDirectoryRecord");var yt=class{constructor(t){this._data=t}signatureWord(){return this._data.readUInt16BE(0)}signatureWordString(){return Pt(this._data,0,2)}length(){return this._data[2]}suVersion(){return this._data[3]}};u(yt,"SystemUseEntry");var Sn=class extends yt{constructor(e){super(e);this._entries=null}continuationLba(){return this._data.readUInt32LE(4)}continuationLbaOffset(){return this._data.readUInt32LE(12)}continuationLength(){return this._data.readUInt32LE(20)}getEntries(e){if(!this._entries){let i=this.continuationLba()*2048+this.continuationLbaOffset();this._entries=ed(e,i,this.continuationLength(),e)}return this._entries}};u(Sn,"CEEntry");var na=class extends yt{constructor(t){super(t)}};u(na,"PDEntry");var Fn=class extends yt{constructor(t){super(t)}checkBytesPass(){return this._data[4]===190&&this._data[5]===239}bytesSkipped(){return this._data[6]}};u(Fn,"SPEntry");var xn=class extends yt{constructor(t){super(t)}};u(xn,"STEntry");var In=class extends yt{constructor(t){super(t)}identifierLength(){return this._data[4]}descriptorLength(){return this._data[5]}sourceLength(){return this._data[6]}extensionVersion(){return this._data[7]}extensionIdentifier(){return Pt(this._data,8,this.identifierLength())}extensionDescriptor(){return Pt(this._data,8+this.identifierLength(),this.descriptorLength())}extensionSource(){return Pt(this._data,8+this.identifierLength()+this.descriptorLength(),this.sourceLength())}};u(In,"EREntry");var oa=class extends yt{constructor(t){super(t)}extensionSequence(){return this._data[4]}};u(oa,"ESEntry");var Tn=class extends yt{constructor(t){super(t)}};u(Tn,"RREntry");var An=class extends yt{constructor(t){super(t)}mode(){return this._data.readUInt32LE(4)}fileLinks(){return this._data.readUInt32LE(12)}uid(){return this._data.readUInt32LE(20)}gid(){return this._data.readUInt32LE(28)}inode(){return this._data.readUInt32LE(36)}};u(An,"PXEntry");var aa=class extends yt{constructor(t){super(t)}devTHigh(){return this._data.readUInt32LE(4)}devTLow(){return this._data.readUInt32LE(12)}};u(aa,"PNEntry");var zi=class extends yt{constructor(t){super(t)}flags(){return this._data[4]}continueFlag(){return this.flags()&1}componentRecords(){let t=new Array,e=5;for(;e<this.length();){let i=new sa(this._data.subarray(e));t.push(i),e+=i.length()}return t}};u(zi,"SLEntry");var sa=class{constructor(t){this._data=t}flags(){return this._data[0]}length(){return 2+this.componentLength()}componentLength(){return this._data[1]}content(t){return t(this._data,2,this.componentLength())}};u(sa,"SLComponentRecord");var Rn=class extends yt{constructor(t){super(t)}flags(){return this._data[4]}name(t){return t(this._data,5,this.length()-5)}};u(Rn,"NMEntry");var $i=class extends yt{constructor(t){super(t)}childDirectoryLba(){return this._data.readUInt32LE(4)}};u($i,"CLEntry");var ua=class extends yt{constructor(t){super(t)}parentDirectoryLba(){return this._data.readUInt32LE(4)}};u(ua,"PLEntry");var On=class extends yt{constructor(t){super(t)}};u(On,"REEntry");var Bn=class extends yt{constructor(t){super(t)}flags(){return this._data[4]}creation(){return this.flags()&1?this._longFormDates()?yr(this._data,5):_i(this._data,5):null}modify(){if(this.flags()&2){let t=this.flags()&1?1:0;return this._longFormDates()?yr(this._data,5+t*17):_i(this._data,5+t*7)}else return null}access(){if(this.flags()&4){let t=this.flags()&1?1:0;return t+=this.flags()&2?1:0,this._longFormDates()?yr(this._data,5+t*17):_i(this._data,5+t*7)}else return null}backup(){if(this.flags()&16){let t=this.flags()&1?1:0;return t+=this.flags()&2?1:0,t+=this.flags()&4?1:0,this._longFormDates()?yr(this._data,5+t*17):_i(this._data,5+t*7)}else return null}expiration(){if(this.flags()&32){let t=this.flags()&1?1:0;return t+=this.flags()&2?1:0,t+=this.flags()&4?1:0,t+=this.flags()&16?1:0,this._longFormDates()?yr(this._data,5+t*17):_i(this._data,5+t*7)}else return null}effective(){if(this.flags()&64){let t=this.flags()&1?1:0;return t+=this.flags()&2?1:0,t+=this.flags()&4?1:0,t+=this.flags()&16?1:0,t+=this.flags()&32?1:0,this._longFormDates()?yr(this._data,5+t*17):_i(this._data,5+t*7)}else return null}_longFormDates(){return!!this.flags()}};u(Bn,"TFEntry");var ca=class extends yt{constructor(t){super(t)}virtualSizeHigh(){return this._data.readUInt32LE(4)}virtualSizeLow(){return this._data.readUInt32LE(12)}tableDepth(){return this._data[20]}};u(ca,"SFEntry");var kn=class{constructor(t,e){this._fileList=[];this._fileMap={};this._record=t;let i=t.lba(),n=i+t.dataLength();for(t.fileFlags()&2||(i=t.getSUEntries(e).filter(a=>a instanceof $i)[0].childDirectoryLba()*2048,n=1/0);i<n;){if(e[i]===0){i++;continue}let a=this._constructDirectoryRecord(e.subarray(i)),l=a.fileName(e);l!=="\0"&&l!==""?(!a.hasRockRidge()||a.getSUEntries(e).filter(m=>m instanceof On).length===0)&&(this._fileMap[l]=a,this._fileList.push(l)):n===1/0&&(n=i+a.dataLength()),i+=a.length()}}getRecord(t){return this._fileMap[t]}getFileList(){return this._fileList}getDotEntry(t){return this._constructDirectoryRecord(t.subarray(this._record.lba()))}};u(kn,"Directory");var la=class extends kn{constructor(t,e){super(t,e)}_constructDirectoryRecord(t){return new vn(t,this._record.getRockRidgeOffset())}};u(la,"ISODirectory");var fa=class extends kn{constructor(t,e){super(t,e)}_constructDirectoryRecord(t){return new En(t,this._record.getRockRidgeOffset())}};u(fa,"JolietDirectory");var pu=class extends kt{constructor({data:e,name:i=""}){super();this._data=e;let n=!1,o=16*2048,a=new Array;for(;!n;){let l=e.subarray(o);switch(new bn(l).type()){case 1:a.push(new ra(l));break;case 2:a.push(new ia(l));break;case 255:n=!0;break}o+=2048}if(a.length===0)throw new T(5,"Unable to find a suitable volume descriptor.");a.forEach(l=>{(!this._pvd||this._pvd.type()!==2)&&(this._pvd=l)}),this._root=this._pvd.rootDirectoryEntry(e),this._name=i}static isAvailable(){return!0}get metadata(){let e=`IsoFS${this._name}${this._pvd?`-${this._pvd.name()}`:""}`;return this._root&&this._root.hasRockRidge()&&(e+="-RockRidge"),rt(Xe({},super.metadata),{name:e,synchronous:!0,readonly:!0,totalSpace:this._data.length})}statSync(e){let i=this._getDirectoryRecord(e);if(i===null)throw T.ENOENT(e);return this._getStats(e,i)}openSync(e,i,n){if(i.isWriteable())throw new T(1,e);let o=this._getDirectoryRecord(e);if(o){if(o.isSymlink(this._data))return this.openSync(qt(e,o.getSymlinkPath(this._data)),i,n);{let a=o.isDirectory(this._data)?void 0:o.getFile(this._data),l=this._getStats(e,o);switch(i.pathExistsAction()){case 1:case 2:throw T.EEXIST(e);case 0:return new er(this,e,i,l,a);default:throw new T(22,"Invalid FileMode object.")}}}else throw T.ENOENT(e)}readdirSync(e){let i=this._getDirectoryRecord(e);if(i){if(i.isDirectory(this._data))return i.getDirectory(this._data).getFileList().slice(0);throw T.ENOTDIR(e)}else throw T.ENOENT(e)}readFileSync(e,i,n){let o=this.openSync(e,n,420);try{let l=o.getBuffer();return i===null?ni(l):l.toString(i)}finally{o.closeSync()}}_getDirectoryRecord(e){if(e==="/")return this._root;let i=e.split("/").slice(1),n=this._root;for(let o of i)if(n.isDirectory(this._data)){if(n=n.getDirectory(this._data).getRecord(o),!n)return null}else return null;return n}_getStats(e,i){if(i.isSymlink(this._data)){let n=qt(e,i.getSymlinkPath(this._data)),o=this._getDirectoryRecord(n);return o?this._getStats(n,o):null}else{let n=i.dataLength(),o=365,a=i.recordingDate().getTime(),l=a,m=a,y=a;if(i.hasRockRidge()){let g=i.getSUEntries(this._data);for(let w of g)if(w instanceof An)o=w.mode();else if(w instanceof Bn){let v=w.flags();v&4&&(l=w.access().getTime()),v&2&&(m=w.modify().getTime()),v&1&&(y=w.creation().getTime())}}return o=o&365,new Me(i.isDirectory(this._data)?je.DIRECTORY:je.FILE,n,o,l,m,y)}}},Mr=pu;u(Mr,"IsoFS"),Mr.Name="IsoFS",Mr.Create=Je.bind(pu),Mr.Options={data:{type:"object",description:"The ISO file in a buffer",validator:qn}};var ha={AsyncMirror:Sr,Dropbox:xr,Emscripten:Ir,FileSystemAccess:Tr,FolderAdapter:rr,InMemory:Kt,IndexedDB:ur,IsoFS:Mr,Storage:cr,OverlayFS:lr,WorkerFS:Rr,HTTPRequest:dr,XMLHTTPRequest:dr,ZipFS:Qt};Oe&&void 0&&(void 0)();function Zy(r,t){ha[r]=t}u(Zy,"registerBackend");function rd(r,t=0,e=0){return qc(new Ye(t,e,t,e,t,e)),to.initialize(r)}u(rd,"initialize");function td(r){return C(this,null,function*(){("fs"in r||r instanceof Zr)&&(r={"/":r});for(let[t,e]of Object.entries(r))typeof e!="number"&&(t=t.toString(),!(e instanceof Zr)&&(typeof e=="string"&&(e={fs:e}),r[t]=yield id(e)));return rd(r)})}u(td,"_configure");function Wy(r,t){if(typeof t!="function")return td(r);td(r).then(()=>t()).catch(e=>t(e))}u(Wy,"configure");function mu(e){return C(this,arguments,function*({fs:r,options:t={}}){if(!r)throw new T(1,'Missing "fs" property on configuration object.');if(typeof t!="object"||t===null)throw new T(22,'Invalid "options" property on configuration object.');let i=Object.keys(t).filter(o=>o!="fs");for(let o of i){let a=t[o];if(a===null||typeof a!="object"||!("fs"in a))continue;let l=yield mu(a);t[o]=l}let n=ha[r];if(n)return n.Create(t);throw new T(1,`File system ${r} is not available in BrowserFS.`)})}u(mu,"_getFileSystem");function id(r,t){if(typeof t!="function")return mu(r);mu(r).then(e=>t(null,e)).catch(e=>t(e))}u(id,"getFileSystem");var Hy=to;return hd(qy);})();
/*! Bundled license information:
@jspm/core/nodelibs/browser/buffer.js:
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
@jspm/core/nodelibs/browser/chunk-44e51b61.js:
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
@jspm/core/nodelibs/browser/assert.js:
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*)
*/