@loaders.gl/tile-converter 4.0.0-alpha.21 → 4.0.0-alpha.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/converter.min.js +112 -112
- package/dist/dist.min.js +856 -195
- package/dist/es5/deps-installer/deps-installer.js +1 -1
- package/dist/es5/i3s-converter/helpers/load-3d-tiles.js +70 -4
- package/dist/es5/i3s-converter/helpers/load-3d-tiles.js.map +1 -1
- package/dist/es5/i3s-converter/i3s-converter.js +34 -32
- package/dist/es5/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/es5/pgm-loader.js +1 -1
- package/dist/esm/deps-installer/deps-installer.js +1 -1
- package/dist/esm/i3s-converter/helpers/load-3d-tiles.js +33 -4
- package/dist/esm/i3s-converter/helpers/load-3d-tiles.js.map +1 -1
- package/dist/esm/i3s-converter/i3s-converter.js +7 -5
- package/dist/esm/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/esm/i3s-server/bin/i3s-server.min.js +1 -1
- package/dist/esm/pgm-loader.js +1 -1
- package/dist/i3s-converter/helpers/load-3d-tiles.d.ts +15 -0
- package/dist/i3s-converter/helpers/load-3d-tiles.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/load-3d-tiles.js +51 -5
- package/dist/i3s-converter/i3s-converter.d.ts.map +1 -1
- package/dist/i3s-converter/i3s-converter.js +6 -4
- package/dist/slpk-extractor.min.js +1 -1
- package/package.json +14 -14
- package/src/i3s-converter/helpers/load-3d-tiles.ts +61 -5
- package/src/i3s-converter/i3s-converter.ts +12 -5
|
@@ -91,7 +91,7 @@ caused by: `+Vr.fullStack(r):e.stack};Vr.errorFromList=function(e){return Na.arr
|
|
|
91
91
|
`,t(o),t(n.body),t(`\r
|
|
92
92
|
`)}),t("--"+a.boundary+"--"),a.request.postambleCRLF&&t(`\r
|
|
93
93
|
`),i};Tc.prototype.onRequest=function(e){var r=this,a=r.isChunked(e),i=e.data||e;r.setHeaders(a),r.chunked=a,r.body=r.build(i,a)};K5.Multipart=Tc});var Q5=O(Z5=>{"use strict";var Y5=require("url"),NL=/^https?:/;function up(e){this.request=e,this.followRedirect=!0,this.followRedirects=!0,this.followAllRedirects=!1,this.followOriginalHttpMethod=!1,this.allowRedirect=function(){return!0},this.maxRedirects=10,this.redirects=[],this.redirectsFollowed=0,this.removeRefererHeader=!1}up.prototype.onRequest=function(e){var r=this;e.maxRedirects!==void 0&&(r.maxRedirects=e.maxRedirects),typeof e.followRedirect=="function"&&(r.allowRedirect=e.followRedirect),e.followRedirect!==void 0&&(r.followRedirects=!!e.followRedirect),e.followAllRedirects!==void 0&&(r.followAllRedirects=e.followAllRedirects),(r.followRedirects||r.followAllRedirects)&&(r.redirects=r.redirects||[]),e.removeRefererHeader!==void 0&&(r.removeRefererHeader=e.removeRefererHeader),e.followOriginalHttpMethod!==void 0&&(r.followOriginalHttpMethod=e.followOriginalHttpMethod)};up.prototype.redirectTo=function(e){var r=this,a=r.request,i=null;if(e.statusCode>=300&&e.statusCode<400&&e.caseless.has("location")){var t=e.caseless.get("location");if(a.debug("redirect",t),r.followAllRedirects)i=t;else if(r.followRedirects)switch(a.method){case"PATCH":case"PUT":case"POST":case"DELETE":break;default:i=t;break}}else if(e.statusCode===401){var n=a._auth.onResponse(e);n&&(a.setHeader("authorization",n),i=a.uri)}return i};up.prototype.onResponse=function(e){var r=this,a=r.request,i=r.redirectTo(e);if(!i||!r.allowRedirect.call(a,e))return!1;if(a.debug("redirect to",i),e.resume&&e.resume(),r.redirectsFollowed>=r.maxRedirects)return a.emit("error",new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+a.uri.href)),!1;r.redirectsFollowed+=1,NL.test(i)||(i=Y5.resolve(a.uri.href,i));var t=a.uri;return a.uri=Y5.parse(i),a.uri.protocol!==t.protocol&&delete a.agent,r.redirects.push({statusCode:e.statusCode,redirectUri:i}),r.followAllRedirects&&a.method!=="HEAD"&&e.statusCode!==401&&e.statusCode!==307&&(a.method=r.followOriginalHttpMethod?a.method:"GET"),delete a.src,delete a.req,delete a._started,e.statusCode!==401&&e.statusCode!==307&&(delete a.body,delete a._form,a.headers&&(a.removeHeader("host"),a.removeHeader("content-type"),a.removeHeader("content-length"),a.uri.hostname!==a.originalHost.split(":")[0]&&a.removeHeader("authorization"))),r.removeRefererHeader||a.setHeader("referer",t.href),a.emit("redirect"),a.init(),!0};Z5.Redirect=up});var r8=O(iu=>{"use strict";var nY=require("net"),ML=require("tls"),n0=require("http"),X5=require("https"),HL=require("events"),VL=require("assert"),$L=require("util"),WL=Ps().Buffer;iu.httpOverHttp=KL;iu.httpsOverHttp=GL;iu.httpOverHttps=YL;iu.httpsOverHttps=ZL;function KL(e){var r=new sn(e);return r.request=n0.request,r}function GL(e){var r=new sn(e);return r.request=n0.request,r.createSocket=J5,r.defaultPort=443,r}function YL(e){var r=new sn(e);return r.request=X5.request,r}function ZL(e){var r=new sn(e);return r.request=X5.request,r.createSocket=J5,r.defaultPort=443,r}function sn(e){var r=this;r.options=e||{},r.proxyOptions=r.options.proxy||{},r.maxSockets=r.options.maxSockets||n0.Agent.defaultMaxSockets,r.requests=[],r.sockets=[],r.on("free",function(i,t,n){for(var o=0,s=r.requests.length;o<s;++o){var c=r.requests[o];if(c.host===t&&c.port===n){r.requests.splice(o,1),c.request.onSocket(i);return}}i.destroy(),r.removeSocket(i)})}$L.inherits(sn,HL.EventEmitter);sn.prototype.addRequest=function(r,a){var i=this;if(typeof a=="string"&&(a={host:a,port:arguments[2],path:arguments[3]}),i.sockets.length>=this.maxSockets){i.requests.push({host:a.host,port:a.port,request:r});return}i.createConnection({host:a.host,port:a.port,request:r})};sn.prototype.createConnection=function(r){var a=this;a.createSocket(r,function(i){i.on("free",t),i.on("close",n),i.on("agentRemove",n),r.request.onSocket(i);function t(){a.emit("free",i,r.host,r.port)}function n(o){a.removeSocket(i),i.removeListener("free",t),i.removeListener("close",n),i.removeListener("agentRemove",n)}})};sn.prototype.createSocket=function(r,a){var i=this,t={};i.sockets.push(t);var n=e8({},i.proxyOptions,{method:"CONNECT",path:r.host+":"+r.port,agent:!1});n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+WL.from(n.proxyAuth).toString("base64")),Xo("making CONNECT request");var o=i.request(n);o.useChunkedEncodingByDefault=!1,o.once("response",s),o.once("upgrade",c),o.once("connect",l),o.once("error",f),o.end();function s(v){v.upgrade=!0}function c(v,h,d){process.nextTick(function(){l(v,h,d)})}function l(v,h,d){if(o.removeAllListeners(),h.removeAllListeners(),v.statusCode===200)VL.equal(d.length,0),Xo("tunneling connection has established"),i.sockets[i.sockets.indexOf(t)]=h,a(h);else{Xo("tunneling socket could not be established, statusCode=%d",v.statusCode);var y=new Error("tunneling socket could not be established, statusCode="+v.statusCode);y.code="ECONNRESET",r.request.emit("error",y),i.removeSocket(t)}}function f(v){o.removeAllListeners(),Xo(`tunneling socket could not be established, cause=%s
|
|
94
|
-
`,v.message,v.stack);var h=new Error("tunneling socket could not be established, cause="+v.message);h.code="ECONNRESET",r.request.emit("error",h),i.removeSocket(t)}};sn.prototype.removeSocket=function(r){var a=this.sockets.indexOf(r);if(a!==-1){this.sockets.splice(a,1);var i=this.requests.shift();i&&this.createConnection(i)}};function J5(e,r){var a=this;sn.prototype.createSocket.call(a,e,function(i){var t=ML.connect(0,e8({},a.options,{servername:e.host,socket:i}));a.sockets[a.sockets.indexOf(i)]=t,r(t)})}function e8(e){for(var r=1,a=arguments.length;r<a;++r){var i=arguments[r];if(typeof i=="object")for(var t=Object.keys(i),n=0,o=t.length;n<o;++n){var s=t[n];i[s]!==void 0&&(e[s]=i[s])}}return e}var Xo;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Xo=function(){var e=Array.prototype.slice.call(arguments);typeof e[0]=="string"?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:Xo=function(){};iu.debug=Xo});var n8=O(i8=>{"use strict";var QL=require("url"),XL=r8(),a8=["accept","accept-charset","accept-encoding","accept-language","accept-ranges","cache-control","content-encoding","content-language","content-location","content-md5","content-range","content-type","connection","date","expect","max-forwards","pragma","referer","te","user-agent","via"],t8=["proxy-authorization"];function JL(e){var r=e.port,a=e.protocol,i=e.hostname+":";return r?i+=r:a==="https:"?i+="443":i+="80",i}function eU(e,r){var a=r.reduce(function(i,t){return i[t.toLowerCase()]=!0,i},{});return Object.keys(e).filter(function(i){return a[i.toLowerCase()]}).reduce(function(i,t){return i[t]=e[t],i},{})}function rU(e,r){var a=e.proxy,i={proxy:{host:a.hostname,port:+a.port,proxyAuth:a.auth,headers:r},headers:e.headers,ca:e.ca,cert:e.cert,key:e.key,passphrase:e.passphrase,pfx:e.pfx,ciphers:e.ciphers,rejectUnauthorized:e.rejectUnauthorized,secureOptions:e.secureOptions,secureProtocol:e.secureProtocol};return i}function aU(e,r){var a=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[a,i].join("Over")}function tU(e){var r=e.uri,a=e.proxy,i=aU(r,a);return XL[i]}function Cc(e){this.request=e,this.proxyHeaderWhiteList=a8,this.proxyHeaderExclusiveList=[],typeof e.tunnel!="undefined"&&(this.tunnelOverride=e.tunnel)}Cc.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride!="undefined"?e.tunnelOverride:r.uri.protocol==="https:"};Cc.prototype.setup=function(e){var r=this,a=r.request;if(e=e||{},typeof a.proxy=="string"&&(a.proxy=QL.parse(a.proxy)),!a.proxy||!a.tunnel)return!1;e.proxyHeaderWhiteList&&(r.proxyHeaderWhiteList=e.proxyHeaderWhiteList),e.proxyHeaderExclusiveList&&(r.proxyHeaderExclusiveList=e.proxyHeaderExclusiveList);var i=r.proxyHeaderExclusiveList.concat(t8),t=r.proxyHeaderWhiteList.concat(i),n=eU(a.headers,t);n.host=JL(a.uri),i.forEach(a.removeHeader,a);var o=tU(a),s=rU(a,n);return a.agent=o(s),!0};Cc.defaultProxyHeaderWhiteList=a8;Cc.defaultProxyHeaderExclusiveList=t8;i8.Tunnel=Cc});var s8=O((o8,Fc)=>{(function(){var e,r,a,i,t,n;typeof performance!="undefined"&&performance!==null&&performance.now?Fc.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(Fc.exports=function(){return(e()-t)/1e6},r=process.hrtime,e=function(){var o;return o=r(),o[0]*1e9+o[1]},i=e(),n=process.uptime()*1e9,t=i-n):Date.now?(Fc.exports=function(){return Date.now()-a},a=Date.now()):(Fc.exports=function(){return new Date().getTime()-a},a=new Date().getTime())}).call(o8)});var b8=O((uY,g8)=>{"use strict";var iU=require("http"),u8=require("https"),qc=require("url"),o0=require("util"),cp=require("stream"),lp=require("zlib"),s0=Kw(),nU=t2(),oU=K_(),sU=Rf(),c8=Of(),l8=a3(),uU=C3(),cU=Bl(),f8=_v(),lU=O3().strict,nu=Dl(),fU=Id(),pU=L3(),hU=Q3().Querystring,dU=S5().Har,mU=I5().Auth,vU=$5().OAuth,gU=W5(),bU=G5().Multipart,yU=Q5().Redirect,u0=n8().Tunnel,ou=s8(),Bc=Ps().Buffer,p8=nu.safeStringify,xU=nu.isReadStream,wU=nu.toBase64,kU=nu.defer,h8=nu.copy,_U=nu.version,d8=fU.jar(),m8={};function jU(e,r){var a={};for(var i in r){var t=e.indexOf(i)===-1;t&&(a[i]=r[i])}return a}function SU(e,r){var a={};for(var i in r){var t=e.indexOf(i)!==-1,n=typeof r[i]=="function";t&&n||(a[i]=r[i])}return a}function v8(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function EU(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:v8.call(e.request)}}function Rr(e){var r=this;e.har&&(r._har=new dU(r),e=r._har.options(e)),cp.Stream.call(r);var a=Object.keys(Rr.prototype),i=jU(a,e);cU(r,i),e=SU(a,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new hU(r),r._auth=new mU(r),r._oauth=new vU(r),r._multipart=new bU(r),r._redirect=new yU(r),r._tunnel=new u0(r),r.init(e)}o0.inherits(Rr,cp.Stream);Rr.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function ot(){Rr.debug&&console.error("REQUEST %s",o0.format.apply(o0,arguments))}Rr.prototype.debug=ot;Rr.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?h8(r.headers):{};for(var a in r.headers)typeof r.headers[a]=="undefined"&&delete r.headers[a];if(c8.httpify(r,r.headers),r.method||(r.method=e.method||"GET"),r.localAddress||(r.localAddress=e.localAddress),r._qs.init(e),ot(e),!r.pool&&r.pool!==!1&&(r.pool=m8),r.dests=r.dests||[],r.__isRequestRequest=!0,!r._callback&&r.callback&&(r._callback=r.callback,r.callback=function(){r._callbackCalled||(r._callbackCalled=!0,r._callback.apply(r,arguments))},r.on("error",r.callback.bind()),r.on("complete",r.callback.bind(r,null))),!r.uri&&r.url&&(r.uri=r.url,delete r.url),r.baseUrl){if(typeof r.baseUrl!="string")return r.emit("error",new Error("options.baseUrl must be a string"));if(typeof r.uri!="string")return r.emit("error",new Error("options.uri must be a string when using options.baseUrl"));if(r.uri.indexOf("//")===0||r.uri.indexOf("://")!==-1)return r.emit("error",new Error("options.uri must be a path when using options.baseUrl"));var i=r.baseUrl.lastIndexOf("/")===r.baseUrl.length-1,t=r.uri.indexOf("/")===0;i&&t?r.uri=r.baseUrl+r.uri.slice(1):i||t?r.uri=r.baseUrl+r.uri:r.uri===""?r.uri=r.baseUrl:r.uri=r.baseUrl+"/"+r.uri,delete r.baseUrl}if(!r.uri)return r.emit("error",new Error("options.uri is a required argument"));if(typeof r.uri=="string"&&(r.uri=qc.parse(r.uri)),r.uri.href||(r.uri.href=qc.format(r.uri)),r.uri.protocol==="unix:")return r.emit("error",new Error("`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`"));if(r.uri.host==="unix"&&r.enableUnixSocket(),r.strictSSL===!1&&(r.rejectUnauthorized=!1),r.uri.pathname||(r.uri.pathname="/"),!(r.uri.host||r.uri.hostname&&r.uri.port)&&!r.uri.isUnix){var n=qc.format(r.uri),o='Invalid URI "'+n+'"';return Object.keys(e).length===0&&(o+=". This can be caused by a crappy redirection."),r.abort(),r.emit("error",new Error(o))}if(r.hasOwnProperty("proxy")||(r.proxy=pU(r.uri)),r.tunnel=r._tunnel.isEnabled(),r.proxy&&r._tunnel.setup(e),r._redirect.onRequest(e),r.setHost=!1,!r.hasHeader("host")){var s=r.originalHostHeaderName||"host";r.setHeader(s,r.uri.host),r.uri.port&&(r.uri.port==="80"&&r.uri.protocol==="http:"||r.uri.port==="443"&&r.uri.protocol==="https:")&&r.setHeader(s,r.uri.hostname),r.setHost=!0}if(r.jar(r._jar||e.jar),r.uri.port||(r.uri.protocol==="http:"?r.uri.port=80:r.uri.protocol==="https:"&&(r.uri.port=443)),r.proxy&&!r.tunnel?(r.port=r.proxy.port,r.host=r.proxy.hostname):(r.port=r.uri.port,r.host=r.uri.hostname),e.form&&r.form(e.form),e.formData){var c=e.formData,l=r.form(),f=function(R,z){z&&z.hasOwnProperty("value")&&z.hasOwnProperty("options")?l.append(R,z.value,z.options):l.append(R,z)};for(var v in c)if(c.hasOwnProperty(v)){var h=c[v];if(h instanceof Array)for(var d=0;d<h.length;d++)f(v,h[d]);else f(v,h)}}if(e.qs&&r.qs(e.qs),r.uri.path?r.path=r.uri.path:r.path=r.uri.pathname+(r.uri.search||""),r.path.length===0&&(r.path="/"),e.aws&&r.aws(e.aws),e.hawk&&r.hawk(e.hawk),e.httpSignature&&r.httpSignature(e.httpSignature),e.auth&&(Object.prototype.hasOwnProperty.call(e.auth,"username")&&(e.auth.user=e.auth.username),Object.prototype.hasOwnProperty.call(e.auth,"password")&&(e.auth.pass=e.auth.password),r.auth(e.auth.user,e.auth.pass,e.auth.sendImmediately,e.auth.bearer)),r.gzip&&!r.hasHeader("accept-encoding")&&r.setHeader("accept-encoding","gzip, deflate"),r.uri.auth&&!r.hasHeader("authorization")){var y=r.uri.auth.split(":").map(function(R){return r._qs.unescape(R)});r.auth(y[0],y.slice(1).join(":"),!0)}if(!r.tunnel&&r.proxy&&r.proxy.auth&&!r.hasHeader("proxy-authorization")){var j=r.proxy.auth.split(":").map(function(R){return r._qs.unescape(R)}),w="Basic "+wU(j.join(":"));r.setHeader("proxy-authorization",w)}r.proxy&&!r.tunnel&&(r.path=r.uri.protocol+"//"+r.uri.host+r.path),e.json&&r.json(e.json),e.multipart&&r.multipart(e.multipart),e.time&&(r.timing=!0,r.elapsedTime=r.elapsedTime||0);function A(){if(lU(r.body)&&(r.body=Bc.from(r.body)),!r.hasHeader("content-length")){var R;typeof r.body=="string"?R=Bc.byteLength(r.body):Array.isArray(r.body)?R=r.body.reduce(function(z,U){return z+U.length},0):R=r.body.length,R?r.setHeader("content-length",R):r.emit("error",new Error("Argument error, options.body."))}}r.body&&!f8(r.body)&&A(),e.oauth?r.oauth(e.oauth):r._oauth.params&&r.hasHeader("authorization")&&r.oauth(r._oauth.params);var P=r.proxy&&!r.tunnel?r.proxy.protocol:r.uri.protocol,T={"http:":iU,"https:":u8},I=r.httpModules||{};if(r.httpModule=I[P]||T[P],!r.httpModule)return r.emit("error",new Error("Invalid protocol: "+P));if(e.ca&&(r.ca=e.ca),!r.agent)if(e.agentOptions&&(r.agentOptions=e.agentOptions),e.agentClass)r.agentClass=e.agentClass;else if(e.forever){var F=_U();F.major===0&&F.minor<=10?r.agentClass=P==="http:"?l8:l8.SSL:(r.agentClass=r.httpModule.Agent,r.agentOptions=r.agentOptions||{},r.agentOptions.keepAlive=!0)}else r.agentClass=r.httpModule.Agent;r.pool===!1?r.agent=!1:r.agent=r.agent||r.getNewAgent(),r.on("pipe",function(R){if(r.ntick&&r._started&&r.emit("error",new Error("You cannot pipe to this stream after the outbound request has started.")),r.src=R,xU(R))r.hasHeader("content-type")||r.setHeader("content-type",sU.lookup(R.path));else{if(R.headers)for(var z in R.headers)r.hasHeader(z)||r.setHeader(z,R.headers[z]);r._json&&!r.hasHeader("content-type")&&r.setHeader("content-type","application/json"),R.method&&!r.explicitMethod&&(r.method=R.method)}}),kU(function(){if(!r._aborted){var R=function(){if(r._form&&(r._auth.hasAuth?r._auth.hasAuth&&r._auth.sentAuth&&r._form.pipe(r):r._form.pipe(r)),r._multipart&&r._multipart.chunked&&r._multipart.body.pipe(r),r.body)f8(r.body)?r.body.pipe(r):(A(),Array.isArray(r.body)?r.body.forEach(function(z){r.write(z)}):r.write(r.body),r.end());else if(r.requestBodyStream)console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe."),r.requestBodyStream.pipe(r);else if(!r.src){if(r._auth.hasAuth&&!r._auth.sentAuth){r.end();return}r.method!=="GET"&&typeof r.method!="undefined"&&r.setHeader("content-length",0),r.end()}};r._form&&!r.hasHeader("content-length")?(r.setHeader(r._form.getHeaders(),!0),r._form.getLength(function(z,U){!z&&!isNaN(U)&&r.setHeader("content-length",U),R()})):R(),r.ntick=!0}})};Rr.prototype.getNewAgent=function(){var e=this,r=e.agentClass,a={};if(e.agentOptions)for(var i in e.agentOptions)a[i]=e.agentOptions[i];e.ca&&(a.ca=e.ca),e.ciphers&&(a.ciphers=e.ciphers),e.secureProtocol&&(a.secureProtocol=e.secureProtocol),e.secureOptions&&(a.secureOptions=e.secureOptions),typeof e.rejectUnauthorized!="undefined"&&(a.rejectUnauthorized=e.rejectUnauthorized),e.cert&&e.key&&(a.key=e.key,a.cert=e.cert),e.pfx&&(a.pfx=e.pfx),e.passphrase&&(a.passphrase=e.passphrase);var t="";r!==e.httpModule.Agent&&(t+=r.name);var n=e.proxy;typeof n=="string"&&(n=qc.parse(n));var o=n&&n.protocol==="https:"||this.uri.protocol==="https:";return o&&(a.ca&&(t&&(t+=":"),t+=a.ca),typeof a.rejectUnauthorized!="undefined"&&(t&&(t+=":"),t+=a.rejectUnauthorized),a.cert&&(t&&(t+=":"),t+=a.cert.toString("ascii")+a.key.toString("ascii")),a.pfx&&(t&&(t+=":"),t+=a.pfx.toString("ascii")),a.ciphers&&(t&&(t+=":"),t+=a.ciphers),a.secureProtocol&&(t&&(t+=":"),t+=a.secureProtocol),a.secureOptions&&(t&&(t+=":"),t+=a.secureOptions)),e.pool===m8&&!t&&Object.keys(a).length===0&&e.httpModule.globalAgent?e.httpModule.globalAgent:(t=e.uri.protocol+t,e.pool[t]||(e.pool[t]=new r(a),e.pool.maxSockets&&(e.pool[t].maxSockets=e.pool.maxSockets)),e.pool[t])};Rr.prototype.start=function(){var e=this;if(e.timing)var r=new Date().getTime(),a=ou();if(!e._aborted){e._started=!0,e.method=e.method||"GET",e.href=e.uri.href,e.src&&e.src.stat&&e.src.stat.size&&!e.hasHeader("content-length")&&e.setHeader("content-length",e.src.stat.size),e._aws&&e.aws(e._aws,!0);var i=h8(e);delete i.auth,ot("make request",e.uri.href),delete i.timeout;try{e.req=e.httpModule.request(i)}catch(n){e.emit("error",n);return}e.timing&&(e.startTime=r,e.startTimeNow=a,e.timings={});var t;e.timeout&&!e.timeoutTimer&&(e.timeout<0?t=0:typeof e.timeout=="number"&&isFinite(e.timeout)&&(t=e.timeout)),e.req.on("response",e.onRequestResponse.bind(e)),e.req.on("error",e.onRequestError.bind(e)),e.req.on("drain",function(){e.emit("drain")}),e.req.on("socket",function(n){var o=n._connecting||n.connecting;if(e.timing&&(e.timings.socket=ou()-e.startTimeNow,o)){var s=function(){e.timings.lookup=ou()-e.startTimeNow},c=function(){e.timings.connect=ou()-e.startTimeNow};n.once("lookup",s),n.once("connect",c),e.req.once("error",function(){n.removeListener("lookup",s),n.removeListener("connect",c)})}var l=function(){e.req.setTimeout(t,function(){if(e.req){e.abort();var v=new Error("ESOCKETTIMEDOUT");v.code="ESOCKETTIMEDOUT",v.connect=!1,e.emit("error",v)}})};if(t!==void 0)if(o){var f=function(){n.removeListener("connect",f),e.clearTimeout(),l()};n.on("connect",f),e.req.on("error",function(v){n.removeListener("connect",f)}),e.timeoutTimer=setTimeout(function(){n.removeListener("connect",f),e.abort();var v=new Error("ETIMEDOUT");v.code="ETIMEDOUT",v.connect=!0,e.emit("error",v)},t)}else l();e.emit("socket",n)}),e.emit("request",e.req)}};Rr.prototype.onRequestError=function(e){var r=this;if(!r._aborted){if(r.req&&r.req._reusedSocket&&e.code==="ECONNRESET"&&r.agent.addRequestNoreuse){r.agent={addRequest:r.agent.addRequestNoreuse.bind(r.agent)},r.start(),r.req.end();return}r.clearTimeout(),r.emit("error",e)}};Rr.prototype.onRequestResponse=function(e){var r=this;if(r.timing&&(r.timings.response=ou()-r.startTimeNow),ot("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=ou()-r.startTimeNow,e.timingStart=r.startTime,r.timings.socket||(r.timings.socket=0),r.timings.lookup||(r.timings.lookup=r.timings.socket),r.timings.connect||(r.timings.connect=r.timings.lookup),r.timings.response||(r.timings.response=r.timings.connect),ot("elapsed time",r.timings.end),r.elapsedTime+=Math.round(r.timings.end),e.elapsedTime=r.elapsedTime,e.timings=r.timings,e.timingPhases={wait:r.timings.socket,dns:r.timings.lookup-r.timings.socket,tcp:r.timings.connect-r.timings.lookup,firstByte:r.timings.response-r.timings.connect,download:r.timings.end-r.timings.response,total:r.timings.end}),ot("response end",r.uri.href,e.statusCode,e.headers)}),r._aborted){ot("aborted",r.uri.href),e.resume();return}if(r.response=e,e.request=r,e.toJSON=EU,r.httpModule===u8&&r.strictSSL&&(!e.hasOwnProperty("socket")||!e.socket.authorized)){ot("strict ssl error",r.uri.href);var a=e.hasOwnProperty("socket")?e.socket.authorizationError:r.uri.href+" does not support SSL";r.emit("error",new Error("SSL Error: "+a));return}r.originalHost=r.getHeader("host"),r.originalHostHeaderName||(r.originalHostHeaderName=r.hasHeader("host")),r.setHost&&r.removeHeader("host"),r.clearTimeout();var i=r._jar&&r._jar.setCookie?r._jar:d8,t=function(f){try{i.setCookie(f,r.uri.href,{ignoreError:!0})}catch(v){r.emit("error",v)}};if(e.caseless=c8(e.headers),e.caseless.has("set-cookie")&&!r._disableCookies){var n=e.caseless.has("set-cookie");Array.isArray(e.headers[n])?e.headers[n].forEach(t):t(e.headers[n])}if(!r._redirect.onResponse(e)){{e.on("close",function(){r._ended||r.response.emit("end")}),e.once("end",function(){r._ended=!0});var o=function(f){return r.method==="HEAD"||f>=100&&f<200||f===204||f===304},s;if(r.gzip&&!o(e.statusCode)){var c=e.headers["content-encoding"]||"identity";c=c.trim().toLowerCase();var l={flush:lp.Z_SYNC_FLUSH,finishFlush:lp.Z_SYNC_FLUSH};c==="gzip"?(s=lp.createGunzip(l),e.pipe(s)):c==="deflate"?(s=lp.createInflate(l),e.pipe(s)):(c!=="identity"&&ot("ignoring unrecognized Content-Encoding "+c),s=e)}else s=e;r.encoding&&(r.dests.length!==0?console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid."):s.setEncoding(r.encoding)),r._paused&&s.pause(),r.responseContent=s,r.emit("response",e),r.dests.forEach(function(f){r.pipeDest(f)}),s.on("data",function(f){r.timing&&!r.responseStarted&&(r.responseStartTime=new Date().getTime(),e.responseStartTime=r.responseStartTime),r._destdata=!0,r.emit("data",f)}),s.once("end",function(f){r.emit("end",f)}),s.on("error",function(f){r.emit("error",f)}),s.on("close",function(){r.emit("close")}),r.callback?r.readResponseBody(e):r.on("end",function(){if(r._aborted){ot("aborted",r.uri.href);return}r.emit("complete",e)})}ot("finish init function",r.uri.href)}};Rr.prototype.readResponseBody=function(e){var r=this;ot("reading response's body");var a=[],i=0,t=[];r.on("data",function(n){Bc.isBuffer(n)?n.length&&(i+=n.length,a.push(n)):t.push(n)}),r.on("end",function(){if(ot("end event",r.uri.href),r._aborted){ot("aborted",r.uri.href),a=[],i=0;return}if(i?(ot("has body",r.uri.href,i),e.body=Bc.concat(a,i),r.encoding!==null&&(e.body=e.body.toString(r.encoding)),a=[],i=0):t.length&&(r.encoding==="utf8"&&t[0].length>0&&t[0][0]==="\uFEFF"&&(t[0]=t[0].substring(1)),e.body=t.join("")),r._json)try{e.body=JSON.parse(e.body,r._jsonReviver)}catch{ot("invalid JSON received",r.uri.href)}ot("emitting complete",r.uri.href),typeof e.body=="undefined"&&!r._json&&(e.body=r.encoding===null?Bc.alloc(0):""),r.emit("complete",e,e.body)})};Rr.prototype.abort=function(){var e=this;e._aborted=!0,e.req?e.req.abort():e.response&&e.response.destroy(),e.clearTimeout(),e.emit("abort")};Rr.prototype.pipeDest=function(e){var r=this,a=r.response;if(e.headers&&!e.headersSent){if(a.caseless.has("content-type")){var i=a.caseless.has("content-type");e.setHeader?e.setHeader(i,a.headers[i]):e.headers[i]=a.headers[i]}if(a.caseless.has("content-length")){var t=a.caseless.has("content-length");e.setHeader?e.setHeader(t,a.headers[t]):e.headers[t]=a.headers[t]}}if(e.setHeader&&!e.headersSent){for(var n in a.headers)(!r.gzip||n!=="content-encoding")&&e.setHeader(n,a.headers[n]);e.statusCode=a.statusCode}r.pipefilter&&r.pipefilter(a,e)};Rr.prototype.qs=function(e,r){var a=this,i;!r&&a.uri.query?i=a._qs.parse(a.uri.query):i={};for(var t in e)i[t]=e[t];var n=a._qs.stringify(i);return n===""||(a.uri=qc.parse(a.uri.href.split("?")[0]+"?"+n),a.url=a.uri,a.path=a.uri.path,a.uri.host==="unix"&&a.enableUnixSocket()),a};Rr.prototype.form=function(e){var r=this;return e?(/^application\/x-www-form-urlencoded\b/.test(r.getHeader("content-type"))||r.setHeader("content-type","application/x-www-form-urlencoded"),r.body=typeof e=="string"?r._qs.rfc3986(e.toString("utf8")):r._qs.stringify(e).toString("utf8"),r):(r._form=new uU,r._form.on("error",function(a){a.message="form-data: "+a.message,r.emit("error",a),r.abort()}),r._form)};Rr.prototype.multipart=function(e){var r=this;return r._multipart.onRequest(e),r._multipart.chunked||(r.body=r._multipart.body),r};Rr.prototype.json=function(e){var r=this;return r.hasHeader("accept")||r.setHeader("accept","application/json"),typeof r.jsonReplacer=="function"&&(r._jsonReplacer=r.jsonReplacer),r._json=!0,typeof e=="boolean"?r.body!==void 0&&(/^application\/x-www-form-urlencoded\b/.test(r.getHeader("content-type"))?r.body=r._qs.rfc3986(r.body):r.body=p8(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=p8(e,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")),typeof r.jsonReviver=="function"&&(r._jsonReviver=r.jsonReviver),r};Rr.prototype.getHeader=function(e,r){var a=this,i,t,n;return r||(r=a.headers),Object.keys(r).forEach(function(o){o.length===e.length&&(t=new RegExp(e,"i"),n=o.match(t),n&&(i=r[o]))}),i};Rr.prototype.enableUnixSocket=function(){var e=this.uri.path.split(":"),r=e[0],a=e[1];this.socketPath=r,this.uri.pathname=a,this.uri.path=a,this.uri.host=r,this.uri.hostname=r,this.uri.isUnix=!0};Rr.prototype.auth=function(e,r,a,i){var t=this;return t._auth.onRequest(e,r,a,i),t};Rr.prototype.aws=function(e,r){var a=this;if(!r)return a._aws=e,a;if(e.sign_version===4||e.sign_version==="4"){var i={host:a.uri.host,path:a.uri.path,method:a.method,headers:a.headers,body:a.body};e.service&&(i.service=e.service);var t=nU.sign(i,{accessKeyId:e.key,secretAccessKey:e.secret,sessionToken:e.session});a.setHeader("authorization",t.headers.Authorization),a.setHeader("x-amz-date",t.headers["X-Amz-Date"]),t.headers["X-Amz-Security-Token"]&&a.setHeader("x-amz-security-token",t.headers["X-Amz-Security-Token"])}else{var n=new Date;a.setHeader("date",n.toUTCString());var o={key:e.key,secret:e.secret,verb:a.method.toUpperCase(),date:n,contentType:a.getHeader("content-type")||"",md5:a.getHeader("content-md5")||"",amazonHeaders:s0.canonicalizeHeaders(a.headers)},s=a.uri.path;e.bucket&&s?o.resource="/"+e.bucket+s:e.bucket&&!s?o.resource="/"+e.bucket:!e.bucket&&s?o.resource=s:!e.bucket&&!s&&(o.resource="/"),o.resource=s0.canonicalizeResource(o.resource),a.setHeader("authorization",s0.authorization(o))}return a};Rr.prototype.httpSignature=function(e){var r=this;return oU.signRequest({getHeader:function(a){return r.getHeader(a,r.headers)},setHeader:function(a,i){r.setHeader(a,i)},method:r.method,path:r.path},e),ot("httpSignature authorization",r.getHeader("authorization")),r};Rr.prototype.hawk=function(e){var r=this;r.setHeader("Authorization",gU.header(r.uri,r.method,e))};Rr.prototype.oauth=function(e){var r=this;return r._oauth.onRequest(e),r};Rr.prototype.jar=function(e){var r=this,a;if(r._redirect.redirectsFollowed===0&&(r.originalCookieHeader=r.getHeader("cookie")),!e)a=!1,r._disableCookies=!0;else{var i=e.getCookieString?e:d8,t=r.uri.href;i&&(a=i.getCookieString(t))}return a&&a.length&&(r.originalCookieHeader?r.setHeader("cookie",r.originalCookieHeader+"; "+a):r.setHeader("cookie",a)),r._jar=e,r};Rr.prototype.pipe=function(e,r){var a=this;if(a.response)if(a._destdata)a.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else if(a._ended)a.emit("error",new Error("You cannot pipe after the response has been ended."));else return cp.Stream.prototype.pipe.call(a,e,r),a.pipeDest(e),e;else return a.dests.push(e),cp.Stream.prototype.pipe.call(a,e,r),e};Rr.prototype.write=function(){var e=this;if(!e._aborted&&(e._started||e.start(),e.req))return e.req.write.apply(e.req,arguments)};Rr.prototype.end=function(e){var r=this;r._aborted||(e&&r.write(e),r._started||r.start(),r.req&&r.req.end())};Rr.prototype.pause=function(){var e=this;e.responseContent?e.responseContent.pause.apply(e.responseContent,arguments):e._paused=!0};Rr.prototype.resume=function(){var e=this;e.responseContent?e.responseContent.resume.apply(e.responseContent,arguments):e._paused=!1};Rr.prototype.destroy=function(){var e=this;this.clearTimeout(),e._ended?e.response&&e.response.destroy():e.end()};Rr.prototype.clearTimeout=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)};Rr.defaultProxyHeaderWhiteList=u0.defaultProxyHeaderWhiteList.slice();Rr.defaultProxyHeaderExclusiveList=u0.defaultProxyHeaderExclusiveList.slice();Rr.prototype.toJSON=v8;g8.exports=Rr});var w8=O((cY,x8)=>{"use strict";var Ic=Bl(),y8=Id(),AU=Dl(),PU=AU.paramsHaveRequestBody;function fp(e,r,a){typeof r=="function"&&(a=r);var i={};return r!==null&&typeof r=="object"?Ic(i,r,{uri:e}):typeof e=="string"?Ic(i,{uri:e}):Ic(i,e),i.callback=a||i.callback,i}function qa(e,r,a){if(typeof e=="undefined")throw new Error("undefined is not a valid uri or options object.");var i=fp(e,r,a);if(i.method==="HEAD"&&PU(i))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new qa.Request(i)}function xo(e){var r=e.toUpperCase();return function(a,i,t){var n=fp(a,i,t);return n.method=r,qa(n,n.callback)}}qa.get=xo("get");qa.head=xo("head");qa.options=xo("options");qa.post=xo("post");qa.put=xo("put");qa.patch=xo("patch");qa.del=xo("delete");qa.delete=xo("delete");qa.jar=function(e){return y8.jar(e)};qa.cookie=function(e){return y8.parse(e)};function c0(e,r,a,i){return function(t,n,o){var s=fp(t,n,o),c={};return Ic(!0,c,r,s),c.pool=s.pool||r.pool,i&&(c.method=i.toUpperCase()),typeof a=="function"&&(e=a),e(c,c.callback)}}qa.defaults=function(e,r){var a=this;e=e||{},typeof e=="function"&&(r=e,e={});var i=c0(a,e,r),t=["get","head","post","put","patch","del","delete"];return t.forEach(function(n){i[n]=c0(a[n],e,r,n)}),i.cookie=c0(a.cookie,e,r),i.jar=a.jar,i.defaults=a.defaults,i};qa.forever=function(e,r){var a={};return r&&Ic(a,r),e&&(a.agentOptions=e),a.forever=!0,qa.defaults(a)};x8.exports=qa;qa.Request=b8();qa.initParams=fp;Object.defineProperty(qa,"debug",{enumerable:!0,get:function(){return qa.Request.debug},set:function(e){qa.Request.debug=e}})});var _8=O((lY,k8)=>{k8.exports=TU;function TU(e){if(!/^data\:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");var r=e.indexOf(",");if(r===-1||r<=4)throw new TypeError("malformed data: URI");for(var a=e.substring(5,r).split(";"),i=!1,t="US-ASCII",n=0;n<a.length;n++)a[n]=="base64"?i=!0:a[n].indexOf("charset=")==0&&(t=a[n].substring(8));var o=unescape(e.substring(r+1)),s=i?"base64":"ascii",c=new Buffer(o,s);return c.type=a[0]||"text/plain",c.charset=t,c}});var E8=O((fY,S8)=>{var CU=_8();function FU(e){return{mimeType:BU(qU(e)),data:CU(e)}}function qU(e){return e.substring(5,e.indexOf(";"))}var j8=/^(\w+\/)+/;function BU(e){e=e.toLowerCase();var r=e.match(j8);return!r||!(r=r[1])?e:e.replace(j8,r)}S8.exports=FU});var P8=O((hY,A8)=>{"use strict";var Rc=Uu(),pY=require("path"),IU=$x().PNG,RU=Uh(),OU=Zx(),zU=Xx().GifReader,DU=tw(),LU=require("fs"),UU=w8(),NU=Rf(),MU=E8();function HU(e,r){var a=new IU;a.parse(e,function(i,t){if(i){r(i);return}r(null,Rc(new Uint8Array(t.data),[t.width|0,t.height|0,4],[4,4*t.width|0,1],0))})}function VU(e,r){var a;try{a=RU.decode(e)}catch(n){r(n);return}if(!a){r(new Error("Error decoding jpeg"));return}var i=[a.height,a.width,4],t=Rc(a.data,i);r(null,t.transpose(1,0))}function $U(e,r){var a;try{a=new zU(e)}catch(s){r(s);return}if(a.numFrames()>0){var i=[a.numFrames(),a.height,a.width,4];try{var t=new Uint8Array(i[0]*i[1]*i[2]*i[3])}catch(s){r(s);return}var n=Rc(t,i);try{for(var o=0;o<a.numFrames();++o)a.decodeAndBlitFrameRGBA(o,t.subarray(n.index(o,0,0,0),n.index(o+1,0,0,0)))}catch(s){r(s);return}r(null,n.transpose(0,2,1))}else{var i=[a.height,a.width,4],t=new Uint8Array(i[0]*i[1]*i[2]),n=Rc(t,i);try{a.decodeAndBlitFrameRGBA(0,t)}catch(f){r(f);return}r(null,n.transpose(1,0))}}function WU(e,r){var a=new DU(e);try{a.init()}catch(s){r(s);return}var i=a.getData(),t=[i.getHeight(),i.getWidth(),4],n=new Uint8Array(t[0]*t[1]*t[2]),o=Rc(n,t);OU(i,o),r(null,o.transpose(1,0))}function pp(e,r,a){switch(e){case"image/png":HU(r,a);break;case"image/jpg":case"image/jpeg":VU(r,a);break;case"image/gif":$U(r,a);break;case"image/bmp":WU(r,a);break;default:a(new Error("Unsupported file type: "+e))}}A8.exports=function(r,a,i){if(i||(i=a,a=""),Buffer.isBuffer(r)){if(!a){i(new Error("Invalid file type"));return}pp(a,r,i)}else if(r.indexOf("data:")===0)try{var t=MU(r);t?process.nextTick(function(){pp(a||t.mimeType,t.data,i)}):process.nextTick(function(){i(new Error("Error parsing data URI"))})}catch(n){process.nextTick(function(){i(n)})}else r.indexOf("http://")===0||r.indexOf("https://")===0?UU({url:r,encoding:null},function(n,o,s){if(n){i(n);return}if(a=a,a||(o.getHeader!==void 0?a=o.getHeader("content-type"):o.headers!==void 0&&(a=o.headers["content-type"])),!a){i(new Error("Invalid content-type"));return}pp(a,s,i)}):LU.readFile(r,function(n,o){if(n){i(n);return}if(a=a||NU.lookup(r),!a){i(new Error("Invalid file type"));return}pp(a,o,i)})}});var q8=O((hp,F8)=>{(function(e,r){typeof hp=="object"&&typeof F8!="undefined"?r(hp):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(hp,function(e){"use strict";var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:function(u){return"Symbol("+u+")"};function a(){}function i(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global}var t=i();function n(u){return typeof u=="object"&&u!==null||typeof u=="function"}var o=a,s=Promise,c=Promise.prototype.then,l=Promise.resolve.bind(s),f=Promise.reject.bind(s);function v(u){return new s(u)}function h(u){return l(u)}function d(u){return f(u)}function y(u,m,S){return c.call(u,m,S)}function j(u,m,S){y(y(u,m,S),void 0,o)}function w(u,m){j(u,m)}function A(u,m){j(u,void 0,m)}function P(u,m,S){return y(u,m,S)}function T(u){y(u,void 0,o)}var I=function(){var u=t&&t.queueMicrotask;if(typeof u=="function")return u;var m=h(void 0);return function(S){return y(m,S)}}();function F(u,m,S){if(typeof u!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(u,m,S)}function R(u,m,S){try{return h(F(u,m,S))}catch(D){return d(D)}}var z=16384,U=function(){function u(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(u.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),u.prototype.push=function(m){var S=this._back,D=S;S._elements.length===z-1&&(D={_elements:[],_next:void 0}),S._elements.push(m),D!==S&&(this._back=D,S._next=D),++this._size},u.prototype.shift=function(){var m=this._front,S=m,D=this._cursor,G=D+1,se=m._elements,ge=se[D];return G===z&&(S=m._next,G=0),--this._size,this._cursor=G,m!==S&&(this._front=S),se[D]=void 0,ge},u.prototype.forEach=function(m){for(var S=this._cursor,D=this._front,G=D._elements;(S!==G.length||D._next!==void 0)&&!(S===G.length&&(D=D._next,G=D._elements,S=0,G.length===0));)m(G[S]),++S},u.prototype.peek=function(){var m=this._front,S=this._cursor;return m._elements[S]},u}();function M(u,m){u._ownerReadableStream=m,m._reader=u,m._state==="readable"?$(u):m._state==="closed"?re(u):Q(u,m._storedError)}function K(u,m){var S=u._ownerReadableStream;return vi(S,m)}function V(u){u._ownerReadableStream._state==="readable"?je(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):me(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),u._ownerReadableStream._reader=void 0,u._ownerReadableStream=void 0}function Z(u){return new TypeError("Cannot "+u+" a stream using a released reader")}function $(u){u._closedPromise=v(function(m,S){u._closedPromise_resolve=m,u._closedPromise_reject=S})}function Q(u,m){$(u),je(u,m)}function re(u){$(u),ce(u)}function je(u,m){u._closedPromise_reject!==void 0&&(T(u._closedPromise),u._closedPromise_reject(m),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}function me(u,m){Q(u,m)}function ce(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}var _e=r("[[AbortSteps]]"),be=r("[[ErrorSteps]]"),Le=r("[[CancelSteps]]"),Me=r("[[PullSteps]]"),Oe=Number.isFinite||function(u){return typeof u=="number"&&isFinite(u)},W=Math.trunc||function(u){return u<0?Math.ceil(u):Math.floor(u)};function xe(u){return typeof u=="object"||typeof u=="function"}function Ze(u,m){if(u!==void 0&&!xe(u))throw new TypeError(m+" is not an object.")}function We(u,m){if(typeof u!="function")throw new TypeError(m+" is not a function.")}function $e(u){return typeof u=="object"&&u!==null||typeof u=="function"}function rr(u,m){if(!$e(u))throw new TypeError(m+" is not an object.")}function qe(u,m,S){if(u===void 0)throw new TypeError("Parameter "+m+" is required in '"+S+"'.")}function fe(u,m,S){if(u===void 0)throw new TypeError(m+" is required in '"+S+"'.")}function we(u){return Number(u)}function ir(u){return u===0?0:u}function Pe(u){return ir(W(u))}function ur(u,m){var S=0,D=Number.MAX_SAFE_INTEGER,G=Number(u);if(G=ir(G),!Oe(G))throw new TypeError(m+" is not a finite number");if(G=Pe(G),G<S||G>D)throw new TypeError(m+" is outside the accepted range of "+S+" to "+D+", inclusive");return!Oe(G)||G===0?0:G}function Or(u,m){if(!Hn(u))throw new TypeError(m+" is not a ReadableStream.")}function Gr(u){return new Ye(u)}function J(u,m){u._reader._readRequests.push(m)}function Be(u,m,S){var D=u._reader,G=D._readRequests.shift();S?G._closeSteps():G._chunkSteps(m)}function Ke(u){return u._reader._readRequests.length}function He(u){var m=u._reader;return!(m===void 0||!Je(m))}var Ye=function(){function u(m){if(qe(m,1,"ReadableStreamDefaultReader"),Or(m,"First parameter"),Vn(m))throw new TypeError("This stream has already been locked for exclusive reading by another reader");M(this,m),this._readRequests=new U}return Object.defineProperty(u.prototype,"closed",{get:function(){return Je(this)?this._closedPromise:d(mr("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(m){return m===void 0&&(m=void 0),Je(this)?this._ownerReadableStream===void 0?d(Z("cancel")):K(this,m):d(mr("cancel"))},u.prototype.read=function(){if(!Je(this))return d(mr("read"));if(this._ownerReadableStream===void 0)return d(Z("read from"));var m,S,D=v(function(se,ge){m=se,S=ge}),G={_chunkSteps:function(se){return m({value:se,done:!1})},_closeSteps:function(){return m({value:void 0,done:!0})},_errorSteps:function(se){return S(se)}};return nr(this,G),D},u.prototype.releaseLock=function(){if(!Je(this))throw mr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");V(this)}},u}();Object.defineProperties(Ye.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ye.prototype,r.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Je(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readRequests")?!1:u instanceof Ye}function nr(u,m){var S=u._ownerReadableStream;S._disturbed=!0,S._state==="closed"?m._closeSteps():S._state==="errored"?m._errorSteps(S._storedError):S._readableStreamController[Me](m)}function mr(u){return new TypeError("ReadableStreamDefaultReader.prototype."+u+" can only be used on a ReadableStreamDefaultReader")}var Ir,vr;typeof r.asyncIterator=="symbol"&&(vr=(Ir={},Ir[r.asyncIterator]=function(){return this},Ir),Object.defineProperty(vr,r.asyncIterator,{enumerable:!1}));var ve=function(){function u(m,S){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=m,this._preventCancel=S}return u.prototype.next=function(){var m=this,S=function(){return m._nextSteps()};return this._ongoingPromise=this._ongoingPromise?P(this._ongoingPromise,S,S):S(),this._ongoingPromise},u.prototype.return=function(m){var S=this,D=function(){return S._returnSteps(m)};return this._ongoingPromise?P(this._ongoingPromise,D,D):D()},u.prototype._nextSteps=function(){var m=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var S=this._reader;if(S._ownerReadableStream===void 0)return d(Z("iterate"));var D,G,se=v(function(Xe,Er){D=Xe,G=Er}),ge={_chunkSteps:function(Xe){m._ongoingPromise=void 0,I(function(){return D({value:Xe,done:!1})})},_closeSteps:function(){m._ongoingPromise=void 0,m._isFinished=!0,V(S),D({value:void 0,done:!0})},_errorSteps:function(Xe){m._ongoingPromise=void 0,m._isFinished=!0,V(S),G(Xe)}};return nr(S,ge),se},u.prototype._returnSteps=function(m){if(this._isFinished)return Promise.resolve({value:m,done:!0});this._isFinished=!0;var S=this._reader;if(S._ownerReadableStream===void 0)return d(Z("finish iterating"));if(!this._preventCancel){var D=K(S,m);return V(S),P(D,function(){return{value:m,done:!0}})}return V(S),h({value:m,done:!0})},u}(),Ge={next:function(){return Pr(this)?this._asyncIteratorImpl.next():d(lr("next"))},return:function(u){return Pr(this)?this._asyncIteratorImpl.return(u):d(lr("return"))}};vr!==void 0&&Object.setPrototypeOf(Ge,vr);function pr(u,m){var S=Gr(u),D=new ve(S,m),G=Object.create(Ge);return G._asyncIteratorImpl=D,G}function Pr(u){if(!n(u)||!Object.prototype.hasOwnProperty.call(u,"_asyncIteratorImpl"))return!1;try{return u._asyncIteratorImpl instanceof ve}catch{return!1}}function lr(u){return new TypeError("ReadableStreamAsyncIterator."+u+" can only be used on a ReadableSteamAsyncIterator")}var gr=Number.isNaN||function(u){return u!==u};function wr(u){return u.slice()}function or(u,m,S,D,G){new Uint8Array(u).set(new Uint8Array(S,D,G),m)}function cr(u){return u}function $r(u){return!1}function Cr(u,m,S){if(u.slice)return u.slice(m,S);var D=S-m,G=new ArrayBuffer(D);return or(G,0,u,m,D),G}function Sa(u){return!(typeof u!="number"||gr(u)||u<0)}function Ia(u){var m=Cr(u.buffer,u.byteOffset,u.byteOffset+u.byteLength);return new Uint8Array(m)}function st(u){var m=u._queue.shift();return u._queueTotalSize-=m.size,u._queueTotalSize<0&&(u._queueTotalSize=0),m.value}function vt(u,m,S){if(!Sa(S)||S===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");u._queue.push({value:m,size:S}),u._queueTotalSize+=S}function ra(u){var m=u._queue.peek();return m.value}function ua(u){u._queue=new U,u._queueTotalSize=0}var da=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"view",{get:function(){if(!ut(this))throw De("view");return this._view},enumerable:!1,configurable:!0}),u.prototype.respond=function(m){if(!ut(this))throw De("respond");if(qe(m,1,"respond"),m=ur(m,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");$r(this._view.buffer),Qe(this._associatedReadableByteStreamController,m)},u.prototype.respondWithNewView=function(m){if(!ut(this))throw De("respondWithNewView");if(qe(m,1,"respondWithNewView"),!ArrayBuffer.isView(m))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");$r(m.buffer),Te(this._associatedReadableByteStreamController,m)},u}();Object.defineProperties(da.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(da.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var Ra=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"byobRequest",{get:function(){if(!va(this))throw de("byobRequest");return Fe(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!va(this))throw de("desiredSize");return ar(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!va(this))throw de("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var m=this._controlledReadableByteStream._state;if(m!=="readable")throw new TypeError("The stream (in "+m+" state) is not in the readable state and cannot be closed");Ie(this)},u.prototype.enqueue=function(m){if(!va(this))throw de("enqueue");if(qe(m,1,"enqueue"),!ArrayBuffer.isView(m))throw new TypeError("chunk must be an array buffer view");if(m.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(m.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var S=this._controlledReadableByteStream._state;if(S!=="readable")throw new TypeError("The stream (in "+S+" state) is not in the readable state and cannot be enqueued to");Se(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!va(this))throw de("error");Ce(this,m)},u.prototype[Le]=function(m){aa(this),ua(this);var S=this._cancelAlgorithm(m);return Ne(this),S},u.prototype[Me]=function(m){var S=this._controlledReadableByteStream;if(this._queueTotalSize>0){var D=this._queue.shift();this._queueTotalSize-=D.byteLength,k(this);var G=new Uint8Array(D.buffer,D.byteOffset,D.byteLength);m._chunkSteps(G);return}var se=this._autoAllocateChunkSize;if(se!==void 0){var ge=void 0;try{ge=new ArrayBuffer(se)}catch(Er){m._errorSteps(Er);return}var Xe={buffer:ge,bufferByteLength:se,byteOffset:0,byteLength:se,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Xe)}J(S,m),Ma(this)},u}();Object.defineProperties(Ra.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ra.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function va(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableByteStream")?!1:u instanceof Ra}function ut(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_associatedReadableByteStreamController")?!1:u instanceof da}function Ma(u){var m=ye(u);if(!!m){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var S=u._pullAlgorithm();j(S,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,Ma(u))},function(D){Ce(u,D)})}}function aa(u){B(u),u._pendingPullIntos=new U}function Vt(u,m){var S=!1;u._state==="closed"&&(S=!0);var D=x(m);m.readerType==="default"?Be(u,D,S):le(u,D,S)}function x(u){var m=u.bytesFilled,S=u.elementSize;return new u.viewConstructor(u.buffer,u.byteOffset,m/S)}function b(u,m,S,D){u._queue.push({buffer:m,byteOffset:S,byteLength:D}),u._queueTotalSize+=D}function g(u,m){var S=m.elementSize,D=m.bytesFilled-m.bytesFilled%S,G=Math.min(u._queueTotalSize,m.byteLength-m.bytesFilled),se=m.bytesFilled+G,ge=se-se%S,Xe=G,Er=!1;ge>D&&(Xe=ge-m.bytesFilled,Er=!0);for(var qr=u._queue;Xe>0;){var zr=qr.peek(),Wr=Math.min(Xe,zr.byteLength),Oa=m.byteOffset+m.bytesFilled;or(m.buffer,Oa,zr.buffer,zr.byteOffset,Wr),zr.byteLength===Wr?qr.shift():(zr.byteOffset+=Wr,zr.byteLength-=Wr),u._queueTotalSize-=Wr,p(u,Wr,m),Xe-=Wr}return Er}function p(u,m,S){S.bytesFilled+=m}function k(u){u._queueTotalSize===0&&u._closeRequested?(Ne(u),_u(u._controlledReadableByteStream)):Ma(u)}function B(u){u._byobRequest!==null&&(u._byobRequest._associatedReadableByteStreamController=void 0,u._byobRequest._view=null,u._byobRequest=null)}function N(u){for(;u._pendingPullIntos.length>0;){if(u._queueTotalSize===0)return;var m=u._pendingPullIntos.peek();g(u,m)&&(Ue(u),Vt(u._controlledReadableByteStream,m))}}function Y(u,m,S){var D=u._controlledReadableByteStream,G=1;m.constructor!==DataView&&(G=m.constructor.BYTES_PER_ELEMENT);var se=m.constructor,ge=cr(m.buffer),Xe={buffer:ge,bufferByteLength:ge.byteLength,byteOffset:m.byteOffset,byteLength:m.byteLength,bytesFilled:0,elementSize:G,viewConstructor:se,readerType:"byob"};if(u._pendingPullIntos.length>0){u._pendingPullIntos.push(Xe),ee(D,S);return}if(D._state==="closed"){var Er=new se(Xe.buffer,Xe.byteOffset,0);S._closeSteps(Er);return}if(u._queueTotalSize>0){if(g(u,Xe)){var qr=x(Xe);k(u),S._chunkSteps(qr);return}if(u._closeRequested){var zr=new TypeError("Insufficient bytes to fill elements in the given buffer");Ce(u,zr),S._errorSteps(zr);return}}u._pendingPullIntos.push(Xe),ee(D,S),Ma(u)}function te(u,m){var S=u._controlledReadableByteStream;if(ae(S))for(;oe(S)>0;){var D=Ue(u);Vt(S,D)}}function pe(u,m,S){if(p(u,m,S),!(S.bytesFilled<S.elementSize)){Ue(u);var D=S.bytesFilled%S.elementSize;if(D>0){var G=S.byteOffset+S.bytesFilled,se=Cr(S.buffer,G-D,G);b(u,se,0,se.byteLength)}S.bytesFilled-=D,Vt(u._controlledReadableByteStream,S),N(u)}}function he(u,m){var S=u._pendingPullIntos.peek();B(u);var D=u._controlledReadableByteStream._state;D==="closed"?te(u):pe(u,m,S),Ma(u)}function Ue(u){var m=u._pendingPullIntos.shift();return m}function ye(u){var m=u._controlledReadableByteStream;if(m._state!=="readable"||u._closeRequested||!u._started)return!1;if(He(m)&&Ke(m)>0||ae(m)&&oe(m)>0)return!0;var S=ar(u);return S>0}function Ne(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0}function Ie(u){var m=u._controlledReadableByteStream;if(!(u._closeRequested||m._state!=="readable")){if(u._queueTotalSize>0){u._closeRequested=!0;return}if(u._pendingPullIntos.length>0){var S=u._pendingPullIntos.peek();if(S.bytesFilled>0){var D=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ce(u,D),D}}Ne(u),_u(m)}}function Se(u,m){var S=u._controlledReadableByteStream;if(!(u._closeRequested||S._state!=="readable")){var D=m.buffer,G=m.byteOffset,se=m.byteLength,ge=cr(D);if(u._pendingPullIntos.length>0){var Xe=u._pendingPullIntos.peek();$r(Xe.buffer),Xe.buffer=cr(Xe.buffer)}if(B(u),He(S))if(Ke(S)===0)b(u,ge,G,se);else{u._pendingPullIntos.length>0&&Ue(u);var Er=new Uint8Array(ge,G,se);Be(S,Er,!1)}else ae(S)?(b(u,ge,G,se),N(u)):b(u,ge,G,se);Ma(u)}}function Ce(u,m){var S=u._controlledReadableByteStream;S._state==="readable"&&(aa(u),ua(u),Ne(u),kg(S,m))}function Fe(u){if(u._byobRequest===null&&u._pendingPullIntos.length>0){var m=u._pendingPullIntos.peek(),S=new Uint8Array(m.buffer,m.byteOffset+m.bytesFilled,m.byteLength-m.bytesFilled),D=Object.create(da.prototype);ze(D,u,S),u._byobRequest=D}return u._byobRequest}function ar(u){var m=u._controlledReadableByteStream._state;return m==="errored"?null:m==="closed"?0:u._strategyHWM-u._queueTotalSize}function Qe(u,m){var S=u._pendingPullIntos.peek(),D=u._controlledReadableByteStream._state;if(D==="closed"){if(m!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(m===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(S.bytesFilled+m>S.byteLength)throw new RangeError("bytesWritten out of range")}S.buffer=cr(S.buffer),he(u,m)}function Te(u,m){var S=u._pendingPullIntos.peek(),D=u._controlledReadableByteStream._state;if(D==="closed"){if(m.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(m.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(S.byteOffset+S.bytesFilled!==m.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(S.bufferByteLength!==m.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(S.bytesFilled+m.byteLength>S.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var G=m.byteLength;S.buffer=cr(m.buffer),he(u,G)}function Ee(u,m,S,D,G,se,ge){m._controlledReadableByteStream=u,m._pullAgain=!1,m._pulling=!1,m._byobRequest=null,m._queue=m._queueTotalSize=void 0,ua(m),m._closeRequested=!1,m._started=!1,m._strategyHWM=se,m._pullAlgorithm=D,m._cancelAlgorithm=G,m._autoAllocateChunkSize=ge,m._pendingPullIntos=new U,u._readableStreamController=m;var Xe=S();j(h(Xe),function(){m._started=!0,Ma(m)},function(Er){Ce(m,Er)})}function Ae(u,m,S){var D=Object.create(Ra.prototype),G=function(){},se=function(){return h(void 0)},ge=function(){return h(void 0)};m.start!==void 0&&(G=function(){return m.start(D)}),m.pull!==void 0&&(se=function(){return m.pull(D)}),m.cancel!==void 0&&(ge=function(Er){return m.cancel(Er)});var Xe=m.autoAllocateChunkSize;if(Xe===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ee(u,D,G,se,ge,S,Xe)}function ze(u,m,S){u._associatedReadableByteStreamController=m,u._view=S}function De(u){return new TypeError("ReadableStreamBYOBRequest.prototype."+u+" can only be used on a ReadableStreamBYOBRequest")}function de(u){return new TypeError("ReadableByteStreamController.prototype."+u+" can only be used on a ReadableByteStreamController")}function X(u){return new ne(u)}function ee(u,m){u._reader._readIntoRequests.push(m)}function le(u,m,S){var D=u._reader,G=D._readIntoRequests.shift();S?G._closeSteps(m):G._chunkSteps(m)}function oe(u){return u._reader._readIntoRequests.length}function ae(u){var m=u._reader;return!(m===void 0||!Ve(m))}var ne=function(){function u(m){if(qe(m,1,"ReadableStreamBYOBReader"),Or(m,"First parameter"),Vn(m))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!va(m._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");M(this,m),this._readIntoRequests=new U}return Object.defineProperty(u.prototype,"closed",{get:function(){return Ve(this)?this._closedPromise:d(tr("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(m){return m===void 0&&(m=void 0),Ve(this)?this._ownerReadableStream===void 0?d(Z("cancel")):K(this,m):d(tr("cancel"))},u.prototype.read=function(m){if(!Ve(this))return d(tr("read"));if(!ArrayBuffer.isView(m))return d(new TypeError("view must be an array buffer view"));if(m.byteLength===0)return d(new TypeError("view must have non-zero byteLength"));if(m.buffer.byteLength===0)return d(new TypeError("view's buffer must have non-zero byteLength"));if($r(m.buffer),this._ownerReadableStream===void 0)return d(Z("read from"));var S,D,G=v(function(ge,Xe){S=ge,D=Xe}),se={_chunkSteps:function(ge){return S({value:ge,done:!1})},_closeSteps:function(ge){return S({value:ge,done:!0})},_errorSteps:function(ge){return D(ge)}};return fr(this,m,se),G},u.prototype.releaseLock=function(){if(!Ve(this))throw tr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");V(this)}},u}();Object.defineProperties(ne.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ne.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Ve(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readIntoRequests")?!1:u instanceof ne}function fr(u,m,S){var D=u._ownerReadableStream;D._disturbed=!0,D._state==="errored"?S._errorSteps(D._storedError):Y(D._readableStreamController,m,S)}function tr(u){return new TypeError("ReadableStreamBYOBReader.prototype."+u+" can only be used on a ReadableStreamBYOBReader")}function sr(u,m){var S=u.highWaterMark;if(S===void 0)return m;if(gr(S)||S<0)throw new RangeError("Invalid highWaterMark");return S}function L(u){var m=u.size;return m||function(){return 1}}function yr(u,m){Ze(u,m);var S=u==null?void 0:u.highWaterMark,D=u==null?void 0:u.size;return{highWaterMark:S===void 0?void 0:we(S),size:D===void 0?void 0:Ar(D,m+" has member 'size' that")}}function Ar(u,m){return We(u,m),function(S){return we(u(S))}}function kr(u,m){Ze(u,m);var S=u==null?void 0:u.abort,D=u==null?void 0:u.close,G=u==null?void 0:u.start,se=u==null?void 0:u.type,ge=u==null?void 0:u.write;return{abort:S===void 0?void 0:hr(S,u,m+" has member 'abort' that"),close:D===void 0?void 0:Sr(D,u,m+" has member 'close' that"),start:G===void 0?void 0:_r(G,u,m+" has member 'start' that"),write:ge===void 0?void 0:ta(ge,u,m+" has member 'write' that"),type:se}}function hr(u,m,S){return We(u,S),function(D){return R(u,m,[D])}}function Sr(u,m,S){return We(u,S),function(){return R(u,m,[])}}function _r(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function ta(u,m,S){return We(u,S),function(D,G){return R(u,m,[D,G])}}function Tr(u,m){if(!Re(u))throw new TypeError(m+" is not a WritableStream.")}function _(u){if(typeof u!="object"||u===null)return!1;try{return typeof u.aborted=="boolean"}catch{return!1}}var E=typeof AbortController=="function";function C(){if(E)return new AbortController}var H=function(){function u(m,S){m===void 0&&(m={}),S===void 0&&(S={}),m===void 0?m=null:rr(m,"First parameter");var D=yr(S,"Second parameter"),G=kr(m,"First parameter");ke(this);var se=G.type;if(se!==void 0)throw new RangeError("Invalid type is specified");var ge=L(D),Xe=sr(D,1);NS(this,G,Xe,ge)}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Re(this))throw al("locked");return Fr(this)},enumerable:!1,configurable:!0}),u.prototype.abort=function(m){return m===void 0&&(m=void 0),Re(this)?Fr(this)?d(new TypeError("Cannot abort a stream that already has a writer")):ca(this,m):d(al("abort"))},u.prototype.close=function(){return Re(this)?Fr(this)?d(new TypeError("Cannot close a stream that already has a writer")):mi(this)?d(new TypeError("Cannot close an already-closing stream")):ct(this):d(al("close"))},u.prototype.getWriter=function(){if(!Re(this))throw al("getWriter");return ie(this)},u}();Object.defineProperties(H.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(H.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function ie(u){return new ls(u)}function ue(u,m,S,D,G,se){G===void 0&&(G=1),se===void 0&&(se=function(){return 1});var ge=Object.create(H.prototype);ke(ge);var Xe=Object.create(Co.prototype);return cg(ge,Xe,u,m,S,D,G,se),ge}function ke(u){u._state="writable",u._storedError=void 0,u._writer=void 0,u._writableStreamController=void 0,u._writeRequests=new U,u._inFlightWriteRequest=void 0,u._closeRequest=void 0,u._inFlightCloseRequest=void 0,u._pendingAbortRequest=void 0,u._backpressure=!1}function Re(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_writableStreamController")?!1:u instanceof H}function Fr(u){return u._writer!==void 0}function ca(u,m){var S;if(u._state==="closed"||u._state==="errored")return h(void 0);u._writableStreamController._abortReason=m,(S=u._writableStreamController._abortController)===null||S===void 0||S.abort();var D=u._state;if(D==="closed"||D==="errored")return h(void 0);if(u._pendingAbortRequest!==void 0)return u._pendingAbortRequest._promise;var G=!1;D==="erroring"&&(G=!0,m=void 0);var se=v(function(ge,Xe){u._pendingAbortRequest={_promise:void 0,_resolve:ge,_reject:Xe,_reason:m,_wasAlreadyErroring:G}});return u._pendingAbortRequest._promise=se,G||mn(u,m),se}function ct(u){var m=u._state;if(m==="closed"||m==="errored")return d(new TypeError("The stream (in "+m+" state) is not in the writable state and cannot be closed"));var S=v(function(G,se){var ge={_resolve:G,_reject:se};u._closeRequest=ge}),D=u._writer;return D!==void 0&&u._backpressure&&m==="writable"&&Mp(D),MS(u._writableStreamController),S}function lt(u){var m=v(function(S,D){var G={_resolve:S,_reject:D};u._writeRequests.push(G)});return m}function Et(u,m){var S=u._state;if(S==="writable"){mn(u,m);return}gt(u)}function mn(u,m){var S=u._writableStreamController;u._state="erroring",u._storedError=m;var D=u._writer;D!==void 0&&ng(D,m),!IS(u)&&S._started&>(u)}function gt(u){u._state="errored",u._writableStreamController[be]();var m=u._storedError;if(u._writeRequests.forEach(function(G){G._reject(m)}),u._writeRequests=new U,u._pendingAbortRequest===void 0){Jc(u);return}var S=u._pendingAbortRequest;if(u._pendingAbortRequest=void 0,S._wasAlreadyErroring){S._reject(m),Jc(u);return}var D=u._writableStreamController[_e](S._reason);j(D,function(){S._resolve(),Jc(u)},function(G){S._reject(G),Jc(u)})}function Rt(u){u._inFlightWriteRequest._resolve(void 0),u._inFlightWriteRequest=void 0}function Po(u,m){u._inFlightWriteRequest._reject(m),u._inFlightWriteRequest=void 0,Et(u,m)}function di(u){u._inFlightCloseRequest._resolve(void 0),u._inFlightCloseRequest=void 0;var m=u._state;m==="erroring"&&(u._storedError=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._resolve(),u._pendingAbortRequest=void 0)),u._state="closed";var S=u._writer;S!==void 0&&hg(S)}function cs(u,m){u._inFlightCloseRequest._reject(m),u._inFlightCloseRequest=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._reject(m),u._pendingAbortRequest=void 0),Et(u,m)}function mi(u){return!(u._closeRequest===void 0&&u._inFlightCloseRequest===void 0)}function IS(u){return!(u._inFlightWriteRequest===void 0&&u._inFlightCloseRequest===void 0)}function RS(u){u._inFlightCloseRequest=u._closeRequest,u._closeRequest=void 0}function OS(u){u._inFlightWriteRequest=u._writeRequests.shift()}function Jc(u){u._closeRequest!==void 0&&(u._closeRequest._reject(u._storedError),u._closeRequest=void 0);var m=u._writer;m!==void 0&&Up(m,u._storedError)}function Rp(u,m){var S=u._writer;S!==void 0&&m!==u._backpressure&&(m?YS(S):Mp(S)),u._backpressure=m}var ls=function(){function u(m){if(qe(m,1,"WritableStreamDefaultWriter"),Tr(m,"First parameter"),Fr(m))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=m,m._writer=this;var S=m._state;if(S==="writable")!mi(m)&&m._backpressure?il(this):dg(this),tl(this);else if(S==="erroring")Np(this,m._storedError),tl(this);else if(S==="closed")dg(this),KS(this);else{var D=m._storedError;Np(this,D),pg(this,D)}}return Object.defineProperty(u.prototype,"closed",{get:function(){return To(this)?this._closedPromise:d(Fo("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!To(this))throw Fo("desiredSize");if(this._ownerWritableStream===void 0)throw xu("desiredSize");return US(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ready",{get:function(){return To(this)?this._readyPromise:d(Fo("ready"))},enumerable:!1,configurable:!0}),u.prototype.abort=function(m){return m===void 0&&(m=void 0),To(this)?this._ownerWritableStream===void 0?d(xu("abort")):zS(this,m):d(Fo("abort"))},u.prototype.close=function(){if(!To(this))return d(Fo("close"));var m=this._ownerWritableStream;return m===void 0?d(xu("close")):mi(m)?d(new TypeError("Cannot close an already-closing stream")):ig(this)},u.prototype.releaseLock=function(){if(!To(this))throw Fo("releaseLock");var m=this._ownerWritableStream;m!==void 0&&og(this)},u.prototype.write=function(m){return m===void 0&&(m=void 0),To(this)?this._ownerWritableStream===void 0?d(xu("write to")):sg(this,m):d(Fo("write"))},u}();Object.defineProperties(ls.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ls.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function To(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_ownerWritableStream")?!1:u instanceof ls}function zS(u,m){var S=u._ownerWritableStream;return ca(S,m)}function ig(u){var m=u._ownerWritableStream;return ct(m)}function DS(u){var m=u._ownerWritableStream,S=m._state;return mi(m)||S==="closed"?h(void 0):S==="errored"?d(m._storedError):ig(u)}function LS(u,m){u._closedPromiseState==="pending"?Up(u,m):GS(u,m)}function ng(u,m){u._readyPromiseState==="pending"?mg(u,m):ZS(u,m)}function US(u){var m=u._ownerWritableStream,S=m._state;return S==="errored"||S==="erroring"?null:S==="closed"?0:lg(m._writableStreamController)}function og(u){var m=u._ownerWritableStream,S=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");ng(u,S),LS(u,S),m._writer=void 0,u._ownerWritableStream=void 0}function sg(u,m){var S=u._ownerWritableStream,D=S._writableStreamController,G=HS(D,m);if(S!==u._ownerWritableStream)return d(xu("write to"));var se=S._state;if(se==="errored")return d(S._storedError);if(mi(S)||se==="closed")return d(new TypeError("The stream is closing or closed and cannot be written to"));if(se==="erroring")return d(S._storedError);var ge=lt(S);return VS(D,m,G),ge}var ug={},Co=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"abortReason",{get:function(){if(!Op(this))throw Lp("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"signal",{get:function(){if(!Op(this))throw Lp("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal},enumerable:!1,configurable:!0}),u.prototype.error=function(m){if(m===void 0&&(m=void 0),!Op(this))throw Lp("error");var S=this._controlledWritableStream._state;S==="writable"&&fg(this,m)},u.prototype[_e]=function(m){var S=this._abortAlgorithm(m);return el(this),S},u.prototype[be]=function(){ua(this)},u}();Object.defineProperties(Co.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Co.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Op(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledWritableStream")?!1:u instanceof Co}function cg(u,m,S,D,G,se,ge,Xe){m._controlledWritableStream=u,u._writableStreamController=m,m._queue=void 0,m._queueTotalSize=void 0,ua(m),m._abortReason=void 0,m._abortController=C(),m._started=!1,m._strategySizeAlgorithm=Xe,m._strategyHWM=ge,m._writeAlgorithm=D,m._closeAlgorithm=G,m._abortAlgorithm=se;var Er=Dp(m);Rp(u,Er);var qr=S(),zr=h(qr);j(zr,function(){m._started=!0,rl(m)},function(Wr){m._started=!0,Et(u,Wr)})}function NS(u,m,S,D){var G=Object.create(Co.prototype),se=function(){},ge=function(){return h(void 0)},Xe=function(){return h(void 0)},Er=function(){return h(void 0)};m.start!==void 0&&(se=function(){return m.start(G)}),m.write!==void 0&&(ge=function(qr){return m.write(qr,G)}),m.close!==void 0&&(Xe=function(){return m.close()}),m.abort!==void 0&&(Er=function(qr){return m.abort(qr)}),cg(u,G,se,ge,Xe,Er,S,D)}function el(u){u._writeAlgorithm=void 0,u._closeAlgorithm=void 0,u._abortAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function MS(u){vt(u,ug,0),rl(u)}function HS(u,m){try{return u._strategySizeAlgorithm(m)}catch(S){return zp(u,S),1}}function lg(u){return u._strategyHWM-u._queueTotalSize}function VS(u,m,S){try{vt(u,m,S)}catch(se){zp(u,se);return}var D=u._controlledWritableStream;if(!mi(D)&&D._state==="writable"){var G=Dp(u);Rp(D,G)}rl(u)}function rl(u){var m=u._controlledWritableStream;if(!!u._started&&m._inFlightWriteRequest===void 0){var S=m._state;if(S==="erroring"){gt(m);return}if(u._queue.length!==0){var D=ra(u);D===ug?$S(u):WS(u,D)}}}function zp(u,m){u._controlledWritableStream._state==="writable"&&fg(u,m)}function $S(u){var m=u._controlledWritableStream;RS(m),st(u);var S=u._closeAlgorithm();el(u),j(S,function(){di(m)},function(D){cs(m,D)})}function WS(u,m){var S=u._controlledWritableStream;OS(S);var D=u._writeAlgorithm(m);j(D,function(){Rt(S);var G=S._state;if(st(u),!mi(S)&&G==="writable"){var se=Dp(u);Rp(S,se)}rl(u)},function(G){S._state==="writable"&&el(u),Po(S,G)})}function Dp(u){var m=lg(u);return m<=0}function fg(u,m){var S=u._controlledWritableStream;el(u),mn(S,m)}function al(u){return new TypeError("WritableStream.prototype."+u+" can only be used on a WritableStream")}function Lp(u){return new TypeError("WritableStreamDefaultController.prototype."+u+" can only be used on a WritableStreamDefaultController")}function Fo(u){return new TypeError("WritableStreamDefaultWriter.prototype."+u+" can only be used on a WritableStreamDefaultWriter")}function xu(u){return new TypeError("Cannot "+u+" a stream using a released writer")}function tl(u){u._closedPromise=v(function(m,S){u._closedPromise_resolve=m,u._closedPromise_reject=S,u._closedPromiseState="pending"})}function pg(u,m){tl(u),Up(u,m)}function KS(u){tl(u),hg(u)}function Up(u,m){u._closedPromise_reject!==void 0&&(T(u._closedPromise),u._closedPromise_reject(m),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0,u._closedPromiseState="rejected")}function GS(u,m){pg(u,m)}function hg(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0,u._closedPromiseState="resolved")}function il(u){u._readyPromise=v(function(m,S){u._readyPromise_resolve=m,u._readyPromise_reject=S}),u._readyPromiseState="pending"}function Np(u,m){il(u),mg(u,m)}function dg(u){il(u),Mp(u)}function mg(u,m){u._readyPromise_reject!==void 0&&(T(u._readyPromise),u._readyPromise_reject(m),u._readyPromise_resolve=void 0,u._readyPromise_reject=void 0,u._readyPromiseState="rejected")}function YS(u){il(u)}function ZS(u,m){Np(u,m)}function Mp(u){u._readyPromise_resolve!==void 0&&(u._readyPromise_resolve(void 0),u._readyPromise_resolve=void 0,u._readyPromise_reject=void 0,u._readyPromiseState="fulfilled")}var vg=typeof DOMException!="undefined"?DOMException:void 0;function QS(u){if(!(typeof u=="function"||typeof u=="object"))return!1;try{return new u,!0}catch{return!1}}function XS(){var u=function(S,D){this.message=S||"",this.name=D||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return u.prototype=Object.create(Error.prototype),Object.defineProperty(u.prototype,"constructor",{value:u,writable:!0,configurable:!0}),u}var JS=QS(vg)?vg:XS();function gg(u,m,S,D,G,se){var ge=Gr(u),Xe=ie(m);u._disturbed=!0;var Er=!1,qr=h(void 0);return v(function(zr,Wr){var Oa;if(se!==void 0){if(Oa=function(){var xr=new JS("Aborted","AbortError"),Yr=[];D||Yr.push(function(){return m._state==="writable"?ca(m,xr):h(void 0)}),G||Yr.push(function(){return u._state==="readable"?vi(u,xr):h(void 0)}),$t(function(){return Promise.all(Yr.map(function(ba){return ba()}))},!0,xr)},se.aborted){Oa();return}se.addEventListener("abort",Oa)}function gi(){return v(function(xr,Yr){function ba(Li){Li?xr():y(hs(),ba,Yr)}ba(!1)})}function hs(){return Er?h(!0):y(Xe._readyPromise,function(){return v(function(xr,Yr){nr(ge,{_chunkSteps:function(ba){qr=y(sg(Xe,ba),void 0,a),xr(!1)},_closeSteps:function(){return xr(!0)},_errorSteps:Yr})})})}if(ft(u,ge._closedPromise,function(xr){D?gn(!0,xr):$t(function(){return ca(m,xr)},!0,xr)}),ft(m,Xe._closedPromise,function(xr){G?gn(!0,xr):$t(function(){return vi(u,xr)},!0,xr)}),Di(u,ge._closedPromise,function(){S?gn():$t(function(){return DS(Xe)})}),mi(m)||m._state==="closed"){var $n=new TypeError("the destination writable stream closed before all data could be piped to it");G?gn(!0,$n):$t(function(){return vi(u,$n)},!0,$n)}T(gi());function zi(){var xr=qr;return y(qr,function(){return xr!==qr?zi():void 0})}function ft(xr,Yr,ba){xr._state==="errored"?ba(xr._storedError):A(Yr,ba)}function Di(xr,Yr,ba){xr._state==="closed"?ba():w(Yr,ba)}function $t(xr,Yr,ba){if(Er)return;Er=!0,m._state==="writable"&&!mi(m)?w(zi(),Li):Li();function Li(){j(xr(),function(){return ga(Yr,ba)},function(Wn){return ga(!0,Wn)})}}function gn(xr,Yr){Er||(Er=!0,m._state==="writable"&&!mi(m)?w(zi(),function(){return ga(xr,Yr)}):ga(xr,Yr))}function ga(xr,Yr){og(Xe),V(ge),se!==void 0&&se.removeEventListener("abort",Oa),xr?Wr(Yr):zr(void 0)}})}var qo=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!nl(this))throw ul("desiredSize");return Hp(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!nl(this))throw ul("close");if(!fs(this))throw new TypeError("The stream is not in a state that permits close");ku(this)},u.prototype.enqueue=function(m){if(m===void 0&&(m=void 0),!nl(this))throw ul("enqueue");if(!fs(this))throw new TypeError("The stream is not in a state that permits enqueue");return sl(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!nl(this))throw ul("error");Mn(this,m)},u.prototype[Le]=function(m){ua(this);var S=this._cancelAlgorithm(m);return ol(this),S},u.prototype[Me]=function(m){var S=this._controlledReadableStream;if(this._queue.length>0){var D=st(this);this._closeRequested&&this._queue.length===0?(ol(this),_u(S)):wu(this),m._chunkSteps(D)}else J(S,m),wu(this)},u}();Object.defineProperties(qo.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(qo.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function nl(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableStream")?!1:u instanceof qo}function wu(u){var m=bg(u);if(!!m){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var S=u._pullAlgorithm();j(S,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,wu(u))},function(D){Mn(u,D)})}}function bg(u){var m=u._controlledReadableStream;if(!fs(u)||!u._started)return!1;if(Vn(m)&&Ke(m)>0)return!0;var S=Hp(u);return S>0}function ol(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function ku(u){if(!!fs(u)){var m=u._controlledReadableStream;u._closeRequested=!0,u._queue.length===0&&(ol(u),_u(m))}}function sl(u,m){if(!!fs(u)){var S=u._controlledReadableStream;if(Vn(S)&&Ke(S)>0)Be(S,m,!1);else{var D=void 0;try{D=u._strategySizeAlgorithm(m)}catch(G){throw Mn(u,G),G}try{vt(u,m,D)}catch(G){throw Mn(u,G),G}}wu(u)}}function Mn(u,m){var S=u._controlledReadableStream;S._state==="readable"&&(ua(u),ol(u),kg(S,m))}function Hp(u){var m=u._controlledReadableStream._state;return m==="errored"?null:m==="closed"?0:u._strategyHWM-u._queueTotalSize}function eE(u){return!bg(u)}function fs(u){var m=u._controlledReadableStream._state;return!u._closeRequested&&m==="readable"}function yg(u,m,S,D,G,se,ge){m._controlledReadableStream=u,m._queue=void 0,m._queueTotalSize=void 0,ua(m),m._started=!1,m._closeRequested=!1,m._pullAgain=!1,m._pulling=!1,m._strategySizeAlgorithm=ge,m._strategyHWM=se,m._pullAlgorithm=D,m._cancelAlgorithm=G,u._readableStreamController=m;var Xe=S();j(h(Xe),function(){m._started=!0,wu(m)},function(Er){Mn(m,Er)})}function rE(u,m,S,D){var G=Object.create(qo.prototype),se=function(){},ge=function(){return h(void 0)},Xe=function(){return h(void 0)};m.start!==void 0&&(se=function(){return m.start(G)}),m.pull!==void 0&&(ge=function(){return m.pull(G)}),m.cancel!==void 0&&(Xe=function(Er){return m.cancel(Er)}),yg(u,G,se,ge,Xe,S,D)}function ul(u){return new TypeError("ReadableStreamDefaultController.prototype."+u+" can only be used on a ReadableStreamDefaultController")}function aE(u,m){return va(u._readableStreamController)?iE(u):tE(u)}function tE(u,m){var S=Gr(u),D=!1,G=!1,se=!1,ge=!1,Xe,Er,qr,zr,Wr,Oa=v(function(ft){Wr=ft});function gi(){if(D)return G=!0,h(void 0);D=!0;var ft={_chunkSteps:function(Di){I(function(){G=!1;var $t=Di,gn=Di;se||sl(qr._readableStreamController,$t),ge||sl(zr._readableStreamController,gn),D=!1,G&&gi()})},_closeSteps:function(){D=!1,se||ku(qr._readableStreamController),ge||ku(zr._readableStreamController),(!se||!ge)&&Wr(void 0)},_errorSteps:function(){D=!1}};return nr(S,ft),h(void 0)}function hs(ft){if(se=!0,Xe=ft,ge){var Di=wr([Xe,Er]),$t=vi(u,Di);Wr($t)}return Oa}function $n(ft){if(ge=!0,Er=ft,se){var Di=wr([Xe,Er]),$t=vi(u,Di);Wr($t)}return Oa}function zi(){}return qr=Vp(zi,gi,hs),zr=Vp(zi,gi,$n),A(S._closedPromise,function(ft){Mn(qr._readableStreamController,ft),Mn(zr._readableStreamController,ft),(!se||!ge)&&Wr(void 0)}),[qr,zr]}function iE(u){var m=Gr(u),S=!1,D=!1,G=!1,se=!1,ge=!1,Xe,Er,qr,zr,Wr,Oa=v(function(ga){Wr=ga});function gi(ga){A(ga._closedPromise,function(xr){ga===m&&(Ce(qr._readableStreamController,xr),Ce(zr._readableStreamController,xr),(!se||!ge)&&Wr(void 0))})}function hs(){Ve(m)&&(V(m),m=Gr(u),gi(m));var ga={_chunkSteps:function(xr){I(function(){D=!1,G=!1;var Yr=xr,ba=xr;if(!se&&!ge)try{ba=Ia(xr)}catch(Li){Ce(qr._readableStreamController,Li),Ce(zr._readableStreamController,Li),Wr(vi(u,Li));return}se||Se(qr._readableStreamController,Yr),ge||Se(zr._readableStreamController,ba),S=!1,D?zi():G&&ft()})},_closeSteps:function(){S=!1,se||Ie(qr._readableStreamController),ge||Ie(zr._readableStreamController),qr._readableStreamController._pendingPullIntos.length>0&&Qe(qr._readableStreamController,0),zr._readableStreamController._pendingPullIntos.length>0&&Qe(zr._readableStreamController,0),(!se||!ge)&&Wr(void 0)},_errorSteps:function(){S=!1}};nr(m,ga)}function $n(ga,xr){Je(m)&&(V(m),m=X(u),gi(m));var Yr=xr?zr:qr,ba=xr?qr:zr,Li={_chunkSteps:function(Wn){I(function(){D=!1,G=!1;var ds=xr?ge:se,Au=xr?se:ge;if(Au)ds||Te(Yr._readableStreamController,Wn);else{var Rg=void 0;try{Rg=Ia(Wn)}catch(Gp){Ce(Yr._readableStreamController,Gp),Ce(ba._readableStreamController,Gp),Wr(vi(u,Gp));return}ds||Te(Yr._readableStreamController,Wn),Se(ba._readableStreamController,Rg)}S=!1,D?zi():G&&ft()})},_closeSteps:function(Wn){S=!1;var ds=xr?ge:se,Au=xr?se:ge;ds||Ie(Yr._readableStreamController),Au||Ie(ba._readableStreamController),Wn!==void 0&&(ds||Te(Yr._readableStreamController,Wn),!Au&&ba._readableStreamController._pendingPullIntos.length>0&&Qe(ba._readableStreamController,0)),(!ds||!Au)&&Wr(void 0)},_errorSteps:function(){S=!1}};fr(m,ga,Li)}function zi(){if(S)return D=!0,h(void 0);S=!0;var ga=Fe(qr._readableStreamController);return ga===null?hs():$n(ga._view,!1),h(void 0)}function ft(){if(S)return G=!0,h(void 0);S=!0;var ga=Fe(zr._readableStreamController);return ga===null?hs():$n(ga._view,!0),h(void 0)}function Di(ga){if(se=!0,Xe=ga,ge){var xr=wr([Xe,Er]),Yr=vi(u,xr);Wr(Yr)}return Oa}function $t(ga){if(ge=!0,Er=ga,se){var xr=wr([Xe,Er]),Yr=vi(u,xr);Wr(Yr)}return Oa}function gn(){}return qr=wg(gn,zi,Di),zr=wg(gn,ft,$t),gi(m),[qr,zr]}function nE(u,m){Ze(u,m);var S=u,D=S==null?void 0:S.autoAllocateChunkSize,G=S==null?void 0:S.cancel,se=S==null?void 0:S.pull,ge=S==null?void 0:S.start,Xe=S==null?void 0:S.type;return{autoAllocateChunkSize:D===void 0?void 0:ur(D,m+" has member 'autoAllocateChunkSize' that"),cancel:G===void 0?void 0:oE(G,S,m+" has member 'cancel' that"),pull:se===void 0?void 0:sE(se,S,m+" has member 'pull' that"),start:ge===void 0?void 0:uE(ge,S,m+" has member 'start' that"),type:Xe===void 0?void 0:cE(Xe,m+" has member 'type' that")}}function oE(u,m,S){return We(u,S),function(D){return R(u,m,[D])}}function sE(u,m,S){return We(u,S),function(D){return R(u,m,[D])}}function uE(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function cE(u,m){if(u=""+u,u!=="bytes")throw new TypeError(m+" '"+u+"' is not a valid enumeration value for ReadableStreamType");return u}function lE(u,m){Ze(u,m);var S=u==null?void 0:u.mode;return{mode:S===void 0?void 0:fE(S,m+" has member 'mode' that")}}function fE(u,m){if(u=""+u,u!=="byob")throw new TypeError(m+" '"+u+"' is not a valid enumeration value for ReadableStreamReaderMode");return u}function pE(u,m){Ze(u,m);var S=u==null?void 0:u.preventCancel;return{preventCancel:Boolean(S)}}function xg(u,m){Ze(u,m);var S=u==null?void 0:u.preventAbort,D=u==null?void 0:u.preventCancel,G=u==null?void 0:u.preventClose,se=u==null?void 0:u.signal;return se!==void 0&&hE(se,m+" has member 'signal' that"),{preventAbort:Boolean(S),preventCancel:Boolean(D),preventClose:Boolean(G),signal:se}}function hE(u,m){if(!_(u))throw new TypeError(m+" is not an AbortSignal.")}function dE(u,m){Ze(u,m);var S=u==null?void 0:u.readable;fe(S,"readable","ReadableWritablePair"),Or(S,m+" has member 'readable' that");var D=u==null?void 0:u.writable;return fe(D,"writable","ReadableWritablePair"),Tr(D,m+" has member 'writable' that"),{readable:S,writable:D}}var vn=function(){function u(m,S){m===void 0&&(m={}),S===void 0&&(S={}),m===void 0?m=null:rr(m,"First parameter");var D=yr(S,"Second parameter"),G=nE(m,"First parameter");if($p(this),G.type==="bytes"){if(D.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var se=sr(D,0);Ae(this,G,se)}else{var ge=L(D),se=sr(D,1);rE(this,G,se,ge)}}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Hn(this))throw Bo("locked");return Vn(this)},enumerable:!1,configurable:!0}),u.prototype.cancel=function(m){return m===void 0&&(m=void 0),Hn(this)?Vn(this)?d(new TypeError("Cannot cancel a stream that already has a reader")):vi(this,m):d(Bo("cancel"))},u.prototype.getReader=function(m){if(m===void 0&&(m=void 0),!Hn(this))throw Bo("getReader");var S=lE(m,"First parameter");return S.mode===void 0?Gr(this):X(this)},u.prototype.pipeThrough=function(m,S){if(S===void 0&&(S={}),!Hn(this))throw Bo("pipeThrough");qe(m,1,"pipeThrough");var D=dE(m,"First parameter"),G=xg(S,"Second parameter");if(Vn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Fr(D.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var se=gg(this,D.writable,G.preventClose,G.preventAbort,G.preventCancel,G.signal);return T(se),D.readable},u.prototype.pipeTo=function(m,S){if(S===void 0&&(S={}),!Hn(this))return d(Bo("pipeTo"));if(m===void 0)return d("Parameter 1 is required in 'pipeTo'.");if(!Re(m))return d(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var D;try{D=xg(S,"Second parameter")}catch(G){return d(G)}return Vn(this)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Fr(m)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):gg(this,m,D.preventClose,D.preventAbort,D.preventCancel,D.signal)},u.prototype.tee=function(){if(!Hn(this))throw Bo("tee");var m=aE(this);return wr(m)},u.prototype.values=function(m){if(m===void 0&&(m=void 0),!Hn(this))throw Bo("values");var S=pE(m,"First parameter");return pr(this,S.preventCancel)},u}();Object.defineProperties(vn.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(vn.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(vn.prototype,r.asyncIterator,{value:vn.prototype.values,writable:!0,configurable:!0});function Vp(u,m,S,D,G){D===void 0&&(D=1),G===void 0&&(G=function(){return 1});var se=Object.create(vn.prototype);$p(se);var ge=Object.create(qo.prototype);return yg(se,ge,u,m,S,D,G),se}function wg(u,m,S){var D=Object.create(vn.prototype);$p(D);var G=Object.create(Ra.prototype);return Ee(D,G,u,m,S,0,void 0),D}function $p(u){u._state="readable",u._reader=void 0,u._storedError=void 0,u._disturbed=!1}function Hn(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readableStreamController")?!1:u instanceof vn}function Vn(u){return u._reader!==void 0}function vi(u,m){if(u._disturbed=!0,u._state==="closed")return h(void 0);if(u._state==="errored")return d(u._storedError);_u(u);var S=u._reader;S!==void 0&&Ve(S)&&(S._readIntoRequests.forEach(function(G){G._closeSteps(void 0)}),S._readIntoRequests=new U);var D=u._readableStreamController[Le](m);return P(D,a)}function _u(u){u._state="closed";var m=u._reader;m!==void 0&&(ce(m),Je(m)&&(m._readRequests.forEach(function(S){S._closeSteps()}),m._readRequests=new U))}function kg(u,m){u._state="errored",u._storedError=m;var S=u._reader;S!==void 0&&(je(S,m),Je(S)?(S._readRequests.forEach(function(D){D._errorSteps(m)}),S._readRequests=new U):(S._readIntoRequests.forEach(function(D){D._errorSteps(m)}),S._readIntoRequests=new U))}function Bo(u){return new TypeError("ReadableStream.prototype."+u+" can only be used on a ReadableStream")}function _g(u,m){Ze(u,m);var S=u==null?void 0:u.highWaterMark;return fe(S,"highWaterMark","QueuingStrategyInit"),{highWaterMark:we(S)}}var jg=function(u){return u.byteLength};try{Object.defineProperty(jg,"name",{value:"size",configurable:!0})}catch{}var ju=function(){function u(m){qe(m,1,"ByteLengthQueuingStrategy"),m=_g(m,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=m.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!Eg(this))throw Sg("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!Eg(this))throw Sg("size");return jg},enumerable:!1,configurable:!0}),u}();Object.defineProperties(ju.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ju.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Sg(u){return new TypeError("ByteLengthQueuingStrategy.prototype."+u+" can only be used on a ByteLengthQueuingStrategy")}function Eg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_byteLengthQueuingStrategyHighWaterMark")?!1:u instanceof ju}var Ag=function(){return 1};try{Object.defineProperty(Ag,"name",{value:"size",configurable:!0})}catch{}var Su=function(){function u(m){qe(m,1,"CountQueuingStrategy"),m=_g(m,"First parameter"),this._countQueuingStrategyHighWaterMark=m.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!Tg(this))throw Pg("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!Tg(this))throw Pg("size");return Ag},enumerable:!1,configurable:!0}),u}();Object.defineProperties(Su.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Su.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Pg(u){return new TypeError("CountQueuingStrategy.prototype."+u+" can only be used on a CountQueuingStrategy")}function Tg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_countQueuingStrategyHighWaterMark")?!1:u instanceof Su}function mE(u,m){Ze(u,m);var S=u==null?void 0:u.flush,D=u==null?void 0:u.readableType,G=u==null?void 0:u.start,se=u==null?void 0:u.transform,ge=u==null?void 0:u.writableType;return{flush:S===void 0?void 0:vE(S,u,m+" has member 'flush' that"),readableType:D,start:G===void 0?void 0:gE(G,u,m+" has member 'start' that"),transform:se===void 0?void 0:bE(se,u,m+" has member 'transform' that"),writableType:ge}}function vE(u,m,S){return We(u,S),function(D){return R(u,m,[D])}}function gE(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function bE(u,m,S){return We(u,S),function(D,G){return R(u,m,[D,G])}}var Eu=function(){function u(m,S,D){m===void 0&&(m={}),S===void 0&&(S={}),D===void 0&&(D={}),m===void 0&&(m=null);var G=yr(S,"Second parameter"),se=yr(D,"Third parameter"),ge=mE(m,"First parameter");if(ge.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(ge.writableType!==void 0)throw new RangeError("Invalid writableType specified");var Xe=sr(se,0),Er=L(se),qr=sr(G,1),zr=L(G),Wr,Oa=v(function(gi){Wr=gi});yE(this,Oa,qr,zr,Xe,Er),wE(this,ge),ge.start!==void 0?Wr(ge.start(this._transformStreamController)):Wr(void 0)}return Object.defineProperty(u.prototype,"readable",{get:function(){if(!Cg(this))throw Ig("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"writable",{get:function(){if(!Cg(this))throw Ig("writable");return this._writable},enumerable:!1,configurable:!0}),u}();Object.defineProperties(Eu.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Eu.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function yE(u,m,S,D,G,se){function ge(){return m}function Xe(Oa){return jE(u,Oa)}function Er(Oa){return SE(u,Oa)}function qr(){return EE(u)}u._writable=ue(ge,Xe,qr,Er,S,D);function zr(){return AE(u)}function Wr(Oa){return ll(u,Oa),h(void 0)}u._readable=Vp(ge,zr,Wr,G,se),u._backpressure=void 0,u._backpressureChangePromise=void 0,u._backpressureChangePromise_resolve=void 0,fl(u,!0),u._transformStreamController=void 0}function Cg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_transformStreamController")?!1:u instanceof Eu}function cl(u,m){Mn(u._readable._readableStreamController,m),ll(u,m)}function ll(u,m){Fg(u._transformStreamController),zp(u._writable._writableStreamController,m),u._backpressure&&fl(u,!1)}function fl(u,m){u._backpressureChangePromise!==void 0&&u._backpressureChangePromise_resolve(),u._backpressureChangePromise=v(function(S){u._backpressureChangePromise_resolve=S}),u._backpressure=m}var ps=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!pl(this))throw hl("desiredSize");var m=this._controlledTransformStream._readable._readableStreamController;return Hp(m)},enumerable:!1,configurable:!0}),u.prototype.enqueue=function(m){if(m===void 0&&(m=void 0),!pl(this))throw hl("enqueue");qg(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!pl(this))throw hl("error");kE(this,m)},u.prototype.terminate=function(){if(!pl(this))throw hl("terminate");_E(this)},u}();Object.defineProperties(ps.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ps.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function pl(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledTransformStream")?!1:u instanceof ps}function xE(u,m,S,D){m._controlledTransformStream=u,u._transformStreamController=m,m._transformAlgorithm=S,m._flushAlgorithm=D}function wE(u,m){var S=Object.create(ps.prototype),D=function(se){try{return qg(S,se),h(void 0)}catch(ge){return d(ge)}},G=function(){return h(void 0)};m.transform!==void 0&&(D=function(se){return m.transform(se,S)}),m.flush!==void 0&&(G=function(){return m.flush(S)}),xE(u,S,D,G)}function Fg(u){u._transformAlgorithm=void 0,u._flushAlgorithm=void 0}function qg(u,m){var S=u._controlledTransformStream,D=S._readable._readableStreamController;if(!fs(D))throw new TypeError("Readable side is not in a state that permits enqueue");try{sl(D,m)}catch(se){throw ll(S,se),S._readable._storedError}var G=eE(D);G!==S._backpressure&&fl(S,!0)}function kE(u,m){cl(u._controlledTransformStream,m)}function Bg(u,m){var S=u._transformAlgorithm(m);return P(S,void 0,function(D){throw cl(u._controlledTransformStream,D),D})}function _E(u){var m=u._controlledTransformStream,S=m._readable._readableStreamController;ku(S);var D=new TypeError("TransformStream terminated");ll(m,D)}function jE(u,m){var S=u._transformStreamController;if(u._backpressure){var D=u._backpressureChangePromise;return P(D,function(){var G=u._writable,se=G._state;if(se==="erroring")throw G._storedError;return Bg(S,m)})}return Bg(S,m)}function SE(u,m){return cl(u,m),h(void 0)}function EE(u){var m=u._readable,S=u._transformStreamController,D=S._flushAlgorithm();return Fg(S),P(D,function(){if(m._state==="errored")throw m._storedError;ku(m._readableStreamController)},function(G){throw cl(u,G),m._storedError})}function AE(u){return fl(u,!1),u._backpressureChangePromise}function hl(u){return new TypeError("TransformStreamDefaultController.prototype."+u+" can only be used on a TransformStreamDefaultController")}function Ig(u){return new TypeError("TransformStream.prototype."+u+" can only be used on a TransformStream")}var Wp={ReadableStream:vn,ReadableStreamDefaultController:qo,ReadableByteStreamController:Ra,ReadableStreamBYOBRequest:da,ReadableStreamDefaultReader:Ye,ReadableStreamBYOBReader:ne,WritableStream:H,WritableStreamDefaultController:Co,WritableStreamDefaultWriter:ls,ByteLengthQueuingStrategy:ju,CountQueuingStrategy:Su,TransformStream:Eu,TransformStreamDefaultController:ps};if(typeof t!="undefined")for(var Kp in Wp)Object.prototype.hasOwnProperty.call(Wp,Kp)&&Object.defineProperty(t,Kp,{value:Wp[Kp],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=ju,e.CountQueuingStrategy=Su,e.ReadableByteStreamController=Ra,e.ReadableStream=vn,e.ReadableStreamBYOBReader=ne,e.ReadableStreamBYOBRequest=da,e.ReadableStreamDefaultController=qo,e.ReadableStreamDefaultReader=Ye,e.TransformStream=Eu,e.TransformStreamDefaultController=ps,e.WritableStream=H,e.WritableStreamDefaultController=Co,e.WritableStreamDefaultWriter=ls,Object.defineProperty(e,"__esModule",{value:!0})})});var zn=O(Bt=>{"use strict";var lN=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function fN(e,r){return Object.prototype.hasOwnProperty.call(e,r)}Bt.assign=function(e){for(var r=Array.prototype.slice.call(arguments,1);r.length;){var a=r.shift();if(!!a){if(typeof a!="object")throw new TypeError(a+"must be non-object");for(var i in a)fN(a,i)&&(e[i]=a[i])}}return e};Bt.shrinkBuf=function(e,r){return e.length===r?e:e.subarray?e.subarray(0,r):(e.length=r,e)};var pN={arraySet:function(e,r,a,i,t){if(r.subarray&&e.subarray){e.set(r.subarray(a,a+i),t);return}for(var n=0;n<i;n++)e[t+n]=r[a+n]},flattenChunks:function(e){var r,a,i,t,n,o;for(i=0,r=0,a=e.length;r<a;r++)i+=e[r].length;for(o=new Uint8Array(i),t=0,r=0,a=e.length;r<a;r++)n=e[r],o.set(n,t),t+=n.length;return o}},hN={arraySet:function(e,r,a,i,t){for(var n=0;n<i;n++)e[t+n]=r[a+n]},flattenChunks:function(e){return[].concat.apply([],e)}};Bt.setTyped=function(e){e?(Bt.Buf8=Uint8Array,Bt.Buf16=Uint16Array,Bt.Buf32=Int32Array,Bt.assign(Bt,pN)):(Bt.Buf8=Array,Bt.Buf16=Array,Bt.Buf32=Array,Bt.assign(Bt,hN))};Bt.setTyped(lN)});var p4=O(pu=>{"use strict";var dN=zn(),mN=4,V8=0,$8=1,vN=2;function lu(e){for(var r=e.length;--r>=0;)e[r]=0}var gN=0,W8=1,bN=2,yN=3,xN=258,x0=29,zc=256,Dc=zc+1+x0,fu=30,w0=19,K8=2*Dc+1,es=15,k0=16,wN=7,_0=256,G8=16,Y8=17,Z8=18,j0=[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],gp=[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],kN=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Q8=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],_N=512,Dn=new Array((Dc+2)*2);lu(Dn);var Lc=new Array(fu*2);lu(Lc);var Uc=new Array(_N);lu(Uc);var Nc=new Array(xN-yN+1);lu(Nc);var S0=new Array(x0);lu(S0);var bp=new Array(fu);lu(bp);function E0(e,r,a,i,t){this.static_tree=e,this.extra_bits=r,this.extra_base=a,this.elems=i,this.max_length=t,this.has_stree=e&&e.length}var X8,J8,e4;function A0(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}function r4(e){return e<256?Uc[e]:Uc[256+(e>>>7)]}function Mc(e,r){e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255}function Ht(e,r,a){e.bi_valid>k0-a?(e.bi_buf|=r<<e.bi_valid&65535,Mc(e,e.bi_buf),e.bi_buf=r>>k0-e.bi_valid,e.bi_valid+=a-k0):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=a)}function ln(e,r,a){Ht(e,a[r*2],a[r*2+1])}function a4(e,r){var a=0;do a|=e&1,e>>>=1,a<<=1;while(--r>0);return a>>>1}function jN(e){e.bi_valid===16?(Mc(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function SN(e,r){var a=r.dyn_tree,i=r.max_code,t=r.stat_desc.static_tree,n=r.stat_desc.has_stree,o=r.stat_desc.extra_bits,s=r.stat_desc.extra_base,c=r.stat_desc.max_length,l,f,v,h,d,y,j=0;for(h=0;h<=es;h++)e.bl_count[h]=0;for(a[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<K8;l++)f=e.heap[l],h=a[a[f*2+1]*2+1]+1,h>c&&(h=c,j++),a[f*2+1]=h,!(f>i)&&(e.bl_count[h]++,d=0,f>=s&&(d=o[f-s]),y=a[f*2],e.opt_len+=y*(h+d),n&&(e.static_len+=y*(t[f*2+1]+d)));if(j!==0){do{for(h=c-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,j-=2}while(j>0);for(h=c;h!==0;h--)for(f=e.bl_count[h];f!==0;)v=e.heap[--l],!(v>i)&&(a[v*2+1]!==h&&(e.opt_len+=(h-a[v*2+1])*a[v*2],a[v*2+1]=h),f--)}}function t4(e,r,a){var i=new Array(es+1),t=0,n,o;for(n=1;n<=es;n++)i[n]=t=t+a[n-1]<<1;for(o=0;o<=r;o++){var s=e[o*2+1];s!==0&&(e[o*2]=a4(i[s]++,s))}}function EN(){var e,r,a,i,t,n=new Array(es+1);for(a=0,i=0;i<x0-1;i++)for(S0[i]=a,e=0;e<1<<j0[i];e++)Nc[a++]=i;for(Nc[a-1]=i,t=0,i=0;i<16;i++)for(bp[i]=t,e=0;e<1<<gp[i];e++)Uc[t++]=i;for(t>>=7;i<fu;i++)for(bp[i]=t<<7,e=0;e<1<<gp[i]-7;e++)Uc[256+t++]=i;for(r=0;r<=es;r++)n[r]=0;for(e=0;e<=143;)Dn[e*2+1]=8,e++,n[8]++;for(;e<=255;)Dn[e*2+1]=9,e++,n[9]++;for(;e<=279;)Dn[e*2+1]=7,e++,n[7]++;for(;e<=287;)Dn[e*2+1]=8,e++,n[8]++;for(t4(Dn,Dc+1,n),e=0;e<fu;e++)Lc[e*2+1]=5,Lc[e*2]=a4(e,5);X8=new E0(Dn,j0,zc+1,Dc,es),J8=new E0(Lc,gp,0,fu,es),e4=new E0(new Array(0),kN,0,w0,wN)}function i4(e){var r;for(r=0;r<Dc;r++)e.dyn_ltree[r*2]=0;for(r=0;r<fu;r++)e.dyn_dtree[r*2]=0;for(r=0;r<w0;r++)e.bl_tree[r*2]=0;e.dyn_ltree[_0*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function n4(e){e.bi_valid>8?Mc(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function AN(e,r,a,i){n4(e),i&&(Mc(e,a),Mc(e,~a)),dN.arraySet(e.pending_buf,e.window,r,a,e.pending),e.pending+=a}function o4(e,r,a,i){var t=r*2,n=a*2;return e[t]<e[n]||e[t]===e[n]&&i[r]<=i[a]}function P0(e,r,a){for(var i=e.heap[a],t=a<<1;t<=e.heap_len&&(t<e.heap_len&&o4(r,e.heap[t+1],e.heap[t],e.depth)&&t++,!o4(r,i,e.heap[t],e.depth));)e.heap[a]=e.heap[t],a=t,t<<=1;e.heap[a]=i}function s4(e,r,a){var i,t,n=0,o,s;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+n*2]<<8|e.pending_buf[e.d_buf+n*2+1],t=e.pending_buf[e.l_buf+n],n++,i===0?ln(e,t,r):(o=Nc[t],ln(e,o+zc+1,r),s=j0[o],s!==0&&(t-=S0[o],Ht(e,t,s)),i--,o=r4(i),ln(e,o,a),s=gp[o],s!==0&&(i-=bp[o],Ht(e,i,s)));while(n<e.last_lit);ln(e,_0,r)}function T0(e,r){var a=r.dyn_tree,i=r.stat_desc.static_tree,t=r.stat_desc.has_stree,n=r.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=K8,o=0;o<n;o++)a[o*2]!==0?(e.heap[++e.heap_len]=c=o,e.depth[o]=0):a[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,a[l*2]=1,e.depth[l]=0,e.opt_len--,t&&(e.static_len-=i[l*2+1]);for(r.max_code=c,o=e.heap_len>>1;o>=1;o--)P0(e,a,o);l=n;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],P0(e,a,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,a[l*2]=a[o*2]+a[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,a[o*2+1]=a[s*2+1]=l,e.heap[1]=l++,P0(e,a,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],SN(e,r),t4(a,c,e.bl_count)}function u4(e,r,a){var i,t=-1,n,o=r[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r[(a+1)*2+1]=65535,i=0;i<=a;i++)n=o,o=r[(i+1)*2+1],!(++s<c&&n===o)&&(s<l?e.bl_tree[n*2]+=s:n!==0?(n!==t&&e.bl_tree[n*2]++,e.bl_tree[G8*2]++):s<=10?e.bl_tree[Y8*2]++:e.bl_tree[Z8*2]++,s=0,t=n,o===0?(c=138,l=3):n===o?(c=6,l=3):(c=7,l=4))}function c4(e,r,a){var i,t=-1,n,o=r[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),i=0;i<=a;i++)if(n=o,o=r[(i+1)*2+1],!(++s<c&&n===o)){if(s<l)do ln(e,n,e.bl_tree);while(--s!=0);else n!==0?(n!==t&&(ln(e,n,e.bl_tree),s--),ln(e,G8,e.bl_tree),Ht(e,s-3,2)):s<=10?(ln(e,Y8,e.bl_tree),Ht(e,s-3,3)):(ln(e,Z8,e.bl_tree),Ht(e,s-11,7));s=0,t=n,o===0?(c=138,l=3):n===o?(c=6,l=3):(c=7,l=4)}}function PN(e){var r;for(u4(e,e.dyn_ltree,e.l_desc.max_code),u4(e,e.dyn_dtree,e.d_desc.max_code),T0(e,e.bl_desc),r=w0-1;r>=3&&e.bl_tree[Q8[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r}function TN(e,r,a,i){var t;for(Ht(e,r-257,5),Ht(e,a-1,5),Ht(e,i-4,4),t=0;t<i;t++)Ht(e,e.bl_tree[Q8[t]*2+1],3);c4(e,e.dyn_ltree,r-1),c4(e,e.dyn_dtree,a-1)}function CN(e){var r=4093624447,a;for(a=0;a<=31;a++,r>>>=1)if(r&1&&e.dyn_ltree[a*2]!==0)return V8;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return $8;for(a=32;a<zc;a++)if(e.dyn_ltree[a*2]!==0)return $8;return V8}var l4=!1;function FN(e){l4||(EN(),l4=!0),e.l_desc=new A0(e.dyn_ltree,X8),e.d_desc=new A0(e.dyn_dtree,J8),e.bl_desc=new A0(e.bl_tree,e4),e.bi_buf=0,e.bi_valid=0,i4(e)}function f4(e,r,a,i){Ht(e,(gN<<1)+(i?1:0),3),AN(e,r,a,!0)}function qN(e){Ht(e,W8<<1,3),ln(e,_0,Dn),jN(e)}function BN(e,r,a,i){var t,n,o=0;e.level>0?(e.strm.data_type===vN&&(e.strm.data_type=CN(e)),T0(e,e.l_desc),T0(e,e.d_desc),o=PN(e),t=e.opt_len+3+7>>>3,n=e.static_len+3+7>>>3,n<=t&&(t=n)):t=n=a+5,a+4<=t&&r!==-1?f4(e,r,a,i):e.strategy===mN||n===t?(Ht(e,(W8<<1)+(i?1:0),3),s4(e,Dn,Lc)):(Ht(e,(bN<<1)+(i?1:0),3),TN(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),s4(e,e.dyn_ltree,e.dyn_dtree)),i4(e),i&&n4(e)}function IN(e,r,a){return e.pending_buf[e.d_buf+e.last_lit*2]=r>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=r&255,e.pending_buf[e.l_buf+e.last_lit]=a&255,e.last_lit++,r===0?e.dyn_ltree[a*2]++:(e.matches++,r--,e.dyn_ltree[(Nc[a]+zc+1)*2]++,e.dyn_dtree[r4(r)*2]++),e.last_lit===e.lit_bufsize-1}pu._tr_init=FN;pu._tr_stored_block=f4;pu._tr_flush_block=BN;pu._tr_tally=IN;pu._tr_align=qN});var C0=O((jZ,h4)=>{"use strict";function RN(e,r,a,i){for(var t=e&65535|0,n=e>>>16&65535|0,o=0;a!==0;){o=a>2e3?2e3:a,a-=o;do t=t+r[i++]|0,n=n+t|0;while(--o);t%=65521,n%=65521}return t|n<<16|0}h4.exports=RN});var F0=O((SZ,d4)=>{"use strict";function ON(){for(var e,r=[],a=0;a<256;a++){e=a;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;r[a]=e}return r}var zN=ON();function DN(e,r,a,i){var t=zN,n=i+a;e^=-1;for(var o=i;o<n;o++)e=e>>>8^t[(e^r[o])&255];return e^-1}d4.exports=DN});var yp=O((EZ,m4)=>{"use strict";m4.exports={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"}});var j4=O(hn=>{"use strict";var It=zn(),fi=p4(),v4=C0(),ko=F0(),LN=yp(),rs=0,UN=1,NN=3,_o=4,g4=5,fn=0,b4=1,pi=-2,MN=-3,q0=-5,HN=-1,VN=1,xp=2,$N=3,WN=4,KN=0,GN=2,wp=8,YN=9,ZN=15,QN=8,XN=29,JN=256,B0=JN+1+XN,eM=30,rM=19,aM=2*B0+1,tM=15,Nr=3,jo=258,Ri=jo+Nr+1,iM=32,kp=42,I0=69,_p=73,jp=91,Sp=103,as=113,Hc=666,Ja=1,Vc=2,ts=3,hu=4,nM=3;function So(e,r){return e.msg=LN[r],r}function y4(e){return(e<<1)-(e>4?9:0)}function Eo(e){for(var r=e.length;--r>=0;)e[r]=0}function Ao(e){var r=e.state,a=r.pending;a>e.avail_out&&(a=e.avail_out),a!==0&&(It.arraySet(e.output,r.pending_buf,r.pending_out,a,e.next_out),e.next_out+=a,r.pending_out+=a,e.total_out+=a,e.avail_out-=a,r.pending-=a,r.pending===0&&(r.pending_out=0))}function mt(e,r){fi._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,Ao(e.strm)}function Kr(e,r){e.pending_buf[e.pending++]=r}function $c(e,r){e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255}function oM(e,r,a,i){var t=e.avail_in;return t>i&&(t=i),t===0?0:(e.avail_in-=t,It.arraySet(r,e.input,e.next_in,t,a),e.state.wrap===1?e.adler=v4(e.adler,r,t,a):e.state.wrap===2&&(e.adler=ko(e.adler,r,t,a)),e.next_in+=t,e.total_in+=t,t)}function x4(e,r){var a=e.max_chain_length,i=e.strstart,t,n,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-Ri?e.strstart-(e.w_size-Ri):0,l=e.window,f=e.w_mask,v=e.prev,h=e.strstart+jo,d=l[i+o-1],y=l[i+o];e.prev_length>=e.good_match&&(a>>=2),s>e.lookahead&&(s=e.lookahead);do if(t=r,!(l[t+o]!==y||l[t+o-1]!==d||l[t]!==l[i]||l[++t]!==l[i+1])){i+=2,t++;do;while(l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&i<h);if(n=jo-(h-i),i=h-jo,n>o){if(e.match_start=r,o=n,n>=s)break;d=l[i+o-1],y=l[i+o]}}while((r=v[r&f])>c&&--a!=0);return o<=e.lookahead?o:e.lookahead}function is(e){var r=e.w_size,a,i,t,n,o;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-Ri)){It.arraySet(e.window,e.window,r,r,0),e.match_start-=r,e.strstart-=r,e.block_start-=r,i=e.hash_size,a=i;do t=e.head[--a],e.head[a]=t>=r?t-r:0;while(--i);i=r,a=i;do t=e.prev[--a],e.prev[a]=t>=r?t-r:0;while(--i);n+=r}if(e.strm.avail_in===0)break;if(i=oM(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=i,e.lookahead+e.insert>=Nr)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+Nr-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<Nr)););}while(e.lookahead<Ri&&e.strm.avail_in!==0)}function sM(e,r){var a=65535;for(a>e.pending_buf_size-5&&(a=e.pending_buf_size-5);;){if(e.lookahead<=1){if(is(e),e.lookahead===0&&r===rs)return Ja;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+a;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,mt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Ri&&(mt(e,!1),e.strm.avail_out===0))return Ja}return e.insert=0,r===_o?(mt(e,!0),e.strm.avail_out===0?ts:hu):(e.strstart>e.block_start&&(mt(e,!1),e.strm.avail_out===0),Ja)}function R0(e,r){for(var a,i;;){if(e.lookahead<Ri){if(is(e),e.lookahead<Ri&&r===rs)return Ja;if(e.lookahead===0)break}if(a=0,e.lookahead>=Nr&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Nr-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),a!==0&&e.strstart-a<=e.w_size-Ri&&(e.match_length=x4(e,a)),e.match_length>=Nr)if(i=fi._tr_tally(e,e.strstart-e.match_start,e.match_length-Nr),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Nr){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Nr-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!=0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=fi._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(mt(e,!1),e.strm.avail_out===0))return Ja}return e.insert=e.strstart<Nr-1?e.strstart:Nr-1,r===_o?(mt(e,!0),e.strm.avail_out===0?ts:hu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:Vc}function du(e,r){for(var a,i,t;;){if(e.lookahead<Ri){if(is(e),e.lookahead<Ri&&r===rs)return Ja;if(e.lookahead===0)break}if(a=0,e.lookahead>=Nr&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Nr-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Nr-1,a!==0&&e.prev_length<e.max_lazy_match&&e.strstart-a<=e.w_size-Ri&&(e.match_length=x4(e,a),e.match_length<=5&&(e.strategy===VN||e.match_length===Nr&&e.strstart-e.match_start>4096)&&(e.match_length=Nr-1)),e.prev_length>=Nr&&e.match_length<=e.prev_length){t=e.strstart+e.lookahead-Nr,i=fi._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-Nr),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=t&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Nr-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!=0);if(e.match_available=0,e.match_length=Nr-1,e.strstart++,i&&(mt(e,!1),e.strm.avail_out===0))return Ja}else if(e.match_available){if(i=fi._tr_tally(e,0,e.window[e.strstart-1]),i&&mt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ja}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=fi._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Nr-1?e.strstart:Nr-1,r===_o?(mt(e,!0),e.strm.avail_out===0?ts:hu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:Vc}function uM(e,r){for(var a,i,t,n,o=e.window;;){if(e.lookahead<=jo){if(is(e),e.lookahead<=jo&&r===rs)return Ja;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Nr&&e.strstart>0&&(t=e.strstart-1,i=o[t],i===o[++t]&&i===o[++t]&&i===o[++t])){n=e.strstart+jo;do;while(i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&t<n);e.match_length=jo-(n-t),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Nr?(a=fi._tr_tally(e,1,e.match_length-Nr),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(a=fi._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),a&&(mt(e,!1),e.strm.avail_out===0))return Ja}return e.insert=0,r===_o?(mt(e,!0),e.strm.avail_out===0?ts:hu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:Vc}function cM(e,r){for(var a;;){if(e.lookahead===0&&(is(e),e.lookahead===0)){if(r===rs)return Ja;break}if(e.match_length=0,a=fi._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,a&&(mt(e,!1),e.strm.avail_out===0))return Ja}return e.insert=0,r===_o?(mt(e,!0),e.strm.avail_out===0?ts:hu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:Vc}function pn(e,r,a,i,t){this.good_length=e,this.max_lazy=r,this.nice_length=a,this.max_chain=i,this.func=t}var mu;mu=[new pn(0,0,0,0,sM),new pn(4,4,8,4,R0),new pn(4,5,16,8,R0),new pn(4,6,32,32,R0),new pn(4,4,16,16,du),new pn(8,16,32,32,du),new pn(8,16,128,128,du),new pn(8,32,128,256,du),new pn(32,128,258,1024,du),new pn(32,258,258,4096,du)];function lM(e){e.window_size=2*e.w_size,Eo(e.head),e.max_lazy_match=mu[e.level].max_lazy,e.good_match=mu[e.level].good_length,e.nice_match=mu[e.level].nice_length,e.max_chain_length=mu[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Nr-1,e.match_available=0,e.ins_h=0}function fM(){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=wp,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 It.Buf16(aM*2),this.dyn_dtree=new It.Buf16((2*eM+1)*2),this.bl_tree=new It.Buf16((2*rM+1)*2),Eo(this.dyn_ltree),Eo(this.dyn_dtree),Eo(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new It.Buf16(tM+1),this.heap=new It.Buf16(2*B0+1),Eo(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new It.Buf16(2*B0+1),Eo(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}function w4(e){var r;return!e||!e.state?So(e,pi):(e.total_in=e.total_out=0,e.data_type=GN,r=e.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?kp:as,e.adler=r.wrap===2?0:1,r.last_flush=rs,fi._tr_init(r),fn)}function k4(e){var r=w4(e);return r===fn&&lM(e.state),r}function pM(e,r){return!e||!e.state||e.state.wrap!==2?pi:(e.state.gzhead=r,fn)}function _4(e,r,a,i,t,n){if(!e)return pi;var o=1;if(r===HN&&(r=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),t<1||t>YN||a!==wp||i<8||i>15||r<0||r>9||n<0||n>WN)return So(e,pi);i===8&&(i=9);var s=new fM;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=t+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+Nr-1)/Nr),s.window=new It.Buf8(s.w_size*2),s.head=new It.Buf16(s.hash_size),s.prev=new It.Buf16(s.w_size),s.lit_bufsize=1<<t+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new It.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=r,s.strategy=n,s.method=a,k4(e)}function hM(e,r){return _4(e,r,wp,ZN,QN,KN)}function dM(e,r){var a,i,t,n;if(!e||!e.state||r>g4||r<0)return e?So(e,pi):pi;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===Hc&&r!==_o)return So(e,e.avail_out===0?q0:pi);if(i.strm=e,a=i.last_flush,i.last_flush=r,i.status===kp)if(i.wrap===2)e.adler=0,Kr(i,31),Kr(i,139),Kr(i,8),i.gzhead?(Kr(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),Kr(i,i.gzhead.time&255),Kr(i,i.gzhead.time>>8&255),Kr(i,i.gzhead.time>>16&255),Kr(i,i.gzhead.time>>24&255),Kr(i,i.level===9?2:i.strategy>=xp||i.level<2?4:0),Kr(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(Kr(i,i.gzhead.extra.length&255),Kr(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=ko(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=I0):(Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,i.level===9?2:i.strategy>=xp||i.level<2?4:0),Kr(i,nM),i.status=as);else{var o=wp+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=xp||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=iM),o+=31-o%31,i.status=as,$c(i,o),i.strstart!==0&&($c(i,e.adler>>>16),$c(i,e.adler&65535)),e.adler=1}if(i.status===I0)if(i.gzhead.extra){for(t=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=ko(e.adler,i.pending_buf,i.pending-t,t)),Ao(e),t=i.pending,i.pending===i.pending_buf_size));)Kr(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>t&&(e.adler=ko(e.adler,i.pending_buf,i.pending-t,t)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=_p)}else i.status=_p;if(i.status===_p)if(i.gzhead.name){t=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=ko(e.adler,i.pending_buf,i.pending-t,t)),Ao(e),t=i.pending,i.pending===i.pending_buf_size)){n=1;break}i.gzindex<i.gzhead.name.length?n=i.gzhead.name.charCodeAt(i.gzindex++)&255:n=0,Kr(i,n)}while(n!==0);i.gzhead.hcrc&&i.pending>t&&(e.adler=ko(e.adler,i.pending_buf,i.pending-t,t)),n===0&&(i.gzindex=0,i.status=jp)}else i.status=jp;if(i.status===jp)if(i.gzhead.comment){t=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=ko(e.adler,i.pending_buf,i.pending-t,t)),Ao(e),t=i.pending,i.pending===i.pending_buf_size)){n=1;break}i.gzindex<i.gzhead.comment.length?n=i.gzhead.comment.charCodeAt(i.gzindex++)&255:n=0,Kr(i,n)}while(n!==0);i.gzhead.hcrc&&i.pending>t&&(e.adler=ko(e.adler,i.pending_buf,i.pending-t,t)),n===0&&(i.status=Sp)}else i.status=Sp;if(i.status===Sp&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&Ao(e),i.pending+2<=i.pending_buf_size&&(Kr(i,e.adler&255),Kr(i,e.adler>>8&255),e.adler=0,i.status=as)):i.status=as),i.pending!==0){if(Ao(e),e.avail_out===0)return i.last_flush=-1,fn}else if(e.avail_in===0&&y4(r)<=y4(a)&&r!==_o)return So(e,q0);if(i.status===Hc&&e.avail_in!==0)return So(e,q0);if(e.avail_in!==0||i.lookahead!==0||r!==rs&&i.status!==Hc){var c=i.strategy===xp?cM(i,r):i.strategy===$N?uM(i,r):mu[i.level].func(i,r);if((c===ts||c===hu)&&(i.status=Hc),c===Ja||c===ts)return e.avail_out===0&&(i.last_flush=-1),fn;if(c===Vc&&(r===UN?fi._tr_align(i):r!==g4&&(fi._tr_stored_block(i,0,0,!1),r===NN&&(Eo(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),Ao(e),e.avail_out===0))return i.last_flush=-1,fn}return r!==_o?fn:i.wrap<=0?b4:(i.wrap===2?(Kr(i,e.adler&255),Kr(i,e.adler>>8&255),Kr(i,e.adler>>16&255),Kr(i,e.adler>>24&255),Kr(i,e.total_in&255),Kr(i,e.total_in>>8&255),Kr(i,e.total_in>>16&255),Kr(i,e.total_in>>24&255)):($c(i,e.adler>>>16),$c(i,e.adler&65535)),Ao(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?fn:b4)}function mM(e){var r;return!e||!e.state?pi:(r=e.state.status,r!==kp&&r!==I0&&r!==_p&&r!==jp&&r!==Sp&&r!==as&&r!==Hc?So(e,pi):(e.state=null,r===as?So(e,MN):fn))}function vM(e,r){var a=r.length,i,t,n,o,s,c,l,f;if(!e||!e.state||(i=e.state,o=i.wrap,o===2||o===1&&i.status!==kp||i.lookahead))return pi;for(o===1&&(e.adler=v4(e.adler,r,a,0)),i.wrap=0,a>=i.w_size&&(o===0&&(Eo(i.head),i.strstart=0,i.block_start=0,i.insert=0),f=new It.Buf8(i.w_size),It.arraySet(f,r,a-i.w_size,i.w_size,0),r=f,a=i.w_size),s=e.avail_in,c=e.next_in,l=e.input,e.avail_in=a,e.next_in=0,e.input=r,is(i);i.lookahead>=Nr;){t=i.strstart,n=i.lookahead-(Nr-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[t+Nr-1])&i.hash_mask,i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++;while(--n);i.strstart=t,i.lookahead=Nr-1,is(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=Nr-1,i.match_available=0,e.next_in=c,e.input=l,e.avail_in=s,i.wrap=o,fn}hn.deflateInit=hM;hn.deflateInit2=_4;hn.deflateReset=k4;hn.deflateResetKeep=w4;hn.deflateSetHeader=pM;hn.deflate=dM;hn.deflateEnd=mM;hn.deflateSetDictionary=vM;hn.deflateInfo="pako deflate (from Nodeca project)"});var O0=O(vu=>{"use strict";var Ep=zn(),S4=!0,E4=!0;try{String.fromCharCode.apply(null,[0])}catch{S4=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{E4=!1}var Wc=new Ep.Buf8(256);for(Ln=0;Ln<256;Ln++)Wc[Ln]=Ln>=252?6:Ln>=248?5:Ln>=240?4:Ln>=224?3:Ln>=192?2:1;var Ln;Wc[254]=Wc[254]=1;vu.string2buf=function(e){var r,a,i,t,n,o=e.length,s=0;for(t=0;t<o;t++)a=e.charCodeAt(t),(a&64512)==55296&&t+1<o&&(i=e.charCodeAt(t+1),(i&64512)==56320&&(a=65536+(a-55296<<10)+(i-56320),t++)),s+=a<128?1:a<2048?2:a<65536?3:4;for(r=new Ep.Buf8(s),n=0,t=0;n<s;t++)a=e.charCodeAt(t),(a&64512)==55296&&t+1<o&&(i=e.charCodeAt(t+1),(i&64512)==56320&&(a=65536+(a-55296<<10)+(i-56320),t++)),a<128?r[n++]=a:a<2048?(r[n++]=192|a>>>6,r[n++]=128|a&63):a<65536?(r[n++]=224|a>>>12,r[n++]=128|a>>>6&63,r[n++]=128|a&63):(r[n++]=240|a>>>18,r[n++]=128|a>>>12&63,r[n++]=128|a>>>6&63,r[n++]=128|a&63);return r};function A4(e,r){if(r<65534&&(e.subarray&&E4||!e.subarray&&S4))return String.fromCharCode.apply(null,Ep.shrinkBuf(e,r));for(var a="",i=0;i<r;i++)a+=String.fromCharCode(e[i]);return a}vu.buf2binstring=function(e){return A4(e,e.length)};vu.binstring2buf=function(e){for(var r=new Ep.Buf8(e.length),a=0,i=r.length;a<i;a++)r[a]=e.charCodeAt(a);return r};vu.buf2string=function(e,r){var a,i,t,n,o=r||e.length,s=new Array(o*2);for(i=0,a=0;a<o;){if(t=e[a++],t<128){s[i++]=t;continue}if(n=Wc[t],n>4){s[i++]=65533,a+=n-1;continue}for(t&=n===2?31:n===3?15:7;n>1&&a<o;)t=t<<6|e[a++]&63,n--;if(n>1){s[i++]=65533;continue}t<65536?s[i++]=t:(t-=65536,s[i++]=55296|t>>10&1023,s[i++]=56320|t&1023)}return A4(s,i)};vu.utf8border=function(e,r){var a;for(r=r||e.length,r>e.length&&(r=e.length),a=r-1;a>=0&&(e[a]&192)==128;)a--;return a<0||a===0?r:a+Wc[e[a]]>r?a:r}});var z0=O((TZ,P4)=>{"use strict";function gM(){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}P4.exports=gM});var q4=O(Yc=>{"use strict";var Kc=j4(),Gc=zn(),D0=O0(),L0=yp(),bM=z0(),T4=Object.prototype.toString,yM=0,U0=4,gu=0,C4=1,F4=2,xM=-1,wM=0,kM=8;function ns(e){if(!(this instanceof ns))return new ns(e);this.options=Gc.assign({level:xM,method:kM,chunkSize:16384,windowBits:15,memLevel:8,strategy:wM,to:""},e||{});var r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bM,this.strm.avail_out=0;var a=Kc.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(a!==gu)throw new Error(L0[a]);if(r.header&&Kc.deflateSetHeader(this.strm,r.header),r.dictionary){var i;if(typeof r.dictionary=="string"?i=D0.string2buf(r.dictionary):T4.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,a=Kc.deflateSetDictionary(this.strm,i),a!==gu)throw new Error(L0[a]);this._dict_set=!0}}ns.prototype.push=function(e,r){var a=this.strm,i=this.options.chunkSize,t,n;if(this.ended)return!1;n=r===~~r?r:r===!0?U0:yM,typeof e=="string"?a.input=D0.string2buf(e):T4.call(e)==="[object ArrayBuffer]"?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(a.avail_out===0&&(a.output=new Gc.Buf8(i),a.next_out=0,a.avail_out=i),t=Kc.deflate(a,n),t!==C4&&t!==gu)return this.onEnd(t),this.ended=!0,!1;(a.avail_out===0||a.avail_in===0&&(n===U0||n===F4))&&(this.options.to==="string"?this.onData(D0.buf2binstring(Gc.shrinkBuf(a.output,a.next_out))):this.onData(Gc.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||a.avail_out===0)&&t!==C4);return n===U0?(t=Kc.deflateEnd(this.strm),this.onEnd(t),this.ended=!0,t===gu):(n===F4&&(this.onEnd(gu),a.avail_out=0),!0)};ns.prototype.onData=function(e){this.chunks.push(e)};ns.prototype.onEnd=function(e){e===gu&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Gc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function N0(e,r){var a=new ns(r);if(a.push(e,!0),a.err)throw a.msg||L0[a.err];return a.result}function _M(e,r){return r=r||{},r.raw=!0,N0(e,r)}function jM(e,r){return r=r||{},r.gzip=!0,N0(e,r)}Yc.Deflate=ns;Yc.deflate=N0;Yc.deflateRaw=_M;Yc.gzip=jM});var I4=O((FZ,B4)=>{"use strict";var Ap=30,SM=12;B4.exports=function(r,a){var i,t,n,o,s,c,l,f,v,h,d,y,j,w,A,P,T,I,F,R,z,U,M,K,V;i=r.state,t=r.next_in,K=r.input,n=t+(r.avail_in-5),o=r.next_out,V=r.output,s=o-(a-r.avail_out),c=o+(r.avail_out-257),l=i.dmax,f=i.wsize,v=i.whave,h=i.wnext,d=i.window,y=i.hold,j=i.bits,w=i.lencode,A=i.distcode,P=(1<<i.lenbits)-1,T=(1<<i.distbits)-1;e:do{j<15&&(y+=K[t++]<<j,j+=8,y+=K[t++]<<j,j+=8),I=w[y&P];r:for(;;){if(F=I>>>24,y>>>=F,j-=F,F=I>>>16&255,F===0)V[o++]=I&65535;else if(F&16){R=I&65535,F&=15,F&&(j<F&&(y+=K[t++]<<j,j+=8),R+=y&(1<<F)-1,y>>>=F,j-=F),j<15&&(y+=K[t++]<<j,j+=8,y+=K[t++]<<j,j+=8),I=A[y&T];a:for(;;){if(F=I>>>24,y>>>=F,j-=F,F=I>>>16&255,F&16){if(z=I&65535,F&=15,j<F&&(y+=K[t++]<<j,j+=8,j<F&&(y+=K[t++]<<j,j+=8)),z+=y&(1<<F)-1,z>l){r.msg="invalid distance too far back",i.mode=Ap;break e}if(y>>>=F,j-=F,F=o-s,z>F){if(F=z-F,F>v&&i.sane){r.msg="invalid distance too far back",i.mode=Ap;break e}if(U=0,M=d,h===0){if(U+=f-F,F<R){R-=F;do V[o++]=d[U++];while(--F);U=o-z,M=V}}else if(h<F){if(U+=f+h-F,F-=h,F<R){R-=F;do V[o++]=d[U++];while(--F);if(U=0,h<R){F=h,R-=F;do V[o++]=d[U++];while(--F);U=o-z,M=V}}}else if(U+=h-F,F<R){R-=F;do V[o++]=d[U++];while(--F);U=o-z,M=V}for(;R>2;)V[o++]=M[U++],V[o++]=M[U++],V[o++]=M[U++],R-=3;R&&(V[o++]=M[U++],R>1&&(V[o++]=M[U++]))}else{U=o-z;do V[o++]=V[U++],V[o++]=V[U++],V[o++]=V[U++],R-=3;while(R>2);R&&(V[o++]=V[U++],R>1&&(V[o++]=V[U++]))}}else if((F&64)==0){I=A[(I&65535)+(y&(1<<F)-1)];continue a}else{r.msg="invalid distance code",i.mode=Ap;break e}break}}else if((F&64)==0){I=w[(I&65535)+(y&(1<<F)-1)];continue r}else if(F&32){i.mode=SM;break e}else{r.msg="invalid literal/length code",i.mode=Ap;break e}break}}while(t<n&&o<c);R=j>>3,t-=R,j-=R<<3,y&=(1<<j)-1,r.next_in=t,r.next_out=o,r.avail_in=t<n?5+(n-t):5-(t-n),r.avail_out=o<c?257+(c-o):257-(o-c),i.hold=y,i.bits=j}});var N4=O((qZ,U4)=>{"use strict";var R4=zn(),bu=15,O4=852,z4=592,D4=0,M0=1,L4=2,EM=[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],AM=[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],PM=[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],TM=[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];U4.exports=function(r,a,i,t,n,o,s,c){var l=c.bits,f=0,v=0,h=0,d=0,y=0,j=0,w=0,A=0,P=0,T=0,I,F,R,z,U,M=null,K=0,V,Z=new R4.Buf16(bu+1),$=new R4.Buf16(bu+1),Q=null,re=0,je,me,ce;for(f=0;f<=bu;f++)Z[f]=0;for(v=0;v<t;v++)Z[a[i+v]]++;for(y=l,d=bu;d>=1&&Z[d]===0;d--);if(y>d&&(y=d),d===0)return n[o++]=1<<24|64<<16|0,n[o++]=1<<24|64<<16|0,c.bits=1,0;for(h=1;h<d&&Z[h]===0;h++);for(y<h&&(y=h),A=1,f=1;f<=bu;f++)if(A<<=1,A-=Z[f],A<0)return-1;if(A>0&&(r===D4||d!==1))return-1;for($[1]=0,f=1;f<bu;f++)$[f+1]=$[f]+Z[f];for(v=0;v<t;v++)a[i+v]!==0&&(s[$[a[i+v]]++]=v);if(r===D4?(M=Q=s,V=19):r===M0?(M=EM,K-=257,Q=AM,re-=257,V=256):(M=PM,Q=TM,V=-1),T=0,v=0,f=h,U=o,j=y,w=0,R=-1,P=1<<y,z=P-1,r===M0&&P>O4||r===L4&&P>z4)return 1;for(;;){je=f-w,s[v]<V?(me=0,ce=s[v]):s[v]>V?(me=Q[re+s[v]],ce=M[K+s[v]]):(me=32+64,ce=0),I=1<<f-w,F=1<<j,h=F;do F-=I,n[U+(T>>w)+F]=je<<24|me<<16|ce|0;while(F!==0);for(I=1<<f-1;T&I;)I>>=1;if(I!==0?(T&=I-1,T+=I):T=0,v++,--Z[f]==0){if(f===d)break;f=a[i+s[v]]}if(f>y&&(T&z)!==R){for(w===0&&(w=y),U+=h,j=f-w,A=1<<j;j+w<d&&(A-=Z[j+w],!(A<=0));)j++,A<<=1;if(P+=1<<j,r===M0&&P>O4||r===L4&&P>z4)return 1;R=T&z,n[R]=y<<24|j<<16|U-o|0}}return T!==0&&(n[U+T]=f-w<<24|64<<16|0),c.bits=y,0}});var kS=O(Oi=>{"use strict";var Xt=zn(),H0=C0(),dn=F0(),CM=I4(),Zc=N4(),FM=0,M4=1,H4=2,V4=4,qM=5,Pp=6,os=0,BM=1,IM=2,hi=-2,$4=-3,V0=-4,RM=-5,W4=8,K4=1,G4=2,Y4=3,Z4=4,Q4=5,X4=6,J4=7,eS=8,rS=9,aS=10,Tp=11,Un=12,$0=13,tS=14,W0=15,iS=16,nS=17,oS=18,sS=19,Cp=20,Fp=21,uS=22,cS=23,lS=24,fS=25,pS=26,K0=27,hS=28,dS=29,ma=30,G0=31,OM=32,zM=852,DM=592,LM=15,UM=LM;function mS(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function NM(){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 Xt.Buf16(320),this.work=new Xt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function vS(e){var r;return!e||!e.state?hi:(r=e.state,e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=K4,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Xt.Buf32(zM),r.distcode=r.distdyn=new Xt.Buf32(DM),r.sane=1,r.back=-1,os)}function gS(e){var r;return!e||!e.state?hi:(r=e.state,r.wsize=0,r.whave=0,r.wnext=0,vS(e))}function bS(e,r){var a,i;return!e||!e.state||(i=e.state,r<0?(a=0,r=-r):(a=(r>>4)+1,r<48&&(r&=15)),r&&(r<8||r>15))?hi:(i.window!==null&&i.wbits!==r&&(i.window=null),i.wrap=a,i.wbits=r,gS(e))}function yS(e,r){var a,i;return e?(i=new NM,e.state=i,i.window=null,a=bS(e,r),a!==os&&(e.state=null),a):hi}function MM(e){return yS(e,UM)}var xS=!0,Y0,Z0;function HM(e){if(xS){var r;for(Y0=new Xt.Buf32(512),Z0=new Xt.Buf32(32),r=0;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(Zc(M4,e.lens,0,288,Y0,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;Zc(H4,e.lens,0,32,Z0,0,e.work,{bits:5}),xS=!1}e.lencode=Y0,e.lenbits=9,e.distcode=Z0,e.distbits=5}function wS(e,r,a,i){var t,n=e.state;return n.window===null&&(n.wsize=1<<n.wbits,n.wnext=0,n.whave=0,n.window=new Xt.Buf8(n.wsize)),i>=n.wsize?(Xt.arraySet(n.window,r,a-n.wsize,n.wsize,0),n.wnext=0,n.whave=n.wsize):(t=n.wsize-n.wnext,t>i&&(t=i),Xt.arraySet(n.window,r,a-i,t,n.wnext),i-=t,i?(Xt.arraySet(n.window,r,a-i,i,0),n.wnext=i,n.whave=n.wsize):(n.wnext+=t,n.wnext===n.wsize&&(n.wnext=0),n.whave<n.wsize&&(n.whave+=t))),0}function VM(e,r){var a,i,t,n,o,s,c,l,f,v,h,d,y,j,w=0,A,P,T,I,F,R,z,U,M=new Xt.Buf8(4),K,V,Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return hi;a=e.state,a.mode===Un&&(a.mode=$0),o=e.next_out,t=e.output,c=e.avail_out,n=e.next_in,i=e.input,s=e.avail_in,l=a.hold,f=a.bits,v=s,h=c,U=os;e:for(;;)switch(a.mode){case K4:if(a.wrap===0){a.mode=$0;break}for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(a.wrap&2&&l===35615){a.check=0,M[0]=l&255,M[1]=l>>>8&255,a.check=dn(a.check,M,2,0),l=0,f=0,a.mode=G4;break}if(a.flags=0,a.head&&(a.head.done=!1),!(a.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",a.mode=ma;break}if((l&15)!==W4){e.msg="unknown compression method",a.mode=ma;break}if(l>>>=4,f-=4,z=(l&15)+8,a.wbits===0)a.wbits=z;else if(z>a.wbits){e.msg="invalid window size",a.mode=ma;break}a.dmax=1<<z,e.adler=a.check=1,a.mode=l&512?aS:Un,l=0,f=0;break;case G4:for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(a.flags=l,(a.flags&255)!==W4){e.msg="unknown compression method",a.mode=ma;break}if(a.flags&57344){e.msg="unknown header flags set",a.mode=ma;break}a.head&&(a.head.text=l>>8&1),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,a.check=dn(a.check,M,2,0)),l=0,f=0,a.mode=Y4;case Y4:for(;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.head&&(a.head.time=l),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,a.check=dn(a.check,M,4,0)),l=0,f=0,a.mode=Z4;case Z4:for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.head&&(a.head.xflags=l&255,a.head.os=l>>8),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,a.check=dn(a.check,M,2,0)),l=0,f=0,a.mode=Q4;case Q4:if(a.flags&1024){for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.length=l,a.head&&(a.head.extra_len=l),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,a.check=dn(a.check,M,2,0)),l=0,f=0}else a.head&&(a.head.extra=null);a.mode=X4;case X4:if(a.flags&1024&&(d=a.length,d>s&&(d=s),d&&(a.head&&(z=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),Xt.arraySet(a.head.extra,i,n,d,z)),a.flags&512&&(a.check=dn(a.check,i,d,n)),s-=d,n+=d,a.length-=d),a.length))break e;a.length=0,a.mode=J4;case J4:if(a.flags&2048){if(s===0)break e;d=0;do z=i[n+d++],a.head&&z&&a.length<65536&&(a.head.name+=String.fromCharCode(z));while(z&&d<s);if(a.flags&512&&(a.check=dn(a.check,i,d,n)),s-=d,n+=d,z)break e}else a.head&&(a.head.name=null);a.length=0,a.mode=eS;case eS:if(a.flags&4096){if(s===0)break e;d=0;do z=i[n+d++],a.head&&z&&a.length<65536&&(a.head.comment+=String.fromCharCode(z));while(z&&d<s);if(a.flags&512&&(a.check=dn(a.check,i,d,n)),s-=d,n+=d,z)break e}else a.head&&(a.head.comment=null);a.mode=rS;case rS:if(a.flags&512){for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(l!==(a.check&65535)){e.msg="header crc mismatch",a.mode=ma;break}l=0,f=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),e.adler=a.check=0,a.mode=Un;break;case aS:for(;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}e.adler=a.check=mS(l),l=0,f=0,a.mode=Tp;case Tp:if(a.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=n,e.avail_in=s,a.hold=l,a.bits=f,IM;e.adler=a.check=1,a.mode=Un;case Un:if(r===qM||r===Pp)break e;case $0:if(a.last){l>>>=f&7,f-=f&7,a.mode=K0;break}for(;f<3;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}switch(a.last=l&1,l>>>=1,f-=1,l&3){case 0:a.mode=tS;break;case 1:if(HM(a),a.mode=Cp,r===Pp){l>>>=2,f-=2;break e}break;case 2:a.mode=nS;break;case 3:e.msg="invalid block type",a.mode=ma}l>>>=2,f-=2;break;case tS:for(l>>>=f&7,f-=f&7;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if((l&65535)!=(l>>>16^65535)){e.msg="invalid stored block lengths",a.mode=ma;break}if(a.length=l&65535,l=0,f=0,a.mode=W0,r===Pp)break e;case W0:a.mode=iS;case iS:if(d=a.length,d){if(d>s&&(d=s),d>c&&(d=c),d===0)break e;Xt.arraySet(t,i,n,d,o),s-=d,n+=d,c-=d,o+=d,a.length-=d;break}a.mode=Un;break;case nS:for(;f<14;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(a.nlen=(l&31)+257,l>>>=5,f-=5,a.ndist=(l&31)+1,l>>>=5,f-=5,a.ncode=(l&15)+4,l>>>=4,f-=4,a.nlen>286||a.ndist>30){e.msg="too many length or distance symbols",a.mode=ma;break}a.have=0,a.mode=oS;case oS:for(;a.have<a.ncode;){for(;f<3;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.lens[Z[a.have++]]=l&7,l>>>=3,f-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,K={bits:a.lenbits},U=Zc(FM,a.lens,0,19,a.lencode,0,a.work,K),a.lenbits=K.bits,U){e.msg="invalid code lengths set",a.mode=ma;break}a.have=0,a.mode=sS;case sS:for(;a.have<a.nlen+a.ndist;){for(;w=a.lencode[l&(1<<a.lenbits)-1],A=w>>>24,P=w>>>16&255,T=w&65535,!(A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(T<16)l>>>=A,f-=A,a.lens[a.have++]=T;else{if(T===16){for(V=A+2;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(l>>>=A,f-=A,a.have===0){e.msg="invalid bit length repeat",a.mode=ma;break}z=a.lens[a.have-1],d=3+(l&3),l>>>=2,f-=2}else if(T===17){for(V=A+3;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=A,f-=A,z=0,d=3+(l&7),l>>>=3,f-=3}else{for(V=A+7;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=A,f-=A,z=0,d=11+(l&127),l>>>=7,f-=7}if(a.have+d>a.nlen+a.ndist){e.msg="invalid bit length repeat",a.mode=ma;break}for(;d--;)a.lens[a.have++]=z}}if(a.mode===ma)break;if(a.lens[256]===0){e.msg="invalid code -- missing end-of-block",a.mode=ma;break}if(a.lenbits=9,K={bits:a.lenbits},U=Zc(M4,a.lens,0,a.nlen,a.lencode,0,a.work,K),a.lenbits=K.bits,U){e.msg="invalid literal/lengths set",a.mode=ma;break}if(a.distbits=6,a.distcode=a.distdyn,K={bits:a.distbits},U=Zc(H4,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,K),a.distbits=K.bits,U){e.msg="invalid distances set",a.mode=ma;break}if(a.mode=Cp,r===Pp)break e;case Cp:a.mode=Fp;case Fp:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=n,e.avail_in=s,a.hold=l,a.bits=f,CM(e,h),o=e.next_out,t=e.output,c=e.avail_out,n=e.next_in,i=e.input,s=e.avail_in,l=a.hold,f=a.bits,a.mode===Un&&(a.back=-1);break}for(a.back=0;w=a.lencode[l&(1<<a.lenbits)-1],A=w>>>24,P=w>>>16&255,T=w&65535,!(A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(P&&(P&240)==0){for(I=A,F=P,R=T;w=a.lencode[R+((l&(1<<I+F)-1)>>I)],A=w>>>24,P=w>>>16&255,T=w&65535,!(I+A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=I,f-=I,a.back+=I}if(l>>>=A,f-=A,a.back+=A,a.length=T,P===0){a.mode=pS;break}if(P&32){a.back=-1,a.mode=Un;break}if(P&64){e.msg="invalid literal/length code",a.mode=ma;break}a.extra=P&15,a.mode=uS;case uS:if(a.extra){for(V=a.extra;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.length+=l&(1<<a.extra)-1,l>>>=a.extra,f-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=cS;case cS:for(;w=a.distcode[l&(1<<a.distbits)-1],A=w>>>24,P=w>>>16&255,T=w&65535,!(A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if((P&240)==0){for(I=A,F=P,R=T;w=a.distcode[R+((l&(1<<I+F)-1)>>I)],A=w>>>24,P=w>>>16&255,T=w&65535,!(I+A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=I,f-=I,a.back+=I}if(l>>>=A,f-=A,a.back+=A,P&64){e.msg="invalid distance code",a.mode=ma;break}a.offset=T,a.extra=P&15,a.mode=lS;case lS:if(a.extra){for(V=a.extra;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.offset+=l&(1<<a.extra)-1,l>>>=a.extra,f-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){e.msg="invalid distance too far back",a.mode=ma;break}a.mode=fS;case fS:if(c===0)break e;if(d=h-c,a.offset>d){if(d=a.offset-d,d>a.whave&&a.sane){e.msg="invalid distance too far back",a.mode=ma;break}d>a.wnext?(d-=a.wnext,y=a.wsize-d):y=a.wnext-d,d>a.length&&(d=a.length),j=a.window}else j=t,y=o-a.offset,d=a.length;d>c&&(d=c),c-=d,a.length-=d;do t[o++]=j[y++];while(--d);a.length===0&&(a.mode=Fp);break;case pS:if(c===0)break e;t[o++]=a.length,c--,a.mode=Fp;break;case K0:if(a.wrap){for(;f<32;){if(s===0)break e;s--,l|=i[n++]<<f,f+=8}if(h-=c,e.total_out+=h,a.total+=h,h&&(e.adler=a.check=a.flags?dn(a.check,t,h,o-h):H0(a.check,t,h,o-h)),h=c,(a.flags?l:mS(l))!==a.check){e.msg="incorrect data check",a.mode=ma;break}l=0,f=0}a.mode=hS;case hS:if(a.wrap&&a.flags){for(;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(l!==(a.total&4294967295)){e.msg="incorrect length check",a.mode=ma;break}l=0,f=0}a.mode=dS;case dS:U=BM;break e;case ma:U=$4;break e;case G0:return V0;case OM:default:return hi}return e.next_out=o,e.avail_out=c,e.next_in=n,e.avail_in=s,a.hold=l,a.bits=f,(a.wsize||h!==e.avail_out&&a.mode<ma&&(a.mode<K0||r!==V4))&&wS(e,e.output,e.next_out,h-e.avail_out)?(a.mode=G0,V0):(v-=e.avail_in,h-=e.avail_out,e.total_in+=v,e.total_out+=h,a.total+=h,a.wrap&&h&&(e.adler=a.check=a.flags?dn(a.check,t,h,e.next_out-h):H0(a.check,t,h,e.next_out-h)),e.data_type=a.bits+(a.last?64:0)+(a.mode===Un?128:0)+(a.mode===Cp||a.mode===W0?256:0),(v===0&&h===0||r===V4)&&U===os&&(U=RM),U)}function $M(e){if(!e||!e.state)return hi;var r=e.state;return r.window&&(r.window=null),e.state=null,os}function WM(e,r){var a;return!e||!e.state||(a=e.state,(a.wrap&2)==0)?hi:(a.head=r,r.done=!1,os)}function KM(e,r){var a=r.length,i,t,n;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==Tp)?hi:i.mode===Tp&&(t=1,t=H0(t,r,a,0),t!==i.check)?$4:(n=wS(e,r,a,a),n?(i.mode=G0,V0):(i.havedict=1,os))}Oi.inflateReset=gS;Oi.inflateReset2=bS;Oi.inflateResetKeep=vS;Oi.inflateInit=MM;Oi.inflateInit2=yS;Oi.inflate=VM;Oi.inflateEnd=$M;Oi.inflateGetHeader=WM;Oi.inflateSetDictionary=KM;Oi.inflateInfo="pako inflate (from Nodeca project)"});var Q0=O((IZ,_S)=>{"use strict";_S.exports={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}});var SS=O((RZ,jS)=>{"use strict";function GM(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}jS.exports=GM});var AS=O(Xc=>{"use strict";var yu=kS(),Qc=zn(),qp=O0(),Ba=Q0(),X0=yp(),YM=z0(),ZM=SS(),ES=Object.prototype.toString;function ss(e){if(!(this instanceof ss))return new ss(e);this.options=Qc.assign({chunkSize:16384,windowBits:0,to:""},e||{});var r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15)==0&&(r.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new YM,this.strm.avail_out=0;var a=yu.inflateInit2(this.strm,r.windowBits);if(a!==Ba.Z_OK)throw new Error(X0[a]);if(this.header=new ZM,yu.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=qp.string2buf(r.dictionary):ES.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(a=yu.inflateSetDictionary(this.strm,r.dictionary),a!==Ba.Z_OK)))throw new Error(X0[a])}ss.prototype.push=function(e,r){var a=this.strm,i=this.options.chunkSize,t=this.options.dictionary,n,o,s,c,l,f=!1;if(this.ended)return!1;o=r===~~r?r:r===!0?Ba.Z_FINISH:Ba.Z_NO_FLUSH,typeof e=="string"?a.input=qp.binstring2buf(e):ES.call(e)==="[object ArrayBuffer]"?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(a.avail_out===0&&(a.output=new Qc.Buf8(i),a.next_out=0,a.avail_out=i),n=yu.inflate(a,Ba.Z_NO_FLUSH),n===Ba.Z_NEED_DICT&&t&&(n=yu.inflateSetDictionary(this.strm,t)),n===Ba.Z_BUF_ERROR&&f===!0&&(n=Ba.Z_OK,f=!1),n!==Ba.Z_STREAM_END&&n!==Ba.Z_OK)return this.onEnd(n),this.ended=!0,!1;a.next_out&&(a.avail_out===0||n===Ba.Z_STREAM_END||a.avail_in===0&&(o===Ba.Z_FINISH||o===Ba.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=qp.utf8border(a.output,a.next_out),c=a.next_out-s,l=qp.buf2string(a.output,s),a.next_out=c,a.avail_out=i-c,c&&Qc.arraySet(a.output,a.output,s,c,0),this.onData(l)):this.onData(Qc.shrinkBuf(a.output,a.next_out))),a.avail_in===0&&a.avail_out===0&&(f=!0)}while((a.avail_in>0||a.avail_out===0)&&n!==Ba.Z_STREAM_END);return n===Ba.Z_STREAM_END&&(o=Ba.Z_FINISH),o===Ba.Z_FINISH?(n=yu.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Ba.Z_OK):(o===Ba.Z_SYNC_FLUSH&&(this.onEnd(Ba.Z_OK),a.avail_out=0),!0)};ss.prototype.onData=function(e){this.chunks.push(e)};ss.prototype.onEnd=function(e){e===Ba.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Qc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function J0(e,r){var a=new ss(r);if(a.push(e,!0),a.err)throw a.msg||X0[a.err];return a.result}function QM(e,r){return r=r||{},r.raw=!0,J0(e,r)}Xc.Inflate=ss;Xc.inflate=J0;Xc.inflateRaw=QM;Xc.ungzip=J0});var CS=O((zZ,TS)=>{"use strict";var XM=zn().assign,JM=q4(),eH=AS(),rH=Q0(),PS={};XM(PS,JM,eH,rH);TS.exports=PS});Yp(exports);var Ui=typeof process!="object"||String(process)!=="[object process]"||process.browser,Zp={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global},za=Zp.global||Zp.self||Zp.window;var Lg={ibm866:[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9561,9560,9554,9555,9579,9578,9496,9484,9608,9604,9612,9616,9600,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1025,1105,1028,1108,1031,1111,1038,1118,176,8729,183,8730,8470,164,9632,160],"iso-8859-2":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,728,321,164,317,346,167,168,352,350,356,377,173,381,379,176,261,731,322,180,318,347,711,184,353,351,357,378,733,382,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"iso-8859-3":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,294,728,163,164,null,292,167,168,304,350,286,308,173,null,379,176,295,178,179,180,181,293,183,184,305,351,287,309,189,null,380,192,193,194,null,196,266,264,199,200,201,202,203,204,205,206,207,null,209,210,211,212,288,214,215,284,217,218,219,220,364,348,223,224,225,226,null,228,267,265,231,232,233,234,235,236,237,238,239,null,241,242,243,244,289,246,247,285,249,250,251,252,365,349,729],"iso-8859-4":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,312,342,164,296,315,167,168,352,274,290,358,173,381,175,176,261,731,343,180,297,316,711,184,353,275,291,359,330,382,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,298,272,325,332,310,212,213,214,215,216,370,218,219,220,360,362,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,299,273,326,333,311,244,245,246,247,248,371,250,251,252,361,363,729],"iso-8859-5":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,173,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8470,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,167,1118,1119],"iso-8859-6":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,null,null,164,null,null,null,null,null,null,null,1548,173,null,null,null,null,null,null,null,null,null,null,null,null,null,1563,null,null,null,1567,null,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,null,null,null,null,null,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,null,null,null,null,null,null,null,null,null,null,null,null,null],"iso-8859-7":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8216,8217,163,8364,8367,166,167,168,169,890,171,172,173,null,8213,176,177,178,179,900,901,902,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"iso-8859-8":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,162,163,164,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8215,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"iso-8859-10":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,274,290,298,296,310,167,315,272,352,358,381,173,362,330,176,261,275,291,299,297,311,183,316,273,353,359,382,8213,363,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,207,208,325,332,211,212,213,214,360,216,370,218,219,220,221,222,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,239,240,326,333,243,244,245,246,361,248,371,250,251,252,253,254,312],"iso-8859-13":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8221,162,163,164,8222,166,167,216,169,342,171,172,173,174,198,176,177,178,179,8220,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,8217],"iso-8859-14":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,7682,7683,163,266,267,7690,167,7808,169,7810,7691,7922,173,174,376,7710,7711,288,289,7744,7745,182,7766,7809,7767,7811,7776,7923,7812,7813,7777,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,372,209,210,211,212,213,214,7786,216,217,218,219,220,221,374,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,373,241,242,243,244,245,246,7787,248,249,250,251,252,253,375,255],"iso-8859-15":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,8364,165,352,167,353,169,170,171,172,173,174,175,176,177,178,179,381,181,182,183,382,185,186,187,338,339,376,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"iso-8859-16":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,261,321,8364,8222,352,167,353,169,536,171,377,173,378,379,176,177,268,322,381,8221,182,183,382,269,537,187,338,339,376,380,192,193,194,258,196,262,198,199,200,201,202,203,204,205,206,207,272,323,210,211,212,336,214,346,368,217,218,219,220,280,538,223,224,225,226,259,228,263,230,231,232,233,234,235,236,237,238,239,273,324,242,243,244,337,246,347,369,249,250,251,252,281,539,255],"koi8-r":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,1025,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],"koi8-u":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,1108,9556,1110,1111,9559,9560,9561,9562,9563,1169,1118,9566,9567,9568,9569,1025,1028,9571,1030,1031,9574,9575,9576,9577,9578,1168,1038,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],macintosh:[196,197,199,201,209,214,220,225,224,226,228,227,229,231,233,232,234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252,8224,176,162,163,167,8226,182,223,174,169,8482,180,168,8800,198,216,8734,177,8804,8805,165,181,8706,8721,8719,960,8747,170,186,937,230,248,191,161,172,8730,402,8776,8710,171,187,8230,160,192,195,213,338,339,8211,8212,8220,8221,8216,8217,247,9674,255,376,8260,8364,8249,8250,64257,64258,8225,183,8218,8222,8240,194,202,193,203,200,205,206,207,204,211,212,63743,210,218,219,217,305,710,732,175,728,729,730,184,733,731,711],"windows-874":[8364,129,130,131,132,8230,134,135,136,137,138,139,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,153,154,155,156,157,158,159,160,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,null,null,null,null,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,null,null,null,null],"windows-1250":[8364,129,8218,131,8222,8230,8224,8225,136,8240,352,8249,346,356,381,377,144,8216,8217,8220,8221,8226,8211,8212,152,8482,353,8250,347,357,382,378,160,711,728,321,164,260,166,167,168,169,350,171,172,173,174,379,176,177,731,322,180,181,182,183,184,261,351,187,317,733,318,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"windows-1251":[1026,1027,8218,1107,8222,8230,8224,8225,8364,8240,1033,8249,1034,1036,1035,1039,1106,8216,8217,8220,8221,8226,8211,8212,152,8482,1113,8250,1114,1116,1115,1119,160,1038,1118,1032,164,1168,166,167,1025,169,1028,171,172,173,174,1031,176,177,1030,1110,1169,181,182,183,1105,8470,1108,187,1112,1029,1109,1111,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103],"windows-1252":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"windows-1253":[8364,129,8218,402,8222,8230,8224,8225,136,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,157,158,159,160,901,902,163,164,165,166,167,168,169,null,171,172,173,174,8213,176,177,178,179,900,181,182,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"windows-1254":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,286,209,210,211,212,213,214,215,216,217,218,219,220,304,350,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,287,241,242,243,244,245,246,247,248,249,250,251,252,305,351,255],"windows-1255":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,156,157,158,159,160,161,162,163,8362,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,191,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1520,1521,1522,1523,1524,null,null,null,null,null,null,null,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"windows-1256":[8364,1662,8218,402,8222,8230,8224,8225,710,8240,1657,8249,338,1670,1688,1672,1711,8216,8217,8220,8221,8226,8211,8212,1705,8482,1681,8250,339,8204,8205,1722,160,1548,162,163,164,165,166,167,168,169,1726,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,1563,187,188,189,190,1567,1729,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,215,1591,1592,1593,1594,1600,1601,1602,1603,224,1604,226,1605,1606,1607,1608,231,232,233,234,235,1609,1610,238,239,1611,1612,1613,1614,244,1615,1616,247,1617,249,1618,251,252,8206,8207,1746],"windows-1257":[8364,129,8218,131,8222,8230,8224,8225,136,8240,138,8249,140,168,711,184,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,175,731,159,160,null,162,163,164,null,166,167,216,169,342,171,172,173,174,198,176,177,178,179,180,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,729],"windows-1258":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,258,196,197,198,199,200,201,202,203,768,205,206,207,272,209,777,211,212,416,214,215,216,217,218,219,220,431,771,223,224,225,226,259,228,229,230,231,232,233,234,235,769,237,238,239,273,241,803,243,244,417,246,247,248,249,250,251,252,432,8363,255],"x-mac-cyrillic":[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,8224,176,1168,163,167,8226,182,1030,174,169,8482,1026,1106,8800,1027,1107,8734,177,8804,8805,1110,181,1169,1032,1028,1108,1031,1111,1033,1113,1034,1114,1112,1029,172,8730,402,8776,8710,171,187,8230,160,1035,1115,1036,1116,1109,8211,8212,8220,8221,8216,8217,247,8222,1038,1118,1039,1119,8470,1025,1105,1103,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,8364]};global["encoding-indexes"]=Lg||{};function jr(e,r,a){return r<=e&&e<=a}function zE(e,r){return e.indexOf(r)!==-1}var yn=Math.floor;function dl(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function DE(e){for(var r=String(e),a=r.length,i=0,t=[];i<a;){var n=r.charCodeAt(i);if(n<55296||n>57343)t.push(n);else if(56320<=n&&n<=57343)t.push(65533);else if(55296<=n&&n<=56319)if(i===a-1)t.push(65533);else{var o=r.charCodeAt(i+1);if(56320<=o&&o<=57343){var s=n&1023,c=o&1023;t.push(65536+(s<<10)+c),i+=1}else t.push(65533)}i+=1}return t}function LE(e){for(var r="",a=0;a<e.length;++a){var i=e[a];i<=65535?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return r}function Jt(e){return 0<=e&&e<=127}var ei=Jt,Dr=-1;function Qp(e){this.tokens=[].slice.call(e),this.tokens.reverse()}Qp.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():Dr},prepend:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.push(r.pop());else this.tokens.push(e)},push:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.unshift(r.shift());else this.tokens.unshift(e)}};var ia=-1;function Lr(e,r){if(e)throw TypeError("Decoder error");return r||65533}function bi(e){throw TypeError("The code point "+e+" could not be encoded.")}function UE(){}UE.prototype={handler:function(e,r){}};function NE(){}NE.prototype={handler:function(e,r){}};function Xp(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(Jp,e)?Jp[e]:null}var Ug=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],Jp={};Ug.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(a){Jp[a]=r})})});var Ot={},zt={};function ms(e,r){return r&&r[e]||null}function vs(e,r){var a=r.indexOf(e);return a===-1?null:a}function At(e){if(!("encoding-indexes"in global))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return global["encoding-indexes"][e]}function ME(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,a=0,i=At("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[0]<=e)r=n[0],a=n[1];else break}return a+e-r}function HE(e){if(e===59335)return 7457;var r=0,a=0,i=At("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[1]<=e)r=n[1],a=n[0];else break}return a+e-r}function VE(e){eh=eh||At("jis0208").map(function(a,i){return jr(i,8272,8835)?null:a});var r=eh;return r.indexOf(e)}var eh;function $E(e){rh=rh||At("big5").map(function(a,i){return i<(161-129)*157?null:a});var r=rh;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):vs(e,r)}var rh,Ng="utf-8";function Io(e,r){if(!(this instanceof Io))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):Ng,r=dl(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var a=Xp(e);if(a===null||a.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!zt[a.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var i=this;return i._encoding=a,Boolean(r.fatal)&&(i._error_mode="fatal"),Boolean(r.ignoreBOM)&&(i._ignoreBOM=!0),Object.defineProperty||(this.encoding=i._encoding.name.toLowerCase(),this.fatal=i._error_mode==="fatal",this.ignoreBOM=i._ignoreBOM),i}Object.defineProperty&&(Object.defineProperty(Io.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(Io.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(Io.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));Io.prototype.decode=function(r,a){var i;typeof r=="object"&&r instanceof ArrayBuffer?i=new Uint8Array(r):typeof r=="object"&&"buffer"in r&&r.buffer instanceof ArrayBuffer?i=new Uint8Array(r.buffer,r.byteOffset,r.byteLength):i=new Uint8Array(0),a=dl(a),this._do_not_flush||(this._decoder=zt[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(a.stream);for(var t=new Qp(i),n=[],o;;){var s=t.read();if(s===Dr||(o=this._decoder.handler(t,s),o===ia))break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}if(!this._do_not_flush){do{if(o=this._decoder.handler(t,t.read()),o===ia)break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}while(!t.endOfStream());this._decoder=null}function c(l){return zE(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)&&!this._ignoreBOM&&!this._BOMseen&&(l.length>0&&l[0]===65279?(this._BOMseen=!0,l.shift()):l.length>0&&(this._BOMseen=!0)),LE(l)}return c.call(this,n)};function Cu(e,r){if(!(this instanceof Cu))throw TypeError("Called as a function. Did you forget 'new'?");r=dl(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var a=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){e=e!==void 0?String(e):Ng;var i=Xp(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Ot[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");a._encoding=i}else a._encoding=Xp("utf-8"),e!==void 0&&"console"in global&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=a._encoding.name.toLowerCase()),a}Object.defineProperty&&Object.defineProperty(Cu.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});Cu.prototype.encode=function(r,a){r=r===void 0?"":String(r),a=dl(a),this._do_not_flush||(this._encoder=Ot[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(a.stream);for(var i=new Qp(DE(r)),t=[],n;;){var o=i.read();if(o===Dr||(n=this._encoder.handler(i,o),n===ia))break;Array.isArray(n)?t.push.apply(t,n):t.push(n)}if(!this._do_not_flush){for(;n=this._encoder.handler(i,i.read()),n!==ia;)Array.isArray(n)?t.push.apply(t,n):t.push(n);this._encoder=null}return new Uint8Array(t)};function WE(e){var r=e.fatal,a=0,i=0,t=0,n=128,o=191;this.handler=function(s,c){if(c===Dr&&t!==0)return t=0,Lr(r);if(c===Dr)return ia;if(t===0){if(jr(c,0,127))return c;if(jr(c,194,223))t=1,a=c&31;else if(jr(c,224,239))c===224&&(n=160),c===237&&(o=159),t=2,a=c&15;else if(jr(c,240,244))c===240&&(n=144),c===244&&(o=143),t=3,a=c&7;else return Lr(r);return null}if(!jr(c,n,o))return a=t=i=0,n=128,o=191,s.prepend(c),Lr(r);if(n=128,o=191,a=a<<6|c&63,i+=1,i!==t)return null;var l=a;return a=t=i=0,l}}function KE(e){var r=e.fatal;this.handler=function(a,i){if(i===Dr)return ia;if(ei(i))return i;var t,n;jr(i,128,2047)?(t=1,n=192):jr(i,2048,65535)?(t=2,n=224):jr(i,65536,1114111)&&(t=3,n=240);for(var o=[(i>>6*t)+n];t>0;){var s=i>>6*(t-1);o.push(128|s&63),t-=1}return o}}Ot["UTF-8"]=function(e){return new KE(e)};zt["UTF-8"]=function(e){return new WE(e)};function GE(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Dr)return ia;if(Jt(t))return t;var n=e[t-128];return n===null?Lr(a):n}}function YE(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Dr)return ia;if(ei(t))return t;var n=vs(t,e);return n===null&&bi(t),n+128}}(function(){"encoding-indexes"in global&&Ug.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var a=r.name,i=At(a.toLowerCase());zt[a]=function(t){return new GE(i,t)},Ot[a]=function(t){return new YE(i,t)}})})})();zt.GBK=function(e){return new Mg(e)};Ot.GBK=function(e){return new Hg(e,!0)};function Mg(e){var r=e.fatal,a=0,i=0,t=0;this.handler=function(n,o){if(o===Dr&&a===0&&i===0&&t===0)return ia;o===Dr&&(a!==0||i!==0||t!==0)&&(a=0,i=0,t=0,Lr(r));var s;if(t!==0){s=null,jr(o,48,57)&&(s=ME((((a-129)*10+i-48)*126+t-129)*10+o-48));var c=[i,t,o];return a=0,i=0,t=0,s===null?(n.prepend(c),Lr(r)):s}if(i!==0)return jr(o,129,254)?(t=o,null):(n.prepend([i,o]),a=0,i=0,Lr(r));if(a!==0){if(jr(o,48,57))return i=o,null;var l=a,f=null;a=0;var v=o<127?64:65;return(jr(o,64,126)||jr(o,128,254))&&(f=(l-129)*190+(o-v)),s=f===null?null:ms(f,At("gb18030")),s===null&&Jt(o)&&n.prepend(o),s===null?Lr(r):s}return Jt(o)?o:o===128?8364:jr(o,129,254)?(a=o,null):Lr(r)}}function Hg(e,r){var a=e.fatal;this.handler=function(i,t){if(t===Dr)return ia;if(ei(t))return t;if(t===58853)return bi(t);if(r&&t===8364)return 128;var n=vs(t,At("gb18030"));if(n!==null){var o=yn(n/190)+129,s=n%190,c=s<63?64:65;return[o,s+c]}if(r)return bi(t);n=HE(t);var l=yn(n/10/126/10);n=n-l*10*126*10;var f=yn(n/10/126);n=n-f*10*126;var v=yn(n/10),h=n-v*10;return[l+129,f+48,v+129,h+48]}}Ot.gb18030=function(e){return new Hg(e)};zt.gb18030=function(e){return new Mg(e)};function ZE(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Dr&&a!==0)return a=0,Lr(r);if(t===Dr&&a===0)return ia;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:98;switch((jr(t,64,126)||jr(t,161,254))&&(o=(n-129)*157+(t-s)),o){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var c=o===null?null:ms(o,At("big5"));return c===null&&Jt(t)&&i.prepend(t),c===null?Lr(r):c}return Jt(t)?t:jr(t,129,254)?(a=t,null):Lr(r)}}function QE(e){var r=e.fatal;this.handler=function(a,i){if(i===Dr)return ia;if(ei(i))return i;var t=$E(i);if(t===null)return bi(i);var n=yn(t/157)+129;if(n<161)return bi(i);var o=t%157,s=o<63?64:98;return[n,o+s]}}Ot.Big5=function(e){return new QE(e)};zt.Big5=function(e){return new ZE(e)};function XE(e){var r=e.fatal,a=!1,i=0;this.handler=function(t,n){if(n===Dr&&i!==0)return i=0,Lr(r);if(n===Dr&&i===0)return ia;if(i===142&&jr(n,161,223))return i=0,65377-161+n;if(i===143&&jr(n,161,254))return a=!0,i=n,null;if(i!==0){var o=i;i=0;var s=null;return jr(o,161,254)&&jr(n,161,254)&&(s=ms((o-161)*94+(n-161),At(a?"jis0212":"jis0208"))),a=!1,jr(n,161,254)||t.prepend(n),s===null?Lr(r):s}return Jt(n)?n:n===142||n===143||jr(n,161,254)?(i=n,null):Lr(r)}}function JE(e){var r=e.fatal;this.handler=function(a,i){if(i===Dr)return ia;if(ei(i))return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return[142,i-65377+161];i===8722&&(i=65293);var t=vs(i,At("jis0208"));if(t===null)return bi(i);var n=yn(t/94)+161,o=t%94+161;return[n,o]}}Ot["EUC-JP"]=function(e){return new JE(e)};zt["EUC-JP"]=function(e){return new XE(e)};function e9(e){var r=e.fatal,a={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},i=a.ASCII,t=a.ASCII,n=0,o=!1;this.handler=function(s,c){switch(i){default:case a.ASCII:return c===27?(i=a.EscapeStart,null):jr(c,0,127)&&c!==14&&c!==15&&c!==27?(o=!1,c):c===Dr?ia:(o=!1,Lr(r));case a.Roman:return c===27?(i=a.EscapeStart,null):c===92?(o=!1,165):c===126?(o=!1,8254):jr(c,0,127)&&c!==14&&c!==15&&c!==27&&c!==92&&c!==126?(o=!1,c):c===Dr?ia:(o=!1,Lr(r));case a.Katakana:return c===27?(i=a.EscapeStart,null):jr(c,33,95)?(o=!1,65377-33+c):c===Dr?ia:(o=!1,Lr(r));case a.LeadByte:return c===27?(i=a.EscapeStart,null):jr(c,33,126)?(o=!1,n=c,i=a.TrailByte,null):c===Dr?ia:(o=!1,Lr(r));case a.TrailByte:if(c===27)return i=a.EscapeStart,Lr(r);if(jr(c,33,126)){i=a.LeadByte;var l=(n-33)*94+c-33,f=ms(l,At("jis0208"));return f===null?Lr(r):f}return c===Dr?(i=a.LeadByte,s.prepend(c),Lr(r)):(i=a.LeadByte,Lr(r));case a.EscapeStart:return c===36||c===40?(n=c,i=a.Escape,null):(s.prepend(c),o=!1,i=t,Lr(r));case a.Escape:var v=n;n=0;var h=null;if(v===40&&c===66&&(h=a.ASCII),v===40&&c===74&&(h=a.Roman),v===40&&c===73&&(h=a.Katakana),v===36&&(c===64||c===66)&&(h=a.LeadByte),h!==null){i=i=h;var d=o;return o=!0,d?Lr(r):null}return s.prepend([v,c]),o=!1,i=t,Lr(r)}}}function r9(e){var r=e.fatal,a={ASCII:0,Roman:1,jis0208:2},i=a.ASCII;this.handler=function(t,n){if(n===Dr&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if(n===Dr&&i===a.ASCII)return ia;if((i===a.ASCII||i===a.Roman)&&(n===14||n===15||n===27))return bi(65533);if(i===a.ASCII&&ei(n))return n;if(i===a.Roman&&(ei(n)&&n!==92&&n!==126||n==165||n==8254)){if(ei(n))return n;if(n===165)return 92;if(n===8254)return 126}if(ei(n)&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if((n===165||n===8254)&&i!==a.Roman)return t.prepend(n),i=a.Roman,[27,40,74];n===8722&&(n=65293);var o=vs(n,At("jis0208"));if(o===null)return bi(n);if(i!==a.jis0208)return t.prepend(n),i=a.jis0208,[27,36,66];var s=yn(o/94)+33,c=o%94+33;return[s,c]}}Ot["ISO-2022-JP"]=function(e){return new r9(e)};zt["ISO-2022-JP"]=function(e){return new e9(e)};function a9(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Dr&&a!==0)return a=0,Lr(r);if(t===Dr&&a===0)return ia;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:65,c=n<160?129:193;if((jr(t,64,126)||jr(t,128,252))&&(o=(n-c)*188+t-s),jr(o,8836,10715))return 57344-8836+o;var l=o===null?null:ms(o,At("jis0208"));return l===null&&Jt(t)&&i.prepend(t),l===null?Lr(r):l}return Jt(t)||t===128?t:jr(t,161,223)?65377-161+t:jr(t,129,159)||jr(t,224,252)?(a=t,null):Lr(r)}}function t9(e){var r=e.fatal;this.handler=function(a,i){if(i===Dr)return ia;if(ei(i)||i===128)return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return i-65377+161;i===8722&&(i=65293);var t=VE(i);if(t===null)return bi(i);var n=yn(t/188),o=n<31?129:193,s=t%188,c=s<63?64:65;return[n+o,s+c]}}Ot.Shift_JIS=function(e){return new t9(e)};zt.Shift_JIS=function(e){return new a9(e)};function i9(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Dr&&a!==0)return a=0,Lr(r);if(t===Dr&&a===0)return ia;if(a!==0){var n=a,o=null;a=0,jr(t,65,254)&&(o=(n-129)*190+(t-65));var s=o===null?null:ms(o,At("euc-kr"));return o===null&&Jt(t)&&i.prepend(t),s===null?Lr(r):s}return Jt(t)?t:jr(t,129,254)?(a=t,null):Lr(r)}}function n9(e){var r=e.fatal;this.handler=function(a,i){if(i===Dr)return ia;if(ei(i))return i;var t=vs(i,At("euc-kr"));if(t===null)return bi(i);var n=yn(t/190)+129,o=t%190+65;return[n,o]}}Ot["EUC-KR"]=function(e){return new n9(e)};zt["EUC-KR"]=function(e){return new i9(e)};function ml(e,r){var a=e>>8,i=e&255;return r?[a,i]:[i,a]}function Vg(e,r){var a=r.fatal,i=null,t=null;this.handler=function(n,o){if(o===Dr&&(i!==null||t!==null))return Lr(a);if(o===Dr&&i===null&&t===null)return ia;if(i===null)return i=o,null;var s;if(e?s=(i<<8)+o:s=(o<<8)+i,i=null,t!==null){var c=t;return t=null,jr(s,56320,57343)?65536+(c-55296)*1024+(s-56320):(n.prepend(ml(s,e)),Lr(a))}return jr(s,55296,56319)?(t=s,null):jr(s,56320,57343)?Lr(a):s}}function $g(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Dr)return ia;if(jr(t,0,65535))return ml(t,e);var n=ml((t-65536>>10)+55296,e),o=ml((t-65536&1023)+56320,e);return n.concat(o)}}Ot["UTF-16BE"]=function(e){return new $g(!0,e)};zt["UTF-16BE"]=function(e){return new Vg(!0,e)};Ot["UTF-16LE"]=function(e){return new $g(!1,e)};zt["UTF-16LE"]=function(e){return new Vg(!1,e)};function o9(e){var r=e.fatal;this.handler=function(a,i){return i===Dr?ia:Jt(i)?i:63360+i-128}}function s9(e){var r=e.fatal;this.handler=function(a,i){return i===Dr?ia:ei(i)?i:jr(i,63360,63487)?i-63360+128:bi(i)}}Ot["x-user-defined"]=function(e){return new s9(e)};zt["x-user-defined"]=function(e){return new o9(e)};var u9="rejected",c9="fulfilled";function Wg(e){let r=e.map(a=>a.then(i=>({status:c9,value:i})).catch(i=>({status:u9,reason:i})));return Promise.all(r)}function vl(e){return Buffer.from(e).toString("base64")}function ah(e){return Buffer.from(e,"base64").toString("ascii")}var Ni=class{constructor(r){this.map={},r instanceof Ni?r.forEach((a,i)=>this.append(i,a)):Array.isArray(r)?r.forEach(a=>this.append(a[0],a[1])):r&&Object.getOwnPropertyNames(r).forEach(a=>this.append(a,r[a]))}append(r,a){r=Fu(r),a=Kg(a);let i=this.map[r];this.map[r]=i?`${i}, ${a}`:a}delete(r){delete this.map[Fu(r)]}get(r){return r=Fu(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(Fu(r))}set(r,a){this.map[Fu(r)]=Kg(a)}forEach(r,a=null){for(let i in this.map)this.map.hasOwnProperty(i)&&(a?r.call(a,this.map[i],i,this):r(this.map[i],i,this))}keys(){let r=[];return this.forEach(function(a,i){r.push(i)}),th(r)}values(){let r=[];return this.forEach(function(a){r.push(a)}),th(r)}entries(){let r=[];return this.forEach(function(a,i){r.push([i,a])}),th(r)}*[Symbol.iterator](){yield*this.entries()}};function Fu(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e)||e==="")throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function Kg(e){return typeof e!="string"&&(e=String(e)),e}function th(e){let r={next(){let a=e.shift();return{done:a===void 0,value:a}}};return r[Symbol.iterator]=function(){return r},r}function ih(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var gl=Wt(require("zlib"));var l9=e=>e&&e instanceof ArrayBuffer,f9=e=>e&&e instanceof Buffer;function Gg(e){let r=e.indexOf(","),a,i;return e.slice(r-7,r)===";base64"?(a=Buffer.from(e.slice(r+1),"base64"),i=e.slice(5,r-7).trim()):(a=Buffer.from(decodeURIComponent(e.slice(r+1))),i=e.slice(5,r).trim()),i?i.startsWith(";")&&(i=`text/plain${i}`):i="text/plain;charset=US-ASCII",{arrayBuffer:nh(a),mimeType:i}}function nh(e){if(l9(e))return e;if(f9(e))return new Uint8Array(e).buffer;if(ArrayBuffer.isView(e))return e.buffer;if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error(`toArrayBuffer(${JSON.stringify(e,null,2).slice(10)})`)}function Yg(e,r){switch(r.get("content-encoding")){case"br":return e.pipe(gl.default.createBrotliDecompress());case"gzip":return e.pipe(gl.default.createGunzip());case"deflate":return e.pipe(gl.default.createDeflate());default:return e}}async function Zg(e){let r=[];return await new Promise((a,i)=>{e.on("error",t=>i(t)),e.on("readable",()=>e.read()),e.on("data",t=>{typeof t=="string"&&i(new Error("Read stream not binary")),r.push(nh(t))}),e.on("end",()=>{let t=p9(r);a(t)})})}function p9(e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),a=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(a),t=0;for(let n of r)i.set(n,t),t+=n.byteLength;return i.buffer}var sh=Wt(require("stream")),h9=e=>typeof e=="boolean",Qg=e=>typeof e=="function",d9=e=>e!==null&&typeof e=="object",oh=e=>d9(e)&&Qg(e.read)&&Qg(e.pipe)&&h9(e.readable),Kn=class{constructor(r,a){this.bodyUsed=!1;let{headers:i,status:t=200,statusText:n="OK",url:o}=a||{};this.url=o,this.ok=t===200,this.status=t,this.statusText=n,this.headers=new Ni((a==null?void 0:a.headers)||{}),oh(r)?this._body=Yg(r,i):typeof r=="string"?this._body=sh.Readable.from([new TextEncoder().encode(r)]):this._body=sh.Readable.from([r||new ArrayBuffer(0)])}get body(){return ih(!this.bodyUsed),ih(oh(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return oh(this._body)?await Zg(this._body):this._body||new ArrayBuffer(0)}async text(){let r=await this.arrayBuffer();return new TextDecoder().decode(r)}async json(){let r=await this.text();return JSON.parse(r)}async blob(){if(typeof Blob=="undefined")throw new Error("Blob polyfill not installed");return new Blob([await this.arrayBuffer()])}};var Xg=Wt(require("http")),Jg=Wt(require("https"));var uh=e=>e.startsWith("data:"),m9=e=>e.startsWith("http:")||e.startsWith("https:");async function qu(e,r){try{if(globalThis.fetch!==qu&&(m9(e)||uh(e)))return await fetch(e,r);if(uh(e)){let{arrayBuffer:l,mimeType:f}=Gg(e);return new Kn(l,{headers:{"content-type":f},url:e})}let a={},i=e;e.endsWith(".gz")&&(e=e.slice(0,-3),a["content-encoding"]="gzip");let t=await v9(i,r),n=x9(e,t,a),{status:o,statusText:s}=y9(t),c=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&c){let l=g9(e,n.get("location"));return await qu(l,r)}return new Kn(t,{headers:n,status:o,statusText:s,url:e})}catch(a){return new Kn(null,{status:400,statusText:String(a),url:e})}}async function v9(e,r){return await new Promise((a,i)=>{let t=b9(e,r),n=e.startsWith("https:")?Jg.default.request(t,o=>a(o)):Xg.default.request(t,o=>a(o));n.on("error",o=>i(o)),n.end()})}function g9(e,r){if(r.startsWith("http"))return r;let a=new URL(e);return a.pathname=r,a.href}function b9(e,r){let a=(r==null?void 0:r.headers)||{},i={};for(let n of Object.keys(a))i[n.toLowerCase()]=a[n];i["accept-encoding"]=i["accept-encoding"]||"gzip,br,deflate";let t=new URL(e);return Tu(bn(bn({hostname:t.hostname,path:t.pathname,method:"GET"},r),r==null?void 0:r.fetch),{headers:i,port:t.port})}function y9(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function x9(e,r,a={}){let i={};if(r&&r.headers){let t=r.headers;for(let n in t){let o=t[n];i[n.toLowerCase()]=String(o)}}if(!i["content-length"]){let t=w9(e);Number.isFinite(t)&&(i["content-length"]=t)}return Object.assign(i,a),new Ni(i)}function w9(e){return uh(e)?e.length-"data:".length:null}var Yy=Wt(Ky()),Zy=Wt(Uu());function Gy(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function R7(e,r){let a=r.type?r.type.replace("image/",""):"jpeg",i=(0,Zy.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,Yy.default)(i,a,r)}function od(e,r){let a=R7(e,r);return new Promise(i=>{let t=[];a.on("data",n=>t.push(n)),a.on("end",()=>{let n=Buffer.concat(t);i(Gy(n))})})}var T8=Wt(P8()),C8=["image/png","image/jpeg","image/gif"];async function l0(e,r){if(!r)throw new Error("MIMEType is required to parse image under Node.js");let a=e instanceof Buffer?e:Buffer.from(e);return await KU(a,r)}function KU(e,r){return new Promise(a=>(0,T8.default)(e,r,(i,t)=>{if(i)throw i;let n=[...t.shape],o=t.shape.length===4?t.shape.shift():1,s=t.data instanceof Buffer?new Uint8Array(t.data):t.data;a({shape:n,data:s,width:t.shape[0],height:t.shape[1],components:t.shape[2],layers:o?[o]:[]})}))}var B8=Wt(q8());delete global.ReadableStream;var f0=class extends B8.ReadableStream{};var p0=class{constructor(r){this.isWorking=!1;this.isCancelled=!1;this.chunks=r}start(r){this.work(r)}async work(r){let{chunks:a}=this;for(this.isWorking=!0;!this.isCancelled&&(r.desiredSize||0)>0;){let i;try{i=a.next()}catch(t){r.error(t);break}i&&(!i.done&&!this.isCancelled?r.enqueue(i.value):r.close())}this.isWorking=!1}pull(r){this.isWorking||this.work(r)}cancel(){this.isCancelled=!0}};var h0=class extends f0{constructor(r){super(new p0(r.values()),{type:"bytes"});this._chunks=r}async*[Symbol.asyncIterator](r){let a=this.getReader();yield*this._chunks,a.releaseLock()}};var Jo=class{constructor(r=[],a={}){this.parts=[],this.size=0;for(let i of r)if(typeof i=="string"){let t=new TextEncoder().encode(i);this.parts.push(t),this.size+=t.byteLength}else if(i instanceof Jo)this.size+=i.size,this.parts.push(...i.parts);else if(i instanceof ArrayBuffer)this.parts.push(new Uint8Array(i)),this.size+=i.byteLength;else if(i instanceof Uint8Array)this.parts.push(i),this.size+=i.byteLength;else if(ArrayBuffer.isView(i)){let{buffer:t,byteOffset:n,byteLength:o}=i;this.parts.push(new Uint8Array(t,n,o)),this.size+=o}else{let t=new TextEncoder().encode(String(i));this.parts.push(t),this.size+=t.byteLength}this.type=GU(a.type)}slice(r=0,a=this.size,i=""){let{size:t,parts:n}=this,o=r<0?Math.max(t+r,0):Math.min(r,t),s=a<0?Math.max(t+a,0):Math.min(a,t),c=Math.max(s-o,0),l=new Jo([],{type:i});if(c===0)return l;let f=0,v=[];for(let h of n){let{byteLength:d}=h;if(o>0&&d<=o)o-=d,s-=d;else{let y=h.subarray(o,Math.min(d,s));if(v.push(y),f+=y.byteLength,o=0,f>=c)break}}return l.parts=v,l.size=f,l}async arrayBuffer(){return this._toArrayBuffer()}async text(){let r=new TextDecoder,a="";for(let i of this.parts)a+=r.decode(i);return a}stream(){return new h0(this.parts)}toString(){return"[object Blob]"}get[Symbol.toStringTag](){return"Blob"}_toArrayBuffer(){let r=new ArrayBuffer(this.size),a=new Uint8Array(r),i=0;for(let t of this.parts)a.set(t,i),i+=t.byteLength;return r}};function GU(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}var d0=class extends Jo{constructor(r,a,i={}){super(r,i);this.name="";this.webkitRelativePath="";this.name=String(a).replace(/\//g,":"),this.lastModified=(i==null?void 0:i.lastModified)||Date.now()}get[Symbol.toStringTag](){return"File"}};var ZU=!Ui||!("TextEncoder"in za);ZU&&(za.TextEncoder=Cu);var QU=!Ui||!("TextDecoder"in za);QU&&(za.TextDecoder=Io);!Ui&&!("atob"in za)&&vl&&(za.atob=vl);!Ui&&!("btoa"in za)&&ah&&(za.btoa=ah);!Ui&&!("Headers"in za)&&Ni&&(za.Headers=Ni);!Ui&&!("Response"in za)&&Kn&&(za.Response=Kn);!Ui&&!("fetch"in za)&&qu&&(za.fetch=qu);!Ui&&!("_encodeImageNode"in za)&&od&&(za._encodeImageNode=od);!Ui&&!("_parseImageNode"in za)&&l0&&(za._parseImageNode=l0,za._imageFormatsNode=C8);"allSettled"in Promise||(Promise.allSettled=Wg);var un={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},I8=un.self||un.window||un.global||{},R8=un.window||un.self||un.global||{},O8=un.global||un.self||un.window||{},z8=un.document||{};var On=Boolean(typeof process!="object"||String(process)!=="[object process]"||process.browser);var D8=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),XU=D8&&parseFloat(D8[1])||0;function L8(...e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),a=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(a),t=0;for(let n of r)i.set(n,t),t+=n.byteLength;return i.buffer}async function m0(e){let r=[];for await(let a of e)r.push(a);return L8(...r)}function U8(e){return Buffer.isBuffer(e)?new Uint8Array(e.buffer,e.byteOffset,e.length).slice().buffer:e}function N8(e){return e&&typeof e=="object"&&e.isBuffer}function su(e){if(N8(e))return U8(e);if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function uu(e){return r=>new Promise((a,i)=>e(r,(t,n)=>t?i(t):a(n)))}var cn={};RE(cn,{dirname:()=>eN,filename:()=>JU,join:()=>rN,resolve:()=>aN});function M8(){var r;if(typeof process!="undefined"&&typeof process.cwd!="undefined")return process.cwd();let e=(r=window.location)==null?void 0:r.pathname;return(e==null?void 0:e.slice(0,e.lastIndexOf("/")+1))||""}function JU(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(r+1):""}function eN(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(0,r):""}function rN(...e){let r="/";return e=e.map((a,i)=>(i&&(a=a.replace(new RegExp(`^${r}`),"")),i!==e.length-1&&(a=a.replace(new RegExp(`${r}$`),"")),a)),e.join(r)}function aN(...e){let r=[];for(let n=0;n<e.length;n++)r[n]=e[n];let a="",i=!1,t;for(let n=r.length-1;n>=-1&&!i;n--){let o;n>=0?o=r[n]:(t===void 0&&(t=M8()),o=t),o.length!==0&&(a=`${o}/${a}`,i=o.charCodeAt(0)===Oc)}return a=tN(a,!i),i?`/${a}`:a.length>0?a:"."}var Oc=47,v0=46;function tN(e,r){let a="",i=-1,t=0,n,o=!1;for(let s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===Oc)break;n=Oc}if(n===Oc){if(!(i===s-1||t===1))if(i!==s-1&&t===2){if(a.length<2||!o||a.charCodeAt(a.length-1)!==v0||a.charCodeAt(a.length-2)!==v0){if(a.length>2){let c=a.length-1,l=c;for(;l>=0&&a.charCodeAt(l)!==Oc;--l);if(l!==c){a=l===-1?"":a.slice(0,l),i=s,t=0,o=!1;continue}}else if(a.length===2||a.length===1){a="",i=s,t=0,o=!1;continue}}r&&(a.length>0?a+="/..":a="..",o=!0)}else{let c=e.slice(i+1,s);a.length>0?a+=`/${c}`:a=c,o=!1}i=s,t=0}else n===v0&&t!==-1?++t:t=-1}return a}var g0="Tile converter does not work in browser, only in node js environment";var wo=Wt(require("fs")),b0=class{constructor(r,a){this.read=(r,a,i,t)=>new Promise(n=>{(0,wo.read)(this.fileDescriptor,r,a,i,t,(o,s,c)=>n({bytesRead:s,buffer:c}))});this.fileDescriptor=r,this.stats=a}async close(){return new Promise(r=>{(0,wo.close)(this.fileDescriptor,a=>r())})}get stat(){return this.stats}},dp=b0;dp.open=async r=>{let[a,i]=await Promise.all([new Promise(t=>{(0,wo.open)(r,void 0,void 0,(n,o)=>t(o))}),new Promise(t=>{(0,wo.stat)(r,{bigint:!0},(n,o)=>t(o))})]);return new b0(a,i)};var cu=class{static async from(r){let a=await dp.open(r);return new cu(a,a.stat.size)}constructor(r,a){this.fileDescriptor=r,this.size=a}async destroy(){await this.fileDescriptor.close()}async getUint8(r){let a=new Uint8Array((await this.fileDescriptor.read(Buffer.alloc(1),0,1,r)).buffer.buffer).at(0);if(a===void 0)throw new Error("something went wrong");return a}async getUint16(r){let a=new Uint16Array((await this.fileDescriptor.read(Buffer.alloc(2),0,2,r)).buffer.buffer).at(0);if(a===void 0)throw new Error("something went wrong");return a}async getUint32(r){let a=new Uint32Array((await this.fileDescriptor.read(Buffer.alloc(4),0,4,r)).buffer.buffer).at(0);if(a===void 0)throw new Error("something went wrong");return a}async getBigUint64(r){let a=new BigInt64Array((await this.fileDescriptor.read(Buffer.alloc(8),0,8,r)).buffer.buffer).at(0);if(a===void 0)throw new Error("something went wrong");return a}async slice(r,a){let i=a-r;if(i>Number.MAX_SAFE_INTEGER)throw new Error("too big slice");let t=Number(i);return(await this.fileDescriptor.read(Buffer.alloc(t),0,t,r)).buffer.buffer}get length(){return this.size}};var nN=8n,oN=18n,sN=22n,uN=26n,cN=28n,mp=30n,H8=Buffer.from([80,75,3,4]),vp=async(e,r)=>{if(Buffer.from(await r.slice(e,e+4n)).compare(H8)!==0)return null;let a=await r.getUint16(e+uN),i=new TextDecoder().decode(await r.slice(e+mp,e+mp+BigInt(a))).split("\\").join("/"),t=await r.getUint16(e+cN),n=e+mp+BigInt(a+t),o=await r.getUint16(e+nN),s=BigInt(await r.getUint32(e+oN)),c=BigInt(await r.getUint32(e+sN)),l=e+mp+BigInt(a),f=4n;return c===BigInt(4294967295)&&(c=await r.getBigUint64(l+f),f+=8n),s===BigInt(4294967295)&&(s=await r.getBigUint64(l+f),f+=8n),n===BigInt(4294967295)&&(n=await r.getBigUint64(l+f)),{fileNameLength:a,fileName:i,extraFieldLength:t,fileDataOffset:n,compressedSize:s,compressionMethod:o}};var y0=class{constructor(r){this.compressBatches=this.compressBatches.bind(this),this.decompressBatches=this.decompressBatches.bind(this)}async preload(){}async compress(r){return await this.preload(),this.compressSync(r)}async decompress(r,a){return await this.preload(),this.decompressSync(r,a)}compressSync(r){throw new Error(`${this.name}: sync compression not supported`)}decompressSync(r,a){throw new Error(`${this.name}: sync decompression not supported`)}async*compressBatches(r){let a=await this.concatenate(r);yield this.compress(a)}async*decompressBatches(r){let a=await this.concatenate(r);yield this.decompress(a)}concatenate(r){return m0(r)}improveError(r){return r.message.includes(this.name)||(r.message=`${this.name} ${r.message}`),r}};var us=Wt(CS()),Nn=Wt(require("zlib"));var eg=class extends y0{constructor(r={}){super(r);this.name="deflate";this.extensions=[];this.contentEncodings=["deflate"];this.isSupported=!0;this._chunks=[];this.options=r}async compress(r){var a,i;if(!On&&((a=this.options.deflate)==null?void 0:a.useZlib)){let t=((i=this.options.deflate)==null?void 0:i.gzip)?await uu(Nn.default.gzip)(r):await uu(Nn.default.deflate)(r);return su(t)}return this.compressSync(r)}async decompress(r){var a,i;if(!On&&((a=this.options.deflate)==null?void 0:a.useZlib)){let t=((i=this.options.deflate)==null?void 0:i.gzip)?await uu(Nn.default.gunzip)(r):await uu(Nn.default.inflate)(r);return su(t)}return this.decompressSync(r)}compressSync(r){var n,o,s,c;if(!On&&((n=this.options.deflate)==null?void 0:n.useZlib)){let l=((o=this.options.deflate)==null?void 0:o.gzip)?Nn.default.gzipSync(r):Nn.default.deflateSync(r);return su(l)}let a=((s=this.options)==null?void 0:s.deflate)||{},i=new Uint8Array(r);return(((c=this.options)==null?void 0:c.raw)?us.default.deflateRaw:us.default.deflate)(i,a).buffer}decompressSync(r){var n,o,s,c;if(!On&&((n=this.options.deflate)==null?void 0:n.useZlib)){let l=((o=this.options.deflate)==null?void 0:o.gzip)?Nn.default.gunzipSync(r):Nn.default.inflateSync(r);return su(l)}let a=((s=this.options)==null?void 0:s.deflate)||{},i=new Uint8Array(r);return(((c=this.options)==null?void 0:c.raw)?us.default.inflateRaw:us.default.inflate)(i,a).buffer}async*compressBatches(r){var t;let a=((t=this.options)==null?void 0:t.deflate)||{},i=new us.default.Deflate(a);yield*this.transformBatches(i,r)}async*decompressBatches(r){var t;let a=((t=this.options)==null?void 0:t.deflate)||{},i=new us.default.Inflate(a);yield*this.transformBatches(i,r)}async*transformBatches(r,a){r.onData=this._onData.bind(this),r.onEnd=this._onEnd.bind(this);for await(let o of a){let s=new Uint8Array(o);if(!r.push(s,!1))throw new Error(`${this._getError()}write`);yield*this._getChunks()}let i=new Uint8Array(0),t=r.push(i,!0);yield*this._getChunks()}_onData(r){this._chunks.push(r)}_onEnd(r){if(r!==0)throw new Error(this._getError(r)+this._chunks.length)}_getChunks(){let r=this._chunks;return this._chunks=[],r}_getError(r=0){let a={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"};return`${this.name}: ${a[r]}`}};var Bp=class extends eg{constructor(r){super(Tu(bn({},r),{deflate:Tu(bn({},r==null?void 0:r.gzip),{gzip:!0})}));this.name="gzip";this.extensions=["gz","gzip"];this.contentEncodings=["gzip","x-gzip"];this.isSupported=!0}};var rg=Wt(require("fs")),ag=Wt(require("path"));async function FS(e,r,a="index.json"){let i;r instanceof Promise?i=new Uint8Array(await r):r instanceof ArrayBuffer?i=new Uint8Array(r):i=r,await rg.promises.mkdir(e,{recursive:!0});let t=(0,ag.join)(e,a);try{await rg.promises.writeFile(t,i)}catch(n){throw n}return console.log(`${t} saved.`),t}var aH=["3dSceneLayer.json.gz","3dNodeIndexDocument.json.gz","sharedResource.json.gz"],Ip=class{async extract(r){if(On)return console.log(g0),g0;let{inputUrl:a}=r,i=await cu.from(a),t=await vp(0n,i);for(;t;)await this.writeFile(await this.unGzip({name:this.correctIndexNames(t.fileName),data:await i.slice(t.fileDataOffset,t.fileDataOffset+t.compressedSize)}),r.outputPath),t=await vp(t.fileDataOffset+(t==null?void 0:t.compressedSize),i);return"success"}correctIndexNames(r){if(aH.includes(cn.filename(cn.join("/",r))))return cn.join(cn.dirname(r),"index.json.gz");let a=/^(.*\/[^\/\.]*)(\..+)$/.exec(r);return a?`${a==null?void 0:a.at(1)}/index${a==null?void 0:a.at(2)}`:null}async unGzip(r){return/\.gz$/.test(r.name??"")?{data:await new Bp().decompress(r.data),name:(r.name??"").slice(0,-3)}:Promise.resolve(r)}async writeFile(r,a){if(!r.name)return;let i=cn.join(a,r.name),t=cn.dirname(i),n=cn.filename(i);await FS(t,r.data,n)}};function tH(e,r){if(e+1>=r.length)return"";let a=r[e+1];return a.indexOf("--")===0?"":a}function tg(e,r){let a=tH(e,r);return console.log(`Input tileset value: ${a}`),console.log(`Modified tileset value: ${a.replace(/\\/g,"/")}`),a.replace(/\\/g,"/")}function qS(e){return e.reduce((r,a)=>{let i=a.indexOf("="),t=a.slice(0,i),n=a.slice(i+1,a.length);return a.includes("=")&&a.startsWith("--")&&n?r.concat(t,n):r.concat(a)},[])}async function iH(){let[,,...e]=process.argv;e.length===0&&BS();let r=qS(e),a=sH(r),i=oH(a);await nH(i)}iH().catch(e=>{console.log(e),process.exit(1)});function BS(){console.log("cli: converter slpk to I3S..."),console.log('--output [Output folder, default: "data" folder]'),console.log("--tileset [SLPK file]"),process.exit(0)}async function nH(e){console.log("------------------------------------------------"),console.log("Starting conversion of SLPK"),console.log("------------------------------------------------"),new Ip().extract({inputUrl:e.tileset,outputPath:e.output})}function oH(e){let r={output:()=>console.log("Missed: --output [Output path name]"),tileset:()=>console.log("Missed: --tileset [SLPK file]")},a=[];for(let i in r)e[i]||a.push(r[i]);return a.length&&(a.forEach(i=>i()),process.exit(1)),e}function sH(e){let r={};return e.forEach((a,i)=>{if(a.indexOf("--")===0)switch(a){case"--tileset":r.tileset=tg(i,e);break;case"--output":r.output=tg(i,e);break;case"--help":BS();break;default:console.warn(`Unknown option ${a}`),process.exit(0)}}),r}
|
|
94
|
+
`,v.message,v.stack);var h=new Error("tunneling socket could not be established, cause="+v.message);h.code="ECONNRESET",r.request.emit("error",h),i.removeSocket(t)}};sn.prototype.removeSocket=function(r){var a=this.sockets.indexOf(r);if(a!==-1){this.sockets.splice(a,1);var i=this.requests.shift();i&&this.createConnection(i)}};function J5(e,r){var a=this;sn.prototype.createSocket.call(a,e,function(i){var t=ML.connect(0,e8({},a.options,{servername:e.host,socket:i}));a.sockets[a.sockets.indexOf(i)]=t,r(t)})}function e8(e){for(var r=1,a=arguments.length;r<a;++r){var i=arguments[r];if(typeof i=="object")for(var t=Object.keys(i),n=0,o=t.length;n<o;++n){var s=t[n];i[s]!==void 0&&(e[s]=i[s])}}return e}var Xo;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Xo=function(){var e=Array.prototype.slice.call(arguments);typeof e[0]=="string"?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:Xo=function(){};iu.debug=Xo});var n8=O(i8=>{"use strict";var QL=require("url"),XL=r8(),a8=["accept","accept-charset","accept-encoding","accept-language","accept-ranges","cache-control","content-encoding","content-language","content-location","content-md5","content-range","content-type","connection","date","expect","max-forwards","pragma","referer","te","user-agent","via"],t8=["proxy-authorization"];function JL(e){var r=e.port,a=e.protocol,i=e.hostname+":";return r?i+=r:a==="https:"?i+="443":i+="80",i}function eU(e,r){var a=r.reduce(function(i,t){return i[t.toLowerCase()]=!0,i},{});return Object.keys(e).filter(function(i){return a[i.toLowerCase()]}).reduce(function(i,t){return i[t]=e[t],i},{})}function rU(e,r){var a=e.proxy,i={proxy:{host:a.hostname,port:+a.port,proxyAuth:a.auth,headers:r},headers:e.headers,ca:e.ca,cert:e.cert,key:e.key,passphrase:e.passphrase,pfx:e.pfx,ciphers:e.ciphers,rejectUnauthorized:e.rejectUnauthorized,secureOptions:e.secureOptions,secureProtocol:e.secureProtocol};return i}function aU(e,r){var a=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[a,i].join("Over")}function tU(e){var r=e.uri,a=e.proxy,i=aU(r,a);return XL[i]}function Cc(e){this.request=e,this.proxyHeaderWhiteList=a8,this.proxyHeaderExclusiveList=[],typeof e.tunnel!="undefined"&&(this.tunnelOverride=e.tunnel)}Cc.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride!="undefined"?e.tunnelOverride:r.uri.protocol==="https:"};Cc.prototype.setup=function(e){var r=this,a=r.request;if(e=e||{},typeof a.proxy=="string"&&(a.proxy=QL.parse(a.proxy)),!a.proxy||!a.tunnel)return!1;e.proxyHeaderWhiteList&&(r.proxyHeaderWhiteList=e.proxyHeaderWhiteList),e.proxyHeaderExclusiveList&&(r.proxyHeaderExclusiveList=e.proxyHeaderExclusiveList);var i=r.proxyHeaderExclusiveList.concat(t8),t=r.proxyHeaderWhiteList.concat(i),n=eU(a.headers,t);n.host=JL(a.uri),i.forEach(a.removeHeader,a);var o=tU(a),s=rU(a,n);return a.agent=o(s),!0};Cc.defaultProxyHeaderWhiteList=a8;Cc.defaultProxyHeaderExclusiveList=t8;i8.Tunnel=Cc});var s8=O((o8,Fc)=>{(function(){var e,r,a,i,t,n;typeof performance!="undefined"&&performance!==null&&performance.now?Fc.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(Fc.exports=function(){return(e()-t)/1e6},r=process.hrtime,e=function(){var o;return o=r(),o[0]*1e9+o[1]},i=e(),n=process.uptime()*1e9,t=i-n):Date.now?(Fc.exports=function(){return Date.now()-a},a=Date.now()):(Fc.exports=function(){return new Date().getTime()-a},a=new Date().getTime())}).call(o8)});var b8=O((uY,g8)=>{"use strict";var iU=require("http"),u8=require("https"),qc=require("url"),o0=require("util"),cp=require("stream"),lp=require("zlib"),s0=Kw(),nU=t2(),oU=K_(),sU=Rf(),c8=Of(),l8=a3(),uU=C3(),cU=Bl(),f8=_v(),lU=O3().strict,nu=Dl(),fU=Id(),pU=L3(),hU=Q3().Querystring,dU=S5().Har,mU=I5().Auth,vU=$5().OAuth,gU=W5(),bU=G5().Multipart,yU=Q5().Redirect,u0=n8().Tunnel,ou=s8(),Bc=Ps().Buffer,p8=nu.safeStringify,xU=nu.isReadStream,wU=nu.toBase64,kU=nu.defer,h8=nu.copy,_U=nu.version,d8=fU.jar(),m8={};function jU(e,r){var a={};for(var i in r){var t=e.indexOf(i)===-1;t&&(a[i]=r[i])}return a}function SU(e,r){var a={};for(var i in r){var t=e.indexOf(i)!==-1,n=typeof r[i]=="function";t&&n||(a[i]=r[i])}return a}function v8(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function EU(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:v8.call(e.request)}}function Rr(e){var r=this;e.har&&(r._har=new dU(r),e=r._har.options(e)),cp.Stream.call(r);var a=Object.keys(Rr.prototype),i=jU(a,e);cU(r,i),e=SU(a,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new hU(r),r._auth=new mU(r),r._oauth=new vU(r),r._multipart=new bU(r),r._redirect=new yU(r),r._tunnel=new u0(r),r.init(e)}o0.inherits(Rr,cp.Stream);Rr.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function ot(){Rr.debug&&console.error("REQUEST %s",o0.format.apply(o0,arguments))}Rr.prototype.debug=ot;Rr.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?h8(r.headers):{};for(var a in r.headers)typeof r.headers[a]=="undefined"&&delete r.headers[a];if(c8.httpify(r,r.headers),r.method||(r.method=e.method||"GET"),r.localAddress||(r.localAddress=e.localAddress),r._qs.init(e),ot(e),!r.pool&&r.pool!==!1&&(r.pool=m8),r.dests=r.dests||[],r.__isRequestRequest=!0,!r._callback&&r.callback&&(r._callback=r.callback,r.callback=function(){r._callbackCalled||(r._callbackCalled=!0,r._callback.apply(r,arguments))},r.on("error",r.callback.bind()),r.on("complete",r.callback.bind(r,null))),!r.uri&&r.url&&(r.uri=r.url,delete r.url),r.baseUrl){if(typeof r.baseUrl!="string")return r.emit("error",new Error("options.baseUrl must be a string"));if(typeof r.uri!="string")return r.emit("error",new Error("options.uri must be a string when using options.baseUrl"));if(r.uri.indexOf("//")===0||r.uri.indexOf("://")!==-1)return r.emit("error",new Error("options.uri must be a path when using options.baseUrl"));var i=r.baseUrl.lastIndexOf("/")===r.baseUrl.length-1,t=r.uri.indexOf("/")===0;i&&t?r.uri=r.baseUrl+r.uri.slice(1):i||t?r.uri=r.baseUrl+r.uri:r.uri===""?r.uri=r.baseUrl:r.uri=r.baseUrl+"/"+r.uri,delete r.baseUrl}if(!r.uri)return r.emit("error",new Error("options.uri is a required argument"));if(typeof r.uri=="string"&&(r.uri=qc.parse(r.uri)),r.uri.href||(r.uri.href=qc.format(r.uri)),r.uri.protocol==="unix:")return r.emit("error",new Error("`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`"));if(r.uri.host==="unix"&&r.enableUnixSocket(),r.strictSSL===!1&&(r.rejectUnauthorized=!1),r.uri.pathname||(r.uri.pathname="/"),!(r.uri.host||r.uri.hostname&&r.uri.port)&&!r.uri.isUnix){var n=qc.format(r.uri),o='Invalid URI "'+n+'"';return Object.keys(e).length===0&&(o+=". This can be caused by a crappy redirection."),r.abort(),r.emit("error",new Error(o))}if(r.hasOwnProperty("proxy")||(r.proxy=pU(r.uri)),r.tunnel=r._tunnel.isEnabled(),r.proxy&&r._tunnel.setup(e),r._redirect.onRequest(e),r.setHost=!1,!r.hasHeader("host")){var s=r.originalHostHeaderName||"host";r.setHeader(s,r.uri.host),r.uri.port&&(r.uri.port==="80"&&r.uri.protocol==="http:"||r.uri.port==="443"&&r.uri.protocol==="https:")&&r.setHeader(s,r.uri.hostname),r.setHost=!0}if(r.jar(r._jar||e.jar),r.uri.port||(r.uri.protocol==="http:"?r.uri.port=80:r.uri.protocol==="https:"&&(r.uri.port=443)),r.proxy&&!r.tunnel?(r.port=r.proxy.port,r.host=r.proxy.hostname):(r.port=r.uri.port,r.host=r.uri.hostname),e.form&&r.form(e.form),e.formData){var c=e.formData,l=r.form(),f=function(R,z){z&&z.hasOwnProperty("value")&&z.hasOwnProperty("options")?l.append(R,z.value,z.options):l.append(R,z)};for(var v in c)if(c.hasOwnProperty(v)){var h=c[v];if(h instanceof Array)for(var d=0;d<h.length;d++)f(v,h[d]);else f(v,h)}}if(e.qs&&r.qs(e.qs),r.uri.path?r.path=r.uri.path:r.path=r.uri.pathname+(r.uri.search||""),r.path.length===0&&(r.path="/"),e.aws&&r.aws(e.aws),e.hawk&&r.hawk(e.hawk),e.httpSignature&&r.httpSignature(e.httpSignature),e.auth&&(Object.prototype.hasOwnProperty.call(e.auth,"username")&&(e.auth.user=e.auth.username),Object.prototype.hasOwnProperty.call(e.auth,"password")&&(e.auth.pass=e.auth.password),r.auth(e.auth.user,e.auth.pass,e.auth.sendImmediately,e.auth.bearer)),r.gzip&&!r.hasHeader("accept-encoding")&&r.setHeader("accept-encoding","gzip, deflate"),r.uri.auth&&!r.hasHeader("authorization")){var y=r.uri.auth.split(":").map(function(R){return r._qs.unescape(R)});r.auth(y[0],y.slice(1).join(":"),!0)}if(!r.tunnel&&r.proxy&&r.proxy.auth&&!r.hasHeader("proxy-authorization")){var j=r.proxy.auth.split(":").map(function(R){return r._qs.unescape(R)}),w="Basic "+wU(j.join(":"));r.setHeader("proxy-authorization",w)}r.proxy&&!r.tunnel&&(r.path=r.uri.protocol+"//"+r.uri.host+r.path),e.json&&r.json(e.json),e.multipart&&r.multipart(e.multipart),e.time&&(r.timing=!0,r.elapsedTime=r.elapsedTime||0);function A(){if(lU(r.body)&&(r.body=Bc.from(r.body)),!r.hasHeader("content-length")){var R;typeof r.body=="string"?R=Bc.byteLength(r.body):Array.isArray(r.body)?R=r.body.reduce(function(z,U){return z+U.length},0):R=r.body.length,R?r.setHeader("content-length",R):r.emit("error",new Error("Argument error, options.body."))}}r.body&&!f8(r.body)&&A(),e.oauth?r.oauth(e.oauth):r._oauth.params&&r.hasHeader("authorization")&&r.oauth(r._oauth.params);var P=r.proxy&&!r.tunnel?r.proxy.protocol:r.uri.protocol,T={"http:":iU,"https:":u8},I=r.httpModules||{};if(r.httpModule=I[P]||T[P],!r.httpModule)return r.emit("error",new Error("Invalid protocol: "+P));if(e.ca&&(r.ca=e.ca),!r.agent)if(e.agentOptions&&(r.agentOptions=e.agentOptions),e.agentClass)r.agentClass=e.agentClass;else if(e.forever){var F=_U();F.major===0&&F.minor<=10?r.agentClass=P==="http:"?l8:l8.SSL:(r.agentClass=r.httpModule.Agent,r.agentOptions=r.agentOptions||{},r.agentOptions.keepAlive=!0)}else r.agentClass=r.httpModule.Agent;r.pool===!1?r.agent=!1:r.agent=r.agent||r.getNewAgent(),r.on("pipe",function(R){if(r.ntick&&r._started&&r.emit("error",new Error("You cannot pipe to this stream after the outbound request has started.")),r.src=R,xU(R))r.hasHeader("content-type")||r.setHeader("content-type",sU.lookup(R.path));else{if(R.headers)for(var z in R.headers)r.hasHeader(z)||r.setHeader(z,R.headers[z]);r._json&&!r.hasHeader("content-type")&&r.setHeader("content-type","application/json"),R.method&&!r.explicitMethod&&(r.method=R.method)}}),kU(function(){if(!r._aborted){var R=function(){if(r._form&&(r._auth.hasAuth?r._auth.hasAuth&&r._auth.sentAuth&&r._form.pipe(r):r._form.pipe(r)),r._multipart&&r._multipart.chunked&&r._multipart.body.pipe(r),r.body)f8(r.body)?r.body.pipe(r):(A(),Array.isArray(r.body)?r.body.forEach(function(z){r.write(z)}):r.write(r.body),r.end());else if(r.requestBodyStream)console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe."),r.requestBodyStream.pipe(r);else if(!r.src){if(r._auth.hasAuth&&!r._auth.sentAuth){r.end();return}r.method!=="GET"&&typeof r.method!="undefined"&&r.setHeader("content-length",0),r.end()}};r._form&&!r.hasHeader("content-length")?(r.setHeader(r._form.getHeaders(),!0),r._form.getLength(function(z,U){!z&&!isNaN(U)&&r.setHeader("content-length",U),R()})):R(),r.ntick=!0}})};Rr.prototype.getNewAgent=function(){var e=this,r=e.agentClass,a={};if(e.agentOptions)for(var i in e.agentOptions)a[i]=e.agentOptions[i];e.ca&&(a.ca=e.ca),e.ciphers&&(a.ciphers=e.ciphers),e.secureProtocol&&(a.secureProtocol=e.secureProtocol),e.secureOptions&&(a.secureOptions=e.secureOptions),typeof e.rejectUnauthorized!="undefined"&&(a.rejectUnauthorized=e.rejectUnauthorized),e.cert&&e.key&&(a.key=e.key,a.cert=e.cert),e.pfx&&(a.pfx=e.pfx),e.passphrase&&(a.passphrase=e.passphrase);var t="";r!==e.httpModule.Agent&&(t+=r.name);var n=e.proxy;typeof n=="string"&&(n=qc.parse(n));var o=n&&n.protocol==="https:"||this.uri.protocol==="https:";return o&&(a.ca&&(t&&(t+=":"),t+=a.ca),typeof a.rejectUnauthorized!="undefined"&&(t&&(t+=":"),t+=a.rejectUnauthorized),a.cert&&(t&&(t+=":"),t+=a.cert.toString("ascii")+a.key.toString("ascii")),a.pfx&&(t&&(t+=":"),t+=a.pfx.toString("ascii")),a.ciphers&&(t&&(t+=":"),t+=a.ciphers),a.secureProtocol&&(t&&(t+=":"),t+=a.secureProtocol),a.secureOptions&&(t&&(t+=":"),t+=a.secureOptions)),e.pool===m8&&!t&&Object.keys(a).length===0&&e.httpModule.globalAgent?e.httpModule.globalAgent:(t=e.uri.protocol+t,e.pool[t]||(e.pool[t]=new r(a),e.pool.maxSockets&&(e.pool[t].maxSockets=e.pool.maxSockets)),e.pool[t])};Rr.prototype.start=function(){var e=this;if(e.timing)var r=new Date().getTime(),a=ou();if(!e._aborted){e._started=!0,e.method=e.method||"GET",e.href=e.uri.href,e.src&&e.src.stat&&e.src.stat.size&&!e.hasHeader("content-length")&&e.setHeader("content-length",e.src.stat.size),e._aws&&e.aws(e._aws,!0);var i=h8(e);delete i.auth,ot("make request",e.uri.href),delete i.timeout;try{e.req=e.httpModule.request(i)}catch(n){e.emit("error",n);return}e.timing&&(e.startTime=r,e.startTimeNow=a,e.timings={});var t;e.timeout&&!e.timeoutTimer&&(e.timeout<0?t=0:typeof e.timeout=="number"&&isFinite(e.timeout)&&(t=e.timeout)),e.req.on("response",e.onRequestResponse.bind(e)),e.req.on("error",e.onRequestError.bind(e)),e.req.on("drain",function(){e.emit("drain")}),e.req.on("socket",function(n){var o=n._connecting||n.connecting;if(e.timing&&(e.timings.socket=ou()-e.startTimeNow,o)){var s=function(){e.timings.lookup=ou()-e.startTimeNow},c=function(){e.timings.connect=ou()-e.startTimeNow};n.once("lookup",s),n.once("connect",c),e.req.once("error",function(){n.removeListener("lookup",s),n.removeListener("connect",c)})}var l=function(){e.req.setTimeout(t,function(){if(e.req){e.abort();var v=new Error("ESOCKETTIMEDOUT");v.code="ESOCKETTIMEDOUT",v.connect=!1,e.emit("error",v)}})};if(t!==void 0)if(o){var f=function(){n.removeListener("connect",f),e.clearTimeout(),l()};n.on("connect",f),e.req.on("error",function(v){n.removeListener("connect",f)}),e.timeoutTimer=setTimeout(function(){n.removeListener("connect",f),e.abort();var v=new Error("ETIMEDOUT");v.code="ETIMEDOUT",v.connect=!0,e.emit("error",v)},t)}else l();e.emit("socket",n)}),e.emit("request",e.req)}};Rr.prototype.onRequestError=function(e){var r=this;if(!r._aborted){if(r.req&&r.req._reusedSocket&&e.code==="ECONNRESET"&&r.agent.addRequestNoreuse){r.agent={addRequest:r.agent.addRequestNoreuse.bind(r.agent)},r.start(),r.req.end();return}r.clearTimeout(),r.emit("error",e)}};Rr.prototype.onRequestResponse=function(e){var r=this;if(r.timing&&(r.timings.response=ou()-r.startTimeNow),ot("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=ou()-r.startTimeNow,e.timingStart=r.startTime,r.timings.socket||(r.timings.socket=0),r.timings.lookup||(r.timings.lookup=r.timings.socket),r.timings.connect||(r.timings.connect=r.timings.lookup),r.timings.response||(r.timings.response=r.timings.connect),ot("elapsed time",r.timings.end),r.elapsedTime+=Math.round(r.timings.end),e.elapsedTime=r.elapsedTime,e.timings=r.timings,e.timingPhases={wait:r.timings.socket,dns:r.timings.lookup-r.timings.socket,tcp:r.timings.connect-r.timings.lookup,firstByte:r.timings.response-r.timings.connect,download:r.timings.end-r.timings.response,total:r.timings.end}),ot("response end",r.uri.href,e.statusCode,e.headers)}),r._aborted){ot("aborted",r.uri.href),e.resume();return}if(r.response=e,e.request=r,e.toJSON=EU,r.httpModule===u8&&r.strictSSL&&(!e.hasOwnProperty("socket")||!e.socket.authorized)){ot("strict ssl error",r.uri.href);var a=e.hasOwnProperty("socket")?e.socket.authorizationError:r.uri.href+" does not support SSL";r.emit("error",new Error("SSL Error: "+a));return}r.originalHost=r.getHeader("host"),r.originalHostHeaderName||(r.originalHostHeaderName=r.hasHeader("host")),r.setHost&&r.removeHeader("host"),r.clearTimeout();var i=r._jar&&r._jar.setCookie?r._jar:d8,t=function(f){try{i.setCookie(f,r.uri.href,{ignoreError:!0})}catch(v){r.emit("error",v)}};if(e.caseless=c8(e.headers),e.caseless.has("set-cookie")&&!r._disableCookies){var n=e.caseless.has("set-cookie");Array.isArray(e.headers[n])?e.headers[n].forEach(t):t(e.headers[n])}if(!r._redirect.onResponse(e)){{e.on("close",function(){r._ended||r.response.emit("end")}),e.once("end",function(){r._ended=!0});var o=function(f){return r.method==="HEAD"||f>=100&&f<200||f===204||f===304},s;if(r.gzip&&!o(e.statusCode)){var c=e.headers["content-encoding"]||"identity";c=c.trim().toLowerCase();var l={flush:lp.Z_SYNC_FLUSH,finishFlush:lp.Z_SYNC_FLUSH};c==="gzip"?(s=lp.createGunzip(l),e.pipe(s)):c==="deflate"?(s=lp.createInflate(l),e.pipe(s)):(c!=="identity"&&ot("ignoring unrecognized Content-Encoding "+c),s=e)}else s=e;r.encoding&&(r.dests.length!==0?console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid."):s.setEncoding(r.encoding)),r._paused&&s.pause(),r.responseContent=s,r.emit("response",e),r.dests.forEach(function(f){r.pipeDest(f)}),s.on("data",function(f){r.timing&&!r.responseStarted&&(r.responseStartTime=new Date().getTime(),e.responseStartTime=r.responseStartTime),r._destdata=!0,r.emit("data",f)}),s.once("end",function(f){r.emit("end",f)}),s.on("error",function(f){r.emit("error",f)}),s.on("close",function(){r.emit("close")}),r.callback?r.readResponseBody(e):r.on("end",function(){if(r._aborted){ot("aborted",r.uri.href);return}r.emit("complete",e)})}ot("finish init function",r.uri.href)}};Rr.prototype.readResponseBody=function(e){var r=this;ot("reading response's body");var a=[],i=0,t=[];r.on("data",function(n){Bc.isBuffer(n)?n.length&&(i+=n.length,a.push(n)):t.push(n)}),r.on("end",function(){if(ot("end event",r.uri.href),r._aborted){ot("aborted",r.uri.href),a=[],i=0;return}if(i?(ot("has body",r.uri.href,i),e.body=Bc.concat(a,i),r.encoding!==null&&(e.body=e.body.toString(r.encoding)),a=[],i=0):t.length&&(r.encoding==="utf8"&&t[0].length>0&&t[0][0]==="\uFEFF"&&(t[0]=t[0].substring(1)),e.body=t.join("")),r._json)try{e.body=JSON.parse(e.body,r._jsonReviver)}catch{ot("invalid JSON received",r.uri.href)}ot("emitting complete",r.uri.href),typeof e.body=="undefined"&&!r._json&&(e.body=r.encoding===null?Bc.alloc(0):""),r.emit("complete",e,e.body)})};Rr.prototype.abort=function(){var e=this;e._aborted=!0,e.req?e.req.abort():e.response&&e.response.destroy(),e.clearTimeout(),e.emit("abort")};Rr.prototype.pipeDest=function(e){var r=this,a=r.response;if(e.headers&&!e.headersSent){if(a.caseless.has("content-type")){var i=a.caseless.has("content-type");e.setHeader?e.setHeader(i,a.headers[i]):e.headers[i]=a.headers[i]}if(a.caseless.has("content-length")){var t=a.caseless.has("content-length");e.setHeader?e.setHeader(t,a.headers[t]):e.headers[t]=a.headers[t]}}if(e.setHeader&&!e.headersSent){for(var n in a.headers)(!r.gzip||n!=="content-encoding")&&e.setHeader(n,a.headers[n]);e.statusCode=a.statusCode}r.pipefilter&&r.pipefilter(a,e)};Rr.prototype.qs=function(e,r){var a=this,i;!r&&a.uri.query?i=a._qs.parse(a.uri.query):i={};for(var t in e)i[t]=e[t];var n=a._qs.stringify(i);return n===""||(a.uri=qc.parse(a.uri.href.split("?")[0]+"?"+n),a.url=a.uri,a.path=a.uri.path,a.uri.host==="unix"&&a.enableUnixSocket()),a};Rr.prototype.form=function(e){var r=this;return e?(/^application\/x-www-form-urlencoded\b/.test(r.getHeader("content-type"))||r.setHeader("content-type","application/x-www-form-urlencoded"),r.body=typeof e=="string"?r._qs.rfc3986(e.toString("utf8")):r._qs.stringify(e).toString("utf8"),r):(r._form=new uU,r._form.on("error",function(a){a.message="form-data: "+a.message,r.emit("error",a),r.abort()}),r._form)};Rr.prototype.multipart=function(e){var r=this;return r._multipart.onRequest(e),r._multipart.chunked||(r.body=r._multipart.body),r};Rr.prototype.json=function(e){var r=this;return r.hasHeader("accept")||r.setHeader("accept","application/json"),typeof r.jsonReplacer=="function"&&(r._jsonReplacer=r.jsonReplacer),r._json=!0,typeof e=="boolean"?r.body!==void 0&&(/^application\/x-www-form-urlencoded\b/.test(r.getHeader("content-type"))?r.body=r._qs.rfc3986(r.body):r.body=p8(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=p8(e,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")),typeof r.jsonReviver=="function"&&(r._jsonReviver=r.jsonReviver),r};Rr.prototype.getHeader=function(e,r){var a=this,i,t,n;return r||(r=a.headers),Object.keys(r).forEach(function(o){o.length===e.length&&(t=new RegExp(e,"i"),n=o.match(t),n&&(i=r[o]))}),i};Rr.prototype.enableUnixSocket=function(){var e=this.uri.path.split(":"),r=e[0],a=e[1];this.socketPath=r,this.uri.pathname=a,this.uri.path=a,this.uri.host=r,this.uri.hostname=r,this.uri.isUnix=!0};Rr.prototype.auth=function(e,r,a,i){var t=this;return t._auth.onRequest(e,r,a,i),t};Rr.prototype.aws=function(e,r){var a=this;if(!r)return a._aws=e,a;if(e.sign_version===4||e.sign_version==="4"){var i={host:a.uri.host,path:a.uri.path,method:a.method,headers:a.headers,body:a.body};e.service&&(i.service=e.service);var t=nU.sign(i,{accessKeyId:e.key,secretAccessKey:e.secret,sessionToken:e.session});a.setHeader("authorization",t.headers.Authorization),a.setHeader("x-amz-date",t.headers["X-Amz-Date"]),t.headers["X-Amz-Security-Token"]&&a.setHeader("x-amz-security-token",t.headers["X-Amz-Security-Token"])}else{var n=new Date;a.setHeader("date",n.toUTCString());var o={key:e.key,secret:e.secret,verb:a.method.toUpperCase(),date:n,contentType:a.getHeader("content-type")||"",md5:a.getHeader("content-md5")||"",amazonHeaders:s0.canonicalizeHeaders(a.headers)},s=a.uri.path;e.bucket&&s?o.resource="/"+e.bucket+s:e.bucket&&!s?o.resource="/"+e.bucket:!e.bucket&&s?o.resource=s:!e.bucket&&!s&&(o.resource="/"),o.resource=s0.canonicalizeResource(o.resource),a.setHeader("authorization",s0.authorization(o))}return a};Rr.prototype.httpSignature=function(e){var r=this;return oU.signRequest({getHeader:function(a){return r.getHeader(a,r.headers)},setHeader:function(a,i){r.setHeader(a,i)},method:r.method,path:r.path},e),ot("httpSignature authorization",r.getHeader("authorization")),r};Rr.prototype.hawk=function(e){var r=this;r.setHeader("Authorization",gU.header(r.uri,r.method,e))};Rr.prototype.oauth=function(e){var r=this;return r._oauth.onRequest(e),r};Rr.prototype.jar=function(e){var r=this,a;if(r._redirect.redirectsFollowed===0&&(r.originalCookieHeader=r.getHeader("cookie")),!e)a=!1,r._disableCookies=!0;else{var i=e.getCookieString?e:d8,t=r.uri.href;i&&(a=i.getCookieString(t))}return a&&a.length&&(r.originalCookieHeader?r.setHeader("cookie",r.originalCookieHeader+"; "+a):r.setHeader("cookie",a)),r._jar=e,r};Rr.prototype.pipe=function(e,r){var a=this;if(a.response)if(a._destdata)a.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else if(a._ended)a.emit("error",new Error("You cannot pipe after the response has been ended."));else return cp.Stream.prototype.pipe.call(a,e,r),a.pipeDest(e),e;else return a.dests.push(e),cp.Stream.prototype.pipe.call(a,e,r),e};Rr.prototype.write=function(){var e=this;if(!e._aborted&&(e._started||e.start(),e.req))return e.req.write.apply(e.req,arguments)};Rr.prototype.end=function(e){var r=this;r._aborted||(e&&r.write(e),r._started||r.start(),r.req&&r.req.end())};Rr.prototype.pause=function(){var e=this;e.responseContent?e.responseContent.pause.apply(e.responseContent,arguments):e._paused=!0};Rr.prototype.resume=function(){var e=this;e.responseContent?e.responseContent.resume.apply(e.responseContent,arguments):e._paused=!1};Rr.prototype.destroy=function(){var e=this;this.clearTimeout(),e._ended?e.response&&e.response.destroy():e.end()};Rr.prototype.clearTimeout=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)};Rr.defaultProxyHeaderWhiteList=u0.defaultProxyHeaderWhiteList.slice();Rr.defaultProxyHeaderExclusiveList=u0.defaultProxyHeaderExclusiveList.slice();Rr.prototype.toJSON=v8;g8.exports=Rr});var w8=O((cY,x8)=>{"use strict";var Ic=Bl(),y8=Id(),AU=Dl(),PU=AU.paramsHaveRequestBody;function fp(e,r,a){typeof r=="function"&&(a=r);var i={};return r!==null&&typeof r=="object"?Ic(i,r,{uri:e}):typeof e=="string"?Ic(i,{uri:e}):Ic(i,e),i.callback=a||i.callback,i}function qa(e,r,a){if(typeof e=="undefined")throw new Error("undefined is not a valid uri or options object.");var i=fp(e,r,a);if(i.method==="HEAD"&&PU(i))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new qa.Request(i)}function xo(e){var r=e.toUpperCase();return function(a,i,t){var n=fp(a,i,t);return n.method=r,qa(n,n.callback)}}qa.get=xo("get");qa.head=xo("head");qa.options=xo("options");qa.post=xo("post");qa.put=xo("put");qa.patch=xo("patch");qa.del=xo("delete");qa.delete=xo("delete");qa.jar=function(e){return y8.jar(e)};qa.cookie=function(e){return y8.parse(e)};function c0(e,r,a,i){return function(t,n,o){var s=fp(t,n,o),c={};return Ic(!0,c,r,s),c.pool=s.pool||r.pool,i&&(c.method=i.toUpperCase()),typeof a=="function"&&(e=a),e(c,c.callback)}}qa.defaults=function(e,r){var a=this;e=e||{},typeof e=="function"&&(r=e,e={});var i=c0(a,e,r),t=["get","head","post","put","patch","del","delete"];return t.forEach(function(n){i[n]=c0(a[n],e,r,n)}),i.cookie=c0(a.cookie,e,r),i.jar=a.jar,i.defaults=a.defaults,i};qa.forever=function(e,r){var a={};return r&&Ic(a,r),e&&(a.agentOptions=e),a.forever=!0,qa.defaults(a)};x8.exports=qa;qa.Request=b8();qa.initParams=fp;Object.defineProperty(qa,"debug",{enumerable:!0,get:function(){return qa.Request.debug},set:function(e){qa.Request.debug=e}})});var _8=O((lY,k8)=>{k8.exports=TU;function TU(e){if(!/^data\:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");var r=e.indexOf(",");if(r===-1||r<=4)throw new TypeError("malformed data: URI");for(var a=e.substring(5,r).split(";"),i=!1,t="US-ASCII",n=0;n<a.length;n++)a[n]=="base64"?i=!0:a[n].indexOf("charset=")==0&&(t=a[n].substring(8));var o=unescape(e.substring(r+1)),s=i?"base64":"ascii",c=new Buffer(o,s);return c.type=a[0]||"text/plain",c.charset=t,c}});var E8=O((fY,S8)=>{var CU=_8();function FU(e){return{mimeType:BU(qU(e)),data:CU(e)}}function qU(e){return e.substring(5,e.indexOf(";"))}var j8=/^(\w+\/)+/;function BU(e){e=e.toLowerCase();var r=e.match(j8);return!r||!(r=r[1])?e:e.replace(j8,r)}S8.exports=FU});var P8=O((hY,A8)=>{"use strict";var Rc=Uu(),pY=require("path"),IU=$x().PNG,RU=Uh(),OU=Zx(),zU=Xx().GifReader,DU=tw(),LU=require("fs"),UU=w8(),NU=Rf(),MU=E8();function HU(e,r){var a=new IU;a.parse(e,function(i,t){if(i){r(i);return}r(null,Rc(new Uint8Array(t.data),[t.width|0,t.height|0,4],[4,4*t.width|0,1],0))})}function VU(e,r){var a;try{a=RU.decode(e)}catch(n){r(n);return}if(!a){r(new Error("Error decoding jpeg"));return}var i=[a.height,a.width,4],t=Rc(a.data,i);r(null,t.transpose(1,0))}function $U(e,r){var a;try{a=new zU(e)}catch(s){r(s);return}if(a.numFrames()>0){var i=[a.numFrames(),a.height,a.width,4];try{var t=new Uint8Array(i[0]*i[1]*i[2]*i[3])}catch(s){r(s);return}var n=Rc(t,i);try{for(var o=0;o<a.numFrames();++o)a.decodeAndBlitFrameRGBA(o,t.subarray(n.index(o,0,0,0),n.index(o+1,0,0,0)))}catch(s){r(s);return}r(null,n.transpose(0,2,1))}else{var i=[a.height,a.width,4],t=new Uint8Array(i[0]*i[1]*i[2]),n=Rc(t,i);try{a.decodeAndBlitFrameRGBA(0,t)}catch(f){r(f);return}r(null,n.transpose(1,0))}}function WU(e,r){var a=new DU(e);try{a.init()}catch(s){r(s);return}var i=a.getData(),t=[i.getHeight(),i.getWidth(),4],n=new Uint8Array(t[0]*t[1]*t[2]),o=Rc(n,t);OU(i,o),r(null,o.transpose(1,0))}function pp(e,r,a){switch(e){case"image/png":HU(r,a);break;case"image/jpg":case"image/jpeg":VU(r,a);break;case"image/gif":$U(r,a);break;case"image/bmp":WU(r,a);break;default:a(new Error("Unsupported file type: "+e))}}A8.exports=function(r,a,i){if(i||(i=a,a=""),Buffer.isBuffer(r)){if(!a){i(new Error("Invalid file type"));return}pp(a,r,i)}else if(r.indexOf("data:")===0)try{var t=MU(r);t?process.nextTick(function(){pp(a||t.mimeType,t.data,i)}):process.nextTick(function(){i(new Error("Error parsing data URI"))})}catch(n){process.nextTick(function(){i(n)})}else r.indexOf("http://")===0||r.indexOf("https://")===0?UU({url:r,encoding:null},function(n,o,s){if(n){i(n);return}if(a=a,a||(o.getHeader!==void 0?a=o.getHeader("content-type"):o.headers!==void 0&&(a=o.headers["content-type"])),!a){i(new Error("Invalid content-type"));return}pp(a,s,i)}):LU.readFile(r,function(n,o){if(n){i(n);return}if(a=a||NU.lookup(r),!a){i(new Error("Invalid file type"));return}pp(a,o,i)})}});var q8=O((hp,F8)=>{(function(e,r){typeof hp=="object"&&typeof F8!="undefined"?r(hp):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(hp,function(e){"use strict";var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:function(u){return"Symbol("+u+")"};function a(){}function i(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global}var t=i();function n(u){return typeof u=="object"&&u!==null||typeof u=="function"}var o=a,s=Promise,c=Promise.prototype.then,l=Promise.resolve.bind(s),f=Promise.reject.bind(s);function v(u){return new s(u)}function h(u){return l(u)}function d(u){return f(u)}function y(u,m,S){return c.call(u,m,S)}function j(u,m,S){y(y(u,m,S),void 0,o)}function w(u,m){j(u,m)}function A(u,m){j(u,void 0,m)}function P(u,m,S){return y(u,m,S)}function T(u){y(u,void 0,o)}var I=function(){var u=t&&t.queueMicrotask;if(typeof u=="function")return u;var m=h(void 0);return function(S){return y(m,S)}}();function F(u,m,S){if(typeof u!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(u,m,S)}function R(u,m,S){try{return h(F(u,m,S))}catch(D){return d(D)}}var z=16384,U=function(){function u(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(u.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),u.prototype.push=function(m){var S=this._back,D=S;S._elements.length===z-1&&(D={_elements:[],_next:void 0}),S._elements.push(m),D!==S&&(this._back=D,S._next=D),++this._size},u.prototype.shift=function(){var m=this._front,S=m,D=this._cursor,G=D+1,se=m._elements,ge=se[D];return G===z&&(S=m._next,G=0),--this._size,this._cursor=G,m!==S&&(this._front=S),se[D]=void 0,ge},u.prototype.forEach=function(m){for(var S=this._cursor,D=this._front,G=D._elements;(S!==G.length||D._next!==void 0)&&!(S===G.length&&(D=D._next,G=D._elements,S=0,G.length===0));)m(G[S]),++S},u.prototype.peek=function(){var m=this._front,S=this._cursor;return m._elements[S]},u}();function M(u,m){u._ownerReadableStream=m,m._reader=u,m._state==="readable"?$(u):m._state==="closed"?re(u):Q(u,m._storedError)}function K(u,m){var S=u._ownerReadableStream;return vi(S,m)}function V(u){u._ownerReadableStream._state==="readable"?je(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):me(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),u._ownerReadableStream._reader=void 0,u._ownerReadableStream=void 0}function Z(u){return new TypeError("Cannot "+u+" a stream using a released reader")}function $(u){u._closedPromise=v(function(m,S){u._closedPromise_resolve=m,u._closedPromise_reject=S})}function Q(u,m){$(u),je(u,m)}function re(u){$(u),ce(u)}function je(u,m){u._closedPromise_reject!==void 0&&(T(u._closedPromise),u._closedPromise_reject(m),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}function me(u,m){Q(u,m)}function ce(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}var _e=r("[[AbortSteps]]"),be=r("[[ErrorSteps]]"),Le=r("[[CancelSteps]]"),Me=r("[[PullSteps]]"),Oe=Number.isFinite||function(u){return typeof u=="number"&&isFinite(u)},W=Math.trunc||function(u){return u<0?Math.ceil(u):Math.floor(u)};function xe(u){return typeof u=="object"||typeof u=="function"}function Ze(u,m){if(u!==void 0&&!xe(u))throw new TypeError(m+" is not an object.")}function We(u,m){if(typeof u!="function")throw new TypeError(m+" is not a function.")}function $e(u){return typeof u=="object"&&u!==null||typeof u=="function"}function rr(u,m){if(!$e(u))throw new TypeError(m+" is not an object.")}function qe(u,m,S){if(u===void 0)throw new TypeError("Parameter "+m+" is required in '"+S+"'.")}function fe(u,m,S){if(u===void 0)throw new TypeError(m+" is required in '"+S+"'.")}function we(u){return Number(u)}function ir(u){return u===0?0:u}function Pe(u){return ir(W(u))}function ur(u,m){var S=0,D=Number.MAX_SAFE_INTEGER,G=Number(u);if(G=ir(G),!Oe(G))throw new TypeError(m+" is not a finite number");if(G=Pe(G),G<S||G>D)throw new TypeError(m+" is outside the accepted range of "+S+" to "+D+", inclusive");return!Oe(G)||G===0?0:G}function Or(u,m){if(!Hn(u))throw new TypeError(m+" is not a ReadableStream.")}function Gr(u){return new Ye(u)}function J(u,m){u._reader._readRequests.push(m)}function Be(u,m,S){var D=u._reader,G=D._readRequests.shift();S?G._closeSteps():G._chunkSteps(m)}function Ke(u){return u._reader._readRequests.length}function He(u){var m=u._reader;return!(m===void 0||!Je(m))}var Ye=function(){function u(m){if(qe(m,1,"ReadableStreamDefaultReader"),Or(m,"First parameter"),Vn(m))throw new TypeError("This stream has already been locked for exclusive reading by another reader");M(this,m),this._readRequests=new U}return Object.defineProperty(u.prototype,"closed",{get:function(){return Je(this)?this._closedPromise:d(mr("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(m){return m===void 0&&(m=void 0),Je(this)?this._ownerReadableStream===void 0?d(Z("cancel")):K(this,m):d(mr("cancel"))},u.prototype.read=function(){if(!Je(this))return d(mr("read"));if(this._ownerReadableStream===void 0)return d(Z("read from"));var m,S,D=v(function(se,ge){m=se,S=ge}),G={_chunkSteps:function(se){return m({value:se,done:!1})},_closeSteps:function(){return m({value:void 0,done:!0})},_errorSteps:function(se){return S(se)}};return nr(this,G),D},u.prototype.releaseLock=function(){if(!Je(this))throw mr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");V(this)}},u}();Object.defineProperties(Ye.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ye.prototype,r.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Je(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readRequests")?!1:u instanceof Ye}function nr(u,m){var S=u._ownerReadableStream;S._disturbed=!0,S._state==="closed"?m._closeSteps():S._state==="errored"?m._errorSteps(S._storedError):S._readableStreamController[Me](m)}function mr(u){return new TypeError("ReadableStreamDefaultReader.prototype."+u+" can only be used on a ReadableStreamDefaultReader")}var Ir,vr;typeof r.asyncIterator=="symbol"&&(vr=(Ir={},Ir[r.asyncIterator]=function(){return this},Ir),Object.defineProperty(vr,r.asyncIterator,{enumerable:!1}));var ve=function(){function u(m,S){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=m,this._preventCancel=S}return u.prototype.next=function(){var m=this,S=function(){return m._nextSteps()};return this._ongoingPromise=this._ongoingPromise?P(this._ongoingPromise,S,S):S(),this._ongoingPromise},u.prototype.return=function(m){var S=this,D=function(){return S._returnSteps(m)};return this._ongoingPromise?P(this._ongoingPromise,D,D):D()},u.prototype._nextSteps=function(){var m=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var S=this._reader;if(S._ownerReadableStream===void 0)return d(Z("iterate"));var D,G,se=v(function(Xe,Er){D=Xe,G=Er}),ge={_chunkSteps:function(Xe){m._ongoingPromise=void 0,I(function(){return D({value:Xe,done:!1})})},_closeSteps:function(){m._ongoingPromise=void 0,m._isFinished=!0,V(S),D({value:void 0,done:!0})},_errorSteps:function(Xe){m._ongoingPromise=void 0,m._isFinished=!0,V(S),G(Xe)}};return nr(S,ge),se},u.prototype._returnSteps=function(m){if(this._isFinished)return Promise.resolve({value:m,done:!0});this._isFinished=!0;var S=this._reader;if(S._ownerReadableStream===void 0)return d(Z("finish iterating"));if(!this._preventCancel){var D=K(S,m);return V(S),P(D,function(){return{value:m,done:!0}})}return V(S),h({value:m,done:!0})},u}(),Ge={next:function(){return Pr(this)?this._asyncIteratorImpl.next():d(lr("next"))},return:function(u){return Pr(this)?this._asyncIteratorImpl.return(u):d(lr("return"))}};vr!==void 0&&Object.setPrototypeOf(Ge,vr);function pr(u,m){var S=Gr(u),D=new ve(S,m),G=Object.create(Ge);return G._asyncIteratorImpl=D,G}function Pr(u){if(!n(u)||!Object.prototype.hasOwnProperty.call(u,"_asyncIteratorImpl"))return!1;try{return u._asyncIteratorImpl instanceof ve}catch{return!1}}function lr(u){return new TypeError("ReadableStreamAsyncIterator."+u+" can only be used on a ReadableSteamAsyncIterator")}var gr=Number.isNaN||function(u){return u!==u};function wr(u){return u.slice()}function or(u,m,S,D,G){new Uint8Array(u).set(new Uint8Array(S,D,G),m)}function cr(u){return u}function $r(u){return!1}function Cr(u,m,S){if(u.slice)return u.slice(m,S);var D=S-m,G=new ArrayBuffer(D);return or(G,0,u,m,D),G}function Sa(u){return!(typeof u!="number"||gr(u)||u<0)}function Ia(u){var m=Cr(u.buffer,u.byteOffset,u.byteOffset+u.byteLength);return new Uint8Array(m)}function st(u){var m=u._queue.shift();return u._queueTotalSize-=m.size,u._queueTotalSize<0&&(u._queueTotalSize=0),m.value}function vt(u,m,S){if(!Sa(S)||S===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");u._queue.push({value:m,size:S}),u._queueTotalSize+=S}function ra(u){var m=u._queue.peek();return m.value}function ua(u){u._queue=new U,u._queueTotalSize=0}var da=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"view",{get:function(){if(!ut(this))throw De("view");return this._view},enumerable:!1,configurable:!0}),u.prototype.respond=function(m){if(!ut(this))throw De("respond");if(qe(m,1,"respond"),m=ur(m,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");$r(this._view.buffer),Qe(this._associatedReadableByteStreamController,m)},u.prototype.respondWithNewView=function(m){if(!ut(this))throw De("respondWithNewView");if(qe(m,1,"respondWithNewView"),!ArrayBuffer.isView(m))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");$r(m.buffer),Te(this._associatedReadableByteStreamController,m)},u}();Object.defineProperties(da.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(da.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var Ra=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"byobRequest",{get:function(){if(!va(this))throw de("byobRequest");return Fe(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!va(this))throw de("desiredSize");return ar(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!va(this))throw de("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var m=this._controlledReadableByteStream._state;if(m!=="readable")throw new TypeError("The stream (in "+m+" state) is not in the readable state and cannot be closed");Ie(this)},u.prototype.enqueue=function(m){if(!va(this))throw de("enqueue");if(qe(m,1,"enqueue"),!ArrayBuffer.isView(m))throw new TypeError("chunk must be an array buffer view");if(m.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(m.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var S=this._controlledReadableByteStream._state;if(S!=="readable")throw new TypeError("The stream (in "+S+" state) is not in the readable state and cannot be enqueued to");Se(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!va(this))throw de("error");Ce(this,m)},u.prototype[Le]=function(m){aa(this),ua(this);var S=this._cancelAlgorithm(m);return Ne(this),S},u.prototype[Me]=function(m){var S=this._controlledReadableByteStream;if(this._queueTotalSize>0){var D=this._queue.shift();this._queueTotalSize-=D.byteLength,k(this);var G=new Uint8Array(D.buffer,D.byteOffset,D.byteLength);m._chunkSteps(G);return}var se=this._autoAllocateChunkSize;if(se!==void 0){var ge=void 0;try{ge=new ArrayBuffer(se)}catch(Er){m._errorSteps(Er);return}var Xe={buffer:ge,bufferByteLength:se,byteOffset:0,byteLength:se,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Xe)}J(S,m),Ma(this)},u}();Object.defineProperties(Ra.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ra.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function va(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableByteStream")?!1:u instanceof Ra}function ut(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_associatedReadableByteStreamController")?!1:u instanceof da}function Ma(u){var m=ye(u);if(!!m){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var S=u._pullAlgorithm();j(S,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,Ma(u))},function(D){Ce(u,D)})}}function aa(u){B(u),u._pendingPullIntos=new U}function Vt(u,m){var S=!1;u._state==="closed"&&(S=!0);var D=x(m);m.readerType==="default"?Be(u,D,S):le(u,D,S)}function x(u){var m=u.bytesFilled,S=u.elementSize;return new u.viewConstructor(u.buffer,u.byteOffset,m/S)}function b(u,m,S,D){u._queue.push({buffer:m,byteOffset:S,byteLength:D}),u._queueTotalSize+=D}function g(u,m){var S=m.elementSize,D=m.bytesFilled-m.bytesFilled%S,G=Math.min(u._queueTotalSize,m.byteLength-m.bytesFilled),se=m.bytesFilled+G,ge=se-se%S,Xe=G,Er=!1;ge>D&&(Xe=ge-m.bytesFilled,Er=!0);for(var qr=u._queue;Xe>0;){var zr=qr.peek(),Wr=Math.min(Xe,zr.byteLength),Oa=m.byteOffset+m.bytesFilled;or(m.buffer,Oa,zr.buffer,zr.byteOffset,Wr),zr.byteLength===Wr?qr.shift():(zr.byteOffset+=Wr,zr.byteLength-=Wr),u._queueTotalSize-=Wr,p(u,Wr,m),Xe-=Wr}return Er}function p(u,m,S){S.bytesFilled+=m}function k(u){u._queueTotalSize===0&&u._closeRequested?(Ne(u),_u(u._controlledReadableByteStream)):Ma(u)}function B(u){u._byobRequest!==null&&(u._byobRequest._associatedReadableByteStreamController=void 0,u._byobRequest._view=null,u._byobRequest=null)}function N(u){for(;u._pendingPullIntos.length>0;){if(u._queueTotalSize===0)return;var m=u._pendingPullIntos.peek();g(u,m)&&(Ue(u),Vt(u._controlledReadableByteStream,m))}}function Y(u,m,S){var D=u._controlledReadableByteStream,G=1;m.constructor!==DataView&&(G=m.constructor.BYTES_PER_ELEMENT);var se=m.constructor,ge=cr(m.buffer),Xe={buffer:ge,bufferByteLength:ge.byteLength,byteOffset:m.byteOffset,byteLength:m.byteLength,bytesFilled:0,elementSize:G,viewConstructor:se,readerType:"byob"};if(u._pendingPullIntos.length>0){u._pendingPullIntos.push(Xe),ee(D,S);return}if(D._state==="closed"){var Er=new se(Xe.buffer,Xe.byteOffset,0);S._closeSteps(Er);return}if(u._queueTotalSize>0){if(g(u,Xe)){var qr=x(Xe);k(u),S._chunkSteps(qr);return}if(u._closeRequested){var zr=new TypeError("Insufficient bytes to fill elements in the given buffer");Ce(u,zr),S._errorSteps(zr);return}}u._pendingPullIntos.push(Xe),ee(D,S),Ma(u)}function te(u,m){var S=u._controlledReadableByteStream;if(ae(S))for(;oe(S)>0;){var D=Ue(u);Vt(S,D)}}function pe(u,m,S){if(p(u,m,S),!(S.bytesFilled<S.elementSize)){Ue(u);var D=S.bytesFilled%S.elementSize;if(D>0){var G=S.byteOffset+S.bytesFilled,se=Cr(S.buffer,G-D,G);b(u,se,0,se.byteLength)}S.bytesFilled-=D,Vt(u._controlledReadableByteStream,S),N(u)}}function he(u,m){var S=u._pendingPullIntos.peek();B(u);var D=u._controlledReadableByteStream._state;D==="closed"?te(u):pe(u,m,S),Ma(u)}function Ue(u){var m=u._pendingPullIntos.shift();return m}function ye(u){var m=u._controlledReadableByteStream;if(m._state!=="readable"||u._closeRequested||!u._started)return!1;if(He(m)&&Ke(m)>0||ae(m)&&oe(m)>0)return!0;var S=ar(u);return S>0}function Ne(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0}function Ie(u){var m=u._controlledReadableByteStream;if(!(u._closeRequested||m._state!=="readable")){if(u._queueTotalSize>0){u._closeRequested=!0;return}if(u._pendingPullIntos.length>0){var S=u._pendingPullIntos.peek();if(S.bytesFilled>0){var D=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ce(u,D),D}}Ne(u),_u(m)}}function Se(u,m){var S=u._controlledReadableByteStream;if(!(u._closeRequested||S._state!=="readable")){var D=m.buffer,G=m.byteOffset,se=m.byteLength,ge=cr(D);if(u._pendingPullIntos.length>0){var Xe=u._pendingPullIntos.peek();$r(Xe.buffer),Xe.buffer=cr(Xe.buffer)}if(B(u),He(S))if(Ke(S)===0)b(u,ge,G,se);else{u._pendingPullIntos.length>0&&Ue(u);var Er=new Uint8Array(ge,G,se);Be(S,Er,!1)}else ae(S)?(b(u,ge,G,se),N(u)):b(u,ge,G,se);Ma(u)}}function Ce(u,m){var S=u._controlledReadableByteStream;S._state==="readable"&&(aa(u),ua(u),Ne(u),kg(S,m))}function Fe(u){if(u._byobRequest===null&&u._pendingPullIntos.length>0){var m=u._pendingPullIntos.peek(),S=new Uint8Array(m.buffer,m.byteOffset+m.bytesFilled,m.byteLength-m.bytesFilled),D=Object.create(da.prototype);ze(D,u,S),u._byobRequest=D}return u._byobRequest}function ar(u){var m=u._controlledReadableByteStream._state;return m==="errored"?null:m==="closed"?0:u._strategyHWM-u._queueTotalSize}function Qe(u,m){var S=u._pendingPullIntos.peek(),D=u._controlledReadableByteStream._state;if(D==="closed"){if(m!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(m===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(S.bytesFilled+m>S.byteLength)throw new RangeError("bytesWritten out of range")}S.buffer=cr(S.buffer),he(u,m)}function Te(u,m){var S=u._pendingPullIntos.peek(),D=u._controlledReadableByteStream._state;if(D==="closed"){if(m.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(m.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(S.byteOffset+S.bytesFilled!==m.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(S.bufferByteLength!==m.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(S.bytesFilled+m.byteLength>S.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var G=m.byteLength;S.buffer=cr(m.buffer),he(u,G)}function Ee(u,m,S,D,G,se,ge){m._controlledReadableByteStream=u,m._pullAgain=!1,m._pulling=!1,m._byobRequest=null,m._queue=m._queueTotalSize=void 0,ua(m),m._closeRequested=!1,m._started=!1,m._strategyHWM=se,m._pullAlgorithm=D,m._cancelAlgorithm=G,m._autoAllocateChunkSize=ge,m._pendingPullIntos=new U,u._readableStreamController=m;var Xe=S();j(h(Xe),function(){m._started=!0,Ma(m)},function(Er){Ce(m,Er)})}function Ae(u,m,S){var D=Object.create(Ra.prototype),G=function(){},se=function(){return h(void 0)},ge=function(){return h(void 0)};m.start!==void 0&&(G=function(){return m.start(D)}),m.pull!==void 0&&(se=function(){return m.pull(D)}),m.cancel!==void 0&&(ge=function(Er){return m.cancel(Er)});var Xe=m.autoAllocateChunkSize;if(Xe===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ee(u,D,G,se,ge,S,Xe)}function ze(u,m,S){u._associatedReadableByteStreamController=m,u._view=S}function De(u){return new TypeError("ReadableStreamBYOBRequest.prototype."+u+" can only be used on a ReadableStreamBYOBRequest")}function de(u){return new TypeError("ReadableByteStreamController.prototype."+u+" can only be used on a ReadableByteStreamController")}function X(u){return new ne(u)}function ee(u,m){u._reader._readIntoRequests.push(m)}function le(u,m,S){var D=u._reader,G=D._readIntoRequests.shift();S?G._closeSteps(m):G._chunkSteps(m)}function oe(u){return u._reader._readIntoRequests.length}function ae(u){var m=u._reader;return!(m===void 0||!Ve(m))}var ne=function(){function u(m){if(qe(m,1,"ReadableStreamBYOBReader"),Or(m,"First parameter"),Vn(m))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!va(m._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");M(this,m),this._readIntoRequests=new U}return Object.defineProperty(u.prototype,"closed",{get:function(){return Ve(this)?this._closedPromise:d(tr("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(m){return m===void 0&&(m=void 0),Ve(this)?this._ownerReadableStream===void 0?d(Z("cancel")):K(this,m):d(tr("cancel"))},u.prototype.read=function(m){if(!Ve(this))return d(tr("read"));if(!ArrayBuffer.isView(m))return d(new TypeError("view must be an array buffer view"));if(m.byteLength===0)return d(new TypeError("view must have non-zero byteLength"));if(m.buffer.byteLength===0)return d(new TypeError("view's buffer must have non-zero byteLength"));if($r(m.buffer),this._ownerReadableStream===void 0)return d(Z("read from"));var S,D,G=v(function(ge,Xe){S=ge,D=Xe}),se={_chunkSteps:function(ge){return S({value:ge,done:!1})},_closeSteps:function(ge){return S({value:ge,done:!0})},_errorSteps:function(ge){return D(ge)}};return fr(this,m,se),G},u.prototype.releaseLock=function(){if(!Ve(this))throw tr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");V(this)}},u}();Object.defineProperties(ne.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ne.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Ve(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readIntoRequests")?!1:u instanceof ne}function fr(u,m,S){var D=u._ownerReadableStream;D._disturbed=!0,D._state==="errored"?S._errorSteps(D._storedError):Y(D._readableStreamController,m,S)}function tr(u){return new TypeError("ReadableStreamBYOBReader.prototype."+u+" can only be used on a ReadableStreamBYOBReader")}function sr(u,m){var S=u.highWaterMark;if(S===void 0)return m;if(gr(S)||S<0)throw new RangeError("Invalid highWaterMark");return S}function L(u){var m=u.size;return m||function(){return 1}}function yr(u,m){Ze(u,m);var S=u==null?void 0:u.highWaterMark,D=u==null?void 0:u.size;return{highWaterMark:S===void 0?void 0:we(S),size:D===void 0?void 0:Ar(D,m+" has member 'size' that")}}function Ar(u,m){return We(u,m),function(S){return we(u(S))}}function kr(u,m){Ze(u,m);var S=u==null?void 0:u.abort,D=u==null?void 0:u.close,G=u==null?void 0:u.start,se=u==null?void 0:u.type,ge=u==null?void 0:u.write;return{abort:S===void 0?void 0:hr(S,u,m+" has member 'abort' that"),close:D===void 0?void 0:Sr(D,u,m+" has member 'close' that"),start:G===void 0?void 0:_r(G,u,m+" has member 'start' that"),write:ge===void 0?void 0:ta(ge,u,m+" has member 'write' that"),type:se}}function hr(u,m,S){return We(u,S),function(D){return R(u,m,[D])}}function Sr(u,m,S){return We(u,S),function(){return R(u,m,[])}}function _r(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function ta(u,m,S){return We(u,S),function(D,G){return R(u,m,[D,G])}}function Tr(u,m){if(!Re(u))throw new TypeError(m+" is not a WritableStream.")}function _(u){if(typeof u!="object"||u===null)return!1;try{return typeof u.aborted=="boolean"}catch{return!1}}var E=typeof AbortController=="function";function C(){if(E)return new AbortController}var H=function(){function u(m,S){m===void 0&&(m={}),S===void 0&&(S={}),m===void 0?m=null:rr(m,"First parameter");var D=yr(S,"Second parameter"),G=kr(m,"First parameter");ke(this);var se=G.type;if(se!==void 0)throw new RangeError("Invalid type is specified");var ge=L(D),Xe=sr(D,1);NS(this,G,Xe,ge)}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Re(this))throw al("locked");return Fr(this)},enumerable:!1,configurable:!0}),u.prototype.abort=function(m){return m===void 0&&(m=void 0),Re(this)?Fr(this)?d(new TypeError("Cannot abort a stream that already has a writer")):ca(this,m):d(al("abort"))},u.prototype.close=function(){return Re(this)?Fr(this)?d(new TypeError("Cannot close a stream that already has a writer")):mi(this)?d(new TypeError("Cannot close an already-closing stream")):ct(this):d(al("close"))},u.prototype.getWriter=function(){if(!Re(this))throw al("getWriter");return ie(this)},u}();Object.defineProperties(H.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(H.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function ie(u){return new ls(u)}function ue(u,m,S,D,G,se){G===void 0&&(G=1),se===void 0&&(se=function(){return 1});var ge=Object.create(H.prototype);ke(ge);var Xe=Object.create(Co.prototype);return cg(ge,Xe,u,m,S,D,G,se),ge}function ke(u){u._state="writable",u._storedError=void 0,u._writer=void 0,u._writableStreamController=void 0,u._writeRequests=new U,u._inFlightWriteRequest=void 0,u._closeRequest=void 0,u._inFlightCloseRequest=void 0,u._pendingAbortRequest=void 0,u._backpressure=!1}function Re(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_writableStreamController")?!1:u instanceof H}function Fr(u){return u._writer!==void 0}function ca(u,m){var S;if(u._state==="closed"||u._state==="errored")return h(void 0);u._writableStreamController._abortReason=m,(S=u._writableStreamController._abortController)===null||S===void 0||S.abort();var D=u._state;if(D==="closed"||D==="errored")return h(void 0);if(u._pendingAbortRequest!==void 0)return u._pendingAbortRequest._promise;var G=!1;D==="erroring"&&(G=!0,m=void 0);var se=v(function(ge,Xe){u._pendingAbortRequest={_promise:void 0,_resolve:ge,_reject:Xe,_reason:m,_wasAlreadyErroring:G}});return u._pendingAbortRequest._promise=se,G||mn(u,m),se}function ct(u){var m=u._state;if(m==="closed"||m==="errored")return d(new TypeError("The stream (in "+m+" state) is not in the writable state and cannot be closed"));var S=v(function(G,se){var ge={_resolve:G,_reject:se};u._closeRequest=ge}),D=u._writer;return D!==void 0&&u._backpressure&&m==="writable"&&Mp(D),MS(u._writableStreamController),S}function lt(u){var m=v(function(S,D){var G={_resolve:S,_reject:D};u._writeRequests.push(G)});return m}function Et(u,m){var S=u._state;if(S==="writable"){mn(u,m);return}gt(u)}function mn(u,m){var S=u._writableStreamController;u._state="erroring",u._storedError=m;var D=u._writer;D!==void 0&&ng(D,m),!IS(u)&&S._started&>(u)}function gt(u){u._state="errored",u._writableStreamController[be]();var m=u._storedError;if(u._writeRequests.forEach(function(G){G._reject(m)}),u._writeRequests=new U,u._pendingAbortRequest===void 0){Jc(u);return}var S=u._pendingAbortRequest;if(u._pendingAbortRequest=void 0,S._wasAlreadyErroring){S._reject(m),Jc(u);return}var D=u._writableStreamController[_e](S._reason);j(D,function(){S._resolve(),Jc(u)},function(G){S._reject(G),Jc(u)})}function Rt(u){u._inFlightWriteRequest._resolve(void 0),u._inFlightWriteRequest=void 0}function Po(u,m){u._inFlightWriteRequest._reject(m),u._inFlightWriteRequest=void 0,Et(u,m)}function di(u){u._inFlightCloseRequest._resolve(void 0),u._inFlightCloseRequest=void 0;var m=u._state;m==="erroring"&&(u._storedError=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._resolve(),u._pendingAbortRequest=void 0)),u._state="closed";var S=u._writer;S!==void 0&&hg(S)}function cs(u,m){u._inFlightCloseRequest._reject(m),u._inFlightCloseRequest=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._reject(m),u._pendingAbortRequest=void 0),Et(u,m)}function mi(u){return!(u._closeRequest===void 0&&u._inFlightCloseRequest===void 0)}function IS(u){return!(u._inFlightWriteRequest===void 0&&u._inFlightCloseRequest===void 0)}function RS(u){u._inFlightCloseRequest=u._closeRequest,u._closeRequest=void 0}function OS(u){u._inFlightWriteRequest=u._writeRequests.shift()}function Jc(u){u._closeRequest!==void 0&&(u._closeRequest._reject(u._storedError),u._closeRequest=void 0);var m=u._writer;m!==void 0&&Up(m,u._storedError)}function Rp(u,m){var S=u._writer;S!==void 0&&m!==u._backpressure&&(m?YS(S):Mp(S)),u._backpressure=m}var ls=function(){function u(m){if(qe(m,1,"WritableStreamDefaultWriter"),Tr(m,"First parameter"),Fr(m))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=m,m._writer=this;var S=m._state;if(S==="writable")!mi(m)&&m._backpressure?il(this):dg(this),tl(this);else if(S==="erroring")Np(this,m._storedError),tl(this);else if(S==="closed")dg(this),KS(this);else{var D=m._storedError;Np(this,D),pg(this,D)}}return Object.defineProperty(u.prototype,"closed",{get:function(){return To(this)?this._closedPromise:d(Fo("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!To(this))throw Fo("desiredSize");if(this._ownerWritableStream===void 0)throw xu("desiredSize");return US(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ready",{get:function(){return To(this)?this._readyPromise:d(Fo("ready"))},enumerable:!1,configurable:!0}),u.prototype.abort=function(m){return m===void 0&&(m=void 0),To(this)?this._ownerWritableStream===void 0?d(xu("abort")):zS(this,m):d(Fo("abort"))},u.prototype.close=function(){if(!To(this))return d(Fo("close"));var m=this._ownerWritableStream;return m===void 0?d(xu("close")):mi(m)?d(new TypeError("Cannot close an already-closing stream")):ig(this)},u.prototype.releaseLock=function(){if(!To(this))throw Fo("releaseLock");var m=this._ownerWritableStream;m!==void 0&&og(this)},u.prototype.write=function(m){return m===void 0&&(m=void 0),To(this)?this._ownerWritableStream===void 0?d(xu("write to")):sg(this,m):d(Fo("write"))},u}();Object.defineProperties(ls.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ls.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function To(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_ownerWritableStream")?!1:u instanceof ls}function zS(u,m){var S=u._ownerWritableStream;return ca(S,m)}function ig(u){var m=u._ownerWritableStream;return ct(m)}function DS(u){var m=u._ownerWritableStream,S=m._state;return mi(m)||S==="closed"?h(void 0):S==="errored"?d(m._storedError):ig(u)}function LS(u,m){u._closedPromiseState==="pending"?Up(u,m):GS(u,m)}function ng(u,m){u._readyPromiseState==="pending"?mg(u,m):ZS(u,m)}function US(u){var m=u._ownerWritableStream,S=m._state;return S==="errored"||S==="erroring"?null:S==="closed"?0:lg(m._writableStreamController)}function og(u){var m=u._ownerWritableStream,S=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");ng(u,S),LS(u,S),m._writer=void 0,u._ownerWritableStream=void 0}function sg(u,m){var S=u._ownerWritableStream,D=S._writableStreamController,G=HS(D,m);if(S!==u._ownerWritableStream)return d(xu("write to"));var se=S._state;if(se==="errored")return d(S._storedError);if(mi(S)||se==="closed")return d(new TypeError("The stream is closing or closed and cannot be written to"));if(se==="erroring")return d(S._storedError);var ge=lt(S);return VS(D,m,G),ge}var ug={},Co=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"abortReason",{get:function(){if(!Op(this))throw Lp("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"signal",{get:function(){if(!Op(this))throw Lp("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal},enumerable:!1,configurable:!0}),u.prototype.error=function(m){if(m===void 0&&(m=void 0),!Op(this))throw Lp("error");var S=this._controlledWritableStream._state;S==="writable"&&fg(this,m)},u.prototype[_e]=function(m){var S=this._abortAlgorithm(m);return el(this),S},u.prototype[be]=function(){ua(this)},u}();Object.defineProperties(Co.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Co.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Op(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledWritableStream")?!1:u instanceof Co}function cg(u,m,S,D,G,se,ge,Xe){m._controlledWritableStream=u,u._writableStreamController=m,m._queue=void 0,m._queueTotalSize=void 0,ua(m),m._abortReason=void 0,m._abortController=C(),m._started=!1,m._strategySizeAlgorithm=Xe,m._strategyHWM=ge,m._writeAlgorithm=D,m._closeAlgorithm=G,m._abortAlgorithm=se;var Er=Dp(m);Rp(u,Er);var qr=S(),zr=h(qr);j(zr,function(){m._started=!0,rl(m)},function(Wr){m._started=!0,Et(u,Wr)})}function NS(u,m,S,D){var G=Object.create(Co.prototype),se=function(){},ge=function(){return h(void 0)},Xe=function(){return h(void 0)},Er=function(){return h(void 0)};m.start!==void 0&&(se=function(){return m.start(G)}),m.write!==void 0&&(ge=function(qr){return m.write(qr,G)}),m.close!==void 0&&(Xe=function(){return m.close()}),m.abort!==void 0&&(Er=function(qr){return m.abort(qr)}),cg(u,G,se,ge,Xe,Er,S,D)}function el(u){u._writeAlgorithm=void 0,u._closeAlgorithm=void 0,u._abortAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function MS(u){vt(u,ug,0),rl(u)}function HS(u,m){try{return u._strategySizeAlgorithm(m)}catch(S){return zp(u,S),1}}function lg(u){return u._strategyHWM-u._queueTotalSize}function VS(u,m,S){try{vt(u,m,S)}catch(se){zp(u,se);return}var D=u._controlledWritableStream;if(!mi(D)&&D._state==="writable"){var G=Dp(u);Rp(D,G)}rl(u)}function rl(u){var m=u._controlledWritableStream;if(!!u._started&&m._inFlightWriteRequest===void 0){var S=m._state;if(S==="erroring"){gt(m);return}if(u._queue.length!==0){var D=ra(u);D===ug?$S(u):WS(u,D)}}}function zp(u,m){u._controlledWritableStream._state==="writable"&&fg(u,m)}function $S(u){var m=u._controlledWritableStream;RS(m),st(u);var S=u._closeAlgorithm();el(u),j(S,function(){di(m)},function(D){cs(m,D)})}function WS(u,m){var S=u._controlledWritableStream;OS(S);var D=u._writeAlgorithm(m);j(D,function(){Rt(S);var G=S._state;if(st(u),!mi(S)&&G==="writable"){var se=Dp(u);Rp(S,se)}rl(u)},function(G){S._state==="writable"&&el(u),Po(S,G)})}function Dp(u){var m=lg(u);return m<=0}function fg(u,m){var S=u._controlledWritableStream;el(u),mn(S,m)}function al(u){return new TypeError("WritableStream.prototype."+u+" can only be used on a WritableStream")}function Lp(u){return new TypeError("WritableStreamDefaultController.prototype."+u+" can only be used on a WritableStreamDefaultController")}function Fo(u){return new TypeError("WritableStreamDefaultWriter.prototype."+u+" can only be used on a WritableStreamDefaultWriter")}function xu(u){return new TypeError("Cannot "+u+" a stream using a released writer")}function tl(u){u._closedPromise=v(function(m,S){u._closedPromise_resolve=m,u._closedPromise_reject=S,u._closedPromiseState="pending"})}function pg(u,m){tl(u),Up(u,m)}function KS(u){tl(u),hg(u)}function Up(u,m){u._closedPromise_reject!==void 0&&(T(u._closedPromise),u._closedPromise_reject(m),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0,u._closedPromiseState="rejected")}function GS(u,m){pg(u,m)}function hg(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0,u._closedPromiseState="resolved")}function il(u){u._readyPromise=v(function(m,S){u._readyPromise_resolve=m,u._readyPromise_reject=S}),u._readyPromiseState="pending"}function Np(u,m){il(u),mg(u,m)}function dg(u){il(u),Mp(u)}function mg(u,m){u._readyPromise_reject!==void 0&&(T(u._readyPromise),u._readyPromise_reject(m),u._readyPromise_resolve=void 0,u._readyPromise_reject=void 0,u._readyPromiseState="rejected")}function YS(u){il(u)}function ZS(u,m){Np(u,m)}function Mp(u){u._readyPromise_resolve!==void 0&&(u._readyPromise_resolve(void 0),u._readyPromise_resolve=void 0,u._readyPromise_reject=void 0,u._readyPromiseState="fulfilled")}var vg=typeof DOMException!="undefined"?DOMException:void 0;function QS(u){if(!(typeof u=="function"||typeof u=="object"))return!1;try{return new u,!0}catch{return!1}}function XS(){var u=function(S,D){this.message=S||"",this.name=D||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return u.prototype=Object.create(Error.prototype),Object.defineProperty(u.prototype,"constructor",{value:u,writable:!0,configurable:!0}),u}var JS=QS(vg)?vg:XS();function gg(u,m,S,D,G,se){var ge=Gr(u),Xe=ie(m);u._disturbed=!0;var Er=!1,qr=h(void 0);return v(function(zr,Wr){var Oa;if(se!==void 0){if(Oa=function(){var xr=new JS("Aborted","AbortError"),Yr=[];D||Yr.push(function(){return m._state==="writable"?ca(m,xr):h(void 0)}),G||Yr.push(function(){return u._state==="readable"?vi(u,xr):h(void 0)}),$t(function(){return Promise.all(Yr.map(function(ba){return ba()}))},!0,xr)},se.aborted){Oa();return}se.addEventListener("abort",Oa)}function gi(){return v(function(xr,Yr){function ba(Li){Li?xr():y(hs(),ba,Yr)}ba(!1)})}function hs(){return Er?h(!0):y(Xe._readyPromise,function(){return v(function(xr,Yr){nr(ge,{_chunkSteps:function(ba){qr=y(sg(Xe,ba),void 0,a),xr(!1)},_closeSteps:function(){return xr(!0)},_errorSteps:Yr})})})}if(ft(u,ge._closedPromise,function(xr){D?gn(!0,xr):$t(function(){return ca(m,xr)},!0,xr)}),ft(m,Xe._closedPromise,function(xr){G?gn(!0,xr):$t(function(){return vi(u,xr)},!0,xr)}),Di(u,ge._closedPromise,function(){S?gn():$t(function(){return DS(Xe)})}),mi(m)||m._state==="closed"){var $n=new TypeError("the destination writable stream closed before all data could be piped to it");G?gn(!0,$n):$t(function(){return vi(u,$n)},!0,$n)}T(gi());function zi(){var xr=qr;return y(qr,function(){return xr!==qr?zi():void 0})}function ft(xr,Yr,ba){xr._state==="errored"?ba(xr._storedError):A(Yr,ba)}function Di(xr,Yr,ba){xr._state==="closed"?ba():w(Yr,ba)}function $t(xr,Yr,ba){if(Er)return;Er=!0,m._state==="writable"&&!mi(m)?w(zi(),Li):Li();function Li(){j(xr(),function(){return ga(Yr,ba)},function(Wn){return ga(!0,Wn)})}}function gn(xr,Yr){Er||(Er=!0,m._state==="writable"&&!mi(m)?w(zi(),function(){return ga(xr,Yr)}):ga(xr,Yr))}function ga(xr,Yr){og(Xe),V(ge),se!==void 0&&se.removeEventListener("abort",Oa),xr?Wr(Yr):zr(void 0)}})}var qo=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!nl(this))throw ul("desiredSize");return Hp(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!nl(this))throw ul("close");if(!fs(this))throw new TypeError("The stream is not in a state that permits close");ku(this)},u.prototype.enqueue=function(m){if(m===void 0&&(m=void 0),!nl(this))throw ul("enqueue");if(!fs(this))throw new TypeError("The stream is not in a state that permits enqueue");return sl(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!nl(this))throw ul("error");Mn(this,m)},u.prototype[Le]=function(m){ua(this);var S=this._cancelAlgorithm(m);return ol(this),S},u.prototype[Me]=function(m){var S=this._controlledReadableStream;if(this._queue.length>0){var D=st(this);this._closeRequested&&this._queue.length===0?(ol(this),_u(S)):wu(this),m._chunkSteps(D)}else J(S,m),wu(this)},u}();Object.defineProperties(qo.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(qo.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function nl(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableStream")?!1:u instanceof qo}function wu(u){var m=bg(u);if(!!m){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var S=u._pullAlgorithm();j(S,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,wu(u))},function(D){Mn(u,D)})}}function bg(u){var m=u._controlledReadableStream;if(!fs(u)||!u._started)return!1;if(Vn(m)&&Ke(m)>0)return!0;var S=Hp(u);return S>0}function ol(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function ku(u){if(!!fs(u)){var m=u._controlledReadableStream;u._closeRequested=!0,u._queue.length===0&&(ol(u),_u(m))}}function sl(u,m){if(!!fs(u)){var S=u._controlledReadableStream;if(Vn(S)&&Ke(S)>0)Be(S,m,!1);else{var D=void 0;try{D=u._strategySizeAlgorithm(m)}catch(G){throw Mn(u,G),G}try{vt(u,m,D)}catch(G){throw Mn(u,G),G}}wu(u)}}function Mn(u,m){var S=u._controlledReadableStream;S._state==="readable"&&(ua(u),ol(u),kg(S,m))}function Hp(u){var m=u._controlledReadableStream._state;return m==="errored"?null:m==="closed"?0:u._strategyHWM-u._queueTotalSize}function eE(u){return!bg(u)}function fs(u){var m=u._controlledReadableStream._state;return!u._closeRequested&&m==="readable"}function yg(u,m,S,D,G,se,ge){m._controlledReadableStream=u,m._queue=void 0,m._queueTotalSize=void 0,ua(m),m._started=!1,m._closeRequested=!1,m._pullAgain=!1,m._pulling=!1,m._strategySizeAlgorithm=ge,m._strategyHWM=se,m._pullAlgorithm=D,m._cancelAlgorithm=G,u._readableStreamController=m;var Xe=S();j(h(Xe),function(){m._started=!0,wu(m)},function(Er){Mn(m,Er)})}function rE(u,m,S,D){var G=Object.create(qo.prototype),se=function(){},ge=function(){return h(void 0)},Xe=function(){return h(void 0)};m.start!==void 0&&(se=function(){return m.start(G)}),m.pull!==void 0&&(ge=function(){return m.pull(G)}),m.cancel!==void 0&&(Xe=function(Er){return m.cancel(Er)}),yg(u,G,se,ge,Xe,S,D)}function ul(u){return new TypeError("ReadableStreamDefaultController.prototype."+u+" can only be used on a ReadableStreamDefaultController")}function aE(u,m){return va(u._readableStreamController)?iE(u):tE(u)}function tE(u,m){var S=Gr(u),D=!1,G=!1,se=!1,ge=!1,Xe,Er,qr,zr,Wr,Oa=v(function(ft){Wr=ft});function gi(){if(D)return G=!0,h(void 0);D=!0;var ft={_chunkSteps:function(Di){I(function(){G=!1;var $t=Di,gn=Di;se||sl(qr._readableStreamController,$t),ge||sl(zr._readableStreamController,gn),D=!1,G&&gi()})},_closeSteps:function(){D=!1,se||ku(qr._readableStreamController),ge||ku(zr._readableStreamController),(!se||!ge)&&Wr(void 0)},_errorSteps:function(){D=!1}};return nr(S,ft),h(void 0)}function hs(ft){if(se=!0,Xe=ft,ge){var Di=wr([Xe,Er]),$t=vi(u,Di);Wr($t)}return Oa}function $n(ft){if(ge=!0,Er=ft,se){var Di=wr([Xe,Er]),$t=vi(u,Di);Wr($t)}return Oa}function zi(){}return qr=Vp(zi,gi,hs),zr=Vp(zi,gi,$n),A(S._closedPromise,function(ft){Mn(qr._readableStreamController,ft),Mn(zr._readableStreamController,ft),(!se||!ge)&&Wr(void 0)}),[qr,zr]}function iE(u){var m=Gr(u),S=!1,D=!1,G=!1,se=!1,ge=!1,Xe,Er,qr,zr,Wr,Oa=v(function(ga){Wr=ga});function gi(ga){A(ga._closedPromise,function(xr){ga===m&&(Ce(qr._readableStreamController,xr),Ce(zr._readableStreamController,xr),(!se||!ge)&&Wr(void 0))})}function hs(){Ve(m)&&(V(m),m=Gr(u),gi(m));var ga={_chunkSteps:function(xr){I(function(){D=!1,G=!1;var Yr=xr,ba=xr;if(!se&&!ge)try{ba=Ia(xr)}catch(Li){Ce(qr._readableStreamController,Li),Ce(zr._readableStreamController,Li),Wr(vi(u,Li));return}se||Se(qr._readableStreamController,Yr),ge||Se(zr._readableStreamController,ba),S=!1,D?zi():G&&ft()})},_closeSteps:function(){S=!1,se||Ie(qr._readableStreamController),ge||Ie(zr._readableStreamController),qr._readableStreamController._pendingPullIntos.length>0&&Qe(qr._readableStreamController,0),zr._readableStreamController._pendingPullIntos.length>0&&Qe(zr._readableStreamController,0),(!se||!ge)&&Wr(void 0)},_errorSteps:function(){S=!1}};nr(m,ga)}function $n(ga,xr){Je(m)&&(V(m),m=X(u),gi(m));var Yr=xr?zr:qr,ba=xr?qr:zr,Li={_chunkSteps:function(Wn){I(function(){D=!1,G=!1;var ds=xr?ge:se,Au=xr?se:ge;if(Au)ds||Te(Yr._readableStreamController,Wn);else{var Rg=void 0;try{Rg=Ia(Wn)}catch(Gp){Ce(Yr._readableStreamController,Gp),Ce(ba._readableStreamController,Gp),Wr(vi(u,Gp));return}ds||Te(Yr._readableStreamController,Wn),Se(ba._readableStreamController,Rg)}S=!1,D?zi():G&&ft()})},_closeSteps:function(Wn){S=!1;var ds=xr?ge:se,Au=xr?se:ge;ds||Ie(Yr._readableStreamController),Au||Ie(ba._readableStreamController),Wn!==void 0&&(ds||Te(Yr._readableStreamController,Wn),!Au&&ba._readableStreamController._pendingPullIntos.length>0&&Qe(ba._readableStreamController,0)),(!ds||!Au)&&Wr(void 0)},_errorSteps:function(){S=!1}};fr(m,ga,Li)}function zi(){if(S)return D=!0,h(void 0);S=!0;var ga=Fe(qr._readableStreamController);return ga===null?hs():$n(ga._view,!1),h(void 0)}function ft(){if(S)return G=!0,h(void 0);S=!0;var ga=Fe(zr._readableStreamController);return ga===null?hs():$n(ga._view,!0),h(void 0)}function Di(ga){if(se=!0,Xe=ga,ge){var xr=wr([Xe,Er]),Yr=vi(u,xr);Wr(Yr)}return Oa}function $t(ga){if(ge=!0,Er=ga,se){var xr=wr([Xe,Er]),Yr=vi(u,xr);Wr(Yr)}return Oa}function gn(){}return qr=wg(gn,zi,Di),zr=wg(gn,ft,$t),gi(m),[qr,zr]}function nE(u,m){Ze(u,m);var S=u,D=S==null?void 0:S.autoAllocateChunkSize,G=S==null?void 0:S.cancel,se=S==null?void 0:S.pull,ge=S==null?void 0:S.start,Xe=S==null?void 0:S.type;return{autoAllocateChunkSize:D===void 0?void 0:ur(D,m+" has member 'autoAllocateChunkSize' that"),cancel:G===void 0?void 0:oE(G,S,m+" has member 'cancel' that"),pull:se===void 0?void 0:sE(se,S,m+" has member 'pull' that"),start:ge===void 0?void 0:uE(ge,S,m+" has member 'start' that"),type:Xe===void 0?void 0:cE(Xe,m+" has member 'type' that")}}function oE(u,m,S){return We(u,S),function(D){return R(u,m,[D])}}function sE(u,m,S){return We(u,S),function(D){return R(u,m,[D])}}function uE(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function cE(u,m){if(u=""+u,u!=="bytes")throw new TypeError(m+" '"+u+"' is not a valid enumeration value for ReadableStreamType");return u}function lE(u,m){Ze(u,m);var S=u==null?void 0:u.mode;return{mode:S===void 0?void 0:fE(S,m+" has member 'mode' that")}}function fE(u,m){if(u=""+u,u!=="byob")throw new TypeError(m+" '"+u+"' is not a valid enumeration value for ReadableStreamReaderMode");return u}function pE(u,m){Ze(u,m);var S=u==null?void 0:u.preventCancel;return{preventCancel:Boolean(S)}}function xg(u,m){Ze(u,m);var S=u==null?void 0:u.preventAbort,D=u==null?void 0:u.preventCancel,G=u==null?void 0:u.preventClose,se=u==null?void 0:u.signal;return se!==void 0&&hE(se,m+" has member 'signal' that"),{preventAbort:Boolean(S),preventCancel:Boolean(D),preventClose:Boolean(G),signal:se}}function hE(u,m){if(!_(u))throw new TypeError(m+" is not an AbortSignal.")}function dE(u,m){Ze(u,m);var S=u==null?void 0:u.readable;fe(S,"readable","ReadableWritablePair"),Or(S,m+" has member 'readable' that");var D=u==null?void 0:u.writable;return fe(D,"writable","ReadableWritablePair"),Tr(D,m+" has member 'writable' that"),{readable:S,writable:D}}var vn=function(){function u(m,S){m===void 0&&(m={}),S===void 0&&(S={}),m===void 0?m=null:rr(m,"First parameter");var D=yr(S,"Second parameter"),G=nE(m,"First parameter");if($p(this),G.type==="bytes"){if(D.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var se=sr(D,0);Ae(this,G,se)}else{var ge=L(D),se=sr(D,1);rE(this,G,se,ge)}}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Hn(this))throw Bo("locked");return Vn(this)},enumerable:!1,configurable:!0}),u.prototype.cancel=function(m){return m===void 0&&(m=void 0),Hn(this)?Vn(this)?d(new TypeError("Cannot cancel a stream that already has a reader")):vi(this,m):d(Bo("cancel"))},u.prototype.getReader=function(m){if(m===void 0&&(m=void 0),!Hn(this))throw Bo("getReader");var S=lE(m,"First parameter");return S.mode===void 0?Gr(this):X(this)},u.prototype.pipeThrough=function(m,S){if(S===void 0&&(S={}),!Hn(this))throw Bo("pipeThrough");qe(m,1,"pipeThrough");var D=dE(m,"First parameter"),G=xg(S,"Second parameter");if(Vn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Fr(D.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var se=gg(this,D.writable,G.preventClose,G.preventAbort,G.preventCancel,G.signal);return T(se),D.readable},u.prototype.pipeTo=function(m,S){if(S===void 0&&(S={}),!Hn(this))return d(Bo("pipeTo"));if(m===void 0)return d("Parameter 1 is required in 'pipeTo'.");if(!Re(m))return d(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var D;try{D=xg(S,"Second parameter")}catch(G){return d(G)}return Vn(this)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Fr(m)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):gg(this,m,D.preventClose,D.preventAbort,D.preventCancel,D.signal)},u.prototype.tee=function(){if(!Hn(this))throw Bo("tee");var m=aE(this);return wr(m)},u.prototype.values=function(m){if(m===void 0&&(m=void 0),!Hn(this))throw Bo("values");var S=pE(m,"First parameter");return pr(this,S.preventCancel)},u}();Object.defineProperties(vn.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(vn.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(vn.prototype,r.asyncIterator,{value:vn.prototype.values,writable:!0,configurable:!0});function Vp(u,m,S,D,G){D===void 0&&(D=1),G===void 0&&(G=function(){return 1});var se=Object.create(vn.prototype);$p(se);var ge=Object.create(qo.prototype);return yg(se,ge,u,m,S,D,G),se}function wg(u,m,S){var D=Object.create(vn.prototype);$p(D);var G=Object.create(Ra.prototype);return Ee(D,G,u,m,S,0,void 0),D}function $p(u){u._state="readable",u._reader=void 0,u._storedError=void 0,u._disturbed=!1}function Hn(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readableStreamController")?!1:u instanceof vn}function Vn(u){return u._reader!==void 0}function vi(u,m){if(u._disturbed=!0,u._state==="closed")return h(void 0);if(u._state==="errored")return d(u._storedError);_u(u);var S=u._reader;S!==void 0&&Ve(S)&&(S._readIntoRequests.forEach(function(G){G._closeSteps(void 0)}),S._readIntoRequests=new U);var D=u._readableStreamController[Le](m);return P(D,a)}function _u(u){u._state="closed";var m=u._reader;m!==void 0&&(ce(m),Je(m)&&(m._readRequests.forEach(function(S){S._closeSteps()}),m._readRequests=new U))}function kg(u,m){u._state="errored",u._storedError=m;var S=u._reader;S!==void 0&&(je(S,m),Je(S)?(S._readRequests.forEach(function(D){D._errorSteps(m)}),S._readRequests=new U):(S._readIntoRequests.forEach(function(D){D._errorSteps(m)}),S._readIntoRequests=new U))}function Bo(u){return new TypeError("ReadableStream.prototype."+u+" can only be used on a ReadableStream")}function _g(u,m){Ze(u,m);var S=u==null?void 0:u.highWaterMark;return fe(S,"highWaterMark","QueuingStrategyInit"),{highWaterMark:we(S)}}var jg=function(u){return u.byteLength};try{Object.defineProperty(jg,"name",{value:"size",configurable:!0})}catch{}var ju=function(){function u(m){qe(m,1,"ByteLengthQueuingStrategy"),m=_g(m,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=m.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!Eg(this))throw Sg("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!Eg(this))throw Sg("size");return jg},enumerable:!1,configurable:!0}),u}();Object.defineProperties(ju.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ju.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Sg(u){return new TypeError("ByteLengthQueuingStrategy.prototype."+u+" can only be used on a ByteLengthQueuingStrategy")}function Eg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_byteLengthQueuingStrategyHighWaterMark")?!1:u instanceof ju}var Ag=function(){return 1};try{Object.defineProperty(Ag,"name",{value:"size",configurable:!0})}catch{}var Su=function(){function u(m){qe(m,1,"CountQueuingStrategy"),m=_g(m,"First parameter"),this._countQueuingStrategyHighWaterMark=m.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!Tg(this))throw Pg("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!Tg(this))throw Pg("size");return Ag},enumerable:!1,configurable:!0}),u}();Object.defineProperties(Su.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Su.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Pg(u){return new TypeError("CountQueuingStrategy.prototype."+u+" can only be used on a CountQueuingStrategy")}function Tg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_countQueuingStrategyHighWaterMark")?!1:u instanceof Su}function mE(u,m){Ze(u,m);var S=u==null?void 0:u.flush,D=u==null?void 0:u.readableType,G=u==null?void 0:u.start,se=u==null?void 0:u.transform,ge=u==null?void 0:u.writableType;return{flush:S===void 0?void 0:vE(S,u,m+" has member 'flush' that"),readableType:D,start:G===void 0?void 0:gE(G,u,m+" has member 'start' that"),transform:se===void 0?void 0:bE(se,u,m+" has member 'transform' that"),writableType:ge}}function vE(u,m,S){return We(u,S),function(D){return R(u,m,[D])}}function gE(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function bE(u,m,S){return We(u,S),function(D,G){return R(u,m,[D,G])}}var Eu=function(){function u(m,S,D){m===void 0&&(m={}),S===void 0&&(S={}),D===void 0&&(D={}),m===void 0&&(m=null);var G=yr(S,"Second parameter"),se=yr(D,"Third parameter"),ge=mE(m,"First parameter");if(ge.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(ge.writableType!==void 0)throw new RangeError("Invalid writableType specified");var Xe=sr(se,0),Er=L(se),qr=sr(G,1),zr=L(G),Wr,Oa=v(function(gi){Wr=gi});yE(this,Oa,qr,zr,Xe,Er),wE(this,ge),ge.start!==void 0?Wr(ge.start(this._transformStreamController)):Wr(void 0)}return Object.defineProperty(u.prototype,"readable",{get:function(){if(!Cg(this))throw Ig("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"writable",{get:function(){if(!Cg(this))throw Ig("writable");return this._writable},enumerable:!1,configurable:!0}),u}();Object.defineProperties(Eu.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Eu.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function yE(u,m,S,D,G,se){function ge(){return m}function Xe(Oa){return jE(u,Oa)}function Er(Oa){return SE(u,Oa)}function qr(){return EE(u)}u._writable=ue(ge,Xe,qr,Er,S,D);function zr(){return AE(u)}function Wr(Oa){return ll(u,Oa),h(void 0)}u._readable=Vp(ge,zr,Wr,G,se),u._backpressure=void 0,u._backpressureChangePromise=void 0,u._backpressureChangePromise_resolve=void 0,fl(u,!0),u._transformStreamController=void 0}function Cg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_transformStreamController")?!1:u instanceof Eu}function cl(u,m){Mn(u._readable._readableStreamController,m),ll(u,m)}function ll(u,m){Fg(u._transformStreamController),zp(u._writable._writableStreamController,m),u._backpressure&&fl(u,!1)}function fl(u,m){u._backpressureChangePromise!==void 0&&u._backpressureChangePromise_resolve(),u._backpressureChangePromise=v(function(S){u._backpressureChangePromise_resolve=S}),u._backpressure=m}var ps=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!pl(this))throw hl("desiredSize");var m=this._controlledTransformStream._readable._readableStreamController;return Hp(m)},enumerable:!1,configurable:!0}),u.prototype.enqueue=function(m){if(m===void 0&&(m=void 0),!pl(this))throw hl("enqueue");qg(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!pl(this))throw hl("error");kE(this,m)},u.prototype.terminate=function(){if(!pl(this))throw hl("terminate");_E(this)},u}();Object.defineProperties(ps.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ps.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function pl(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledTransformStream")?!1:u instanceof ps}function xE(u,m,S,D){m._controlledTransformStream=u,u._transformStreamController=m,m._transformAlgorithm=S,m._flushAlgorithm=D}function wE(u,m){var S=Object.create(ps.prototype),D=function(se){try{return qg(S,se),h(void 0)}catch(ge){return d(ge)}},G=function(){return h(void 0)};m.transform!==void 0&&(D=function(se){return m.transform(se,S)}),m.flush!==void 0&&(G=function(){return m.flush(S)}),xE(u,S,D,G)}function Fg(u){u._transformAlgorithm=void 0,u._flushAlgorithm=void 0}function qg(u,m){var S=u._controlledTransformStream,D=S._readable._readableStreamController;if(!fs(D))throw new TypeError("Readable side is not in a state that permits enqueue");try{sl(D,m)}catch(se){throw ll(S,se),S._readable._storedError}var G=eE(D);G!==S._backpressure&&fl(S,!0)}function kE(u,m){cl(u._controlledTransformStream,m)}function Bg(u,m){var S=u._transformAlgorithm(m);return P(S,void 0,function(D){throw cl(u._controlledTransformStream,D),D})}function _E(u){var m=u._controlledTransformStream,S=m._readable._readableStreamController;ku(S);var D=new TypeError("TransformStream terminated");ll(m,D)}function jE(u,m){var S=u._transformStreamController;if(u._backpressure){var D=u._backpressureChangePromise;return P(D,function(){var G=u._writable,se=G._state;if(se==="erroring")throw G._storedError;return Bg(S,m)})}return Bg(S,m)}function SE(u,m){return cl(u,m),h(void 0)}function EE(u){var m=u._readable,S=u._transformStreamController,D=S._flushAlgorithm();return Fg(S),P(D,function(){if(m._state==="errored")throw m._storedError;ku(m._readableStreamController)},function(G){throw cl(u,G),m._storedError})}function AE(u){return fl(u,!1),u._backpressureChangePromise}function hl(u){return new TypeError("TransformStreamDefaultController.prototype."+u+" can only be used on a TransformStreamDefaultController")}function Ig(u){return new TypeError("TransformStream.prototype."+u+" can only be used on a TransformStream")}var Wp={ReadableStream:vn,ReadableStreamDefaultController:qo,ReadableByteStreamController:Ra,ReadableStreamBYOBRequest:da,ReadableStreamDefaultReader:Ye,ReadableStreamBYOBReader:ne,WritableStream:H,WritableStreamDefaultController:Co,WritableStreamDefaultWriter:ls,ByteLengthQueuingStrategy:ju,CountQueuingStrategy:Su,TransformStream:Eu,TransformStreamDefaultController:ps};if(typeof t!="undefined")for(var Kp in Wp)Object.prototype.hasOwnProperty.call(Wp,Kp)&&Object.defineProperty(t,Kp,{value:Wp[Kp],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=ju,e.CountQueuingStrategy=Su,e.ReadableByteStreamController=Ra,e.ReadableStream=vn,e.ReadableStreamBYOBReader=ne,e.ReadableStreamBYOBRequest=da,e.ReadableStreamDefaultController=qo,e.ReadableStreamDefaultReader=Ye,e.TransformStream=Eu,e.TransformStreamDefaultController=ps,e.WritableStream=H,e.WritableStreamDefaultController=Co,e.WritableStreamDefaultWriter=ls,Object.defineProperty(e,"__esModule",{value:!0})})});var zn=O(Bt=>{"use strict";var lN=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function fN(e,r){return Object.prototype.hasOwnProperty.call(e,r)}Bt.assign=function(e){for(var r=Array.prototype.slice.call(arguments,1);r.length;){var a=r.shift();if(!!a){if(typeof a!="object")throw new TypeError(a+"must be non-object");for(var i in a)fN(a,i)&&(e[i]=a[i])}}return e};Bt.shrinkBuf=function(e,r){return e.length===r?e:e.subarray?e.subarray(0,r):(e.length=r,e)};var pN={arraySet:function(e,r,a,i,t){if(r.subarray&&e.subarray){e.set(r.subarray(a,a+i),t);return}for(var n=0;n<i;n++)e[t+n]=r[a+n]},flattenChunks:function(e){var r,a,i,t,n,o;for(i=0,r=0,a=e.length;r<a;r++)i+=e[r].length;for(o=new Uint8Array(i),t=0,r=0,a=e.length;r<a;r++)n=e[r],o.set(n,t),t+=n.length;return o}},hN={arraySet:function(e,r,a,i,t){for(var n=0;n<i;n++)e[t+n]=r[a+n]},flattenChunks:function(e){return[].concat.apply([],e)}};Bt.setTyped=function(e){e?(Bt.Buf8=Uint8Array,Bt.Buf16=Uint16Array,Bt.Buf32=Int32Array,Bt.assign(Bt,pN)):(Bt.Buf8=Array,Bt.Buf16=Array,Bt.Buf32=Array,Bt.assign(Bt,hN))};Bt.setTyped(lN)});var p4=O(pu=>{"use strict";var dN=zn(),mN=4,V8=0,$8=1,vN=2;function lu(e){for(var r=e.length;--r>=0;)e[r]=0}var gN=0,W8=1,bN=2,yN=3,xN=258,x0=29,zc=256,Dc=zc+1+x0,fu=30,w0=19,K8=2*Dc+1,es=15,k0=16,wN=7,_0=256,G8=16,Y8=17,Z8=18,j0=[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],gp=[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],kN=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Q8=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],_N=512,Dn=new Array((Dc+2)*2);lu(Dn);var Lc=new Array(fu*2);lu(Lc);var Uc=new Array(_N);lu(Uc);var Nc=new Array(xN-yN+1);lu(Nc);var S0=new Array(x0);lu(S0);var bp=new Array(fu);lu(bp);function E0(e,r,a,i,t){this.static_tree=e,this.extra_bits=r,this.extra_base=a,this.elems=i,this.max_length=t,this.has_stree=e&&e.length}var X8,J8,e4;function A0(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}function r4(e){return e<256?Uc[e]:Uc[256+(e>>>7)]}function Mc(e,r){e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255}function Ht(e,r,a){e.bi_valid>k0-a?(e.bi_buf|=r<<e.bi_valid&65535,Mc(e,e.bi_buf),e.bi_buf=r>>k0-e.bi_valid,e.bi_valid+=a-k0):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=a)}function ln(e,r,a){Ht(e,a[r*2],a[r*2+1])}function a4(e,r){var a=0;do a|=e&1,e>>>=1,a<<=1;while(--r>0);return a>>>1}function jN(e){e.bi_valid===16?(Mc(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function SN(e,r){var a=r.dyn_tree,i=r.max_code,t=r.stat_desc.static_tree,n=r.stat_desc.has_stree,o=r.stat_desc.extra_bits,s=r.stat_desc.extra_base,c=r.stat_desc.max_length,l,f,v,h,d,y,j=0;for(h=0;h<=es;h++)e.bl_count[h]=0;for(a[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<K8;l++)f=e.heap[l],h=a[a[f*2+1]*2+1]+1,h>c&&(h=c,j++),a[f*2+1]=h,!(f>i)&&(e.bl_count[h]++,d=0,f>=s&&(d=o[f-s]),y=a[f*2],e.opt_len+=y*(h+d),n&&(e.static_len+=y*(t[f*2+1]+d)));if(j!==0){do{for(h=c-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,j-=2}while(j>0);for(h=c;h!==0;h--)for(f=e.bl_count[h];f!==0;)v=e.heap[--l],!(v>i)&&(a[v*2+1]!==h&&(e.opt_len+=(h-a[v*2+1])*a[v*2],a[v*2+1]=h),f--)}}function t4(e,r,a){var i=new Array(es+1),t=0,n,o;for(n=1;n<=es;n++)i[n]=t=t+a[n-1]<<1;for(o=0;o<=r;o++){var s=e[o*2+1];s!==0&&(e[o*2]=a4(i[s]++,s))}}function EN(){var e,r,a,i,t,n=new Array(es+1);for(a=0,i=0;i<x0-1;i++)for(S0[i]=a,e=0;e<1<<j0[i];e++)Nc[a++]=i;for(Nc[a-1]=i,t=0,i=0;i<16;i++)for(bp[i]=t,e=0;e<1<<gp[i];e++)Uc[t++]=i;for(t>>=7;i<fu;i++)for(bp[i]=t<<7,e=0;e<1<<gp[i]-7;e++)Uc[256+t++]=i;for(r=0;r<=es;r++)n[r]=0;for(e=0;e<=143;)Dn[e*2+1]=8,e++,n[8]++;for(;e<=255;)Dn[e*2+1]=9,e++,n[9]++;for(;e<=279;)Dn[e*2+1]=7,e++,n[7]++;for(;e<=287;)Dn[e*2+1]=8,e++,n[8]++;for(t4(Dn,Dc+1,n),e=0;e<fu;e++)Lc[e*2+1]=5,Lc[e*2]=a4(e,5);X8=new E0(Dn,j0,zc+1,Dc,es),J8=new E0(Lc,gp,0,fu,es),e4=new E0(new Array(0),kN,0,w0,wN)}function i4(e){var r;for(r=0;r<Dc;r++)e.dyn_ltree[r*2]=0;for(r=0;r<fu;r++)e.dyn_dtree[r*2]=0;for(r=0;r<w0;r++)e.bl_tree[r*2]=0;e.dyn_ltree[_0*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function n4(e){e.bi_valid>8?Mc(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function AN(e,r,a,i){n4(e),i&&(Mc(e,a),Mc(e,~a)),dN.arraySet(e.pending_buf,e.window,r,a,e.pending),e.pending+=a}function o4(e,r,a,i){var t=r*2,n=a*2;return e[t]<e[n]||e[t]===e[n]&&i[r]<=i[a]}function P0(e,r,a){for(var i=e.heap[a],t=a<<1;t<=e.heap_len&&(t<e.heap_len&&o4(r,e.heap[t+1],e.heap[t],e.depth)&&t++,!o4(r,i,e.heap[t],e.depth));)e.heap[a]=e.heap[t],a=t,t<<=1;e.heap[a]=i}function s4(e,r,a){var i,t,n=0,o,s;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+n*2]<<8|e.pending_buf[e.d_buf+n*2+1],t=e.pending_buf[e.l_buf+n],n++,i===0?ln(e,t,r):(o=Nc[t],ln(e,o+zc+1,r),s=j0[o],s!==0&&(t-=S0[o],Ht(e,t,s)),i--,o=r4(i),ln(e,o,a),s=gp[o],s!==0&&(i-=bp[o],Ht(e,i,s)));while(n<e.last_lit);ln(e,_0,r)}function T0(e,r){var a=r.dyn_tree,i=r.stat_desc.static_tree,t=r.stat_desc.has_stree,n=r.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=K8,o=0;o<n;o++)a[o*2]!==0?(e.heap[++e.heap_len]=c=o,e.depth[o]=0):a[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,a[l*2]=1,e.depth[l]=0,e.opt_len--,t&&(e.static_len-=i[l*2+1]);for(r.max_code=c,o=e.heap_len>>1;o>=1;o--)P0(e,a,o);l=n;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],P0(e,a,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,a[l*2]=a[o*2]+a[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,a[o*2+1]=a[s*2+1]=l,e.heap[1]=l++,P0(e,a,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],SN(e,r),t4(a,c,e.bl_count)}function u4(e,r,a){var i,t=-1,n,o=r[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r[(a+1)*2+1]=65535,i=0;i<=a;i++)n=o,o=r[(i+1)*2+1],!(++s<c&&n===o)&&(s<l?e.bl_tree[n*2]+=s:n!==0?(n!==t&&e.bl_tree[n*2]++,e.bl_tree[G8*2]++):s<=10?e.bl_tree[Y8*2]++:e.bl_tree[Z8*2]++,s=0,t=n,o===0?(c=138,l=3):n===o?(c=6,l=3):(c=7,l=4))}function c4(e,r,a){var i,t=-1,n,o=r[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),i=0;i<=a;i++)if(n=o,o=r[(i+1)*2+1],!(++s<c&&n===o)){if(s<l)do ln(e,n,e.bl_tree);while(--s!=0);else n!==0?(n!==t&&(ln(e,n,e.bl_tree),s--),ln(e,G8,e.bl_tree),Ht(e,s-3,2)):s<=10?(ln(e,Y8,e.bl_tree),Ht(e,s-3,3)):(ln(e,Z8,e.bl_tree),Ht(e,s-11,7));s=0,t=n,o===0?(c=138,l=3):n===o?(c=6,l=3):(c=7,l=4)}}function PN(e){var r;for(u4(e,e.dyn_ltree,e.l_desc.max_code),u4(e,e.dyn_dtree,e.d_desc.max_code),T0(e,e.bl_desc),r=w0-1;r>=3&&e.bl_tree[Q8[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r}function TN(e,r,a,i){var t;for(Ht(e,r-257,5),Ht(e,a-1,5),Ht(e,i-4,4),t=0;t<i;t++)Ht(e,e.bl_tree[Q8[t]*2+1],3);c4(e,e.dyn_ltree,r-1),c4(e,e.dyn_dtree,a-1)}function CN(e){var r=4093624447,a;for(a=0;a<=31;a++,r>>>=1)if(r&1&&e.dyn_ltree[a*2]!==0)return V8;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return $8;for(a=32;a<zc;a++)if(e.dyn_ltree[a*2]!==0)return $8;return V8}var l4=!1;function FN(e){l4||(EN(),l4=!0),e.l_desc=new A0(e.dyn_ltree,X8),e.d_desc=new A0(e.dyn_dtree,J8),e.bl_desc=new A0(e.bl_tree,e4),e.bi_buf=0,e.bi_valid=0,i4(e)}function f4(e,r,a,i){Ht(e,(gN<<1)+(i?1:0),3),AN(e,r,a,!0)}function qN(e){Ht(e,W8<<1,3),ln(e,_0,Dn),jN(e)}function BN(e,r,a,i){var t,n,o=0;e.level>0?(e.strm.data_type===vN&&(e.strm.data_type=CN(e)),T0(e,e.l_desc),T0(e,e.d_desc),o=PN(e),t=e.opt_len+3+7>>>3,n=e.static_len+3+7>>>3,n<=t&&(t=n)):t=n=a+5,a+4<=t&&r!==-1?f4(e,r,a,i):e.strategy===mN||n===t?(Ht(e,(W8<<1)+(i?1:0),3),s4(e,Dn,Lc)):(Ht(e,(bN<<1)+(i?1:0),3),TN(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),s4(e,e.dyn_ltree,e.dyn_dtree)),i4(e),i&&n4(e)}function IN(e,r,a){return e.pending_buf[e.d_buf+e.last_lit*2]=r>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=r&255,e.pending_buf[e.l_buf+e.last_lit]=a&255,e.last_lit++,r===0?e.dyn_ltree[a*2]++:(e.matches++,r--,e.dyn_ltree[(Nc[a]+zc+1)*2]++,e.dyn_dtree[r4(r)*2]++),e.last_lit===e.lit_bufsize-1}pu._tr_init=FN;pu._tr_stored_block=f4;pu._tr_flush_block=BN;pu._tr_tally=IN;pu._tr_align=qN});var C0=O((wZ,h4)=>{"use strict";function RN(e,r,a,i){for(var t=e&65535|0,n=e>>>16&65535|0,o=0;a!==0;){o=a>2e3?2e3:a,a-=o;do t=t+r[i++]|0,n=n+t|0;while(--o);t%=65521,n%=65521}return t|n<<16|0}h4.exports=RN});var F0=O((kZ,d4)=>{"use strict";function ON(){for(var e,r=[],a=0;a<256;a++){e=a;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;r[a]=e}return r}var zN=ON();function DN(e,r,a,i){var t=zN,n=i+a;e^=-1;for(var o=i;o<n;o++)e=e>>>8^t[(e^r[o])&255];return e^-1}d4.exports=DN});var yp=O((_Z,m4)=>{"use strict";m4.exports={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"}});var j4=O(hn=>{"use strict";var It=zn(),fi=p4(),v4=C0(),ko=F0(),LN=yp(),rs=0,UN=1,NN=3,_o=4,g4=5,fn=0,b4=1,pi=-2,MN=-3,q0=-5,HN=-1,VN=1,xp=2,$N=3,WN=4,KN=0,GN=2,wp=8,YN=9,ZN=15,QN=8,XN=29,JN=256,B0=JN+1+XN,eM=30,rM=19,aM=2*B0+1,tM=15,Nr=3,jo=258,Ri=jo+Nr+1,iM=32,kp=42,I0=69,_p=73,jp=91,Sp=103,as=113,Hc=666,Ja=1,Vc=2,ts=3,hu=4,nM=3;function So(e,r){return e.msg=LN[r],r}function y4(e){return(e<<1)-(e>4?9:0)}function Eo(e){for(var r=e.length;--r>=0;)e[r]=0}function Ao(e){var r=e.state,a=r.pending;a>e.avail_out&&(a=e.avail_out),a!==0&&(It.arraySet(e.output,r.pending_buf,r.pending_out,a,e.next_out),e.next_out+=a,r.pending_out+=a,e.total_out+=a,e.avail_out-=a,r.pending-=a,r.pending===0&&(r.pending_out=0))}function mt(e,r){fi._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,Ao(e.strm)}function Kr(e,r){e.pending_buf[e.pending++]=r}function $c(e,r){e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255}function oM(e,r,a,i){var t=e.avail_in;return t>i&&(t=i),t===0?0:(e.avail_in-=t,It.arraySet(r,e.input,e.next_in,t,a),e.state.wrap===1?e.adler=v4(e.adler,r,t,a):e.state.wrap===2&&(e.adler=ko(e.adler,r,t,a)),e.next_in+=t,e.total_in+=t,t)}function x4(e,r){var a=e.max_chain_length,i=e.strstart,t,n,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-Ri?e.strstart-(e.w_size-Ri):0,l=e.window,f=e.w_mask,v=e.prev,h=e.strstart+jo,d=l[i+o-1],y=l[i+o];e.prev_length>=e.good_match&&(a>>=2),s>e.lookahead&&(s=e.lookahead);do if(t=r,!(l[t+o]!==y||l[t+o-1]!==d||l[t]!==l[i]||l[++t]!==l[i+1])){i+=2,t++;do;while(l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&i<h);if(n=jo-(h-i),i=h-jo,n>o){if(e.match_start=r,o=n,n>=s)break;d=l[i+o-1],y=l[i+o]}}while((r=v[r&f])>c&&--a!=0);return o<=e.lookahead?o:e.lookahead}function is(e){var r=e.w_size,a,i,t,n,o;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-Ri)){It.arraySet(e.window,e.window,r,r,0),e.match_start-=r,e.strstart-=r,e.block_start-=r,i=e.hash_size,a=i;do t=e.head[--a],e.head[a]=t>=r?t-r:0;while(--i);i=r,a=i;do t=e.prev[--a],e.prev[a]=t>=r?t-r:0;while(--i);n+=r}if(e.strm.avail_in===0)break;if(i=oM(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=i,e.lookahead+e.insert>=Nr)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+Nr-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<Nr)););}while(e.lookahead<Ri&&e.strm.avail_in!==0)}function sM(e,r){var a=65535;for(a>e.pending_buf_size-5&&(a=e.pending_buf_size-5);;){if(e.lookahead<=1){if(is(e),e.lookahead===0&&r===rs)return Ja;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+a;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,mt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Ri&&(mt(e,!1),e.strm.avail_out===0))return Ja}return e.insert=0,r===_o?(mt(e,!0),e.strm.avail_out===0?ts:hu):(e.strstart>e.block_start&&(mt(e,!1),e.strm.avail_out===0),Ja)}function R0(e,r){for(var a,i;;){if(e.lookahead<Ri){if(is(e),e.lookahead<Ri&&r===rs)return Ja;if(e.lookahead===0)break}if(a=0,e.lookahead>=Nr&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Nr-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),a!==0&&e.strstart-a<=e.w_size-Ri&&(e.match_length=x4(e,a)),e.match_length>=Nr)if(i=fi._tr_tally(e,e.strstart-e.match_start,e.match_length-Nr),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Nr){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Nr-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!=0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=fi._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(mt(e,!1),e.strm.avail_out===0))return Ja}return e.insert=e.strstart<Nr-1?e.strstart:Nr-1,r===_o?(mt(e,!0),e.strm.avail_out===0?ts:hu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:Vc}function du(e,r){for(var a,i,t;;){if(e.lookahead<Ri){if(is(e),e.lookahead<Ri&&r===rs)return Ja;if(e.lookahead===0)break}if(a=0,e.lookahead>=Nr&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Nr-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Nr-1,a!==0&&e.prev_length<e.max_lazy_match&&e.strstart-a<=e.w_size-Ri&&(e.match_length=x4(e,a),e.match_length<=5&&(e.strategy===VN||e.match_length===Nr&&e.strstart-e.match_start>4096)&&(e.match_length=Nr-1)),e.prev_length>=Nr&&e.match_length<=e.prev_length){t=e.strstart+e.lookahead-Nr,i=fi._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-Nr),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=t&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Nr-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!=0);if(e.match_available=0,e.match_length=Nr-1,e.strstart++,i&&(mt(e,!1),e.strm.avail_out===0))return Ja}else if(e.match_available){if(i=fi._tr_tally(e,0,e.window[e.strstart-1]),i&&mt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ja}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=fi._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Nr-1?e.strstart:Nr-1,r===_o?(mt(e,!0),e.strm.avail_out===0?ts:hu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:Vc}function uM(e,r){for(var a,i,t,n,o=e.window;;){if(e.lookahead<=jo){if(is(e),e.lookahead<=jo&&r===rs)return Ja;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Nr&&e.strstart>0&&(t=e.strstart-1,i=o[t],i===o[++t]&&i===o[++t]&&i===o[++t])){n=e.strstart+jo;do;while(i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&t<n);e.match_length=jo-(n-t),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Nr?(a=fi._tr_tally(e,1,e.match_length-Nr),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(a=fi._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),a&&(mt(e,!1),e.strm.avail_out===0))return Ja}return e.insert=0,r===_o?(mt(e,!0),e.strm.avail_out===0?ts:hu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:Vc}function cM(e,r){for(var a;;){if(e.lookahead===0&&(is(e),e.lookahead===0)){if(r===rs)return Ja;break}if(e.match_length=0,a=fi._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,a&&(mt(e,!1),e.strm.avail_out===0))return Ja}return e.insert=0,r===_o?(mt(e,!0),e.strm.avail_out===0?ts:hu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:Vc}function pn(e,r,a,i,t){this.good_length=e,this.max_lazy=r,this.nice_length=a,this.max_chain=i,this.func=t}var mu;mu=[new pn(0,0,0,0,sM),new pn(4,4,8,4,R0),new pn(4,5,16,8,R0),new pn(4,6,32,32,R0),new pn(4,4,16,16,du),new pn(8,16,32,32,du),new pn(8,16,128,128,du),new pn(8,32,128,256,du),new pn(32,128,258,1024,du),new pn(32,258,258,4096,du)];function lM(e){e.window_size=2*e.w_size,Eo(e.head),e.max_lazy_match=mu[e.level].max_lazy,e.good_match=mu[e.level].good_length,e.nice_match=mu[e.level].nice_length,e.max_chain_length=mu[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Nr-1,e.match_available=0,e.ins_h=0}function fM(){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=wp,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 It.Buf16(aM*2),this.dyn_dtree=new It.Buf16((2*eM+1)*2),this.bl_tree=new It.Buf16((2*rM+1)*2),Eo(this.dyn_ltree),Eo(this.dyn_dtree),Eo(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new It.Buf16(tM+1),this.heap=new It.Buf16(2*B0+1),Eo(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new It.Buf16(2*B0+1),Eo(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}function w4(e){var r;return!e||!e.state?So(e,pi):(e.total_in=e.total_out=0,e.data_type=GN,r=e.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?kp:as,e.adler=r.wrap===2?0:1,r.last_flush=rs,fi._tr_init(r),fn)}function k4(e){var r=w4(e);return r===fn&&lM(e.state),r}function pM(e,r){return!e||!e.state||e.state.wrap!==2?pi:(e.state.gzhead=r,fn)}function _4(e,r,a,i,t,n){if(!e)return pi;var o=1;if(r===HN&&(r=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),t<1||t>YN||a!==wp||i<8||i>15||r<0||r>9||n<0||n>WN)return So(e,pi);i===8&&(i=9);var s=new fM;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=t+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+Nr-1)/Nr),s.window=new It.Buf8(s.w_size*2),s.head=new It.Buf16(s.hash_size),s.prev=new It.Buf16(s.w_size),s.lit_bufsize=1<<t+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new It.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=r,s.strategy=n,s.method=a,k4(e)}function hM(e,r){return _4(e,r,wp,ZN,QN,KN)}function dM(e,r){var a,i,t,n;if(!e||!e.state||r>g4||r<0)return e?So(e,pi):pi;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===Hc&&r!==_o)return So(e,e.avail_out===0?q0:pi);if(i.strm=e,a=i.last_flush,i.last_flush=r,i.status===kp)if(i.wrap===2)e.adler=0,Kr(i,31),Kr(i,139),Kr(i,8),i.gzhead?(Kr(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),Kr(i,i.gzhead.time&255),Kr(i,i.gzhead.time>>8&255),Kr(i,i.gzhead.time>>16&255),Kr(i,i.gzhead.time>>24&255),Kr(i,i.level===9?2:i.strategy>=xp||i.level<2?4:0),Kr(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(Kr(i,i.gzhead.extra.length&255),Kr(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=ko(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=I0):(Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,i.level===9?2:i.strategy>=xp||i.level<2?4:0),Kr(i,nM),i.status=as);else{var o=wp+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=xp||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=iM),o+=31-o%31,i.status=as,$c(i,o),i.strstart!==0&&($c(i,e.adler>>>16),$c(i,e.adler&65535)),e.adler=1}if(i.status===I0)if(i.gzhead.extra){for(t=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=ko(e.adler,i.pending_buf,i.pending-t,t)),Ao(e),t=i.pending,i.pending===i.pending_buf_size));)Kr(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>t&&(e.adler=ko(e.adler,i.pending_buf,i.pending-t,t)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=_p)}else i.status=_p;if(i.status===_p)if(i.gzhead.name){t=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=ko(e.adler,i.pending_buf,i.pending-t,t)),Ao(e),t=i.pending,i.pending===i.pending_buf_size)){n=1;break}i.gzindex<i.gzhead.name.length?n=i.gzhead.name.charCodeAt(i.gzindex++)&255:n=0,Kr(i,n)}while(n!==0);i.gzhead.hcrc&&i.pending>t&&(e.adler=ko(e.adler,i.pending_buf,i.pending-t,t)),n===0&&(i.gzindex=0,i.status=jp)}else i.status=jp;if(i.status===jp)if(i.gzhead.comment){t=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=ko(e.adler,i.pending_buf,i.pending-t,t)),Ao(e),t=i.pending,i.pending===i.pending_buf_size)){n=1;break}i.gzindex<i.gzhead.comment.length?n=i.gzhead.comment.charCodeAt(i.gzindex++)&255:n=0,Kr(i,n)}while(n!==0);i.gzhead.hcrc&&i.pending>t&&(e.adler=ko(e.adler,i.pending_buf,i.pending-t,t)),n===0&&(i.status=Sp)}else i.status=Sp;if(i.status===Sp&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&Ao(e),i.pending+2<=i.pending_buf_size&&(Kr(i,e.adler&255),Kr(i,e.adler>>8&255),e.adler=0,i.status=as)):i.status=as),i.pending!==0){if(Ao(e),e.avail_out===0)return i.last_flush=-1,fn}else if(e.avail_in===0&&y4(r)<=y4(a)&&r!==_o)return So(e,q0);if(i.status===Hc&&e.avail_in!==0)return So(e,q0);if(e.avail_in!==0||i.lookahead!==0||r!==rs&&i.status!==Hc){var c=i.strategy===xp?cM(i,r):i.strategy===$N?uM(i,r):mu[i.level].func(i,r);if((c===ts||c===hu)&&(i.status=Hc),c===Ja||c===ts)return e.avail_out===0&&(i.last_flush=-1),fn;if(c===Vc&&(r===UN?fi._tr_align(i):r!==g4&&(fi._tr_stored_block(i,0,0,!1),r===NN&&(Eo(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),Ao(e),e.avail_out===0))return i.last_flush=-1,fn}return r!==_o?fn:i.wrap<=0?b4:(i.wrap===2?(Kr(i,e.adler&255),Kr(i,e.adler>>8&255),Kr(i,e.adler>>16&255),Kr(i,e.adler>>24&255),Kr(i,e.total_in&255),Kr(i,e.total_in>>8&255),Kr(i,e.total_in>>16&255),Kr(i,e.total_in>>24&255)):($c(i,e.adler>>>16),$c(i,e.adler&65535)),Ao(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?fn:b4)}function mM(e){var r;return!e||!e.state?pi:(r=e.state.status,r!==kp&&r!==I0&&r!==_p&&r!==jp&&r!==Sp&&r!==as&&r!==Hc?So(e,pi):(e.state=null,r===as?So(e,MN):fn))}function vM(e,r){var a=r.length,i,t,n,o,s,c,l,f;if(!e||!e.state||(i=e.state,o=i.wrap,o===2||o===1&&i.status!==kp||i.lookahead))return pi;for(o===1&&(e.adler=v4(e.adler,r,a,0)),i.wrap=0,a>=i.w_size&&(o===0&&(Eo(i.head),i.strstart=0,i.block_start=0,i.insert=0),f=new It.Buf8(i.w_size),It.arraySet(f,r,a-i.w_size,i.w_size,0),r=f,a=i.w_size),s=e.avail_in,c=e.next_in,l=e.input,e.avail_in=a,e.next_in=0,e.input=r,is(i);i.lookahead>=Nr;){t=i.strstart,n=i.lookahead-(Nr-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[t+Nr-1])&i.hash_mask,i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++;while(--n);i.strstart=t,i.lookahead=Nr-1,is(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=Nr-1,i.match_available=0,e.next_in=c,e.input=l,e.avail_in=s,i.wrap=o,fn}hn.deflateInit=hM;hn.deflateInit2=_4;hn.deflateReset=k4;hn.deflateResetKeep=w4;hn.deflateSetHeader=pM;hn.deflate=dM;hn.deflateEnd=mM;hn.deflateSetDictionary=vM;hn.deflateInfo="pako deflate (from Nodeca project)"});var O0=O(vu=>{"use strict";var Ep=zn(),S4=!0,E4=!0;try{String.fromCharCode.apply(null,[0])}catch{S4=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{E4=!1}var Wc=new Ep.Buf8(256);for(Ln=0;Ln<256;Ln++)Wc[Ln]=Ln>=252?6:Ln>=248?5:Ln>=240?4:Ln>=224?3:Ln>=192?2:1;var Ln;Wc[254]=Wc[254]=1;vu.string2buf=function(e){var r,a,i,t,n,o=e.length,s=0;for(t=0;t<o;t++)a=e.charCodeAt(t),(a&64512)==55296&&t+1<o&&(i=e.charCodeAt(t+1),(i&64512)==56320&&(a=65536+(a-55296<<10)+(i-56320),t++)),s+=a<128?1:a<2048?2:a<65536?3:4;for(r=new Ep.Buf8(s),n=0,t=0;n<s;t++)a=e.charCodeAt(t),(a&64512)==55296&&t+1<o&&(i=e.charCodeAt(t+1),(i&64512)==56320&&(a=65536+(a-55296<<10)+(i-56320),t++)),a<128?r[n++]=a:a<2048?(r[n++]=192|a>>>6,r[n++]=128|a&63):a<65536?(r[n++]=224|a>>>12,r[n++]=128|a>>>6&63,r[n++]=128|a&63):(r[n++]=240|a>>>18,r[n++]=128|a>>>12&63,r[n++]=128|a>>>6&63,r[n++]=128|a&63);return r};function A4(e,r){if(r<65534&&(e.subarray&&E4||!e.subarray&&S4))return String.fromCharCode.apply(null,Ep.shrinkBuf(e,r));for(var a="",i=0;i<r;i++)a+=String.fromCharCode(e[i]);return a}vu.buf2binstring=function(e){return A4(e,e.length)};vu.binstring2buf=function(e){for(var r=new Ep.Buf8(e.length),a=0,i=r.length;a<i;a++)r[a]=e.charCodeAt(a);return r};vu.buf2string=function(e,r){var a,i,t,n,o=r||e.length,s=new Array(o*2);for(i=0,a=0;a<o;){if(t=e[a++],t<128){s[i++]=t;continue}if(n=Wc[t],n>4){s[i++]=65533,a+=n-1;continue}for(t&=n===2?31:n===3?15:7;n>1&&a<o;)t=t<<6|e[a++]&63,n--;if(n>1){s[i++]=65533;continue}t<65536?s[i++]=t:(t-=65536,s[i++]=55296|t>>10&1023,s[i++]=56320|t&1023)}return A4(s,i)};vu.utf8border=function(e,r){var a;for(r=r||e.length,r>e.length&&(r=e.length),a=r-1;a>=0&&(e[a]&192)==128;)a--;return a<0||a===0?r:a+Wc[e[a]]>r?a:r}});var z0=O((EZ,P4)=>{"use strict";function gM(){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}P4.exports=gM});var q4=O(Yc=>{"use strict";var Kc=j4(),Gc=zn(),D0=O0(),L0=yp(),bM=z0(),T4=Object.prototype.toString,yM=0,U0=4,gu=0,C4=1,F4=2,xM=-1,wM=0,kM=8;function ns(e){if(!(this instanceof ns))return new ns(e);this.options=Gc.assign({level:xM,method:kM,chunkSize:16384,windowBits:15,memLevel:8,strategy:wM,to:""},e||{});var r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bM,this.strm.avail_out=0;var a=Kc.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(a!==gu)throw new Error(L0[a]);if(r.header&&Kc.deflateSetHeader(this.strm,r.header),r.dictionary){var i;if(typeof r.dictionary=="string"?i=D0.string2buf(r.dictionary):T4.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,a=Kc.deflateSetDictionary(this.strm,i),a!==gu)throw new Error(L0[a]);this._dict_set=!0}}ns.prototype.push=function(e,r){var a=this.strm,i=this.options.chunkSize,t,n;if(this.ended)return!1;n=r===~~r?r:r===!0?U0:yM,typeof e=="string"?a.input=D0.string2buf(e):T4.call(e)==="[object ArrayBuffer]"?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(a.avail_out===0&&(a.output=new Gc.Buf8(i),a.next_out=0,a.avail_out=i),t=Kc.deflate(a,n),t!==C4&&t!==gu)return this.onEnd(t),this.ended=!0,!1;(a.avail_out===0||a.avail_in===0&&(n===U0||n===F4))&&(this.options.to==="string"?this.onData(D0.buf2binstring(Gc.shrinkBuf(a.output,a.next_out))):this.onData(Gc.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||a.avail_out===0)&&t!==C4);return n===U0?(t=Kc.deflateEnd(this.strm),this.onEnd(t),this.ended=!0,t===gu):(n===F4&&(this.onEnd(gu),a.avail_out=0),!0)};ns.prototype.onData=function(e){this.chunks.push(e)};ns.prototype.onEnd=function(e){e===gu&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Gc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function N0(e,r){var a=new ns(r);if(a.push(e,!0),a.err)throw a.msg||L0[a.err];return a.result}function _M(e,r){return r=r||{},r.raw=!0,N0(e,r)}function jM(e,r){return r=r||{},r.gzip=!0,N0(e,r)}Yc.Deflate=ns;Yc.deflate=N0;Yc.deflateRaw=_M;Yc.gzip=jM});var I4=O((PZ,B4)=>{"use strict";var Ap=30,SM=12;B4.exports=function(r,a){var i,t,n,o,s,c,l,f,v,h,d,y,j,w,A,P,T,I,F,R,z,U,M,K,V;i=r.state,t=r.next_in,K=r.input,n=t+(r.avail_in-5),o=r.next_out,V=r.output,s=o-(a-r.avail_out),c=o+(r.avail_out-257),l=i.dmax,f=i.wsize,v=i.whave,h=i.wnext,d=i.window,y=i.hold,j=i.bits,w=i.lencode,A=i.distcode,P=(1<<i.lenbits)-1,T=(1<<i.distbits)-1;e:do{j<15&&(y+=K[t++]<<j,j+=8,y+=K[t++]<<j,j+=8),I=w[y&P];r:for(;;){if(F=I>>>24,y>>>=F,j-=F,F=I>>>16&255,F===0)V[o++]=I&65535;else if(F&16){R=I&65535,F&=15,F&&(j<F&&(y+=K[t++]<<j,j+=8),R+=y&(1<<F)-1,y>>>=F,j-=F),j<15&&(y+=K[t++]<<j,j+=8,y+=K[t++]<<j,j+=8),I=A[y&T];a:for(;;){if(F=I>>>24,y>>>=F,j-=F,F=I>>>16&255,F&16){if(z=I&65535,F&=15,j<F&&(y+=K[t++]<<j,j+=8,j<F&&(y+=K[t++]<<j,j+=8)),z+=y&(1<<F)-1,z>l){r.msg="invalid distance too far back",i.mode=Ap;break e}if(y>>>=F,j-=F,F=o-s,z>F){if(F=z-F,F>v&&i.sane){r.msg="invalid distance too far back",i.mode=Ap;break e}if(U=0,M=d,h===0){if(U+=f-F,F<R){R-=F;do V[o++]=d[U++];while(--F);U=o-z,M=V}}else if(h<F){if(U+=f+h-F,F-=h,F<R){R-=F;do V[o++]=d[U++];while(--F);if(U=0,h<R){F=h,R-=F;do V[o++]=d[U++];while(--F);U=o-z,M=V}}}else if(U+=h-F,F<R){R-=F;do V[o++]=d[U++];while(--F);U=o-z,M=V}for(;R>2;)V[o++]=M[U++],V[o++]=M[U++],V[o++]=M[U++],R-=3;R&&(V[o++]=M[U++],R>1&&(V[o++]=M[U++]))}else{U=o-z;do V[o++]=V[U++],V[o++]=V[U++],V[o++]=V[U++],R-=3;while(R>2);R&&(V[o++]=V[U++],R>1&&(V[o++]=V[U++]))}}else if((F&64)==0){I=A[(I&65535)+(y&(1<<F)-1)];continue a}else{r.msg="invalid distance code",i.mode=Ap;break e}break}}else if((F&64)==0){I=w[(I&65535)+(y&(1<<F)-1)];continue r}else if(F&32){i.mode=SM;break e}else{r.msg="invalid literal/length code",i.mode=Ap;break e}break}}while(t<n&&o<c);R=j>>3,t-=R,j-=R<<3,y&=(1<<j)-1,r.next_in=t,r.next_out=o,r.avail_in=t<n?5+(n-t):5-(t-n),r.avail_out=o<c?257+(c-o):257-(o-c),i.hold=y,i.bits=j}});var N4=O((TZ,U4)=>{"use strict";var R4=zn(),bu=15,O4=852,z4=592,D4=0,M0=1,L4=2,EM=[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],AM=[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],PM=[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],TM=[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];U4.exports=function(r,a,i,t,n,o,s,c){var l=c.bits,f=0,v=0,h=0,d=0,y=0,j=0,w=0,A=0,P=0,T=0,I,F,R,z,U,M=null,K=0,V,Z=new R4.Buf16(bu+1),$=new R4.Buf16(bu+1),Q=null,re=0,je,me,ce;for(f=0;f<=bu;f++)Z[f]=0;for(v=0;v<t;v++)Z[a[i+v]]++;for(y=l,d=bu;d>=1&&Z[d]===0;d--);if(y>d&&(y=d),d===0)return n[o++]=1<<24|64<<16|0,n[o++]=1<<24|64<<16|0,c.bits=1,0;for(h=1;h<d&&Z[h]===0;h++);for(y<h&&(y=h),A=1,f=1;f<=bu;f++)if(A<<=1,A-=Z[f],A<0)return-1;if(A>0&&(r===D4||d!==1))return-1;for($[1]=0,f=1;f<bu;f++)$[f+1]=$[f]+Z[f];for(v=0;v<t;v++)a[i+v]!==0&&(s[$[a[i+v]]++]=v);if(r===D4?(M=Q=s,V=19):r===M0?(M=EM,K-=257,Q=AM,re-=257,V=256):(M=PM,Q=TM,V=-1),T=0,v=0,f=h,U=o,j=y,w=0,R=-1,P=1<<y,z=P-1,r===M0&&P>O4||r===L4&&P>z4)return 1;for(;;){je=f-w,s[v]<V?(me=0,ce=s[v]):s[v]>V?(me=Q[re+s[v]],ce=M[K+s[v]]):(me=32+64,ce=0),I=1<<f-w,F=1<<j,h=F;do F-=I,n[U+(T>>w)+F]=je<<24|me<<16|ce|0;while(F!==0);for(I=1<<f-1;T&I;)I>>=1;if(I!==0?(T&=I-1,T+=I):T=0,v++,--Z[f]==0){if(f===d)break;f=a[i+s[v]]}if(f>y&&(T&z)!==R){for(w===0&&(w=y),U+=h,j=f-w,A=1<<j;j+w<d&&(A-=Z[j+w],!(A<=0));)j++,A<<=1;if(P+=1<<j,r===M0&&P>O4||r===L4&&P>z4)return 1;R=T&z,n[R]=y<<24|j<<16|U-o|0}}return T!==0&&(n[U+T]=f-w<<24|64<<16|0),c.bits=y,0}});var kS=O(Oi=>{"use strict";var Xt=zn(),H0=C0(),dn=F0(),CM=I4(),Zc=N4(),FM=0,M4=1,H4=2,V4=4,qM=5,Pp=6,os=0,BM=1,IM=2,hi=-2,$4=-3,V0=-4,RM=-5,W4=8,K4=1,G4=2,Y4=3,Z4=4,Q4=5,X4=6,J4=7,eS=8,rS=9,aS=10,Tp=11,Un=12,$0=13,tS=14,W0=15,iS=16,nS=17,oS=18,sS=19,Cp=20,Fp=21,uS=22,cS=23,lS=24,fS=25,pS=26,K0=27,hS=28,dS=29,ma=30,G0=31,OM=32,zM=852,DM=592,LM=15,UM=LM;function mS(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function NM(){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 Xt.Buf16(320),this.work=new Xt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function vS(e){var r;return!e||!e.state?hi:(r=e.state,e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=K4,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Xt.Buf32(zM),r.distcode=r.distdyn=new Xt.Buf32(DM),r.sane=1,r.back=-1,os)}function gS(e){var r;return!e||!e.state?hi:(r=e.state,r.wsize=0,r.whave=0,r.wnext=0,vS(e))}function bS(e,r){var a,i;return!e||!e.state||(i=e.state,r<0?(a=0,r=-r):(a=(r>>4)+1,r<48&&(r&=15)),r&&(r<8||r>15))?hi:(i.window!==null&&i.wbits!==r&&(i.window=null),i.wrap=a,i.wbits=r,gS(e))}function yS(e,r){var a,i;return e?(i=new NM,e.state=i,i.window=null,a=bS(e,r),a!==os&&(e.state=null),a):hi}function MM(e){return yS(e,UM)}var xS=!0,Y0,Z0;function HM(e){if(xS){var r;for(Y0=new Xt.Buf32(512),Z0=new Xt.Buf32(32),r=0;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(Zc(M4,e.lens,0,288,Y0,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;Zc(H4,e.lens,0,32,Z0,0,e.work,{bits:5}),xS=!1}e.lencode=Y0,e.lenbits=9,e.distcode=Z0,e.distbits=5}function wS(e,r,a,i){var t,n=e.state;return n.window===null&&(n.wsize=1<<n.wbits,n.wnext=0,n.whave=0,n.window=new Xt.Buf8(n.wsize)),i>=n.wsize?(Xt.arraySet(n.window,r,a-n.wsize,n.wsize,0),n.wnext=0,n.whave=n.wsize):(t=n.wsize-n.wnext,t>i&&(t=i),Xt.arraySet(n.window,r,a-i,t,n.wnext),i-=t,i?(Xt.arraySet(n.window,r,a-i,i,0),n.wnext=i,n.whave=n.wsize):(n.wnext+=t,n.wnext===n.wsize&&(n.wnext=0),n.whave<n.wsize&&(n.whave+=t))),0}function VM(e,r){var a,i,t,n,o,s,c,l,f,v,h,d,y,j,w=0,A,P,T,I,F,R,z,U,M=new Xt.Buf8(4),K,V,Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return hi;a=e.state,a.mode===Un&&(a.mode=$0),o=e.next_out,t=e.output,c=e.avail_out,n=e.next_in,i=e.input,s=e.avail_in,l=a.hold,f=a.bits,v=s,h=c,U=os;e:for(;;)switch(a.mode){case K4:if(a.wrap===0){a.mode=$0;break}for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(a.wrap&2&&l===35615){a.check=0,M[0]=l&255,M[1]=l>>>8&255,a.check=dn(a.check,M,2,0),l=0,f=0,a.mode=G4;break}if(a.flags=0,a.head&&(a.head.done=!1),!(a.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",a.mode=ma;break}if((l&15)!==W4){e.msg="unknown compression method",a.mode=ma;break}if(l>>>=4,f-=4,z=(l&15)+8,a.wbits===0)a.wbits=z;else if(z>a.wbits){e.msg="invalid window size",a.mode=ma;break}a.dmax=1<<z,e.adler=a.check=1,a.mode=l&512?aS:Un,l=0,f=0;break;case G4:for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(a.flags=l,(a.flags&255)!==W4){e.msg="unknown compression method",a.mode=ma;break}if(a.flags&57344){e.msg="unknown header flags set",a.mode=ma;break}a.head&&(a.head.text=l>>8&1),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,a.check=dn(a.check,M,2,0)),l=0,f=0,a.mode=Y4;case Y4:for(;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.head&&(a.head.time=l),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,a.check=dn(a.check,M,4,0)),l=0,f=0,a.mode=Z4;case Z4:for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.head&&(a.head.xflags=l&255,a.head.os=l>>8),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,a.check=dn(a.check,M,2,0)),l=0,f=0,a.mode=Q4;case Q4:if(a.flags&1024){for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.length=l,a.head&&(a.head.extra_len=l),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,a.check=dn(a.check,M,2,0)),l=0,f=0}else a.head&&(a.head.extra=null);a.mode=X4;case X4:if(a.flags&1024&&(d=a.length,d>s&&(d=s),d&&(a.head&&(z=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),Xt.arraySet(a.head.extra,i,n,d,z)),a.flags&512&&(a.check=dn(a.check,i,d,n)),s-=d,n+=d,a.length-=d),a.length))break e;a.length=0,a.mode=J4;case J4:if(a.flags&2048){if(s===0)break e;d=0;do z=i[n+d++],a.head&&z&&a.length<65536&&(a.head.name+=String.fromCharCode(z));while(z&&d<s);if(a.flags&512&&(a.check=dn(a.check,i,d,n)),s-=d,n+=d,z)break e}else a.head&&(a.head.name=null);a.length=0,a.mode=eS;case eS:if(a.flags&4096){if(s===0)break e;d=0;do z=i[n+d++],a.head&&z&&a.length<65536&&(a.head.comment+=String.fromCharCode(z));while(z&&d<s);if(a.flags&512&&(a.check=dn(a.check,i,d,n)),s-=d,n+=d,z)break e}else a.head&&(a.head.comment=null);a.mode=rS;case rS:if(a.flags&512){for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(l!==(a.check&65535)){e.msg="header crc mismatch",a.mode=ma;break}l=0,f=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),e.adler=a.check=0,a.mode=Un;break;case aS:for(;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}e.adler=a.check=mS(l),l=0,f=0,a.mode=Tp;case Tp:if(a.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=n,e.avail_in=s,a.hold=l,a.bits=f,IM;e.adler=a.check=1,a.mode=Un;case Un:if(r===qM||r===Pp)break e;case $0:if(a.last){l>>>=f&7,f-=f&7,a.mode=K0;break}for(;f<3;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}switch(a.last=l&1,l>>>=1,f-=1,l&3){case 0:a.mode=tS;break;case 1:if(HM(a),a.mode=Cp,r===Pp){l>>>=2,f-=2;break e}break;case 2:a.mode=nS;break;case 3:e.msg="invalid block type",a.mode=ma}l>>>=2,f-=2;break;case tS:for(l>>>=f&7,f-=f&7;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if((l&65535)!=(l>>>16^65535)){e.msg="invalid stored block lengths",a.mode=ma;break}if(a.length=l&65535,l=0,f=0,a.mode=W0,r===Pp)break e;case W0:a.mode=iS;case iS:if(d=a.length,d){if(d>s&&(d=s),d>c&&(d=c),d===0)break e;Xt.arraySet(t,i,n,d,o),s-=d,n+=d,c-=d,o+=d,a.length-=d;break}a.mode=Un;break;case nS:for(;f<14;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(a.nlen=(l&31)+257,l>>>=5,f-=5,a.ndist=(l&31)+1,l>>>=5,f-=5,a.ncode=(l&15)+4,l>>>=4,f-=4,a.nlen>286||a.ndist>30){e.msg="too many length or distance symbols",a.mode=ma;break}a.have=0,a.mode=oS;case oS:for(;a.have<a.ncode;){for(;f<3;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.lens[Z[a.have++]]=l&7,l>>>=3,f-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,K={bits:a.lenbits},U=Zc(FM,a.lens,0,19,a.lencode,0,a.work,K),a.lenbits=K.bits,U){e.msg="invalid code lengths set",a.mode=ma;break}a.have=0,a.mode=sS;case sS:for(;a.have<a.nlen+a.ndist;){for(;w=a.lencode[l&(1<<a.lenbits)-1],A=w>>>24,P=w>>>16&255,T=w&65535,!(A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(T<16)l>>>=A,f-=A,a.lens[a.have++]=T;else{if(T===16){for(V=A+2;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(l>>>=A,f-=A,a.have===0){e.msg="invalid bit length repeat",a.mode=ma;break}z=a.lens[a.have-1],d=3+(l&3),l>>>=2,f-=2}else if(T===17){for(V=A+3;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=A,f-=A,z=0,d=3+(l&7),l>>>=3,f-=3}else{for(V=A+7;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=A,f-=A,z=0,d=11+(l&127),l>>>=7,f-=7}if(a.have+d>a.nlen+a.ndist){e.msg="invalid bit length repeat",a.mode=ma;break}for(;d--;)a.lens[a.have++]=z}}if(a.mode===ma)break;if(a.lens[256]===0){e.msg="invalid code -- missing end-of-block",a.mode=ma;break}if(a.lenbits=9,K={bits:a.lenbits},U=Zc(M4,a.lens,0,a.nlen,a.lencode,0,a.work,K),a.lenbits=K.bits,U){e.msg="invalid literal/lengths set",a.mode=ma;break}if(a.distbits=6,a.distcode=a.distdyn,K={bits:a.distbits},U=Zc(H4,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,K),a.distbits=K.bits,U){e.msg="invalid distances set",a.mode=ma;break}if(a.mode=Cp,r===Pp)break e;case Cp:a.mode=Fp;case Fp:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=n,e.avail_in=s,a.hold=l,a.bits=f,CM(e,h),o=e.next_out,t=e.output,c=e.avail_out,n=e.next_in,i=e.input,s=e.avail_in,l=a.hold,f=a.bits,a.mode===Un&&(a.back=-1);break}for(a.back=0;w=a.lencode[l&(1<<a.lenbits)-1],A=w>>>24,P=w>>>16&255,T=w&65535,!(A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(P&&(P&240)==0){for(I=A,F=P,R=T;w=a.lencode[R+((l&(1<<I+F)-1)>>I)],A=w>>>24,P=w>>>16&255,T=w&65535,!(I+A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=I,f-=I,a.back+=I}if(l>>>=A,f-=A,a.back+=A,a.length=T,P===0){a.mode=pS;break}if(P&32){a.back=-1,a.mode=Un;break}if(P&64){e.msg="invalid literal/length code",a.mode=ma;break}a.extra=P&15,a.mode=uS;case uS:if(a.extra){for(V=a.extra;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.length+=l&(1<<a.extra)-1,l>>>=a.extra,f-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=cS;case cS:for(;w=a.distcode[l&(1<<a.distbits)-1],A=w>>>24,P=w>>>16&255,T=w&65535,!(A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if((P&240)==0){for(I=A,F=P,R=T;w=a.distcode[R+((l&(1<<I+F)-1)>>I)],A=w>>>24,P=w>>>16&255,T=w&65535,!(I+A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=I,f-=I,a.back+=I}if(l>>>=A,f-=A,a.back+=A,P&64){e.msg="invalid distance code",a.mode=ma;break}a.offset=T,a.extra=P&15,a.mode=lS;case lS:if(a.extra){for(V=a.extra;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.offset+=l&(1<<a.extra)-1,l>>>=a.extra,f-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){e.msg="invalid distance too far back",a.mode=ma;break}a.mode=fS;case fS:if(c===0)break e;if(d=h-c,a.offset>d){if(d=a.offset-d,d>a.whave&&a.sane){e.msg="invalid distance too far back",a.mode=ma;break}d>a.wnext?(d-=a.wnext,y=a.wsize-d):y=a.wnext-d,d>a.length&&(d=a.length),j=a.window}else j=t,y=o-a.offset,d=a.length;d>c&&(d=c),c-=d,a.length-=d;do t[o++]=j[y++];while(--d);a.length===0&&(a.mode=Fp);break;case pS:if(c===0)break e;t[o++]=a.length,c--,a.mode=Fp;break;case K0:if(a.wrap){for(;f<32;){if(s===0)break e;s--,l|=i[n++]<<f,f+=8}if(h-=c,e.total_out+=h,a.total+=h,h&&(e.adler=a.check=a.flags?dn(a.check,t,h,o-h):H0(a.check,t,h,o-h)),h=c,(a.flags?l:mS(l))!==a.check){e.msg="incorrect data check",a.mode=ma;break}l=0,f=0}a.mode=hS;case hS:if(a.wrap&&a.flags){for(;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(l!==(a.total&4294967295)){e.msg="incorrect length check",a.mode=ma;break}l=0,f=0}a.mode=dS;case dS:U=BM;break e;case ma:U=$4;break e;case G0:return V0;case OM:default:return hi}return e.next_out=o,e.avail_out=c,e.next_in=n,e.avail_in=s,a.hold=l,a.bits=f,(a.wsize||h!==e.avail_out&&a.mode<ma&&(a.mode<K0||r!==V4))&&wS(e,e.output,e.next_out,h-e.avail_out)?(a.mode=G0,V0):(v-=e.avail_in,h-=e.avail_out,e.total_in+=v,e.total_out+=h,a.total+=h,a.wrap&&h&&(e.adler=a.check=a.flags?dn(a.check,t,h,e.next_out-h):H0(a.check,t,h,e.next_out-h)),e.data_type=a.bits+(a.last?64:0)+(a.mode===Un?128:0)+(a.mode===Cp||a.mode===W0?256:0),(v===0&&h===0||r===V4)&&U===os&&(U=RM),U)}function $M(e){if(!e||!e.state)return hi;var r=e.state;return r.window&&(r.window=null),e.state=null,os}function WM(e,r){var a;return!e||!e.state||(a=e.state,(a.wrap&2)==0)?hi:(a.head=r,r.done=!1,os)}function KM(e,r){var a=r.length,i,t,n;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==Tp)?hi:i.mode===Tp&&(t=1,t=H0(t,r,a,0),t!==i.check)?$4:(n=wS(e,r,a,a),n?(i.mode=G0,V0):(i.havedict=1,os))}Oi.inflateReset=gS;Oi.inflateReset2=bS;Oi.inflateResetKeep=vS;Oi.inflateInit=MM;Oi.inflateInit2=yS;Oi.inflate=VM;Oi.inflateEnd=$M;Oi.inflateGetHeader=WM;Oi.inflateSetDictionary=KM;Oi.inflateInfo="pako inflate (from Nodeca project)"});var Q0=O((FZ,_S)=>{"use strict";_S.exports={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}});var SS=O((qZ,jS)=>{"use strict";function GM(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}jS.exports=GM});var AS=O(Xc=>{"use strict";var yu=kS(),Qc=zn(),qp=O0(),Ba=Q0(),X0=yp(),YM=z0(),ZM=SS(),ES=Object.prototype.toString;function ss(e){if(!(this instanceof ss))return new ss(e);this.options=Qc.assign({chunkSize:16384,windowBits:0,to:""},e||{});var r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15)==0&&(r.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new YM,this.strm.avail_out=0;var a=yu.inflateInit2(this.strm,r.windowBits);if(a!==Ba.Z_OK)throw new Error(X0[a]);if(this.header=new ZM,yu.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=qp.string2buf(r.dictionary):ES.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(a=yu.inflateSetDictionary(this.strm,r.dictionary),a!==Ba.Z_OK)))throw new Error(X0[a])}ss.prototype.push=function(e,r){var a=this.strm,i=this.options.chunkSize,t=this.options.dictionary,n,o,s,c,l,f=!1;if(this.ended)return!1;o=r===~~r?r:r===!0?Ba.Z_FINISH:Ba.Z_NO_FLUSH,typeof e=="string"?a.input=qp.binstring2buf(e):ES.call(e)==="[object ArrayBuffer]"?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(a.avail_out===0&&(a.output=new Qc.Buf8(i),a.next_out=0,a.avail_out=i),n=yu.inflate(a,Ba.Z_NO_FLUSH),n===Ba.Z_NEED_DICT&&t&&(n=yu.inflateSetDictionary(this.strm,t)),n===Ba.Z_BUF_ERROR&&f===!0&&(n=Ba.Z_OK,f=!1),n!==Ba.Z_STREAM_END&&n!==Ba.Z_OK)return this.onEnd(n),this.ended=!0,!1;a.next_out&&(a.avail_out===0||n===Ba.Z_STREAM_END||a.avail_in===0&&(o===Ba.Z_FINISH||o===Ba.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=qp.utf8border(a.output,a.next_out),c=a.next_out-s,l=qp.buf2string(a.output,s),a.next_out=c,a.avail_out=i-c,c&&Qc.arraySet(a.output,a.output,s,c,0),this.onData(l)):this.onData(Qc.shrinkBuf(a.output,a.next_out))),a.avail_in===0&&a.avail_out===0&&(f=!0)}while((a.avail_in>0||a.avail_out===0)&&n!==Ba.Z_STREAM_END);return n===Ba.Z_STREAM_END&&(o=Ba.Z_FINISH),o===Ba.Z_FINISH?(n=yu.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Ba.Z_OK):(o===Ba.Z_SYNC_FLUSH&&(this.onEnd(Ba.Z_OK),a.avail_out=0),!0)};ss.prototype.onData=function(e){this.chunks.push(e)};ss.prototype.onEnd=function(e){e===Ba.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Qc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function J0(e,r){var a=new ss(r);if(a.push(e,!0),a.err)throw a.msg||X0[a.err];return a.result}function QM(e,r){return r=r||{},r.raw=!0,J0(e,r)}Xc.Inflate=ss;Xc.inflate=J0;Xc.inflateRaw=QM;Xc.ungzip=J0});var CS=O((IZ,TS)=>{"use strict";var XM=zn().assign,JM=q4(),eH=AS(),rH=Q0(),PS={};XM(PS,JM,eH,rH);TS.exports=PS});Yp(exports);var Ui=typeof process!="object"||String(process)!=="[object process]"||process.browser,Zp={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global},za=Zp.global||Zp.self||Zp.window;var Lg={ibm866:[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9561,9560,9554,9555,9579,9578,9496,9484,9608,9604,9612,9616,9600,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1025,1105,1028,1108,1031,1111,1038,1118,176,8729,183,8730,8470,164,9632,160],"iso-8859-2":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,728,321,164,317,346,167,168,352,350,356,377,173,381,379,176,261,731,322,180,318,347,711,184,353,351,357,378,733,382,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"iso-8859-3":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,294,728,163,164,null,292,167,168,304,350,286,308,173,null,379,176,295,178,179,180,181,293,183,184,305,351,287,309,189,null,380,192,193,194,null,196,266,264,199,200,201,202,203,204,205,206,207,null,209,210,211,212,288,214,215,284,217,218,219,220,364,348,223,224,225,226,null,228,267,265,231,232,233,234,235,236,237,238,239,null,241,242,243,244,289,246,247,285,249,250,251,252,365,349,729],"iso-8859-4":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,312,342,164,296,315,167,168,352,274,290,358,173,381,175,176,261,731,343,180,297,316,711,184,353,275,291,359,330,382,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,298,272,325,332,310,212,213,214,215,216,370,218,219,220,360,362,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,299,273,326,333,311,244,245,246,247,248,371,250,251,252,361,363,729],"iso-8859-5":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,173,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8470,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,167,1118,1119],"iso-8859-6":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,null,null,164,null,null,null,null,null,null,null,1548,173,null,null,null,null,null,null,null,null,null,null,null,null,null,1563,null,null,null,1567,null,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,null,null,null,null,null,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,null,null,null,null,null,null,null,null,null,null,null,null,null],"iso-8859-7":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8216,8217,163,8364,8367,166,167,168,169,890,171,172,173,null,8213,176,177,178,179,900,901,902,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"iso-8859-8":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,162,163,164,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8215,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"iso-8859-10":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,274,290,298,296,310,167,315,272,352,358,381,173,362,330,176,261,275,291,299,297,311,183,316,273,353,359,382,8213,363,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,207,208,325,332,211,212,213,214,360,216,370,218,219,220,221,222,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,239,240,326,333,243,244,245,246,361,248,371,250,251,252,253,254,312],"iso-8859-13":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8221,162,163,164,8222,166,167,216,169,342,171,172,173,174,198,176,177,178,179,8220,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,8217],"iso-8859-14":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,7682,7683,163,266,267,7690,167,7808,169,7810,7691,7922,173,174,376,7710,7711,288,289,7744,7745,182,7766,7809,7767,7811,7776,7923,7812,7813,7777,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,372,209,210,211,212,213,214,7786,216,217,218,219,220,221,374,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,373,241,242,243,244,245,246,7787,248,249,250,251,252,253,375,255],"iso-8859-15":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,8364,165,352,167,353,169,170,171,172,173,174,175,176,177,178,179,381,181,182,183,382,185,186,187,338,339,376,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"iso-8859-16":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,261,321,8364,8222,352,167,353,169,536,171,377,173,378,379,176,177,268,322,381,8221,182,183,382,269,537,187,338,339,376,380,192,193,194,258,196,262,198,199,200,201,202,203,204,205,206,207,272,323,210,211,212,336,214,346,368,217,218,219,220,280,538,223,224,225,226,259,228,263,230,231,232,233,234,235,236,237,238,239,273,324,242,243,244,337,246,347,369,249,250,251,252,281,539,255],"koi8-r":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,1025,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],"koi8-u":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,1108,9556,1110,1111,9559,9560,9561,9562,9563,1169,1118,9566,9567,9568,9569,1025,1028,9571,1030,1031,9574,9575,9576,9577,9578,1168,1038,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],macintosh:[196,197,199,201,209,214,220,225,224,226,228,227,229,231,233,232,234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252,8224,176,162,163,167,8226,182,223,174,169,8482,180,168,8800,198,216,8734,177,8804,8805,165,181,8706,8721,8719,960,8747,170,186,937,230,248,191,161,172,8730,402,8776,8710,171,187,8230,160,192,195,213,338,339,8211,8212,8220,8221,8216,8217,247,9674,255,376,8260,8364,8249,8250,64257,64258,8225,183,8218,8222,8240,194,202,193,203,200,205,206,207,204,211,212,63743,210,218,219,217,305,710,732,175,728,729,730,184,733,731,711],"windows-874":[8364,129,130,131,132,8230,134,135,136,137,138,139,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,153,154,155,156,157,158,159,160,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,null,null,null,null,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,null,null,null,null],"windows-1250":[8364,129,8218,131,8222,8230,8224,8225,136,8240,352,8249,346,356,381,377,144,8216,8217,8220,8221,8226,8211,8212,152,8482,353,8250,347,357,382,378,160,711,728,321,164,260,166,167,168,169,350,171,172,173,174,379,176,177,731,322,180,181,182,183,184,261,351,187,317,733,318,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"windows-1251":[1026,1027,8218,1107,8222,8230,8224,8225,8364,8240,1033,8249,1034,1036,1035,1039,1106,8216,8217,8220,8221,8226,8211,8212,152,8482,1113,8250,1114,1116,1115,1119,160,1038,1118,1032,164,1168,166,167,1025,169,1028,171,172,173,174,1031,176,177,1030,1110,1169,181,182,183,1105,8470,1108,187,1112,1029,1109,1111,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103],"windows-1252":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"windows-1253":[8364,129,8218,402,8222,8230,8224,8225,136,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,157,158,159,160,901,902,163,164,165,166,167,168,169,null,171,172,173,174,8213,176,177,178,179,900,181,182,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"windows-1254":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,286,209,210,211,212,213,214,215,216,217,218,219,220,304,350,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,287,241,242,243,244,245,246,247,248,249,250,251,252,305,351,255],"windows-1255":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,156,157,158,159,160,161,162,163,8362,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,191,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1520,1521,1522,1523,1524,null,null,null,null,null,null,null,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"windows-1256":[8364,1662,8218,402,8222,8230,8224,8225,710,8240,1657,8249,338,1670,1688,1672,1711,8216,8217,8220,8221,8226,8211,8212,1705,8482,1681,8250,339,8204,8205,1722,160,1548,162,163,164,165,166,167,168,169,1726,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,1563,187,188,189,190,1567,1729,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,215,1591,1592,1593,1594,1600,1601,1602,1603,224,1604,226,1605,1606,1607,1608,231,232,233,234,235,1609,1610,238,239,1611,1612,1613,1614,244,1615,1616,247,1617,249,1618,251,252,8206,8207,1746],"windows-1257":[8364,129,8218,131,8222,8230,8224,8225,136,8240,138,8249,140,168,711,184,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,175,731,159,160,null,162,163,164,null,166,167,216,169,342,171,172,173,174,198,176,177,178,179,180,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,729],"windows-1258":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,258,196,197,198,199,200,201,202,203,768,205,206,207,272,209,777,211,212,416,214,215,216,217,218,219,220,431,771,223,224,225,226,259,228,229,230,231,232,233,234,235,769,237,238,239,273,241,803,243,244,417,246,247,248,249,250,251,252,432,8363,255],"x-mac-cyrillic":[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,8224,176,1168,163,167,8226,182,1030,174,169,8482,1026,1106,8800,1027,1107,8734,177,8804,8805,1110,181,1169,1032,1028,1108,1031,1111,1033,1113,1034,1114,1112,1029,172,8730,402,8776,8710,171,187,8230,160,1035,1115,1036,1116,1109,8211,8212,8220,8221,8216,8217,247,8222,1038,1118,1039,1119,8470,1025,1105,1103,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,8364]};global["encoding-indexes"]=Lg||{};function jr(e,r,a){return r<=e&&e<=a}function zE(e,r){return e.indexOf(r)!==-1}var yn=Math.floor;function dl(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function DE(e){for(var r=String(e),a=r.length,i=0,t=[];i<a;){var n=r.charCodeAt(i);if(n<55296||n>57343)t.push(n);else if(56320<=n&&n<=57343)t.push(65533);else if(55296<=n&&n<=56319)if(i===a-1)t.push(65533);else{var o=r.charCodeAt(i+1);if(56320<=o&&o<=57343){var s=n&1023,c=o&1023;t.push(65536+(s<<10)+c),i+=1}else t.push(65533)}i+=1}return t}function LE(e){for(var r="",a=0;a<e.length;++a){var i=e[a];i<=65535?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return r}function Jt(e){return 0<=e&&e<=127}var ei=Jt,Dr=-1;function Qp(e){this.tokens=[].slice.call(e),this.tokens.reverse()}Qp.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():Dr},prepend:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.push(r.pop());else this.tokens.push(e)},push:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.unshift(r.shift());else this.tokens.unshift(e)}};var ia=-1;function Lr(e,r){if(e)throw TypeError("Decoder error");return r||65533}function bi(e){throw TypeError("The code point "+e+" could not be encoded.")}function UE(){}UE.prototype={handler:function(e,r){}};function NE(){}NE.prototype={handler:function(e,r){}};function Xp(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(Jp,e)?Jp[e]:null}var Ug=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],Jp={};Ug.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(a){Jp[a]=r})})});var Ot={},zt={};function ms(e,r){return r&&r[e]||null}function vs(e,r){var a=r.indexOf(e);return a===-1?null:a}function At(e){if(!("encoding-indexes"in global))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return global["encoding-indexes"][e]}function ME(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,a=0,i=At("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[0]<=e)r=n[0],a=n[1];else break}return a+e-r}function HE(e){if(e===59335)return 7457;var r=0,a=0,i=At("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[1]<=e)r=n[1],a=n[0];else break}return a+e-r}function VE(e){eh=eh||At("jis0208").map(function(a,i){return jr(i,8272,8835)?null:a});var r=eh;return r.indexOf(e)}var eh;function $E(e){rh=rh||At("big5").map(function(a,i){return i<(161-129)*157?null:a});var r=rh;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):vs(e,r)}var rh,Ng="utf-8";function Io(e,r){if(!(this instanceof Io))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):Ng,r=dl(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var a=Xp(e);if(a===null||a.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!zt[a.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var i=this;return i._encoding=a,Boolean(r.fatal)&&(i._error_mode="fatal"),Boolean(r.ignoreBOM)&&(i._ignoreBOM=!0),Object.defineProperty||(this.encoding=i._encoding.name.toLowerCase(),this.fatal=i._error_mode==="fatal",this.ignoreBOM=i._ignoreBOM),i}Object.defineProperty&&(Object.defineProperty(Io.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(Io.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(Io.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));Io.prototype.decode=function(r,a){var i;typeof r=="object"&&r instanceof ArrayBuffer?i=new Uint8Array(r):typeof r=="object"&&"buffer"in r&&r.buffer instanceof ArrayBuffer?i=new Uint8Array(r.buffer,r.byteOffset,r.byteLength):i=new Uint8Array(0),a=dl(a),this._do_not_flush||(this._decoder=zt[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(a.stream);for(var t=new Qp(i),n=[],o;;){var s=t.read();if(s===Dr||(o=this._decoder.handler(t,s),o===ia))break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}if(!this._do_not_flush){do{if(o=this._decoder.handler(t,t.read()),o===ia)break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}while(!t.endOfStream());this._decoder=null}function c(l){return zE(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)&&!this._ignoreBOM&&!this._BOMseen&&(l.length>0&&l[0]===65279?(this._BOMseen=!0,l.shift()):l.length>0&&(this._BOMseen=!0)),LE(l)}return c.call(this,n)};function Cu(e,r){if(!(this instanceof Cu))throw TypeError("Called as a function. Did you forget 'new'?");r=dl(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var a=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){e=e!==void 0?String(e):Ng;var i=Xp(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Ot[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");a._encoding=i}else a._encoding=Xp("utf-8"),e!==void 0&&"console"in global&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=a._encoding.name.toLowerCase()),a}Object.defineProperty&&Object.defineProperty(Cu.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});Cu.prototype.encode=function(r,a){r=r===void 0?"":String(r),a=dl(a),this._do_not_flush||(this._encoder=Ot[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(a.stream);for(var i=new Qp(DE(r)),t=[],n;;){var o=i.read();if(o===Dr||(n=this._encoder.handler(i,o),n===ia))break;Array.isArray(n)?t.push.apply(t,n):t.push(n)}if(!this._do_not_flush){for(;n=this._encoder.handler(i,i.read()),n!==ia;)Array.isArray(n)?t.push.apply(t,n):t.push(n);this._encoder=null}return new Uint8Array(t)};function WE(e){var r=e.fatal,a=0,i=0,t=0,n=128,o=191;this.handler=function(s,c){if(c===Dr&&t!==0)return t=0,Lr(r);if(c===Dr)return ia;if(t===0){if(jr(c,0,127))return c;if(jr(c,194,223))t=1,a=c&31;else if(jr(c,224,239))c===224&&(n=160),c===237&&(o=159),t=2,a=c&15;else if(jr(c,240,244))c===240&&(n=144),c===244&&(o=143),t=3,a=c&7;else return Lr(r);return null}if(!jr(c,n,o))return a=t=i=0,n=128,o=191,s.prepend(c),Lr(r);if(n=128,o=191,a=a<<6|c&63,i+=1,i!==t)return null;var l=a;return a=t=i=0,l}}function KE(e){var r=e.fatal;this.handler=function(a,i){if(i===Dr)return ia;if(ei(i))return i;var t,n;jr(i,128,2047)?(t=1,n=192):jr(i,2048,65535)?(t=2,n=224):jr(i,65536,1114111)&&(t=3,n=240);for(var o=[(i>>6*t)+n];t>0;){var s=i>>6*(t-1);o.push(128|s&63),t-=1}return o}}Ot["UTF-8"]=function(e){return new KE(e)};zt["UTF-8"]=function(e){return new WE(e)};function GE(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Dr)return ia;if(Jt(t))return t;var n=e[t-128];return n===null?Lr(a):n}}function YE(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Dr)return ia;if(ei(t))return t;var n=vs(t,e);return n===null&&bi(t),n+128}}(function(){"encoding-indexes"in global&&Ug.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var a=r.name,i=At(a.toLowerCase());zt[a]=function(t){return new GE(i,t)},Ot[a]=function(t){return new YE(i,t)}})})})();zt.GBK=function(e){return new Mg(e)};Ot.GBK=function(e){return new Hg(e,!0)};function Mg(e){var r=e.fatal,a=0,i=0,t=0;this.handler=function(n,o){if(o===Dr&&a===0&&i===0&&t===0)return ia;o===Dr&&(a!==0||i!==0||t!==0)&&(a=0,i=0,t=0,Lr(r));var s;if(t!==0){s=null,jr(o,48,57)&&(s=ME((((a-129)*10+i-48)*126+t-129)*10+o-48));var c=[i,t,o];return a=0,i=0,t=0,s===null?(n.prepend(c),Lr(r)):s}if(i!==0)return jr(o,129,254)?(t=o,null):(n.prepend([i,o]),a=0,i=0,Lr(r));if(a!==0){if(jr(o,48,57))return i=o,null;var l=a,f=null;a=0;var v=o<127?64:65;return(jr(o,64,126)||jr(o,128,254))&&(f=(l-129)*190+(o-v)),s=f===null?null:ms(f,At("gb18030")),s===null&&Jt(o)&&n.prepend(o),s===null?Lr(r):s}return Jt(o)?o:o===128?8364:jr(o,129,254)?(a=o,null):Lr(r)}}function Hg(e,r){var a=e.fatal;this.handler=function(i,t){if(t===Dr)return ia;if(ei(t))return t;if(t===58853)return bi(t);if(r&&t===8364)return 128;var n=vs(t,At("gb18030"));if(n!==null){var o=yn(n/190)+129,s=n%190,c=s<63?64:65;return[o,s+c]}if(r)return bi(t);n=HE(t);var l=yn(n/10/126/10);n=n-l*10*126*10;var f=yn(n/10/126);n=n-f*10*126;var v=yn(n/10),h=n-v*10;return[l+129,f+48,v+129,h+48]}}Ot.gb18030=function(e){return new Hg(e)};zt.gb18030=function(e){return new Mg(e)};function ZE(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Dr&&a!==0)return a=0,Lr(r);if(t===Dr&&a===0)return ia;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:98;switch((jr(t,64,126)||jr(t,161,254))&&(o=(n-129)*157+(t-s)),o){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var c=o===null?null:ms(o,At("big5"));return c===null&&Jt(t)&&i.prepend(t),c===null?Lr(r):c}return Jt(t)?t:jr(t,129,254)?(a=t,null):Lr(r)}}function QE(e){var r=e.fatal;this.handler=function(a,i){if(i===Dr)return ia;if(ei(i))return i;var t=$E(i);if(t===null)return bi(i);var n=yn(t/157)+129;if(n<161)return bi(i);var o=t%157,s=o<63?64:98;return[n,o+s]}}Ot.Big5=function(e){return new QE(e)};zt.Big5=function(e){return new ZE(e)};function XE(e){var r=e.fatal,a=!1,i=0;this.handler=function(t,n){if(n===Dr&&i!==0)return i=0,Lr(r);if(n===Dr&&i===0)return ia;if(i===142&&jr(n,161,223))return i=0,65377-161+n;if(i===143&&jr(n,161,254))return a=!0,i=n,null;if(i!==0){var o=i;i=0;var s=null;return jr(o,161,254)&&jr(n,161,254)&&(s=ms((o-161)*94+(n-161),At(a?"jis0212":"jis0208"))),a=!1,jr(n,161,254)||t.prepend(n),s===null?Lr(r):s}return Jt(n)?n:n===142||n===143||jr(n,161,254)?(i=n,null):Lr(r)}}function JE(e){var r=e.fatal;this.handler=function(a,i){if(i===Dr)return ia;if(ei(i))return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return[142,i-65377+161];i===8722&&(i=65293);var t=vs(i,At("jis0208"));if(t===null)return bi(i);var n=yn(t/94)+161,o=t%94+161;return[n,o]}}Ot["EUC-JP"]=function(e){return new JE(e)};zt["EUC-JP"]=function(e){return new XE(e)};function e9(e){var r=e.fatal,a={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},i=a.ASCII,t=a.ASCII,n=0,o=!1;this.handler=function(s,c){switch(i){default:case a.ASCII:return c===27?(i=a.EscapeStart,null):jr(c,0,127)&&c!==14&&c!==15&&c!==27?(o=!1,c):c===Dr?ia:(o=!1,Lr(r));case a.Roman:return c===27?(i=a.EscapeStart,null):c===92?(o=!1,165):c===126?(o=!1,8254):jr(c,0,127)&&c!==14&&c!==15&&c!==27&&c!==92&&c!==126?(o=!1,c):c===Dr?ia:(o=!1,Lr(r));case a.Katakana:return c===27?(i=a.EscapeStart,null):jr(c,33,95)?(o=!1,65377-33+c):c===Dr?ia:(o=!1,Lr(r));case a.LeadByte:return c===27?(i=a.EscapeStart,null):jr(c,33,126)?(o=!1,n=c,i=a.TrailByte,null):c===Dr?ia:(o=!1,Lr(r));case a.TrailByte:if(c===27)return i=a.EscapeStart,Lr(r);if(jr(c,33,126)){i=a.LeadByte;var l=(n-33)*94+c-33,f=ms(l,At("jis0208"));return f===null?Lr(r):f}return c===Dr?(i=a.LeadByte,s.prepend(c),Lr(r)):(i=a.LeadByte,Lr(r));case a.EscapeStart:return c===36||c===40?(n=c,i=a.Escape,null):(s.prepend(c),o=!1,i=t,Lr(r));case a.Escape:var v=n;n=0;var h=null;if(v===40&&c===66&&(h=a.ASCII),v===40&&c===74&&(h=a.Roman),v===40&&c===73&&(h=a.Katakana),v===36&&(c===64||c===66)&&(h=a.LeadByte),h!==null){i=i=h;var d=o;return o=!0,d?Lr(r):null}return s.prepend([v,c]),o=!1,i=t,Lr(r)}}}function r9(e){var r=e.fatal,a={ASCII:0,Roman:1,jis0208:2},i=a.ASCII;this.handler=function(t,n){if(n===Dr&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if(n===Dr&&i===a.ASCII)return ia;if((i===a.ASCII||i===a.Roman)&&(n===14||n===15||n===27))return bi(65533);if(i===a.ASCII&&ei(n))return n;if(i===a.Roman&&(ei(n)&&n!==92&&n!==126||n==165||n==8254)){if(ei(n))return n;if(n===165)return 92;if(n===8254)return 126}if(ei(n)&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if((n===165||n===8254)&&i!==a.Roman)return t.prepend(n),i=a.Roman,[27,40,74];n===8722&&(n=65293);var o=vs(n,At("jis0208"));if(o===null)return bi(n);if(i!==a.jis0208)return t.prepend(n),i=a.jis0208,[27,36,66];var s=yn(o/94)+33,c=o%94+33;return[s,c]}}Ot["ISO-2022-JP"]=function(e){return new r9(e)};zt["ISO-2022-JP"]=function(e){return new e9(e)};function a9(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Dr&&a!==0)return a=0,Lr(r);if(t===Dr&&a===0)return ia;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:65,c=n<160?129:193;if((jr(t,64,126)||jr(t,128,252))&&(o=(n-c)*188+t-s),jr(o,8836,10715))return 57344-8836+o;var l=o===null?null:ms(o,At("jis0208"));return l===null&&Jt(t)&&i.prepend(t),l===null?Lr(r):l}return Jt(t)||t===128?t:jr(t,161,223)?65377-161+t:jr(t,129,159)||jr(t,224,252)?(a=t,null):Lr(r)}}function t9(e){var r=e.fatal;this.handler=function(a,i){if(i===Dr)return ia;if(ei(i)||i===128)return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return i-65377+161;i===8722&&(i=65293);var t=VE(i);if(t===null)return bi(i);var n=yn(t/188),o=n<31?129:193,s=t%188,c=s<63?64:65;return[n+o,s+c]}}Ot.Shift_JIS=function(e){return new t9(e)};zt.Shift_JIS=function(e){return new a9(e)};function i9(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Dr&&a!==0)return a=0,Lr(r);if(t===Dr&&a===0)return ia;if(a!==0){var n=a,o=null;a=0,jr(t,65,254)&&(o=(n-129)*190+(t-65));var s=o===null?null:ms(o,At("euc-kr"));return o===null&&Jt(t)&&i.prepend(t),s===null?Lr(r):s}return Jt(t)?t:jr(t,129,254)?(a=t,null):Lr(r)}}function n9(e){var r=e.fatal;this.handler=function(a,i){if(i===Dr)return ia;if(ei(i))return i;var t=vs(i,At("euc-kr"));if(t===null)return bi(i);var n=yn(t/190)+129,o=t%190+65;return[n,o]}}Ot["EUC-KR"]=function(e){return new n9(e)};zt["EUC-KR"]=function(e){return new i9(e)};function ml(e,r){var a=e>>8,i=e&255;return r?[a,i]:[i,a]}function Vg(e,r){var a=r.fatal,i=null,t=null;this.handler=function(n,o){if(o===Dr&&(i!==null||t!==null))return Lr(a);if(o===Dr&&i===null&&t===null)return ia;if(i===null)return i=o,null;var s;if(e?s=(i<<8)+o:s=(o<<8)+i,i=null,t!==null){var c=t;return t=null,jr(s,56320,57343)?65536+(c-55296)*1024+(s-56320):(n.prepend(ml(s,e)),Lr(a))}return jr(s,55296,56319)?(t=s,null):jr(s,56320,57343)?Lr(a):s}}function $g(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Dr)return ia;if(jr(t,0,65535))return ml(t,e);var n=ml((t-65536>>10)+55296,e),o=ml((t-65536&1023)+56320,e);return n.concat(o)}}Ot["UTF-16BE"]=function(e){return new $g(!0,e)};zt["UTF-16BE"]=function(e){return new Vg(!0,e)};Ot["UTF-16LE"]=function(e){return new $g(!1,e)};zt["UTF-16LE"]=function(e){return new Vg(!1,e)};function o9(e){var r=e.fatal;this.handler=function(a,i){return i===Dr?ia:Jt(i)?i:63360+i-128}}function s9(e){var r=e.fatal;this.handler=function(a,i){return i===Dr?ia:ei(i)?i:jr(i,63360,63487)?i-63360+128:bi(i)}}Ot["x-user-defined"]=function(e){return new s9(e)};zt["x-user-defined"]=function(e){return new o9(e)};var u9="rejected",c9="fulfilled";function Wg(e){let r=e.map(a=>a.then(i=>({status:c9,value:i})).catch(i=>({status:u9,reason:i})));return Promise.all(r)}function vl(e){return Buffer.from(e).toString("base64")}function ah(e){return Buffer.from(e,"base64").toString("ascii")}var Ni=class{constructor(r){this.map={},r instanceof Ni?r.forEach((a,i)=>this.append(i,a)):Array.isArray(r)?r.forEach(a=>this.append(a[0],a[1])):r&&Object.getOwnPropertyNames(r).forEach(a=>this.append(a,r[a]))}append(r,a){r=Fu(r),a=Kg(a);let i=this.map[r];this.map[r]=i?`${i}, ${a}`:a}delete(r){delete this.map[Fu(r)]}get(r){return r=Fu(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(Fu(r))}set(r,a){this.map[Fu(r)]=Kg(a)}forEach(r,a=null){for(let i in this.map)this.map.hasOwnProperty(i)&&(a?r.call(a,this.map[i],i,this):r(this.map[i],i,this))}keys(){let r=[];return this.forEach(function(a,i){r.push(i)}),th(r)}values(){let r=[];return this.forEach(function(a){r.push(a)}),th(r)}entries(){let r=[];return this.forEach(function(a,i){r.push([i,a])}),th(r)}*[Symbol.iterator](){yield*this.entries()}};function Fu(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e)||e==="")throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function Kg(e){return typeof e!="string"&&(e=String(e)),e}function th(e){let r={next(){let a=e.shift();return{done:a===void 0,value:a}}};return r[Symbol.iterator]=function(){return r},r}function ih(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var gl=Wt(require("zlib"));var l9=e=>e&&e instanceof ArrayBuffer,f9=e=>e&&e instanceof Buffer;function Gg(e){let r=e.indexOf(","),a,i;return e.slice(r-7,r)===";base64"?(a=Buffer.from(e.slice(r+1),"base64"),i=e.slice(5,r-7).trim()):(a=Buffer.from(decodeURIComponent(e.slice(r+1))),i=e.slice(5,r).trim()),i?i.startsWith(";")&&(i=`text/plain${i}`):i="text/plain;charset=US-ASCII",{arrayBuffer:nh(a),mimeType:i}}function nh(e){if(l9(e))return e;if(f9(e))return new Uint8Array(e).buffer;if(ArrayBuffer.isView(e))return e.buffer;if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error(`toArrayBuffer(${JSON.stringify(e,null,2).slice(10)})`)}function Yg(e,r){switch(r.get("content-encoding")){case"br":return e.pipe(gl.default.createBrotliDecompress());case"gzip":return e.pipe(gl.default.createGunzip());case"deflate":return e.pipe(gl.default.createDeflate());default:return e}}async function Zg(e){let r=[];return await new Promise((a,i)=>{e.on("error",t=>i(t)),e.on("readable",()=>e.read()),e.on("data",t=>{typeof t=="string"&&i(new Error("Read stream not binary")),r.push(nh(t))}),e.on("end",()=>{let t=p9(r);a(t)})})}function p9(e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),a=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(a),t=0;for(let n of r)i.set(n,t),t+=n.byteLength;return i.buffer}var sh=Wt(require("stream")),h9=e=>typeof e=="boolean",Qg=e=>typeof e=="function",d9=e=>e!==null&&typeof e=="object",oh=e=>d9(e)&&Qg(e.read)&&Qg(e.pipe)&&h9(e.readable),Kn=class{constructor(r,a){this.bodyUsed=!1;let{headers:i,status:t=200,statusText:n="OK",url:o}=a||{};this.url=o,this.ok=t===200,this.status=t,this.statusText=n,this.headers=new Ni((a==null?void 0:a.headers)||{}),oh(r)?this._body=Yg(r,i):typeof r=="string"?this._body=sh.Readable.from([new TextEncoder().encode(r)]):this._body=sh.Readable.from([r||new ArrayBuffer(0)])}get body(){return ih(!this.bodyUsed),ih(oh(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return oh(this._body)?await Zg(this._body):this._body||new ArrayBuffer(0)}async text(){let r=await this.arrayBuffer();return new TextDecoder().decode(r)}async json(){let r=await this.text();return JSON.parse(r)}async blob(){if(typeof Blob=="undefined")throw new Error("Blob polyfill not installed");return new Blob([await this.arrayBuffer()])}};var Xg=Wt(require("http")),Jg=Wt(require("https"));var uh=e=>e.startsWith("data:"),m9=e=>e.startsWith("http:")||e.startsWith("https:");async function qu(e,r){try{if(globalThis.fetch!==qu&&(m9(e)||uh(e)))return await fetch(e,r);if(uh(e)){let{arrayBuffer:l,mimeType:f}=Gg(e);return new Kn(l,{headers:{"content-type":f},url:e})}let a={},i=e;e.endsWith(".gz")&&(e=e.slice(0,-3),a["content-encoding"]="gzip");let t=await v9(i,r),n=x9(e,t,a),{status:o,statusText:s}=y9(t),c=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&c){let l=g9(e,n.get("location"));return await qu(l,r)}return new Kn(t,{headers:n,status:o,statusText:s,url:e})}catch(a){return new Kn(null,{status:400,statusText:String(a),url:e})}}async function v9(e,r){return await new Promise((a,i)=>{let t=b9(e,r),n=e.startsWith("https:")?Jg.default.request(t,o=>a(o)):Xg.default.request(t,o=>a(o));n.on("error",o=>i(o)),n.end()})}function g9(e,r){if(r.startsWith("http"))return r;let a=new URL(e);return a.pathname=r,a.href}function b9(e,r){let a=(r==null?void 0:r.headers)||{},i={};for(let n of Object.keys(a))i[n.toLowerCase()]=a[n];i["accept-encoding"]=i["accept-encoding"]||"gzip,br,deflate";let t=new URL(e);return Tu(bn(bn({hostname:t.hostname,path:t.pathname,method:"GET"},r),r==null?void 0:r.fetch),{headers:i,port:t.port})}function y9(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function x9(e,r,a={}){let i={};if(r&&r.headers){let t=r.headers;for(let n in t){let o=t[n];i[n.toLowerCase()]=String(o)}}if(!i["content-length"]){let t=w9(e);Number.isFinite(t)&&(i["content-length"]=t)}return Object.assign(i,a),new Ni(i)}function w9(e){return uh(e)?e.length-"data:".length:null}var Yy=Wt(Ky()),Zy=Wt(Uu());function Gy(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function R7(e,r){let a=r.type?r.type.replace("image/",""):"jpeg",i=(0,Zy.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,Yy.default)(i,a,r)}function od(e,r){let a=R7(e,r);return new Promise(i=>{let t=[];a.on("data",n=>t.push(n)),a.on("end",()=>{let n=Buffer.concat(t);i(Gy(n))})})}var T8=Wt(P8()),C8=["image/png","image/jpeg","image/gif"];async function l0(e,r){if(!r)throw new Error("MIMEType is required to parse image under Node.js");let a=e instanceof Buffer?e:Buffer.from(e);return await KU(a,r)}function KU(e,r){return new Promise(a=>(0,T8.default)(e,r,(i,t)=>{if(i)throw i;let n=[...t.shape],o=t.shape.length===4?t.shape.shift():1,s=t.data instanceof Buffer?new Uint8Array(t.data):t.data;a({shape:n,data:s,width:t.shape[0],height:t.shape[1],components:t.shape[2],layers:o?[o]:[]})}))}var B8=Wt(q8());delete global.ReadableStream;var f0=class extends B8.ReadableStream{};var p0=class{constructor(r){this.isWorking=!1;this.isCancelled=!1;this.chunks=r}start(r){this.work(r)}async work(r){let{chunks:a}=this;for(this.isWorking=!0;!this.isCancelled&&(r.desiredSize||0)>0;){let i;try{i=a.next()}catch(t){r.error(t);break}i&&(!i.done&&!this.isCancelled?r.enqueue(i.value):r.close())}this.isWorking=!1}pull(r){this.isWorking||this.work(r)}cancel(){this.isCancelled=!0}};var h0=class extends f0{constructor(r){super(new p0(r.values()),{type:"bytes"});this._chunks=r}async*[Symbol.asyncIterator](r){let a=this.getReader();yield*this._chunks,a.releaseLock()}};var Jo=class{constructor(r=[],a={}){this.parts=[],this.size=0;for(let i of r)if(typeof i=="string"){let t=new TextEncoder().encode(i);this.parts.push(t),this.size+=t.byteLength}else if(i instanceof Jo)this.size+=i.size,this.parts.push(...i.parts);else if(i instanceof ArrayBuffer)this.parts.push(new Uint8Array(i)),this.size+=i.byteLength;else if(i instanceof Uint8Array)this.parts.push(i),this.size+=i.byteLength;else if(ArrayBuffer.isView(i)){let{buffer:t,byteOffset:n,byteLength:o}=i;this.parts.push(new Uint8Array(t,n,o)),this.size+=o}else{let t=new TextEncoder().encode(String(i));this.parts.push(t),this.size+=t.byteLength}this.type=GU(a.type)}slice(r=0,a=this.size,i=""){let{size:t,parts:n}=this,o=r<0?Math.max(t+r,0):Math.min(r,t),s=a<0?Math.max(t+a,0):Math.min(a,t),c=Math.max(s-o,0),l=new Jo([],{type:i});if(c===0)return l;let f=0,v=[];for(let h of n){let{byteLength:d}=h;if(o>0&&d<=o)o-=d,s-=d;else{let y=h.subarray(o,Math.min(d,s));if(v.push(y),f+=y.byteLength,o=0,f>=c)break}}return l.parts=v,l.size=f,l}async arrayBuffer(){return this._toArrayBuffer()}async text(){let r=new TextDecoder,a="";for(let i of this.parts)a+=r.decode(i);return a}stream(){return new h0(this.parts)}toString(){return"[object Blob]"}get[Symbol.toStringTag](){return"Blob"}_toArrayBuffer(){let r=new ArrayBuffer(this.size),a=new Uint8Array(r),i=0;for(let t of this.parts)a.set(t,i),i+=t.byteLength;return r}};function GU(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}var d0=class extends Jo{constructor(r,a,i={}){super(r,i);this.name="";this.webkitRelativePath="";this.name=String(a).replace(/\//g,":"),this.lastModified=(i==null?void 0:i.lastModified)||Date.now()}get[Symbol.toStringTag](){return"File"}};var ZU=!Ui||!("TextEncoder"in za);ZU&&(za.TextEncoder=Cu);var QU=!Ui||!("TextDecoder"in za);QU&&(za.TextDecoder=Io);!Ui&&!("atob"in za)&&vl&&(za.atob=vl);!Ui&&!("btoa"in za)&&ah&&(za.btoa=ah);!Ui&&!("Headers"in za)&&Ni&&(za.Headers=Ni);!Ui&&!("Response"in za)&&Kn&&(za.Response=Kn);!Ui&&!("fetch"in za)&&qu&&(za.fetch=qu);!Ui&&!("_encodeImageNode"in za)&&od&&(za._encodeImageNode=od);!Ui&&!("_parseImageNode"in za)&&l0&&(za._parseImageNode=l0,za._imageFormatsNode=C8);"allSettled"in Promise||(Promise.allSettled=Wg);var un={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},I8=un.self||un.window||un.global||{},R8=un.window||un.self||un.global||{},O8=un.global||un.self||un.window||{},z8=un.document||{};var On=Boolean(typeof process!="object"||String(process)!=="[object process]"||process.browser);var D8=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),XU=D8&&parseFloat(D8[1])||0;function L8(...e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),a=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(a),t=0;for(let n of r)i.set(n,t),t+=n.byteLength;return i.buffer}async function m0(e){let r=[];for await(let a of e)r.push(a);return L8(...r)}function U8(e){return Buffer.isBuffer(e)?new Uint8Array(e.buffer,e.byteOffset,e.length).slice().buffer:e}function N8(e){return e&&typeof e=="object"&&e.isBuffer}function su(e){if(N8(e))return U8(e);if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function uu(e){return r=>new Promise((a,i)=>e(r,(t,n)=>t?i(t):a(n)))}var cn={};RE(cn,{dirname:()=>eN,filename:()=>JU,join:()=>rN,resolve:()=>aN});function M8(){var r;if(typeof process!="undefined"&&typeof process.cwd!="undefined")return process.cwd();let e=(r=window.location)==null?void 0:r.pathname;return(e==null?void 0:e.slice(0,e.lastIndexOf("/")+1))||""}function JU(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(r+1):""}function eN(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(0,r):""}function rN(...e){let r="/";return e=e.map((a,i)=>(i&&(a=a.replace(new RegExp(`^${r}`),"")),i!==e.length-1&&(a=a.replace(new RegExp(`${r}$`),"")),a)),e.join(r)}function aN(...e){let r=[];for(let n=0;n<e.length;n++)r[n]=e[n];let a="",i=!1,t;for(let n=r.length-1;n>=-1&&!i;n--){let o;n>=0?o=r[n]:(t===void 0&&(t=M8()),o=t),o.length!==0&&(a=`${o}/${a}`,i=o.charCodeAt(0)===Oc)}return a=tN(a,!i),i?`/${a}`:a.length>0?a:"."}var Oc=47,v0=46;function tN(e,r){let a="",i=-1,t=0,n,o=!1;for(let s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===Oc)break;n=Oc}if(n===Oc){if(!(i===s-1||t===1))if(i!==s-1&&t===2){if(a.length<2||!o||a.charCodeAt(a.length-1)!==v0||a.charCodeAt(a.length-2)!==v0){if(a.length>2){let c=a.length-1,l=c;for(;l>=0&&a.charCodeAt(l)!==Oc;--l);if(l!==c){a=l===-1?"":a.slice(0,l),i=s,t=0,o=!1;continue}}else if(a.length===2||a.length===1){a="",i=s,t=0,o=!1;continue}}r&&(a.length>0?a+="/..":a="..",o=!0)}else{let c=e.slice(i+1,s);a.length>0?a+=`/${c}`:a=c,o=!1}i=s,t=0}else n===v0&&t!==-1?++t:t=-1}return a}var g0="Tile converter does not work in browser, only in node js environment";var wo=Wt(require("fs")),b0=class{constructor(r,a){this.read=(r,a,i,t)=>new Promise(n=>{(0,wo.read)(this.fileDescriptor,r,a,i,t,(o,s,c)=>n({bytesRead:s,buffer:c}))});this.fileDescriptor=r,this.stats=a}async close(){return new Promise(r=>{(0,wo.close)(this.fileDescriptor,a=>r())})}get stat(){return this.stats}},dp=b0;dp.open=async r=>{let[a,i]=await Promise.all([new Promise(t=>{(0,wo.open)(r,void 0,void 0,(n,o)=>t(o))}),new Promise(t=>{(0,wo.stat)(r,{bigint:!0},(n,o)=>t(o))})]);return new b0(a,i)};var cu=class{static async from(r){let a=await dp.open(r);return new cu(a,a.stat.size)}constructor(r,a){this.fileDescriptor=r,this.size=a}async destroy(){await this.fileDescriptor.close()}async getUint8(r){let a=new Uint8Array((await this.fileDescriptor.read(Buffer.alloc(1),0,1,r)).buffer.buffer).at(0);if(a===void 0)throw new Error("something went wrong");return a}async getUint16(r){let a=new Uint16Array((await this.fileDescriptor.read(Buffer.alloc(2),0,2,r)).buffer.buffer).at(0);if(a===void 0)throw new Error("something went wrong");return a}async getUint32(r){let a=new Uint32Array((await this.fileDescriptor.read(Buffer.alloc(4),0,4,r)).buffer.buffer).at(0);if(a===void 0)throw new Error("something went wrong");return a}async getBigUint64(r){let a=new BigInt64Array((await this.fileDescriptor.read(Buffer.alloc(8),0,8,r)).buffer.buffer).at(0);if(a===void 0)throw new Error("something went wrong");return a}async slice(r,a){let i=a-r;if(i>Number.MAX_SAFE_INTEGER)throw new Error("too big slice");let t=Number(i);return(await this.fileDescriptor.read(Buffer.alloc(t),0,t,r)).buffer.buffer}get length(){return this.size}};var nN=8n,oN=18n,sN=22n,uN=26n,cN=28n,mp=30n,H8=Buffer.from([80,75,3,4]),vp=async(e,r)=>{if(Buffer.from(await r.slice(e,e+4n)).compare(H8)!==0)return null;let a=await r.getUint16(e+uN),i=new TextDecoder().decode(await r.slice(e+mp,e+mp+BigInt(a))).split("\\").join("/"),t=await r.getUint16(e+cN),n=e+mp+BigInt(a+t),o=await r.getUint16(e+nN),s=BigInt(await r.getUint32(e+oN)),c=BigInt(await r.getUint32(e+sN)),l=e+mp+BigInt(a),f=4n;return c===BigInt(4294967295)&&(c=await r.getBigUint64(l+f),f+=8n),s===BigInt(4294967295)&&(s=await r.getBigUint64(l+f),f+=8n),n===BigInt(4294967295)&&(n=await r.getBigUint64(l+f)),{fileNameLength:a,fileName:i,extraFieldLength:t,fileDataOffset:n,compressedSize:s,compressionMethod:o}};var y0=class{constructor(r){this.compressBatches=this.compressBatches.bind(this),this.decompressBatches=this.decompressBatches.bind(this)}async preload(){}async compress(r){return await this.preload(),this.compressSync(r)}async decompress(r,a){return await this.preload(),this.decompressSync(r,a)}compressSync(r){throw new Error(`${this.name}: sync compression not supported`)}decompressSync(r,a){throw new Error(`${this.name}: sync decompression not supported`)}async*compressBatches(r){let a=await this.concatenate(r);yield this.compress(a)}async*decompressBatches(r){let a=await this.concatenate(r);yield this.decompress(a)}concatenate(r){return m0(r)}improveError(r){return r.message.includes(this.name)||(r.message=`${this.name} ${r.message}`),r}};var us=Wt(CS()),Nn=Wt(require("zlib"));var eg=class extends y0{constructor(r={}){super(r);this.name="deflate";this.extensions=[];this.contentEncodings=["deflate"];this.isSupported=!0;this._chunks=[];this.options=r}async compress(r){var a,i;if(!On&&((a=this.options.deflate)==null?void 0:a.useZlib)){let t=((i=this.options.deflate)==null?void 0:i.gzip)?await uu(Nn.default.gzip)(r):await uu(Nn.default.deflate)(r);return su(t)}return this.compressSync(r)}async decompress(r){var a,i;if(!On&&((a=this.options.deflate)==null?void 0:a.useZlib)){let t=((i=this.options.deflate)==null?void 0:i.gzip)?await uu(Nn.default.gunzip)(r):await uu(Nn.default.inflate)(r);return su(t)}return this.decompressSync(r)}compressSync(r){var n,o,s,c;if(!On&&((n=this.options.deflate)==null?void 0:n.useZlib)){let l=((o=this.options.deflate)==null?void 0:o.gzip)?Nn.default.gzipSync(r):Nn.default.deflateSync(r);return su(l)}let a=((s=this.options)==null?void 0:s.deflate)||{},i=new Uint8Array(r);return(((c=this.options)==null?void 0:c.raw)?us.default.deflateRaw:us.default.deflate)(i,a).buffer}decompressSync(r){var n,o,s,c;if(!On&&((n=this.options.deflate)==null?void 0:n.useZlib)){let l=((o=this.options.deflate)==null?void 0:o.gzip)?Nn.default.gunzipSync(r):Nn.default.inflateSync(r);return su(l)}let a=((s=this.options)==null?void 0:s.deflate)||{},i=new Uint8Array(r);return(((c=this.options)==null?void 0:c.raw)?us.default.inflateRaw:us.default.inflate)(i,a).buffer}async*compressBatches(r){var t;let a=((t=this.options)==null?void 0:t.deflate)||{},i=new us.default.Deflate(a);yield*this.transformBatches(i,r)}async*decompressBatches(r){var t;let a=((t=this.options)==null?void 0:t.deflate)||{},i=new us.default.Inflate(a);yield*this.transformBatches(i,r)}async*transformBatches(r,a){r.onData=this._onData.bind(this),r.onEnd=this._onEnd.bind(this);for await(let o of a){let s=new Uint8Array(o);if(!r.push(s,!1))throw new Error(`${this._getError()}write`);yield*this._getChunks()}let i=new Uint8Array(0),t=r.push(i,!0);yield*this._getChunks()}_onData(r){this._chunks.push(r)}_onEnd(r){if(r!==0)throw new Error(this._getError(r)+this._chunks.length)}_getChunks(){let r=this._chunks;return this._chunks=[],r}_getError(r=0){let a={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"};return`${this.name}: ${a[r]}`}};var Bp=class extends eg{constructor(r){super(Tu(bn({},r),{deflate:Tu(bn({},r==null?void 0:r.gzip),{gzip:!0})}));this.name="gzip";this.extensions=["gz","gzip"];this.contentEncodings=["gzip","x-gzip"];this.isSupported=!0}};var rg=Wt(require("fs")),ag=Wt(require("path"));async function FS(e,r,a="index.json"){let i;r instanceof Promise?i=new Uint8Array(await r):r instanceof ArrayBuffer?i=new Uint8Array(r):i=r,await rg.promises.mkdir(e,{recursive:!0});let t=(0,ag.join)(e,a);try{await rg.promises.writeFile(t,i)}catch(n){throw n}return console.log(`${t} saved.`),t}var aH=["3dSceneLayer.json.gz","3dNodeIndexDocument.json.gz","sharedResource.json.gz"],Ip=class{async extract(r){if(On)return console.log(g0),g0;let{inputUrl:a}=r,i=await cu.from(a),t=await vp(0n,i);for(;t;)await this.writeFile(await this.unGzip({name:this.correctIndexNames(t.fileName),data:await i.slice(t.fileDataOffset,t.fileDataOffset+t.compressedSize)}),r.outputPath),t=await vp(t.fileDataOffset+(t==null?void 0:t.compressedSize),i);return"success"}correctIndexNames(r){if(aH.includes(cn.filename(cn.join("/",r))))return cn.join(cn.dirname(r),"index.json.gz");let a=/^(.*\/[^\/\.]*)(\..+)$/.exec(r);return a?`${a==null?void 0:a.at(1)}/index${a==null?void 0:a.at(2)}`:null}async unGzip(r){return/\.gz$/.test(r.name??"")?{data:await new Bp().decompress(r.data),name:(r.name??"").slice(0,-3)}:Promise.resolve(r)}async writeFile(r,a){if(!r.name)return;let i=cn.join(a,r.name),t=cn.dirname(i),n=cn.filename(i);await FS(t,r.data,n)}};function tH(e,r){if(e+1>=r.length)return"";let a=r[e+1];return a.indexOf("--")===0?"":a}function tg(e,r){let a=tH(e,r);return console.log(`Input tileset value: ${a}`),console.log(`Modified tileset value: ${a.replace(/\\/g,"/")}`),a.replace(/\\/g,"/")}function qS(e){return e.reduce((r,a)=>{let i=a.indexOf("="),t=a.slice(0,i),n=a.slice(i+1,a.length);return a.includes("=")&&a.startsWith("--")&&n?r.concat(t,n):r.concat(a)},[])}async function iH(){let[,,...e]=process.argv;e.length===0&&BS();let r=qS(e),a=sH(r),i=oH(a);await nH(i)}iH().catch(e=>{console.log(e),process.exit(1)});function BS(){console.log("cli: converter slpk to I3S..."),console.log('--output [Output folder, default: "data" folder]'),console.log("--tileset [SLPK file]"),process.exit(0)}async function nH(e){console.log("------------------------------------------------"),console.log("Starting conversion of SLPK"),console.log("------------------------------------------------"),new Ip().extract({inputUrl:e.tileset,outputPath:e.output})}function oH(e){let r={output:()=>console.log("Missed: --output [Output path name]"),tileset:()=>console.log("Missed: --tileset [SLPK file]")},a=[];for(let i in r)e[i]||a.push(r[i]);return a.length&&(a.forEach(i=>i()),process.exit(1)),e}function sH(e){let r={};return e.forEach((a,i)=>{if(a.indexOf("--")===0)switch(a){case"--tileset":r.tileset=tg(i,e);break;case"--output":r.output=tg(i,e);break;case"--help":BS();break;default:console.warn(`Unknown option ${a}`),process.exit(0)}}),r}
|
|
95
95
|
/*!
|
|
96
96
|
* Copyright 2010 LearnBoost <dev@learnboost.com>
|
|
97
97
|
*
|