@loaders.gl/draco 3.4.11 → 3.4.13

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.
@@ -93,7 +93,7 @@ caused by: `+Vr.fullStack(r):e.stack};Vr.errorFromList=function(e){return Nt.arr
93
93
  `,a(o),a(n.body),a(`\r
94
94
  `)}),a("--"+t.boundary+"--"),t.request.postambleCRLF&&a(`\r
95
95
  `),i};wc.prototype.onRequest=function(e){var r=this,t=r.isChunked(e),i=e.data||e;r.setHeaders(t),r.chunked=t,r.body=r.build(i,t)};b8.Multipart=wc});var k8=I(w8=>{"use strict";var x8=require("url"),oL=/^https?:/;function np(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}np.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)};np.prototype.redirectTo=function(e){var r=this,t=r.request,i=null;if(e.statusCode>=300&&e.statusCode<400&&e.caseless.has("location")){var a=e.caseless.get("location");if(t.debug("redirect",a),r.followAllRedirects)i=a;else if(r.followRedirects)switch(t.method){case"PATCH":case"PUT":case"POST":case"DELETE":break;default:i=a;break}}else if(e.statusCode===401){var n=t._auth.onResponse(e);n&&(t.setHeader("authorization",n),i=t.uri)}return i};np.prototype.onResponse=function(e){var r=this,t=r.request,i=r.redirectTo(e);if(!i||!r.allowRedirect.call(t,e))return!1;if(t.debug("redirect to",i),e.resume&&e.resume(),r.redirectsFollowed>=r.maxRedirects)return t.emit("error",new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+t.uri.href)),!1;r.redirectsFollowed+=1,oL.test(i)||(i=x8.resolve(t.uri.href,i));var a=t.uri;return t.uri=x8.parse(i),t.uri.protocol!==a.protocol&&delete t.agent,r.redirects.push({statusCode:e.statusCode,redirectUri:i}),r.followAllRedirects&&t.method!=="HEAD"&&e.statusCode!==401&&e.statusCode!==307&&(t.method=r.followOriginalHttpMethod?t.method:"GET"),delete t.src,delete t.req,delete t._started,e.statusCode!==401&&e.statusCode!==307&&(delete t.body,delete t._form,t.headers&&(t.removeHeader("host"),t.removeHeader("content-type"),t.removeHeader("content-length"),t.uri.hostname!==t.originalHost.split(":")[0]&&t.removeHeader("authorization"))),r.removeRefererHeader||t.setHeader("referer",a.href),t.emit("redirect"),t.init(),!0};w8.Redirect=np});var S8=I(Ks=>{"use strict";var RG=require("net"),sL=require("tls"),s0=require("http"),_8=require("https"),uL=require("events"),cL=require("assert"),lL=require("util"),fL=bs().Buffer;Ks.httpOverHttp=pL;Ks.httpsOverHttp=dL;Ks.httpOverHttps=hL;Ks.httpsOverHttps=mL;function pL(e){var r=new ln(e);return r.request=s0.request,r}function dL(e){var r=new ln(e);return r.request=s0.request,r.createSocket=j8,r.defaultPort=443,r}function hL(e){var r=new ln(e);return r.request=_8.request,r}function mL(e){var r=new ln(e);return r.request=_8.request,r.createSocket=j8,r.defaultPort=443,r}function ln(e){var r=this;r.options=e||{},r.proxyOptions=r.options.proxy||{},r.maxSockets=r.options.maxSockets||s0.Agent.defaultMaxSockets,r.requests=[],r.sockets=[],r.on("free",function(i,a,n){for(var o=0,s=r.requests.length;o<s;++o){var c=r.requests[o];if(c.host===a&&c.port===n){r.requests.splice(o,1),c.request.onSocket(i);return}}i.destroy(),r.removeSocket(i)})}lL.inherits(ln,uL.EventEmitter);ln.prototype.addRequest=function(r,t){var i=this;if(typeof t=="string"&&(t={host:t,port:arguments[2],path:arguments[3]}),i.sockets.length>=this.maxSockets){i.requests.push({host:t.host,port:t.port,request:r});return}i.createConnection({host:t.host,port:t.port,request:r})};ln.prototype.createConnection=function(r){var t=this;t.createSocket(r,function(i){i.on("free",a),i.on("close",n),i.on("agentRemove",n),r.request.onSocket(i);function a(){t.emit("free",i,r.host,r.port)}function n(o){t.removeSocket(i),i.removeListener("free",a),i.removeListener("close",n),i.removeListener("agentRemove",n)}})};ln.prototype.createSocket=function(r,t){var i=this,a={};i.sockets.push(a);var n=E8({},i.proxyOptions,{method:"CONNECT",path:r.host+":"+r.port,agent:!1});n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+fL.from(n.proxyAuth).toString("base64")),Vo("making CONNECT request");var o=i.request(n);o.useChunkedEncodingByDefault=!1,o.once("response",s),o.once("upgrade",c),o.once("connect",f),o.once("error",p),o.end();function s(m){m.upgrade=!0}function c(m,h,v){process.nextTick(function(){f(m,h,v)})}function f(m,h,v){if(o.removeAllListeners(),h.removeAllListeners(),m.statusCode===200)cL.equal(v.length,0),Vo("tunneling connection has established"),i.sockets[i.sockets.indexOf(a)]=h,t(h);else{Vo("tunneling socket could not be established, statusCode=%d",m.statusCode);var y=new Error("tunneling socket could not be established, statusCode="+m.statusCode);y.code="ECONNRESET",r.request.emit("error",y),i.removeSocket(a)}}function p(m){o.removeAllListeners(),Vo(`tunneling socket could not be established, cause=%s
96
- `,m.message,m.stack);var h=new Error("tunneling socket could not be established, cause="+m.message);h.code="ECONNRESET",r.request.emit("error",h),i.removeSocket(a)}};ln.prototype.removeSocket=function(r){var t=this.sockets.indexOf(r);if(t!==-1){this.sockets.splice(t,1);var i=this.requests.shift();i&&this.createConnection(i)}};function j8(e,r){var t=this;ln.prototype.createSocket.call(t,e,function(i){var a=sL.connect(0,E8({},t.options,{servername:e.host,socket:i}));t.sockets[t.sockets.indexOf(i)]=a,r(a)})}function E8(e){for(var r=1,t=arguments.length;r<t;++r){var i=arguments[r];if(typeof i=="object")for(var a=Object.keys(i),n=0,o=a.length;n<o;++n){var s=a[n];i[s]!==void 0&&(e[s]=i[s])}}return e}var Vo;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Vo=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)}:Vo=function(){};Ks.debug=Vo});var P8=I(C8=>{"use strict";var vL=require("url"),gL=S8(),A8=["accept","accept-charset","accept-encoding","accept-language","accept-ranges","cache-control","content-encoding","content-language","content-location","content-md5","content-range","content-type","connection","date","expect","max-forwards","pragma","referer","te","user-agent","via"],D8=["proxy-authorization"];function bL(e){var r=e.port,t=e.protocol,i=e.hostname+":";return r?i+=r:t==="https:"?i+="443":i+="80",i}function yL(e,r){var t=r.reduce(function(i,a){return i[a.toLowerCase()]=!0,i},{});return Object.keys(e).filter(function(i){return t[i.toLowerCase()]}).reduce(function(i,a){return i[a]=e[a],i},{})}function xL(e,r){var t=e.proxy,i={proxy:{host:t.hostname,port:+t.port,proxyAuth:t.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 wL(e,r){var t=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[t,i].join("Over")}function kL(e){var r=e.uri,t=e.proxy,i=wL(r,t);return gL[i]}function kc(e){this.request=e,this.proxyHeaderWhiteList=A8,this.proxyHeaderExclusiveList=[],typeof e.tunnel!="undefined"&&(this.tunnelOverride=e.tunnel)}kc.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride!="undefined"?e.tunnelOverride:r.uri.protocol==="https:"};kc.prototype.setup=function(e){var r=this,t=r.request;if(e=e||{},typeof t.proxy=="string"&&(t.proxy=vL.parse(t.proxy)),!t.proxy||!t.tunnel)return!1;e.proxyHeaderWhiteList&&(r.proxyHeaderWhiteList=e.proxyHeaderWhiteList),e.proxyHeaderExclusiveList&&(r.proxyHeaderExclusiveList=e.proxyHeaderExclusiveList);var i=r.proxyHeaderExclusiveList.concat(D8),a=r.proxyHeaderWhiteList.concat(i),n=yL(t.headers,a);n.host=bL(t.uri),i.forEach(t.removeHeader,t);var o=kL(t),s=xL(t,n);return t.agent=o(s),!0};kc.defaultProxyHeaderWhiteList=A8;kc.defaultProxyHeaderExclusiveList=D8;C8.Tunnel=kc});var F8=I((T8,_c)=>{(function(){var e,r,t,i,a,n;typeof performance!="undefined"&&performance!==null&&performance.now?_c.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(_c.exports=function(){return(e()-a)/1e6},r=process.hrtime,e=function(){var o;return o=r(),o[0]*1e9+o[1]},i=e(),n=process.uptime()*1e9,a=i-n):Date.now?(_c.exports=function(){return Date.now()-t},t=Date.now()):(_c.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(T8)});var H8=I((NG,U8)=>{"use strict";var _L=require("http"),q8=require("https"),jc=require("url"),u0=require("util"),op=require("stream"),sp=require("zlib"),c0=bw(),jL=Dw(),EL=b_(),SL=Ff(),B8=qf(),I8=A_(),AL=r5(),DL=Pl(),O8=Ev(),CL=s5().strict,Ys=Il(),PL=Oh(),TL=l5(),FL=k5().Querystring,qL=Qj().Har,BL=n8().Auth,IL=v8().OAuth,OL=g8(),RL=y8().Multipart,zL=k8().Redirect,l0=P8().Tunnel,Qs=F8(),Ec=bs().Buffer,R8=Ys.safeStringify,LL=Ys.isReadStream,NL=Ys.toBase64,ML=Ys.defer,z8=Ys.copy,UL=Ys.version,L8=PL.jar(),N8={};function HL(e,r){var t={};for(var i in r){var a=e.indexOf(i)===-1;a&&(t[i]=r[i])}return t}function VL(e,r){var t={};for(var i in r){var a=e.indexOf(i)!==-1,n=typeof r[i]=="function";a&&n||(t[i]=r[i])}return t}function M8(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function $L(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:M8.call(e.request)}}function Ir(e){var r=this;e.har&&(r._har=new qL(r),e=r._har.options(e)),op.Stream.call(r);var t=Object.keys(Ir.prototype),i=HL(t,e);DL(r,i),e=VL(t,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new FL(r),r._auth=new BL(r),r._oauth=new IL(r),r._multipart=new RL(r),r._redirect=new zL(r),r._tunnel=new l0(r),r.init(e)}u0.inherits(Ir,op.Stream);Ir.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function na(){Ir.debug&&console.error("REQUEST %s",u0.format.apply(u0,arguments))}Ir.prototype.debug=na;Ir.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?z8(r.headers):{};for(var t in r.headers)typeof r.headers[t]=="undefined"&&delete r.headers[t];if(B8.httpify(r,r.headers),r.method||(r.method=e.method||"GET"),r.localAddress||(r.localAddress=e.localAddress),r._qs.init(e),na(e),!r.pool&&r.pool!==!1&&(r.pool=N8),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,a=r.uri.indexOf("/")===0;i&&a?r.uri=r.baseUrl+r.uri.slice(1):i||a?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=jc.parse(r.uri)),r.uri.href||(r.uri.href=jc.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=jc.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=TL(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,f=r.form(),p=function(O,L){L&&L.hasOwnProperty("value")&&L.hasOwnProperty("options")?f.append(O,L.value,L.options):f.append(O,L)};for(var m in c)if(c.hasOwnProperty(m)){var h=c[m];if(h instanceof Array)for(var v=0;v<h.length;v++)p(m,h[v]);else p(m,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(O){return r._qs.unescape(O)});r.auth(y[0],y.slice(1).join(":"),!0)}if(!r.tunnel&&r.proxy&&r.proxy.auth&&!r.hasHeader("proxy-authorization")){var S=r.proxy.auth.split(":").map(function(O){return r._qs.unescape(O)}),w="Basic "+NL(S.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(CL(r.body)&&(r.body=Ec.from(r.body)),!r.hasHeader("content-length")){var O;typeof r.body=="string"?O=Ec.byteLength(r.body):Array.isArray(r.body)?O=r.body.reduce(function(L,V){return L+V.length},0):O=r.body.length,O?r.setHeader("content-length",O):r.emit("error",new Error("Argument error, options.body."))}}r.body&&!O8(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,C={"http:":_L,"https:":q8},B=r.httpModules||{};if(r.httpModule=B[P]||C[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=UL();F.major===0&&F.minor<=10?r.agentClass=P==="http:"?I8:I8.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(O){if(r.ntick&&r._started&&r.emit("error",new Error("You cannot pipe to this stream after the outbound request has started.")),r.src=O,LL(O))r.hasHeader("content-type")||r.setHeader("content-type",SL.lookup(O.path));else{if(O.headers)for(var L in O.headers)r.hasHeader(L)||r.setHeader(L,O.headers[L]);r._json&&!r.hasHeader("content-type")&&r.setHeader("content-type","application/json"),O.method&&!r.explicitMethod&&(r.method=O.method)}}),ML(function(){if(!r._aborted){var O=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)O8(r.body)?r.body.pipe(r):(A(),Array.isArray(r.body)?r.body.forEach(function(L){r.write(L)}):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(L,V){!L&&!isNaN(V)&&r.setHeader("content-length",V),O()})):O(),r.ntick=!0}})};Ir.prototype.getNewAgent=function(){var e=this,r=e.agentClass,t={};if(e.agentOptions)for(var i in e.agentOptions)t[i]=e.agentOptions[i];e.ca&&(t.ca=e.ca),e.ciphers&&(t.ciphers=e.ciphers),e.secureProtocol&&(t.secureProtocol=e.secureProtocol),e.secureOptions&&(t.secureOptions=e.secureOptions),typeof e.rejectUnauthorized!="undefined"&&(t.rejectUnauthorized=e.rejectUnauthorized),e.cert&&e.key&&(t.key=e.key,t.cert=e.cert),e.pfx&&(t.pfx=e.pfx),e.passphrase&&(t.passphrase=e.passphrase);var a="";r!==e.httpModule.Agent&&(a+=r.name);var n=e.proxy;typeof n=="string"&&(n=jc.parse(n));var o=n&&n.protocol==="https:"||this.uri.protocol==="https:";return o&&(t.ca&&(a&&(a+=":"),a+=t.ca),typeof t.rejectUnauthorized!="undefined"&&(a&&(a+=":"),a+=t.rejectUnauthorized),t.cert&&(a&&(a+=":"),a+=t.cert.toString("ascii")+t.key.toString("ascii")),t.pfx&&(a&&(a+=":"),a+=t.pfx.toString("ascii")),t.ciphers&&(a&&(a+=":"),a+=t.ciphers),t.secureProtocol&&(a&&(a+=":"),a+=t.secureProtocol),t.secureOptions&&(a&&(a+=":"),a+=t.secureOptions)),e.pool===N8&&!a&&Object.keys(t).length===0&&e.httpModule.globalAgent?e.httpModule.globalAgent:(a=e.uri.protocol+a,e.pool[a]||(e.pool[a]=new r(t),e.pool.maxSockets&&(e.pool[a].maxSockets=e.pool.maxSockets)),e.pool[a])};Ir.prototype.start=function(){var e=this;if(e.timing)var r=new Date().getTime(),t=Qs();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=z8(e);delete i.auth,na("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=t,e.timings={});var a;e.timeout&&!e.timeoutTimer&&(e.timeout<0?a=0:typeof e.timeout=="number"&&isFinite(e.timeout)&&(a=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=Qs()-e.startTimeNow,o)){var s=function(){e.timings.lookup=Qs()-e.startTimeNow},c=function(){e.timings.connect=Qs()-e.startTimeNow};n.once("lookup",s),n.once("connect",c),e.req.once("error",function(){n.removeListener("lookup",s),n.removeListener("connect",c)})}var f=function(){e.req.setTimeout(a,function(){if(e.req){e.abort();var m=new Error("ESOCKETTIMEDOUT");m.code="ESOCKETTIMEDOUT",m.connect=!1,e.emit("error",m)}})};if(a!==void 0)if(o){var p=function(){n.removeListener("connect",p),e.clearTimeout(),f()};n.on("connect",p),e.req.on("error",function(m){n.removeListener("connect",p)}),e.timeoutTimer=setTimeout(function(){n.removeListener("connect",p),e.abort();var m=new Error("ETIMEDOUT");m.code="ETIMEDOUT",m.connect=!0,e.emit("error",m)},a)}else f();e.emit("socket",n)}),e.emit("request",e.req)}};Ir.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)}};Ir.prototype.onRequestResponse=function(e){var r=this;if(r.timing&&(r.timings.response=Qs()-r.startTimeNow),na("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=Qs()-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),na("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}),na("response end",r.uri.href,e.statusCode,e.headers)}),r._aborted){na("aborted",r.uri.href),e.resume();return}if(r.response=e,e.request=r,e.toJSON=$L,r.httpModule===q8&&r.strictSSL&&(!e.hasOwnProperty("socket")||!e.socket.authorized)){na("strict ssl error",r.uri.href);var t=e.hasOwnProperty("socket")?e.socket.authorizationError:r.uri.href+" does not support SSL";r.emit("error",new Error("SSL Error: "+t));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:L8,a=function(p){try{i.setCookie(p,r.uri.href,{ignoreError:!0})}catch(m){r.emit("error",m)}};if(e.caseless=B8(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(a):a(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(p){return r.method==="HEAD"||p>=100&&p<200||p===204||p===304},s;if(r.gzip&&!o(e.statusCode)){var c=e.headers["content-encoding"]||"identity";c=c.trim().toLowerCase();var f={flush:sp.Z_SYNC_FLUSH,finishFlush:sp.Z_SYNC_FLUSH};c==="gzip"?(s=sp.createGunzip(f),e.pipe(s)):c==="deflate"?(s=sp.createInflate(f),e.pipe(s)):(c!=="identity"&&na("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(p){r.pipeDest(p)}),s.on("data",function(p){r.timing&&!r.responseStarted&&(r.responseStartTime=new Date().getTime(),e.responseStartTime=r.responseStartTime),r._destdata=!0,r.emit("data",p)}),s.once("end",function(p){r.emit("end",p)}),s.on("error",function(p){r.emit("error",p)}),s.on("close",function(){r.emit("close")}),r.callback?r.readResponseBody(e):r.on("end",function(){if(r._aborted){na("aborted",r.uri.href);return}r.emit("complete",e)})}na("finish init function",r.uri.href)}};Ir.prototype.readResponseBody=function(e){var r=this;na("reading response's body");var t=[],i=0,a=[];r.on("data",function(n){Ec.isBuffer(n)?n.length&&(i+=n.length,t.push(n)):a.push(n)}),r.on("end",function(){if(na("end event",r.uri.href),r._aborted){na("aborted",r.uri.href),t=[],i=0;return}if(i?(na("has body",r.uri.href,i),e.body=Ec.concat(t,i),r.encoding!==null&&(e.body=e.body.toString(r.encoding)),t=[],i=0):a.length&&(r.encoding==="utf8"&&a[0].length>0&&a[0][0]==="\uFEFF"&&(a[0]=a[0].substring(1)),e.body=a.join("")),r._json)try{e.body=JSON.parse(e.body,r._jsonReviver)}catch{na("invalid JSON received",r.uri.href)}na("emitting complete",r.uri.href),typeof e.body=="undefined"&&!r._json&&(e.body=r.encoding===null?Ec.alloc(0):""),r.emit("complete",e,e.body)})};Ir.prototype.abort=function(){var e=this;e._aborted=!0,e.req?e.req.abort():e.response&&e.response.destroy(),e.clearTimeout(),e.emit("abort")};Ir.prototype.pipeDest=function(e){var r=this,t=r.response;if(e.headers&&!e.headersSent){if(t.caseless.has("content-type")){var i=t.caseless.has("content-type");e.setHeader?e.setHeader(i,t.headers[i]):e.headers[i]=t.headers[i]}if(t.caseless.has("content-length")){var a=t.caseless.has("content-length");e.setHeader?e.setHeader(a,t.headers[a]):e.headers[a]=t.headers[a]}}if(e.setHeader&&!e.headersSent){for(var n in t.headers)(!r.gzip||n!=="content-encoding")&&e.setHeader(n,t.headers[n]);e.statusCode=t.statusCode}r.pipefilter&&r.pipefilter(t,e)};Ir.prototype.qs=function(e,r){var t=this,i;!r&&t.uri.query?i=t._qs.parse(t.uri.query):i={};for(var a in e)i[a]=e[a];var n=t._qs.stringify(i);return n===""||(t.uri=jc.parse(t.uri.href.split("?")[0]+"?"+n),t.url=t.uri,t.path=t.uri.path,t.uri.host==="unix"&&t.enableUnixSocket()),t};Ir.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 AL,r._form.on("error",function(t){t.message="form-data: "+t.message,r.emit("error",t),r.abort()}),r._form)};Ir.prototype.multipart=function(e){var r=this;return r._multipart.onRequest(e),r._multipart.chunked||(r.body=r._multipart.body),r};Ir.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=R8(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=R8(e,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")),typeof r.jsonReviver=="function"&&(r._jsonReviver=r.jsonReviver),r};Ir.prototype.getHeader=function(e,r){var t=this,i,a,n;return r||(r=t.headers),Object.keys(r).forEach(function(o){o.length===e.length&&(a=new RegExp(e,"i"),n=o.match(a),n&&(i=r[o]))}),i};Ir.prototype.enableUnixSocket=function(){var e=this.uri.path.split(":"),r=e[0],t=e[1];this.socketPath=r,this.uri.pathname=t,this.uri.path=t,this.uri.host=r,this.uri.hostname=r,this.uri.isUnix=!0};Ir.prototype.auth=function(e,r,t,i){var a=this;return a._auth.onRequest(e,r,t,i),a};Ir.prototype.aws=function(e,r){var t=this;if(!r)return t._aws=e,t;if(e.sign_version===4||e.sign_version==="4"){var i={host:t.uri.host,path:t.uri.path,method:t.method,headers:t.headers,body:t.body};e.service&&(i.service=e.service);var a=jL.sign(i,{accessKeyId:e.key,secretAccessKey:e.secret,sessionToken:e.session});t.setHeader("authorization",a.headers.Authorization),t.setHeader("x-amz-date",a.headers["X-Amz-Date"]),a.headers["X-Amz-Security-Token"]&&t.setHeader("x-amz-security-token",a.headers["X-Amz-Security-Token"])}else{var n=new Date;t.setHeader("date",n.toUTCString());var o={key:e.key,secret:e.secret,verb:t.method.toUpperCase(),date:n,contentType:t.getHeader("content-type")||"",md5:t.getHeader("content-md5")||"",amazonHeaders:c0.canonicalizeHeaders(t.headers)},s=t.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=c0.canonicalizeResource(o.resource),t.setHeader("authorization",c0.authorization(o))}return t};Ir.prototype.httpSignature=function(e){var r=this;return EL.signRequest({getHeader:function(t){return r.getHeader(t,r.headers)},setHeader:function(t,i){r.setHeader(t,i)},method:r.method,path:r.path},e),na("httpSignature authorization",r.getHeader("authorization")),r};Ir.prototype.hawk=function(e){var r=this;r.setHeader("Authorization",OL.header(r.uri,r.method,e))};Ir.prototype.oauth=function(e){var r=this;return r._oauth.onRequest(e),r};Ir.prototype.jar=function(e){var r=this,t;if(r._redirect.redirectsFollowed===0&&(r.originalCookieHeader=r.getHeader("cookie")),!e)t=!1,r._disableCookies=!0;else{var i=e.getCookieString?e:L8,a=r.uri.href;i&&(t=i.getCookieString(a))}return t&&t.length&&(r.originalCookieHeader?r.setHeader("cookie",r.originalCookieHeader+"; "+t):r.setHeader("cookie",t)),r._jar=e,r};Ir.prototype.pipe=function(e,r){var t=this;if(t.response)if(t._destdata)t.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else if(t._ended)t.emit("error",new Error("You cannot pipe after the response has been ended."));else return op.Stream.prototype.pipe.call(t,e,r),t.pipeDest(e),e;else return t.dests.push(e),op.Stream.prototype.pipe.call(t,e,r),e};Ir.prototype.write=function(){var e=this;if(!e._aborted&&(e._started||e.start(),e.req))return e.req.write.apply(e.req,arguments)};Ir.prototype.end=function(e){var r=this;r._aborted||(e&&r.write(e),r._started||r.start(),r.req&&r.req.end())};Ir.prototype.pause=function(){var e=this;e.responseContent?e.responseContent.pause.apply(e.responseContent,arguments):e._paused=!0};Ir.prototype.resume=function(){var e=this;e.responseContent?e.responseContent.resume.apply(e.responseContent,arguments):e._paused=!1};Ir.prototype.destroy=function(){var e=this;this.clearTimeout(),e._ended?e.response&&e.response.destroy():e.end()};Ir.prototype.clearTimeout=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)};Ir.defaultProxyHeaderWhiteList=l0.defaultProxyHeaderWhiteList.slice();Ir.defaultProxyHeaderExclusiveList=l0.defaultProxyHeaderExclusiveList.slice();Ir.prototype.toJSON=M8;U8.exports=Ir});var W8=I((MG,$8)=>{"use strict";var Sc=Pl(),V8=Oh(),WL=Il(),GL=WL.paramsHaveRequestBody;function up(e,r,t){typeof r=="function"&&(t=r);var i={};return r!==null&&typeof r=="object"?Sc(i,r,{uri:e}):typeof e=="string"?Sc(i,{uri:e}):Sc(i,e),i.callback=t||i.callback,i}function qt(e,r,t){if(typeof e=="undefined")throw new Error("undefined is not a valid uri or options object.");var i=up(e,r,t);if(i.method==="HEAD"&&GL(i))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new qt.Request(i)}function mo(e){var r=e.toUpperCase();return function(t,i,a){var n=up(t,i,a);return n.method=r,qt(n,n.callback)}}qt.get=mo("get");qt.head=mo("head");qt.options=mo("options");qt.post=mo("post");qt.put=mo("put");qt.patch=mo("patch");qt.del=mo("delete");qt.delete=mo("delete");qt.jar=function(e){return V8.jar(e)};qt.cookie=function(e){return V8.parse(e)};function f0(e,r,t,i){return function(a,n,o){var s=up(a,n,o),c={};return Sc(!0,c,r,s),c.pool=s.pool||r.pool,i&&(c.method=i.toUpperCase()),typeof t=="function"&&(e=t),e(c,c.callback)}}qt.defaults=function(e,r){var t=this;e=e||{},typeof e=="function"&&(r=e,e={});var i=f0(t,e,r),a=["get","head","post","put","patch","del","delete"];return a.forEach(function(n){i[n]=f0(t[n],e,r,n)}),i.cookie=f0(t.cookie,e,r),i.jar=t.jar,i.defaults=t.defaults,i};qt.forever=function(e,r){var t={};return r&&Sc(t,r),e&&(t.agentOptions=e),t.forever=!0,qt.defaults(t)};$8.exports=qt;qt.Request=H8();qt.initParams=up;Object.defineProperty(qt,"debug",{enumerable:!0,get:function(){return qt.Request.debug},set:function(e){qt.Request.debug=e}})});var K8=I((UG,G8)=>{G8.exports=KL;function KL(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 t=e.substring(5,r).split(";"),i=!1,a="US-ASCII",n=0;n<t.length;n++)t[n]=="base64"?i=!0:t[n].indexOf("charset=")==0&&(a=t[n].substring(8));var o=unescape(e.substring(r+1)),s=i?"base64":"ascii",c=new Buffer(o,s);return c.type=t[0]||"text/plain",c.charset=a,c}});var X8=I((HG,Q8)=>{var YL=K8();function QL(e){return{mimeType:JL(XL(e)),data:YL(e)}}function XL(e){return e.substring(5,e.indexOf(";"))}var Y8=/^(\w+\/)+/;function JL(e){e=e.toLowerCase();var r=e.match(Y8);return!r||!(r=r[1])?e:e.replace(Y8,r)}Q8.exports=QL});var Z8=I(($G,J8)=>{"use strict";var Ac=Fu(),VG=require("path"),ZL=vx().PNG,eN=Ud(),rN=wx(),tN=_x().GifReader,aN=Dx(),iN=require("fs"),nN=W8(),oN=Ff(),sN=X8();function uN(e,r){var t=new ZL;t.parse(e,function(i,a){if(i){r(i);return}r(null,Ac(new Uint8Array(a.data),[a.width|0,a.height|0,4],[4,4*a.width|0,1],0))})}function cN(e,r){var t;try{t=eN.decode(e)}catch(n){r(n);return}if(!t){r(new Error("Error decoding jpeg"));return}var i=[t.height,t.width,4],a=Ac(t.data,i);r(null,a.transpose(1,0))}function lN(e,r){var t;try{t=new tN(e)}catch(s){r(s);return}if(t.numFrames()>0){var i=[t.numFrames(),t.height,t.width,4];try{var a=new Uint8Array(i[0]*i[1]*i[2]*i[3])}catch(s){r(s);return}var n=Ac(a,i);try{for(var o=0;o<t.numFrames();++o)t.decodeAndBlitFrameRGBA(o,a.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=[t.height,t.width,4],a=new Uint8Array(i[0]*i[1]*i[2]),n=Ac(a,i);try{t.decodeAndBlitFrameRGBA(0,a)}catch(p){r(p);return}r(null,n.transpose(1,0))}}function fN(e,r){var t=new aN(e);try{t.init()}catch(s){r(s);return}var i=t.getData(),a=[i.getHeight(),i.getWidth(),4],n=new Uint8Array(a[0]*a[1]*a[2]),o=Ac(n,a);rN(i,o),r(null,o.transpose(1,0))}function cp(e,r,t){switch(e){case"image/png":uN(r,t);break;case"image/jpg":case"image/jpeg":cN(r,t);break;case"image/gif":lN(r,t);break;case"image/bmp":fN(r,t);break;default:t(new Error("Unsupported file type: "+e))}}J8.exports=function(r,t,i){if(i||(i=t,t=""),Buffer.isBuffer(r)){if(!t){i(new Error("Invalid file type"));return}cp(t,r,i)}else if(r.indexOf("data:")===0)try{var a=sN(r);a?process.nextTick(function(){cp(t||a.mimeType,a.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?nN({url:r,encoding:null},function(n,o,s){if(n){i(n);return}if(t=t,t||(o.getHeader!==void 0?t=o.getHeader("content-type"):o.headers!==void 0&&(t=o.headers["content-type"])),!t){i(new Error("Invalid content-type"));return}cp(t,s,i)}):iN.readFile(r,function(n,o){if(n){i(n);return}if(t=t||oN.lookup(r),!t){i(new Error("Invalid file type"));return}cp(t,o,i)})}});var aE=I((lp,tE)=>{(function(e,r){typeof lp=="object"&&typeof tE!="undefined"?r(lp):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(lp,function(e){"use strict";var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:function(u){return"Symbol("+u+")"};function t(){}function i(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global}var a=i();function n(u){return typeof u=="object"&&u!==null||typeof u=="function"}var o=t,s=Promise,c=Promise.prototype.then,f=Promise.resolve.bind(s),p=Promise.reject.bind(s);function m(u){return new s(u)}function h(u){return f(u)}function v(u){return p(u)}function y(u,d,j){return c.call(u,d,j)}function S(u,d,j){y(y(u,d,j),void 0,o)}function w(u,d){S(u,d)}function A(u,d){S(u,void 0,d)}function P(u,d,j){return y(u,d,j)}function C(u){y(u,void 0,o)}var B=function(){var u=a&&a.queueMicrotask;if(typeof u=="function")return u;var d=h(void 0);return function(j){return y(d,j)}}();function F(u,d,j){if(typeof u!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(u,d,j)}function O(u,d,j){try{return h(F(u,d,j))}catch(R){return v(R)}}var L=16384,V=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(d){var j=this._back,R=j;j._elements.length===L-1&&(R={_elements:[],_next:void 0}),j._elements.push(d),R!==j&&(this._back=R,j._next=R),++this._size},u.prototype.shift=function(){var d=this._front,j=d,R=this._cursor,G=R+1,ue=d._elements,ye=ue[R];return G===L&&(j=d._next,G=0),--this._size,this._cursor=G,d!==j&&(this._front=j),ue[R]=void 0,ye},u.prototype.forEach=function(d){for(var j=this._cursor,R=this._front,G=R._elements;(j!==G.length||R._next!==void 0)&&!(j===G.length&&(R=R._next,G=R._elements,j=0,G.length===0));)d(G[j]),++j},u.prototype.peek=function(){var d=this._front,j=this._cursor;return d._elements[j]},u}();function $(u,d){u._ownerReadableStream=d,d._reader=u,d._state==="readable"?H(u):d._state==="closed"?te(u):J(u,d._storedError)}function K(u,d){var j=u._ownerReadableStream;return vi(j,d)}function W(u){u._ownerReadableStream._state==="readable"?le(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):pe(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 H(u){u._closedPromise=m(function(d,j){u._closedPromise_resolve=d,u._closedPromise_reject=j})}function J(u,d){H(u),le(u,d)}function te(u){H(u),de(u)}function le(u,d){u._closedPromise_reject!==void 0&&(C(u._closedPromise),u._closedPromise_reject(d),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}function pe(u,d){J(u,d)}function de(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}var Ee=r("[[AbortSteps]]"),xe=r("[[ErrorSteps]]"),Ne=r("[[CancelSteps]]"),He=r("[[PullSteps]]"),Re=Number.isFinite||function(u){return typeof u=="number"&&isFinite(u)},U=Math.trunc||function(u){return u<0?Math.ceil(u):Math.floor(u)};function ke(u){return typeof u=="object"||typeof u=="function"}function Qe(u,d){if(u!==void 0&&!ke(u))throw new TypeError(d+" is not an object.")}function We(u,d){if(typeof u!="function")throw new TypeError(d+" is not a function.")}function Q(u){return typeof u=="object"&&u!==null||typeof u=="function"}function rr(u,d){if(!Q(u))throw new TypeError(d+" is not an object.")}function qe(u,d,j){if(u===void 0)throw new TypeError("Parameter "+d+" is required in '"+j+"'.")}function he(u,d,j){if(u===void 0)throw new TypeError(d+" is required in '"+j+"'.")}function _e(u){return Number(u)}function ir(u){return u===0?0:u}function Ce(u){return ir(U(u))}function ur(u,d){var j=0,R=Number.MAX_SAFE_INTEGER,G=Number(u);if(G=ir(G),!Re(G))throw new TypeError(d+" is not a finite number");if(G=Ce(G),G<j||G>R)throw new TypeError(d+" is outside the accepted range of "+j+" to "+R+", inclusive");return!Re(G)||G===0?0:G}function Or(u,d){if(!Rn(u))throw new TypeError(d+" is not a ReadableStream.")}function Gr(u){return new Ye(u)}function ee(u,d){u._reader._readRequests.push(d)}function Be(u,d,j){var R=u._reader,G=R._readRequests.shift();j?G._closeSteps():G._chunkSteps(d)}function Ge(u){return u._reader._readRequests.length}function Ve(u){var d=u._reader;return!(d===void 0||!Ze(d))}var Ye=function(){function u(d){if(qe(d,1,"ReadableStreamDefaultReader"),Or(d,"First parameter"),zn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");$(this,d),this._readRequests=new V}return Object.defineProperty(u.prototype,"closed",{get:function(){return Ze(this)?this._closedPromise:v(mr("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),Ze(this)?this._ownerReadableStream===void 0?v(Z("cancel")):K(this,d):v(mr("cancel"))},u.prototype.read=function(){if(!Ze(this))return v(mr("read"));if(this._ownerReadableStream===void 0)return v(Z("read from"));var d,j,R=m(function(ue,ye){d=ue,j=ye}),G={_chunkSteps:function(ue){return d({value:ue,done:!1})},_closeSteps:function(){return d({value:void 0,done:!0})},_errorSteps:function(ue){return j(ue)}};return nr(this,G),R},u.prototype.releaseLock=function(){if(!Ze(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");W(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 Ze(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readRequests")?!1:u instanceof Ye}function nr(u,d){var j=u._ownerReadableStream;j._disturbed=!0,j._state==="closed"?d._closeSteps():j._state==="errored"?d._errorSteps(j._storedError):j._readableStreamController[He](d)}function mr(u){return new TypeError("ReadableStreamDefaultReader.prototype."+u+" can only be used on a ReadableStreamDefaultReader")}var Br,vr;typeof r.asyncIterator=="symbol"&&(vr=(Br={},Br[r.asyncIterator]=function(){return this},Br),Object.defineProperty(vr,r.asyncIterator,{enumerable:!1}));var be=function(){function u(d,j){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=d,this._preventCancel=j}return u.prototype.next=function(){var d=this,j=function(){return d._nextSteps()};return this._ongoingPromise=this._ongoingPromise?P(this._ongoingPromise,j,j):j(),this._ongoingPromise},u.prototype.return=function(d){var j=this,R=function(){return j._returnSteps(d)};return this._ongoingPromise?P(this._ongoingPromise,R,R):R()},u.prototype._nextSteps=function(){var d=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var j=this._reader;if(j._ownerReadableStream===void 0)return v(Z("iterate"));var R,G,ue=m(function(Je,Sr){R=Je,G=Sr}),ye={_chunkSteps:function(Je){d._ongoingPromise=void 0,B(function(){return R({value:Je,done:!1})})},_closeSteps:function(){d._ongoingPromise=void 0,d._isFinished=!0,W(j),R({value:void 0,done:!0})},_errorSteps:function(Je){d._ongoingPromise=void 0,d._isFinished=!0,W(j),G(Je)}};return nr(j,ye),ue},u.prototype._returnSteps=function(d){if(this._isFinished)return Promise.resolve({value:d,done:!0});this._isFinished=!0;var j=this._reader;if(j._ownerReadableStream===void 0)return v(Z("finish iterating"));if(!this._preventCancel){var R=K(j,d);return W(j),P(R,function(){return{value:d,done:!0}})}return W(j),h({value:d,done:!0})},u}(),Ke={next:function(){return Dr(this)?this._asyncIteratorImpl.next():v(lr("next"))},return:function(u){return Dr(this)?this._asyncIteratorImpl.return(u):v(lr("return"))}};vr!==void 0&&Object.setPrototypeOf(Ke,vr);function pr(u,d){var j=Gr(u),R=new be(j,d),G=Object.create(Ke);return G._asyncIteratorImpl=R,G}function Dr(u){if(!n(u)||!Object.prototype.hasOwnProperty.call(u,"_asyncIteratorImpl"))return!1;try{return u._asyncIteratorImpl instanceof be}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,d,j,R,G){new Uint8Array(u).set(new Uint8Array(j,R,G),d)}function cr(u){return u}function $r(u){return!1}function Pr(u,d,j){if(u.slice)return u.slice(d,j);var R=j-d,G=new ArrayBuffer(R);return or(G,0,u,d,R),G}function jt(u){return!(typeof u!="number"||gr(u)||u<0)}function Bt(u){var d=Pr(u.buffer,u.byteOffset,u.byteOffset+u.byteLength);return new Uint8Array(d)}function oa(u){var d=u._queue.shift();return u._queueTotalSize-=d.size,u._queueTotalSize<0&&(u._queueTotalSize=0),d.value}function ha(u,d,j){if(!jt(j)||j===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");u._queue.push({value:d,size:j}),u._queueTotalSize+=j}function rt(u){var d=u._queue.peek();return d.value}function ut(u){u._queue=new V,u._queueTotalSize=0}var ht=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"view",{get:function(){if(!sa(this))throw Le("view");return this._view},enumerable:!1,configurable:!0}),u.prototype.respond=function(d){if(!sa(this))throw Le("respond");if(qe(d,1,"respond"),d=ur(d,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");$r(this._view.buffer),Xe(this._associatedReadableByteStreamController,d)},u.prototype.respondWithNewView=function(d){if(!sa(this))throw Le("respondWithNewView");if(qe(d,1,"respondWithNewView"),!ArrayBuffer.isView(d))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(d.buffer),Pe(this._associatedReadableByteStreamController,d)},u}();Object.defineProperties(ht.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ht.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var It=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"byobRequest",{get:function(){if(!mt(this))throw ge("byobRequest");return Fe(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!mt(this))throw ge("desiredSize");return tr(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!mt(this))throw ge("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var d=this._controlledReadableByteStream._state;if(d!=="readable")throw new TypeError("The stream (in "+d+" state) is not in the readable state and cannot be closed");Ie(this)},u.prototype.enqueue=function(d){if(!mt(this))throw ge("enqueue");if(qe(d,1,"enqueue"),!ArrayBuffer.isView(d))throw new TypeError("chunk must be an array buffer view");if(d.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(d.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 j=this._controlledReadableByteStream._state;if(j!=="readable")throw new TypeError("The stream (in "+j+" state) is not in the readable state and cannot be enqueued to");Se(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!mt(this))throw ge("error");Te(this,d)},u.prototype[Ne]=function(d){tt(this),ut(this);var j=this._cancelAlgorithm(d);return Ue(this),j},u.prototype[He]=function(d){var j=this._controlledReadableByteStream;if(this._queueTotalSize>0){var R=this._queue.shift();this._queueTotalSize-=R.byteLength,k(this);var G=new Uint8Array(R.buffer,R.byteOffset,R.byteLength);d._chunkSteps(G);return}var ue=this._autoAllocateChunkSize;if(ue!==void 0){var ye=void 0;try{ye=new ArrayBuffer(ue)}catch(Sr){d._errorSteps(Sr);return}var Je={buffer:ye,bufferByteLength:ue,byteOffset:0,byteLength:ue,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Je)}ee(j,d),Mt(this)},u}();Object.defineProperties(It.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(It.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function mt(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableByteStream")?!1:u instanceof It}function sa(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_associatedReadableByteStreamController")?!1:u instanceof ht}function Mt(u){var d=we(u);if(!!d){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var j=u._pullAlgorithm();S(j,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,Mt(u))},function(R){Te(u,R)})}}function tt(u){T(u),u._pendingPullIntos=new V}function $a(u,d){var j=!1;u._state==="closed"&&(j=!0);var R=x(d);d.readerType==="default"?Be(u,R,j):fe(u,R,j)}function x(u){var d=u.bytesFilled,j=u.elementSize;return new u.viewConstructor(u.buffer,u.byteOffset,d/j)}function b(u,d,j,R){u._queue.push({buffer:d,byteOffset:j,byteLength:R}),u._queueTotalSize+=R}function g(u,d){var j=d.elementSize,R=d.bytesFilled-d.bytesFilled%j,G=Math.min(u._queueTotalSize,d.byteLength-d.bytesFilled),ue=d.bytesFilled+G,ye=ue-ue%j,Je=G,Sr=!1;ye>R&&(Je=ye-d.bytesFilled,Sr=!0);for(var Fr=u._queue;Je>0;){var Rr=Fr.peek(),Wr=Math.min(Je,Rr.byteLength),Ot=d.byteOffset+d.bytesFilled;or(d.buffer,Ot,Rr.buffer,Rr.byteOffset,Wr),Rr.byteLength===Wr?Fr.shift():(Rr.byteOffset+=Wr,Rr.byteLength-=Wr),u._queueTotalSize-=Wr,l(u,Wr,d),Je-=Wr}return Sr}function l(u,d,j){j.bytesFilled+=d}function k(u){u._queueTotalSize===0&&u._closeRequested?(Ue(u),eu(u._controlledReadableByteStream)):Mt(u)}function T(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 d=u._pendingPullIntos.peek();g(u,d)&&(Me(u),$a(u._controlledReadableByteStream,d))}}function Y(u,d,j){var R=u._controlledReadableByteStream,G=1;d.constructor!==DataView&&(G=d.constructor.BYTES_PER_ELEMENT);var ue=d.constructor,ye=cr(d.buffer),Je={buffer:ye,bufferByteLength:ye.byteLength,byteOffset:d.byteOffset,byteLength:d.byteLength,bytesFilled:0,elementSize:G,viewConstructor:ue,readerType:"byob"};if(u._pendingPullIntos.length>0){u._pendingPullIntos.push(Je),re(R,j);return}if(R._state==="closed"){var Sr=new ue(Je.buffer,Je.byteOffset,0);j._closeSteps(Sr);return}if(u._queueTotalSize>0){if(g(u,Je)){var Fr=x(Je);k(u),j._chunkSteps(Fr);return}if(u._closeRequested){var Rr=new TypeError("Insufficient bytes to fill elements in the given buffer");Te(u,Rr),j._errorSteps(Rr);return}}u._pendingPullIntos.push(Je),re(R,j),Mt(u)}function ie(u,d){var j=u._controlledReadableByteStream;if(ae(j))for(;se(j)>0;){var R=Me(u);$a(j,R)}}function me(u,d,j){if(l(u,d,j),!(j.bytesFilled<j.elementSize)){Me(u);var R=j.bytesFilled%j.elementSize;if(R>0){var G=j.byteOffset+j.bytesFilled,ue=Pr(j.buffer,G-R,G);b(u,ue,0,ue.byteLength)}j.bytesFilled-=R,$a(u._controlledReadableByteStream,j),N(u)}}function ve(u,d){var j=u._pendingPullIntos.peek();T(u);var R=u._controlledReadableByteStream._state;R==="closed"?ie(u):me(u,d,j),Mt(u)}function Me(u){var d=u._pendingPullIntos.shift();return d}function we(u){var d=u._controlledReadableByteStream;if(d._state!=="readable"||u._closeRequested||!u._started)return!1;if(Ve(d)&&Ge(d)>0||ae(d)&&se(d)>0)return!0;var j=tr(u);return j>0}function Ue(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0}function Ie(u){var d=u._controlledReadableByteStream;if(!(u._closeRequested||d._state!=="readable")){if(u._queueTotalSize>0){u._closeRequested=!0;return}if(u._pendingPullIntos.length>0){var j=u._pendingPullIntos.peek();if(j.bytesFilled>0){var R=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Te(u,R),R}}Ue(u),eu(d)}}function Se(u,d){var j=u._controlledReadableByteStream;if(!(u._closeRequested||j._state!=="readable")){var R=d.buffer,G=d.byteOffset,ue=d.byteLength,ye=cr(R);if(u._pendingPullIntos.length>0){var Je=u._pendingPullIntos.peek();$r(Je.buffer),Je.buffer=cr(Je.buffer)}if(T(u),Ve(j))if(Ge(j)===0)b(u,ye,G,ue);else{u._pendingPullIntos.length>0&&Me(u);var Sr=new Uint8Array(ye,G,ue);Be(j,Sr,!1)}else ae(j)?(b(u,ye,G,ue),N(u)):b(u,ye,G,ue);Mt(u)}}function Te(u,d){var j=u._controlledReadableByteStream;j._state==="readable"&&(tt(u),ut(u),Ue(u),G0(j,d))}function Fe(u){if(u._byobRequest===null&&u._pendingPullIntos.length>0){var d=u._pendingPullIntos.peek(),j=new Uint8Array(d.buffer,d.byteOffset+d.bytesFilled,d.byteLength-d.bytesFilled),R=Object.create(ht.prototype);ze(R,u,j),u._byobRequest=R}return u._byobRequest}function tr(u){var d=u._controlledReadableByteStream._state;return d==="errored"?null:d==="closed"?0:u._strategyHWM-u._queueTotalSize}function Xe(u,d){var j=u._pendingPullIntos.peek(),R=u._controlledReadableByteStream._state;if(R==="closed"){if(d!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(d===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(j.bytesFilled+d>j.byteLength)throw new RangeError("bytesWritten out of range")}j.buffer=cr(j.buffer),ve(u,d)}function Pe(u,d){var j=u._pendingPullIntos.peek(),R=u._controlledReadableByteStream._state;if(R==="closed"){if(d.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(d.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(j.byteOffset+j.bytesFilled!==d.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(j.bufferByteLength!==d.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(j.bytesFilled+d.byteLength>j.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var G=d.byteLength;j.buffer=cr(d.buffer),ve(u,G)}function Ae(u,d,j,R,G,ue,ye){d._controlledReadableByteStream=u,d._pullAgain=!1,d._pulling=!1,d._byobRequest=null,d._queue=d._queueTotalSize=void 0,ut(d),d._closeRequested=!1,d._started=!1,d._strategyHWM=ue,d._pullAlgorithm=R,d._cancelAlgorithm=G,d._autoAllocateChunkSize=ye,d._pendingPullIntos=new V,u._readableStreamController=d;var Je=j();S(h(Je),function(){d._started=!0,Mt(d)},function(Sr){Te(d,Sr)})}function De(u,d,j){var R=Object.create(It.prototype),G=function(){},ue=function(){return h(void 0)},ye=function(){return h(void 0)};d.start!==void 0&&(G=function(){return d.start(R)}),d.pull!==void 0&&(ue=function(){return d.pull(R)}),d.cancel!==void 0&&(ye=function(Sr){return d.cancel(Sr)});var Je=d.autoAllocateChunkSize;if(Je===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ae(u,R,G,ue,ye,j,Je)}function ze(u,d,j){u._associatedReadableByteStreamController=d,u._view=j}function Le(u){return new TypeError("ReadableStreamBYOBRequest.prototype."+u+" can only be used on a ReadableStreamBYOBRequest")}function ge(u){return new TypeError("ReadableByteStreamController.prototype."+u+" can only be used on a ReadableByteStreamController")}function X(u){return new oe(u)}function re(u,d){u._reader._readIntoRequests.push(d)}function fe(u,d,j){var R=u._reader,G=R._readIntoRequests.shift();j?G._closeSteps(d):G._chunkSteps(d)}function se(u){return u._reader._readIntoRequests.length}function ae(u){var d=u._reader;return!(d===void 0||!$e(d))}var oe=function(){function u(d){if(qe(d,1,"ReadableStreamBYOBReader"),Or(d,"First parameter"),zn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!mt(d._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");$(this,d),this._readIntoRequests=new V}return Object.defineProperty(u.prototype,"closed",{get:function(){return $e(this)?this._closedPromise:v(ar("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),$e(this)?this._ownerReadableStream===void 0?v(Z("cancel")):K(this,d):v(ar("cancel"))},u.prototype.read=function(d){if(!$e(this))return v(ar("read"));if(!ArrayBuffer.isView(d))return v(new TypeError("view must be an array buffer view"));if(d.byteLength===0)return v(new TypeError("view must have non-zero byteLength"));if(d.buffer.byteLength===0)return v(new TypeError("view's buffer must have non-zero byteLength"));if($r(d.buffer),this._ownerReadableStream===void 0)return v(Z("read from"));var j,R,G=m(function(ye,Je){j=ye,R=Je}),ue={_chunkSteps:function(ye){return j({value:ye,done:!1})},_closeSteps:function(ye){return j({value:ye,done:!0})},_errorSteps:function(ye){return R(ye)}};return fr(this,d,ue),G},u.prototype.releaseLock=function(){if(!$e(this))throw ar("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");W(this)}},u}();Object.defineProperties(oe.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(oe.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function $e(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readIntoRequests")?!1:u instanceof oe}function fr(u,d,j){var R=u._ownerReadableStream;R._disturbed=!0,R._state==="errored"?j._errorSteps(R._storedError):Y(R._readableStreamController,d,j)}function ar(u){return new TypeError("ReadableStreamBYOBReader.prototype."+u+" can only be used on a ReadableStreamBYOBReader")}function sr(u,d){var j=u.highWaterMark;if(j===void 0)return d;if(gr(j)||j<0)throw new RangeError("Invalid highWaterMark");return j}function z(u){var d=u.size;return d||function(){return 1}}function yr(u,d){Qe(u,d);var j=u==null?void 0:u.highWaterMark,R=u==null?void 0:u.size;return{highWaterMark:j===void 0?void 0:_e(j),size:R===void 0?void 0:Ar(R,d+" has member 'size' that")}}function Ar(u,d){return We(u,d),function(j){return _e(u(j))}}function kr(u,d){Qe(u,d);var j=u==null?void 0:u.abort,R=u==null?void 0:u.close,G=u==null?void 0:u.start,ue=u==null?void 0:u.type,ye=u==null?void 0:u.write;return{abort:j===void 0?void 0:dr(j,u,d+" has member 'abort' that"),close:R===void 0?void 0:Er(R,u,d+" has member 'close' that"),start:G===void 0?void 0:_r(G,u,d+" has member 'start' that"),write:ye===void 0?void 0:at(ye,u,d+" has member 'write' that"),type:ue}}function dr(u,d,j){return We(u,j),function(R){return O(u,d,[R])}}function Er(u,d,j){return We(u,j),function(){return O(u,d,[])}}function _r(u,d,j){return We(u,j),function(R){return F(u,d,[R])}}function at(u,d,j){return We(u,j),function(R,G){return O(u,d,[R,G])}}function Cr(u,d){if(!Oe(u))throw new TypeError(d+" 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 D(){if(E)return new AbortController}var M=function(){function u(d,j){d===void 0&&(d={}),j===void 0&&(j={}),d===void 0?d=null:rr(d,"First parameter");var R=yr(j,"Second parameter"),G=kr(d,"First parameter");je(this);var ue=G.type;if(ue!==void 0)throw new RangeError("Invalid type is specified");var ye=z(R),Je=sr(R,1);SE(this,G,Je,ye)}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Oe(this))throw Hc("locked");return Tr(this)},enumerable:!1,configurable:!0}),u.prototype.abort=function(d){return d===void 0&&(d=void 0),Oe(this)?Tr(this)?v(new TypeError("Cannot abort a stream that already has a writer")):ct(this,d):v(Hc("abort"))},u.prototype.close=function(){return Oe(this)?Tr(this)?v(new TypeError("Cannot close a stream that already has a writer")):mi(this)?v(new TypeError("Cannot close an already-closing stream")):ua(this):v(Hc("close"))},u.prototype.getWriter=function(){if(!Oe(this))throw Hc("getWriter");return ne(this)},u}();Object.defineProperties(M.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(M.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function ne(u){return new Wo(u)}function ce(u,d,j,R,G,ue){G===void 0&&(G=1),ue===void 0&&(ue=function(){return 1});var ye=Object.create(M.prototype);je(ye);var Je=Object.create(yo.prototype);return B0(ye,Je,u,d,j,R,G,ue),ye}function je(u){u._state="writable",u._storedError=void 0,u._writer=void 0,u._writableStreamController=void 0,u._writeRequests=new V,u._inFlightWriteRequest=void 0,u._closeRequest=void 0,u._inFlightCloseRequest=void 0,u._pendingAbortRequest=void 0,u._backpressure=!1}function Oe(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_writableStreamController")?!1:u instanceof M}function Tr(u){return u._writer!==void 0}function ct(u,d){var j;if(u._state==="closed"||u._state==="errored")return h(void 0);u._writableStreamController._abortReason=d,(j=u._writableStreamController._abortController)===null||j===void 0||j.abort();var R=u._state;if(R==="closed"||R==="errored")return h(void 0);if(u._pendingAbortRequest!==void 0)return u._pendingAbortRequest._promise;var G=!1;R==="erroring"&&(G=!0,d=void 0);var ue=m(function(ye,Je){u._pendingAbortRequest={_promise:void 0,_resolve:ye,_reject:Je,_reason:d,_wasAlreadyErroring:G}});return u._pendingAbortRequest._promise=ue,G||fn(u,d),ue}function ua(u){var d=u._state;if(d==="closed"||d==="errored")return v(new TypeError("The stream (in "+d+" state) is not in the writable state and cannot be closed"));var j=m(function(G,ue){var ye={_resolve:G,_reject:ue};u._closeRequest=ye}),R=u._writer;return R!==void 0&&u._backpressure&&d==="writable"&&yp(R),AE(u._writableStreamController),j}function ca(u){var d=m(function(j,R){var G={_resolve:j,_reject:R};u._writeRequests.push(G)});return d}function Sa(u,d){var j=u._state;if(j==="writable"){fn(u,d);return}ma(u)}function fn(u,d){var j=u._writableStreamController;u._state="erroring",u._storedError=d;var R=u._writer;R!==void 0&&P0(R,d),!yE(u)&&j._started&&ma(u)}function ma(u){u._state="errored",u._writableStreamController[xe]();var d=u._storedError;if(u._writeRequests.forEach(function(G){G._reject(d)}),u._writeRequests=new V,u._pendingAbortRequest===void 0){Nc(u);return}var j=u._pendingAbortRequest;if(u._pendingAbortRequest=void 0,j._wasAlreadyErroring){j._reject(d),Nc(u);return}var R=u._writableStreamController[Ee](j._reason);S(R,function(){j._resolve(),Nc(u)},function(G){j._reject(G),Nc(u)})}function Ba(u){u._inFlightWriteRequest._resolve(void 0),u._inFlightWriteRequest=void 0}function go(u,d){u._inFlightWriteRequest._reject(d),u._inFlightWriteRequest=void 0,Sa(u,d)}function hi(u){u._inFlightCloseRequest._resolve(void 0),u._inFlightCloseRequest=void 0;var d=u._state;d==="erroring"&&(u._storedError=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._resolve(),u._pendingAbortRequest=void 0)),u._state="closed";var j=u._writer;j!==void 0&&z0(j)}function $o(u,d){u._inFlightCloseRequest._reject(d),u._inFlightCloseRequest=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._reject(d),u._pendingAbortRequest=void 0),Sa(u,d)}function mi(u){return!(u._closeRequest===void 0&&u._inFlightCloseRequest===void 0)}function yE(u){return!(u._inFlightWriteRequest===void 0&&u._inFlightCloseRequest===void 0)}function xE(u){u._inFlightCloseRequest=u._closeRequest,u._closeRequest=void 0}function wE(u){u._inFlightWriteRequest=u._writeRequests.shift()}function Nc(u){u._closeRequest!==void 0&&(u._closeRequest._reject(u._storedError),u._closeRequest=void 0);var d=u._writer;d!==void 0&&gp(d,u._storedError)}function pp(u,d){var j=u._writer;j!==void 0&&d!==u._backpressure&&(d?BE(j):yp(j)),u._backpressure=d}var Wo=function(){function u(d){if(qe(d,1,"WritableStreamDefaultWriter"),Cr(d,"First parameter"),Tr(d))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=d,d._writer=this;var j=d._state;if(j==="writable")!mi(d)&&d._backpressure?$c(this):L0(this),Vc(this);else if(j==="erroring")bp(this,d._storedError),Vc(this);else if(j==="closed")L0(this),FE(this);else{var R=d._storedError;bp(this,R),R0(this,R)}}return Object.defineProperty(u.prototype,"closed",{get:function(){return bo(this)?this._closedPromise:v(xo("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!bo(this))throw xo("desiredSize");if(this._ownerWritableStream===void 0)throw Xs("desiredSize");return EE(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ready",{get:function(){return bo(this)?this._readyPromise:v(xo("ready"))},enumerable:!1,configurable:!0}),u.prototype.abort=function(d){return d===void 0&&(d=void 0),bo(this)?this._ownerWritableStream===void 0?v(Xs("abort")):kE(this,d):v(xo("abort"))},u.prototype.close=function(){if(!bo(this))return v(xo("close"));var d=this._ownerWritableStream;return d===void 0?v(Xs("close")):mi(d)?v(new TypeError("Cannot close an already-closing stream")):C0(this)},u.prototype.releaseLock=function(){if(!bo(this))throw xo("releaseLock");var d=this._ownerWritableStream;d!==void 0&&T0(this)},u.prototype.write=function(d){return d===void 0&&(d=void 0),bo(this)?this._ownerWritableStream===void 0?v(Xs("write to")):F0(this,d):v(xo("write"))},u}();Object.defineProperties(Wo.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(Wo.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function bo(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_ownerWritableStream")?!1:u instanceof Wo}function kE(u,d){var j=u._ownerWritableStream;return ct(j,d)}function C0(u){var d=u._ownerWritableStream;return ua(d)}function _E(u){var d=u._ownerWritableStream,j=d._state;return mi(d)||j==="closed"?h(void 0):j==="errored"?v(d._storedError):C0(u)}function jE(u,d){u._closedPromiseState==="pending"?gp(u,d):qE(u,d)}function P0(u,d){u._readyPromiseState==="pending"?N0(u,d):IE(u,d)}function EE(u){var d=u._ownerWritableStream,j=d._state;return j==="errored"||j==="erroring"?null:j==="closed"?0:I0(d._writableStreamController)}function T0(u){var d=u._ownerWritableStream,j=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");P0(u,j),jE(u,j),d._writer=void 0,u._ownerWritableStream=void 0}function F0(u,d){var j=u._ownerWritableStream,R=j._writableStreamController,G=DE(R,d);if(j!==u._ownerWritableStream)return v(Xs("write to"));var ue=j._state;if(ue==="errored")return v(j._storedError);if(mi(j)||ue==="closed")return v(new TypeError("The stream is closing or closed and cannot be written to"));if(ue==="erroring")return v(j._storedError);var ye=ca(j);return CE(R,d,G),ye}var q0={},yo=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"abortReason",{get:function(){if(!dp(this))throw vp("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"signal",{get:function(){if(!dp(this))throw vp("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(d){if(d===void 0&&(d=void 0),!dp(this))throw vp("error");var j=this._controlledWritableStream._state;j==="writable"&&O0(this,d)},u.prototype[Ee]=function(d){var j=this._abortAlgorithm(d);return Mc(this),j},u.prototype[xe]=function(){ut(this)},u}();Object.defineProperties(yo.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(yo.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function dp(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledWritableStream")?!1:u instanceof yo}function B0(u,d,j,R,G,ue,ye,Je){d._controlledWritableStream=u,u._writableStreamController=d,d._queue=void 0,d._queueTotalSize=void 0,ut(d),d._abortReason=void 0,d._abortController=D(),d._started=!1,d._strategySizeAlgorithm=Je,d._strategyHWM=ye,d._writeAlgorithm=R,d._closeAlgorithm=G,d._abortAlgorithm=ue;var Sr=mp(d);pp(u,Sr);var Fr=j(),Rr=h(Fr);S(Rr,function(){d._started=!0,Uc(d)},function(Wr){d._started=!0,Sa(u,Wr)})}function SE(u,d,j,R){var G=Object.create(yo.prototype),ue=function(){},ye=function(){return h(void 0)},Je=function(){return h(void 0)},Sr=function(){return h(void 0)};d.start!==void 0&&(ue=function(){return d.start(G)}),d.write!==void 0&&(ye=function(Fr){return d.write(Fr,G)}),d.close!==void 0&&(Je=function(){return d.close()}),d.abort!==void 0&&(Sr=function(Fr){return d.abort(Fr)}),B0(u,G,ue,ye,Je,Sr,j,R)}function Mc(u){u._writeAlgorithm=void 0,u._closeAlgorithm=void 0,u._abortAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function AE(u){ha(u,q0,0),Uc(u)}function DE(u,d){try{return u._strategySizeAlgorithm(d)}catch(j){return hp(u,j),1}}function I0(u){return u._strategyHWM-u._queueTotalSize}function CE(u,d,j){try{ha(u,d,j)}catch(ue){hp(u,ue);return}var R=u._controlledWritableStream;if(!mi(R)&&R._state==="writable"){var G=mp(u);pp(R,G)}Uc(u)}function Uc(u){var d=u._controlledWritableStream;if(!!u._started&&d._inFlightWriteRequest===void 0){var j=d._state;if(j==="erroring"){ma(d);return}if(u._queue.length!==0){var R=rt(u);R===q0?PE(u):TE(u,R)}}}function hp(u,d){u._controlledWritableStream._state==="writable"&&O0(u,d)}function PE(u){var d=u._controlledWritableStream;xE(d),oa(u);var j=u._closeAlgorithm();Mc(u),S(j,function(){hi(d)},function(R){$o(d,R)})}function TE(u,d){var j=u._controlledWritableStream;wE(j);var R=u._writeAlgorithm(d);S(R,function(){Ba(j);var G=j._state;if(oa(u),!mi(j)&&G==="writable"){var ue=mp(u);pp(j,ue)}Uc(u)},function(G){j._state==="writable"&&Mc(u),go(j,G)})}function mp(u){var d=I0(u);return d<=0}function O0(u,d){var j=u._controlledWritableStream;Mc(u),fn(j,d)}function Hc(u){return new TypeError("WritableStream.prototype."+u+" can only be used on a WritableStream")}function vp(u){return new TypeError("WritableStreamDefaultController.prototype."+u+" can only be used on a WritableStreamDefaultController")}function xo(u){return new TypeError("WritableStreamDefaultWriter.prototype."+u+" can only be used on a WritableStreamDefaultWriter")}function Xs(u){return new TypeError("Cannot "+u+" a stream using a released writer")}function Vc(u){u._closedPromise=m(function(d,j){u._closedPromise_resolve=d,u._closedPromise_reject=j,u._closedPromiseState="pending"})}function R0(u,d){Vc(u),gp(u,d)}function FE(u){Vc(u),z0(u)}function gp(u,d){u._closedPromise_reject!==void 0&&(C(u._closedPromise),u._closedPromise_reject(d),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0,u._closedPromiseState="rejected")}function qE(u,d){R0(u,d)}function z0(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 $c(u){u._readyPromise=m(function(d,j){u._readyPromise_resolve=d,u._readyPromise_reject=j}),u._readyPromiseState="pending"}function bp(u,d){$c(u),N0(u,d)}function L0(u){$c(u),yp(u)}function N0(u,d){u._readyPromise_reject!==void 0&&(C(u._readyPromise),u._readyPromise_reject(d),u._readyPromise_resolve=void 0,u._readyPromise_reject=void 0,u._readyPromiseState="rejected")}function BE(u){$c(u)}function IE(u,d){bp(u,d)}function yp(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 M0=typeof DOMException!="undefined"?DOMException:void 0;function OE(u){if(!(typeof u=="function"||typeof u=="object"))return!1;try{return new u,!0}catch{return!1}}function RE(){var u=function(j,R){this.message=j||"",this.name=R||"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 zE=OE(M0)?M0:RE();function U0(u,d,j,R,G,ue){var ye=Gr(u),Je=ne(d);u._disturbed=!0;var Sr=!1,Fr=h(void 0);return m(function(Rr,Wr){var Ot;if(ue!==void 0){if(Ot=function(){var xr=new zE("Aborted","AbortError"),Kr=[];R||Kr.push(function(){return d._state==="writable"?ct(d,xr):h(void 0)}),G||Kr.push(function(){return u._state==="readable"?vi(u,xr):h(void 0)}),Wa(function(){return Promise.all(Kr.map(function(gt){return gt()}))},!0,xr)},ue.aborted){Ot();return}ue.addEventListener("abort",Ot)}function gi(){return m(function(xr,Kr){function gt(Mi){Mi?xr():y(Yo(),gt,Kr)}gt(!1)})}function Yo(){return Sr?h(!0):y(Je._readyPromise,function(){return m(function(xr,Kr){nr(ye,{_chunkSteps:function(gt){Fr=y(F0(Je,gt),void 0,t),xr(!1)},_closeSteps:function(){return xr(!0)},_errorSteps:Kr})})})}if(la(u,ye._closedPromise,function(xr){R?dn(!0,xr):Wa(function(){return ct(d,xr)},!0,xr)}),la(d,Je._closedPromise,function(xr){G?dn(!0,xr):Wa(function(){return vi(u,xr)},!0,xr)}),Ni(u,ye._closedPromise,function(){j?dn():Wa(function(){return _E(Je)})}),mi(d)||d._state==="closed"){var Ln=new TypeError("the destination writable stream closed before all data could be piped to it");G?dn(!0,Ln):Wa(function(){return vi(u,Ln)},!0,Ln)}C(gi());function Li(){var xr=Fr;return y(Fr,function(){return xr!==Fr?Li():void 0})}function la(xr,Kr,gt){xr._state==="errored"?gt(xr._storedError):A(Kr,gt)}function Ni(xr,Kr,gt){xr._state==="closed"?gt():w(Kr,gt)}function Wa(xr,Kr,gt){if(Sr)return;Sr=!0,d._state==="writable"&&!mi(d)?w(Li(),Mi):Mi();function Mi(){S(xr(),function(){return vt(Kr,gt)},function(Nn){return vt(!0,Nn)})}}function dn(xr,Kr){Sr||(Sr=!0,d._state==="writable"&&!mi(d)?w(Li(),function(){return vt(xr,Kr)}):vt(xr,Kr))}function vt(xr,Kr){T0(Je),W(ye),ue!==void 0&&ue.removeEventListener("abort",Ot),xr?Wr(Kr):Rr(void 0)}})}var wo=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Wc(this))throw Yc("desiredSize");return xp(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!Wc(this))throw Yc("close");if(!Go(this))throw new TypeError("The stream is not in a state that permits close");Zs(this)},u.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Wc(this))throw Yc("enqueue");if(!Go(this))throw new TypeError("The stream is not in a state that permits enqueue");return Kc(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!Wc(this))throw Yc("error");On(this,d)},u.prototype[Ne]=function(d){ut(this);var j=this._cancelAlgorithm(d);return Gc(this),j},u.prototype[He]=function(d){var j=this._controlledReadableStream;if(this._queue.length>0){var R=oa(this);this._closeRequested&&this._queue.length===0?(Gc(this),eu(j)):Js(this),d._chunkSteps(R)}else ee(j,d),Js(this)},u}();Object.defineProperties(wo.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(wo.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Wc(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableStream")?!1:u instanceof wo}function Js(u){var d=H0(u);if(!!d){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var j=u._pullAlgorithm();S(j,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,Js(u))},function(R){On(u,R)})}}function H0(u){var d=u._controlledReadableStream;if(!Go(u)||!u._started)return!1;if(zn(d)&&Ge(d)>0)return!0;var j=xp(u);return j>0}function Gc(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function Zs(u){if(!!Go(u)){var d=u._controlledReadableStream;u._closeRequested=!0,u._queue.length===0&&(Gc(u),eu(d))}}function Kc(u,d){if(!!Go(u)){var j=u._controlledReadableStream;if(zn(j)&&Ge(j)>0)Be(j,d,!1);else{var R=void 0;try{R=u._strategySizeAlgorithm(d)}catch(G){throw On(u,G),G}try{ha(u,d,R)}catch(G){throw On(u,G),G}}Js(u)}}function On(u,d){var j=u._controlledReadableStream;j._state==="readable"&&(ut(u),Gc(u),G0(j,d))}function xp(u){var d=u._controlledReadableStream._state;return d==="errored"?null:d==="closed"?0:u._strategyHWM-u._queueTotalSize}function LE(u){return!H0(u)}function Go(u){var d=u._controlledReadableStream._state;return!u._closeRequested&&d==="readable"}function V0(u,d,j,R,G,ue,ye){d._controlledReadableStream=u,d._queue=void 0,d._queueTotalSize=void 0,ut(d),d._started=!1,d._closeRequested=!1,d._pullAgain=!1,d._pulling=!1,d._strategySizeAlgorithm=ye,d._strategyHWM=ue,d._pullAlgorithm=R,d._cancelAlgorithm=G,u._readableStreamController=d;var Je=j();S(h(Je),function(){d._started=!0,Js(d)},function(Sr){On(d,Sr)})}function NE(u,d,j,R){var G=Object.create(wo.prototype),ue=function(){},ye=function(){return h(void 0)},Je=function(){return h(void 0)};d.start!==void 0&&(ue=function(){return d.start(G)}),d.pull!==void 0&&(ye=function(){return d.pull(G)}),d.cancel!==void 0&&(Je=function(Sr){return d.cancel(Sr)}),V0(u,G,ue,ye,Je,j,R)}function Yc(u){return new TypeError("ReadableStreamDefaultController.prototype."+u+" can only be used on a ReadableStreamDefaultController")}function ME(u,d){return mt(u._readableStreamController)?HE(u):UE(u)}function UE(u,d){var j=Gr(u),R=!1,G=!1,ue=!1,ye=!1,Je,Sr,Fr,Rr,Wr,Ot=m(function(la){Wr=la});function gi(){if(R)return G=!0,h(void 0);R=!0;var la={_chunkSteps:function(Ni){B(function(){G=!1;var Wa=Ni,dn=Ni;ue||Kc(Fr._readableStreamController,Wa),ye||Kc(Rr._readableStreamController,dn),R=!1,G&&gi()})},_closeSteps:function(){R=!1,ue||Zs(Fr._readableStreamController),ye||Zs(Rr._readableStreamController),(!ue||!ye)&&Wr(void 0)},_errorSteps:function(){R=!1}};return nr(j,la),h(void 0)}function Yo(la){if(ue=!0,Je=la,ye){var Ni=wr([Je,Sr]),Wa=vi(u,Ni);Wr(Wa)}return Ot}function Ln(la){if(ye=!0,Sr=la,ue){var Ni=wr([Je,Sr]),Wa=vi(u,Ni);Wr(Wa)}return Ot}function Li(){}return Fr=wp(Li,gi,Yo),Rr=wp(Li,gi,Ln),A(j._closedPromise,function(la){On(Fr._readableStreamController,la),On(Rr._readableStreamController,la),(!ue||!ye)&&Wr(void 0)}),[Fr,Rr]}function HE(u){var d=Gr(u),j=!1,R=!1,G=!1,ue=!1,ye=!1,Je,Sr,Fr,Rr,Wr,Ot=m(function(vt){Wr=vt});function gi(vt){A(vt._closedPromise,function(xr){vt===d&&(Te(Fr._readableStreamController,xr),Te(Rr._readableStreamController,xr),(!ue||!ye)&&Wr(void 0))})}function Yo(){$e(d)&&(W(d),d=Gr(u),gi(d));var vt={_chunkSteps:function(xr){B(function(){R=!1,G=!1;var Kr=xr,gt=xr;if(!ue&&!ye)try{gt=Bt(xr)}catch(Mi){Te(Fr._readableStreamController,Mi),Te(Rr._readableStreamController,Mi),Wr(vi(u,Mi));return}ue||Se(Fr._readableStreamController,Kr),ye||Se(Rr._readableStreamController,gt),j=!1,R?Li():G&&la()})},_closeSteps:function(){j=!1,ue||Ie(Fr._readableStreamController),ye||Ie(Rr._readableStreamController),Fr._readableStreamController._pendingPullIntos.length>0&&Xe(Fr._readableStreamController,0),Rr._readableStreamController._pendingPullIntos.length>0&&Xe(Rr._readableStreamController,0),(!ue||!ye)&&Wr(void 0)},_errorSteps:function(){j=!1}};nr(d,vt)}function Ln(vt,xr){Ze(d)&&(W(d),d=X(u),gi(d));var Kr=xr?Rr:Fr,gt=xr?Fr:Rr,Mi={_chunkSteps:function(Nn){B(function(){R=!1,G=!1;var Qo=xr?ye:ue,iu=xr?ue:ye;if(iu)Qo||Pe(Kr._readableStreamController,Nn);else{var og=void 0;try{og=Bt(Nn)}catch(Ep){Te(Kr._readableStreamController,Ep),Te(gt._readableStreamController,Ep),Wr(vi(u,Ep));return}Qo||Pe(Kr._readableStreamController,Nn),Se(gt._readableStreamController,og)}j=!1,R?Li():G&&la()})},_closeSteps:function(Nn){j=!1;var Qo=xr?ye:ue,iu=xr?ue:ye;Qo||Ie(Kr._readableStreamController),iu||Ie(gt._readableStreamController),Nn!==void 0&&(Qo||Pe(Kr._readableStreamController,Nn),!iu&&gt._readableStreamController._pendingPullIntos.length>0&&Xe(gt._readableStreamController,0)),(!Qo||!iu)&&Wr(void 0)},_errorSteps:function(){j=!1}};fr(d,vt,Mi)}function Li(){if(j)return R=!0,h(void 0);j=!0;var vt=Fe(Fr._readableStreamController);return vt===null?Yo():Ln(vt._view,!1),h(void 0)}function la(){if(j)return G=!0,h(void 0);j=!0;var vt=Fe(Rr._readableStreamController);return vt===null?Yo():Ln(vt._view,!0),h(void 0)}function Ni(vt){if(ue=!0,Je=vt,ye){var xr=wr([Je,Sr]),Kr=vi(u,xr);Wr(Kr)}return Ot}function Wa(vt){if(ye=!0,Sr=vt,ue){var xr=wr([Je,Sr]),Kr=vi(u,xr);Wr(Kr)}return Ot}function dn(){}return Fr=W0(dn,Li,Ni),Rr=W0(dn,la,Wa),gi(d),[Fr,Rr]}function VE(u,d){Qe(u,d);var j=u,R=j==null?void 0:j.autoAllocateChunkSize,G=j==null?void 0:j.cancel,ue=j==null?void 0:j.pull,ye=j==null?void 0:j.start,Je=j==null?void 0:j.type;return{autoAllocateChunkSize:R===void 0?void 0:ur(R,d+" has member 'autoAllocateChunkSize' that"),cancel:G===void 0?void 0:$E(G,j,d+" has member 'cancel' that"),pull:ue===void 0?void 0:WE(ue,j,d+" has member 'pull' that"),start:ye===void 0?void 0:GE(ye,j,d+" has member 'start' that"),type:Je===void 0?void 0:KE(Je,d+" has member 'type' that")}}function $E(u,d,j){return We(u,j),function(R){return O(u,d,[R])}}function WE(u,d,j){return We(u,j),function(R){return O(u,d,[R])}}function GE(u,d,j){return We(u,j),function(R){return F(u,d,[R])}}function KE(u,d){if(u=""+u,u!=="bytes")throw new TypeError(d+" '"+u+"' is not a valid enumeration value for ReadableStreamType");return u}function YE(u,d){Qe(u,d);var j=u==null?void 0:u.mode;return{mode:j===void 0?void 0:QE(j,d+" has member 'mode' that")}}function QE(u,d){if(u=""+u,u!=="byob")throw new TypeError(d+" '"+u+"' is not a valid enumeration value for ReadableStreamReaderMode");return u}function XE(u,d){Qe(u,d);var j=u==null?void 0:u.preventCancel;return{preventCancel:Boolean(j)}}function $0(u,d){Qe(u,d);var j=u==null?void 0:u.preventAbort,R=u==null?void 0:u.preventCancel,G=u==null?void 0:u.preventClose,ue=u==null?void 0:u.signal;return ue!==void 0&&JE(ue,d+" has member 'signal' that"),{preventAbort:Boolean(j),preventCancel:Boolean(R),preventClose:Boolean(G),signal:ue}}function JE(u,d){if(!_(u))throw new TypeError(d+" is not an AbortSignal.")}function ZE(u,d){Qe(u,d);var j=u==null?void 0:u.readable;he(j,"readable","ReadableWritablePair"),Or(j,d+" has member 'readable' that");var R=u==null?void 0:u.writable;return he(R,"writable","ReadableWritablePair"),Cr(R,d+" has member 'writable' that"),{readable:j,writable:R}}var pn=function(){function u(d,j){d===void 0&&(d={}),j===void 0&&(j={}),d===void 0?d=null:rr(d,"First parameter");var R=yr(j,"Second parameter"),G=VE(d,"First parameter");if(kp(this),G.type==="bytes"){if(R.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var ue=sr(R,0);De(this,G,ue)}else{var ye=z(R),ue=sr(R,1);NE(this,G,ue,ye)}}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Rn(this))throw ko("locked");return zn(this)},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),Rn(this)?zn(this)?v(new TypeError("Cannot cancel a stream that already has a reader")):vi(this,d):v(ko("cancel"))},u.prototype.getReader=function(d){if(d===void 0&&(d=void 0),!Rn(this))throw ko("getReader");var j=YE(d,"First parameter");return j.mode===void 0?Gr(this):X(this)},u.prototype.pipeThrough=function(d,j){if(j===void 0&&(j={}),!Rn(this))throw ko("pipeThrough");qe(d,1,"pipeThrough");var R=ZE(d,"First parameter"),G=$0(j,"Second parameter");if(zn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Tr(R.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var ue=U0(this,R.writable,G.preventClose,G.preventAbort,G.preventCancel,G.signal);return C(ue),R.readable},u.prototype.pipeTo=function(d,j){if(j===void 0&&(j={}),!Rn(this))return v(ko("pipeTo"));if(d===void 0)return v("Parameter 1 is required in 'pipeTo'.");if(!Oe(d))return v(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var R;try{R=$0(j,"Second parameter")}catch(G){return v(G)}return zn(this)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Tr(d)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):U0(this,d,R.preventClose,R.preventAbort,R.preventCancel,R.signal)},u.prototype.tee=function(){if(!Rn(this))throw ko("tee");var d=ME(this);return wr(d)},u.prototype.values=function(d){if(d===void 0&&(d=void 0),!Rn(this))throw ko("values");var j=XE(d,"First parameter");return pr(this,j.preventCancel)},u}();Object.defineProperties(pn.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(pn.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(pn.prototype,r.asyncIterator,{value:pn.prototype.values,writable:!0,configurable:!0});function wp(u,d,j,R,G){R===void 0&&(R=1),G===void 0&&(G=function(){return 1});var ue=Object.create(pn.prototype);kp(ue);var ye=Object.create(wo.prototype);return V0(ue,ye,u,d,j,R,G),ue}function W0(u,d,j){var R=Object.create(pn.prototype);kp(R);var G=Object.create(It.prototype);return Ae(R,G,u,d,j,0,void 0),R}function kp(u){u._state="readable",u._reader=void 0,u._storedError=void 0,u._disturbed=!1}function Rn(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readableStreamController")?!1:u instanceof pn}function zn(u){return u._reader!==void 0}function vi(u,d){if(u._disturbed=!0,u._state==="closed")return h(void 0);if(u._state==="errored")return v(u._storedError);eu(u);var j=u._reader;j!==void 0&&$e(j)&&(j._readIntoRequests.forEach(function(G){G._closeSteps(void 0)}),j._readIntoRequests=new V);var R=u._readableStreamController[Ne](d);return P(R,t)}function eu(u){u._state="closed";var d=u._reader;d!==void 0&&(de(d),Ze(d)&&(d._readRequests.forEach(function(j){j._closeSteps()}),d._readRequests=new V))}function G0(u,d){u._state="errored",u._storedError=d;var j=u._reader;j!==void 0&&(le(j,d),Ze(j)?(j._readRequests.forEach(function(R){R._errorSteps(d)}),j._readRequests=new V):(j._readIntoRequests.forEach(function(R){R._errorSteps(d)}),j._readIntoRequests=new V))}function ko(u){return new TypeError("ReadableStream.prototype."+u+" can only be used on a ReadableStream")}function K0(u,d){Qe(u,d);var j=u==null?void 0:u.highWaterMark;return he(j,"highWaterMark","QueuingStrategyInit"),{highWaterMark:_e(j)}}var Y0=function(u){return u.byteLength};try{Object.defineProperty(Y0,"name",{value:"size",configurable:!0})}catch{}var ru=function(){function u(d){qe(d,1,"ByteLengthQueuingStrategy"),d=K0(d,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!X0(this))throw Q0("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!X0(this))throw Q0("size");return Y0},enumerable:!1,configurable:!0}),u}();Object.defineProperties(ru.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ru.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Q0(u){return new TypeError("ByteLengthQueuingStrategy.prototype."+u+" can only be used on a ByteLengthQueuingStrategy")}function X0(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_byteLengthQueuingStrategyHighWaterMark")?!1:u instanceof ru}var J0=function(){return 1};try{Object.defineProperty(J0,"name",{value:"size",configurable:!0})}catch{}var tu=function(){function u(d){qe(d,1,"CountQueuingStrategy"),d=K0(d,"First parameter"),this._countQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!eg(this))throw Z0("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!eg(this))throw Z0("size");return J0},enumerable:!1,configurable:!0}),u}();Object.defineProperties(tu.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(tu.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Z0(u){return new TypeError("CountQueuingStrategy.prototype."+u+" can only be used on a CountQueuingStrategy")}function eg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_countQueuingStrategyHighWaterMark")?!1:u instanceof tu}function e4(u,d){Qe(u,d);var j=u==null?void 0:u.flush,R=u==null?void 0:u.readableType,G=u==null?void 0:u.start,ue=u==null?void 0:u.transform,ye=u==null?void 0:u.writableType;return{flush:j===void 0?void 0:r4(j,u,d+" has member 'flush' that"),readableType:R,start:G===void 0?void 0:t4(G,u,d+" has member 'start' that"),transform:ue===void 0?void 0:a4(ue,u,d+" has member 'transform' that"),writableType:ye}}function r4(u,d,j){return We(u,j),function(R){return O(u,d,[R])}}function t4(u,d,j){return We(u,j),function(R){return F(u,d,[R])}}function a4(u,d,j){return We(u,j),function(R,G){return O(u,d,[R,G])}}var au=function(){function u(d,j,R){d===void 0&&(d={}),j===void 0&&(j={}),R===void 0&&(R={}),d===void 0&&(d=null);var G=yr(j,"Second parameter"),ue=yr(R,"Third parameter"),ye=e4(d,"First parameter");if(ye.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(ye.writableType!==void 0)throw new RangeError("Invalid writableType specified");var Je=sr(ue,0),Sr=z(ue),Fr=sr(G,1),Rr=z(G),Wr,Ot=m(function(gi){Wr=gi});i4(this,Ot,Fr,Rr,Je,Sr),o4(this,ye),ye.start!==void 0?Wr(ye.start(this._transformStreamController)):Wr(void 0)}return Object.defineProperty(u.prototype,"readable",{get:function(){if(!rg(this))throw ng("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"writable",{get:function(){if(!rg(this))throw ng("writable");return this._writable},enumerable:!1,configurable:!0}),u}();Object.defineProperties(au.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(au.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function i4(u,d,j,R,G,ue){function ye(){return d}function Je(Ot){return c4(u,Ot)}function Sr(Ot){return l4(u,Ot)}function Fr(){return f4(u)}u._writable=ce(ye,Je,Fr,Sr,j,R);function Rr(){return p4(u)}function Wr(Ot){return Xc(u,Ot),h(void 0)}u._readable=wp(ye,Rr,Wr,G,ue),u._backpressure=void 0,u._backpressureChangePromise=void 0,u._backpressureChangePromise_resolve=void 0,Jc(u,!0),u._transformStreamController=void 0}function rg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_transformStreamController")?!1:u instanceof au}function Qc(u,d){On(u._readable._readableStreamController,d),Xc(u,d)}function Xc(u,d){tg(u._transformStreamController),hp(u._writable._writableStreamController,d),u._backpressure&&Jc(u,!1)}function Jc(u,d){u._backpressureChangePromise!==void 0&&u._backpressureChangePromise_resolve(),u._backpressureChangePromise=m(function(j){u._backpressureChangePromise_resolve=j}),u._backpressure=d}var Ko=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Zc(this))throw el("desiredSize");var d=this._controlledTransformStream._readable._readableStreamController;return xp(d)},enumerable:!1,configurable:!0}),u.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Zc(this))throw el("enqueue");ag(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!Zc(this))throw el("error");s4(this,d)},u.prototype.terminate=function(){if(!Zc(this))throw el("terminate");u4(this)},u}();Object.defineProperties(Ko.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ko.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Zc(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledTransformStream")?!1:u instanceof Ko}function n4(u,d,j,R){d._controlledTransformStream=u,u._transformStreamController=d,d._transformAlgorithm=j,d._flushAlgorithm=R}function o4(u,d){var j=Object.create(Ko.prototype),R=function(ue){try{return ag(j,ue),h(void 0)}catch(ye){return v(ye)}},G=function(){return h(void 0)};d.transform!==void 0&&(R=function(ue){return d.transform(ue,j)}),d.flush!==void 0&&(G=function(){return d.flush(j)}),n4(u,j,R,G)}function tg(u){u._transformAlgorithm=void 0,u._flushAlgorithm=void 0}function ag(u,d){var j=u._controlledTransformStream,R=j._readable._readableStreamController;if(!Go(R))throw new TypeError("Readable side is not in a state that permits enqueue");try{Kc(R,d)}catch(ue){throw Xc(j,ue),j._readable._storedError}var G=LE(R);G!==j._backpressure&&Jc(j,!0)}function s4(u,d){Qc(u._controlledTransformStream,d)}function ig(u,d){var j=u._transformAlgorithm(d);return P(j,void 0,function(R){throw Qc(u._controlledTransformStream,R),R})}function u4(u){var d=u._controlledTransformStream,j=d._readable._readableStreamController;Zs(j);var R=new TypeError("TransformStream terminated");Xc(d,R)}function c4(u,d){var j=u._transformStreamController;if(u._backpressure){var R=u._backpressureChangePromise;return P(R,function(){var G=u._writable,ue=G._state;if(ue==="erroring")throw G._storedError;return ig(j,d)})}return ig(j,d)}function l4(u,d){return Qc(u,d),h(void 0)}function f4(u){var d=u._readable,j=u._transformStreamController,R=j._flushAlgorithm();return tg(j),P(R,function(){if(d._state==="errored")throw d._storedError;Zs(d._readableStreamController)},function(G){throw Qc(u,G),d._storedError})}function p4(u){return Jc(u,!1),u._backpressureChangePromise}function el(u){return new TypeError("TransformStreamDefaultController.prototype."+u+" can only be used on a TransformStreamDefaultController")}function ng(u){return new TypeError("TransformStream.prototype."+u+" can only be used on a TransformStream")}var _p={ReadableStream:pn,ReadableStreamDefaultController:wo,ReadableByteStreamController:It,ReadableStreamBYOBRequest:ht,ReadableStreamDefaultReader:Ye,ReadableStreamBYOBReader:oe,WritableStream:M,WritableStreamDefaultController:yo,WritableStreamDefaultWriter:Wo,ByteLengthQueuingStrategy:ru,CountQueuingStrategy:tu,TransformStream:au,TransformStreamDefaultController:Ko};if(typeof a!="undefined")for(var jp in _p)Object.prototype.hasOwnProperty.call(_p,jp)&&Object.defineProperty(a,jp,{value:_p[jp],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=ru,e.CountQueuingStrategy=tu,e.ReadableByteStreamController=It,e.ReadableStream=pn,e.ReadableStreamBYOBReader=oe,e.ReadableStreamBYOBRequest=ht,e.ReadableStreamDefaultController=wo,e.ReadableStreamDefaultReader=Ye,e.TransformStream=au,e.TransformStreamDefaultController=Ko,e.WritableStream=M,e.WritableStreamDefaultController=yo,e.WritableStreamDefaultWriter=Wo,Object.defineProperty(e,"__esModule",{value:!0})})});var Sp="3.4.11";function fg(e,r){if(!e)throw new Error(r||"loaders.gl assertion failed.")}var Ui={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},XN=Ui.self||Ui.window||Ui.global||{},JN=Ui.window||Ui.self||Ui.global||{},pg=Ui.global||Ui.self||Ui.window||{},ZN=Ui.document||{};var _o=typeof process!="object"||String(process)!=="[object process]"||process.browser,ou=typeof importScripts=="function",eM=typeof window!="undefined"&&typeof window.orientation!="undefined",dg=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),rM=dg&&parseFloat(dg[1])||0;function Ap(e,r=!0,t){let i=t||new Set;if(e){if(hg(e))i.add(e);else if(hg(e.buffer))i.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(r&&typeof e=="object")for(let a in e)Ap(e[a],r,i)}}return t===void 0?Array.from(i):[]}function hg(e){return e?e instanceof ArrayBuffer||typeof MessagePort!="undefined"&&e instanceof MessagePort||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas:!1}function jo(){let parentPort;try{eval("globalThis.parentPort = require('worker_threads').parentPort"),parentPort=globalThis.parentPort}catch{}return parentPort}var Dp=new Map,Za=class{static inWorkerThread(){return typeof self!="undefined"||Boolean(jo())}static set onmessage(r){function t(a){let n=jo(),{type:o,payload:s}=n?a:a.data;r(o,s)}let i=jo();i?(i.on("message",t),i.on("exit",()=>console.debug("Node worker closing"))):globalThis.onmessage=t}static addEventListener(r){let t=Dp.get(r);t||(t=a=>{if(!k4(a))return;let n=jo(),{type:o,payload:s}=n?a:a.data;r(o,s)}),jo()?console.error("not implemented"):globalThis.addEventListener("message",t)}static removeEventListener(r){let t=Dp.get(r);Dp.delete(r),jo()?console.error("not implemented"):globalThis.removeEventListener("message",t)}static postMessage(r,t){let i={source:"loaders.gl",type:r,payload:t},a=Ap(t),n=jo();n?n.postMessage(i,a):globalThis.postMessage(i,a)}};function k4(e){let{type:r,data:t}=e;return r==="message"&&t&&typeof t.source=="string"&&t.source.startsWith("loaders.gl")}var Tp={};x4(Tp,{requireFromFile:()=>Pp,requireFromString:()=>rl});var Cp=Ja(require("module")),mg=Ja(require("path"));async function Pp(e){if(e.startsWith("http")){let t=await(await fetch(e)).text();return rl(t)}return e.startsWith("/")||(e=`${process.cwd()}/${e}`),require(e)}function rl(e,r="",t){if(typeof r=="object"&&(t=r,r=""),typeof e!="string")throw new Error(`code must be a string, not ${typeof e}`);let i=Cp.default._nodeModulePaths(mg.default.dirname(r)),a=module.parent,n=new Cp.default(r,a);return n.filename=r,n.paths=[].concat((t==null?void 0:t.prependPaths)||[]).concat(i).concat((t==null?void 0:t.appendPaths)||[]),n._compile(e,r),a&&a.children&&a.children.splice(a.children.indexOf(n),1),n.exports}var _4="latest",j4=typeof Sp!="undefined"?Sp:_4,Fp={};async function su(e,r=null,t={}){return r&&(e=vg(e,r,t)),Fp[e]=Fp[e]||E4(e),await Fp[e]}function vg(e,r,t){if(e.startsWith("http"))return e;let i=t.modules||{};return i[e]?i[e]:_o?t.CDN?(fg(t.CDN.startsWith("http")),`${t.CDN}/${r}@${j4}/dist/libs/${e}`):ou?`../src/libs/${e}`:`modules/${r}/src/libs/${e}`:`modules/${r}/dist/libs/${e}`}async function E4(e){if(e.endsWith("wasm"))return await(await fetch(e)).arrayBuffer();if(!_o)try{return Tp&&Pp&&await Pp(e)}catch{return null}if(ou)return importScripts(e);let t=await(await fetch(e)).text();return S4(t,e)}function S4(e,r){if(!_o)return rl&&rl(e,r);if(ou)return eval.call(pg,e),null;let t=document.createElement("script");t.id=r;try{t.appendChild(document.createTextNode(e))}catch{t.text=e}return document.body.appendChild(t),null}var A4=0;function qp(e){!Za.inWorkerThread()||(Za.onmessage=async(r,t)=>{switch(r){case"process":try{let{input:i,options:a={},context:n={}}=t,o=await C4({loader:e,arrayBuffer:i,options:a,context:bi(va({},n),{parse:D4})});Za.postMessage("done",{result:o})}catch(i){let a=i instanceof Error?i.message:"";Za.postMessage("error",{error:a})}break;default:}})}function D4(e,r){return new Promise((t,i)=>{let a=A4++,n=(s,c)=>{if(c.id===a)switch(s){case"done":Za.removeEventListener(n),t(c.result);break;case"error":Za.removeEventListener(n),i(c.error);break;default:}};Za.addEventListener(n);let o={id:a,input:e,options:r};Za.postMessage("process",o)})}async function C4({loader:e,arrayBuffer:r,options:t,context:i}){let a,n;if(e.parseSync||e.parse)a=r,n=e.parseSync||e.parse;else if(e.parseTextSync)a=new TextDecoder().decode(r),n=e.parseTextSync;else throw new Error(`Could not load data with ${e.name} loader`);return t=bi(va({},t),{modules:e&&e.options&&e.options.modules||{},worker:!1}),await n(a,va({},t),i,e)}var v0=Ja(cb());var xi=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},Et=Qp.global||Qp.self||Qp.window;var lb={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"]=lb||{};function jr(e,r,t){return r<=e&&e<=t}function rS(e,r){return e.indexOf(r)!==-1}var gn=Math.floor;function fl(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function tS(e){for(var r=String(e),t=r.length,i=0,a=[];i<t;){var n=r.charCodeAt(i);if(n<55296||n>57343)a.push(n);else if(56320<=n&&n<=57343)a.push(65533);else if(55296<=n&&n<=56319)if(i===t-1)a.push(65533);else{var o=r.charCodeAt(i+1);if(56320<=o&&o<=57343){var s=n&1023,c=o&1023;a.push(65536+(s<<10)+c),i+=1}else a.push(65533)}i+=1}return a}function aS(e){for(var r="",t=0;t<e.length;++t){var i=e[t];i<=65535?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return r}function ei(e){return 0<=e&&e<=127}var ri=ei,zr=-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():zr},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 it=-1;function Lr(e,r){if(e)throw TypeError("Decoder error");return r||65533}function wi(e){throw TypeError("The code point "+e+" could not be encoded.")}function iS(){}iS.prototype={handler:function(e,r){}};function nS(){}nS.prototype={handler:function(e,r){}};function Jp(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(Zp,e)?Zp[e]:null}var fb=[{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"}],Zp={};fb.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(t){Zp[t]=r})})});var za={},La={};function ns(e,r){return r&&r[e]||null}function os(e,r){var t=r.indexOf(e);return t===-1?null:t}function Aa(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 oS(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,t=0,i=Aa("gb18030-ranges"),a;for(a=0;a<i.length;++a){var n=i[a];if(n[0]<=e)r=n[0],t=n[1];else break}return t+e-r}function sS(e){if(e===59335)return 7457;var r=0,t=0,i=Aa("gb18030-ranges"),a;for(a=0;a<i.length;++a){var n=i[a];if(n[1]<=e)r=n[1],t=n[0];else break}return t+e-r}function uS(e){ed=ed||Aa("jis0208").map(function(t,i){return jr(i,8272,8835)?null:t});var r=ed;return r.indexOf(e)}var ed;function cS(e){rd=rd||Aa("big5").map(function(t,i){return i<(161-129)*157?null:t});var r=rd;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):os(e,r)}var rd,pb="utf-8";function So(e,r){if(!(this instanceof So))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):pb,r=fl(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var t=Jp(e);if(t===null||t.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!La[t.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var i=this;return i._encoding=t,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(So.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(So.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(So.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));So.prototype.decode=function(r,t){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),t=fl(t),this._do_not_flush||(this._decoder=La[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(t.stream);for(var a=new Xp(i),n=[],o;;){var s=a.read();if(s===zr||(o=this._decoder.handler(a,s),o===it))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(a,a.read()),o===it)break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}while(!a.endOfStream());this._decoder=null}function c(f){return rS(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)&&!this._ignoreBOM&&!this._BOMseen&&(f.length>0&&f[0]===65279?(this._BOMseen=!0,f.shift()):f.length>0&&(this._BOMseen=!0)),aS(f)}return c.call(this,n)};function ku(e,r){if(!(this instanceof ku))throw TypeError("Called as a function. Did you forget 'new'?");r=fl(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var t=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){e=e!==void 0?String(e):pb;var i=Jp(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!za[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");t._encoding=i}else t._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=t._encoding.name.toLowerCase()),t}Object.defineProperty&&Object.defineProperty(ku.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});ku.prototype.encode=function(r,t){r=r===void 0?"":String(r),t=fl(t),this._do_not_flush||(this._encoder=za[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(t.stream);for(var i=new Xp(tS(r)),a=[],n;;){var o=i.read();if(o===zr||(n=this._encoder.handler(i,o),n===it))break;Array.isArray(n)?a.push.apply(a,n):a.push(n)}if(!this._do_not_flush){for(;n=this._encoder.handler(i,i.read()),n!==it;)Array.isArray(n)?a.push.apply(a,n):a.push(n);this._encoder=null}return new Uint8Array(a)};function lS(e){var r=e.fatal,t=0,i=0,a=0,n=128,o=191;this.handler=function(s,c){if(c===zr&&a!==0)return a=0,Lr(r);if(c===zr)return it;if(a===0){if(jr(c,0,127))return c;if(jr(c,194,223))a=1,t=c&31;else if(jr(c,224,239))c===224&&(n=160),c===237&&(o=159),a=2,t=c&15;else if(jr(c,240,244))c===240&&(n=144),c===244&&(o=143),a=3,t=c&7;else return Lr(r);return null}if(!jr(c,n,o))return t=a=i=0,n=128,o=191,s.prepend(c),Lr(r);if(n=128,o=191,t=t<<6|c&63,i+=1,i!==a)return null;var f=t;return t=a=i=0,f}}function fS(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return it;if(ri(i))return i;var a,n;jr(i,128,2047)?(a=1,n=192):jr(i,2048,65535)?(a=2,n=224):jr(i,65536,1114111)&&(a=3,n=240);for(var o=[(i>>6*a)+n];a>0;){var s=i>>6*(a-1);o.push(128|s&63),a-=1}return o}}za["UTF-8"]=function(e){return new fS(e)};La["UTF-8"]=function(e){return new lS(e)};function pS(e,r){var t=r.fatal;this.handler=function(i,a){if(a===zr)return it;if(ei(a))return a;var n=e[a-128];return n===null?Lr(t):n}}function dS(e,r){var t=r.fatal;this.handler=function(i,a){if(a===zr)return it;if(ri(a))return a;var n=os(a,e);return n===null&&wi(a),n+128}}(function(){"encoding-indexes"in global&&fb.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var t=r.name,i=Aa(t.toLowerCase());La[t]=function(a){return new pS(i,a)},za[t]=function(a){return new dS(i,a)}})})})();La.GBK=function(e){return new db(e)};za.GBK=function(e){return new hb(e,!0)};function db(e){var r=e.fatal,t=0,i=0,a=0;this.handler=function(n,o){if(o===zr&&t===0&&i===0&&a===0)return it;o===zr&&(t!==0||i!==0||a!==0)&&(t=0,i=0,a=0,Lr(r));var s;if(a!==0){s=null,jr(o,48,57)&&(s=oS((((t-129)*10+i-48)*126+a-129)*10+o-48));var c=[i,a,o];return t=0,i=0,a=0,s===null?(n.prepend(c),Lr(r)):s}if(i!==0)return jr(o,129,254)?(a=o,null):(n.prepend([i,o]),t=0,i=0,Lr(r));if(t!==0){if(jr(o,48,57))return i=o,null;var f=t,p=null;t=0;var m=o<127?64:65;return(jr(o,64,126)||jr(o,128,254))&&(p=(f-129)*190+(o-m)),s=p===null?null:ns(p,Aa("gb18030")),s===null&&ei(o)&&n.prepend(o),s===null?Lr(r):s}return ei(o)?o:o===128?8364:jr(o,129,254)?(t=o,null):Lr(r)}}function hb(e,r){var t=e.fatal;this.handler=function(i,a){if(a===zr)return it;if(ri(a))return a;if(a===58853)return wi(a);if(r&&a===8364)return 128;var n=os(a,Aa("gb18030"));if(n!==null){var o=gn(n/190)+129,s=n%190,c=s<63?64:65;return[o,s+c]}if(r)return wi(a);n=sS(a);var f=gn(n/10/126/10);n=n-f*10*126*10;var p=gn(n/10/126);n=n-p*10*126;var m=gn(n/10),h=n-m*10;return[f+129,p+48,m+129,h+48]}}za.gb18030=function(e){return new hb(e)};La.gb18030=function(e){return new db(e)};function hS(e){var r=e.fatal,t=0;this.handler=function(i,a){if(a===zr&&t!==0)return t=0,Lr(r);if(a===zr&&t===0)return it;if(t!==0){var n=t,o=null;t=0;var s=a<127?64:98;switch((jr(a,64,126)||jr(a,161,254))&&(o=(n-129)*157+(a-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:ns(o,Aa("big5"));return c===null&&ei(a)&&i.prepend(a),c===null?Lr(r):c}return ei(a)?a:jr(a,129,254)?(t=a,null):Lr(r)}}function mS(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return it;if(ri(i))return i;var a=cS(i);if(a===null)return wi(i);var n=gn(a/157)+129;if(n<161)return wi(i);var o=a%157,s=o<63?64:98;return[n,o+s]}}za.Big5=function(e){return new mS(e)};La.Big5=function(e){return new hS(e)};function vS(e){var r=e.fatal,t=!1,i=0;this.handler=function(a,n){if(n===zr&&i!==0)return i=0,Lr(r);if(n===zr&&i===0)return it;if(i===142&&jr(n,161,223))return i=0,65377-161+n;if(i===143&&jr(n,161,254))return t=!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=ns((o-161)*94+(n-161),Aa(t?"jis0212":"jis0208"))),t=!1,jr(n,161,254)||a.prepend(n),s===null?Lr(r):s}return ei(n)?n:n===142||n===143||jr(n,161,254)?(i=n,null):Lr(r)}}function gS(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return it;if(ri(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 a=os(i,Aa("jis0208"));if(a===null)return wi(i);var n=gn(a/94)+161,o=a%94+161;return[n,o]}}za["EUC-JP"]=function(e){return new gS(e)};La["EUC-JP"]=function(e){return new vS(e)};function bS(e){var r=e.fatal,t={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},i=t.ASCII,a=t.ASCII,n=0,o=!1;this.handler=function(s,c){switch(i){default:case t.ASCII:return c===27?(i=t.EscapeStart,null):jr(c,0,127)&&c!==14&&c!==15&&c!==27?(o=!1,c):c===zr?it:(o=!1,Lr(r));case t.Roman:return c===27?(i=t.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===zr?it:(o=!1,Lr(r));case t.Katakana:return c===27?(i=t.EscapeStart,null):jr(c,33,95)?(o=!1,65377-33+c):c===zr?it:(o=!1,Lr(r));case t.LeadByte:return c===27?(i=t.EscapeStart,null):jr(c,33,126)?(o=!1,n=c,i=t.TrailByte,null):c===zr?it:(o=!1,Lr(r));case t.TrailByte:if(c===27)return i=t.EscapeStart,Lr(r);if(jr(c,33,126)){i=t.LeadByte;var f=(n-33)*94+c-33,p=ns(f,Aa("jis0208"));return p===null?Lr(r):p}return c===zr?(i=t.LeadByte,s.prepend(c),Lr(r)):(i=t.LeadByte,Lr(r));case t.EscapeStart:return c===36||c===40?(n=c,i=t.Escape,null):(s.prepend(c),o=!1,i=a,Lr(r));case t.Escape:var m=n;n=0;var h=null;if(m===40&&c===66&&(h=t.ASCII),m===40&&c===74&&(h=t.Roman),m===40&&c===73&&(h=t.Katakana),m===36&&(c===64||c===66)&&(h=t.LeadByte),h!==null){i=i=h;var v=o;return o=!0,v?Lr(r):null}return s.prepend([m,c]),o=!1,i=a,Lr(r)}}}function yS(e){var r=e.fatal,t={ASCII:0,Roman:1,jis0208:2},i=t.ASCII;this.handler=function(a,n){if(n===zr&&i!==t.ASCII)return a.prepend(n),i=t.ASCII,[27,40,66];if(n===zr&&i===t.ASCII)return it;if((i===t.ASCII||i===t.Roman)&&(n===14||n===15||n===27))return wi(65533);if(i===t.ASCII&&ri(n))return n;if(i===t.Roman&&(ri(n)&&n!==92&&n!==126||n==165||n==8254)){if(ri(n))return n;if(n===165)return 92;if(n===8254)return 126}if(ri(n)&&i!==t.ASCII)return a.prepend(n),i=t.ASCII,[27,40,66];if((n===165||n===8254)&&i!==t.Roman)return a.prepend(n),i=t.Roman,[27,40,74];n===8722&&(n=65293);var o=os(n,Aa("jis0208"));if(o===null)return wi(n);if(i!==t.jis0208)return a.prepend(n),i=t.jis0208,[27,36,66];var s=gn(o/94)+33,c=o%94+33;return[s,c]}}za["ISO-2022-JP"]=function(e){return new yS(e)};La["ISO-2022-JP"]=function(e){return new bS(e)};function xS(e){var r=e.fatal,t=0;this.handler=function(i,a){if(a===zr&&t!==0)return t=0,Lr(r);if(a===zr&&t===0)return it;if(t!==0){var n=t,o=null;t=0;var s=a<127?64:65,c=n<160?129:193;if((jr(a,64,126)||jr(a,128,252))&&(o=(n-c)*188+a-s),jr(o,8836,10715))return 57344-8836+o;var f=o===null?null:ns(o,Aa("jis0208"));return f===null&&ei(a)&&i.prepend(a),f===null?Lr(r):f}return ei(a)||a===128?a:jr(a,161,223)?65377-161+a:jr(a,129,159)||jr(a,224,252)?(t=a,null):Lr(r)}}function wS(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return it;if(ri(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 a=uS(i);if(a===null)return wi(i);var n=gn(a/188),o=n<31?129:193,s=a%188,c=s<63?64:65;return[n+o,s+c]}}za.Shift_JIS=function(e){return new wS(e)};La.Shift_JIS=function(e){return new xS(e)};function kS(e){var r=e.fatal,t=0;this.handler=function(i,a){if(a===zr&&t!==0)return t=0,Lr(r);if(a===zr&&t===0)return it;if(t!==0){var n=t,o=null;t=0,jr(a,65,254)&&(o=(n-129)*190+(a-65));var s=o===null?null:ns(o,Aa("euc-kr"));return o===null&&ei(a)&&i.prepend(a),s===null?Lr(r):s}return ei(a)?a:jr(a,129,254)?(t=a,null):Lr(r)}}function _S(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return it;if(ri(i))return i;var a=os(i,Aa("euc-kr"));if(a===null)return wi(i);var n=gn(a/190)+129,o=a%190+65;return[n,o]}}za["EUC-KR"]=function(e){return new _S(e)};La["EUC-KR"]=function(e){return new kS(e)};function pl(e,r){var t=e>>8,i=e&255;return r?[t,i]:[i,t]}function mb(e,r){var t=r.fatal,i=null,a=null;this.handler=function(n,o){if(o===zr&&(i!==null||a!==null))return Lr(t);if(o===zr&&i===null&&a===null)return it;if(i===null)return i=o,null;var s;if(e?s=(i<<8)+o:s=(o<<8)+i,i=null,a!==null){var c=a;return a=null,jr(s,56320,57343)?65536+(c-55296)*1024+(s-56320):(n.prepend(pl(s,e)),Lr(t))}return jr(s,55296,56319)?(a=s,null):jr(s,56320,57343)?Lr(t):s}}function vb(e,r){var t=r.fatal;this.handler=function(i,a){if(a===zr)return it;if(jr(a,0,65535))return pl(a,e);var n=pl((a-65536>>10)+55296,e),o=pl((a-65536&1023)+56320,e);return n.concat(o)}}za["UTF-16BE"]=function(e){return new vb(!0,e)};La["UTF-16BE"]=function(e){return new mb(!0,e)};za["UTF-16LE"]=function(e){return new vb(!1,e)};La["UTF-16LE"]=function(e){return new mb(!1,e)};function jS(e){var r=e.fatal;this.handler=function(t,i){return i===zr?it:ei(i)?i:63360+i-128}}function ES(e){var r=e.fatal;this.handler=function(t,i){return i===zr?it:ri(i)?i:jr(i,63360,63487)?i-63360+128:wi(i)}}za["x-user-defined"]=function(e){return new ES(e)};La["x-user-defined"]=function(e){return new jS(e)};var SS="rejected",AS="fulfilled";function gb(e){let r=e.map(t=>t.then(i=>({status:AS,value:i})).catch(i=>({status:SS,reason:i})));return Promise.all(r)}function dl(e){return Buffer.from(e).toString("base64")}function td(e){return Buffer.from(e,"base64").toString("ascii")}var ti=class{constructor(r){this.map={},r instanceof ti?r.forEach((t,i)=>this.append(i,t)):Array.isArray(r)?r.forEach(t=>this.append(t[0],t[1])):r&&Object.getOwnPropertyNames(r).forEach(t=>this.append(t,r[t]))}append(r,t){r=_u(r),t=bb(t);let i=this.map[r];this.map[r]=i?`${i}, ${t}`:t}delete(r){delete this.map[_u(r)]}get(r){return r=_u(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(_u(r))}set(r,t){this.map[_u(r)]=bb(t)}forEach(r,t=null){for(let i in this.map)this.map.hasOwnProperty(i)&&(t?r.call(t,this.map[i],i,this):r(this.map[i],i,this))}keys(){let r=[];return this.forEach(function(t,i){r.push(i)}),ad(r)}values(){let r=[];return this.forEach(function(t){r.push(t)}),ad(r)}entries(){let r=[];return this.forEach(function(t,i){r.push([i,t])}),ad(r)}*[Symbol.iterator](){yield*this.entries()}};function _u(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 bb(e){return typeof e!="string"&&(e=String(e)),e}function ad(e){let r={next(){let t=e.shift();return{done:t===void 0,value:t}}};return r[Symbol.iterator]=function(){return r},r}function id(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var hl=Ja(require("zlib"));var DS=e=>e&&e instanceof ArrayBuffer,CS=e=>e&&e instanceof Buffer;function yb(e){let r=e.indexOf(","),t,i;return e.slice(r-7,r)===";base64"?(t=Buffer.from(e.slice(r+1),"base64"),i=e.slice(5,r-7).trim()):(t=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:nd(t),mimeType:i}}function nd(e){if(DS(e))return e;if(CS(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 xb(e,r){switch(r.get("content-encoding")){case"br":return e.pipe(hl.default.createBrotliDecompress());case"gzip":return e.pipe(hl.default.createGunzip());case"deflate":return e.pipe(hl.default.createDeflate());default:return e}}async function wb(e){let r=[];return await new Promise((t,i)=>{e.on("error",a=>i(a)),e.on("readable",()=>e.read()),e.on("data",a=>{typeof a=="string"&&i(new Error("Read stream not binary")),r.push(nd(a))}),e.on("end",()=>{let a=PS(r);t(a)})})}function PS(e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),t=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(t),a=0;for(let n of r)i.set(n,a),a+=n.byteLength;return i.buffer}var sd=Ja(require("stream")),TS=e=>typeof e=="boolean",kb=e=>typeof e=="function",FS=e=>e!==null&&typeof e=="object",od=e=>FS(e)&&kb(e.read)&&kb(e.pipe)&&TS(e.readable),ki=class{constructor(r,t){this.bodyUsed=!1;let{headers:i,status:a=200,statusText:n="OK",url:o}=t||{};this.url=o,this.ok=a===200,this.status=a,this.statusText=n,this.headers=new ti((t==null?void 0:t.headers)||{}),od(r)?this._body=xb(r,i):typeof r=="string"?this._body=sd.Readable.from([new TextEncoder().encode(r)]):this._body=sd.Readable.from([r||new ArrayBuffer(0)])}get body(){return id(!this.bodyUsed),id(od(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return od(this._body)?await wb(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 _b=Ja(require("http")),jb=Ja(require("https"));var ud=Ja(require("fs"));async function cd(e,r){let t=e.split("?")[0];try{let i=await new Promise((s,c)=>{let f=ud.default.createReadStream(t,{encoding:null});f.once("readable",()=>s(f)),f.on("error",p=>c(p))}),a=200,n="OK",o=qS(t);return new ki(i,{headers:o,status:a,statusText:n,url:e})}catch(i){let a=400,n=i.message,o={};return new ki(i.message,{headers:o,status:a,statusText:n,url:e})}}function qS(e){let r={};if(!r["content-length"]){let t=ud.default.statSync(e);r["content-length"]=t.size}return e.endsWith(".gz")&&(e=e.slice(0,-3),r["content-encoding"]="gzip"),new ti(r)}var ld=e=>e.startsWith("data:"),BS=e=>e.startsWith("http:")||e.startsWith("https:");async function ju(e,r){try{if(!BS(e)&&!ld(e))return await cd(e,r);if(ld(e)){let{arrayBuffer:f,mimeType:p}=yb(e);return new ki(f,{headers:{"content-type":p},url:e})}let t={},i=e;e.endsWith(".gz")&&(e=e.slice(0,-3),t["content-encoding"]="gzip");let a=await IS(i,r),n=LS(e,a,t),{status:o,statusText:s}=zS(a),c=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&c){let f=OS(e,n.get("location"));return await ju(f,r)}return new ki(a,{headers:n,status:o,statusText:s,url:e})}catch(t){return new ki(null,{status:400,statusText:String(t),url:e})}}async function IS(e,r){return await new Promise((t,i)=>{let a=RS(e,r),n=e.startsWith("https:")?jb.default.request(a,o=>t(o)):_b.default.request(a,o=>t(o));n.on("error",o=>i(o)),n.end()})}function OS(e,r){if(r.startsWith("http"))return r;let t=new URL(e);return t.pathname=r,t.href}function RS(e,r){let t=(r==null?void 0:r.headers)||{},i={};for(let n of Object.keys(t))i[n.toLowerCase()]=t[n];i["accept-encoding"]=i["accept-encoding"]||"gzip,br,deflate";let a=new URL(e);return bi(va(va({hostname:a.hostname,path:a.pathname,method:"GET"},r),r==null?void 0:r.fetch),{headers:i,port:a.port})}function zS(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function LS(e,r,t={}){let i={};if(r&&r.headers){let a=r.headers;for(let n in a){let o=a[n];i[n.toLowerCase()]=String(o)}}if(!i["content-length"]){let a=NS(e);Number.isFinite(a)&&(i["content-length"]=a)}return Object.assign(i,t),new ti(i)}function NS(e){return ld(e)?e.length-"data:".length:null}var x2=Ja(b2()),w2=Ja(Fu());function y2(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function eC(e,r){let t=r.type?r.type.replace("image/",""):"jpeg",i=(0,w2.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,x2.default)(i,t,r)}function uh(e,r){let t=eC(e,r);return new Promise(i=>{let a=[];t.on("data",n=>a.push(n)),t.on("end",()=>{let n=Buffer.concat(a);i(y2(n))})})}var eE=Ja(Z8()),rE=["image/png","image/jpeg","image/gif"];async function p0(e,r){if(!r)throw new Error("MIMEType is required to parse image under Node.js");let t=e instanceof Buffer?e:Buffer.from(e);return await pN(t,r)}function pN(e,r){return new Promise(t=>(0,eE.default)(e,r,(i,a)=>{if(i)throw i;let n=[...a.shape],o=a.shape.length===4?a.shape.shift():1,s=a.data instanceof Buffer?new Uint8Array(a.data):a.data;t({shape:n,data:s,width:a.shape[0],height:a.shape[1],components:a.shape[2],layers:o?[o]:[]})}))}var iE=Ja(aE());delete global.ReadableStream;var Dc=class extends iE.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:t}=this;for(this.isWorking=!0;!this.isCancelled&&(r.desiredSize||0)>0;){let i;try{i=t.next()}catch(a){r.error(a);break}i&&(!i.done&&!this.isCancelled?r.enqueue(i.value):r.close())}this.isWorking=!1}pull(r){this.isWorking||this.work(r)}cancel(){this.isCancelled=!0}};var h0=class extends Dc{constructor(r){super(new d0(r.values()),{type:"bytes"});this._chunks=r}async*[Symbol.asyncIterator](r){let t=this.getReader();yield*this._chunks,t.releaseLock()}};var vo=class{constructor(r=[],t={}){this.parts=[],this.size=0;for(let i of r)if(typeof i=="string"){let a=new TextEncoder().encode(i);this.parts.push(a),this.size+=a.byteLength}else if(i instanceof vo)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:a,byteOffset:n,byteLength:o}=i;this.parts.push(new Uint8Array(a,n,o)),this.size+=o}else{let a=new TextEncoder().encode(String(i));this.parts.push(a),this.size+=a.byteLength}this.type=dN(t.type)}slice(r=0,t=this.size,i=""){let{size:a,parts:n}=this,o=r<0?Math.max(a+r,0):Math.min(r,a),s=t<0?Math.max(a+t,0):Math.min(t,a),c=Math.max(s-o,0),f=new vo([],{type:i});if(c===0)return f;let p=0,m=[];for(let h of n){let{byteLength:v}=h;if(o>0&&v<=o)o-=v,s-=v;else{let y=h.subarray(o,Math.min(v,s));if(m.push(y),p+=y.byteLength,o=0,p>=c)break}}return f.parts=m,f.size=p,f}async arrayBuffer(){return this._toArrayBuffer()}async text(){let r=new TextDecoder,t="";for(let i of this.parts)t+=r.decode(i);return t}stream(){return new h0(this.parts)}toString(){return"[object Blob]"}get[Symbol.toStringTag](){return"Blob"}_toArrayBuffer(){let r=new ArrayBuffer(this.size),t=new Uint8Array(r),i=0;for(let a of this.parts)t.set(a,i),i+=a.byteLength;return r}};function dN(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}var m0=class extends vo{constructor(r,t,i={}){super(r,i);this.name="";this.webkitRelativePath="";this.name=String(t).replace(/\//g,":"),this.lastModified=(i==null?void 0:i.lastModified)||Date.now()}get[Symbol.toStringTag](){return"File"}};var mN=!xi||!("TextEncoder"in Et);mN&&(Et.TextEncoder=ku);var vN=!xi||!("TextDecoder"in Et);vN&&(Et.TextDecoder=So);!xi&&!("atob"in Et)&&dl&&(Et.atob=dl);!xi&&!("btoa"in Et)&&td&&(Et.btoa=td);!xi&&!("Headers"in Et)&&ti&&(Et.Headers=ti);!xi&&!("Response"in Et)&&ki&&(Et.Response=ki);!xi&&!("fetch"in Et)&&ju&&(Et.fetch=ju);!xi&&!("DOMParser"in Et)&&v0.DOMParser&&(Et.DOMParser=v0.DOMParser);!xi&&!("_encodeImageNode"in Et)&&uh&&(Et._encodeImageNode=uh);!xi&&!("_parseImageNode"in Et)&&p0&&(Et._parseImageNode=p0,Et._imageFormatsNode=rE);"allSettled"in Promise||(Promise.allSettled=gb);var nE="3.4.11";var gN={draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}},oE={name:"Draco",id:_o?"draco":"draco-nodejs",module:"draco",shapes:["mesh"],version:nE,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:gN};function g0(e){let r=1/0,t=1/0,i=1/0,a=-1/0,n=-1/0,o=-1/0,s=e.POSITION?e.POSITION.value:[],c=s&&s.length;for(let f=0;f<c;f+=3){let p=s[f],m=s[f+1],h=s[f+2];r=p<r?p:r,t=m<t?m:t,i=h<i?h:i,a=p>a?p:a,n=m>n?m:n,o=h>o?h:o}return[[r,t,i],[a,n,o]]}function sE(e,r){if(!e)throw new Error(r||"loader assertion failed.")}var di=class{constructor(r,t){sE(Array.isArray(r)),bN(r),this.fields=r,this.metadata=t||new Map}compareTo(r){if(this.metadata!==r.metadata||this.fields.length!==r.fields.length)return!1;for(let t=0;t<this.fields.length;++t)if(!this.fields[t].compareTo(r.fields[t]))return!1;return!0}select(...r){let t=Object.create(null);for(let a of r)t[a]=!0;let i=this.fields.filter(a=>t[a.name]);return new di(i,this.metadata)}selectAt(...r){let t=r.map(i=>this.fields[i]).filter(Boolean);return new di(t,this.metadata)}assign(r){let t,i=this.metadata;if(r instanceof di){let o=r;t=o.fields,i=uE(uE(new Map,this.metadata),o.metadata)}else t=r;let a=Object.create(null);for(let o of this.fields)a[o.name]=o;for(let o of t)a[o.name]=o;let n=Object.values(a);return new di(n,i)}};function bN(e){let r={};for(let t of e)r[t.name]&&console.warn("Schema: duplicated field name",t.name,t),r[t.name]=!0}function uE(e,r){return new Map([...e||new Map,...r||new Map])}var Bn=class{constructor(r,t,i=!1,a=new Map){this.name=r,this.type=t,this.nullable=i,this.metadata=a}get typeId(){return this.type&&this.type.typeId}clone(){return new Bn(this.name,this.type,this.nullable,this.metadata)}compareTo(r){return this.name===r.name&&this.type===r.type&&this.nullable===r.nullable&&this.metadata===r.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?`, metadata: ${this.metadata}`:""}`}};var Ur;(function(Q){Q[Q.NONE=0]="NONE",Q[Q.Null=1]="Null",Q[Q.Int=2]="Int",Q[Q.Float=3]="Float",Q[Q.Binary=4]="Binary",Q[Q.Utf8=5]="Utf8",Q[Q.Bool=6]="Bool",Q[Q.Decimal=7]="Decimal",Q[Q.Date=8]="Date",Q[Q.Time=9]="Time",Q[Q.Timestamp=10]="Timestamp",Q[Q.Interval=11]="Interval",Q[Q.List=12]="List",Q[Q.Struct=13]="Struct",Q[Q.Union=14]="Union",Q[Q.FixedSizeBinary=15]="FixedSizeBinary",Q[Q.FixedSizeList=16]="FixedSizeList",Q[Q.Map=17]="Map",Q[Q.Dictionary=-1]="Dictionary",Q[Q.Int8=-2]="Int8",Q[Q.Int16=-3]="Int16",Q[Q.Int32=-4]="Int32",Q[Q.Int64=-5]="Int64",Q[Q.Uint8=-6]="Uint8",Q[Q.Uint16=-7]="Uint16",Q[Q.Uint32=-8]="Uint32",Q[Q.Uint64=-9]="Uint64",Q[Q.Float16=-10]="Float16",Q[Q.Float32=-11]="Float32",Q[Q.Float64=-12]="Float64",Q[Q.DateDay=-13]="DateDay",Q[Q.DateMillisecond=-14]="DateMillisecond",Q[Q.TimestampSecond=-15]="TimestampSecond",Q[Q.TimestampMillisecond=-16]="TimestampMillisecond",Q[Q.TimestampMicrosecond=-17]="TimestampMicrosecond",Q[Q.TimestampNanosecond=-18]="TimestampNanosecond",Q[Q.TimeSecond=-19]="TimeSecond",Q[Q.TimeMillisecond=-20]="TimeMillisecond",Q[Q.TimeMicrosecond=-21]="TimeMicrosecond",Q[Q.TimeNanosecond=-22]="TimeNanosecond",Q[Q.DenseUnion=-23]="DenseUnion",Q[Q.SparseUnion=-24]="SparseUnion",Q[Q.IntervalDayTime=-25]="IntervalDayTime",Q[Q.IntervalYearMonth=-26]="IntervalYearMonth"})(Ur||(Ur={}));var qa=class{static isNull(r){return r&&r.typeId===Ur.Null}static isInt(r){return r&&r.typeId===Ur.Int}static isFloat(r){return r&&r.typeId===Ur.Float}static isBinary(r){return r&&r.typeId===Ur.Binary}static isUtf8(r){return r&&r.typeId===Ur.Utf8}static isBool(r){return r&&r.typeId===Ur.Bool}static isDecimal(r){return r&&r.typeId===Ur.Decimal}static isDate(r){return r&&r.typeId===Ur.Date}static isTime(r){return r&&r.typeId===Ur.Time}static isTimestamp(r){return r&&r.typeId===Ur.Timestamp}static isInterval(r){return r&&r.typeId===Ur.Interval}static isList(r){return r&&r.typeId===Ur.List}static isStruct(r){return r&&r.typeId===Ur.Struct}static isUnion(r){return r&&r.typeId===Ur.Union}static isFixedSizeBinary(r){return r&&r.typeId===Ur.FixedSizeBinary}static isFixedSizeList(r){return r&&r.typeId===Ur.FixedSizeList}static isMap(r){return r&&r.typeId===Ur.Map}static isDictionary(r){return r&&r.typeId===Ur.Dictionary}get typeId(){return Ur.NONE}compareTo(r){return this===r}},b0=class extends qa{get typeId(){return Ur.Null}get[Symbol.toStringTag](){return"Null"}toString(){return"Null"}},y0=class extends qa{get typeId(){return Ur.Bool}get[Symbol.toStringTag](){return"Bool"}toString(){return"Bool"}},In=class extends qa{constructor(r,t){super();this.isSigned=r,this.bitWidth=t}get typeId(){return Ur.Int}get[Symbol.toStringTag](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}},Cc=class extends In{constructor(){super(!0,8)}},Pc=class extends In{constructor(){super(!0,16)}},Tc=class extends In{constructor(){super(!0,32)}};var Fc=class extends In{constructor(){super(!1,8)}},qc=class extends In{constructor(){super(!1,16)}},Bc=class extends In{constructor(){super(!1,32)}};var cE={HALF:16,SINGLE:32,DOUBLE:64},Ic=class extends qa{constructor(r){super();this.precision=r}get typeId(){return Ur.Float}get[Symbol.toStringTag](){return"Float"}toString(){return`Float${this.precision}`}};var Oc=class extends Ic{constructor(){super(cE.SINGLE)}},Rc=class extends Ic{constructor(){super(cE.DOUBLE)}},x0=class extends qa{constructor(){super()}get typeId(){return Ur.Binary}toString(){return"Binary"}get[Symbol.toStringTag](){return"Binary"}},w0=class extends qa{get typeId(){return Ur.Utf8}get[Symbol.toStringTag](){return"Utf8"}toString(){return"Utf8"}},yN={DAY:0,MILLISECOND:1},k0=class extends qa{constructor(r){super();this.unit=r}get typeId(){return Ur.Date}get[Symbol.toStringTag](){return"Date"}toString(){return`Date${(this.unit+1)*32}<${yN[this.unit]}>`}};var lE={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9},_0=class extends qa{constructor(r,t){super();this.unit=r,this.bitWidth=t}get typeId(){return Ur.Time}toString(){return`Time${this.bitWidth}<${lE[this.unit]}>`}get[Symbol.toStringTag](){return"Time"}};var j0=class extends qa{constructor(r,t=null){super();this.unit=r,this.timezone=t}get typeId(){return Ur.Timestamp}get[Symbol.toStringTag](){return"Timestamp"}toString(){return`Timestamp<${lE[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};var xN={DAY_TIME:0,YEAR_MONTH:1},E0=class extends qa{constructor(r){super();this.unit=r}get typeId(){return Ur.Interval}get[Symbol.toStringTag](){return"Interval"}toString(){return`Interval<${xN[this.unit]}>`}};var zc=class extends qa{constructor(r,t){super();this.listSize=r,this.children=[t]}get typeId(){return Ur.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[Symbol.toStringTag](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}},S0=class extends qa{constructor(r){super();this.children=r}get typeId(){return Ur.Struct}toString(){return`Struct<{${this.children.map(r=>`${r.name}:${r.type}`).join(", ")}}>`}get[Symbol.toStringTag](){return"Struct"}};function fE(e){switch(e.constructor){case Int8Array:return new Cc;case Uint8Array:return new Fc;case Int16Array:return new Pc;case Uint16Array:return new qc;case Int32Array:return new Tc;case Uint32Array:return new Bc;case Float32Array:return new Oc;case Float64Array:return new Rc;default:throw new Error("array type not supported")}}function A0(e,r,t){let i=fE(r.value),a=t||pE(r);return new Bn(e,new zc(r.size,new Bn("value",i)),!1,a)}function pE(e){let r=new Map;return"byteOffset"in e&&r.set("byteOffset",e.byteOffset.toString(10)),"byteStride"in e&&r.set("byteStride",e.byteStride.toString(10)),"normalized"in e&&r.set("normalized",e.normalized.toString()),r}function dE(e,r,t){let i=mE(r.metadata),a=[],n=BN(r.attributes);for(let o in e){let s=e[o],c=hE(o,s,n[o]);a.push(c)}if(t){let o=hE("indices",t);a.push(o)}return new di(a,i)}function BN(e){let r={};for(let t in e){let i=e[t];r[i.name||"undefined"]=i}return r}function hE(e,r,t){let i=t?mE(t.metadata):void 0;return A0(e,r,i)}function mE(e){let r=new Map;for(let t in e)r.set(`${t}.string`,JSON.stringify(e[t]));return r}var vE={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},IN={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},ON=4,fp=class{constructor(r){this.draco=r,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(r,t={}){let i=new this.draco.DecoderBuffer;i.Init(new Int8Array(r),r.byteLength),this._disableAttributeTransforms(t);let a=this.decoder.GetEncodedGeometryType(i),n=a===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let o;switch(a){case this.draco.TRIANGULAR_MESH:o=this.decoder.DecodeBufferToMesh(i,n);break;case this.draco.POINT_CLOUD:o=this.decoder.DecodeBufferToPointCloud(i,n);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!o.ok()||!n.ptr){let h=`DRACO decompression failed: ${o.error_msg()}`;throw new Error(h)}let s=this._getDracoLoaderData(n,a,t),c=this._getMeshData(n,s,t),f=g0(c.attributes),p=dE(c.attributes,s,c.indices);return bi(va({loader:"draco",loaderData:s,header:{vertexCount:n.num_points(),boundingBox:f}},c),{schema:p})}finally{this.draco.destroy(i),n&&this.draco.destroy(n)}}_getDracoLoaderData(r,t,i){let a=this._getTopLevelMetadata(r),n=this._getDracoAttributes(r,i);return{geometry_type:t,num_attributes:r.num_attributes(),num_points:r.num_points(),num_faces:r instanceof this.draco.Mesh?r.num_faces():0,metadata:a,attributes:n}}_getDracoAttributes(r,t){let i={};for(let a=0;a<r.num_attributes();a++){let n=this.decoder.GetAttribute(r,a),o=this._getAttributeMetadata(r,a);i[n.unique_id()]={unique_id:n.unique_id(),attribute_type:n.attribute_type(),data_type:n.data_type(),num_components:n.num_components(),byte_offset:n.byte_offset(),byte_stride:n.byte_stride(),normalized:n.normalized(),attribute_index:a,metadata:o};let s=this._getQuantizationTransform(n,t);s&&(i[n.unique_id()].quantization_transform=s);let c=this._getOctahedronTransform(n,t);c&&(i[n.unique_id()].octahedron_transform=c)}return i}_getMeshData(r,t,i){let a=this._getMeshAttributes(t,r,i);if(!a.POSITION)throw new Error("DRACO: No position attribute found.");if(r instanceof this.draco.Mesh)switch(i.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:a,indices:{value:this._getTriangleStripIndices(r),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:a,indices:{value:this._getTriangleListIndices(r),size:1}}}return{topology:"point-list",mode:0,attributes:a}}_getMeshAttributes(r,t,i){let a={};for(let n of Object.values(r.attributes)){let o=this._deduceAttributeName(n,i);n.name=o;let{value:s,size:c}=this._getAttributeValues(t,n);a[o]={value:s,size:c,byteOffset:n.byte_offset,byteStride:n.byte_stride,normalized:n.normalized}}return a}_getTriangleListIndices(r){let i=r.num_faces()*3,a=i*ON,n=this.draco._malloc(a);try{return this.decoder.GetTrianglesUInt32Array(r,a,n),new Uint32Array(this.draco.HEAPF32.buffer,n,i).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(r){let t=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(r,t),LN(t)}finally{this.draco.destroy(t)}}_getAttributeValues(r,t){let i=IN[t.data_type],a=t.num_components,o=r.num_points()*a,s=o*i.BYTES_PER_ELEMENT,c=RN(this.draco,i),f,p=this.draco._malloc(s);try{let m=this.decoder.GetAttribute(r,t.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(r,m,c,s,p),f=new i(this.draco.HEAPF32.buffer,p,o).slice()}finally{this.draco._free(p)}return{value:f,size:a}}_deduceAttributeName(r,t){let i=r.unique_id;for(let[o,s]of Object.entries(t.extraAttributes||{}))if(s===i)return o;let a=r.attribute_type;for(let o in vE)if(this.draco[o]===a)return vE[o];let n=t.attributeNameEntry||"name";return r.metadata[n]?r.metadata[n].string:`CUSTOM_ATTRIBUTE_${i}`}_getTopLevelMetadata(r){let t=this.decoder.GetMetadata(r);return this._getDracoMetadata(t)}_getAttributeMetadata(r,t){let i=this.decoder.GetAttributeMetadata(r,t);return this._getDracoMetadata(i)}_getDracoMetadata(r){if(!r||!r.ptr)return{};let t={},i=this.metadataQuerier.NumEntries(r);for(let a=0;a<i;a++){let n=this.metadataQuerier.GetEntryName(r,a);t[n]=this._getDracoMetadataField(r,n)}return t}_getDracoMetadataField(r,t){let i=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(r,t,i);let a=zN(i);return{int:this.metadataQuerier.GetIntEntry(r,t),string:this.metadataQuerier.GetStringEntry(r,t),double:this.metadataQuerier.GetDoubleEntry(r,t),intArray:a}}finally{this.draco.destroy(i)}}_disableAttributeTransforms(r){let{quantizedAttributes:t=[],octahedronAttributes:i=[]}=r,a=[...t,...i];for(let n of a)this.decoder.SkipAttributeTransform(this.draco[n])}_getQuantizationTransform(r,t){let{quantizedAttributes:i=[]}=t,a=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(a)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits(),range:o.range(),min_values:new Float32Array([1,2,3]).map(s=>o.min_value(s))}}finally{this.draco.destroy(o)}}return null}_getOctahedronTransform(r,t){let{octahedronAttributes:i=[]}=t,a=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(a)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits()}}finally{this.draco.destroy(o)}}return null}};function RN(e,r){switch(r){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32;default:return e.DT_INVALID}}function zN(e){let r=e.size(),t=new Int32Array(r);for(let i=0;i<r;i++)t[i]=e.GetValue(i);return t}function LN(e){let r=e.size(),t=new Int32Array(r);for(let i=0;i<r;i++)t[i]=e.GetValue(i);return t}var NN="1.5.5",MN="1.4.1",D0=`https://www.gstatic.com/draco/versioned/decoders/${NN}`,UN=`${D0}/draco_decoder.js`,HN=`${D0}/draco_wasm_wrapper.js`,VN=`${D0}/draco_decoder.wasm`,lY=`https://raw.githubusercontent.com/google/draco/${MN}/javascript/draco_encoder.js`,Lc;async function gE(e){let r=e.modules||{};return r.draco3d?Lc=Lc||r.draco3d.createDecoderModule({}).then(t=>({draco:t})):Lc=Lc||$N(e),await Lc}async function $N(e){let r,t;switch(e.draco&&e.draco.decoderType){case"js":r=await su(UN,"draco",e);break;case"wasm":default:[r,t]=await Promise.all([await su(HN,"draco",e),await su(VN,"draco",e)])}return r=r||globalThis.DracoDecoderModule,await WN(r,t)}function WN(e,r){let t={};return r&&(t.wasmBinary=r),new Promise(i=>{e(bi(va({},t),{onModuleLoaded:a=>i({draco:a})}))})}var bE=bi(va({},oE),{parse:GN});async function GN(e,r){let{draco:t}=await gE(r),i=new fp(t);try{return i.parseSync(e,r==null?void 0:r.draco)}finally{i.destroy()}}qp(bE);
96
+ `,m.message,m.stack);var h=new Error("tunneling socket could not be established, cause="+m.message);h.code="ECONNRESET",r.request.emit("error",h),i.removeSocket(a)}};ln.prototype.removeSocket=function(r){var t=this.sockets.indexOf(r);if(t!==-1){this.sockets.splice(t,1);var i=this.requests.shift();i&&this.createConnection(i)}};function j8(e,r){var t=this;ln.prototype.createSocket.call(t,e,function(i){var a=sL.connect(0,E8({},t.options,{servername:e.host,socket:i}));t.sockets[t.sockets.indexOf(i)]=a,r(a)})}function E8(e){for(var r=1,t=arguments.length;r<t;++r){var i=arguments[r];if(typeof i=="object")for(var a=Object.keys(i),n=0,o=a.length;n<o;++n){var s=a[n];i[s]!==void 0&&(e[s]=i[s])}}return e}var Vo;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Vo=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)}:Vo=function(){};Ks.debug=Vo});var P8=I(C8=>{"use strict";var vL=require("url"),gL=S8(),A8=["accept","accept-charset","accept-encoding","accept-language","accept-ranges","cache-control","content-encoding","content-language","content-location","content-md5","content-range","content-type","connection","date","expect","max-forwards","pragma","referer","te","user-agent","via"],D8=["proxy-authorization"];function bL(e){var r=e.port,t=e.protocol,i=e.hostname+":";return r?i+=r:t==="https:"?i+="443":i+="80",i}function yL(e,r){var t=r.reduce(function(i,a){return i[a.toLowerCase()]=!0,i},{});return Object.keys(e).filter(function(i){return t[i.toLowerCase()]}).reduce(function(i,a){return i[a]=e[a],i},{})}function xL(e,r){var t=e.proxy,i={proxy:{host:t.hostname,port:+t.port,proxyAuth:t.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 wL(e,r){var t=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[t,i].join("Over")}function kL(e){var r=e.uri,t=e.proxy,i=wL(r,t);return gL[i]}function kc(e){this.request=e,this.proxyHeaderWhiteList=A8,this.proxyHeaderExclusiveList=[],typeof e.tunnel!="undefined"&&(this.tunnelOverride=e.tunnel)}kc.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride!="undefined"?e.tunnelOverride:r.uri.protocol==="https:"};kc.prototype.setup=function(e){var r=this,t=r.request;if(e=e||{},typeof t.proxy=="string"&&(t.proxy=vL.parse(t.proxy)),!t.proxy||!t.tunnel)return!1;e.proxyHeaderWhiteList&&(r.proxyHeaderWhiteList=e.proxyHeaderWhiteList),e.proxyHeaderExclusiveList&&(r.proxyHeaderExclusiveList=e.proxyHeaderExclusiveList);var i=r.proxyHeaderExclusiveList.concat(D8),a=r.proxyHeaderWhiteList.concat(i),n=yL(t.headers,a);n.host=bL(t.uri),i.forEach(t.removeHeader,t);var o=kL(t),s=xL(t,n);return t.agent=o(s),!0};kc.defaultProxyHeaderWhiteList=A8;kc.defaultProxyHeaderExclusiveList=D8;C8.Tunnel=kc});var F8=I((T8,_c)=>{(function(){var e,r,t,i,a,n;typeof performance!="undefined"&&performance!==null&&performance.now?_c.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(_c.exports=function(){return(e()-a)/1e6},r=process.hrtime,e=function(){var o;return o=r(),o[0]*1e9+o[1]},i=e(),n=process.uptime()*1e9,a=i-n):Date.now?(_c.exports=function(){return Date.now()-t},t=Date.now()):(_c.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(T8)});var H8=I((NG,U8)=>{"use strict";var _L=require("http"),q8=require("https"),jc=require("url"),u0=require("util"),op=require("stream"),sp=require("zlib"),c0=bw(),jL=Dw(),EL=b_(),SL=Ff(),B8=qf(),I8=A_(),AL=r5(),DL=Pl(),O8=Ev(),CL=s5().strict,Ys=Il(),PL=Oh(),TL=l5(),FL=k5().Querystring,qL=Qj().Har,BL=n8().Auth,IL=v8().OAuth,OL=g8(),RL=y8().Multipart,zL=k8().Redirect,l0=P8().Tunnel,Qs=F8(),Ec=bs().Buffer,R8=Ys.safeStringify,LL=Ys.isReadStream,NL=Ys.toBase64,ML=Ys.defer,z8=Ys.copy,UL=Ys.version,L8=PL.jar(),N8={};function HL(e,r){var t={};for(var i in r){var a=e.indexOf(i)===-1;a&&(t[i]=r[i])}return t}function VL(e,r){var t={};for(var i in r){var a=e.indexOf(i)!==-1,n=typeof r[i]=="function";a&&n||(t[i]=r[i])}return t}function M8(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function $L(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:M8.call(e.request)}}function Ir(e){var r=this;e.har&&(r._har=new qL(r),e=r._har.options(e)),op.Stream.call(r);var t=Object.keys(Ir.prototype),i=HL(t,e);DL(r,i),e=VL(t,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new FL(r),r._auth=new BL(r),r._oauth=new IL(r),r._multipart=new RL(r),r._redirect=new zL(r),r._tunnel=new l0(r),r.init(e)}u0.inherits(Ir,op.Stream);Ir.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function na(){Ir.debug&&console.error("REQUEST %s",u0.format.apply(u0,arguments))}Ir.prototype.debug=na;Ir.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?z8(r.headers):{};for(var t in r.headers)typeof r.headers[t]=="undefined"&&delete r.headers[t];if(B8.httpify(r,r.headers),r.method||(r.method=e.method||"GET"),r.localAddress||(r.localAddress=e.localAddress),r._qs.init(e),na(e),!r.pool&&r.pool!==!1&&(r.pool=N8),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,a=r.uri.indexOf("/")===0;i&&a?r.uri=r.baseUrl+r.uri.slice(1):i||a?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=jc.parse(r.uri)),r.uri.href||(r.uri.href=jc.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=jc.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=TL(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,f=r.form(),p=function(O,L){L&&L.hasOwnProperty("value")&&L.hasOwnProperty("options")?f.append(O,L.value,L.options):f.append(O,L)};for(var m in c)if(c.hasOwnProperty(m)){var h=c[m];if(h instanceof Array)for(var v=0;v<h.length;v++)p(m,h[v]);else p(m,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(O){return r._qs.unescape(O)});r.auth(y[0],y.slice(1).join(":"),!0)}if(!r.tunnel&&r.proxy&&r.proxy.auth&&!r.hasHeader("proxy-authorization")){var S=r.proxy.auth.split(":").map(function(O){return r._qs.unescape(O)}),w="Basic "+NL(S.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(CL(r.body)&&(r.body=Ec.from(r.body)),!r.hasHeader("content-length")){var O;typeof r.body=="string"?O=Ec.byteLength(r.body):Array.isArray(r.body)?O=r.body.reduce(function(L,V){return L+V.length},0):O=r.body.length,O?r.setHeader("content-length",O):r.emit("error",new Error("Argument error, options.body."))}}r.body&&!O8(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,C={"http:":_L,"https:":q8},B=r.httpModules||{};if(r.httpModule=B[P]||C[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=UL();F.major===0&&F.minor<=10?r.agentClass=P==="http:"?I8:I8.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(O){if(r.ntick&&r._started&&r.emit("error",new Error("You cannot pipe to this stream after the outbound request has started.")),r.src=O,LL(O))r.hasHeader("content-type")||r.setHeader("content-type",SL.lookup(O.path));else{if(O.headers)for(var L in O.headers)r.hasHeader(L)||r.setHeader(L,O.headers[L]);r._json&&!r.hasHeader("content-type")&&r.setHeader("content-type","application/json"),O.method&&!r.explicitMethod&&(r.method=O.method)}}),ML(function(){if(!r._aborted){var O=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)O8(r.body)?r.body.pipe(r):(A(),Array.isArray(r.body)?r.body.forEach(function(L){r.write(L)}):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(L,V){!L&&!isNaN(V)&&r.setHeader("content-length",V),O()})):O(),r.ntick=!0}})};Ir.prototype.getNewAgent=function(){var e=this,r=e.agentClass,t={};if(e.agentOptions)for(var i in e.agentOptions)t[i]=e.agentOptions[i];e.ca&&(t.ca=e.ca),e.ciphers&&(t.ciphers=e.ciphers),e.secureProtocol&&(t.secureProtocol=e.secureProtocol),e.secureOptions&&(t.secureOptions=e.secureOptions),typeof e.rejectUnauthorized!="undefined"&&(t.rejectUnauthorized=e.rejectUnauthorized),e.cert&&e.key&&(t.key=e.key,t.cert=e.cert),e.pfx&&(t.pfx=e.pfx),e.passphrase&&(t.passphrase=e.passphrase);var a="";r!==e.httpModule.Agent&&(a+=r.name);var n=e.proxy;typeof n=="string"&&(n=jc.parse(n));var o=n&&n.protocol==="https:"||this.uri.protocol==="https:";return o&&(t.ca&&(a&&(a+=":"),a+=t.ca),typeof t.rejectUnauthorized!="undefined"&&(a&&(a+=":"),a+=t.rejectUnauthorized),t.cert&&(a&&(a+=":"),a+=t.cert.toString("ascii")+t.key.toString("ascii")),t.pfx&&(a&&(a+=":"),a+=t.pfx.toString("ascii")),t.ciphers&&(a&&(a+=":"),a+=t.ciphers),t.secureProtocol&&(a&&(a+=":"),a+=t.secureProtocol),t.secureOptions&&(a&&(a+=":"),a+=t.secureOptions)),e.pool===N8&&!a&&Object.keys(t).length===0&&e.httpModule.globalAgent?e.httpModule.globalAgent:(a=e.uri.protocol+a,e.pool[a]||(e.pool[a]=new r(t),e.pool.maxSockets&&(e.pool[a].maxSockets=e.pool.maxSockets)),e.pool[a])};Ir.prototype.start=function(){var e=this;if(e.timing)var r=new Date().getTime(),t=Qs();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=z8(e);delete i.auth,na("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=t,e.timings={});var a;e.timeout&&!e.timeoutTimer&&(e.timeout<0?a=0:typeof e.timeout=="number"&&isFinite(e.timeout)&&(a=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=Qs()-e.startTimeNow,o)){var s=function(){e.timings.lookup=Qs()-e.startTimeNow},c=function(){e.timings.connect=Qs()-e.startTimeNow};n.once("lookup",s),n.once("connect",c),e.req.once("error",function(){n.removeListener("lookup",s),n.removeListener("connect",c)})}var f=function(){e.req.setTimeout(a,function(){if(e.req){e.abort();var m=new Error("ESOCKETTIMEDOUT");m.code="ESOCKETTIMEDOUT",m.connect=!1,e.emit("error",m)}})};if(a!==void 0)if(o){var p=function(){n.removeListener("connect",p),e.clearTimeout(),f()};n.on("connect",p),e.req.on("error",function(m){n.removeListener("connect",p)}),e.timeoutTimer=setTimeout(function(){n.removeListener("connect",p),e.abort();var m=new Error("ETIMEDOUT");m.code="ETIMEDOUT",m.connect=!0,e.emit("error",m)},a)}else f();e.emit("socket",n)}),e.emit("request",e.req)}};Ir.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)}};Ir.prototype.onRequestResponse=function(e){var r=this;if(r.timing&&(r.timings.response=Qs()-r.startTimeNow),na("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=Qs()-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),na("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}),na("response end",r.uri.href,e.statusCode,e.headers)}),r._aborted){na("aborted",r.uri.href),e.resume();return}if(r.response=e,e.request=r,e.toJSON=$L,r.httpModule===q8&&r.strictSSL&&(!e.hasOwnProperty("socket")||!e.socket.authorized)){na("strict ssl error",r.uri.href);var t=e.hasOwnProperty("socket")?e.socket.authorizationError:r.uri.href+" does not support SSL";r.emit("error",new Error("SSL Error: "+t));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:L8,a=function(p){try{i.setCookie(p,r.uri.href,{ignoreError:!0})}catch(m){r.emit("error",m)}};if(e.caseless=B8(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(a):a(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(p){return r.method==="HEAD"||p>=100&&p<200||p===204||p===304},s;if(r.gzip&&!o(e.statusCode)){var c=e.headers["content-encoding"]||"identity";c=c.trim().toLowerCase();var f={flush:sp.Z_SYNC_FLUSH,finishFlush:sp.Z_SYNC_FLUSH};c==="gzip"?(s=sp.createGunzip(f),e.pipe(s)):c==="deflate"?(s=sp.createInflate(f),e.pipe(s)):(c!=="identity"&&na("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(p){r.pipeDest(p)}),s.on("data",function(p){r.timing&&!r.responseStarted&&(r.responseStartTime=new Date().getTime(),e.responseStartTime=r.responseStartTime),r._destdata=!0,r.emit("data",p)}),s.once("end",function(p){r.emit("end",p)}),s.on("error",function(p){r.emit("error",p)}),s.on("close",function(){r.emit("close")}),r.callback?r.readResponseBody(e):r.on("end",function(){if(r._aborted){na("aborted",r.uri.href);return}r.emit("complete",e)})}na("finish init function",r.uri.href)}};Ir.prototype.readResponseBody=function(e){var r=this;na("reading response's body");var t=[],i=0,a=[];r.on("data",function(n){Ec.isBuffer(n)?n.length&&(i+=n.length,t.push(n)):a.push(n)}),r.on("end",function(){if(na("end event",r.uri.href),r._aborted){na("aborted",r.uri.href),t=[],i=0;return}if(i?(na("has body",r.uri.href,i),e.body=Ec.concat(t,i),r.encoding!==null&&(e.body=e.body.toString(r.encoding)),t=[],i=0):a.length&&(r.encoding==="utf8"&&a[0].length>0&&a[0][0]==="\uFEFF"&&(a[0]=a[0].substring(1)),e.body=a.join("")),r._json)try{e.body=JSON.parse(e.body,r._jsonReviver)}catch{na("invalid JSON received",r.uri.href)}na("emitting complete",r.uri.href),typeof e.body=="undefined"&&!r._json&&(e.body=r.encoding===null?Ec.alloc(0):""),r.emit("complete",e,e.body)})};Ir.prototype.abort=function(){var e=this;e._aborted=!0,e.req?e.req.abort():e.response&&e.response.destroy(),e.clearTimeout(),e.emit("abort")};Ir.prototype.pipeDest=function(e){var r=this,t=r.response;if(e.headers&&!e.headersSent){if(t.caseless.has("content-type")){var i=t.caseless.has("content-type");e.setHeader?e.setHeader(i,t.headers[i]):e.headers[i]=t.headers[i]}if(t.caseless.has("content-length")){var a=t.caseless.has("content-length");e.setHeader?e.setHeader(a,t.headers[a]):e.headers[a]=t.headers[a]}}if(e.setHeader&&!e.headersSent){for(var n in t.headers)(!r.gzip||n!=="content-encoding")&&e.setHeader(n,t.headers[n]);e.statusCode=t.statusCode}r.pipefilter&&r.pipefilter(t,e)};Ir.prototype.qs=function(e,r){var t=this,i;!r&&t.uri.query?i=t._qs.parse(t.uri.query):i={};for(var a in e)i[a]=e[a];var n=t._qs.stringify(i);return n===""||(t.uri=jc.parse(t.uri.href.split("?")[0]+"?"+n),t.url=t.uri,t.path=t.uri.path,t.uri.host==="unix"&&t.enableUnixSocket()),t};Ir.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 AL,r._form.on("error",function(t){t.message="form-data: "+t.message,r.emit("error",t),r.abort()}),r._form)};Ir.prototype.multipart=function(e){var r=this;return r._multipart.onRequest(e),r._multipart.chunked||(r.body=r._multipart.body),r};Ir.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=R8(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=R8(e,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")),typeof r.jsonReviver=="function"&&(r._jsonReviver=r.jsonReviver),r};Ir.prototype.getHeader=function(e,r){var t=this,i,a,n;return r||(r=t.headers),Object.keys(r).forEach(function(o){o.length===e.length&&(a=new RegExp(e,"i"),n=o.match(a),n&&(i=r[o]))}),i};Ir.prototype.enableUnixSocket=function(){var e=this.uri.path.split(":"),r=e[0],t=e[1];this.socketPath=r,this.uri.pathname=t,this.uri.path=t,this.uri.host=r,this.uri.hostname=r,this.uri.isUnix=!0};Ir.prototype.auth=function(e,r,t,i){var a=this;return a._auth.onRequest(e,r,t,i),a};Ir.prototype.aws=function(e,r){var t=this;if(!r)return t._aws=e,t;if(e.sign_version===4||e.sign_version==="4"){var i={host:t.uri.host,path:t.uri.path,method:t.method,headers:t.headers,body:t.body};e.service&&(i.service=e.service);var a=jL.sign(i,{accessKeyId:e.key,secretAccessKey:e.secret,sessionToken:e.session});t.setHeader("authorization",a.headers.Authorization),t.setHeader("x-amz-date",a.headers["X-Amz-Date"]),a.headers["X-Amz-Security-Token"]&&t.setHeader("x-amz-security-token",a.headers["X-Amz-Security-Token"])}else{var n=new Date;t.setHeader("date",n.toUTCString());var o={key:e.key,secret:e.secret,verb:t.method.toUpperCase(),date:n,contentType:t.getHeader("content-type")||"",md5:t.getHeader("content-md5")||"",amazonHeaders:c0.canonicalizeHeaders(t.headers)},s=t.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=c0.canonicalizeResource(o.resource),t.setHeader("authorization",c0.authorization(o))}return t};Ir.prototype.httpSignature=function(e){var r=this;return EL.signRequest({getHeader:function(t){return r.getHeader(t,r.headers)},setHeader:function(t,i){r.setHeader(t,i)},method:r.method,path:r.path},e),na("httpSignature authorization",r.getHeader("authorization")),r};Ir.prototype.hawk=function(e){var r=this;r.setHeader("Authorization",OL.header(r.uri,r.method,e))};Ir.prototype.oauth=function(e){var r=this;return r._oauth.onRequest(e),r};Ir.prototype.jar=function(e){var r=this,t;if(r._redirect.redirectsFollowed===0&&(r.originalCookieHeader=r.getHeader("cookie")),!e)t=!1,r._disableCookies=!0;else{var i=e.getCookieString?e:L8,a=r.uri.href;i&&(t=i.getCookieString(a))}return t&&t.length&&(r.originalCookieHeader?r.setHeader("cookie",r.originalCookieHeader+"; "+t):r.setHeader("cookie",t)),r._jar=e,r};Ir.prototype.pipe=function(e,r){var t=this;if(t.response)if(t._destdata)t.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else if(t._ended)t.emit("error",new Error("You cannot pipe after the response has been ended."));else return op.Stream.prototype.pipe.call(t,e,r),t.pipeDest(e),e;else return t.dests.push(e),op.Stream.prototype.pipe.call(t,e,r),e};Ir.prototype.write=function(){var e=this;if(!e._aborted&&(e._started||e.start(),e.req))return e.req.write.apply(e.req,arguments)};Ir.prototype.end=function(e){var r=this;r._aborted||(e&&r.write(e),r._started||r.start(),r.req&&r.req.end())};Ir.prototype.pause=function(){var e=this;e.responseContent?e.responseContent.pause.apply(e.responseContent,arguments):e._paused=!0};Ir.prototype.resume=function(){var e=this;e.responseContent?e.responseContent.resume.apply(e.responseContent,arguments):e._paused=!1};Ir.prototype.destroy=function(){var e=this;this.clearTimeout(),e._ended?e.response&&e.response.destroy():e.end()};Ir.prototype.clearTimeout=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)};Ir.defaultProxyHeaderWhiteList=l0.defaultProxyHeaderWhiteList.slice();Ir.defaultProxyHeaderExclusiveList=l0.defaultProxyHeaderExclusiveList.slice();Ir.prototype.toJSON=M8;U8.exports=Ir});var W8=I((MG,$8)=>{"use strict";var Sc=Pl(),V8=Oh(),WL=Il(),GL=WL.paramsHaveRequestBody;function up(e,r,t){typeof r=="function"&&(t=r);var i={};return r!==null&&typeof r=="object"?Sc(i,r,{uri:e}):typeof e=="string"?Sc(i,{uri:e}):Sc(i,e),i.callback=t||i.callback,i}function qt(e,r,t){if(typeof e=="undefined")throw new Error("undefined is not a valid uri or options object.");var i=up(e,r,t);if(i.method==="HEAD"&&GL(i))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new qt.Request(i)}function mo(e){var r=e.toUpperCase();return function(t,i,a){var n=up(t,i,a);return n.method=r,qt(n,n.callback)}}qt.get=mo("get");qt.head=mo("head");qt.options=mo("options");qt.post=mo("post");qt.put=mo("put");qt.patch=mo("patch");qt.del=mo("delete");qt.delete=mo("delete");qt.jar=function(e){return V8.jar(e)};qt.cookie=function(e){return V8.parse(e)};function f0(e,r,t,i){return function(a,n,o){var s=up(a,n,o),c={};return Sc(!0,c,r,s),c.pool=s.pool||r.pool,i&&(c.method=i.toUpperCase()),typeof t=="function"&&(e=t),e(c,c.callback)}}qt.defaults=function(e,r){var t=this;e=e||{},typeof e=="function"&&(r=e,e={});var i=f0(t,e,r),a=["get","head","post","put","patch","del","delete"];return a.forEach(function(n){i[n]=f0(t[n],e,r,n)}),i.cookie=f0(t.cookie,e,r),i.jar=t.jar,i.defaults=t.defaults,i};qt.forever=function(e,r){var t={};return r&&Sc(t,r),e&&(t.agentOptions=e),t.forever=!0,qt.defaults(t)};$8.exports=qt;qt.Request=H8();qt.initParams=up;Object.defineProperty(qt,"debug",{enumerable:!0,get:function(){return qt.Request.debug},set:function(e){qt.Request.debug=e}})});var K8=I((UG,G8)=>{G8.exports=KL;function KL(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 t=e.substring(5,r).split(";"),i=!1,a="US-ASCII",n=0;n<t.length;n++)t[n]=="base64"?i=!0:t[n].indexOf("charset=")==0&&(a=t[n].substring(8));var o=unescape(e.substring(r+1)),s=i?"base64":"ascii",c=new Buffer(o,s);return c.type=t[0]||"text/plain",c.charset=a,c}});var X8=I((HG,Q8)=>{var YL=K8();function QL(e){return{mimeType:JL(XL(e)),data:YL(e)}}function XL(e){return e.substring(5,e.indexOf(";"))}var Y8=/^(\w+\/)+/;function JL(e){e=e.toLowerCase();var r=e.match(Y8);return!r||!(r=r[1])?e:e.replace(Y8,r)}Q8.exports=QL});var Z8=I(($G,J8)=>{"use strict";var Ac=Fu(),VG=require("path"),ZL=vx().PNG,eN=Ud(),rN=wx(),tN=_x().GifReader,aN=Dx(),iN=require("fs"),nN=W8(),oN=Ff(),sN=X8();function uN(e,r){var t=new ZL;t.parse(e,function(i,a){if(i){r(i);return}r(null,Ac(new Uint8Array(a.data),[a.width|0,a.height|0,4],[4,4*a.width|0,1],0))})}function cN(e,r){var t;try{t=eN.decode(e)}catch(n){r(n);return}if(!t){r(new Error("Error decoding jpeg"));return}var i=[t.height,t.width,4],a=Ac(t.data,i);r(null,a.transpose(1,0))}function lN(e,r){var t;try{t=new tN(e)}catch(s){r(s);return}if(t.numFrames()>0){var i=[t.numFrames(),t.height,t.width,4];try{var a=new Uint8Array(i[0]*i[1]*i[2]*i[3])}catch(s){r(s);return}var n=Ac(a,i);try{for(var o=0;o<t.numFrames();++o)t.decodeAndBlitFrameRGBA(o,a.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=[t.height,t.width,4],a=new Uint8Array(i[0]*i[1]*i[2]),n=Ac(a,i);try{t.decodeAndBlitFrameRGBA(0,a)}catch(p){r(p);return}r(null,n.transpose(1,0))}}function fN(e,r){var t=new aN(e);try{t.init()}catch(s){r(s);return}var i=t.getData(),a=[i.getHeight(),i.getWidth(),4],n=new Uint8Array(a[0]*a[1]*a[2]),o=Ac(n,a);rN(i,o),r(null,o.transpose(1,0))}function cp(e,r,t){switch(e){case"image/png":uN(r,t);break;case"image/jpg":case"image/jpeg":cN(r,t);break;case"image/gif":lN(r,t);break;case"image/bmp":fN(r,t);break;default:t(new Error("Unsupported file type: "+e))}}J8.exports=function(r,t,i){if(i||(i=t,t=""),Buffer.isBuffer(r)){if(!t){i(new Error("Invalid file type"));return}cp(t,r,i)}else if(r.indexOf("data:")===0)try{var a=sN(r);a?process.nextTick(function(){cp(t||a.mimeType,a.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?nN({url:r,encoding:null},function(n,o,s){if(n){i(n);return}if(t=t,t||(o.getHeader!==void 0?t=o.getHeader("content-type"):o.headers!==void 0&&(t=o.headers["content-type"])),!t){i(new Error("Invalid content-type"));return}cp(t,s,i)}):iN.readFile(r,function(n,o){if(n){i(n);return}if(t=t||oN.lookup(r),!t){i(new Error("Invalid file type"));return}cp(t,o,i)})}});var aE=I((lp,tE)=>{(function(e,r){typeof lp=="object"&&typeof tE!="undefined"?r(lp):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(lp,function(e){"use strict";var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:function(u){return"Symbol("+u+")"};function t(){}function i(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global}var a=i();function n(u){return typeof u=="object"&&u!==null||typeof u=="function"}var o=t,s=Promise,c=Promise.prototype.then,f=Promise.resolve.bind(s),p=Promise.reject.bind(s);function m(u){return new s(u)}function h(u){return f(u)}function v(u){return p(u)}function y(u,d,j){return c.call(u,d,j)}function S(u,d,j){y(y(u,d,j),void 0,o)}function w(u,d){S(u,d)}function A(u,d){S(u,void 0,d)}function P(u,d,j){return y(u,d,j)}function C(u){y(u,void 0,o)}var B=function(){var u=a&&a.queueMicrotask;if(typeof u=="function")return u;var d=h(void 0);return function(j){return y(d,j)}}();function F(u,d,j){if(typeof u!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(u,d,j)}function O(u,d,j){try{return h(F(u,d,j))}catch(R){return v(R)}}var L=16384,V=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(d){var j=this._back,R=j;j._elements.length===L-1&&(R={_elements:[],_next:void 0}),j._elements.push(d),R!==j&&(this._back=R,j._next=R),++this._size},u.prototype.shift=function(){var d=this._front,j=d,R=this._cursor,G=R+1,ue=d._elements,ye=ue[R];return G===L&&(j=d._next,G=0),--this._size,this._cursor=G,d!==j&&(this._front=j),ue[R]=void 0,ye},u.prototype.forEach=function(d){for(var j=this._cursor,R=this._front,G=R._elements;(j!==G.length||R._next!==void 0)&&!(j===G.length&&(R=R._next,G=R._elements,j=0,G.length===0));)d(G[j]),++j},u.prototype.peek=function(){var d=this._front,j=this._cursor;return d._elements[j]},u}();function $(u,d){u._ownerReadableStream=d,d._reader=u,d._state==="readable"?H(u):d._state==="closed"?te(u):J(u,d._storedError)}function K(u,d){var j=u._ownerReadableStream;return vi(j,d)}function W(u){u._ownerReadableStream._state==="readable"?le(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):pe(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 H(u){u._closedPromise=m(function(d,j){u._closedPromise_resolve=d,u._closedPromise_reject=j})}function J(u,d){H(u),le(u,d)}function te(u){H(u),de(u)}function le(u,d){u._closedPromise_reject!==void 0&&(C(u._closedPromise),u._closedPromise_reject(d),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}function pe(u,d){J(u,d)}function de(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}var Ee=r("[[AbortSteps]]"),xe=r("[[ErrorSteps]]"),Ne=r("[[CancelSteps]]"),He=r("[[PullSteps]]"),Re=Number.isFinite||function(u){return typeof u=="number"&&isFinite(u)},U=Math.trunc||function(u){return u<0?Math.ceil(u):Math.floor(u)};function ke(u){return typeof u=="object"||typeof u=="function"}function Qe(u,d){if(u!==void 0&&!ke(u))throw new TypeError(d+" is not an object.")}function We(u,d){if(typeof u!="function")throw new TypeError(d+" is not a function.")}function Q(u){return typeof u=="object"&&u!==null||typeof u=="function"}function rr(u,d){if(!Q(u))throw new TypeError(d+" is not an object.")}function qe(u,d,j){if(u===void 0)throw new TypeError("Parameter "+d+" is required in '"+j+"'.")}function he(u,d,j){if(u===void 0)throw new TypeError(d+" is required in '"+j+"'.")}function _e(u){return Number(u)}function ir(u){return u===0?0:u}function Ce(u){return ir(U(u))}function ur(u,d){var j=0,R=Number.MAX_SAFE_INTEGER,G=Number(u);if(G=ir(G),!Re(G))throw new TypeError(d+" is not a finite number");if(G=Ce(G),G<j||G>R)throw new TypeError(d+" is outside the accepted range of "+j+" to "+R+", inclusive");return!Re(G)||G===0?0:G}function Or(u,d){if(!Rn(u))throw new TypeError(d+" is not a ReadableStream.")}function Gr(u){return new Ye(u)}function ee(u,d){u._reader._readRequests.push(d)}function Be(u,d,j){var R=u._reader,G=R._readRequests.shift();j?G._closeSteps():G._chunkSteps(d)}function Ge(u){return u._reader._readRequests.length}function Ve(u){var d=u._reader;return!(d===void 0||!Ze(d))}var Ye=function(){function u(d){if(qe(d,1,"ReadableStreamDefaultReader"),Or(d,"First parameter"),zn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");$(this,d),this._readRequests=new V}return Object.defineProperty(u.prototype,"closed",{get:function(){return Ze(this)?this._closedPromise:v(mr("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),Ze(this)?this._ownerReadableStream===void 0?v(Z("cancel")):K(this,d):v(mr("cancel"))},u.prototype.read=function(){if(!Ze(this))return v(mr("read"));if(this._ownerReadableStream===void 0)return v(Z("read from"));var d,j,R=m(function(ue,ye){d=ue,j=ye}),G={_chunkSteps:function(ue){return d({value:ue,done:!1})},_closeSteps:function(){return d({value:void 0,done:!0})},_errorSteps:function(ue){return j(ue)}};return nr(this,G),R},u.prototype.releaseLock=function(){if(!Ze(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");W(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 Ze(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readRequests")?!1:u instanceof Ye}function nr(u,d){var j=u._ownerReadableStream;j._disturbed=!0,j._state==="closed"?d._closeSteps():j._state==="errored"?d._errorSteps(j._storedError):j._readableStreamController[He](d)}function mr(u){return new TypeError("ReadableStreamDefaultReader.prototype."+u+" can only be used on a ReadableStreamDefaultReader")}var Br,vr;typeof r.asyncIterator=="symbol"&&(vr=(Br={},Br[r.asyncIterator]=function(){return this},Br),Object.defineProperty(vr,r.asyncIterator,{enumerable:!1}));var be=function(){function u(d,j){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=d,this._preventCancel=j}return u.prototype.next=function(){var d=this,j=function(){return d._nextSteps()};return this._ongoingPromise=this._ongoingPromise?P(this._ongoingPromise,j,j):j(),this._ongoingPromise},u.prototype.return=function(d){var j=this,R=function(){return j._returnSteps(d)};return this._ongoingPromise?P(this._ongoingPromise,R,R):R()},u.prototype._nextSteps=function(){var d=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var j=this._reader;if(j._ownerReadableStream===void 0)return v(Z("iterate"));var R,G,ue=m(function(Je,Sr){R=Je,G=Sr}),ye={_chunkSteps:function(Je){d._ongoingPromise=void 0,B(function(){return R({value:Je,done:!1})})},_closeSteps:function(){d._ongoingPromise=void 0,d._isFinished=!0,W(j),R({value:void 0,done:!0})},_errorSteps:function(Je){d._ongoingPromise=void 0,d._isFinished=!0,W(j),G(Je)}};return nr(j,ye),ue},u.prototype._returnSteps=function(d){if(this._isFinished)return Promise.resolve({value:d,done:!0});this._isFinished=!0;var j=this._reader;if(j._ownerReadableStream===void 0)return v(Z("finish iterating"));if(!this._preventCancel){var R=K(j,d);return W(j),P(R,function(){return{value:d,done:!0}})}return W(j),h({value:d,done:!0})},u}(),Ke={next:function(){return Dr(this)?this._asyncIteratorImpl.next():v(lr("next"))},return:function(u){return Dr(this)?this._asyncIteratorImpl.return(u):v(lr("return"))}};vr!==void 0&&Object.setPrototypeOf(Ke,vr);function pr(u,d){var j=Gr(u),R=new be(j,d),G=Object.create(Ke);return G._asyncIteratorImpl=R,G}function Dr(u){if(!n(u)||!Object.prototype.hasOwnProperty.call(u,"_asyncIteratorImpl"))return!1;try{return u._asyncIteratorImpl instanceof be}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,d,j,R,G){new Uint8Array(u).set(new Uint8Array(j,R,G),d)}function cr(u){return u}function $r(u){return!1}function Pr(u,d,j){if(u.slice)return u.slice(d,j);var R=j-d,G=new ArrayBuffer(R);return or(G,0,u,d,R),G}function jt(u){return!(typeof u!="number"||gr(u)||u<0)}function Bt(u){var d=Pr(u.buffer,u.byteOffset,u.byteOffset+u.byteLength);return new Uint8Array(d)}function oa(u){var d=u._queue.shift();return u._queueTotalSize-=d.size,u._queueTotalSize<0&&(u._queueTotalSize=0),d.value}function ha(u,d,j){if(!jt(j)||j===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");u._queue.push({value:d,size:j}),u._queueTotalSize+=j}function rt(u){var d=u._queue.peek();return d.value}function ut(u){u._queue=new V,u._queueTotalSize=0}var ht=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"view",{get:function(){if(!sa(this))throw Le("view");return this._view},enumerable:!1,configurable:!0}),u.prototype.respond=function(d){if(!sa(this))throw Le("respond");if(qe(d,1,"respond"),d=ur(d,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");$r(this._view.buffer),Xe(this._associatedReadableByteStreamController,d)},u.prototype.respondWithNewView=function(d){if(!sa(this))throw Le("respondWithNewView");if(qe(d,1,"respondWithNewView"),!ArrayBuffer.isView(d))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(d.buffer),Pe(this._associatedReadableByteStreamController,d)},u}();Object.defineProperties(ht.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ht.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var It=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"byobRequest",{get:function(){if(!mt(this))throw ge("byobRequest");return Fe(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!mt(this))throw ge("desiredSize");return tr(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!mt(this))throw ge("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var d=this._controlledReadableByteStream._state;if(d!=="readable")throw new TypeError("The stream (in "+d+" state) is not in the readable state and cannot be closed");Ie(this)},u.prototype.enqueue=function(d){if(!mt(this))throw ge("enqueue");if(qe(d,1,"enqueue"),!ArrayBuffer.isView(d))throw new TypeError("chunk must be an array buffer view");if(d.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(d.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 j=this._controlledReadableByteStream._state;if(j!=="readable")throw new TypeError("The stream (in "+j+" state) is not in the readable state and cannot be enqueued to");Se(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!mt(this))throw ge("error");Te(this,d)},u.prototype[Ne]=function(d){tt(this),ut(this);var j=this._cancelAlgorithm(d);return Ue(this),j},u.prototype[He]=function(d){var j=this._controlledReadableByteStream;if(this._queueTotalSize>0){var R=this._queue.shift();this._queueTotalSize-=R.byteLength,k(this);var G=new Uint8Array(R.buffer,R.byteOffset,R.byteLength);d._chunkSteps(G);return}var ue=this._autoAllocateChunkSize;if(ue!==void 0){var ye=void 0;try{ye=new ArrayBuffer(ue)}catch(Sr){d._errorSteps(Sr);return}var Je={buffer:ye,bufferByteLength:ue,byteOffset:0,byteLength:ue,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Je)}ee(j,d),Mt(this)},u}();Object.defineProperties(It.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(It.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function mt(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableByteStream")?!1:u instanceof It}function sa(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_associatedReadableByteStreamController")?!1:u instanceof ht}function Mt(u){var d=we(u);if(!!d){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var j=u._pullAlgorithm();S(j,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,Mt(u))},function(R){Te(u,R)})}}function tt(u){T(u),u._pendingPullIntos=new V}function $a(u,d){var j=!1;u._state==="closed"&&(j=!0);var R=x(d);d.readerType==="default"?Be(u,R,j):fe(u,R,j)}function x(u){var d=u.bytesFilled,j=u.elementSize;return new u.viewConstructor(u.buffer,u.byteOffset,d/j)}function b(u,d,j,R){u._queue.push({buffer:d,byteOffset:j,byteLength:R}),u._queueTotalSize+=R}function g(u,d){var j=d.elementSize,R=d.bytesFilled-d.bytesFilled%j,G=Math.min(u._queueTotalSize,d.byteLength-d.bytesFilled),ue=d.bytesFilled+G,ye=ue-ue%j,Je=G,Sr=!1;ye>R&&(Je=ye-d.bytesFilled,Sr=!0);for(var Fr=u._queue;Je>0;){var Rr=Fr.peek(),Wr=Math.min(Je,Rr.byteLength),Ot=d.byteOffset+d.bytesFilled;or(d.buffer,Ot,Rr.buffer,Rr.byteOffset,Wr),Rr.byteLength===Wr?Fr.shift():(Rr.byteOffset+=Wr,Rr.byteLength-=Wr),u._queueTotalSize-=Wr,l(u,Wr,d),Je-=Wr}return Sr}function l(u,d,j){j.bytesFilled+=d}function k(u){u._queueTotalSize===0&&u._closeRequested?(Ue(u),eu(u._controlledReadableByteStream)):Mt(u)}function T(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 d=u._pendingPullIntos.peek();g(u,d)&&(Me(u),$a(u._controlledReadableByteStream,d))}}function Y(u,d,j){var R=u._controlledReadableByteStream,G=1;d.constructor!==DataView&&(G=d.constructor.BYTES_PER_ELEMENT);var ue=d.constructor,ye=cr(d.buffer),Je={buffer:ye,bufferByteLength:ye.byteLength,byteOffset:d.byteOffset,byteLength:d.byteLength,bytesFilled:0,elementSize:G,viewConstructor:ue,readerType:"byob"};if(u._pendingPullIntos.length>0){u._pendingPullIntos.push(Je),re(R,j);return}if(R._state==="closed"){var Sr=new ue(Je.buffer,Je.byteOffset,0);j._closeSteps(Sr);return}if(u._queueTotalSize>0){if(g(u,Je)){var Fr=x(Je);k(u),j._chunkSteps(Fr);return}if(u._closeRequested){var Rr=new TypeError("Insufficient bytes to fill elements in the given buffer");Te(u,Rr),j._errorSteps(Rr);return}}u._pendingPullIntos.push(Je),re(R,j),Mt(u)}function ie(u,d){var j=u._controlledReadableByteStream;if(ae(j))for(;se(j)>0;){var R=Me(u);$a(j,R)}}function me(u,d,j){if(l(u,d,j),!(j.bytesFilled<j.elementSize)){Me(u);var R=j.bytesFilled%j.elementSize;if(R>0){var G=j.byteOffset+j.bytesFilled,ue=Pr(j.buffer,G-R,G);b(u,ue,0,ue.byteLength)}j.bytesFilled-=R,$a(u._controlledReadableByteStream,j),N(u)}}function ve(u,d){var j=u._pendingPullIntos.peek();T(u);var R=u._controlledReadableByteStream._state;R==="closed"?ie(u):me(u,d,j),Mt(u)}function Me(u){var d=u._pendingPullIntos.shift();return d}function we(u){var d=u._controlledReadableByteStream;if(d._state!=="readable"||u._closeRequested||!u._started)return!1;if(Ve(d)&&Ge(d)>0||ae(d)&&se(d)>0)return!0;var j=tr(u);return j>0}function Ue(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0}function Ie(u){var d=u._controlledReadableByteStream;if(!(u._closeRequested||d._state!=="readable")){if(u._queueTotalSize>0){u._closeRequested=!0;return}if(u._pendingPullIntos.length>0){var j=u._pendingPullIntos.peek();if(j.bytesFilled>0){var R=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Te(u,R),R}}Ue(u),eu(d)}}function Se(u,d){var j=u._controlledReadableByteStream;if(!(u._closeRequested||j._state!=="readable")){var R=d.buffer,G=d.byteOffset,ue=d.byteLength,ye=cr(R);if(u._pendingPullIntos.length>0){var Je=u._pendingPullIntos.peek();$r(Je.buffer),Je.buffer=cr(Je.buffer)}if(T(u),Ve(j))if(Ge(j)===0)b(u,ye,G,ue);else{u._pendingPullIntos.length>0&&Me(u);var Sr=new Uint8Array(ye,G,ue);Be(j,Sr,!1)}else ae(j)?(b(u,ye,G,ue),N(u)):b(u,ye,G,ue);Mt(u)}}function Te(u,d){var j=u._controlledReadableByteStream;j._state==="readable"&&(tt(u),ut(u),Ue(u),G0(j,d))}function Fe(u){if(u._byobRequest===null&&u._pendingPullIntos.length>0){var d=u._pendingPullIntos.peek(),j=new Uint8Array(d.buffer,d.byteOffset+d.bytesFilled,d.byteLength-d.bytesFilled),R=Object.create(ht.prototype);ze(R,u,j),u._byobRequest=R}return u._byobRequest}function tr(u){var d=u._controlledReadableByteStream._state;return d==="errored"?null:d==="closed"?0:u._strategyHWM-u._queueTotalSize}function Xe(u,d){var j=u._pendingPullIntos.peek(),R=u._controlledReadableByteStream._state;if(R==="closed"){if(d!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(d===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(j.bytesFilled+d>j.byteLength)throw new RangeError("bytesWritten out of range")}j.buffer=cr(j.buffer),ve(u,d)}function Pe(u,d){var j=u._pendingPullIntos.peek(),R=u._controlledReadableByteStream._state;if(R==="closed"){if(d.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(d.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(j.byteOffset+j.bytesFilled!==d.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(j.bufferByteLength!==d.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(j.bytesFilled+d.byteLength>j.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var G=d.byteLength;j.buffer=cr(d.buffer),ve(u,G)}function Ae(u,d,j,R,G,ue,ye){d._controlledReadableByteStream=u,d._pullAgain=!1,d._pulling=!1,d._byobRequest=null,d._queue=d._queueTotalSize=void 0,ut(d),d._closeRequested=!1,d._started=!1,d._strategyHWM=ue,d._pullAlgorithm=R,d._cancelAlgorithm=G,d._autoAllocateChunkSize=ye,d._pendingPullIntos=new V,u._readableStreamController=d;var Je=j();S(h(Je),function(){d._started=!0,Mt(d)},function(Sr){Te(d,Sr)})}function De(u,d,j){var R=Object.create(It.prototype),G=function(){},ue=function(){return h(void 0)},ye=function(){return h(void 0)};d.start!==void 0&&(G=function(){return d.start(R)}),d.pull!==void 0&&(ue=function(){return d.pull(R)}),d.cancel!==void 0&&(ye=function(Sr){return d.cancel(Sr)});var Je=d.autoAllocateChunkSize;if(Je===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ae(u,R,G,ue,ye,j,Je)}function ze(u,d,j){u._associatedReadableByteStreamController=d,u._view=j}function Le(u){return new TypeError("ReadableStreamBYOBRequest.prototype."+u+" can only be used on a ReadableStreamBYOBRequest")}function ge(u){return new TypeError("ReadableByteStreamController.prototype."+u+" can only be used on a ReadableByteStreamController")}function X(u){return new oe(u)}function re(u,d){u._reader._readIntoRequests.push(d)}function fe(u,d,j){var R=u._reader,G=R._readIntoRequests.shift();j?G._closeSteps(d):G._chunkSteps(d)}function se(u){return u._reader._readIntoRequests.length}function ae(u){var d=u._reader;return!(d===void 0||!$e(d))}var oe=function(){function u(d){if(qe(d,1,"ReadableStreamBYOBReader"),Or(d,"First parameter"),zn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!mt(d._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");$(this,d),this._readIntoRequests=new V}return Object.defineProperty(u.prototype,"closed",{get:function(){return $e(this)?this._closedPromise:v(ar("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),$e(this)?this._ownerReadableStream===void 0?v(Z("cancel")):K(this,d):v(ar("cancel"))},u.prototype.read=function(d){if(!$e(this))return v(ar("read"));if(!ArrayBuffer.isView(d))return v(new TypeError("view must be an array buffer view"));if(d.byteLength===0)return v(new TypeError("view must have non-zero byteLength"));if(d.buffer.byteLength===0)return v(new TypeError("view's buffer must have non-zero byteLength"));if($r(d.buffer),this._ownerReadableStream===void 0)return v(Z("read from"));var j,R,G=m(function(ye,Je){j=ye,R=Je}),ue={_chunkSteps:function(ye){return j({value:ye,done:!1})},_closeSteps:function(ye){return j({value:ye,done:!0})},_errorSteps:function(ye){return R(ye)}};return fr(this,d,ue),G},u.prototype.releaseLock=function(){if(!$e(this))throw ar("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");W(this)}},u}();Object.defineProperties(oe.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(oe.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function $e(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readIntoRequests")?!1:u instanceof oe}function fr(u,d,j){var R=u._ownerReadableStream;R._disturbed=!0,R._state==="errored"?j._errorSteps(R._storedError):Y(R._readableStreamController,d,j)}function ar(u){return new TypeError("ReadableStreamBYOBReader.prototype."+u+" can only be used on a ReadableStreamBYOBReader")}function sr(u,d){var j=u.highWaterMark;if(j===void 0)return d;if(gr(j)||j<0)throw new RangeError("Invalid highWaterMark");return j}function z(u){var d=u.size;return d||function(){return 1}}function yr(u,d){Qe(u,d);var j=u==null?void 0:u.highWaterMark,R=u==null?void 0:u.size;return{highWaterMark:j===void 0?void 0:_e(j),size:R===void 0?void 0:Ar(R,d+" has member 'size' that")}}function Ar(u,d){return We(u,d),function(j){return _e(u(j))}}function kr(u,d){Qe(u,d);var j=u==null?void 0:u.abort,R=u==null?void 0:u.close,G=u==null?void 0:u.start,ue=u==null?void 0:u.type,ye=u==null?void 0:u.write;return{abort:j===void 0?void 0:dr(j,u,d+" has member 'abort' that"),close:R===void 0?void 0:Er(R,u,d+" has member 'close' that"),start:G===void 0?void 0:_r(G,u,d+" has member 'start' that"),write:ye===void 0?void 0:at(ye,u,d+" has member 'write' that"),type:ue}}function dr(u,d,j){return We(u,j),function(R){return O(u,d,[R])}}function Er(u,d,j){return We(u,j),function(){return O(u,d,[])}}function _r(u,d,j){return We(u,j),function(R){return F(u,d,[R])}}function at(u,d,j){return We(u,j),function(R,G){return O(u,d,[R,G])}}function Cr(u,d){if(!Oe(u))throw new TypeError(d+" 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 D(){if(E)return new AbortController}var M=function(){function u(d,j){d===void 0&&(d={}),j===void 0&&(j={}),d===void 0?d=null:rr(d,"First parameter");var R=yr(j,"Second parameter"),G=kr(d,"First parameter");je(this);var ue=G.type;if(ue!==void 0)throw new RangeError("Invalid type is specified");var ye=z(R),Je=sr(R,1);SE(this,G,Je,ye)}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Oe(this))throw Hc("locked");return Tr(this)},enumerable:!1,configurable:!0}),u.prototype.abort=function(d){return d===void 0&&(d=void 0),Oe(this)?Tr(this)?v(new TypeError("Cannot abort a stream that already has a writer")):ct(this,d):v(Hc("abort"))},u.prototype.close=function(){return Oe(this)?Tr(this)?v(new TypeError("Cannot close a stream that already has a writer")):mi(this)?v(new TypeError("Cannot close an already-closing stream")):ua(this):v(Hc("close"))},u.prototype.getWriter=function(){if(!Oe(this))throw Hc("getWriter");return ne(this)},u}();Object.defineProperties(M.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(M.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function ne(u){return new Wo(u)}function ce(u,d,j,R,G,ue){G===void 0&&(G=1),ue===void 0&&(ue=function(){return 1});var ye=Object.create(M.prototype);je(ye);var Je=Object.create(yo.prototype);return B0(ye,Je,u,d,j,R,G,ue),ye}function je(u){u._state="writable",u._storedError=void 0,u._writer=void 0,u._writableStreamController=void 0,u._writeRequests=new V,u._inFlightWriteRequest=void 0,u._closeRequest=void 0,u._inFlightCloseRequest=void 0,u._pendingAbortRequest=void 0,u._backpressure=!1}function Oe(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_writableStreamController")?!1:u instanceof M}function Tr(u){return u._writer!==void 0}function ct(u,d){var j;if(u._state==="closed"||u._state==="errored")return h(void 0);u._writableStreamController._abortReason=d,(j=u._writableStreamController._abortController)===null||j===void 0||j.abort();var R=u._state;if(R==="closed"||R==="errored")return h(void 0);if(u._pendingAbortRequest!==void 0)return u._pendingAbortRequest._promise;var G=!1;R==="erroring"&&(G=!0,d=void 0);var ue=m(function(ye,Je){u._pendingAbortRequest={_promise:void 0,_resolve:ye,_reject:Je,_reason:d,_wasAlreadyErroring:G}});return u._pendingAbortRequest._promise=ue,G||fn(u,d),ue}function ua(u){var d=u._state;if(d==="closed"||d==="errored")return v(new TypeError("The stream (in "+d+" state) is not in the writable state and cannot be closed"));var j=m(function(G,ue){var ye={_resolve:G,_reject:ue};u._closeRequest=ye}),R=u._writer;return R!==void 0&&u._backpressure&&d==="writable"&&yp(R),AE(u._writableStreamController),j}function ca(u){var d=m(function(j,R){var G={_resolve:j,_reject:R};u._writeRequests.push(G)});return d}function Sa(u,d){var j=u._state;if(j==="writable"){fn(u,d);return}ma(u)}function fn(u,d){var j=u._writableStreamController;u._state="erroring",u._storedError=d;var R=u._writer;R!==void 0&&P0(R,d),!yE(u)&&j._started&&ma(u)}function ma(u){u._state="errored",u._writableStreamController[xe]();var d=u._storedError;if(u._writeRequests.forEach(function(G){G._reject(d)}),u._writeRequests=new V,u._pendingAbortRequest===void 0){Nc(u);return}var j=u._pendingAbortRequest;if(u._pendingAbortRequest=void 0,j._wasAlreadyErroring){j._reject(d),Nc(u);return}var R=u._writableStreamController[Ee](j._reason);S(R,function(){j._resolve(),Nc(u)},function(G){j._reject(G),Nc(u)})}function Ba(u){u._inFlightWriteRequest._resolve(void 0),u._inFlightWriteRequest=void 0}function go(u,d){u._inFlightWriteRequest._reject(d),u._inFlightWriteRequest=void 0,Sa(u,d)}function hi(u){u._inFlightCloseRequest._resolve(void 0),u._inFlightCloseRequest=void 0;var d=u._state;d==="erroring"&&(u._storedError=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._resolve(),u._pendingAbortRequest=void 0)),u._state="closed";var j=u._writer;j!==void 0&&z0(j)}function $o(u,d){u._inFlightCloseRequest._reject(d),u._inFlightCloseRequest=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._reject(d),u._pendingAbortRequest=void 0),Sa(u,d)}function mi(u){return!(u._closeRequest===void 0&&u._inFlightCloseRequest===void 0)}function yE(u){return!(u._inFlightWriteRequest===void 0&&u._inFlightCloseRequest===void 0)}function xE(u){u._inFlightCloseRequest=u._closeRequest,u._closeRequest=void 0}function wE(u){u._inFlightWriteRequest=u._writeRequests.shift()}function Nc(u){u._closeRequest!==void 0&&(u._closeRequest._reject(u._storedError),u._closeRequest=void 0);var d=u._writer;d!==void 0&&gp(d,u._storedError)}function pp(u,d){var j=u._writer;j!==void 0&&d!==u._backpressure&&(d?BE(j):yp(j)),u._backpressure=d}var Wo=function(){function u(d){if(qe(d,1,"WritableStreamDefaultWriter"),Cr(d,"First parameter"),Tr(d))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=d,d._writer=this;var j=d._state;if(j==="writable")!mi(d)&&d._backpressure?$c(this):L0(this),Vc(this);else if(j==="erroring")bp(this,d._storedError),Vc(this);else if(j==="closed")L0(this),FE(this);else{var R=d._storedError;bp(this,R),R0(this,R)}}return Object.defineProperty(u.prototype,"closed",{get:function(){return bo(this)?this._closedPromise:v(xo("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!bo(this))throw xo("desiredSize");if(this._ownerWritableStream===void 0)throw Xs("desiredSize");return EE(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ready",{get:function(){return bo(this)?this._readyPromise:v(xo("ready"))},enumerable:!1,configurable:!0}),u.prototype.abort=function(d){return d===void 0&&(d=void 0),bo(this)?this._ownerWritableStream===void 0?v(Xs("abort")):kE(this,d):v(xo("abort"))},u.prototype.close=function(){if(!bo(this))return v(xo("close"));var d=this._ownerWritableStream;return d===void 0?v(Xs("close")):mi(d)?v(new TypeError("Cannot close an already-closing stream")):C0(this)},u.prototype.releaseLock=function(){if(!bo(this))throw xo("releaseLock");var d=this._ownerWritableStream;d!==void 0&&T0(this)},u.prototype.write=function(d){return d===void 0&&(d=void 0),bo(this)?this._ownerWritableStream===void 0?v(Xs("write to")):F0(this,d):v(xo("write"))},u}();Object.defineProperties(Wo.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(Wo.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function bo(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_ownerWritableStream")?!1:u instanceof Wo}function kE(u,d){var j=u._ownerWritableStream;return ct(j,d)}function C0(u){var d=u._ownerWritableStream;return ua(d)}function _E(u){var d=u._ownerWritableStream,j=d._state;return mi(d)||j==="closed"?h(void 0):j==="errored"?v(d._storedError):C0(u)}function jE(u,d){u._closedPromiseState==="pending"?gp(u,d):qE(u,d)}function P0(u,d){u._readyPromiseState==="pending"?N0(u,d):IE(u,d)}function EE(u){var d=u._ownerWritableStream,j=d._state;return j==="errored"||j==="erroring"?null:j==="closed"?0:I0(d._writableStreamController)}function T0(u){var d=u._ownerWritableStream,j=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");P0(u,j),jE(u,j),d._writer=void 0,u._ownerWritableStream=void 0}function F0(u,d){var j=u._ownerWritableStream,R=j._writableStreamController,G=DE(R,d);if(j!==u._ownerWritableStream)return v(Xs("write to"));var ue=j._state;if(ue==="errored")return v(j._storedError);if(mi(j)||ue==="closed")return v(new TypeError("The stream is closing or closed and cannot be written to"));if(ue==="erroring")return v(j._storedError);var ye=ca(j);return CE(R,d,G),ye}var q0={},yo=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"abortReason",{get:function(){if(!dp(this))throw vp("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"signal",{get:function(){if(!dp(this))throw vp("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(d){if(d===void 0&&(d=void 0),!dp(this))throw vp("error");var j=this._controlledWritableStream._state;j==="writable"&&O0(this,d)},u.prototype[Ee]=function(d){var j=this._abortAlgorithm(d);return Mc(this),j},u.prototype[xe]=function(){ut(this)},u}();Object.defineProperties(yo.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(yo.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function dp(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledWritableStream")?!1:u instanceof yo}function B0(u,d,j,R,G,ue,ye,Je){d._controlledWritableStream=u,u._writableStreamController=d,d._queue=void 0,d._queueTotalSize=void 0,ut(d),d._abortReason=void 0,d._abortController=D(),d._started=!1,d._strategySizeAlgorithm=Je,d._strategyHWM=ye,d._writeAlgorithm=R,d._closeAlgorithm=G,d._abortAlgorithm=ue;var Sr=mp(d);pp(u,Sr);var Fr=j(),Rr=h(Fr);S(Rr,function(){d._started=!0,Uc(d)},function(Wr){d._started=!0,Sa(u,Wr)})}function SE(u,d,j,R){var G=Object.create(yo.prototype),ue=function(){},ye=function(){return h(void 0)},Je=function(){return h(void 0)},Sr=function(){return h(void 0)};d.start!==void 0&&(ue=function(){return d.start(G)}),d.write!==void 0&&(ye=function(Fr){return d.write(Fr,G)}),d.close!==void 0&&(Je=function(){return d.close()}),d.abort!==void 0&&(Sr=function(Fr){return d.abort(Fr)}),B0(u,G,ue,ye,Je,Sr,j,R)}function Mc(u){u._writeAlgorithm=void 0,u._closeAlgorithm=void 0,u._abortAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function AE(u){ha(u,q0,0),Uc(u)}function DE(u,d){try{return u._strategySizeAlgorithm(d)}catch(j){return hp(u,j),1}}function I0(u){return u._strategyHWM-u._queueTotalSize}function CE(u,d,j){try{ha(u,d,j)}catch(ue){hp(u,ue);return}var R=u._controlledWritableStream;if(!mi(R)&&R._state==="writable"){var G=mp(u);pp(R,G)}Uc(u)}function Uc(u){var d=u._controlledWritableStream;if(!!u._started&&d._inFlightWriteRequest===void 0){var j=d._state;if(j==="erroring"){ma(d);return}if(u._queue.length!==0){var R=rt(u);R===q0?PE(u):TE(u,R)}}}function hp(u,d){u._controlledWritableStream._state==="writable"&&O0(u,d)}function PE(u){var d=u._controlledWritableStream;xE(d),oa(u);var j=u._closeAlgorithm();Mc(u),S(j,function(){hi(d)},function(R){$o(d,R)})}function TE(u,d){var j=u._controlledWritableStream;wE(j);var R=u._writeAlgorithm(d);S(R,function(){Ba(j);var G=j._state;if(oa(u),!mi(j)&&G==="writable"){var ue=mp(u);pp(j,ue)}Uc(u)},function(G){j._state==="writable"&&Mc(u),go(j,G)})}function mp(u){var d=I0(u);return d<=0}function O0(u,d){var j=u._controlledWritableStream;Mc(u),fn(j,d)}function Hc(u){return new TypeError("WritableStream.prototype."+u+" can only be used on a WritableStream")}function vp(u){return new TypeError("WritableStreamDefaultController.prototype."+u+" can only be used on a WritableStreamDefaultController")}function xo(u){return new TypeError("WritableStreamDefaultWriter.prototype."+u+" can only be used on a WritableStreamDefaultWriter")}function Xs(u){return new TypeError("Cannot "+u+" a stream using a released writer")}function Vc(u){u._closedPromise=m(function(d,j){u._closedPromise_resolve=d,u._closedPromise_reject=j,u._closedPromiseState="pending"})}function R0(u,d){Vc(u),gp(u,d)}function FE(u){Vc(u),z0(u)}function gp(u,d){u._closedPromise_reject!==void 0&&(C(u._closedPromise),u._closedPromise_reject(d),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0,u._closedPromiseState="rejected")}function qE(u,d){R0(u,d)}function z0(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 $c(u){u._readyPromise=m(function(d,j){u._readyPromise_resolve=d,u._readyPromise_reject=j}),u._readyPromiseState="pending"}function bp(u,d){$c(u),N0(u,d)}function L0(u){$c(u),yp(u)}function N0(u,d){u._readyPromise_reject!==void 0&&(C(u._readyPromise),u._readyPromise_reject(d),u._readyPromise_resolve=void 0,u._readyPromise_reject=void 0,u._readyPromiseState="rejected")}function BE(u){$c(u)}function IE(u,d){bp(u,d)}function yp(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 M0=typeof DOMException!="undefined"?DOMException:void 0;function OE(u){if(!(typeof u=="function"||typeof u=="object"))return!1;try{return new u,!0}catch{return!1}}function RE(){var u=function(j,R){this.message=j||"",this.name=R||"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 zE=OE(M0)?M0:RE();function U0(u,d,j,R,G,ue){var ye=Gr(u),Je=ne(d);u._disturbed=!0;var Sr=!1,Fr=h(void 0);return m(function(Rr,Wr){var Ot;if(ue!==void 0){if(Ot=function(){var xr=new zE("Aborted","AbortError"),Kr=[];R||Kr.push(function(){return d._state==="writable"?ct(d,xr):h(void 0)}),G||Kr.push(function(){return u._state==="readable"?vi(u,xr):h(void 0)}),Wa(function(){return Promise.all(Kr.map(function(gt){return gt()}))},!0,xr)},ue.aborted){Ot();return}ue.addEventListener("abort",Ot)}function gi(){return m(function(xr,Kr){function gt(Mi){Mi?xr():y(Yo(),gt,Kr)}gt(!1)})}function Yo(){return Sr?h(!0):y(Je._readyPromise,function(){return m(function(xr,Kr){nr(ye,{_chunkSteps:function(gt){Fr=y(F0(Je,gt),void 0,t),xr(!1)},_closeSteps:function(){return xr(!0)},_errorSteps:Kr})})})}if(la(u,ye._closedPromise,function(xr){R?dn(!0,xr):Wa(function(){return ct(d,xr)},!0,xr)}),la(d,Je._closedPromise,function(xr){G?dn(!0,xr):Wa(function(){return vi(u,xr)},!0,xr)}),Ni(u,ye._closedPromise,function(){j?dn():Wa(function(){return _E(Je)})}),mi(d)||d._state==="closed"){var Ln=new TypeError("the destination writable stream closed before all data could be piped to it");G?dn(!0,Ln):Wa(function(){return vi(u,Ln)},!0,Ln)}C(gi());function Li(){var xr=Fr;return y(Fr,function(){return xr!==Fr?Li():void 0})}function la(xr,Kr,gt){xr._state==="errored"?gt(xr._storedError):A(Kr,gt)}function Ni(xr,Kr,gt){xr._state==="closed"?gt():w(Kr,gt)}function Wa(xr,Kr,gt){if(Sr)return;Sr=!0,d._state==="writable"&&!mi(d)?w(Li(),Mi):Mi();function Mi(){S(xr(),function(){return vt(Kr,gt)},function(Nn){return vt(!0,Nn)})}}function dn(xr,Kr){Sr||(Sr=!0,d._state==="writable"&&!mi(d)?w(Li(),function(){return vt(xr,Kr)}):vt(xr,Kr))}function vt(xr,Kr){T0(Je),W(ye),ue!==void 0&&ue.removeEventListener("abort",Ot),xr?Wr(Kr):Rr(void 0)}})}var wo=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Wc(this))throw Yc("desiredSize");return xp(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!Wc(this))throw Yc("close");if(!Go(this))throw new TypeError("The stream is not in a state that permits close");Zs(this)},u.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Wc(this))throw Yc("enqueue");if(!Go(this))throw new TypeError("The stream is not in a state that permits enqueue");return Kc(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!Wc(this))throw Yc("error");On(this,d)},u.prototype[Ne]=function(d){ut(this);var j=this._cancelAlgorithm(d);return Gc(this),j},u.prototype[He]=function(d){var j=this._controlledReadableStream;if(this._queue.length>0){var R=oa(this);this._closeRequested&&this._queue.length===0?(Gc(this),eu(j)):Js(this),d._chunkSteps(R)}else ee(j,d),Js(this)},u}();Object.defineProperties(wo.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(wo.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Wc(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableStream")?!1:u instanceof wo}function Js(u){var d=H0(u);if(!!d){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var j=u._pullAlgorithm();S(j,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,Js(u))},function(R){On(u,R)})}}function H0(u){var d=u._controlledReadableStream;if(!Go(u)||!u._started)return!1;if(zn(d)&&Ge(d)>0)return!0;var j=xp(u);return j>0}function Gc(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function Zs(u){if(!!Go(u)){var d=u._controlledReadableStream;u._closeRequested=!0,u._queue.length===0&&(Gc(u),eu(d))}}function Kc(u,d){if(!!Go(u)){var j=u._controlledReadableStream;if(zn(j)&&Ge(j)>0)Be(j,d,!1);else{var R=void 0;try{R=u._strategySizeAlgorithm(d)}catch(G){throw On(u,G),G}try{ha(u,d,R)}catch(G){throw On(u,G),G}}Js(u)}}function On(u,d){var j=u._controlledReadableStream;j._state==="readable"&&(ut(u),Gc(u),G0(j,d))}function xp(u){var d=u._controlledReadableStream._state;return d==="errored"?null:d==="closed"?0:u._strategyHWM-u._queueTotalSize}function LE(u){return!H0(u)}function Go(u){var d=u._controlledReadableStream._state;return!u._closeRequested&&d==="readable"}function V0(u,d,j,R,G,ue,ye){d._controlledReadableStream=u,d._queue=void 0,d._queueTotalSize=void 0,ut(d),d._started=!1,d._closeRequested=!1,d._pullAgain=!1,d._pulling=!1,d._strategySizeAlgorithm=ye,d._strategyHWM=ue,d._pullAlgorithm=R,d._cancelAlgorithm=G,u._readableStreamController=d;var Je=j();S(h(Je),function(){d._started=!0,Js(d)},function(Sr){On(d,Sr)})}function NE(u,d,j,R){var G=Object.create(wo.prototype),ue=function(){},ye=function(){return h(void 0)},Je=function(){return h(void 0)};d.start!==void 0&&(ue=function(){return d.start(G)}),d.pull!==void 0&&(ye=function(){return d.pull(G)}),d.cancel!==void 0&&(Je=function(Sr){return d.cancel(Sr)}),V0(u,G,ue,ye,Je,j,R)}function Yc(u){return new TypeError("ReadableStreamDefaultController.prototype."+u+" can only be used on a ReadableStreamDefaultController")}function ME(u,d){return mt(u._readableStreamController)?HE(u):UE(u)}function UE(u,d){var j=Gr(u),R=!1,G=!1,ue=!1,ye=!1,Je,Sr,Fr,Rr,Wr,Ot=m(function(la){Wr=la});function gi(){if(R)return G=!0,h(void 0);R=!0;var la={_chunkSteps:function(Ni){B(function(){G=!1;var Wa=Ni,dn=Ni;ue||Kc(Fr._readableStreamController,Wa),ye||Kc(Rr._readableStreamController,dn),R=!1,G&&gi()})},_closeSteps:function(){R=!1,ue||Zs(Fr._readableStreamController),ye||Zs(Rr._readableStreamController),(!ue||!ye)&&Wr(void 0)},_errorSteps:function(){R=!1}};return nr(j,la),h(void 0)}function Yo(la){if(ue=!0,Je=la,ye){var Ni=wr([Je,Sr]),Wa=vi(u,Ni);Wr(Wa)}return Ot}function Ln(la){if(ye=!0,Sr=la,ue){var Ni=wr([Je,Sr]),Wa=vi(u,Ni);Wr(Wa)}return Ot}function Li(){}return Fr=wp(Li,gi,Yo),Rr=wp(Li,gi,Ln),A(j._closedPromise,function(la){On(Fr._readableStreamController,la),On(Rr._readableStreamController,la),(!ue||!ye)&&Wr(void 0)}),[Fr,Rr]}function HE(u){var d=Gr(u),j=!1,R=!1,G=!1,ue=!1,ye=!1,Je,Sr,Fr,Rr,Wr,Ot=m(function(vt){Wr=vt});function gi(vt){A(vt._closedPromise,function(xr){vt===d&&(Te(Fr._readableStreamController,xr),Te(Rr._readableStreamController,xr),(!ue||!ye)&&Wr(void 0))})}function Yo(){$e(d)&&(W(d),d=Gr(u),gi(d));var vt={_chunkSteps:function(xr){B(function(){R=!1,G=!1;var Kr=xr,gt=xr;if(!ue&&!ye)try{gt=Bt(xr)}catch(Mi){Te(Fr._readableStreamController,Mi),Te(Rr._readableStreamController,Mi),Wr(vi(u,Mi));return}ue||Se(Fr._readableStreamController,Kr),ye||Se(Rr._readableStreamController,gt),j=!1,R?Li():G&&la()})},_closeSteps:function(){j=!1,ue||Ie(Fr._readableStreamController),ye||Ie(Rr._readableStreamController),Fr._readableStreamController._pendingPullIntos.length>0&&Xe(Fr._readableStreamController,0),Rr._readableStreamController._pendingPullIntos.length>0&&Xe(Rr._readableStreamController,0),(!ue||!ye)&&Wr(void 0)},_errorSteps:function(){j=!1}};nr(d,vt)}function Ln(vt,xr){Ze(d)&&(W(d),d=X(u),gi(d));var Kr=xr?Rr:Fr,gt=xr?Fr:Rr,Mi={_chunkSteps:function(Nn){B(function(){R=!1,G=!1;var Qo=xr?ye:ue,iu=xr?ue:ye;if(iu)Qo||Pe(Kr._readableStreamController,Nn);else{var og=void 0;try{og=Bt(Nn)}catch(Ep){Te(Kr._readableStreamController,Ep),Te(gt._readableStreamController,Ep),Wr(vi(u,Ep));return}Qo||Pe(Kr._readableStreamController,Nn),Se(gt._readableStreamController,og)}j=!1,R?Li():G&&la()})},_closeSteps:function(Nn){j=!1;var Qo=xr?ye:ue,iu=xr?ue:ye;Qo||Ie(Kr._readableStreamController),iu||Ie(gt._readableStreamController),Nn!==void 0&&(Qo||Pe(Kr._readableStreamController,Nn),!iu&&gt._readableStreamController._pendingPullIntos.length>0&&Xe(gt._readableStreamController,0)),(!Qo||!iu)&&Wr(void 0)},_errorSteps:function(){j=!1}};fr(d,vt,Mi)}function Li(){if(j)return R=!0,h(void 0);j=!0;var vt=Fe(Fr._readableStreamController);return vt===null?Yo():Ln(vt._view,!1),h(void 0)}function la(){if(j)return G=!0,h(void 0);j=!0;var vt=Fe(Rr._readableStreamController);return vt===null?Yo():Ln(vt._view,!0),h(void 0)}function Ni(vt){if(ue=!0,Je=vt,ye){var xr=wr([Je,Sr]),Kr=vi(u,xr);Wr(Kr)}return Ot}function Wa(vt){if(ye=!0,Sr=vt,ue){var xr=wr([Je,Sr]),Kr=vi(u,xr);Wr(Kr)}return Ot}function dn(){}return Fr=W0(dn,Li,Ni),Rr=W0(dn,la,Wa),gi(d),[Fr,Rr]}function VE(u,d){Qe(u,d);var j=u,R=j==null?void 0:j.autoAllocateChunkSize,G=j==null?void 0:j.cancel,ue=j==null?void 0:j.pull,ye=j==null?void 0:j.start,Je=j==null?void 0:j.type;return{autoAllocateChunkSize:R===void 0?void 0:ur(R,d+" has member 'autoAllocateChunkSize' that"),cancel:G===void 0?void 0:$E(G,j,d+" has member 'cancel' that"),pull:ue===void 0?void 0:WE(ue,j,d+" has member 'pull' that"),start:ye===void 0?void 0:GE(ye,j,d+" has member 'start' that"),type:Je===void 0?void 0:KE(Je,d+" has member 'type' that")}}function $E(u,d,j){return We(u,j),function(R){return O(u,d,[R])}}function WE(u,d,j){return We(u,j),function(R){return O(u,d,[R])}}function GE(u,d,j){return We(u,j),function(R){return F(u,d,[R])}}function KE(u,d){if(u=""+u,u!=="bytes")throw new TypeError(d+" '"+u+"' is not a valid enumeration value for ReadableStreamType");return u}function YE(u,d){Qe(u,d);var j=u==null?void 0:u.mode;return{mode:j===void 0?void 0:QE(j,d+" has member 'mode' that")}}function QE(u,d){if(u=""+u,u!=="byob")throw new TypeError(d+" '"+u+"' is not a valid enumeration value for ReadableStreamReaderMode");return u}function XE(u,d){Qe(u,d);var j=u==null?void 0:u.preventCancel;return{preventCancel:Boolean(j)}}function $0(u,d){Qe(u,d);var j=u==null?void 0:u.preventAbort,R=u==null?void 0:u.preventCancel,G=u==null?void 0:u.preventClose,ue=u==null?void 0:u.signal;return ue!==void 0&&JE(ue,d+" has member 'signal' that"),{preventAbort:Boolean(j),preventCancel:Boolean(R),preventClose:Boolean(G),signal:ue}}function JE(u,d){if(!_(u))throw new TypeError(d+" is not an AbortSignal.")}function ZE(u,d){Qe(u,d);var j=u==null?void 0:u.readable;he(j,"readable","ReadableWritablePair"),Or(j,d+" has member 'readable' that");var R=u==null?void 0:u.writable;return he(R,"writable","ReadableWritablePair"),Cr(R,d+" has member 'writable' that"),{readable:j,writable:R}}var pn=function(){function u(d,j){d===void 0&&(d={}),j===void 0&&(j={}),d===void 0?d=null:rr(d,"First parameter");var R=yr(j,"Second parameter"),G=VE(d,"First parameter");if(kp(this),G.type==="bytes"){if(R.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var ue=sr(R,0);De(this,G,ue)}else{var ye=z(R),ue=sr(R,1);NE(this,G,ue,ye)}}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Rn(this))throw ko("locked");return zn(this)},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),Rn(this)?zn(this)?v(new TypeError("Cannot cancel a stream that already has a reader")):vi(this,d):v(ko("cancel"))},u.prototype.getReader=function(d){if(d===void 0&&(d=void 0),!Rn(this))throw ko("getReader");var j=YE(d,"First parameter");return j.mode===void 0?Gr(this):X(this)},u.prototype.pipeThrough=function(d,j){if(j===void 0&&(j={}),!Rn(this))throw ko("pipeThrough");qe(d,1,"pipeThrough");var R=ZE(d,"First parameter"),G=$0(j,"Second parameter");if(zn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Tr(R.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var ue=U0(this,R.writable,G.preventClose,G.preventAbort,G.preventCancel,G.signal);return C(ue),R.readable},u.prototype.pipeTo=function(d,j){if(j===void 0&&(j={}),!Rn(this))return v(ko("pipeTo"));if(d===void 0)return v("Parameter 1 is required in 'pipeTo'.");if(!Oe(d))return v(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var R;try{R=$0(j,"Second parameter")}catch(G){return v(G)}return zn(this)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Tr(d)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):U0(this,d,R.preventClose,R.preventAbort,R.preventCancel,R.signal)},u.prototype.tee=function(){if(!Rn(this))throw ko("tee");var d=ME(this);return wr(d)},u.prototype.values=function(d){if(d===void 0&&(d=void 0),!Rn(this))throw ko("values");var j=XE(d,"First parameter");return pr(this,j.preventCancel)},u}();Object.defineProperties(pn.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(pn.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(pn.prototype,r.asyncIterator,{value:pn.prototype.values,writable:!0,configurable:!0});function wp(u,d,j,R,G){R===void 0&&(R=1),G===void 0&&(G=function(){return 1});var ue=Object.create(pn.prototype);kp(ue);var ye=Object.create(wo.prototype);return V0(ue,ye,u,d,j,R,G),ue}function W0(u,d,j){var R=Object.create(pn.prototype);kp(R);var G=Object.create(It.prototype);return Ae(R,G,u,d,j,0,void 0),R}function kp(u){u._state="readable",u._reader=void 0,u._storedError=void 0,u._disturbed=!1}function Rn(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readableStreamController")?!1:u instanceof pn}function zn(u){return u._reader!==void 0}function vi(u,d){if(u._disturbed=!0,u._state==="closed")return h(void 0);if(u._state==="errored")return v(u._storedError);eu(u);var j=u._reader;j!==void 0&&$e(j)&&(j._readIntoRequests.forEach(function(G){G._closeSteps(void 0)}),j._readIntoRequests=new V);var R=u._readableStreamController[Ne](d);return P(R,t)}function eu(u){u._state="closed";var d=u._reader;d!==void 0&&(de(d),Ze(d)&&(d._readRequests.forEach(function(j){j._closeSteps()}),d._readRequests=new V))}function G0(u,d){u._state="errored",u._storedError=d;var j=u._reader;j!==void 0&&(le(j,d),Ze(j)?(j._readRequests.forEach(function(R){R._errorSteps(d)}),j._readRequests=new V):(j._readIntoRequests.forEach(function(R){R._errorSteps(d)}),j._readIntoRequests=new V))}function ko(u){return new TypeError("ReadableStream.prototype."+u+" can only be used on a ReadableStream")}function K0(u,d){Qe(u,d);var j=u==null?void 0:u.highWaterMark;return he(j,"highWaterMark","QueuingStrategyInit"),{highWaterMark:_e(j)}}var Y0=function(u){return u.byteLength};try{Object.defineProperty(Y0,"name",{value:"size",configurable:!0})}catch{}var ru=function(){function u(d){qe(d,1,"ByteLengthQueuingStrategy"),d=K0(d,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!X0(this))throw Q0("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!X0(this))throw Q0("size");return Y0},enumerable:!1,configurable:!0}),u}();Object.defineProperties(ru.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ru.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Q0(u){return new TypeError("ByteLengthQueuingStrategy.prototype."+u+" can only be used on a ByteLengthQueuingStrategy")}function X0(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_byteLengthQueuingStrategyHighWaterMark")?!1:u instanceof ru}var J0=function(){return 1};try{Object.defineProperty(J0,"name",{value:"size",configurable:!0})}catch{}var tu=function(){function u(d){qe(d,1,"CountQueuingStrategy"),d=K0(d,"First parameter"),this._countQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!eg(this))throw Z0("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!eg(this))throw Z0("size");return J0},enumerable:!1,configurable:!0}),u}();Object.defineProperties(tu.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(tu.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Z0(u){return new TypeError("CountQueuingStrategy.prototype."+u+" can only be used on a CountQueuingStrategy")}function eg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_countQueuingStrategyHighWaterMark")?!1:u instanceof tu}function e4(u,d){Qe(u,d);var j=u==null?void 0:u.flush,R=u==null?void 0:u.readableType,G=u==null?void 0:u.start,ue=u==null?void 0:u.transform,ye=u==null?void 0:u.writableType;return{flush:j===void 0?void 0:r4(j,u,d+" has member 'flush' that"),readableType:R,start:G===void 0?void 0:t4(G,u,d+" has member 'start' that"),transform:ue===void 0?void 0:a4(ue,u,d+" has member 'transform' that"),writableType:ye}}function r4(u,d,j){return We(u,j),function(R){return O(u,d,[R])}}function t4(u,d,j){return We(u,j),function(R){return F(u,d,[R])}}function a4(u,d,j){return We(u,j),function(R,G){return O(u,d,[R,G])}}var au=function(){function u(d,j,R){d===void 0&&(d={}),j===void 0&&(j={}),R===void 0&&(R={}),d===void 0&&(d=null);var G=yr(j,"Second parameter"),ue=yr(R,"Third parameter"),ye=e4(d,"First parameter");if(ye.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(ye.writableType!==void 0)throw new RangeError("Invalid writableType specified");var Je=sr(ue,0),Sr=z(ue),Fr=sr(G,1),Rr=z(G),Wr,Ot=m(function(gi){Wr=gi});i4(this,Ot,Fr,Rr,Je,Sr),o4(this,ye),ye.start!==void 0?Wr(ye.start(this._transformStreamController)):Wr(void 0)}return Object.defineProperty(u.prototype,"readable",{get:function(){if(!rg(this))throw ng("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"writable",{get:function(){if(!rg(this))throw ng("writable");return this._writable},enumerable:!1,configurable:!0}),u}();Object.defineProperties(au.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(au.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function i4(u,d,j,R,G,ue){function ye(){return d}function Je(Ot){return c4(u,Ot)}function Sr(Ot){return l4(u,Ot)}function Fr(){return f4(u)}u._writable=ce(ye,Je,Fr,Sr,j,R);function Rr(){return p4(u)}function Wr(Ot){return Xc(u,Ot),h(void 0)}u._readable=wp(ye,Rr,Wr,G,ue),u._backpressure=void 0,u._backpressureChangePromise=void 0,u._backpressureChangePromise_resolve=void 0,Jc(u,!0),u._transformStreamController=void 0}function rg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_transformStreamController")?!1:u instanceof au}function Qc(u,d){On(u._readable._readableStreamController,d),Xc(u,d)}function Xc(u,d){tg(u._transformStreamController),hp(u._writable._writableStreamController,d),u._backpressure&&Jc(u,!1)}function Jc(u,d){u._backpressureChangePromise!==void 0&&u._backpressureChangePromise_resolve(),u._backpressureChangePromise=m(function(j){u._backpressureChangePromise_resolve=j}),u._backpressure=d}var Ko=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Zc(this))throw el("desiredSize");var d=this._controlledTransformStream._readable._readableStreamController;return xp(d)},enumerable:!1,configurable:!0}),u.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Zc(this))throw el("enqueue");ag(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!Zc(this))throw el("error");s4(this,d)},u.prototype.terminate=function(){if(!Zc(this))throw el("terminate");u4(this)},u}();Object.defineProperties(Ko.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ko.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Zc(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledTransformStream")?!1:u instanceof Ko}function n4(u,d,j,R){d._controlledTransformStream=u,u._transformStreamController=d,d._transformAlgorithm=j,d._flushAlgorithm=R}function o4(u,d){var j=Object.create(Ko.prototype),R=function(ue){try{return ag(j,ue),h(void 0)}catch(ye){return v(ye)}},G=function(){return h(void 0)};d.transform!==void 0&&(R=function(ue){return d.transform(ue,j)}),d.flush!==void 0&&(G=function(){return d.flush(j)}),n4(u,j,R,G)}function tg(u){u._transformAlgorithm=void 0,u._flushAlgorithm=void 0}function ag(u,d){var j=u._controlledTransformStream,R=j._readable._readableStreamController;if(!Go(R))throw new TypeError("Readable side is not in a state that permits enqueue");try{Kc(R,d)}catch(ue){throw Xc(j,ue),j._readable._storedError}var G=LE(R);G!==j._backpressure&&Jc(j,!0)}function s4(u,d){Qc(u._controlledTransformStream,d)}function ig(u,d){var j=u._transformAlgorithm(d);return P(j,void 0,function(R){throw Qc(u._controlledTransformStream,R),R})}function u4(u){var d=u._controlledTransformStream,j=d._readable._readableStreamController;Zs(j);var R=new TypeError("TransformStream terminated");Xc(d,R)}function c4(u,d){var j=u._transformStreamController;if(u._backpressure){var R=u._backpressureChangePromise;return P(R,function(){var G=u._writable,ue=G._state;if(ue==="erroring")throw G._storedError;return ig(j,d)})}return ig(j,d)}function l4(u,d){return Qc(u,d),h(void 0)}function f4(u){var d=u._readable,j=u._transformStreamController,R=j._flushAlgorithm();return tg(j),P(R,function(){if(d._state==="errored")throw d._storedError;Zs(d._readableStreamController)},function(G){throw Qc(u,G),d._storedError})}function p4(u){return Jc(u,!1),u._backpressureChangePromise}function el(u){return new TypeError("TransformStreamDefaultController.prototype."+u+" can only be used on a TransformStreamDefaultController")}function ng(u){return new TypeError("TransformStream.prototype."+u+" can only be used on a TransformStream")}var _p={ReadableStream:pn,ReadableStreamDefaultController:wo,ReadableByteStreamController:It,ReadableStreamBYOBRequest:ht,ReadableStreamDefaultReader:Ye,ReadableStreamBYOBReader:oe,WritableStream:M,WritableStreamDefaultController:yo,WritableStreamDefaultWriter:Wo,ByteLengthQueuingStrategy:ru,CountQueuingStrategy:tu,TransformStream:au,TransformStreamDefaultController:Ko};if(typeof a!="undefined")for(var jp in _p)Object.prototype.hasOwnProperty.call(_p,jp)&&Object.defineProperty(a,jp,{value:_p[jp],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=ru,e.CountQueuingStrategy=tu,e.ReadableByteStreamController=It,e.ReadableStream=pn,e.ReadableStreamBYOBReader=oe,e.ReadableStreamBYOBRequest=ht,e.ReadableStreamDefaultController=wo,e.ReadableStreamDefaultReader=Ye,e.TransformStream=au,e.TransformStreamDefaultController=Ko,e.WritableStream=M,e.WritableStreamDefaultController=yo,e.WritableStreamDefaultWriter=Wo,Object.defineProperty(e,"__esModule",{value:!0})})});var Sp="3.4.13";function fg(e,r){if(!e)throw new Error(r||"loaders.gl assertion failed.")}var Ui={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},XN=Ui.self||Ui.window||Ui.global||{},JN=Ui.window||Ui.self||Ui.global||{},pg=Ui.global||Ui.self||Ui.window||{},ZN=Ui.document||{};var _o=typeof process!="object"||String(process)!=="[object process]"||process.browser,ou=typeof importScripts=="function",eM=typeof window!="undefined"&&typeof window.orientation!="undefined",dg=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),rM=dg&&parseFloat(dg[1])||0;function Ap(e,r=!0,t){let i=t||new Set;if(e){if(hg(e))i.add(e);else if(hg(e.buffer))i.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(r&&typeof e=="object")for(let a in e)Ap(e[a],r,i)}}return t===void 0?Array.from(i):[]}function hg(e){return e?e instanceof ArrayBuffer||typeof MessagePort!="undefined"&&e instanceof MessagePort||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas:!1}function jo(){let parentPort;try{eval("globalThis.parentPort = require('worker_threads').parentPort"),parentPort=globalThis.parentPort}catch{}return parentPort}var Dp=new Map,Za=class{static inWorkerThread(){return typeof self!="undefined"||Boolean(jo())}static set onmessage(r){function t(a){let n=jo(),{type:o,payload:s}=n?a:a.data;r(o,s)}let i=jo();i?(i.on("message",t),i.on("exit",()=>console.debug("Node worker closing"))):globalThis.onmessage=t}static addEventListener(r){let t=Dp.get(r);t||(t=a=>{if(!k4(a))return;let n=jo(),{type:o,payload:s}=n?a:a.data;r(o,s)}),jo()?console.error("not implemented"):globalThis.addEventListener("message",t)}static removeEventListener(r){let t=Dp.get(r);Dp.delete(r),jo()?console.error("not implemented"):globalThis.removeEventListener("message",t)}static postMessage(r,t){let i={source:"loaders.gl",type:r,payload:t},a=Ap(t),n=jo();n?n.postMessage(i,a):globalThis.postMessage(i,a)}};function k4(e){let{type:r,data:t}=e;return r==="message"&&t&&typeof t.source=="string"&&t.source.startsWith("loaders.gl")}var Tp={};x4(Tp,{requireFromFile:()=>Pp,requireFromString:()=>rl});var Cp=Ja(require("module")),mg=Ja(require("path"));async function Pp(e){if(e.startsWith("http")){let t=await(await fetch(e)).text();return rl(t)}return e.startsWith("/")||(e=`${process.cwd()}/${e}`),require(e)}function rl(e,r="",t){if(typeof r=="object"&&(t=r,r=""),typeof e!="string")throw new Error(`code must be a string, not ${typeof e}`);let i=Cp.default._nodeModulePaths(mg.default.dirname(r)),a=module.parent,n=new Cp.default(r,a);return n.filename=r,n.paths=[].concat((t==null?void 0:t.prependPaths)||[]).concat(i).concat((t==null?void 0:t.appendPaths)||[]),n._compile(e,r),a&&a.children&&a.children.splice(a.children.indexOf(n),1),n.exports}var _4="latest",j4=typeof Sp!="undefined"?Sp:_4,Fp={};async function su(e,r=null,t={}){return r&&(e=vg(e,r,t)),Fp[e]=Fp[e]||E4(e),await Fp[e]}function vg(e,r,t){if(e.startsWith("http"))return e;let i=t.modules||{};return i[e]?i[e]:_o?t.CDN?(fg(t.CDN.startsWith("http")),`${t.CDN}/${r}@${j4}/dist/libs/${e}`):ou?`../src/libs/${e}`:`modules/${r}/src/libs/${e}`:`modules/${r}/dist/libs/${e}`}async function E4(e){if(e.endsWith("wasm"))return await(await fetch(e)).arrayBuffer();if(!_o)try{return Tp&&Pp&&await Pp(e)}catch{return null}if(ou)return importScripts(e);let t=await(await fetch(e)).text();return S4(t,e)}function S4(e,r){if(!_o)return rl&&rl(e,r);if(ou)return eval.call(pg,e),null;let t=document.createElement("script");t.id=r;try{t.appendChild(document.createTextNode(e))}catch{t.text=e}return document.body.appendChild(t),null}var A4=0;function qp(e){!Za.inWorkerThread()||(Za.onmessage=async(r,t)=>{switch(r){case"process":try{let{input:i,options:a={},context:n={}}=t,o=await C4({loader:e,arrayBuffer:i,options:a,context:bi(va({},n),{parse:D4})});Za.postMessage("done",{result:o})}catch(i){let a=i instanceof Error?i.message:"";Za.postMessage("error",{error:a})}break;default:}})}function D4(e,r){return new Promise((t,i)=>{let a=A4++,n=(s,c)=>{if(c.id===a)switch(s){case"done":Za.removeEventListener(n),t(c.result);break;case"error":Za.removeEventListener(n),i(c.error);break;default:}};Za.addEventListener(n);let o={id:a,input:e,options:r};Za.postMessage("process",o)})}async function C4({loader:e,arrayBuffer:r,options:t,context:i}){let a,n;if(e.parseSync||e.parse)a=r,n=e.parseSync||e.parse;else if(e.parseTextSync)a=new TextDecoder().decode(r),n=e.parseTextSync;else throw new Error(`Could not load data with ${e.name} loader`);return t=bi(va({},t),{modules:e&&e.options&&e.options.modules||{},worker:!1}),await n(a,va({},t),i,e)}var v0=Ja(cb());var xi=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},Et=Qp.global||Qp.self||Qp.window;var lb={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"]=lb||{};function jr(e,r,t){return r<=e&&e<=t}function rS(e,r){return e.indexOf(r)!==-1}var gn=Math.floor;function fl(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function tS(e){for(var r=String(e),t=r.length,i=0,a=[];i<t;){var n=r.charCodeAt(i);if(n<55296||n>57343)a.push(n);else if(56320<=n&&n<=57343)a.push(65533);else if(55296<=n&&n<=56319)if(i===t-1)a.push(65533);else{var o=r.charCodeAt(i+1);if(56320<=o&&o<=57343){var s=n&1023,c=o&1023;a.push(65536+(s<<10)+c),i+=1}else a.push(65533)}i+=1}return a}function aS(e){for(var r="",t=0;t<e.length;++t){var i=e[t];i<=65535?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return r}function ei(e){return 0<=e&&e<=127}var ri=ei,zr=-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():zr},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 it=-1;function Lr(e,r){if(e)throw TypeError("Decoder error");return r||65533}function wi(e){throw TypeError("The code point "+e+" could not be encoded.")}function iS(){}iS.prototype={handler:function(e,r){}};function nS(){}nS.prototype={handler:function(e,r){}};function Jp(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(Zp,e)?Zp[e]:null}var fb=[{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"}],Zp={};fb.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(t){Zp[t]=r})})});var za={},La={};function ns(e,r){return r&&r[e]||null}function os(e,r){var t=r.indexOf(e);return t===-1?null:t}function Aa(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 oS(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,t=0,i=Aa("gb18030-ranges"),a;for(a=0;a<i.length;++a){var n=i[a];if(n[0]<=e)r=n[0],t=n[1];else break}return t+e-r}function sS(e){if(e===59335)return 7457;var r=0,t=0,i=Aa("gb18030-ranges"),a;for(a=0;a<i.length;++a){var n=i[a];if(n[1]<=e)r=n[1],t=n[0];else break}return t+e-r}function uS(e){ed=ed||Aa("jis0208").map(function(t,i){return jr(i,8272,8835)?null:t});var r=ed;return r.indexOf(e)}var ed;function cS(e){rd=rd||Aa("big5").map(function(t,i){return i<(161-129)*157?null:t});var r=rd;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):os(e,r)}var rd,pb="utf-8";function So(e,r){if(!(this instanceof So))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):pb,r=fl(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var t=Jp(e);if(t===null||t.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!La[t.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var i=this;return i._encoding=t,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(So.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(So.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(So.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));So.prototype.decode=function(r,t){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),t=fl(t),this._do_not_flush||(this._decoder=La[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(t.stream);for(var a=new Xp(i),n=[],o;;){var s=a.read();if(s===zr||(o=this._decoder.handler(a,s),o===it))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(a,a.read()),o===it)break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}while(!a.endOfStream());this._decoder=null}function c(f){return rS(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)&&!this._ignoreBOM&&!this._BOMseen&&(f.length>0&&f[0]===65279?(this._BOMseen=!0,f.shift()):f.length>0&&(this._BOMseen=!0)),aS(f)}return c.call(this,n)};function ku(e,r){if(!(this instanceof ku))throw TypeError("Called as a function. Did you forget 'new'?");r=fl(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var t=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){e=e!==void 0?String(e):pb;var i=Jp(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!za[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");t._encoding=i}else t._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=t._encoding.name.toLowerCase()),t}Object.defineProperty&&Object.defineProperty(ku.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});ku.prototype.encode=function(r,t){r=r===void 0?"":String(r),t=fl(t),this._do_not_flush||(this._encoder=za[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(t.stream);for(var i=new Xp(tS(r)),a=[],n;;){var o=i.read();if(o===zr||(n=this._encoder.handler(i,o),n===it))break;Array.isArray(n)?a.push.apply(a,n):a.push(n)}if(!this._do_not_flush){for(;n=this._encoder.handler(i,i.read()),n!==it;)Array.isArray(n)?a.push.apply(a,n):a.push(n);this._encoder=null}return new Uint8Array(a)};function lS(e){var r=e.fatal,t=0,i=0,a=0,n=128,o=191;this.handler=function(s,c){if(c===zr&&a!==0)return a=0,Lr(r);if(c===zr)return it;if(a===0){if(jr(c,0,127))return c;if(jr(c,194,223))a=1,t=c&31;else if(jr(c,224,239))c===224&&(n=160),c===237&&(o=159),a=2,t=c&15;else if(jr(c,240,244))c===240&&(n=144),c===244&&(o=143),a=3,t=c&7;else return Lr(r);return null}if(!jr(c,n,o))return t=a=i=0,n=128,o=191,s.prepend(c),Lr(r);if(n=128,o=191,t=t<<6|c&63,i+=1,i!==a)return null;var f=t;return t=a=i=0,f}}function fS(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return it;if(ri(i))return i;var a,n;jr(i,128,2047)?(a=1,n=192):jr(i,2048,65535)?(a=2,n=224):jr(i,65536,1114111)&&(a=3,n=240);for(var o=[(i>>6*a)+n];a>0;){var s=i>>6*(a-1);o.push(128|s&63),a-=1}return o}}za["UTF-8"]=function(e){return new fS(e)};La["UTF-8"]=function(e){return new lS(e)};function pS(e,r){var t=r.fatal;this.handler=function(i,a){if(a===zr)return it;if(ei(a))return a;var n=e[a-128];return n===null?Lr(t):n}}function dS(e,r){var t=r.fatal;this.handler=function(i,a){if(a===zr)return it;if(ri(a))return a;var n=os(a,e);return n===null&&wi(a),n+128}}(function(){"encoding-indexes"in global&&fb.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var t=r.name,i=Aa(t.toLowerCase());La[t]=function(a){return new pS(i,a)},za[t]=function(a){return new dS(i,a)}})})})();La.GBK=function(e){return new db(e)};za.GBK=function(e){return new hb(e,!0)};function db(e){var r=e.fatal,t=0,i=0,a=0;this.handler=function(n,o){if(o===zr&&t===0&&i===0&&a===0)return it;o===zr&&(t!==0||i!==0||a!==0)&&(t=0,i=0,a=0,Lr(r));var s;if(a!==0){s=null,jr(o,48,57)&&(s=oS((((t-129)*10+i-48)*126+a-129)*10+o-48));var c=[i,a,o];return t=0,i=0,a=0,s===null?(n.prepend(c),Lr(r)):s}if(i!==0)return jr(o,129,254)?(a=o,null):(n.prepend([i,o]),t=0,i=0,Lr(r));if(t!==0){if(jr(o,48,57))return i=o,null;var f=t,p=null;t=0;var m=o<127?64:65;return(jr(o,64,126)||jr(o,128,254))&&(p=(f-129)*190+(o-m)),s=p===null?null:ns(p,Aa("gb18030")),s===null&&ei(o)&&n.prepend(o),s===null?Lr(r):s}return ei(o)?o:o===128?8364:jr(o,129,254)?(t=o,null):Lr(r)}}function hb(e,r){var t=e.fatal;this.handler=function(i,a){if(a===zr)return it;if(ri(a))return a;if(a===58853)return wi(a);if(r&&a===8364)return 128;var n=os(a,Aa("gb18030"));if(n!==null){var o=gn(n/190)+129,s=n%190,c=s<63?64:65;return[o,s+c]}if(r)return wi(a);n=sS(a);var f=gn(n/10/126/10);n=n-f*10*126*10;var p=gn(n/10/126);n=n-p*10*126;var m=gn(n/10),h=n-m*10;return[f+129,p+48,m+129,h+48]}}za.gb18030=function(e){return new hb(e)};La.gb18030=function(e){return new db(e)};function hS(e){var r=e.fatal,t=0;this.handler=function(i,a){if(a===zr&&t!==0)return t=0,Lr(r);if(a===zr&&t===0)return it;if(t!==0){var n=t,o=null;t=0;var s=a<127?64:98;switch((jr(a,64,126)||jr(a,161,254))&&(o=(n-129)*157+(a-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:ns(o,Aa("big5"));return c===null&&ei(a)&&i.prepend(a),c===null?Lr(r):c}return ei(a)?a:jr(a,129,254)?(t=a,null):Lr(r)}}function mS(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return it;if(ri(i))return i;var a=cS(i);if(a===null)return wi(i);var n=gn(a/157)+129;if(n<161)return wi(i);var o=a%157,s=o<63?64:98;return[n,o+s]}}za.Big5=function(e){return new mS(e)};La.Big5=function(e){return new hS(e)};function vS(e){var r=e.fatal,t=!1,i=0;this.handler=function(a,n){if(n===zr&&i!==0)return i=0,Lr(r);if(n===zr&&i===0)return it;if(i===142&&jr(n,161,223))return i=0,65377-161+n;if(i===143&&jr(n,161,254))return t=!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=ns((o-161)*94+(n-161),Aa(t?"jis0212":"jis0208"))),t=!1,jr(n,161,254)||a.prepend(n),s===null?Lr(r):s}return ei(n)?n:n===142||n===143||jr(n,161,254)?(i=n,null):Lr(r)}}function gS(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return it;if(ri(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 a=os(i,Aa("jis0208"));if(a===null)return wi(i);var n=gn(a/94)+161,o=a%94+161;return[n,o]}}za["EUC-JP"]=function(e){return new gS(e)};La["EUC-JP"]=function(e){return new vS(e)};function bS(e){var r=e.fatal,t={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},i=t.ASCII,a=t.ASCII,n=0,o=!1;this.handler=function(s,c){switch(i){default:case t.ASCII:return c===27?(i=t.EscapeStart,null):jr(c,0,127)&&c!==14&&c!==15&&c!==27?(o=!1,c):c===zr?it:(o=!1,Lr(r));case t.Roman:return c===27?(i=t.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===zr?it:(o=!1,Lr(r));case t.Katakana:return c===27?(i=t.EscapeStart,null):jr(c,33,95)?(o=!1,65377-33+c):c===zr?it:(o=!1,Lr(r));case t.LeadByte:return c===27?(i=t.EscapeStart,null):jr(c,33,126)?(o=!1,n=c,i=t.TrailByte,null):c===zr?it:(o=!1,Lr(r));case t.TrailByte:if(c===27)return i=t.EscapeStart,Lr(r);if(jr(c,33,126)){i=t.LeadByte;var f=(n-33)*94+c-33,p=ns(f,Aa("jis0208"));return p===null?Lr(r):p}return c===zr?(i=t.LeadByte,s.prepend(c),Lr(r)):(i=t.LeadByte,Lr(r));case t.EscapeStart:return c===36||c===40?(n=c,i=t.Escape,null):(s.prepend(c),o=!1,i=a,Lr(r));case t.Escape:var m=n;n=0;var h=null;if(m===40&&c===66&&(h=t.ASCII),m===40&&c===74&&(h=t.Roman),m===40&&c===73&&(h=t.Katakana),m===36&&(c===64||c===66)&&(h=t.LeadByte),h!==null){i=i=h;var v=o;return o=!0,v?Lr(r):null}return s.prepend([m,c]),o=!1,i=a,Lr(r)}}}function yS(e){var r=e.fatal,t={ASCII:0,Roman:1,jis0208:2},i=t.ASCII;this.handler=function(a,n){if(n===zr&&i!==t.ASCII)return a.prepend(n),i=t.ASCII,[27,40,66];if(n===zr&&i===t.ASCII)return it;if((i===t.ASCII||i===t.Roman)&&(n===14||n===15||n===27))return wi(65533);if(i===t.ASCII&&ri(n))return n;if(i===t.Roman&&(ri(n)&&n!==92&&n!==126||n==165||n==8254)){if(ri(n))return n;if(n===165)return 92;if(n===8254)return 126}if(ri(n)&&i!==t.ASCII)return a.prepend(n),i=t.ASCII,[27,40,66];if((n===165||n===8254)&&i!==t.Roman)return a.prepend(n),i=t.Roman,[27,40,74];n===8722&&(n=65293);var o=os(n,Aa("jis0208"));if(o===null)return wi(n);if(i!==t.jis0208)return a.prepend(n),i=t.jis0208,[27,36,66];var s=gn(o/94)+33,c=o%94+33;return[s,c]}}za["ISO-2022-JP"]=function(e){return new yS(e)};La["ISO-2022-JP"]=function(e){return new bS(e)};function xS(e){var r=e.fatal,t=0;this.handler=function(i,a){if(a===zr&&t!==0)return t=0,Lr(r);if(a===zr&&t===0)return it;if(t!==0){var n=t,o=null;t=0;var s=a<127?64:65,c=n<160?129:193;if((jr(a,64,126)||jr(a,128,252))&&(o=(n-c)*188+a-s),jr(o,8836,10715))return 57344-8836+o;var f=o===null?null:ns(o,Aa("jis0208"));return f===null&&ei(a)&&i.prepend(a),f===null?Lr(r):f}return ei(a)||a===128?a:jr(a,161,223)?65377-161+a:jr(a,129,159)||jr(a,224,252)?(t=a,null):Lr(r)}}function wS(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return it;if(ri(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 a=uS(i);if(a===null)return wi(i);var n=gn(a/188),o=n<31?129:193,s=a%188,c=s<63?64:65;return[n+o,s+c]}}za.Shift_JIS=function(e){return new wS(e)};La.Shift_JIS=function(e){return new xS(e)};function kS(e){var r=e.fatal,t=0;this.handler=function(i,a){if(a===zr&&t!==0)return t=0,Lr(r);if(a===zr&&t===0)return it;if(t!==0){var n=t,o=null;t=0,jr(a,65,254)&&(o=(n-129)*190+(a-65));var s=o===null?null:ns(o,Aa("euc-kr"));return o===null&&ei(a)&&i.prepend(a),s===null?Lr(r):s}return ei(a)?a:jr(a,129,254)?(t=a,null):Lr(r)}}function _S(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return it;if(ri(i))return i;var a=os(i,Aa("euc-kr"));if(a===null)return wi(i);var n=gn(a/190)+129,o=a%190+65;return[n,o]}}za["EUC-KR"]=function(e){return new _S(e)};La["EUC-KR"]=function(e){return new kS(e)};function pl(e,r){var t=e>>8,i=e&255;return r?[t,i]:[i,t]}function mb(e,r){var t=r.fatal,i=null,a=null;this.handler=function(n,o){if(o===zr&&(i!==null||a!==null))return Lr(t);if(o===zr&&i===null&&a===null)return it;if(i===null)return i=o,null;var s;if(e?s=(i<<8)+o:s=(o<<8)+i,i=null,a!==null){var c=a;return a=null,jr(s,56320,57343)?65536+(c-55296)*1024+(s-56320):(n.prepend(pl(s,e)),Lr(t))}return jr(s,55296,56319)?(a=s,null):jr(s,56320,57343)?Lr(t):s}}function vb(e,r){var t=r.fatal;this.handler=function(i,a){if(a===zr)return it;if(jr(a,0,65535))return pl(a,e);var n=pl((a-65536>>10)+55296,e),o=pl((a-65536&1023)+56320,e);return n.concat(o)}}za["UTF-16BE"]=function(e){return new vb(!0,e)};La["UTF-16BE"]=function(e){return new mb(!0,e)};za["UTF-16LE"]=function(e){return new vb(!1,e)};La["UTF-16LE"]=function(e){return new mb(!1,e)};function jS(e){var r=e.fatal;this.handler=function(t,i){return i===zr?it:ei(i)?i:63360+i-128}}function ES(e){var r=e.fatal;this.handler=function(t,i){return i===zr?it:ri(i)?i:jr(i,63360,63487)?i-63360+128:wi(i)}}za["x-user-defined"]=function(e){return new ES(e)};La["x-user-defined"]=function(e){return new jS(e)};var SS="rejected",AS="fulfilled";function gb(e){let r=e.map(t=>t.then(i=>({status:AS,value:i})).catch(i=>({status:SS,reason:i})));return Promise.all(r)}function dl(e){return Buffer.from(e).toString("base64")}function td(e){return Buffer.from(e,"base64").toString("ascii")}var ti=class{constructor(r){this.map={},r instanceof ti?r.forEach((t,i)=>this.append(i,t)):Array.isArray(r)?r.forEach(t=>this.append(t[0],t[1])):r&&Object.getOwnPropertyNames(r).forEach(t=>this.append(t,r[t]))}append(r,t){r=_u(r),t=bb(t);let i=this.map[r];this.map[r]=i?`${i}, ${t}`:t}delete(r){delete this.map[_u(r)]}get(r){return r=_u(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(_u(r))}set(r,t){this.map[_u(r)]=bb(t)}forEach(r,t=null){for(let i in this.map)this.map.hasOwnProperty(i)&&(t?r.call(t,this.map[i],i,this):r(this.map[i],i,this))}keys(){let r=[];return this.forEach(function(t,i){r.push(i)}),ad(r)}values(){let r=[];return this.forEach(function(t){r.push(t)}),ad(r)}entries(){let r=[];return this.forEach(function(t,i){r.push([i,t])}),ad(r)}*[Symbol.iterator](){yield*this.entries()}};function _u(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 bb(e){return typeof e!="string"&&(e=String(e)),e}function ad(e){let r={next(){let t=e.shift();return{done:t===void 0,value:t}}};return r[Symbol.iterator]=function(){return r},r}function id(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var hl=Ja(require("zlib"));var DS=e=>e&&e instanceof ArrayBuffer,CS=e=>e&&e instanceof Buffer;function yb(e){let r=e.indexOf(","),t,i;return e.slice(r-7,r)===";base64"?(t=Buffer.from(e.slice(r+1),"base64"),i=e.slice(5,r-7).trim()):(t=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:nd(t),mimeType:i}}function nd(e){if(DS(e))return e;if(CS(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 xb(e,r){switch(r.get("content-encoding")){case"br":return e.pipe(hl.default.createBrotliDecompress());case"gzip":return e.pipe(hl.default.createGunzip());case"deflate":return e.pipe(hl.default.createDeflate());default:return e}}async function wb(e){let r=[];return await new Promise((t,i)=>{e.on("error",a=>i(a)),e.on("readable",()=>e.read()),e.on("data",a=>{typeof a=="string"&&i(new Error("Read stream not binary")),r.push(nd(a))}),e.on("end",()=>{let a=PS(r);t(a)})})}function PS(e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),t=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(t),a=0;for(let n of r)i.set(n,a),a+=n.byteLength;return i.buffer}var sd=Ja(require("stream")),TS=e=>typeof e=="boolean",kb=e=>typeof e=="function",FS=e=>e!==null&&typeof e=="object",od=e=>FS(e)&&kb(e.read)&&kb(e.pipe)&&TS(e.readable),ki=class{constructor(r,t){this.bodyUsed=!1;let{headers:i,status:a=200,statusText:n="OK",url:o}=t||{};this.url=o,this.ok=a===200,this.status=a,this.statusText=n,this.headers=new ti((t==null?void 0:t.headers)||{}),od(r)?this._body=xb(r,i):typeof r=="string"?this._body=sd.Readable.from([new TextEncoder().encode(r)]):this._body=sd.Readable.from([r||new ArrayBuffer(0)])}get body(){return id(!this.bodyUsed),id(od(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return od(this._body)?await wb(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 _b=Ja(require("http")),jb=Ja(require("https"));var ud=Ja(require("fs"));async function cd(e,r){let t=e.split("?")[0];try{let i=await new Promise((s,c)=>{let f=ud.default.createReadStream(t,{encoding:null});f.once("readable",()=>s(f)),f.on("error",p=>c(p))}),a=200,n="OK",o=qS(t);return new ki(i,{headers:o,status:a,statusText:n,url:e})}catch(i){let a=400,n=i.message,o={};return new ki(i.message,{headers:o,status:a,statusText:n,url:e})}}function qS(e){let r={};if(!r["content-length"]){let t=ud.default.statSync(e);r["content-length"]=t.size}return e.endsWith(".gz")&&(e=e.slice(0,-3),r["content-encoding"]="gzip"),new ti(r)}var ld=e=>e.startsWith("data:"),BS=e=>e.startsWith("http:")||e.startsWith("https:");async function ju(e,r){try{if(!BS(e)&&!ld(e))return await cd(e,r);if(ld(e)){let{arrayBuffer:f,mimeType:p}=yb(e);return new ki(f,{headers:{"content-type":p},url:e})}let t={},i=e;e.endsWith(".gz")&&(e=e.slice(0,-3),t["content-encoding"]="gzip");let a=await IS(i,r),n=LS(e,a,t),{status:o,statusText:s}=zS(a),c=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&c){let f=OS(e,n.get("location"));return await ju(f,r)}return new ki(a,{headers:n,status:o,statusText:s,url:e})}catch(t){return new ki(null,{status:400,statusText:String(t),url:e})}}async function IS(e,r){return await new Promise((t,i)=>{let a=RS(e,r),n=e.startsWith("https:")?jb.default.request(a,o=>t(o)):_b.default.request(a,o=>t(o));n.on("error",o=>i(o)),n.end()})}function OS(e,r){if(r.startsWith("http"))return r;let t=new URL(e);return t.pathname=r,t.href}function RS(e,r){let t=(r==null?void 0:r.headers)||{},i={};for(let n of Object.keys(t))i[n.toLowerCase()]=t[n];i["accept-encoding"]=i["accept-encoding"]||"gzip,br,deflate";let a=new URL(e);return bi(va(va({hostname:a.hostname,path:a.pathname,method:"GET"},r),r==null?void 0:r.fetch),{headers:i,port:a.port})}function zS(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function LS(e,r,t={}){let i={};if(r&&r.headers){let a=r.headers;for(let n in a){let o=a[n];i[n.toLowerCase()]=String(o)}}if(!i["content-length"]){let a=NS(e);Number.isFinite(a)&&(i["content-length"]=a)}return Object.assign(i,t),new ti(i)}function NS(e){return ld(e)?e.length-"data:".length:null}var x2=Ja(b2()),w2=Ja(Fu());function y2(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function eC(e,r){let t=r.type?r.type.replace("image/",""):"jpeg",i=(0,w2.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,x2.default)(i,t,r)}function uh(e,r){let t=eC(e,r);return new Promise(i=>{let a=[];t.on("data",n=>a.push(n)),t.on("end",()=>{let n=Buffer.concat(a);i(y2(n))})})}var eE=Ja(Z8()),rE=["image/png","image/jpeg","image/gif"];async function p0(e,r){if(!r)throw new Error("MIMEType is required to parse image under Node.js");let t=e instanceof Buffer?e:Buffer.from(e);return await pN(t,r)}function pN(e,r){return new Promise(t=>(0,eE.default)(e,r,(i,a)=>{if(i)throw i;let n=[...a.shape],o=a.shape.length===4?a.shape.shift():1,s=a.data instanceof Buffer?new Uint8Array(a.data):a.data;t({shape:n,data:s,width:a.shape[0],height:a.shape[1],components:a.shape[2],layers:o?[o]:[]})}))}var iE=Ja(aE());delete global.ReadableStream;var Dc=class extends iE.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:t}=this;for(this.isWorking=!0;!this.isCancelled&&(r.desiredSize||0)>0;){let i;try{i=t.next()}catch(a){r.error(a);break}i&&(!i.done&&!this.isCancelled?r.enqueue(i.value):r.close())}this.isWorking=!1}pull(r){this.isWorking||this.work(r)}cancel(){this.isCancelled=!0}};var h0=class extends Dc{constructor(r){super(new d0(r.values()),{type:"bytes"});this._chunks=r}async*[Symbol.asyncIterator](r){let t=this.getReader();yield*this._chunks,t.releaseLock()}};var vo=class{constructor(r=[],t={}){this.parts=[],this.size=0;for(let i of r)if(typeof i=="string"){let a=new TextEncoder().encode(i);this.parts.push(a),this.size+=a.byteLength}else if(i instanceof vo)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:a,byteOffset:n,byteLength:o}=i;this.parts.push(new Uint8Array(a,n,o)),this.size+=o}else{let a=new TextEncoder().encode(String(i));this.parts.push(a),this.size+=a.byteLength}this.type=dN(t.type)}slice(r=0,t=this.size,i=""){let{size:a,parts:n}=this,o=r<0?Math.max(a+r,0):Math.min(r,a),s=t<0?Math.max(a+t,0):Math.min(t,a),c=Math.max(s-o,0),f=new vo([],{type:i});if(c===0)return f;let p=0,m=[];for(let h of n){let{byteLength:v}=h;if(o>0&&v<=o)o-=v,s-=v;else{let y=h.subarray(o,Math.min(v,s));if(m.push(y),p+=y.byteLength,o=0,p>=c)break}}return f.parts=m,f.size=p,f}async arrayBuffer(){return this._toArrayBuffer()}async text(){let r=new TextDecoder,t="";for(let i of this.parts)t+=r.decode(i);return t}stream(){return new h0(this.parts)}toString(){return"[object Blob]"}get[Symbol.toStringTag](){return"Blob"}_toArrayBuffer(){let r=new ArrayBuffer(this.size),t=new Uint8Array(r),i=0;for(let a of this.parts)t.set(a,i),i+=a.byteLength;return r}};function dN(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}var m0=class extends vo{constructor(r,t,i={}){super(r,i);this.name="";this.webkitRelativePath="";this.name=String(t).replace(/\//g,":"),this.lastModified=(i==null?void 0:i.lastModified)||Date.now()}get[Symbol.toStringTag](){return"File"}};var mN=!xi||!("TextEncoder"in Et);mN&&(Et.TextEncoder=ku);var vN=!xi||!("TextDecoder"in Et);vN&&(Et.TextDecoder=So);!xi&&!("atob"in Et)&&dl&&(Et.atob=dl);!xi&&!("btoa"in Et)&&td&&(Et.btoa=td);!xi&&!("Headers"in Et)&&ti&&(Et.Headers=ti);!xi&&!("Response"in Et)&&ki&&(Et.Response=ki);!xi&&!("fetch"in Et)&&ju&&(Et.fetch=ju);!xi&&!("DOMParser"in Et)&&v0.DOMParser&&(Et.DOMParser=v0.DOMParser);!xi&&!("_encodeImageNode"in Et)&&uh&&(Et._encodeImageNode=uh);!xi&&!("_parseImageNode"in Et)&&p0&&(Et._parseImageNode=p0,Et._imageFormatsNode=rE);"allSettled"in Promise||(Promise.allSettled=gb);var nE="3.4.13";var gN={draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}},oE={name:"Draco",id:_o?"draco":"draco-nodejs",module:"draco",shapes:["mesh"],version:nE,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:gN};function g0(e){let r=1/0,t=1/0,i=1/0,a=-1/0,n=-1/0,o=-1/0,s=e.POSITION?e.POSITION.value:[],c=s&&s.length;for(let f=0;f<c;f+=3){let p=s[f],m=s[f+1],h=s[f+2];r=p<r?p:r,t=m<t?m:t,i=h<i?h:i,a=p>a?p:a,n=m>n?m:n,o=h>o?h:o}return[[r,t,i],[a,n,o]]}function sE(e,r){if(!e)throw new Error(r||"loader assertion failed.")}var di=class{constructor(r,t){sE(Array.isArray(r)),bN(r),this.fields=r,this.metadata=t||new Map}compareTo(r){if(this.metadata!==r.metadata||this.fields.length!==r.fields.length)return!1;for(let t=0;t<this.fields.length;++t)if(!this.fields[t].compareTo(r.fields[t]))return!1;return!0}select(...r){let t=Object.create(null);for(let a of r)t[a]=!0;let i=this.fields.filter(a=>t[a.name]);return new di(i,this.metadata)}selectAt(...r){let t=r.map(i=>this.fields[i]).filter(Boolean);return new di(t,this.metadata)}assign(r){let t,i=this.metadata;if(r instanceof di){let o=r;t=o.fields,i=uE(uE(new Map,this.metadata),o.metadata)}else t=r;let a=Object.create(null);for(let o of this.fields)a[o.name]=o;for(let o of t)a[o.name]=o;let n=Object.values(a);return new di(n,i)}};function bN(e){let r={};for(let t of e)r[t.name]&&console.warn("Schema: duplicated field name",t.name,t),r[t.name]=!0}function uE(e,r){return new Map([...e||new Map,...r||new Map])}var Bn=class{constructor(r,t,i=!1,a=new Map){this.name=r,this.type=t,this.nullable=i,this.metadata=a}get typeId(){return this.type&&this.type.typeId}clone(){return new Bn(this.name,this.type,this.nullable,this.metadata)}compareTo(r){return this.name===r.name&&this.type===r.type&&this.nullable===r.nullable&&this.metadata===r.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?`, metadata: ${this.metadata}`:""}`}};var Ur;(function(Q){Q[Q.NONE=0]="NONE",Q[Q.Null=1]="Null",Q[Q.Int=2]="Int",Q[Q.Float=3]="Float",Q[Q.Binary=4]="Binary",Q[Q.Utf8=5]="Utf8",Q[Q.Bool=6]="Bool",Q[Q.Decimal=7]="Decimal",Q[Q.Date=8]="Date",Q[Q.Time=9]="Time",Q[Q.Timestamp=10]="Timestamp",Q[Q.Interval=11]="Interval",Q[Q.List=12]="List",Q[Q.Struct=13]="Struct",Q[Q.Union=14]="Union",Q[Q.FixedSizeBinary=15]="FixedSizeBinary",Q[Q.FixedSizeList=16]="FixedSizeList",Q[Q.Map=17]="Map",Q[Q.Dictionary=-1]="Dictionary",Q[Q.Int8=-2]="Int8",Q[Q.Int16=-3]="Int16",Q[Q.Int32=-4]="Int32",Q[Q.Int64=-5]="Int64",Q[Q.Uint8=-6]="Uint8",Q[Q.Uint16=-7]="Uint16",Q[Q.Uint32=-8]="Uint32",Q[Q.Uint64=-9]="Uint64",Q[Q.Float16=-10]="Float16",Q[Q.Float32=-11]="Float32",Q[Q.Float64=-12]="Float64",Q[Q.DateDay=-13]="DateDay",Q[Q.DateMillisecond=-14]="DateMillisecond",Q[Q.TimestampSecond=-15]="TimestampSecond",Q[Q.TimestampMillisecond=-16]="TimestampMillisecond",Q[Q.TimestampMicrosecond=-17]="TimestampMicrosecond",Q[Q.TimestampNanosecond=-18]="TimestampNanosecond",Q[Q.TimeSecond=-19]="TimeSecond",Q[Q.TimeMillisecond=-20]="TimeMillisecond",Q[Q.TimeMicrosecond=-21]="TimeMicrosecond",Q[Q.TimeNanosecond=-22]="TimeNanosecond",Q[Q.DenseUnion=-23]="DenseUnion",Q[Q.SparseUnion=-24]="SparseUnion",Q[Q.IntervalDayTime=-25]="IntervalDayTime",Q[Q.IntervalYearMonth=-26]="IntervalYearMonth"})(Ur||(Ur={}));var qa=class{static isNull(r){return r&&r.typeId===Ur.Null}static isInt(r){return r&&r.typeId===Ur.Int}static isFloat(r){return r&&r.typeId===Ur.Float}static isBinary(r){return r&&r.typeId===Ur.Binary}static isUtf8(r){return r&&r.typeId===Ur.Utf8}static isBool(r){return r&&r.typeId===Ur.Bool}static isDecimal(r){return r&&r.typeId===Ur.Decimal}static isDate(r){return r&&r.typeId===Ur.Date}static isTime(r){return r&&r.typeId===Ur.Time}static isTimestamp(r){return r&&r.typeId===Ur.Timestamp}static isInterval(r){return r&&r.typeId===Ur.Interval}static isList(r){return r&&r.typeId===Ur.List}static isStruct(r){return r&&r.typeId===Ur.Struct}static isUnion(r){return r&&r.typeId===Ur.Union}static isFixedSizeBinary(r){return r&&r.typeId===Ur.FixedSizeBinary}static isFixedSizeList(r){return r&&r.typeId===Ur.FixedSizeList}static isMap(r){return r&&r.typeId===Ur.Map}static isDictionary(r){return r&&r.typeId===Ur.Dictionary}get typeId(){return Ur.NONE}compareTo(r){return this===r}},b0=class extends qa{get typeId(){return Ur.Null}get[Symbol.toStringTag](){return"Null"}toString(){return"Null"}},y0=class extends qa{get typeId(){return Ur.Bool}get[Symbol.toStringTag](){return"Bool"}toString(){return"Bool"}},In=class extends qa{constructor(r,t){super();this.isSigned=r,this.bitWidth=t}get typeId(){return Ur.Int}get[Symbol.toStringTag](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}},Cc=class extends In{constructor(){super(!0,8)}},Pc=class extends In{constructor(){super(!0,16)}},Tc=class extends In{constructor(){super(!0,32)}};var Fc=class extends In{constructor(){super(!1,8)}},qc=class extends In{constructor(){super(!1,16)}},Bc=class extends In{constructor(){super(!1,32)}};var cE={HALF:16,SINGLE:32,DOUBLE:64},Ic=class extends qa{constructor(r){super();this.precision=r}get typeId(){return Ur.Float}get[Symbol.toStringTag](){return"Float"}toString(){return`Float${this.precision}`}};var Oc=class extends Ic{constructor(){super(cE.SINGLE)}},Rc=class extends Ic{constructor(){super(cE.DOUBLE)}},x0=class extends qa{constructor(){super()}get typeId(){return Ur.Binary}toString(){return"Binary"}get[Symbol.toStringTag](){return"Binary"}},w0=class extends qa{get typeId(){return Ur.Utf8}get[Symbol.toStringTag](){return"Utf8"}toString(){return"Utf8"}},yN={DAY:0,MILLISECOND:1},k0=class extends qa{constructor(r){super();this.unit=r}get typeId(){return Ur.Date}get[Symbol.toStringTag](){return"Date"}toString(){return`Date${(this.unit+1)*32}<${yN[this.unit]}>`}};var lE={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9},_0=class extends qa{constructor(r,t){super();this.unit=r,this.bitWidth=t}get typeId(){return Ur.Time}toString(){return`Time${this.bitWidth}<${lE[this.unit]}>`}get[Symbol.toStringTag](){return"Time"}};var j0=class extends qa{constructor(r,t=null){super();this.unit=r,this.timezone=t}get typeId(){return Ur.Timestamp}get[Symbol.toStringTag](){return"Timestamp"}toString(){return`Timestamp<${lE[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};var xN={DAY_TIME:0,YEAR_MONTH:1},E0=class extends qa{constructor(r){super();this.unit=r}get typeId(){return Ur.Interval}get[Symbol.toStringTag](){return"Interval"}toString(){return`Interval<${xN[this.unit]}>`}};var zc=class extends qa{constructor(r,t){super();this.listSize=r,this.children=[t]}get typeId(){return Ur.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[Symbol.toStringTag](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}},S0=class extends qa{constructor(r){super();this.children=r}get typeId(){return Ur.Struct}toString(){return`Struct<{${this.children.map(r=>`${r.name}:${r.type}`).join(", ")}}>`}get[Symbol.toStringTag](){return"Struct"}};function fE(e){switch(e.constructor){case Int8Array:return new Cc;case Uint8Array:return new Fc;case Int16Array:return new Pc;case Uint16Array:return new qc;case Int32Array:return new Tc;case Uint32Array:return new Bc;case Float32Array:return new Oc;case Float64Array:return new Rc;default:throw new Error("array type not supported")}}function A0(e,r,t){let i=fE(r.value),a=t||pE(r);return new Bn(e,new zc(r.size,new Bn("value",i)),!1,a)}function pE(e){let r=new Map;return"byteOffset"in e&&r.set("byteOffset",e.byteOffset.toString(10)),"byteStride"in e&&r.set("byteStride",e.byteStride.toString(10)),"normalized"in e&&r.set("normalized",e.normalized.toString()),r}function dE(e,r,t){let i=mE(r.metadata),a=[],n=BN(r.attributes);for(let o in e){let s=e[o],c=hE(o,s,n[o]);a.push(c)}if(t){let o=hE("indices",t);a.push(o)}return new di(a,i)}function BN(e){let r={};for(let t in e){let i=e[t];r[i.name||"undefined"]=i}return r}function hE(e,r,t){let i=t?mE(t.metadata):void 0;return A0(e,r,i)}function mE(e){let r=new Map;for(let t in e)r.set(`${t}.string`,JSON.stringify(e[t]));return r}var vE={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},IN={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},ON=4,fp=class{constructor(r){this.draco=r,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(r,t={}){let i=new this.draco.DecoderBuffer;i.Init(new Int8Array(r),r.byteLength),this._disableAttributeTransforms(t);let a=this.decoder.GetEncodedGeometryType(i),n=a===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let o;switch(a){case this.draco.TRIANGULAR_MESH:o=this.decoder.DecodeBufferToMesh(i,n);break;case this.draco.POINT_CLOUD:o=this.decoder.DecodeBufferToPointCloud(i,n);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!o.ok()||!n.ptr){let h=`DRACO decompression failed: ${o.error_msg()}`;throw new Error(h)}let s=this._getDracoLoaderData(n,a,t),c=this._getMeshData(n,s,t),f=g0(c.attributes),p=dE(c.attributes,s,c.indices);return bi(va({loader:"draco",loaderData:s,header:{vertexCount:n.num_points(),boundingBox:f}},c),{schema:p})}finally{this.draco.destroy(i),n&&this.draco.destroy(n)}}_getDracoLoaderData(r,t,i){let a=this._getTopLevelMetadata(r),n=this._getDracoAttributes(r,i);return{geometry_type:t,num_attributes:r.num_attributes(),num_points:r.num_points(),num_faces:r instanceof this.draco.Mesh?r.num_faces():0,metadata:a,attributes:n}}_getDracoAttributes(r,t){let i={};for(let a=0;a<r.num_attributes();a++){let n=this.decoder.GetAttribute(r,a),o=this._getAttributeMetadata(r,a);i[n.unique_id()]={unique_id:n.unique_id(),attribute_type:n.attribute_type(),data_type:n.data_type(),num_components:n.num_components(),byte_offset:n.byte_offset(),byte_stride:n.byte_stride(),normalized:n.normalized(),attribute_index:a,metadata:o};let s=this._getQuantizationTransform(n,t);s&&(i[n.unique_id()].quantization_transform=s);let c=this._getOctahedronTransform(n,t);c&&(i[n.unique_id()].octahedron_transform=c)}return i}_getMeshData(r,t,i){let a=this._getMeshAttributes(t,r,i);if(!a.POSITION)throw new Error("DRACO: No position attribute found.");if(r instanceof this.draco.Mesh)switch(i.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:a,indices:{value:this._getTriangleStripIndices(r),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:a,indices:{value:this._getTriangleListIndices(r),size:1}}}return{topology:"point-list",mode:0,attributes:a}}_getMeshAttributes(r,t,i){let a={};for(let n of Object.values(r.attributes)){let o=this._deduceAttributeName(n,i);n.name=o;let{value:s,size:c}=this._getAttributeValues(t,n);a[o]={value:s,size:c,byteOffset:n.byte_offset,byteStride:n.byte_stride,normalized:n.normalized}}return a}_getTriangleListIndices(r){let i=r.num_faces()*3,a=i*ON,n=this.draco._malloc(a);try{return this.decoder.GetTrianglesUInt32Array(r,a,n),new Uint32Array(this.draco.HEAPF32.buffer,n,i).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(r){let t=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(r,t),LN(t)}finally{this.draco.destroy(t)}}_getAttributeValues(r,t){let i=IN[t.data_type],a=t.num_components,o=r.num_points()*a,s=o*i.BYTES_PER_ELEMENT,c=RN(this.draco,i),f,p=this.draco._malloc(s);try{let m=this.decoder.GetAttribute(r,t.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(r,m,c,s,p),f=new i(this.draco.HEAPF32.buffer,p,o).slice()}finally{this.draco._free(p)}return{value:f,size:a}}_deduceAttributeName(r,t){let i=r.unique_id;for(let[o,s]of Object.entries(t.extraAttributes||{}))if(s===i)return o;let a=r.attribute_type;for(let o in vE)if(this.draco[o]===a)return vE[o];let n=t.attributeNameEntry||"name";return r.metadata[n]?r.metadata[n].string:`CUSTOM_ATTRIBUTE_${i}`}_getTopLevelMetadata(r){let t=this.decoder.GetMetadata(r);return this._getDracoMetadata(t)}_getAttributeMetadata(r,t){let i=this.decoder.GetAttributeMetadata(r,t);return this._getDracoMetadata(i)}_getDracoMetadata(r){if(!r||!r.ptr)return{};let t={},i=this.metadataQuerier.NumEntries(r);for(let a=0;a<i;a++){let n=this.metadataQuerier.GetEntryName(r,a);t[n]=this._getDracoMetadataField(r,n)}return t}_getDracoMetadataField(r,t){let i=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(r,t,i);let a=zN(i);return{int:this.metadataQuerier.GetIntEntry(r,t),string:this.metadataQuerier.GetStringEntry(r,t),double:this.metadataQuerier.GetDoubleEntry(r,t),intArray:a}}finally{this.draco.destroy(i)}}_disableAttributeTransforms(r){let{quantizedAttributes:t=[],octahedronAttributes:i=[]}=r,a=[...t,...i];for(let n of a)this.decoder.SkipAttributeTransform(this.draco[n])}_getQuantizationTransform(r,t){let{quantizedAttributes:i=[]}=t,a=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(a)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits(),range:o.range(),min_values:new Float32Array([1,2,3]).map(s=>o.min_value(s))}}finally{this.draco.destroy(o)}}return null}_getOctahedronTransform(r,t){let{octahedronAttributes:i=[]}=t,a=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(a)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits()}}finally{this.draco.destroy(o)}}return null}};function RN(e,r){switch(r){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32;default:return e.DT_INVALID}}function zN(e){let r=e.size(),t=new Int32Array(r);for(let i=0;i<r;i++)t[i]=e.GetValue(i);return t}function LN(e){let r=e.size(),t=new Int32Array(r);for(let i=0;i<r;i++)t[i]=e.GetValue(i);return t}var NN="1.5.5",MN="1.4.1",D0=`https://www.gstatic.com/draco/versioned/decoders/${NN}`,UN=`${D0}/draco_decoder.js`,HN=`${D0}/draco_wasm_wrapper.js`,VN=`${D0}/draco_decoder.wasm`,lY=`https://raw.githubusercontent.com/google/draco/${MN}/javascript/draco_encoder.js`,Lc;async function gE(e){let r=e.modules||{};return r.draco3d?Lc=Lc||r.draco3d.createDecoderModule({}).then(t=>({draco:t})):Lc=Lc||$N(e),await Lc}async function $N(e){let r,t;switch(e.draco&&e.draco.decoderType){case"js":r=await su(UN,"draco",e);break;case"wasm":default:[r,t]=await Promise.all([await su(HN,"draco",e),await su(VN,"draco",e)])}return r=r||globalThis.DracoDecoderModule,await WN(r,t)}function WN(e,r){let t={};return r&&(t.wasmBinary=r),new Promise(i=>{e(bi(va({},t),{onModuleLoaded:a=>i({draco:a})}))})}var bE=bi(va({},oE),{parse:GN});async function GN(e,r){let{draco:t}=await gE(r),i=new fp(t);try{return i.parseSync(e,r==null?void 0:r.draco)}finally{i.destroy()}}qp(bE);
97
97
  /*!
98
98
  * Copyright 2010 LearnBoost <dev@learnboost.com>
99
99
  *