@loaders.gl/tile-converter 4.0.0-alpha.15 → 4.0.0-alpha.17
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 +64 -64
- package/dist/dist.min.js +29 -47
- package/dist/es5/deps-installer/deps-installer.js +1 -1
- package/dist/es5/i3s-server/app.js +20 -12
- package/dist/es5/i3s-server/app.js.map +1 -1
- package/dist/es5/i3s-server/bin/www.js +25 -53
- package/dist/es5/i3s-server/bin/www.js.map +1 -1
- package/dist/es5/i3s-server/controllers/index-controller.js +23 -22
- package/dist/es5/i3s-server/controllers/index-controller.js.map +1 -1
- package/dist/es5/i3s-server/controllers/slpk-controller.js +31 -30
- package/dist/es5/i3s-server/controllers/slpk-controller.js.map +1 -1
- package/dist/es5/i3s-server/routes/index.js +2 -2
- package/dist/es5/i3s-server/routes/index.js.map +1 -1
- package/dist/es5/i3s-server/routes/slpk-router.js +14 -13
- package/dist/es5/i3s-server/routes/slpk-router.js.map +1 -1
- package/dist/es5/i3s-server/utils/create-scene-server.js +7 -4
- package/dist/es5/i3s-server/utils/create-scene-server.js.map +1 -1
- package/dist/es5/i3s-server/utils/server-utils.js +49 -0
- package/dist/es5/i3s-server/utils/server-utils.js.map +1 -0
- package/dist/es5/pgm-loader.js +1 -1
- package/dist/es5/slpk-extractor/helpers/file-handle-provider.js +1 -1
- package/dist/es5/slpk-extractor/helpers/file-handle-provider.js.map +1 -1
- package/dist/es5/slpk-extractor/slpk-extractor.js +2 -2
- package/dist/es5/slpk-extractor/slpk-extractor.js.map +1 -1
- package/dist/esm/deps-installer/deps-installer.js +1 -1
- package/dist/esm/i3s-server/app.js +9 -7
- package/dist/esm/i3s-server/app.js.map +1 -1
- package/dist/esm/i3s-server/bin/i3s-server.min.js +124 -222
- package/dist/esm/i3s-server/bin/www.js +14 -43
- package/dist/esm/i3s-server/bin/www.js.map +1 -1
- package/dist/esm/i3s-server/controllers/index-controller.js +4 -7
- package/dist/esm/i3s-server/controllers/index-controller.js.map +1 -1
- package/dist/esm/i3s-server/controllers/slpk-controller.js +8 -19
- package/dist/esm/i3s-server/controllers/slpk-controller.js.map +1 -1
- package/dist/esm/i3s-server/routes/index.js +1 -1
- package/dist/esm/i3s-server/routes/index.js.map +1 -1
- package/dist/esm/i3s-server/routes/slpk-router.js +5 -11
- package/dist/esm/i3s-server/routes/slpk-router.js.map +1 -1
- package/dist/esm/i3s-server/utils/create-scene-server.js +2 -5
- package/dist/esm/i3s-server/utils/create-scene-server.js.map +1 -1
- package/dist/esm/i3s-server/utils/server-utils.js +40 -0
- package/dist/esm/i3s-server/utils/server-utils.js.map +1 -0
- package/dist/esm/pgm-loader.js +1 -1
- package/dist/esm/slpk-extractor/helpers/file-handle-provider.js +1 -1
- package/dist/esm/slpk-extractor/helpers/file-handle-provider.js.map +1 -1
- package/dist/esm/slpk-extractor/slpk-extractor.js +2 -2
- package/dist/esm/slpk-extractor/slpk-extractor.js.map +1 -1
- package/dist/i3s-server/app.d.ts +1 -2
- package/dist/i3s-server/app.d.ts.map +1 -1
- package/dist/i3s-server/app.js +22 -15
- package/dist/i3s-server/bin/www.d.ts.map +1 -1
- package/dist/i3s-server/bin/www.js +31 -77
- package/dist/i3s-server/controllers/index-controller.d.ts +6 -1
- package/dist/i3s-server/controllers/index-controller.d.ts.map +1 -1
- package/dist/i3s-server/controllers/index-controller.js +16 -8
- package/dist/i3s-server/controllers/slpk-controller.d.ts +13 -2
- package/dist/i3s-server/controllers/slpk-controller.d.ts.map +1 -1
- package/dist/i3s-server/controllers/slpk-controller.js +19 -13
- package/dist/i3s-server/routes/index.d.ts +1 -2
- package/dist/i3s-server/routes/index.d.ts.map +1 -1
- package/dist/i3s-server/routes/index.js +6 -2
- package/dist/i3s-server/routes/slpk-router.d.ts +2 -2
- package/dist/i3s-server/routes/slpk-router.d.ts.map +1 -1
- package/dist/i3s-server/routes/slpk-router.js +15 -14
- package/dist/i3s-server/utils/create-scene-server.d.ts +11 -5
- package/dist/i3s-server/utils/create-scene-server.d.ts.map +1 -1
- package/dist/i3s-server/utils/create-scene-server.js +11 -3
- package/dist/i3s-server/utils/server-utils.d.ts +24 -0
- package/dist/i3s-server/utils/server-utils.d.ts.map +1 -0
- package/dist/i3s-server/utils/server-utils.js +66 -0
- package/dist/slpk-extractor/helpers/file-handle-provider.js +1 -1
- package/dist/slpk-extractor/slpk-extractor.js +1 -1
- package/dist/slpk-extractor.min.js +1 -1
- package/package.json +19 -15
- package/src/i3s-server/{app.js → app.ts} +10 -8
- package/src/i3s-server/bin/www.ts +38 -0
- package/src/i3s-server/controllers/{index-controller.js → index-controller.ts} +10 -9
- package/src/i3s-server/controllers/slpk-controller.ts +32 -0
- package/src/i3s-server/routes/{index.js → index.ts} +2 -1
- package/src/i3s-server/routes/{slpk-router.js → slpk-router.ts} +5 -10
- package/src/i3s-server/utils/create-scene-server.ts +20 -0
- package/src/i3s-server/utils/server-utils.ts +70 -0
- package/src/slpk-extractor/helpers/file-handle-provider.ts +1 -1
- package/src/slpk-extractor/slpk-extractor.ts +1 -1
- package/src/i3s-server/bin/www.js +0 -102
- package/src/i3s-server/controllers/slpk-controller.js +0 -31
- package/src/i3s-server/utils/create-scene-server.js +0 -15
|
@@ -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};Pc.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)};Y5.Multipart=Pc});var J5=O(X5=>{"use strict";var Q5=require("url"),HL=/^https?:/;function lp(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}lp.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)};lp.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};lp.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,HL.test(i)||(i=Q5.resolve(a.uri.href,i));var t=a.uri;return a.uri=Q5.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};X5.Redirect=lp});var t8=O(tu=>{"use strict";var sY=require("net"),VL=require("tls"),u0=require("http"),e8=require("https"),$L=require("events"),WL=require("assert"),KL=require("util"),GL=As().Buffer;tu.httpOverHttp=YL;tu.httpsOverHttp=ZL;tu.httpOverHttps=QL;tu.httpsOverHttps=XL;function YL(e){var r=new un(e);return r.request=u0.request,r}function ZL(e){var r=new un(e);return r.request=u0.request,r.createSocket=r8,r.defaultPort=443,r}function QL(e){var r=new un(e);return r.request=e8.request,r}function XL(e){var r=new un(e);return r.request=e8.request,r.createSocket=r8,r.defaultPort=443,r}function un(e){var r=this;r.options=e||{},r.proxyOptions=r.options.proxy||{},r.maxSockets=r.options.maxSockets||u0.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)})}KL.inherits(un,$L.EventEmitter);un.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})};un.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)}})};un.prototype.createSocket=function(r,a){var i=this,t={};i.sockets.push(t);var n=a8({},i.proxyOptions,{method:"CONNECT",path:r.host+":"+r.port,agent:!1});n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+GL.from(n.proxyAuth).toString("base64")),Jo("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)WL.equal(d.length,0),Jo("tunneling connection has established"),i.sockets[i.sockets.indexOf(t)]=h,a(h);else{Jo("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(),Jo(`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)}};un.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 r8(e,r){var a=this;un.prototype.createSocket.call(a,e,function(i){var t=VL.connect(0,a8({},a.options,{servername:e.host,socket:i}));a.sockets[a.sockets.indexOf(i)]=t,r(t)})}function a8(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 Jo;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Jo=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)}:Jo=function(){};tu.debug=Jo});var s8=O(o8=>{"use strict";var JL=require("url"),eU=t8(),i8=["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"],n8=["proxy-authorization"];function rU(e){var r=e.port,a=e.protocol,i=e.hostname+":";return r?i+=r:a==="https:"?i+="443":i+="80",i}function aU(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 tU(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 iU(e,r){var a=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[a,i].join("Over")}function nU(e){var r=e.uri,a=e.proxy,i=iU(r,a);return eU[i]}function Tc(e){this.request=e,this.proxyHeaderWhiteList=i8,this.proxyHeaderExclusiveList=[],typeof e.tunnel!="undefined"&&(this.tunnelOverride=e.tunnel)}Tc.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride!="undefined"?e.tunnelOverride:r.uri.protocol==="https:"};Tc.prototype.setup=function(e){var r=this,a=r.request;if(e=e||{},typeof a.proxy=="string"&&(a.proxy=JL.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(n8),t=r.proxyHeaderWhiteList.concat(i),n=aU(a.headers,t);n.host=rU(a.uri),i.forEach(a.removeHeader,a);var o=nU(a),s=tU(a,n);return a.agent=o(s),!0};Tc.defaultProxyHeaderWhiteList=i8;Tc.defaultProxyHeaderExclusiveList=n8;o8.Tunnel=Tc});var c8=O((u8,Cc)=>{(function(){var e,r,a,i,t,n;typeof performance!="undefined"&&performance!==null&&performance.now?Cc.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(Cc.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?(Cc.exports=function(){return Date.now()-a},a=Date.now()):(Cc.exports=function(){return new Date().getTime()-a},a=new Date().getTime())}).call(u8)});var x8=O((lY,y8)=>{"use strict";var oU=require("http"),l8=require("https"),Fc=require("url"),c0=require("util"),fp=require("stream"),pp=require("zlib"),l0=Yw(),sU=n2(),uU=Y_(),cU=zf(),f8=Df(),p8=i3(),lU=q3(),fU=Rl(),h8=Ev(),pU=D3().strict,iu=Ul(),hU=zd(),dU=N3(),mU=J3().Querystring,vU=A5().Har,gU=O5().Auth,bU=K5().OAuth,yU=G5(),xU=Z5().Multipart,wU=J5().Redirect,f0=s8().Tunnel,nu=c8(),qc=As().Buffer,d8=iu.safeStringify,kU=iu.isReadStream,_U=iu.toBase64,jU=iu.defer,m8=iu.copy,SU=iu.version,v8=hU.jar(),g8={};function EU(e,r){var a={};for(var i in r){var t=e.indexOf(i)===-1;t&&(a[i]=r[i])}return a}function AU(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 b8(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function PU(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:b8.call(e.request)}}function Rr(e){var r=this;e.har&&(r._har=new vU(r),e=r._har.options(e)),fp.Stream.call(r);var a=Object.keys(Rr.prototype),i=EU(a,e);fU(r,i),e=AU(a,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new mU(r),r._auth=new gU(r),r._oauth=new bU(r),r._multipart=new xU(r),r._redirect=new wU(r),r._tunnel=new f0(r),r.init(e)}c0.inherits(Rr,fp.Stream);Rr.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function ot(){Rr.debug&&console.error("REQUEST %s",c0.format.apply(c0,arguments))}Rr.prototype.debug=ot;Rr.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?m8(r.headers):{};for(var a in r.headers)typeof r.headers[a]=="undefined"&&delete r.headers[a];if(f8.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=g8),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=Fc.parse(r.uri)),r.uri.href||(r.uri.href=Fc.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=Fc.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=dU(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 "+_U(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(pU(r.body)&&(r.body=qc.from(r.body)),!r.hasHeader("content-length")){var R;typeof r.body=="string"?R=qc.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&&!h8(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:":oU,"https:":l8},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=SU();F.major===0&&F.minor<=10?r.agentClass=P==="http:"?p8:p8.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,kU(R))r.hasHeader("content-type")||r.setHeader("content-type",cU.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)}}),jU(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)h8(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=Fc.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===g8&&!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=nu();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=m8(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=nu()-e.startTimeNow,o)){var s=function(){e.timings.lookup=nu()-e.startTimeNow},c=function(){e.timings.connect=nu()-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=nu()-r.startTimeNow),ot("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=nu()-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=PU,r.httpModule===l8&&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:v8,t=function(f){try{i.setCookie(f,r.uri.href,{ignoreError:!0})}catch(v){r.emit("error",v)}};if(e.caseless=f8(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:pp.Z_SYNC_FLUSH,finishFlush:pp.Z_SYNC_FLUSH};c==="gzip"?(s=pp.createGunzip(l),e.pipe(s)):c==="deflate"?(s=pp.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){qc.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=qc.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?qc.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=Fc.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 lU,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=d8(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=d8(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=sU.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:l0.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=l0.canonicalizeResource(o.resource),a.setHeader("authorization",l0.authorization(o))}return a};Rr.prototype.httpSignature=function(e){var r=this;return uU.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",yU.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:v8,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 fp.Stream.prototype.pipe.call(a,e,r),a.pipeDest(e),e;else return a.dests.push(e),fp.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=f0.defaultProxyHeaderWhiteList.slice();Rr.defaultProxyHeaderExclusiveList=f0.defaultProxyHeaderExclusiveList.slice();Rr.prototype.toJSON=b8;y8.exports=Rr});var _8=O((fY,k8)=>{"use strict";var Bc=Rl(),w8=zd(),TU=Ul(),CU=TU.paramsHaveRequestBody;function hp(e,r,a){typeof r=="function"&&(a=r);var i={};return r!==null&&typeof r=="object"?Bc(i,r,{uri:e}):typeof e=="string"?Bc(i,{uri:e}):Bc(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=hp(e,r,a);if(i.method==="HEAD"&&CU(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=hp(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 w8.jar(e)};qa.cookie=function(e){return w8.parse(e)};function p0(e,r,a,i){return function(t,n,o){var s=hp(t,n,o),c={};return Bc(!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=p0(a,e,r),t=["get","head","post","put","patch","del","delete"];return t.forEach(function(n){i[n]=p0(a[n],e,r,n)}),i.cookie=p0(a.cookie,e,r),i.jar=a.jar,i.defaults=a.defaults,i};qa.forever=function(e,r){var a={};return r&&Bc(a,r),e&&(a.agentOptions=e),a.forever=!0,qa.defaults(a)};k8.exports=qa;qa.Request=x8();qa.initParams=hp;Object.defineProperty(qa,"debug",{enumerable:!0,get:function(){return qa.Request.debug},set:function(e){qa.Request.debug=e}})});var S8=O((pY,j8)=>{j8.exports=FU;function FU(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 P8=O((hY,A8)=>{var qU=S8();function BU(e){return{mimeType:RU(IU(e)),data:qU(e)}}function IU(e){return e.substring(5,e.indexOf(";"))}var E8=/^(\w+\/)+/;function RU(e){e=e.toLowerCase();var r=e.match(E8);return!r||!(r=r[1])?e:e.replace(E8,r)}A8.exports=BU});var C8=O((mY,T8)=>{"use strict";var Ic=Lu(),dY=require("path"),OU=Kx().PNG,zU=Hh(),DU=Xx(),LU=ew().GifReader,UU=nw(),NU=require("fs"),MU=_8(),HU=zf(),VU=P8();function $U(e,r){var a=new OU;a.parse(e,function(i,t){if(i){r(i);return}r(null,Ic(new Uint8Array(t.data),[t.width|0,t.height|0,4],[4,4*t.width|0,1],0))})}function WU(e,r){var a;try{a=zU.decode(e)}catch(n){r(n);return}if(!a){r(new Error("Error decoding jpeg"));return}var i=[a.height,a.width,4],t=Ic(a.data,i);r(null,t.transpose(1,0))}function KU(e,r){var a;try{a=new LU(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=Ic(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=Ic(t,i);try{a.decodeAndBlitFrameRGBA(0,t)}catch(f){r(f);return}r(null,n.transpose(1,0))}}function GU(e,r){var a=new UU(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=Ic(n,t);DU(i,o),r(null,o.transpose(1,0))}function dp(e,r,a){switch(e){case"image/png":$U(r,a);break;case"image/jpg":case"image/jpeg":WU(r,a);break;case"image/gif":KU(r,a);break;case"image/bmp":GU(r,a);break;default:a(new Error("Unsupported file type: "+e))}}T8.exports=function(r,a,i){if(i||(i=a,a=""),Buffer.isBuffer(r)){if(!a){i(new Error("Invalid file type"));return}dp(a,r,i)}else if(r.indexOf("data:")===0)try{var t=VU(r);t?process.nextTick(function(){dp(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?MU({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}dp(a,s,i)}):NU.readFile(r,function(n,o){if(n){i(n);return}if(a=a||HU.lookup(r),!a){i(new Error("Invalid file type"));return}dp(a,o,i)})}});var I8=O((mp,B8)=>{(function(e,r){typeof mp=="object"&&typeof B8!="undefined"?r(mp):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(mp,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 gi(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(!Vn(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"),$n(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 $t(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),ku(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),$t(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);$t(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,$t(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),ku(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),jg(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"),$n(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);MS(this,G,Xe,ge)}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Re(this))throw il("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(il("abort"))},u.prototype.close=function(){return Re(this)?Fr(this)?d(new TypeError("Cannot close a stream that already has a writer")):vi(this)?d(new TypeError("Cannot close an already-closing stream")):ct(this):d(il("close"))},u.prototype.getWriter=function(){if(!Re(this))throw il("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 cs(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(Fo.prototype);return fg(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||vn(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"&&Hp(D),HS(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"){vn(u,m);return}gt(u)}function vn(u,m){var S=u._writableStreamController;u._state="erroring",u._storedError=m;var D=u._writer;D!==void 0&&sg(D,m),!RS(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){rl(u);return}var S=u._pendingAbortRequest;if(u._pendingAbortRequest=void 0,S._wasAlreadyErroring){S._reject(m),rl(u);return}var D=u._writableStreamController[_e](S._reason);j(D,function(){S._resolve(),rl(u)},function(G){S._reject(G),rl(u)})}function Rt(u){u._inFlightWriteRequest._resolve(void 0),u._inFlightWriteRequest=void 0}function To(u,m){u._inFlightWriteRequest._reject(m),u._inFlightWriteRequest=void 0,Et(u,m)}function mi(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&&mg(S)}function us(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 vi(u){return!(u._closeRequest===void 0&&u._inFlightCloseRequest===void 0)}function RS(u){return!(u._inFlightWriteRequest===void 0&&u._inFlightCloseRequest===void 0)}function OS(u){u._inFlightCloseRequest=u._closeRequest,u._closeRequest=void 0}function zS(u){u._inFlightWriteRequest=u._writeRequests.shift()}function rl(u){u._closeRequest!==void 0&&(u._closeRequest._reject(u._storedError),u._closeRequest=void 0);var m=u._writer;m!==void 0&&Np(m,u._storedError)}function Op(u,m){var S=u._writer;S!==void 0&&m!==u._backpressure&&(m?ZS(S):Hp(S)),u._backpressure=m}var cs=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")!vi(m)&&m._backpressure?ol(this):vg(this),nl(this);else if(S==="erroring")Mp(this,m._storedError),nl(this);else if(S==="closed")vg(this),GS(this);else{var D=m._storedError;Mp(this,D),dg(this,D)}}return Object.defineProperty(u.prototype,"closed",{get:function(){return Co(this)?this._closedPromise:d(qo("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Co(this))throw qo("desiredSize");if(this._ownerWritableStream===void 0)throw yu("desiredSize");return NS(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ready",{get:function(){return Co(this)?this._readyPromise:d(qo("ready"))},enumerable:!1,configurable:!0}),u.prototype.abort=function(m){return m===void 0&&(m=void 0),Co(this)?this._ownerWritableStream===void 0?d(yu("abort")):DS(this,m):d(qo("abort"))},u.prototype.close=function(){if(!Co(this))return d(qo("close"));var m=this._ownerWritableStream;return m===void 0?d(yu("close")):vi(m)?d(new TypeError("Cannot close an already-closing stream")):og(this)},u.prototype.releaseLock=function(){if(!Co(this))throw qo("releaseLock");var m=this._ownerWritableStream;m!==void 0&&ug(this)},u.prototype.write=function(m){return m===void 0&&(m=void 0),Co(this)?this._ownerWritableStream===void 0?d(yu("write to")):cg(this,m):d(qo("write"))},u}();Object.defineProperties(cs.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(cs.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Co(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_ownerWritableStream")?!1:u instanceof cs}function DS(u,m){var S=u._ownerWritableStream;return ca(S,m)}function og(u){var m=u._ownerWritableStream;return ct(m)}function LS(u){var m=u._ownerWritableStream,S=m._state;return vi(m)||S==="closed"?h(void 0):S==="errored"?d(m._storedError):og(u)}function US(u,m){u._closedPromiseState==="pending"?Np(u,m):YS(u,m)}function sg(u,m){u._readyPromiseState==="pending"?gg(u,m):QS(u,m)}function NS(u){var m=u._ownerWritableStream,S=m._state;return S==="errored"||S==="erroring"?null:S==="closed"?0:pg(m._writableStreamController)}function ug(u){var m=u._ownerWritableStream,S=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");sg(u,S),US(u,S),m._writer=void 0,u._ownerWritableStream=void 0}function cg(u,m){var S=u._ownerWritableStream,D=S._writableStreamController,G=VS(D,m);if(S!==u._ownerWritableStream)return d(yu("write to"));var se=S._state;if(se==="errored")return d(S._storedError);if(vi(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 $S(D,m,G),ge}var lg={},Fo=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"abortReason",{get:function(){if(!zp(this))throw Up("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"signal",{get:function(){if(!zp(this))throw Up("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),!zp(this))throw Up("error");var S=this._controlledWritableStream._state;S==="writable"&&hg(this,m)},u.prototype[_e]=function(m){var S=this._abortAlgorithm(m);return al(this),S},u.prototype[be]=function(){ua(this)},u}();Object.defineProperties(Fo.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Fo.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function zp(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledWritableStream")?!1:u instanceof Fo}function fg(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=Lp(m);Op(u,Er);var qr=S(),zr=h(qr);j(zr,function(){m._started=!0,tl(m)},function(Wr){m._started=!0,Et(u,Wr)})}function MS(u,m,S,D){var G=Object.create(Fo.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)}),fg(u,G,se,ge,Xe,Er,S,D)}function al(u){u._writeAlgorithm=void 0,u._closeAlgorithm=void 0,u._abortAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function HS(u){vt(u,lg,0),tl(u)}function VS(u,m){try{return u._strategySizeAlgorithm(m)}catch(S){return Dp(u,S),1}}function pg(u){return u._strategyHWM-u._queueTotalSize}function $S(u,m,S){try{vt(u,m,S)}catch(se){Dp(u,se);return}var D=u._controlledWritableStream;if(!vi(D)&&D._state==="writable"){var G=Lp(u);Op(D,G)}tl(u)}function tl(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===lg?WS(u):KS(u,D)}}}function Dp(u,m){u._controlledWritableStream._state==="writable"&&hg(u,m)}function WS(u){var m=u._controlledWritableStream;OS(m),st(u);var S=u._closeAlgorithm();al(u),j(S,function(){mi(m)},function(D){us(m,D)})}function KS(u,m){var S=u._controlledWritableStream;zS(S);var D=u._writeAlgorithm(m);j(D,function(){Rt(S);var G=S._state;if(st(u),!vi(S)&&G==="writable"){var se=Lp(u);Op(S,se)}tl(u)},function(G){S._state==="writable"&&al(u),To(S,G)})}function Lp(u){var m=pg(u);return m<=0}function hg(u,m){var S=u._controlledWritableStream;al(u),vn(S,m)}function il(u){return new TypeError("WritableStream.prototype."+u+" can only be used on a WritableStream")}function Up(u){return new TypeError("WritableStreamDefaultController.prototype."+u+" can only be used on a WritableStreamDefaultController")}function qo(u){return new TypeError("WritableStreamDefaultWriter.prototype."+u+" can only be used on a WritableStreamDefaultWriter")}function yu(u){return new TypeError("Cannot "+u+" a stream using a released writer")}function nl(u){u._closedPromise=v(function(m,S){u._closedPromise_resolve=m,u._closedPromise_reject=S,u._closedPromiseState="pending"})}function dg(u,m){nl(u),Np(u,m)}function GS(u){nl(u),mg(u)}function Np(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 YS(u,m){dg(u,m)}function mg(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 ol(u){u._readyPromise=v(function(m,S){u._readyPromise_resolve=m,u._readyPromise_reject=S}),u._readyPromiseState="pending"}function Mp(u,m){ol(u),gg(u,m)}function vg(u){ol(u),Hp(u)}function gg(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 ZS(u){ol(u)}function QS(u,m){Mp(u,m)}function Hp(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 bg=typeof DOMException!="undefined"?DOMException:void 0;function XS(u){if(!(typeof u=="function"||typeof u=="object"))return!1;try{return new u,!0}catch{return!1}}function JS(){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 eE=XS(bg)?bg:JS();function yg(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 eE("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"?gi(u,xr):h(void 0)}),Wt(function(){return Promise.all(Yr.map(function(ba){return ba()}))},!0,xr)},se.aborted){Oa();return}se.addEventListener("abort",Oa)}function bi(){return v(function(xr,Yr){function ba(Ni){Ni?xr():y(ps(),ba,Yr)}ba(!1)})}function ps(){return Er?h(!0):y(Xe._readyPromise,function(){return v(function(xr,Yr){nr(ge,{_chunkSteps:function(ba){qr=y(cg(Xe,ba),void 0,a),xr(!1)},_closeSteps:function(){return xr(!0)},_errorSteps:Yr})})})}if(ft(u,ge._closedPromise,function(xr){D?bn(!0,xr):Wt(function(){return ca(m,xr)},!0,xr)}),ft(m,Xe._closedPromise,function(xr){G?bn(!0,xr):Wt(function(){return gi(u,xr)},!0,xr)}),Ui(u,ge._closedPromise,function(){S?bn():Wt(function(){return LS(Xe)})}),vi(m)||m._state==="closed"){var Wn=new TypeError("the destination writable stream closed before all data could be piped to it");G?bn(!0,Wn):Wt(function(){return gi(u,Wn)},!0,Wn)}T(bi());function Li(){var xr=qr;return y(qr,function(){return xr!==qr?Li():void 0})}function ft(xr,Yr,ba){xr._state==="errored"?ba(xr._storedError):A(Yr,ba)}function Ui(xr,Yr,ba){xr._state==="closed"?ba():w(Yr,ba)}function Wt(xr,Yr,ba){if(Er)return;Er=!0,m._state==="writable"&&!vi(m)?w(Li(),Ni):Ni();function Ni(){j(xr(),function(){return ga(Yr,ba)},function(Kn){return ga(!0,Kn)})}}function bn(xr,Yr){Er||(Er=!0,m._state==="writable"&&!vi(m)?w(Li(),function(){return ga(xr,Yr)}):ga(xr,Yr))}function ga(xr,Yr){ug(Xe),V(ge),se!==void 0&&se.removeEventListener("abort",Oa),xr?Wr(Yr):zr(void 0)}})}var Bo=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!sl(this))throw ll("desiredSize");return Vp(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!sl(this))throw ll("close");if(!ls(this))throw new TypeError("The stream is not in a state that permits close");wu(this)},u.prototype.enqueue=function(m){if(m===void 0&&(m=void 0),!sl(this))throw ll("enqueue");if(!ls(this))throw new TypeError("The stream is not in a state that permits enqueue");return cl(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!sl(this))throw ll("error");Hn(this,m)},u.prototype[Le]=function(m){ua(this);var S=this._cancelAlgorithm(m);return ul(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?(ul(this),ku(S)):xu(this),m._chunkSteps(D)}else J(S,m),xu(this)},u}();Object.defineProperties(Bo.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Bo.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function sl(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableStream")?!1:u instanceof Bo}function xu(u){var m=xg(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,xu(u))},function(D){Hn(u,D)})}}function xg(u){var m=u._controlledReadableStream;if(!ls(u)||!u._started)return!1;if($n(m)&&Ke(m)>0)return!0;var S=Vp(u);return S>0}function ul(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function wu(u){if(!!ls(u)){var m=u._controlledReadableStream;u._closeRequested=!0,u._queue.length===0&&(ul(u),ku(m))}}function cl(u,m){if(!!ls(u)){var S=u._controlledReadableStream;if($n(S)&&Ke(S)>0)Be(S,m,!1);else{var D=void 0;try{D=u._strategySizeAlgorithm(m)}catch(G){throw Hn(u,G),G}try{vt(u,m,D)}catch(G){throw Hn(u,G),G}}xu(u)}}function Hn(u,m){var S=u._controlledReadableStream;S._state==="readable"&&(ua(u),ul(u),jg(S,m))}function Vp(u){var m=u._controlledReadableStream._state;return m==="errored"?null:m==="closed"?0:u._strategyHWM-u._queueTotalSize}function rE(u){return!xg(u)}function ls(u){var m=u._controlledReadableStream._state;return!u._closeRequested&&m==="readable"}function wg(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,xu(m)},function(Er){Hn(m,Er)})}function aE(u,m,S,D){var G=Object.create(Bo.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)}),wg(u,G,se,ge,Xe,S,D)}function ll(u){return new TypeError("ReadableStreamDefaultController.prototype."+u+" can only be used on a ReadableStreamDefaultController")}function tE(u,m){return va(u._readableStreamController)?nE(u):iE(u)}function iE(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 bi(){if(D)return G=!0,h(void 0);D=!0;var ft={_chunkSteps:function(Ui){I(function(){G=!1;var Wt=Ui,bn=Ui;se||cl(qr._readableStreamController,Wt),ge||cl(zr._readableStreamController,bn),D=!1,G&&bi()})},_closeSteps:function(){D=!1,se||wu(qr._readableStreamController),ge||wu(zr._readableStreamController),(!se||!ge)&&Wr(void 0)},_errorSteps:function(){D=!1}};return nr(S,ft),h(void 0)}function ps(ft){if(se=!0,Xe=ft,ge){var Ui=wr([Xe,Er]),Wt=gi(u,Ui);Wr(Wt)}return Oa}function Wn(ft){if(ge=!0,Er=ft,se){var Ui=wr([Xe,Er]),Wt=gi(u,Ui);Wr(Wt)}return Oa}function Li(){}return qr=$p(Li,bi,ps),zr=$p(Li,bi,Wn),A(S._closedPromise,function(ft){Hn(qr._readableStreamController,ft),Hn(zr._readableStreamController,ft),(!se||!ge)&&Wr(void 0)}),[qr,zr]}function nE(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 bi(ga){A(ga._closedPromise,function(xr){ga===m&&(Ce(qr._readableStreamController,xr),Ce(zr._readableStreamController,xr),(!se||!ge)&&Wr(void 0))})}function ps(){Ve(m)&&(V(m),m=Gr(u),bi(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(Ni){Ce(qr._readableStreamController,Ni),Ce(zr._readableStreamController,Ni),Wr(gi(u,Ni));return}se||Se(qr._readableStreamController,Yr),ge||Se(zr._readableStreamController,ba),S=!1,D?Li():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 Wn(ga,xr){Je(m)&&(V(m),m=X(u),bi(m));var Yr=xr?zr:qr,ba=xr?qr:zr,Ni={_chunkSteps:function(Kn){I(function(){D=!1,G=!1;var hs=xr?ge:se,Eu=xr?se:ge;if(Eu)hs||Te(Yr._readableStreamController,Kn);else{var zg=void 0;try{zg=Ia(Kn)}catch(Yp){Ce(Yr._readableStreamController,Yp),Ce(ba._readableStreamController,Yp),Wr(gi(u,Yp));return}hs||Te(Yr._readableStreamController,Kn),Se(ba._readableStreamController,zg)}S=!1,D?Li():G&&ft()})},_closeSteps:function(Kn){S=!1;var hs=xr?ge:se,Eu=xr?se:ge;hs||Ie(Yr._readableStreamController),Eu||Ie(ba._readableStreamController),Kn!==void 0&&(hs||Te(Yr._readableStreamController,Kn),!Eu&&ba._readableStreamController._pendingPullIntos.length>0&&Qe(ba._readableStreamController,0)),(!hs||!Eu)&&Wr(void 0)},_errorSteps:function(){S=!1}};fr(m,ga,Ni)}function Li(){if(S)return D=!0,h(void 0);S=!0;var ga=Fe(qr._readableStreamController);return ga===null?ps():Wn(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?ps():Wn(ga._view,!0),h(void 0)}function Ui(ga){if(se=!0,Xe=ga,ge){var xr=wr([Xe,Er]),Yr=gi(u,xr);Wr(Yr)}return Oa}function Wt(ga){if(ge=!0,Er=ga,se){var xr=wr([Xe,Er]),Yr=gi(u,xr);Wr(Yr)}return Oa}function bn(){}return qr=_g(bn,Li,Ui),zr=_g(bn,ft,Wt),bi(m),[qr,zr]}function oE(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:sE(G,S,m+" has member 'cancel' that"),pull:se===void 0?void 0:uE(se,S,m+" has member 'pull' that"),start:ge===void 0?void 0:cE(ge,S,m+" has member 'start' that"),type:Xe===void 0?void 0:lE(Xe,m+" has member 'type' that")}}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 R(u,m,[D])}}function cE(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function lE(u,m){if(u=""+u,u!=="bytes")throw new TypeError(m+" '"+u+"' is not a valid enumeration value for ReadableStreamType");return u}function fE(u,m){Ze(u,m);var S=u==null?void 0:u.mode;return{mode:S===void 0?void 0:pE(S,m+" has member 'mode' that")}}function pE(u,m){if(u=""+u,u!=="byob")throw new TypeError(m+" '"+u+"' is not a valid enumeration value for ReadableStreamReaderMode");return u}function hE(u,m){Ze(u,m);var S=u==null?void 0:u.preventCancel;return{preventCancel:Boolean(S)}}function kg(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&&dE(se,m+" has member 'signal' that"),{preventAbort:Boolean(S),preventCancel:Boolean(D),preventClose:Boolean(G),signal:se}}function dE(u,m){if(!_(u))throw new TypeError(m+" is not an AbortSignal.")}function mE(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 gn=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=oE(m,"First parameter");if(Wp(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);aE(this,G,se,ge)}}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Vn(this))throw Io("locked");return $n(this)},enumerable:!1,configurable:!0}),u.prototype.cancel=function(m){return m===void 0&&(m=void 0),Vn(this)?$n(this)?d(new TypeError("Cannot cancel a stream that already has a reader")):gi(this,m):d(Io("cancel"))},u.prototype.getReader=function(m){if(m===void 0&&(m=void 0),!Vn(this))throw Io("getReader");var S=fE(m,"First parameter");return S.mode===void 0?Gr(this):X(this)},u.prototype.pipeThrough=function(m,S){if(S===void 0&&(S={}),!Vn(this))throw Io("pipeThrough");qe(m,1,"pipeThrough");var D=mE(m,"First parameter"),G=kg(S,"Second parameter");if($n(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=yg(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={}),!Vn(this))return d(Io("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=kg(S,"Second parameter")}catch(G){return d(G)}return $n(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")):yg(this,m,D.preventClose,D.preventAbort,D.preventCancel,D.signal)},u.prototype.tee=function(){if(!Vn(this))throw Io("tee");var m=tE(this);return wr(m)},u.prototype.values=function(m){if(m===void 0&&(m=void 0),!Vn(this))throw Io("values");var S=hE(m,"First parameter");return pr(this,S.preventCancel)},u}();Object.defineProperties(gn.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(gn.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(gn.prototype,r.asyncIterator,{value:gn.prototype.values,writable:!0,configurable:!0});function $p(u,m,S,D,G){D===void 0&&(D=1),G===void 0&&(G=function(){return 1});var se=Object.create(gn.prototype);Wp(se);var ge=Object.create(Bo.prototype);return wg(se,ge,u,m,S,D,G),se}function _g(u,m,S){var D=Object.create(gn.prototype);Wp(D);var G=Object.create(Ra.prototype);return Ee(D,G,u,m,S,0,void 0),D}function Wp(u){u._state="readable",u._reader=void 0,u._storedError=void 0,u._disturbed=!1}function Vn(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readableStreamController")?!1:u instanceof gn}function $n(u){return u._reader!==void 0}function gi(u,m){if(u._disturbed=!0,u._state==="closed")return h(void 0);if(u._state==="errored")return d(u._storedError);ku(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 ku(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 jg(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 Io(u){return new TypeError("ReadableStream.prototype."+u+" can only be used on a ReadableStream")}function Sg(u,m){Ze(u,m);var S=u==null?void 0:u.highWaterMark;return fe(S,"highWaterMark","QueuingStrategyInit"),{highWaterMark:we(S)}}var Eg=function(u){return u.byteLength};try{Object.defineProperty(Eg,"name",{value:"size",configurable:!0})}catch{}var _u=function(){function u(m){qe(m,1,"ByteLengthQueuingStrategy"),m=Sg(m,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=m.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!Pg(this))throw Ag("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!Pg(this))throw Ag("size");return Eg},enumerable:!1,configurable:!0}),u}();Object.defineProperties(_u.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(_u.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Ag(u){return new TypeError("ByteLengthQueuingStrategy.prototype."+u+" can only be used on a ByteLengthQueuingStrategy")}function Pg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_byteLengthQueuingStrategyHighWaterMark")?!1:u instanceof _u}var Tg=function(){return 1};try{Object.defineProperty(Tg,"name",{value:"size",configurable:!0})}catch{}var ju=function(){function u(m){qe(m,1,"CountQueuingStrategy"),m=Sg(m,"First parameter"),this._countQueuingStrategyHighWaterMark=m.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!Fg(this))throw Cg("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!Fg(this))throw Cg("size");return Tg},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:"CountQueuingStrategy",configurable:!0});function Cg(u){return new TypeError("CountQueuingStrategy.prototype."+u+" can only be used on a CountQueuingStrategy")}function Fg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_countQueuingStrategyHighWaterMark")?!1:u instanceof ju}function vE(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:gE(S,u,m+" has member 'flush' that"),readableType:D,start:G===void 0?void 0:bE(G,u,m+" has member 'start' that"),transform:se===void 0?void 0:yE(se,u,m+" has member 'transform' that"),writableType:ge}}function gE(u,m,S){return We(u,S),function(D){return R(u,m,[D])}}function bE(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function yE(u,m,S){return We(u,S),function(D,G){return R(u,m,[D,G])}}var Su=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=vE(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(bi){Wr=bi});xE(this,Oa,qr,zr,Xe,Er),kE(this,ge),ge.start!==void 0?Wr(ge.start(this._transformStreamController)):Wr(void 0)}return Object.defineProperty(u.prototype,"readable",{get:function(){if(!qg(this))throw Og("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"writable",{get:function(){if(!qg(this))throw Og("writable");return this._writable},enumerable:!1,configurable:!0}),u}();Object.defineProperties(Su.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Su.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function xE(u,m,S,D,G,se){function ge(){return m}function Xe(Oa){return SE(u,Oa)}function Er(Oa){return EE(u,Oa)}function qr(){return AE(u)}u._writable=ue(ge,Xe,qr,Er,S,D);function zr(){return PE(u)}function Wr(Oa){return pl(u,Oa),h(void 0)}u._readable=$p(ge,zr,Wr,G,se),u._backpressure=void 0,u._backpressureChangePromise=void 0,u._backpressureChangePromise_resolve=void 0,hl(u,!0),u._transformStreamController=void 0}function qg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_transformStreamController")?!1:u instanceof Su}function fl(u,m){Hn(u._readable._readableStreamController,m),pl(u,m)}function pl(u,m){Bg(u._transformStreamController),Dp(u._writable._writableStreamController,m),u._backpressure&&hl(u,!1)}function hl(u,m){u._backpressureChangePromise!==void 0&&u._backpressureChangePromise_resolve(),u._backpressureChangePromise=v(function(S){u._backpressureChangePromise_resolve=S}),u._backpressure=m}var fs=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!dl(this))throw ml("desiredSize");var m=this._controlledTransformStream._readable._readableStreamController;return Vp(m)},enumerable:!1,configurable:!0}),u.prototype.enqueue=function(m){if(m===void 0&&(m=void 0),!dl(this))throw ml("enqueue");Ig(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!dl(this))throw ml("error");_E(this,m)},u.prototype.terminate=function(){if(!dl(this))throw ml("terminate");jE(this)},u}();Object.defineProperties(fs.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(fs.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function dl(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledTransformStream")?!1:u instanceof fs}function wE(u,m,S,D){m._controlledTransformStream=u,u._transformStreamController=m,m._transformAlgorithm=S,m._flushAlgorithm=D}function kE(u,m){var S=Object.create(fs.prototype),D=function(se){try{return Ig(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)}),wE(u,S,D,G)}function Bg(u){u._transformAlgorithm=void 0,u._flushAlgorithm=void 0}function Ig(u,m){var S=u._controlledTransformStream,D=S._readable._readableStreamController;if(!ls(D))throw new TypeError("Readable side is not in a state that permits enqueue");try{cl(D,m)}catch(se){throw pl(S,se),S._readable._storedError}var G=rE(D);G!==S._backpressure&&hl(S,!0)}function _E(u,m){fl(u._controlledTransformStream,m)}function Rg(u,m){var S=u._transformAlgorithm(m);return P(S,void 0,function(D){throw fl(u._controlledTransformStream,D),D})}function jE(u){var m=u._controlledTransformStream,S=m._readable._readableStreamController;wu(S);var D=new TypeError("TransformStream terminated");pl(m,D)}function SE(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 Rg(S,m)})}return Rg(S,m)}function EE(u,m){return fl(u,m),h(void 0)}function AE(u){var m=u._readable,S=u._transformStreamController,D=S._flushAlgorithm();return Bg(S),P(D,function(){if(m._state==="errored")throw m._storedError;wu(m._readableStreamController)},function(G){throw fl(u,G),m._storedError})}function PE(u){return hl(u,!1),u._backpressureChangePromise}function ml(u){return new TypeError("TransformStreamDefaultController.prototype."+u+" can only be used on a TransformStreamDefaultController")}function Og(u){return new TypeError("TransformStream.prototype."+u+" can only be used on a TransformStream")}var Kp={ReadableStream:gn,ReadableStreamDefaultController:Bo,ReadableByteStreamController:Ra,ReadableStreamBYOBRequest:da,ReadableStreamDefaultReader:Ye,ReadableStreamBYOBReader:ne,WritableStream:H,WritableStreamDefaultController:Fo,WritableStreamDefaultWriter:cs,ByteLengthQueuingStrategy:_u,CountQueuingStrategy:ju,TransformStream:Su,TransformStreamDefaultController:fs};if(typeof t!="undefined")for(var Gp in Kp)Object.prototype.hasOwnProperty.call(Kp,Gp)&&Object.defineProperty(t,Gp,{value:Kp[Gp],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=_u,e.CountQueuingStrategy=ju,e.ReadableByteStreamController=Ra,e.ReadableStream=gn,e.ReadableStreamBYOBReader=ne,e.ReadableStreamBYOBRequest=da,e.ReadableStreamDefaultController=Bo,e.ReadableStreamDefaultReader=Ye,e.TransformStream=Su,e.TransformStreamDefaultController=fs,e.WritableStream=H,e.WritableStreamDefaultController=Fo,e.WritableStreamDefaultWriter=cs,Object.defineProperty(e,"__esModule",{value:!0})})});var Dn=O(Bt=>{"use strict";var uN=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function cN(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)cN(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 lN={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}},fN={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,lN)):(Bt.Buf8=Array,Bt.Buf16=Array,Bt.Buf32=Array,Bt.assign(Bt,fN))};Bt.setTyped(uN)});var h4=O(fu=>{"use strict";var pN=Dn(),hN=4,$8=0,W8=1,dN=2;function cu(e){for(var r=e.length;--r>=0;)e[r]=0}var mN=0,K8=1,vN=2,gN=3,bN=258,k0=29,Dc=256,Lc=Dc+1+k0,lu=30,_0=19,G8=2*Lc+1,es=15,j0=16,yN=7,S0=256,Y8=16,Z8=17,Q8=18,E0=[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],bp=[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],xN=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],X8=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],wN=512,Ln=new Array((Lc+2)*2);cu(Ln);var Uc=new Array(lu*2);cu(Uc);var Nc=new Array(wN);cu(Nc);var Mc=new Array(bN-gN+1);cu(Mc);var A0=new Array(k0);cu(A0);var yp=new Array(lu);cu(yp);function P0(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 J8,e4,r4;function T0(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}function a4(e){return e<256?Nc[e]:Nc[256+(e>>>7)]}function Hc(e,r){e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255}function Vt(e,r,a){e.bi_valid>j0-a?(e.bi_buf|=r<<e.bi_valid&65535,Hc(e,e.bi_buf),e.bi_buf=r>>j0-e.bi_valid,e.bi_valid+=a-j0):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=a)}function fn(e,r,a){Vt(e,a[r*2],a[r*2+1])}function t4(e,r){var a=0;do a|=e&1,e>>>=1,a<<=1;while(--r>0);return a>>>1}function kN(e){e.bi_valid===16?(Hc(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 _N(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<G8;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 i4(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]=t4(i[s]++,s))}}function jN(){var e,r,a,i,t,n=new Array(es+1);for(a=0,i=0;i<k0-1;i++)for(A0[i]=a,e=0;e<1<<E0[i];e++)Mc[a++]=i;for(Mc[a-1]=i,t=0,i=0;i<16;i++)for(yp[i]=t,e=0;e<1<<bp[i];e++)Nc[t++]=i;for(t>>=7;i<lu;i++)for(yp[i]=t<<7,e=0;e<1<<bp[i]-7;e++)Nc[256+t++]=i;for(r=0;r<=es;r++)n[r]=0;for(e=0;e<=143;)Ln[e*2+1]=8,e++,n[8]++;for(;e<=255;)Ln[e*2+1]=9,e++,n[9]++;for(;e<=279;)Ln[e*2+1]=7,e++,n[7]++;for(;e<=287;)Ln[e*2+1]=8,e++,n[8]++;for(i4(Ln,Lc+1,n),e=0;e<lu;e++)Uc[e*2+1]=5,Uc[e*2]=t4(e,5);J8=new P0(Ln,E0,Dc+1,Lc,es),e4=new P0(Uc,bp,0,lu,es),r4=new P0(new Array(0),xN,0,_0,yN)}function n4(e){var r;for(r=0;r<Lc;r++)e.dyn_ltree[r*2]=0;for(r=0;r<lu;r++)e.dyn_dtree[r*2]=0;for(r=0;r<_0;r++)e.bl_tree[r*2]=0;e.dyn_ltree[S0*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function o4(e){e.bi_valid>8?Hc(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 SN(e,r,a,i){o4(e),i&&(Hc(e,a),Hc(e,~a)),pN.arraySet(e.pending_buf,e.window,r,a,e.pending),e.pending+=a}function s4(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 C0(e,r,a){for(var i=e.heap[a],t=a<<1;t<=e.heap_len&&(t<e.heap_len&&s4(r,e.heap[t+1],e.heap[t],e.depth)&&t++,!s4(r,i,e.heap[t],e.depth));)e.heap[a]=e.heap[t],a=t,t<<=1;e.heap[a]=i}function u4(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?fn(e,t,r):(o=Mc[t],fn(e,o+Dc+1,r),s=E0[o],s!==0&&(t-=A0[o],Vt(e,t,s)),i--,o=a4(i),fn(e,o,a),s=bp[o],s!==0&&(i-=yp[o],Vt(e,i,s)));while(n<e.last_lit);fn(e,S0,r)}function F0(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=G8,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--)C0(e,a,o);l=n;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],C0(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++,C0(e,a,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],_N(e,r),i4(a,c,e.bl_count)}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),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[Y8*2]++):s<=10?e.bl_tree[Z8*2]++:e.bl_tree[Q8*2]++,s=0,t=n,o===0?(c=138,l=3):n===o?(c=6,l=3):(c=7,l=4))}function l4(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 fn(e,n,e.bl_tree);while(--s!=0);else n!==0?(n!==t&&(fn(e,n,e.bl_tree),s--),fn(e,Y8,e.bl_tree),Vt(e,s-3,2)):s<=10?(fn(e,Z8,e.bl_tree),Vt(e,s-3,3)):(fn(e,Q8,e.bl_tree),Vt(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 EN(e){var r;for(c4(e,e.dyn_ltree,e.l_desc.max_code),c4(e,e.dyn_dtree,e.d_desc.max_code),F0(e,e.bl_desc),r=_0-1;r>=3&&e.bl_tree[X8[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r}function AN(e,r,a,i){var t;for(Vt(e,r-257,5),Vt(e,a-1,5),Vt(e,i-4,4),t=0;t<i;t++)Vt(e,e.bl_tree[X8[t]*2+1],3);l4(e,e.dyn_ltree,r-1),l4(e,e.dyn_dtree,a-1)}function PN(e){var r=4093624447,a;for(a=0;a<=31;a++,r>>>=1)if(r&1&&e.dyn_ltree[a*2]!==0)return $8;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return W8;for(a=32;a<Dc;a++)if(e.dyn_ltree[a*2]!==0)return W8;return $8}var f4=!1;function TN(e){f4||(jN(),f4=!0),e.l_desc=new T0(e.dyn_ltree,J8),e.d_desc=new T0(e.dyn_dtree,e4),e.bl_desc=new T0(e.bl_tree,r4),e.bi_buf=0,e.bi_valid=0,n4(e)}function p4(e,r,a,i){Vt(e,(mN<<1)+(i?1:0),3),SN(e,r,a,!0)}function CN(e){Vt(e,K8<<1,3),fn(e,S0,Ln),kN(e)}function FN(e,r,a,i){var t,n,o=0;e.level>0?(e.strm.data_type===dN&&(e.strm.data_type=PN(e)),F0(e,e.l_desc),F0(e,e.d_desc),o=EN(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?p4(e,r,a,i):e.strategy===hN||n===t?(Vt(e,(K8<<1)+(i?1:0),3),u4(e,Ln,Uc)):(Vt(e,(vN<<1)+(i?1:0),3),AN(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),u4(e,e.dyn_ltree,e.dyn_dtree)),n4(e),i&&o4(e)}function qN(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[(Mc[a]+Dc+1)*2]++,e.dyn_dtree[a4(r)*2]++),e.last_lit===e.lit_bufsize-1}fu._tr_init=TN;fu._tr_stored_block=p4;fu._tr_flush_block=FN;fu._tr_tally=qN;fu._tr_align=CN});var q0=O((PZ,d4)=>{"use strict";function BN(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}d4.exports=BN});var B0=O((TZ,m4)=>{"use strict";function IN(){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 RN=IN();function ON(e,r,a,i){var t=RN,n=i+a;e^=-1;for(var o=i;o<n;o++)e=e>>>8^t[(e^r[o])&255];return e^-1}m4.exports=ON});var xp=O((CZ,v4)=>{"use strict";v4.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 S4=O(dn=>{"use strict";var It=Dn(),pi=h4(),g4=q0(),_o=B0(),zN=xp(),rs=0,DN=1,LN=3,jo=4,b4=5,pn=0,y4=1,hi=-2,UN=-3,I0=-5,NN=-1,MN=1,wp=2,HN=3,VN=4,$N=0,WN=2,kp=8,KN=9,GN=15,YN=8,ZN=29,QN=256,R0=QN+1+ZN,XN=30,JN=19,eM=2*R0+1,rM=15,Nr=3,So=258,zi=So+Nr+1,aM=32,_p=42,O0=69,jp=73,Sp=91,Ep=103,as=113,Vc=666,Ja=1,$c=2,ts=3,pu=4,tM=3;function Eo(e,r){return e.msg=zN[r],r}function x4(e){return(e<<1)-(e>4?9:0)}function Ao(e){for(var r=e.length;--r>=0;)e[r]=0}function Po(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){pi._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,Po(e.strm)}function Kr(e,r){e.pending_buf[e.pending++]=r}function Wc(e,r){e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255}function iM(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=g4(e.adler,r,t,a):e.state.wrap===2&&(e.adler=_o(e.adler,r,t,a)),e.next_in+=t,e.total_in+=t,t)}function w4(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-zi?e.strstart-(e.w_size-zi):0,l=e.window,f=e.w_mask,v=e.prev,h=e.strstart+So,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=So-(h-i),i=h-So,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-zi)){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=iM(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<zi&&e.strm.avail_in!==0)}function nM(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-zi&&(mt(e,!1),e.strm.avail_out===0))return Ja}return e.insert=0,r===jo?(mt(e,!0),e.strm.avail_out===0?ts:pu):(e.strstart>e.block_start&&(mt(e,!1),e.strm.avail_out===0),Ja)}function z0(e,r){for(var a,i;;){if(e.lookahead<zi){if(is(e),e.lookahead<zi&&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-zi&&(e.match_length=w4(e,a)),e.match_length>=Nr)if(i=pi._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=pi._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===jo?(mt(e,!0),e.strm.avail_out===0?ts:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:$c}function hu(e,r){for(var a,i,t;;){if(e.lookahead<zi){if(is(e),e.lookahead<zi&&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-zi&&(e.match_length=w4(e,a),e.match_length<=5&&(e.strategy===MN||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=pi._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=pi._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=pi._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Nr-1?e.strstart:Nr-1,r===jo?(mt(e,!0),e.strm.avail_out===0?ts:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:$c}function oM(e,r){for(var a,i,t,n,o=e.window;;){if(e.lookahead<=So){if(is(e),e.lookahead<=So&&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+So;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=So-(n-t),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Nr?(a=pi._tr_tally(e,1,e.match_length-Nr),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(a=pi._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===jo?(mt(e,!0),e.strm.avail_out===0?ts:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:$c}function sM(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=pi._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===jo?(mt(e,!0),e.strm.avail_out===0?ts:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:$c}function hn(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 du;du=[new hn(0,0,0,0,nM),new hn(4,4,8,4,z0),new hn(4,5,16,8,z0),new hn(4,6,32,32,z0),new hn(4,4,16,16,hu),new hn(8,16,32,32,hu),new hn(8,16,128,128,hu),new hn(8,32,128,256,hu),new hn(32,128,258,1024,hu),new hn(32,258,258,4096,hu)];function uM(e){e.window_size=2*e.w_size,Ao(e.head),e.max_lazy_match=du[e.level].max_lazy,e.good_match=du[e.level].good_length,e.nice_match=du[e.level].nice_length,e.max_chain_length=du[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 cM(){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=kp,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(eM*2),this.dyn_dtree=new It.Buf16((2*XN+1)*2),this.bl_tree=new It.Buf16((2*JN+1)*2),Ao(this.dyn_ltree),Ao(this.dyn_dtree),Ao(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new It.Buf16(rM+1),this.heap=new It.Buf16(2*R0+1),Ao(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new It.Buf16(2*R0+1),Ao(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 k4(e){var r;return!e||!e.state?Eo(e,hi):(e.total_in=e.total_out=0,e.data_type=WN,r=e.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?_p:as,e.adler=r.wrap===2?0:1,r.last_flush=rs,pi._tr_init(r),pn)}function _4(e){var r=k4(e);return r===pn&&uM(e.state),r}function lM(e,r){return!e||!e.state||e.state.wrap!==2?hi:(e.state.gzhead=r,pn)}function j4(e,r,a,i,t,n){if(!e)return hi;var o=1;if(r===NN&&(r=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),t<1||t>KN||a!==kp||i<8||i>15||r<0||r>9||n<0||n>VN)return Eo(e,hi);i===8&&(i=9);var s=new cM;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,_4(e)}function fM(e,r){return j4(e,r,kp,GN,YN,$N)}function pM(e,r){var a,i,t,n;if(!e||!e.state||r>b4||r<0)return e?Eo(e,hi):hi;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===Vc&&r!==jo)return Eo(e,e.avail_out===0?I0:hi);if(i.strm=e,a=i.last_flush,i.last_flush=r,i.status===_p)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>=wp||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=_o(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=O0):(Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,i.level===9?2:i.strategy>=wp||i.level<2?4:0),Kr(i,tM),i.status=as);else{var o=kp+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=wp||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=aM),o+=31-o%31,i.status=as,Wc(i,o),i.strstart!==0&&(Wc(i,e.adler>>>16),Wc(i,e.adler&65535)),e.adler=1}if(i.status===O0)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=_o(e.adler,i.pending_buf,i.pending-t,t)),Po(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=_o(e.adler,i.pending_buf,i.pending-t,t)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=jp)}else i.status=jp;if(i.status===jp)if(i.gzhead.name){t=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=_o(e.adler,i.pending_buf,i.pending-t,t)),Po(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=_o(e.adler,i.pending_buf,i.pending-t,t)),n===0&&(i.gzindex=0,i.status=Sp)}else i.status=Sp;if(i.status===Sp)if(i.gzhead.comment){t=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=_o(e.adler,i.pending_buf,i.pending-t,t)),Po(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=_o(e.adler,i.pending_buf,i.pending-t,t)),n===0&&(i.status=Ep)}else i.status=Ep;if(i.status===Ep&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&Po(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(Po(e),e.avail_out===0)return i.last_flush=-1,pn}else if(e.avail_in===0&&x4(r)<=x4(a)&&r!==jo)return Eo(e,I0);if(i.status===Vc&&e.avail_in!==0)return Eo(e,I0);if(e.avail_in!==0||i.lookahead!==0||r!==rs&&i.status!==Vc){var c=i.strategy===wp?sM(i,r):i.strategy===HN?oM(i,r):du[i.level].func(i,r);if((c===ts||c===pu)&&(i.status=Vc),c===Ja||c===ts)return e.avail_out===0&&(i.last_flush=-1),pn;if(c===$c&&(r===DN?pi._tr_align(i):r!==b4&&(pi._tr_stored_block(i,0,0,!1),r===LN&&(Ao(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),Po(e),e.avail_out===0))return i.last_flush=-1,pn}return r!==jo?pn:i.wrap<=0?y4:(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)):(Wc(i,e.adler>>>16),Wc(i,e.adler&65535)),Po(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?pn:y4)}function hM(e){var r;return!e||!e.state?hi:(r=e.state.status,r!==_p&&r!==O0&&r!==jp&&r!==Sp&&r!==Ep&&r!==as&&r!==Vc?Eo(e,hi):(e.state=null,r===as?Eo(e,UN):pn))}function dM(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!==_p||i.lookahead))return hi;for(o===1&&(e.adler=g4(e.adler,r,a,0)),i.wrap=0,a>=i.w_size&&(o===0&&(Ao(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,pn}dn.deflateInit=fM;dn.deflateInit2=j4;dn.deflateReset=_4;dn.deflateResetKeep=k4;dn.deflateSetHeader=lM;dn.deflate=pM;dn.deflateEnd=hM;dn.deflateSetDictionary=dM;dn.deflateInfo="pako deflate (from Nodeca project)"});var D0=O(mu=>{"use strict";var Ap=Dn(),E4=!0,A4=!0;try{String.fromCharCode.apply(null,[0])}catch{E4=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{A4=!1}var Kc=new Ap.Buf8(256);for(Un=0;Un<256;Un++)Kc[Un]=Un>=252?6:Un>=248?5:Un>=240?4:Un>=224?3:Un>=192?2:1;var Un;Kc[254]=Kc[254]=1;mu.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 Ap.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 P4(e,r){if(r<65534&&(e.subarray&&A4||!e.subarray&&E4))return String.fromCharCode.apply(null,Ap.shrinkBuf(e,r));for(var a="",i=0;i<r;i++)a+=String.fromCharCode(e[i]);return a}mu.buf2binstring=function(e){return P4(e,e.length)};mu.binstring2buf=function(e){for(var r=new Ap.Buf8(e.length),a=0,i=r.length;a<i;a++)r[a]=e.charCodeAt(a);return r};mu.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=Kc[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 P4(s,i)};mu.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+Kc[e[a]]>r?a:r}});var L0=O((BZ,T4)=>{"use strict";function mM(){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}T4.exports=mM});var B4=O(Zc=>{"use strict";var Gc=S4(),Yc=Dn(),U0=D0(),N0=xp(),vM=L0(),C4=Object.prototype.toString,gM=0,M0=4,vu=0,F4=1,q4=2,bM=-1,yM=0,xM=8;function ns(e){if(!(this instanceof ns))return new ns(e);this.options=Yc.assign({level:bM,method:xM,chunkSize:16384,windowBits:15,memLevel:8,strategy:yM,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 vM,this.strm.avail_out=0;var a=Gc.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(a!==vu)throw new Error(N0[a]);if(r.header&&Gc.deflateSetHeader(this.strm,r.header),r.dictionary){var i;if(typeof r.dictionary=="string"?i=U0.string2buf(r.dictionary):C4.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,a=Gc.deflateSetDictionary(this.strm,i),a!==vu)throw new Error(N0[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?M0:gM,typeof e=="string"?a.input=U0.string2buf(e):C4.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 Yc.Buf8(i),a.next_out=0,a.avail_out=i),t=Gc.deflate(a,n),t!==F4&&t!==vu)return this.onEnd(t),this.ended=!0,!1;(a.avail_out===0||a.avail_in===0&&(n===M0||n===q4))&&(this.options.to==="string"?this.onData(U0.buf2binstring(Yc.shrinkBuf(a.output,a.next_out))):this.onData(Yc.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||a.avail_out===0)&&t!==F4);return n===M0?(t=Gc.deflateEnd(this.strm),this.onEnd(t),this.ended=!0,t===vu):(n===q4&&(this.onEnd(vu),a.avail_out=0),!0)};ns.prototype.onData=function(e){this.chunks.push(e)};ns.prototype.onEnd=function(e){e===vu&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Yc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function H0(e,r){var a=new ns(r);if(a.push(e,!0),a.err)throw a.msg||N0[a.err];return a.result}function wM(e,r){return r=r||{},r.raw=!0,H0(e,r)}function kM(e,r){return r=r||{},r.gzip=!0,H0(e,r)}Zc.Deflate=ns;Zc.deflate=H0;Zc.deflateRaw=wM;Zc.gzip=kM});var R4=O((RZ,I4)=>{"use strict";var Pp=30,_M=12;I4.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=Pp;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=Pp;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=Pp;break e}break}}else if((F&64)==0){I=w[(I&65535)+(y&(1<<F)-1)];continue r}else if(F&32){i.mode=_M;break e}else{r.msg="invalid literal/length code",i.mode=Pp;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 M4=O((OZ,N4)=>{"use strict";var O4=Dn(),gu=15,z4=852,D4=592,L4=0,V0=1,U4=2,jM=[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],SM=[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],EM=[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],AM=[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];N4.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 O4.Buf16(gu+1),$=new O4.Buf16(gu+1),Q=null,re=0,je,me,ce;for(f=0;f<=gu;f++)Z[f]=0;for(v=0;v<t;v++)Z[a[i+v]]++;for(y=l,d=gu;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<=gu;f++)if(A<<=1,A-=Z[f],A<0)return-1;if(A>0&&(r===L4||d!==1))return-1;for($[1]=0,f=1;f<gu;f++)$[f+1]=$[f]+Z[f];for(v=0;v<t;v++)a[i+v]!==0&&(s[$[a[i+v]]++]=v);if(r===L4?(M=Q=s,V=19):r===V0?(M=jM,K-=257,Q=SM,re-=257,V=256):(M=EM,Q=AM,V=-1),T=0,v=0,f=h,U=o,j=y,w=0,R=-1,P=1<<y,z=P-1,r===V0&&P>z4||r===U4&&P>D4)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===V0&&P>z4||r===U4&&P>D4)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 _S=O(Di=>{"use strict";var Xt=Dn(),$0=q0(),mn=B0(),PM=R4(),Qc=M4(),TM=0,H4=1,V4=2,$4=4,CM=5,Tp=6,os=0,FM=1,qM=2,di=-2,W4=-3,W0=-4,BM=-5,K4=8,G4=1,Y4=2,Z4=3,Q4=4,X4=5,J4=6,eS=7,rS=8,aS=9,tS=10,Cp=11,Nn=12,K0=13,iS=14,G0=15,nS=16,oS=17,sS=18,uS=19,Fp=20,qp=21,cS=22,lS=23,fS=24,pS=25,hS=26,Y0=27,dS=28,mS=29,ma=30,Z0=31,IM=32,RM=852,OM=592,zM=15,DM=zM;function vS(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function LM(){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 gS(e){var r;return!e||!e.state?di:(r=e.state,e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=G4,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(RM),r.distcode=r.distdyn=new Xt.Buf32(OM),r.sane=1,r.back=-1,os)}function bS(e){var r;return!e||!e.state?di:(r=e.state,r.wsize=0,r.whave=0,r.wnext=0,gS(e))}function yS(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))?di:(i.window!==null&&i.wbits!==r&&(i.window=null),i.wrap=a,i.wbits=r,bS(e))}function xS(e,r){var a,i;return e?(i=new LM,e.state=i,i.window=null,a=yS(e,r),a!==os&&(e.state=null),a):di}function UM(e){return xS(e,DM)}var wS=!0,Q0,X0;function NM(e){if(wS){var r;for(Q0=new Xt.Buf32(512),X0=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(Qc(H4,e.lens,0,288,Q0,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;Qc(V4,e.lens,0,32,X0,0,e.work,{bits:5}),wS=!1}e.lencode=Q0,e.lenbits=9,e.distcode=X0,e.distbits=5}function kS(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 MM(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 di;a=e.state,a.mode===Nn&&(a.mode=K0),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 G4:if(a.wrap===0){a.mode=K0;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=mn(a.check,M,2,0),l=0,f=0,a.mode=Y4;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)!==K4){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?tS:Nn,l=0,f=0;break;case Y4:for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(a.flags=l,(a.flags&255)!==K4){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=mn(a.check,M,2,0)),l=0,f=0,a.mode=Z4;case Z4: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=mn(a.check,M,4,0)),l=0,f=0,a.mode=Q4;case Q4: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=mn(a.check,M,2,0)),l=0,f=0,a.mode=X4;case X4: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=mn(a.check,M,2,0)),l=0,f=0}else a.head&&(a.head.extra=null);a.mode=J4;case J4: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=mn(a.check,i,d,n)),s-=d,n+=d,a.length-=d),a.length))break e;a.length=0,a.mode=eS;case eS: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=mn(a.check,i,d,n)),s-=d,n+=d,z)break e}else a.head&&(a.head.name=null);a.length=0,a.mode=rS;case rS: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=mn(a.check,i,d,n)),s-=d,n+=d,z)break e}else a.head&&(a.head.comment=null);a.mode=aS;case aS: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=Nn;break;case tS:for(;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}e.adler=a.check=vS(l),l=0,f=0,a.mode=Cp;case Cp: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,qM;e.adler=a.check=1,a.mode=Nn;case Nn:if(r===CM||r===Tp)break e;case K0:if(a.last){l>>>=f&7,f-=f&7,a.mode=Y0;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=iS;break;case 1:if(NM(a),a.mode=Fp,r===Tp){l>>>=2,f-=2;break e}break;case 2:a.mode=oS;break;case 3:e.msg="invalid block type",a.mode=ma}l>>>=2,f-=2;break;case iS: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=G0,r===Tp)break e;case G0:a.mode=nS;case nS: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=Nn;break;case oS: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=sS;case sS: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=Qc(TM,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=uS;case uS: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=Qc(H4,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=Qc(V4,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=Fp,r===Tp)break e;case Fp:a.mode=qp;case qp: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,PM(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===Nn&&(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=hS;break}if(P&32){a.back=-1,a.mode=Nn;break}if(P&64){e.msg="invalid literal/length code",a.mode=ma;break}a.extra=P&15,a.mode=cS;case cS: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=lS;case lS: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=fS;case fS: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=pS;case pS: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=qp);break;case hS:if(c===0)break e;t[o++]=a.length,c--,a.mode=qp;break;case Y0: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?mn(a.check,t,h,o-h):$0(a.check,t,h,o-h)),h=c,(a.flags?l:vS(l))!==a.check){e.msg="incorrect data check",a.mode=ma;break}l=0,f=0}a.mode=dS;case dS: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=mS;case mS:U=FM;break e;case ma:U=W4;break e;case Z0:return W0;case IM:default:return di}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<Y0||r!==$4))&&kS(e,e.output,e.next_out,h-e.avail_out)?(a.mode=Z0,W0):(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?mn(a.check,t,h,e.next_out-h):$0(a.check,t,h,e.next_out-h)),e.data_type=a.bits+(a.last?64:0)+(a.mode===Nn?128:0)+(a.mode===Fp||a.mode===G0?256:0),(v===0&&h===0||r===$4)&&U===os&&(U=BM),U)}function HM(e){if(!e||!e.state)return di;var r=e.state;return r.window&&(r.window=null),e.state=null,os}function VM(e,r){var a;return!e||!e.state||(a=e.state,(a.wrap&2)==0)?di:(a.head=r,r.done=!1,os)}function $M(e,r){var a=r.length,i,t,n;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==Cp)?di:i.mode===Cp&&(t=1,t=$0(t,r,a,0),t!==i.check)?W4:(n=kS(e,r,a,a),n?(i.mode=Z0,W0):(i.havedict=1,os))}Di.inflateReset=bS;Di.inflateReset2=yS;Di.inflateResetKeep=gS;Di.inflateInit=UM;Di.inflateInit2=xS;Di.inflate=MM;Di.inflateEnd=HM;Di.inflateGetHeader=VM;Di.inflateSetDictionary=$M;Di.inflateInfo="pako inflate (from Nodeca project)"});var J0=O((DZ,jS)=>{"use strict";jS.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 ES=O((LZ,SS)=>{"use strict";function WM(){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}SS.exports=WM});var PS=O(Jc=>{"use strict";var bu=_S(),Xc=Dn(),Bp=D0(),Ba=J0(),eg=xp(),KM=L0(),GM=ES(),AS=Object.prototype.toString;function ss(e){if(!(this instanceof ss))return new ss(e);this.options=Xc.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 KM,this.strm.avail_out=0;var a=bu.inflateInit2(this.strm,r.windowBits);if(a!==Ba.Z_OK)throw new Error(eg[a]);if(this.header=new GM,bu.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=Bp.string2buf(r.dictionary):AS.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(a=bu.inflateSetDictionary(this.strm,r.dictionary),a!==Ba.Z_OK)))throw new Error(eg[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=Bp.binstring2buf(e):AS.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 Xc.Buf8(i),a.next_out=0,a.avail_out=i),n=bu.inflate(a,Ba.Z_NO_FLUSH),n===Ba.Z_NEED_DICT&&t&&(n=bu.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=Bp.utf8border(a.output,a.next_out),c=a.next_out-s,l=Bp.buf2string(a.output,s),a.next_out=c,a.avail_out=i-c,c&&Xc.arraySet(a.output,a.output,s,c,0),this.onData(l)):this.onData(Xc.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=bu.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=Xc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function rg(e,r){var a=new ss(r);if(a.push(e,!0),a.err)throw a.msg||eg[a.err];return a.result}function YM(e,r){return r=r||{},r.raw=!0,rg(e,r)}Jc.Inflate=ss;Jc.inflate=rg;Jc.inflateRaw=YM;Jc.ungzip=rg});var FS=O((NZ,CS)=>{"use strict";var ZM=Dn().assign,QM=B4(),XM=PS(),JM=J0(),TS={};ZM(TS,QM,XM,JM);CS.exports=TS});Zp(exports);var Mi=typeof process!="object"||String(process)!=="[object process]"||process.browser,Qp={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global},za=Qp.global||Qp.self||Qp.window;var Ng={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"]=Ng||{};function jr(e,r,a){return r<=e&&e<=a}function DE(e,r){return e.indexOf(r)!==-1}var xn=Math.floor;function vl(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function LE(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 UE(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 Xp(e){this.tokens=[].slice.call(e),this.tokens.reverse()}Xp.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 yi(e){throw TypeError("The code point "+e+" could not be encoded.")}function NE(){}NE.prototype={handler:function(e,r){}};function ME(){}ME.prototype={handler:function(e,r){}};function Jp(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(eh,e)?eh[e]:null}var Mg=[{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"}],eh={};Mg.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(a){eh[a]=r})})});var zt={},Dt={};function ds(e,r){return r&&r[e]||null}function ms(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 HE(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 VE(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 $E(e){rh=rh||At("jis0208").map(function(a,i){return jr(i,8272,8835)?null:a});var r=rh;return r.indexOf(e)}var rh;function WE(e){ah=ah||At("big5").map(function(a,i){return i<(161-129)*157?null:a});var r=ah;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):ms(e,r)}var ah,Hg="utf-8";function Ro(e,r){if(!(this instanceof Ro))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):Hg,r=vl(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var a=Jp(e);if(a===null||a.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Dt[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(Ro.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(Ro.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(Ro.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));Ro.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=vl(a),this._do_not_flush||(this._decoder=Dt[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(a.stream);for(var t=new Xp(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 DE(["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)),UE(l)}return c.call(this,n)};function Tu(e,r){if(!(this instanceof Tu))throw TypeError("Called as a function. Did you forget 'new'?");r=vl(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):Hg;var i=Jp(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!zt[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");a._encoding=i}else a._encoding=Jp("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(Tu.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});Tu.prototype.encode=function(r,a){r=r===void 0?"":String(r),a=vl(a),this._do_not_flush||(this._encoder=zt[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(a.stream);for(var i=new Xp(LE(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 KE(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 GE(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}}zt["UTF-8"]=function(e){return new GE(e)};Dt["UTF-8"]=function(e){return new KE(e)};function YE(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 ZE(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Dr)return ia;if(ei(t))return t;var n=ms(t,e);return n===null&&yi(t),n+128}}(function(){"encoding-indexes"in global&&Mg.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var a=r.name,i=At(a.toLowerCase());Dt[a]=function(t){return new YE(i,t)},zt[a]=function(t){return new ZE(i,t)}})})})();Dt.GBK=function(e){return new Vg(e)};zt.GBK=function(e){return new $g(e,!0)};function Vg(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=HE((((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:ds(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 $g(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 yi(t);if(r&&t===8364)return 128;var n=ms(t,At("gb18030"));if(n!==null){var o=xn(n/190)+129,s=n%190,c=s<63?64:65;return[o,s+c]}if(r)return yi(t);n=VE(t);var l=xn(n/10/126/10);n=n-l*10*126*10;var f=xn(n/10/126);n=n-f*10*126;var v=xn(n/10),h=n-v*10;return[l+129,f+48,v+129,h+48]}}zt.gb18030=function(e){return new $g(e)};Dt.gb18030=function(e){return new Vg(e)};function QE(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:ds(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 XE(e){var r=e.fatal;this.handler=function(a,i){if(i===Dr)return ia;if(ei(i))return i;var t=WE(i);if(t===null)return yi(i);var n=xn(t/157)+129;if(n<161)return yi(i);var o=t%157,s=o<63?64:98;return[n,o+s]}}zt.Big5=function(e){return new XE(e)};Dt.Big5=function(e){return new QE(e)};function JE(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=ds((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 e9(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=ms(i,At("jis0208"));if(t===null)return yi(i);var n=xn(t/94)+161,o=t%94+161;return[n,o]}}zt["EUC-JP"]=function(e){return new e9(e)};Dt["EUC-JP"]=function(e){return new JE(e)};function r9(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=ds(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 a9(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 yi(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=ms(n,At("jis0208"));if(o===null)return yi(n);if(i!==a.jis0208)return t.prepend(n),i=a.jis0208,[27,36,66];var s=xn(o/94)+33,c=o%94+33;return[s,c]}}zt["ISO-2022-JP"]=function(e){return new a9(e)};Dt["ISO-2022-JP"]=function(e){return new r9(e)};function t9(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:ds(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 i9(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=$E(i);if(t===null)return yi(i);var n=xn(t/188),o=n<31?129:193,s=t%188,c=s<63?64:65;return[n+o,s+c]}}zt.Shift_JIS=function(e){return new i9(e)};Dt.Shift_JIS=function(e){return new t9(e)};function n9(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:ds(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 o9(e){var r=e.fatal;this.handler=function(a,i){if(i===Dr)return ia;if(ei(i))return i;var t=ms(i,At("euc-kr"));if(t===null)return yi(i);var n=xn(t/190)+129,o=t%190+65;return[n,o]}}zt["EUC-KR"]=function(e){return new o9(e)};Dt["EUC-KR"]=function(e){return new n9(e)};function gl(e,r){var a=e>>8,i=e&255;return r?[a,i]:[i,a]}function Wg(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(gl(s,e)),Lr(a))}return jr(s,55296,56319)?(t=s,null):jr(s,56320,57343)?Lr(a):s}}function Kg(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Dr)return ia;if(jr(t,0,65535))return gl(t,e);var n=gl((t-65536>>10)+55296,e),o=gl((t-65536&1023)+56320,e);return n.concat(o)}}zt["UTF-16BE"]=function(e){return new Kg(!0,e)};Dt["UTF-16BE"]=function(e){return new Wg(!0,e)};zt["UTF-16LE"]=function(e){return new Kg(!1,e)};Dt["UTF-16LE"]=function(e){return new Wg(!1,e)};function s9(e){var r=e.fatal;this.handler=function(a,i){return i===Dr?ia:Jt(i)?i:63360+i-128}}function u9(e){var r=e.fatal;this.handler=function(a,i){return i===Dr?ia:ei(i)?i:jr(i,63360,63487)?i-63360+128:yi(i)}}zt["x-user-defined"]=function(e){return new u9(e)};Dt["x-user-defined"]=function(e){return new s9(e)};var c9="rejected",l9="fulfilled";function Gg(e){let r=e.map(a=>a.then(i=>({status:l9,value:i})).catch(i=>({status:c9,reason:i})));return Promise.all(r)}function bl(e){return Buffer.from(e).toString("base64")}function th(e){return Buffer.from(e,"base64").toString("ascii")}var ri=class{constructor(r){this.map={},r instanceof ri?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=Cu(r),a=Yg(a);let i=this.map[r];this.map[r]=i?`${i}, ${a}`:a}delete(r){delete this.map[Cu(r)]}get(r){return r=Cu(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(Cu(r))}set(r,a){this.map[Cu(r)]=Yg(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)}),ih(r)}values(){let r=[];return this.forEach(function(a){r.push(a)}),ih(r)}entries(){let r=[];return this.forEach(function(a,i){r.push([i,a])}),ih(r)}*[Symbol.iterator](){yield*this.entries()}};function Cu(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 Yg(e){return typeof e!="string"&&(e=String(e)),e}function ih(e){let r={next(){let a=e.shift();return{done:a===void 0,value:a}}};return r[Symbol.iterator]=function(){return r},r}function nh(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var yl=Ot(require("zlib"));var f9=e=>e&&e instanceof ArrayBuffer,p9=e=>e&&e instanceof Buffer;function Zg(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:oh(a),mimeType:i}}function oh(e){if(f9(e))return e;if(p9(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 Qg(e,r){switch(r.get("content-encoding")){case"br":return e.pipe(yl.default.createBrotliDecompress());case"gzip":return e.pipe(yl.default.createGunzip());case"deflate":return e.pipe(yl.default.createDeflate());default:return e}}async function Xg(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(oh(t))}),e.on("end",()=>{let t=h9(r);a(t)})})}function h9(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 uh=Ot(require("stream")),d9=e=>typeof e=="boolean",Jg=e=>typeof e=="function",m9=e=>e!==null&&typeof e=="object",sh=e=>m9(e)&&Jg(e.read)&&Jg(e.pipe)&&d9(e.readable),xi=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 ri((a==null?void 0:a.headers)||{}),sh(r)?this._body=Qg(r,i):typeof r=="string"?this._body=uh.Readable.from([new TextEncoder().encode(r)]):this._body=uh.Readable.from([r||new ArrayBuffer(0)])}get body(){return nh(!this.bodyUsed),nh(sh(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return sh(this._body)?await Xg(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 eb=Ot(require("http")),rb=Ot(require("https"));var ch=Ot(require("fs"));async function lh(e,r){let a=e.split("?")[0];try{let i=await new Promise((s,c)=>{let l=ch.default.createReadStream(a,{encoding:null});l.once("readable",()=>s(l)),l.on("error",f=>c(f))}),t=200,n="OK",o=v9(a);return new xi(i,{headers:o,status:t,statusText:n,url:e})}catch(i){let t=400,n=i.message,o={};return new xi(i.message,{headers:o,status:t,statusText:n,url:e})}}function v9(e){let r={};if(!r["content-length"]){let a=ch.default.statSync(e);r["content-length"]=a.size}return e.endsWith(".gz")&&(e=e.slice(0,-3),r["content-encoding"]="gzip"),new ri(r)}var fh=e=>e.startsWith("data:"),g9=e=>e.startsWith("http:")||e.startsWith("https:");async function Fu(e,r){try{if(!g9(e)&&!fh(e))return await lh(e,r);if(fh(e)){let{arrayBuffer:l,mimeType:f}=Zg(e);return new xi(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 b9(i,r),n=k9(e,t,a),{status:o,statusText:s}=w9(t),c=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&c){let l=y9(e,n.get("location"));return await Fu(l,r)}return new xi(t,{headers:n,status:o,statusText:s,url:e})}catch(a){return new xi(null,{status:400,statusText:String(a),url:e})}}async function b9(e,r){return await new Promise((a,i)=>{let t=x9(e,r),n=e.startsWith("https:")?rb.default.request(t,o=>a(o)):eb.default.request(t,o=>a(o));n.on("error",o=>i(o)),n.end()})}function y9(e,r){if(r.startsWith("http"))return r;let a=new URL(e);return a.pathname=r,a.href}function x9(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 Pu(yn(yn({hostname:t.hostname,path:t.pathname,method:"GET"},r),r==null?void 0:r.fetch),{headers:i,port:t.port})}function w9(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function k9(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=_9(e);Number.isFinite(t)&&(i["content-length"]=t)}return Object.assign(i,a),new ri(i)}function _9(e){return fh(e)?e.length-"data:".length:null}var Qy=Ot(Yy()),Xy=Ot(Lu());function Zy(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function z7(e,r){let a=r.type?r.type.replace("image/",""):"jpeg",i=(0,Xy.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,Qy.default)(i,a,r)}function cd(e,r){let a=z7(e,r);return new Promise(i=>{let t=[];a.on("data",n=>t.push(n)),a.on("end",()=>{let n=Buffer.concat(t);i(Zy(n))})})}var F8=Ot(C8()),q8=["image/png","image/jpeg","image/gif"];async function h0(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 YU(a,r)}function YU(e,r){return new Promise(a=>(0,F8.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 R8=Ot(I8());delete global.ReadableStream;var Rc=class extends R8.ReadableStream{};var d0=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 m0=class extends Rc{constructor(r){super(new d0(r.values()),{type:"bytes"});this._chunks=r}async*[Symbol.asyncIterator](r){let a=this.getReader();yield*this._chunks,a.releaseLock()}};var wo=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 wo)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=ZU(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 wo([],{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 m0(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 ZU(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}var v0=class extends wo{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 XU=!Mi||!("TextEncoder"in za);XU&&(za.TextEncoder=Tu);var JU=!Mi||!("TextDecoder"in za);JU&&(za.TextDecoder=Ro);!Mi&&!("atob"in za)&&bl&&(za.atob=bl);!Mi&&!("btoa"in za)&&th&&(za.btoa=th);!Mi&&!("Headers"in za)&&ri&&(za.Headers=ri);!Mi&&!("Response"in za)&&xi&&(za.Response=xi);!Mi&&!("fetch"in za)&&Fu&&(za.fetch=Fu);!Mi&&!("_encodeImageNode"in za)&&cd&&(za._encodeImageNode=cd);!Mi&&!("_parseImageNode"in za)&&h0&&(za._parseImageNode=h0,za._imageFormatsNode=q8);"allSettled"in Promise||(Promise.allSettled=Gg);var cn={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},O8=cn.self||cn.window||cn.global||{},z8=cn.window||cn.self||cn.global||{},D8=cn.global||cn.self||cn.window||{},L8=cn.document||{};var zn=Boolean(typeof process!="object"||String(process)!=="[object process]"||process.browser);var U8=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),eN=U8&&parseFloat(U8[1])||0;function N8(...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 g0(e){let r=[];for await(let a of e)r.push(a);return N8(...r)}function M8(e){return Buffer.isBuffer(e)?new Uint8Array(e.buffer,e.byteOffset,e.length).slice().buffer:e}function H8(e){return e&&typeof e=="object"&&e.isBuffer}function ou(e){if(H8(e))return M8(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 su(e){return r=>new Promise((a,i)=>e(r,(t,n)=>t?i(t):a(n)))}var ln={};OE(ln,{dirname:()=>aN,filename:()=>rN,join:()=>tN,resolve:()=>iN});function V8(){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 rN(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(r+1):""}function aN(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(0,r):""}function tN(...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 iN(...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=V8()),o=t),o.length!==0&&(a=`${o}/${a}`,i=o.charCodeAt(0)===Oc)}return a=nN(a,!i),i?`/${a}`:a.length>0?a:"."}var Oc=47,b0=46;function nN(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)!==b0||a.charCodeAt(a.length-2)!==b0){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===b0&&t!==-1?++t:t=-1}return a}var y0="Tile converter does not work in browser, only in node js environment";var uu=Ot(require("fs")),x0=class{constructor(r,a){this.read=(r,a,i,t)=>new Promise(n=>{(0,uu.read)(this.fileDescriptor,r,a,i,t,(o,s,c)=>n({bytesRead:s,buffer:c}))});this.fileDescriptor=r,this.stats=a}get stat(){return this.stats}},vp=x0;vp.open=async r=>{let[a,i]=await Promise.all([new Promise(t=>{(0,uu.open)(r,void 0,void 0,(n,o)=>t(o))}),new Promise(t=>{(0,uu.stat)(r,{bigint:!0},(n,o)=>t(o))})]);return new x0(a,i)};var zc=class{static async from(r){let a=await vp.open(r);return new zc(a,a.stat.size)}constructor(r,a){this.fileDescriptor=r,this.size=a}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,4,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 ko={COMPRESSED_SIZE_OFFSET:18n,UNCOMPRESSED_SIZE_OFFSET:22n,FILE_NAME_LENGTH_OFFSET:26n,EXTRA_FIELD_LENGTH_OFFSET:28n,FILE_NAME_OFFSET:30n},sN=Buffer.from([80,75,3,4]),gp=async(e,r)=>{if(Buffer.from(await r.slice(e,e+4n)).compare(sN)!==0)return Promise.resolve(void 0);let a=await r.getUint16(e+ko.FILE_NAME_LENGTH_OFFSET),i=new TextDecoder().decode(await r.slice(e+ko.FILE_NAME_OFFSET,e+ko.FILE_NAME_OFFSET+BigInt(a))).split("\\").join("/"),t=await r.getUint16(e+ko.EXTRA_FIELD_LENGTH_OFFSET),n=e+ko.FILE_NAME_OFFSET+BigInt(a+t),o=BigInt(await r.getUint32(e+ko.COMPRESSED_SIZE_OFFSET)),s=BigInt(await r.getUint32(e+ko.UNCOMPRESSED_SIZE_OFFSET)),c=e+ko.FILE_NAME_OFFSET+BigInt(a),l=4n;return s===BigInt(4294967295)&&(s=await r.getBigUint64(c+l),l+=8n),o===BigInt(4294967295)&&(o=await r.getBigUint64(c+l),l+=8n),n===BigInt(4294967295)&&(n=await r.getBigUint64(c+l)),{fileNameLength:a,fileName:i,extraFieldLength:t,fileDataOffset:n,compressedSize:o}};var w0=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 g0(r)}improveError(r){return r.message.includes(this.name)||(r.message=`${this.name} ${r.message}`),r}};var el=Ot(FS()),Mn=Ot(require("zlib"));var ag=class extends w0{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(!zn&&((a=this.options.deflate)==null?void 0:a.useZlib)){let t=((i=this.options.deflate)==null?void 0:i.gzip)?await su(Mn.default.gzip)(r):await su(Mn.default.deflate)(r);return ou(t)}return this.compressSync(r)}async decompress(r){var a,i;if(!zn&&((a=this.options.deflate)==null?void 0:a.useZlib)){let t=((i=this.options.deflate)==null?void 0:i.gzip)?await su(Mn.default.gunzip)(r):await su(Mn.default.inflate)(r);return ou(t)}return this.decompressSync(r)}compressSync(r){var t,n,o;if(!zn&&((t=this.options.deflate)==null?void 0:t.useZlib)){let s=((n=this.options.deflate)==null?void 0:n.gzip)?Mn.default.gzipSync(r):Mn.default.deflateSync(r);return ou(s)}let a=((o=this.options)==null?void 0:o.deflate)||{},i=new Uint8Array(r);return el.default.deflate(i,a).buffer}decompressSync(r){var t,n,o;if(!zn&&((t=this.options.deflate)==null?void 0:t.useZlib)){let s=((n=this.options.deflate)==null?void 0:n.gzip)?Mn.default.gunzipSync(r):Mn.default.inflateSync(r);return ou(s)}let a=((o=this.options)==null?void 0:o.deflate)||{},i=new Uint8Array(r);return el.default.inflate(i,a).buffer}async*compressBatches(r){var t;let a=((t=this.options)==null?void 0:t.deflate)||{},i=new el.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 el.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 Ip=class extends ag{constructor(r){super(Pu(yn({},r),{deflate:Pu(yn({},r==null?void 0:r.gzip),{gzip:!0})}));this.name="gzip";this.extensions=["gz","gzip"];this.contentEncodings=["gzip","x-gzip"];this.isSupported=!0}};var tg=Ot(require("fs")),ig=Ot(require("path"));async function qS(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 tg.promises.mkdir(e,{recursive:!0});let t=(0,ig.join)(e,a);try{await tg.promises.writeFile(t,i)}catch(n){throw n}return console.log(`${t} saved.`),t}var eH=["3dSceneLayer.json.gz","3dNodeIndexDocument.json.gz","sharedResource.json.gz"],Rp=class{async extract(r){if(zn)return console.log(y0),y0;let{inputUrl:a}=r,i=await zc.from(a),t=await gp(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 gp((t==null?void 0:t.fileDataOffset)+(t==null?void 0:t.compressedSize),i);return"success"}correctIndexNames(r){if(eH.includes(ln.filename(ln.join("/",r))))return ln.join(ln.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 Ip().decompress(r.data),name:(r.name??"").slice(0,-3)}:Promise.resolve(r)}async writeFile(r,a){if(!r.name)return;let i=ln.join(a,r.name),t=ln.dirname(i),n=ln.filename(i);await qS(t,r.data,n)}};function rH(e,r){if(e+1>=r.length)return"";let a=r[e+1];return a.indexOf("--")===0?"":a}function ng(e,r){let a=rH(e,r);return console.log(`Input tileset value: ${a}`),console.log(`Modified tileset value: ${a.replace(/\\/g,"/")}`),a.replace(/\\/g,"/")}function BS(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 aH(){let[,,...e]=process.argv;e.length===0&&IS();let r=BS(e),a=nH(r),i=iH(a);await tH(i)}aH().catch(e=>{console.log(e),process.exit(1)});function IS(){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 tH(e){console.log("------------------------------------------------"),console.log("Starting conversion of SLPK"),console.log("------------------------------------------------"),new Rp().extract({inputUrl:e.tileset,outputPath:e.output})}function iH(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 nH(e){let r={};return e.forEach((a,i)=>{if(a.indexOf("--")===0)switch(a){case"--tileset":r.tileset=ng(i,e);break;case"--output":r.output=ng(i,e);break;case"--help":IS();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)}};un.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 r8(e,r){var a=this;un.prototype.createSocket.call(a,e,function(i){var t=VL.connect(0,a8({},a.options,{servername:e.host,socket:i}));a.sockets[a.sockets.indexOf(i)]=t,r(t)})}function a8(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 Jo;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Jo=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)}:Jo=function(){};tu.debug=Jo});var s8=O(o8=>{"use strict";var JL=require("url"),eU=t8(),i8=["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"],n8=["proxy-authorization"];function rU(e){var r=e.port,a=e.protocol,i=e.hostname+":";return r?i+=r:a==="https:"?i+="443":i+="80",i}function aU(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 tU(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 iU(e,r){var a=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[a,i].join("Over")}function nU(e){var r=e.uri,a=e.proxy,i=iU(r,a);return eU[i]}function Tc(e){this.request=e,this.proxyHeaderWhiteList=i8,this.proxyHeaderExclusiveList=[],typeof e.tunnel!="undefined"&&(this.tunnelOverride=e.tunnel)}Tc.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride!="undefined"?e.tunnelOverride:r.uri.protocol==="https:"};Tc.prototype.setup=function(e){var r=this,a=r.request;if(e=e||{},typeof a.proxy=="string"&&(a.proxy=JL.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(n8),t=r.proxyHeaderWhiteList.concat(i),n=aU(a.headers,t);n.host=rU(a.uri),i.forEach(a.removeHeader,a);var o=nU(a),s=tU(a,n);return a.agent=o(s),!0};Tc.defaultProxyHeaderWhiteList=i8;Tc.defaultProxyHeaderExclusiveList=n8;o8.Tunnel=Tc});var c8=O((u8,Cc)=>{(function(){var e,r,a,i,t,n;typeof performance!="undefined"&&performance!==null&&performance.now?Cc.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(Cc.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?(Cc.exports=function(){return Date.now()-a},a=Date.now()):(Cc.exports=function(){return new Date().getTime()-a},a=new Date().getTime())}).call(u8)});var x8=O((lY,y8)=>{"use strict";var oU=require("http"),l8=require("https"),Fc=require("url"),c0=require("util"),fp=require("stream"),pp=require("zlib"),l0=Yw(),sU=n2(),uU=Y_(),cU=zf(),f8=Df(),p8=i3(),lU=q3(),fU=Rl(),h8=Ev(),pU=D3().strict,iu=Ul(),hU=zd(),dU=N3(),mU=J3().Querystring,vU=A5().Har,gU=O5().Auth,bU=K5().OAuth,yU=G5(),xU=Z5().Multipart,wU=J5().Redirect,f0=s8().Tunnel,nu=c8(),qc=As().Buffer,d8=iu.safeStringify,kU=iu.isReadStream,_U=iu.toBase64,jU=iu.defer,m8=iu.copy,SU=iu.version,v8=hU.jar(),g8={};function EU(e,r){var a={};for(var i in r){var t=e.indexOf(i)===-1;t&&(a[i]=r[i])}return a}function AU(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 b8(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function PU(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:b8.call(e.request)}}function Rr(e){var r=this;e.har&&(r._har=new vU(r),e=r._har.options(e)),fp.Stream.call(r);var a=Object.keys(Rr.prototype),i=EU(a,e);fU(r,i),e=AU(a,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new mU(r),r._auth=new gU(r),r._oauth=new bU(r),r._multipart=new xU(r),r._redirect=new wU(r),r._tunnel=new f0(r),r.init(e)}c0.inherits(Rr,fp.Stream);Rr.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function ot(){Rr.debug&&console.error("REQUEST %s",c0.format.apply(c0,arguments))}Rr.prototype.debug=ot;Rr.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?m8(r.headers):{};for(var a in r.headers)typeof r.headers[a]=="undefined"&&delete r.headers[a];if(f8.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=g8),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=Fc.parse(r.uri)),r.uri.href||(r.uri.href=Fc.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=Fc.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=dU(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 "+_U(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(pU(r.body)&&(r.body=qc.from(r.body)),!r.hasHeader("content-length")){var R;typeof r.body=="string"?R=qc.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&&!h8(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:":oU,"https:":l8},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=SU();F.major===0&&F.minor<=10?r.agentClass=P==="http:"?p8:p8.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,kU(R))r.hasHeader("content-type")||r.setHeader("content-type",cU.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)}}),jU(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)h8(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=Fc.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===g8&&!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=nu();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=m8(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=nu()-e.startTimeNow,o)){var s=function(){e.timings.lookup=nu()-e.startTimeNow},c=function(){e.timings.connect=nu()-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=nu()-r.startTimeNow),ot("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=nu()-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=PU,r.httpModule===l8&&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:v8,t=function(f){try{i.setCookie(f,r.uri.href,{ignoreError:!0})}catch(v){r.emit("error",v)}};if(e.caseless=f8(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:pp.Z_SYNC_FLUSH,finishFlush:pp.Z_SYNC_FLUSH};c==="gzip"?(s=pp.createGunzip(l),e.pipe(s)):c==="deflate"?(s=pp.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){qc.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=qc.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?qc.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=Fc.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 lU,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=d8(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=d8(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=sU.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:l0.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=l0.canonicalizeResource(o.resource),a.setHeader("authorization",l0.authorization(o))}return a};Rr.prototype.httpSignature=function(e){var r=this;return uU.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",yU.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:v8,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 fp.Stream.prototype.pipe.call(a,e,r),a.pipeDest(e),e;else return a.dests.push(e),fp.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=f0.defaultProxyHeaderWhiteList.slice();Rr.defaultProxyHeaderExclusiveList=f0.defaultProxyHeaderExclusiveList.slice();Rr.prototype.toJSON=b8;y8.exports=Rr});var _8=O((fY,k8)=>{"use strict";var Bc=Rl(),w8=zd(),TU=Ul(),CU=TU.paramsHaveRequestBody;function hp(e,r,a){typeof r=="function"&&(a=r);var i={};return r!==null&&typeof r=="object"?Bc(i,r,{uri:e}):typeof e=="string"?Bc(i,{uri:e}):Bc(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=hp(e,r,a);if(i.method==="HEAD"&&CU(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=hp(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 w8.jar(e)};qa.cookie=function(e){return w8.parse(e)};function p0(e,r,a,i){return function(t,n,o){var s=hp(t,n,o),c={};return Bc(!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=p0(a,e,r),t=["get","head","post","put","patch","del","delete"];return t.forEach(function(n){i[n]=p0(a[n],e,r,n)}),i.cookie=p0(a.cookie,e,r),i.jar=a.jar,i.defaults=a.defaults,i};qa.forever=function(e,r){var a={};return r&&Bc(a,r),e&&(a.agentOptions=e),a.forever=!0,qa.defaults(a)};k8.exports=qa;qa.Request=x8();qa.initParams=hp;Object.defineProperty(qa,"debug",{enumerable:!0,get:function(){return qa.Request.debug},set:function(e){qa.Request.debug=e}})});var S8=O((pY,j8)=>{j8.exports=FU;function FU(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 P8=O((hY,A8)=>{var qU=S8();function BU(e){return{mimeType:RU(IU(e)),data:qU(e)}}function IU(e){return e.substring(5,e.indexOf(";"))}var E8=/^(\w+\/)+/;function RU(e){e=e.toLowerCase();var r=e.match(E8);return!r||!(r=r[1])?e:e.replace(E8,r)}A8.exports=BU});var C8=O((mY,T8)=>{"use strict";var Ic=Lu(),dY=require("path"),OU=Kx().PNG,zU=Hh(),DU=Xx(),LU=ew().GifReader,UU=nw(),NU=require("fs"),MU=_8(),HU=zf(),VU=P8();function $U(e,r){var a=new OU;a.parse(e,function(i,t){if(i){r(i);return}r(null,Ic(new Uint8Array(t.data),[t.width|0,t.height|0,4],[4,4*t.width|0,1],0))})}function WU(e,r){var a;try{a=zU.decode(e)}catch(n){r(n);return}if(!a){r(new Error("Error decoding jpeg"));return}var i=[a.height,a.width,4],t=Ic(a.data,i);r(null,t.transpose(1,0))}function KU(e,r){var a;try{a=new LU(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=Ic(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=Ic(t,i);try{a.decodeAndBlitFrameRGBA(0,t)}catch(f){r(f);return}r(null,n.transpose(1,0))}}function GU(e,r){var a=new UU(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=Ic(n,t);DU(i,o),r(null,o.transpose(1,0))}function dp(e,r,a){switch(e){case"image/png":$U(r,a);break;case"image/jpg":case"image/jpeg":WU(r,a);break;case"image/gif":KU(r,a);break;case"image/bmp":GU(r,a);break;default:a(new Error("Unsupported file type: "+e))}}T8.exports=function(r,a,i){if(i||(i=a,a=""),Buffer.isBuffer(r)){if(!a){i(new Error("Invalid file type"));return}dp(a,r,i)}else if(r.indexOf("data:")===0)try{var t=VU(r);t?process.nextTick(function(){dp(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?MU({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}dp(a,s,i)}):NU.readFile(r,function(n,o){if(n){i(n);return}if(a=a||HU.lookup(r),!a){i(new Error("Invalid file type"));return}dp(a,o,i)})}});var I8=O((mp,B8)=>{(function(e,r){typeof mp=="object"&&typeof B8!="undefined"?r(mp):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(mp,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 gi(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(!Vn(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"),$n(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 $t(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),ku(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),$t(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);$t(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,$t(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),ku(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),jg(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"),$n(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);MS(this,G,Xe,ge)}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Re(this))throw il("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(il("abort"))},u.prototype.close=function(){return Re(this)?Fr(this)?d(new TypeError("Cannot close a stream that already has a writer")):vi(this)?d(new TypeError("Cannot close an already-closing stream")):ct(this):d(il("close"))},u.prototype.getWriter=function(){if(!Re(this))throw il("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 cs(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(Fo.prototype);return fg(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||vn(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"&&Hp(D),HS(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"){vn(u,m);return}gt(u)}function vn(u,m){var S=u._writableStreamController;u._state="erroring",u._storedError=m;var D=u._writer;D!==void 0&&sg(D,m),!RS(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){rl(u);return}var S=u._pendingAbortRequest;if(u._pendingAbortRequest=void 0,S._wasAlreadyErroring){S._reject(m),rl(u);return}var D=u._writableStreamController[_e](S._reason);j(D,function(){S._resolve(),rl(u)},function(G){S._reject(G),rl(u)})}function Rt(u){u._inFlightWriteRequest._resolve(void 0),u._inFlightWriteRequest=void 0}function To(u,m){u._inFlightWriteRequest._reject(m),u._inFlightWriteRequest=void 0,Et(u,m)}function mi(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&&mg(S)}function us(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 vi(u){return!(u._closeRequest===void 0&&u._inFlightCloseRequest===void 0)}function RS(u){return!(u._inFlightWriteRequest===void 0&&u._inFlightCloseRequest===void 0)}function OS(u){u._inFlightCloseRequest=u._closeRequest,u._closeRequest=void 0}function zS(u){u._inFlightWriteRequest=u._writeRequests.shift()}function rl(u){u._closeRequest!==void 0&&(u._closeRequest._reject(u._storedError),u._closeRequest=void 0);var m=u._writer;m!==void 0&&Np(m,u._storedError)}function Op(u,m){var S=u._writer;S!==void 0&&m!==u._backpressure&&(m?ZS(S):Hp(S)),u._backpressure=m}var cs=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")!vi(m)&&m._backpressure?ol(this):vg(this),nl(this);else if(S==="erroring")Mp(this,m._storedError),nl(this);else if(S==="closed")vg(this),GS(this);else{var D=m._storedError;Mp(this,D),dg(this,D)}}return Object.defineProperty(u.prototype,"closed",{get:function(){return Co(this)?this._closedPromise:d(qo("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Co(this))throw qo("desiredSize");if(this._ownerWritableStream===void 0)throw yu("desiredSize");return NS(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ready",{get:function(){return Co(this)?this._readyPromise:d(qo("ready"))},enumerable:!1,configurable:!0}),u.prototype.abort=function(m){return m===void 0&&(m=void 0),Co(this)?this._ownerWritableStream===void 0?d(yu("abort")):DS(this,m):d(qo("abort"))},u.prototype.close=function(){if(!Co(this))return d(qo("close"));var m=this._ownerWritableStream;return m===void 0?d(yu("close")):vi(m)?d(new TypeError("Cannot close an already-closing stream")):og(this)},u.prototype.releaseLock=function(){if(!Co(this))throw qo("releaseLock");var m=this._ownerWritableStream;m!==void 0&&ug(this)},u.prototype.write=function(m){return m===void 0&&(m=void 0),Co(this)?this._ownerWritableStream===void 0?d(yu("write to")):cg(this,m):d(qo("write"))},u}();Object.defineProperties(cs.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(cs.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Co(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_ownerWritableStream")?!1:u instanceof cs}function DS(u,m){var S=u._ownerWritableStream;return ca(S,m)}function og(u){var m=u._ownerWritableStream;return ct(m)}function LS(u){var m=u._ownerWritableStream,S=m._state;return vi(m)||S==="closed"?h(void 0):S==="errored"?d(m._storedError):og(u)}function US(u,m){u._closedPromiseState==="pending"?Np(u,m):YS(u,m)}function sg(u,m){u._readyPromiseState==="pending"?gg(u,m):QS(u,m)}function NS(u){var m=u._ownerWritableStream,S=m._state;return S==="errored"||S==="erroring"?null:S==="closed"?0:pg(m._writableStreamController)}function ug(u){var m=u._ownerWritableStream,S=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");sg(u,S),US(u,S),m._writer=void 0,u._ownerWritableStream=void 0}function cg(u,m){var S=u._ownerWritableStream,D=S._writableStreamController,G=VS(D,m);if(S!==u._ownerWritableStream)return d(yu("write to"));var se=S._state;if(se==="errored")return d(S._storedError);if(vi(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 $S(D,m,G),ge}var lg={},Fo=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"abortReason",{get:function(){if(!zp(this))throw Up("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"signal",{get:function(){if(!zp(this))throw Up("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),!zp(this))throw Up("error");var S=this._controlledWritableStream._state;S==="writable"&&hg(this,m)},u.prototype[_e]=function(m){var S=this._abortAlgorithm(m);return al(this),S},u.prototype[be]=function(){ua(this)},u}();Object.defineProperties(Fo.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Fo.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function zp(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledWritableStream")?!1:u instanceof Fo}function fg(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=Lp(m);Op(u,Er);var qr=S(),zr=h(qr);j(zr,function(){m._started=!0,tl(m)},function(Wr){m._started=!0,Et(u,Wr)})}function MS(u,m,S,D){var G=Object.create(Fo.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)}),fg(u,G,se,ge,Xe,Er,S,D)}function al(u){u._writeAlgorithm=void 0,u._closeAlgorithm=void 0,u._abortAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function HS(u){vt(u,lg,0),tl(u)}function VS(u,m){try{return u._strategySizeAlgorithm(m)}catch(S){return Dp(u,S),1}}function pg(u){return u._strategyHWM-u._queueTotalSize}function $S(u,m,S){try{vt(u,m,S)}catch(se){Dp(u,se);return}var D=u._controlledWritableStream;if(!vi(D)&&D._state==="writable"){var G=Lp(u);Op(D,G)}tl(u)}function tl(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===lg?WS(u):KS(u,D)}}}function Dp(u,m){u._controlledWritableStream._state==="writable"&&hg(u,m)}function WS(u){var m=u._controlledWritableStream;OS(m),st(u);var S=u._closeAlgorithm();al(u),j(S,function(){mi(m)},function(D){us(m,D)})}function KS(u,m){var S=u._controlledWritableStream;zS(S);var D=u._writeAlgorithm(m);j(D,function(){Rt(S);var G=S._state;if(st(u),!vi(S)&&G==="writable"){var se=Lp(u);Op(S,se)}tl(u)},function(G){S._state==="writable"&&al(u),To(S,G)})}function Lp(u){var m=pg(u);return m<=0}function hg(u,m){var S=u._controlledWritableStream;al(u),vn(S,m)}function il(u){return new TypeError("WritableStream.prototype."+u+" can only be used on a WritableStream")}function Up(u){return new TypeError("WritableStreamDefaultController.prototype."+u+" can only be used on a WritableStreamDefaultController")}function qo(u){return new TypeError("WritableStreamDefaultWriter.prototype."+u+" can only be used on a WritableStreamDefaultWriter")}function yu(u){return new TypeError("Cannot "+u+" a stream using a released writer")}function nl(u){u._closedPromise=v(function(m,S){u._closedPromise_resolve=m,u._closedPromise_reject=S,u._closedPromiseState="pending"})}function dg(u,m){nl(u),Np(u,m)}function GS(u){nl(u),mg(u)}function Np(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 YS(u,m){dg(u,m)}function mg(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 ol(u){u._readyPromise=v(function(m,S){u._readyPromise_resolve=m,u._readyPromise_reject=S}),u._readyPromiseState="pending"}function Mp(u,m){ol(u),gg(u,m)}function vg(u){ol(u),Hp(u)}function gg(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 ZS(u){ol(u)}function QS(u,m){Mp(u,m)}function Hp(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 bg=typeof DOMException!="undefined"?DOMException:void 0;function XS(u){if(!(typeof u=="function"||typeof u=="object"))return!1;try{return new u,!0}catch{return!1}}function JS(){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 eE=XS(bg)?bg:JS();function yg(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 eE("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"?gi(u,xr):h(void 0)}),Wt(function(){return Promise.all(Yr.map(function(ba){return ba()}))},!0,xr)},se.aborted){Oa();return}se.addEventListener("abort",Oa)}function bi(){return v(function(xr,Yr){function ba(Ni){Ni?xr():y(ps(),ba,Yr)}ba(!1)})}function ps(){return Er?h(!0):y(Xe._readyPromise,function(){return v(function(xr,Yr){nr(ge,{_chunkSteps:function(ba){qr=y(cg(Xe,ba),void 0,a),xr(!1)},_closeSteps:function(){return xr(!0)},_errorSteps:Yr})})})}if(ft(u,ge._closedPromise,function(xr){D?bn(!0,xr):Wt(function(){return ca(m,xr)},!0,xr)}),ft(m,Xe._closedPromise,function(xr){G?bn(!0,xr):Wt(function(){return gi(u,xr)},!0,xr)}),Ui(u,ge._closedPromise,function(){S?bn():Wt(function(){return LS(Xe)})}),vi(m)||m._state==="closed"){var Wn=new TypeError("the destination writable stream closed before all data could be piped to it");G?bn(!0,Wn):Wt(function(){return gi(u,Wn)},!0,Wn)}T(bi());function Li(){var xr=qr;return y(qr,function(){return xr!==qr?Li():void 0})}function ft(xr,Yr,ba){xr._state==="errored"?ba(xr._storedError):A(Yr,ba)}function Ui(xr,Yr,ba){xr._state==="closed"?ba():w(Yr,ba)}function Wt(xr,Yr,ba){if(Er)return;Er=!0,m._state==="writable"&&!vi(m)?w(Li(),Ni):Ni();function Ni(){j(xr(),function(){return ga(Yr,ba)},function(Kn){return ga(!0,Kn)})}}function bn(xr,Yr){Er||(Er=!0,m._state==="writable"&&!vi(m)?w(Li(),function(){return ga(xr,Yr)}):ga(xr,Yr))}function ga(xr,Yr){ug(Xe),V(ge),se!==void 0&&se.removeEventListener("abort",Oa),xr?Wr(Yr):zr(void 0)}})}var Bo=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!sl(this))throw ll("desiredSize");return Vp(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!sl(this))throw ll("close");if(!ls(this))throw new TypeError("The stream is not in a state that permits close");wu(this)},u.prototype.enqueue=function(m){if(m===void 0&&(m=void 0),!sl(this))throw ll("enqueue");if(!ls(this))throw new TypeError("The stream is not in a state that permits enqueue");return cl(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!sl(this))throw ll("error");Hn(this,m)},u.prototype[Le]=function(m){ua(this);var S=this._cancelAlgorithm(m);return ul(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?(ul(this),ku(S)):xu(this),m._chunkSteps(D)}else J(S,m),xu(this)},u}();Object.defineProperties(Bo.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Bo.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function sl(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableStream")?!1:u instanceof Bo}function xu(u){var m=xg(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,xu(u))},function(D){Hn(u,D)})}}function xg(u){var m=u._controlledReadableStream;if(!ls(u)||!u._started)return!1;if($n(m)&&Ke(m)>0)return!0;var S=Vp(u);return S>0}function ul(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function wu(u){if(!!ls(u)){var m=u._controlledReadableStream;u._closeRequested=!0,u._queue.length===0&&(ul(u),ku(m))}}function cl(u,m){if(!!ls(u)){var S=u._controlledReadableStream;if($n(S)&&Ke(S)>0)Be(S,m,!1);else{var D=void 0;try{D=u._strategySizeAlgorithm(m)}catch(G){throw Hn(u,G),G}try{vt(u,m,D)}catch(G){throw Hn(u,G),G}}xu(u)}}function Hn(u,m){var S=u._controlledReadableStream;S._state==="readable"&&(ua(u),ul(u),jg(S,m))}function Vp(u){var m=u._controlledReadableStream._state;return m==="errored"?null:m==="closed"?0:u._strategyHWM-u._queueTotalSize}function rE(u){return!xg(u)}function ls(u){var m=u._controlledReadableStream._state;return!u._closeRequested&&m==="readable"}function wg(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,xu(m)},function(Er){Hn(m,Er)})}function aE(u,m,S,D){var G=Object.create(Bo.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)}),wg(u,G,se,ge,Xe,S,D)}function ll(u){return new TypeError("ReadableStreamDefaultController.prototype."+u+" can only be used on a ReadableStreamDefaultController")}function tE(u,m){return va(u._readableStreamController)?nE(u):iE(u)}function iE(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 bi(){if(D)return G=!0,h(void 0);D=!0;var ft={_chunkSteps:function(Ui){I(function(){G=!1;var Wt=Ui,bn=Ui;se||cl(qr._readableStreamController,Wt),ge||cl(zr._readableStreamController,bn),D=!1,G&&bi()})},_closeSteps:function(){D=!1,se||wu(qr._readableStreamController),ge||wu(zr._readableStreamController),(!se||!ge)&&Wr(void 0)},_errorSteps:function(){D=!1}};return nr(S,ft),h(void 0)}function ps(ft){if(se=!0,Xe=ft,ge){var Ui=wr([Xe,Er]),Wt=gi(u,Ui);Wr(Wt)}return Oa}function Wn(ft){if(ge=!0,Er=ft,se){var Ui=wr([Xe,Er]),Wt=gi(u,Ui);Wr(Wt)}return Oa}function Li(){}return qr=$p(Li,bi,ps),zr=$p(Li,bi,Wn),A(S._closedPromise,function(ft){Hn(qr._readableStreamController,ft),Hn(zr._readableStreamController,ft),(!se||!ge)&&Wr(void 0)}),[qr,zr]}function nE(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 bi(ga){A(ga._closedPromise,function(xr){ga===m&&(Ce(qr._readableStreamController,xr),Ce(zr._readableStreamController,xr),(!se||!ge)&&Wr(void 0))})}function ps(){Ve(m)&&(V(m),m=Gr(u),bi(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(Ni){Ce(qr._readableStreamController,Ni),Ce(zr._readableStreamController,Ni),Wr(gi(u,Ni));return}se||Se(qr._readableStreamController,Yr),ge||Se(zr._readableStreamController,ba),S=!1,D?Li():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 Wn(ga,xr){Je(m)&&(V(m),m=X(u),bi(m));var Yr=xr?zr:qr,ba=xr?qr:zr,Ni={_chunkSteps:function(Kn){I(function(){D=!1,G=!1;var hs=xr?ge:se,Eu=xr?se:ge;if(Eu)hs||Te(Yr._readableStreamController,Kn);else{var zg=void 0;try{zg=Ia(Kn)}catch(Yp){Ce(Yr._readableStreamController,Yp),Ce(ba._readableStreamController,Yp),Wr(gi(u,Yp));return}hs||Te(Yr._readableStreamController,Kn),Se(ba._readableStreamController,zg)}S=!1,D?Li():G&&ft()})},_closeSteps:function(Kn){S=!1;var hs=xr?ge:se,Eu=xr?se:ge;hs||Ie(Yr._readableStreamController),Eu||Ie(ba._readableStreamController),Kn!==void 0&&(hs||Te(Yr._readableStreamController,Kn),!Eu&&ba._readableStreamController._pendingPullIntos.length>0&&Qe(ba._readableStreamController,0)),(!hs||!Eu)&&Wr(void 0)},_errorSteps:function(){S=!1}};fr(m,ga,Ni)}function Li(){if(S)return D=!0,h(void 0);S=!0;var ga=Fe(qr._readableStreamController);return ga===null?ps():Wn(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?ps():Wn(ga._view,!0),h(void 0)}function Ui(ga){if(se=!0,Xe=ga,ge){var xr=wr([Xe,Er]),Yr=gi(u,xr);Wr(Yr)}return Oa}function Wt(ga){if(ge=!0,Er=ga,se){var xr=wr([Xe,Er]),Yr=gi(u,xr);Wr(Yr)}return Oa}function bn(){}return qr=_g(bn,Li,Ui),zr=_g(bn,ft,Wt),bi(m),[qr,zr]}function oE(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:sE(G,S,m+" has member 'cancel' that"),pull:se===void 0?void 0:uE(se,S,m+" has member 'pull' that"),start:ge===void 0?void 0:cE(ge,S,m+" has member 'start' that"),type:Xe===void 0?void 0:lE(Xe,m+" has member 'type' that")}}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 R(u,m,[D])}}function cE(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function lE(u,m){if(u=""+u,u!=="bytes")throw new TypeError(m+" '"+u+"' is not a valid enumeration value for ReadableStreamType");return u}function fE(u,m){Ze(u,m);var S=u==null?void 0:u.mode;return{mode:S===void 0?void 0:pE(S,m+" has member 'mode' that")}}function pE(u,m){if(u=""+u,u!=="byob")throw new TypeError(m+" '"+u+"' is not a valid enumeration value for ReadableStreamReaderMode");return u}function hE(u,m){Ze(u,m);var S=u==null?void 0:u.preventCancel;return{preventCancel:Boolean(S)}}function kg(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&&dE(se,m+" has member 'signal' that"),{preventAbort:Boolean(S),preventCancel:Boolean(D),preventClose:Boolean(G),signal:se}}function dE(u,m){if(!_(u))throw new TypeError(m+" is not an AbortSignal.")}function mE(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 gn=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=oE(m,"First parameter");if(Wp(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);aE(this,G,se,ge)}}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Vn(this))throw Io("locked");return $n(this)},enumerable:!1,configurable:!0}),u.prototype.cancel=function(m){return m===void 0&&(m=void 0),Vn(this)?$n(this)?d(new TypeError("Cannot cancel a stream that already has a reader")):gi(this,m):d(Io("cancel"))},u.prototype.getReader=function(m){if(m===void 0&&(m=void 0),!Vn(this))throw Io("getReader");var S=fE(m,"First parameter");return S.mode===void 0?Gr(this):X(this)},u.prototype.pipeThrough=function(m,S){if(S===void 0&&(S={}),!Vn(this))throw Io("pipeThrough");qe(m,1,"pipeThrough");var D=mE(m,"First parameter"),G=kg(S,"Second parameter");if($n(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=yg(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={}),!Vn(this))return d(Io("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=kg(S,"Second parameter")}catch(G){return d(G)}return $n(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")):yg(this,m,D.preventClose,D.preventAbort,D.preventCancel,D.signal)},u.prototype.tee=function(){if(!Vn(this))throw Io("tee");var m=tE(this);return wr(m)},u.prototype.values=function(m){if(m===void 0&&(m=void 0),!Vn(this))throw Io("values");var S=hE(m,"First parameter");return pr(this,S.preventCancel)},u}();Object.defineProperties(gn.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(gn.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(gn.prototype,r.asyncIterator,{value:gn.prototype.values,writable:!0,configurable:!0});function $p(u,m,S,D,G){D===void 0&&(D=1),G===void 0&&(G=function(){return 1});var se=Object.create(gn.prototype);Wp(se);var ge=Object.create(Bo.prototype);return wg(se,ge,u,m,S,D,G),se}function _g(u,m,S){var D=Object.create(gn.prototype);Wp(D);var G=Object.create(Ra.prototype);return Ee(D,G,u,m,S,0,void 0),D}function Wp(u){u._state="readable",u._reader=void 0,u._storedError=void 0,u._disturbed=!1}function Vn(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readableStreamController")?!1:u instanceof gn}function $n(u){return u._reader!==void 0}function gi(u,m){if(u._disturbed=!0,u._state==="closed")return h(void 0);if(u._state==="errored")return d(u._storedError);ku(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 ku(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 jg(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 Io(u){return new TypeError("ReadableStream.prototype."+u+" can only be used on a ReadableStream")}function Sg(u,m){Ze(u,m);var S=u==null?void 0:u.highWaterMark;return fe(S,"highWaterMark","QueuingStrategyInit"),{highWaterMark:we(S)}}var Eg=function(u){return u.byteLength};try{Object.defineProperty(Eg,"name",{value:"size",configurable:!0})}catch{}var _u=function(){function u(m){qe(m,1,"ByteLengthQueuingStrategy"),m=Sg(m,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=m.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!Pg(this))throw Ag("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!Pg(this))throw Ag("size");return Eg},enumerable:!1,configurable:!0}),u}();Object.defineProperties(_u.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(_u.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Ag(u){return new TypeError("ByteLengthQueuingStrategy.prototype."+u+" can only be used on a ByteLengthQueuingStrategy")}function Pg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_byteLengthQueuingStrategyHighWaterMark")?!1:u instanceof _u}var Tg=function(){return 1};try{Object.defineProperty(Tg,"name",{value:"size",configurable:!0})}catch{}var ju=function(){function u(m){qe(m,1,"CountQueuingStrategy"),m=Sg(m,"First parameter"),this._countQueuingStrategyHighWaterMark=m.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!Fg(this))throw Cg("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!Fg(this))throw Cg("size");return Tg},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:"CountQueuingStrategy",configurable:!0});function Cg(u){return new TypeError("CountQueuingStrategy.prototype."+u+" can only be used on a CountQueuingStrategy")}function Fg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_countQueuingStrategyHighWaterMark")?!1:u instanceof ju}function vE(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:gE(S,u,m+" has member 'flush' that"),readableType:D,start:G===void 0?void 0:bE(G,u,m+" has member 'start' that"),transform:se===void 0?void 0:yE(se,u,m+" has member 'transform' that"),writableType:ge}}function gE(u,m,S){return We(u,S),function(D){return R(u,m,[D])}}function bE(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function yE(u,m,S){return We(u,S),function(D,G){return R(u,m,[D,G])}}var Su=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=vE(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(bi){Wr=bi});xE(this,Oa,qr,zr,Xe,Er),kE(this,ge),ge.start!==void 0?Wr(ge.start(this._transformStreamController)):Wr(void 0)}return Object.defineProperty(u.prototype,"readable",{get:function(){if(!qg(this))throw Og("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"writable",{get:function(){if(!qg(this))throw Og("writable");return this._writable},enumerable:!1,configurable:!0}),u}();Object.defineProperties(Su.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Su.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function xE(u,m,S,D,G,se){function ge(){return m}function Xe(Oa){return SE(u,Oa)}function Er(Oa){return EE(u,Oa)}function qr(){return AE(u)}u._writable=ue(ge,Xe,qr,Er,S,D);function zr(){return PE(u)}function Wr(Oa){return pl(u,Oa),h(void 0)}u._readable=$p(ge,zr,Wr,G,se),u._backpressure=void 0,u._backpressureChangePromise=void 0,u._backpressureChangePromise_resolve=void 0,hl(u,!0),u._transformStreamController=void 0}function qg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_transformStreamController")?!1:u instanceof Su}function fl(u,m){Hn(u._readable._readableStreamController,m),pl(u,m)}function pl(u,m){Bg(u._transformStreamController),Dp(u._writable._writableStreamController,m),u._backpressure&&hl(u,!1)}function hl(u,m){u._backpressureChangePromise!==void 0&&u._backpressureChangePromise_resolve(),u._backpressureChangePromise=v(function(S){u._backpressureChangePromise_resolve=S}),u._backpressure=m}var fs=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!dl(this))throw ml("desiredSize");var m=this._controlledTransformStream._readable._readableStreamController;return Vp(m)},enumerable:!1,configurable:!0}),u.prototype.enqueue=function(m){if(m===void 0&&(m=void 0),!dl(this))throw ml("enqueue");Ig(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!dl(this))throw ml("error");_E(this,m)},u.prototype.terminate=function(){if(!dl(this))throw ml("terminate");jE(this)},u}();Object.defineProperties(fs.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(fs.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function dl(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledTransformStream")?!1:u instanceof fs}function wE(u,m,S,D){m._controlledTransformStream=u,u._transformStreamController=m,m._transformAlgorithm=S,m._flushAlgorithm=D}function kE(u,m){var S=Object.create(fs.prototype),D=function(se){try{return Ig(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)}),wE(u,S,D,G)}function Bg(u){u._transformAlgorithm=void 0,u._flushAlgorithm=void 0}function Ig(u,m){var S=u._controlledTransformStream,D=S._readable._readableStreamController;if(!ls(D))throw new TypeError("Readable side is not in a state that permits enqueue");try{cl(D,m)}catch(se){throw pl(S,se),S._readable._storedError}var G=rE(D);G!==S._backpressure&&hl(S,!0)}function _E(u,m){fl(u._controlledTransformStream,m)}function Rg(u,m){var S=u._transformAlgorithm(m);return P(S,void 0,function(D){throw fl(u._controlledTransformStream,D),D})}function jE(u){var m=u._controlledTransformStream,S=m._readable._readableStreamController;wu(S);var D=new TypeError("TransformStream terminated");pl(m,D)}function SE(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 Rg(S,m)})}return Rg(S,m)}function EE(u,m){return fl(u,m),h(void 0)}function AE(u){var m=u._readable,S=u._transformStreamController,D=S._flushAlgorithm();return Bg(S),P(D,function(){if(m._state==="errored")throw m._storedError;wu(m._readableStreamController)},function(G){throw fl(u,G),m._storedError})}function PE(u){return hl(u,!1),u._backpressureChangePromise}function ml(u){return new TypeError("TransformStreamDefaultController.prototype."+u+" can only be used on a TransformStreamDefaultController")}function Og(u){return new TypeError("TransformStream.prototype."+u+" can only be used on a TransformStream")}var Kp={ReadableStream:gn,ReadableStreamDefaultController:Bo,ReadableByteStreamController:Ra,ReadableStreamBYOBRequest:da,ReadableStreamDefaultReader:Ye,ReadableStreamBYOBReader:ne,WritableStream:H,WritableStreamDefaultController:Fo,WritableStreamDefaultWriter:cs,ByteLengthQueuingStrategy:_u,CountQueuingStrategy:ju,TransformStream:Su,TransformStreamDefaultController:fs};if(typeof t!="undefined")for(var Gp in Kp)Object.prototype.hasOwnProperty.call(Kp,Gp)&&Object.defineProperty(t,Gp,{value:Kp[Gp],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=_u,e.CountQueuingStrategy=ju,e.ReadableByteStreamController=Ra,e.ReadableStream=gn,e.ReadableStreamBYOBReader=ne,e.ReadableStreamBYOBRequest=da,e.ReadableStreamDefaultController=Bo,e.ReadableStreamDefaultReader=Ye,e.TransformStream=Su,e.TransformStreamDefaultController=fs,e.WritableStream=H,e.WritableStreamDefaultController=Fo,e.WritableStreamDefaultWriter=cs,Object.defineProperty(e,"__esModule",{value:!0})})});var Dn=O(Bt=>{"use strict";var uN=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function cN(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)cN(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 lN={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}},fN={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,lN)):(Bt.Buf8=Array,Bt.Buf16=Array,Bt.Buf32=Array,Bt.assign(Bt,fN))};Bt.setTyped(uN)});var h4=O(fu=>{"use strict";var pN=Dn(),hN=4,$8=0,W8=1,dN=2;function cu(e){for(var r=e.length;--r>=0;)e[r]=0}var mN=0,K8=1,vN=2,gN=3,bN=258,k0=29,Dc=256,Lc=Dc+1+k0,lu=30,_0=19,G8=2*Lc+1,es=15,j0=16,yN=7,S0=256,Y8=16,Z8=17,Q8=18,E0=[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],bp=[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],xN=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],X8=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],wN=512,Ln=new Array((Lc+2)*2);cu(Ln);var Uc=new Array(lu*2);cu(Uc);var Nc=new Array(wN);cu(Nc);var Mc=new Array(bN-gN+1);cu(Mc);var A0=new Array(k0);cu(A0);var yp=new Array(lu);cu(yp);function P0(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 J8,e4,r4;function T0(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}function a4(e){return e<256?Nc[e]:Nc[256+(e>>>7)]}function Hc(e,r){e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255}function Vt(e,r,a){e.bi_valid>j0-a?(e.bi_buf|=r<<e.bi_valid&65535,Hc(e,e.bi_buf),e.bi_buf=r>>j0-e.bi_valid,e.bi_valid+=a-j0):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=a)}function fn(e,r,a){Vt(e,a[r*2],a[r*2+1])}function t4(e,r){var a=0;do a|=e&1,e>>>=1,a<<=1;while(--r>0);return a>>>1}function kN(e){e.bi_valid===16?(Hc(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 _N(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<G8;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 i4(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]=t4(i[s]++,s))}}function jN(){var e,r,a,i,t,n=new Array(es+1);for(a=0,i=0;i<k0-1;i++)for(A0[i]=a,e=0;e<1<<E0[i];e++)Mc[a++]=i;for(Mc[a-1]=i,t=0,i=0;i<16;i++)for(yp[i]=t,e=0;e<1<<bp[i];e++)Nc[t++]=i;for(t>>=7;i<lu;i++)for(yp[i]=t<<7,e=0;e<1<<bp[i]-7;e++)Nc[256+t++]=i;for(r=0;r<=es;r++)n[r]=0;for(e=0;e<=143;)Ln[e*2+1]=8,e++,n[8]++;for(;e<=255;)Ln[e*2+1]=9,e++,n[9]++;for(;e<=279;)Ln[e*2+1]=7,e++,n[7]++;for(;e<=287;)Ln[e*2+1]=8,e++,n[8]++;for(i4(Ln,Lc+1,n),e=0;e<lu;e++)Uc[e*2+1]=5,Uc[e*2]=t4(e,5);J8=new P0(Ln,E0,Dc+1,Lc,es),e4=new P0(Uc,bp,0,lu,es),r4=new P0(new Array(0),xN,0,_0,yN)}function n4(e){var r;for(r=0;r<Lc;r++)e.dyn_ltree[r*2]=0;for(r=0;r<lu;r++)e.dyn_dtree[r*2]=0;for(r=0;r<_0;r++)e.bl_tree[r*2]=0;e.dyn_ltree[S0*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function o4(e){e.bi_valid>8?Hc(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 SN(e,r,a,i){o4(e),i&&(Hc(e,a),Hc(e,~a)),pN.arraySet(e.pending_buf,e.window,r,a,e.pending),e.pending+=a}function s4(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 C0(e,r,a){for(var i=e.heap[a],t=a<<1;t<=e.heap_len&&(t<e.heap_len&&s4(r,e.heap[t+1],e.heap[t],e.depth)&&t++,!s4(r,i,e.heap[t],e.depth));)e.heap[a]=e.heap[t],a=t,t<<=1;e.heap[a]=i}function u4(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?fn(e,t,r):(o=Mc[t],fn(e,o+Dc+1,r),s=E0[o],s!==0&&(t-=A0[o],Vt(e,t,s)),i--,o=a4(i),fn(e,o,a),s=bp[o],s!==0&&(i-=yp[o],Vt(e,i,s)));while(n<e.last_lit);fn(e,S0,r)}function F0(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=G8,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--)C0(e,a,o);l=n;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],C0(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++,C0(e,a,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],_N(e,r),i4(a,c,e.bl_count)}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),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[Y8*2]++):s<=10?e.bl_tree[Z8*2]++:e.bl_tree[Q8*2]++,s=0,t=n,o===0?(c=138,l=3):n===o?(c=6,l=3):(c=7,l=4))}function l4(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 fn(e,n,e.bl_tree);while(--s!=0);else n!==0?(n!==t&&(fn(e,n,e.bl_tree),s--),fn(e,Y8,e.bl_tree),Vt(e,s-3,2)):s<=10?(fn(e,Z8,e.bl_tree),Vt(e,s-3,3)):(fn(e,Q8,e.bl_tree),Vt(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 EN(e){var r;for(c4(e,e.dyn_ltree,e.l_desc.max_code),c4(e,e.dyn_dtree,e.d_desc.max_code),F0(e,e.bl_desc),r=_0-1;r>=3&&e.bl_tree[X8[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r}function AN(e,r,a,i){var t;for(Vt(e,r-257,5),Vt(e,a-1,5),Vt(e,i-4,4),t=0;t<i;t++)Vt(e,e.bl_tree[X8[t]*2+1],3);l4(e,e.dyn_ltree,r-1),l4(e,e.dyn_dtree,a-1)}function PN(e){var r=4093624447,a;for(a=0;a<=31;a++,r>>>=1)if(r&1&&e.dyn_ltree[a*2]!==0)return $8;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return W8;for(a=32;a<Dc;a++)if(e.dyn_ltree[a*2]!==0)return W8;return $8}var f4=!1;function TN(e){f4||(jN(),f4=!0),e.l_desc=new T0(e.dyn_ltree,J8),e.d_desc=new T0(e.dyn_dtree,e4),e.bl_desc=new T0(e.bl_tree,r4),e.bi_buf=0,e.bi_valid=0,n4(e)}function p4(e,r,a,i){Vt(e,(mN<<1)+(i?1:0),3),SN(e,r,a,!0)}function CN(e){Vt(e,K8<<1,3),fn(e,S0,Ln),kN(e)}function FN(e,r,a,i){var t,n,o=0;e.level>0?(e.strm.data_type===dN&&(e.strm.data_type=PN(e)),F0(e,e.l_desc),F0(e,e.d_desc),o=EN(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?p4(e,r,a,i):e.strategy===hN||n===t?(Vt(e,(K8<<1)+(i?1:0),3),u4(e,Ln,Uc)):(Vt(e,(vN<<1)+(i?1:0),3),AN(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),u4(e,e.dyn_ltree,e.dyn_dtree)),n4(e),i&&o4(e)}function qN(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[(Mc[a]+Dc+1)*2]++,e.dyn_dtree[a4(r)*2]++),e.last_lit===e.lit_bufsize-1}fu._tr_init=TN;fu._tr_stored_block=p4;fu._tr_flush_block=FN;fu._tr_tally=qN;fu._tr_align=CN});var q0=O((PZ,d4)=>{"use strict";function BN(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}d4.exports=BN});var B0=O((TZ,m4)=>{"use strict";function IN(){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 RN=IN();function ON(e,r,a,i){var t=RN,n=i+a;e^=-1;for(var o=i;o<n;o++)e=e>>>8^t[(e^r[o])&255];return e^-1}m4.exports=ON});var xp=O((CZ,v4)=>{"use strict";v4.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 S4=O(dn=>{"use strict";var It=Dn(),pi=h4(),g4=q0(),_o=B0(),zN=xp(),rs=0,DN=1,LN=3,jo=4,b4=5,pn=0,y4=1,hi=-2,UN=-3,I0=-5,NN=-1,MN=1,wp=2,HN=3,VN=4,$N=0,WN=2,kp=8,KN=9,GN=15,YN=8,ZN=29,QN=256,R0=QN+1+ZN,XN=30,JN=19,eM=2*R0+1,rM=15,Nr=3,So=258,zi=So+Nr+1,aM=32,_p=42,O0=69,jp=73,Sp=91,Ep=103,as=113,Vc=666,Ja=1,$c=2,ts=3,pu=4,tM=3;function Eo(e,r){return e.msg=zN[r],r}function x4(e){return(e<<1)-(e>4?9:0)}function Ao(e){for(var r=e.length;--r>=0;)e[r]=0}function Po(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){pi._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,Po(e.strm)}function Kr(e,r){e.pending_buf[e.pending++]=r}function Wc(e,r){e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255}function iM(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=g4(e.adler,r,t,a):e.state.wrap===2&&(e.adler=_o(e.adler,r,t,a)),e.next_in+=t,e.total_in+=t,t)}function w4(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-zi?e.strstart-(e.w_size-zi):0,l=e.window,f=e.w_mask,v=e.prev,h=e.strstart+So,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=So-(h-i),i=h-So,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-zi)){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=iM(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<zi&&e.strm.avail_in!==0)}function nM(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-zi&&(mt(e,!1),e.strm.avail_out===0))return Ja}return e.insert=0,r===jo?(mt(e,!0),e.strm.avail_out===0?ts:pu):(e.strstart>e.block_start&&(mt(e,!1),e.strm.avail_out===0),Ja)}function z0(e,r){for(var a,i;;){if(e.lookahead<zi){if(is(e),e.lookahead<zi&&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-zi&&(e.match_length=w4(e,a)),e.match_length>=Nr)if(i=pi._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=pi._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===jo?(mt(e,!0),e.strm.avail_out===0?ts:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:$c}function hu(e,r){for(var a,i,t;;){if(e.lookahead<zi){if(is(e),e.lookahead<zi&&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-zi&&(e.match_length=w4(e,a),e.match_length<=5&&(e.strategy===MN||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=pi._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=pi._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=pi._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Nr-1?e.strstart:Nr-1,r===jo?(mt(e,!0),e.strm.avail_out===0?ts:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:$c}function oM(e,r){for(var a,i,t,n,o=e.window;;){if(e.lookahead<=So){if(is(e),e.lookahead<=So&&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+So;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=So-(n-t),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Nr?(a=pi._tr_tally(e,1,e.match_length-Nr),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(a=pi._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===jo?(mt(e,!0),e.strm.avail_out===0?ts:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:$c}function sM(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=pi._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===jo?(mt(e,!0),e.strm.avail_out===0?ts:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Ja:$c}function hn(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 du;du=[new hn(0,0,0,0,nM),new hn(4,4,8,4,z0),new hn(4,5,16,8,z0),new hn(4,6,32,32,z0),new hn(4,4,16,16,hu),new hn(8,16,32,32,hu),new hn(8,16,128,128,hu),new hn(8,32,128,256,hu),new hn(32,128,258,1024,hu),new hn(32,258,258,4096,hu)];function uM(e){e.window_size=2*e.w_size,Ao(e.head),e.max_lazy_match=du[e.level].max_lazy,e.good_match=du[e.level].good_length,e.nice_match=du[e.level].nice_length,e.max_chain_length=du[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 cM(){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=kp,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(eM*2),this.dyn_dtree=new It.Buf16((2*XN+1)*2),this.bl_tree=new It.Buf16((2*JN+1)*2),Ao(this.dyn_ltree),Ao(this.dyn_dtree),Ao(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new It.Buf16(rM+1),this.heap=new It.Buf16(2*R0+1),Ao(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new It.Buf16(2*R0+1),Ao(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 k4(e){var r;return!e||!e.state?Eo(e,hi):(e.total_in=e.total_out=0,e.data_type=WN,r=e.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?_p:as,e.adler=r.wrap===2?0:1,r.last_flush=rs,pi._tr_init(r),pn)}function _4(e){var r=k4(e);return r===pn&&uM(e.state),r}function lM(e,r){return!e||!e.state||e.state.wrap!==2?hi:(e.state.gzhead=r,pn)}function j4(e,r,a,i,t,n){if(!e)return hi;var o=1;if(r===NN&&(r=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),t<1||t>KN||a!==kp||i<8||i>15||r<0||r>9||n<0||n>VN)return Eo(e,hi);i===8&&(i=9);var s=new cM;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,_4(e)}function fM(e,r){return j4(e,r,kp,GN,YN,$N)}function pM(e,r){var a,i,t,n;if(!e||!e.state||r>b4||r<0)return e?Eo(e,hi):hi;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===Vc&&r!==jo)return Eo(e,e.avail_out===0?I0:hi);if(i.strm=e,a=i.last_flush,i.last_flush=r,i.status===_p)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>=wp||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=_o(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=O0):(Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,i.level===9?2:i.strategy>=wp||i.level<2?4:0),Kr(i,tM),i.status=as);else{var o=kp+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=wp||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=aM),o+=31-o%31,i.status=as,Wc(i,o),i.strstart!==0&&(Wc(i,e.adler>>>16),Wc(i,e.adler&65535)),e.adler=1}if(i.status===O0)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=_o(e.adler,i.pending_buf,i.pending-t,t)),Po(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=_o(e.adler,i.pending_buf,i.pending-t,t)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=jp)}else i.status=jp;if(i.status===jp)if(i.gzhead.name){t=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=_o(e.adler,i.pending_buf,i.pending-t,t)),Po(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=_o(e.adler,i.pending_buf,i.pending-t,t)),n===0&&(i.gzindex=0,i.status=Sp)}else i.status=Sp;if(i.status===Sp)if(i.gzhead.comment){t=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=_o(e.adler,i.pending_buf,i.pending-t,t)),Po(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=_o(e.adler,i.pending_buf,i.pending-t,t)),n===0&&(i.status=Ep)}else i.status=Ep;if(i.status===Ep&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&Po(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(Po(e),e.avail_out===0)return i.last_flush=-1,pn}else if(e.avail_in===0&&x4(r)<=x4(a)&&r!==jo)return Eo(e,I0);if(i.status===Vc&&e.avail_in!==0)return Eo(e,I0);if(e.avail_in!==0||i.lookahead!==0||r!==rs&&i.status!==Vc){var c=i.strategy===wp?sM(i,r):i.strategy===HN?oM(i,r):du[i.level].func(i,r);if((c===ts||c===pu)&&(i.status=Vc),c===Ja||c===ts)return e.avail_out===0&&(i.last_flush=-1),pn;if(c===$c&&(r===DN?pi._tr_align(i):r!==b4&&(pi._tr_stored_block(i,0,0,!1),r===LN&&(Ao(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),Po(e),e.avail_out===0))return i.last_flush=-1,pn}return r!==jo?pn:i.wrap<=0?y4:(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)):(Wc(i,e.adler>>>16),Wc(i,e.adler&65535)),Po(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?pn:y4)}function hM(e){var r;return!e||!e.state?hi:(r=e.state.status,r!==_p&&r!==O0&&r!==jp&&r!==Sp&&r!==Ep&&r!==as&&r!==Vc?Eo(e,hi):(e.state=null,r===as?Eo(e,UN):pn))}function dM(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!==_p||i.lookahead))return hi;for(o===1&&(e.adler=g4(e.adler,r,a,0)),i.wrap=0,a>=i.w_size&&(o===0&&(Ao(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,pn}dn.deflateInit=fM;dn.deflateInit2=j4;dn.deflateReset=_4;dn.deflateResetKeep=k4;dn.deflateSetHeader=lM;dn.deflate=pM;dn.deflateEnd=hM;dn.deflateSetDictionary=dM;dn.deflateInfo="pako deflate (from Nodeca project)"});var D0=O(mu=>{"use strict";var Ap=Dn(),E4=!0,A4=!0;try{String.fromCharCode.apply(null,[0])}catch{E4=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{A4=!1}var Kc=new Ap.Buf8(256);for(Un=0;Un<256;Un++)Kc[Un]=Un>=252?6:Un>=248?5:Un>=240?4:Un>=224?3:Un>=192?2:1;var Un;Kc[254]=Kc[254]=1;mu.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 Ap.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 P4(e,r){if(r<65534&&(e.subarray&&A4||!e.subarray&&E4))return String.fromCharCode.apply(null,Ap.shrinkBuf(e,r));for(var a="",i=0;i<r;i++)a+=String.fromCharCode(e[i]);return a}mu.buf2binstring=function(e){return P4(e,e.length)};mu.binstring2buf=function(e){for(var r=new Ap.Buf8(e.length),a=0,i=r.length;a<i;a++)r[a]=e.charCodeAt(a);return r};mu.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=Kc[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 P4(s,i)};mu.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+Kc[e[a]]>r?a:r}});var L0=O((BZ,T4)=>{"use strict";function mM(){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}T4.exports=mM});var B4=O(Zc=>{"use strict";var Gc=S4(),Yc=Dn(),U0=D0(),N0=xp(),vM=L0(),C4=Object.prototype.toString,gM=0,M0=4,vu=0,F4=1,q4=2,bM=-1,yM=0,xM=8;function ns(e){if(!(this instanceof ns))return new ns(e);this.options=Yc.assign({level:bM,method:xM,chunkSize:16384,windowBits:15,memLevel:8,strategy:yM,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 vM,this.strm.avail_out=0;var a=Gc.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(a!==vu)throw new Error(N0[a]);if(r.header&&Gc.deflateSetHeader(this.strm,r.header),r.dictionary){var i;if(typeof r.dictionary=="string"?i=U0.string2buf(r.dictionary):C4.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,a=Gc.deflateSetDictionary(this.strm,i),a!==vu)throw new Error(N0[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?M0:gM,typeof e=="string"?a.input=U0.string2buf(e):C4.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 Yc.Buf8(i),a.next_out=0,a.avail_out=i),t=Gc.deflate(a,n),t!==F4&&t!==vu)return this.onEnd(t),this.ended=!0,!1;(a.avail_out===0||a.avail_in===0&&(n===M0||n===q4))&&(this.options.to==="string"?this.onData(U0.buf2binstring(Yc.shrinkBuf(a.output,a.next_out))):this.onData(Yc.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||a.avail_out===0)&&t!==F4);return n===M0?(t=Gc.deflateEnd(this.strm),this.onEnd(t),this.ended=!0,t===vu):(n===q4&&(this.onEnd(vu),a.avail_out=0),!0)};ns.prototype.onData=function(e){this.chunks.push(e)};ns.prototype.onEnd=function(e){e===vu&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Yc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function H0(e,r){var a=new ns(r);if(a.push(e,!0),a.err)throw a.msg||N0[a.err];return a.result}function wM(e,r){return r=r||{},r.raw=!0,H0(e,r)}function kM(e,r){return r=r||{},r.gzip=!0,H0(e,r)}Zc.Deflate=ns;Zc.deflate=H0;Zc.deflateRaw=wM;Zc.gzip=kM});var R4=O((RZ,I4)=>{"use strict";var Pp=30,_M=12;I4.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=Pp;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=Pp;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=Pp;break e}break}}else if((F&64)==0){I=w[(I&65535)+(y&(1<<F)-1)];continue r}else if(F&32){i.mode=_M;break e}else{r.msg="invalid literal/length code",i.mode=Pp;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 M4=O((OZ,N4)=>{"use strict";var O4=Dn(),gu=15,z4=852,D4=592,L4=0,V0=1,U4=2,jM=[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],SM=[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],EM=[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],AM=[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];N4.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 O4.Buf16(gu+1),$=new O4.Buf16(gu+1),Q=null,re=0,je,me,ce;for(f=0;f<=gu;f++)Z[f]=0;for(v=0;v<t;v++)Z[a[i+v]]++;for(y=l,d=gu;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<=gu;f++)if(A<<=1,A-=Z[f],A<0)return-1;if(A>0&&(r===L4||d!==1))return-1;for($[1]=0,f=1;f<gu;f++)$[f+1]=$[f]+Z[f];for(v=0;v<t;v++)a[i+v]!==0&&(s[$[a[i+v]]++]=v);if(r===L4?(M=Q=s,V=19):r===V0?(M=jM,K-=257,Q=SM,re-=257,V=256):(M=EM,Q=AM,V=-1),T=0,v=0,f=h,U=o,j=y,w=0,R=-1,P=1<<y,z=P-1,r===V0&&P>z4||r===U4&&P>D4)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===V0&&P>z4||r===U4&&P>D4)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 _S=O(Di=>{"use strict";var Xt=Dn(),$0=q0(),mn=B0(),PM=R4(),Qc=M4(),TM=0,H4=1,V4=2,$4=4,CM=5,Tp=6,os=0,FM=1,qM=2,di=-2,W4=-3,W0=-4,BM=-5,K4=8,G4=1,Y4=2,Z4=3,Q4=4,X4=5,J4=6,eS=7,rS=8,aS=9,tS=10,Cp=11,Nn=12,K0=13,iS=14,G0=15,nS=16,oS=17,sS=18,uS=19,Fp=20,qp=21,cS=22,lS=23,fS=24,pS=25,hS=26,Y0=27,dS=28,mS=29,ma=30,Z0=31,IM=32,RM=852,OM=592,zM=15,DM=zM;function vS(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function LM(){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 gS(e){var r;return!e||!e.state?di:(r=e.state,e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=G4,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(RM),r.distcode=r.distdyn=new Xt.Buf32(OM),r.sane=1,r.back=-1,os)}function bS(e){var r;return!e||!e.state?di:(r=e.state,r.wsize=0,r.whave=0,r.wnext=0,gS(e))}function yS(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))?di:(i.window!==null&&i.wbits!==r&&(i.window=null),i.wrap=a,i.wbits=r,bS(e))}function xS(e,r){var a,i;return e?(i=new LM,e.state=i,i.window=null,a=yS(e,r),a!==os&&(e.state=null),a):di}function UM(e){return xS(e,DM)}var wS=!0,Q0,X0;function NM(e){if(wS){var r;for(Q0=new Xt.Buf32(512),X0=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(Qc(H4,e.lens,0,288,Q0,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;Qc(V4,e.lens,0,32,X0,0,e.work,{bits:5}),wS=!1}e.lencode=Q0,e.lenbits=9,e.distcode=X0,e.distbits=5}function kS(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 MM(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 di;a=e.state,a.mode===Nn&&(a.mode=K0),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 G4:if(a.wrap===0){a.mode=K0;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=mn(a.check,M,2,0),l=0,f=0,a.mode=Y4;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)!==K4){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?tS:Nn,l=0,f=0;break;case Y4:for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(a.flags=l,(a.flags&255)!==K4){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=mn(a.check,M,2,0)),l=0,f=0,a.mode=Z4;case Z4: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=mn(a.check,M,4,0)),l=0,f=0,a.mode=Q4;case Q4: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=mn(a.check,M,2,0)),l=0,f=0,a.mode=X4;case X4: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=mn(a.check,M,2,0)),l=0,f=0}else a.head&&(a.head.extra=null);a.mode=J4;case J4: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=mn(a.check,i,d,n)),s-=d,n+=d,a.length-=d),a.length))break e;a.length=0,a.mode=eS;case eS: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=mn(a.check,i,d,n)),s-=d,n+=d,z)break e}else a.head&&(a.head.name=null);a.length=0,a.mode=rS;case rS: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=mn(a.check,i,d,n)),s-=d,n+=d,z)break e}else a.head&&(a.head.comment=null);a.mode=aS;case aS: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=Nn;break;case tS:for(;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}e.adler=a.check=vS(l),l=0,f=0,a.mode=Cp;case Cp: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,qM;e.adler=a.check=1,a.mode=Nn;case Nn:if(r===CM||r===Tp)break e;case K0:if(a.last){l>>>=f&7,f-=f&7,a.mode=Y0;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=iS;break;case 1:if(NM(a),a.mode=Fp,r===Tp){l>>>=2,f-=2;break e}break;case 2:a.mode=oS;break;case 3:e.msg="invalid block type",a.mode=ma}l>>>=2,f-=2;break;case iS: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=G0,r===Tp)break e;case G0:a.mode=nS;case nS: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=Nn;break;case oS: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=sS;case sS: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=Qc(TM,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=uS;case uS: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=Qc(H4,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=Qc(V4,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=Fp,r===Tp)break e;case Fp:a.mode=qp;case qp: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,PM(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===Nn&&(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=hS;break}if(P&32){a.back=-1,a.mode=Nn;break}if(P&64){e.msg="invalid literal/length code",a.mode=ma;break}a.extra=P&15,a.mode=cS;case cS: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=lS;case lS: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=fS;case fS: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=pS;case pS: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=qp);break;case hS:if(c===0)break e;t[o++]=a.length,c--,a.mode=qp;break;case Y0: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?mn(a.check,t,h,o-h):$0(a.check,t,h,o-h)),h=c,(a.flags?l:vS(l))!==a.check){e.msg="incorrect data check",a.mode=ma;break}l=0,f=0}a.mode=dS;case dS: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=mS;case mS:U=FM;break e;case ma:U=W4;break e;case Z0:return W0;case IM:default:return di}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<Y0||r!==$4))&&kS(e,e.output,e.next_out,h-e.avail_out)?(a.mode=Z0,W0):(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?mn(a.check,t,h,e.next_out-h):$0(a.check,t,h,e.next_out-h)),e.data_type=a.bits+(a.last?64:0)+(a.mode===Nn?128:0)+(a.mode===Fp||a.mode===G0?256:0),(v===0&&h===0||r===$4)&&U===os&&(U=BM),U)}function HM(e){if(!e||!e.state)return di;var r=e.state;return r.window&&(r.window=null),e.state=null,os}function VM(e,r){var a;return!e||!e.state||(a=e.state,(a.wrap&2)==0)?di:(a.head=r,r.done=!1,os)}function $M(e,r){var a=r.length,i,t,n;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==Cp)?di:i.mode===Cp&&(t=1,t=$0(t,r,a,0),t!==i.check)?W4:(n=kS(e,r,a,a),n?(i.mode=Z0,W0):(i.havedict=1,os))}Di.inflateReset=bS;Di.inflateReset2=yS;Di.inflateResetKeep=gS;Di.inflateInit=UM;Di.inflateInit2=xS;Di.inflate=MM;Di.inflateEnd=HM;Di.inflateGetHeader=VM;Di.inflateSetDictionary=$M;Di.inflateInfo="pako inflate (from Nodeca project)"});var J0=O((DZ,jS)=>{"use strict";jS.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 ES=O((LZ,SS)=>{"use strict";function WM(){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}SS.exports=WM});var PS=O(Jc=>{"use strict";var bu=_S(),Xc=Dn(),Bp=D0(),Ba=J0(),eg=xp(),KM=L0(),GM=ES(),AS=Object.prototype.toString;function ss(e){if(!(this instanceof ss))return new ss(e);this.options=Xc.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 KM,this.strm.avail_out=0;var a=bu.inflateInit2(this.strm,r.windowBits);if(a!==Ba.Z_OK)throw new Error(eg[a]);if(this.header=new GM,bu.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=Bp.string2buf(r.dictionary):AS.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(a=bu.inflateSetDictionary(this.strm,r.dictionary),a!==Ba.Z_OK)))throw new Error(eg[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=Bp.binstring2buf(e):AS.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 Xc.Buf8(i),a.next_out=0,a.avail_out=i),n=bu.inflate(a,Ba.Z_NO_FLUSH),n===Ba.Z_NEED_DICT&&t&&(n=bu.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=Bp.utf8border(a.output,a.next_out),c=a.next_out-s,l=Bp.buf2string(a.output,s),a.next_out=c,a.avail_out=i-c,c&&Xc.arraySet(a.output,a.output,s,c,0),this.onData(l)):this.onData(Xc.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=bu.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=Xc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function rg(e,r){var a=new ss(r);if(a.push(e,!0),a.err)throw a.msg||eg[a.err];return a.result}function YM(e,r){return r=r||{},r.raw=!0,rg(e,r)}Jc.Inflate=ss;Jc.inflate=rg;Jc.inflateRaw=YM;Jc.ungzip=rg});var FS=O((NZ,CS)=>{"use strict";var ZM=Dn().assign,QM=B4(),XM=PS(),JM=J0(),TS={};ZM(TS,QM,XM,JM);CS.exports=TS});Zp(exports);var Mi=typeof process!="object"||String(process)!=="[object process]"||process.browser,Qp={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global},za=Qp.global||Qp.self||Qp.window;var Ng={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"]=Ng||{};function jr(e,r,a){return r<=e&&e<=a}function DE(e,r){return e.indexOf(r)!==-1}var xn=Math.floor;function vl(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function LE(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 UE(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 Xp(e){this.tokens=[].slice.call(e),this.tokens.reverse()}Xp.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 yi(e){throw TypeError("The code point "+e+" could not be encoded.")}function NE(){}NE.prototype={handler:function(e,r){}};function ME(){}ME.prototype={handler:function(e,r){}};function Jp(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(eh,e)?eh[e]:null}var Mg=[{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"}],eh={};Mg.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(a){eh[a]=r})})});var zt={},Dt={};function ds(e,r){return r&&r[e]||null}function ms(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 HE(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 VE(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 $E(e){rh=rh||At("jis0208").map(function(a,i){return jr(i,8272,8835)?null:a});var r=rh;return r.indexOf(e)}var rh;function WE(e){ah=ah||At("big5").map(function(a,i){return i<(161-129)*157?null:a});var r=ah;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):ms(e,r)}var ah,Hg="utf-8";function Ro(e,r){if(!(this instanceof Ro))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):Hg,r=vl(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var a=Jp(e);if(a===null||a.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Dt[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(Ro.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(Ro.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(Ro.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));Ro.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=vl(a),this._do_not_flush||(this._decoder=Dt[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(a.stream);for(var t=new Xp(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 DE(["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)),UE(l)}return c.call(this,n)};function Tu(e,r){if(!(this instanceof Tu))throw TypeError("Called as a function. Did you forget 'new'?");r=vl(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):Hg;var i=Jp(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!zt[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");a._encoding=i}else a._encoding=Jp("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(Tu.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});Tu.prototype.encode=function(r,a){r=r===void 0?"":String(r),a=vl(a),this._do_not_flush||(this._encoder=zt[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(a.stream);for(var i=new Xp(LE(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 KE(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 GE(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}}zt["UTF-8"]=function(e){return new GE(e)};Dt["UTF-8"]=function(e){return new KE(e)};function YE(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 ZE(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Dr)return ia;if(ei(t))return t;var n=ms(t,e);return n===null&&yi(t),n+128}}(function(){"encoding-indexes"in global&&Mg.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var a=r.name,i=At(a.toLowerCase());Dt[a]=function(t){return new YE(i,t)},zt[a]=function(t){return new ZE(i,t)}})})})();Dt.GBK=function(e){return new Vg(e)};zt.GBK=function(e){return new $g(e,!0)};function Vg(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=HE((((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:ds(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 $g(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 yi(t);if(r&&t===8364)return 128;var n=ms(t,At("gb18030"));if(n!==null){var o=xn(n/190)+129,s=n%190,c=s<63?64:65;return[o,s+c]}if(r)return yi(t);n=VE(t);var l=xn(n/10/126/10);n=n-l*10*126*10;var f=xn(n/10/126);n=n-f*10*126;var v=xn(n/10),h=n-v*10;return[l+129,f+48,v+129,h+48]}}zt.gb18030=function(e){return new $g(e)};Dt.gb18030=function(e){return new Vg(e)};function QE(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:ds(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 XE(e){var r=e.fatal;this.handler=function(a,i){if(i===Dr)return ia;if(ei(i))return i;var t=WE(i);if(t===null)return yi(i);var n=xn(t/157)+129;if(n<161)return yi(i);var o=t%157,s=o<63?64:98;return[n,o+s]}}zt.Big5=function(e){return new XE(e)};Dt.Big5=function(e){return new QE(e)};function JE(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=ds((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 e9(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=ms(i,At("jis0208"));if(t===null)return yi(i);var n=xn(t/94)+161,o=t%94+161;return[n,o]}}zt["EUC-JP"]=function(e){return new e9(e)};Dt["EUC-JP"]=function(e){return new JE(e)};function r9(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=ds(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 a9(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 yi(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=ms(n,At("jis0208"));if(o===null)return yi(n);if(i!==a.jis0208)return t.prepend(n),i=a.jis0208,[27,36,66];var s=xn(o/94)+33,c=o%94+33;return[s,c]}}zt["ISO-2022-JP"]=function(e){return new a9(e)};Dt["ISO-2022-JP"]=function(e){return new r9(e)};function t9(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:ds(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 i9(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=$E(i);if(t===null)return yi(i);var n=xn(t/188),o=n<31?129:193,s=t%188,c=s<63?64:65;return[n+o,s+c]}}zt.Shift_JIS=function(e){return new i9(e)};Dt.Shift_JIS=function(e){return new t9(e)};function n9(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:ds(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 o9(e){var r=e.fatal;this.handler=function(a,i){if(i===Dr)return ia;if(ei(i))return i;var t=ms(i,At("euc-kr"));if(t===null)return yi(i);var n=xn(t/190)+129,o=t%190+65;return[n,o]}}zt["EUC-KR"]=function(e){return new o9(e)};Dt["EUC-KR"]=function(e){return new n9(e)};function gl(e,r){var a=e>>8,i=e&255;return r?[a,i]:[i,a]}function Wg(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(gl(s,e)),Lr(a))}return jr(s,55296,56319)?(t=s,null):jr(s,56320,57343)?Lr(a):s}}function Kg(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Dr)return ia;if(jr(t,0,65535))return gl(t,e);var n=gl((t-65536>>10)+55296,e),o=gl((t-65536&1023)+56320,e);return n.concat(o)}}zt["UTF-16BE"]=function(e){return new Kg(!0,e)};Dt["UTF-16BE"]=function(e){return new Wg(!0,e)};zt["UTF-16LE"]=function(e){return new Kg(!1,e)};Dt["UTF-16LE"]=function(e){return new Wg(!1,e)};function s9(e){var r=e.fatal;this.handler=function(a,i){return i===Dr?ia:Jt(i)?i:63360+i-128}}function u9(e){var r=e.fatal;this.handler=function(a,i){return i===Dr?ia:ei(i)?i:jr(i,63360,63487)?i-63360+128:yi(i)}}zt["x-user-defined"]=function(e){return new u9(e)};Dt["x-user-defined"]=function(e){return new s9(e)};var c9="rejected",l9="fulfilled";function Gg(e){let r=e.map(a=>a.then(i=>({status:l9,value:i})).catch(i=>({status:c9,reason:i})));return Promise.all(r)}function bl(e){return Buffer.from(e).toString("base64")}function th(e){return Buffer.from(e,"base64").toString("ascii")}var ri=class{constructor(r){this.map={},r instanceof ri?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=Cu(r),a=Yg(a);let i=this.map[r];this.map[r]=i?`${i}, ${a}`:a}delete(r){delete this.map[Cu(r)]}get(r){return r=Cu(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(Cu(r))}set(r,a){this.map[Cu(r)]=Yg(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)}),ih(r)}values(){let r=[];return this.forEach(function(a){r.push(a)}),ih(r)}entries(){let r=[];return this.forEach(function(a,i){r.push([i,a])}),ih(r)}*[Symbol.iterator](){yield*this.entries()}};function Cu(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 Yg(e){return typeof e!="string"&&(e=String(e)),e}function ih(e){let r={next(){let a=e.shift();return{done:a===void 0,value:a}}};return r[Symbol.iterator]=function(){return r},r}function nh(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var yl=Ot(require("zlib"));var f9=e=>e&&e instanceof ArrayBuffer,p9=e=>e&&e instanceof Buffer;function Zg(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:oh(a),mimeType:i}}function oh(e){if(f9(e))return e;if(p9(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 Qg(e,r){switch(r.get("content-encoding")){case"br":return e.pipe(yl.default.createBrotliDecompress());case"gzip":return e.pipe(yl.default.createGunzip());case"deflate":return e.pipe(yl.default.createDeflate());default:return e}}async function Xg(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(oh(t))}),e.on("end",()=>{let t=h9(r);a(t)})})}function h9(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 uh=Ot(require("stream")),d9=e=>typeof e=="boolean",Jg=e=>typeof e=="function",m9=e=>e!==null&&typeof e=="object",sh=e=>m9(e)&&Jg(e.read)&&Jg(e.pipe)&&d9(e.readable),xi=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 ri((a==null?void 0:a.headers)||{}),sh(r)?this._body=Qg(r,i):typeof r=="string"?this._body=uh.Readable.from([new TextEncoder().encode(r)]):this._body=uh.Readable.from([r||new ArrayBuffer(0)])}get body(){return nh(!this.bodyUsed),nh(sh(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return sh(this._body)?await Xg(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 eb=Ot(require("http")),rb=Ot(require("https"));var ch=Ot(require("fs"));async function lh(e,r){let a=e.split("?")[0];try{let i=await new Promise((s,c)=>{let l=ch.default.createReadStream(a,{encoding:null});l.once("readable",()=>s(l)),l.on("error",f=>c(f))}),t=200,n="OK",o=v9(a);return new xi(i,{headers:o,status:t,statusText:n,url:e})}catch(i){let t=400,n=i.message,o={};return new xi(i.message,{headers:o,status:t,statusText:n,url:e})}}function v9(e){let r={};if(!r["content-length"]){let a=ch.default.statSync(e);r["content-length"]=a.size}return e.endsWith(".gz")&&(e=e.slice(0,-3),r["content-encoding"]="gzip"),new ri(r)}var fh=e=>e.startsWith("data:"),g9=e=>e.startsWith("http:")||e.startsWith("https:");async function Fu(e,r){try{if(!g9(e)&&!fh(e))return await lh(e,r);if(fh(e)){let{arrayBuffer:l,mimeType:f}=Zg(e);return new xi(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 b9(i,r),n=k9(e,t,a),{status:o,statusText:s}=w9(t),c=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&c){let l=y9(e,n.get("location"));return await Fu(l,r)}return new xi(t,{headers:n,status:o,statusText:s,url:e})}catch(a){return new xi(null,{status:400,statusText:String(a),url:e})}}async function b9(e,r){return await new Promise((a,i)=>{let t=x9(e,r),n=e.startsWith("https:")?rb.default.request(t,o=>a(o)):eb.default.request(t,o=>a(o));n.on("error",o=>i(o)),n.end()})}function y9(e,r){if(r.startsWith("http"))return r;let a=new URL(e);return a.pathname=r,a.href}function x9(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 Pu(yn(yn({hostname:t.hostname,path:t.pathname,method:"GET"},r),r==null?void 0:r.fetch),{headers:i,port:t.port})}function w9(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function k9(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=_9(e);Number.isFinite(t)&&(i["content-length"]=t)}return Object.assign(i,a),new ri(i)}function _9(e){return fh(e)?e.length-"data:".length:null}var Qy=Ot(Yy()),Xy=Ot(Lu());function Zy(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function z7(e,r){let a=r.type?r.type.replace("image/",""):"jpeg",i=(0,Xy.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,Qy.default)(i,a,r)}function cd(e,r){let a=z7(e,r);return new Promise(i=>{let t=[];a.on("data",n=>t.push(n)),a.on("end",()=>{let n=Buffer.concat(t);i(Zy(n))})})}var F8=Ot(C8()),q8=["image/png","image/jpeg","image/gif"];async function h0(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 YU(a,r)}function YU(e,r){return new Promise(a=>(0,F8.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 R8=Ot(I8());delete global.ReadableStream;var Rc=class extends R8.ReadableStream{};var d0=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 m0=class extends Rc{constructor(r){super(new d0(r.values()),{type:"bytes"});this._chunks=r}async*[Symbol.asyncIterator](r){let a=this.getReader();yield*this._chunks,a.releaseLock()}};var wo=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 wo)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=ZU(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 wo([],{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 m0(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 ZU(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}var v0=class extends wo{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 XU=!Mi||!("TextEncoder"in za);XU&&(za.TextEncoder=Tu);var JU=!Mi||!("TextDecoder"in za);JU&&(za.TextDecoder=Ro);!Mi&&!("atob"in za)&&bl&&(za.atob=bl);!Mi&&!("btoa"in za)&&th&&(za.btoa=th);!Mi&&!("Headers"in za)&&ri&&(za.Headers=ri);!Mi&&!("Response"in za)&&xi&&(za.Response=xi);!Mi&&!("fetch"in za)&&Fu&&(za.fetch=Fu);!Mi&&!("_encodeImageNode"in za)&&cd&&(za._encodeImageNode=cd);!Mi&&!("_parseImageNode"in za)&&h0&&(za._parseImageNode=h0,za._imageFormatsNode=q8);"allSettled"in Promise||(Promise.allSettled=Gg);var cn={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},O8=cn.self||cn.window||cn.global||{},z8=cn.window||cn.self||cn.global||{},D8=cn.global||cn.self||cn.window||{},L8=cn.document||{};var zn=Boolean(typeof process!="object"||String(process)!=="[object process]"||process.browser);var U8=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),eN=U8&&parseFloat(U8[1])||0;function N8(...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 g0(e){let r=[];for await(let a of e)r.push(a);return N8(...r)}function M8(e){return Buffer.isBuffer(e)?new Uint8Array(e.buffer,e.byteOffset,e.length).slice().buffer:e}function H8(e){return e&&typeof e=="object"&&e.isBuffer}function ou(e){if(H8(e))return M8(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 su(e){return r=>new Promise((a,i)=>e(r,(t,n)=>t?i(t):a(n)))}var ln={};OE(ln,{dirname:()=>aN,filename:()=>rN,join:()=>tN,resolve:()=>iN});function V8(){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 rN(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(r+1):""}function aN(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(0,r):""}function tN(...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 iN(...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=V8()),o=t),o.length!==0&&(a=`${o}/${a}`,i=o.charCodeAt(0)===Oc)}return a=nN(a,!i),i?`/${a}`:a.length>0?a:"."}var Oc=47,b0=46;function nN(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)!==b0||a.charCodeAt(a.length-2)!==b0){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===b0&&t!==-1?++t:t=-1}return a}var y0="Tile converter does not work in browser, only in node js environment";var uu=Ot(require("fs")),x0=class{constructor(r,a){this.read=(r,a,i,t)=>new Promise(n=>{(0,uu.read)(this.fileDescriptor,r,a,i,t,(o,s,c)=>n({bytesRead:s,buffer:c}))});this.fileDescriptor=r,this.stats=a}get stat(){return this.stats}},vp=x0;vp.open=async r=>{let[a,i]=await Promise.all([new Promise(t=>{(0,uu.open)(r,void 0,void 0,(n,o)=>t(o))}),new Promise(t=>{(0,uu.stat)(r,{bigint:!0},(n,o)=>t(o))})]);return new x0(a,i)};var zc=class{static async from(r){let a=await vp.open(r);return new zc(a,a.stat.size)}constructor(r,a){this.fileDescriptor=r,this.size=a}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 ko={COMPRESSED_SIZE_OFFSET:18n,UNCOMPRESSED_SIZE_OFFSET:22n,FILE_NAME_LENGTH_OFFSET:26n,EXTRA_FIELD_LENGTH_OFFSET:28n,FILE_NAME_OFFSET:30n},sN=Buffer.from([80,75,3,4]),gp=async(e,r)=>{if(Buffer.from(await r.slice(e,e+4n)).compare(sN)!==0)return null;let a=await r.getUint16(e+ko.FILE_NAME_LENGTH_OFFSET),i=new TextDecoder().decode(await r.slice(e+ko.FILE_NAME_OFFSET,e+ko.FILE_NAME_OFFSET+BigInt(a))).split("\\").join("/"),t=await r.getUint16(e+ko.EXTRA_FIELD_LENGTH_OFFSET),n=e+ko.FILE_NAME_OFFSET+BigInt(a+t),o=BigInt(await r.getUint32(e+ko.COMPRESSED_SIZE_OFFSET)),s=BigInt(await r.getUint32(e+ko.UNCOMPRESSED_SIZE_OFFSET)),c=e+ko.FILE_NAME_OFFSET+BigInt(a),l=4n;return s===BigInt(4294967295)&&(s=await r.getBigUint64(c+l),l+=8n),o===BigInt(4294967295)&&(o=await r.getBigUint64(c+l),l+=8n),n===BigInt(4294967295)&&(n=await r.getBigUint64(c+l)),{fileNameLength:a,fileName:i,extraFieldLength:t,fileDataOffset:n,compressedSize:o}};var w0=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 g0(r)}improveError(r){return r.message.includes(this.name)||(r.message=`${this.name} ${r.message}`),r}};var el=Ot(FS()),Mn=Ot(require("zlib"));var ag=class extends w0{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(!zn&&((a=this.options.deflate)==null?void 0:a.useZlib)){let t=((i=this.options.deflate)==null?void 0:i.gzip)?await su(Mn.default.gzip)(r):await su(Mn.default.deflate)(r);return ou(t)}return this.compressSync(r)}async decompress(r){var a,i;if(!zn&&((a=this.options.deflate)==null?void 0:a.useZlib)){let t=((i=this.options.deflate)==null?void 0:i.gzip)?await su(Mn.default.gunzip)(r):await su(Mn.default.inflate)(r);return ou(t)}return this.decompressSync(r)}compressSync(r){var t,n,o;if(!zn&&((t=this.options.deflate)==null?void 0:t.useZlib)){let s=((n=this.options.deflate)==null?void 0:n.gzip)?Mn.default.gzipSync(r):Mn.default.deflateSync(r);return ou(s)}let a=((o=this.options)==null?void 0:o.deflate)||{},i=new Uint8Array(r);return el.default.deflate(i,a).buffer}decompressSync(r){var t,n,o;if(!zn&&((t=this.options.deflate)==null?void 0:t.useZlib)){let s=((n=this.options.deflate)==null?void 0:n.gzip)?Mn.default.gunzipSync(r):Mn.default.inflateSync(r);return ou(s)}let a=((o=this.options)==null?void 0:o.deflate)||{},i=new Uint8Array(r);return el.default.inflate(i,a).buffer}async*compressBatches(r){var t;let a=((t=this.options)==null?void 0:t.deflate)||{},i=new el.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 el.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 Ip=class extends ag{constructor(r){super(Pu(yn({},r),{deflate:Pu(yn({},r==null?void 0:r.gzip),{gzip:!0})}));this.name="gzip";this.extensions=["gz","gzip"];this.contentEncodings=["gzip","x-gzip"];this.isSupported=!0}};var tg=Ot(require("fs")),ig=Ot(require("path"));async function qS(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 tg.promises.mkdir(e,{recursive:!0});let t=(0,ig.join)(e,a);try{await tg.promises.writeFile(t,i)}catch(n){throw n}return console.log(`${t} saved.`),t}var eH=["3dSceneLayer.json.gz","3dNodeIndexDocument.json.gz","sharedResource.json.gz"],Rp=class{async extract(r){if(zn)return console.log(y0),y0;let{inputUrl:a}=r,i=await zc.from(a),t=await gp(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 gp(t.fileDataOffset+(t==null?void 0:t.compressedSize),i);return"success"}correctIndexNames(r){if(eH.includes(ln.filename(ln.join("/",r))))return ln.join(ln.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 Ip().decompress(r.data),name:(r.name??"").slice(0,-3)}:Promise.resolve(r)}async writeFile(r,a){if(!r.name)return;let i=ln.join(a,r.name),t=ln.dirname(i),n=ln.filename(i);await qS(t,r.data,n)}};function rH(e,r){if(e+1>=r.length)return"";let a=r[e+1];return a.indexOf("--")===0?"":a}function ng(e,r){let a=rH(e,r);return console.log(`Input tileset value: ${a}`),console.log(`Modified tileset value: ${a.replace(/\\/g,"/")}`),a.replace(/\\/g,"/")}function BS(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 aH(){let[,,...e]=process.argv;e.length===0&&IS();let r=BS(e),a=nH(r),i=iH(a);await tH(i)}aH().catch(e=>{console.log(e),process.exit(1)});function IS(){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 tH(e){console.log("------------------------------------------------"),console.log("Starting conversion of SLPK"),console.log("------------------------------------------------"),new Rp().extract({inputUrl:e.tileset,outputPath:e.output})}function iH(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 nH(e){let r={};return e.forEach((a,i)=>{if(a.indexOf("--")===0)switch(a){case"--tileset":r.tileset=ng(i,e);break;case"--output":r.output=ng(i,e);break;case"--help":IS();break;default:console.warn(`Unknown option ${a}`),process.exit(0)}}),r}
|
|
95
95
|
/*!
|
|
96
96
|
* Copyright 2010 LearnBoost <dev@learnboost.com>
|
|
97
97
|
*
|