@ermis-network/ermis-chat-sdk 1.0.1 → 1.0.3

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.
@@ -1,24 +1,24 @@
1
- "use strict";var ErmisChatSDK=(()=>{var nu=Object.create;var is=Object.defineProperty;var su=Object.getOwnPropertyDescriptor;var iu=Object.getOwnPropertyNames;var au=Object.getPrototypeOf,ru=Object.prototype.hasOwnProperty;var I=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var ou=(n,e)=>()=>(n&&(e=n(n=0)),e);var w=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),ri=(n,e)=>{for(var t in e)is(n,t,{get:e[t],enumerable:!0})},sr=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of iu(e))!ru.call(n,i)&&i!==t&&is(n,i,{get:()=>e[i],enumerable:!(s=su(e,i))||s.enumerable});return n};var Re=(n,e,t)=>(t=n!=null?nu(au(n)):{},sr(e||!n||!n.__esModule?is(t,"default",{value:n,enumerable:!0}):t,n)),gn=n=>sr(is({},"__esModule",{value:!0}),n);var gr=w((ib,hr)=>{"use strict";var fr=I("stream").Stream,Hu=I("util");hr.exports=He;function He(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}Hu.inherits(He,fr);He.create=function(n,e){var t=new this;e=e||{};for(var s in e)t[s]=e[s];t.source=n;var i=n.emit;return n.emit=function(){return t._handleEmit(arguments),i.apply(n,arguments)},n.on("error",function(){}),t.pauseStream&&n.pause(),t};Object.defineProperty(He.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});He.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};He.prototype.resume=function(){this._released||this.release(),this.source.resume()};He.prototype.pause=function(){this.source.pause()};He.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(n){this.emit.apply(this,n)}.bind(this)),this._bufferedEvents=[]};He.prototype.pipe=function(){var n=fr.prototype.pipe.apply(this,arguments);return this.resume(),n};He.prototype._handleEmit=function(n){if(this._released){this.emit.apply(this,n);return}n[0]==="data"&&(this.dataSize+=n[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(n)};He.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(n))}}});var _r=w((ab,vr)=>{"use strict";var Ku=I("util"),xr=I("stream").Stream,br=gr();vr.exports=oe;function oe(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}Ku.inherits(oe,xr);oe.create=function(n){var e=new this;n=n||{};for(var t in n)e[t]=n[t];return e};oe.isStreamLike=function(n){return typeof n!="function"&&typeof n!="string"&&typeof n!="boolean"&&typeof n!="number"&&!Buffer.isBuffer(n)};oe.prototype.append=function(n){var e=oe.isStreamLike(n);if(e){if(!(n instanceof br)){var t=br.create(n,{maxDataSize:1/0,pauseStream:this.pauseStreams});n.on("data",this._checkDataSize.bind(this)),n=t}this._handleErrors(n),this.pauseStreams&&n.pause()}return this._streams.push(n),this};oe.prototype.pipe=function(n,e){return xr.prototype.pipe.call(this,n,e),this.resume(),n};oe.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};oe.prototype._realGetNext=function(){var n=this._streams.shift();if(typeof n>"u"){this.end();return}if(typeof n!="function"){this._pipeNext(n);return}var e=n;e(function(t){var s=oe.isStreamLike(t);s&&(t.on("data",this._checkDataSize.bind(this)),this._handleErrors(t)),this._pipeNext(t)}.bind(this))};oe.prototype._pipeNext=function(n){this._currentStream=n;var e=oe.isStreamLike(n);if(e){n.on("end",this._getNext.bind(this)),n.pipe(this,{end:!1});return}var t=n;this.write(t),this._getNext()};oe.prototype._handleErrors=function(n){var e=this;n.on("error",function(t){e._emitError(t)})};oe.prototype.write=function(n){this.emit("data",n)};oe.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};oe.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};oe.prototype.end=function(){this._reset(),this.emit("end")};oe.prototype.destroy=function(){this._reset(),this.emit("close")};oe.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};oe.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(n))}};oe.prototype._updateDataSize=function(){this.dataSize=0;var n=this;this._streams.forEach(function(e){e.dataSize&&(n.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};oe.prototype._emitError=function(n){this._reset(),this.emit("error",n)}});var _n={};ri(_n,{default:()=>_t});var _t,lt=ou(()=>{"use strict";_t=null});var yr=w((rb,Ju)=>{Ju.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var Cr=w((ob,wr)=>{"use strict";wr.exports=yr()});var Rr=w(Ie=>{"use strict";var ps=Cr(),Xu=I("path").extname,Er=/^\s*([^;\s]*)(?:;|\s|$)/,Qu=/^text\//i;Ie.charset=Sr;Ie.charsets={lookup:Sr};Ie.contentType=Yu;Ie.extension=Zu;Ie.extensions=Object.create(null);Ie.lookup=ed;Ie.types=Object.create(null);td(Ie.extensions,Ie.types);function Sr(n){if(!n||typeof n!="string")return!1;var e=Er.exec(n),t=e&&ps[e[1].toLowerCase()];return t&&t.charset?t.charset:e&&Qu.test(e[1])?"UTF-8":!1}function Yu(n){if(!n||typeof n!="string")return!1;var e=n.indexOf("/")===-1?Ie.lookup(n):n;if(!e)return!1;if(e.indexOf("charset")===-1){var t=Ie.charset(e);t&&(e+="; charset="+t.toLowerCase())}return e}function Zu(n){if(!n||typeof n!="string")return!1;var e=Er.exec(n),t=e&&Ie.extensions[e[1].toLowerCase()];return!t||!t.length?!1:t[0]}function ed(n){if(!n||typeof n!="string")return!1;var e=Xu("x."+n).toLowerCase().substr(1);return e&&Ie.types[e]||!1}function td(n,e){var t=["nginx","apache",void 0,"iana"];Object.keys(ps).forEach(function(i){var a=ps[i],r=a.extensions;if(!(!r||!r.length)){n[i]=r;for(var o=0;o<r.length;o++){var l=r[o];if(e[l]){var c=t.indexOf(ps[e[l]].source),p=t.indexOf(a.source);if(e[l]!=="application/octet-stream"&&(c>p||c===p&&e[l].substr(0,12)==="application/"))continue}e[l]=i}}})}});var kr=w((lb,Tr)=>{"use strict";Tr.exports=nd;function nd(n){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(n):setTimeout(n,0)}});var li=w((pb,Ir)=>{"use strict";var Ar=kr();Ir.exports=sd;function sd(n){var e=!1;return Ar(function(){e=!0}),function(s,i){e?n(s,i):Ar(function(){n(s,i)})}}});var pi=w((ub,Dr)=>{"use strict";Dr.exports=id;function id(n){Object.keys(n.jobs).forEach(ad.bind(n)),n.jobs={}}function ad(n){typeof this.jobs[n]=="function"&&this.jobs[n]()}});var ui=w((db,Ur)=>{"use strict";var Or=li(),rd=pi();Ur.exports=od;function od(n,e,t,s){var i=t.keyedList?t.keyedList[t.index]:t.index;t.jobs[i]=cd(e,i,n[i],function(a,r){i in t.jobs&&(delete t.jobs[i],a?rd(t):t.results[i]=r,s(a,t.results))})}function cd(n,e,t,s){var i;return n.length==2?i=n(t,Or(s)):i=n(t,e,Or(s)),i}});var di=w((mb,Lr)=>{"use strict";Lr.exports=ld;function ld(n,e){var t=!Array.isArray(n),s={index:0,keyedList:t||e?Object.keys(n):null,jobs:{},results:t?{}:[],size:t?Object.keys(n).length:n.length};return e&&s.keyedList.sort(t?e:function(i,a){return e(n[i],n[a])}),s}});var mi=w((fb,Fr)=>{"use strict";var pd=pi(),ud=li();Fr.exports=dd;function dd(n){Object.keys(this.jobs).length&&(this.index=this.size,pd(this),ud(n)(null,this.results))}});var Mr=w((hb,Pr)=>{"use strict";var md=ui(),fd=di(),hd=mi();Pr.exports=gd;function gd(n,e,t){for(var s=fd(n);s.index<(s.keyedList||n).length;)md(n,e,s,function(i,a){if(i){t(i,a);return}if(Object.keys(s.jobs).length===0){t(null,s.results);return}}),s.index++;return hd.bind(s,t)}});var fi=w((gb,us)=>{"use strict";var jr=ui(),bd=di(),xd=mi();us.exports=vd;us.exports.ascending=Nr;us.exports.descending=_d;function vd(n,e,t,s){var i=bd(n,t);return jr(n,e,i,function a(r,o){if(r){s(r,o);return}if(i.index++,i.index<(i.keyedList||n).length){jr(n,e,i,a);return}s(null,i.results)}),xd.bind(i,s)}function Nr(n,e){return n<e?-1:n>e?1:0}function _d(n,e){return-1*Nr(n,e)}});var Gr=w((bb,qr)=>{"use strict";var yd=fi();qr.exports=wd;function wd(n,e,t){return yd(n,e,null,t)}});var $r=w((xb,Br)=>{"use strict";Br.exports={parallel:Mr(),serial:Gr(),serialOrdered:fi()}});var hi=w((vb,zr)=>{"use strict";zr.exports=Object});var Vr=w((_b,Wr)=>{"use strict";Wr.exports=Error});var Kr=w((yb,Hr)=>{"use strict";Hr.exports=EvalError});var Xr=w((wb,Jr)=>{"use strict";Jr.exports=RangeError});var Yr=w((Cb,Qr)=>{"use strict";Qr.exports=ReferenceError});var eo=w((Eb,Zr)=>{"use strict";Zr.exports=SyntaxError});var ds=w((Sb,to)=>{"use strict";to.exports=TypeError});var so=w((Rb,no)=>{"use strict";no.exports=URIError});var ao=w((Tb,io)=>{"use strict";io.exports=Math.abs});var oo=w((kb,ro)=>{"use strict";ro.exports=Math.floor});var lo=w((Ab,co)=>{"use strict";co.exports=Math.max});var uo=w((Ib,po)=>{"use strict";po.exports=Math.min});var fo=w((Db,mo)=>{"use strict";mo.exports=Math.pow});var go=w((Ob,ho)=>{"use strict";ho.exports=Math.round});var xo=w((Ub,bo)=>{"use strict";bo.exports=Number.isNaN||function(e){return e!==e}});var _o=w((Lb,vo)=>{"use strict";var Cd=xo();vo.exports=function(e){return Cd(e)||e===0?e:e<0?-1:1}});var wo=w((Fb,yo)=>{"use strict";yo.exports=Object.getOwnPropertyDescriptor});var gi=w((Pb,Co)=>{"use strict";var ms=wo();if(ms)try{ms([],"length")}catch{ms=null}Co.exports=ms});var So=w((Mb,Eo)=>{"use strict";var fs=Object.defineProperty||!1;if(fs)try{fs({},"a",{value:1})}catch{fs=!1}Eo.exports=fs});var bi=w((jb,Ro)=>{"use strict";Ro.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),s=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(s)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var r=Object.getOwnPropertySymbols(e);if(r.length!==1||r[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==i||o.enumerable!==!0)return!1}return!0}});var Ao=w((Nb,ko)=>{"use strict";var To=typeof Symbol<"u"&&Symbol,Ed=bi();ko.exports=function(){return typeof To!="function"||typeof Symbol!="function"||typeof To("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ed()}});var xi=w((qb,Io)=>{"use strict";Io.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var vi=w((Gb,Do)=>{"use strict";var Sd=hi();Do.exports=Sd.getPrototypeOf||null});var Lo=w((Bb,Uo)=>{"use strict";var Rd="Function.prototype.bind called on incompatible ",Td=Object.prototype.toString,kd=Math.max,Ad="[object Function]",Oo=function(e,t){for(var s=[],i=0;i<e.length;i+=1)s[i]=e[i];for(var a=0;a<t.length;a+=1)s[a+e.length]=t[a];return s},Id=function(e,t){for(var s=[],i=t||0,a=0;i<e.length;i+=1,a+=1)s[a]=e[i];return s},Dd=function(n,e){for(var t="",s=0;s<n.length;s+=1)t+=n[s],s+1<n.length&&(t+=e);return t};Uo.exports=function(e){var t=this;if(typeof t!="function"||Td.apply(t)!==Ad)throw new TypeError(Rd+t);for(var s=Id(arguments,1),i,a=function(){if(this instanceof i){var p=t.apply(this,Oo(s,arguments));return Object(p)===p?p:this}return t.apply(e,Oo(s,arguments))},r=kd(0,t.length-s.length),o=[],l=0;l<r;l++)o[l]="$"+l;if(i=Function("binder","return function ("+Dd(o,",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var c=function(){};c.prototype=t.prototype,i.prototype=new c,c.prototype=null}return i}});var yn=w(($b,Fo)=>{"use strict";var Od=Lo();Fo.exports=Function.prototype.bind||Od});var hs=w((zb,Po)=>{"use strict";Po.exports=Function.prototype.call});var _i=w((Wb,Mo)=>{"use strict";Mo.exports=Function.prototype.apply});var No=w((Vb,jo)=>{"use strict";jo.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Go=w((Hb,qo)=>{"use strict";var Ud=yn(),Ld=_i(),Fd=hs(),Pd=No();qo.exports=Pd||Ud.call(Fd,Ld)});var $o=w((Kb,Bo)=>{"use strict";var Md=yn(),jd=ds(),Nd=hs(),qd=Go();Bo.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new jd("a function is required");return qd(Md,Nd,e)}});var Jo=w((Jb,Ko)=>{"use strict";var Gd=$o(),zo=gi(),Vo;try{Vo=[].__proto__===Array.prototype}catch(n){if(!n||typeof n!="object"||!("code"in n)||n.code!=="ERR_PROTO_ACCESS")throw n}var yi=!!Vo&&zo&&zo(Object.prototype,"__proto__"),Ho=Object,Wo=Ho.getPrototypeOf;Ko.exports=yi&&typeof yi.get=="function"?Gd([yi.get]):typeof Wo=="function"?function(e){return Wo(e==null?e:Ho(e))}:!1});var ec=w((Xb,Zo)=>{"use strict";var Xo=xi(),Qo=vi(),Yo=Jo();Zo.exports=Xo?function(e){return Xo(e)}:Qo?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return Qo(e)}:Yo?function(e){return Yo(e)}:null});var gs=w((Qb,tc)=>{"use strict";var Bd=Function.prototype.call,$d=Object.prototype.hasOwnProperty,zd=yn();tc.exports=zd.call(Bd,$d)});var cc=w((Yb,oc)=>{"use strict";var N,Wd=hi(),Vd=Vr(),Hd=Kr(),Kd=Xr(),Jd=Yr(),Ht=eo(),Vt=ds(),Xd=so(),Qd=ao(),Yd=oo(),Zd=lo(),em=uo(),tm=fo(),nm=go(),sm=_o(),ac=Function,wi=function(n){try{return ac('"use strict"; return ('+n+").constructor;")()}catch{}},wn=gi(),im=So(),Ci=function(){throw new Vt},am=wn?(function(){try{return arguments.callee,Ci}catch{try{return wn(arguments,"callee").get}catch{return Ci}}})():Ci,zt=Ao()(),he=ec(),rm=vi(),om=xi(),rc=_i(),Cn=hs(),Wt={},cm=typeof Uint8Array>"u"||!he?N:he(Uint8Array),yt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?N:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?N:ArrayBuffer,"%ArrayIteratorPrototype%":zt&&he?he([][Symbol.iterator]()):N,"%AsyncFromSyncIteratorPrototype%":N,"%AsyncFunction%":Wt,"%AsyncGenerator%":Wt,"%AsyncGeneratorFunction%":Wt,"%AsyncIteratorPrototype%":Wt,"%Atomics%":typeof Atomics>"u"?N:Atomics,"%BigInt%":typeof BigInt>"u"?N:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?N:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?N:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?N:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Vd,"%eval%":eval,"%EvalError%":Hd,"%Float16Array%":typeof Float16Array>"u"?N:Float16Array,"%Float32Array%":typeof Float32Array>"u"?N:Float32Array,"%Float64Array%":typeof Float64Array>"u"?N:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?N:FinalizationRegistry,"%Function%":ac,"%GeneratorFunction%":Wt,"%Int8Array%":typeof Int8Array>"u"?N:Int8Array,"%Int16Array%":typeof Int16Array>"u"?N:Int16Array,"%Int32Array%":typeof Int32Array>"u"?N:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":zt&&he?he(he([][Symbol.iterator]())):N,"%JSON%":typeof JSON=="object"?JSON:N,"%Map%":typeof Map>"u"?N:Map,"%MapIteratorPrototype%":typeof Map>"u"||!zt||!he?N:he(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Wd,"%Object.getOwnPropertyDescriptor%":wn,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?N:Promise,"%Proxy%":typeof Proxy>"u"?N:Proxy,"%RangeError%":Kd,"%ReferenceError%":Jd,"%Reflect%":typeof Reflect>"u"?N:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?N:Set,"%SetIteratorPrototype%":typeof Set>"u"||!zt||!he?N:he(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?N:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":zt&&he?he(""[Symbol.iterator]()):N,"%Symbol%":zt?Symbol:N,"%SyntaxError%":Ht,"%ThrowTypeError%":am,"%TypedArray%":cm,"%TypeError%":Vt,"%Uint8Array%":typeof Uint8Array>"u"?N:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?N:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?N:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?N:Uint32Array,"%URIError%":Xd,"%WeakMap%":typeof WeakMap>"u"?N:WeakMap,"%WeakRef%":typeof WeakRef>"u"?N:WeakRef,"%WeakSet%":typeof WeakSet>"u"?N:WeakSet,"%Function.prototype.call%":Cn,"%Function.prototype.apply%":rc,"%Object.defineProperty%":im,"%Object.getPrototypeOf%":rm,"%Math.abs%":Qd,"%Math.floor%":Yd,"%Math.max%":Zd,"%Math.min%":em,"%Math.pow%":tm,"%Math.round%":nm,"%Math.sign%":sm,"%Reflect.getPrototypeOf%":om};if(he)try{null.error}catch(n){nc=he(he(n)),yt["%Error.prototype%"]=nc}var nc,lm=function n(e){var t;if(e==="%AsyncFunction%")t=wi("async function () {}");else if(e==="%GeneratorFunction%")t=wi("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=wi("async function* () {}");else if(e==="%AsyncGenerator%"){var s=n("%AsyncGeneratorFunction%");s&&(t=s.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=n("%AsyncGenerator%");i&&he&&(t=he(i.prototype))}return yt[e]=t,t},sc={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},En=yn(),bs=gs(),pm=En.call(Cn,Array.prototype.concat),um=En.call(rc,Array.prototype.splice),ic=En.call(Cn,String.prototype.replace),xs=En.call(Cn,String.prototype.slice),dm=En.call(Cn,RegExp.prototype.exec),mm=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fm=/\\(\\)?/g,hm=function(e){var t=xs(e,0,1),s=xs(e,-1);if(t==="%"&&s!=="%")throw new Ht("invalid intrinsic syntax, expected closing `%`");if(s==="%"&&t!=="%")throw new Ht("invalid intrinsic syntax, expected opening `%`");var i=[];return ic(e,mm,function(a,r,o,l){i[i.length]=o?ic(l,fm,"$1"):r||a}),i},gm=function(e,t){var s=e,i;if(bs(sc,s)&&(i=sc[s],s="%"+i[0]+"%"),bs(yt,s)){var a=yt[s];if(a===Wt&&(a=lm(s)),typeof a>"u"&&!t)throw new Vt("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:s,value:a}}throw new Ht("intrinsic "+e+" does not exist!")};oc.exports=function(e,t){if(typeof e!="string"||e.length===0)throw new Vt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Vt('"allowMissing" argument must be a boolean');if(dm(/^%?[^%]*%?$/,e)===null)throw new Ht("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var s=hm(e),i=s.length>0?s[0]:"",a=gm("%"+i+"%",t),r=a.name,o=a.value,l=!1,c=a.alias;c&&(i=c[0],um(s,pm([0,1],c)));for(var p=1,u=!0;p<s.length;p+=1){var m=s[p],f=xs(m,0,1),g=xs(m,-1);if((f==='"'||f==="'"||f==="`"||g==='"'||g==="'"||g==="`")&&f!==g)throw new Ht("property names with quotes must have matching quotes");if((m==="constructor"||!u)&&(l=!0),i+="."+m,r="%"+i+"%",bs(yt,r))o=yt[r];else if(o!=null){if(!(m in o)){if(!t)throw new Vt("base intrinsic for "+e+" exists, but the property is not available.");return}if(wn&&p+1>=s.length){var v=wn(o,m);u=!!v,u&&"get"in v&&!("originalValue"in v.get)?o=v.get:o=o[m]}else u=bs(o,m),o=o[m];u&&!l&&(yt[r]=o)}}return o}});var pc=w((Zb,lc)=>{"use strict";var bm=bi();lc.exports=function(){return bm()&&!!Symbol.toStringTag}});var mc=w((ex,dc)=>{"use strict";var xm=cc(),uc=xm("%Object.defineProperty%",!0),vm=pc()(),_m=gs(),ym=ds(),vs=vm?Symbol.toStringTag:null;dc.exports=function(e,t){var s=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof s<"u"&&typeof s!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new ym("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");vs&&(s||!_m(e,vs))&&(uc?uc(e,vs,{configurable:!i,enumerable:!1,value:t,writable:!1}):e[vs]=t)}});var hc=w((tx,fc)=>{"use strict";fc.exports=function(n,e){return Object.keys(e).forEach(function(t){n[t]=n[t]||e[t]}),n}});var ki=w((nx,gc)=>{"use strict";var Ti=_r(),wm=I("util"),Ei=I("path"),Cm=I("http"),Em=(lt(),gn(_n)),Sm=I("url").parse,Rm=I("fs"),Tm=I("stream").Stream,km=I("crypto"),Si=Rr(),Am=$r(),Im=mc(),pt=gs(),Ri=hc();function B(n){if(!(this instanceof B))return new B(n);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Ti.call(this),n=n||{};for(var e in n)this[e]=n[e]}wm.inherits(B,Ti);B.LINE_BREAK=`\r
2
- `;B.DEFAULT_CONTENT_TYPE="application/octet-stream";B.prototype.append=function(n,e,t){t=t||{},typeof t=="string"&&(t={filename:t});var s=Ti.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(n,e,t),a=this._multiPartFooter();s(i),s(e),s(a),this._trackLength(i,e,t)};B.prototype._trackLength=function(n,e,t){var s=0;t.knownLength!=null?s+=Number(t.knownLength):Buffer.isBuffer(e)?s=e.length:typeof e=="string"&&(s=Buffer.byteLength(e)),this._valueLength+=s,this._overheadLength+=Buffer.byteLength(n)+B.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&pt(e,"httpVersion"))&&!(e instanceof Tm))&&(t.knownLength||this._valuesToMeasure.push(e))};B.prototype._lengthRetriever=function(n,e){pt(n,"fd")?n.end!=null&&n.end!=1/0&&n.start!=null?e(null,n.end+1-(n.start?n.start:0)):Rm.stat(n.path,function(t,s){if(t){e(t);return}var i=s.size-(n.start?n.start:0);e(null,i)}):pt(n,"httpVersion")?e(null,Number(n.headers["content-length"])):pt(n,"httpModule")?(n.on("response",function(t){n.pause(),e(null,Number(t.headers["content-length"]))}),n.resume()):e("Unknown stream")};B.prototype._multiPartHeader=function(n,e,t){if(typeof t.header=="string")return t.header;var s=this._getContentDisposition(e,t),i=this._getContentType(e,t),a="",r={"Content-Disposition":["form-data",'name="'+n+'"'].concat(s||[]),"Content-Type":[].concat(i||[])};typeof t.header=="object"&&Ri(r,t.header);var o;for(var l in r)if(pt(r,l)){if(o=r[l],o==null)continue;Array.isArray(o)||(o=[o]),o.length&&(a+=l+": "+o.join("; ")+B.LINE_BREAK)}return"--"+this.getBoundary()+B.LINE_BREAK+a+B.LINE_BREAK};B.prototype._getContentDisposition=function(n,e){var t;if(typeof e.filepath=="string"?t=Ei.normalize(e.filepath).replace(/\\/g,"/"):e.filename||n&&(n.name||n.path)?t=Ei.basename(e.filename||n&&(n.name||n.path)):n&&n.readable&&pt(n,"httpVersion")&&(t=Ei.basename(n.client._httpMessage.path||"")),t)return'filename="'+t+'"'};B.prototype._getContentType=function(n,e){var t=e.contentType;return!t&&n&&n.name&&(t=Si.lookup(n.name)),!t&&n&&n.path&&(t=Si.lookup(n.path)),!t&&n&&n.readable&&pt(n,"httpVersion")&&(t=n.headers["content-type"]),!t&&(e.filepath||e.filename)&&(t=Si.lookup(e.filepath||e.filename)),!t&&n&&typeof n=="object"&&(t=B.DEFAULT_CONTENT_TYPE),t};B.prototype._multiPartFooter=function(){return function(n){var e=B.LINE_BREAK,t=this._streams.length===0;t&&(e+=this._lastBoundary()),n(e)}.bind(this)};B.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+B.LINE_BREAK};B.prototype.getHeaders=function(n){var e,t={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in n)pt(n,e)&&(t[e.toLowerCase()]=n[e]);return t};B.prototype.setBoundary=function(n){if(typeof n!="string")throw new TypeError("FormData boundary must be a string");this._boundary=n};B.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};B.prototype.getBuffer=function(){for(var n=new Buffer.alloc(0),e=this.getBoundary(),t=0,s=this._streams.length;t<s;t++)typeof this._streams[t]!="function"&&(Buffer.isBuffer(this._streams[t])?n=Buffer.concat([n,this._streams[t]]):n=Buffer.concat([n,Buffer.from(this._streams[t])]),(typeof this._streams[t]!="string"||this._streams[t].substring(2,e.length+2)!==e)&&(n=Buffer.concat([n,Buffer.from(B.LINE_BREAK)])));return Buffer.concat([n,Buffer.from(this._lastBoundary())])};B.prototype._generateBoundary=function(){this._boundary="--------------------------"+km.randomBytes(12).toString("hex")};B.prototype.getLengthSync=function(){var n=this._overheadLength+this._valueLength;return this._streams.length&&(n+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),n};B.prototype.hasKnownLength=function(){var n=!0;return this._valuesToMeasure.length&&(n=!1),n};B.prototype.getLength=function(n){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(n.bind(this,null,e));return}Am.parallel(this._valuesToMeasure,this._lengthRetriever,function(t,s){if(t){n(t);return}s.forEach(function(i){e+=i}),n(null,e)})};B.prototype.submit=function(n,e){var t,s,i={method:"post"};return typeof n=="string"?(n=Sm(n),s=Ri({port:n.port,path:n.pathname,host:n.hostname,protocol:n.protocol},i)):(s=Ri(n,i),s.port||(s.port=s.protocol==="https:"?443:80)),s.headers=this.getHeaders(n.headers),s.protocol==="https:"?t=Em.request(s):t=Cm.request(s),this.getLength(function(a,r){if(a&&a!=="Unknown stream"){this._error(a);return}if(r&&t.setHeader("Content-Length",r),this.pipe(t),e){var o,l=function(c,p){return t.removeListener("error",l),t.removeListener("response",o),e.call(this,c,p)};o=l.bind(this,null),t.on("error",l),t.on("response",o)}}.bind(this)),t};B.prototype._error=function(n){this.error||(this.error=n,this.pause(),this.emit("error",n))};B.prototype.toString=function(){return"[object FormData]"};Im(B,"FormData");gc.exports=B});var Lc=w(Uc=>{"use strict";var Km=I("url").parse,Jm={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Xm=String.prototype.endsWith||function(n){return n.length<=this.length&&this.indexOf(n,this.length-n.length)!==-1};function Qm(n){var e=typeof n=="string"?Km(n):n||{},t=e.protocol,s=e.host,i=e.port;if(typeof s!="string"||!s||typeof t!="string"||(t=t.split(":",1)[0],s=s.replace(/:\d*$/,""),i=parseInt(i)||Jm[t]||0,!Ym(s,i)))return"";var a=Qt("npm_config_"+t+"_proxy")||Qt(t+"_proxy")||Qt("npm_config_proxy")||Qt("all_proxy");return a&&a.indexOf("://")===-1&&(a=t+"://"+a),a}function Ym(n,e){var t=(Qt("npm_config_no_proxy")||Qt("no_proxy")).toLowerCase();return t?t==="*"?!1:t.split(/[,\s]/).every(function(s){if(!s)return!0;var i=s.match(/^(.+):(\d+)$/),a=i?i[1]:s,r=i?parseInt(i[2]):0;return r&&r!==e?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!Xm.call(n,a)):n!==a}):!0}function Qt(n){return process.env[n.toLowerCase()]||process.env[n.toUpperCase()]||""}Uc.getProxyForUrl=Qm});var Pc=w((sv,Fc)=>{"use strict";var Yt=1e3,Zt=Yt*60,en=Zt*60,Et=en*24,Zm=Et*7,ef=Et*365.25;Fc.exports=function(n,e){e=e||{};var t=typeof n;if(t==="string"&&n.length>0)return tf(n);if(t==="number"&&isFinite(n))return e.long?sf(n):nf(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function tf(n){if(n=String(n),!(n.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(e){var t=parseFloat(e[1]),s=(e[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return t*ef;case"weeks":case"week":case"w":return t*Zm;case"days":case"day":case"d":return t*Et;case"hours":case"hour":case"hrs":case"hr":case"h":return t*en;case"minutes":case"minute":case"mins":case"min":case"m":return t*Zt;case"seconds":case"second":case"secs":case"sec":case"s":return t*Yt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function nf(n){var e=Math.abs(n);return e>=Et?Math.round(n/Et)+"d":e>=en?Math.round(n/en)+"h":e>=Zt?Math.round(n/Zt)+"m":e>=Yt?Math.round(n/Yt)+"s":n+"ms"}function sf(n){var e=Math.abs(n);return e>=Et?Cs(n,e,Et,"day"):e>=en?Cs(n,e,en,"hour"):e>=Zt?Cs(n,e,Zt,"minute"):e>=Yt?Cs(n,e,Yt,"second"):n+" ms"}function Cs(n,e,t,s){var i=e>=t*1.5;return Math.round(n/t)+" "+s+(i?"s":"")}});var Gi=w((iv,Mc)=>{"use strict";function af(n){t.debug=t,t.default=t,t.coerce=l,t.disable=r,t.enable=i,t.enabled=o,t.humanize=Pc(),t.destroy=c,Object.keys(n).forEach(p=>{t[p]=n[p]}),t.names=[],t.skips=[],t.formatters={};function e(p){let u=0;for(let m=0;m<p.length;m++)u=(u<<5)-u+p.charCodeAt(m),u|=0;return t.colors[Math.abs(u)%t.colors.length]}t.selectColor=e;function t(p){let u,m=null,f,g;function v(..._){if(!v.enabled)return;let R=v,D=Number(new Date),L=D-(u||D);R.diff=L,R.prev=u,R.curr=D,u=D,_[0]=t.coerce(_[0]),typeof _[0]!="string"&&_.unshift("%O");let q=0;_[0]=_[0].replace(/%([a-zA-Z%])/g,(Y,ae)=>{if(Y==="%%")return"%";q++;let Z=t.formatters[ae];if(typeof Z=="function"){let ye=_[q];Y=Z.call(R,ye),_.splice(q,1),q--}return Y}),t.formatArgs.call(R,_),(R.log||t.log).apply(R,_)}return v.namespace=p,v.useColors=t.useColors(),v.color=t.selectColor(p),v.extend=s,v.destroy=t.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(f!==t.namespaces&&(f=t.namespaces,g=t.enabled(p)),g),set:_=>{m=_}}),typeof t.init=="function"&&t.init(v),v}function s(p,u){let m=t(this.namespace+(typeof u>"u"?":":u)+p);return m.log=this.log,m}function i(p){t.save(p),t.namespaces=p,t.names=[],t.skips=[];let u=(typeof p=="string"?p:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of u)m[0]==="-"?t.skips.push(m.slice(1)):t.names.push(m)}function a(p,u){let m=0,f=0,g=-1,v=0;for(;m<p.length;)if(f<u.length&&(u[f]===p[m]||u[f]==="*"))u[f]==="*"?(g=f,v=m,f++):(m++,f++);else if(g!==-1)f=g+1,v++,m=v;else return!1;for(;f<u.length&&u[f]==="*";)f++;return f===u.length}function r(){let p=[...t.names,...t.skips.map(u=>"-"+u)].join(",");return t.enable(""),p}function o(p){for(let u of t.skips)if(a(p,u))return!1;for(let u of t.names)if(a(p,u))return!0;return!1}function l(p){return p instanceof Error?p.stack||p.message:p}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}Mc.exports=af});var jc=w((De,Es)=>{"use strict";De.formatArgs=of;De.save=cf;De.load=lf;De.useColors=rf;De.storage=pf();De.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();De.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function rf(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let n;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(n=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(n[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function of(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+Es.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;n.splice(1,0,e,"color: inherit");let t=0,s=0;n[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(t++,i==="%c"&&(s=t))}),n.splice(s,0,e)}De.log=console.debug||console.log||(()=>{});function cf(n){try{n?De.storage.setItem("debug",n):De.storage.removeItem("debug")}catch{}}function lf(){let n;try{n=De.storage.getItem("debug")||De.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}function pf(){try{return localStorage}catch{}}Es.exports=Gi()(De);var{formatters:uf}=Es.exports;uf.j=function(n){try{return JSON.stringify(n)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var qc=w((av,Nc)=>{"use strict";Nc.exports=(n,e=process.argv)=>{let t=n.startsWith("-")?"":n.length===1?"-":"--",s=e.indexOf(t+n),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)}});var $c=w((rv,Bc)=>{"use strict";var df=I("os"),Gc=I("tty"),$e=qc(),{env:ge}=process,Ss;$e("no-color")||$e("no-colors")||$e("color=false")||$e("color=never")?Ss=0:($e("color")||$e("colors")||$e("color=true")||$e("color=always"))&&(Ss=1);function mf(){if("FORCE_COLOR"in ge)return ge.FORCE_COLOR==="true"?1:ge.FORCE_COLOR==="false"?0:ge.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ge.FORCE_COLOR,10),3)}function ff(n){return n===0?!1:{level:n,hasBasic:!0,has256:n>=2,has16m:n>=3}}function hf(n,{streamIsTTY:e,sniffFlags:t=!0}={}){let s=mf();s!==void 0&&(Ss=s);let i=t?Ss:s;if(i===0)return 0;if(t){if($e("color=16m")||$e("color=full")||$e("color=truecolor"))return 3;if($e("color=256"))return 2}if(n&&!e&&i===void 0)return 0;let a=i||0;if(ge.TERM==="dumb")return a;if(process.platform==="win32"){let r=df.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in ge)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in ge)||ge.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in ge)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ge.TEAMCITY_VERSION)?1:0;if(ge.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ge){let r=Number.parseInt((ge.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ge.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ge.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ge.TERM)||"COLORTERM"in ge?1:a}function Bi(n,e={}){let t=hf(n,{streamIsTTY:n&&n.isTTY,...e});return ff(t)}Bc.exports={supportsColor:Bi,stdout:Bi({isTTY:Gc.isatty(1)}),stderr:Bi({isTTY:Gc.isatty(2)})}});var Wc=w((be,Ts)=>{"use strict";var gf=I("tty"),Rs=I("util");be.init=Cf;be.log=_f;be.formatArgs=xf;be.save=yf;be.load=wf;be.useColors=bf;be.destroy=Rs.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");be.colors=[6,2,3,4,5,1];try{let n=$c();n&&(n.stderr||n).level>=2&&(be.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}be.inspectOpts=Object.keys(process.env).filter(n=>/^debug_/i.test(n)).reduce((n,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,a)=>a.toUpperCase()),s=process.env[e];return/^(yes|on|true|enabled)$/i.test(s)?s=!0:/^(no|off|false|disabled)$/i.test(s)?s=!1:s==="null"?s=null:s=Number(s),n[t]=s,n},{});function bf(){return"colors"in be.inspectOpts?!!be.inspectOpts.colors:gf.isatty(process.stderr.fd)}function xf(n){let{namespace:e,useColors:t}=this;if(t){let s=this.color,i="\x1B[3"+(s<8?s:"8;5;"+s),a=` ${i};1m${e} \x1B[0m`;n[0]=a+n[0].split(`
1
+ "use strict";var ErmisChatSDK=(()=>{var tu=Object.create;var as=Object.defineProperty;var nu=Object.getOwnPropertyDescriptor;var su=Object.getOwnPropertyNames;var iu=Object.getPrototypeOf,au=Object.prototype.hasOwnProperty;var I=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var ru=(n,e)=>()=>(n&&(e=n(n=0)),e);var w=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),oi=(n,e)=>{for(var t in e)as(n,t,{get:e[t],enumerable:!0})},sr=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of su(e))!au.call(n,i)&&i!==t&&as(n,i,{get:()=>e[i],enumerable:!(s=nu(e,i))||s.enumerable});return n};var Re=(n,e,t)=>(t=n!=null?tu(iu(n)):{},sr(e||!n||!n.__esModule?as(t,"default",{value:n,enumerable:!0}):t,n)),bn=n=>sr(as({},"__esModule",{value:!0}),n);var gr=w((ib,hr)=>{"use strict";var fr=I("stream").Stream,Vu=I("util");hr.exports=Ke;function Ke(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}Vu.inherits(Ke,fr);Ke.create=function(n,e){var t=new this;e=e||{};for(var s in e)t[s]=e[s];t.source=n;var i=n.emit;return n.emit=function(){return t._handleEmit(arguments),i.apply(n,arguments)},n.on("error",function(){}),t.pauseStream&&n.pause(),t};Object.defineProperty(Ke.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Ke.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Ke.prototype.resume=function(){this._released||this.release(),this.source.resume()};Ke.prototype.pause=function(){this.source.pause()};Ke.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(n){this.emit.apply(this,n)}.bind(this)),this._bufferedEvents=[]};Ke.prototype.pipe=function(){var n=fr.prototype.pipe.apply(this,arguments);return this.resume(),n};Ke.prototype._handleEmit=function(n){if(this._released){this.emit.apply(this,n);return}n[0]==="data"&&(this.dataSize+=n[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(n)};Ke.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(n))}}});var _r=w((ab,vr)=>{"use strict";var Hu=I("util"),xr=I("stream").Stream,br=gr();vr.exports=oe;function oe(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}Hu.inherits(oe,xr);oe.create=function(n){var e=new this;n=n||{};for(var t in n)e[t]=n[t];return e};oe.isStreamLike=function(n){return typeof n!="function"&&typeof n!="string"&&typeof n!="boolean"&&typeof n!="number"&&!Buffer.isBuffer(n)};oe.prototype.append=function(n){var e=oe.isStreamLike(n);if(e){if(!(n instanceof br)){var t=br.create(n,{maxDataSize:1/0,pauseStream:this.pauseStreams});n.on("data",this._checkDataSize.bind(this)),n=t}this._handleErrors(n),this.pauseStreams&&n.pause()}return this._streams.push(n),this};oe.prototype.pipe=function(n,e){return xr.prototype.pipe.call(this,n,e),this.resume(),n};oe.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};oe.prototype._realGetNext=function(){var n=this._streams.shift();if(typeof n>"u"){this.end();return}if(typeof n!="function"){this._pipeNext(n);return}var e=n;e(function(t){var s=oe.isStreamLike(t);s&&(t.on("data",this._checkDataSize.bind(this)),this._handleErrors(t)),this._pipeNext(t)}.bind(this))};oe.prototype._pipeNext=function(n){this._currentStream=n;var e=oe.isStreamLike(n);if(e){n.on("end",this._getNext.bind(this)),n.pipe(this,{end:!1});return}var t=n;this.write(t),this._getNext()};oe.prototype._handleErrors=function(n){var e=this;n.on("error",function(t){e._emitError(t)})};oe.prototype.write=function(n){this.emit("data",n)};oe.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};oe.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};oe.prototype.end=function(){this._reset(),this.emit("end")};oe.prototype.destroy=function(){this._reset(),this.emit("close")};oe.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};oe.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(n))}};oe.prototype._updateDataSize=function(){this.dataSize=0;var n=this;this._streams.forEach(function(e){e.dataSize&&(n.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};oe.prototype._emitError=function(n){this._reset(),this.emit("error",n)}});var yn={};oi(yn,{default:()=>yt});var yt,pt=ru(()=>{"use strict";yt=null});var yr=w((rb,Ku)=>{Ku.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var Cr=w((ob,wr)=>{"use strict";wr.exports=yr()});var Rr=w(Ie=>{"use strict";var us=Cr(),Ju=I("path").extname,Er=/^\s*([^;\s]*)(?:;|\s|$)/,Xu=/^text\//i;Ie.charset=Sr;Ie.charsets={lookup:Sr};Ie.contentType=Qu;Ie.extension=Yu;Ie.extensions=Object.create(null);Ie.lookup=Zu;Ie.types=Object.create(null);ed(Ie.extensions,Ie.types);function Sr(n){if(!n||typeof n!="string")return!1;var e=Er.exec(n),t=e&&us[e[1].toLowerCase()];return t&&t.charset?t.charset:e&&Xu.test(e[1])?"UTF-8":!1}function Qu(n){if(!n||typeof n!="string")return!1;var e=n.indexOf("/")===-1?Ie.lookup(n):n;if(!e)return!1;if(e.indexOf("charset")===-1){var t=Ie.charset(e);t&&(e+="; charset="+t.toLowerCase())}return e}function Yu(n){if(!n||typeof n!="string")return!1;var e=Er.exec(n),t=e&&Ie.extensions[e[1].toLowerCase()];return!t||!t.length?!1:t[0]}function Zu(n){if(!n||typeof n!="string")return!1;var e=Ju("x."+n).toLowerCase().substr(1);return e&&Ie.types[e]||!1}function ed(n,e){var t=["nginx","apache",void 0,"iana"];Object.keys(us).forEach(function(i){var a=us[i],r=a.extensions;if(!(!r||!r.length)){n[i]=r;for(var o=0;o<r.length;o++){var l=r[o];if(e[l]){var c=t.indexOf(us[e[l]].source),p=t.indexOf(a.source);if(e[l]!=="application/octet-stream"&&(c>p||c===p&&e[l].substr(0,12)==="application/"))continue}e[l]=i}}})}});var kr=w((lb,Tr)=>{"use strict";Tr.exports=td;function td(n){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(n):setTimeout(n,0)}});var pi=w((pb,Ir)=>{"use strict";var Ar=kr();Ir.exports=nd;function nd(n){var e=!1;return Ar(function(){e=!0}),function(s,i){e?n(s,i):Ar(function(){n(s,i)})}}});var ui=w((ub,Dr)=>{"use strict";Dr.exports=sd;function sd(n){Object.keys(n.jobs).forEach(id.bind(n)),n.jobs={}}function id(n){typeof this.jobs[n]=="function"&&this.jobs[n]()}});var di=w((db,Ur)=>{"use strict";var Or=pi(),ad=ui();Ur.exports=rd;function rd(n,e,t,s){var i=t.keyedList?t.keyedList[t.index]:t.index;t.jobs[i]=od(e,i,n[i],function(a,r){i in t.jobs&&(delete t.jobs[i],a?ad(t):t.results[i]=r,s(a,t.results))})}function od(n,e,t,s){var i;return n.length==2?i=n(t,Or(s)):i=n(t,e,Or(s)),i}});var mi=w((mb,Lr)=>{"use strict";Lr.exports=cd;function cd(n,e){var t=!Array.isArray(n),s={index:0,keyedList:t||e?Object.keys(n):null,jobs:{},results:t?{}:[],size:t?Object.keys(n).length:n.length};return e&&s.keyedList.sort(t?e:function(i,a){return e(n[i],n[a])}),s}});var fi=w((fb,Fr)=>{"use strict";var ld=ui(),pd=pi();Fr.exports=ud;function ud(n){Object.keys(this.jobs).length&&(this.index=this.size,ld(this),pd(n)(null,this.results))}});var Mr=w((hb,Pr)=>{"use strict";var dd=di(),md=mi(),fd=fi();Pr.exports=hd;function hd(n,e,t){for(var s=md(n);s.index<(s.keyedList||n).length;)dd(n,e,s,function(i,a){if(i){t(i,a);return}if(Object.keys(s.jobs).length===0){t(null,s.results);return}}),s.index++;return fd.bind(s,t)}});var hi=w((gb,ds)=>{"use strict";var jr=di(),gd=mi(),bd=fi();ds.exports=xd;ds.exports.ascending=Nr;ds.exports.descending=vd;function xd(n,e,t,s){var i=gd(n,t);return jr(n,e,i,function a(r,o){if(r){s(r,o);return}if(i.index++,i.index<(i.keyedList||n).length){jr(n,e,i,a);return}s(null,i.results)}),bd.bind(i,s)}function Nr(n,e){return n<e?-1:n>e?1:0}function vd(n,e){return-1*Nr(n,e)}});var Gr=w((bb,qr)=>{"use strict";var _d=hi();qr.exports=yd;function yd(n,e,t){return _d(n,e,null,t)}});var $r=w((xb,Br)=>{"use strict";Br.exports={parallel:Mr(),serial:Gr(),serialOrdered:hi()}});var gi=w((vb,zr)=>{"use strict";zr.exports=Object});var Vr=w((_b,Wr)=>{"use strict";Wr.exports=Error});var Kr=w((yb,Hr)=>{"use strict";Hr.exports=EvalError});var Xr=w((wb,Jr)=>{"use strict";Jr.exports=RangeError});var Yr=w((Cb,Qr)=>{"use strict";Qr.exports=ReferenceError});var eo=w((Eb,Zr)=>{"use strict";Zr.exports=SyntaxError});var ms=w((Sb,to)=>{"use strict";to.exports=TypeError});var so=w((Rb,no)=>{"use strict";no.exports=URIError});var ao=w((Tb,io)=>{"use strict";io.exports=Math.abs});var oo=w((kb,ro)=>{"use strict";ro.exports=Math.floor});var lo=w((Ab,co)=>{"use strict";co.exports=Math.max});var uo=w((Ib,po)=>{"use strict";po.exports=Math.min});var fo=w((Db,mo)=>{"use strict";mo.exports=Math.pow});var go=w((Ob,ho)=>{"use strict";ho.exports=Math.round});var xo=w((Ub,bo)=>{"use strict";bo.exports=Number.isNaN||function(e){return e!==e}});var _o=w((Lb,vo)=>{"use strict";var wd=xo();vo.exports=function(e){return wd(e)||e===0?e:e<0?-1:1}});var wo=w((Fb,yo)=>{"use strict";yo.exports=Object.getOwnPropertyDescriptor});var bi=w((Pb,Co)=>{"use strict";var fs=wo();if(fs)try{fs([],"length")}catch{fs=null}Co.exports=fs});var So=w((Mb,Eo)=>{"use strict";var hs=Object.defineProperty||!1;if(hs)try{hs({},"a",{value:1})}catch{hs=!1}Eo.exports=hs});var xi=w((jb,Ro)=>{"use strict";Ro.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),s=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(s)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var r=Object.getOwnPropertySymbols(e);if(r.length!==1||r[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==i||o.enumerable!==!0)return!1}return!0}});var Ao=w((Nb,ko)=>{"use strict";var To=typeof Symbol<"u"&&Symbol,Cd=xi();ko.exports=function(){return typeof To!="function"||typeof Symbol!="function"||typeof To("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Cd()}});var vi=w((qb,Io)=>{"use strict";Io.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var _i=w((Gb,Do)=>{"use strict";var Ed=gi();Do.exports=Ed.getPrototypeOf||null});var Lo=w((Bb,Uo)=>{"use strict";var Sd="Function.prototype.bind called on incompatible ",Rd=Object.prototype.toString,Td=Math.max,kd="[object Function]",Oo=function(e,t){for(var s=[],i=0;i<e.length;i+=1)s[i]=e[i];for(var a=0;a<t.length;a+=1)s[a+e.length]=t[a];return s},Ad=function(e,t){for(var s=[],i=t||0,a=0;i<e.length;i+=1,a+=1)s[a]=e[i];return s},Id=function(n,e){for(var t="",s=0;s<n.length;s+=1)t+=n[s],s+1<n.length&&(t+=e);return t};Uo.exports=function(e){var t=this;if(typeof t!="function"||Rd.apply(t)!==kd)throw new TypeError(Sd+t);for(var s=Ad(arguments,1),i,a=function(){if(this instanceof i){var p=t.apply(this,Oo(s,arguments));return Object(p)===p?p:this}return t.apply(e,Oo(s,arguments))},r=Td(0,t.length-s.length),o=[],l=0;l<r;l++)o[l]="$"+l;if(i=Function("binder","return function ("+Id(o,",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var c=function(){};c.prototype=t.prototype,i.prototype=new c,c.prototype=null}return i}});var wn=w(($b,Fo)=>{"use strict";var Dd=Lo();Fo.exports=Function.prototype.bind||Dd});var gs=w((zb,Po)=>{"use strict";Po.exports=Function.prototype.call});var yi=w((Wb,Mo)=>{"use strict";Mo.exports=Function.prototype.apply});var No=w((Vb,jo)=>{"use strict";jo.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Go=w((Hb,qo)=>{"use strict";var Od=wn(),Ud=yi(),Ld=gs(),Fd=No();qo.exports=Fd||Od.call(Ld,Ud)});var $o=w((Kb,Bo)=>{"use strict";var Pd=wn(),Md=ms(),jd=gs(),Nd=Go();Bo.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new Md("a function is required");return Nd(Pd,jd,e)}});var Jo=w((Jb,Ko)=>{"use strict";var qd=$o(),zo=bi(),Vo;try{Vo=[].__proto__===Array.prototype}catch(n){if(!n||typeof n!="object"||!("code"in n)||n.code!=="ERR_PROTO_ACCESS")throw n}var wi=!!Vo&&zo&&zo(Object.prototype,"__proto__"),Ho=Object,Wo=Ho.getPrototypeOf;Ko.exports=wi&&typeof wi.get=="function"?qd([wi.get]):typeof Wo=="function"?function(e){return Wo(e==null?e:Ho(e))}:!1});var ec=w((Xb,Zo)=>{"use strict";var Xo=vi(),Qo=_i(),Yo=Jo();Zo.exports=Xo?function(e){return Xo(e)}:Qo?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return Qo(e)}:Yo?function(e){return Yo(e)}:null});var bs=w((Qb,tc)=>{"use strict";var Gd=Function.prototype.call,Bd=Object.prototype.hasOwnProperty,$d=wn();tc.exports=$d.call(Gd,Bd)});var cc=w((Yb,oc)=>{"use strict";var N,zd=gi(),Wd=Vr(),Vd=Kr(),Hd=Xr(),Kd=Yr(),Kt=eo(),Ht=ms(),Jd=so(),Xd=ao(),Qd=oo(),Yd=lo(),Zd=uo(),em=fo(),tm=go(),nm=_o(),ac=Function,Ci=function(n){try{return ac('"use strict"; return ('+n+").constructor;")()}catch{}},Cn=bi(),sm=So(),Ei=function(){throw new Ht},im=Cn?(function(){try{return arguments.callee,Ei}catch{try{return Cn(arguments,"callee").get}catch{return Ei}}})():Ei,Wt=Ao()(),he=ec(),am=_i(),rm=vi(),rc=yi(),En=gs(),Vt={},om=typeof Uint8Array>"u"||!he?N:he(Uint8Array),wt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?N:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?N:ArrayBuffer,"%ArrayIteratorPrototype%":Wt&&he?he([][Symbol.iterator]()):N,"%AsyncFromSyncIteratorPrototype%":N,"%AsyncFunction%":Vt,"%AsyncGenerator%":Vt,"%AsyncGeneratorFunction%":Vt,"%AsyncIteratorPrototype%":Vt,"%Atomics%":typeof Atomics>"u"?N:Atomics,"%BigInt%":typeof BigInt>"u"?N:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?N:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?N:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?N:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Wd,"%eval%":eval,"%EvalError%":Vd,"%Float16Array%":typeof Float16Array>"u"?N:Float16Array,"%Float32Array%":typeof Float32Array>"u"?N:Float32Array,"%Float64Array%":typeof Float64Array>"u"?N:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?N:FinalizationRegistry,"%Function%":ac,"%GeneratorFunction%":Vt,"%Int8Array%":typeof Int8Array>"u"?N:Int8Array,"%Int16Array%":typeof Int16Array>"u"?N:Int16Array,"%Int32Array%":typeof Int32Array>"u"?N:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Wt&&he?he(he([][Symbol.iterator]())):N,"%JSON%":typeof JSON=="object"?JSON:N,"%Map%":typeof Map>"u"?N:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Wt||!he?N:he(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":zd,"%Object.getOwnPropertyDescriptor%":Cn,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?N:Promise,"%Proxy%":typeof Proxy>"u"?N:Proxy,"%RangeError%":Hd,"%ReferenceError%":Kd,"%Reflect%":typeof Reflect>"u"?N:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?N:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Wt||!he?N:he(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?N:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Wt&&he?he(""[Symbol.iterator]()):N,"%Symbol%":Wt?Symbol:N,"%SyntaxError%":Kt,"%ThrowTypeError%":im,"%TypedArray%":om,"%TypeError%":Ht,"%Uint8Array%":typeof Uint8Array>"u"?N:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?N:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?N:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?N:Uint32Array,"%URIError%":Jd,"%WeakMap%":typeof WeakMap>"u"?N:WeakMap,"%WeakRef%":typeof WeakRef>"u"?N:WeakRef,"%WeakSet%":typeof WeakSet>"u"?N:WeakSet,"%Function.prototype.call%":En,"%Function.prototype.apply%":rc,"%Object.defineProperty%":sm,"%Object.getPrototypeOf%":am,"%Math.abs%":Xd,"%Math.floor%":Qd,"%Math.max%":Yd,"%Math.min%":Zd,"%Math.pow%":em,"%Math.round%":tm,"%Math.sign%":nm,"%Reflect.getPrototypeOf%":rm};if(he)try{null.error}catch(n){nc=he(he(n)),wt["%Error.prototype%"]=nc}var nc,cm=function n(e){var t;if(e==="%AsyncFunction%")t=Ci("async function () {}");else if(e==="%GeneratorFunction%")t=Ci("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Ci("async function* () {}");else if(e==="%AsyncGenerator%"){var s=n("%AsyncGeneratorFunction%");s&&(t=s.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=n("%AsyncGenerator%");i&&he&&(t=he(i.prototype))}return wt[e]=t,t},sc={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Sn=wn(),xs=bs(),lm=Sn.call(En,Array.prototype.concat),pm=Sn.call(rc,Array.prototype.splice),ic=Sn.call(En,String.prototype.replace),vs=Sn.call(En,String.prototype.slice),um=Sn.call(En,RegExp.prototype.exec),dm=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,mm=/\\(\\)?/g,fm=function(e){var t=vs(e,0,1),s=vs(e,-1);if(t==="%"&&s!=="%")throw new Kt("invalid intrinsic syntax, expected closing `%`");if(s==="%"&&t!=="%")throw new Kt("invalid intrinsic syntax, expected opening `%`");var i=[];return ic(e,dm,function(a,r,o,l){i[i.length]=o?ic(l,mm,"$1"):r||a}),i},hm=function(e,t){var s=e,i;if(xs(sc,s)&&(i=sc[s],s="%"+i[0]+"%"),xs(wt,s)){var a=wt[s];if(a===Vt&&(a=cm(s)),typeof a>"u"&&!t)throw new Ht("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:s,value:a}}throw new Kt("intrinsic "+e+" does not exist!")};oc.exports=function(e,t){if(typeof e!="string"||e.length===0)throw new Ht("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Ht('"allowMissing" argument must be a boolean');if(um(/^%?[^%]*%?$/,e)===null)throw new Kt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var s=fm(e),i=s.length>0?s[0]:"",a=hm("%"+i+"%",t),r=a.name,o=a.value,l=!1,c=a.alias;c&&(i=c[0],pm(s,lm([0,1],c)));for(var p=1,u=!0;p<s.length;p+=1){var m=s[p],f=vs(m,0,1),g=vs(m,-1);if((f==='"'||f==="'"||f==="`"||g==='"'||g==="'"||g==="`")&&f!==g)throw new Kt("property names with quotes must have matching quotes");if((m==="constructor"||!u)&&(l=!0),i+="."+m,r="%"+i+"%",xs(wt,r))o=wt[r];else if(o!=null){if(!(m in o)){if(!t)throw new Ht("base intrinsic for "+e+" exists, but the property is not available.");return}if(Cn&&p+1>=s.length){var v=Cn(o,m);u=!!v,u&&"get"in v&&!("originalValue"in v.get)?o=v.get:o=o[m]}else u=xs(o,m),o=o[m];u&&!l&&(wt[r]=o)}}return o}});var pc=w((Zb,lc)=>{"use strict";var gm=xi();lc.exports=function(){return gm()&&!!Symbol.toStringTag}});var mc=w((ex,dc)=>{"use strict";var bm=cc(),uc=bm("%Object.defineProperty%",!0),xm=pc()(),vm=bs(),_m=ms(),_s=xm?Symbol.toStringTag:null;dc.exports=function(e,t){var s=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof s<"u"&&typeof s!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new _m("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");_s&&(s||!vm(e,_s))&&(uc?uc(e,_s,{configurable:!i,enumerable:!1,value:t,writable:!1}):e[_s]=t)}});var hc=w((tx,fc)=>{"use strict";fc.exports=function(n,e){return Object.keys(e).forEach(function(t){n[t]=n[t]||e[t]}),n}});var Ai=w((nx,gc)=>{"use strict";var ki=_r(),ym=I("util"),Si=I("path"),wm=I("http"),Cm=(pt(),bn(yn)),Em=I("url").parse,Sm=I("fs"),Rm=I("stream").Stream,Tm=I("crypto"),Ri=Rr(),km=$r(),Am=mc(),ut=bs(),Ti=hc();function B(n){if(!(this instanceof B))return new B(n);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],ki.call(this),n=n||{};for(var e in n)this[e]=n[e]}ym.inherits(B,ki);B.LINE_BREAK=`\r
2
+ `;B.DEFAULT_CONTENT_TYPE="application/octet-stream";B.prototype.append=function(n,e,t){t=t||{},typeof t=="string"&&(t={filename:t});var s=ki.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(n,e,t),a=this._multiPartFooter();s(i),s(e),s(a),this._trackLength(i,e,t)};B.prototype._trackLength=function(n,e,t){var s=0;t.knownLength!=null?s+=Number(t.knownLength):Buffer.isBuffer(e)?s=e.length:typeof e=="string"&&(s=Buffer.byteLength(e)),this._valueLength+=s,this._overheadLength+=Buffer.byteLength(n)+B.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&ut(e,"httpVersion"))&&!(e instanceof Rm))&&(t.knownLength||this._valuesToMeasure.push(e))};B.prototype._lengthRetriever=function(n,e){ut(n,"fd")?n.end!=null&&n.end!=1/0&&n.start!=null?e(null,n.end+1-(n.start?n.start:0)):Sm.stat(n.path,function(t,s){if(t){e(t);return}var i=s.size-(n.start?n.start:0);e(null,i)}):ut(n,"httpVersion")?e(null,Number(n.headers["content-length"])):ut(n,"httpModule")?(n.on("response",function(t){n.pause(),e(null,Number(t.headers["content-length"]))}),n.resume()):e("Unknown stream")};B.prototype._multiPartHeader=function(n,e,t){if(typeof t.header=="string")return t.header;var s=this._getContentDisposition(e,t),i=this._getContentType(e,t),a="",r={"Content-Disposition":["form-data",'name="'+n+'"'].concat(s||[]),"Content-Type":[].concat(i||[])};typeof t.header=="object"&&Ti(r,t.header);var o;for(var l in r)if(ut(r,l)){if(o=r[l],o==null)continue;Array.isArray(o)||(o=[o]),o.length&&(a+=l+": "+o.join("; ")+B.LINE_BREAK)}return"--"+this.getBoundary()+B.LINE_BREAK+a+B.LINE_BREAK};B.prototype._getContentDisposition=function(n,e){var t;if(typeof e.filepath=="string"?t=Si.normalize(e.filepath).replace(/\\/g,"/"):e.filename||n&&(n.name||n.path)?t=Si.basename(e.filename||n&&(n.name||n.path)):n&&n.readable&&ut(n,"httpVersion")&&(t=Si.basename(n.client._httpMessage.path||"")),t)return'filename="'+t+'"'};B.prototype._getContentType=function(n,e){var t=e.contentType;return!t&&n&&n.name&&(t=Ri.lookup(n.name)),!t&&n&&n.path&&(t=Ri.lookup(n.path)),!t&&n&&n.readable&&ut(n,"httpVersion")&&(t=n.headers["content-type"]),!t&&(e.filepath||e.filename)&&(t=Ri.lookup(e.filepath||e.filename)),!t&&n&&typeof n=="object"&&(t=B.DEFAULT_CONTENT_TYPE),t};B.prototype._multiPartFooter=function(){return function(n){var e=B.LINE_BREAK,t=this._streams.length===0;t&&(e+=this._lastBoundary()),n(e)}.bind(this)};B.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+B.LINE_BREAK};B.prototype.getHeaders=function(n){var e,t={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in n)ut(n,e)&&(t[e.toLowerCase()]=n[e]);return t};B.prototype.setBoundary=function(n){if(typeof n!="string")throw new TypeError("FormData boundary must be a string");this._boundary=n};B.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};B.prototype.getBuffer=function(){for(var n=new Buffer.alloc(0),e=this.getBoundary(),t=0,s=this._streams.length;t<s;t++)typeof this._streams[t]!="function"&&(Buffer.isBuffer(this._streams[t])?n=Buffer.concat([n,this._streams[t]]):n=Buffer.concat([n,Buffer.from(this._streams[t])]),(typeof this._streams[t]!="string"||this._streams[t].substring(2,e.length+2)!==e)&&(n=Buffer.concat([n,Buffer.from(B.LINE_BREAK)])));return Buffer.concat([n,Buffer.from(this._lastBoundary())])};B.prototype._generateBoundary=function(){this._boundary="--------------------------"+Tm.randomBytes(12).toString("hex")};B.prototype.getLengthSync=function(){var n=this._overheadLength+this._valueLength;return this._streams.length&&(n+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),n};B.prototype.hasKnownLength=function(){var n=!0;return this._valuesToMeasure.length&&(n=!1),n};B.prototype.getLength=function(n){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(n.bind(this,null,e));return}km.parallel(this._valuesToMeasure,this._lengthRetriever,function(t,s){if(t){n(t);return}s.forEach(function(i){e+=i}),n(null,e)})};B.prototype.submit=function(n,e){var t,s,i={method:"post"};return typeof n=="string"?(n=Em(n),s=Ti({port:n.port,path:n.pathname,host:n.hostname,protocol:n.protocol},i)):(s=Ti(n,i),s.port||(s.port=s.protocol==="https:"?443:80)),s.headers=this.getHeaders(n.headers),s.protocol==="https:"?t=Cm.request(s):t=wm.request(s),this.getLength(function(a,r){if(a&&a!=="Unknown stream"){this._error(a);return}if(r&&t.setHeader("Content-Length",r),this.pipe(t),e){var o,l=function(c,p){return t.removeListener("error",l),t.removeListener("response",o),e.call(this,c,p)};o=l.bind(this,null),t.on("error",l),t.on("response",o)}}.bind(this)),t};B.prototype._error=function(n){this.error||(this.error=n,this.pause(),this.emit("error",n))};B.prototype.toString=function(){return"[object FormData]"};Am(B,"FormData");gc.exports=B});var Lc=w(Uc=>{"use strict";var Hm=I("url").parse,Km={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Jm=String.prototype.endsWith||function(n){return n.length<=this.length&&this.indexOf(n,this.length-n.length)!==-1};function Xm(n){var e=typeof n=="string"?Hm(n):n||{},t=e.protocol,s=e.host,i=e.port;if(typeof s!="string"||!s||typeof t!="string"||(t=t.split(":",1)[0],s=s.replace(/:\d*$/,""),i=parseInt(i)||Km[t]||0,!Qm(s,i)))return"";var a=Yt("npm_config_"+t+"_proxy")||Yt(t+"_proxy")||Yt("npm_config_proxy")||Yt("all_proxy");return a&&a.indexOf("://")===-1&&(a=t+"://"+a),a}function Qm(n,e){var t=(Yt("npm_config_no_proxy")||Yt("no_proxy")).toLowerCase();return t?t==="*"?!1:t.split(/[,\s]/).every(function(s){if(!s)return!0;var i=s.match(/^(.+):(\d+)$/),a=i?i[1]:s,r=i?parseInt(i[2]):0;return r&&r!==e?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!Jm.call(n,a)):n!==a}):!0}function Yt(n){return process.env[n.toLowerCase()]||process.env[n.toUpperCase()]||""}Uc.getProxyForUrl=Xm});var Pc=w((sv,Fc)=>{"use strict";var Zt=1e3,en=Zt*60,tn=en*60,St=tn*24,Ym=St*7,Zm=St*365.25;Fc.exports=function(n,e){e=e||{};var t=typeof n;if(t==="string"&&n.length>0)return ef(n);if(t==="number"&&isFinite(n))return e.long?nf(n):tf(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function ef(n){if(n=String(n),!(n.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(e){var t=parseFloat(e[1]),s=(e[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return t*Zm;case"weeks":case"week":case"w":return t*Ym;case"days":case"day":case"d":return t*St;case"hours":case"hour":case"hrs":case"hr":case"h":return t*tn;case"minutes":case"minute":case"mins":case"min":case"m":return t*en;case"seconds":case"second":case"secs":case"sec":case"s":return t*Zt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function tf(n){var e=Math.abs(n);return e>=St?Math.round(n/St)+"d":e>=tn?Math.round(n/tn)+"h":e>=en?Math.round(n/en)+"m":e>=Zt?Math.round(n/Zt)+"s":n+"ms"}function nf(n){var e=Math.abs(n);return e>=St?Es(n,e,St,"day"):e>=tn?Es(n,e,tn,"hour"):e>=en?Es(n,e,en,"minute"):e>=Zt?Es(n,e,Zt,"second"):n+" ms"}function Es(n,e,t,s){var i=e>=t*1.5;return Math.round(n/t)+" "+s+(i?"s":"")}});var Bi=w((iv,Mc)=>{"use strict";function sf(n){t.debug=t,t.default=t,t.coerce=l,t.disable=r,t.enable=i,t.enabled=o,t.humanize=Pc(),t.destroy=c,Object.keys(n).forEach(p=>{t[p]=n[p]}),t.names=[],t.skips=[],t.formatters={};function e(p){let u=0;for(let m=0;m<p.length;m++)u=(u<<5)-u+p.charCodeAt(m),u|=0;return t.colors[Math.abs(u)%t.colors.length]}t.selectColor=e;function t(p){let u,m=null,f,g;function v(..._){if(!v.enabled)return;let R=v,D=Number(new Date),L=D-(u||D);R.diff=L,R.prev=u,R.curr=D,u=D,_[0]=t.coerce(_[0]),typeof _[0]!="string"&&_.unshift("%O");let q=0;_[0]=_[0].replace(/%([a-zA-Z%])/g,(Y,ae)=>{if(Y==="%%")return"%";q++;let Z=t.formatters[ae];if(typeof Z=="function"){let ye=_[q];Y=Z.call(R,ye),_.splice(q,1),q--}return Y}),t.formatArgs.call(R,_),(R.log||t.log).apply(R,_)}return v.namespace=p,v.useColors=t.useColors(),v.color=t.selectColor(p),v.extend=s,v.destroy=t.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(f!==t.namespaces&&(f=t.namespaces,g=t.enabled(p)),g),set:_=>{m=_}}),typeof t.init=="function"&&t.init(v),v}function s(p,u){let m=t(this.namespace+(typeof u>"u"?":":u)+p);return m.log=this.log,m}function i(p){t.save(p),t.namespaces=p,t.names=[],t.skips=[];let u=(typeof p=="string"?p:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of u)m[0]==="-"?t.skips.push(m.slice(1)):t.names.push(m)}function a(p,u){let m=0,f=0,g=-1,v=0;for(;m<p.length;)if(f<u.length&&(u[f]===p[m]||u[f]==="*"))u[f]==="*"?(g=f,v=m,f++):(m++,f++);else if(g!==-1)f=g+1,v++,m=v;else return!1;for(;f<u.length&&u[f]==="*";)f++;return f===u.length}function r(){let p=[...t.names,...t.skips.map(u=>"-"+u)].join(",");return t.enable(""),p}function o(p){for(let u of t.skips)if(a(p,u))return!1;for(let u of t.names)if(a(p,u))return!0;return!1}function l(p){return p instanceof Error?p.stack||p.message:p}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}Mc.exports=sf});var jc=w((De,Ss)=>{"use strict";De.formatArgs=rf;De.save=of;De.load=cf;De.useColors=af;De.storage=lf();De.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();De.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function af(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let n;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(n=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(n[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function rf(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+Ss.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;n.splice(1,0,e,"color: inherit");let t=0,s=0;n[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(t++,i==="%c"&&(s=t))}),n.splice(s,0,e)}De.log=console.debug||console.log||(()=>{});function of(n){try{n?De.storage.setItem("debug",n):De.storage.removeItem("debug")}catch{}}function cf(){let n;try{n=De.storage.getItem("debug")||De.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}function lf(){try{return localStorage}catch{}}Ss.exports=Bi()(De);var{formatters:pf}=Ss.exports;pf.j=function(n){try{return JSON.stringify(n)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var qc=w((av,Nc)=>{"use strict";Nc.exports=(n,e=process.argv)=>{let t=n.startsWith("-")?"":n.length===1?"-":"--",s=e.indexOf(t+n),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)}});var $c=w((rv,Bc)=>{"use strict";var uf=I("os"),Gc=I("tty"),$e=qc(),{env:ge}=process,Rs;$e("no-color")||$e("no-colors")||$e("color=false")||$e("color=never")?Rs=0:($e("color")||$e("colors")||$e("color=true")||$e("color=always"))&&(Rs=1);function df(){if("FORCE_COLOR"in ge)return ge.FORCE_COLOR==="true"?1:ge.FORCE_COLOR==="false"?0:ge.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ge.FORCE_COLOR,10),3)}function mf(n){return n===0?!1:{level:n,hasBasic:!0,has256:n>=2,has16m:n>=3}}function ff(n,{streamIsTTY:e,sniffFlags:t=!0}={}){let s=df();s!==void 0&&(Rs=s);let i=t?Rs:s;if(i===0)return 0;if(t){if($e("color=16m")||$e("color=full")||$e("color=truecolor"))return 3;if($e("color=256"))return 2}if(n&&!e&&i===void 0)return 0;let a=i||0;if(ge.TERM==="dumb")return a;if(process.platform==="win32"){let r=uf.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in ge)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in ge)||ge.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in ge)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ge.TEAMCITY_VERSION)?1:0;if(ge.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ge){let r=Number.parseInt((ge.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ge.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ge.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ge.TERM)||"COLORTERM"in ge?1:a}function $i(n,e={}){let t=ff(n,{streamIsTTY:n&&n.isTTY,...e});return mf(t)}Bc.exports={supportsColor:$i,stdout:$i({isTTY:Gc.isatty(1)}),stderr:$i({isTTY:Gc.isatty(2)})}});var Wc=w((be,ks)=>{"use strict";var hf=I("tty"),Ts=I("util");be.init=wf;be.log=vf;be.formatArgs=bf;be.save=_f;be.load=yf;be.useColors=gf;be.destroy=Ts.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");be.colors=[6,2,3,4,5,1];try{let n=$c();n&&(n.stderr||n).level>=2&&(be.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}be.inspectOpts=Object.keys(process.env).filter(n=>/^debug_/i.test(n)).reduce((n,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,a)=>a.toUpperCase()),s=process.env[e];return/^(yes|on|true|enabled)$/i.test(s)?s=!0:/^(no|off|false|disabled)$/i.test(s)?s=!1:s==="null"?s=null:s=Number(s),n[t]=s,n},{});function gf(){return"colors"in be.inspectOpts?!!be.inspectOpts.colors:hf.isatty(process.stderr.fd)}function bf(n){let{namespace:e,useColors:t}=this;if(t){let s=this.color,i="\x1B[3"+(s<8?s:"8;5;"+s),a=` ${i};1m${e} \x1B[0m`;n[0]=a+n[0].split(`
3
3
  `).join(`
4
- `+a),n.push(i+"m+"+Ts.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=vf()+e+" "+n[0]}function vf(){return be.inspectOpts.hideDate?"":new Date().toISOString()+" "}function _f(...n){return process.stderr.write(Rs.formatWithOptions(be.inspectOpts,...n)+`
5
- `)}function yf(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function wf(){return process.env.DEBUG}function Cf(n){n.inspectOpts={};let e=Object.keys(be.inspectOpts);for(let t=0;t<e.length;t++)n.inspectOpts[e[t]]=be.inspectOpts[e[t]]}Ts.exports=Gi()(be);var{formatters:zc}=Ts.exports;zc.o=function(n){return this.inspectOpts.colors=this.useColors,Rs.inspect(n,this.inspectOpts).split(`
6
- `).map(e=>e.trim()).join(" ")};zc.O=function(n){return this.inspectOpts.colors=this.useColors,Rs.inspect(n,this.inspectOpts)}});var Vc=w((ov,$i)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?$i.exports=jc():$i.exports=Wc()});var Kc=w((cv,Hc)=>{"use strict";var kn;Hc.exports=function(){if(!kn){try{kn=Vc()("follow-redirects")}catch{}typeof kn!="function"&&(kn=function(){})}kn.apply(null,arguments)}});var Zc=w((lv,ta)=>{"use strict";var In=I("url"),An=In.URL,Ef=I("http"),Sf=(lt(),gn(_n)),Ki=I("stream").Writable,Ji=I("assert"),Jc=Kc();(function(){var e=typeof process<"u",t=typeof window<"u"&&typeof document<"u",s=Rt(Error.captureStackTrace);!e&&(t||!s)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var Xi=!1;try{Ji(new An(""))}catch(n){Xi=n.code==="ERR_INVALID_URL"}var Rf=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Qi=["abort","aborted","connect","error","socket","timeout"],Yi=Object.create(null);Qi.forEach(function(n){Yi[n]=function(e,t,s){this._redirectable.emit(n,e,t,s)}});var Wi=Dn("ERR_INVALID_URL","Invalid URL",TypeError),Vi=Dn("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Tf=Dn("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Vi),kf=Dn("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Af=Dn("ERR_STREAM_WRITE_AFTER_END","write after end"),If=Ki.prototype.destroy||Qc;function Oe(n,e){Ki.call(this),this._sanitizeOptions(n),this._options=n,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var t=this;this._onNativeResponse=function(s){try{t._processResponse(s)}catch(i){t.emit("error",i instanceof Vi?i:new Vi({cause:i}))}},this._performRequest()}Oe.prototype=Object.create(Ki.prototype);Oe.prototype.abort=function(){ea(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Oe.prototype.destroy=function(n){return ea(this._currentRequest,n),If.call(this,n),this};Oe.prototype.write=function(n,e,t){if(this._ending)throw new Af;if(!St(n)&&!Uf(n))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Rt(e)&&(t=e,e=null),n.length===0){t&&t();return}this._requestBodyLength+n.length<=this._options.maxBodyLength?(this._requestBodyLength+=n.length,this._requestBodyBuffers.push({data:n,encoding:e}),this._currentRequest.write(n,e,t)):(this.emit("error",new kf),this.abort())};Oe.prototype.end=function(n,e,t){if(Rt(n)?(t=n,n=e=null):Rt(e)&&(t=e,e=null),!n)this._ended=this._ending=!0,this._currentRequest.end(null,null,t);else{var s=this,i=this._currentRequest;this.write(n,e,function(){s._ended=!0,i.end(null,null,t)}),this._ending=!0}};Oe.prototype.setHeader=function(n,e){this._options.headers[n]=e,this._currentRequest.setHeader(n,e)};Oe.prototype.removeHeader=function(n){delete this._options.headers[n],this._currentRequest.removeHeader(n)};Oe.prototype.setTimeout=function(n,e){var t=this;function s(r){r.setTimeout(n),r.removeListener("timeout",r.destroy),r.addListener("timeout",r.destroy)}function i(r){t._timeout&&clearTimeout(t._timeout),t._timeout=setTimeout(function(){t.emit("timeout"),a()},n),s(r)}function a(){t._timeout&&(clearTimeout(t._timeout),t._timeout=null),t.removeListener("abort",a),t.removeListener("error",a),t.removeListener("response",a),t.removeListener("close",a),e&&t.removeListener("timeout",e),t.socket||t._currentRequest.removeListener("socket",i)}return e&&this.on("timeout",e),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",s),this.on("abort",a),this.on("error",a),this.on("response",a),this.on("close",a),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(n){Oe.prototype[n]=function(e,t){return this._currentRequest[n](e,t)}});["aborted","connection","socket"].forEach(function(n){Object.defineProperty(Oe.prototype,n,{get:function(){return this._currentRequest[n]}})});Oe.prototype._sanitizeOptions=function(n){if(n.headers||(n.headers={}),n.host&&(n.hostname||(n.hostname=n.host),delete n.host),!n.pathname&&n.path){var e=n.path.indexOf("?");e<0?n.pathname=n.path:(n.pathname=n.path.substring(0,e),n.search=n.path.substring(e))}};Oe.prototype._performRequest=function(){var n=this._options.protocol,e=this._options.nativeProtocols[n];if(!e)throw new TypeError("Unsupported protocol "+n);if(this._options.agents){var t=n.slice(0,-1);this._options.agent=this._options.agents[t]}var s=this._currentRequest=e.request(this._options,this._onNativeResponse);s._redirectable=this;for(var i of Qi)s.on(i,Yi[i]);if(this._currentUrl=/^\//.test(this._options.path)?In.format(this._options):this._options.path,this._isRedirect){var a=0,r=this,o=this._requestBodyBuffers;(function l(c){if(s===r._currentRequest)if(c)r.emit("error",c);else if(a<o.length){var p=o[a++];s.finished||s.write(p.data,p.encoding,l)}else r._ended&&s.end()})()}};Oe.prototype._processResponse=function(n){var e=n.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:n.headers,statusCode:e});var t=n.headers.location;if(!t||this._options.followRedirects===!1||e<300||e>=400){n.responseUrl=this._currentUrl,n.redirects=this._redirects,this.emit("response",n),this._requestBodyBuffers=[];return}if(ea(this._currentRequest),n.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Tf;var s,i=this._options.beforeRedirect;i&&(s=Object.assign({Host:n.req.getHeader("host")},this._options.headers));var a=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],zi(/^content-/i,this._options.headers));var r=zi(/^host$/i,this._options.headers),o=Zi(this._currentUrl),l=r||o.host,c=/^\w+:/.test(t)?this._currentUrl:In.format(Object.assign(o,{host:l})),p=Df(t,c);if(Jc("redirecting to",p.href),this._isRedirect=!0,Hi(p,this._options),(p.protocol!==o.protocol&&p.protocol!=="https:"||p.host!==l&&!Of(p.host,l))&&zi(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Rt(i)){var u={headers:n.headers,statusCode:e},m={url:c,method:a,headers:s};i(this._options,u,m),this._sanitizeOptions(this._options)}this._performRequest()};function Xc(n){var e={maxRedirects:21,maxBodyLength:10485760},t={};return Object.keys(n).forEach(function(s){var i=s+":",a=t[i]=n[s],r=e[s]=Object.create(a);function o(c,p,u){return Lf(c)?c=Hi(c):St(c)?c=Hi(Zi(c)):(u=p,p=Yc(c),c={protocol:i}),Rt(p)&&(u=p,p=null),p=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},c,p),p.nativeProtocols=t,!St(p.host)&&!St(p.hostname)&&(p.hostname="::1"),Ji.equal(p.protocol,i,"protocol mismatch"),Jc("options",p),new Oe(p,u)}function l(c,p,u){var m=r.request(c,p,u);return m.end(),m}Object.defineProperties(r,{request:{value:o,configurable:!0,enumerable:!0,writable:!0},get:{value:l,configurable:!0,enumerable:!0,writable:!0}})}),e}function Qc(){}function Zi(n){var e;if(Xi)e=new An(n);else if(e=Yc(In.parse(n)),!St(e.protocol))throw new Wi({input:n});return e}function Df(n,e){return Xi?new An(n,e):Zi(In.resolve(e,n))}function Yc(n){if(/^\[/.test(n.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(n.hostname))throw new Wi({input:n.href||n});if(/^\[/.test(n.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(n.host))throw new Wi({input:n.href||n});return n}function Hi(n,e){var t=e||{};for(var s of Rf)t[s]=n[s];return t.hostname.startsWith("[")&&(t.hostname=t.hostname.slice(1,-1)),t.port!==""&&(t.port=Number(t.port)),t.path=t.search?t.pathname+t.search:t.pathname,t}function zi(n,e){var t;for(var s in e)n.test(s)&&(t=e[s],delete e[s]);return t===null||typeof t>"u"?void 0:String(t).trim()}function Dn(n,e,t){function s(i){Rt(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=n,this.message=this.cause?e+": "+this.cause.message:e}return s.prototype=new(t||Error),Object.defineProperties(s.prototype,{constructor:{value:s,enumerable:!1},name:{value:"Error ["+n+"]",enumerable:!1}}),s}function ea(n,e){for(var t of Qi)n.removeListener(t,Yi[t]);n.on("error",Qc),n.destroy(e)}function Of(n,e){Ji(St(n)&&St(e));var t=n.length-e.length-1;return t>0&&n[t]==="."&&n.endsWith(e)}function St(n){return typeof n=="string"||n instanceof String}function Rt(n){return typeof n=="function"}function Uf(n){return typeof n=="object"&&"length"in n}function Lf(n){return An&&n instanceof An}ta.exports=Xc({http:Ef,https:Sf});ta.exports.wrap=Xc});var Ut=w((cw,Vl)=>{"use strict";Vl.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),EMPTY_BUFFER:Buffer.alloc(0),NOOP:()=>{}}});var Gn=w((lw,xa)=>{"use strict";var{EMPTY_BUFFER:bh}=Ut();function Hl(n,e){if(n.length===0)return bh;if(n.length===1)return n[0];let t=Buffer.allocUnsafe(e),s=0;for(let i=0;i<n.length;i++){let a=n[i];t.set(a,s),s+=a.length}return s<e?t.slice(0,s):t}function Kl(n,e,t,s,i){for(let a=0;a<i;a++)t[s+a]=n[a]^e[a&3]}function Jl(n,e){let t=n.length;for(let s=0;s<t;s++)n[s]^=e[s&3]}function Xl(n){return n.byteLength===n.buffer.byteLength?n.buffer:n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)}function qs(n){if(qs.readOnly=!0,Buffer.isBuffer(n))return n;let e;return n instanceof ArrayBuffer?e=Buffer.from(n):ArrayBuffer.isView(n)?e=Buffer.from(n.buffer,n.byteOffset,n.byteLength):(e=Buffer.from(n),qs.readOnly=!1),e}try{let n=I("bufferutil"),e=n.BufferUtil||n;xa.exports={concat:Hl,mask(t,s,i,a,r){r<48?Kl(t,s,i,a,r):e.mask(t,s,i,a,r)},toArrayBuffer:Xl,toBuffer:qs,unmask(t,s){t.length<32?Jl(t,s):e.unmask(t,s)}}}catch{xa.exports={concat:Hl,mask:Kl,toArrayBuffer:Xl,toBuffer:qs,unmask:Jl}}});var Zl=w((pw,Yl)=>{"use strict";var Ql=Symbol("kDone"),va=Symbol("kRun"),_a=class{constructor(e){this[Ql]=()=>{this.pending--,this[va]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[va]()}[va](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Ql])}}};Yl.exports=_a});var zn=w((uw,sp)=>{"use strict";var Bn=I("zlib"),ep=Gn(),xh=Zl(),{kStatusCode:tp,NOOP:vh}=Ut(),_h=Buffer.from([0,0,255,255]),$s=Symbol("permessage-deflate"),at=Symbol("total-length"),$n=Symbol("callback"),mt=Symbol("buffers"),Bs=Symbol("error"),Gs,ya=class{constructor(e,t,s){if(this._maxPayload=s|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!Gs){let i=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Gs=new xh(i)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[$n];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,s=e.find(i=>!(t.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>i.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!s)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(s.server_no_context_takeover=!0),t.clientNoContextTakeover&&(s.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(s.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?s.client_max_window_bits=t.clientMaxWindowBits:(s.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete s.client_max_window_bits,s}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return t}normalizeParams(e){return e.forEach(t=>{Object.keys(t).forEach(s=>{let i=t[s];if(i.length>1)throw new Error(`Parameter "${s}" must have only a single value`);if(i=i[0],s==="client_max_window_bits"){if(i!==!0){let a=+i;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${s}": ${i}`);i=a}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${s}": ${i}`)}else if(s==="server_max_window_bits"){let a=+i;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${s}": ${i}`);i=a}else if(s==="client_no_context_takeover"||s==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${s}": ${i}`)}else throw new Error(`Unknown parameter "${s}"`);t[s]=i})}),e}decompress(e,t,s){Gs.add(i=>{this._decompress(e,t,(a,r)=>{i(),s(a,r)})})}compress(e,t,s){Gs.add(i=>{this._compress(e,t,(a,r)=>{i(),s(a,r)})})}_decompress(e,t,s){let i=this._isServer?"client":"server";if(!this._inflate){let a=`${i}_max_window_bits`,r=typeof this.params[a]!="number"?Bn.Z_DEFAULT_WINDOWBITS:this.params[a];this._inflate=Bn.createInflateRaw({...this._options.zlibInflateOptions,windowBits:r}),this._inflate[$s]=this,this._inflate[at]=0,this._inflate[mt]=[],this._inflate.on("error",wh),this._inflate.on("data",np)}this._inflate[$n]=s,this._inflate.write(e),t&&this._inflate.write(_h),this._inflate.flush(()=>{let a=this._inflate[Bs];if(a){this._inflate.close(),this._inflate=null,s(a);return}let r=ep.concat(this._inflate[mt],this._inflate[at]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[at]=0,this._inflate[mt]=[],t&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),s(null,r)})}_compress(e,t,s){let i=this._isServer?"server":"client";if(!this._deflate){let a=`${i}_max_window_bits`,r=typeof this.params[a]!="number"?Bn.Z_DEFAULT_WINDOWBITS:this.params[a];this._deflate=Bn.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:r}),this._deflate[at]=0,this._deflate[mt]=[],this._deflate.on("error",vh),this._deflate.on("data",yh)}this._deflate[$n]=s,this._deflate.write(e),this._deflate.flush(Bn.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let a=ep.concat(this._deflate[mt],this._deflate[at]);t&&(a=a.slice(0,a.length-4)),this._deflate[$n]=null,this._deflate[at]=0,this._deflate[mt]=[],t&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),s(null,a)})}};sp.exports=ya;function yh(n){this[mt].push(n),this[at]+=n.length}function np(n){if(this[at]+=n.length,this[$s]._maxPayload<1||this[at]<=this[$s]._maxPayload){this[mt].push(n);return}this[Bs]=new RangeError("Max payload size exceeded"),this[Bs].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Bs][tp]=1009,this.removeListener("data",np),this.reset()}function wh(n){this[$s]._inflate=null,n[tp]=1007,this[$n](n)}});var Ca=w((dw,wa)=>{"use strict";function ip(n){return n>=1e3&&n<=1014&&n!==1004&&n!==1005&&n!==1006||n>=3e3&&n<=4999}function ap(n){let e=n.length,t=0;for(;t<e;)if((n[t]&128)===0)t++;else if((n[t]&224)===192){if(t+1===e||(n[t+1]&192)!==128||(n[t]&254)===192)return!1;t+=2}else if((n[t]&240)===224){if(t+2>=e||(n[t+1]&192)!==128||(n[t+2]&192)!==128||n[t]===224&&(n[t+1]&224)===128||n[t]===237&&(n[t+1]&224)===160)return!1;t+=3}else if((n[t]&248)===240){if(t+3>=e||(n[t+1]&192)!==128||(n[t+2]&192)!==128||(n[t+3]&192)!==128||n[t]===240&&(n[t+1]&240)===128||n[t]===244&&n[t+1]>143||n[t]>244)return!1;t+=4}else return!1;return!0}try{let n=I("utf-8-validate");typeof n=="object"&&(n=n.Validation.isValidUTF8),wa.exports={isValidStatusCode:ip,isValidUTF8(e){return e.length<150?ap(e):n(e)}}}catch{wa.exports={isValidStatusCode:ip,isValidUTF8:ap}}});var Ta=w((mw,up)=>{"use strict";var{Writable:Ch}=I("stream"),rp=zn(),{BINARY_TYPES:Eh,EMPTY_BUFFER:Sh,kStatusCode:Rh,kWebSocket:Th}=Ut(),{concat:Ea,toArrayBuffer:kh,unmask:Ah}=Gn(),{isValidStatusCode:Ih,isValidUTF8:op}=Ca(),Wn=0,cp=1,lp=2,pp=3,Sa=4,Dh=5,Ra=class extends Ch{constructor(e,t,s,i){super(),this._binaryType=e||Eh[0],this[Th]=void 0,this._extensions=t||{},this._isServer=!!s,this._maxPayload=i|0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=Wn,this._loop=!1}_write(e,t,s){if(this._opcode===8&&this._state==Wn)return s();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(s)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let s=this._buffers[0];return this._buffers[0]=s.slice(e),s.slice(0,e)}let t=Buffer.allocUnsafe(e);do{let s=this._buffers[0],i=t.length-e;e>=s.length?t.set(this._buffers.shift(),i):(t.set(new Uint8Array(s.buffer,s.byteOffset,e),i),this._buffers[0]=s.slice(e)),e-=s.length}while(e>0);return t}startLoop(e){let t;this._loop=!0;do switch(this._state){case Wn:t=this.getInfo();break;case cp:t=this.getPayloadLength16();break;case lp:t=this.getPayloadLength64();break;case pp:this.getMask();break;case Sa:t=this.getData(e);break;default:this._loop=!1;return}while(this._loop);e(t)}getInfo(){if(this._bufferedBytes<2){this._loop=!1;return}let e=this.consume(2);if((e[0]&48)!==0)return this._loop=!1,me(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");let t=(e[0]&64)===64;if(t&&!this._extensions[rp.extensionName])return this._loop=!1,me(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=(e[0]&128)===128,this._opcode=e[0]&15,this._payloadLength=e[1]&127,this._opcode===0){if(t)return this._loop=!1,me(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,me(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented)return this._loop=!1,me(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=t}else if(this._opcode>7&&this._opcode<11){if(!this._fin)return this._loop=!1,me(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(t)return this._loop=!1,me(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125)return this._loop=!1,me(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}else return this._loop=!1,me(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(e[1]&128)===128,this._isServer){if(!this._masked)return this._loop=!1,me(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,me(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(this._payloadLength===126)this._state=cp;else if(this._payloadLength===127)this._state=lp;else return this.haveLength()}getPayloadLength16(){if(this._bufferedBytes<2){this._loop=!1;return}return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength()}getPayloadLength64(){if(this._bufferedBytes<8){this._loop=!1;return}let e=this.consume(8),t=e.readUInt32BE(0);return t>Math.pow(2,21)-1?(this._loop=!1,me(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=t*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,me(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=pp:this._state=Sa}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Sa}getData(e){let t=Sh;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&Ah(t,this._mask)}if(this._opcode>7)return this.controlMessage(t);if(this._compressed){this._state=Dh,this.decompress(t,e);return}return t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage()}decompress(e,t){this._extensions[rp.extensionName].decompress(e,this._fin,(i,a)=>{if(i)return t(i);if(a.length){if(this._messageLength+=a.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return t(me(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(a)}let r=this.dataMessage();if(r)return t(r);this.startLoop(t)})}dataMessage(){if(this._fin){let e=this._messageLength,t=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let s;this._binaryType==="nodebuffer"?s=Ea(t,e):this._binaryType==="arraybuffer"?s=kh(Ea(t,e)):s=t,this.emit("message",s)}else{let s=Ea(t,e);if(!op(s))return this._loop=!1,me(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",s.toString())}}this._state=Wn}controlMessage(e){if(this._opcode===8)if(this._loop=!1,e.length===0)this.emit("conclude",1005,""),this.end();else{if(e.length===1)return me(RangeError,"invalid payload length 1",!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");{let t=e.readUInt16BE(0);if(!Ih(t))return me(RangeError,`invalid status code ${t}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");let s=e.slice(2);if(!op(s))return me(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",t,s.toString()),this.end()}}else this._opcode===9?this.emit("ping",e):this.emit("pong",e);this._state=Wn}};up.exports=Ra;function me(n,e,t,s,i){let a=new n(t?`Invalid WebSocket frame: ${e}`:e);return Error.captureStackTrace(a,me),a.code=i,a[Rh]=s,a}});var Aa=w((gw,fp)=>{"use strict";var fw=I("net"),hw=I("tls"),{randomFillSync:Oh}=I("crypto"),dp=zn(),{EMPTY_BUFFER:Uh}=Ut(),{isValidStatusCode:Lh}=Ca(),{mask:mp,toBuffer:rt}=Gn(),Lt=Buffer.alloc(4),ka=class n{constructor(e,t){this._extensions=t||{},this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){let s=t.mask&&t.readOnly,i=t.mask?6:2,a=e.length;e.length>=65536?(i+=8,a=127):e.length>125&&(i+=2,a=126);let r=Buffer.allocUnsafe(s?e.length+i:i);return r[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(r[0]|=64),r[1]=a,a===126?r.writeUInt16BE(e.length,2):a===127&&(r.writeUInt32BE(0,2),r.writeUInt32BE(e.length,6)),t.mask?(Oh(Lt,0,4),r[1]|=128,r[i-4]=Lt[0],r[i-3]=Lt[1],r[i-2]=Lt[2],r[i-1]=Lt[3],s?(mp(e,Lt,r,i,e.length),[r]):(mp(e,Lt,e,0,e.length),[r,e])):[r,e]}close(e,t,s,i){let a;if(e===void 0)a=Uh;else{if(typeof e!="number"||!Lh(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||t==="")a=Buffer.allocUnsafe(2),a.writeUInt16BE(e,0);else{let r=Buffer.byteLength(t);if(r>123)throw new RangeError("The message must not be greater than 123 bytes");a=Buffer.allocUnsafe(2+r),a.writeUInt16BE(e,0),a.write(t,2)}}this._deflating?this.enqueue([this.doClose,a,s,i]):this.doClose(a,s,i)}doClose(e,t,s){this.sendFrame(n.frame(e,{fin:!0,rsv1:!1,opcode:8,mask:t,readOnly:!1}),s)}ping(e,t,s){let i=rt(e);if(i.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPing,i,t,rt.readOnly,s]):this.doPing(i,t,rt.readOnly,s)}doPing(e,t,s,i){this.sendFrame(n.frame(e,{fin:!0,rsv1:!1,opcode:9,mask:t,readOnly:s}),i)}pong(e,t,s){let i=rt(e);if(i.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPong,i,t,rt.readOnly,s]):this.doPong(i,t,rt.readOnly,s)}doPong(e,t,s,i){this.sendFrame(n.frame(e,{fin:!0,rsv1:!1,opcode:10,mask:t,readOnly:s}),i)}send(e,t,s){let i=rt(e),a=this._extensions[dp.extensionName],r=t.binary?2:1,o=t.compress;if(this._firstFragment?(this._firstFragment=!1,o&&a&&(o=i.length>=a._threshold),this._compress=o):(o=!1,r=0),t.fin&&(this._firstFragment=!0),a){let l={fin:t.fin,rsv1:o,opcode:r,mask:t.mask,readOnly:rt.readOnly};this._deflating?this.enqueue([this.dispatch,i,this._compress,l,s]):this.dispatch(i,this._compress,l,s)}else this.sendFrame(n.frame(i,{fin:t.fin,rsv1:!1,opcode:r,mask:t.mask,readOnly:rt.readOnly}),s)}dispatch(e,t,s,i){if(!t){this.sendFrame(n.frame(e,s),i);return}let a=this._extensions[dp.extensionName];this._bufferedBytes+=e.length,this._deflating=!0,a.compress(e,s.fin,(r,o)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");typeof i=="function"&&i(l);for(let c=0;c<this._queue.length;c++){let p=this._queue[c][4];typeof p=="function"&&p(l)}return}this._bufferedBytes-=e.length,this._deflating=!1,s.readOnly=!1,this.sendFrame(n.frame(o,s),i),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[1].length,Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[1].length,this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};fp.exports=ka});var gp=w((bw,hp)=>{"use strict";var ln=class{constructor(e,t){this.target=t,this.type=e}},Ia=class extends ln{constructor(e,t){super("message",t),this.data=e}},Da=class extends ln{constructor(e,t,s){super("close",s),this.wasClean=s._closeFrameReceived&&s._closeFrameSent,this.reason=t,this.code=e}},Oa=class extends ln{constructor(e){super("open",e)}},Ua=class extends ln{constructor(e,t){super("error",t),this.message=e.message,this.error=e}},Fh={addEventListener(n,e,t){if(typeof e!="function")return;function s(l){e.call(this,new Ia(l,this))}function i(l,c){e.call(this,new Da(l,c,this))}function a(l){e.call(this,new Ua(l,this))}function r(){e.call(this,new Oa(this))}let o=t&&t.once?"once":"on";n==="message"?(s._listener=e,this[o](n,s)):n==="close"?(i._listener=e,this[o](n,i)):n==="error"?(a._listener=e,this[o](n,a)):n==="open"?(r._listener=e,this[o](n,r)):this[o](n,e)},removeEventListener(n,e){let t=this.listeners(n);for(let s=0;s<t.length;s++)(t[s]===e||t[s]._listener===e)&&this.removeListener(n,t[s])}};hp.exports=Fh});var La=w((xw,bp)=>{"use strict";var Vn=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Qe(n,e,t){n[e]===void 0?n[e]=[t]:n[e].push(t)}function Ph(n){let e=Object.create(null);if(n===void 0||n==="")return e;let t=Object.create(null),s=!1,i=!1,a=!1,r,o,l=-1,c=-1,p=0;for(;p<n.length;p++){let m=n.charCodeAt(p);if(r===void 0)if(c===-1&&Vn[m]===1)l===-1&&(l=p);else if(m===32||m===9)c===-1&&l!==-1&&(c=p);else if(m===59||m===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${p}`);c===-1&&(c=p);let f=n.slice(l,c);m===44?(Qe(e,f,t),t=Object.create(null)):r=f,l=c=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);else if(o===void 0)if(c===-1&&Vn[m]===1)l===-1&&(l=p);else if(m===32||m===9)c===-1&&l!==-1&&(c=p);else if(m===59||m===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${p}`);c===-1&&(c=p),Qe(t,n.slice(l,c),!0),m===44&&(Qe(e,r,t),t=Object.create(null),r=void 0),l=c=-1}else if(m===61&&l!==-1&&c===-1)o=n.slice(l,p),l=c=-1;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(i){if(Vn[m]!==1)throw new SyntaxError(`Unexpected character at index ${p}`);l===-1?l=p:s||(s=!0),i=!1}else if(a)if(Vn[m]===1)l===-1&&(l=p);else if(m===34&&l!==-1)a=!1,c=p;else if(m===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(m===34&&n.charCodeAt(p-1)===61)a=!0;else if(c===-1&&Vn[m]===1)l===-1&&(l=p);else if(l!==-1&&(m===32||m===9))c===-1&&(c=p);else if(m===59||m===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${p}`);c===-1&&(c=p);let f=n.slice(l,c);s&&(f=f.replace(/\\/g,""),s=!1),Qe(t,o,f),m===44&&(Qe(e,r,t),t=Object.create(null),r=void 0),o=void 0,l=c=-1}else throw new SyntaxError(`Unexpected character at index ${p}`)}if(l===-1||a)throw new SyntaxError("Unexpected end of input");c===-1&&(c=p);let u=n.slice(l,c);return r===void 0?Qe(e,u,t):(o===void 0?Qe(t,u,!0):s?Qe(t,o,u.replace(/\\/g,"")):Qe(t,o,u),Qe(e,r,t)),e}function Mh(n){return Object.keys(n).map(e=>{let t=n[e];return Array.isArray(t)||(t=[t]),t.map(s=>[e].concat(Object.keys(s).map(i=>{let a=s[i];return Array.isArray(a)||(a=[a]),a.map(r=>r===!0?i:`${i}=${r}`).join("; ")})).join("; ")).join(", ")}).join(", ")}bp.exports={format:Mh,parse:Ph}});var qa=w((_w,Tp)=>{"use strict";var jh=I("events"),Nh=(lt(),gn(_n)),qh=I("http"),_p=I("net"),Gh=I("tls"),{randomBytes:Bh,createHash:$h}=I("crypto"),{Readable:vw}=I("stream"),{URL:Fa}=I("url"),ft=zn(),zh=Ta(),Wh=Aa(),{BINARY_TYPES:xp,EMPTY_BUFFER:Pa,GUID:Vh,kStatusCode:Hh,kWebSocket:we,NOOP:yp}=Ut(),{addEventListener:Kh,removeEventListener:Jh}=gp(),{format:Xh,parse:Qh}=La(),{toBuffer:Yh}=Gn(),ot=["CONNECTING","OPEN","CLOSING","CLOSED"],Ma=[8,13],Zh=30*1e3,le=class n extends jh{constructor(e,t,s){super(),this._binaryType=xp[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage="",this._closeTimer=null,this._extensions={},this._protocol="",this._readyState=n.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,Array.isArray(t)?t=t.join(", "):typeof t=="object"&&t!==null&&(s=t,t=void 0),wp(this,e,t,s)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(e){xp.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get onclose(){}set onclose(e){}get onerror(){}set onerror(e){}get onopen(){}set onopen(e){}get onmessage(){}set onmessage(e){}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,s){let i=new zh(this.binaryType,this._extensions,this._isServer,s);this._sender=new Wh(e,this._extensions),this._receiver=i,this._socket=e,i[we]=this,e[we]=this,i.on("conclude",ng),i.on("drain",sg),i.on("error",ig),i.on("message",ag),i.on("ping",rg),i.on("pong",og),e.setTimeout(0),e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Ep),e.on("data",zs),e.on("end",Sp),e.on("error",Rp),this._readyState=n.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[ft.extensionName]&&this._extensions[ft.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING)return Ne(this,this._req,"WebSocket was closed before the connection was established");if(this.readyState===n.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=n.CLOSING,this._sender.close(e,t,!this._isServer,s=>{s||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),Zh)}}ping(e,t,s){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(s=e,e=t=void 0):typeof t=="function"&&(s=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==n.OPEN){Na(this,e,s);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||Pa,t,s)}pong(e,t,s){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(s=e,e=t=void 0):typeof t=="function"&&(s=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==n.OPEN){Na(this,e,s);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||Pa,t,s)}send(e,t,s){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(s=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==n.OPEN){Na(this,e,s);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[ft.extensionName]||(i.compress=!1),this._sender.send(e||Pa,i,s)}terminate(){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING)return Ne(this,this._req,"WebSocket was closed before the connection was established");this._socket&&(this._readyState=n.CLOSING,this._socket.destroy())}}};Object.defineProperty(le,"CONNECTING",{enumerable:!0,value:ot.indexOf("CONNECTING")});Object.defineProperty(le.prototype,"CONNECTING",{enumerable:!0,value:ot.indexOf("CONNECTING")});Object.defineProperty(le,"OPEN",{enumerable:!0,value:ot.indexOf("OPEN")});Object.defineProperty(le.prototype,"OPEN",{enumerable:!0,value:ot.indexOf("OPEN")});Object.defineProperty(le,"CLOSING",{enumerable:!0,value:ot.indexOf("CLOSING")});Object.defineProperty(le.prototype,"CLOSING",{enumerable:!0,value:ot.indexOf("CLOSING")});Object.defineProperty(le,"CLOSED",{enumerable:!0,value:ot.indexOf("CLOSED")});Object.defineProperty(le.prototype,"CLOSED",{enumerable:!0,value:ot.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","protocol","readyState","url"].forEach(n=>{Object.defineProperty(le.prototype,n,{enumerable:!0})});["open","error","close","message"].forEach(n=>{Object.defineProperty(le.prototype,`on${n}`,{enumerable:!0,get(){let e=this.listeners(n);for(let t=0;t<e.length;t++)if(e[t]._listener)return e[t]._listener},set(e){let t=this.listeners(n);for(let s=0;s<t.length;s++)t[s]._listener&&this.removeListener(n,t[s]);this.addEventListener(n,e)}})});le.prototype.addEventListener=Kh;le.prototype.removeEventListener=Jh;Tp.exports=le;function wp(n,e,t,s){let i={protocolVersion:Ma[1],maxPayload:104857600,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...s,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:void 0,host:void 0,path:void 0,port:void 0};if(!Ma.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Ma.join(", ")})`);let a;e instanceof Fa?(a=e,n._url=e.href):(a=new Fa(e),n._url=e);let r=a.protocol==="ws+unix:";if(!a.host&&(!r||!a.pathname)){let f=new Error(`Invalid URL: ${n.url}`);if(n._redirects===0)throw f;ja(n,f);return}let o=a.protocol==="wss:"||a.protocol==="https:",l=o?443:80,c=Bh(16).toString("base64"),p=o?Nh.get:qh.get,u;if(i.createConnection=o?tg:eg,i.defaultPort=i.defaultPort||l,i.port=a.port||l,i.host=a.hostname.startsWith("[")?a.hostname.slice(1,-1):a.hostname,i.headers={"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":c,Connection:"Upgrade",Upgrade:"websocket",...i.headers},i.path=a.pathname+a.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(u=new ft(i.perMessageDeflate!==!0?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=Xh({[ft.extensionName]:u.offer()})),t&&(i.headers["Sec-WebSocket-Protocol"]=t),i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(a.username||a.password)&&(i.auth=`${a.username}:${a.password}`),r){let f=i.path.split(":");i.socketPath=f[0],i.path=f[1]}if(i.followRedirects){if(n._redirects===0){n._originalUnixSocket=r,n._originalSecure=o,n._originalHostOrSocketPath=r?i.socketPath:a.host;let f=s&&s.headers;if(s={...s,headers:{}},f)for(let[g,v]of Object.entries(f))s.headers[g.toLowerCase()]=v}else{let f=r?n._originalUnixSocket?i.socketPath===n._originalHostOrSocketPath:!1:n._originalUnixSocket?!1:a.host===n._originalHostOrSocketPath;(!f||n._originalSecure&&!o)&&(delete i.headers.authorization,delete i.headers.cookie,f||delete i.headers.host,i.auth=void 0)}i.auth&&!s.headers.authorization&&(s.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64"))}let m=n._req=p(i);i.timeout&&m.on("timeout",()=>{Ne(n,m,"Opening handshake has timed out")}),m.on("error",f=>{m===null||m.aborted||(m=n._req=null,ja(n,f))}),m.on("response",f=>{let g=f.headers.location,v=f.statusCode;if(g&&i.followRedirects&&v>=300&&v<400){if(++n._redirects>i.maxRedirects){Ne(n,m,"Maximum redirects exceeded");return}m.abort();let _;try{_=new Fa(g,e)}catch(R){ja(n,R);return}wp(n,_,t,s)}else n.emit("unexpected-response",m,f)||Ne(n,m,`Unexpected server response: ${f.statusCode}`)}),m.on("upgrade",(f,g,v)=>{if(n.emit("upgrade",f),n.readyState!==le.CONNECTING)return;m=n._req=null;let _=f.headers.upgrade;if(_===void 0||_.toLowerCase()!=="websocket"){Ne(n,g,"Invalid Upgrade header");return}let R=$h("sha1").update(c+Vh).digest("base64");if(f.headers["sec-websocket-accept"]!==R){Ne(n,g,"Invalid Sec-WebSocket-Accept header");return}let D=f.headers["sec-websocket-protocol"],L=(t||"").split(/, */),q;if(!t&&D?q="Server sent a subprotocol but none was requested":t&&!D?q="Server sent no subprotocol":D&&!L.includes(D)&&(q="Server sent an invalid subprotocol"),q){Ne(n,g,q);return}D&&(n._protocol=D);let M=f.headers["sec-websocket-extensions"];if(M!==void 0){if(!u){Ne(n,g,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let Y;try{Y=Qh(M)}catch{Ne(n,g,"Invalid Sec-WebSocket-Extensions header");return}let ae=Object.keys(Y);if(ae.length){if(ae.length!==1||ae[0]!==ft.extensionName){Ne(n,g,"Server indicated an extension that was not requested");return}try{u.accept(Y[ft.extensionName])}catch{Ne(n,g,"Invalid Sec-WebSocket-Extensions header");return}n._extensions[ft.extensionName]=u}}n.setSocket(g,v,i.maxPayload)})}function ja(n,e){n._readyState=le.CLOSING,n.emit("error",e),n.emitClose()}function eg(n){return n.path=n.socketPath,_p.connect(n)}function tg(n){return n.path=void 0,!n.servername&&n.servername!==""&&(n.servername=_p.isIP(n.host)?"":n.host),Gh.connect(n)}function Ne(n,e,t){n._readyState=le.CLOSING;let s=new Error(t);Error.captureStackTrace(s,Ne),e.setHeader?(e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),e.once("abort",n.emitClose.bind(n)),n.emit("error",s)):(e.destroy(s),e.once("error",n.emit.bind(n,"error")),e.once("close",n.emitClose.bind(n)))}function Na(n,e,t){if(e){let s=Yh(e).length;n._socket?n._sender._bufferedBytes+=s:n._bufferedAmount+=s}if(t){let s=new Error(`WebSocket is not open: readyState ${n.readyState} (${ot[n.readyState]})`);t(s)}}function ng(n,e){let t=this[we];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=n,t._socket[we]!==void 0&&(t._socket.removeListener("data",zs),process.nextTick(Cp,t._socket),n===1005?t.close():t.close(n,e))}function sg(){this[we]._socket.resume()}function ig(n){let e=this[we];e._socket[we]!==void 0&&(e._socket.removeListener("data",zs),process.nextTick(Cp,e._socket),e.close(n[Hh])),e.emit("error",n)}function vp(){this[we].emitClose()}function ag(n){this[we].emit("message",n)}function rg(n){let e=this[we];e.pong(n,!e._isServer,yp),e.emit("ping",n)}function og(n){this[we].emit("pong",n)}function Cp(n){n.resume()}function Ep(){let n=this[we];this.removeListener("close",Ep),this.removeListener("data",zs),this.removeListener("end",Sp),n._readyState=le.CLOSING;let e;!this._readableState.endEmitted&&!n._closeFrameReceived&&!n._receiver._writableState.errorEmitted&&(e=n._socket.read())!==null&&n._receiver.write(e),n._receiver.end(),this[we]=void 0,clearTimeout(n._closeTimer),n._receiver._writableState.finished||n._receiver._writableState.errorEmitted?n.emitClose():(n._receiver.on("error",vp),n._receiver.on("finish",vp))}function zs(n){this[we]._receiver.write(n)||this.pause()}function Sp(){let n=this[we];n._readyState=le.CLOSING,n._receiver.end(),this.end()}function Rp(){let n=this[we];this.removeListener("error",Rp),this.on("error",yp),n&&(n._readyState=le.CLOSING,this.destroy())}});var Dp=w((yw,Ip)=>{"use strict";var{Duplex:cg}=I("stream");function kp(n){n.emit("close")}function lg(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Ap(n){this.removeListener("error",Ap),this.destroy(),this.listenerCount("error")===0&&this.emit("error",n)}function pg(n,e){let t=!0,s=!0;function i(){t&&n._socket.resume()}n.readyState===n.CONNECTING?n.once("open",function(){n._receiver.removeAllListeners("drain"),n._receiver.on("drain",i)}):(n._receiver.removeAllListeners("drain"),n._receiver.on("drain",i));let a=new cg({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return n.on("message",function(o){a.push(o)||(t=!1,n._socket.pause())}),n.once("error",function(o){a.destroyed||(s=!1,a.destroy(o))}),n.once("close",function(){a.destroyed||a.push(null)}),a._destroy=function(r,o){if(n.readyState===n.CLOSED){o(r),process.nextTick(kp,a);return}let l=!1;n.once("error",function(p){l=!0,o(p)}),n.once("close",function(){l||o(r),process.nextTick(kp,a)}),s&&n.terminate()},a._final=function(r){if(n.readyState===n.CONNECTING){n.once("open",function(){a._final(r)});return}n._socket!==null&&(n._socket._writableState.finished?(r(),a._readableState.endEmitted&&a.destroy()):(n._socket.once("finish",function(){r()}),n.close()))},a._read=function(){(n.readyState===n.OPEN||n.readyState===n.CLOSING)&&!t&&(t=!0,n._receiver._writableState.needDrain||n._socket.resume())},a._write=function(r,o,l){if(n.readyState===n.CONNECTING){n.once("open",function(){a._write(r,o,l)});return}n.send(r,l)},a.on("end",lg),a.on("error",Ap),a}Ip.exports=pg});var Pp=w((Sw,Fp)=>{"use strict";var ug=I("events"),Ws=I("http"),ww=(lt(),gn(_n)),Cw=I("net"),Ew=I("tls"),{createHash:dg}=I("crypto"),Ft=zn(),mg=qa(),{format:fg,parse:hg}=La(),{GUID:gg,kWebSocket:bg}=Ut(),xg=/^[+/0-9A-Za-z]{22}==$/,Op=0,Up=1,Lp=2,Ba=class extends ug{constructor(e,t){if(super(),e={maxPayload:100*1024*1024,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=Ws.createServer((s,i)=>{let a=Ws.STATUS_CODES[426];i.writeHead(426,{"Content-Length":a.length,"Content-Type":"text/plain"}),i.end(a)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let s=this.emit.bind(this,"connection");this._removeListeners=vg(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,a,r)=>{this.handleUpgrade(i,a,r,s)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set),this.options=e,this._state=Op}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(e&&this.once("close",e),this._state===Lp){process.nextTick(Ga,this);return}if(this._state===Up)return;if(this._state=Up,this.clients)for(let s of this.clients)s.terminate();let t=this._server;if(t&&(this._removeListeners(),this._removeListeners=this._server=null,this.options.port!=null)){t.close(Ga.bind(void 0,this));return}process.nextTick(Ga,this)}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((t!==-1?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,s,i){t.on("error",$a);let a=e.headers["sec-websocket-key"]!==void 0?e.headers["sec-websocket-key"].trim():!1,r=e.headers.upgrade,o=+e.headers["sec-websocket-version"],l={};if(e.method!=="GET"||r===void 0||r.toLowerCase()!=="websocket"||!a||!xg.test(a)||o!==8&&o!==13||!this.shouldHandle(e))return Hn(t,400);if(this.options.perMessageDeflate){let c=new Ft(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let p=hg(e.headers["sec-websocket-extensions"]);p[Ft.extensionName]&&(c.accept(p[Ft.extensionName]),l[Ft.extensionName]=c)}catch{return Hn(t,400)}}if(this.options.verifyClient){let c={origin:e.headers[`${o===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(c,(p,u,m,f)=>{if(!p)return Hn(t,u||401,m,f);this.completeUpgrade(a,l,e,t,s,i)});return}if(!this.options.verifyClient(c))return Hn(t,401)}this.completeUpgrade(a,l,e,t,s,i)}completeUpgrade(e,t,s,i,a,r){if(!i.readable||!i.writable)return i.destroy();if(i[bg])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Op)return Hn(i,503);let l=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${dg("sha1").update(e+gg).digest("base64")}`],c=new mg(null),p=s.headers["sec-websocket-protocol"];if(p&&(p=p.split(",").map(_g),this.options.handleProtocols?p=this.options.handleProtocols(p,s):p=p[0],p&&(l.push(`Sec-WebSocket-Protocol: ${p}`),c._protocol=p)),t[Ft.extensionName]){let u=t[Ft.extensionName].params,m=fg({[Ft.extensionName]:[u]});l.push(`Sec-WebSocket-Extensions: ${m}`),c._extensions=t}this.emit("headers",l,s),i.write(l.concat(`\r
4
+ `+a),n.push(i+"m+"+ks.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=xf()+e+" "+n[0]}function xf(){return be.inspectOpts.hideDate?"":new Date().toISOString()+" "}function vf(...n){return process.stderr.write(Ts.formatWithOptions(be.inspectOpts,...n)+`
5
+ `)}function _f(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function yf(){return process.env.DEBUG}function wf(n){n.inspectOpts={};let e=Object.keys(be.inspectOpts);for(let t=0;t<e.length;t++)n.inspectOpts[e[t]]=be.inspectOpts[e[t]]}ks.exports=Bi()(be);var{formatters:zc}=ks.exports;zc.o=function(n){return this.inspectOpts.colors=this.useColors,Ts.inspect(n,this.inspectOpts).split(`
6
+ `).map(e=>e.trim()).join(" ")};zc.O=function(n){return this.inspectOpts.colors=this.useColors,Ts.inspect(n,this.inspectOpts)}});var Vc=w((ov,zi)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?zi.exports=jc():zi.exports=Wc()});var Kc=w((cv,Hc)=>{"use strict";var An;Hc.exports=function(){if(!An){try{An=Vc()("follow-redirects")}catch{}typeof An!="function"&&(An=function(){})}An.apply(null,arguments)}});var Zc=w((lv,na)=>{"use strict";var Dn=I("url"),In=Dn.URL,Cf=I("http"),Ef=(pt(),bn(yn)),Ji=I("stream").Writable,Xi=I("assert"),Jc=Kc();(function(){var e=typeof process<"u",t=typeof window<"u"&&typeof document<"u",s=Tt(Error.captureStackTrace);!e&&(t||!s)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var Qi=!1;try{Xi(new In(""))}catch(n){Qi=n.code==="ERR_INVALID_URL"}var Sf=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Yi=["abort","aborted","connect","error","socket","timeout"],Zi=Object.create(null);Yi.forEach(function(n){Zi[n]=function(e,t,s){this._redirectable.emit(n,e,t,s)}});var Vi=On("ERR_INVALID_URL","Invalid URL",TypeError),Hi=On("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Rf=On("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Hi),Tf=On("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),kf=On("ERR_STREAM_WRITE_AFTER_END","write after end"),Af=Ji.prototype.destroy||Qc;function Oe(n,e){Ji.call(this),this._sanitizeOptions(n),this._options=n,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var t=this;this._onNativeResponse=function(s){try{t._processResponse(s)}catch(i){t.emit("error",i instanceof Hi?i:new Hi({cause:i}))}},this._performRequest()}Oe.prototype=Object.create(Ji.prototype);Oe.prototype.abort=function(){ta(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Oe.prototype.destroy=function(n){return ta(this._currentRequest,n),Af.call(this,n),this};Oe.prototype.write=function(n,e,t){if(this._ending)throw new kf;if(!Rt(n)&&!Of(n))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Tt(e)&&(t=e,e=null),n.length===0){t&&t();return}this._requestBodyLength+n.length<=this._options.maxBodyLength?(this._requestBodyLength+=n.length,this._requestBodyBuffers.push({data:n,encoding:e}),this._currentRequest.write(n,e,t)):(this.emit("error",new Tf),this.abort())};Oe.prototype.end=function(n,e,t){if(Tt(n)?(t=n,n=e=null):Tt(e)&&(t=e,e=null),!n)this._ended=this._ending=!0,this._currentRequest.end(null,null,t);else{var s=this,i=this._currentRequest;this.write(n,e,function(){s._ended=!0,i.end(null,null,t)}),this._ending=!0}};Oe.prototype.setHeader=function(n,e){this._options.headers[n]=e,this._currentRequest.setHeader(n,e)};Oe.prototype.removeHeader=function(n){delete this._options.headers[n],this._currentRequest.removeHeader(n)};Oe.prototype.setTimeout=function(n,e){var t=this;function s(r){r.setTimeout(n),r.removeListener("timeout",r.destroy),r.addListener("timeout",r.destroy)}function i(r){t._timeout&&clearTimeout(t._timeout),t._timeout=setTimeout(function(){t.emit("timeout"),a()},n),s(r)}function a(){t._timeout&&(clearTimeout(t._timeout),t._timeout=null),t.removeListener("abort",a),t.removeListener("error",a),t.removeListener("response",a),t.removeListener("close",a),e&&t.removeListener("timeout",e),t.socket||t._currentRequest.removeListener("socket",i)}return e&&this.on("timeout",e),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",s),this.on("abort",a),this.on("error",a),this.on("response",a),this.on("close",a),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(n){Oe.prototype[n]=function(e,t){return this._currentRequest[n](e,t)}});["aborted","connection","socket"].forEach(function(n){Object.defineProperty(Oe.prototype,n,{get:function(){return this._currentRequest[n]}})});Oe.prototype._sanitizeOptions=function(n){if(n.headers||(n.headers={}),n.host&&(n.hostname||(n.hostname=n.host),delete n.host),!n.pathname&&n.path){var e=n.path.indexOf("?");e<0?n.pathname=n.path:(n.pathname=n.path.substring(0,e),n.search=n.path.substring(e))}};Oe.prototype._performRequest=function(){var n=this._options.protocol,e=this._options.nativeProtocols[n];if(!e)throw new TypeError("Unsupported protocol "+n);if(this._options.agents){var t=n.slice(0,-1);this._options.agent=this._options.agents[t]}var s=this._currentRequest=e.request(this._options,this._onNativeResponse);s._redirectable=this;for(var i of Yi)s.on(i,Zi[i]);if(this._currentUrl=/^\//.test(this._options.path)?Dn.format(this._options):this._options.path,this._isRedirect){var a=0,r=this,o=this._requestBodyBuffers;(function l(c){if(s===r._currentRequest)if(c)r.emit("error",c);else if(a<o.length){var p=o[a++];s.finished||s.write(p.data,p.encoding,l)}else r._ended&&s.end()})()}};Oe.prototype._processResponse=function(n){var e=n.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:n.headers,statusCode:e});var t=n.headers.location;if(!t||this._options.followRedirects===!1||e<300||e>=400){n.responseUrl=this._currentUrl,n.redirects=this._redirects,this.emit("response",n),this._requestBodyBuffers=[];return}if(ta(this._currentRequest),n.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Rf;var s,i=this._options.beforeRedirect;i&&(s=Object.assign({Host:n.req.getHeader("host")},this._options.headers));var a=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Wi(/^content-/i,this._options.headers));var r=Wi(/^host$/i,this._options.headers),o=ea(this._currentUrl),l=r||o.host,c=/^\w+:/.test(t)?this._currentUrl:Dn.format(Object.assign(o,{host:l})),p=If(t,c);if(Jc("redirecting to",p.href),this._isRedirect=!0,Ki(p,this._options),(p.protocol!==o.protocol&&p.protocol!=="https:"||p.host!==l&&!Df(p.host,l))&&Wi(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Tt(i)){var u={headers:n.headers,statusCode:e},m={url:c,method:a,headers:s};i(this._options,u,m),this._sanitizeOptions(this._options)}this._performRequest()};function Xc(n){var e={maxRedirects:21,maxBodyLength:10485760},t={};return Object.keys(n).forEach(function(s){var i=s+":",a=t[i]=n[s],r=e[s]=Object.create(a);function o(c,p,u){return Uf(c)?c=Ki(c):Rt(c)?c=Ki(ea(c)):(u=p,p=Yc(c),c={protocol:i}),Tt(p)&&(u=p,p=null),p=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},c,p),p.nativeProtocols=t,!Rt(p.host)&&!Rt(p.hostname)&&(p.hostname="::1"),Xi.equal(p.protocol,i,"protocol mismatch"),Jc("options",p),new Oe(p,u)}function l(c,p,u){var m=r.request(c,p,u);return m.end(),m}Object.defineProperties(r,{request:{value:o,configurable:!0,enumerable:!0,writable:!0},get:{value:l,configurable:!0,enumerable:!0,writable:!0}})}),e}function Qc(){}function ea(n){var e;if(Qi)e=new In(n);else if(e=Yc(Dn.parse(n)),!Rt(e.protocol))throw new Vi({input:n});return e}function If(n,e){return Qi?new In(n,e):ea(Dn.resolve(e,n))}function Yc(n){if(/^\[/.test(n.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(n.hostname))throw new Vi({input:n.href||n});if(/^\[/.test(n.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(n.host))throw new Vi({input:n.href||n});return n}function Ki(n,e){var t=e||{};for(var s of Sf)t[s]=n[s];return t.hostname.startsWith("[")&&(t.hostname=t.hostname.slice(1,-1)),t.port!==""&&(t.port=Number(t.port)),t.path=t.search?t.pathname+t.search:t.pathname,t}function Wi(n,e){var t;for(var s in e)n.test(s)&&(t=e[s],delete e[s]);return t===null||typeof t>"u"?void 0:String(t).trim()}function On(n,e,t){function s(i){Tt(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=n,this.message=this.cause?e+": "+this.cause.message:e}return s.prototype=new(t||Error),Object.defineProperties(s.prototype,{constructor:{value:s,enumerable:!1},name:{value:"Error ["+n+"]",enumerable:!1}}),s}function ta(n,e){for(var t of Yi)n.removeListener(t,Zi[t]);n.on("error",Qc),n.destroy(e)}function Df(n,e){Xi(Rt(n)&&Rt(e));var t=n.length-e.length-1;return t>0&&n[t]==="."&&n.endsWith(e)}function Rt(n){return typeof n=="string"||n instanceof String}function Tt(n){return typeof n=="function"}function Of(n){return typeof n=="object"&&"length"in n}function Uf(n){return In&&n instanceof In}na.exports=Xc({http:Cf,https:Ef});na.exports.wrap=Xc});var Lt=w((cw,Vl)=>{"use strict";Vl.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),EMPTY_BUFFER:Buffer.alloc(0),NOOP:()=>{}}});var Bn=w((lw,va)=>{"use strict";var{EMPTY_BUFFER:gh}=Lt();function Hl(n,e){if(n.length===0)return gh;if(n.length===1)return n[0];let t=Buffer.allocUnsafe(e),s=0;for(let i=0;i<n.length;i++){let a=n[i];t.set(a,s),s+=a.length}return s<e?t.slice(0,s):t}function Kl(n,e,t,s,i){for(let a=0;a<i;a++)t[s+a]=n[a]^e[a&3]}function Jl(n,e){let t=n.length;for(let s=0;s<t;s++)n[s]^=e[s&3]}function Xl(n){return n.byteLength===n.buffer.byteLength?n.buffer:n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)}function Gs(n){if(Gs.readOnly=!0,Buffer.isBuffer(n))return n;let e;return n instanceof ArrayBuffer?e=Buffer.from(n):ArrayBuffer.isView(n)?e=Buffer.from(n.buffer,n.byteOffset,n.byteLength):(e=Buffer.from(n),Gs.readOnly=!1),e}try{let n=I("bufferutil"),e=n.BufferUtil||n;va.exports={concat:Hl,mask(t,s,i,a,r){r<48?Kl(t,s,i,a,r):e.mask(t,s,i,a,r)},toArrayBuffer:Xl,toBuffer:Gs,unmask(t,s){t.length<32?Jl(t,s):e.unmask(t,s)}}}catch{va.exports={concat:Hl,mask:Kl,toArrayBuffer:Xl,toBuffer:Gs,unmask:Jl}}});var Zl=w((pw,Yl)=>{"use strict";var Ql=Symbol("kDone"),_a=Symbol("kRun"),ya=class{constructor(e){this[Ql]=()=>{this.pending--,this[_a]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[_a]()}[_a](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Ql])}}};Yl.exports=ya});var Wn=w((uw,sp)=>{"use strict";var $n=I("zlib"),ep=Bn(),bh=Zl(),{kStatusCode:tp,NOOP:xh}=Lt(),vh=Buffer.from([0,0,255,255]),zs=Symbol("permessage-deflate"),rt=Symbol("total-length"),zn=Symbol("callback"),ft=Symbol("buffers"),$s=Symbol("error"),Bs,wa=class{constructor(e,t,s){if(this._maxPayload=s|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!Bs){let i=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Bs=new bh(i)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[zn];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,s=e.find(i=>!(t.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>i.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!s)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(s.server_no_context_takeover=!0),t.clientNoContextTakeover&&(s.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(s.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?s.client_max_window_bits=t.clientMaxWindowBits:(s.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete s.client_max_window_bits,s}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return t}normalizeParams(e){return e.forEach(t=>{Object.keys(t).forEach(s=>{let i=t[s];if(i.length>1)throw new Error(`Parameter "${s}" must have only a single value`);if(i=i[0],s==="client_max_window_bits"){if(i!==!0){let a=+i;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${s}": ${i}`);i=a}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${s}": ${i}`)}else if(s==="server_max_window_bits"){let a=+i;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${s}": ${i}`);i=a}else if(s==="client_no_context_takeover"||s==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${s}": ${i}`)}else throw new Error(`Unknown parameter "${s}"`);t[s]=i})}),e}decompress(e,t,s){Bs.add(i=>{this._decompress(e,t,(a,r)=>{i(),s(a,r)})})}compress(e,t,s){Bs.add(i=>{this._compress(e,t,(a,r)=>{i(),s(a,r)})})}_decompress(e,t,s){let i=this._isServer?"client":"server";if(!this._inflate){let a=`${i}_max_window_bits`,r=typeof this.params[a]!="number"?$n.Z_DEFAULT_WINDOWBITS:this.params[a];this._inflate=$n.createInflateRaw({...this._options.zlibInflateOptions,windowBits:r}),this._inflate[zs]=this,this._inflate[rt]=0,this._inflate[ft]=[],this._inflate.on("error",yh),this._inflate.on("data",np)}this._inflate[zn]=s,this._inflate.write(e),t&&this._inflate.write(vh),this._inflate.flush(()=>{let a=this._inflate[$s];if(a){this._inflate.close(),this._inflate=null,s(a);return}let r=ep.concat(this._inflate[ft],this._inflate[rt]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[rt]=0,this._inflate[ft]=[],t&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),s(null,r)})}_compress(e,t,s){let i=this._isServer?"server":"client";if(!this._deflate){let a=`${i}_max_window_bits`,r=typeof this.params[a]!="number"?$n.Z_DEFAULT_WINDOWBITS:this.params[a];this._deflate=$n.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:r}),this._deflate[rt]=0,this._deflate[ft]=[],this._deflate.on("error",xh),this._deflate.on("data",_h)}this._deflate[zn]=s,this._deflate.write(e),this._deflate.flush($n.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let a=ep.concat(this._deflate[ft],this._deflate[rt]);t&&(a=a.slice(0,a.length-4)),this._deflate[zn]=null,this._deflate[rt]=0,this._deflate[ft]=[],t&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),s(null,a)})}};sp.exports=wa;function _h(n){this[ft].push(n),this[rt]+=n.length}function np(n){if(this[rt]+=n.length,this[zs]._maxPayload<1||this[rt]<=this[zs]._maxPayload){this[ft].push(n);return}this[$s]=new RangeError("Max payload size exceeded"),this[$s].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[$s][tp]=1009,this.removeListener("data",np),this.reset()}function yh(n){this[zs]._inflate=null,n[tp]=1007,this[zn](n)}});var Ea=w((dw,Ca)=>{"use strict";function ip(n){return n>=1e3&&n<=1014&&n!==1004&&n!==1005&&n!==1006||n>=3e3&&n<=4999}function ap(n){let e=n.length,t=0;for(;t<e;)if((n[t]&128)===0)t++;else if((n[t]&224)===192){if(t+1===e||(n[t+1]&192)!==128||(n[t]&254)===192)return!1;t+=2}else if((n[t]&240)===224){if(t+2>=e||(n[t+1]&192)!==128||(n[t+2]&192)!==128||n[t]===224&&(n[t+1]&224)===128||n[t]===237&&(n[t+1]&224)===160)return!1;t+=3}else if((n[t]&248)===240){if(t+3>=e||(n[t+1]&192)!==128||(n[t+2]&192)!==128||(n[t+3]&192)!==128||n[t]===240&&(n[t+1]&240)===128||n[t]===244&&n[t+1]>143||n[t]>244)return!1;t+=4}else return!1;return!0}try{let n=I("utf-8-validate");typeof n=="object"&&(n=n.Validation.isValidUTF8),Ca.exports={isValidStatusCode:ip,isValidUTF8(e){return e.length<150?ap(e):n(e)}}}catch{Ca.exports={isValidStatusCode:ip,isValidUTF8:ap}}});var ka=w((mw,up)=>{"use strict";var{Writable:wh}=I("stream"),rp=Wn(),{BINARY_TYPES:Ch,EMPTY_BUFFER:Eh,kStatusCode:Sh,kWebSocket:Rh}=Lt(),{concat:Sa,toArrayBuffer:Th,unmask:kh}=Bn(),{isValidStatusCode:Ah,isValidUTF8:op}=Ea(),Vn=0,cp=1,lp=2,pp=3,Ra=4,Ih=5,Ta=class extends wh{constructor(e,t,s,i){super(),this._binaryType=e||Ch[0],this[Rh]=void 0,this._extensions=t||{},this._isServer=!!s,this._maxPayload=i|0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=Vn,this._loop=!1}_write(e,t,s){if(this._opcode===8&&this._state==Vn)return s();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(s)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let s=this._buffers[0];return this._buffers[0]=s.slice(e),s.slice(0,e)}let t=Buffer.allocUnsafe(e);do{let s=this._buffers[0],i=t.length-e;e>=s.length?t.set(this._buffers.shift(),i):(t.set(new Uint8Array(s.buffer,s.byteOffset,e),i),this._buffers[0]=s.slice(e)),e-=s.length}while(e>0);return t}startLoop(e){let t;this._loop=!0;do switch(this._state){case Vn:t=this.getInfo();break;case cp:t=this.getPayloadLength16();break;case lp:t=this.getPayloadLength64();break;case pp:this.getMask();break;case Ra:t=this.getData(e);break;default:this._loop=!1;return}while(this._loop);e(t)}getInfo(){if(this._bufferedBytes<2){this._loop=!1;return}let e=this.consume(2);if((e[0]&48)!==0)return this._loop=!1,me(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");let t=(e[0]&64)===64;if(t&&!this._extensions[rp.extensionName])return this._loop=!1,me(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=(e[0]&128)===128,this._opcode=e[0]&15,this._payloadLength=e[1]&127,this._opcode===0){if(t)return this._loop=!1,me(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,me(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented)return this._loop=!1,me(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=t}else if(this._opcode>7&&this._opcode<11){if(!this._fin)return this._loop=!1,me(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(t)return this._loop=!1,me(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125)return this._loop=!1,me(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}else return this._loop=!1,me(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(e[1]&128)===128,this._isServer){if(!this._masked)return this._loop=!1,me(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,me(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(this._payloadLength===126)this._state=cp;else if(this._payloadLength===127)this._state=lp;else return this.haveLength()}getPayloadLength16(){if(this._bufferedBytes<2){this._loop=!1;return}return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength()}getPayloadLength64(){if(this._bufferedBytes<8){this._loop=!1;return}let e=this.consume(8),t=e.readUInt32BE(0);return t>Math.pow(2,21)-1?(this._loop=!1,me(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=t*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,me(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=pp:this._state=Ra}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Ra}getData(e){let t=Eh;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&kh(t,this._mask)}if(this._opcode>7)return this.controlMessage(t);if(this._compressed){this._state=Ih,this.decompress(t,e);return}return t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage()}decompress(e,t){this._extensions[rp.extensionName].decompress(e,this._fin,(i,a)=>{if(i)return t(i);if(a.length){if(this._messageLength+=a.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return t(me(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(a)}let r=this.dataMessage();if(r)return t(r);this.startLoop(t)})}dataMessage(){if(this._fin){let e=this._messageLength,t=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let s;this._binaryType==="nodebuffer"?s=Sa(t,e):this._binaryType==="arraybuffer"?s=Th(Sa(t,e)):s=t,this.emit("message",s)}else{let s=Sa(t,e);if(!op(s))return this._loop=!1,me(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",s.toString())}}this._state=Vn}controlMessage(e){if(this._opcode===8)if(this._loop=!1,e.length===0)this.emit("conclude",1005,""),this.end();else{if(e.length===1)return me(RangeError,"invalid payload length 1",!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");{let t=e.readUInt16BE(0);if(!Ah(t))return me(RangeError,`invalid status code ${t}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");let s=e.slice(2);if(!op(s))return me(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",t,s.toString()),this.end()}}else this._opcode===9?this.emit("ping",e):this.emit("pong",e);this._state=Vn}};up.exports=Ta;function me(n,e,t,s,i){let a=new n(t?`Invalid WebSocket frame: ${e}`:e);return Error.captureStackTrace(a,me),a.code=i,a[Sh]=s,a}});var Ia=w((gw,fp)=>{"use strict";var fw=I("net"),hw=I("tls"),{randomFillSync:Dh}=I("crypto"),dp=Wn(),{EMPTY_BUFFER:Oh}=Lt(),{isValidStatusCode:Uh}=Ea(),{mask:mp,toBuffer:ot}=Bn(),Ft=Buffer.alloc(4),Aa=class n{constructor(e,t){this._extensions=t||{},this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){let s=t.mask&&t.readOnly,i=t.mask?6:2,a=e.length;e.length>=65536?(i+=8,a=127):e.length>125&&(i+=2,a=126);let r=Buffer.allocUnsafe(s?e.length+i:i);return r[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(r[0]|=64),r[1]=a,a===126?r.writeUInt16BE(e.length,2):a===127&&(r.writeUInt32BE(0,2),r.writeUInt32BE(e.length,6)),t.mask?(Dh(Ft,0,4),r[1]|=128,r[i-4]=Ft[0],r[i-3]=Ft[1],r[i-2]=Ft[2],r[i-1]=Ft[3],s?(mp(e,Ft,r,i,e.length),[r]):(mp(e,Ft,e,0,e.length),[r,e])):[r,e]}close(e,t,s,i){let a;if(e===void 0)a=Oh;else{if(typeof e!="number"||!Uh(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||t==="")a=Buffer.allocUnsafe(2),a.writeUInt16BE(e,0);else{let r=Buffer.byteLength(t);if(r>123)throw new RangeError("The message must not be greater than 123 bytes");a=Buffer.allocUnsafe(2+r),a.writeUInt16BE(e,0),a.write(t,2)}}this._deflating?this.enqueue([this.doClose,a,s,i]):this.doClose(a,s,i)}doClose(e,t,s){this.sendFrame(n.frame(e,{fin:!0,rsv1:!1,opcode:8,mask:t,readOnly:!1}),s)}ping(e,t,s){let i=ot(e);if(i.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPing,i,t,ot.readOnly,s]):this.doPing(i,t,ot.readOnly,s)}doPing(e,t,s,i){this.sendFrame(n.frame(e,{fin:!0,rsv1:!1,opcode:9,mask:t,readOnly:s}),i)}pong(e,t,s){let i=ot(e);if(i.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPong,i,t,ot.readOnly,s]):this.doPong(i,t,ot.readOnly,s)}doPong(e,t,s,i){this.sendFrame(n.frame(e,{fin:!0,rsv1:!1,opcode:10,mask:t,readOnly:s}),i)}send(e,t,s){let i=ot(e),a=this._extensions[dp.extensionName],r=t.binary?2:1,o=t.compress;if(this._firstFragment?(this._firstFragment=!1,o&&a&&(o=i.length>=a._threshold),this._compress=o):(o=!1,r=0),t.fin&&(this._firstFragment=!0),a){let l={fin:t.fin,rsv1:o,opcode:r,mask:t.mask,readOnly:ot.readOnly};this._deflating?this.enqueue([this.dispatch,i,this._compress,l,s]):this.dispatch(i,this._compress,l,s)}else this.sendFrame(n.frame(i,{fin:t.fin,rsv1:!1,opcode:r,mask:t.mask,readOnly:ot.readOnly}),s)}dispatch(e,t,s,i){if(!t){this.sendFrame(n.frame(e,s),i);return}let a=this._extensions[dp.extensionName];this._bufferedBytes+=e.length,this._deflating=!0,a.compress(e,s.fin,(r,o)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");typeof i=="function"&&i(l);for(let c=0;c<this._queue.length;c++){let p=this._queue[c][4];typeof p=="function"&&p(l)}return}this._bufferedBytes-=e.length,this._deflating=!1,s.readOnly=!1,this.sendFrame(n.frame(o,s),i),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[1].length,Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[1].length,this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};fp.exports=Aa});var gp=w((bw,hp)=>{"use strict";var pn=class{constructor(e,t){this.target=t,this.type=e}},Da=class extends pn{constructor(e,t){super("message",t),this.data=e}},Oa=class extends pn{constructor(e,t,s){super("close",s),this.wasClean=s._closeFrameReceived&&s._closeFrameSent,this.reason=t,this.code=e}},Ua=class extends pn{constructor(e){super("open",e)}},La=class extends pn{constructor(e,t){super("error",t),this.message=e.message,this.error=e}},Lh={addEventListener(n,e,t){if(typeof e!="function")return;function s(l){e.call(this,new Da(l,this))}function i(l,c){e.call(this,new Oa(l,c,this))}function a(l){e.call(this,new La(l,this))}function r(){e.call(this,new Ua(this))}let o=t&&t.once?"once":"on";n==="message"?(s._listener=e,this[o](n,s)):n==="close"?(i._listener=e,this[o](n,i)):n==="error"?(a._listener=e,this[o](n,a)):n==="open"?(r._listener=e,this[o](n,r)):this[o](n,e)},removeEventListener(n,e){let t=this.listeners(n);for(let s=0;s<t.length;s++)(t[s]===e||t[s]._listener===e)&&this.removeListener(n,t[s])}};hp.exports=Lh});var Fa=w((xw,bp)=>{"use strict";var Hn=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Ye(n,e,t){n[e]===void 0?n[e]=[t]:n[e].push(t)}function Fh(n){let e=Object.create(null);if(n===void 0||n==="")return e;let t=Object.create(null),s=!1,i=!1,a=!1,r,o,l=-1,c=-1,p=0;for(;p<n.length;p++){let m=n.charCodeAt(p);if(r===void 0)if(c===-1&&Hn[m]===1)l===-1&&(l=p);else if(m===32||m===9)c===-1&&l!==-1&&(c=p);else if(m===59||m===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${p}`);c===-1&&(c=p);let f=n.slice(l,c);m===44?(Ye(e,f,t),t=Object.create(null)):r=f,l=c=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);else if(o===void 0)if(c===-1&&Hn[m]===1)l===-1&&(l=p);else if(m===32||m===9)c===-1&&l!==-1&&(c=p);else if(m===59||m===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${p}`);c===-1&&(c=p),Ye(t,n.slice(l,c),!0),m===44&&(Ye(e,r,t),t=Object.create(null),r=void 0),l=c=-1}else if(m===61&&l!==-1&&c===-1)o=n.slice(l,p),l=c=-1;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(i){if(Hn[m]!==1)throw new SyntaxError(`Unexpected character at index ${p}`);l===-1?l=p:s||(s=!0),i=!1}else if(a)if(Hn[m]===1)l===-1&&(l=p);else if(m===34&&l!==-1)a=!1,c=p;else if(m===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(m===34&&n.charCodeAt(p-1)===61)a=!0;else if(c===-1&&Hn[m]===1)l===-1&&(l=p);else if(l!==-1&&(m===32||m===9))c===-1&&(c=p);else if(m===59||m===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${p}`);c===-1&&(c=p);let f=n.slice(l,c);s&&(f=f.replace(/\\/g,""),s=!1),Ye(t,o,f),m===44&&(Ye(e,r,t),t=Object.create(null),r=void 0),o=void 0,l=c=-1}else throw new SyntaxError(`Unexpected character at index ${p}`)}if(l===-1||a)throw new SyntaxError("Unexpected end of input");c===-1&&(c=p);let u=n.slice(l,c);return r===void 0?Ye(e,u,t):(o===void 0?Ye(t,u,!0):s?Ye(t,o,u.replace(/\\/g,"")):Ye(t,o,u),Ye(e,r,t)),e}function Ph(n){return Object.keys(n).map(e=>{let t=n[e];return Array.isArray(t)||(t=[t]),t.map(s=>[e].concat(Object.keys(s).map(i=>{let a=s[i];return Array.isArray(a)||(a=[a]),a.map(r=>r===!0?i:`${i}=${r}`).join("; ")})).join("; ")).join(", ")}).join(", ")}bp.exports={format:Ph,parse:Fh}});var Ga=w((_w,Tp)=>{"use strict";var Mh=I("events"),jh=(pt(),bn(yn)),Nh=I("http"),_p=I("net"),qh=I("tls"),{randomBytes:Gh,createHash:Bh}=I("crypto"),{Readable:vw}=I("stream"),{URL:Pa}=I("url"),ht=Wn(),$h=ka(),zh=Ia(),{BINARY_TYPES:xp,EMPTY_BUFFER:Ma,GUID:Wh,kStatusCode:Vh,kWebSocket:we,NOOP:yp}=Lt(),{addEventListener:Hh,removeEventListener:Kh}=gp(),{format:Jh,parse:Xh}=Fa(),{toBuffer:Qh}=Bn(),ct=["CONNECTING","OPEN","CLOSING","CLOSED"],ja=[8,13],Yh=30*1e3,le=class n extends Mh{constructor(e,t,s){super(),this._binaryType=xp[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage="",this._closeTimer=null,this._extensions={},this._protocol="",this._readyState=n.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,Array.isArray(t)?t=t.join(", "):typeof t=="object"&&t!==null&&(s=t,t=void 0),wp(this,e,t,s)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(e){xp.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get onclose(){}set onclose(e){}get onerror(){}set onerror(e){}get onopen(){}set onopen(e){}get onmessage(){}set onmessage(e){}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,s){let i=new $h(this.binaryType,this._extensions,this._isServer,s);this._sender=new zh(e,this._extensions),this._receiver=i,this._socket=e,i[we]=this,e[we]=this,i.on("conclude",tg),i.on("drain",ng),i.on("error",sg),i.on("message",ig),i.on("ping",ag),i.on("pong",rg),e.setTimeout(0),e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Ep),e.on("data",Ws),e.on("end",Sp),e.on("error",Rp),this._readyState=n.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[ht.extensionName]&&this._extensions[ht.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING)return Ne(this,this._req,"WebSocket was closed before the connection was established");if(this.readyState===n.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=n.CLOSING,this._sender.close(e,t,!this._isServer,s=>{s||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),Yh)}}ping(e,t,s){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(s=e,e=t=void 0):typeof t=="function"&&(s=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==n.OPEN){qa(this,e,s);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||Ma,t,s)}pong(e,t,s){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(s=e,e=t=void 0):typeof t=="function"&&(s=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==n.OPEN){qa(this,e,s);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||Ma,t,s)}send(e,t,s){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(s=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==n.OPEN){qa(this,e,s);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[ht.extensionName]||(i.compress=!1),this._sender.send(e||Ma,i,s)}terminate(){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING)return Ne(this,this._req,"WebSocket was closed before the connection was established");this._socket&&(this._readyState=n.CLOSING,this._socket.destroy())}}};Object.defineProperty(le,"CONNECTING",{enumerable:!0,value:ct.indexOf("CONNECTING")});Object.defineProperty(le.prototype,"CONNECTING",{enumerable:!0,value:ct.indexOf("CONNECTING")});Object.defineProperty(le,"OPEN",{enumerable:!0,value:ct.indexOf("OPEN")});Object.defineProperty(le.prototype,"OPEN",{enumerable:!0,value:ct.indexOf("OPEN")});Object.defineProperty(le,"CLOSING",{enumerable:!0,value:ct.indexOf("CLOSING")});Object.defineProperty(le.prototype,"CLOSING",{enumerable:!0,value:ct.indexOf("CLOSING")});Object.defineProperty(le,"CLOSED",{enumerable:!0,value:ct.indexOf("CLOSED")});Object.defineProperty(le.prototype,"CLOSED",{enumerable:!0,value:ct.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","protocol","readyState","url"].forEach(n=>{Object.defineProperty(le.prototype,n,{enumerable:!0})});["open","error","close","message"].forEach(n=>{Object.defineProperty(le.prototype,`on${n}`,{enumerable:!0,get(){let e=this.listeners(n);for(let t=0;t<e.length;t++)if(e[t]._listener)return e[t]._listener},set(e){let t=this.listeners(n);for(let s=0;s<t.length;s++)t[s]._listener&&this.removeListener(n,t[s]);this.addEventListener(n,e)}})});le.prototype.addEventListener=Hh;le.prototype.removeEventListener=Kh;Tp.exports=le;function wp(n,e,t,s){let i={protocolVersion:ja[1],maxPayload:104857600,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...s,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:void 0,host:void 0,path:void 0,port:void 0};if(!ja.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${ja.join(", ")})`);let a;e instanceof Pa?(a=e,n._url=e.href):(a=new Pa(e),n._url=e);let r=a.protocol==="ws+unix:";if(!a.host&&(!r||!a.pathname)){let f=new Error(`Invalid URL: ${n.url}`);if(n._redirects===0)throw f;Na(n,f);return}let o=a.protocol==="wss:"||a.protocol==="https:",l=o?443:80,c=Gh(16).toString("base64"),p=o?jh.get:Nh.get,u;if(i.createConnection=o?eg:Zh,i.defaultPort=i.defaultPort||l,i.port=a.port||l,i.host=a.hostname.startsWith("[")?a.hostname.slice(1,-1):a.hostname,i.headers={"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":c,Connection:"Upgrade",Upgrade:"websocket",...i.headers},i.path=a.pathname+a.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(u=new ht(i.perMessageDeflate!==!0?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=Jh({[ht.extensionName]:u.offer()})),t&&(i.headers["Sec-WebSocket-Protocol"]=t),i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(a.username||a.password)&&(i.auth=`${a.username}:${a.password}`),r){let f=i.path.split(":");i.socketPath=f[0],i.path=f[1]}if(i.followRedirects){if(n._redirects===0){n._originalUnixSocket=r,n._originalSecure=o,n._originalHostOrSocketPath=r?i.socketPath:a.host;let f=s&&s.headers;if(s={...s,headers:{}},f)for(let[g,v]of Object.entries(f))s.headers[g.toLowerCase()]=v}else{let f=r?n._originalUnixSocket?i.socketPath===n._originalHostOrSocketPath:!1:n._originalUnixSocket?!1:a.host===n._originalHostOrSocketPath;(!f||n._originalSecure&&!o)&&(delete i.headers.authorization,delete i.headers.cookie,f||delete i.headers.host,i.auth=void 0)}i.auth&&!s.headers.authorization&&(s.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64"))}let m=n._req=p(i);i.timeout&&m.on("timeout",()=>{Ne(n,m,"Opening handshake has timed out")}),m.on("error",f=>{m===null||m.aborted||(m=n._req=null,Na(n,f))}),m.on("response",f=>{let g=f.headers.location,v=f.statusCode;if(g&&i.followRedirects&&v>=300&&v<400){if(++n._redirects>i.maxRedirects){Ne(n,m,"Maximum redirects exceeded");return}m.abort();let _;try{_=new Pa(g,e)}catch(R){Na(n,R);return}wp(n,_,t,s)}else n.emit("unexpected-response",m,f)||Ne(n,m,`Unexpected server response: ${f.statusCode}`)}),m.on("upgrade",(f,g,v)=>{if(n.emit("upgrade",f),n.readyState!==le.CONNECTING)return;m=n._req=null;let _=f.headers.upgrade;if(_===void 0||_.toLowerCase()!=="websocket"){Ne(n,g,"Invalid Upgrade header");return}let R=Bh("sha1").update(c+Wh).digest("base64");if(f.headers["sec-websocket-accept"]!==R){Ne(n,g,"Invalid Sec-WebSocket-Accept header");return}let D=f.headers["sec-websocket-protocol"],L=(t||"").split(/, */),q;if(!t&&D?q="Server sent a subprotocol but none was requested":t&&!D?q="Server sent no subprotocol":D&&!L.includes(D)&&(q="Server sent an invalid subprotocol"),q){Ne(n,g,q);return}D&&(n._protocol=D);let M=f.headers["sec-websocket-extensions"];if(M!==void 0){if(!u){Ne(n,g,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let Y;try{Y=Xh(M)}catch{Ne(n,g,"Invalid Sec-WebSocket-Extensions header");return}let ae=Object.keys(Y);if(ae.length){if(ae.length!==1||ae[0]!==ht.extensionName){Ne(n,g,"Server indicated an extension that was not requested");return}try{u.accept(Y[ht.extensionName])}catch{Ne(n,g,"Invalid Sec-WebSocket-Extensions header");return}n._extensions[ht.extensionName]=u}}n.setSocket(g,v,i.maxPayload)})}function Na(n,e){n._readyState=le.CLOSING,n.emit("error",e),n.emitClose()}function Zh(n){return n.path=n.socketPath,_p.connect(n)}function eg(n){return n.path=void 0,!n.servername&&n.servername!==""&&(n.servername=_p.isIP(n.host)?"":n.host),qh.connect(n)}function Ne(n,e,t){n._readyState=le.CLOSING;let s=new Error(t);Error.captureStackTrace(s,Ne),e.setHeader?(e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),e.once("abort",n.emitClose.bind(n)),n.emit("error",s)):(e.destroy(s),e.once("error",n.emit.bind(n,"error")),e.once("close",n.emitClose.bind(n)))}function qa(n,e,t){if(e){let s=Qh(e).length;n._socket?n._sender._bufferedBytes+=s:n._bufferedAmount+=s}if(t){let s=new Error(`WebSocket is not open: readyState ${n.readyState} (${ct[n.readyState]})`);t(s)}}function tg(n,e){let t=this[we];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=n,t._socket[we]!==void 0&&(t._socket.removeListener("data",Ws),process.nextTick(Cp,t._socket),n===1005?t.close():t.close(n,e))}function ng(){this[we]._socket.resume()}function sg(n){let e=this[we];e._socket[we]!==void 0&&(e._socket.removeListener("data",Ws),process.nextTick(Cp,e._socket),e.close(n[Vh])),e.emit("error",n)}function vp(){this[we].emitClose()}function ig(n){this[we].emit("message",n)}function ag(n){let e=this[we];e.pong(n,!e._isServer,yp),e.emit("ping",n)}function rg(n){this[we].emit("pong",n)}function Cp(n){n.resume()}function Ep(){let n=this[we];this.removeListener("close",Ep),this.removeListener("data",Ws),this.removeListener("end",Sp),n._readyState=le.CLOSING;let e;!this._readableState.endEmitted&&!n._closeFrameReceived&&!n._receiver._writableState.errorEmitted&&(e=n._socket.read())!==null&&n._receiver.write(e),n._receiver.end(),this[we]=void 0,clearTimeout(n._closeTimer),n._receiver._writableState.finished||n._receiver._writableState.errorEmitted?n.emitClose():(n._receiver.on("error",vp),n._receiver.on("finish",vp))}function Ws(n){this[we]._receiver.write(n)||this.pause()}function Sp(){let n=this[we];n._readyState=le.CLOSING,n._receiver.end(),this.end()}function Rp(){let n=this[we];this.removeListener("error",Rp),this.on("error",yp),n&&(n._readyState=le.CLOSING,this.destroy())}});var Dp=w((yw,Ip)=>{"use strict";var{Duplex:og}=I("stream");function kp(n){n.emit("close")}function cg(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Ap(n){this.removeListener("error",Ap),this.destroy(),this.listenerCount("error")===0&&this.emit("error",n)}function lg(n,e){let t=!0,s=!0;function i(){t&&n._socket.resume()}n.readyState===n.CONNECTING?n.once("open",function(){n._receiver.removeAllListeners("drain"),n._receiver.on("drain",i)}):(n._receiver.removeAllListeners("drain"),n._receiver.on("drain",i));let a=new og({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return n.on("message",function(o){a.push(o)||(t=!1,n._socket.pause())}),n.once("error",function(o){a.destroyed||(s=!1,a.destroy(o))}),n.once("close",function(){a.destroyed||a.push(null)}),a._destroy=function(r,o){if(n.readyState===n.CLOSED){o(r),process.nextTick(kp,a);return}let l=!1;n.once("error",function(p){l=!0,o(p)}),n.once("close",function(){l||o(r),process.nextTick(kp,a)}),s&&n.terminate()},a._final=function(r){if(n.readyState===n.CONNECTING){n.once("open",function(){a._final(r)});return}n._socket!==null&&(n._socket._writableState.finished?(r(),a._readableState.endEmitted&&a.destroy()):(n._socket.once("finish",function(){r()}),n.close()))},a._read=function(){(n.readyState===n.OPEN||n.readyState===n.CLOSING)&&!t&&(t=!0,n._receiver._writableState.needDrain||n._socket.resume())},a._write=function(r,o,l){if(n.readyState===n.CONNECTING){n.once("open",function(){a._write(r,o,l)});return}n.send(r,l)},a.on("end",cg),a.on("error",Ap),a}Ip.exports=lg});var Pp=w((Sw,Fp)=>{"use strict";var pg=I("events"),Vs=I("http"),ww=(pt(),bn(yn)),Cw=I("net"),Ew=I("tls"),{createHash:ug}=I("crypto"),Pt=Wn(),dg=Ga(),{format:mg,parse:fg}=Fa(),{GUID:hg,kWebSocket:gg}=Lt(),bg=/^[+/0-9A-Za-z]{22}==$/,Op=0,Up=1,Lp=2,$a=class extends pg{constructor(e,t){if(super(),e={maxPayload:100*1024*1024,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=Vs.createServer((s,i)=>{let a=Vs.STATUS_CODES[426];i.writeHead(426,{"Content-Length":a.length,"Content-Type":"text/plain"}),i.end(a)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let s=this.emit.bind(this,"connection");this._removeListeners=xg(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,a,r)=>{this.handleUpgrade(i,a,r,s)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set),this.options=e,this._state=Op}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(e&&this.once("close",e),this._state===Lp){process.nextTick(Ba,this);return}if(this._state===Up)return;if(this._state=Up,this.clients)for(let s of this.clients)s.terminate();let t=this._server;if(t&&(this._removeListeners(),this._removeListeners=this._server=null,this.options.port!=null)){t.close(Ba.bind(void 0,this));return}process.nextTick(Ba,this)}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((t!==-1?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,s,i){t.on("error",za);let a=e.headers["sec-websocket-key"]!==void 0?e.headers["sec-websocket-key"].trim():!1,r=e.headers.upgrade,o=+e.headers["sec-websocket-version"],l={};if(e.method!=="GET"||r===void 0||r.toLowerCase()!=="websocket"||!a||!bg.test(a)||o!==8&&o!==13||!this.shouldHandle(e))return Kn(t,400);if(this.options.perMessageDeflate){let c=new Pt(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let p=fg(e.headers["sec-websocket-extensions"]);p[Pt.extensionName]&&(c.accept(p[Pt.extensionName]),l[Pt.extensionName]=c)}catch{return Kn(t,400)}}if(this.options.verifyClient){let c={origin:e.headers[`${o===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(c,(p,u,m,f)=>{if(!p)return Kn(t,u||401,m,f);this.completeUpgrade(a,l,e,t,s,i)});return}if(!this.options.verifyClient(c))return Kn(t,401)}this.completeUpgrade(a,l,e,t,s,i)}completeUpgrade(e,t,s,i,a,r){if(!i.readable||!i.writable)return i.destroy();if(i[gg])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Op)return Kn(i,503);let l=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${ug("sha1").update(e+hg).digest("base64")}`],c=new dg(null),p=s.headers["sec-websocket-protocol"];if(p&&(p=p.split(",").map(vg),this.options.handleProtocols?p=this.options.handleProtocols(p,s):p=p[0],p&&(l.push(`Sec-WebSocket-Protocol: ${p}`),c._protocol=p)),t[Pt.extensionName]){let u=t[Pt.extensionName].params,m=mg({[Pt.extensionName]:[u]});l.push(`Sec-WebSocket-Extensions: ${m}`),c._extensions=t}this.emit("headers",l,s),i.write(l.concat(`\r
7
7
  `).join(`\r
8
- `)),i.removeListener("error",$a),c.setSocket(i,a,this.options.maxPayload),this.clients&&(this.clients.add(c),c.on("close",()=>this.clients.delete(c))),r(c,s)}};Fp.exports=Ba;function vg(n,e){for(let t of Object.keys(e))n.on(t,e[t]);return function(){for(let s of Object.keys(e))n.removeListener(s,e[s])}}function Ga(n){n._state=Lp,n.emit("close")}function $a(){this.destroy()}function Hn(n,e,t,s){n.writable&&(t=t||Ws.STATUS_CODES[e],s={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...s},n.write(`HTTP/1.1 ${e} ${Ws.STATUS_CODES[e]}\r
8
+ `)),i.removeListener("error",za),c.setSocket(i,a,this.options.maxPayload),this.clients&&(this.clients.add(c),c.on("close",()=>this.clients.delete(c))),r(c,s)}};Fp.exports=$a;function xg(n,e){for(let t of Object.keys(e))n.on(t,e[t]);return function(){for(let s of Object.keys(e))n.removeListener(s,e[s])}}function Ba(n){n._state=Lp,n.emit("close")}function za(){this.destroy()}function Kn(n,e,t,s){n.writable&&(t=t||Vs.STATUS_CODES[e],s={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...s},n.write(`HTTP/1.1 ${e} ${Vs.STATUS_CODES[e]}\r
9
9
  `+Object.keys(s).map(i=>`${i}: ${s[i]}`).join(`\r
10
10
  `)+`\r
11
11
  \r
12
- `+t)),n.removeListener("error",$a),n.destroy()}function _g(n){return n.trim()}});var jp=w((Rw,Mp)=>{"use strict";var Kn=qa();Kn.createWebSocketStream=Dp();Kn.Server=Pp();Kn.Receiver=Ta();Kn.Sender=Aa();Mp.exports=Kn});var qp=w((Tw,Np)=>{"use strict";Np.exports=jp()});var Bp=w((za,Hs)=>{"use strict";(function(n){"use strict";var e=n.setTimeout,t=n.clearTimeout,s=n.XMLHttpRequest,i=n.XDomainRequest,a=n.ActiveXObject,r=n.EventSource,o=n.document,l=n.Promise,c=n.fetch,p=n.Response,u=n.TextDecoder,m=n.TextEncoder,f=n.AbortController;if(typeof window<"u"&&typeof o<"u"&&!("readyState"in o)&&o.body==null&&(o.readyState="loading",window.addEventListener("load",function(x){o.readyState="complete"},!1)),s==null&&a!=null&&(s=function(){return new a("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(x){function S(){}return S.prototype=x,new S}),Date.now||(Date.now=function(){return new Date().getTime()}),f==null){var g=c;c=function(x,S){var k=S.signal;return g(x,{headers:S.headers,credentials:S.credentials,cache:S.cache}).then(function(E){var F=E.body.getReader();return k._reader=F,k._aborted&&k._reader.cancel(),{status:E.status,statusText:E.statusText,headers:E.headers,body:{getReader:function(){return F}}}})},f=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function v(){this.bitsNeeded=0,this.codePoint=0}v.prototype.decode=function(x){function S(V,Q,P){if(P===1)return V>=128>>Q&&V<<Q<=2047;if(P===2)return V>=2048>>Q&&V<<Q<=55295||V>=57344>>Q&&V<<Q<=65535;if(P===3)return V>=65536>>Q&&V<<Q<=1114111;throw new Error}function k(V,Q){if(V===6)return Q>>6>15?3:Q>31?2:1;if(V===12)return Q>15?3:2;if(V===18)return 3;throw new Error}for(var E=65533,F="",O=this.bitsNeeded,j=this.codePoint,te=0;te<x.length;te+=1){var G=x[te];O!==0&&(G<128||G>191||!S(j<<6|G&63,O-6,k(O,j)))&&(O=0,j=E,F+=String.fromCharCode(j)),O===0?(G>=0&&G<=127?(O=0,j=G):G>=192&&G<=223?(O=6,j=G&31):G>=224&&G<=239?(O=12,j=G&15):G>=240&&G<=247?(O=18,j=G&7):(O=0,j=E),O!==0&&!S(j,O,k(O,j))&&(O=0,j=E)):(O-=6,j=j<<6|G&63),O===0&&(j<=65535?F+=String.fromCharCode(j):(F+=String.fromCharCode(55296+(j-65535-1>>10)),F+=String.fromCharCode(56320+(j-65535-1&1023))))}return this.bitsNeeded=O,this.codePoint=j,F};var _=function(){try{return new u().decode(new m().encode("test"),{stream:!0})==="test"}catch(x){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+x)}return!1};(u==null||m==null||!_())&&(u=v);var R=function(){};function D(x){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=R,this.onload=R,this.onerror=R,this.onreadystatechange=R,this._contentType="",this._xhr=x,this._sendTimeout=0,this._abort=R}D.prototype.open=function(x,S){this._abort(!0);var k=this,E=this._xhr,F=1,O=0;this._abort=function(P){k._sendTimeout!==0&&(t(k._sendTimeout),k._sendTimeout=0),(F===1||F===2||F===3)&&(F=4,E.onload=R,E.onerror=R,E.onabort=R,E.onprogress=R,E.onreadystatechange=R,E.abort(),O!==0&&(t(O),O=0),P||(k.readyState=4,k.onabort(null),k.onreadystatechange())),F=0};var j=function(){if(F===1){var P=0,ne="",Ze=void 0;if("contentType"in E)P=200,ne="OK",Ze=E.contentType;else try{P=E.status,ne=E.statusText,Ze=E.getResponseHeader("Content-Type")}catch{P=0,ne="",Ze=void 0}P!==0&&(F=2,k.readyState=2,k.status=P,k.statusText=ne,k._contentType=Ze,k.onreadystatechange())}},te=function(){if(j(),F===2||F===3){F=3;var P="";try{P=E.responseText}catch{}k.readyState=3,k.responseText=P,k.onprogress()}},G=function(P,ne){if((ne==null||ne.preventDefault==null)&&(ne={preventDefault:R}),te(),F===1||F===2||F===3){if(F=4,O!==0&&(t(O),O=0),k.readyState=4,P==="load")k.onload(ne);else if(P==="error")k.onerror(ne);else if(P==="abort")k.onabort(ne);else throw new TypeError;k.onreadystatechange()}},V=function(P){E!=null&&(E.readyState===4?(!("onload"in E)||!("onerror"in E)||!("onabort"in E))&&G(E.responseText===""?"error":"load",P):E.readyState===3?"onprogress"in E||te():E.readyState===2&&j())},Q=function(){O=e(function(){Q()},500),E.readyState===3&&te()};"onload"in E&&(E.onload=function(P){G("load",P)}),"onerror"in E&&(E.onerror=function(P){G("error",P)}),"onabort"in E&&(E.onabort=function(P){G("abort",P)}),"onprogress"in E&&(E.onprogress=te),"onreadystatechange"in E&&(E.onreadystatechange=function(P){V(P)}),("contentType"in E||!("ontimeout"in s.prototype))&&(S+=(S.indexOf("?")===-1?"?":"&")+"padding=true"),E.open(x,S,!0),"readyState"in E&&(O=e(function(){Q()},0))},D.prototype.abort=function(){this._abort(!1)},D.prototype.getResponseHeader=function(x){return this._contentType},D.prototype.setRequestHeader=function(x,S){var k=this._xhr;"setRequestHeader"in k&&k.setRequestHeader(x,S)},D.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},D.prototype.send=function(){if((!("ontimeout"in s.prototype)||!("sendAsBinary"in s.prototype)&&!("mozAnon"in s.prototype))&&o!=null&&o.readyState!=null&&o.readyState!=="complete"){var x=this;x._sendTimeout=e(function(){x._sendTimeout=0,x.send()},4);return}var S=this._xhr;"withCredentials"in S&&(S.withCredentials=this.withCredentials);try{S.send(void 0)}catch(k){throw k}};function L(x){return x.replace(/[A-Z]/g,function(S){return String.fromCharCode(S.charCodeAt(0)+32)})}function q(x){for(var S=Object.create(null),k=x.split(`\r
13
- `),E=0;E<k.length;E+=1){var F=k[E],O=F.split(": "),j=O.shift(),te=O.join(": ");S[L(j)]=te}this._map=S}q.prototype.get=function(x){return this._map[L(x)]},s!=null&&s.HEADERS_RECEIVED==null&&(s.HEADERS_RECEIVED=2);function M(){}M.prototype.open=function(x,S,k,E,F,O,j){x.open("GET",F);var te=0;x.onprogress=function(){var V=x.responseText,Q=V.slice(te);te+=Q.length,k(Q)},x.onerror=function(V){V.preventDefault(),E(new Error("NetworkError"))},x.onload=function(){E(null)},x.onabort=function(){E(null)},x.onreadystatechange=function(){if(x.readyState===s.HEADERS_RECEIVED){var V=x.status,Q=x.statusText,P=x.getResponseHeader("Content-Type"),ne=x.getAllResponseHeaders();S(V,Q,P,new q(ne))}},x.withCredentials=O;for(var G in j)Object.prototype.hasOwnProperty.call(j,G)&&x.setRequestHeader(G,j[G]);return x.send(),x};function Y(x){this._headers=x}Y.prototype.get=function(x){return this._headers.get(x)};function ae(){}ae.prototype.open=function(x,S,k,E,F,O,j){var te=null,G=new f,V=G.signal,Q=new u;return c(F,{headers:j,credentials:O?"include":"same-origin",signal:V,cache:"no-store"}).then(function(P){return te=P.body.getReader(),S(P.status,P.statusText,P.headers.get("Content-Type"),new Y(P.headers)),new l(function(ne,Ze){var fn=function(){te.read().then(function(Fe){if(Fe.done)ne(void 0);else{var Ce=Q.decode(Fe.value,{stream:!0});k(Ce),fn()}}).catch(function(Fe){Ze(Fe)})};fn()})}).catch(function(P){if(P.name!=="AbortError")return P}).then(function(P){E(P)}),{abort:function(){te?.cancel(),G.abort()}}};function Z(){this._listeners=Object.create(null)}function ye(x){e(function(){throw x},0)}Z.prototype.dispatchEvent=function(x){x.target=this;var S=this._listeners[x.type];if(S!=null)for(var k=S.length,E=0;E<k;E+=1){var F=S[E];try{typeof F.handleEvent=="function"?F.handleEvent(x):F.call(this,x)}catch(O){ye(O)}}},Z.prototype.addEventListener=function(x,S){x=String(x);var k=this._listeners,E=k[x];E==null&&(E=[],k[x]=E);for(var F=!1,O=0;O<E.length;O+=1)E[O]===S&&(F=!0);F||E.push(S)},Z.prototype.removeEventListener=function(x,S){x=String(x);var k=this._listeners,E=k[x];if(E!=null){for(var F=[],O=0;O<E.length;O+=1)E[O]!==S&&F.push(E[O]);F.length===0?delete k[x]:k[x]=F}};function Le(x){this.type=x,this.target=void 0}function jt(x,S){Le.call(this,x),this.data=S.data,this.lastEventId=S.lastEventId}jt.prototype=Object.create(Le.prototype);function qe(x,S){Le.call(this,x),this.status=S.status,this.statusText=S.statusText,this.headers=S.headers}qe.prototype=Object.create(Le.prototype);function ht(x,S){Le.call(this,x),this.error=S.error}ht.prototype=Object.create(Le.prototype);var ce=-1,z=0,pe=1,T=2,A=-1,X=0,Te=1,ee=2,Ge=3,gt=/^text\/event\-stream(;.*)?$/i,Be=1e3,ke=18e6,Nt=function(x,S){var k=x==null?S:parseInt(x,10);return k!==k&&(k=S),bt(k)},bt=function(x){return Math.min(Math.max(x,Be),ke)},re=function(x,S,k){try{typeof S=="function"&&S.call(x,k)}catch(E){ye(E)}};function ze(x,S){Z.call(this),S=S||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,Zp(this,x,S)}function Qp(){return s!=null&&"withCredentials"in s.prototype||i==null?new s:new i}var Yp=c!=null&&p!=null&&"body"in p.prototype;function Zp(x,S,k){S=String(S);var E=!!k.withCredentials,F=k.lastEventIdQueryParameterName||"lastEventId",O=bt(1e3),j=Nt(k.heartbeatTimeout,45e3),te="",G=O,V=!1,Q=0,P=k.headers||{},ne=k.Transport,Ze=Yp&&ne==null?void 0:new D(ne!=null?new ne:Qp()),fn=ne!=null&&typeof ne!="string"?new ne:Ze==null?new ae:new M,Fe=void 0,Ce=0,We=ce,qt="",ns="",et="",ss="",Ee=X,ii=0,xt=0,eu=function(fe,de,Pe,Me){if(We===z)if(fe===200&&Pe!=null&&gt.test(Pe)){We=pe,V=Date.now(),G=O,x.readyState=pe;var Se=new qe("open",{status:fe,statusText:de,headers:Me});x.dispatchEvent(Se),re(x,x.onopen,Se)}else{var ve="";fe!==200?(de&&(de=de.replace(/\s+/g," ")),ve="EventSource's response has a status "+fe+" "+de+" that is not 200. Aborting the connection."):ve="EventSource's response has a Content-Type specifying an unsupported type: "+(Pe==null?"-":Pe.replace(/\s+/g," "))+". Aborting the connection.",ai();var Se=new qe("error",{status:fe,statusText:de,headers:Me});x.dispatchEvent(Se),re(x,x.onerror,Se),console.error(ve)}},tu=function(fe){if(We===pe){for(var de=-1,Pe=0;Pe<fe.length;Pe+=1){var Me=fe.charCodeAt(Pe);(Me===10||Me===13)&&(de=Pe)}var Se=(de!==-1?ss:"")+fe.slice(0,de+1);ss=(de===-1?ss:"")+fe.slice(de+1),fe!==""&&(V=Date.now(),Q+=fe.length);for(var ve=0;ve<Se.length;ve+=1){var Me=Se.charCodeAt(ve);if(Ee===A&&Me===10)Ee=X;else if(Ee===A&&(Ee=X),Me===13||Me===10){if(Ee!==X){Ee===Te&&(xt=ve+1);var tt=Se.slice(ii,xt-1),nt=Se.slice(xt+(xt<ve&&Se.charCodeAt(xt)===32?1:0),ve);tt==="data"?(qt+=`
14
- `,qt+=nt):tt==="id"?ns=nt:tt==="event"?et=nt:tt==="retry"?(O=Nt(nt,O),G=O):tt==="heartbeatTimeout"&&(j=Nt(nt,j),Ce!==0&&(t(Ce),Ce=e(function(){hn()},j)))}if(Ee===X){if(qt!==""){te=ns,et===""&&(et="message");var Gt=new jt(et,{data:qt.slice(1),lastEventId:ns});if(x.dispatchEvent(Gt),et==="open"?re(x,x.onopen,Gt):et==="message"?re(x,x.onmessage,Gt):et==="error"&&re(x,x.onerror,Gt),We===T)return}qt="",et=""}Ee=Me===13?A:X}else Ee===X&&(ii=ve,Ee=Te),Ee===Te?Me===58&&(xt=ve+1,Ee=ee):Ee===ee&&(Ee=Ge)}}},nr=function(fe){if(We===pe||We===z){We=ce,Ce!==0&&(t(Ce),Ce=0),Ce=e(function(){hn()},G),G=bt(Math.min(O*16,G*2)),x.readyState=z;var de=new ht("error",{error:fe});x.dispatchEvent(de),re(x,x.onerror,de),fe!=null&&console.error(fe)}},ai=function(){We=T,Fe!=null&&(Fe.abort(),Fe=void 0),Ce!==0&&(t(Ce),Ce=0),x.readyState=T},hn=function(){if(Ce=0,We!==ce){if(!V&&Fe!=null)nr(new Error("No activity within "+j+" milliseconds. "+(We===z?"No response received.":Q+" chars received.")+" Reconnecting.")),Fe!=null&&(Fe.abort(),Fe=void 0);else{var fe=Math.max((V||Date.now())+j-Date.now(),1);V=!1,Ce=e(function(){hn()},fe)}return}V=!1,Q=0,Ce=e(function(){hn()},j),We=z,qt="",et="",ns=te,ss="",ii=0,xt=0,Ee=X;var de=S;if(S.slice(0,5)!=="data:"&&S.slice(0,5)!=="blob:"&&te!==""){var Pe=S.indexOf("?");de=Pe===-1?S:S.slice(0,Pe+1)+S.slice(Pe+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(nt,Gt){return Gt===F?"":nt}),de+=(S.indexOf("?")===-1?"?":"&")+F+"="+encodeURIComponent(te)}var Me=x.withCredentials,Se={};Se.Accept="text/event-stream";var ve=x.headers;if(ve!=null)for(var tt in ve)Object.prototype.hasOwnProperty.call(ve,tt)&&(Se[tt]=ve[tt]);try{Fe=fn.open(Ze,eu,tu,nr,de,Me,Se)}catch(nt){throw ai(),nt}};x.url=S,x.readyState=z,x.withCredentials=E,x.headers=P,x._close=ai,hn()}ze.prototype=Object.create(Z.prototype),ze.prototype.CONNECTING=z,ze.prototype.OPEN=pe,ze.prototype.CLOSED=T,ze.prototype.close=function(){this._close()},ze.CONNECTING=z,ze.OPEN=pe,ze.CLOSED=T,ze.prototype.withCredentials=void 0;var tr=r;s!=null&&(r==null||!("withCredentials"in r.prototype))&&(tr=ze),(function(x){if(typeof Hs=="object"&&typeof Hs.exports=="object"){var S=x(za);S!==void 0&&(Hs.exports=S)}else typeof define=="function"&&define.amd?define(["exports"],x):x(n)})(function(x){x.EventSourcePolyfill=ze,x.NativeEventSource=r,x.EventSource=tr})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:za:globalThis)});var Qg={};ri(Qg,{CallAction:()=>Wa,CallStatus:()=>Va,Channel:()=>on,ChannelState:()=>Nn,ClientState:()=>cn,EVENT_MAP:()=>Eg,ErmisAuthProvider:()=>Ya,ErmisCallNode:()=>Qa,ErmisChat:()=>Ka,ErrorFromResponse:()=>Pt,FRAME_TYPE:()=>Ha,StableWSConnection:()=>Jn,TokenManager:()=>Xn,buildAttachmentPayload:()=>Ns,chatCodes:()=>dt,createForwardMessagePayload:()=>zl,formatMessage:()=>Gl,getAttachmentCategory:()=>ba,isHeicFile:()=>Wl,isVideoFile:()=>js,logChatPromiseExecution:()=>Fs,normalizeFileName:()=>qn,parseSignalMessage:()=>Xp,parseSystemMessage:()=>Kp});function bn(n,e){return function(){return n.apply(e,arguments)}}var{toString:cu}=Object.prototype,{getPrototypeOf:ci}=Object,{iterator:rs,toStringTag:ar}=Symbol,os=(n=>e=>{let t=cu.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Ve=n=>(n=n.toLowerCase(),e=>os(e)===n),cs=n=>e=>typeof e===n,{isArray:Bt}=Array,xn=cs("undefined");function lu(n){return n!==null&&!xn(n)&&n.constructor!==null&&!xn(n.constructor)&&Ae(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}var rr=Ve("ArrayBuffer");function pu(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&rr(n.buffer),e}var uu=cs("string"),Ae=cs("function"),or=cs("number"),ls=n=>n!==null&&typeof n=="object",du=n=>n===!0||n===!1,as=n=>{if(os(n)!=="object")return!1;let e=ci(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ar in n)&&!(rs in n)},mu=Ve("Date"),fu=Ve("File"),hu=Ve("Blob"),gu=Ve("FileList"),bu=n=>ls(n)&&Ae(n.pipe),xu=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Ae(n.append)&&((e=os(n))==="formdata"||e==="object"&&Ae(n.toString)&&n.toString()==="[object FormData]"))},vu=Ve("URLSearchParams"),[_u,yu,wu,Cu]=["ReadableStream","Request","Response","Headers"].map(Ve),Eu=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function vn(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let s,i;if(typeof n!="object"&&(n=[n]),Bt(n))for(s=0,i=n.length;s<i;s++)e.call(null,n[s],s,n);else{let a=t?Object.getOwnPropertyNames(n):Object.keys(n),r=a.length,o;for(s=0;s<r;s++)o=a[s],e.call(null,n[o],o,n)}}function cr(n,e){e=e.toLowerCase();let t=Object.keys(n),s=t.length,i;for(;s-- >0;)if(i=t[s],e===i.toLowerCase())return i;return null}var vt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lr=n=>!xn(n)&&n!==vt;function oi(){let{caseless:n}=lr(this)&&this||{},e={},t=(s,i)=>{let a=n&&cr(e,i)||i;as(e[a])&&as(s)?e[a]=oi(e[a],s):as(s)?e[a]=oi({},s):Bt(s)?e[a]=s.slice():e[a]=s};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&vn(arguments[s],t);return e}var Su=(n,e,t,{allOwnKeys:s}={})=>(vn(e,(i,a)=>{t&&Ae(i)?n[a]=bn(i,t):n[a]=i},{allOwnKeys:s}),n),Ru=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Tu=(n,e,t,s)=>{n.prototype=Object.create(e.prototype,s),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},ku=(n,e,t,s)=>{let i,a,r,o={};if(e=e||{},n==null)return e;do{for(i=Object.getOwnPropertyNames(n),a=i.length;a-- >0;)r=i[a],(!s||s(r,n,e))&&!o[r]&&(e[r]=n[r],o[r]=!0);n=t!==!1&&ci(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},Au=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;let s=n.indexOf(e,t);return s!==-1&&s===t},Iu=n=>{if(!n)return null;if(Bt(n))return n;let e=n.length;if(!or(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},Du=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&ci(Uint8Array)),Ou=(n,e)=>{let s=(n&&n[rs]).call(n),i;for(;(i=s.next())&&!i.done;){let a=i.value;e.call(n,a[0],a[1])}},Uu=(n,e)=>{let t,s=[];for(;(t=n.exec(e))!==null;)s.push(t);return s},Lu=Ve("HTMLFormElement"),Fu=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,s,i){return s.toUpperCase()+i}),ir=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),Pu=Ve("RegExp"),pr=(n,e)=>{let t=Object.getOwnPropertyDescriptors(n),s={};vn(t,(i,a)=>{let r;(r=e(i,a,n))!==!1&&(s[a]=r||i)}),Object.defineProperties(n,s)},Mu=n=>{pr(n,(e,t)=>{if(Ae(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let s=n[t];if(Ae(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},ju=(n,e)=>{let t={},s=i=>{i.forEach(a=>{t[a]=!0})};return Bt(n)?s(n):s(String(n).split(e)),t},Nu=()=>{},qu=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function Gu(n){return!!(n&&Ae(n.append)&&n[ar]==="FormData"&&n[rs])}var Bu=n=>{let e=new Array(10),t=(s,i)=>{if(ls(s)){if(e.indexOf(s)>=0)return;if(!("toJSON"in s)){e[i]=s;let a=Bt(s)?[]:{};return vn(s,(r,o)=>{let l=t(r,i+1);!xn(l)&&(a[o]=l)}),e[i]=void 0,a}}return s};return t(n,0)},$u=Ve("AsyncFunction"),zu=n=>n&&(ls(n)||Ae(n))&&Ae(n.then)&&Ae(n.catch),ur=((n,e)=>n?setImmediate:e?((t,s)=>(vt.addEventListener("message",({source:i,data:a})=>{i===vt&&a===t&&s.length&&s.shift()()},!1),i=>{s.push(i),vt.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Ae(vt.postMessage)),Wu=typeof queueMicrotask<"u"?queueMicrotask.bind(vt):typeof process<"u"&&process.nextTick||ur,Vu=n=>n!=null&&Ae(n[rs]),d={isArray:Bt,isArrayBuffer:rr,isBuffer:lu,isFormData:xu,isArrayBufferView:pu,isString:uu,isNumber:or,isBoolean:du,isObject:ls,isPlainObject:as,isReadableStream:_u,isRequest:yu,isResponse:wu,isHeaders:Cu,isUndefined:xn,isDate:mu,isFile:fu,isBlob:hu,isRegExp:Pu,isFunction:Ae,isStream:bu,isURLSearchParams:vu,isTypedArray:Du,isFileList:gu,forEach:vn,merge:oi,extend:Su,trim:Eu,stripBOM:Ru,inherits:Tu,toFlatObject:ku,kindOf:os,kindOfTest:Ve,endsWith:Au,toArray:Iu,forEachEntry:Ou,matchAll:Uu,isHTMLForm:Lu,hasOwnProperty:ir,hasOwnProp:ir,reduceDescriptors:pr,freezeMethods:Mu,toObjectSet:ju,toCamelCase:Fu,noop:Nu,toFiniteNumber:qu,findKey:cr,global:vt,isContextDefined:lr,isSpecCompliantForm:Gu,toJSONObject:Bu,isAsyncFn:$u,isThenable:zu,setImmediate:ur,asap:Wu,isIterable:Vu};function $t(n,e,t,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),s&&(this.request=s),i&&(this.response=i,this.status=i.status?i.status:null)}d.inherits($t,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});var dr=$t.prototype,mr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{mr[n]={value:n}});Object.defineProperties($t,mr);Object.defineProperty(dr,"isAxiosError",{value:!0});$t.from=(n,e,t,s,i,a)=>{let r=Object.create(dr);return d.toFlatObject(n,r,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),$t.call(r,n.message,e,t,s,i),r.cause=n,r.name=n.name,a&&Object.assign(r,a),r};var C=$t;var bc=Re(ki(),1),_s=bc.default;function Ai(n){return d.isPlainObject(n)||d.isArray(n)}function vc(n){return d.endsWith(n,"[]")?n.slice(0,-2):n}function xc(n,e,t){return n?n.concat(e).map(function(i,a){return i=vc(i),!t&&a?"["+i+"]":i}).join(t?".":""):e}function Dm(n){return d.isArray(n)&&!n.some(Ai)}var Om=d.toFlatObject(d,{},null,function(e){return/^is[A-Z]/.test(e)});function Um(n,e,t){if(!d.isObject(n))throw new TypeError("target must be an object");e=e||new(_s||FormData),t=d.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,_){return!d.isUndefined(_[v])});let s=t.metaTokens,i=t.visitor||p,a=t.dots,r=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(e);if(!d.isFunction(i))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(d.isDate(g))return g.toISOString();if(d.isBoolean(g))return g.toString();if(!l&&d.isBlob(g))throw new C("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(g)||d.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function p(g,v,_){let R=g;if(g&&!_&&typeof g=="object"){if(d.endsWith(v,"{}"))v=s?v:v.slice(0,-2),g=JSON.stringify(g);else if(d.isArray(g)&&Dm(g)||(d.isFileList(g)||d.endsWith(v,"[]"))&&(R=d.toArray(g)))return v=vc(v),R.forEach(function(L,q){!(d.isUndefined(L)||L===null)&&e.append(r===!0?xc([v],q,a):r===null?v:v+"[]",c(L))}),!1}return Ai(g)?!0:(e.append(xc(_,v,a),c(g)),!1)}let u=[],m=Object.assign(Om,{defaultVisitor:p,convertValue:c,isVisitable:Ai});function f(g,v){if(!d.isUndefined(g)){if(u.indexOf(g)!==-1)throw Error("Circular reference detected in "+v.join("."));u.push(g),d.forEach(g,function(R,D){(!(d.isUndefined(R)||R===null)&&i.call(e,R,d.isString(D)?D.trim():D,v,m))===!0&&f(R,v?v.concat(D):[D])}),u.pop()}}if(!d.isObject(n))throw new TypeError("data must be an object");return f(n),e}var ut=Um;function _c(n){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function yc(n,e){this._pairs=[],n&&ut(n,this,e)}var wc=yc.prototype;wc.append=function(e,t){this._pairs.push([e,t])};wc.toString=function(e){let t=e?function(s){return e.call(this,s,_c)}:_c;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};var Cc=yc;function Lm(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wt(n,e,t){if(!e)return n;let s=t&&t.encode||Lm;d.isFunction(t)&&(t={serialize:t});let i=t&&t.serialize,a;if(i?a=i(e,t):a=d.isURLSearchParams(e)?e.toString():new Cc(e,t).toString(s),a){let r=n.indexOf("#");r!==-1&&(n=n.slice(0,r)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}var Ii=class{constructor(){this.handlers=[]}use(e,t,s){return this.handlers.push({fulfilled:e,rejected:t,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){d.forEach(this.handlers,function(s){s!==null&&e(s)})}},Di=Ii;var Kt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Tc=Re(I("crypto"),1);var Ec=Re(I("url"),1),Sc=Ec.default.URLSearchParams;var Oi="abcdefghijklmnopqrstuvwxyz",Rc="0123456789",kc={DIGIT:Rc,ALPHA:Oi,ALPHA_DIGIT:Oi+Oi.toUpperCase()+Rc},Fm=(n=16,e=kc.ALPHA_DIGIT)=>{let t="",{length:s}=e,i=new Uint32Array(n);Tc.default.randomFillSync(i);for(let a=0;a<n;a++)t+=e[i[a]%s];return t},Ac={isNode:!0,classes:{URLSearchParams:Sc,FormData:_s,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:kc,generateString:Fm,protocols:["http","https","file","data"]};var Fi={};ri(Fi,{hasBrowserEnv:()=>Li,hasStandardBrowserEnv:()=>Pm,hasStandardBrowserWebWorkerEnv:()=>Mm,navigator:()=>Ui,origin:()=>jm});var Li=typeof window<"u"&&typeof document<"u",Ui=typeof navigator=="object"&&navigator||void 0,Pm=Li&&(!Ui||["ReactNative","NativeScript","NS"].indexOf(Ui.product)<0),Mm=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",jm=Li&&window.location.href||"http://localhost";var $={...Fi,...Ac};function Pi(n,e){return ut(n,new $.classes.URLSearchParams,Object.assign({visitor:function(t,s,i,a){return $.isNode&&d.isBuffer(t)?(this.append(s,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function Nm(n){return d.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function qm(n){let e={},t=Object.keys(n),s,i=t.length,a;for(s=0;s<i;s++)a=t[s],e[a]=n[a];return e}function Gm(n){function e(t,s,i,a){let r=t[a++];if(r==="__proto__")return!0;let o=Number.isFinite(+r),l=a>=t.length;return r=!r&&d.isArray(i)?i.length:r,l?(d.hasOwnProp(i,r)?i[r]=[i[r],s]:i[r]=s,!o):((!i[r]||!d.isObject(i[r]))&&(i[r]=[]),e(t,s,i[r],a)&&d.isArray(i[r])&&(i[r]=qm(i[r])),!o)}if(d.isFormData(n)&&d.isFunction(n.entries)){let t={};return d.forEachEntry(n,(s,i)=>{e(Nm(s),i,t,0)}),t}return null}var ys=Gm;function Bm(n,e,t){if(d.isString(n))try{return(e||JSON.parse)(n),d.trim(n)}catch(s){if(s.name!=="SyntaxError")throw s}return(t||JSON.stringify)(n)}var Mi={transitional:Kt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let s=t.getContentType()||"",i=s.indexOf("application/json")>-1,a=d.isObject(e);if(a&&d.isHTMLForm(e)&&(e=new FormData(e)),d.isFormData(e))return i?JSON.stringify(ys(e)):e;if(d.isArrayBuffer(e)||d.isBuffer(e)||d.isStream(e)||d.isFile(e)||d.isBlob(e)||d.isReadableStream(e))return e;if(d.isArrayBufferView(e))return e.buffer;if(d.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Pi(e,this.formSerializer).toString();if((o=d.isFileList(e))||s.indexOf("multipart/form-data")>-1){let l=this.env&&this.env.FormData;return ut(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return a||i?(t.setContentType("application/json",!1),Bm(e)):e}],transformResponse:[function(e){let t=this.transitional||Mi.transitional,s=t&&t.forcedJSONParsing,i=this.responseType==="json";if(d.isResponse(e)||d.isReadableStream(e))return e;if(e&&d.isString(e)&&(s&&!this.responseType||i)){let r=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(o){if(r)throw o.name==="SyntaxError"?C.from(o,C.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$.classes.FormData,Blob:$.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],n=>{Mi.headers[n]={}});var Jt=Mi;var $m=d.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ic=n=>{let e={},t,s,i;return n&&n.split(`
15
- `).forEach(function(r){i=r.indexOf(":"),t=r.substring(0,i).trim().toLowerCase(),s=r.substring(i+1).trim(),!(!t||e[t]&&$m[t])&&(t==="set-cookie"?e[t]?e[t].push(s):e[t]=[s]:e[t]=e[t]?e[t]+", "+s:s)}),e};var Dc=Symbol("internals");function Sn(n){return n&&String(n).trim().toLowerCase()}function ws(n){return n===!1||n==null?n:d.isArray(n)?n.map(ws):String(n)}function zm(n){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,s;for(;s=t.exec(n);)e[s[1]]=s[2];return e}var Wm=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function ji(n,e,t,s,i){if(d.isFunction(s))return s.call(this,e,t);if(i&&(e=t),!!d.isString(e)){if(d.isString(s))return e.indexOf(s)!==-1;if(d.isRegExp(s))return s.test(e)}}function Vm(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,s)=>t.toUpperCase()+s)}function Hm(n,e){let t=d.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(n,s+t,{value:function(i,a,r){return this[s].call(this,e,i,a,r)},configurable:!0})})}var Xt=class{constructor(e){e&&this.set(e)}set(e,t,s){let i=this;function a(o,l,c){let p=Sn(l);if(!p)throw new Error("header name must be a non-empty string");let u=d.findKey(i,p);(!u||i[u]===void 0||c===!0||c===void 0&&i[u]!==!1)&&(i[u||l]=ws(o))}let r=(o,l)=>d.forEach(o,(c,p)=>a(c,p,l));if(d.isPlainObject(e)||e instanceof this.constructor)r(e,t);else if(d.isString(e)&&(e=e.trim())&&!Wm(e))r(Ic(e),t);else if(d.isObject(e)&&d.isIterable(e)){let o={},l,c;for(let p of e){if(!d.isArray(p))throw TypeError("Object iterator must return a key-value pair");o[c=p[0]]=(l=o[c])?d.isArray(l)?[...l,p[1]]:[l,p[1]]:p[1]}r(o,t)}else e!=null&&a(t,e,s);return this}get(e,t){if(e=Sn(e),e){let s=d.findKey(this,e);if(s){let i=this[s];if(!t)return i;if(t===!0)return zm(i);if(d.isFunction(t))return t.call(this,i,s);if(d.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Sn(e),e){let s=d.findKey(this,e);return!!(s&&this[s]!==void 0&&(!t||ji(this,this[s],s,t)))}return!1}delete(e,t){let s=this,i=!1;function a(r){if(r=Sn(r),r){let o=d.findKey(s,r);o&&(!t||ji(s,s[o],o,t))&&(delete s[o],i=!0)}}return d.isArray(e)?e.forEach(a):a(e),i}clear(e){let t=Object.keys(this),s=t.length,i=!1;for(;s--;){let a=t[s];(!e||ji(this,this[a],a,e,!0))&&(delete this[a],i=!0)}return i}normalize(e){let t=this,s={};return d.forEach(this,(i,a)=>{let r=d.findKey(s,a);if(r){t[r]=ws(i),delete t[a];return}let o=e?Vm(a):String(a).trim();o!==a&&delete t[a],t[o]=ws(i),s[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return d.forEach(this,(s,i)=>{s!=null&&s!==!1&&(t[i]=e&&d.isArray(s)?s.join(", "):s)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
16
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let s=new this(e);return t.forEach(i=>s.set(i)),s}static accessor(e){let s=(this[Dc]=this[Dc]={accessors:{}}).accessors,i=this.prototype;function a(r){let o=Sn(r);s[o]||(Hm(i,r),s[o]=!0)}return d.isArray(e)?e.forEach(a):a(e),this}};Xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(Xt.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(s){this[t]=s}}});d.freezeMethods(Xt);var se=Xt;function Rn(n,e){let t=this||Jt,s=e||t,i=se.from(s.headers),a=s.data;return d.forEach(n,function(o){a=o.call(t,a,i.normalize(),e?e.status:void 0)}),i.normalize(),a}function Tn(n){return!!(n&&n.__CANCEL__)}function Oc(n,e,t){C.call(this,n??"canceled",C.ERR_CANCELED,e,t),this.name="CanceledError"}d.inherits(Oc,C,{__CANCEL__:!0});var je=Oc;function Je(n,e,t){let s=t.config.validateStatus;!t.status||!s||s(t.status)?n(t):e(new C("Request failed with status code "+t.status,[C.ERR_BAD_REQUEST,C.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function Ni(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function qi(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function Ct(n,e,t){let s=!Ni(e);return n&&(s||t==!1)?qi(n,e):e}var hl=Re(Lc(),1),gl=Re(I("http"),1);lt();var bl=Re(I("util"),1),xl=Re(Zc(),1),it=Re(I("zlib"),1);var Tt="1.10.0";function On(n){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}var Ff=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function na(n,e,t){let s=t&&t.Blob||$.classes.Blob,i=On(n);if(e===void 0&&s&&(e=!0),i==="data"){n=i.length?n.slice(i.length+1):n;let a=Ff.exec(n);if(!a)throw new C("Invalid URL",C.ERR_INVALID_URL);let r=a[1],o=a[2],l=a[3],c=Buffer.from(decodeURIComponent(l),o?"base64":"utf8");if(e){if(!s)throw new C("Blob is not supported",C.ERR_NOT_SUPPORT);return new s([c],{type:r})}return c}throw new C("Unsupported protocol "+i,C.ERR_NOT_SUPPORT)}var At=Re(I("stream"),1);var el=Re(I("stream"),1);var sa=Symbol("internals"),ia=class extends el.default.Transform{constructor(e){e=d.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(s,i)=>!d.isUndefined(i[s])),super({readableHighWaterMark:e.chunkSize});let t=this[sa]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",s=>{s==="progress"&&(t.isCaptured||(t.isCaptured=!0))})}_read(e){let t=this[sa];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,s){let i=this[sa],a=i.maxRate,r=this.readableHighWaterMark,o=i.timeWindow,l=1e3/o,c=a/l,p=i.minChunkSize!==!1?Math.max(i.minChunkSize,c*.01):0,u=(f,g)=>{let v=Buffer.byteLength(f);i.bytesSeen+=v,i.bytes+=v,i.isCaptured&&this.emit("progress",i.bytesSeen),this.push(f)?process.nextTick(g):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(g)}},m=(f,g)=>{let v=Buffer.byteLength(f),_=null,R=r,D,L=0;if(a){let q=Date.now();(!i.ts||(L=q-i.ts)>=o)&&(i.ts=q,D=c-i.bytes,i.bytes=D<0?-D:0,L=0),D=c-i.bytes}if(a){if(D<=0)return setTimeout(()=>{g(null,f)},o-L);D<R&&(R=D)}R&&v>R&&v-R>p&&(_=f.subarray(R),f=f.subarray(0,R)),u(f,_?()=>{process.nextTick(g,null,_)}:g)};m(e,function f(g,v){if(g)return s(g);v?m(v,f):s(null)})}},aa=ia;var vl=I("events");var nl=Re(I("util"),1),sl=I("stream");var{asyncIterator:tl}=Symbol,Pf=async function*(n){n.stream?yield*n.stream():n.arrayBuffer?yield await n.arrayBuffer():n[tl]?yield*n[tl]():yield n},ks=Pf;var Mf=$.ALPHABET.ALPHA_DIGIT+"-_",Un=typeof TextEncoder=="function"?new TextEncoder:new nl.default.TextEncoder,kt=`\r
17
- `,jf=Un.encode(kt),Nf=2,ra=class{constructor(e,t){let{escapeName:s}=this.constructor,i=d.isString(t),a=`Content-Disposition: form-data; name="${s(e)}"${!i&&t.name?`; filename="${s(t.name)}"`:""}${kt}`;i?t=Un.encode(String(t).replace(/\r?\n|\r\n?/g,kt)):a+=`Content-Type: ${t.type||"application/octet-stream"}${kt}`,this.headers=Un.encode(a+kt),this.contentLength=i?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+Nf,this.name=e,this.value=t}async*encode(){yield this.headers;let{value:e}=this;d.isTypedArray(e)?yield e:yield*ks(e),yield jf}static escapeName(e){return String(e).replace(/[\r\n"]/g,t=>({"\r":"%0D","\n":"%0A",'"':"%22"})[t])}},qf=(n,e,t)=>{let{tag:s="form-data-boundary",size:i=25,boundary:a=s+"-"+$.generateString(i,Mf)}=t||{};if(!d.isFormData(n))throw TypeError("FormData instance required");if(a.length<1||a.length>70)throw Error("boundary must be 10-70 characters long");let r=Un.encode("--"+a+kt),o=Un.encode("--"+a+"--"+kt),l=o.byteLength,c=Array.from(n.entries()).map(([u,m])=>{let f=new ra(u,m);return l+=f.size,f});l+=r.byteLength*c.length,l=d.toFiniteNumber(l);let p={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(l)&&(p["Content-Length"]=l),e&&e(p),sl.Readable.from((async function*(){for(let u of c)yield r,yield*u.encode();yield o})())},il=qf;var al=Re(I("stream"),1),oa=class extends al.default.Transform{__transform(e,t,s){this.push(e),s()}_transform(e,t,s){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,t)}this.__transform(e,t,s)}},rl=oa;var Gf=(n,e)=>d.isAsyncFn(n)?function(...t){let s=t.pop();n.apply(this,t).then(i=>{try{e?s(null,...e(i)):s(null,i)}catch(a){s(a)}},s)}:n,ol=Gf;function Bf(n,e){n=n||10;let t=new Array(n),s=new Array(n),i=0,a=0,r;return e=e!==void 0?e:1e3,function(l){let c=Date.now(),p=s[a];r||(r=c),t[i]=l,s[i]=c;let u=a,m=0;for(;u!==i;)m+=t[u++],u=u%n;if(i=(i+1)%n,i===a&&(a=(a+1)%n),c-r<e)return;let f=p&&c-p;return f?Math.round(m*1e3/f):void 0}}var cl=Bf;function $f(n,e){let t=0,s=1e3/e,i,a,r=(c,p=Date.now())=>{t=p,i=null,a&&(clearTimeout(a),a=null),n.apply(null,c)};return[(...c)=>{let p=Date.now(),u=p-t;u>=s?r(c,p):(i=c,a||(a=setTimeout(()=>{a=null,r(i)},s-u)))},()=>i&&r(i)]}var ll=$f;var st=(n,e,t=3)=>{let s=0,i=cl(50,250);return ll(a=>{let r=a.loaded,o=a.lengthComputable?a.total:void 0,l=r-s,c=i(l),p=r<=o;s=r;let u={loaded:r,total:o,progress:o?r/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o&&p?(o-r)/c:void 0,event:a,lengthComputable:o!=null,[e?"download":"upload"]:!0};n(u)},t)},tn=(n,e)=>{let t=n!=null;return[s=>e[0]({lengthComputable:t,total:n,loaded:s}),e[1]]},nn=n=>(...e)=>d.asap(()=>n(...e));var pl={flush:it.default.constants.Z_SYNC_FLUSH,finishFlush:it.default.constants.Z_SYNC_FLUSH},zf={flush:it.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:it.default.constants.BROTLI_OPERATION_FLUSH},ul=d.isFunction(it.default.createBrotliDecompress),{http:Wf,https:Vf}=xl.default,Hf=/https:?/,dl=$.protocols.map(n=>n+":"),ml=(n,[e,t])=>(n.on("end",t).on("error",t),e);function Kf(n,e){n.beforeRedirects.proxy&&n.beforeRedirects.proxy(n),n.beforeRedirects.config&&n.beforeRedirects.config(n,e)}function _l(n,e,t){let s=e;if(!s&&s!==!1){let i=hl.default.getProxyForUrl(t);i&&(s=new URL(i))}if(s){if(s.username&&(s.auth=(s.username||"")+":"+(s.password||"")),s.auth){(s.auth.username||s.auth.password)&&(s.auth=(s.auth.username||"")+":"+(s.auth.password||""));let a=Buffer.from(s.auth,"utf8").toString("base64");n.headers["Proxy-Authorization"]="Basic "+a}n.headers.host=n.hostname+(n.port?":"+n.port:"");let i=s.hostname||s.host;n.hostname=i,n.host=i,n.port=s.port,n.path=t,s.protocol&&(n.protocol=s.protocol.includes(":")?s.protocol:`${s.protocol}:`)}n.beforeRedirects.proxy=function(a){_l(a,e,a.href)}}var Jf=typeof process<"u"&&d.kindOf(process)==="process",Xf=n=>new Promise((e,t)=>{let s,i,a=(l,c)=>{i||(i=!0,s&&s(l,c))},r=l=>{a(l),e(l)},o=l=>{a(l,!0),t(l)};n(r,o,l=>s=l).catch(o)}),Qf=({address:n,family:e})=>{if(!d.isString(n))throw TypeError("address must be a string");return{address:n,family:e||(n.indexOf(".")<0?6:4)}},fl=(n,e)=>Qf(d.isObject(n)?n:{address:n,family:e}),yl=Jf&&function(e){return Xf(async function(s,i,a){let{data:r,lookup:o,family:l}=e,{responseType:c,responseEncoding:p}=e,u=e.method.toUpperCase(),m,f=!1,g;if(o){let T=ol(o,A=>d.isArray(A)?A:[A]);o=(A,X,Te)=>{T(A,X,(ee,Ge,gt)=>{if(ee)return Te(ee);let Be=d.isArray(Ge)?Ge.map(ke=>fl(ke)):[fl(Ge,gt)];X.all?Te(ee,Be):Te(ee,Be[0].address,Be[0].family)})}}let v=new vl.EventEmitter,_=()=>{e.cancelToken&&e.cancelToken.unsubscribe(R),e.signal&&e.signal.removeEventListener("abort",R),v.removeAllListeners()};a((T,A)=>{m=!0,A&&(f=!0,_())});function R(T){v.emit("abort",!T||T.type?new je(null,e,g):T)}v.once("abort",i),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(R),e.signal&&(e.signal.aborted?R():e.signal.addEventListener("abort",R)));let D=Ct(e.baseURL,e.url,e.allowAbsoluteUrls),L=new URL(D,$.hasBrowserEnv?$.origin:void 0),q=L.protocol||dl[0];if(q==="data:"){let T;if(u!=="GET")return Je(s,i,{status:405,statusText:"method not allowed",headers:{},config:e});try{T=na(e.url,c==="blob",{Blob:e.env&&e.env.Blob})}catch(A){throw C.from(A,C.ERR_BAD_REQUEST,e)}return c==="text"?(T=T.toString(p),(!p||p==="utf8")&&(T=d.stripBOM(T))):c==="stream"&&(T=At.default.Readable.from(T)),Je(s,i,{data:T,status:200,statusText:"OK",headers:new se,config:e})}if(dl.indexOf(q)===-1)return i(new C("Unsupported protocol "+q,C.ERR_BAD_REQUEST,e));let M=se.from(e.headers).normalize();M.set("User-Agent","axios/"+Tt,!1);let{onUploadProgress:Y,onDownloadProgress:ae}=e,Z=e.maxRate,ye,Le;if(d.isSpecCompliantForm(r)){let T=M.getContentType(/boundary=([-_\w\d]{10,70})/i);r=il(r,A=>{M.set(A)},{tag:`axios-${Tt}-boundary`,boundary:T&&T[1]||void 0})}else if(d.isFormData(r)&&d.isFunction(r.getHeaders)){if(M.set(r.getHeaders()),!M.hasContentLength())try{let T=await bl.default.promisify(r.getLength).call(r);Number.isFinite(T)&&T>=0&&M.setContentLength(T)}catch{}}else if(d.isBlob(r)||d.isFile(r))r.size&&M.setContentType(r.type||"application/octet-stream"),M.setContentLength(r.size||0),r=At.default.Readable.from(ks(r));else if(r&&!d.isStream(r)){if(!Buffer.isBuffer(r))if(d.isArrayBuffer(r))r=Buffer.from(new Uint8Array(r));else if(d.isString(r))r=Buffer.from(r,"utf-8");else return i(new C("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",C.ERR_BAD_REQUEST,e));if(M.setContentLength(r.length,!1),e.maxBodyLength>-1&&r.length>e.maxBodyLength)return i(new C("Request body larger than maxBodyLength limit",C.ERR_BAD_REQUEST,e))}let jt=d.toFiniteNumber(M.getContentLength());d.isArray(Z)?(ye=Z[0],Le=Z[1]):ye=Le=Z,r&&(Y||ye)&&(d.isStream(r)||(r=At.default.Readable.from(r,{objectMode:!1})),r=At.default.pipeline([r,new aa({maxRate:d.toFiniteNumber(ye)})],d.noop),Y&&r.on("progress",ml(r,tn(jt,st(nn(Y),!1,3)))));let qe;if(e.auth){let T=e.auth.username||"",A=e.auth.password||"";qe=T+":"+A}if(!qe&&L.username){let T=L.username,A=L.password;qe=T+":"+A}qe&&M.delete("authorization");let ht;try{ht=wt(L.pathname+L.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(T){let A=new Error(T.message);return A.config=e,A.url=e.url,A.exists=!0,i(A)}M.set("Accept-Encoding","gzip, compress, deflate"+(ul?", br":""),!1);let ce={path:ht,method:u,headers:M.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:qe,protocol:q,family:l,beforeRedirect:Kf,beforeRedirects:{}};!d.isUndefined(o)&&(ce.lookup=o),e.socketPath?ce.socketPath=e.socketPath:(ce.hostname=L.hostname.startsWith("[")?L.hostname.slice(1,-1):L.hostname,ce.port=L.port,_l(ce,e.proxy,q+"//"+L.hostname+(L.port?":"+L.port:"")+ce.path));let z,pe=Hf.test(ce.protocol);if(ce.agent=pe?e.httpsAgent:e.httpAgent,e.transport?z=e.transport:e.maxRedirects===0?z=pe?_t:gl.default:(e.maxRedirects&&(ce.maxRedirects=e.maxRedirects),e.beforeRedirect&&(ce.beforeRedirects.config=e.beforeRedirect),z=pe?Vf:Wf),e.maxBodyLength>-1?ce.maxBodyLength=e.maxBodyLength:ce.maxBodyLength=1/0,e.insecureHTTPParser&&(ce.insecureHTTPParser=e.insecureHTTPParser),g=z.request(ce,function(A){if(g.destroyed)return;let X=[A],Te=+A.headers["content-length"];if(ae||Le){let ke=new aa({maxRate:d.toFiniteNumber(Le)});ae&&ke.on("progress",ml(ke,tn(Te,st(nn(ae),!0,3)))),X.push(ke)}let ee=A,Ge=A.req||g;if(e.decompress!==!1&&A.headers["content-encoding"])switch((u==="HEAD"||A.statusCode===204)&&delete A.headers["content-encoding"],(A.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":X.push(it.default.createUnzip(pl)),delete A.headers["content-encoding"];break;case"deflate":X.push(new rl),X.push(it.default.createUnzip(pl)),delete A.headers["content-encoding"];break;case"br":ul&&(X.push(it.default.createBrotliDecompress(zf)),delete A.headers["content-encoding"])}ee=X.length>1?At.default.pipeline(X,d.noop):X[0];let gt=At.default.finished(ee,()=>{gt(),_()}),Be={status:A.statusCode,statusText:A.statusMessage,headers:new se(A.headers),config:e,request:Ge};if(c==="stream")Be.data=ee,Je(s,i,Be);else{let ke=[],Nt=0;ee.on("data",function(re){ke.push(re),Nt+=re.length,e.maxContentLength>-1&&Nt>e.maxContentLength&&(f=!0,ee.destroy(),i(new C("maxContentLength size of "+e.maxContentLength+" exceeded",C.ERR_BAD_RESPONSE,e,Ge)))}),ee.on("aborted",function(){if(f)return;let re=new C("stream has been aborted",C.ERR_BAD_RESPONSE,e,Ge);ee.destroy(re),i(re)}),ee.on("error",function(re){g.destroyed||i(C.from(re,null,e,Ge))}),ee.on("end",function(){try{let re=ke.length===1?ke[0]:Buffer.concat(ke);c!=="arraybuffer"&&(re=re.toString(p),(!p||p==="utf8")&&(re=d.stripBOM(re))),Be.data=re}catch(re){return i(C.from(re,null,e,Be.request,Be))}Je(s,i,Be)})}v.once("abort",ke=>{ee.destroyed||(ee.emit("error",ke),ee.destroy())})}),v.once("abort",T=>{i(T),g.destroy(T)}),g.on("error",function(A){i(C.from(A,null,e,g))}),g.on("socket",function(A){A.setKeepAlive(!0,1e3*60)}),e.timeout){let T=parseInt(e.timeout,10);if(Number.isNaN(T)){i(new C("error trying to parse `config.timeout` to int",C.ERR_BAD_OPTION_VALUE,e,g));return}g.setTimeout(T,function(){if(m)return;let X=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",Te=e.transitional||Kt;e.timeoutErrorMessage&&(X=e.timeoutErrorMessage),i(new C(X,Te.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,e,g)),R()})}if(d.isStream(r)){let T=!1,A=!1;r.on("end",()=>{T=!0}),r.once("error",X=>{A=!0,g.destroy(X)}),r.on("close",()=>{!T&&!A&&R(new je("Request stream has been aborted",e,g))}),r.pipe(g)}else g.end(r)})};var wl=$.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,$.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL($.origin),$.navigator&&/(msie|trident)/i.test($.navigator.userAgent)):()=>!0;var Cl=$.hasStandardBrowserEnv?{write(n,e,t,s,i,a){let r=[n+"="+encodeURIComponent(e)];d.isNumber(t)&&r.push("expires="+new Date(t).toGMTString()),d.isString(s)&&r.push("path="+s),d.isString(i)&&r.push("domain="+i),a===!0&&r.push("secure"),document.cookie=r.join("; ")},read(n){let e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var El=n=>n instanceof se?{...n}:n;function Ke(n,e){e=e||{};let t={};function s(c,p,u,m){return d.isPlainObject(c)&&d.isPlainObject(p)?d.merge.call({caseless:m},c,p):d.isPlainObject(p)?d.merge({},p):d.isArray(p)?p.slice():p}function i(c,p,u,m){if(d.isUndefined(p)){if(!d.isUndefined(c))return s(void 0,c,u,m)}else return s(c,p,u,m)}function a(c,p){if(!d.isUndefined(p))return s(void 0,p)}function r(c,p){if(d.isUndefined(p)){if(!d.isUndefined(c))return s(void 0,c)}else return s(void 0,p)}function o(c,p,u){if(u in e)return s(c,p);if(u in n)return s(void 0,c)}let l={url:a,method:a,data:a,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:o,headers:(c,p,u)=>i(El(c),El(p),u,!0)};return d.forEach(Object.keys(Object.assign({},n,e)),function(p){let u=l[p]||i,m=u(n[p],e[p],p);d.isUndefined(m)&&u!==o||(t[p]=m)}),t}var As=n=>{let e=Ke({},n),{data:t,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:a,headers:r,auth:o}=e;e.headers=r=se.from(r),e.url=wt(Ct(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),o&&r.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let l;if(d.isFormData(t)){if($.hasStandardBrowserEnv||$.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if((l=r.getContentType())!==!1){let[c,...p]=l?l.split(";").map(u=>u.trim()).filter(Boolean):[];r.setContentType([c||"multipart/form-data",...p].join("; "))}}if($.hasStandardBrowserEnv&&(s&&d.isFunction(s)&&(s=s(e)),s||s!==!1&&wl(e.url))){let c=i&&a&&Cl.read(a);c&&r.set(i,c)}return e};var Yf=typeof XMLHttpRequest<"u",Sl=Yf&&function(n){return new Promise(function(t,s){let i=As(n),a=i.data,r=se.from(i.headers).normalize(),{responseType:o,onUploadProgress:l,onDownloadProgress:c}=i,p,u,m,f,g;function v(){f&&f(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let _=new XMLHttpRequest;_.open(i.method.toUpperCase(),i.url,!0),_.timeout=i.timeout;function R(){if(!_)return;let L=se.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),M={data:!o||o==="text"||o==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:L,config:n,request:_};Je(function(ae){t(ae),v()},function(ae){s(ae),v()},M),_=null}"onloadend"in _?_.onloadend=R:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(R)},_.onabort=function(){_&&(s(new C("Request aborted",C.ECONNABORTED,n,_)),_=null)},_.onerror=function(){s(new C("Network Error",C.ERR_NETWORK,n,_)),_=null},_.ontimeout=function(){let q=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",M=i.transitional||Kt;i.timeoutErrorMessage&&(q=i.timeoutErrorMessage),s(new C(q,M.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,n,_)),_=null},a===void 0&&r.setContentType(null),"setRequestHeader"in _&&d.forEach(r.toJSON(),function(q,M){_.setRequestHeader(M,q)}),d.isUndefined(i.withCredentials)||(_.withCredentials=!!i.withCredentials),o&&o!=="json"&&(_.responseType=i.responseType),c&&([m,g]=st(c,!0),_.addEventListener("progress",m)),l&&_.upload&&([u,f]=st(l),_.upload.addEventListener("progress",u),_.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(p=L=>{_&&(s(!L||L.type?new je(null,n,_):L),_.abort(),_=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));let D=On(i.url);if(D&&$.protocols.indexOf(D)===-1){s(new C("Unsupported protocol "+D+":",C.ERR_BAD_REQUEST,n));return}_.send(a||null)})};var Zf=(n,e)=>{let{length:t}=n=n?n.filter(Boolean):[];if(e||t){let s=new AbortController,i,a=function(c){if(!i){i=!0,o();let p=c instanceof Error?c:this.reason;s.abort(p instanceof C?p:new je(p instanceof Error?p.message:p))}},r=e&&setTimeout(()=>{r=null,a(new C(`timeout ${e} of ms exceeded`,C.ETIMEDOUT))},e),o=()=>{n&&(r&&clearTimeout(r),r=null,n.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),n=null)};n.forEach(c=>c.addEventListener("abort",a));let{signal:l}=s;return l.unsubscribe=()=>d.asap(o),l}},Rl=Zf;var eh=function*(n,e){let t=n.byteLength;if(!e||t<e){yield n;return}let s=0,i;for(;s<t;)i=s+e,yield n.slice(s,i),s=i},th=async function*(n,e){for await(let t of nh(n))yield*eh(t,e)},nh=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}let e=n.getReader();try{for(;;){let{done:t,value:s}=await e.read();if(t)break;yield s}}finally{await e.cancel()}},ca=(n,e,t,s)=>{let i=th(n,e),a=0,r,o=l=>{r||(r=!0,s&&s(l))};return new ReadableStream({async pull(l){try{let{done:c,value:p}=await i.next();if(c){o(),l.close();return}let u=p.byteLength;if(t){let m=a+=u;t(m)}l.enqueue(new Uint8Array(p))}catch(c){throw o(c),c}},cancel(l){return o(l),i.return()}},{highWaterMark:2})};var Ds=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",kl=Ds&&typeof ReadableStream=="function",sh=Ds&&(typeof TextEncoder=="function"?(n=>e=>n.encode(e))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Al=(n,...e)=>{try{return!!n(...e)}catch{return!1}},ih=kl&&Al(()=>{let n=!1,e=new Request($.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!e}),Tl=64*1024,la=kl&&Al(()=>d.isReadableStream(new Response("").body)),Is={stream:la&&(n=>n.body)};Ds&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Is[e]&&(Is[e]=d.isFunction(n[e])?t=>t[e]():(t,s)=>{throw new C(`Response type '${e}' is not supported`,C.ERR_NOT_SUPPORT,s)})})})(new Response);var ah=async n=>{if(n==null)return 0;if(d.isBlob(n))return n.size;if(d.isSpecCompliantForm(n))return(await new Request($.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(d.isArrayBufferView(n)||d.isArrayBuffer(n))return n.byteLength;if(d.isURLSearchParams(n)&&(n=n+""),d.isString(n))return(await sh(n)).byteLength},rh=async(n,e)=>{let t=d.toFiniteNumber(n.getContentLength());return t??ah(e)},Il=Ds&&(async n=>{let{url:e,method:t,data:s,signal:i,cancelToken:a,timeout:r,onDownloadProgress:o,onUploadProgress:l,responseType:c,headers:p,withCredentials:u="same-origin",fetchOptions:m}=As(n);c=c?(c+"").toLowerCase():"text";let f=Rl([i,a&&a.toAbortSignal()],r),g,v=f&&f.unsubscribe&&(()=>{f.unsubscribe()}),_;try{if(l&&ih&&t!=="get"&&t!=="head"&&(_=await rh(p,s))!==0){let M=new Request(e,{method:"POST",body:s,duplex:"half"}),Y;if(d.isFormData(s)&&(Y=M.headers.get("content-type"))&&p.setContentType(Y),M.body){let[ae,Z]=tn(_,st(nn(l)));s=ca(M.body,Tl,ae,Z)}}d.isString(u)||(u=u?"include":"omit");let R="credentials"in Request.prototype;g=new Request(e,{...m,signal:f,method:t.toUpperCase(),headers:p.normalize().toJSON(),body:s,duplex:"half",credentials:R?u:void 0});let D=await fetch(g,m),L=la&&(c==="stream"||c==="response");if(la&&(o||L&&v)){let M={};["status","statusText","headers"].forEach(ye=>{M[ye]=D[ye]});let Y=d.toFiniteNumber(D.headers.get("content-length")),[ae,Z]=o&&tn(Y,st(nn(o),!0))||[];D=new Response(ca(D.body,Tl,ae,()=>{Z&&Z(),v&&v()}),M)}c=c||"text";let q=await Is[d.findKey(Is,c)||"text"](D,n);return!L&&v&&v(),await new Promise((M,Y)=>{Je(M,Y,{data:q,headers:se.from(D.headers),status:D.status,statusText:D.statusText,config:n,request:g})})}catch(R){throw v&&v(),R&&R.name==="TypeError"&&/Load failed|fetch/i.test(R.message)?Object.assign(new C("Network Error",C.ERR_NETWORK,n,g),{cause:R.cause||R}):C.from(R,R&&R.code,n,g)}});var pa={http:yl,xhr:Sl,fetch:Il};d.forEach(pa,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});var Dl=n=>`- ${n}`,oh=n=>d.isFunction(n)||n===null||n===!1,Os={getAdapter:n=>{n=d.isArray(n)?n:[n];let{length:e}=n,t,s,i={};for(let a=0;a<e;a++){t=n[a];let r;if(s=t,!oh(t)&&(s=pa[(r=String(t)).toLowerCase()],s===void 0))throw new C(`Unknown adapter '${r}'`);if(s)break;i[r||"#"+a]=s}if(!s){let a=Object.entries(i).map(([o,l])=>`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build")),r=e?a.length>1?`since :
12
+ `+t)),n.removeListener("error",za),n.destroy()}function vg(n){return n.trim()}});var jp=w((Rw,Mp)=>{"use strict";var Jn=Ga();Jn.createWebSocketStream=Dp();Jn.Server=Pp();Jn.Receiver=ka();Jn.Sender=Ia();Mp.exports=Jn});var qp=w((Tw,Np)=>{"use strict";Np.exports=jp()});var Bp=w((Wa,Ks)=>{"use strict";(function(n){"use strict";var e=n.setTimeout,t=n.clearTimeout,s=n.XMLHttpRequest,i=n.XDomainRequest,a=n.ActiveXObject,r=n.EventSource,o=n.document,l=n.Promise,c=n.fetch,p=n.Response,u=n.TextDecoder,m=n.TextEncoder,f=n.AbortController;if(typeof window<"u"&&typeof o<"u"&&!("readyState"in o)&&o.body==null&&(o.readyState="loading",window.addEventListener("load",function(x){o.readyState="complete"},!1)),s==null&&a!=null&&(s=function(){return new a("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(x){function S(){}return S.prototype=x,new S}),Date.now||(Date.now=function(){return new Date().getTime()}),f==null){var g=c;c=function(x,S){var k=S.signal;return g(x,{headers:S.headers,credentials:S.credentials,cache:S.cache}).then(function(E){var F=E.body.getReader();return k._reader=F,k._aborted&&k._reader.cancel(),{status:E.status,statusText:E.statusText,headers:E.headers,body:{getReader:function(){return F}}}})},f=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function v(){this.bitsNeeded=0,this.codePoint=0}v.prototype.decode=function(x){function S(V,Q,P){if(P===1)return V>=128>>Q&&V<<Q<=2047;if(P===2)return V>=2048>>Q&&V<<Q<=55295||V>=57344>>Q&&V<<Q<=65535;if(P===3)return V>=65536>>Q&&V<<Q<=1114111;throw new Error}function k(V,Q){if(V===6)return Q>>6>15?3:Q>31?2:1;if(V===12)return Q>15?3:2;if(V===18)return 3;throw new Error}for(var E=65533,F="",O=this.bitsNeeded,j=this.codePoint,te=0;te<x.length;te+=1){var G=x[te];O!==0&&(G<128||G>191||!S(j<<6|G&63,O-6,k(O,j)))&&(O=0,j=E,F+=String.fromCharCode(j)),O===0?(G>=0&&G<=127?(O=0,j=G):G>=192&&G<=223?(O=6,j=G&31):G>=224&&G<=239?(O=12,j=G&15):G>=240&&G<=247?(O=18,j=G&7):(O=0,j=E),O!==0&&!S(j,O,k(O,j))&&(O=0,j=E)):(O-=6,j=j<<6|G&63),O===0&&(j<=65535?F+=String.fromCharCode(j):(F+=String.fromCharCode(55296+(j-65535-1>>10)),F+=String.fromCharCode(56320+(j-65535-1&1023))))}return this.bitsNeeded=O,this.codePoint=j,F};var _=function(){try{return new u().decode(new m().encode("test"),{stream:!0})==="test"}catch(x){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+x)}return!1};(u==null||m==null||!_())&&(u=v);var R=function(){};function D(x){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=R,this.onload=R,this.onerror=R,this.onreadystatechange=R,this._contentType="",this._xhr=x,this._sendTimeout=0,this._abort=R}D.prototype.open=function(x,S){this._abort(!0);var k=this,E=this._xhr,F=1,O=0;this._abort=function(P){k._sendTimeout!==0&&(t(k._sendTimeout),k._sendTimeout=0),(F===1||F===2||F===3)&&(F=4,E.onload=R,E.onerror=R,E.onabort=R,E.onprogress=R,E.onreadystatechange=R,E.abort(),O!==0&&(t(O),O=0),P||(k.readyState=4,k.onabort(null),k.onreadystatechange())),F=0};var j=function(){if(F===1){var P=0,ne="",et=void 0;if("contentType"in E)P=200,ne="OK",et=E.contentType;else try{P=E.status,ne=E.statusText,et=E.getResponseHeader("Content-Type")}catch{P=0,ne="",et=void 0}P!==0&&(F=2,k.readyState=2,k.status=P,k.statusText=ne,k._contentType=et,k.onreadystatechange())}},te=function(){if(j(),F===2||F===3){F=3;var P="";try{P=E.responseText}catch{}k.readyState=3,k.responseText=P,k.onprogress()}},G=function(P,ne){if((ne==null||ne.preventDefault==null)&&(ne={preventDefault:R}),te(),F===1||F===2||F===3){if(F=4,O!==0&&(t(O),O=0),k.readyState=4,P==="load")k.onload(ne);else if(P==="error")k.onerror(ne);else if(P==="abort")k.onabort(ne);else throw new TypeError;k.onreadystatechange()}},V=function(P){E!=null&&(E.readyState===4?(!("onload"in E)||!("onerror"in E)||!("onabort"in E))&&G(E.responseText===""?"error":"load",P):E.readyState===3?"onprogress"in E||te():E.readyState===2&&j())},Q=function(){O=e(function(){Q()},500),E.readyState===3&&te()};"onload"in E&&(E.onload=function(P){G("load",P)}),"onerror"in E&&(E.onerror=function(P){G("error",P)}),"onabort"in E&&(E.onabort=function(P){G("abort",P)}),"onprogress"in E&&(E.onprogress=te),"onreadystatechange"in E&&(E.onreadystatechange=function(P){V(P)}),("contentType"in E||!("ontimeout"in s.prototype))&&(S+=(S.indexOf("?")===-1?"?":"&")+"padding=true"),E.open(x,S,!0),"readyState"in E&&(O=e(function(){Q()},0))},D.prototype.abort=function(){this._abort(!1)},D.prototype.getResponseHeader=function(x){return this._contentType},D.prototype.setRequestHeader=function(x,S){var k=this._xhr;"setRequestHeader"in k&&k.setRequestHeader(x,S)},D.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},D.prototype.send=function(){if((!("ontimeout"in s.prototype)||!("sendAsBinary"in s.prototype)&&!("mozAnon"in s.prototype))&&o!=null&&o.readyState!=null&&o.readyState!=="complete"){var x=this;x._sendTimeout=e(function(){x._sendTimeout=0,x.send()},4);return}var S=this._xhr;"withCredentials"in S&&(S.withCredentials=this.withCredentials);try{S.send(void 0)}catch(k){throw k}};function L(x){return x.replace(/[A-Z]/g,function(S){return String.fromCharCode(S.charCodeAt(0)+32)})}function q(x){for(var S=Object.create(null),k=x.split(`\r
13
+ `),E=0;E<k.length;E+=1){var F=k[E],O=F.split(": "),j=O.shift(),te=O.join(": ");S[L(j)]=te}this._map=S}q.prototype.get=function(x){return this._map[L(x)]},s!=null&&s.HEADERS_RECEIVED==null&&(s.HEADERS_RECEIVED=2);function M(){}M.prototype.open=function(x,S,k,E,F,O,j){x.open("GET",F);var te=0;x.onprogress=function(){var V=x.responseText,Q=V.slice(te);te+=Q.length,k(Q)},x.onerror=function(V){V.preventDefault(),E(new Error("NetworkError"))},x.onload=function(){E(null)},x.onabort=function(){E(null)},x.onreadystatechange=function(){if(x.readyState===s.HEADERS_RECEIVED){var V=x.status,Q=x.statusText,P=x.getResponseHeader("Content-Type"),ne=x.getAllResponseHeaders();S(V,Q,P,new q(ne))}},x.withCredentials=O;for(var G in j)Object.prototype.hasOwnProperty.call(j,G)&&x.setRequestHeader(G,j[G]);return x.send(),x};function Y(x){this._headers=x}Y.prototype.get=function(x){return this._headers.get(x)};function ae(){}ae.prototype.open=function(x,S,k,E,F,O,j){var te=null,G=new f,V=G.signal,Q=new u;return c(F,{headers:j,credentials:O?"include":"same-origin",signal:V,cache:"no-store"}).then(function(P){return te=P.body.getReader(),S(P.status,P.statusText,P.headers.get("Content-Type"),new Y(P.headers)),new l(function(ne,et){var hn=function(){te.read().then(function(Fe){if(Fe.done)ne(void 0);else{var Ce=Q.decode(Fe.value,{stream:!0});k(Ce),hn()}}).catch(function(Fe){et(Fe)})};hn()})}).catch(function(P){if(P.name!=="AbortError")return P}).then(function(P){E(P)}),{abort:function(){te?.cancel(),G.abort()}}};function Z(){this._listeners=Object.create(null)}function ye(x){e(function(){throw x},0)}Z.prototype.dispatchEvent=function(x){x.target=this;var S=this._listeners[x.type];if(S!=null)for(var k=S.length,E=0;E<k;E+=1){var F=S[E];try{typeof F.handleEvent=="function"?F.handleEvent(x):F.call(this,x)}catch(O){ye(O)}}},Z.prototype.addEventListener=function(x,S){x=String(x);var k=this._listeners,E=k[x];E==null&&(E=[],k[x]=E);for(var F=!1,O=0;O<E.length;O+=1)E[O]===S&&(F=!0);F||E.push(S)},Z.prototype.removeEventListener=function(x,S){x=String(x);var k=this._listeners,E=k[x];if(E!=null){for(var F=[],O=0;O<E.length;O+=1)E[O]!==S&&F.push(E[O]);F.length===0?delete k[x]:k[x]=F}};function Le(x){this.type=x,this.target=void 0}function Nt(x,S){Le.call(this,x),this.data=S.data,this.lastEventId=S.lastEventId}Nt.prototype=Object.create(Le.prototype);function qe(x,S){Le.call(this,x),this.status=S.status,this.statusText=S.statusText,this.headers=S.headers}qe.prototype=Object.create(Le.prototype);function gt(x,S){Le.call(this,x),this.error=S.error}gt.prototype=Object.create(Le.prototype);var ce=-1,z=0,pe=1,T=2,A=-1,X=0,Te=1,ee=2,Ge=3,bt=/^text\/event\-stream(;.*)?$/i,Be=1e3,ke=18e6,qt=function(x,S){var k=x==null?S:parseInt(x,10);return k!==k&&(k=S),xt(k)},xt=function(x){return Math.min(Math.max(x,Be),ke)},re=function(x,S,k){try{typeof S=="function"&&S.call(x,k)}catch(E){ye(E)}};function We(x,S){Z.call(this),S=S||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,Yp(this,x,S)}function Xp(){return s!=null&&"withCredentials"in s.prototype||i==null?new s:new i}var Qp=c!=null&&p!=null&&"body"in p.prototype;function Yp(x,S,k){S=String(S);var E=!!k.withCredentials,F=k.lastEventIdQueryParameterName||"lastEventId",O=xt(1e3),j=qt(k.heartbeatTimeout,45e3),te="",G=O,V=!1,Q=0,P=k.headers||{},ne=k.Transport,et=Qp&&ne==null?void 0:new D(ne!=null?new ne:Xp()),hn=ne!=null&&typeof ne!="string"?new ne:et==null?new ae:new M,Fe=void 0,Ce=0,Ve=ce,Gt="",ss="",tt="",is="",Ee=X,ai=0,vt=0,Zp=function(fe,de,Pe,Me){if(Ve===z)if(fe===200&&Pe!=null&&bt.test(Pe)){Ve=pe,V=Date.now(),G=O,x.readyState=pe;var Se=new qe("open",{status:fe,statusText:de,headers:Me});x.dispatchEvent(Se),re(x,x.onopen,Se)}else{var ve="";fe!==200?(de&&(de=de.replace(/\s+/g," ")),ve="EventSource's response has a status "+fe+" "+de+" that is not 200. Aborting the connection."):ve="EventSource's response has a Content-Type specifying an unsupported type: "+(Pe==null?"-":Pe.replace(/\s+/g," "))+". Aborting the connection.",ri();var Se=new qe("error",{status:fe,statusText:de,headers:Me});x.dispatchEvent(Se),re(x,x.onerror,Se),console.error(ve)}},eu=function(fe){if(Ve===pe){for(var de=-1,Pe=0;Pe<fe.length;Pe+=1){var Me=fe.charCodeAt(Pe);(Me===10||Me===13)&&(de=Pe)}var Se=(de!==-1?is:"")+fe.slice(0,de+1);is=(de===-1?is:"")+fe.slice(de+1),fe!==""&&(V=Date.now(),Q+=fe.length);for(var ve=0;ve<Se.length;ve+=1){var Me=Se.charCodeAt(ve);if(Ee===A&&Me===10)Ee=X;else if(Ee===A&&(Ee=X),Me===13||Me===10){if(Ee!==X){Ee===Te&&(vt=ve+1);var nt=Se.slice(ai,vt-1),st=Se.slice(vt+(vt<ve&&Se.charCodeAt(vt)===32?1:0),ve);nt==="data"?(Gt+=`
14
+ `,Gt+=st):nt==="id"?ss=st:nt==="event"?tt=st:nt==="retry"?(O=qt(st,O),G=O):nt==="heartbeatTimeout"&&(j=qt(st,j),Ce!==0&&(t(Ce),Ce=e(function(){gn()},j)))}if(Ee===X){if(Gt!==""){te=ss,tt===""&&(tt="message");var Bt=new Nt(tt,{data:Gt.slice(1),lastEventId:ss});if(x.dispatchEvent(Bt),tt==="open"?re(x,x.onopen,Bt):tt==="message"?re(x,x.onmessage,Bt):tt==="error"&&re(x,x.onerror,Bt),Ve===T)return}Gt="",tt=""}Ee=Me===13?A:X}else Ee===X&&(ai=ve,Ee=Te),Ee===Te?Me===58&&(vt=ve+1,Ee=ee):Ee===ee&&(Ee=Ge)}}},nr=function(fe){if(Ve===pe||Ve===z){Ve=ce,Ce!==0&&(t(Ce),Ce=0),Ce=e(function(){gn()},G),G=xt(Math.min(O*16,G*2)),x.readyState=z;var de=new gt("error",{error:fe});x.dispatchEvent(de),re(x,x.onerror,de),fe!=null&&console.error(fe)}},ri=function(){Ve=T,Fe!=null&&(Fe.abort(),Fe=void 0),Ce!==0&&(t(Ce),Ce=0),x.readyState=T},gn=function(){if(Ce=0,Ve!==ce){if(!V&&Fe!=null)nr(new Error("No activity within "+j+" milliseconds. "+(Ve===z?"No response received.":Q+" chars received.")+" Reconnecting.")),Fe!=null&&(Fe.abort(),Fe=void 0);else{var fe=Math.max((V||Date.now())+j-Date.now(),1);V=!1,Ce=e(function(){gn()},fe)}return}V=!1,Q=0,Ce=e(function(){gn()},j),Ve=z,Gt="",tt="",ss=te,is="",ai=0,vt=0,Ee=X;var de=S;if(S.slice(0,5)!=="data:"&&S.slice(0,5)!=="blob:"&&te!==""){var Pe=S.indexOf("?");de=Pe===-1?S:S.slice(0,Pe+1)+S.slice(Pe+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(st,Bt){return Bt===F?"":st}),de+=(S.indexOf("?")===-1?"?":"&")+F+"="+encodeURIComponent(te)}var Me=x.withCredentials,Se={};Se.Accept="text/event-stream";var ve=x.headers;if(ve!=null)for(var nt in ve)Object.prototype.hasOwnProperty.call(ve,nt)&&(Se[nt]=ve[nt]);try{Fe=hn.open(et,Zp,eu,nr,de,Me,Se)}catch(st){throw ri(),st}};x.url=S,x.readyState=z,x.withCredentials=E,x.headers=P,x._close=ri,gn()}We.prototype=Object.create(Z.prototype),We.prototype.CONNECTING=z,We.prototype.OPEN=pe,We.prototype.CLOSED=T,We.prototype.close=function(){this._close()},We.CONNECTING=z,We.OPEN=pe,We.CLOSED=T,We.prototype.withCredentials=void 0;var tr=r;s!=null&&(r==null||!("withCredentials"in r.prototype))&&(tr=We),(function(x){if(typeof Ks=="object"&&typeof Ks.exports=="object"){var S=x(Wa);S!==void 0&&(Ks.exports=S)}else typeof define=="function"&&define.amd?define(["exports"],x):x(n)})(function(x){x.EventSourcePolyfill=We,x.NativeEventSource=r,x.EventSource=tr})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:Wa:globalThis)});var Qg={};oi(Qg,{CallAction:()=>Va,CallStatus:()=>Ha,CallType:()=>ze,Channel:()=>cn,ChannelState:()=>qn,ClientState:()=>ln,EVENT_MAP:()=>Cg,ErmisAuthProvider:()=>Za,ErmisCallNode:()=>Ya,ErmisChat:()=>Ja,ErrorFromResponse:()=>Mt,FRAME_TYPE:()=>Ka,StableWSConnection:()=>Xn,TokenManager:()=>Qn,buildAttachmentPayload:()=>qs,chatCodes:()=>mt,createForwardMessagePayload:()=>zl,formatMessage:()=>Gl,getAttachmentCategory:()=>xa,isHeicFile:()=>Wl,isVideoFile:()=>Ns,logChatPromiseExecution:()=>Ps,normalizeFileName:()=>Gn,parseSignalMessage:()=>Jp,parseSystemMessage:()=>Kp});function xn(n,e){return function(){return n.apply(e,arguments)}}var{toString:ou}=Object.prototype,{getPrototypeOf:li}=Object,{iterator:os,toStringTag:ar}=Symbol,cs=(n=>e=>{let t=ou.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),He=n=>(n=n.toLowerCase(),e=>cs(e)===n),ls=n=>e=>typeof e===n,{isArray:$t}=Array,vn=ls("undefined");function cu(n){return n!==null&&!vn(n)&&n.constructor!==null&&!vn(n.constructor)&&Ae(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}var rr=He("ArrayBuffer");function lu(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&rr(n.buffer),e}var pu=ls("string"),Ae=ls("function"),or=ls("number"),ps=n=>n!==null&&typeof n=="object",uu=n=>n===!0||n===!1,rs=n=>{if(cs(n)!=="object")return!1;let e=li(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ar in n)&&!(os in n)},du=He("Date"),mu=He("File"),fu=He("Blob"),hu=He("FileList"),gu=n=>ps(n)&&Ae(n.pipe),bu=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Ae(n.append)&&((e=cs(n))==="formdata"||e==="object"&&Ae(n.toString)&&n.toString()==="[object FormData]"))},xu=He("URLSearchParams"),[vu,_u,yu,wu]=["ReadableStream","Request","Response","Headers"].map(He),Cu=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _n(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let s,i;if(typeof n!="object"&&(n=[n]),$t(n))for(s=0,i=n.length;s<i;s++)e.call(null,n[s],s,n);else{let a=t?Object.getOwnPropertyNames(n):Object.keys(n),r=a.length,o;for(s=0;s<r;s++)o=a[s],e.call(null,n[o],o,n)}}function cr(n,e){e=e.toLowerCase();let t=Object.keys(n),s=t.length,i;for(;s-- >0;)if(i=t[s],e===i.toLowerCase())return i;return null}var _t=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lr=n=>!vn(n)&&n!==_t;function ci(){let{caseless:n}=lr(this)&&this||{},e={},t=(s,i)=>{let a=n&&cr(e,i)||i;rs(e[a])&&rs(s)?e[a]=ci(e[a],s):rs(s)?e[a]=ci({},s):$t(s)?e[a]=s.slice():e[a]=s};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&_n(arguments[s],t);return e}var Eu=(n,e,t,{allOwnKeys:s}={})=>(_n(e,(i,a)=>{t&&Ae(i)?n[a]=xn(i,t):n[a]=i},{allOwnKeys:s}),n),Su=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Ru=(n,e,t,s)=>{n.prototype=Object.create(e.prototype,s),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},Tu=(n,e,t,s)=>{let i,a,r,o={};if(e=e||{},n==null)return e;do{for(i=Object.getOwnPropertyNames(n),a=i.length;a-- >0;)r=i[a],(!s||s(r,n,e))&&!o[r]&&(e[r]=n[r],o[r]=!0);n=t!==!1&&li(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},ku=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;let s=n.indexOf(e,t);return s!==-1&&s===t},Au=n=>{if(!n)return null;if($t(n))return n;let e=n.length;if(!or(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},Iu=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&li(Uint8Array)),Du=(n,e)=>{let s=(n&&n[os]).call(n),i;for(;(i=s.next())&&!i.done;){let a=i.value;e.call(n,a[0],a[1])}},Ou=(n,e)=>{let t,s=[];for(;(t=n.exec(e))!==null;)s.push(t);return s},Uu=He("HTMLFormElement"),Lu=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,s,i){return s.toUpperCase()+i}),ir=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),Fu=He("RegExp"),pr=(n,e)=>{let t=Object.getOwnPropertyDescriptors(n),s={};_n(t,(i,a)=>{let r;(r=e(i,a,n))!==!1&&(s[a]=r||i)}),Object.defineProperties(n,s)},Pu=n=>{pr(n,(e,t)=>{if(Ae(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let s=n[t];if(Ae(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},Mu=(n,e)=>{let t={},s=i=>{i.forEach(a=>{t[a]=!0})};return $t(n)?s(n):s(String(n).split(e)),t},ju=()=>{},Nu=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function qu(n){return!!(n&&Ae(n.append)&&n[ar]==="FormData"&&n[os])}var Gu=n=>{let e=new Array(10),t=(s,i)=>{if(ps(s)){if(e.indexOf(s)>=0)return;if(!("toJSON"in s)){e[i]=s;let a=$t(s)?[]:{};return _n(s,(r,o)=>{let l=t(r,i+1);!vn(l)&&(a[o]=l)}),e[i]=void 0,a}}return s};return t(n,0)},Bu=He("AsyncFunction"),$u=n=>n&&(ps(n)||Ae(n))&&Ae(n.then)&&Ae(n.catch),ur=((n,e)=>n?setImmediate:e?((t,s)=>(_t.addEventListener("message",({source:i,data:a})=>{i===_t&&a===t&&s.length&&s.shift()()},!1),i=>{s.push(i),_t.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Ae(_t.postMessage)),zu=typeof queueMicrotask<"u"?queueMicrotask.bind(_t):typeof process<"u"&&process.nextTick||ur,Wu=n=>n!=null&&Ae(n[os]),d={isArray:$t,isArrayBuffer:rr,isBuffer:cu,isFormData:bu,isArrayBufferView:lu,isString:pu,isNumber:or,isBoolean:uu,isObject:ps,isPlainObject:rs,isReadableStream:vu,isRequest:_u,isResponse:yu,isHeaders:wu,isUndefined:vn,isDate:du,isFile:mu,isBlob:fu,isRegExp:Fu,isFunction:Ae,isStream:gu,isURLSearchParams:xu,isTypedArray:Iu,isFileList:hu,forEach:_n,merge:ci,extend:Eu,trim:Cu,stripBOM:Su,inherits:Ru,toFlatObject:Tu,kindOf:cs,kindOfTest:He,endsWith:ku,toArray:Au,forEachEntry:Du,matchAll:Ou,isHTMLForm:Uu,hasOwnProperty:ir,hasOwnProp:ir,reduceDescriptors:pr,freezeMethods:Pu,toObjectSet:Mu,toCamelCase:Lu,noop:ju,toFiniteNumber:Nu,findKey:cr,global:_t,isContextDefined:lr,isSpecCompliantForm:qu,toJSONObject:Gu,isAsyncFn:Bu,isThenable:$u,setImmediate:ur,asap:zu,isIterable:Wu};function zt(n,e,t,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),s&&(this.request=s),i&&(this.response=i,this.status=i.status?i.status:null)}d.inherits(zt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});var dr=zt.prototype,mr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{mr[n]={value:n}});Object.defineProperties(zt,mr);Object.defineProperty(dr,"isAxiosError",{value:!0});zt.from=(n,e,t,s,i,a)=>{let r=Object.create(dr);return d.toFlatObject(n,r,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),zt.call(r,n.message,e,t,s,i),r.cause=n,r.name=n.name,a&&Object.assign(r,a),r};var C=zt;var bc=Re(Ai(),1),ys=bc.default;function Ii(n){return d.isPlainObject(n)||d.isArray(n)}function vc(n){return d.endsWith(n,"[]")?n.slice(0,-2):n}function xc(n,e,t){return n?n.concat(e).map(function(i,a){return i=vc(i),!t&&a?"["+i+"]":i}).join(t?".":""):e}function Im(n){return d.isArray(n)&&!n.some(Ii)}var Dm=d.toFlatObject(d,{},null,function(e){return/^is[A-Z]/.test(e)});function Om(n,e,t){if(!d.isObject(n))throw new TypeError("target must be an object");e=e||new(ys||FormData),t=d.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,_){return!d.isUndefined(_[v])});let s=t.metaTokens,i=t.visitor||p,a=t.dots,r=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(e);if(!d.isFunction(i))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(d.isDate(g))return g.toISOString();if(d.isBoolean(g))return g.toString();if(!l&&d.isBlob(g))throw new C("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(g)||d.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function p(g,v,_){let R=g;if(g&&!_&&typeof g=="object"){if(d.endsWith(v,"{}"))v=s?v:v.slice(0,-2),g=JSON.stringify(g);else if(d.isArray(g)&&Im(g)||(d.isFileList(g)||d.endsWith(v,"[]"))&&(R=d.toArray(g)))return v=vc(v),R.forEach(function(L,q){!(d.isUndefined(L)||L===null)&&e.append(r===!0?xc([v],q,a):r===null?v:v+"[]",c(L))}),!1}return Ii(g)?!0:(e.append(xc(_,v,a),c(g)),!1)}let u=[],m=Object.assign(Dm,{defaultVisitor:p,convertValue:c,isVisitable:Ii});function f(g,v){if(!d.isUndefined(g)){if(u.indexOf(g)!==-1)throw Error("Circular reference detected in "+v.join("."));u.push(g),d.forEach(g,function(R,D){(!(d.isUndefined(R)||R===null)&&i.call(e,R,d.isString(D)?D.trim():D,v,m))===!0&&f(R,v?v.concat(D):[D])}),u.pop()}}if(!d.isObject(n))throw new TypeError("data must be an object");return f(n),e}var dt=Om;function _c(n){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function yc(n,e){this._pairs=[],n&&dt(n,this,e)}var wc=yc.prototype;wc.append=function(e,t){this._pairs.push([e,t])};wc.toString=function(e){let t=e?function(s){return e.call(this,s,_c)}:_c;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};var Cc=yc;function Um(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ct(n,e,t){if(!e)return n;let s=t&&t.encode||Um;d.isFunction(t)&&(t={serialize:t});let i=t&&t.serialize,a;if(i?a=i(e,t):a=d.isURLSearchParams(e)?e.toString():new Cc(e,t).toString(s),a){let r=n.indexOf("#");r!==-1&&(n=n.slice(0,r)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}var Di=class{constructor(){this.handlers=[]}use(e,t,s){return this.handlers.push({fulfilled:e,rejected:t,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){d.forEach(this.handlers,function(s){s!==null&&e(s)})}},Oi=Di;var Jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Tc=Re(I("crypto"),1);var Ec=Re(I("url"),1),Sc=Ec.default.URLSearchParams;var Ui="abcdefghijklmnopqrstuvwxyz",Rc="0123456789",kc={DIGIT:Rc,ALPHA:Ui,ALPHA_DIGIT:Ui+Ui.toUpperCase()+Rc},Lm=(n=16,e=kc.ALPHA_DIGIT)=>{let t="",{length:s}=e,i=new Uint32Array(n);Tc.default.randomFillSync(i);for(let a=0;a<n;a++)t+=e[i[a]%s];return t},Ac={isNode:!0,classes:{URLSearchParams:Sc,FormData:ys,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:kc,generateString:Lm,protocols:["http","https","file","data"]};var Pi={};oi(Pi,{hasBrowserEnv:()=>Fi,hasStandardBrowserEnv:()=>Fm,hasStandardBrowserWebWorkerEnv:()=>Pm,navigator:()=>Li,origin:()=>Mm});var Fi=typeof window<"u"&&typeof document<"u",Li=typeof navigator=="object"&&navigator||void 0,Fm=Fi&&(!Li||["ReactNative","NativeScript","NS"].indexOf(Li.product)<0),Pm=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Mm=Fi&&window.location.href||"http://localhost";var $={...Pi,...Ac};function Mi(n,e){return dt(n,new $.classes.URLSearchParams,Object.assign({visitor:function(t,s,i,a){return $.isNode&&d.isBuffer(t)?(this.append(s,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function jm(n){return d.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Nm(n){let e={},t=Object.keys(n),s,i=t.length,a;for(s=0;s<i;s++)a=t[s],e[a]=n[a];return e}function qm(n){function e(t,s,i,a){let r=t[a++];if(r==="__proto__")return!0;let o=Number.isFinite(+r),l=a>=t.length;return r=!r&&d.isArray(i)?i.length:r,l?(d.hasOwnProp(i,r)?i[r]=[i[r],s]:i[r]=s,!o):((!i[r]||!d.isObject(i[r]))&&(i[r]=[]),e(t,s,i[r],a)&&d.isArray(i[r])&&(i[r]=Nm(i[r])),!o)}if(d.isFormData(n)&&d.isFunction(n.entries)){let t={};return d.forEachEntry(n,(s,i)=>{e(jm(s),i,t,0)}),t}return null}var ws=qm;function Gm(n,e,t){if(d.isString(n))try{return(e||JSON.parse)(n),d.trim(n)}catch(s){if(s.name!=="SyntaxError")throw s}return(t||JSON.stringify)(n)}var ji={transitional:Jt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let s=t.getContentType()||"",i=s.indexOf("application/json")>-1,a=d.isObject(e);if(a&&d.isHTMLForm(e)&&(e=new FormData(e)),d.isFormData(e))return i?JSON.stringify(ws(e)):e;if(d.isArrayBuffer(e)||d.isBuffer(e)||d.isStream(e)||d.isFile(e)||d.isBlob(e)||d.isReadableStream(e))return e;if(d.isArrayBufferView(e))return e.buffer;if(d.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Mi(e,this.formSerializer).toString();if((o=d.isFileList(e))||s.indexOf("multipart/form-data")>-1){let l=this.env&&this.env.FormData;return dt(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return a||i?(t.setContentType("application/json",!1),Gm(e)):e}],transformResponse:[function(e){let t=this.transitional||ji.transitional,s=t&&t.forcedJSONParsing,i=this.responseType==="json";if(d.isResponse(e)||d.isReadableStream(e))return e;if(e&&d.isString(e)&&(s&&!this.responseType||i)){let r=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(o){if(r)throw o.name==="SyntaxError"?C.from(o,C.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$.classes.FormData,Blob:$.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],n=>{ji.headers[n]={}});var Xt=ji;var Bm=d.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ic=n=>{let e={},t,s,i;return n&&n.split(`
15
+ `).forEach(function(r){i=r.indexOf(":"),t=r.substring(0,i).trim().toLowerCase(),s=r.substring(i+1).trim(),!(!t||e[t]&&Bm[t])&&(t==="set-cookie"?e[t]?e[t].push(s):e[t]=[s]:e[t]=e[t]?e[t]+", "+s:s)}),e};var Dc=Symbol("internals");function Rn(n){return n&&String(n).trim().toLowerCase()}function Cs(n){return n===!1||n==null?n:d.isArray(n)?n.map(Cs):String(n)}function $m(n){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,s;for(;s=t.exec(n);)e[s[1]]=s[2];return e}var zm=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Ni(n,e,t,s,i){if(d.isFunction(s))return s.call(this,e,t);if(i&&(e=t),!!d.isString(e)){if(d.isString(s))return e.indexOf(s)!==-1;if(d.isRegExp(s))return s.test(e)}}function Wm(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,s)=>t.toUpperCase()+s)}function Vm(n,e){let t=d.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(n,s+t,{value:function(i,a,r){return this[s].call(this,e,i,a,r)},configurable:!0})})}var Qt=class{constructor(e){e&&this.set(e)}set(e,t,s){let i=this;function a(o,l,c){let p=Rn(l);if(!p)throw new Error("header name must be a non-empty string");let u=d.findKey(i,p);(!u||i[u]===void 0||c===!0||c===void 0&&i[u]!==!1)&&(i[u||l]=Cs(o))}let r=(o,l)=>d.forEach(o,(c,p)=>a(c,p,l));if(d.isPlainObject(e)||e instanceof this.constructor)r(e,t);else if(d.isString(e)&&(e=e.trim())&&!zm(e))r(Ic(e),t);else if(d.isObject(e)&&d.isIterable(e)){let o={},l,c;for(let p of e){if(!d.isArray(p))throw TypeError("Object iterator must return a key-value pair");o[c=p[0]]=(l=o[c])?d.isArray(l)?[...l,p[1]]:[l,p[1]]:p[1]}r(o,t)}else e!=null&&a(t,e,s);return this}get(e,t){if(e=Rn(e),e){let s=d.findKey(this,e);if(s){let i=this[s];if(!t)return i;if(t===!0)return $m(i);if(d.isFunction(t))return t.call(this,i,s);if(d.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Rn(e),e){let s=d.findKey(this,e);return!!(s&&this[s]!==void 0&&(!t||Ni(this,this[s],s,t)))}return!1}delete(e,t){let s=this,i=!1;function a(r){if(r=Rn(r),r){let o=d.findKey(s,r);o&&(!t||Ni(s,s[o],o,t))&&(delete s[o],i=!0)}}return d.isArray(e)?e.forEach(a):a(e),i}clear(e){let t=Object.keys(this),s=t.length,i=!1;for(;s--;){let a=t[s];(!e||Ni(this,this[a],a,e,!0))&&(delete this[a],i=!0)}return i}normalize(e){let t=this,s={};return d.forEach(this,(i,a)=>{let r=d.findKey(s,a);if(r){t[r]=Cs(i),delete t[a];return}let o=e?Wm(a):String(a).trim();o!==a&&delete t[a],t[o]=Cs(i),s[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return d.forEach(this,(s,i)=>{s!=null&&s!==!1&&(t[i]=e&&d.isArray(s)?s.join(", "):s)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
16
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let s=new this(e);return t.forEach(i=>s.set(i)),s}static accessor(e){let s=(this[Dc]=this[Dc]={accessors:{}}).accessors,i=this.prototype;function a(r){let o=Rn(r);s[o]||(Vm(i,r),s[o]=!0)}return d.isArray(e)?e.forEach(a):a(e),this}};Qt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(Qt.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(s){this[t]=s}}});d.freezeMethods(Qt);var se=Qt;function Tn(n,e){let t=this||Xt,s=e||t,i=se.from(s.headers),a=s.data;return d.forEach(n,function(o){a=o.call(t,a,i.normalize(),e?e.status:void 0)}),i.normalize(),a}function kn(n){return!!(n&&n.__CANCEL__)}function Oc(n,e,t){C.call(this,n??"canceled",C.ERR_CANCELED,e,t),this.name="CanceledError"}d.inherits(Oc,C,{__CANCEL__:!0});var je=Oc;function Xe(n,e,t){let s=t.config.validateStatus;!t.status||!s||s(t.status)?n(t):e(new C("Request failed with status code "+t.status,[C.ERR_BAD_REQUEST,C.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function qi(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Gi(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function Et(n,e,t){let s=!qi(e);return n&&(s||t==!1)?Gi(n,e):e}var hl=Re(Lc(),1),gl=Re(I("http"),1);pt();var bl=Re(I("util"),1),xl=Re(Zc(),1),at=Re(I("zlib"),1);var kt="1.10.0";function Un(n){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}var Lf=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function sa(n,e,t){let s=t&&t.Blob||$.classes.Blob,i=Un(n);if(e===void 0&&s&&(e=!0),i==="data"){n=i.length?n.slice(i.length+1):n;let a=Lf.exec(n);if(!a)throw new C("Invalid URL",C.ERR_INVALID_URL);let r=a[1],o=a[2],l=a[3],c=Buffer.from(decodeURIComponent(l),o?"base64":"utf8");if(e){if(!s)throw new C("Blob is not supported",C.ERR_NOT_SUPPORT);return new s([c],{type:r})}return c}throw new C("Unsupported protocol "+i,C.ERR_NOT_SUPPORT)}var It=Re(I("stream"),1);var el=Re(I("stream"),1);var ia=Symbol("internals"),aa=class extends el.default.Transform{constructor(e){e=d.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(s,i)=>!d.isUndefined(i[s])),super({readableHighWaterMark:e.chunkSize});let t=this[ia]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",s=>{s==="progress"&&(t.isCaptured||(t.isCaptured=!0))})}_read(e){let t=this[ia];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,s){let i=this[ia],a=i.maxRate,r=this.readableHighWaterMark,o=i.timeWindow,l=1e3/o,c=a/l,p=i.minChunkSize!==!1?Math.max(i.minChunkSize,c*.01):0,u=(f,g)=>{let v=Buffer.byteLength(f);i.bytesSeen+=v,i.bytes+=v,i.isCaptured&&this.emit("progress",i.bytesSeen),this.push(f)?process.nextTick(g):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(g)}},m=(f,g)=>{let v=Buffer.byteLength(f),_=null,R=r,D,L=0;if(a){let q=Date.now();(!i.ts||(L=q-i.ts)>=o)&&(i.ts=q,D=c-i.bytes,i.bytes=D<0?-D:0,L=0),D=c-i.bytes}if(a){if(D<=0)return setTimeout(()=>{g(null,f)},o-L);D<R&&(R=D)}R&&v>R&&v-R>p&&(_=f.subarray(R),f=f.subarray(0,R)),u(f,_?()=>{process.nextTick(g,null,_)}:g)};m(e,function f(g,v){if(g)return s(g);v?m(v,f):s(null)})}},ra=aa;var vl=I("events");var nl=Re(I("util"),1),sl=I("stream");var{asyncIterator:tl}=Symbol,Ff=async function*(n){n.stream?yield*n.stream():n.arrayBuffer?yield await n.arrayBuffer():n[tl]?yield*n[tl]():yield n},As=Ff;var Pf=$.ALPHABET.ALPHA_DIGIT+"-_",Ln=typeof TextEncoder=="function"?new TextEncoder:new nl.default.TextEncoder,At=`\r
17
+ `,Mf=Ln.encode(At),jf=2,oa=class{constructor(e,t){let{escapeName:s}=this.constructor,i=d.isString(t),a=`Content-Disposition: form-data; name="${s(e)}"${!i&&t.name?`; filename="${s(t.name)}"`:""}${At}`;i?t=Ln.encode(String(t).replace(/\r?\n|\r\n?/g,At)):a+=`Content-Type: ${t.type||"application/octet-stream"}${At}`,this.headers=Ln.encode(a+At),this.contentLength=i?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+jf,this.name=e,this.value=t}async*encode(){yield this.headers;let{value:e}=this;d.isTypedArray(e)?yield e:yield*As(e),yield Mf}static escapeName(e){return String(e).replace(/[\r\n"]/g,t=>({"\r":"%0D","\n":"%0A",'"':"%22"})[t])}},Nf=(n,e,t)=>{let{tag:s="form-data-boundary",size:i=25,boundary:a=s+"-"+$.generateString(i,Pf)}=t||{};if(!d.isFormData(n))throw TypeError("FormData instance required");if(a.length<1||a.length>70)throw Error("boundary must be 10-70 characters long");let r=Ln.encode("--"+a+At),o=Ln.encode("--"+a+"--"+At),l=o.byteLength,c=Array.from(n.entries()).map(([u,m])=>{let f=new oa(u,m);return l+=f.size,f});l+=r.byteLength*c.length,l=d.toFiniteNumber(l);let p={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(l)&&(p["Content-Length"]=l),e&&e(p),sl.Readable.from((async function*(){for(let u of c)yield r,yield*u.encode();yield o})())},il=Nf;var al=Re(I("stream"),1),ca=class extends al.default.Transform{__transform(e,t,s){this.push(e),s()}_transform(e,t,s){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,t)}this.__transform(e,t,s)}},rl=ca;var qf=(n,e)=>d.isAsyncFn(n)?function(...t){let s=t.pop();n.apply(this,t).then(i=>{try{e?s(null,...e(i)):s(null,i)}catch(a){s(a)}},s)}:n,ol=qf;function Gf(n,e){n=n||10;let t=new Array(n),s=new Array(n),i=0,a=0,r;return e=e!==void 0?e:1e3,function(l){let c=Date.now(),p=s[a];r||(r=c),t[i]=l,s[i]=c;let u=a,m=0;for(;u!==i;)m+=t[u++],u=u%n;if(i=(i+1)%n,i===a&&(a=(a+1)%n),c-r<e)return;let f=p&&c-p;return f?Math.round(m*1e3/f):void 0}}var cl=Gf;function Bf(n,e){let t=0,s=1e3/e,i,a,r=(c,p=Date.now())=>{t=p,i=null,a&&(clearTimeout(a),a=null),n.apply(null,c)};return[(...c)=>{let p=Date.now(),u=p-t;u>=s?r(c,p):(i=c,a||(a=setTimeout(()=>{a=null,r(i)},s-u)))},()=>i&&r(i)]}var ll=Bf;var it=(n,e,t=3)=>{let s=0,i=cl(50,250);return ll(a=>{let r=a.loaded,o=a.lengthComputable?a.total:void 0,l=r-s,c=i(l),p=r<=o;s=r;let u={loaded:r,total:o,progress:o?r/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o&&p?(o-r)/c:void 0,event:a,lengthComputable:o!=null,[e?"download":"upload"]:!0};n(u)},t)},nn=(n,e)=>{let t=n!=null;return[s=>e[0]({lengthComputable:t,total:n,loaded:s}),e[1]]},sn=n=>(...e)=>d.asap(()=>n(...e));var pl={flush:at.default.constants.Z_SYNC_FLUSH,finishFlush:at.default.constants.Z_SYNC_FLUSH},$f={flush:at.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:at.default.constants.BROTLI_OPERATION_FLUSH},ul=d.isFunction(at.default.createBrotliDecompress),{http:zf,https:Wf}=xl.default,Vf=/https:?/,dl=$.protocols.map(n=>n+":"),ml=(n,[e,t])=>(n.on("end",t).on("error",t),e);function Hf(n,e){n.beforeRedirects.proxy&&n.beforeRedirects.proxy(n),n.beforeRedirects.config&&n.beforeRedirects.config(n,e)}function _l(n,e,t){let s=e;if(!s&&s!==!1){let i=hl.default.getProxyForUrl(t);i&&(s=new URL(i))}if(s){if(s.username&&(s.auth=(s.username||"")+":"+(s.password||"")),s.auth){(s.auth.username||s.auth.password)&&(s.auth=(s.auth.username||"")+":"+(s.auth.password||""));let a=Buffer.from(s.auth,"utf8").toString("base64");n.headers["Proxy-Authorization"]="Basic "+a}n.headers.host=n.hostname+(n.port?":"+n.port:"");let i=s.hostname||s.host;n.hostname=i,n.host=i,n.port=s.port,n.path=t,s.protocol&&(n.protocol=s.protocol.includes(":")?s.protocol:`${s.protocol}:`)}n.beforeRedirects.proxy=function(a){_l(a,e,a.href)}}var Kf=typeof process<"u"&&d.kindOf(process)==="process",Jf=n=>new Promise((e,t)=>{let s,i,a=(l,c)=>{i||(i=!0,s&&s(l,c))},r=l=>{a(l),e(l)},o=l=>{a(l,!0),t(l)};n(r,o,l=>s=l).catch(o)}),Xf=({address:n,family:e})=>{if(!d.isString(n))throw TypeError("address must be a string");return{address:n,family:e||(n.indexOf(".")<0?6:4)}},fl=(n,e)=>Xf(d.isObject(n)?n:{address:n,family:e}),yl=Kf&&function(e){return Jf(async function(s,i,a){let{data:r,lookup:o,family:l}=e,{responseType:c,responseEncoding:p}=e,u=e.method.toUpperCase(),m,f=!1,g;if(o){let T=ol(o,A=>d.isArray(A)?A:[A]);o=(A,X,Te)=>{T(A,X,(ee,Ge,bt)=>{if(ee)return Te(ee);let Be=d.isArray(Ge)?Ge.map(ke=>fl(ke)):[fl(Ge,bt)];X.all?Te(ee,Be):Te(ee,Be[0].address,Be[0].family)})}}let v=new vl.EventEmitter,_=()=>{e.cancelToken&&e.cancelToken.unsubscribe(R),e.signal&&e.signal.removeEventListener("abort",R),v.removeAllListeners()};a((T,A)=>{m=!0,A&&(f=!0,_())});function R(T){v.emit("abort",!T||T.type?new je(null,e,g):T)}v.once("abort",i),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(R),e.signal&&(e.signal.aborted?R():e.signal.addEventListener("abort",R)));let D=Et(e.baseURL,e.url,e.allowAbsoluteUrls),L=new URL(D,$.hasBrowserEnv?$.origin:void 0),q=L.protocol||dl[0];if(q==="data:"){let T;if(u!=="GET")return Xe(s,i,{status:405,statusText:"method not allowed",headers:{},config:e});try{T=sa(e.url,c==="blob",{Blob:e.env&&e.env.Blob})}catch(A){throw C.from(A,C.ERR_BAD_REQUEST,e)}return c==="text"?(T=T.toString(p),(!p||p==="utf8")&&(T=d.stripBOM(T))):c==="stream"&&(T=It.default.Readable.from(T)),Xe(s,i,{data:T,status:200,statusText:"OK",headers:new se,config:e})}if(dl.indexOf(q)===-1)return i(new C("Unsupported protocol "+q,C.ERR_BAD_REQUEST,e));let M=se.from(e.headers).normalize();M.set("User-Agent","axios/"+kt,!1);let{onUploadProgress:Y,onDownloadProgress:ae}=e,Z=e.maxRate,ye,Le;if(d.isSpecCompliantForm(r)){let T=M.getContentType(/boundary=([-_\w\d]{10,70})/i);r=il(r,A=>{M.set(A)},{tag:`axios-${kt}-boundary`,boundary:T&&T[1]||void 0})}else if(d.isFormData(r)&&d.isFunction(r.getHeaders)){if(M.set(r.getHeaders()),!M.hasContentLength())try{let T=await bl.default.promisify(r.getLength).call(r);Number.isFinite(T)&&T>=0&&M.setContentLength(T)}catch{}}else if(d.isBlob(r)||d.isFile(r))r.size&&M.setContentType(r.type||"application/octet-stream"),M.setContentLength(r.size||0),r=It.default.Readable.from(As(r));else if(r&&!d.isStream(r)){if(!Buffer.isBuffer(r))if(d.isArrayBuffer(r))r=Buffer.from(new Uint8Array(r));else if(d.isString(r))r=Buffer.from(r,"utf-8");else return i(new C("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",C.ERR_BAD_REQUEST,e));if(M.setContentLength(r.length,!1),e.maxBodyLength>-1&&r.length>e.maxBodyLength)return i(new C("Request body larger than maxBodyLength limit",C.ERR_BAD_REQUEST,e))}let Nt=d.toFiniteNumber(M.getContentLength());d.isArray(Z)?(ye=Z[0],Le=Z[1]):ye=Le=Z,r&&(Y||ye)&&(d.isStream(r)||(r=It.default.Readable.from(r,{objectMode:!1})),r=It.default.pipeline([r,new ra({maxRate:d.toFiniteNumber(ye)})],d.noop),Y&&r.on("progress",ml(r,nn(Nt,it(sn(Y),!1,3)))));let qe;if(e.auth){let T=e.auth.username||"",A=e.auth.password||"";qe=T+":"+A}if(!qe&&L.username){let T=L.username,A=L.password;qe=T+":"+A}qe&&M.delete("authorization");let gt;try{gt=Ct(L.pathname+L.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(T){let A=new Error(T.message);return A.config=e,A.url=e.url,A.exists=!0,i(A)}M.set("Accept-Encoding","gzip, compress, deflate"+(ul?", br":""),!1);let ce={path:gt,method:u,headers:M.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:qe,protocol:q,family:l,beforeRedirect:Hf,beforeRedirects:{}};!d.isUndefined(o)&&(ce.lookup=o),e.socketPath?ce.socketPath=e.socketPath:(ce.hostname=L.hostname.startsWith("[")?L.hostname.slice(1,-1):L.hostname,ce.port=L.port,_l(ce,e.proxy,q+"//"+L.hostname+(L.port?":"+L.port:"")+ce.path));let z,pe=Vf.test(ce.protocol);if(ce.agent=pe?e.httpsAgent:e.httpAgent,e.transport?z=e.transport:e.maxRedirects===0?z=pe?yt:gl.default:(e.maxRedirects&&(ce.maxRedirects=e.maxRedirects),e.beforeRedirect&&(ce.beforeRedirects.config=e.beforeRedirect),z=pe?Wf:zf),e.maxBodyLength>-1?ce.maxBodyLength=e.maxBodyLength:ce.maxBodyLength=1/0,e.insecureHTTPParser&&(ce.insecureHTTPParser=e.insecureHTTPParser),g=z.request(ce,function(A){if(g.destroyed)return;let X=[A],Te=+A.headers["content-length"];if(ae||Le){let ke=new ra({maxRate:d.toFiniteNumber(Le)});ae&&ke.on("progress",ml(ke,nn(Te,it(sn(ae),!0,3)))),X.push(ke)}let ee=A,Ge=A.req||g;if(e.decompress!==!1&&A.headers["content-encoding"])switch((u==="HEAD"||A.statusCode===204)&&delete A.headers["content-encoding"],(A.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":X.push(at.default.createUnzip(pl)),delete A.headers["content-encoding"];break;case"deflate":X.push(new rl),X.push(at.default.createUnzip(pl)),delete A.headers["content-encoding"];break;case"br":ul&&(X.push(at.default.createBrotliDecompress($f)),delete A.headers["content-encoding"])}ee=X.length>1?It.default.pipeline(X,d.noop):X[0];let bt=It.default.finished(ee,()=>{bt(),_()}),Be={status:A.statusCode,statusText:A.statusMessage,headers:new se(A.headers),config:e,request:Ge};if(c==="stream")Be.data=ee,Xe(s,i,Be);else{let ke=[],qt=0;ee.on("data",function(re){ke.push(re),qt+=re.length,e.maxContentLength>-1&&qt>e.maxContentLength&&(f=!0,ee.destroy(),i(new C("maxContentLength size of "+e.maxContentLength+" exceeded",C.ERR_BAD_RESPONSE,e,Ge)))}),ee.on("aborted",function(){if(f)return;let re=new C("stream has been aborted",C.ERR_BAD_RESPONSE,e,Ge);ee.destroy(re),i(re)}),ee.on("error",function(re){g.destroyed||i(C.from(re,null,e,Ge))}),ee.on("end",function(){try{let re=ke.length===1?ke[0]:Buffer.concat(ke);c!=="arraybuffer"&&(re=re.toString(p),(!p||p==="utf8")&&(re=d.stripBOM(re))),Be.data=re}catch(re){return i(C.from(re,null,e,Be.request,Be))}Xe(s,i,Be)})}v.once("abort",ke=>{ee.destroyed||(ee.emit("error",ke),ee.destroy())})}),v.once("abort",T=>{i(T),g.destroy(T)}),g.on("error",function(A){i(C.from(A,null,e,g))}),g.on("socket",function(A){A.setKeepAlive(!0,1e3*60)}),e.timeout){let T=parseInt(e.timeout,10);if(Number.isNaN(T)){i(new C("error trying to parse `config.timeout` to int",C.ERR_BAD_OPTION_VALUE,e,g));return}g.setTimeout(T,function(){if(m)return;let X=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",Te=e.transitional||Jt;e.timeoutErrorMessage&&(X=e.timeoutErrorMessage),i(new C(X,Te.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,e,g)),R()})}if(d.isStream(r)){let T=!1,A=!1;r.on("end",()=>{T=!0}),r.once("error",X=>{A=!0,g.destroy(X)}),r.on("close",()=>{!T&&!A&&R(new je("Request stream has been aborted",e,g))}),r.pipe(g)}else g.end(r)})};var wl=$.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,$.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL($.origin),$.navigator&&/(msie|trident)/i.test($.navigator.userAgent)):()=>!0;var Cl=$.hasStandardBrowserEnv?{write(n,e,t,s,i,a){let r=[n+"="+encodeURIComponent(e)];d.isNumber(t)&&r.push("expires="+new Date(t).toGMTString()),d.isString(s)&&r.push("path="+s),d.isString(i)&&r.push("domain="+i),a===!0&&r.push("secure"),document.cookie=r.join("; ")},read(n){let e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var El=n=>n instanceof se?{...n}:n;function Je(n,e){e=e||{};let t={};function s(c,p,u,m){return d.isPlainObject(c)&&d.isPlainObject(p)?d.merge.call({caseless:m},c,p):d.isPlainObject(p)?d.merge({},p):d.isArray(p)?p.slice():p}function i(c,p,u,m){if(d.isUndefined(p)){if(!d.isUndefined(c))return s(void 0,c,u,m)}else return s(c,p,u,m)}function a(c,p){if(!d.isUndefined(p))return s(void 0,p)}function r(c,p){if(d.isUndefined(p)){if(!d.isUndefined(c))return s(void 0,c)}else return s(void 0,p)}function o(c,p,u){if(u in e)return s(c,p);if(u in n)return s(void 0,c)}let l={url:a,method:a,data:a,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:o,headers:(c,p,u)=>i(El(c),El(p),u,!0)};return d.forEach(Object.keys(Object.assign({},n,e)),function(p){let u=l[p]||i,m=u(n[p],e[p],p);d.isUndefined(m)&&u!==o||(t[p]=m)}),t}var Is=n=>{let e=Je({},n),{data:t,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:a,headers:r,auth:o}=e;e.headers=r=se.from(r),e.url=Ct(Et(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),o&&r.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let l;if(d.isFormData(t)){if($.hasStandardBrowserEnv||$.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if((l=r.getContentType())!==!1){let[c,...p]=l?l.split(";").map(u=>u.trim()).filter(Boolean):[];r.setContentType([c||"multipart/form-data",...p].join("; "))}}if($.hasStandardBrowserEnv&&(s&&d.isFunction(s)&&(s=s(e)),s||s!==!1&&wl(e.url))){let c=i&&a&&Cl.read(a);c&&r.set(i,c)}return e};var Qf=typeof XMLHttpRequest<"u",Sl=Qf&&function(n){return new Promise(function(t,s){let i=Is(n),a=i.data,r=se.from(i.headers).normalize(),{responseType:o,onUploadProgress:l,onDownloadProgress:c}=i,p,u,m,f,g;function v(){f&&f(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let _=new XMLHttpRequest;_.open(i.method.toUpperCase(),i.url,!0),_.timeout=i.timeout;function R(){if(!_)return;let L=se.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),M={data:!o||o==="text"||o==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:L,config:n,request:_};Xe(function(ae){t(ae),v()},function(ae){s(ae),v()},M),_=null}"onloadend"in _?_.onloadend=R:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(R)},_.onabort=function(){_&&(s(new C("Request aborted",C.ECONNABORTED,n,_)),_=null)},_.onerror=function(){s(new C("Network Error",C.ERR_NETWORK,n,_)),_=null},_.ontimeout=function(){let q=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",M=i.transitional||Jt;i.timeoutErrorMessage&&(q=i.timeoutErrorMessage),s(new C(q,M.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,n,_)),_=null},a===void 0&&r.setContentType(null),"setRequestHeader"in _&&d.forEach(r.toJSON(),function(q,M){_.setRequestHeader(M,q)}),d.isUndefined(i.withCredentials)||(_.withCredentials=!!i.withCredentials),o&&o!=="json"&&(_.responseType=i.responseType),c&&([m,g]=it(c,!0),_.addEventListener("progress",m)),l&&_.upload&&([u,f]=it(l),_.upload.addEventListener("progress",u),_.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(p=L=>{_&&(s(!L||L.type?new je(null,n,_):L),_.abort(),_=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));let D=Un(i.url);if(D&&$.protocols.indexOf(D)===-1){s(new C("Unsupported protocol "+D+":",C.ERR_BAD_REQUEST,n));return}_.send(a||null)})};var Yf=(n,e)=>{let{length:t}=n=n?n.filter(Boolean):[];if(e||t){let s=new AbortController,i,a=function(c){if(!i){i=!0,o();let p=c instanceof Error?c:this.reason;s.abort(p instanceof C?p:new je(p instanceof Error?p.message:p))}},r=e&&setTimeout(()=>{r=null,a(new C(`timeout ${e} of ms exceeded`,C.ETIMEDOUT))},e),o=()=>{n&&(r&&clearTimeout(r),r=null,n.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),n=null)};n.forEach(c=>c.addEventListener("abort",a));let{signal:l}=s;return l.unsubscribe=()=>d.asap(o),l}},Rl=Yf;var Zf=function*(n,e){let t=n.byteLength;if(!e||t<e){yield n;return}let s=0,i;for(;s<t;)i=s+e,yield n.slice(s,i),s=i},eh=async function*(n,e){for await(let t of th(n))yield*Zf(t,e)},th=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}let e=n.getReader();try{for(;;){let{done:t,value:s}=await e.read();if(t)break;yield s}}finally{await e.cancel()}},la=(n,e,t,s)=>{let i=eh(n,e),a=0,r,o=l=>{r||(r=!0,s&&s(l))};return new ReadableStream({async pull(l){try{let{done:c,value:p}=await i.next();if(c){o(),l.close();return}let u=p.byteLength;if(t){let m=a+=u;t(m)}l.enqueue(new Uint8Array(p))}catch(c){throw o(c),c}},cancel(l){return o(l),i.return()}},{highWaterMark:2})};var Os=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",kl=Os&&typeof ReadableStream=="function",nh=Os&&(typeof TextEncoder=="function"?(n=>e=>n.encode(e))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Al=(n,...e)=>{try{return!!n(...e)}catch{return!1}},sh=kl&&Al(()=>{let n=!1,e=new Request($.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!e}),Tl=64*1024,pa=kl&&Al(()=>d.isReadableStream(new Response("").body)),Ds={stream:pa&&(n=>n.body)};Os&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ds[e]&&(Ds[e]=d.isFunction(n[e])?t=>t[e]():(t,s)=>{throw new C(`Response type '${e}' is not supported`,C.ERR_NOT_SUPPORT,s)})})})(new Response);var ih=async n=>{if(n==null)return 0;if(d.isBlob(n))return n.size;if(d.isSpecCompliantForm(n))return(await new Request($.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(d.isArrayBufferView(n)||d.isArrayBuffer(n))return n.byteLength;if(d.isURLSearchParams(n)&&(n=n+""),d.isString(n))return(await nh(n)).byteLength},ah=async(n,e)=>{let t=d.toFiniteNumber(n.getContentLength());return t??ih(e)},Il=Os&&(async n=>{let{url:e,method:t,data:s,signal:i,cancelToken:a,timeout:r,onDownloadProgress:o,onUploadProgress:l,responseType:c,headers:p,withCredentials:u="same-origin",fetchOptions:m}=Is(n);c=c?(c+"").toLowerCase():"text";let f=Rl([i,a&&a.toAbortSignal()],r),g,v=f&&f.unsubscribe&&(()=>{f.unsubscribe()}),_;try{if(l&&sh&&t!=="get"&&t!=="head"&&(_=await ah(p,s))!==0){let M=new Request(e,{method:"POST",body:s,duplex:"half"}),Y;if(d.isFormData(s)&&(Y=M.headers.get("content-type"))&&p.setContentType(Y),M.body){let[ae,Z]=nn(_,it(sn(l)));s=la(M.body,Tl,ae,Z)}}d.isString(u)||(u=u?"include":"omit");let R="credentials"in Request.prototype;g=new Request(e,{...m,signal:f,method:t.toUpperCase(),headers:p.normalize().toJSON(),body:s,duplex:"half",credentials:R?u:void 0});let D=await fetch(g,m),L=pa&&(c==="stream"||c==="response");if(pa&&(o||L&&v)){let M={};["status","statusText","headers"].forEach(ye=>{M[ye]=D[ye]});let Y=d.toFiniteNumber(D.headers.get("content-length")),[ae,Z]=o&&nn(Y,it(sn(o),!0))||[];D=new Response(la(D.body,Tl,ae,()=>{Z&&Z(),v&&v()}),M)}c=c||"text";let q=await Ds[d.findKey(Ds,c)||"text"](D,n);return!L&&v&&v(),await new Promise((M,Y)=>{Xe(M,Y,{data:q,headers:se.from(D.headers),status:D.status,statusText:D.statusText,config:n,request:g})})}catch(R){throw v&&v(),R&&R.name==="TypeError"&&/Load failed|fetch/i.test(R.message)?Object.assign(new C("Network Error",C.ERR_NETWORK,n,g),{cause:R.cause||R}):C.from(R,R&&R.code,n,g)}});var ua={http:yl,xhr:Sl,fetch:Il};d.forEach(ua,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});var Dl=n=>`- ${n}`,rh=n=>d.isFunction(n)||n===null||n===!1,Us={getAdapter:n=>{n=d.isArray(n)?n:[n];let{length:e}=n,t,s,i={};for(let a=0;a<e;a++){t=n[a];let r;if(s=t,!rh(t)&&(s=ua[(r=String(t)).toLowerCase()],s===void 0))throw new C(`Unknown adapter '${r}'`);if(s)break;i[r||"#"+a]=s}if(!s){let a=Object.entries(i).map(([o,l])=>`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build")),r=e?a.length>1?`since :
18
18
  `+a.map(Dl).join(`
19
- `):" "+Dl(a[0]):"as no adapter specified";throw new C("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return s},adapters:pa};function ua(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new je(null,n)}function Us(n){return ua(n),n.headers=se.from(n.headers),n.data=Rn.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Os.getAdapter(n.adapter||Jt.adapter)(n).then(function(s){return ua(n),s.data=Rn.call(n,n.transformResponse,s),s.headers=se.from(s.headers),s},function(s){return Tn(s)||(ua(n),s&&s.response&&(s.response.data=Rn.call(n,n.transformResponse,s.response),s.response.headers=se.from(s.response.headers))),Promise.reject(s)})}var Ls={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{Ls[n]=function(s){return typeof s===n||"a"+(e<1?"n ":" ")+n}});var Ol={};Ls.transitional=function(e,t,s){function i(a,r){return"[Axios v"+Tt+"] Transitional option '"+a+"'"+r+(s?". "+s:"")}return(a,r,o)=>{if(e===!1)throw new C(i(r," has been removed"+(t?" in "+t:"")),C.ERR_DEPRECATED);return t&&!Ol[r]&&(Ol[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(a,r,o):!0}};Ls.spelling=function(e){return(t,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};function ch(n,e,t){if(typeof n!="object")throw new C("options must be an object",C.ERR_BAD_OPTION_VALUE);let s=Object.keys(n),i=s.length;for(;i-- >0;){let a=s[i],r=e[a];if(r){let o=n[a],l=o===void 0||r(o,a,n);if(l!==!0)throw new C("option "+a+" must be "+l,C.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new C("Unknown option "+a,C.ERR_BAD_OPTION)}}var Ln={assertOptions:ch,validators:Ls};var Xe=Ln.validators,sn=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Di,response:new Di}}async request(e,t){try{return await this._request(e,t)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;let a=i.stack?i.stack.replace(/^.+\n/,""):"";try{s.stack?a&&!String(s.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(s.stack+=`
20
- `+a):s.stack=a}catch{}}throw s}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Ke(this.defaults,t);let{transitional:s,paramsSerializer:i,headers:a}=t;s!==void 0&&Ln.assertOptions(s,{silentJSONParsing:Xe.transitional(Xe.boolean),forcedJSONParsing:Xe.transitional(Xe.boolean),clarifyTimeoutError:Xe.transitional(Xe.boolean)},!1),i!=null&&(d.isFunction(i)?t.paramsSerializer={serialize:i}:Ln.assertOptions(i,{encode:Xe.function,serialize:Xe.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ln.assertOptions(t,{baseUrl:Xe.spelling("baseURL"),withXsrfToken:Xe.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=a&&d.merge(a.common,a[t.method]);a&&d.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),t.headers=se.concat(r,a);let o=[],l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(t)===!1||(l=l&&v.synchronous,o.unshift(v.fulfilled,v.rejected))});let c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let p,u=0,m;if(!l){let g=[Us.bind(this),void 0];for(g.unshift.apply(g,o),g.push.apply(g,c),m=g.length,p=Promise.resolve(t);u<m;)p=p.then(g[u++],g[u++]);return p}m=o.length;let f=t;for(u=0;u<m;){let g=o[u++],v=o[u++];try{f=g(f)}catch(_){v.call(this,_);break}}try{p=Us.call(this,f)}catch(g){return Promise.reject(g)}for(u=0,m=c.length;u<m;)p=p.then(c[u++],c[u++]);return p}getUri(e){e=Ke(this.defaults,e);let t=Ct(e.baseURL,e.url,e.allowAbsoluteUrls);return wt(t,e.params,e.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(e){sn.prototype[e]=function(t,s){return this.request(Ke(s||{},{method:e,url:t,data:(s||{}).data}))}});d.forEach(["post","put","patch"],function(e){function t(s){return function(a,r,o){return this.request(Ke(o||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:a,data:r}))}}sn.prototype[e]=t(),sn.prototype[e+"Form"]=t(!0)});var Fn=sn;var da=class n{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(a){t=a});let s=this;this.promise.then(i=>{if(!s._listeners)return;let a=s._listeners.length;for(;a-- >0;)s._listeners[a](i);s._listeners=null}),this.promise.then=i=>{let a,r=new Promise(o=>{s.subscribe(o),a=o}).then(i);return r.cancel=function(){s.unsubscribe(a)},r},e(function(a,r,o){s.reason||(s.reason=new je(a,r,o),t(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=s=>{e.abort(s)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new n(function(i){e=i}),cancel:e}}},Ul=da;function ma(n){return function(t){return n.apply(null,t)}}function fa(n){return d.isObject(n)&&n.isAxiosError===!0}var ha={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ha).forEach(([n,e])=>{ha[e]=n});var Ll=ha;function Fl(n){let e=new Fn(n),t=bn(Fn.prototype.request,e);return d.extend(t,Fn.prototype,e,{allOwnKeys:!0}),d.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return Fl(Ke(n,i))},t}var ue=Fl(Jt);ue.Axios=Fn;ue.CanceledError=je;ue.CancelToken=Ul;ue.isCancel=Tn;ue.VERSION=Tt;ue.toFormData=ut;ue.AxiosError=C;ue.Cancel=ue.CanceledError;ue.all=function(e){return Promise.all(e)};ue.spread=ma;ue.isAxiosError=fa;ue.mergeConfig=Ke;ue.AxiosHeaders=se;ue.formToJSON=n=>ys(d.isHTMLForm(n)?new FormData(n):n);ue.getAdapter=Os.getAdapter;ue.HttpStatusCode=Ll;ue.default=ue;var an=ue;var{Axios:Py,AxiosError:My,CanceledError:jy,isCancel:Ny,CancelToken:qy,VERSION:Gy,all:By,Cancel:$y,isAxiosError:zy,spread:Wy,toFormData:Vy,AxiosHeaders:Hy,HttpStatusCode:Ky,formToJSON:Jy,getAdapter:Xy,mergeConfig:Qy}=an;lt();var Pl=Re(ki());function Fs(n,e){n.then().catch(t=>{console.warn(`failed to do ${e}, ran into error: `,t)})}var rn=n=>new Promise(e=>setTimeout(e,n));function Ps(n){return n&&(Object.prototype.toString.call(n)==="[object Function]"||typeof n=="function"||n instanceof Function)}var dt={TOKEN_EXPIRED:40,WS_CLOSED_SUCCESS:1e3};function lh(n){return n!==null&&typeof n=="object"&&(n.readable||typeof n._read=="function")}function ph(n){return n!=null&&n.constructor!=null&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function uh(n){return typeof window<"u"&&"File"in window&&n instanceof File}function dh(n){return typeof window<"u"&&"Blob"in window&&n instanceof Blob}function Ml(n,e,t){let s=new Pl.default;return lh(n)||ph(n)||uh(n)||dh(n)?e?s.append("file",n,e):s.append("file",n):s.append("file",{uri:n,name:e||n.split("/").reverse()[0],contentType:t||void 0,type:t||void 0}),s}function Ms(n){let e=Math.min(500+n*2e3,25e3),t=Math.min(Math.max(250,(n-1)*2e3),25e3);return Math.floor(Math.random()*(e-t)+t)}function Ue(){return mh()}function Pn(n){let e="";for(let t=0;t<n.length;t++)e+=n[t].toString(16).padStart(2,"0");return e}function mh(){let n=gh(16);return n[6]=n[6]&15|64,n[8]=n[8]&191|128,Pn(n.subarray(0,4))+"-"+Pn(n.subarray(4,6))+"-"+Pn(n.subarray(6,8))+"-"+Pn(n.subarray(8,10))+"-"+Pn(n.subarray(10,16))}function fh(n){let e=Math.pow(2,8*n.byteLength/n.length);for(let t=0;t<n.length;t++)n[t]=Math.random()*e}var hh=typeof crypto<"u"&&typeof crypto?.getRandomValues<"u"?crypto.getRandomValues.bind(crypto):typeof msCrypto<"u"?msCrypto.getRandomValues.bind(msCrypto):fh;function gh(n){let e=new Uint8Array(n);return hh(e),e}function jl(n){typeof window<"u"&&window.addEventListener&&(window.addEventListener("offline",n),window.addEventListener("online",n))}function Nl(n){typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("offline",n),window.removeEventListener("online",n))}var ql=n=>{let e=[];for(let t in n)n[t]!==void 0&&(Array.isArray(n[t])||typeof n[t]=="object"?e.push(`${t}=${encodeURIComponent(JSON.stringify(n[t]))}`):e.push(`${t}=${encodeURIComponent(n[t])}`));return e.join("&")};function Gl(n){return{...n,__html:n.html,pinned_at:n.pinned_at?new Date(n.pinned_at):null,created_at:n.created_at?new Date(n.created_at):new Date,updated_at:n.updated_at?new Date(n.updated_at):new Date,status:n.status||"received"}}function Bl(n,e,t=!1,s="created_at",i=!0){let a=i||t,r=n;t&&(r=r.filter(v=>!(v.id&&e.id===v.id)));let o=r.length;if(o===0&&a)return r.concat(e);if(o===0)return[...r];if(s==="pinned_at")return r.concat(e);let l=e[s].getTime(),c=r[o-1][s].getTime()<l;if(c&&a)return r.concat(e);if(c)return[...r];let p=0,u=0,m=o-1;for(;p<=m;)u=Math.floor((m+p)/2),r[u][s].getTime()<=l?p=u+1:m=u-1;if(!t&&e.id){if(r[p]&&e.id===r[p].id)return r[p]=e,[...r];if(r[p-1]&&e.id===r[p-1].id)return r[p-1]=e,[...r]}a&&r.splice(p,0,e);let f=new Map,g=[];for(let v of r)f.has(v.id)||(f.set(v.id,!0),g.push(v));return g}var H=(n,e)=>n.length===0?[]:e.length===0?n.map(t=>(t.user={id:t.user?.id,name:t.user?.id,avatar:""},t)):n.map(t=>{let s=t.user?.id,i=t?.latest_reactions,a=t?.quoted_message,r=e.find(o=>o.id===s);if(r&&(t.user={id:r.id,name:r.name||r.id,avatar:r.avatar||""}),i&&(t.latest_reactions=i.map(o=>{let l=e.find(c=>c.id===o.user_id);return{...o,user:{id:l?.id||o.user_id,name:l?.name||o.user_id,avatar:l?.avatar||""}}})),a){let o=e.find(l=>l.id===a.user?.id);t.quoted_message.user={id:o?.id||a.user?.id,name:o?.name||a.user?.id,avatar:o?.avatar||""}}return t}),W=(n,e)=>{if(e.length===0)return{id:n,name:n,avatar:""};let t=e.find(s=>s.id===n);return{id:n,name:t?.name||n,avatar:t?.avatar||""}},It=(n,e)=>{if(n.length===0)return"Empty channel";let t=n.find(s=>s.user.id!==e);return t?t.user.name||t.user.id:"Empty channel"},Mn=(n,e)=>{if(n.length===0)return"";let t=n.find(s=>s.user.id!==e);return t&&t.user.avatar||""};async function jn(n,e){let t=(e||[]).map(a=>a.user?.id).filter(a=>!!a),s=n.state.users,i=t.filter(a=>!s[a]);i.length>0&&await n.getBatchUsers(i)}var Dt=(n=[])=>n.length>0?Math.max(...n.map(e=>new Date(e.created_at).getTime())):0,Ot=(n,e,t,s)=>{let i,a;if(["videoConfig","audioConfig","transciverState"].includes(t)&&s){i=1;let l=JSON.stringify(s);a=new TextEncoder().encode(l)}else t==="connected"?(i=1,a=new Uint8Array(0)):(i=9,a=new Uint8Array(n));let r=new Uint8Array(i+a.byteLength),o=0;switch(t){case"videoConfig":o=0;break;case"audioConfig":o=1;break;case"video-key":o=2;break;case"video-delta":o=3;break;case"audio":o=4;break;case"connected":o=6;break;case"transciverState":o=7;break}return r[0]=o,e!==null&&new DataView(r.buffer).setBigUint64(1,BigInt(e),!1),r.set(a,i),r},ga=n=>{let e="",t=new Uint8Array(n),s=t.byteLength;for(let i=0;i<s;i++)e+=String.fromCharCode(t[i]);return btoa(e)},$l=n=>{let e={2048:"123",4096:"153",8192:"156",16384:"183",32768:"186"},t=/2048|4096|8192|16384|32768/g;return n.match(t)?n.replace(t,s=>e[s]):"hev1.1.6.L123.B0"},zl=(n,e,t)=>{let s={cid:e,forward_cid:t,forward_message_id:n.id};return n.sticker_url&&(!n.text||n.text==="")&&(!n.attachments||Array.isArray(n.attachments)&&n.attachments.length===0)?(s.sticker_url=n.sticker_url,s.text=n.text):(s.text=n.text||"",n.attachments&&n.attachments.length>0&&(s.attachments=n.attachments.filter(i=>i.type!=="linkPreview"))),s};var Nn=class{_channel;watcher_count;typing;read;pinnedMessages;watchers;members;unreadCount;membership;last_message_at;isUpToDate;messageSets=[];topics=[];constructor(e){this._channel=e,this.watcher_count=0,this.typing={},this.read={},this.initMessages(),this.pinnedMessages=[],this.watchers={},this.members={},this.membership={},this.unreadCount=0,this.isUpToDate=!0,this.last_message_at=e?.state?.last_message_at!=null?new Date(e.state.last_message_at):null}get messages(){return this.messageSets.find(e=>e.isCurrent)?.messages||[]}set messages(e){let t=this.messageSets.findIndex(s=>s.isCurrent);this.messageSets[t].messages=e}get latestMessages(){return this.messageSets.find(e=>e.isLatest)?.messages||[]}set latestMessages(e){let t=this.messageSets.findIndex(s=>s.isLatest);this.messageSets[t].messages=e}addMessageSorted(e,t=!1,s=!0,i="latest"){return this.addMessagesSorted([e],t,!1,s,i)}formatMessage(e){return{...e,__html:e.html,pinned_at:e.pinned_at?new Date(e.pinned_at):null,created_at:e.created_at?new Date(e.created_at):new Date,updated_at:e.updated_at?new Date(e.updated_at):null,status:e.status||"received"}}addMessagesSorted(e,t=!1,s=!1,i=!0,a="current"){let{messagesToAdd:r,targetMessageSetIndex:o}=this.findTargetMessageSet(e,i,a);for(let l=0;l<r.length;l+=1){let c=r[l].created_at instanceof Date,p;if(c?p=r[l]:(p=this.formatMessage(r[l]),p.user&&this._channel?.cid&&this._channel.getClient().state.updateUserReference(p.user,this._channel.cid),this.last_message_at||(this.last_message_at=new Date(p.created_at.getTime())),p.created_at.getTime()>this.last_message_at.getTime()&&(this.last_message_at=new Date(p.created_at.getTime()))),!p.pinned){let m=this.pinnedMessages.find(f=>f.id===p.id);m&&(p.pinned=!0,p.pinned_at=m.pinned_at||new Date)}!p.parent_id&&o!==-1&&(this.messageSets[o].messages=this._addToMessageList(this.messageSets[o].messages,p,t,"created_at",i))}return{messageSet:this.messageSets[o]}}addPinnedMessages(e){for(let t=0;t<e.length;t+=1)this.addPinnedMessage(e[t]);this.pinnedMessages.sort((t,s)=>{let i=t.pinned_at?new Date(t.pinned_at).getTime():0;return(s.pinned_at?new Date(s.pinned_at).getTime():0)-i})}addPinnedMessage(e){let t=this.formatMessage(e);this.pinnedMessages=this.pinnedMessages.filter(s=>s.id!==t.id),this.pinnedMessages=[t,...this.pinnedMessages]}removePinnedMessage(e){let{result:t}=this.removeMessageFromArray(this.pinnedMessages,e);this.pinnedMessages=t}addReaction(e,t,s){if(!t)return;let i=t;return this._updateMessage(t,a=>(i.own_reactions=this._addOwnReactionToMessage(a.own_reactions,e,s),this.formatMessage(i))),i}_addOwnReactionToMessage(e,t,s){return s?e=[]:e=this._removeOwnReactionFromMessage(e,t),e=e||[],this._channel.getClient().userID===t.user_id&&e.push(t),e}_removeOwnReactionFromMessage(e,t){return e&&e.filter(s=>s.user_id!==t.user_id||s.type!==t.type)}removeReaction(e,t){if(!t)return;let s=t;return this._updateMessage(t,i=>(s.own_reactions=this._removeOwnReactionFromMessage(i.own_reactions,e),this.formatMessage(s))),s}removeQuotedMessageReferences(e){let t=s=>({...s,created_at:s.created_at.toISOString(),pinned_at:s.pinned_at?.toISOString(),updated_at:s.updated_at?.toISOString()});this.messageSets.forEach(s=>{let i=s.messages.filter(a=>a.quoted_message_id===e.id).map(t).map(a=>({...a,quoted_message:{...e,attachments:[]}}));this.addMessagesSorted(i,!0)})}_updateMessage(e,t){let{parent_id:s,pinned:i}=e;if(!s){let a=this.findMessageSetIndex(e);if(a!==-1){let r=this.messageSets[a].messages.findIndex(o=>o.id===e.id);r!==-1&&(this.messageSets[a].messages[r]=t(this.messageSets[a].messages[r]))}}if(i){let a=this.pinnedMessages.findIndex(r=>r.id===e.id);a!==-1&&(this.pinnedMessages[a]=t(this.pinnedMessages[a]))}}setIsUpToDate=e=>{this.isUpToDate=e};updateMessageStatus(e,t){this._updateMessage({id:e},s=>({...s,status:t}))}_addToMessageList(e,t,s=!1,i="created_at",a=!0){return Bl(e,t,s,i,a)}removeMessage(e){let t=!1,s=e.messageSetIndex??this.findMessageSetIndex(e);if(s!==-1){let{removed:i,result:a}=this.removeMessageFromArray(this.messageSets[s].messages,e);this.messageSets[s].messages=a,t=i}return t}removeMessageFromArray=(e,t)=>{let s=e.filter(i=>!(i.id&&t.id&&i.id===t.id));return{removed:s.length<e.length,result:s}};updateUserMessages=e=>{let t=(s,i)=>{for(let a=0;a<s.length;a++){let r=s[a],o=r?.latest_reactions||[];r.user?.id===i.id&&(s[a]={...r,user:r.user?.id===i.id?i:r.user}),o&&o.some(l=>l.user?.id===i.id)&&(s[a]={...r,latest_reactions:o.map(l=>l.user?.id===i.id?{...l,user:i}:l)})}};this.messageSets.forEach(s=>t(s.messages,e)),t(this.pinnedMessages,e)};deleteUserMessages=(e,t=!1)=>{let s=(i,a,r=!1)=>{for(let o=0;o<i.length;o++){let l=i[o];l.user?.id===a.id&&(r?i[o]={cid:l.cid,created_at:l.created_at,deleted_at:new Date().toISOString(),id:l.id,latest_reactions:[],mentioned_users:[],own_reactions:[],parent_id:l.parent_id,reply_count:l.reply_count,status:l.status,type:"deleted",updated_at:l.updated_at,user:l.user}:i[o]={...l,type:"deleted",deleted_at:new Date().toISOString()})}};this.messageSets.forEach(i=>s(i.messages,e,t)),s(this.pinnedMessages,e,t)};filterErrorMessages(){let e=this.latestMessages.filter(t=>t.type!=="error");this.latestMessages=e}clean(){let e=new Date;for(let[t,s]of Object.entries(this.typing)){let i=typeof s.received_at=="string"?new Date(s.received_at):s.received_at||new Date;e.getTime()-i.getTime()>7e3&&(delete this.typing[t],this._channel.getClient().dispatchEvent({cid:this._channel.cid,type:"typing.stop",user:{id:t}}))}}clearMessages(){this.initMessages(),this.pinnedMessages=[]}initMessages(){this.messageSets=[{messages:[],isLatest:!0,isCurrent:!0}]}async loadMessageIntoState(e,t,s=25){let i,a=!1,r=t||e;if(e==="latest"){if(this.messages===this.latestMessages)return;i=this.messageSets.findIndex(o=>o.isLatest)}else i=this.findMessageSetIndex({id:r});i!==-1&&(this.switchToMessageSet(i),a=!0),a||await this._channel.query({messages:{id_around:r,limit:s}},"new"),i=this.findMessageSetIndex({id:r}),i!==-1&&this.switchToMessageSet(i)}findMessage(e,t){let s=this.findMessageSetIndex({id:e});if(s!==-1)return this.messageSets[s].messages.find(i=>i.id===e)}switchToMessageSet(e){let t=this.messageSets.find(s=>s.isCurrent);t&&(t.isCurrent=!1,this.messageSets[e].isCurrent=!0)}areMessageSetsOverlap(e,t){return e.some(s=>t.find(i=>s.id===i.id))}findMessageSetIndex(e){return this.messageSets.findIndex(t=>!!t.messages.find(s=>s.id===e.id))}findTargetMessageSet(e,t=!0,s="current"){let i=e,a;if(t){let r=this.messageSets.map((c,p)=>p).filter(c=>this.areMessageSetsOverlap(this.messageSets[c].messages,e));switch(s){case"new":r.length>0?a=r[0]:e.some(c=>!c.parent_id)&&(this.messageSets.push({messages:[],isCurrent:!1,isLatest:!1}),a=this.messageSets.length-1);break;case"current":a=this.messageSets.findIndex(c=>c.isCurrent);break;case"latest":a=this.messageSets.findIndex(c=>c.isLatest);break;default:a=-1}let o=r.splice(0,1)[0],l=[...r];if(o!==void 0&&o!==a&&l.push(a),l.length>0){let c=this.messageSets[o],p=this.messageSets.filter((m,f)=>l.indexOf(f)!==-1);p.forEach(m=>{c.isLatest=c.isLatest||m.isLatest,c.isCurrent=c.isCurrent||m.isCurrent,i=[...i,...m.messages]}),p.forEach(m=>this.messageSets.splice(this.messageSets.indexOf(m),1)),a=this.messageSets.findIndex(m=>this.areMessageSetsOverlap(m.messages,e))}}else a=this.findMessageSetIndex(e[0]);return{targetMessageSetIndex:a,messagesToAdd:i}}};function qn(n){let e=n.lastIndexOf("."),t=e>0?n.slice(0,e):n,s=e>0?n.slice(e):"";return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/đ/g,"d").replace(/Đ/g,"D").replace(/\s+/g,"_")+s}function Wl(n){let e=n.type.toLowerCase(),t=n.name.toLowerCase().split(".").pop()||"";return e==="image/heic"||e==="image/heif"||t==="heic"||t==="heif"}function ba(n,e){let t=n.toLowerCase(),s=(e||"").toLowerCase().split(".").pop()||"";return t==="image/heic"||t==="image/heif"||s==="heic"||s==="heif"?"file":t.startsWith("image/")?"image":t.startsWith("video/")?"video":t.startsWith("audio/")?"audio":"file"}function js(n){return n.type==="video/mp4"||n.type==="video/webm"||n.type==="video/quicktime"}function Ns(n,e,t,s){let i=qn(n.name),a=n.type||"",r=ba(a,n.name);if(s)return{type:"voiceRecording",asset_url:e,title:i,file_size:n.size,mime_type:a,waveform_data:s.waveform_data,duration:s.duration};switch(r){case"image":return{type:"image",image_url:e,title:i,file_size:n.size,mime_type:a};case"video":return{type:"video",asset_url:e,title:i,file_size:n.size,mime_type:a,thumb_url:t||""};case"audio":return{type:"file",asset_url:e,title:i,file_size:n.size,mime_type:a};default:return{type:"file",asset_url:e,title:i,file_size:n.size,mime_type:a||""}}}var on=class{_client;type;id;data;_data;cid;listeners;state;initialized;offlineMode;lastKeyStroke;lastTypingEvent;isTyping;disconnected;constructor(e,t,s,i){let a=/^[\w_-]+$/,r=/^[\w!:_-]+$/;if(!a.test(t))throw new Error(`Invalid chat type ${t}, letters, numbers and "_-" are allowed`);if(typeof s=="string"&&!r.test(s))throw new Error(`Invalid chat id ${s}, letters, numbers and "!-_" are allowed`);this._client=e,this.type=t,this.id=s,this.data=i,this._data={...i},this.cid=`${t}:${s}`,this.listeners={},this.state=new Nn(this),this.initialized=!1,this.offlineMode=!1,this.lastTypingEvent=null,this.isTyping=!1,this.disconnected=!1}getClient(){return this._client}async sendMessage(e){e.id||(e={...e,id:Ue()});let t=e.id,s={...e,id:t,status:"sending",created_at:new Date().toISOString(),updated_at:new Date().toISOString(),user:this.getClient().user,user_id:this.getClient().userID,type:"regular"};this.state.addMessageSorted(s);try{return await this.getClient().post(this._channelURL()+"/message",{message:{...e}})}catch(i){let r=!i.response||i.code==="ERR_NETWORK"||i.isWSFailure||!this.getClient().wsConnection?.isHealthy?"failed_offline":"error";throw this.state.updateMessageStatus(t,r),i}}async retryMessage(e){let t=this.state.messages.find(i=>i.id===e);if(!t)throw new Error(`Message ${e} not found in state`);this.state.updateMessageStatus(e,"sending");let s={id:t.id,text:t.text,attachments:t.attachments,mentioned_users:t.mentioned_users,parent_id:t.parent_id,quoted_message_id:t.quoted_message_id,sticker_url:t.sticker_url};t.show_in_channel!==void 0&&(s.show_in_channel=t.show_in_channel);try{return await this.getClient().post(this._channelURL()+"/message",{message:s})}catch(i){let a=!i.response||i.code==="ERR_NETWORK"||i.isWSFailure||!this.getClient().wsConnection?.isHealthy;throw this.state.updateMessageStatus(e,a?"failed_offline":"error"),i}}async createPoll(e){let t=Ue();return e={...e,id:t},await this.getClient().post(this._channelURL()+"/message",{message:{...e}})}async votePoll(e,t){if(!e)throw Error("Message id is missing");return await this.getClient().post(this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}/poll/${t}`)}async forwardMessage(e,t){return e.id||(e={...e,id:Ue()}),await this.getClient().post(`${this.getClient().baseURL}/channels/${t.type}/${t.channelID}/message`,{message:{...e}})}async pinMessage(e){return await this.getClient().post(this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}/pin`)}async unpinMessage(e){return await this.getClient().post(this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}/unpin`)}async editMessage(e,t){return await this.getClient().post(this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}`,{message:t})}sendFile(e,t,s,i){return this.getClient().sendFile(`${this._channelURL()}/file`,e,t,s,i)}async uploadAndPrepareAttachments(e,t){let s=[],i=e.map(c=>{let p=qn(c.name);return p!==c.name?new File([c],p,{type:c.type,lastModified:c.lastModified}):c}),a=await Promise.allSettled(i.map(c=>this.sendFile(c,c.name,c.type))),r=new Map,o=[];for(let c=0;c<i.length;c++)a[c].status==="fulfilled"&&js(i[c])&&o.push((async()=>{try{let u=await this.getThumbBlobVideo(e[c]);if(u){let m=new File([u],`thumb_${i[c].name}.jpg`,{type:"image/jpeg"}),f=await this.sendFile(m,m.name,"image/jpeg");r.set(c,f.file)}}catch{}})());await Promise.allSettled(o);let l=[];for(let c=0;c<i.length;c++){let p=a[c];if(p.status==="fulfilled"){let u=p.value.file,m=r.get(c),f=t?.voiceMetadata?.get(c);l.push(Ns(i[c],u,m,f))}else s.push({file:e[c],error:p.reason instanceof Error?p.reason:new Error(String(p.reason))})}return{attachments:l,failedFiles:s}}async sendEvent(e){return await this.getClient().post(this._channelURL()+"/event",{event:e})}async sendReaction(e,t){if(!e)throw Error("Message id is missing");return await this.getClient().post(this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}/reaction/${t}`)}deleteReaction(e,t){if(!t||!e)throw Error("Deleting a reaction requires specifying both the message and reaction type");let s=this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}/reaction/${t}`;return this.getClient().delete(s,{})}async update(e={},t){return["config","cid","created_by","id","member_count","type","created_at","updated_at","last_message_at","own_capabilities"].forEach(i=>{delete e[i]}),await this._update({message:t,data:e})}async delete(){return await this.getClient().delete(this._channelURL())}async truncate(){return await this.getClient().delete(this._channelURL()+"/truncate")}async blockUser(){return await this.getClient().post(this._channelURL(),{action:"block"})}async unblockUser(){return await this.getClient().post(this._channelURL(),{action:"unblock"})}async acceptInvite(e){let t=this.id,s=this.getClient().userBaseURL+`/token_gate/join_channel/${this.type}`;return this.getClient().post(s,{},{channel_id:t,action:e})}async rejectInvite(){let e=this.getClient().baseURL+`/invites/${this.type}/${this.id}/reject`;return this.getClient().post(e)}async skipInvite(){let e=this.getClient().baseURL+`/invites/${this.type}/${this.id}/skip`;return this.getClient().post(e)}async addMembers(e){return await this._update({add_members:e})}async addModerators(e){return await this._update({promote_members:e})}async banMembers(e){return await this._update({ban_members:e})}async unbanMembers(e){return await this._update({unban_members:e})}async updateCapabilities(e){return await this._update({capabilities:e})}async setSlowMode(e){let t=[0,1e4,3e4,6e4,3e5,9e5,36e5];if(!t.includes(e))throw new Error(`Invalid cooldown value: ${e}. Allowed values are: ${t.join(", ")} (milliseconds).`);return await this.update({member_message_cooldown:e})}async queryAttachmentMessages(){let e=await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/attachment`,{attachment_types:["image","video","file","voiceRecording","linkPreview"]});return e.attachments&&e.attachments.sort((t,s)=>new Date(s.created_at).getTime()-new Date(t.created_at).getTime()),e}async searchMessage(e,t){let s=await this.getClient().post(this.getClient().baseURL+"/channels/search",{cid:this.cid,search_term:e,offset:t,limit:25});return!s||s?.search_result?.messages.length===0?null:{...s?.search_result,messages:s?.search_result?.messages.map(i=>{let a=W(i.user_id,Object.values(this.getClient().state.users))||i.user;return{...i,user:a}})}}async removeMembers(e){return await this._update({remove_members:e})}async demoteModerators(e){return await this._update({demote_members:e})}async _update(e){let t=await this.getClient().post(this._channelURL(),e);return this.data={...this.data,...t.channel},t}_processTopics(e,t){let s=e.map(a=>(a.channel&&a.channel.members&&(a.channel.members=H(a.channel.members,t)),a.messages&&(a.messages=H(a.messages,t)),a.pinned_messages&&(a.pinned_messages=H(a.pinned_messages,t)),a.read&&(a.read=H(a.read,t)),a)),{channels:i}=this.getClient().hydrateChannels(s,{});this.state.topics=i}async muteNotification(e){return await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/muted`,{mute:!0,duration:e})}async unMuteNotification(){return await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/muted`,{mute:!1})}async keystroke(e,t){let s=new Date,i=this.lastTypingEvent&&s.getTime()-this.lastTypingEvent.getTime();this.lastKeyStroke=s,this.isTyping=!0,(i===null||i>2e3)&&(this.lastTypingEvent=new Date,await this.sendEvent({type:"typing.start",parent_id:e,...t||{}}))}async stopTyping(e,t){this.isTyping&&(this.lastTypingEvent=null,this.isTyping=!1,await this.sendEvent({type:"typing.stop",parent_id:e,...t||{}}))}_isTypingIndicatorsEnabled(){return!0}lastMessage(){let e=this.state.latestMessages.length-5;e<0&&(e=0);let t=this.state.latestMessages.length+1,s=this.state.latestMessages.slice(e,t);return s.sort((i,a)=>a.created_at.getTime()-i.created_at.getTime()),s[0]}async markRead(){return await this.getClient().post(this._channelURL()+"/read")}clean(){this.lastKeyStroke&&new Date().getTime()-this.lastKeyStroke.getTime()>1e3&&this.isTyping&&Fs(this.stopTyping(),"stop typing event"),this.state.clean()}async watch(e){await this.getClient().wsPromise;let t={...e},s=await this.query(t,"latest");this.initialized=!0,await jn(this.getClient(),s.channel.members);let i=Object.values(this.getClient().state.users);if(s.channel.members=H(s.channel.members,i),s.channel.name=s.channel.type==="messaging"?It(s.channel.members,this.getClient().userID||""):s.channel.name,s.channel.image=s.channel.type==="messaging"?Mn(s.channel.members,this.getClient().userID||""):s.channel.image,s.messages=H(s.messages,i),s.pinned_messages=s.pinned_messages?H(s.pinned_messages,i):[],s.read=H(s.read||[],i),this.type==="team"&&s.channel.topics_enabled){let a={filter_conditions:{type:["topic"],parent_cid:this.cid,project_id:this.getClient().projectId},sort:[],message_limit:25},r=await this.getClient().post(this.getClient().baseURL+"/channels",a);this._processTopics(r.channels||[],i)}return this.data=s.channel,this._client.logger("info",`channel:watch() - started watching channel ${this.cid}`,{tags:["channel"],channel:this}),s}lastRead(){let{userID:e}=this.getClient();if(e)return this.state.read[e]?this.state.read[e].last_read:null}_countMessageAsUnread(e){return!(e.parent_id&&!e.show_in_channel||e.user?.id===this.getClient().userID||e.type==="system"||Array.isArray(this.data?.own_capabilities)&&!this.data?.own_capabilities.includes("read-events"))}countUnread(e){if(!e)return this.state.unreadCount;let t=0;for(let s=0;s<this.state.latestMessages.length;s+=1){let i=this.state.latestMessages[s];i.created_at>e&&this._countMessageAsUnread(i)&&t++}return t}getUnreadMemberCount(){return this.state.read?Object.values(this.state.read):[]}getCapabilitiesMember(){return this.data?this.data.member_capabilities:[]}create=async()=>this.type==="messaging"?await this.createDirectChannel("latest"):await this.query({},"latest");async createTopic(e){let t=this._client.projectId,s=Ue(),i=`${t}:${s}`,a=`${this.getClient().baseURL}/channels/topic/${i}`,r={project_id:t,parent_cid:this.cid,data:{...e}};return await this.getClient().post(a+"/query",r)}async query(e,t="current"){await this.getClient().wsPromise;let s=this._client.projectId,i={...e,project_id:s},a=`${this.getClient().baseURL}/channels/${this.type}`;if(this.id)a+=`/${this.id}`;else if(this.type==="team"){let u=Ue();this.id=`${s}:${u}`,a+=`/${this.id}`}let r={state:!0,...i};this._data&&Object.keys(this._data).length>0&&(r.data=this._data);let o=await this.getClient().post(a+"/query",r);await jn(this.getClient(),o.channel.members);let l=Object.values(this.getClient().state.users);if(o.channel.members=H(o.channel.members,l),o.channel.name=o.channel.type==="messaging"?It(o.channel.members,this.getClient().userID||""):o.channel.name,o.channel.image=o.channel.type==="messaging"?Mn(o.channel.members,this.getClient().userID||""):o.channel.image,o.messages=H(o.messages,l),o.pinned_messages=o.pinned_messages?H(o.pinned_messages,l):[],o.read=H(o.read||[],l),o.channel.is_pinned=o.is_pinned||!1,!this.id){this.id=o.channel.id,this.cid=o.channel.cid;let u=o.channel.members.map(f=>f.user_id||f.user?.id).sort().join(","),m=`${this.type}:!members-${u}`;m in this.getClient().activeChannels&&delete this.getClient().activeChannels[m],this.cid in this.getClient().activeChannels||(this.getClient().activeChannels[this.cid]=this)}let{messageSet:c}=this._initializeState(o,t),p=[...o.channel.own_capabilities||[]].sort().join()!==[...Array.isArray(this.data?.own_capabilities)?this.data?.own_capabilities:[]].sort().join();return this.data=o.channel,this.offlineMode=!1,p&&this.getClient().dispatchEvent({type:"capabilities.changed",cid:this.cid,own_capabilities:o.channel.own_capabilities}),o}async createDirectChannel(e="current"){await this.getClient().wsPromise;let t=this._client.projectId,s=`${this.getClient().baseURL}/channels/${this.type}`,i={project_id:t};this._data&&Object.keys(this._data).length>0&&(i.data=this._data);let a=await this.getClient().post(s+"/query",i),r=Object.values(this.getClient().state.users);a.channel.members=H(a.channel.members,r),a.channel.name=a.channel.type==="messaging"?It(a.channel.members,this.getClient().userID||""):a.channel.name,a.messages=H(a.messages,r),a.pinned_messages=a.pinned_messages?H(a.pinned_messages,r):[],a.read=H(a.read||[],r);let{messageSet:o}=this._initializeState(a,e),l=[...a.channel.own_capabilities||[]].sort().join()!==[...Array.isArray(this.data?.own_capabilities)?this.data?.own_capabilities:[]].sort().join();return this.data=a.channel,this.offlineMode=!1,l&&this.getClient().dispatchEvent({type:"capabilities.changed",cid:a.channel.cid,own_capabilities:a.channel.own_capabilities}),a}async queryMessagesLessThanId(e,t=25){await this.getClient().wsPromise;let s=this._client.projectId,i=`${this.getClient().baseURL}/channels/${this.type}/${this.id}`,a=await this.getClient().post(i+"/query",{state:!0,project_id:s,messages:{limit:t,id_lt:e}}),r=Object.values(this.getClient().state.users);if(a.messages=H(a.messages,r),a.messages&&a.messages.length>0){for(let o of a.messages)if(!o.pinned){let l=this.state.pinnedMessages?.find(c=>c.id===o.id);if(l){o.pinned=!0;let c=l.pinned_at||new Date;o.pinned_at=typeof c=="string"?c:c.toISOString()}}this.state.addMessagesSorted(a.messages,!1,!0,!0,"current")}return a.messages}async queryMessagesGreaterThanId(e,t=25){await this.getClient().wsPromise;let s=this._client.projectId,i=`${this.getClient().baseURL}/channels/${this.type}/${this.id}`,a=await this.getClient().post(i+"/query",{state:!0,project_id:s,messages:{limit:t,id_gt:e}}),r=Object.values(this.getClient().state.users);if(a.messages=H(a.messages,r),a.messages&&a.messages.length>0){for(let o of a.messages)if(!o.pinned){let l=this.state.pinnedMessages?.find(c=>c.id===o.id);if(l){o.pinned=!0;let c=l.pinned_at||new Date;o.pinned_at=typeof c=="string"?c:c.toISOString()}}this.state.addMessagesSorted(a.messages,!1,!0,!0,"current")}return a.messages}async queryMessagesAroundId(e,t=25){await this.getClient().wsPromise;let s=this._client.projectId,i=`${this.getClient().baseURL}/channels/${this.type}/${this.id}`,a=await this.getClient().post(i+"/query",{state:!0,project_id:s,messages:{limit:t,id_around:e}}),r=Object.values(this.getClient().state.users);if(a.messages=H(a.messages,r),a.messages&&a.messages.length>0){for(let o of a.messages)if(!o.pinned){let l=this.state.pinnedMessages?.find(c=>c.id===o.id);if(l){o.pinned=!0;let c=l.pinned_at||new Date;o.pinned_at=typeof c=="string"?c:c.toISOString()}}this.state.addMessagesSorted(a.messages,!1,!0,!0,"current")}return a.messages}async deleteMessage(e){return await this.getClient().delete(this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}`)}async deleteMessageForMe(e){return await this.getClient().delete(this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}`,{for_me:!0})}async getThumbBlobVideo(e){return new Promise(t=>{let i=document.createElement("video");i.src=URL.createObjectURL(e),i.crossOrigin="anonymous",i.load(),i.addEventListener("error",()=>{console.error("Error when loading video file."),t(null)}),i.addEventListener("loadedmetadata",()=>{if(i.duration<.1){console.error("Video is too short."),t(null);return}setTimeout(()=>{i.currentTime=.1},200)}),i.addEventListener("seeked",()=>{try{let a=document.createElement("canvas");a.width=i.videoWidth,a.height=i.videoHeight;let r=a.getContext("2d");if(!r){console.error("Failed to create canvas context."),t(null);return}r.drawImage(i,0,0,a.width,a.height),r.canvas.toBlob(o=>{if(!o){console.error("Failed to generate thumbnail."),t(null);return}t(o),URL.revokeObjectURL(i.src)},"image/jpeg",.75)}catch(a){console.error("Error while extracting thumbnail:",a),t(null)}})})}async enableTopics(){return await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/topics/enable`,{project_id:this.getClient().projectId,messages:{limit:25}})}async disableTopics(){return await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/topics/disable`,{project_id:this.getClient().projectId})}async closeTopic(e){return await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/topics/close`,{project_id:this.getClient().projectId,topic_cid:e})}async reopenTopic(e){return await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/topics/reopen`,{project_id:this.getClient().projectId,topic_cid:e})}async editTopic(e,t){let s=await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/topics`,{project_id:this.getClient().projectId,topic_cid:e,data:t});if(s){let i=this.getClient().activeChannels[e];return i?(i.data=s.channel,i.data):s.channel}}on(e,t){let s=t?e:"all",i=t||e;return s in this.listeners||(this.listeners[s]=[]),this._client.logger("info",`Attaching listener for ${s} event on channel ${this.cid}`,{tags:["event","channel"],channel:this}),this.listeners[s].push(i),{unsubscribe:()=>{this._client.logger("info",`Removing listener for ${s} event from channel ${this.cid}`,{tags:["event","channel"],channel:this}),this.listeners[s]=this.listeners[s].filter(a=>a!==i)}}}off(e,t){let s=t?e:"all",i=t||e;s in this.listeners||(this.listeners[s]=[]),this._client.logger("info",`Removing listener for ${s} event from channel ${this.cid}`,{tags:["event","channel"],channel:this}),this.listeners[s]=this.listeners[s].filter(a=>a!==i)}async _handleChannelEvent(e){let t=this;this._client.logger("info",`channel:_handleChannelEvent - Received event of type { ${e.type} } on ${this.cid}`,{tags:["event","channel"],channel:this});let s=t.state,i=Object.values(this.getClient().state.users);switch(e.type){case"typing.start":if(e.user?.id){let c=W(e.user.id||"",i);e.user=c,s.typing[e.user.id]=e}break;case"typing.stop":e.user?.id&&delete s.typing[e.user.id];break;case"message.read":if(e.user?.id&&e.created_at){let c=W(e.user.id||"",i);e.user=c,s.read[e.user.id]={last_read:new Date(e.created_at),last_read_message_id:e.last_read_message_id,user:c,unread_messages:0},e.user?.id===this.getClient().user?.id&&(s.unreadCount=0)}break;case"user.watching.start":e.user?.id&&(s.watchers[e.user.id]=e.user);break;case"user.watching.stop":e.user?.id&&delete s.watchers[e.user.id];break;case"message.deleted":if(e.message){this._extendEventWithOwnReactions(e);s.removeMessage(e.message),s.addMessageSorted(e.message,!1,!1),s.removeQuotedMessageReferences(e.message),[...s.pinnedMessages].some(c=>c.id===e.message?.id)&&s.removePinnedMessage(e.message);for(let c in s.read)c!==e.user?.id&&e.message.id===s.read[c].last_read_message_id&&(s.read[c]={...s.read[c],last_read_message_id:void 0})}break;case"message.deleted_for_me":e.message&&(s.removeMessage(e.message),s.removeQuotedMessageReferences(e.message),[...s.pinnedMessages].some(c=>c.id===e.message?.id)&&s.removePinnedMessage(e.message));break;case"message.new":if(e.message){let c=e.user?.id===this.getClient().user?.id,p=!!e.message.parent_id;if(!i.find(g=>g.id===e.user?.id)&&e.user?.id){let g=await this.getClient().queryUser(e.user.id);i.push(g)}let m=W(e.user?.id||"",i);if(e.message.user=m,e.message?.quoted_message){let g=W(e.message.quoted_message.user?.id||"",i);e.message.quoted_message.user=g}if(e.user=m,(this.state.isUpToDate||p)&&s.addMessageSorted(e.message,c),c||p)break;if(e.user?.id)for(let g in s.read)g===e.user.id?s.read[e.user.id]={last_read:new Date(e.created_at),user:e.user,unread_messages:0}:s.read[g].unread_messages+=1;this._countMessageAsUnread(e.message)&&(s.unreadCount=s.unreadCount+1)}break;case"message.updated":if(e.message){let c=W(e.user?.id||"",i),p=W(e.message.user?.id||"",i);if(e.user=c,e.message.user=p,e.message?.quoted_message){let u=W(e.message.quoted_message.user?.id||"",i);e.message.quoted_message.user=u}e.message?.latest_reactions&&(e.message.latest_reactions=H(e.message.latest_reactions||[],i)),this._extendEventWithOwnReactions(e),s.addMessageSorted(e.message,!1,!1),e.message.pinned?s.addPinnedMessage(e.message):s.removePinnedMessage(e.message)}break;case"message.pinned":if(e.message){let c=W(e.message.user?.id||"",i);e.message.user=c,s.addPinnedMessage(e.message),s.addMessageSorted(e.message,!1,!1)}break;case"message.unpinned":if(e.message){let c=W(e.message.user?.id||"",i);e.message.user=c,s.removePinnedMessage(e.message),s.addMessageSorted(e.message,!1,!1)}break;case"channel.truncate":if(e.channel?.created_at){let c=+new Date(e.channel.created_at);s.messageSets.forEach((p,u)=>{p.messages.forEach(({created_at:m,id:f})=>{c>+m&&s.removeMessage({id:f,messageSetIndex:u})})}),s.pinnedMessages.forEach(({id:p,created_at:u})=>{c>+u&&s.removePinnedMessage({id:p})})}else s.clearMessages();s.unreadCount=0,e.message&&(s.addMessageSorted(e.message),e.message.pinned&&s.addPinnedMessage(e.message));break;case"member.added":if(e.member?.user_id){let c=W(e.member.user_id,i);e.member.user=c,s.members[e.member.user_id]=e.member,e.member.user?.id===this.getClient().user?.id&&(s.membership=e.member)}break;case"member.updated":if(e.member?.user_id){let c=W(e.member.user_id,i);e.member.user=c,s.members[e.member.user_id]=e.member,s.membership=e.member}break;case"member.removed":e.member?.user_id?delete s.members[e.member.user_id]:e.user?.id&&delete s.members[e.user.id];break;case"channel.updated":e.channel&&(t.data={...t.data,...e.channel,own_capabilities:e.channel?.own_capabilities??t.data?.own_capabilities});break;case"pollchoice.new":if(e.message){let c=W(e.message.user?.id||"",i);e.message.user=c,s.addMessageSorted(e.message,!1,!1)}break;case"reaction.new":if(e.message&&e.reaction){let c=W(e.message.user?.id||"",i),p=W(e.reaction.user?.id||"",i);if(e.message.user=c,e.message.latest_reactions=H(e.message.latest_reactions||[],i),e.reaction.user=p,e.message?.quoted_message){let u=W(e.message.quoted_message.user?.id||"",i);e.message.quoted_message.user=u}e.message=s.addReaction(e.reaction,e.message)}break;case"reaction.deleted":if(e.user=W(e.user?.id||"",i),e.message){if(e.message?.quoted_message){let c=W(e.message.quoted_message.user?.id||"",i);e.message.quoted_message.user=c}e.message.user=W(e.message.user?.id||"",i),e.message.latest_reactions?.map(c=>(c.user=W(c.user?.id||"",i),c))}e.reaction&&(e.reaction.user=W(e.reaction.user?.id||"",i),e.message=s.removeReaction(e.reaction,e.message));break;case"member.joined":case"notification.invite_accepted":if(e.member?.user_id){if(!i.find(u=>u.id===e.member?.user_id)){let u=await this.getClient().queryUser(e.member?.user_id);i.push(u)}let p=W(e.member.user_id,i);e.member.user=p,e.member.user_id===this.getClient().user?.id&&(s.membership=e.member,this.state.membership=e.member),s.members[e.member.user_id]=e.member,t.data={...t.data,member_count:Number(t.data?.member_count)+1,members:t.data?.members?[...t.data.members,e.member]:[e.member]},this.offlineMode=!0,this.initialized=!0}break;case"notification.invite_rejected":e.member?.user_id&&delete s.members[e.member.user_id];break;case"notification.invite_messaging_skipped":if(e.member?.user_id){let c=W(e.member.user_id,i);e.member.user=c,e.member.user_id===this.getClient().user?.id&&(s.membership=e.member,this.state.membership=e.member),s.members[e.member.user_id]=e.member}break;case"member.promoted":case"member.demoted":case"member.banned":case"member.unbanned":case"member.blocked":case"member.unblocked":if(e.member?.user_id){let c=W(e.member.user_id,i);e.member.user=c,s.members[e.member.user_id]=e.member,e.member.user_id===this.getClient().user?.id&&(s.membership=e.member,this.state.membership=e.member)}break;case"channel.pinned":t.data&&(t.data.is_pinned=!0);break;case"channel.unpinned":t.data&&(t.data.is_pinned=!1);break;case"channel.topic.disabled":t.data&&(t.data.topics_enabled=!1),e.user=W(e.user?.id||"",i);break;case"channel.topic.enabled":t.data&&(t.data.topics_enabled=!0),e.user=W(e.user?.id||"",i);break;case"channel.topic.created":let a=e.channel?.members||[],r=H(a,i),o={channel:e.channel,members:r,messages:[],pinned_messages:[]},l=this.getClient().channel(e.channel_type||"",e.channel_id||"");l.data=e.channel,l._initializeState(o,"latest"),s.topics?.unshift(l);break;case"channel.topic.closed":t.data&&(t.data.is_closed_topic=!0),e.user=W(e.user?.id||"",i);break;case"channel.topic.reopen":t.data&&(t.data.is_closed_topic=!1),e.user=W(e.user?.id||"",i);break;case"channel.topic.updated":t.data&&(t.data.name=e.channel?.name,t.data.image=e.channel?.image,t.data.description=e.channel?.description),e.user=W(e.user?.id||"",i);break;default:}e.watcher_count!==void 0&&(t.state.watcher_count=e.watcher_count)}_callChannelListeners=e=>{let t=this,s=[];t.listeners.all&&s.push(...t.listeners.all),t.listeners[e.type]&&s.push(...t.listeners[e.type]);for(let i of s)typeof i!="string"&&i(e)};_channelURL=()=>{if(!this.id)throw new Error("channel id is not defined");return`${this.getClient().baseURL}/channels/${this.type}/${this.id}`};_checkInitialized(){if(!this.initialized&&!this.offlineMode)throw Error(`Channel ${this.cid} hasn't been initialized yet. Make sure to call .watch() and wait for it to resolve`)}_initializeState(e,t="latest",s){let{state:i,user:a,userID:r}=this.getClient();if(e.channel.members)for(let u of e.channel.members)u.user&&(s&&s(u.user.id),i.updateUserReference(u.user,this.cid));this.state.membership=e.membership||{};let o=new Map,l=[];e.messages||(e.messages=[]);for(let u of e.messages)o.has(u.id)||(o.set(u.id,!0),l.push(u));this.state.pinnedMessages&&(this.state.pinnedMessages=[]),this.state.addPinnedMessages(e.pinned_messages||[]);let c=l||[];this.state.messages||this.state.initMessages();let{messageSet:p}=this.state.addMessagesSorted(c,!1,!0,!0,t);if(e.watcher_count!==void 0&&(this.state.watcher_count=e.watcher_count),e.watchers)for(let u of e.watchers)u&&(i.updateUserReference(u,this.cid),this.state.watchers[u.id]=u);if(r!=null){let u=this.state.last_message_at||new Date;a&&(this.state.read[a.id]={user:a,last_read:u,unread_messages:0})}if(e.read)for(let u of e.read)this.state.read[u.user.id]={last_read:new Date(u.last_read),last_read_message_id:u.last_read_message_id,unread_messages:u.unread_messages??0,user:u.user,last_send:u.last_send},u.user.id===a?.id&&(this.state.unreadCount=this.state.read[u.user.id].unread_messages);if(e.channel.members&&(this.state.members=e.channel.members.reduce((u,m)=>(m.user&&(u[m.user.id]=m),u),{})),e.channel.type==="team"&&e.channel.topics_enabled&&e.topics){let u=Object.values(this.getClient().state.users);this._processTopics(e.topics,u)}return{messageSet:p}}_extendEventWithOwnReactions(e){if(!e.message)return;let t=this.state.findMessage(e.message.id,e.message.parent_id);t&&(e.message.own_reactions=t.own_reactions)}_disconnect(){this._client.logger("info",`channel:disconnect() - Disconnecting the channel ${this.cid}`,{tags:["connection","channel"],channel:this}),this.disconnected=!0,this.state.setIsUpToDate(!1)}};var cn=class{users;userChannelReferences;constructor(){this.users={},this.userChannelReferences={}}updateUsers(e){for(let t of e)this.updateUser(t)}updateUser(e){if(e!=null)if(this.users[e.id]){let t={...this.users[e.id],...e};this.users[e.id]=t}else this.users[e.id]=e}updateUserReference(e,t){e!=null&&(this.userChannelReferences[e.id]||(this.userChannelReferences[e.id]={}),this.userChannelReferences[e.id][t]=!0)}deleteAllChannelReference(e){for(let t in this.userChannelReferences)delete this.userChannelReferences[t][e]}};var Gp=Re(qp());var yg=n=>n.code!==void 0,wg=n=>n.error!==void 0,Jn=class{client;connectionOpen;consecutiveFailures;pingInterval;healthCheckTimeoutRef;isConnecting;isDisconnected;isHealthy;isResolved;lastEvent;connectionCheckTimeout;connectionCheckTimeoutRef;rejectPromise;requestID;resolvePromise;totalFailures;ws;wsID;constructor({client:e}){this.client=e,this.consecutiveFailures=0,this.totalFailures=0,this.isConnecting=!1,this.isDisconnected=!1,this.isResolved=!1,this.isHealthy=!1,this.wsID=1,this.lastEvent=null,this.pingInterval=25*1e3,this.connectionCheckTimeout=this.pingInterval+10*1e3,jl(this.onlineStatusChanged)}_log(e,t={},s="info"){this.client.logger(s,"connection:"+e,{tags:["connection"],...t})}setClient(e){this.client=e}async connect(e=15e3){if(this.isConnecting)throw Error("You've called connect twice, can only attempt 1 connection at the time");this.isDisconnected=!1;try{let t=await this._connect();this.consecutiveFailures=0,this._log(`connect() - Established ws connection with healthcheck: ${t}`)}catch(t){if(this.isHealthy=!1,this.consecutiveFailures+=1,t.code===dt.TOKEN_EXPIRED)this._log("connect() - WS failure due to expired token");else if(!t.isWSFailure)throw new Error(JSON.stringify({code:t.code,StatusCode:t.StatusCode,message:t.message,isWSFailure:t.isWSFailure}))}return await this._waitForHealthy(e)}async _waitForHealthy(e=15e3){return Promise.race([(async()=>{for(let s=0;s<=e;s+=50)try{return await this.connectionOpen}catch(i){if(s===e)throw new Error(JSON.stringify({code:i.code,StatusCode:i.StatusCode,message:i.message,isWSFailure:i.isWSFailure}));await rn(50)}})(),(async()=>{throw await rn(e),this.isConnecting=!1,new Error(JSON.stringify({code:"",StatusCode:"",message:"initial WS connection could not be established",isWSFailure:!0}))})()])}_buildUrl=()=>{let e=encodeURIComponent(this.client._buildWSPayload(this.requestID)),t=this.client.tokenManager.getToken(),s=`${this.client.wsBaseURL}/connect?json=${e}&api_key=${this.client.apiKey}&authorization=${t}&stream-auth-type=${this.client.getAuthType()}&X-Stream-Client=${this.client.getUserAgent()}`;return s=encodeURI(s),s};disconnect(e){this._log(`disconnect() - Closing the websocket connection for wsID ${this.wsID}`),this.wsID+=1,this.isConnecting=!1,this.isDisconnected=!0,this.healthCheckTimeoutRef&&clearInterval(this.healthCheckTimeoutRef),this.connectionCheckTimeoutRef&&clearInterval(this.connectionCheckTimeoutRef),Nl(this.onlineStatusChanged),this.isHealthy=!1,this.ws&&this.ws.removeAllListeners&&this.ws.removeAllListeners();let t,{ws:s}=this;return s&&s.close&&s.readyState===s.OPEN?(t=new Promise(i=>{let a=r=>{this._log(`disconnect() - resolving isClosedPromise ${r?"with":"without"} close frame`,{event:r}),i()};s.onclose=a,setTimeout(a,e??1e3)}),this._log("disconnect() - Manually closed connection by calling client.disconnect()"),s.close(dt.WS_CLOSED_SUCCESS,"Manually closed connection by calling client.disconnect()")):(this._log("disconnect() - ws connection doesn't exist or it is already closed."),t=Promise.resolve()),delete this.ws,t}async _connect(){if(this.isConnecting)return;this.isConnecting=!0,this.requestID=Ue();let e=!1;try{this._log("_connect() - waiting for token"),await this.client.tokenManager.tokenReady(),e=!0}catch{}try{this._setupConnectionPromise();let t=this._buildUrl();this._log(`_connect() - Connecting to ${t}`,{wsURL:t,requestID:this.requestID}),this.ws=new Gp.default(t),this.ws.onopen=this.onopen.bind(this,this.wsID),this.ws.onclose=this.onclose.bind(this,this.wsID),this.ws.onerror=this.onerror.bind(this,this.wsID),this.ws.onmessage=this.onmessage.bind(this,this.wsID);let s=await this.connectionOpen;if(this.isConnecting=!1,s)return s}catch(t){throw this.isConnecting=!1,this._log("_connect() - Error - ",t),t}}async _reconnect(e={}){if(this._log("_reconnect() - Initiating the reconnect"),this.isConnecting||this.isHealthy){this._log("_reconnect() - Abort (1) since already connecting or healthy");return}let t=e.interval;if(t||(t=Ms(this.consecutiveFailures)),await rn(t),this.isConnecting||this.isHealthy){this._log("_reconnect() - Abort (2) since already connecting or healthy");return}if(this.isDisconnected){this._log("_reconnect() - Abort (3) since disconnect() is called");return}this._log("_reconnect() - Destroying current WS connection"),this._destroyCurrentWSConnection();try{await this._connect(),this._log("_reconnect() - Waiting for recoverCallBack"),await this.client.recoverState(),this._log("_reconnect() - Finished recoverCallBack"),this.consecutiveFailures=0}catch(s){this.isHealthy=!1,this.consecutiveFailures+=1,s.isWSFailure&&(this._log("_reconnect() - WS failure, so going to try to reconnect"),this._reconnect())}this._log("_reconnect() - == END ==")}onlineStatusChanged=e=>{e.type==="offline"?(this._log("onlineStatusChanged() - Status changing to offline"),this._setHealth(!1)):e.type==="online"&&(this._log(`onlineStatusChanged() - Status changing to online. isHealthy: ${this.isHealthy}`),this.isHealthy||this._reconnect({interval:10}))};onopen=e=>{this.wsID===e&&this._log("onopen() - onopen callback",{wsID:e})};onmessage=(e,t)=>{if(this.wsID!==e)return;this._log("onmessage() - onmessage callback",{event:t,wsID:e});let s=typeof t.data=="string"?JSON.parse(t.data):null;if(!this.isResolved&&s){if(this.isResolved=!0,s.error){this.rejectPromise?.(this._errorFromWSEvent(s,!1));return}this.resolvePromise?.(s),this._setHealth(!0)}this.lastEvent=new Date,s&&s.type==="health.check"&&this.scheduleNextPing(),this.client.handleEvent(t),this.scheduleConnectionCheck()};onclose=(e,t)=>{if(this.wsID===e)if(this._log("onclose() - onclose callback - "+t.code,{event:t,wsID:e}),t.code===dt.WS_CLOSED_SUCCESS){let s=new Error(`WS connection reject with error ${t.reason}`);s.reason=t.reason,s.code=t.code,s.wasClean=t.wasClean,s.target=t.target,this.rejectPromise?.(s),this._log(`onclose() - WS connection reject with error ${t.reason}`,{event:t})}else this.consecutiveFailures+=1,this.totalFailures+=1,this._setHealth(!1),this.isConnecting=!1,this.rejectPromise?.(this._errorFromWSEvent(t)),this._log("onclose() - WS connection closed. Calling reconnect ...",{event:t}),this._reconnect()};onerror=(e,t)=>{this.wsID===e&&(this.consecutiveFailures+=1,this.totalFailures+=1,this._setHealth(!1),this.isConnecting=!1,this.rejectPromise?.(this._errorFromWSEvent(t)),this._log("onerror() - WS connection resulted into error",{event:t}),this._reconnect())};_setHealth=e=>{if(e!==this.isHealthy){if(this.isHealthy=e,this.isHealthy){this.client.dispatchEvent({type:"connection.changed",online:this.isHealthy});return}setTimeout(()=>{this.isHealthy||this.client.dispatchEvent({type:"connection.changed",online:this.isHealthy})},1e3)}};_errorFromWSEvent=(e,t=!0)=>{let s,i,a;yg(e)&&(s=e.code,i="unknown",a=e.reason),wg(e)&&(s=e.error.code,i=e.error.StatusCode,a=e.error.message),this._log(`_errorFromWSEvent() - WS failed with code ${s}`,{event:e},"warn");let r=new Error(`WS failed with code ${s} and reason - ${a}`);return r.code=s,r.StatusCode=i,r.isWSFailure=t,r};_destroyCurrentWSConnection(){this.wsID+=1;try{this?.ws?.removeAllListeners(),this?.ws?.close()}catch{}}_setupConnectionPromise=()=>{this.isResolved=!1,this.connectionOpen=new Promise((e,t)=>{this.resolvePromise=e,this.rejectPromise=t})};scheduleNextPing=()=>{this.healthCheckTimeoutRef&&clearTimeout(this.healthCheckTimeoutRef),this.healthCheckTimeoutRef=setTimeout(()=>{let e=[{type:"health.check",client_id:this.client.clientID}];try{this.ws?.send(JSON.stringify(e))}catch{}},this.pingInterval)};scheduleConnectionCheck=()=>{this.connectionCheckTimeoutRef&&clearTimeout(this.connectionCheckTimeoutRef),this.connectionCheckTimeoutRef=setTimeout(()=>{let e=new Date;this.lastEvent&&e.getTime()-this.lastEvent.getTime()>this.connectionCheckTimeout&&(this._log("scheduleConnectionCheck - going to reconnect"),this._setHealth(!1),this._reconnect())},this.connectionCheckTimeout)}};var Xn=class{loadTokenPromise;token;user;constructor(){this.loadTokenPromise=null}setTokenOrProvider=async(e,t)=>{this.user=t,typeof e=="string"&&(this.token=e),this.loadTokenPromise=Promise.resolve(this.token)};reset=()=>{this.token=void 0,this.user=void 0,this.loadTokenPromise=null};tokenReady=()=>this.loadTokenPromise;getToken=()=>this.token};function Vs(n){return!n.status||n.status<200||300<=n.status}var Ks=Re(Bp());var Pt=class extends Error{code;response;status},Wa=(c=>(c.CREATE_CALL="create-call",c.ACCEPT_CALL="accept-call",c.SIGNAL_CALL="signal-call",c.CONNECT_CALL="connect-call",c.HEALTH_CALL="health-call",c.END_CALL="end-call",c.REJECT_CALL="reject-call",c.MISS_CALL="miss-call",c.UPGRADE_CALL="upgrade-call",c))(Wa||{}),Va=(i=>(i.RINGING="ringing",i.ENDED="ended",i.CONNECTED="connected",i.ERROR="error",i))(Va||{}),Ha=(u=>(u[u.VIDEO_CONFIG=0]="VIDEO_CONFIG",u[u.AUDIO_CONFIG=1]="AUDIO_CONFIG",u[u.VIDEO_KEY=2]="VIDEO_KEY",u[u.VIDEO_DELTA=3]="VIDEO_DELTA",u[u.AUDIO=4]="AUDIO",u[u.ORIENTATION=5]="ORIENTATION",u[u.CONNECTED=6]="CONNECTED",u[u.TRANSCEIVER_STATE=7]="TRANSCEIVER_STATE",u[u.REQUEST_CONFIG=8]="REQUEST_CONFIG",u[u.REQUEST_KEY_FRAME=9]="REQUEST_KEY_FRAME",u[u.END_CALL=10]="END_CALL",u))(Ha||{});function Cg(n){return typeof n=="string"||n instanceof String}var Ka=class n{static _instance;activeChannels;axiosInstance;baseURL;userBaseURL;browser;cleaningIntervalRef;clientID;apiKey;projectId;listeners;logger;recoverStateOnReconnect;node;options;setUserPromise;state;tokenManager;user;userAgent;userID;wsBaseURL;wsConnection;wsPromise;consecutiveFailures;defaultWSTimeout;eventSource=null;constructor(e,t,s,i){this.apiKey=e,this.projectId=t,this.listeners={},this.state=new cn;let a=i||{};this.browser=typeof a.browser<"u"?a.browser:typeof window<"u",this.node=!this.browser,this.options={withCredentials:!1,warmUp:!1,recoverStateOnReconnect:!0,...a},this.node&&!this.options.httpsAgent&&(this.options.httpsAgent=new _t.Agent({keepAlive:!0,keepAliveMsecs:3e3})),this.axiosInstance=an.create(this.options),this.setBaseURL(s),this.wsConnection=null,this.wsPromise=null,this.setUserPromise=null,this.activeChannels={},this.tokenManager=new Xn,this.consecutiveFailures=0,this.defaultWSTimeout=15e3,this.axiosInstance.defaults.paramsSerializer=ql,this.logger=Ps(a.logger)?a.logger:()=>null,this.recoverStateOnReconnect=this.options.recoverStateOnReconnect}static getInstance(e,t,s,i){return n._instance||(n._instance=new n(e,t,s,i)),n._instance}async refreshNewToken(e){return await this.post(this.userBaseURL+"/refresh_token",{refresh_token:e})}getAuthType(){return"jwt"}setBaseURL(e){this.baseURL=e,this.userBaseURL=this.options.userBaseURL||e+"/uss/v1",this.wsBaseURL=this.baseURL.replace("http","ws").replace(":3030",":8800")}async getExternalAuthToken(e,t){let s={apikey:this.apiKey,name:e.name};e.avatar&&(s.avatar=e.avatar);let i=this.userBaseURL+"/get_token/external_auth",a=new URLSearchParams(s).toString(),r={"Content-Type":"application/json"};if(t){let l=typeof t=="string"&&t.startsWith("Bearer ")?t:`Bearer ${t}`;r.Authorization=l}let o=await fetch(`${i}?${a}`,{method:"GET",headers:r});if(!o.ok){let l="";try{let c=await o.json();l=c.message||JSON.stringify(c)}catch{l=await o.text()}throw new Error(l)}return await o.json()}connectUser=async(e,t,s)=>{if(this.logger("info","client:connectUser() - started",{tags:["connection","client"]}),!e.id)throw new Error('The "id" field on the user is missing');if(s){let r=await this.getExternalAuthToken(e,t);t=r.token,e.id=r.user_id}if(this.userID===e.id&&this.setUserPromise)return console.warn("Consecutive calls to connectUser is detected, ideally you should only call this function once in your app."),this.setUserPromise;if(this.userID)throw new Error("Use client.disconnect() before trying to connect as a different user. connectUser was called twice.");this.node&&!this.options.allowServerSideConnect&&console.warn('Please do not use connectUser server side. connectUser impacts MAU and concurrent connection usage and thus your bill. If you have a valid use-case, add "allowServerSideConnect: true" to the client options to disable this warning.'),this.userID=e.id;let i=this._setToken(e,t);this._setUser(e),this.state.updateUser({id:e.id,name:e?.name||e.id,avatar:e?.avatar||""});let a=this.openConnection();this.setUserPromise=Promise.all([i,a]).then(r=>r[1]);try{let r=await this.setUserPromise;return await this.connectToSSE(),r}catch(r){throw this.disconnectUser(),r}};setUser=this.connectUser;_setToken=(e,t)=>this.tokenManager.setTokenOrProvider(t,e);_setUser(e){this.user={...e},this.userID=e.id}closeConnection=async e=>(this.cleaningIntervalRef!=null&&(clearInterval(this.cleaningIntervalRef),this.cleaningIntervalRef=void 0),await this.wsConnection?.disconnect(e),Promise.resolve());openConnection=async()=>{if(!this.userID)throw Error("User is not set on client, use client.connectUser instead");return this.wsConnection?.isConnecting&&this.wsPromise?(this.logger("info","client:openConnection() - connection already in progress",{tags:["connection","client"]}),this.wsPromise):this.wsConnection?.isHealthy?(this.logger("info","client:openConnection() - openConnection called twice, healthy connection already exists",{tags:["connection","client"]}),Promise.resolve()):(this.clientID=`${this.userID}--${Ue()}`,this.wsPromise=this.connect(),this._startCleaning(),this.wsPromise)};_setupConnection=this.openConnection;disconnectUser=async e=>{this.logger("info","client:disconnect() - Disconnecting the client",{tags:["connection","client"]}),delete this.user,delete this.userID;let t=this.closeConnection(e);for(let s of Object.values(this.activeChannels))s._disconnect();return this.activeChannels={},this.state=new cn,setTimeout(this.tokenManager.reset),t};disconnect=this.disconnectUser;on(e,t){let s=t?e:"all",i=t||e;return s in this.listeners||(this.listeners[s]=[]),this.logger("info",`Attaching listener for ${s} event`,{tags:["event","client"]}),this.listeners[s].push(i),{unsubscribe:()=>{this.logger("info",`Removing listener for ${s} event`,{tags:["event","client"]}),this.listeners[s]=this.listeners[s].filter(a=>a!==i)}}}off(e,t){let s=t?e:"all",i=t||e;s in this.listeners||(this.listeners[s]=[]),this.logger("info",`Removing listener for ${s} event`,{tags:["event","client"]}),this.listeners[s]=this.listeners[s].filter(a=>a!==i)}_logApiRequest(e,t,s,i){this.logger("info",`client: ${e} - Request - ${t}- ${JSON.stringify(s)} - ${JSON.stringify(i.params)}`,{tags:["api","api_request","client"],url:t,payload:s,config:i})}_logApiResponse(e,t,s){this.logger("info",`client:${e} - Response - url: ${t} > status ${s.status}`,{tags:["api","api_response","client"],url:t,response:s})}_logApiError(e,t,s,i){this.logger("error",`client:${e} - Error: ${JSON.stringify(s)} - url: ${t} - options: ${JSON.stringify(i)}`,{tags:["api","api_response","client"],url:t,error:s})}doAxiosRequest=async(e,t,s,i={})=>{await this.tokenManager.tokenReady();let a=this._enrichAxiosOptions(i);try{let r;switch(this._logApiRequest(e,t,s,a),e){case"get":r=await this.axiosInstance.get(t,a);break;case"delete":r=await this.axiosInstance.delete(t,a);break;case"post":r=await this.axiosInstance.post(t,s,a);break;case"postForm":r=await this.axiosInstance.postForm(t,s,a);break;case"put":r=await this.axiosInstance.put(t,s,a);break;case"patch":r=await this.axiosInstance.patch(t,s,a);break;case"options":r=await this.axiosInstance.options(t,a);break;default:throw new Error("Invalid request type")}return this._logApiResponse(e,t,r),this.consecutiveFailures=0,this.handleResponse(r)}catch(r){if(r.client_request_id=a.headers?.["x-client-request-id"],this._logApiError(e,t,r,i),this.consecutiveFailures+=1,r.response)return this.handleResponse(r.response);throw r}};get(e,t){return this.doAxiosRequest("get",e,null,{params:t})}put(e,t){return this.doAxiosRequest("put",e,t)}post(e,t,s){return this.doAxiosRequest("post",e,t,{params:s})}patch(e,t){return this.doAxiosRequest("patch",e,t)}delete(e,t){return this.doAxiosRequest("delete",e,null,{params:t})}sendFile(e,t,s,i,a){let r=Ml(t,s,i||"multipart/form-data");return a!=null&&r.append("user",JSON.stringify(a)),this.doAxiosRequest("postForm",e,r,{headers:r.getHeaders?r.getHeaders():{},config:{timeout:0,maxContentLength:1/0,maxBodyLength:1/0}})}errorFromResponse(e){let t;return t=new Pt(`ErmisChat error HTTP code: ${e.status}`),e.data&&e.data.code&&(t=new Error(`ErmisChat error code ${e.data.code}: ${e.data.message}`),t.code=e.data.code),t.response=e,t.status=e.status,t}handleResponse(e){let t=e.data;if(Vs(e))throw this.errorFromResponse(e);return t}dispatchEvent=e=>{if(e.received_at||(e.received_at=new Date),e.type==="channel.created")this._handleChannelCreatedEvent(e).then(()=>{this._afterDispatchEvent(e)});else{let t=this._handleClientEvent(e),s=e.cid,i=s?this.activeChannels[s]:void 0;i&&i._handleChannelEvent(e),this._callClientListeners(e),i&&i._callChannelListeners(e),t.forEach(a=>a())}};_afterDispatchEvent(e){let t=this._handleClientEvent(e),s=e.cid,i=s?this.activeChannels[s]:void 0;i&&i._handleChannelEvent(e),this._callClientListeners(e),i&&i._callChannelListeners(e),t.forEach(a=>a())}async _handleChannelCreatedEvent(e){let t=e.channel?.members||[];await jn(this,t);let s=Object.values(this.state.users),i=H(t,s),a=e.channel_type==="messaging"?It(i,this.userID||""):e.channel?.name,r={...e.channel,members:i,name:a},o={channel:r,members:i,messages:[],pinned_messages:[]},l=this.channel(e.channel_type||"",e.channel_id||"");l.data=r,l._initializeState(o,"latest")}handleEvent=e=>{let t=e.data,s=JSON.parse(t);this.dispatchEvent(s)};_updateMemberWatcherReferences=e=>{let t=this.state.userChannelReferences[e.id]||{};for(let s in t){let i=this.activeChannels[s];i?.state&&(i.state.members[e.id]&&(i.state.members[e.id].user=e),i.state.watchers[e.id]&&(i.state.watchers[e.id]=e),i.state.read[e.id]&&(i.state.read[e.id].user=e))}};_updateUserReferences=this._updateMemberWatcherReferences;_updateUserMessageReferences=e=>{let t=this.state.userChannelReferences[e.id]||{};for(let s in t){let i=this.activeChannels[s];if(!i)continue;i.state?.updateUserMessages(e)}};_deleteUserMessageReference=(e,t=!1)=>{let s=this.state.userChannelReferences[e.id]||{};for(let i in s)this.activeChannels[i].state?.deleteUserMessages(e,t)};_handleClientEvent(e){let t=this,s=[];if(this.logger("info",`client:_handleClientEvent - Received event of type { ${e.type} }`,{tags:["event","client"],event:e}),e.type==="health.check"&&e.me,(e.type==="channel.deleted"||e.type==="notification.channel_deleted")&&e.cid){t.state.deleteAllChannelReference(e.cid),this.activeChannels[e.cid]?._disconnect(),s.push(()=>{e.cid&&delete this.activeChannels[e.cid]});for(let i of Object.values(this.activeChannels))i.type==="team"&&i.state.topics?.some(a=>a.cid===e.cid)&&(i.state.topics=i.state.topics.filter(a=>a.cid!==e.cid))}return e.type==="notification.invite_rejected"&&e.member?.user_id===this.userID&&e.cid&&(t.state.deleteAllChannelReference(e.cid),this.activeChannels[e.cid]?._disconnect(),s.push(()=>{e.cid&&delete this.activeChannels[e.cid]})),e.type,e.type==="member.added"&&e.member?.user_id===this.userID&&this.channel(e.channel_type||"",e.channel_id||"").watch().catch(a=>{this.logger("error","Failed to watch channel after member.added",{err:a,event:e})}),e.type==="connection.recovered"&&s.push(()=>{Object.values(this.activeChannels).forEach(i=>{if(!i.state?.messages)return;i.state.messages.filter(r=>r.status==="failed_offline"&&r.user?.id===this.userID&&(!r.attachments||r.attachments.length===0)).forEach(r=>{r.id&&i.retryMessage(r.id).catch(o=>{this.logger("error",`Failed to auto-resend offline message ${r.id}`,{tags:["offline","retry"],err:o})})})})}),s}_callClientListeners=e=>{let t=this,s=[];t.listeners.all&&s.push(...t.listeners.all),t.listeners[e.type]&&s.push(...t.listeners[e.type]);for(let i of s)i(e)};recoverState=async()=>{this.logger("info","client:recoverState() - Start of recoverState",{tags:["connection"]});let e=Object.keys(this.activeChannels);if(e.length&&this.recoverStateOnReconnect){this.logger("info",`client:recoverState() - Start the querying of ${e.length} channels`,{tags:["connection","client"]});let t={type:["messaging","team"]},s=[],i={message_limit:25};await this.queryChannels(t,s,i),this.logger("info","client:recoverState() - Querying channels finished",{tags:["connection","client"]}),this.dispatchEvent({type:"connection.recovered"})}else this.dispatchEvent({type:"connection.recovered"});this.wsPromise=Promise.resolve(),this.setUserPromise=Promise.resolve()};async connect(){if(!this.userID||!this.user)throw Error("Call connectUser before starting the connection");if(!this.wsBaseURL)throw Error("Websocket base url not set");if(!this.clientID)throw Error("clientID is not set");this.options.wsConnection&&this.node?(this.options.wsConnection.setClient(this),this.wsConnection=this.options.wsConnection):this.wsConnection=new Jn({client:this});try{return await this.wsConnection.connect(this.defaultWSTimeout)}catch(e){throw e}}async connectToSSE(e){if(this.eventSource){this.logger("info","client:connectToSSE() - SSE connection already established",{});return}let t=this._getToken();t?.startsWith("Bearer ")||(t=`Bearer ${t}`);let s={method:"GET",Authorization:t};this.eventSource=new Ks.EventSourcePolyfill(this.userBaseURL+"/sse/subscribe",{headers:s,heartbeatTimeout:6e4}),this.eventSource.onopen=()=>{this.logger("info","client:connectToSSE() - SSE connection established",{})},this.eventSource.onmessage=i=>{let a=JSON.parse(i.data);if(this.logger("info",`client:connectToSSE() - SSE message received event : ${JSON.stringify(a)}`,{event:i}),a.type==="AccountUserChainProjects"){let r={name:a.name,id:a.id,avatar:a.avatar,about_me:a.about_me,project_id:a.project_id};this.user?.id===r.id&&(this.user={...this.user,...r}),this.state.updateUser(r);let o={id:r.id,name:r.name?r.name:r.id,avatar:r?.avatar||""};this._updateMemberWatcherReferences(o),this._updateUserMessageReferences(o),Object.values(this.activeChannels).forEach(l=>{if(l.data?.type==="messaging"&&Object.keys(l.state.members).length===2){let c=Object.values(l.state.members).find(p=>p.user?.id!==this.userID);c&&c.user?.id===r.id&&(l.data.name=r.name||r.id,l.data.image=r.avatar||"")}}),e&&e(a)}},this.eventSource.onerror=i=>{this.logger("error",`client:connectToSSE() - SSE connection error : ${JSON.stringify(i.data)} `,{event:i}),i.status===401?(this.logger("error","client:connectToSSE() - Unauthorized (401). Aborting the connection.",{}),this.disconnectFromSSE()):(this.eventSource?.readyState===Ks.EventSourcePolyfill.CLOSED||this.eventSource?.readyState===Ks.EventSourcePolyfill.CONNECTING)&&(this.eventSource.close(),setTimeout(()=>{this.logger("info","client:connectToSSE() - Reconnecting to SSE",{}),this.connectToSSE(e)},3e3))}}async disconnectFromSSE(){this.eventSource?(this.eventSource.close(),this.eventSource=null,this.logger("info","client:disconnectFromSSE() - SSE connection closed",{})):this.logger("info","client:disconnectFromSSE() - SSE connection already closed",{})}async queryUsers(e,t){let s={presence:!1};await this.wsPromise;let i=this.projectId,a=await this.get(this.userBaseURL+"/users",{project_id:i,page:t,page_size:e});return this.state.updateUsers(a.data),a}async queryUser(e){let t=this.projectId,s=await this.get(this.userBaseURL+"/users/"+e,{project_id:t});return this.state.updateUser(s),s}async getBatchUsers(e,t,s){let i=this.projectId,a=await this.post(this.userBaseURL+"/users/batch?page=1&page_size=10000",{users:e,project_id:i},{page:t,page_size:s});return this.state.updateUsers(a.data),a.data||[]}async searchUsers(e,t,s){let i=this.projectId;return await this.post(this.userBaseURL+"/users/search",void 0,{page:e,page_size:t,name:s,project_id:i})}async queryContacts(){let e=this.projectId,s=(await this.post(this.baseURL+"/contacts/list",{project_id:e})).project_id_user_ids[e],i=[],a=[];return s.forEach(r=>{let o=r.other_id,l=this.state.users[o],c=l||{id:o};switch(r.relation_status){case"blocked":a.push(c);break;case"normal":i.push(c);break;default:}}),{contact_users:i,block_users:a}}_updateProjectID(e){this.projectId=e}async uploadFile(e){let t=new FormData;t.append("avatar",e);let s=await this.post(this.userBaseURL+"/users/upload",t,{headers:{"Content-Type":"multipart/form-data"}});if(this.user){this.user.avatar=s.avatar;let i={...this.user,avatar:s.avatar};this.state.updateUser(i)}return s}async updateProfile(e,t){let s={name:e,about_me:t},i=await this.patch(this.userBaseURL+"/users/update",s);return this.user=i,this.state.updateUser(i),i}async queryChannels(e,t=[],s={},i={}){await this.wsPromise;let a=this.projectId,r={filter_conditions:{...e,project_id:a},sort:t,...s},o=await this.post(this.baseURL+"/channels",r);o.channels.sort((m,f)=>{let g=Dt(m.messages);if(m.channel.type==="team"&&Array.isArray(m.topics))for(let _ of m.topics)g=Math.max(g,Dt(_.messages));let v=Dt(f.messages);if(f.channel.type==="team"&&Array.isArray(f.topics))for(let _ of f.topics)v=Math.max(v,Dt(_.messages));return v-g});let l=Array.from(new Set(o.channels.flatMap(m=>(m.channel.members||[]).map(f=>f.user.id))))||[],c=e.parent_cid?Object.values(this.state.users):await this.getBatchUsers(l);o.channels.forEach(m=>{m.channel.members=H(m.channel.members,c),m.messages=H(m.messages,c),m.read=H(m.read||[],c),m.channel.name=m.channel.type==="messaging"?It(m.channel.members,this.userID||""):m.channel.name,m.channel.image=m.channel.type==="messaging"?Mn(m.channel.members,this.userID||""):m.channel.image,m.channel.type==="team"&&Array.isArray(m.topics)&&m.topics.sort((f,g)=>{let v=Dt(f.messages);return Dt(g.messages)-v}),m.pinned_messages&&(m.pinned_messages=H(m.pinned_messages||[],c))});let{channels:p,userIds:u}=this.hydrateChannels(o.channels,i);return console.log("---channels---",p),p}hydrateChannels(e=[],t={}){let{skipInitialization:s,offlineMode:i=!1}=t,a=[],r=[];for(let o of e){let l=this.channel(o.channel.type,o.channel.id);l.data={...o.channel,is_pinned:o.is_pinned||!1},l.offlineMode=i,l.initialized=!i,s===void 0?l._initializeState(o,"latest",c=>{r.includes(c)||r.push(c)}):s.includes(o.channel.id)||(l.state.clearMessages(),l._initializeState(o,"latest",c=>{r.includes(c)||r.push(c)})),a.push(l)}return{channels:a,userIds:r}}async searchPublicChannel(e,t=0,s=25){let i=this.projectId;return await this.post(this.baseURL+"/channels/public/search",{project_id:i,search_term:e,limit:s,offset:t})}async pinChannel(e,t){return await this.post(this.baseURL+`/channels/${e}/${t}/pin`)}async unpinChannel(e,t){return await this.post(this.baseURL+`/channels/${e}/${t}/unpin`)}channel(e,t,s={}){if(!this.userID)throw Error("Call connectUser before creating a channel");if(~e.indexOf(":"))throw Error(`Invalid channel group ${e}, can't contain the : character`);return this.getChannelById(e,t,s)}getChannelById=(e,t,s)=>{let i=`${e}:${t}`;if(i in this.activeChannels&&!this.activeChannels[i].disconnected){let r=this.activeChannels[i];return Object.keys(s).length>0&&(r.data=s,r._data=s),r}let a=new on(this,e,t,s);return this.activeChannels[a.cid]=a,a};getChannel=(e,t)=>{let s=Ue(),i=`${this.projectId}:${s}`,a=`${e}:${i}`;if(a in this.activeChannels&&!this.activeChannels[a].disconnected){let o=this.activeChannels[a];return Object.keys(t).length>0&&(o.data=t,o._data=t),o}let r=new on(this,e,i,t);return this.activeChannels[r.cid]=r,r};_normalizeExpiration(e){let t=null;if(typeof e=="number"){let s=new Date;s.setSeconds(s.getSeconds()+e),t=s.toISOString()}else Cg(e)?t=e:e instanceof Date&&(t=e.toISOString());return t}getUserAgent(){return this.userAgent||`ermis-chat-sdk-javascript-client-${this.node?"node":"browser"}-1.0.1`}setUserAgent(e){this.userAgent=e}_enrichAxiosOptions(e={params:{},headers:{},config:{}}){let t=this._getToken();t?.startsWith("Bearer ")||(t=`Bearer ${t}`);let s=t?{Authorization:t}:void 0;e.headers?.["x-client-request-id"]||(e.headers={...e.headers,"x-client-request-id":Ue()});let{params:i,headers:a,...r}=this.options.axiosRequestConfig||{};return{params:{...e.params,...i||{}},headers:{...s,"stream-auth-type":this.getAuthType(),"X-Stream-Client":this.getUserAgent(),...e.headers,...a||{}},...e.config,...r||{}}}_getToken(){return this.tokenManager?this.tokenManager.getToken():null}_startCleaning(){let e=this;this.cleaningIntervalRef==null&&(this.cleaningIntervalRef=setInterval(()=>{for(let t of Object.values(e.activeChannels))t.clean()},500))}_buildWSPayload=e=>JSON.stringify({user_id:this.userID,user_details:this.user,client_request_id:e})};var Eg={"channel.created":!0,"channel.deleted":!0,"channel.truncate":!0,"channel.updated":!0,"channel.pinned":!0,"channel.unpinned":!0,"health.check":!0,"member.added":!0,"member.removed":!0,"member.updated":!0,"member.joined":!0,"member.promoted":!0,"member.demoted":!0,"member.banned":!0,"member.unbanned":!0,"member.blocked":!0,"member.unblocked":!0,"message.deleted":!0,"message.deleted_for_me":!0,"message.new":!0,"message.read":!0,"message.updated":!0,"message.pinned":!0,"message.unpinned":!0,"notification.channel_deleted":!0,"notification.invite_accepted":!0,"notification.invite_rejected":!0,"notification.invite_messaging_skipped":!0,"pollchoice.new":!0,"reaction.deleted":!0,"reaction.new":!0,"typing.start":!0,"typing.stop":!0,"user.watching.start":!0,"user.watching.stop":!0,"connection.changed":!0,"connection.recovered":!0,"capabilities.changed":!0,"channel.topic.disabled":!0,"channel.topic.enabled":!0,"channel.topic.created":!0,"channel.topic.closed":!0,"channel.topic.reopen":!0,"channel.topic.updated":!0};var Kg={},b,Zn=null;function un(){return(Zn===null||Zn.byteLength===0)&&(Zn=new Uint8Array(b.memory.buffer)),Zn}var Js=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Js.decode();var Sg=2146435072,Ja=0;function Rg(n,e){return Ja+=e,Ja>=Sg&&(Js=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Js.decode(),Ja=e),Js.decode(un().subarray(n,n+e))}function _e(n,e){return n=n>>>0,Rg(n,e)}var ct=new Array(128).fill(void 0);ct.push(void 0,null,!0,!1);var es=ct.length;function y(n){es===ct.length&&ct.push(ct.length+1);let e=es;return es=ct[e],ct[e]=n,e}function h(n){return ct[n]}var xe=0,ts=new TextEncoder;"encodeInto"in ts||(ts.encodeInto=function(n,e){let t=ts.encode(n);return e.set(t),{read:n.length,written:t.length}});function Ye(n,e,t){if(t===void 0){let o=ts.encode(n),l=e(o.length,1)>>>0;return un().subarray(l,l+o.length).set(o),xe=o.length,l}let s=n.length,i=e(s,1)>>>0,a=un(),r=0;for(;r<s;r++){let o=n.charCodeAt(r);if(o>127)break;a[i+r]=o}if(r!==s){r!==0&&(n=n.slice(r)),i=t(i,s,s=r+n.length*3,1)>>>0;let o=un().subarray(i+r,i+s),l=ts.encodeInto(n,o);r+=l.written,i=t(i,s,r,1)>>>0}return xe=r,i}var Mt=null;function U(){return(Mt===null||Mt.buffer.detached===!0||Mt.buffer.detached===void 0&&Mt.buffer!==b.memory.buffer)&&(Mt=new DataView(b.memory.buffer)),Mt}function ie(n){return n==null}function Xa(n){let e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){let i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){let i=n.length,a="[";i>0&&(a+=Xa(n[0]));for(let r=1;r<i;r++)a+=", "+Xa(n[r]);return a+="]",a}let t=/\[object ([^\]]+)\]/.exec(toString.call(n)),s;if(t&&t.length>1)s=t[1];else return toString.call(n);if(s=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
21
- ${n.stack}`:s}function K(n,e){try{return n.apply(this,e)}catch(t){b.__wbindgen_export3(y(t))}}function Tg(n){n<132||(ct[n]=es,es=n)}function J(n){let e=h(n);return Tg(n),e}function pn(n,e){return n=n>>>0,un().subarray(n/1,n/1+e)}var Xs=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));function Qn(n,e,t,s){let i={a:n,b:e,cnt:1,dtor:t},a=(...r)=>{i.cnt++;let o=i.a;i.a=0;try{return s(o,i.b,...r)}finally{i.a=o,a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--i.cnt===0&&(i.dtor(i.a,i.b),i.a=0,Xs.unregister(i))},Xs.register(a,i,i),a}function kg(n,e,t,s){let i={a:n,b:e,cnt:1,dtor:t},a=(...r)=>{i.cnt++;try{return s(i.a,i.b,...r)}finally{a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--i.cnt===0&&(i.dtor(i.a,i.b),i.a=0,Xs.unregister(i))},Xs.register(a,i,i),a}function Yn(n,e){let t=e(n.length*1,1)>>>0;return un().set(n,t/1),xe=n.length,t}function Ag(n,e){b.__wasm_bindgen_func_elem_12858(n,e)}function Ig(n,e,t){b.__wasm_bindgen_func_elem_11688(n,e,y(t))}function Dg(n,e){b.__wasm_bindgen_func_elem_6230(n,e)}function Og(n,e,t){b.__wasm_bindgen_func_elem_2287(n,e,y(t))}function Ug(n,e,t){b.__wasm_bindgen_func_elem_12912(n,e,y(t))}function Lg(n,e){b.__wasm_bindgen_func_elem_5748(n,e)}function Fg(n,e,t,s){b.__wasm_bindgen_func_elem_14376(n,e,y(t),y(s))}var Pg=["blob","arraybuffer"],Mg=["bytes"],jg=["default","no-store","reload","no-cache","force-cache","only-if-cached"],Ng=["omit","same-origin","include"],qg=["same-origin","no-cors","cors","navigate"],$p=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>b.__wbg_connectionstats_free(n>>>0,1)),Qs=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,$p.unregister(this),e}free(){let e=this.__destroy_into_raw();b.__wbg_connectionstats_free(e,0)}get rtt_ms(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.__wbg_get_connectionstats_rtt_ms(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getFloat64(s+8,!0);return e===0?void 0:t}finally{b.__wbindgen_add_to_stack_pointer(16)}}set rtt_ms(e){b.__wbg_set_connectionstats_rtt_ms(this.__wbg_ptr,!ie(e),ie(e)?0:e)}get packet_loss(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.__wbg_get_connectionstats_packet_loss(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getFloat64(s+8,!0);return e===0?void 0:t}finally{b.__wbindgen_add_to_stack_pointer(16)}}set packet_loss(e){b.__wbg_set_connectionstats_packet_loss(this.__wbg_ptr,!ie(e),ie(e)?0:e)}constructor(e,t,s){var i=ie(e)?0:Ye(e,b.__wbindgen_export,b.__wbindgen_export2),a=xe;let r=b.connectionstats_new(i,a,!ie(t),ie(t)?0:t,!ie(s),ie(s)?0:s);return this.__wbg_ptr=r>>>0,$p.register(this,this.__wbg_ptr,this),this}get connection_type(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.connectionstats_connection_type(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getInt32(s+4,!0);let i;return e!==0&&(i=_e(e,t).slice(),b.__wbindgen_export4(e,t*1,1)),i}finally{b.__wbindgen_add_to_stack_pointer(16)}}set connection_type(e){var t=ie(e)?0:Ye(e,b.__wbindgen_export,b.__wbindgen_export2),s=xe;b.connectionstats_set_connection_type(this.__wbg_ptr,t,s)}};Symbol.dispose&&(Qs.prototype[Symbol.dispose]=Qs.prototype.free);var zp=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>b.__wbg_ermiscall_free(n>>>0,1)),dn=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,zp.unregister(this),e}free(){let e=this.__destroy_into_raw();b.__wbg_ermiscall_free(e,0)}constructor(){let e=b.ermiscall_new();return this.__wbg_ptr=e>>>0,zp.register(this,this.__wbg_ptr,this),this}spawn(e,t){var s=ie(t)?0:Yn(t,b.__wbindgen_export),i=xe;let a=b.ermiscall_spawn(this.__wbg_ptr,y(e),s,i);return J(a)}getLocalEndpointAddr(){let e=b.ermiscall_getLocalEndpointAddr(this.__wbg_ptr);return J(e)}connect(e){let t=Ye(e,b.__wbindgen_export,b.__wbindgen_export2),s=xe,i=b.ermiscall_connect(this.__wbg_ptr,t,s);return J(i)}closeEndpoint(){let e=b.ermiscall_closeEndpoint(this.__wbg_ptr);return J(e)}closeConnection(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.ermiscall_closeConnection(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getInt32(s+4,!0);if(t)throw J(e)}finally{b.__wbindgen_add_to_stack_pointer(16)}}acceptConnection(){let e=b.ermiscall_acceptConnection(this.__wbg_ptr);return J(e)}sendControlFrame(e){try{let i=b.__wbindgen_add_to_stack_pointer(-16),a=Yn(e,b.__wbindgen_export),r=xe;b.ermiscall_sendControlFrame(i,this.__wbg_ptr,a,r);var t=U().getInt32(i+0,!0),s=U().getInt32(i+4,!0);if(s)throw J(t)}finally{b.__wbindgen_add_to_stack_pointer(16)}}sendAudioFrame(e){try{let i=b.__wbindgen_add_to_stack_pointer(-16),a=Yn(e,b.__wbindgen_export),r=xe;b.ermiscall_sendAudioFrame(i,this.__wbg_ptr,a,r);var t=U().getInt32(i+0,!0),s=U().getInt32(i+4,!0);if(s)throw J(t)}finally{b.__wbindgen_add_to_stack_pointer(16)}}sendFrame(e){try{let i=b.__wbindgen_add_to_stack_pointer(-16),a=Yn(e,b.__wbindgen_export),r=xe;b.ermiscall_sendFrame(i,this.__wbg_ptr,a,r);var t=U().getInt32(i+0,!0),s=U().getInt32(i+4,!0);if(s)throw J(t)}finally{b.__wbindgen_add_to_stack_pointer(16)}}notifyNewGop(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.ermiscall_notifyNewGop(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getInt32(s+4,!0);if(t)throw J(e)}finally{b.__wbindgen_add_to_stack_pointer(16)}}recv(){try{let i=b.__wbindgen_add_to_stack_pointer(-16);b.ermiscall_recv(i,this.__wbg_ptr);var e=U().getInt32(i+0,!0),t=U().getInt32(i+4,!0),s=U().getInt32(i+8,!0);if(s)throw J(t);return J(e)}finally{b.__wbindgen_add_to_stack_pointer(16)}}asyncRecv(){let e=b.ermiscall_asyncRecv(this.__wbg_ptr);return J(e)}beginWithGop(e){try{let i=b.__wbindgen_add_to_stack_pointer(-16),a=Yn(e,b.__wbindgen_export),r=xe;b.ermiscall_beginWithGop(i,this.__wbg_ptr,a,r);var t=U().getInt32(i+0,!0),s=U().getInt32(i+4,!0);if(s)throw J(t)}finally{b.__wbindgen_add_to_stack_pointer(16)}}connectionType(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.ermiscall_connectionType(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getInt32(s+4,!0);let i;return e!==0&&(i=_e(e,t).slice(),b.__wbindgen_export4(e,t*1,1)),i}finally{b.__wbindgen_add_to_stack_pointer(16)}}roundTripTime(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.ermiscall_roundTripTime(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getFloat64(s+8,!0);return e===0?void 0:t}finally{b.__wbindgen_add_to_stack_pointer(16)}}currentPacketLoss(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.ermiscall_currentPacketLoss(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getFloat64(s+8,!0);return e===0?void 0:t}finally{b.__wbindgen_add_to_stack_pointer(16)}}networkChange(){b.ermiscall_networkChange(this.__wbg_ptr)}getStats(){try{let i=b.__wbindgen_add_to_stack_pointer(-16);b.ermiscall_getStats(i,this.__wbg_ptr);var e=U().getInt32(i+0,!0),t=U().getInt32(i+4,!0),s=U().getInt32(i+8,!0);if(s)throw J(t);return J(e)}finally{b.__wbindgen_add_to_stack_pointer(16)}}};Symbol.dispose&&(dn.prototype[Symbol.dispose]=dn.prototype.free);var Gg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>b.__wbg_intounderlyingbytesource_free(n>>>0,1)),Ys=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Gg.unregister(this),e}free(){let e=this.__destroy_into_raw();b.__wbg_intounderlyingbytesource_free(e,0)}get type(){let e=b.intounderlyingbytesource_type(this.__wbg_ptr);return Mg[e]}get autoAllocateChunkSize(){return b.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr)>>>0}start(e){b.intounderlyingbytesource_start(this.__wbg_ptr,y(e))}pull(e){let t=b.intounderlyingbytesource_pull(this.__wbg_ptr,y(e));return J(t)}cancel(){let e=this.__destroy_into_raw();b.intounderlyingbytesource_cancel(e)}};Symbol.dispose&&(Ys.prototype[Symbol.dispose]=Ys.prototype.free);var Bg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>b.__wbg_intounderlyingsink_free(n>>>0,1)),Zs=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Bg.unregister(this),e}free(){let e=this.__destroy_into_raw();b.__wbg_intounderlyingsink_free(e,0)}write(e){let t=b.intounderlyingsink_write(this.__wbg_ptr,y(e));return J(t)}close(){let e=this.__destroy_into_raw(),t=b.intounderlyingsink_close(e);return J(t)}abort(e){let t=this.__destroy_into_raw(),s=b.intounderlyingsink_abort(t,y(e));return J(s)}};Symbol.dispose&&(Zs.prototype[Symbol.dispose]=Zs.prototype.free);var $g=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>b.__wbg_intounderlyingsource_free(n>>>0,1)),ei=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,$g.unregister(this),e}free(){let e=this.__destroy_into_raw();b.__wbg_intounderlyingsource_free(e,0)}pull(e){let t=b.intounderlyingsource_pull(this.__wbg_ptr,y(e));return J(t)}cancel(){let e=this.__destroy_into_raw();b.intounderlyingsource_cancel(e)}};Symbol.dispose&&(ei.prototype[Symbol.dispose]=ei.prototype.free);var zg=new Set(["basic","cors","default"]);async function Wg(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(s){if(n.ok&&zg.has(n.type)&&n.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",s);else throw s}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function Vg(){let n={};return n.wbg={},n.wbg.__wbg_Error_e83987f665cf5504=function(e,t){let s=Error(_e(e,t));return y(s)},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,t){let s=String(h(t)),i=Ye(s,b.__wbindgen_export,b.__wbindgen_export2),a=xe;U().setInt32(e+4,a,!0),U().setInt32(e+0,i,!0)},n.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(e){let t=h(e),s=typeof t=="boolean"?t:void 0;return ie(s)?16777215:s?1:0},n.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(e,t){let s=Xa(h(t)),i=Ye(s,b.__wbindgen_export,b.__wbindgen_export2),a=xe;U().setInt32(e+4,a,!0),U().setInt32(e+0,i,!0)},n.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377=function(e){return typeof h(e)=="function"},n.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(e){let t=h(e);return typeof t=="object"&&t!==null},n.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(e){return typeof h(e)=="string"},n.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(e){return h(e)===void 0},n.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(e,t){return h(e)==h(t)},n.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(e,t){let s=h(t),i=typeof s=="number"?s:void 0;U().setFloat64(e+8,ie(i)?0:i,!0),U().setInt32(e+0,!ie(i),!0)},n.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(e,t){let s=h(t),i=typeof s=="string"?s:void 0;var a=ie(i)?0:Ye(i,b.__wbindgen_export,b.__wbindgen_export2),r=xe;U().setInt32(e+4,r,!0),U().setInt32(e+0,a,!0)},n.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(e,t){throw new Error(_e(e,t))},n.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9=function(e){h(e)._wbg_cb_unref()},n.wbg.__wbg_abort_28ad55c5825b004d=function(e,t){h(e).abort(h(t))},n.wbg.__wbg_abort_e7eb059f72f9ed0c=function(e){h(e).abort()},n.wbg.__wbg_addEventListener_40dc0fc428fc49e1=function(){return K(function(e,t,s,i){h(e).addEventListener(_e(t,s),h(i))},arguments)},n.wbg.__wbg_append_b577eb3a177bc0fa=function(){return K(function(e,t,s,i,a){h(e).append(_e(t,s),_e(i,a))},arguments)},n.wbg.__wbg_body_587542b2fd8e06c0=function(e){let t=h(e).body;return ie(t)?0:y(t)},n.wbg.__wbg_buffer_ccc4520b36d3ccf4=function(e){let t=h(e).buffer;return y(t)},n.wbg.__wbg_byobRequest_2344e6975f27456e=function(e){let t=h(e).byobRequest;return ie(t)?0:y(t)},n.wbg.__wbg_byteLength_bcd42e4025299788=function(e){return h(e).byteLength},n.wbg.__wbg_byteOffset_ca3a6cf7944b364b=function(e){return h(e).byteOffset},n.wbg.__wbg_call_525440f72fbfc0ea=function(){return K(function(e,t,s){let i=h(e).call(h(t),h(s));return y(i)},arguments)},n.wbg.__wbg_call_e762c39fa8ea36bf=function(){return K(function(e,t){let s=h(e).call(h(t));return y(s)},arguments)},n.wbg.__wbg_cancel_48ab6f9dc366e369=function(e){let t=h(e).cancel();return y(t)},n.wbg.__wbg_catch_943836faa5d29bfb=function(e,t){let s=h(e).catch(h(t));return y(s)},n.wbg.__wbg_clearTimeout_15dfc3d1dcb635c6=function(){return K(function(e,t){h(e).clearTimeout(J(t))},arguments)},n.wbg.__wbg_clearTimeout_7a42b49784aea641=function(e){let t=clearTimeout(J(e));return y(t)},n.wbg.__wbg_close_5a6caed3231b68cd=function(){return K(function(e){h(e).close()},arguments)},n.wbg.__wbg_close_6956df845478561a=function(){return K(function(e){h(e).close()},arguments)},n.wbg.__wbg_close_885e277edf06b3fa=function(){return K(function(e){h(e).close()},arguments)},n.wbg.__wbg_code_20d453b11b200026=function(e){return h(e).code},n.wbg.__wbg_code_218f5fdf8c7fcabd=function(e){return h(e).code},n.wbg.__wbg_crypto_574e78ad8b13b65f=function(e){let t=h(e).crypto;return y(t)},n.wbg.__wbg_data_ee4306d069f24f2d=function(e){let t=h(e).data;return y(t)},n.wbg.__wbg_done_2042aa2670fb1db1=function(e){return h(e).done},n.wbg.__wbg_enqueue_7b18a650aec77898=function(){return K(function(e,t){h(e).enqueue(h(t))},arguments)},n.wbg.__wbg_fetch_74a3e84ebd2c9a0e=function(e){let t=fetch(h(e));return y(t)},n.wbg.__wbg_fetch_f8ba0e29a9d6de0d=function(e,t){let s=h(e).fetch(h(t));return y(s)},n.wbg.__wbg_getRandomValues_1c61fac11405ffdc=function(){return K(function(e,t){globalThis.crypto.getRandomValues(pn(e,t))},arguments)},n.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return K(function(e,t){h(e).getRandomValues(h(t))},arguments)},n.wbg.__wbg_getReader_48e00749fe3f6089=function(){return K(function(e){let t=h(e).getReader();return y(t)},arguments)},n.wbg.__wbg_getTime_14776bfb48a1bff9=function(e){return h(e).getTime()},n.wbg.__wbg_get_7bed016f185add81=function(e,t){let s=h(e)[t>>>0];return y(s)},n.wbg.__wbg_get_done_a0463af43a1fc764=function(e){let t=h(e).done;return ie(t)?16777215:t?1:0},n.wbg.__wbg_get_efcb449f58ec27c2=function(){return K(function(e,t){let s=Reflect.get(h(e),h(t));return y(s)},arguments)},n.wbg.__wbg_get_value_5ce96c9f81ce7398=function(e){let t=h(e).value;return y(t)},n.wbg.__wbg_has_787fafc980c3ccdb=function(){return K(function(e,t){return Reflect.has(h(e),h(t))},arguments)},n.wbg.__wbg_headers_b87d7eaba61c3278=function(e){let t=h(e).headers;return y(t)},n.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(e){let t;try{t=h(e)instanceof ArrayBuffer}catch{t=!1}return t},n.wbg.__wbg_instanceof_Blob_23b3322f66e5a83b=function(e){let t;try{t=h(e)instanceof Blob}catch{t=!1}return t},n.wbg.__wbg_instanceof_Response_f4f3e87e07f3135c=function(e){let t;try{t=h(e)instanceof Response}catch{t=!1}return t},n.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(e){let t;try{t=h(e)instanceof Uint8Array}catch{t=!1}return t},n.wbg.__wbg_isArray_96e0af9891d0945d=function(e){return Array.isArray(h(e))},n.wbg.__wbg_iterator_e5822695327a3c39=function(){return y(Symbol.iterator)},n.wbg.__wbg_length_69bca3cb64fc8748=function(e){return h(e).length},n.wbg.__wbg_length_cdd215e10d9dd507=function(e){return h(e).length},n.wbg.__wbg_log_ee0138cca4957740=function(e,t){console.log(_e(e,t))},n.wbg.__wbg_message_bd42dbe3f2f3ed8e=function(e,t){let s=h(t).message,i=Ye(s,b.__wbindgen_export,b.__wbindgen_export2),a=xe;U().setInt32(e+4,a,!0),U().setInt32(e+0,i,!0)},n.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(e){let t=h(e).msCrypto;return y(t)},n.wbg.__wbg_new_0_f9740686d739025c=function(){return y(new Date)},n.wbg.__wbg_new_1acc0b6eea89d040=function(){let e=new Object;return y(e)},n.wbg.__wbg_new_2531773dac38ebb3=function(){return K(function(){let e=new AbortController;return y(e)},arguments)},n.wbg.__wbg_new_3c3d849046688a66=function(e,t){try{var s={a:e,b:t},i=(r,o)=>{let l=s.a;s.a=0;try{return Fg(l,s.b,r,o)}finally{s.a=l}};let a=new Promise(i);return y(a)}finally{s.a=s.b=0}},n.wbg.__wbg_new_5a79be3ab53b8aa5=function(e){let t=new Uint8Array(h(e));return y(t)},n.wbg.__wbg_new_881c4fe631eee9ad=function(){return K(function(e,t){let s=new WebSocket(_e(e,t));return y(s)},arguments)},n.wbg.__wbg_new_9edf9838a2def39c=function(){return K(function(){let e=new Headers;return y(e)},arguments)},n.wbg.__wbg_new_a7442b4b19c1a356=function(e,t){let s=new Error(_e(e,t));return y(s)},n.wbg.__wbg_new_e17d9f43105b08be=function(){let e=new Array;return y(e)},n.wbg.__wbg_new_from_slice_92f4d78ca282a2d2=function(e,t){let s=new Uint8Array(pn(e,t));return y(s)},n.wbg.__wbg_new_no_args_ee98eee5275000a4=function(e,t){let s=new Function(_e(e,t));return y(s)},n.wbg.__wbg_new_with_byte_offset_and_length_46e3e6a5e9f9e89b=function(e,t,s){let i=new Uint8Array(h(e),t>>>0,s>>>0);return y(i)},n.wbg.__wbg_new_with_length_01aa0dc35aa13543=function(e){let t=new Uint8Array(e>>>0);return y(t)},n.wbg.__wbg_new_with_str_and_init_0ae7728b6ec367b1=function(){return K(function(e,t,s){let i=new Request(_e(e,t),h(s));return y(i)},arguments)},n.wbg.__wbg_new_with_str_sequence_57a88eb77393f23f=function(){return K(function(e,t,s){let i=new WebSocket(_e(e,t),h(s));return y(i)},arguments)},n.wbg.__wbg_next_020810e0ae8ebcb0=function(){return K(function(e){let t=h(e).next();return y(t)},arguments)},n.wbg.__wbg_next_2c826fe5dfec6b6a=function(e){let t=h(e).next;return y(t)},n.wbg.__wbg_node_905d3e251edff8a2=function(e){let t=h(e).node;return y(t)},n.wbg.__wbg_now_2c95c9de01293173=function(e){return h(e).now()},n.wbg.__wbg_now_793306c526e2e3b6=function(){return Date.now()},n.wbg.__wbg_performance_7a3ffd0b17f663ad=function(e){let t=h(e).performance;return y(t)},n.wbg.__wbg_process_dc0fbacc7c1c06f7=function(e){let t=h(e).process;return y(t)},n.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(e,t,s){Uint8Array.prototype.set.call(pn(e,t),h(s))},n.wbg.__wbg_push_df81a39d04db858c=function(e,t){return h(e).push(h(t))},n.wbg.__wbg_queueMicrotask_34d692c25c47d05b=function(e){let t=h(e).queueMicrotask;return y(t)},n.wbg.__wbg_queueMicrotask_9d76cacb20c84d58=function(e){queueMicrotask(h(e))},n.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return K(function(e,t){h(e).randomFillSync(J(t))},arguments)},n.wbg.__wbg_read_48f1593df542f968=function(e){let t=h(e).read();return y(t)},n.wbg.__wbg_readyState_97984f126080aeda=function(e){return h(e).readyState},n.wbg.__wbg_reason_1cced37e3a93763e=function(e,t){let s=h(t).reason,i=Ye(s,b.__wbindgen_export,b.__wbindgen_export2),a=xe;U().setInt32(e+4,a,!0),U().setInt32(e+0,i,!0)},n.wbg.__wbg_releaseLock_5d0b5a68887b891d=function(e){h(e).releaseLock()},n.wbg.__wbg_removeEventListener_924d9db66a4f775d=function(){return K(function(e,t,s,i){h(e).removeEventListener(_e(t,s),h(i))},arguments)},n.wbg.__wbg_require_60cc747a6bc5215a=function(){return K(function(){let e=module.require;return y(e)},arguments)},n.wbg.__wbg_resolve_caf97c30b83f7053=function(e){let t=Promise.resolve(h(e));return y(t)},n.wbg.__wbg_respond_0f4dbf5386f5c73e=function(){return K(function(e,t){h(e).respond(t>>>0)},arguments)},n.wbg.__wbg_send_171576d2f7487517=function(){return K(function(e,t,s){h(e).send(_e(t,s))},arguments)},n.wbg.__wbg_send_3d2cf376613294f0=function(){return K(function(e,t,s){h(e).send(pn(t,s))},arguments)},n.wbg.__wbg_setTimeout_4eb823e8b72fbe79=function(){return K(function(e,t,s){let i=h(e).setTimeout(J(t),s);return y(i)},arguments)},n.wbg.__wbg_setTimeout_7bb3429662ab1e70=function(e,t){let s=setTimeout(h(e),t);return y(s)},n.wbg.__wbg_set_3f1d0b984ed272ed=function(e,t,s){h(e)[J(t)]=J(s)},n.wbg.__wbg_set_9e6516df7b7d0f19=function(e,t,s){h(e).set(pn(t,s))},n.wbg.__wbg_set_binaryType_9d839cea8fcdc5c3=function(e,t){h(e).binaryType=Pg[t]},n.wbg.__wbg_set_body_3c365989753d61f4=function(e,t){h(e).body=h(t)},n.wbg.__wbg_set_cache_2f9deb19b92b81e3=function(e,t){h(e).cache=jg[t]},n.wbg.__wbg_set_credentials_f621cd2d85c0c228=function(e,t){h(e).credentials=Ng[t]},n.wbg.__wbg_set_handle_event_b2de49ad6c81e3c8=function(e,t){h(e).handleEvent=h(t)},n.wbg.__wbg_set_headers_6926da238cd32ee4=function(e,t){h(e).headers=h(t)},n.wbg.__wbg_set_method_c02d8cbbe204ac2d=function(e,t,s){h(e).method=_e(t,s)},n.wbg.__wbg_set_mode_52ef73cfa79639cb=function(e,t){h(e).mode=qg[t]},n.wbg.__wbg_set_onclose_c09e4f7422de8dae=function(e,t){h(e).onclose=h(t)},n.wbg.__wbg_set_onerror_337a3a2db9517378=function(e,t){h(e).onerror=h(t)},n.wbg.__wbg_set_onmessage_8661558551a89792=function(e,t){h(e).onmessage=h(t)},n.wbg.__wbg_set_onopen_efccb9305427b907=function(e,t){h(e).onopen=h(t)},n.wbg.__wbg_set_signal_dda2cf7ccb6bee0f=function(e,t){h(e).signal=h(t)},n.wbg.__wbg_signal_4db5aa055bf9eb9a=function(e){let t=h(e).signal;return y(t)},n.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e=function(){let e=typeof global>"u"?null:global;return ie(e)?0:y(e)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac=function(){let e=typeof globalThis>"u"?null:globalThis;return ie(e)?0:y(e)},n.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b=function(){let e=typeof self>"u"?null:self;return ie(e)?0:y(e)},n.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2=function(){let e=typeof window>"u"?null:window;return ie(e)?0:y(e)},n.wbg.__wbg_status_de7eed5a7a5bfd5d=function(e){return h(e).status},n.wbg.__wbg_stringify_b5fb28f6465d9c3e=function(){return K(function(e){let t=JSON.stringify(h(e));return y(t)},arguments)},n.wbg.__wbg_subarray_480600f3d6a9f26c=function(e,t,s){let i=h(e).subarray(t>>>0,s>>>0);return y(i)},n.wbg.__wbg_then_4f46f6544e6b4a28=function(e,t){let s=h(e).then(h(t));return y(s)},n.wbg.__wbg_then_70d05cf780a18d77=function(e,t,s){let i=h(e).then(h(t),h(s));return y(i)},n.wbg.__wbg_url_9bd0af1cd8643de7=function(e,t){let s=h(t).url,i=Ye(s,b.__wbindgen_export,b.__wbindgen_export2),a=xe;U().setInt32(e+4,a,!0),U().setInt32(e+0,i,!0)},n.wbg.__wbg_url_b36d2a5008eb056f=function(e,t){let s=h(t).url,i=Ye(s,b.__wbindgen_export,b.__wbindgen_export2),a=xe;U().setInt32(e+4,a,!0),U().setInt32(e+0,i,!0)},n.wbg.__wbg_value_692627309814bb8c=function(e){let t=h(e).value;return y(t)},n.wbg.__wbg_versions_c01dfd4722a88165=function(e){let t=h(e).versions;return y(t)},n.wbg.__wbg_view_f6c15ac9fed63bbd=function(e){let t=h(e).view;return ie(t)?0:y(t)},n.wbg.__wbg_wasClean_3d7c0cf05bd0a123=function(e){return h(e).wasClean},n.wbg.__wbindgen_cast_0b4723bb5ff7475b=function(e,t){let s=Qn(e,t,b.__wasm_bindgen_func_elem_11664,Ig);return y(s)},n.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,t){let s=_e(e,t);return y(s)},n.wbg.__wbindgen_cast_253c73f2760a05aa=function(e,t){let s=Qn(e,t,b.__wasm_bindgen_func_elem_6219,Dg);return y(s)},n.wbg.__wbindgen_cast_343835dd8f264af2=function(e,t){let s=kg(e,t,b.__wasm_bindgen_func_elem_5735,Lg);return y(s)},n.wbg.__wbindgen_cast_7bacc9fa7d2c65f4=function(e,t){let s=Qn(e,t,b.__wasm_bindgen_func_elem_12841,Ag);return y(s)},n.wbg.__wbindgen_cast_88fdcfb6b716b7f8=function(e,t){let s=Qn(e,t,b.__wasm_bindgen_func_elem_12896,Ug);return y(s)},n.wbg.__wbindgen_cast_c43a1cf1b94f2e7c=function(e,t){let s=Qn(e,t,b.__wasm_bindgen_func_elem_2083,Og);return y(s)},n.wbg.__wbindgen_cast_cb9088102bce6b30=function(e,t){let s=pn(e,t);return y(s)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return y(e)},n.wbg.__wbindgen_object_clone_ref=function(e){let t=h(e);return y(t)},n.wbg.__wbindgen_object_drop_ref=function(e){J(e)},n}function Hg(n,e){return b=n.exports,Wp.__wbindgen_wasm_module=e,Mt=null,Zn=null,b}async function Wp(n){if(b!==void 0)return b;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("ermis_call_node_wasm_bg.wasm",Kg.url));let e=Vg();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:t,module:s}=await Wg(await n,e);return Hg(t,s)}var Vp=Wp;var ti=class{videoEncoder=null;audioEncoder=null;videoReader=null;localStream=null;videoConfig=null;audioConfig=null;videoConfigSent=!1;audioConfigSent=!1;hasVideo=!1;hasAudio=!1;forceKeyFrame=!1;nodeCall;constructor(e){this.nodeCall=e}async connect(e){try{await this.nodeCall.connect(e),await this.sendConnected(),await this.sendConfigs()}catch(t){console.error("Error starting MediaStreamSender:",t)}}async sendConfigs(){try{await this.sendTransceiverState(this.hasAudio,this.hasVideo),await this.sendAudioConfig(),this.localStream?.getVideoTracks()[0]&&await this.sendVideoConfig()}catch(e){console.error("Error sending configs:",e)}}stop=()=>{if(this.videoReader){try{this.videoReader.cancel("Stream stopped").catch(()=>{})}catch{}this.videoReader=null}if(this.videoEncoder){try{this.videoEncoder.state!=="closed"&&(this.videoEncoder.reset(),this.videoEncoder.close())}catch{}this.videoEncoder=null}if(this.audioEncoder){try{this.audioEncoder.state!=="closed"&&(this.audioEncoder.reset(),this.audioEncoder.close())}catch{}this.audioEncoder=null}this.videoConfig=null,this.audioConfig=null,this.videoConfigSent=!1,this.audioConfigSent=!1,this.hasVideo=!1,this.hasAudio=!1,this.localStream&&(this.localStream.getTracks().forEach(e=>e.stop()),this.localStream=null)};initAudioEncoder=e=>{this.localStream=new MediaStream([e]),this.audioConfigSent=!1,this.hasAudio=!!e;let t=new AudioEncoder({output:(s,i)=>{if(i?.decoderConfig&&!this.audioConfigSent){let a;i.decoderConfig.description&&(a=ga(i.decoderConfig.description)),this.audioConfig={codec:i.decoderConfig.codec??"opus",sampleRate:i.decoderConfig.sampleRate??48e3,numberOfChannels:i.decoderConfig.numberOfChannels??1,...a&&{description:a}}}if(s&&this.isReadyToSendData("audio")){let a=new ArrayBuffer(s.byteLength);s.copyTo(a);let r=s.timestamp,o=Ot(a,r,"audio",null);this.sendPacketOrQueue(o,"audio",null)}},error:s=>console.error("AudioEncoder error:",s)});t.configure({codec:"mp4a.40.2",sampleRate:48e3,numberOfChannels:1,bitrate:128e3}),this.audioEncoder=t,this.processAudioFrames(e)};initVideoEncoder(e){this.localStream&&this.localStream.addTrack(e),this.videoConfigSent=!1,this.hasVideo=!!e;let t=e.getSettings(),s=t.width||1280,i=t.height||720,a=new VideoEncoder({output:async(r,o)=>{if(o?.decoderConfig&&!this.videoConfigSent){let l;o.decoderConfig.description&&(l=ga(o.decoderConfig.description)),this.videoConfig={codec:o.decoderConfig.codec??"hev1.1.6.L93.B0",codedWidth:o.decoderConfig.codedWidth??s,codedHeight:o.decoderConfig.codedHeight??i,frameRate:30,orientation:0,...l&&{description:l}},await this.sendVideoConfig()}if(r&&this.isReadyToSendData("video")){let l=new ArrayBuffer(r.byteLength);r.copyTo(l);let c=r.type==="key"?"video-key":"video-delta",p=r.timestamp,u=Ot(l,p,c,null);this.sendPacketOrQueue(u,"video",c)}},error:r=>console.error("VideoEncoder error:",r)});a.configure({codec:"hev1.1.6.L93.B0",width:s,height:i,bitrate:5e5,framerate:30,latencyMode:"realtime",hardwareAcceleration:"prefer-hardware"}),this.videoEncoder=a,this.processVideoFrames(e)}initEncoders=e=>{let t=e.getVideoTracks()[0],s=e.getAudioTracks()[0];s&&this.initAudioEncoder(s),t&&this.initVideoEncoder(t)};sendTransceiverState=async(e,t)=>{let i=Ot(null,null,"transciverState",{audio_enable:!!e,video_enable:!!t});await this.nodeCall.sendControlFrame(i)};async replaceVideoTrack(e){if(this.videoReader){try{await this.videoReader.cancel("Replacing track")}catch{}this.videoReader=null}e&&this.processVideoFrames(e)}async replaceAudioTrack(e){e&&this.processAudioFrames(e)}requestKeyFrame=()=>{console.log("\u{1F4E5} KeyFrame requested"),this.forceKeyFrame=!0};processVideoFrames=async e=>{try{let t=new MediaStreamTrackProcessor({track:e});this.videoReader=t.readable.getReader();let s=0;for(;this.videoReader;){let{done:i,value:a}=await this.videoReader.read();if(i)break;if(!this.videoEncoder){a?.close();break}if(a){s+=1;let r=s%60===0||this.forceKeyFrame;this.forceKeyFrame&&(console.log("\u{1F4E4} Sending forced KeyFrame"),this.forceKeyFrame=!1);try{this.videoEncoder.encode(a,{keyFrame:r})}catch(o){console.error("Encode error:",o)}finally{a.close()}}}}catch(t){console.error(`Error processing video frames: ${t.message}`)}finally{if(this.videoReader)try{this.videoReader.releaseLock()}catch{}}};processAudioFrames=async e=>{let s=new MediaStreamTrackProcessor({track:e}).readable.getReader();try{for(;;){let{done:i,value:a}=await s.read();if(i)break;if(!this.audioEncoder){a?.close();break}if(a)try{this.audioEncoder.encode(a)}catch(r){console.error("Audio Encoding error:",r)}finally{a.close()}}}catch(i){console.error(`Error processing audio frames: ${i.message}`)}};isReadyToSendData=e=>{let t=!this.hasVideo||this.videoConfigSent,s=!this.hasAudio||this.audioConfigSent,i=t&&s;return e==="video"?i&&this.videoConfigSent:e==="audio"?i&&this.audioConfigSent:!1};sendVideoConfig=async()=>{if(this.videoConfig&&!this.videoConfigSent)try{let e=Ot(null,null,"videoConfig",this.videoConfig);await this.nodeCall.sendControlFrame(e),this.videoConfigSent=!0}catch(e){console.error("Error sending video config:",e)}};sendAudioConfig=async()=>{if(this.audioConfig&&!this.audioConfigSent)try{let e=Ot(null,null,"audioConfig",this.audioConfig);await this.nodeCall.sendControlFrame(e),this.audioConfigSent=!0}catch(e){console.error("Error sending audio config:",e)}};sendConnected=async()=>{let e=Ot(null,null,"connected",null);await this.nodeCall.sendControlFrame(e)};sendPacketOrQueue=async(e,t,s)=>{this.isReadyToSendData(t)&&(t==="audio"?await this.nodeCall.sendAudioFrame(e):t==="video"&&(s==="video-key"?await this.nodeCall.beginWithGop(e):s==="video-delta"&&await this.nodeCall.sendFrame(e)))}};var mn={VPS_NUT:32,SPS_NUT:33,PPS_NUT:34,PREFIX_SEI_NUT:39,SUFFIX_SEI_NUT:40,fromValue(n){return{32:"VPS_NUT",33:"SPS_NUT",34:"PPS_NUT",39:"PREFIX_SEI_NUT",40:"SUFFIX_SEI_NUT"}[n]||n}},ni=class n{generalProfileSpace=0;generalTierFlag=!1;generalProfileIdc=0;generalProfileCompatibilityFlags=0;generalConstraintIndicatorFlags=0;generalLevelIdc=0;minSpatialSegmentationIdc=0;parallelismType=0;chromaFormatIdc=0;bitDepthLumaMinus8=0;bitDepthChromaMinus8=0;avgFrameRate=0;constantFrameRate=0;numTemporalLayers=0;temporalIdNested=!1;lengthSizeMinusOne=0;arrays=[];constructor(e){Object.assign(this,e)}static demux(e){let t=e instanceof Uint8Array?e:new Uint8Array(e),s=new DataView(t.buffer,t.byteOffset,t.byteLength),i=0,a=0,r=z=>{let pe=0;for(let T=0;T<z;T++){if(i>=t.length)throw new Error("End of buffer");let A=t[i]>>7-a&1;pe=pe<<1|A,a++,a===8&&(a=0,i++)}return pe},o=()=>{if(a!==0)return r(8);if(i>=t.length)throw new Error("End of buffer");return t[i++]},l=()=>{if(a!==0)return r(16);let z=s.getUint16(i,!1);return i+=2,z},c=()=>{if(a!==0)return r(32);let z=s.getUint32(i,!1);return i+=4,z},p=()=>{let z=l(),pe=c();return z*4294967296+pe},u=z=>{if(a!==0){let T=new Uint8Array(z);for(let A=0;A<z;A++)T[A]=r(8);return T}if(i+z>t.length)throw new Error("End of buffer");let pe=t.slice(i,i+z);return i+=z,pe};if(o()!==1)throw new Error("Invalid configuration version");let f=r(2),g=r(1)===1,v=r(5),_=c(),R=p(),D=o();r(4);let L=r(12);r(6);let q=r(2);r(6);let M=r(2);r(5);let Y=r(3);r(5);let ae=r(3),Z=l(),ye=r(2),Le=r(3),jt=r(1)===1,qe=r(2);if(qe===2)throw new Error("length_size_minus_one must be 0, 1, or 3");let ht=o(),ce=[];for(let z=0;z<ht;z++){let pe=r(1)===1;r(1);let T=r(6),A=mn.fromValue(T);T!==mn.VPS_NUT&&T!==mn.SPS_NUT&&T!==mn.PPS_NUT&&T!==mn.PREFIX_SEI_NUT&&mn.SUFFIX_SEI_NUT;let X=l(),Te=[];for(let ee=0;ee<X;ee++){let Ge=l(),gt=u(Ge);Te.push(gt)}ce.push({arrayCompleteness:pe,nalUnitType:A,nalus:Te})}return new n({generalProfileSpace:f,generalTierFlag:g,generalProfileIdc:v,generalProfileCompatibilityFlags:_,generalConstraintIndicatorFlags:R,generalLevelIdc:D,minSpatialSegmentationIdc:L,parallelismType:q,chromaFormatIdc:M,bitDepthLumaMinus8:Y,bitDepthChromaMinus8:ae,avgFrameRate:Z,constantFrameRate:ye,numTemporalLayers:Le,temporalIdNested:jt,lengthSizeMinusOne:qe,arrays:ce})}toCodecString(){let t={0:"",1:"A",2:"B",3:"C"}[this.generalProfileSpace];if(t===void 0)throw new Error("Unknown profile space");let s=`${t}${this.generalProfileIdc}`,i=this.generalProfileCompatibilityFlags.toString(16).padStart(8,"0").split("").reverse().join(""),a="";for(let u=0;u<i.length;u++){let m=i[u];(m!=="0"||u===0)&&(a+=m)}let o=`${this.generalTierFlag?"H":"L"}${this.generalLevelIdc}`,l="",c=this.generalConstraintIndicatorFlags,p=[Math.floor(c/1099511627776)&255,Math.floor(c/4294967296)&255,Math.floor(c/16777216)&255,Math.floor(c/65536)&255,Math.floor(c/256)&255,c&255];for(let u=2;u<6;u++)p[u]!==0&&(l+=`.${p[u].toString(16).padStart(2,"0")}`);return`hev1.${s}.${a}.${o}${l}`}};var Jg=.1,Hp=.02,si=class{videoDecoder=null;audioDecoder=null;videoWriter=null;audioContext=null;mediaDestination=null;isWaitingForKeyFrame=!0;nextStartTime=0;lastVideoConfig=null;nodeCall;events;generatedStream=null;constructor(e,t={}){this.nodeCall=e,this.events=t}async acceptConnection(){try{await this.nodeCall.acceptConnection()}catch(e){console.error("\u274C Error starting MediaStreamReceiver:",e)}}getRemoteStream=()=>this.generatedStream;stop=()=>{this.resetDecoders()};initAudioContext=async()=>{if(!this.audioContext||this.audioContext.state==="closed"){let e=window.AudioContext||window.webkitAudioContext;this.audioContext=new e({sampleRate:48e3,latencyHint:"interactive"}),this.mediaDestination=this.audioContext.createMediaStreamDestination(),this.audioContext.state==="suspended"&&await this.audioContext.resume(),this.nextStartTime=this.audioContext.currentTime+Hp}};initDecoders=e=>{if(this.audioDecoder&&this.audioDecoder.close(),this.initAudioContext(),this.mediaDestination){let t=this.mediaDestination.stream.getAudioTracks()[0];this.generatedStream=new MediaStream([t])}this.isWaitingForKeyFrame=!0,this.audioDecoder=new AudioDecoder({output:t=>this.playDecodedAudio(t),error:t=>console.error("AudioDecoder error:",t)}),e==="video"&&this.setupVideoDecoder(),this.receiveLoop()};setupVideoDecoder=()=>{if(!this.videoWriter)return;if(this.videoDecoder)try{this.videoDecoder.state!=="closed"&&this.videoDecoder.close()}catch{}let e=new VideoDecoder({output:async t=>{try{if(!this.videoWriter){t.close();return}if(this.videoWriter.desiredSize<=0){t.close();return}await this.videoWriter.write(t)}catch{t.close()}finally{t.close()}},error:t=>{if(console.error("\u274C VideoDecoder CRASHED:",t),this.isWaitingForKeyFrame=!0,this.videoWriter&&(console.log("\u267B\uFE0F Attempting to respawn VideoDecoder..."),this.setupVideoDecoder(),this.lastVideoConfig&&this.videoDecoder))try{this.videoDecoder.configure(this.lastVideoConfig)}catch{}}});this.videoDecoder=e};playDecodedAudio=e=>{try{if(!this.audioContext||!this.mediaDestination){e.close();return}let{numberOfChannels:t,numberOfFrames:s,sampleRate:i}=e,a=s/i,r=this.audioContext.currentTime;this.nextStartTime<r?this.nextStartTime=r:this.nextStartTime>r+Jg&&(this.nextStartTime=r+Hp);let o=this.audioContext.createBuffer(t,s,i),l=t*s,c=new Float32Array(l);e.copyTo(c,{planeIndex:0,format:"f32-planar"});for(let u=0;u<t;u++){let m=c.subarray(u*s,(u+1)*s);o.copyToChannel(m,u)}let p=this.audioContext.createBufferSource();p.buffer=o,p.connect(this.mediaDestination),p.start(this.nextStartTime),this.nextStartTime+=a,e.close()}catch(t){console.error("Error in playDecodedAudio:",t),e?.close()}};newCodecFromDescription=(e,t)=>{if(!t.toLowerCase().includes("hvc")&&!t.toLowerCase().includes("hev"))return"";try{return ni.demux(e).toCodecString()}catch{return""}};receiveLoop=async()=>{let e=new TextDecoder;for(;;)try{if(!this.nodeCall)break;let t=await this.nodeCall.asyncRecv(),s=new DataView(t.buffer,t.byteOffset,t.byteLength),i=s.getUint8(0),a=[0,1,6,7,5,8,9,10].includes(i)?1:9,r=new Uint8Array(t.buffer,t.byteOffset+a,t.byteLength-a);switch(i){case 0:{try{let l=e.decode(r),c=JSON.parse(l);if(console.log("--videoConfig--",c),!this.videoWriter){let f=new MediaStreamTrackGenerator({kind:"video"});this.videoWriter=f.writable.getWriter(),this.generatedStream&&this.generatedStream.addTrack(f)}this.videoDecoder||this.setupVideoDecoder(),this.isWaitingForKeyFrame=!0;let p;if(c.description)try{let f=atob(c.description),g=new Uint8Array(f.length);for(let v=0;v<f.length;v++)g[v]=f.charCodeAt(v);p=g.buffer}catch{}let u="";p&&(u=this.newCodecFromDescription(p,c.codec)||$l(c.codec));let m={codec:u,frameRate:c.frameRate,codedWidth:c.codedWidth,codedHeight:c.codedHeight,...c.orientation&&{rotation:c.orientation},...p&&{description:p}};this.lastVideoConfig=m,this.videoDecoder&&this.videoDecoder.state!=="closed"&&((await VideoDecoder.isConfigSupported(m)).supported?(this.videoDecoder.configure(m),this.isWaitingForKeyFrame=!0):console.error("\u274C Browser does not support this video config:",m))}catch(l){console.error("\u274C Error processing VIDEO_CONFIG:",l)}break}case 1:{let l=JSON.parse(e.decode(r));console.log("--audioConfig--",l),this.audioDecoder?.state!=="closed"&&this.audioDecoder?.configure({codec:l.codec,sampleRate:l.sampleRate,numberOfChannels:l.numberOfChannels});break}case 2:case 3:{if(!this.videoDecoder||this.videoDecoder.state!=="configured")break;let l=i===2;if(this.isWaitingForKeyFrame){if(!l)break;console.log("\u2705 Resumed decoding at KeyFrame"),this.isWaitingForKeyFrame=!1}if(!l&&this.videoDecoder.decodeQueueSize>15){console.warn("\u26A0\uFE0F Queue > 15. Dropping & Waiting for KeyFrame..."),this.isWaitingForKeyFrame=!0;break}let c=s.getBigUint64(1,!1),p=Number(c);try{this.videoDecoder.decode(new EncodedVideoChunk({type:l?"key":"delta",timestamp:p,data:r}))}catch(u){console.error("Video decode failed:",u),this.videoDecoder.state==="closed"&&(this.isWaitingForKeyFrame=!0)}break}case 4:{if(this.audioDecoder?.state==="configured"){let l=s.getBigUint64(1,!1),c=Number(l);this.audioDecoder.decode(new EncodedAudioChunk({type:"key",timestamp:c,data:r}))}break}case 6:this.events.onConnected&&this.events.onConnected();break;case 7:let o=JSON.parse(e.decode(r));this.events.onTransceiverState&&this.events.onTransceiverState(o);break;case 5:{let l=s.getInt32(1,!1);if(this.videoDecoder&&this.lastVideoConfig&&this.lastVideoConfig.rotation!==l){this.lastVideoConfig.rotation=l;try{this.videoDecoder.configure(this.lastVideoConfig),this.isWaitingForKeyFrame=!0,console.log("\u{1F504} Reconfigured rotation to",l,"- Waiting for next KeyFrame")}catch(c){console.error("Error reconfiguring VideoDecoder with new orientation:",c)}}break}case 8:console.log("\u{1F4E5} Received REQUEST_CONFIG"),this.events.onRequestConfig&&this.events.onRequestConfig();break;case 9:console.log("\u{1F4E5} Received REQUEST_KEY_FRAME"),this.events.onRequestKeyFrame&&this.events.onRequestKeyFrame();break;case 10:console.log("\u{1F4E5} Received END_CALL"),this.events.onEndCall&&this.events.onEndCall();break;default:console.warn("\u2753 Unknown frame type received:",i);break}}catch(t){console.error("Stream loop error",t),await new Promise(s=>setTimeout(s,200))}};resetDecoders=()=>{if(this.videoWriter){try{this.videoWriter.abort("Stream stopped").catch(()=>{}),this.videoWriter.releaseLock()}catch(e){console.warn("Error closing video writer:",e)}this.videoWriter=null}if(this.videoDecoder){try{this.videoDecoder.state!=="closed"&&(this.videoDecoder.reset(),this.videoDecoder.close())}catch{}this.videoDecoder=null}if(this.audioDecoder){try{this.audioDecoder.state!=="closed"&&(this.audioDecoder.reset(),this.audioDecoder.close())}catch{}this.audioDecoder=null}if(this.audioContext){try{this.audioContext.close()}catch(e){console.warn("Error closing audio context:",e)}this.audioContext=null}this.isWaitingForKeyFrame=!0,this.mediaDestination=null,this.nextStartTime=0,this.lastVideoConfig=null,this.generatedStream&&(this.generatedStream.getTracks().forEach(e=>e.stop()),this.generatedStream=null)}};var Qa=class{wasmPath;relayUrl="https://test-iroh.ermis.network.:8443";_client;sessionID;cid;callType;userID;callStatus="";metadata;callNode=null;localStream=null;remoteStream=null;callerInfo;receiverInfo;onCallEvent;onLocalStream;onRemoteStream;onConnectionMessageChange;onCallStatus;onDataChannelMessage;onUpgradeCall;onScreenShareChange;onError;onDeviceChange;availableAudioDevices=[];availableVideoDevices=[];selectedAudioDeviceId;selectedVideoDeviceId;missCallTimeout=null;healthCallInterval=null;healthCallServerInterval=null;healthCallTimeout=null;healthCallWarningTimeout=null;signalHandler;connectionChangedHandler;messageUpdatedHandler;isOffline=!1;isDestroyed=!1;mediaSender=null;mediaReceiver=null;constructor(e,t,s,i){this._client=e,this.cid="",this.callType="",this.sessionID=t,this.userID=e.userID,this.metadata={},this.wasmPath=s,this.relayUrl=i,this.listenSocketEvents(),this.setupDeviceChangeListener(),this.loadWasm()}async loadWasm(){try{await Vp(this.wasmPath)}catch(e){throw console.error("Failed to load ErmisCall WASM module:",e),e}}async initialize(){try{let e=new dn;return await e.spawn([this.relayUrl]),this.callNode=e,this.mediaSender=new ti(e),this.mediaReceiver=new si(e,{onConnected:()=>{this.setCallStatus("connected"),this.connectCall(),this.missCallTimeout&&(clearTimeout(this.missCallTimeout),this.missCallTimeout=null),this.healthCallServerInterval&&clearInterval(this.healthCallServerInterval),this.healthCallServerInterval=setInterval(()=>{this.healthCall()},1e4);let t=this.mediaReceiver?.getRemoteStream();t&&this.onRemoteStream&&this.onRemoteStream(t)},onTransceiverState:t=>{typeof this.onDataChannelMessage=="function"&&this.onDataChannelMessage(t)},onRequestConfig:()=>{console.log("\u{1F4E4} Responding to REQUEST_CONFIG by sending configs"),this.mediaSender?.sendConfigs()},onRequestKeyFrame:()=>{console.log("\u{1F4E4} Responding to REQUEST_KEY_FRAME by forcing key frame"),this.mediaSender?.requestKeyFrame()},onEndCall:()=>{console.log("\u{1F4E5} Received END_CALL from remote peer"),this.destroy()}}),e}catch(e){throw console.error("Failed to initialize Ermis SDK:",e),e}}async getLocalEndpointAddr(){try{if(await this.initialize(),!this.callNode)return console.error("ErmisCall is not initialized."),null;let e=await this.callNode.getLocalEndpointAddr();return this.metadata&&(this.metadata.address=e),e}catch(e){return console.error("Failed to get address from ErmisCall:",e),null}}getClient(){return this._client}async _sendSignal(e){try{return await this.getClient().post(this.getClient().baseURL+"/signal",{...e,cid:this.cid||e.cid,is_video:this.callType==="video"||e.is_video,ios:!1,session_id:this.sessionID})}catch(t){let s=e.action;if(s==="health-call")return;if(typeof this.onError=="function")if(t.code==="ERR_NETWORK")s==="create-call"&&this.onError("Unable to make the call. Please check your network connection");else if(t.response.data.ermis_code===20)this.onError("Recipient was busy");else{let i=t.response.data?.message?t.response.data?.message:"Call failed";this.onError(i)}}}async getAvailableDevices(){try{let e=await navigator.mediaDevices.enumerateDevices(),t=e.filter(i=>i.kind==="audioinput"),s=e.filter(i=>i.kind==="videoinput");return this.availableAudioDevices=t,this.availableVideoDevices=s,{audioDevices:t,videoDevices:s}}catch(e){return console.error("Error enumerating devices:",e),{audioDevices:[],videoDevices:[]}}}async getMediaConstraints(){let{audioDevices:e,videoDevices:t}=await this.getAvailableDevices();this.onDeviceChange&&this.onDeviceChange(e,t),!this.selectedAudioDeviceId&&e.length>0&&(this.selectedAudioDeviceId=e[0].deviceId),!this.selectedVideoDeviceId&&t.length>0&&(this.selectedVideoDeviceId=t[0].deviceId);let s={deviceId:this.selectedAudioDeviceId?{exact:this.selectedAudioDeviceId}:void 0,echoCancellation:!0,noiseSuppression:!0,sampleRate:48e3},i=this.callType==="video"?{deviceId:this.selectedVideoDeviceId?{exact:this.selectedVideoDeviceId}:void 0,width:640,height:360}:!1;return{audio:s,video:i}}async startLocalStream(){let e=await this.getMediaConstraints();try{let t=await navigator.mediaDevices.getUserMedia(e);if(this.callStatus==="ended"){t.getTracks().forEach(s=>s.stop()),this.destroy();return}return this.onLocalStream&&this.onLocalStream(t),this.localStream=t,t}catch(t){return console.error("Error getting user media:",t),null}}setConnectionMessage(e){typeof this.onConnectionMessageChange=="function"&&this.onConnectionMessageChange(e)}setCallStatus(e){this.callStatus=e,typeof this.onCallStatus=="function"&&this.onCallStatus(e)}setUserInfo(e,t){if(!e||!t)return;let i=(e?this.getClient().activeChannels[e]:void 0)?.state?.members||{},a=Object.keys(i),r=t||"",o=a.find(p=>p!==r)||"",l=this.getClient().state.users[r],c=this.getClient().state.users[o];this.callerInfo={id:r,name:l?.name,avatar:l?.avatar||""},this.receiverInfo={id:o,name:c?.name,avatar:c?.avatar||""}}listenSocketEvents(){this.signalHandler=async e=>{let{action:t,user_id:s,session_id:i,cid:a,is_video:r,signal:o,metadata:l}=e;switch(t){case"create-call":if(s===this.userID&&i!==this.sessionID){this.isDestroyed=!0,this.destroy();return}if(this.isDestroyed=!1,this.callStatus="",this.callType=r?"video":"audio",await this.startLocalStream(),this.callStatus==="ended")return;this.setUserInfo(a,s),this.setCallStatus("ringing"),this.cid=a||"",this.metadata=l||{},console.log("----metadata---",l),s!==this.userID&&await this.initialize(),this.localStream&&this.mediaSender&&this.mediaReceiver&&(this.mediaSender?.initEncoders(this.localStream),this.mediaReceiver?.initDecoders(this.callType)),typeof this.onCallEvent=="function"&&this.onCallEvent({type:s!==this.userID?"incoming":"outgoing",callType:r?"video":"audio",cid:a||"",callerInfo:this.callerInfo,receiverInfo:this.receiverInfo,metadata:this.metadata}),s===this.userID&&(this.missCallTimeout&&clearTimeout(this.missCallTimeout),this.missCallTimeout=setTimeout(async()=>{await this.missCall()},6e4));break;case"accept-call":if(s===this.userID&&i!==this.sessionID){this.isDestroyed=!0,this.destroy();return}s!==this.userID&&!this.isDestroyed&&this.mediaReceiver&&this.mediaSender&&(await this.mediaReceiver.acceptConnection(),await this.mediaSender.sendConnected(),await this.mediaSender.sendConfigs());break;case"end-call":case"reject-call":case"miss-call":this.destroy();break}},this.connectionChangedHandler=e=>{let t=e.online;this.isOffline=!t,t?(this.setConnectionMessage(null),this.callStatus==="connected"&&(this.healthCallServerInterval||(this.healthCallServerInterval=setInterval(()=>{this.healthCall()},1e4)))):(this.setConnectionMessage("Your network connection is unstable"),this.healthCallInterval&&(clearInterval(this.healthCallInterval),this.healthCallInterval=null),this.healthCallServerInterval&&(clearInterval(this.healthCallServerInterval),this.healthCallServerInterval=null))},this.messageUpdatedHandler=e=>{if(this.callStatus==="connected"&&e.cid===this.cid){let t=e.user?.id,s;t===this.callerInfo?.id?s=this.callerInfo:t===this.receiverInfo?.id&&(s=this.receiverInfo),s&&typeof this.onUpgradeCall=="function"&&this.onUpgradeCall(s)}},this._client.on("signal",this.signalHandler),this._client.on("connection.changed",this.connectionChangedHandler),this._client.on("message.updated",this.messageUpdatedHandler)}cleanupCall(){this.mediaSender&&(this.mediaSender?.stop(),this.mediaSender=null),this.mediaReceiver&&(this.mediaReceiver.stop(),this.mediaReceiver=null),this.callNode&&(this.callNode?.closeEndpoint(),this.callStatus==="connected"&&this.callNode?.closeConnection(),this.callNode=null),this.missCallTimeout&&(clearTimeout(this.missCallTimeout),this.missCallTimeout=null),this.healthCallInterval&&(clearInterval(this.healthCallInterval),this.healthCallInterval=null),this.healthCallServerInterval&&(clearInterval(this.healthCallServerInterval),this.healthCallServerInterval=null),this.healthCallTimeout&&(clearTimeout(this.healthCallTimeout),this.healthCallTimeout=null),this.healthCallWarningTimeout&&(clearTimeout(this.healthCallWarningTimeout),this.healthCallWarningTimeout=null),this.setConnectionMessage(null),this.cid="",this.callType="",this.metadata={},this.localStream&&(this.localStream.getTracks().forEach(e=>e.stop()),this.localStream=null),this.remoteStream&&(this.remoteStream.getTracks().forEach(e=>e.stop()),this.remoteStream=null),this.setCallStatus("ended")}destroy(){this.cleanupCall()}async getDevices(){return this.availableAudioDevices.length>0||this.availableVideoDevices.length>0?{audioDevices:this.availableAudioDevices,videoDevices:this.availableVideoDevices}:await this.getAvailableDevices()}getSelectedDevices(){let e=this.selectedAudioDeviceId?this.availableAudioDevices.find(s=>s.deviceId===this.selectedAudioDeviceId):void 0,t=this.selectedVideoDeviceId?this.availableVideoDevices.find(s=>s.deviceId===this.selectedVideoDeviceId):void 0;return{audioDevice:e,videoDevice:t}}getDefaultDevices(){return{audioDevice:this.availableAudioDevices[0],videoDevice:this.availableVideoDevices[0]}}async createCall(e,t){try{this.cid=t;let s=await this.getLocalEndpointAddr();await this._sendSignal({action:"create-call",cid:t,is_video:e==="video",metadata:{address:s}})}catch(s){throw console.error("Failed to create call:",s),s}}async acceptCall(){try{if(await this._sendSignal({action:"accept-call"}),this.mediaSender){let e=this.metadata?.address||"";await this.mediaSender.connect(e)}}catch(e){throw console.error("Failed to accept call:",e),e}}async endCall(){await this._sendSignal({action:"end-call"}),this.destroy()}async rejectCall(){await this._sendSignal({action:"reject-call"}),this.destroy()}async missCall(){await this._sendSignal({action:"miss-call"}),this.destroy()}async connectCall(){return await this._sendSignal({action:"connect-call"})}async healthCall(){return await this._sendSignal({action:"health-call"})}async addVideoTrackToLocalStream(){let e=await this.getMediaConstraints(),t=await navigator.mediaDevices.getUserMedia(e),s=t.getVideoTracks()[0];this.localStream?(this.localStream.addTrack(s),this.onLocalStream&&this.onLocalStream(this.localStream)):(this.localStream=t,this.onLocalStream&&this.onLocalStream(this.localStream))}async upgradeCall(){try{if(this.callType="video",await this.addVideoTrackToLocalStream(),await this._sendSignal({action:"upgrade-call"}),this.localStream){this.mediaSender?.initVideoEncoder(this.localStream?.getVideoTracks()[0]);let e=!!this.localStream?.getAudioTracks().some(s=>s.enabled),t=!!this.localStream?.getVideoTracks().some(s=>s.enabled);await this.mediaSender?.sendTransceiverState(e,t)}}catch(e){throw console.error("Failed to upgrade call:",e),e}}async requestUpgradeCall(e){if(e&&(this.callType="video",await this.addVideoTrackToLocalStream(),this.localStream)){this.mediaSender?.initVideoEncoder(this.localStream?.getVideoTracks()[0]);let t=!!this.localStream?.getAudioTracks().some(i=>i.enabled),s=!!this.localStream?.getVideoTracks().some(i=>i.enabled);await this.mediaSender?.sendTransceiverState(t,s)}}async startScreenShare(){if(!navigator.mediaDevices.getDisplayMedia)throw new Error("Screen sharing is not supported in this browser.");let e=await navigator.mediaDevices.getDisplayMedia({video:!0}),t=e.getVideoTracks()[0];this.localStream?(this.localStream.getVideoTracks().forEach(s=>s.stop()),this.localStream.removeTrack(this.localStream.getVideoTracks()[0]),this.localStream.addTrack(t)):this.localStream=e,t.onended=()=>{this.stopScreenShare()},this.onLocalStream&&(this.onLocalStream(this.localStream),this.mediaSender?.replaceVideoTrack(this.localStream.getVideoTracks()[0])),typeof this.onScreenShareChange=="function"&&this.onScreenShareChange(!0)}async stopScreenShare(){let e=await this.getMediaConstraints(),t=await navigator.mediaDevices.getUserMedia(e),s=t.getVideoTracks()[0];this.localStream?(this.localStream.getVideoTracks().forEach(i=>i.stop()),this.localStream.removeTrack(this.localStream.getVideoTracks()[0]),this.localStream.addTrack(s)):this.localStream=t,this.onLocalStream&&(this.onLocalStream(this.localStream),this.mediaSender?.replaceVideoTrack(this.localStream.getVideoTracks()[0])),typeof this.onScreenShareChange=="function"&&this.onScreenShareChange(!1)}async toggleMic(e){if(this.localStream){this.localStream.getAudioTracks().forEach(i=>{i.enabled=e});let t=e,s=this.localStream.getVideoTracks().some(i=>i.enabled);await this.mediaSender?.sendTransceiverState(t,s)}}async toggleCamera(e){if(this.localStream){this.localStream.getVideoTracks().forEach(i=>{i.enabled=e});let t=this.localStream.getAudioTracks().some(i=>i.enabled),s=e;await this.mediaSender?.sendTransceiverState(t,s)}}async switchAudioDevice(e){try{if(!this.availableAudioDevices.find(r=>r.deviceId===e))return console.error("Audio device not found:",e),this.onError&&this.onError("Selected microphone not found"),!1;if(this.selectedAudioDeviceId=e,!this.localStream)return!1;let i=(await navigator.mediaDevices.getUserMedia({audio:{deviceId:{exact:e}},video:!1})).getAudioTracks()[0],a=this.localStream.getAudioTracks()[0];return a&&(this.localStream.removeTrack(a),a.stop()),this.localStream.addTrack(i),this.onLocalStream&&this.onLocalStream(this.localStream),!0}catch(t){return console.error("Error switching audio device:",t),this.onError&&this.onError("Failed to switch microphone"),!1}}async switchVideoDevice(e){try{if(!this.availableVideoDevices.find(r=>r.deviceId===e))return console.error("Video device not found:",e),this.onError&&this.onError("Selected camera not found"),!1;if(this.selectedVideoDeviceId=e,!this.localStream)return!1;let i=(await navigator.mediaDevices.getUserMedia({audio:!1,video:{deviceId:{exact:e}}})).getVideoTracks()[0],a=this.localStream.getVideoTracks()[0];return a&&(this.localStream.removeTrack(a),a.stop()),this.localStream.addTrack(i),this.onLocalStream&&this.onLocalStream(this.localStream),!0}catch(t){return console.error("Error switching video device:",t),this.onError&&this.onError("Failed to switch camera"),!1}}setupDeviceChangeListener(){navigator.mediaDevices.addEventListener("devicechange",async()=>{let{audioDevices:e,videoDevices:t}=await this.getAvailableDevices();this.onDeviceChange&&this.onDeviceChange(e,t)})}};lt();var Ya=class{apiKey;baseURL;options;axiosInstance;disconnected;browser;node;logger;consecutiveFailures;userAgent;lastIdentifier;lastMethod;address;constructor(e,t,s){let i=s||{};this.apiKey=e,this.baseURL=s?.userBaseURL||t+"/uss/v1",this.browser=typeof i.browser<"u"?i.browser:typeof window<"u",this.node=!this.browser,this.options={withCredentials:!1,warmUp:!1,recoverStateOnReconnect:!0,...i},this.node&&!this.options.httpsAgent&&(this.options.httpsAgent=new _t.Agent({keepAlive:!0,keepAliveMsecs:3e3})),this.axiosInstance=an.create(this.options),this.logger=Ps(i.logger)?i.logger:()=>null,this.consecutiveFailures=0,this.disconnected=!1}_logApiRequest(e,t,s,i){this.logger("info",`client: ${e} - Request - ${t}- ${JSON.stringify(s)} - ${JSON.stringify(i.params)}`,{tags:["api","api_request","client"],url:t,payload:s,config:i})}_logApiResponse(e,t,s){this.logger("info",`client:${e} - Response - url: ${t} > status ${s.status}`,{tags:["api","api_response","client"],url:t,response:s})}_logApiError(e,t,s,i){this.logger("error",`client:${e} - Error: ${JSON.stringify(s)} - url: ${t} - options: ${JSON.stringify(i)}`,{tags:["api","api_response","client"],url:t,error:s})}doAxiosRequest=async(e,t,s,i={})=>{let a=this._enrichAxiosOptions(i);try{let r;switch(this._logApiRequest(e,t,s,a),e){case"get":r=await this.axiosInstance.get(t,a);break;case"delete":r=await this.axiosInstance.delete(t,a);break;case"post":r=await this.axiosInstance.post(t,s,a);break;case"postForm":r=await this.axiosInstance.postForm(t,s,a);break;case"put":r=await this.axiosInstance.put(t,s,a);break;case"patch":r=await this.axiosInstance.patch(t,s,a);break;case"options":r=await this.axiosInstance.options(t,a);break;default:throw new Error("Invalid request type")}return this._logApiResponse(e,t,r),this.consecutiveFailures=0,this.handleResponse(r)}catch(r){if(r.client_request_id=a.headers?.["x-client-request-id"],this._logApiError(e,t,r,i),this.consecutiveFailures+=1,r.response)return r.response.data.code===dt.TOKEN_EXPIRED?(this.consecutiveFailures>1&&await rn(Ms(this.consecutiveFailures)),await this.doAxiosRequest(e,t,s,a)):this.handleResponse(r.response);throw r}};get(e,t){return this.doAxiosRequest("get",e,null,{params:t})}put(e,t){return this.doAxiosRequest("put",e,t)}post(e,t,s){return this.doAxiosRequest("post",e,t,{params:s})}patch(e,t){return this.doAxiosRequest("patch",e,t)}delete(e,t){return this.doAxiosRequest("delete",e,null,{params:t})}errorFromResponse(e){let t;return t=new Pt(`ErmisChat error HTTP code: ${e.status}`),e.data&&e.data.code&&(t=new Error(`ErmisChat error code ${e.data.code}: ${e.data.message}`),t.code=e.data.code),t.response=e,t.status=e.status,t}handleResponse(e){let t=e.data;if(Vs(e))throw this.errorFromResponse(e);return t}getUserAgent(){return this.userAgent||`ermis-chat-sdk-javascript-client-${this.node?"node":"browser"}-1.0.1`}setUserAgent(e){this.userAgent=e}_enrichAxiosOptions(e={params:{},headers:{},config:{}}){let t=null;e.headers?.["x-client-request-id"]||(e.headers={...e.headers,"x-client-request-id":Ue()});let{params:s,headers:i,...a}=this.options?.axiosRequestConfig||{};return{params:{...e.params,...s||{}},headers:{"X-Stream-Client":this.getUserAgent(),...e.headers,...i||{}},...t?{signal:t}:{},...e.config,...a||{}}}async sendOtpToPhone(e,t){this.lastIdentifier=e,this.lastMethod=t;let s={apikey:this.apiKey,identifier:e,language:"Vi",method:t,otp_type:"Login"};return this.post(this.baseURL+"/auth/get_otp_new",s)}async sendOtpToEmail(e){this.lastIdentifier=e,this.lastMethod="Email";let t={apikey:this.apiKey,identifier:e,language:"Vi",method:"Email",otp_type:"Login"};return this.post(this.baseURL+"/auth/get_otp_new",t)}async verifyOtp(e){let t={identifier:this.lastIdentifier,method:this.lastMethod,apikey:this.apiKey,otp:e};return this.post(this.baseURL+"/auth/otp_login",t)}async loginWithGoogle(e){let t={token:e,apikey:this.apiKey};return this.post(this.baseURL+"/auth/google_login",t)}async getWalletChallenge(e){this.address=e;let t=await this.post(this.baseURL+"/auth/get_challenge",{address:e,apikey:this.apiKey});return JSON.parse(t.challenge)}createNonce(e){let t="",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=s.length;for(let a=0;a<e;a++)t+=s.charAt(Math.floor(Math.random()*i));return t}async verifyWalletSignature(e){let t={address:this.address,signature:e,nonce:this.createNonce(20),apikey:this.apiKey};return this.post(this.baseURL+"/auth/verify_signature",t)}};var Xg={1e4:"10 seconds",3e4:"30 seconds",6e4:"1 minute",3e5:"5 minutes",9e5:"15 minutes",36e5:"60 minutes"};function Za(n,e){return e[n]??n}function Kp(n,e){if(!n||typeof n!="string")return n??"";let t=n.trim();if(!t)return"";let s=t.split(" "),i=s[0],a=s[1]??"",r=a?Za(a,e):"User";switch(i){case"1":{let o=s.slice(2).join(" ");return`${r} changed the channel name to ${o}.`}case"2":return`${r} changed the channel avatar.`;case"3":return`${r} changed the channel description.`;case"4":return`${r} was removed from the channel.`;case"5":return`${r} was banned.`;case"6":return`${r} was unbanned.`;case"7":return`${r} was promoted to moderator.`;case"8":return`${r} was demoted from moderator.`;case"9":return`${r}'s permissions were updated.`;case"10":return`${r} joined the channel.`;case"11":return`${r} declined the channel invitation.`;case"12":return`${r} left the channel.`;case"13":return`${r} cleared the chat history.`;case"14":{let l=(s[2]??"")==="true"?"public":"private";return`${r} changed the channel to ${l}.`}case"15":{let o=s[2]??"0";if(o==="0")return`${r} disabled cooldown.`;let l=Xg[o]??`${o}ms`;return`${r} enabled cooldown for ${l}.`}case"16":return`${r} updated the banned words.`;case"17":return`${r} was added to the channel.`;case"18":{let o=s[1]??"",l=s[2]??"",c=o?Za(o,e):"User",p=l?Za(l,e):"User";return`Admin ${c} left and assigned ${p} as the new admin.`}case"19":return`${r} pinned a message.`;case"20":return`${r} unpinned a message.`;default:return t}}function Jp(n){let e=parseInt(n,10);if(isNaN(e)||e<0)return n;let t=Math.floor(e/60),s=e%60;return`${t}:${s.toString().padStart(2,"0")}`}function er(n,e){return e[n]??n}function Xp(n,e){if(!n||typeof n!="string")return n??"";let t=n.trim();if(!t)return"";let s=t.split(" "),i=s[0],a=s[1]??"",r=a?er(a,e):"User";switch(i){case"1":return`\u{1F4DE} ${r} started an audio call.`;case"2":return`\u{1F4DE} Missed audio call from ${r}.`;case"3":{let o=s[2]??"",l=s[3]??"0",c=o?er(o,e):"User";return`\u{1F4DE} Audio call by ${r}, ended by ${c}. Duration: ${Jp(l)}.`}case"4":return`\u{1F4F9} ${r} started a video call.`;case"5":return`\u{1F4F9} Missed video call from ${r}.`;case"6":{let o=s[2]??"",l=s[3]??"0",c=o?er(o,e):"User";return`\u{1F4F9} Video call by ${r}, ended by ${c}. Duration: ${Jp(l)}.`}case"7":return`\u{1F4DE} Audio call from ${r} was rejected.`;case"8":return`\u{1F4F9} Video call from ${r} was rejected.`;case"9":return`\u{1F4DE} Audio call from ${r} \u2014 recipient was busy.`;case"10":return`\u{1F4F9} Video call from ${r} \u2014 recipient was busy.`;default:return t}}return gn(Qg);})();
19
+ `):" "+Dl(a[0]):"as no adapter specified";throw new C("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return s},adapters:ua};function da(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new je(null,n)}function Ls(n){return da(n),n.headers=se.from(n.headers),n.data=Tn.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Us.getAdapter(n.adapter||Xt.adapter)(n).then(function(s){return da(n),s.data=Tn.call(n,n.transformResponse,s),s.headers=se.from(s.headers),s},function(s){return kn(s)||(da(n),s&&s.response&&(s.response.data=Tn.call(n,n.transformResponse,s.response),s.response.headers=se.from(s.response.headers))),Promise.reject(s)})}var Fs={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{Fs[n]=function(s){return typeof s===n||"a"+(e<1?"n ":" ")+n}});var Ol={};Fs.transitional=function(e,t,s){function i(a,r){return"[Axios v"+kt+"] Transitional option '"+a+"'"+r+(s?". "+s:"")}return(a,r,o)=>{if(e===!1)throw new C(i(r," has been removed"+(t?" in "+t:"")),C.ERR_DEPRECATED);return t&&!Ol[r]&&(Ol[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(a,r,o):!0}};Fs.spelling=function(e){return(t,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};function oh(n,e,t){if(typeof n!="object")throw new C("options must be an object",C.ERR_BAD_OPTION_VALUE);let s=Object.keys(n),i=s.length;for(;i-- >0;){let a=s[i],r=e[a];if(r){let o=n[a],l=o===void 0||r(o,a,n);if(l!==!0)throw new C("option "+a+" must be "+l,C.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new C("Unknown option "+a,C.ERR_BAD_OPTION)}}var Fn={assertOptions:oh,validators:Fs};var Qe=Fn.validators,an=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Oi,response:new Oi}}async request(e,t){try{return await this._request(e,t)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;let a=i.stack?i.stack.replace(/^.+\n/,""):"";try{s.stack?a&&!String(s.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(s.stack+=`
20
+ `+a):s.stack=a}catch{}}throw s}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Je(this.defaults,t);let{transitional:s,paramsSerializer:i,headers:a}=t;s!==void 0&&Fn.assertOptions(s,{silentJSONParsing:Qe.transitional(Qe.boolean),forcedJSONParsing:Qe.transitional(Qe.boolean),clarifyTimeoutError:Qe.transitional(Qe.boolean)},!1),i!=null&&(d.isFunction(i)?t.paramsSerializer={serialize:i}:Fn.assertOptions(i,{encode:Qe.function,serialize:Qe.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Fn.assertOptions(t,{baseUrl:Qe.spelling("baseURL"),withXsrfToken:Qe.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=a&&d.merge(a.common,a[t.method]);a&&d.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),t.headers=se.concat(r,a);let o=[],l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(t)===!1||(l=l&&v.synchronous,o.unshift(v.fulfilled,v.rejected))});let c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let p,u=0,m;if(!l){let g=[Ls.bind(this),void 0];for(g.unshift.apply(g,o),g.push.apply(g,c),m=g.length,p=Promise.resolve(t);u<m;)p=p.then(g[u++],g[u++]);return p}m=o.length;let f=t;for(u=0;u<m;){let g=o[u++],v=o[u++];try{f=g(f)}catch(_){v.call(this,_);break}}try{p=Ls.call(this,f)}catch(g){return Promise.reject(g)}for(u=0,m=c.length;u<m;)p=p.then(c[u++],c[u++]);return p}getUri(e){e=Je(this.defaults,e);let t=Et(e.baseURL,e.url,e.allowAbsoluteUrls);return Ct(t,e.params,e.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(e){an.prototype[e]=function(t,s){return this.request(Je(s||{},{method:e,url:t,data:(s||{}).data}))}});d.forEach(["post","put","patch"],function(e){function t(s){return function(a,r,o){return this.request(Je(o||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:a,data:r}))}}an.prototype[e]=t(),an.prototype[e+"Form"]=t(!0)});var Pn=an;var ma=class n{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(a){t=a});let s=this;this.promise.then(i=>{if(!s._listeners)return;let a=s._listeners.length;for(;a-- >0;)s._listeners[a](i);s._listeners=null}),this.promise.then=i=>{let a,r=new Promise(o=>{s.subscribe(o),a=o}).then(i);return r.cancel=function(){s.unsubscribe(a)},r},e(function(a,r,o){s.reason||(s.reason=new je(a,r,o),t(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=s=>{e.abort(s)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new n(function(i){e=i}),cancel:e}}},Ul=ma;function fa(n){return function(t){return n.apply(null,t)}}function ha(n){return d.isObject(n)&&n.isAxiosError===!0}var ga={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ga).forEach(([n,e])=>{ga[e]=n});var Ll=ga;function Fl(n){let e=new Pn(n),t=xn(Pn.prototype.request,e);return d.extend(t,Pn.prototype,e,{allOwnKeys:!0}),d.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return Fl(Je(n,i))},t}var ue=Fl(Xt);ue.Axios=Pn;ue.CanceledError=je;ue.CancelToken=Ul;ue.isCancel=kn;ue.VERSION=kt;ue.toFormData=dt;ue.AxiosError=C;ue.Cancel=ue.CanceledError;ue.all=function(e){return Promise.all(e)};ue.spread=fa;ue.isAxiosError=ha;ue.mergeConfig=Je;ue.AxiosHeaders=se;ue.formToJSON=n=>ws(d.isHTMLForm(n)?new FormData(n):n);ue.getAdapter=Us.getAdapter;ue.HttpStatusCode=Ll;ue.default=ue;var rn=ue;var{Axios:Py,AxiosError:My,CanceledError:jy,isCancel:Ny,CancelToken:qy,VERSION:Gy,all:By,Cancel:$y,isAxiosError:zy,spread:Wy,toFormData:Vy,AxiosHeaders:Hy,HttpStatusCode:Ky,formToJSON:Jy,getAdapter:Xy,mergeConfig:Qy}=rn;pt();var Pl=Re(Ai());function Ps(n,e){n.then().catch(t=>{console.warn(`failed to do ${e}, ran into error: `,t)})}var on=n=>new Promise(e=>setTimeout(e,n));function Ms(n){return n&&(Object.prototype.toString.call(n)==="[object Function]"||typeof n=="function"||n instanceof Function)}var mt={TOKEN_EXPIRED:40,WS_CLOSED_SUCCESS:1e3};function ch(n){return n!==null&&typeof n=="object"&&(n.readable||typeof n._read=="function")}function lh(n){return n!=null&&n.constructor!=null&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function ph(n){return typeof window<"u"&&"File"in window&&n instanceof File}function uh(n){return typeof window<"u"&&"Blob"in window&&n instanceof Blob}function Ml(n,e,t){let s=new Pl.default;return ch(n)||lh(n)||ph(n)||uh(n)?e?s.append("file",n,e):s.append("file",n):s.append("file",{uri:n,name:e||n.split("/").reverse()[0],contentType:t||void 0,type:t||void 0}),s}function js(n){let e=Math.min(500+n*2e3,25e3),t=Math.min(Math.max(250,(n-1)*2e3),25e3);return Math.floor(Math.random()*(e-t)+t)}function Ue(){return dh()}function Mn(n){let e="";for(let t=0;t<n.length;t++)e+=n[t].toString(16).padStart(2,"0");return e}function dh(){let n=hh(16);return n[6]=n[6]&15|64,n[8]=n[8]&191|128,Mn(n.subarray(0,4))+"-"+Mn(n.subarray(4,6))+"-"+Mn(n.subarray(6,8))+"-"+Mn(n.subarray(8,10))+"-"+Mn(n.subarray(10,16))}function mh(n){let e=Math.pow(2,8*n.byteLength/n.length);for(let t=0;t<n.length;t++)n[t]=Math.random()*e}var fh=typeof crypto<"u"&&typeof crypto?.getRandomValues<"u"?crypto.getRandomValues.bind(crypto):typeof msCrypto<"u"?msCrypto.getRandomValues.bind(msCrypto):mh;function hh(n){let e=new Uint8Array(n);return fh(e),e}function jl(n){typeof window<"u"&&window.addEventListener&&(window.addEventListener("offline",n),window.addEventListener("online",n))}function Nl(n){typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("offline",n),window.removeEventListener("online",n))}var ql=n=>{let e=[];for(let t in n)n[t]!==void 0&&(Array.isArray(n[t])||typeof n[t]=="object"?e.push(`${t}=${encodeURIComponent(JSON.stringify(n[t]))}`):e.push(`${t}=${encodeURIComponent(n[t])}`));return e.join("&")};function Gl(n){return{...n,__html:n.html,pinned_at:n.pinned_at?new Date(n.pinned_at):null,created_at:n.created_at?new Date(n.created_at):new Date,updated_at:n.updated_at?new Date(n.updated_at):new Date,status:n.status||"received"}}function Bl(n,e,t=!1,s="created_at",i=!0){let a=i||t,r=n;t&&(r=r.filter(v=>!(v.id&&e.id===v.id)));let o=r.length;if(o===0&&a)return r.concat(e);if(o===0)return[...r];if(s==="pinned_at")return r.concat(e);let l=e[s].getTime(),c=r[o-1][s].getTime()<l;if(c&&a)return r.concat(e);if(c)return[...r];let p=0,u=0,m=o-1;for(;p<=m;)u=Math.floor((m+p)/2),r[u][s].getTime()<=l?p=u+1:m=u-1;if(!t&&e.id){if(r[p]&&e.id===r[p].id)return r[p]=e,[...r];if(r[p-1]&&e.id===r[p-1].id)return r[p-1]=e,[...r]}a&&r.splice(p,0,e);let f=new Map,g=[];for(let v of r)f.has(v.id)||(f.set(v.id,!0),g.push(v));return g}var H=(n,e)=>n.length===0?[]:e.length===0?n.map(t=>(t.user={id:t.user?.id,name:t.user?.id,avatar:""},t)):n.map(t=>{let s=t.user?.id,i=t?.latest_reactions,a=t?.quoted_message,r=e.find(o=>o.id===s);if(r&&(t.user={id:r.id,name:r.name||r.id,avatar:r.avatar||""}),i&&(t.latest_reactions=i.map(o=>{let l=e.find(c=>c.id===o.user_id);return{...o,user:{id:l?.id||o.user_id,name:l?.name||o.user_id,avatar:l?.avatar||""}}})),a){let o=e.find(l=>l.id===a.user?.id);t.quoted_message.user={id:o?.id||a.user?.id,name:o?.name||a.user?.id,avatar:o?.avatar||""}}return t}),W=(n,e)=>{if(e.length===0)return{id:n,name:n,avatar:""};let t=e.find(s=>s.id===n);return{id:n,name:t?.name||n,avatar:t?.avatar||""}},Dt=(n,e)=>{if(n.length===0)return"Empty channel";let t=n.find(s=>s.user.id!==e);return t?t.user.name||t.user.id:"Empty channel"},jn=(n,e)=>{if(n.length===0)return"";let t=n.find(s=>s.user.id!==e);return t&&t.user.avatar||""};async function Nn(n,e){let t=(e||[]).map(a=>a.user?.id).filter(a=>!!a),s=n.state.users,i=t.filter(a=>!s[a]);i.length>0&&await n.getBatchUsers(i)}var Ot=(n=[])=>n.length>0?Math.max(...n.map(e=>new Date(e.created_at).getTime())):0,Ut=(n,e,t,s)=>{let i,a;if(["videoConfig","audioConfig","transciverState"].includes(t)&&s){i=1;let l=JSON.stringify(s);a=new TextEncoder().encode(l)}else t==="connected"?(i=1,a=new Uint8Array(0)):(i=9,a=new Uint8Array(n));let r=new Uint8Array(i+a.byteLength),o=0;switch(t){case"videoConfig":o=0;break;case"audioConfig":o=1;break;case"video-key":o=2;break;case"video-delta":o=3;break;case"audio":o=4;break;case"connected":o=6;break;case"transciverState":o=7;break}return r[0]=o,e!==null&&new DataView(r.buffer).setBigUint64(1,BigInt(e),!1),r.set(a,i),r},ba=n=>{let e="",t=new Uint8Array(n),s=t.byteLength;for(let i=0;i<s;i++)e+=String.fromCharCode(t[i]);return btoa(e)},$l=n=>{let e={2048:"123",4096:"153",8192:"156",16384:"183",32768:"186"},t=/2048|4096|8192|16384|32768/g;return n.match(t)?n.replace(t,s=>e[s]):"hev1.1.6.L123.B0"},zl=(n,e,t)=>{let s={cid:e,forward_cid:t,forward_message_id:n.id};return n.sticker_url&&(!n.text||n.text==="")&&(!n.attachments||Array.isArray(n.attachments)&&n.attachments.length===0)?(s.sticker_url=n.sticker_url,s.text=n.text):(s.text=n.text||"",n.attachments&&n.attachments.length>0&&(s.attachments=n.attachments.filter(i=>i.type!=="linkPreview"))),s};var qn=class{_channel;watcher_count;typing;read;pinnedMessages;watchers;members;unreadCount;membership;last_message_at;isUpToDate;messageSets=[];topics=[];constructor(e){this._channel=e,this.watcher_count=0,this.typing={},this.read={},this.initMessages(),this.pinnedMessages=[],this.watchers={},this.members={},this.membership={},this.unreadCount=0,this.isUpToDate=!0,this.last_message_at=e?.state?.last_message_at!=null?new Date(e.state.last_message_at):null}get messages(){return this.messageSets.find(e=>e.isCurrent)?.messages||[]}set messages(e){let t=this.messageSets.findIndex(s=>s.isCurrent);this.messageSets[t].messages=e}get latestMessages(){return this.messageSets.find(e=>e.isLatest)?.messages||[]}set latestMessages(e){let t=this.messageSets.findIndex(s=>s.isLatest);this.messageSets[t].messages=e}addMessageSorted(e,t=!1,s=!0,i="latest"){return this.addMessagesSorted([e],t,!1,s,i)}formatMessage(e){return{...e,__html:e.html,pinned_at:e.pinned_at?new Date(e.pinned_at):null,created_at:e.created_at?new Date(e.created_at):new Date,updated_at:e.updated_at?new Date(e.updated_at):null,status:e.status||"received"}}addMessagesSorted(e,t=!1,s=!1,i=!0,a="current"){let{messagesToAdd:r,targetMessageSetIndex:o}=this.findTargetMessageSet(e,i,a);for(let l=0;l<r.length;l+=1){let c=r[l].created_at instanceof Date,p;if(c?p=r[l]:(p=this.formatMessage(r[l]),p.user&&this._channel?.cid&&this._channel.getClient().state.updateUserReference(p.user,this._channel.cid),this.last_message_at||(this.last_message_at=new Date(p.created_at.getTime())),p.created_at.getTime()>this.last_message_at.getTime()&&(this.last_message_at=new Date(p.created_at.getTime()))),!p.pinned){let m=this.pinnedMessages.find(f=>f.id===p.id);m&&(p.pinned=!0,p.pinned_at=m.pinned_at||new Date)}!p.parent_id&&o!==-1&&(this.messageSets[o].messages=this._addToMessageList(this.messageSets[o].messages,p,t,"created_at",i))}return{messageSet:this.messageSets[o]}}addPinnedMessages(e){for(let t=0;t<e.length;t+=1)this.addPinnedMessage(e[t]);this.pinnedMessages.sort((t,s)=>{let i=t.pinned_at?new Date(t.pinned_at).getTime():0;return(s.pinned_at?new Date(s.pinned_at).getTime():0)-i})}addPinnedMessage(e){let t=this.formatMessage(e);this.pinnedMessages=this.pinnedMessages.filter(s=>s.id!==t.id),this.pinnedMessages=[t,...this.pinnedMessages]}removePinnedMessage(e){let{result:t}=this.removeMessageFromArray(this.pinnedMessages,e);this.pinnedMessages=t}addReaction(e,t,s){if(!t)return;let i=t;return this._updateMessage(t,a=>(i.own_reactions=this._addOwnReactionToMessage(a.own_reactions,e,s),this.formatMessage(i))),i}_addOwnReactionToMessage(e,t,s){return s?e=[]:e=this._removeOwnReactionFromMessage(e,t),e=e||[],this._channel.getClient().userID===t.user_id&&e.push(t),e}_removeOwnReactionFromMessage(e,t){return e&&e.filter(s=>s.user_id!==t.user_id||s.type!==t.type)}removeReaction(e,t){if(!t)return;let s=t;return this._updateMessage(t,i=>(s.own_reactions=this._removeOwnReactionFromMessage(i.own_reactions,e),this.formatMessage(s))),s}removeQuotedMessageReferences(e){let t=s=>({...s,created_at:s.created_at.toISOString(),pinned_at:s.pinned_at?.toISOString(),updated_at:s.updated_at?.toISOString()});this.messageSets.forEach(s=>{let i=s.messages.filter(a=>a.quoted_message_id===e.id).map(t).map(a=>({...a,quoted_message:{...e,attachments:[]}}));this.addMessagesSorted(i,!0)})}_updateMessage(e,t){let{parent_id:s,pinned:i}=e;if(!s){let a=this.findMessageSetIndex(e);if(a!==-1){let r=this.messageSets[a].messages.findIndex(o=>o.id===e.id);r!==-1&&(this.messageSets[a].messages[r]=t(this.messageSets[a].messages[r]))}}if(i){let a=this.pinnedMessages.findIndex(r=>r.id===e.id);a!==-1&&(this.pinnedMessages[a]=t(this.pinnedMessages[a]))}}setIsUpToDate=e=>{this.isUpToDate=e};updateMessageStatus(e,t){this._updateMessage({id:e},s=>({...s,status:t}))}_addToMessageList(e,t,s=!1,i="created_at",a=!0){return Bl(e,t,s,i,a)}removeMessage(e){let t=!1,s=e.messageSetIndex??this.findMessageSetIndex(e);if(s!==-1){let{removed:i,result:a}=this.removeMessageFromArray(this.messageSets[s].messages,e);this.messageSets[s].messages=a,t=i}return t}removeMessageFromArray=(e,t)=>{let s=e.filter(i=>!(i.id&&t.id&&i.id===t.id));return{removed:s.length<e.length,result:s}};updateUserMessages=e=>{let t=(s,i)=>{for(let a=0;a<s.length;a++){let r=s[a],o=r?.latest_reactions||[];r.user?.id===i.id&&(s[a]={...r,user:r.user?.id===i.id?i:r.user}),o&&o.some(l=>l.user?.id===i.id)&&(s[a]={...r,latest_reactions:o.map(l=>l.user?.id===i.id?{...l,user:i}:l)})}};this.messageSets.forEach(s=>t(s.messages,e)),t(this.pinnedMessages,e)};deleteUserMessages=(e,t=!1)=>{let s=(i,a,r=!1)=>{for(let o=0;o<i.length;o++){let l=i[o];l.user?.id===a.id&&(r?i[o]={cid:l.cid,created_at:l.created_at,deleted_at:new Date().toISOString(),id:l.id,latest_reactions:[],mentioned_users:[],own_reactions:[],parent_id:l.parent_id,reply_count:l.reply_count,status:l.status,type:"deleted",updated_at:l.updated_at,user:l.user}:i[o]={...l,type:"deleted",deleted_at:new Date().toISOString()})}};this.messageSets.forEach(i=>s(i.messages,e,t)),s(this.pinnedMessages,e,t)};filterErrorMessages(){let e=this.latestMessages.filter(t=>t.type!=="error");this.latestMessages=e}clean(){let e=new Date;for(let[t,s]of Object.entries(this.typing)){let i=typeof s.received_at=="string"?new Date(s.received_at):s.received_at||new Date;e.getTime()-i.getTime()>7e3&&(delete this.typing[t],this._channel.getClient().dispatchEvent({cid:this._channel.cid,type:"typing.stop",user:{id:t}}))}}clearMessages(){this.initMessages(),this.pinnedMessages=[]}initMessages(){this.messageSets=[{messages:[],isLatest:!0,isCurrent:!0}]}async loadMessageIntoState(e,t,s=25){let i,a=!1,r=t||e;if(e==="latest"){if(this.messages===this.latestMessages)return;i=this.messageSets.findIndex(o=>o.isLatest)}else i=this.findMessageSetIndex({id:r});i!==-1&&(this.switchToMessageSet(i),a=!0),a||await this._channel.query({messages:{id_around:r,limit:s}},"new"),i=this.findMessageSetIndex({id:r}),i!==-1&&this.switchToMessageSet(i)}findMessage(e,t){let s=this.findMessageSetIndex({id:e});if(s!==-1)return this.messageSets[s].messages.find(i=>i.id===e)}switchToMessageSet(e){let t=this.messageSets.find(s=>s.isCurrent);t&&(t.isCurrent=!1,this.messageSets[e].isCurrent=!0)}areMessageSetsOverlap(e,t){return e.some(s=>t.find(i=>s.id===i.id))}findMessageSetIndex(e){return this.messageSets.findIndex(t=>!!t.messages.find(s=>s.id===e.id))}findTargetMessageSet(e,t=!0,s="current"){let i=e,a;if(t){let r=this.messageSets.map((c,p)=>p).filter(c=>this.areMessageSetsOverlap(this.messageSets[c].messages,e));switch(s){case"new":r.length>0?a=r[0]:e.some(c=>!c.parent_id)&&(this.messageSets.push({messages:[],isCurrent:!1,isLatest:!1}),a=this.messageSets.length-1);break;case"current":a=this.messageSets.findIndex(c=>c.isCurrent);break;case"latest":a=this.messageSets.findIndex(c=>c.isLatest);break;default:a=-1}let o=r.splice(0,1)[0],l=[...r];if(o!==void 0&&o!==a&&l.push(a),l.length>0){let c=this.messageSets[o],p=this.messageSets.filter((m,f)=>l.indexOf(f)!==-1);p.forEach(m=>{c.isLatest=c.isLatest||m.isLatest,c.isCurrent=c.isCurrent||m.isCurrent,i=[...i,...m.messages]}),p.forEach(m=>this.messageSets.splice(this.messageSets.indexOf(m),1)),a=this.messageSets.findIndex(m=>this.areMessageSetsOverlap(m.messages,e))}}else a=this.findMessageSetIndex(e[0]);return{targetMessageSetIndex:a,messagesToAdd:i}}};function Gn(n){let e=n.lastIndexOf("."),t=e>0?n.slice(0,e):n,s=e>0?n.slice(e):"";return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/đ/g,"d").replace(/Đ/g,"D").replace(/\s+/g,"_")+s}function Wl(n){let e=n.type.toLowerCase(),t=n.name.toLowerCase().split(".").pop()||"";return e==="image/heic"||e==="image/heif"||t==="heic"||t==="heif"}function xa(n,e){let t=n.toLowerCase(),s=(e||"").toLowerCase().split(".").pop()||"";return t==="image/heic"||t==="image/heif"||s==="heic"||s==="heif"?"file":t.startsWith("image/")?"image":t.startsWith("video/")?"video":t.startsWith("audio/")?"audio":"file"}function Ns(n){return n.type==="video/mp4"||n.type==="video/webm"||n.type==="video/quicktime"}function qs(n,e,t,s){let i=Gn(n.name),a=n.type||"",r=xa(a,n.name);if(s)return{type:"voiceRecording",asset_url:e,title:i,file_size:n.size,mime_type:a,waveform_data:s.waveform_data,duration:s.duration};switch(r){case"image":return{type:"image",image_url:e,title:i,file_size:n.size,mime_type:a};case"video":return{type:"video",asset_url:e,title:i,file_size:n.size,mime_type:a,thumb_url:t||""};case"audio":return{type:"file",asset_url:e,title:i,file_size:n.size,mime_type:a};default:return{type:"file",asset_url:e,title:i,file_size:n.size,mime_type:a||""}}}var cn=class{_client;type;id;data;_data;cid;listeners;state;initialized;offlineMode;lastKeyStroke;lastTypingEvent;isTyping;disconnected;constructor(e,t,s,i){let a=/^[\w_-]+$/,r=/^[\w!:_-]+$/;if(!a.test(t))throw new Error(`Invalid chat type ${t}, letters, numbers and "_-" are allowed`);if(typeof s=="string"&&!r.test(s))throw new Error(`Invalid chat id ${s}, letters, numbers and "!-_" are allowed`);this._client=e,this.type=t,this.id=s,this.data=i,this._data={...i},this.cid=`${t}:${s}`,this.listeners={},this.state=new qn(this),this.initialized=!1,this.offlineMode=!1,this.lastTypingEvent=null,this.isTyping=!1,this.disconnected=!1}getClient(){return this._client}async sendMessage(e){e.id||(e={...e,id:Ue()});let t=e.id,s={...e,id:t,status:"sending",created_at:new Date().toISOString(),updated_at:new Date().toISOString(),user:this.getClient().user,user_id:this.getClient().userID,type:"regular"};this.state.addMessageSorted(s);try{return await this.getClient().post(this._channelURL()+"/message",{message:{...e}})}catch(i){let r=!i.response||i.code==="ERR_NETWORK"||i.isWSFailure||!this.getClient().wsConnection?.isHealthy?"failed_offline":"error";throw this.state.updateMessageStatus(t,r),i}}async retryMessage(e){let t=this.state.messages.find(i=>i.id===e);if(!t)throw new Error(`Message ${e} not found in state`);this.state.updateMessageStatus(e,"sending");let s={id:t.id,text:t.text,attachments:t.attachments,mentioned_users:t.mentioned_users,parent_id:t.parent_id,quoted_message_id:t.quoted_message_id,sticker_url:t.sticker_url};t.show_in_channel!==void 0&&(s.show_in_channel=t.show_in_channel);try{return await this.getClient().post(this._channelURL()+"/message",{message:s})}catch(i){let a=!i.response||i.code==="ERR_NETWORK"||i.isWSFailure||!this.getClient().wsConnection?.isHealthy;throw this.state.updateMessageStatus(e,a?"failed_offline":"error"),i}}async createPoll(e){let t=Ue();return e={...e,id:t},await this.getClient().post(this._channelURL()+"/message",{message:{...e}})}async votePoll(e,t){if(!e)throw Error("Message id is missing");return await this.getClient().post(this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}/poll/${t}`)}async forwardMessage(e,t){return e.id||(e={...e,id:Ue()}),await this.getClient().post(`${this.getClient().baseURL}/channels/${t.type}/${t.channelID}/message`,{message:{...e}})}async pinMessage(e){return await this.getClient().post(this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}/pin`)}async unpinMessage(e){return await this.getClient().post(this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}/unpin`)}async editMessage(e,t){return await this.getClient().post(this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}`,{message:t})}sendFile(e,t,s,i){return this.getClient().sendFile(`${this._channelURL()}/file`,e,t,s,i)}async uploadAndPrepareAttachments(e,t){let s=[],i=e.map(c=>{let p=Gn(c.name);return p!==c.name?new File([c],p,{type:c.type,lastModified:c.lastModified}):c}),a=await Promise.allSettled(i.map(c=>this.sendFile(c,c.name,c.type))),r=new Map,o=[];for(let c=0;c<i.length;c++)a[c].status==="fulfilled"&&Ns(i[c])&&o.push((async()=>{try{let u=await this.getThumbBlobVideo(e[c]);if(u){let m=new File([u],`thumb_${i[c].name}.jpg`,{type:"image/jpeg"}),f=await this.sendFile(m,m.name,"image/jpeg");r.set(c,f.file)}}catch{}})());await Promise.allSettled(o);let l=[];for(let c=0;c<i.length;c++){let p=a[c];if(p.status==="fulfilled"){let u=p.value.file,m=r.get(c),f=t?.voiceMetadata?.get(c);l.push(qs(i[c],u,m,f))}else s.push({file:e[c],error:p.reason instanceof Error?p.reason:new Error(String(p.reason))})}return{attachments:l,failedFiles:s}}async sendEvent(e){return await this.getClient().post(this._channelURL()+"/event",{event:e})}async sendReaction(e,t){if(!e)throw Error("Message id is missing");return await this.getClient().post(this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}/reaction/${t}`)}deleteReaction(e,t){if(!t||!e)throw Error("Deleting a reaction requires specifying both the message and reaction type");let s=this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}/reaction/${t}`;return this.getClient().delete(s,{})}async update(e={},t){return["config","cid","created_by","id","member_count","type","created_at","updated_at","last_message_at","own_capabilities"].forEach(i=>{delete e[i]}),await this._update({message:t,data:e})}async delete(){return await this.getClient().delete(this._channelURL())}async truncate(){return await this.getClient().delete(this._channelURL()+"/truncate")}async blockUser(){return await this.getClient().post(this._channelURL(),{action:"block"})}async unblockUser(){return await this.getClient().post(this._channelURL(),{action:"unblock"})}async acceptInvite(e){let t=this.id,s=this.getClient().userBaseURL+`/token_gate/join_channel/${this.type}`;return this.getClient().post(s,{},{channel_id:t,action:e})}async rejectInvite(){let e=this.getClient().baseURL+`/invites/${this.type}/${this.id}/reject`;return this.getClient().post(e)}async skipInvite(){let e=this.getClient().baseURL+`/invites/${this.type}/${this.id}/skip`;return this.getClient().post(e)}async addMembers(e){return await this._update({add_members:e})}async addModerators(e){return await this._update({promote_members:e})}async banMembers(e){return await this._update({ban_members:e})}async unbanMembers(e){return await this._update({unban_members:e})}async updateCapabilities(e){return await this._update({capabilities:e})}async setSlowMode(e){let t=[0,1e4,3e4,6e4,3e5,9e5,36e5];if(!t.includes(e))throw new Error(`Invalid cooldown value: ${e}. Allowed values are: ${t.join(", ")} (milliseconds).`);return await this.update({member_message_cooldown:e})}async queryAttachmentMessages(){let e=await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/attachment`,{attachment_types:["image","video","file","voiceRecording","linkPreview"]});return e.attachments&&e.attachments.sort((t,s)=>new Date(s.created_at).getTime()-new Date(t.created_at).getTime()),e}async searchMessage(e,t){let s=await this.getClient().post(this.getClient().baseURL+"/channels/search",{cid:this.cid,search_term:e,offset:t,limit:25});return!s||s?.search_result?.messages.length===0?null:{...s?.search_result,messages:s?.search_result?.messages.map(i=>{let a=W(i.user_id,Object.values(this.getClient().state.users))||i.user;return{...i,user:a}})}}async removeMembers(e){return await this._update({remove_members:e})}async demoteModerators(e){return await this._update({demote_members:e})}async _update(e){let t=await this.getClient().post(this._channelURL(),e);return this.data={...this.data,...t.channel},t}_processTopics(e,t){let s=e.map(a=>(a.channel&&a.channel.members&&(a.channel.members=H(a.channel.members,t)),a.messages&&(a.messages=H(a.messages,t)),a.pinned_messages&&(a.pinned_messages=H(a.pinned_messages,t)),a.read&&(a.read=H(a.read,t)),a)),{channels:i}=this.getClient().hydrateChannels(s,{});this.state.topics=i}async muteNotification(e){return await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/muted`,{mute:!0,duration:e})}async unMuteNotification(){return await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/muted`,{mute:!1})}async keystroke(e,t){let s=new Date,i=this.lastTypingEvent&&s.getTime()-this.lastTypingEvent.getTime();this.lastKeyStroke=s,this.isTyping=!0,(i===null||i>2e3)&&(this.lastTypingEvent=new Date,await this.sendEvent({type:"typing.start",parent_id:e,...t||{}}))}async stopTyping(e,t){this.isTyping&&(this.lastTypingEvent=null,this.isTyping=!1,await this.sendEvent({type:"typing.stop",parent_id:e,...t||{}}))}_isTypingIndicatorsEnabled(){return!0}lastMessage(){let e=this.state.latestMessages.length-5;e<0&&(e=0);let t=this.state.latestMessages.length+1,s=this.state.latestMessages.slice(e,t);return s.sort((i,a)=>a.created_at.getTime()-i.created_at.getTime()),s[0]}async markRead(){return await this.getClient().post(this._channelURL()+"/read")}clean(){this.lastKeyStroke&&new Date().getTime()-this.lastKeyStroke.getTime()>1e3&&this.isTyping&&Ps(this.stopTyping(),"stop typing event"),this.state.clean()}async watch(e){await this.getClient().wsPromise;let t={...e},s=await this.query(t,"latest");this.initialized=!0,await Nn(this.getClient(),s.channel.members);let i=Object.values(this.getClient().state.users);if(s.channel.members=H(s.channel.members,i),s.channel.name=s.channel.type==="messaging"?Dt(s.channel.members,this.getClient().userID||""):s.channel.name,s.channel.image=s.channel.type==="messaging"?jn(s.channel.members,this.getClient().userID||""):s.channel.image,s.messages=H(s.messages,i),s.pinned_messages=s.pinned_messages?H(s.pinned_messages,i):[],s.read=H(s.read||[],i),this.type==="team"&&s.channel.topics_enabled){let a={filter_conditions:{type:["topic"],parent_cid:this.cid,project_id:this.getClient().projectId},sort:[],message_limit:25},r=await this.getClient().post(this.getClient().baseURL+"/channels",a);this._processTopics(r.channels||[],i)}return this.data=s.channel,this._client.logger("info",`channel:watch() - started watching channel ${this.cid}`,{tags:["channel"],channel:this}),s}lastRead(){let{userID:e}=this.getClient();if(e)return this.state.read[e]?this.state.read[e].last_read:null}_countMessageAsUnread(e){return!(e.parent_id&&!e.show_in_channel||e.user?.id===this.getClient().userID||e.type==="system"||Array.isArray(this.data?.own_capabilities)&&!this.data?.own_capabilities.includes("read-events"))}countUnread(e){if(!e)return this.state.unreadCount;let t=0;for(let s=0;s<this.state.latestMessages.length;s+=1){let i=this.state.latestMessages[s];i.created_at>e&&this._countMessageAsUnread(i)&&t++}return t}getUnreadMemberCount(){return this.state.read?Object.values(this.state.read):[]}getCapabilitiesMember(){return this.data?this.data.member_capabilities:[]}create=async()=>this.type==="messaging"?await this.createDirectChannel("latest"):await this.query({},"latest");async createTopic(e){let t=this._client.projectId,s=Ue(),i=`${t}:${s}`,a=`${this.getClient().baseURL}/channels/topic/${i}`,r={project_id:t,parent_cid:this.cid,data:{...e}};return await this.getClient().post(a+"/query",r)}async query(e,t="current"){await this.getClient().wsPromise;let s=this._client.projectId,i={...e,project_id:s},a=`${this.getClient().baseURL}/channels/${this.type}`;if(this.id)a+=`/${this.id}`;else if(this.type==="team"){let u=Ue();this.id=`${s}:${u}`,a+=`/${this.id}`}let r={state:!0,...i};this._data&&Object.keys(this._data).length>0&&(r.data=this._data);let o=await this.getClient().post(a+"/query",r);await Nn(this.getClient(),o.channel.members);let l=Object.values(this.getClient().state.users);if(o.channel.members=H(o.channel.members,l),o.channel.name=o.channel.type==="messaging"?Dt(o.channel.members,this.getClient().userID||""):o.channel.name,o.channel.image=o.channel.type==="messaging"?jn(o.channel.members,this.getClient().userID||""):o.channel.image,o.messages=H(o.messages,l),o.pinned_messages=o.pinned_messages?H(o.pinned_messages,l):[],o.read=H(o.read||[],l),o.channel.is_pinned=o.is_pinned||!1,!this.id){this.id=o.channel.id,this.cid=o.channel.cid;let u=o.channel.members.map(f=>f.user_id||f.user?.id).sort().join(","),m=`${this.type}:!members-${u}`;m in this.getClient().activeChannels&&delete this.getClient().activeChannels[m],this.cid in this.getClient().activeChannels||(this.getClient().activeChannels[this.cid]=this)}let{messageSet:c}=this._initializeState(o,t),p=[...o.channel.own_capabilities||[]].sort().join()!==[...Array.isArray(this.data?.own_capabilities)?this.data?.own_capabilities:[]].sort().join();return this.data=o.channel,this.offlineMode=!1,p&&this.getClient().dispatchEvent({type:"capabilities.changed",cid:this.cid,own_capabilities:o.channel.own_capabilities}),o}async createDirectChannel(e="current"){await this.getClient().wsPromise;let t=this._client.projectId,s=`${this.getClient().baseURL}/channels/${this.type}`,i={project_id:t};this._data&&Object.keys(this._data).length>0&&(i.data=this._data);let a=await this.getClient().post(s+"/query",i),r=Object.values(this.getClient().state.users);a.channel.members=H(a.channel.members,r),a.channel.name=a.channel.type==="messaging"?Dt(a.channel.members,this.getClient().userID||""):a.channel.name,a.messages=H(a.messages,r),a.pinned_messages=a.pinned_messages?H(a.pinned_messages,r):[],a.read=H(a.read||[],r);let{messageSet:o}=this._initializeState(a,e),l=[...a.channel.own_capabilities||[]].sort().join()!==[...Array.isArray(this.data?.own_capabilities)?this.data?.own_capabilities:[]].sort().join();return this.data=a.channel,this.offlineMode=!1,l&&this.getClient().dispatchEvent({type:"capabilities.changed",cid:a.channel.cid,own_capabilities:a.channel.own_capabilities}),a}async queryMessagesLessThanId(e,t=25){await this.getClient().wsPromise;let s=this._client.projectId,i=`${this.getClient().baseURL}/channels/${this.type}/${this.id}`,a=await this.getClient().post(i+"/query",{state:!0,project_id:s,messages:{limit:t,id_lt:e}}),r=Object.values(this.getClient().state.users);if(a.messages=H(a.messages,r),a.messages&&a.messages.length>0){for(let o of a.messages)if(!o.pinned){let l=this.state.pinnedMessages?.find(c=>c.id===o.id);if(l){o.pinned=!0;let c=l.pinned_at||new Date;o.pinned_at=typeof c=="string"?c:c.toISOString()}}this.state.addMessagesSorted(a.messages,!1,!0,!0,"current")}return a.messages}async queryMessagesGreaterThanId(e,t=25){await this.getClient().wsPromise;let s=this._client.projectId,i=`${this.getClient().baseURL}/channels/${this.type}/${this.id}`,a=await this.getClient().post(i+"/query",{state:!0,project_id:s,messages:{limit:t,id_gt:e}}),r=Object.values(this.getClient().state.users);if(a.messages=H(a.messages,r),a.messages&&a.messages.length>0){for(let o of a.messages)if(!o.pinned){let l=this.state.pinnedMessages?.find(c=>c.id===o.id);if(l){o.pinned=!0;let c=l.pinned_at||new Date;o.pinned_at=typeof c=="string"?c:c.toISOString()}}this.state.addMessagesSorted(a.messages,!1,!0,!0,"current")}return a.messages}async queryMessagesAroundId(e,t=25){await this.getClient().wsPromise;let s=this._client.projectId,i=`${this.getClient().baseURL}/channels/${this.type}/${this.id}`,a=await this.getClient().post(i+"/query",{state:!0,project_id:s,messages:{limit:t,id_around:e}}),r=Object.values(this.getClient().state.users);if(a.messages=H(a.messages,r),a.messages&&a.messages.length>0){for(let o of a.messages)if(!o.pinned){let l=this.state.pinnedMessages?.find(c=>c.id===o.id);if(l){o.pinned=!0;let c=l.pinned_at||new Date;o.pinned_at=typeof c=="string"?c:c.toISOString()}}this.state.addMessagesSorted(a.messages,!1,!0,!0,"current")}return a.messages}async deleteMessage(e){return await this.getClient().delete(this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}`)}async deleteMessageForMe(e){return await this.getClient().delete(this.getClient().baseURL+`/messages/${this.type}/${this.id}/${e}`,{for_me:!0})}async getThumbBlobVideo(e){return new Promise(t=>{let i=document.createElement("video");i.src=URL.createObjectURL(e),i.crossOrigin="anonymous",i.load(),i.addEventListener("error",()=>{console.error("Error when loading video file."),t(null)}),i.addEventListener("loadedmetadata",()=>{if(i.duration<.1){console.error("Video is too short."),t(null);return}setTimeout(()=>{i.currentTime=.1},200)}),i.addEventListener("seeked",()=>{try{let a=document.createElement("canvas");a.width=i.videoWidth,a.height=i.videoHeight;let r=a.getContext("2d");if(!r){console.error("Failed to create canvas context."),t(null);return}r.drawImage(i,0,0,a.width,a.height),r.canvas.toBlob(o=>{if(!o){console.error("Failed to generate thumbnail."),t(null);return}t(o),URL.revokeObjectURL(i.src)},"image/jpeg",.75)}catch(a){console.error("Error while extracting thumbnail:",a),t(null)}})})}async enableTopics(){return await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/topics/enable`,{project_id:this.getClient().projectId,messages:{limit:25}})}async disableTopics(){return await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/topics/disable`,{project_id:this.getClient().projectId})}async closeTopic(e){return await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/topics/close`,{project_id:this.getClient().projectId,topic_cid:e})}async reopenTopic(e){return await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/topics/reopen`,{project_id:this.getClient().projectId,topic_cid:e})}async editTopic(e,t){let s=await this.getClient().post(this.getClient().baseURL+`/channels/${this.type}/${this.id}/topics`,{project_id:this.getClient().projectId,topic_cid:e,data:t});if(s){let i=this.getClient().activeChannels[e];return i?(i.data=s.channel,i.data):s.channel}}on(e,t){let s=t?e:"all",i=t||e;return s in this.listeners||(this.listeners[s]=[]),this._client.logger("info",`Attaching listener for ${s} event on channel ${this.cid}`,{tags:["event","channel"],channel:this}),this.listeners[s].push(i),{unsubscribe:()=>{this._client.logger("info",`Removing listener for ${s} event from channel ${this.cid}`,{tags:["event","channel"],channel:this}),this.listeners[s]=this.listeners[s].filter(a=>a!==i)}}}off(e,t){let s=t?e:"all",i=t||e;s in this.listeners||(this.listeners[s]=[]),this._client.logger("info",`Removing listener for ${s} event from channel ${this.cid}`,{tags:["event","channel"],channel:this}),this.listeners[s]=this.listeners[s].filter(a=>a!==i)}async _handleChannelEvent(e){let t=this;this._client.logger("info",`channel:_handleChannelEvent - Received event of type { ${e.type} } on ${this.cid}`,{tags:["event","channel"],channel:this});let s=t.state,i=Object.values(this.getClient().state.users);switch(e.type){case"typing.start":if(e.user?.id){let c=W(e.user.id||"",i);e.user=c,s.typing[e.user.id]=e}break;case"typing.stop":e.user?.id&&delete s.typing[e.user.id];break;case"message.read":if(e.user?.id&&e.created_at){let c=W(e.user.id||"",i);e.user=c,s.read[e.user.id]={last_read:new Date(e.created_at),last_read_message_id:e.last_read_message_id,user:c,unread_messages:0},e.user?.id===this.getClient().user?.id&&(s.unreadCount=0)}break;case"user.watching.start":e.user?.id&&(s.watchers[e.user.id]=e.user);break;case"user.watching.stop":e.user?.id&&delete s.watchers[e.user.id];break;case"message.deleted":if(e.message){this._extendEventWithOwnReactions(e);s.removeMessage(e.message),s.addMessageSorted(e.message,!1,!1),s.removeQuotedMessageReferences(e.message),[...s.pinnedMessages].some(c=>c.id===e.message?.id)&&s.removePinnedMessage(e.message);for(let c in s.read)c!==e.user?.id&&e.message.id===s.read[c].last_read_message_id&&(s.read[c]={...s.read[c],last_read_message_id:void 0})}break;case"message.deleted_for_me":e.message&&(s.removeMessage(e.message),s.removeQuotedMessageReferences(e.message),[...s.pinnedMessages].some(c=>c.id===e.message?.id)&&s.removePinnedMessage(e.message));break;case"message.new":if(e.message){let c=e.user?.id===this.getClient().user?.id,p=!!e.message.parent_id;if(!i.find(g=>g.id===e.user?.id)&&e.user?.id){let g=await this.getClient().queryUser(e.user.id);i.push(g)}let m=W(e.user?.id||"",i);if(e.message.user=m,e.message?.quoted_message){let g=W(e.message.quoted_message.user?.id||"",i);e.message.quoted_message.user=g}if(e.user=m,(this.state.isUpToDate||p)&&s.addMessageSorted(e.message,c),c||p)break;if(e.user?.id)for(let g in s.read)g===e.user.id?s.read[e.user.id]={last_read:new Date(e.created_at),user:e.user,unread_messages:0}:s.read[g].unread_messages+=1;this._countMessageAsUnread(e.message)&&(s.unreadCount=s.unreadCount+1)}break;case"message.updated":if(e.message){let c=W(e.user?.id||"",i),p=W(e.message.user?.id||"",i);if(e.user=c,e.message.user=p,e.message?.quoted_message){let u=W(e.message.quoted_message.user?.id||"",i);e.message.quoted_message.user=u}e.message?.latest_reactions&&(e.message.latest_reactions=H(e.message.latest_reactions||[],i)),this._extendEventWithOwnReactions(e),s.addMessageSorted(e.message,!1,!1),e.message.pinned?s.addPinnedMessage(e.message):s.removePinnedMessage(e.message)}break;case"message.pinned":if(e.message){let c=W(e.message.user?.id||"",i);e.message.user=c,s.addPinnedMessage(e.message),s.addMessageSorted(e.message,!1,!1)}break;case"message.unpinned":if(e.message){let c=W(e.message.user?.id||"",i);e.message.user=c,s.removePinnedMessage(e.message),s.addMessageSorted(e.message,!1,!1)}break;case"channel.truncate":if(e.channel?.created_at){let c=+new Date(e.channel.created_at);s.messageSets.forEach((p,u)=>{p.messages.forEach(({created_at:m,id:f})=>{c>+m&&s.removeMessage({id:f,messageSetIndex:u})})}),s.pinnedMessages.forEach(({id:p,created_at:u})=>{c>+u&&s.removePinnedMessage({id:p})})}else s.clearMessages();s.unreadCount=0,e.message&&(s.addMessageSorted(e.message),e.message.pinned&&s.addPinnedMessage(e.message));break;case"member.added":if(e.member?.user_id){let c=W(e.member.user_id,i);e.member.user=c,s.members[e.member.user_id]=e.member,e.member.user?.id===this.getClient().user?.id&&(s.membership=e.member)}break;case"member.updated":if(e.member?.user_id){let c=W(e.member.user_id,i);e.member.user=c,s.members[e.member.user_id]=e.member,s.membership=e.member}break;case"member.removed":e.member?.user_id?delete s.members[e.member.user_id]:e.user?.id&&delete s.members[e.user.id];break;case"channel.updated":e.channel&&(t.data={...t.data,...e.channel,own_capabilities:e.channel?.own_capabilities??t.data?.own_capabilities});break;case"pollchoice.new":if(e.message){let c=W(e.message.user?.id||"",i);e.message.user=c,s.addMessageSorted(e.message,!1,!1)}break;case"reaction.new":if(e.message&&e.reaction){let c=W(e.message.user?.id||"",i),p=W(e.reaction.user?.id||"",i);if(e.message.user=c,e.message.latest_reactions=H(e.message.latest_reactions||[],i),e.reaction.user=p,e.message?.quoted_message){let u=W(e.message.quoted_message.user?.id||"",i);e.message.quoted_message.user=u}e.message=s.addReaction(e.reaction,e.message)}break;case"reaction.deleted":if(e.user=W(e.user?.id||"",i),e.message){if(e.message?.quoted_message){let c=W(e.message.quoted_message.user?.id||"",i);e.message.quoted_message.user=c}e.message.user=W(e.message.user?.id||"",i),e.message.latest_reactions?.map(c=>(c.user=W(c.user?.id||"",i),c))}e.reaction&&(e.reaction.user=W(e.reaction.user?.id||"",i),e.message=s.removeReaction(e.reaction,e.message));break;case"member.joined":case"notification.invite_accepted":if(e.member?.user_id){if(!i.find(u=>u.id===e.member?.user_id)){let u=await this.getClient().queryUser(e.member?.user_id);i.push(u)}let p=W(e.member.user_id,i);e.member.user=p,e.member.user_id===this.getClient().user?.id&&(s.membership=e.member,this.state.membership=e.member),s.members[e.member.user_id]=e.member,t.data={...t.data,member_count:Number(t.data?.member_count)+1,members:t.data?.members?[...t.data.members,e.member]:[e.member]},this.offlineMode=!0,this.initialized=!0}break;case"notification.invite_rejected":e.member?.user_id&&delete s.members[e.member.user_id];break;case"notification.invite_messaging_skipped":if(e.member?.user_id){let c=W(e.member.user_id,i);e.member.user=c,e.member.user_id===this.getClient().user?.id&&(s.membership=e.member,this.state.membership=e.member),s.members[e.member.user_id]=e.member}break;case"member.promoted":case"member.demoted":case"member.banned":case"member.unbanned":case"member.blocked":case"member.unblocked":if(e.member?.user_id){let c=W(e.member.user_id,i);e.member.user=c,s.members[e.member.user_id]=e.member,e.member.user_id===this.getClient().user?.id&&(s.membership=e.member,this.state.membership=e.member)}break;case"channel.pinned":t.data&&(t.data.is_pinned=!0);break;case"channel.unpinned":t.data&&(t.data.is_pinned=!1);break;case"channel.topic.disabled":t.data&&(t.data.topics_enabled=!1),e.user=W(e.user?.id||"",i);break;case"channel.topic.enabled":t.data&&(t.data.topics_enabled=!0),e.user=W(e.user?.id||"",i);break;case"channel.topic.created":let a=e.channel?.members||[],r=H(a,i),o={channel:e.channel,members:r,messages:[],pinned_messages:[]},l=this.getClient().channel(e.channel_type||"",e.channel_id||"");l.data=e.channel,l._initializeState(o,"latest"),s.topics?.unshift(l);break;case"channel.topic.closed":t.data&&(t.data.is_closed_topic=!0),e.user=W(e.user?.id||"",i);break;case"channel.topic.reopen":t.data&&(t.data.is_closed_topic=!1),e.user=W(e.user?.id||"",i);break;case"channel.topic.updated":t.data&&(t.data.name=e.channel?.name,t.data.image=e.channel?.image,t.data.description=e.channel?.description),e.user=W(e.user?.id||"",i);break;default:}e.watcher_count!==void 0&&(t.state.watcher_count=e.watcher_count)}_callChannelListeners=e=>{let t=this,s=[];t.listeners.all&&s.push(...t.listeners.all),t.listeners[e.type]&&s.push(...t.listeners[e.type]);for(let i of s)typeof i!="string"&&i(e)};_channelURL=()=>{if(!this.id)throw new Error("channel id is not defined");return`${this.getClient().baseURL}/channels/${this.type}/${this.id}`};_checkInitialized(){if(!this.initialized&&!this.offlineMode)throw Error(`Channel ${this.cid} hasn't been initialized yet. Make sure to call .watch() and wait for it to resolve`)}_initializeState(e,t="latest",s){let{state:i,user:a,userID:r}=this.getClient();if(e.channel.members)for(let u of e.channel.members)u.user&&(s&&s(u.user.id),i.updateUserReference(u.user,this.cid));this.state.membership=e.membership||{};let o=new Map,l=[];e.messages||(e.messages=[]);for(let u of e.messages)o.has(u.id)||(o.set(u.id,!0),l.push(u));this.state.pinnedMessages&&(this.state.pinnedMessages=[]),this.state.addPinnedMessages(e.pinned_messages||[]);let c=l||[];this.state.messages||this.state.initMessages();let{messageSet:p}=this.state.addMessagesSorted(c,!1,!0,!0,t);if(e.watcher_count!==void 0&&(this.state.watcher_count=e.watcher_count),e.watchers)for(let u of e.watchers)u&&(i.updateUserReference(u,this.cid),this.state.watchers[u.id]=u);if(r!=null){let u=this.state.last_message_at||new Date;a&&(this.state.read[a.id]={user:a,last_read:u,unread_messages:0})}if(e.read)for(let u of e.read)this.state.read[u.user.id]={last_read:new Date(u.last_read),last_read_message_id:u.last_read_message_id,unread_messages:u.unread_messages??0,user:u.user,last_send:u.last_send},u.user.id===a?.id&&(this.state.unreadCount=this.state.read[u.user.id].unread_messages);if(e.channel.members&&(this.state.members=e.channel.members.reduce((u,m)=>(m.user&&(u[m.user.id]=m),u),{})),e.channel.type==="team"&&e.channel.topics_enabled&&e.topics){let u=Object.values(this.getClient().state.users);this._processTopics(e.topics,u)}return{messageSet:p}}_extendEventWithOwnReactions(e){if(!e.message)return;let t=this.state.findMessage(e.message.id,e.message.parent_id);t&&(e.message.own_reactions=t.own_reactions)}_disconnect(){this._client.logger("info",`channel:disconnect() - Disconnecting the channel ${this.cid}`,{tags:["connection","channel"],channel:this}),this.disconnected=!0,this.state.setIsUpToDate(!1)}};var ln=class{users;userChannelReferences;constructor(){this.users={},this.userChannelReferences={}}updateUsers(e){for(let t of e)this.updateUser(t)}updateUser(e){if(e!=null)if(this.users[e.id]){let t={...this.users[e.id],...e};this.users[e.id]=t}else this.users[e.id]=e}updateUserReference(e,t){e!=null&&(this.userChannelReferences[e.id]||(this.userChannelReferences[e.id]={}),this.userChannelReferences[e.id][t]=!0)}deleteAllChannelReference(e){for(let t in this.userChannelReferences)delete this.userChannelReferences[t][e]}};var Gp=Re(qp());var _g=n=>n.code!==void 0,yg=n=>n.error!==void 0,Xn=class{client;connectionOpen;consecutiveFailures;pingInterval;healthCheckTimeoutRef;isConnecting;isDisconnected;isHealthy;isResolved;lastEvent;connectionCheckTimeout;connectionCheckTimeoutRef;rejectPromise;requestID;resolvePromise;totalFailures;ws;wsID;constructor({client:e}){this.client=e,this.consecutiveFailures=0,this.totalFailures=0,this.isConnecting=!1,this.isDisconnected=!1,this.isResolved=!1,this.isHealthy=!1,this.wsID=1,this.lastEvent=null,this.pingInterval=25*1e3,this.connectionCheckTimeout=this.pingInterval+10*1e3,jl(this.onlineStatusChanged)}_log(e,t={},s="info"){this.client.logger(s,"connection:"+e,{tags:["connection"],...t})}setClient(e){this.client=e}async connect(e=15e3){if(this.isConnecting)throw Error("You've called connect twice, can only attempt 1 connection at the time");this.isDisconnected=!1;try{let t=await this._connect();this.consecutiveFailures=0,this._log(`connect() - Established ws connection with healthcheck: ${t}`)}catch(t){if(this.isHealthy=!1,this.consecutiveFailures+=1,t.code===mt.TOKEN_EXPIRED)this._log("connect() - WS failure due to expired token");else if(!t.isWSFailure)throw new Error(JSON.stringify({code:t.code,StatusCode:t.StatusCode,message:t.message,isWSFailure:t.isWSFailure}))}return await this._waitForHealthy(e)}async _waitForHealthy(e=15e3){return Promise.race([(async()=>{for(let s=0;s<=e;s+=50)try{return await this.connectionOpen}catch(i){if(s===e)throw new Error(JSON.stringify({code:i.code,StatusCode:i.StatusCode,message:i.message,isWSFailure:i.isWSFailure}));await on(50)}})(),(async()=>{throw await on(e),this.isConnecting=!1,new Error(JSON.stringify({code:"",StatusCode:"",message:"initial WS connection could not be established",isWSFailure:!0}))})()])}_buildUrl=()=>{let e=encodeURIComponent(this.client._buildWSPayload(this.requestID)),t=this.client.tokenManager.getToken(),s=`${this.client.wsBaseURL}/connect?json=${e}&api_key=${this.client.apiKey}&authorization=${t}&stream-auth-type=${this.client.getAuthType()}&X-Stream-Client=${this.client.getUserAgent()}`;return s=encodeURI(s),s};disconnect(e){this._log(`disconnect() - Closing the websocket connection for wsID ${this.wsID}`),this.wsID+=1,this.isConnecting=!1,this.isDisconnected=!0,this.healthCheckTimeoutRef&&clearInterval(this.healthCheckTimeoutRef),this.connectionCheckTimeoutRef&&clearInterval(this.connectionCheckTimeoutRef),Nl(this.onlineStatusChanged),this.isHealthy=!1,this.ws&&this.ws.removeAllListeners&&this.ws.removeAllListeners();let t,{ws:s}=this;return s&&s.close&&s.readyState===s.OPEN?(t=new Promise(i=>{let a=r=>{this._log(`disconnect() - resolving isClosedPromise ${r?"with":"without"} close frame`,{event:r}),i()};s.onclose=a,setTimeout(a,e??1e3)}),this._log("disconnect() - Manually closed connection by calling client.disconnect()"),s.close(mt.WS_CLOSED_SUCCESS,"Manually closed connection by calling client.disconnect()")):(this._log("disconnect() - ws connection doesn't exist or it is already closed."),t=Promise.resolve()),delete this.ws,t}async _connect(){if(this.isConnecting)return;this.isConnecting=!0,this.requestID=Ue();let e=!1;try{this._log("_connect() - waiting for token"),await this.client.tokenManager.tokenReady(),e=!0}catch{}try{this._setupConnectionPromise();let t=this._buildUrl();this._log(`_connect() - Connecting to ${t}`,{wsURL:t,requestID:this.requestID}),this.ws=new Gp.default(t),this.ws.onopen=this.onopen.bind(this,this.wsID),this.ws.onclose=this.onclose.bind(this,this.wsID),this.ws.onerror=this.onerror.bind(this,this.wsID),this.ws.onmessage=this.onmessage.bind(this,this.wsID);let s=await this.connectionOpen;if(this.isConnecting=!1,s)return s}catch(t){throw this.isConnecting=!1,this._log("_connect() - Error - ",t),t}}async _reconnect(e={}){if(this._log("_reconnect() - Initiating the reconnect"),this.isConnecting||this.isHealthy){this._log("_reconnect() - Abort (1) since already connecting or healthy");return}let t=e.interval;if(t||(t=js(this.consecutiveFailures)),await on(t),this.isConnecting||this.isHealthy){this._log("_reconnect() - Abort (2) since already connecting or healthy");return}if(this.isDisconnected){this._log("_reconnect() - Abort (3) since disconnect() is called");return}this._log("_reconnect() - Destroying current WS connection"),this._destroyCurrentWSConnection();try{await this._connect(),this._log("_reconnect() - Waiting for recoverCallBack"),await this.client.recoverState(),this._log("_reconnect() - Finished recoverCallBack"),this.consecutiveFailures=0}catch(s){this.isHealthy=!1,this.consecutiveFailures+=1,s.isWSFailure&&(this._log("_reconnect() - WS failure, so going to try to reconnect"),this._reconnect())}this._log("_reconnect() - == END ==")}onlineStatusChanged=e=>{e.type==="offline"?(this._log("onlineStatusChanged() - Status changing to offline"),this._setHealth(!1)):e.type==="online"&&(this._log(`onlineStatusChanged() - Status changing to online. isHealthy: ${this.isHealthy}`),this.isHealthy||this._reconnect({interval:10}))};onopen=e=>{this.wsID===e&&this._log("onopen() - onopen callback",{wsID:e})};onmessage=(e,t)=>{if(this.wsID!==e)return;this._log("onmessage() - onmessage callback",{event:t,wsID:e});let s=typeof t.data=="string"?JSON.parse(t.data):null;if(!this.isResolved&&s){if(this.isResolved=!0,s.error){this.rejectPromise?.(this._errorFromWSEvent(s,!1));return}this.resolvePromise?.(s),this._setHealth(!0)}this.lastEvent=new Date,s&&s.type==="health.check"&&this.scheduleNextPing(),this.client.handleEvent(t),this.scheduleConnectionCheck()};onclose=(e,t)=>{if(this.wsID===e)if(this._log("onclose() - onclose callback - "+t.code,{event:t,wsID:e}),t.code===mt.WS_CLOSED_SUCCESS){let s=new Error(`WS connection reject with error ${t.reason}`);s.reason=t.reason,s.code=t.code,s.wasClean=t.wasClean,s.target=t.target,this.rejectPromise?.(s),this._log(`onclose() - WS connection reject with error ${t.reason}`,{event:t})}else this.consecutiveFailures+=1,this.totalFailures+=1,this._setHealth(!1),this.isConnecting=!1,this.rejectPromise?.(this._errorFromWSEvent(t)),this._log("onclose() - WS connection closed. Calling reconnect ...",{event:t}),this._reconnect()};onerror=(e,t)=>{this.wsID===e&&(this.consecutiveFailures+=1,this.totalFailures+=1,this._setHealth(!1),this.isConnecting=!1,this.rejectPromise?.(this._errorFromWSEvent(t)),this._log("onerror() - WS connection resulted into error",{event:t}),this._reconnect())};_setHealth=e=>{if(e!==this.isHealthy){if(this.isHealthy=e,this.isHealthy){this.client.dispatchEvent({type:"connection.changed",online:this.isHealthy});return}setTimeout(()=>{this.isHealthy||this.client.dispatchEvent({type:"connection.changed",online:this.isHealthy})},1e3)}};_errorFromWSEvent=(e,t=!0)=>{let s,i,a;_g(e)&&(s=e.code,i="unknown",a=e.reason),yg(e)&&(s=e.error.code,i=e.error.StatusCode,a=e.error.message),this._log(`_errorFromWSEvent() - WS failed with code ${s}`,{event:e},"warn");let r=new Error(`WS failed with code ${s} and reason - ${a}`);return r.code=s,r.StatusCode=i,r.isWSFailure=t,r};_destroyCurrentWSConnection(){this.wsID+=1;try{this?.ws?.removeAllListeners(),this?.ws?.close()}catch{}}_setupConnectionPromise=()=>{this.isResolved=!1,this.connectionOpen=new Promise((e,t)=>{this.resolvePromise=e,this.rejectPromise=t})};scheduleNextPing=()=>{this.healthCheckTimeoutRef&&clearTimeout(this.healthCheckTimeoutRef),this.healthCheckTimeoutRef=setTimeout(()=>{let e=[{type:"health.check",client_id:this.client.clientID}];try{this.ws?.send(JSON.stringify(e))}catch{}},this.pingInterval)};scheduleConnectionCheck=()=>{this.connectionCheckTimeoutRef&&clearTimeout(this.connectionCheckTimeoutRef),this.connectionCheckTimeoutRef=setTimeout(()=>{let e=new Date;this.lastEvent&&e.getTime()-this.lastEvent.getTime()>this.connectionCheckTimeout&&(this._log("scheduleConnectionCheck - going to reconnect"),this._setHealth(!1),this._reconnect())},this.connectionCheckTimeout)}};var Qn=class{loadTokenPromise;token;user;constructor(){this.loadTokenPromise=null}setTokenOrProvider=async(e,t)=>{this.user=t,typeof e=="string"&&(this.token=e),this.loadTokenPromise=Promise.resolve(this.token)};reset=()=>{this.token=void 0,this.user=void 0,this.loadTokenPromise=null};tokenReady=()=>this.loadTokenPromise;getToken=()=>this.token};function Hs(n){return!n.status||n.status<200||300<=n.status}var Js=Re(Bp());var Mt=class extends Error{code;response;status},Va=(c=>(c.CREATE_CALL="create-call",c.ACCEPT_CALL="accept-call",c.SIGNAL_CALL="signal-call",c.CONNECT_CALL="connect-call",c.HEALTH_CALL="health-call",c.END_CALL="end-call",c.REJECT_CALL="reject-call",c.MISS_CALL="miss-call",c.UPGRADE_CALL="upgrade-call",c))(Va||{}),Ha=(i=>(i.RINGING="ringing",i.ENDED="ended",i.CONNECTED="connected",i.ERROR="error",i))(Ha||{}),Ka=(u=>(u[u.VIDEO_CONFIG=0]="VIDEO_CONFIG",u[u.AUDIO_CONFIG=1]="AUDIO_CONFIG",u[u.VIDEO_KEY=2]="VIDEO_KEY",u[u.VIDEO_DELTA=3]="VIDEO_DELTA",u[u.AUDIO=4]="AUDIO",u[u.ORIENTATION=5]="ORIENTATION",u[u.CONNECTED=6]="CONNECTED",u[u.TRANSCEIVER_STATE=7]="TRANSCEIVER_STATE",u[u.REQUEST_CONFIG=8]="REQUEST_CONFIG",u[u.REQUEST_KEY_FRAME=9]="REQUEST_KEY_FRAME",u[u.END_CALL=10]="END_CALL",u))(Ka||{});function wg(n){return typeof n=="string"||n instanceof String}var Ja=class n{static _instance;activeChannels;axiosInstance;baseURL;userBaseURL;browser;cleaningIntervalRef;clientID;apiKey;projectId;listeners;logger;recoverStateOnReconnect;node;options;setUserPromise;state;tokenManager;user;userAgent;userID;wsBaseURL;wsConnection;wsPromise;consecutiveFailures;defaultWSTimeout;eventSource=null;constructor(e,t,s,i){this.apiKey=e,this.projectId=t,this.listeners={},this.state=new ln;let a=i||{};this.browser=typeof a.browser<"u"?a.browser:typeof window<"u",this.node=!this.browser,this.options={withCredentials:!1,warmUp:!1,recoverStateOnReconnect:!0,...a},this.node&&!this.options.httpsAgent&&(this.options.httpsAgent=new yt.Agent({keepAlive:!0,keepAliveMsecs:3e3})),this.axiosInstance=rn.create(this.options),this.setBaseURL(s),this.wsConnection=null,this.wsPromise=null,this.setUserPromise=null,this.activeChannels={},this.tokenManager=new Qn,this.consecutiveFailures=0,this.defaultWSTimeout=15e3,this.axiosInstance.defaults.paramsSerializer=ql,this.logger=Ms(a.logger)?a.logger:()=>null,this.recoverStateOnReconnect=this.options.recoverStateOnReconnect}static getInstance(e,t,s,i){return n._instance||(n._instance=new n(e,t,s,i)),n._instance}async refreshNewToken(e){return await this.post(this.userBaseURL+"/refresh_token",{refresh_token:e})}getAuthType(){return"jwt"}setBaseURL(e){this.baseURL=e,this.userBaseURL=this.options.userBaseURL||e+"/uss/v1",this.wsBaseURL=this.baseURL.replace("http","ws").replace(":3030",":8800")}async getExternalAuthToken(e,t){let s={apikey:this.apiKey,name:e.name};e.avatar&&(s.avatar=e.avatar);let i=this.userBaseURL+"/get_token/external_auth",a=new URLSearchParams(s).toString(),r={"Content-Type":"application/json"};if(t){let l=typeof t=="string"&&t.startsWith("Bearer ")?t:`Bearer ${t}`;r.Authorization=l}let o=await fetch(`${i}?${a}`,{method:"GET",headers:r});if(!o.ok){let l="";try{let c=await o.json();l=c.message||JSON.stringify(c)}catch{l=await o.text()}throw new Error(l)}return await o.json()}connectUser=async(e,t,s)=>{if(this.logger("info","client:connectUser() - started",{tags:["connection","client"]}),!e.id)throw new Error('The "id" field on the user is missing');if(s){let r=await this.getExternalAuthToken(e,t);t=r.token,e.id=r.user_id}if(this.userID===e.id&&this.setUserPromise)return console.warn("Consecutive calls to connectUser is detected, ideally you should only call this function once in your app."),this.setUserPromise;if(this.userID)throw new Error("Use client.disconnect() before trying to connect as a different user. connectUser was called twice.");this.node&&!this.options.allowServerSideConnect&&console.warn('Please do not use connectUser server side. connectUser impacts MAU and concurrent connection usage and thus your bill. If you have a valid use-case, add "allowServerSideConnect: true" to the client options to disable this warning.'),this.userID=e.id;let i=this._setToken(e,t);this._setUser(e),this.state.updateUser({id:e.id,name:e?.name||e.id,avatar:e?.avatar||""});let a=this.openConnection();this.setUserPromise=Promise.all([i,a]).then(r=>r[1]);try{let r=await this.setUserPromise;return await this.connectToSSE(),r}catch(r){throw this.disconnectUser(),r}};setUser=this.connectUser;_setToken=(e,t)=>this.tokenManager.setTokenOrProvider(t,e);_setUser(e){this.user={...e},this.userID=e.id}closeConnection=async e=>(this.cleaningIntervalRef!=null&&(clearInterval(this.cleaningIntervalRef),this.cleaningIntervalRef=void 0),await this.wsConnection?.disconnect(e),Promise.resolve());openConnection=async()=>{if(!this.userID)throw Error("User is not set on client, use client.connectUser instead");return this.wsConnection?.isConnecting&&this.wsPromise?(this.logger("info","client:openConnection() - connection already in progress",{tags:["connection","client"]}),this.wsPromise):this.wsConnection?.isHealthy?(this.logger("info","client:openConnection() - openConnection called twice, healthy connection already exists",{tags:["connection","client"]}),Promise.resolve()):(this.clientID=`${this.userID}--${Ue()}`,this.wsPromise=this.connect(),this._startCleaning(),this.wsPromise)};_setupConnection=this.openConnection;disconnectUser=async e=>{this.logger("info","client:disconnect() - Disconnecting the client",{tags:["connection","client"]}),delete this.user,delete this.userID;let t=this.closeConnection(e);for(let s of Object.values(this.activeChannels))s._disconnect();return this.activeChannels={},this.state=new ln,setTimeout(this.tokenManager.reset),t};disconnect=this.disconnectUser;on(e,t){let s=t?e:"all",i=t||e;return s in this.listeners||(this.listeners[s]=[]),this.logger("info",`Attaching listener for ${s} event`,{tags:["event","client"]}),this.listeners[s].push(i),{unsubscribe:()=>{this.logger("info",`Removing listener for ${s} event`,{tags:["event","client"]}),this.listeners[s]=this.listeners[s].filter(a=>a!==i)}}}off(e,t){let s=t?e:"all",i=t||e;s in this.listeners||(this.listeners[s]=[]),this.logger("info",`Removing listener for ${s} event`,{tags:["event","client"]}),this.listeners[s]=this.listeners[s].filter(a=>a!==i)}_logApiRequest(e,t,s,i){this.logger("info",`client: ${e} - Request - ${t}- ${JSON.stringify(s)} - ${JSON.stringify(i.params)}`,{tags:["api","api_request","client"],url:t,payload:s,config:i})}_logApiResponse(e,t,s){this.logger("info",`client:${e} - Response - url: ${t} > status ${s.status}`,{tags:["api","api_response","client"],url:t,response:s})}_logApiError(e,t,s,i){this.logger("error",`client:${e} - Error: ${JSON.stringify(s)} - url: ${t} - options: ${JSON.stringify(i)}`,{tags:["api","api_response","client"],url:t,error:s})}doAxiosRequest=async(e,t,s,i={})=>{await this.tokenManager.tokenReady();let a=this._enrichAxiosOptions(i);try{let r;switch(this._logApiRequest(e,t,s,a),e){case"get":r=await this.axiosInstance.get(t,a);break;case"delete":r=await this.axiosInstance.delete(t,a);break;case"post":r=await this.axiosInstance.post(t,s,a);break;case"postForm":r=await this.axiosInstance.postForm(t,s,a);break;case"put":r=await this.axiosInstance.put(t,s,a);break;case"patch":r=await this.axiosInstance.patch(t,s,a);break;case"options":r=await this.axiosInstance.options(t,a);break;default:throw new Error("Invalid request type")}return this._logApiResponse(e,t,r),this.consecutiveFailures=0,this.handleResponse(r)}catch(r){if(r.client_request_id=a.headers?.["x-client-request-id"],this._logApiError(e,t,r,i),this.consecutiveFailures+=1,r.response)return this.handleResponse(r.response);throw r}};get(e,t){return this.doAxiosRequest("get",e,null,{params:t})}put(e,t){return this.doAxiosRequest("put",e,t)}post(e,t,s){return this.doAxiosRequest("post",e,t,{params:s})}patch(e,t){return this.doAxiosRequest("patch",e,t)}delete(e,t){return this.doAxiosRequest("delete",e,null,{params:t})}sendFile(e,t,s,i,a){let r=Ml(t,s,i||"multipart/form-data");return a!=null&&r.append("user",JSON.stringify(a)),this.doAxiosRequest("postForm",e,r,{headers:r.getHeaders?r.getHeaders():{},config:{timeout:0,maxContentLength:1/0,maxBodyLength:1/0}})}errorFromResponse(e){let t;return t=new Mt(`ErmisChat error HTTP code: ${e.status}`),e.data&&e.data.code&&(t=new Error(`ErmisChat error code ${e.data.code}: ${e.data.message}`),t.code=e.data.code),t.response=e,t.status=e.status,t}handleResponse(e){let t=e.data;if(Hs(e))throw this.errorFromResponse(e);return t}dispatchEvent=e=>{if(e.received_at||(e.received_at=new Date),e.type==="channel.created")this._handleChannelCreatedEvent(e).then(()=>{this._afterDispatchEvent(e)});else{let t=this._handleClientEvent(e),s=e.cid,i=s?this.activeChannels[s]:void 0;i&&i._handleChannelEvent(e),this._callClientListeners(e),i&&i._callChannelListeners(e),t.forEach(a=>a())}};_afterDispatchEvent(e){let t=this._handleClientEvent(e),s=e.cid,i=s?this.activeChannels[s]:void 0;i&&i._handleChannelEvent(e),this._callClientListeners(e),i&&i._callChannelListeners(e),t.forEach(a=>a())}async _handleChannelCreatedEvent(e){let t=e.channel?.members||[];await Nn(this,t);let s=Object.values(this.state.users),i=H(t,s),a=e.channel_type==="messaging"?Dt(i,this.userID||""):e.channel?.name,r={...e.channel,members:i,name:a},o={channel:r,members:i,messages:[],pinned_messages:[]},l=this.channel(e.channel_type||"",e.channel_id||"");l.data=r,l._initializeState(o,"latest")}handleEvent=e=>{let t=e.data,s=JSON.parse(t);this.dispatchEvent(s)};_updateMemberWatcherReferences=e=>{let t=this.state.userChannelReferences[e.id]||{};for(let s in t){let i=this.activeChannels[s];i?.state&&(i.state.members[e.id]&&(i.state.members[e.id].user=e),i.state.watchers[e.id]&&(i.state.watchers[e.id]=e),i.state.read[e.id]&&(i.state.read[e.id].user=e))}};_updateUserReferences=this._updateMemberWatcherReferences;_updateUserMessageReferences=e=>{let t=this.state.userChannelReferences[e.id]||{};for(let s in t){let i=this.activeChannels[s];if(!i)continue;i.state?.updateUserMessages(e)}};_deleteUserMessageReference=(e,t=!1)=>{let s=this.state.userChannelReferences[e.id]||{};for(let i in s)this.activeChannels[i].state?.deleteUserMessages(e,t)};_handleClientEvent(e){let t=this,s=[];if(this.logger("info",`client:_handleClientEvent - Received event of type { ${e.type} }`,{tags:["event","client"],event:e}),e.type==="health.check"&&e.me,(e.type==="channel.deleted"||e.type==="notification.channel_deleted")&&e.cid){t.state.deleteAllChannelReference(e.cid),this.activeChannels[e.cid]?._disconnect(),s.push(()=>{e.cid&&delete this.activeChannels[e.cid]});for(let i of Object.values(this.activeChannels))i.type==="team"&&i.state.topics?.some(a=>a.cid===e.cid)&&(i.state.topics=i.state.topics.filter(a=>a.cid!==e.cid))}return e.type==="notification.invite_rejected"&&e.member?.user_id===this.userID&&e.cid&&(t.state.deleteAllChannelReference(e.cid),this.activeChannels[e.cid]?._disconnect(),s.push(()=>{e.cid&&delete this.activeChannels[e.cid]})),e.type,e.type==="member.added"&&e.member?.user_id===this.userID&&this.channel(e.channel_type||"",e.channel_id||"").watch().catch(a=>{this.logger("error","Failed to watch channel after member.added",{err:a,event:e})}),e.type==="connection.recovered"&&s.push(()=>{Object.values(this.activeChannels).forEach(i=>{if(!i.state?.messages)return;i.state.messages.filter(r=>r.status==="failed_offline"&&r.user?.id===this.userID&&(!r.attachments||r.attachments.length===0)).forEach(r=>{r.id&&i.retryMessage(r.id).catch(o=>{this.logger("error",`Failed to auto-resend offline message ${r.id}`,{tags:["offline","retry"],err:o})})})})}),s}_callClientListeners=e=>{let t=this,s=[];t.listeners.all&&s.push(...t.listeners.all),t.listeners[e.type]&&s.push(...t.listeners[e.type]);for(let i of s)i(e)};recoverState=async()=>{this.logger("info","client:recoverState() - Start of recoverState",{tags:["connection"]});let e=Object.keys(this.activeChannels);if(e.length&&this.recoverStateOnReconnect){this.logger("info",`client:recoverState() - Start the querying of ${e.length} channels`,{tags:["connection","client"]});let t={type:["messaging","team"]},s=[],i={message_limit:25};await this.queryChannels(t,s,i),this.logger("info","client:recoverState() - Querying channels finished",{tags:["connection","client"]}),this.dispatchEvent({type:"connection.recovered"})}else this.dispatchEvent({type:"connection.recovered"});this.wsPromise=Promise.resolve(),this.setUserPromise=Promise.resolve()};async connect(){if(!this.userID||!this.user)throw Error("Call connectUser before starting the connection");if(!this.wsBaseURL)throw Error("Websocket base url not set");if(!this.clientID)throw Error("clientID is not set");this.options.wsConnection&&this.node?(this.options.wsConnection.setClient(this),this.wsConnection=this.options.wsConnection):this.wsConnection=new Xn({client:this});try{return await this.wsConnection.connect(this.defaultWSTimeout)}catch(e){throw e}}async connectToSSE(e){if(this.eventSource){this.logger("info","client:connectToSSE() - SSE connection already established",{});return}let t=this._getToken();t?.startsWith("Bearer ")||(t=`Bearer ${t}`);let s={method:"GET",Authorization:t};this.eventSource=new Js.EventSourcePolyfill(this.userBaseURL+"/sse/subscribe",{headers:s,heartbeatTimeout:6e4}),this.eventSource.onopen=()=>{this.logger("info","client:connectToSSE() - SSE connection established",{})},this.eventSource.onmessage=i=>{let a=JSON.parse(i.data);if(this.logger("info",`client:connectToSSE() - SSE message received event : ${JSON.stringify(a)}`,{event:i}),a.type==="AccountUserChainProjects"){let r={name:a.name,id:a.id,avatar:a.avatar,about_me:a.about_me,project_id:a.project_id};this.user?.id===r.id&&(this.user={...this.user,...r}),this.state.updateUser(r);let o={id:r.id,name:r.name?r.name:r.id,avatar:r?.avatar||""};this._updateMemberWatcherReferences(o),this._updateUserMessageReferences(o),Object.values(this.activeChannels).forEach(l=>{if(l.data?.type==="messaging"&&Object.keys(l.state.members).length===2){let c=Object.values(l.state.members).find(p=>p.user?.id!==this.userID);c&&c.user?.id===r.id&&(l.data.name=r.name||r.id,l.data.image=r.avatar||"")}}),e&&e(a)}},this.eventSource.onerror=i=>{this.logger("error",`client:connectToSSE() - SSE connection error : ${JSON.stringify(i.data)} `,{event:i}),i.status===401?(this.logger("error","client:connectToSSE() - Unauthorized (401). Aborting the connection.",{}),this.disconnectFromSSE()):(this.eventSource?.readyState===Js.EventSourcePolyfill.CLOSED||this.eventSource?.readyState===Js.EventSourcePolyfill.CONNECTING)&&(this.eventSource.close(),setTimeout(()=>{this.logger("info","client:connectToSSE() - Reconnecting to SSE",{}),this.connectToSSE(e)},3e3))}}async disconnectFromSSE(){this.eventSource?(this.eventSource.close(),this.eventSource=null,this.logger("info","client:disconnectFromSSE() - SSE connection closed",{})):this.logger("info","client:disconnectFromSSE() - SSE connection already closed",{})}async queryUsers(e,t){let s={presence:!1};await this.wsPromise;let i=this.projectId,a=await this.get(this.userBaseURL+"/users",{project_id:i,page:t,page_size:e});return this.state.updateUsers(a.data),a}async queryUser(e){let t=this.projectId,s=await this.get(this.userBaseURL+"/users/"+e,{project_id:t});return this.state.updateUser(s),s}async getBatchUsers(e,t,s){let i=this.projectId,a=await this.post(this.userBaseURL+"/users/batch?page=1&page_size=10000",{users:e,project_id:i},{page:t,page_size:s});return this.state.updateUsers(a.data),a.data||[]}async searchUsers(e,t,s){let i=this.projectId;return await this.post(this.userBaseURL+"/users/search",void 0,{page:e,page_size:t,name:s,project_id:i})}async queryContacts(){let e=this.projectId,s=(await this.post(this.baseURL+"/contacts/list",{project_id:e})).project_id_user_ids[e],i=[],a=[];return s.forEach(r=>{let o=r.other_id,l=this.state.users[o],c=l||{id:o};switch(r.relation_status){case"blocked":a.push(c);break;case"normal":i.push(c);break;default:}}),{contact_users:i,block_users:a}}_updateProjectID(e){this.projectId=e}async uploadFile(e){let t=new FormData;t.append("avatar",e);let s=await this.post(this.userBaseURL+"/users/upload",t,{headers:{"Content-Type":"multipart/form-data"}});if(this.user){this.user.avatar=s.avatar;let i={...this.user,avatar:s.avatar};this.state.updateUser(i)}return s}async updateProfile(e,t){let s={name:e,about_me:t},i=await this.patch(this.userBaseURL+"/users/update",s);return this.user=i,this.state.updateUser(i),i}async queryChannels(e,t=[],s={},i={}){await this.wsPromise;let a=this.projectId,r={filter_conditions:{...e,project_id:a},sort:t,...s},o=await this.post(this.baseURL+"/channels",r);o.channels.sort((m,f)=>{let g=Ot(m.messages);if(m.channel.type==="team"&&Array.isArray(m.topics))for(let _ of m.topics)g=Math.max(g,Ot(_.messages));let v=Ot(f.messages);if(f.channel.type==="team"&&Array.isArray(f.topics))for(let _ of f.topics)v=Math.max(v,Ot(_.messages));return v-g});let l=Array.from(new Set(o.channels.flatMap(m=>(m.channel.members||[]).map(f=>f.user.id))))||[],c=e.parent_cid?Object.values(this.state.users):await this.getBatchUsers(l);o.channels.forEach(m=>{m.channel.members=H(m.channel.members,c),m.messages=H(m.messages,c),m.read=H(m.read||[],c),m.channel.name=m.channel.type==="messaging"?Dt(m.channel.members,this.userID||""):m.channel.name,m.channel.image=m.channel.type==="messaging"?jn(m.channel.members,this.userID||""):m.channel.image,m.channel.type==="team"&&Array.isArray(m.topics)&&m.topics.sort((f,g)=>{let v=Ot(f.messages);return Ot(g.messages)-v}),m.pinned_messages&&(m.pinned_messages=H(m.pinned_messages||[],c))});let{channels:p,userIds:u}=this.hydrateChannels(o.channels,i);return console.log("---channels---",p),p}hydrateChannels(e=[],t={}){let{skipInitialization:s,offlineMode:i=!1}=t,a=[],r=[];for(let o of e){let l=this.channel(o.channel.type,o.channel.id);l.data={...o.channel,is_pinned:o.is_pinned||!1},l.offlineMode=i,l.initialized=!i,s===void 0?l._initializeState(o,"latest",c=>{r.includes(c)||r.push(c)}):s.includes(o.channel.id)||(l.state.clearMessages(),l._initializeState(o,"latest",c=>{r.includes(c)||r.push(c)})),a.push(l)}return{channels:a,userIds:r}}async searchPublicChannel(e,t=0,s=25){let i=this.projectId;return await this.post(this.baseURL+"/channels/public/search",{project_id:i,search_term:e,limit:s,offset:t})}async pinChannel(e,t){return await this.post(this.baseURL+`/channels/${e}/${t}/pin`)}async unpinChannel(e,t){return await this.post(this.baseURL+`/channels/${e}/${t}/unpin`)}channel(e,t,s){if(!this.userID)throw Error("Call connectUser before creating a channel");if(~e.indexOf(":"))throw Error(`Invalid channel group ${e}, can't contain the : character`);let i,a=s||{};return typeof t=="string"?i=t:typeof t=="object"&&t!==null&&(a=t),this.getChannelById(e,i,a)}getChannelById=(e,t,s)=>{let i=`${e}:${t||""}`;if(i in this.activeChannels&&!this.activeChannels[i].disconnected){let r=this.activeChannels[i];return Object.keys(s).length>0&&(r.data=s,r._data=s),r}let a=new cn(this,e,t,s);return this.activeChannels[a.cid]=a,a};getChannel=(e,t)=>{let s=Ue(),i=`${this.projectId}:${s}`,a=`${e}:${i}`;if(a in this.activeChannels&&!this.activeChannels[a].disconnected){let o=this.activeChannels[a];return Object.keys(t).length>0&&(o.data=t,o._data=t),o}let r=new cn(this,e,i,t);return this.activeChannels[r.cid]=r,r};_normalizeExpiration(e){let t=null;if(typeof e=="number"){let s=new Date;s.setSeconds(s.getSeconds()+e),t=s.toISOString()}else wg(e)?t=e:e instanceof Date&&(t=e.toISOString());return t}getUserAgent(){return this.userAgent||`ermis-chat-sdk-javascript-client-${this.node?"node":"browser"}-1.0.3`}setUserAgent(e){this.userAgent=e}_enrichAxiosOptions(e={params:{},headers:{},config:{}}){let t=this._getToken();t?.startsWith("Bearer ")||(t=`Bearer ${t}`);let s=t?{Authorization:t}:void 0;e.headers?.["x-client-request-id"]||(e.headers={...e.headers,"x-client-request-id":Ue()});let{params:i,headers:a,...r}=this.options.axiosRequestConfig||{};return{params:{...e.params,...i||{}},headers:{...s,"stream-auth-type":this.getAuthType(),"X-Stream-Client":this.getUserAgent(),...e.headers,...a||{}},...e.config,...r||{}}}_getToken(){return this.tokenManager?this.tokenManager.getToken():null}_startCleaning(){let e=this;this.cleaningIntervalRef==null&&(this.cleaningIntervalRef=setInterval(()=>{for(let t of Object.values(e.activeChannels))t.clean()},500))}_buildWSPayload=e=>JSON.stringify({user_id:this.userID,user_details:this.user,client_request_id:e})};var Cg={"channel.created":!0,"channel.deleted":!0,"channel.truncate":!0,"channel.updated":!0,"channel.pinned":!0,"channel.unpinned":!0,"health.check":!0,"member.added":!0,"member.removed":!0,"member.updated":!0,"member.joined":!0,"member.promoted":!0,"member.demoted":!0,"member.banned":!0,"member.unbanned":!0,"member.blocked":!0,"member.unblocked":!0,"message.deleted":!0,"message.deleted_for_me":!0,"message.new":!0,"message.read":!0,"message.updated":!0,"message.pinned":!0,"message.unpinned":!0,"notification.channel_deleted":!0,"notification.invite_accepted":!0,"notification.invite_rejected":!0,"notification.invite_messaging_skipped":!0,"pollchoice.new":!0,"reaction.deleted":!0,"reaction.new":!0,"typing.start":!0,"typing.stop":!0,"user.watching.start":!0,"user.watching.stop":!0,"connection.changed":!0,"connection.recovered":!0,"capabilities.changed":!0,"channel.topic.disabled":!0,"channel.topic.enabled":!0,"channel.topic.created":!0,"channel.topic.closed":!0,"channel.topic.reopen":!0,"channel.topic.updated":!0};var Hg={},b,es=null;function dn(){return(es===null||es.byteLength===0)&&(es=new Uint8Array(b.memory.buffer)),es}var Xs=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Xs.decode();var Eg=2146435072,Xa=0;function Sg(n,e){return Xa+=e,Xa>=Eg&&(Xs=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Xs.decode(),Xa=e),Xs.decode(dn().subarray(n,n+e))}function _e(n,e){return n=n>>>0,Sg(n,e)}var lt=new Array(128).fill(void 0);lt.push(void 0,null,!0,!1);var ts=lt.length;function y(n){ts===lt.length&&lt.push(lt.length+1);let e=ts;return ts=lt[e],lt[e]=n,e}function h(n){return lt[n]}var xe=0,ns=new TextEncoder;"encodeInto"in ns||(ns.encodeInto=function(n,e){let t=ns.encode(n);return e.set(t),{read:n.length,written:t.length}});function Ze(n,e,t){if(t===void 0){let o=ns.encode(n),l=e(o.length,1)>>>0;return dn().subarray(l,l+o.length).set(o),xe=o.length,l}let s=n.length,i=e(s,1)>>>0,a=dn(),r=0;for(;r<s;r++){let o=n.charCodeAt(r);if(o>127)break;a[i+r]=o}if(r!==s){r!==0&&(n=n.slice(r)),i=t(i,s,s=r+n.length*3,1)>>>0;let o=dn().subarray(i+r,i+s),l=ns.encodeInto(n,o);r+=l.written,i=t(i,s,r,1)>>>0}return xe=r,i}var jt=null;function U(){return(jt===null||jt.buffer.detached===!0||jt.buffer.detached===void 0&&jt.buffer!==b.memory.buffer)&&(jt=new DataView(b.memory.buffer)),jt}function ie(n){return n==null}function Qa(n){let e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){let i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){let i=n.length,a="[";i>0&&(a+=Qa(n[0]));for(let r=1;r<i;r++)a+=", "+Qa(n[r]);return a+="]",a}let t=/\[object ([^\]]+)\]/.exec(toString.call(n)),s;if(t&&t.length>1)s=t[1];else return toString.call(n);if(s=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
21
+ ${n.stack}`:s}function K(n,e){try{return n.apply(this,e)}catch(t){b.__wbindgen_export3(y(t))}}function Rg(n){n<132||(lt[n]=ts,ts=n)}function J(n){let e=h(n);return Rg(n),e}function un(n,e){return n=n>>>0,dn().subarray(n/1,n/1+e)}var Qs=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));function Yn(n,e,t,s){let i={a:n,b:e,cnt:1,dtor:t},a=(...r)=>{i.cnt++;let o=i.a;i.a=0;try{return s(o,i.b,...r)}finally{i.a=o,a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--i.cnt===0&&(i.dtor(i.a,i.b),i.a=0,Qs.unregister(i))},Qs.register(a,i,i),a}function Tg(n,e,t,s){let i={a:n,b:e,cnt:1,dtor:t},a=(...r)=>{i.cnt++;try{return s(i.a,i.b,...r)}finally{a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--i.cnt===0&&(i.dtor(i.a,i.b),i.a=0,Qs.unregister(i))},Qs.register(a,i,i),a}function Zn(n,e){let t=e(n.length*1,1)>>>0;return dn().set(n,t/1),xe=n.length,t}function kg(n,e){b.__wasm_bindgen_func_elem_12858(n,e)}function Ag(n,e,t){b.__wasm_bindgen_func_elem_11688(n,e,y(t))}function Ig(n,e){b.__wasm_bindgen_func_elem_6230(n,e)}function Dg(n,e,t){b.__wasm_bindgen_func_elem_2287(n,e,y(t))}function Og(n,e,t){b.__wasm_bindgen_func_elem_12912(n,e,y(t))}function Ug(n,e){b.__wasm_bindgen_func_elem_5748(n,e)}function Lg(n,e,t,s){b.__wasm_bindgen_func_elem_14376(n,e,y(t),y(s))}var Fg=["blob","arraybuffer"],Pg=["bytes"],Mg=["default","no-store","reload","no-cache","force-cache","only-if-cached"],jg=["omit","same-origin","include"],Ng=["same-origin","no-cors","cors","navigate"],$p=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>b.__wbg_connectionstats_free(n>>>0,1)),Ys=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,$p.unregister(this),e}free(){let e=this.__destroy_into_raw();b.__wbg_connectionstats_free(e,0)}get rtt_ms(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.__wbg_get_connectionstats_rtt_ms(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getFloat64(s+8,!0);return e===0?void 0:t}finally{b.__wbindgen_add_to_stack_pointer(16)}}set rtt_ms(e){b.__wbg_set_connectionstats_rtt_ms(this.__wbg_ptr,!ie(e),ie(e)?0:e)}get packet_loss(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.__wbg_get_connectionstats_packet_loss(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getFloat64(s+8,!0);return e===0?void 0:t}finally{b.__wbindgen_add_to_stack_pointer(16)}}set packet_loss(e){b.__wbg_set_connectionstats_packet_loss(this.__wbg_ptr,!ie(e),ie(e)?0:e)}constructor(e,t,s){var i=ie(e)?0:Ze(e,b.__wbindgen_export,b.__wbindgen_export2),a=xe;let r=b.connectionstats_new(i,a,!ie(t),ie(t)?0:t,!ie(s),ie(s)?0:s);return this.__wbg_ptr=r>>>0,$p.register(this,this.__wbg_ptr,this),this}get connection_type(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.connectionstats_connection_type(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getInt32(s+4,!0);let i;return e!==0&&(i=_e(e,t).slice(),b.__wbindgen_export4(e,t*1,1)),i}finally{b.__wbindgen_add_to_stack_pointer(16)}}set connection_type(e){var t=ie(e)?0:Ze(e,b.__wbindgen_export,b.__wbindgen_export2),s=xe;b.connectionstats_set_connection_type(this.__wbg_ptr,t,s)}};Symbol.dispose&&(Ys.prototype[Symbol.dispose]=Ys.prototype.free);var zp=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>b.__wbg_ermiscall_free(n>>>0,1)),mn=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,zp.unregister(this),e}free(){let e=this.__destroy_into_raw();b.__wbg_ermiscall_free(e,0)}constructor(){let e=b.ermiscall_new();return this.__wbg_ptr=e>>>0,zp.register(this,this.__wbg_ptr,this),this}spawn(e,t){var s=ie(t)?0:Zn(t,b.__wbindgen_export),i=xe;let a=b.ermiscall_spawn(this.__wbg_ptr,y(e),s,i);return J(a)}getLocalEndpointAddr(){let e=b.ermiscall_getLocalEndpointAddr(this.__wbg_ptr);return J(e)}connect(e){let t=Ze(e,b.__wbindgen_export,b.__wbindgen_export2),s=xe,i=b.ermiscall_connect(this.__wbg_ptr,t,s);return J(i)}closeEndpoint(){let e=b.ermiscall_closeEndpoint(this.__wbg_ptr);return J(e)}closeConnection(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.ermiscall_closeConnection(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getInt32(s+4,!0);if(t)throw J(e)}finally{b.__wbindgen_add_to_stack_pointer(16)}}acceptConnection(){let e=b.ermiscall_acceptConnection(this.__wbg_ptr);return J(e)}sendControlFrame(e){try{let i=b.__wbindgen_add_to_stack_pointer(-16),a=Zn(e,b.__wbindgen_export),r=xe;b.ermiscall_sendControlFrame(i,this.__wbg_ptr,a,r);var t=U().getInt32(i+0,!0),s=U().getInt32(i+4,!0);if(s)throw J(t)}finally{b.__wbindgen_add_to_stack_pointer(16)}}sendAudioFrame(e){try{let i=b.__wbindgen_add_to_stack_pointer(-16),a=Zn(e,b.__wbindgen_export),r=xe;b.ermiscall_sendAudioFrame(i,this.__wbg_ptr,a,r);var t=U().getInt32(i+0,!0),s=U().getInt32(i+4,!0);if(s)throw J(t)}finally{b.__wbindgen_add_to_stack_pointer(16)}}sendFrame(e){try{let i=b.__wbindgen_add_to_stack_pointer(-16),a=Zn(e,b.__wbindgen_export),r=xe;b.ermiscall_sendFrame(i,this.__wbg_ptr,a,r);var t=U().getInt32(i+0,!0),s=U().getInt32(i+4,!0);if(s)throw J(t)}finally{b.__wbindgen_add_to_stack_pointer(16)}}notifyNewGop(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.ermiscall_notifyNewGop(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getInt32(s+4,!0);if(t)throw J(e)}finally{b.__wbindgen_add_to_stack_pointer(16)}}recv(){try{let i=b.__wbindgen_add_to_stack_pointer(-16);b.ermiscall_recv(i,this.__wbg_ptr);var e=U().getInt32(i+0,!0),t=U().getInt32(i+4,!0),s=U().getInt32(i+8,!0);if(s)throw J(t);return J(e)}finally{b.__wbindgen_add_to_stack_pointer(16)}}asyncRecv(){let e=b.ermiscall_asyncRecv(this.__wbg_ptr);return J(e)}beginWithGop(e){try{let i=b.__wbindgen_add_to_stack_pointer(-16),a=Zn(e,b.__wbindgen_export),r=xe;b.ermiscall_beginWithGop(i,this.__wbg_ptr,a,r);var t=U().getInt32(i+0,!0),s=U().getInt32(i+4,!0);if(s)throw J(t)}finally{b.__wbindgen_add_to_stack_pointer(16)}}connectionType(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.ermiscall_connectionType(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getInt32(s+4,!0);let i;return e!==0&&(i=_e(e,t).slice(),b.__wbindgen_export4(e,t*1,1)),i}finally{b.__wbindgen_add_to_stack_pointer(16)}}roundTripTime(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.ermiscall_roundTripTime(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getFloat64(s+8,!0);return e===0?void 0:t}finally{b.__wbindgen_add_to_stack_pointer(16)}}currentPacketLoss(){try{let s=b.__wbindgen_add_to_stack_pointer(-16);b.ermiscall_currentPacketLoss(s,this.__wbg_ptr);var e=U().getInt32(s+0,!0),t=U().getFloat64(s+8,!0);return e===0?void 0:t}finally{b.__wbindgen_add_to_stack_pointer(16)}}networkChange(){b.ermiscall_networkChange(this.__wbg_ptr)}getStats(){try{let i=b.__wbindgen_add_to_stack_pointer(-16);b.ermiscall_getStats(i,this.__wbg_ptr);var e=U().getInt32(i+0,!0),t=U().getInt32(i+4,!0),s=U().getInt32(i+8,!0);if(s)throw J(t);return J(e)}finally{b.__wbindgen_add_to_stack_pointer(16)}}};Symbol.dispose&&(mn.prototype[Symbol.dispose]=mn.prototype.free);var qg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>b.__wbg_intounderlyingbytesource_free(n>>>0,1)),Zs=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,qg.unregister(this),e}free(){let e=this.__destroy_into_raw();b.__wbg_intounderlyingbytesource_free(e,0)}get type(){let e=b.intounderlyingbytesource_type(this.__wbg_ptr);return Pg[e]}get autoAllocateChunkSize(){return b.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr)>>>0}start(e){b.intounderlyingbytesource_start(this.__wbg_ptr,y(e))}pull(e){let t=b.intounderlyingbytesource_pull(this.__wbg_ptr,y(e));return J(t)}cancel(){let e=this.__destroy_into_raw();b.intounderlyingbytesource_cancel(e)}};Symbol.dispose&&(Zs.prototype[Symbol.dispose]=Zs.prototype.free);var Gg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>b.__wbg_intounderlyingsink_free(n>>>0,1)),ei=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Gg.unregister(this),e}free(){let e=this.__destroy_into_raw();b.__wbg_intounderlyingsink_free(e,0)}write(e){let t=b.intounderlyingsink_write(this.__wbg_ptr,y(e));return J(t)}close(){let e=this.__destroy_into_raw(),t=b.intounderlyingsink_close(e);return J(t)}abort(e){let t=this.__destroy_into_raw(),s=b.intounderlyingsink_abort(t,y(e));return J(s)}};Symbol.dispose&&(ei.prototype[Symbol.dispose]=ei.prototype.free);var Bg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>b.__wbg_intounderlyingsource_free(n>>>0,1)),ti=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Bg.unregister(this),e}free(){let e=this.__destroy_into_raw();b.__wbg_intounderlyingsource_free(e,0)}pull(e){let t=b.intounderlyingsource_pull(this.__wbg_ptr,y(e));return J(t)}cancel(){let e=this.__destroy_into_raw();b.intounderlyingsource_cancel(e)}};Symbol.dispose&&(ti.prototype[Symbol.dispose]=ti.prototype.free);var $g=new Set(["basic","cors","default"]);async function zg(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(s){if(n.ok&&$g.has(n.type)&&n.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",s);else throw s}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function Wg(){let n={};return n.wbg={},n.wbg.__wbg_Error_e83987f665cf5504=function(e,t){let s=Error(_e(e,t));return y(s)},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,t){let s=String(h(t)),i=Ze(s,b.__wbindgen_export,b.__wbindgen_export2),a=xe;U().setInt32(e+4,a,!0),U().setInt32(e+0,i,!0)},n.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(e){let t=h(e),s=typeof t=="boolean"?t:void 0;return ie(s)?16777215:s?1:0},n.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(e,t){let s=Qa(h(t)),i=Ze(s,b.__wbindgen_export,b.__wbindgen_export2),a=xe;U().setInt32(e+4,a,!0),U().setInt32(e+0,i,!0)},n.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377=function(e){return typeof h(e)=="function"},n.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(e){let t=h(e);return typeof t=="object"&&t!==null},n.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(e){return typeof h(e)=="string"},n.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(e){return h(e)===void 0},n.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(e,t){return h(e)==h(t)},n.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(e,t){let s=h(t),i=typeof s=="number"?s:void 0;U().setFloat64(e+8,ie(i)?0:i,!0),U().setInt32(e+0,!ie(i),!0)},n.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(e,t){let s=h(t),i=typeof s=="string"?s:void 0;var a=ie(i)?0:Ze(i,b.__wbindgen_export,b.__wbindgen_export2),r=xe;U().setInt32(e+4,r,!0),U().setInt32(e+0,a,!0)},n.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(e,t){throw new Error(_e(e,t))},n.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9=function(e){h(e)._wbg_cb_unref()},n.wbg.__wbg_abort_28ad55c5825b004d=function(e,t){h(e).abort(h(t))},n.wbg.__wbg_abort_e7eb059f72f9ed0c=function(e){h(e).abort()},n.wbg.__wbg_addEventListener_40dc0fc428fc49e1=function(){return K(function(e,t,s,i){h(e).addEventListener(_e(t,s),h(i))},arguments)},n.wbg.__wbg_append_b577eb3a177bc0fa=function(){return K(function(e,t,s,i,a){h(e).append(_e(t,s),_e(i,a))},arguments)},n.wbg.__wbg_body_587542b2fd8e06c0=function(e){let t=h(e).body;return ie(t)?0:y(t)},n.wbg.__wbg_buffer_ccc4520b36d3ccf4=function(e){let t=h(e).buffer;return y(t)},n.wbg.__wbg_byobRequest_2344e6975f27456e=function(e){let t=h(e).byobRequest;return ie(t)?0:y(t)},n.wbg.__wbg_byteLength_bcd42e4025299788=function(e){return h(e).byteLength},n.wbg.__wbg_byteOffset_ca3a6cf7944b364b=function(e){return h(e).byteOffset},n.wbg.__wbg_call_525440f72fbfc0ea=function(){return K(function(e,t,s){let i=h(e).call(h(t),h(s));return y(i)},arguments)},n.wbg.__wbg_call_e762c39fa8ea36bf=function(){return K(function(e,t){let s=h(e).call(h(t));return y(s)},arguments)},n.wbg.__wbg_cancel_48ab6f9dc366e369=function(e){let t=h(e).cancel();return y(t)},n.wbg.__wbg_catch_943836faa5d29bfb=function(e,t){let s=h(e).catch(h(t));return y(s)},n.wbg.__wbg_clearTimeout_15dfc3d1dcb635c6=function(){return K(function(e,t){h(e).clearTimeout(J(t))},arguments)},n.wbg.__wbg_clearTimeout_7a42b49784aea641=function(e){let t=clearTimeout(J(e));return y(t)},n.wbg.__wbg_close_5a6caed3231b68cd=function(){return K(function(e){h(e).close()},arguments)},n.wbg.__wbg_close_6956df845478561a=function(){return K(function(e){h(e).close()},arguments)},n.wbg.__wbg_close_885e277edf06b3fa=function(){return K(function(e){h(e).close()},arguments)},n.wbg.__wbg_code_20d453b11b200026=function(e){return h(e).code},n.wbg.__wbg_code_218f5fdf8c7fcabd=function(e){return h(e).code},n.wbg.__wbg_crypto_574e78ad8b13b65f=function(e){let t=h(e).crypto;return y(t)},n.wbg.__wbg_data_ee4306d069f24f2d=function(e){let t=h(e).data;return y(t)},n.wbg.__wbg_done_2042aa2670fb1db1=function(e){return h(e).done},n.wbg.__wbg_enqueue_7b18a650aec77898=function(){return K(function(e,t){h(e).enqueue(h(t))},arguments)},n.wbg.__wbg_fetch_74a3e84ebd2c9a0e=function(e){let t=fetch(h(e));return y(t)},n.wbg.__wbg_fetch_f8ba0e29a9d6de0d=function(e,t){let s=h(e).fetch(h(t));return y(s)},n.wbg.__wbg_getRandomValues_1c61fac11405ffdc=function(){return K(function(e,t){globalThis.crypto.getRandomValues(un(e,t))},arguments)},n.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return K(function(e,t){h(e).getRandomValues(h(t))},arguments)},n.wbg.__wbg_getReader_48e00749fe3f6089=function(){return K(function(e){let t=h(e).getReader();return y(t)},arguments)},n.wbg.__wbg_getTime_14776bfb48a1bff9=function(e){return h(e).getTime()},n.wbg.__wbg_get_7bed016f185add81=function(e,t){let s=h(e)[t>>>0];return y(s)},n.wbg.__wbg_get_done_a0463af43a1fc764=function(e){let t=h(e).done;return ie(t)?16777215:t?1:0},n.wbg.__wbg_get_efcb449f58ec27c2=function(){return K(function(e,t){let s=Reflect.get(h(e),h(t));return y(s)},arguments)},n.wbg.__wbg_get_value_5ce96c9f81ce7398=function(e){let t=h(e).value;return y(t)},n.wbg.__wbg_has_787fafc980c3ccdb=function(){return K(function(e,t){return Reflect.has(h(e),h(t))},arguments)},n.wbg.__wbg_headers_b87d7eaba61c3278=function(e){let t=h(e).headers;return y(t)},n.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(e){let t;try{t=h(e)instanceof ArrayBuffer}catch{t=!1}return t},n.wbg.__wbg_instanceof_Blob_23b3322f66e5a83b=function(e){let t;try{t=h(e)instanceof Blob}catch{t=!1}return t},n.wbg.__wbg_instanceof_Response_f4f3e87e07f3135c=function(e){let t;try{t=h(e)instanceof Response}catch{t=!1}return t},n.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(e){let t;try{t=h(e)instanceof Uint8Array}catch{t=!1}return t},n.wbg.__wbg_isArray_96e0af9891d0945d=function(e){return Array.isArray(h(e))},n.wbg.__wbg_iterator_e5822695327a3c39=function(){return y(Symbol.iterator)},n.wbg.__wbg_length_69bca3cb64fc8748=function(e){return h(e).length},n.wbg.__wbg_length_cdd215e10d9dd507=function(e){return h(e).length},n.wbg.__wbg_log_ee0138cca4957740=function(e,t){console.log(_e(e,t))},n.wbg.__wbg_message_bd42dbe3f2f3ed8e=function(e,t){let s=h(t).message,i=Ze(s,b.__wbindgen_export,b.__wbindgen_export2),a=xe;U().setInt32(e+4,a,!0),U().setInt32(e+0,i,!0)},n.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(e){let t=h(e).msCrypto;return y(t)},n.wbg.__wbg_new_0_f9740686d739025c=function(){return y(new Date)},n.wbg.__wbg_new_1acc0b6eea89d040=function(){let e=new Object;return y(e)},n.wbg.__wbg_new_2531773dac38ebb3=function(){return K(function(){let e=new AbortController;return y(e)},arguments)},n.wbg.__wbg_new_3c3d849046688a66=function(e,t){try{var s={a:e,b:t},i=(r,o)=>{let l=s.a;s.a=0;try{return Lg(l,s.b,r,o)}finally{s.a=l}};let a=new Promise(i);return y(a)}finally{s.a=s.b=0}},n.wbg.__wbg_new_5a79be3ab53b8aa5=function(e){let t=new Uint8Array(h(e));return y(t)},n.wbg.__wbg_new_881c4fe631eee9ad=function(){return K(function(e,t){let s=new WebSocket(_e(e,t));return y(s)},arguments)},n.wbg.__wbg_new_9edf9838a2def39c=function(){return K(function(){let e=new Headers;return y(e)},arguments)},n.wbg.__wbg_new_a7442b4b19c1a356=function(e,t){let s=new Error(_e(e,t));return y(s)},n.wbg.__wbg_new_e17d9f43105b08be=function(){let e=new Array;return y(e)},n.wbg.__wbg_new_from_slice_92f4d78ca282a2d2=function(e,t){let s=new Uint8Array(un(e,t));return y(s)},n.wbg.__wbg_new_no_args_ee98eee5275000a4=function(e,t){let s=new Function(_e(e,t));return y(s)},n.wbg.__wbg_new_with_byte_offset_and_length_46e3e6a5e9f9e89b=function(e,t,s){let i=new Uint8Array(h(e),t>>>0,s>>>0);return y(i)},n.wbg.__wbg_new_with_length_01aa0dc35aa13543=function(e){let t=new Uint8Array(e>>>0);return y(t)},n.wbg.__wbg_new_with_str_and_init_0ae7728b6ec367b1=function(){return K(function(e,t,s){let i=new Request(_e(e,t),h(s));return y(i)},arguments)},n.wbg.__wbg_new_with_str_sequence_57a88eb77393f23f=function(){return K(function(e,t,s){let i=new WebSocket(_e(e,t),h(s));return y(i)},arguments)},n.wbg.__wbg_next_020810e0ae8ebcb0=function(){return K(function(e){let t=h(e).next();return y(t)},arguments)},n.wbg.__wbg_next_2c826fe5dfec6b6a=function(e){let t=h(e).next;return y(t)},n.wbg.__wbg_node_905d3e251edff8a2=function(e){let t=h(e).node;return y(t)},n.wbg.__wbg_now_2c95c9de01293173=function(e){return h(e).now()},n.wbg.__wbg_now_793306c526e2e3b6=function(){return Date.now()},n.wbg.__wbg_performance_7a3ffd0b17f663ad=function(e){let t=h(e).performance;return y(t)},n.wbg.__wbg_process_dc0fbacc7c1c06f7=function(e){let t=h(e).process;return y(t)},n.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(e,t,s){Uint8Array.prototype.set.call(un(e,t),h(s))},n.wbg.__wbg_push_df81a39d04db858c=function(e,t){return h(e).push(h(t))},n.wbg.__wbg_queueMicrotask_34d692c25c47d05b=function(e){let t=h(e).queueMicrotask;return y(t)},n.wbg.__wbg_queueMicrotask_9d76cacb20c84d58=function(e){queueMicrotask(h(e))},n.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return K(function(e,t){h(e).randomFillSync(J(t))},arguments)},n.wbg.__wbg_read_48f1593df542f968=function(e){let t=h(e).read();return y(t)},n.wbg.__wbg_readyState_97984f126080aeda=function(e){return h(e).readyState},n.wbg.__wbg_reason_1cced37e3a93763e=function(e,t){let s=h(t).reason,i=Ze(s,b.__wbindgen_export,b.__wbindgen_export2),a=xe;U().setInt32(e+4,a,!0),U().setInt32(e+0,i,!0)},n.wbg.__wbg_releaseLock_5d0b5a68887b891d=function(e){h(e).releaseLock()},n.wbg.__wbg_removeEventListener_924d9db66a4f775d=function(){return K(function(e,t,s,i){h(e).removeEventListener(_e(t,s),h(i))},arguments)},n.wbg.__wbg_require_60cc747a6bc5215a=function(){return K(function(){let e=module.require;return y(e)},arguments)},n.wbg.__wbg_resolve_caf97c30b83f7053=function(e){let t=Promise.resolve(h(e));return y(t)},n.wbg.__wbg_respond_0f4dbf5386f5c73e=function(){return K(function(e,t){h(e).respond(t>>>0)},arguments)},n.wbg.__wbg_send_171576d2f7487517=function(){return K(function(e,t,s){h(e).send(_e(t,s))},arguments)},n.wbg.__wbg_send_3d2cf376613294f0=function(){return K(function(e,t,s){h(e).send(un(t,s))},arguments)},n.wbg.__wbg_setTimeout_4eb823e8b72fbe79=function(){return K(function(e,t,s){let i=h(e).setTimeout(J(t),s);return y(i)},arguments)},n.wbg.__wbg_setTimeout_7bb3429662ab1e70=function(e,t){let s=setTimeout(h(e),t);return y(s)},n.wbg.__wbg_set_3f1d0b984ed272ed=function(e,t,s){h(e)[J(t)]=J(s)},n.wbg.__wbg_set_9e6516df7b7d0f19=function(e,t,s){h(e).set(un(t,s))},n.wbg.__wbg_set_binaryType_9d839cea8fcdc5c3=function(e,t){h(e).binaryType=Fg[t]},n.wbg.__wbg_set_body_3c365989753d61f4=function(e,t){h(e).body=h(t)},n.wbg.__wbg_set_cache_2f9deb19b92b81e3=function(e,t){h(e).cache=Mg[t]},n.wbg.__wbg_set_credentials_f621cd2d85c0c228=function(e,t){h(e).credentials=jg[t]},n.wbg.__wbg_set_handle_event_b2de49ad6c81e3c8=function(e,t){h(e).handleEvent=h(t)},n.wbg.__wbg_set_headers_6926da238cd32ee4=function(e,t){h(e).headers=h(t)},n.wbg.__wbg_set_method_c02d8cbbe204ac2d=function(e,t,s){h(e).method=_e(t,s)},n.wbg.__wbg_set_mode_52ef73cfa79639cb=function(e,t){h(e).mode=Ng[t]},n.wbg.__wbg_set_onclose_c09e4f7422de8dae=function(e,t){h(e).onclose=h(t)},n.wbg.__wbg_set_onerror_337a3a2db9517378=function(e,t){h(e).onerror=h(t)},n.wbg.__wbg_set_onmessage_8661558551a89792=function(e,t){h(e).onmessage=h(t)},n.wbg.__wbg_set_onopen_efccb9305427b907=function(e,t){h(e).onopen=h(t)},n.wbg.__wbg_set_signal_dda2cf7ccb6bee0f=function(e,t){h(e).signal=h(t)},n.wbg.__wbg_signal_4db5aa055bf9eb9a=function(e){let t=h(e).signal;return y(t)},n.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e=function(){let e=typeof global>"u"?null:global;return ie(e)?0:y(e)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac=function(){let e=typeof globalThis>"u"?null:globalThis;return ie(e)?0:y(e)},n.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b=function(){let e=typeof self>"u"?null:self;return ie(e)?0:y(e)},n.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2=function(){let e=typeof window>"u"?null:window;return ie(e)?0:y(e)},n.wbg.__wbg_status_de7eed5a7a5bfd5d=function(e){return h(e).status},n.wbg.__wbg_stringify_b5fb28f6465d9c3e=function(){return K(function(e){let t=JSON.stringify(h(e));return y(t)},arguments)},n.wbg.__wbg_subarray_480600f3d6a9f26c=function(e,t,s){let i=h(e).subarray(t>>>0,s>>>0);return y(i)},n.wbg.__wbg_then_4f46f6544e6b4a28=function(e,t){let s=h(e).then(h(t));return y(s)},n.wbg.__wbg_then_70d05cf780a18d77=function(e,t,s){let i=h(e).then(h(t),h(s));return y(i)},n.wbg.__wbg_url_9bd0af1cd8643de7=function(e,t){let s=h(t).url,i=Ze(s,b.__wbindgen_export,b.__wbindgen_export2),a=xe;U().setInt32(e+4,a,!0),U().setInt32(e+0,i,!0)},n.wbg.__wbg_url_b36d2a5008eb056f=function(e,t){let s=h(t).url,i=Ze(s,b.__wbindgen_export,b.__wbindgen_export2),a=xe;U().setInt32(e+4,a,!0),U().setInt32(e+0,i,!0)},n.wbg.__wbg_value_692627309814bb8c=function(e){let t=h(e).value;return y(t)},n.wbg.__wbg_versions_c01dfd4722a88165=function(e){let t=h(e).versions;return y(t)},n.wbg.__wbg_view_f6c15ac9fed63bbd=function(e){let t=h(e).view;return ie(t)?0:y(t)},n.wbg.__wbg_wasClean_3d7c0cf05bd0a123=function(e){return h(e).wasClean},n.wbg.__wbindgen_cast_0b4723bb5ff7475b=function(e,t){let s=Yn(e,t,b.__wasm_bindgen_func_elem_11664,Ag);return y(s)},n.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,t){let s=_e(e,t);return y(s)},n.wbg.__wbindgen_cast_253c73f2760a05aa=function(e,t){let s=Yn(e,t,b.__wasm_bindgen_func_elem_6219,Ig);return y(s)},n.wbg.__wbindgen_cast_343835dd8f264af2=function(e,t){let s=Tg(e,t,b.__wasm_bindgen_func_elem_5735,Ug);return y(s)},n.wbg.__wbindgen_cast_7bacc9fa7d2c65f4=function(e,t){let s=Yn(e,t,b.__wasm_bindgen_func_elem_12841,kg);return y(s)},n.wbg.__wbindgen_cast_88fdcfb6b716b7f8=function(e,t){let s=Yn(e,t,b.__wasm_bindgen_func_elem_12896,Og);return y(s)},n.wbg.__wbindgen_cast_c43a1cf1b94f2e7c=function(e,t){let s=Yn(e,t,b.__wasm_bindgen_func_elem_2083,Dg);return y(s)},n.wbg.__wbindgen_cast_cb9088102bce6b30=function(e,t){let s=un(e,t);return y(s)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return y(e)},n.wbg.__wbindgen_object_clone_ref=function(e){let t=h(e);return y(t)},n.wbg.__wbindgen_object_drop_ref=function(e){J(e)},n}function Vg(n,e){return b=n.exports,Wp.__wbindgen_wasm_module=e,jt=null,es=null,b}async function Wp(n){if(b!==void 0)return b;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("ermis_call_node_wasm_bg.wasm",Hg.url));let e=Wg();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:t,module:s}=await zg(await n,e);return Vg(t,s)}var Vp=Wp;var ni=class{videoEncoder=null;audioEncoder=null;videoReader=null;localStream=null;videoConfig=null;audioConfig=null;videoConfigSent=!1;audioConfigSent=!1;hasVideo=!1;hasAudio=!1;forceKeyFrame=!1;nodeCall;constructor(e){this.nodeCall=e}async connect(e){try{await this.nodeCall.connect(e),await this.sendConnected(),await this.sendConfigs()}catch(t){console.error("Error starting MediaStreamSender:",t)}}async sendConfigs(){try{await this.sendTransceiverState(this.hasAudio,this.hasVideo),await this.sendAudioConfig(),this.localStream?.getVideoTracks()[0]&&await this.sendVideoConfig()}catch(e){console.error("Error sending configs:",e)}}stop=()=>{if(this.videoReader){try{this.videoReader.cancel("Stream stopped").catch(()=>{})}catch{}this.videoReader=null}if(this.videoEncoder){try{this.videoEncoder.state!=="closed"&&(this.videoEncoder.reset(),this.videoEncoder.close())}catch{}this.videoEncoder=null}if(this.audioEncoder){try{this.audioEncoder.state!=="closed"&&(this.audioEncoder.reset(),this.audioEncoder.close())}catch{}this.audioEncoder=null}this.videoConfig=null,this.audioConfig=null,this.videoConfigSent=!1,this.audioConfigSent=!1,this.hasVideo=!1,this.hasAudio=!1,this.localStream&&(this.localStream.getTracks().forEach(e=>e.stop()),this.localStream=null)};initAudioEncoder=e=>{this.localStream=new MediaStream([e]),this.audioConfigSent=!1,this.hasAudio=!!e;let t=new AudioEncoder({output:(s,i)=>{if(i?.decoderConfig&&!this.audioConfigSent){let a;i.decoderConfig.description&&(a=ba(i.decoderConfig.description)),this.audioConfig={codec:i.decoderConfig.codec??"opus",sampleRate:i.decoderConfig.sampleRate??48e3,numberOfChannels:i.decoderConfig.numberOfChannels??1,...a&&{description:a}}}if(s&&this.isReadyToSendData("audio")){let a=new ArrayBuffer(s.byteLength);s.copyTo(a);let r=s.timestamp,o=Ut(a,r,"audio",null);this.sendPacketOrQueue(o,"audio",null)}},error:s=>console.error("AudioEncoder error:",s)});t.configure({codec:"mp4a.40.2",sampleRate:48e3,numberOfChannels:1,bitrate:128e3}),this.audioEncoder=t,this.processAudioFrames(e)};initVideoEncoder(e){this.localStream&&this.localStream.addTrack(e),this.videoConfigSent=!1,this.hasVideo=!!e;let t=e.getSettings(),s=t.width||1280,i=t.height||720,a=new VideoEncoder({output:async(r,o)=>{if(o?.decoderConfig&&!this.videoConfigSent){let l;o.decoderConfig.description&&(l=ba(o.decoderConfig.description)),this.videoConfig={codec:o.decoderConfig.codec??"hev1.1.6.L93.B0",codedWidth:o.decoderConfig.codedWidth??s,codedHeight:o.decoderConfig.codedHeight??i,frameRate:30,orientation:0,...l&&{description:l}},await this.sendVideoConfig()}if(r&&this.isReadyToSendData("video")){let l=new ArrayBuffer(r.byteLength);r.copyTo(l);let c=r.type==="key"?"video-key":"video-delta",p=r.timestamp,u=Ut(l,p,c,null);this.sendPacketOrQueue(u,"video",c)}},error:r=>console.error("VideoEncoder error:",r)});a.configure({codec:"hev1.1.6.L93.B0",width:s,height:i,bitrate:5e5,framerate:30,latencyMode:"realtime",hardwareAcceleration:"prefer-hardware"}),this.videoEncoder=a,this.processVideoFrames(e)}initEncoders=e=>{let t=e.getVideoTracks()[0],s=e.getAudioTracks()[0];s&&this.initAudioEncoder(s),t&&this.initVideoEncoder(t)};sendTransceiverState=async(e,t)=>{let i=Ut(null,null,"transciverState",{audio_enable:!!e,video_enable:!!t});await this.nodeCall.sendControlFrame(i)};async replaceVideoTrack(e){if(this.videoReader){try{await this.videoReader.cancel("Replacing track")}catch{}this.videoReader=null}e&&this.processVideoFrames(e)}async replaceAudioTrack(e){e&&this.processAudioFrames(e)}requestKeyFrame=()=>{console.log("\u{1F4E5} KeyFrame requested"),this.forceKeyFrame=!0};processVideoFrames=async e=>{try{let t=new MediaStreamTrackProcessor({track:e});this.videoReader=t.readable.getReader();let s=0;for(;this.videoReader;){let{done:i,value:a}=await this.videoReader.read();if(i)break;if(!this.videoEncoder){a?.close();break}if(a){s+=1;let r=s%60===0||this.forceKeyFrame;this.forceKeyFrame&&(console.log("\u{1F4E4} Sending forced KeyFrame"),this.forceKeyFrame=!1);try{this.videoEncoder.encode(a,{keyFrame:r})}catch(o){console.error("Encode error:",o)}finally{a.close()}}}}catch(t){console.error(`Error processing video frames: ${t.message}`)}finally{if(this.videoReader)try{this.videoReader.releaseLock()}catch{}}};processAudioFrames=async e=>{let s=new MediaStreamTrackProcessor({track:e}).readable.getReader();try{for(;;){let{done:i,value:a}=await s.read();if(i)break;if(!this.audioEncoder){a?.close();break}if(a)try{this.audioEncoder.encode(a)}catch(r){console.error("Audio Encoding error:",r)}finally{a.close()}}}catch(i){console.error(`Error processing audio frames: ${i.message}`)}};isReadyToSendData=e=>{let t=!this.hasVideo||this.videoConfigSent,s=!this.hasAudio||this.audioConfigSent,i=t&&s;return e==="video"?i&&this.videoConfigSent:e==="audio"?i&&this.audioConfigSent:!1};sendVideoConfig=async()=>{if(this.videoConfig&&!this.videoConfigSent)try{let e=Ut(null,null,"videoConfig",this.videoConfig);await this.nodeCall.sendControlFrame(e),this.videoConfigSent=!0}catch(e){console.error("Error sending video config:",e)}};sendAudioConfig=async()=>{if(this.audioConfig&&!this.audioConfigSent)try{let e=Ut(null,null,"audioConfig",this.audioConfig);await this.nodeCall.sendControlFrame(e),this.audioConfigSent=!0}catch(e){console.error("Error sending audio config:",e)}};sendConnected=async()=>{let e=Ut(null,null,"connected",null);await this.nodeCall.sendControlFrame(e)};sendPacketOrQueue=async(e,t,s)=>{this.isReadyToSendData(t)&&(t==="audio"?await this.nodeCall.sendAudioFrame(e):t==="video"&&(s==="video-key"?await this.nodeCall.beginWithGop(e):s==="video-delta"&&await this.nodeCall.sendFrame(e)))}};var fn={VPS_NUT:32,SPS_NUT:33,PPS_NUT:34,PREFIX_SEI_NUT:39,SUFFIX_SEI_NUT:40,fromValue(n){return{32:"VPS_NUT",33:"SPS_NUT",34:"PPS_NUT",39:"PREFIX_SEI_NUT",40:"SUFFIX_SEI_NUT"}[n]||n}},si=class n{generalProfileSpace=0;generalTierFlag=!1;generalProfileIdc=0;generalProfileCompatibilityFlags=0;generalConstraintIndicatorFlags=0;generalLevelIdc=0;minSpatialSegmentationIdc=0;parallelismType=0;chromaFormatIdc=0;bitDepthLumaMinus8=0;bitDepthChromaMinus8=0;avgFrameRate=0;constantFrameRate=0;numTemporalLayers=0;temporalIdNested=!1;lengthSizeMinusOne=0;arrays=[];constructor(e){Object.assign(this,e)}static demux(e){let t=e instanceof Uint8Array?e:new Uint8Array(e),s=new DataView(t.buffer,t.byteOffset,t.byteLength),i=0,a=0,r=z=>{let pe=0;for(let T=0;T<z;T++){if(i>=t.length)throw new Error("End of buffer");let A=t[i]>>7-a&1;pe=pe<<1|A,a++,a===8&&(a=0,i++)}return pe},o=()=>{if(a!==0)return r(8);if(i>=t.length)throw new Error("End of buffer");return t[i++]},l=()=>{if(a!==0)return r(16);let z=s.getUint16(i,!1);return i+=2,z},c=()=>{if(a!==0)return r(32);let z=s.getUint32(i,!1);return i+=4,z},p=()=>{let z=l(),pe=c();return z*4294967296+pe},u=z=>{if(a!==0){let T=new Uint8Array(z);for(let A=0;A<z;A++)T[A]=r(8);return T}if(i+z>t.length)throw new Error("End of buffer");let pe=t.slice(i,i+z);return i+=z,pe};if(o()!==1)throw new Error("Invalid configuration version");let f=r(2),g=r(1)===1,v=r(5),_=c(),R=p(),D=o();r(4);let L=r(12);r(6);let q=r(2);r(6);let M=r(2);r(5);let Y=r(3);r(5);let ae=r(3),Z=l(),ye=r(2),Le=r(3),Nt=r(1)===1,qe=r(2);if(qe===2)throw new Error("length_size_minus_one must be 0, 1, or 3");let gt=o(),ce=[];for(let z=0;z<gt;z++){let pe=r(1)===1;r(1);let T=r(6),A=fn.fromValue(T);T!==fn.VPS_NUT&&T!==fn.SPS_NUT&&T!==fn.PPS_NUT&&T!==fn.PREFIX_SEI_NUT&&fn.SUFFIX_SEI_NUT;let X=l(),Te=[];for(let ee=0;ee<X;ee++){let Ge=l(),bt=u(Ge);Te.push(bt)}ce.push({arrayCompleteness:pe,nalUnitType:A,nalus:Te})}return new n({generalProfileSpace:f,generalTierFlag:g,generalProfileIdc:v,generalProfileCompatibilityFlags:_,generalConstraintIndicatorFlags:R,generalLevelIdc:D,minSpatialSegmentationIdc:L,parallelismType:q,chromaFormatIdc:M,bitDepthLumaMinus8:Y,bitDepthChromaMinus8:ae,avgFrameRate:Z,constantFrameRate:ye,numTemporalLayers:Le,temporalIdNested:Nt,lengthSizeMinusOne:qe,arrays:ce})}toCodecString(){let t={0:"",1:"A",2:"B",3:"C"}[this.generalProfileSpace];if(t===void 0)throw new Error("Unknown profile space");let s=`${t}${this.generalProfileIdc}`,i=this.generalProfileCompatibilityFlags.toString(16).padStart(8,"0").split("").reverse().join(""),a="";for(let u=0;u<i.length;u++){let m=i[u];(m!=="0"||u===0)&&(a+=m)}let o=`${this.generalTierFlag?"H":"L"}${this.generalLevelIdc}`,l="",c=this.generalConstraintIndicatorFlags,p=[Math.floor(c/1099511627776)&255,Math.floor(c/4294967296)&255,Math.floor(c/16777216)&255,Math.floor(c/65536)&255,Math.floor(c/256)&255,c&255];for(let u=2;u<6;u++)p[u]!==0&&(l+=`.${p[u].toString(16).padStart(2,"0")}`);return`hev1.${s}.${a}.${o}${l}`}};var Kg=.1,Hp=.02,ii=class{videoDecoder=null;audioDecoder=null;videoWriter=null;audioContext=null;mediaDestination=null;isWaitingForKeyFrame=!0;nextStartTime=0;lastVideoConfig=null;nodeCall;events;generatedStream=null;constructor(e,t={}){this.nodeCall=e,this.events=t}async acceptConnection(){try{await this.nodeCall.acceptConnection()}catch(e){console.error("\u274C Error starting MediaStreamReceiver:",e)}}getRemoteStream=()=>this.generatedStream;stop=()=>{this.resetDecoders()};initAudioContext=async()=>{if(!this.audioContext||this.audioContext.state==="closed"){let e=window.AudioContext||window.webkitAudioContext;this.audioContext=new e({sampleRate:48e3,latencyHint:"interactive"}),this.mediaDestination=this.audioContext.createMediaStreamDestination(),this.audioContext.state==="suspended"&&await this.audioContext.resume(),this.nextStartTime=this.audioContext.currentTime+Hp}};initDecoders=e=>{if(this.audioDecoder&&this.audioDecoder.close(),this.initAudioContext(),this.mediaDestination){let t=this.mediaDestination.stream.getAudioTracks()[0];this.generatedStream=new MediaStream([t])}this.isWaitingForKeyFrame=!0,this.audioDecoder=new AudioDecoder({output:t=>this.playDecodedAudio(t),error:t=>console.error("AudioDecoder error:",t)}),e==="video"&&this.setupVideoDecoder(),this.receiveLoop()};setupVideoDecoder=()=>{if(!this.videoWriter)return;if(this.videoDecoder)try{this.videoDecoder.state!=="closed"&&this.videoDecoder.close()}catch{}let e=new VideoDecoder({output:async t=>{try{if(!this.videoWriter){t.close();return}if(this.videoWriter.desiredSize<=0){t.close();return}await this.videoWriter.write(t)}catch{t.close()}finally{t.close()}},error:t=>{if(console.error("\u274C VideoDecoder CRASHED:",t),this.isWaitingForKeyFrame=!0,this.videoWriter&&(console.log("\u267B\uFE0F Attempting to respawn VideoDecoder..."),this.setupVideoDecoder(),this.lastVideoConfig&&this.videoDecoder))try{this.videoDecoder.configure(this.lastVideoConfig)}catch{}}});this.videoDecoder=e};playDecodedAudio=e=>{try{if(!this.audioContext||!this.mediaDestination){e.close();return}let{numberOfChannels:t,numberOfFrames:s,sampleRate:i}=e,a=s/i,r=this.audioContext.currentTime;this.nextStartTime<r?this.nextStartTime=r:this.nextStartTime>r+Kg&&(this.nextStartTime=r+Hp);let o=this.audioContext.createBuffer(t,s,i),l=t*s,c=new Float32Array(l);e.copyTo(c,{planeIndex:0,format:"f32-planar"});for(let u=0;u<t;u++){let m=c.subarray(u*s,(u+1)*s);o.copyToChannel(m,u)}let p=this.audioContext.createBufferSource();p.buffer=o,p.connect(this.mediaDestination),p.start(this.nextStartTime),this.nextStartTime+=a,e.close()}catch(t){console.error("Error in playDecodedAudio:",t),e?.close()}};newCodecFromDescription=(e,t)=>{if(!t.toLowerCase().includes("hvc")&&!t.toLowerCase().includes("hev"))return"";try{return si.demux(e).toCodecString()}catch{return""}};receiveLoop=async()=>{let e=new TextDecoder;for(;;)try{if(!this.nodeCall)break;let t=await this.nodeCall.asyncRecv(),s=new DataView(t.buffer,t.byteOffset,t.byteLength),i=s.getUint8(0),a=[0,1,6,7,5,8,9,10].includes(i)?1:9,r=new Uint8Array(t.buffer,t.byteOffset+a,t.byteLength-a);switch(i){case 0:{try{let l=e.decode(r),c=JSON.parse(l);if(console.log("--videoConfig--",c),!this.videoWriter){let f=new MediaStreamTrackGenerator({kind:"video"});this.videoWriter=f.writable.getWriter(),this.generatedStream&&this.generatedStream.addTrack(f)}this.videoDecoder||this.setupVideoDecoder(),this.isWaitingForKeyFrame=!0;let p;if(c.description)try{let f=atob(c.description),g=new Uint8Array(f.length);for(let v=0;v<f.length;v++)g[v]=f.charCodeAt(v);p=g.buffer}catch{}let u="";p&&(u=this.newCodecFromDescription(p,c.codec)||$l(c.codec));let m={codec:u,frameRate:c.frameRate,codedWidth:c.codedWidth,codedHeight:c.codedHeight,...c.orientation&&{rotation:c.orientation},...p&&{description:p}};this.lastVideoConfig=m,this.videoDecoder&&this.videoDecoder.state!=="closed"&&((await VideoDecoder.isConfigSupported(m)).supported?(this.videoDecoder.configure(m),this.isWaitingForKeyFrame=!0):console.error("\u274C Browser does not support this video config:",m))}catch(l){console.error("\u274C Error processing VIDEO_CONFIG:",l)}break}case 1:{let l=JSON.parse(e.decode(r));console.log("--audioConfig--",l),this.audioDecoder?.state!=="closed"&&this.audioDecoder?.configure({codec:l.codec,sampleRate:l.sampleRate,numberOfChannels:l.numberOfChannels});break}case 2:case 3:{if(!this.videoDecoder||this.videoDecoder.state!=="configured")break;let l=i===2;if(this.isWaitingForKeyFrame){if(!l)break;console.log("\u2705 Resumed decoding at KeyFrame"),this.isWaitingForKeyFrame=!1}if(!l&&this.videoDecoder.decodeQueueSize>15){console.warn("\u26A0\uFE0F Queue > 15. Dropping & Waiting for KeyFrame..."),this.isWaitingForKeyFrame=!0;break}let c=s.getBigUint64(1,!1),p=Number(c);try{this.videoDecoder.decode(new EncodedVideoChunk({type:l?"key":"delta",timestamp:p,data:r}))}catch(u){console.error("Video decode failed:",u),this.videoDecoder.state==="closed"&&(this.isWaitingForKeyFrame=!0)}break}case 4:{if(this.audioDecoder?.state==="configured"){let l=s.getBigUint64(1,!1),c=Number(l);this.audioDecoder.decode(new EncodedAudioChunk({type:"key",timestamp:c,data:r}))}break}case 6:this.events.onConnected&&this.events.onConnected();break;case 7:let o=JSON.parse(e.decode(r));this.events.onTransceiverState&&this.events.onTransceiverState(o);break;case 5:{let l=s.getInt32(1,!1);if(this.videoDecoder&&this.lastVideoConfig&&this.lastVideoConfig.rotation!==l){this.lastVideoConfig.rotation=l;try{this.videoDecoder.configure(this.lastVideoConfig),this.isWaitingForKeyFrame=!0,console.log("\u{1F504} Reconfigured rotation to",l,"- Waiting for next KeyFrame")}catch(c){console.error("Error reconfiguring VideoDecoder with new orientation:",c)}}break}case 8:console.log("\u{1F4E5} Received REQUEST_CONFIG"),this.events.onRequestConfig&&this.events.onRequestConfig();break;case 9:console.log("\u{1F4E5} Received REQUEST_KEY_FRAME"),this.events.onRequestKeyFrame&&this.events.onRequestKeyFrame();break;case 10:console.log("\u{1F4E5} Received END_CALL"),this.events.onEndCall&&this.events.onEndCall();break;default:console.warn("\u2753 Unknown frame type received:",i);break}}catch(t){console.error("Stream loop error",t),await new Promise(s=>setTimeout(s,200))}};resetDecoders=()=>{if(this.videoWriter){try{this.videoWriter.abort("Stream stopped").catch(()=>{}),this.videoWriter.releaseLock()}catch(e){console.warn("Error closing video writer:",e)}this.videoWriter=null}if(this.videoDecoder){try{this.videoDecoder.state!=="closed"&&(this.videoDecoder.reset(),this.videoDecoder.close())}catch{}this.videoDecoder=null}if(this.audioDecoder){try{this.audioDecoder.state!=="closed"&&(this.audioDecoder.reset(),this.audioDecoder.close())}catch{}this.audioDecoder=null}if(this.audioContext){try{this.audioContext.close()}catch(e){console.warn("Error closing audio context:",e)}this.audioContext=null}this.isWaitingForKeyFrame=!0,this.mediaDestination=null,this.nextStartTime=0,this.lastVideoConfig=null,this.generatedStream&&(this.generatedStream.getTracks().forEach(e=>e.stop()),this.generatedStream=null)}};var Ya=class{wasmPath;relayUrl="https://test-iroh.ermis.network.:8443";_client;sessionID;cid;callType;userID;callStatus="";metadata;callNode=null;localStream=null;remoteStream=null;callerInfo;receiverInfo;onCallEvent;onLocalStream;onRemoteStream;onConnectionMessageChange;onCallStatus;onDataChannelMessage;onUpgradeCall;onScreenShareChange;onError;onDeviceChange;availableAudioDevices=[];availableVideoDevices=[];selectedAudioDeviceId;selectedVideoDeviceId;missCallTimeout=null;healthCallInterval=null;healthCallServerInterval=null;healthCallTimeout=null;healthCallWarningTimeout=null;signalHandler;connectionChangedHandler;messageUpdatedHandler;isOffline=!1;isDestroyed=!1;mediaSender=null;mediaReceiver=null;constructor(e,t,s,i){this._client=e,this.cid="",this.callType="",this.sessionID=t,this.userID=e.userID,this.metadata={},this.wasmPath=s,this.relayUrl=i,this.listenSocketEvents(),this.setupDeviceChangeListener(),this.loadWasm()}async loadWasm(){try{await Vp(this.wasmPath)}catch(e){throw console.error("Failed to load ErmisCall WASM module:",e),e}}async initialize(){try{let e=new mn;return await e.spawn([this.relayUrl]),this.callNode=e,this.mediaSender=new ni(e),this.mediaReceiver=new ii(e,{onConnected:()=>{this.setCallStatus("connected"),this.connectCall(),this.missCallTimeout&&(clearTimeout(this.missCallTimeout),this.missCallTimeout=null),this.healthCallServerInterval&&clearInterval(this.healthCallServerInterval),this.healthCallServerInterval=setInterval(()=>{this.healthCall()},1e4);let t=this.mediaReceiver?.getRemoteStream();t&&this.onRemoteStream&&this.onRemoteStream(t)},onTransceiverState:t=>{typeof this.onDataChannelMessage=="function"&&this.onDataChannelMessage(t)},onRequestConfig:()=>{console.log("\u{1F4E4} Responding to REQUEST_CONFIG by sending configs"),this.mediaSender?.sendConfigs()},onRequestKeyFrame:()=>{console.log("\u{1F4E4} Responding to REQUEST_KEY_FRAME by forcing key frame"),this.mediaSender?.requestKeyFrame()},onEndCall:()=>{console.log("\u{1F4E5} Received END_CALL from remote peer"),this.destroy()}}),e}catch(e){throw console.error("Failed to initialize Ermis SDK:",e),e}}async getLocalEndpointAddr(){try{if(await this.initialize(),!this.callNode)return console.error("ErmisCall is not initialized."),null;let e=await this.callNode.getLocalEndpointAddr();return this.metadata&&(this.metadata.address=e),e}catch(e){return console.error("Failed to get address from ErmisCall:",e),null}}getClient(){return this._client}async _sendSignal(e){try{return await this.getClient().post(this.getClient().baseURL+"/signal",{...e,cid:this.cid||e.cid,is_video:this.callType==="video"||e.is_video,ios:!1,session_id:this.sessionID})}catch(t){let s=e.action;if(s==="health-call")return;if(typeof this.onError=="function")if(t.code==="ERR_NETWORK")s==="create-call"&&this.onError("Unable to make the call. Please check your network connection");else if(t.response.data.ermis_code===20)this.onError("Recipient was busy");else{let i=t.response.data?.message?t.response.data?.message:"Call failed";this.onError(i)}}}async getAvailableDevices(){try{let e=await navigator.mediaDevices.enumerateDevices(),t=e.filter(i=>i.kind==="audioinput"),s=e.filter(i=>i.kind==="videoinput");return this.availableAudioDevices=t,this.availableVideoDevices=s,{audioDevices:t,videoDevices:s}}catch(e){return console.error("Error enumerating devices:",e),{audioDevices:[],videoDevices:[]}}}async getMediaConstraints(){let{audioDevices:e,videoDevices:t}=await this.getAvailableDevices();this.onDeviceChange&&this.onDeviceChange(e,t),!this.selectedAudioDeviceId&&e.length>0&&(this.selectedAudioDeviceId=e[0].deviceId),!this.selectedVideoDeviceId&&t.length>0&&(this.selectedVideoDeviceId=t[0].deviceId);let s={deviceId:this.selectedAudioDeviceId?{exact:this.selectedAudioDeviceId}:void 0,echoCancellation:!0,noiseSuppression:!0,sampleRate:48e3},i=this.callType==="video"?{deviceId:this.selectedVideoDeviceId?{exact:this.selectedVideoDeviceId}:void 0,width:640,height:360}:!1;return{audio:s,video:i}}async startLocalStream(){let e=await this.getMediaConstraints();try{let t=await navigator.mediaDevices.getUserMedia(e);return this.applyLocalStream(t)}catch(t){if(console.warn("Error getting user media:",t?.message),this.callType==="video"&&e.video)try{let s=await navigator.mediaDevices.getUserMedia({audio:e.audio,video:!1});return this.setConnectionMessage("Camera not available, using audio only"),this.applyLocalStream(s)}catch{}return typeof this.onError=="function"&&this.onError("No microphone or camera found. Please check your device."),null}}applyLocalStream(e){if(this.callStatus==="ended"){e.getTracks().forEach(t=>t.stop()),this.destroy();return}return this.onLocalStream&&this.onLocalStream(e),this.localStream=e,e}setConnectionMessage(e){typeof this.onConnectionMessageChange=="function"&&this.onConnectionMessageChange(e)}setCallStatus(e){this.callStatus=e,typeof this.onCallStatus=="function"&&this.onCallStatus(e)}setUserInfo(e,t){if(!e||!t)return;let i=(e?this.getClient().activeChannels[e]:void 0)?.state?.members||{},a=Object.keys(i),r=t||"",o=a.find(p=>p!==r)||"",l=this.getClient().state.users[r],c=this.getClient().state.users[o];this.callerInfo={id:r,name:l?.name,avatar:l?.avatar||""},this.receiverInfo={id:o,name:c?.name,avatar:c?.avatar||""}}listenSocketEvents(){this.signalHandler=async e=>{let{action:t,user_id:s,session_id:i,cid:a,is_video:r,signal:o,metadata:l}=e;switch(t){case"create-call":if(s===this.userID&&i!==this.sessionID){this.isDestroyed=!0,this.destroy();return}if(this.isDestroyed=!1,this.callStatus="",this.callType=r?"video":"audio",this.setUserInfo(a,s),this.setCallStatus("ringing"),this.cid=a||"",this.metadata=l||{},typeof this.onCallEvent=="function"&&this.onCallEvent({type:s!==this.userID?"incoming":"outgoing",callType:r?"video":"audio",cid:a||"",callerInfo:this.callerInfo,receiverInfo:this.receiverInfo,metadata:this.metadata}),await this.startLocalStream(),this.callStatus==="ended")return;s!==this.userID&&await this.initialize(),this.localStream&&this.mediaSender&&this.mediaReceiver&&(this.mediaSender?.initEncoders(this.localStream),this.mediaReceiver?.initDecoders(this.callType)),s===this.userID&&(this.missCallTimeout&&clearTimeout(this.missCallTimeout),this.missCallTimeout=setTimeout(async()=>{await this.missCall()},6e4));break;case"accept-call":if(s===this.userID&&i!==this.sessionID){this.isDestroyed=!0,this.destroy();return}s!==this.userID&&!this.isDestroyed&&this.mediaReceiver&&this.mediaSender&&(await this.mediaReceiver.acceptConnection(),await this.mediaSender.sendConnected(),await this.mediaSender.sendConfigs());break;case"end-call":case"reject-call":case"miss-call":this.destroy();break}},this.connectionChangedHandler=e=>{let t=e.online;this.isOffline=!t,t?(this.setConnectionMessage(null),this.callStatus==="connected"&&(this.healthCallServerInterval||(this.healthCallServerInterval=setInterval(()=>{this.healthCall()},1e4)))):(this.setConnectionMessage("Your network connection is unstable"),this.healthCallInterval&&(clearInterval(this.healthCallInterval),this.healthCallInterval=null),this.healthCallServerInterval&&(clearInterval(this.healthCallServerInterval),this.healthCallServerInterval=null))},this.messageUpdatedHandler=e=>{if(this.callStatus==="connected"&&e.cid===this.cid){let t=e.user?.id,s;t===this.callerInfo?.id?s=this.callerInfo:t===this.receiverInfo?.id&&(s=this.receiverInfo),s&&typeof this.onUpgradeCall=="function"&&this.onUpgradeCall(s)}},this._client.on("signal",this.signalHandler),this._client.on("connection.changed",this.connectionChangedHandler),this._client.on("message.updated",this.messageUpdatedHandler)}cleanupCall(){this.mediaSender&&(this.mediaSender?.stop(),this.mediaSender=null),this.mediaReceiver&&(this.mediaReceiver.stop(),this.mediaReceiver=null),this.callNode&&(this.callNode?.closeEndpoint(),this.callStatus==="connected"&&this.callNode?.closeConnection(),this.callNode=null),this.missCallTimeout&&(clearTimeout(this.missCallTimeout),this.missCallTimeout=null),this.healthCallInterval&&(clearInterval(this.healthCallInterval),this.healthCallInterval=null),this.healthCallServerInterval&&(clearInterval(this.healthCallServerInterval),this.healthCallServerInterval=null),this.healthCallTimeout&&(clearTimeout(this.healthCallTimeout),this.healthCallTimeout=null),this.healthCallWarningTimeout&&(clearTimeout(this.healthCallWarningTimeout),this.healthCallWarningTimeout=null),this.setConnectionMessage(null),this.cid="",this.callType="",this.metadata={},this.localStream&&(this.localStream.getTracks().forEach(e=>e.stop()),this.localStream=null),this.remoteStream&&(this.remoteStream.getTracks().forEach(e=>e.stop()),this.remoteStream=null),this.setCallStatus("ended")}destroy(){this.cleanupCall()}async getDevices(){return this.availableAudioDevices.length>0||this.availableVideoDevices.length>0?{audioDevices:this.availableAudioDevices,videoDevices:this.availableVideoDevices}:await this.getAvailableDevices()}getSelectedDevices(){let e=this.selectedAudioDeviceId?this.availableAudioDevices.find(s=>s.deviceId===this.selectedAudioDeviceId):void 0,t=this.selectedVideoDeviceId?this.availableVideoDevices.find(s=>s.deviceId===this.selectedVideoDeviceId):void 0;return{audioDevice:e,videoDevice:t}}getDefaultDevices(){return{audioDevice:this.availableAudioDevices[0],videoDevice:this.availableVideoDevices[0]}}async createCall(e,t){try{this.cid=t;let s=await this.getLocalEndpointAddr();await this._sendSignal({action:"create-call",cid:t,is_video:e==="video",metadata:{address:s}})}catch(s){throw console.error("Failed to create call:",s),s}}async acceptCall(){try{if(await this._sendSignal({action:"accept-call"}),this.mediaSender){let e=this.metadata?.address||"";await this.mediaSender.connect(e)}}catch(e){throw console.error("Failed to accept call:",e),e}}async endCall(){await this._sendSignal({action:"end-call"}),this.destroy()}async rejectCall(){await this._sendSignal({action:"reject-call"}),this.destroy()}async missCall(){await this._sendSignal({action:"miss-call"}),this.destroy()}async connectCall(){return await this._sendSignal({action:"connect-call"})}async healthCall(){return await this._sendSignal({action:"health-call"})}async addVideoTrackToLocalStream(){let e=await this.getMediaConstraints(),t=await navigator.mediaDevices.getUserMedia(e),s=t.getVideoTracks()[0];this.localStream?(this.localStream.addTrack(s),this.onLocalStream&&this.onLocalStream(this.localStream)):(this.localStream=t,this.onLocalStream&&this.onLocalStream(this.localStream))}async upgradeCall(){try{if(this.callType="video",await this.addVideoTrackToLocalStream(),await this._sendSignal({action:"upgrade-call"}),this.localStream){this.mediaSender?.initVideoEncoder(this.localStream?.getVideoTracks()[0]);let e=!!this.localStream?.getAudioTracks().some(s=>s.enabled),t=!!this.localStream?.getVideoTracks().some(s=>s.enabled);await this.mediaSender?.sendTransceiverState(e,t)}}catch(e){throw console.error("Failed to upgrade call:",e),e}}async requestUpgradeCall(e){if(e&&(this.callType="video",await this.addVideoTrackToLocalStream(),this.localStream)){this.mediaSender?.initVideoEncoder(this.localStream?.getVideoTracks()[0]);let t=!!this.localStream?.getAudioTracks().some(i=>i.enabled),s=!!this.localStream?.getVideoTracks().some(i=>i.enabled);await this.mediaSender?.sendTransceiverState(t,s)}}async startScreenShare(){if(!navigator.mediaDevices.getDisplayMedia)throw new Error("Screen sharing is not supported in this browser.");let e=await navigator.mediaDevices.getDisplayMedia({video:!0}),t=e.getVideoTracks()[0];this.localStream?(this.localStream.getVideoTracks().forEach(s=>s.stop()),this.localStream.removeTrack(this.localStream.getVideoTracks()[0]),this.localStream.addTrack(t)):this.localStream=e,t.onended=()=>{this.stopScreenShare()},this.onLocalStream&&(this.onLocalStream(this.localStream),this.mediaSender?.replaceVideoTrack(this.localStream.getVideoTracks()[0])),typeof this.onScreenShareChange=="function"&&this.onScreenShareChange(!0)}async stopScreenShare(){let e=await this.getMediaConstraints();try{let t=await navigator.mediaDevices.getUserMedia({video:e.video,audio:!1}),s=t.getVideoTracks()[0];this.localStream?(this.localStream.getVideoTracks().forEach(i=>{i.stop(),this.localStream?.removeTrack(i)}),this.localStream.addTrack(s)):this.localStream=t,this.onLocalStream&&(this.onLocalStream(this.localStream),this.mediaSender?.replaceVideoTrack(this.localStream.getVideoTracks()[0])),typeof this.onScreenShareChange=="function"&&this.onScreenShareChange(!1)}catch(t){console.error("Error stopping screen share and reverting to camera:",t)}}async toggleMic(e){if(this.localStream){this.localStream.getAudioTracks().forEach(i=>{i.enabled=e});let t=e,s=this.localStream.getVideoTracks().some(i=>i.enabled);await this.mediaSender?.sendTransceiverState(t,s)}}async toggleCamera(e){if(this.localStream){this.localStream.getVideoTracks().forEach(i=>{i.enabled=e});let t=this.localStream.getAudioTracks().some(i=>i.enabled),s=e;await this.mediaSender?.sendTransceiverState(t,s)}}async switchAudioDevice(e){try{if(!this.availableAudioDevices.find(r=>r.deviceId===e))return console.error("Audio device not found:",e),this.onError&&this.onError("Selected microphone not found"),!1;if(this.selectedAudioDeviceId=e,!this.localStream)return!1;let i=(await navigator.mediaDevices.getUserMedia({audio:{deviceId:{exact:e}},video:!1})).getAudioTracks()[0],a=this.localStream.getAudioTracks()[0];return a&&(this.localStream.removeTrack(a),a.stop()),this.localStream.addTrack(i),this.onLocalStream&&this.onLocalStream(this.localStream),!0}catch(t){return console.error("Error switching audio device:",t),this.onError&&this.onError("Failed to switch microphone"),!1}}async switchVideoDevice(e){try{if(!this.availableVideoDevices.find(r=>r.deviceId===e))return console.error("Video device not found:",e),this.onError&&this.onError("Selected camera not found"),!1;if(this.selectedVideoDeviceId=e,!this.localStream)return!1;let i=(await navigator.mediaDevices.getUserMedia({audio:!1,video:{deviceId:{exact:e}}})).getVideoTracks()[0],a=this.localStream.getVideoTracks()[0];return a&&(this.localStream.removeTrack(a),a.stop()),this.localStream.addTrack(i),this.onLocalStream&&this.onLocalStream(this.localStream),!0}catch(t){return console.error("Error switching video device:",t),this.onError&&this.onError("Failed to switch camera"),!1}}setupDeviceChangeListener(){navigator.mediaDevices.addEventListener("devicechange",async()=>{let{audioDevices:e,videoDevices:t}=await this.getAvailableDevices();this.onDeviceChange&&this.onDeviceChange(e,t)})}};pt();var Za=class{apiKey;baseURL;options;axiosInstance;disconnected;browser;node;logger;consecutiveFailures;userAgent;lastIdentifier;lastMethod;address;constructor(e,t,s){let i=s||{};this.apiKey=e,this.baseURL=s?.userBaseURL||t+"/uss/v1",this.browser=typeof i.browser<"u"?i.browser:typeof window<"u",this.node=!this.browser,this.options={withCredentials:!1,warmUp:!1,recoverStateOnReconnect:!0,...i},this.node&&!this.options.httpsAgent&&(this.options.httpsAgent=new yt.Agent({keepAlive:!0,keepAliveMsecs:3e3})),this.axiosInstance=rn.create(this.options),this.logger=Ms(i.logger)?i.logger:()=>null,this.consecutiveFailures=0,this.disconnected=!1}_logApiRequest(e,t,s,i){this.logger("info",`client: ${e} - Request - ${t}- ${JSON.stringify(s)} - ${JSON.stringify(i.params)}`,{tags:["api","api_request","client"],url:t,payload:s,config:i})}_logApiResponse(e,t,s){this.logger("info",`client:${e} - Response - url: ${t} > status ${s.status}`,{tags:["api","api_response","client"],url:t,response:s})}_logApiError(e,t,s,i){this.logger("error",`client:${e} - Error: ${JSON.stringify(s)} - url: ${t} - options: ${JSON.stringify(i)}`,{tags:["api","api_response","client"],url:t,error:s})}doAxiosRequest=async(e,t,s,i={})=>{let a=this._enrichAxiosOptions(i);try{let r;switch(this._logApiRequest(e,t,s,a),e){case"get":r=await this.axiosInstance.get(t,a);break;case"delete":r=await this.axiosInstance.delete(t,a);break;case"post":r=await this.axiosInstance.post(t,s,a);break;case"postForm":r=await this.axiosInstance.postForm(t,s,a);break;case"put":r=await this.axiosInstance.put(t,s,a);break;case"patch":r=await this.axiosInstance.patch(t,s,a);break;case"options":r=await this.axiosInstance.options(t,a);break;default:throw new Error("Invalid request type")}return this._logApiResponse(e,t,r),this.consecutiveFailures=0,this.handleResponse(r)}catch(r){if(r.client_request_id=a.headers?.["x-client-request-id"],this._logApiError(e,t,r,i),this.consecutiveFailures+=1,r.response)return r.response.data.code===mt.TOKEN_EXPIRED?(this.consecutiveFailures>1&&await on(js(this.consecutiveFailures)),await this.doAxiosRequest(e,t,s,a)):this.handleResponse(r.response);throw r}};get(e,t){return this.doAxiosRequest("get",e,null,{params:t})}put(e,t){return this.doAxiosRequest("put",e,t)}post(e,t,s){return this.doAxiosRequest("post",e,t,{params:s})}patch(e,t){return this.doAxiosRequest("patch",e,t)}delete(e,t){return this.doAxiosRequest("delete",e,null,{params:t})}errorFromResponse(e){let t;return t=new Mt(`ErmisChat error HTTP code: ${e.status}`),e.data&&e.data.code&&(t=new Error(`ErmisChat error code ${e.data.code}: ${e.data.message}`),t.code=e.data.code),t.response=e,t.status=e.status,t}handleResponse(e){let t=e.data;if(Hs(e))throw this.errorFromResponse(e);return t}getUserAgent(){return this.userAgent||`ermis-chat-sdk-javascript-client-${this.node?"node":"browser"}-1.0.3`}setUserAgent(e){this.userAgent=e}_enrichAxiosOptions(e={params:{},headers:{},config:{}}){let t=null;e.headers?.["x-client-request-id"]||(e.headers={...e.headers,"x-client-request-id":Ue()});let{params:s,headers:i,...a}=this.options?.axiosRequestConfig||{};return{params:{...e.params,...s||{}},headers:{"X-Stream-Client":this.getUserAgent(),...e.headers,...i||{}},...t?{signal:t}:{},...e.config,...a||{}}}async sendOtpToPhone(e,t){this.lastIdentifier=e,this.lastMethod=t;let s={apikey:this.apiKey,identifier:e,language:"Vi",method:t,otp_type:"Login"};return this.post(this.baseURL+"/auth/get_otp_new",s)}async sendOtpToEmail(e){this.lastIdentifier=e,this.lastMethod="Email";let t={apikey:this.apiKey,identifier:e,language:"Vi",method:"Email",otp_type:"Login"};return this.post(this.baseURL+"/auth/get_otp_new",t)}async verifyOtp(e){let t={identifier:this.lastIdentifier,method:this.lastMethod,apikey:this.apiKey,otp:e};return this.post(this.baseURL+"/auth/otp_login",t)}async loginWithGoogle(e){let t={token:e,apikey:this.apiKey};return this.post(this.baseURL+"/auth/google_login",t)}async getWalletChallenge(e){this.address=e;let t=await this.post(this.baseURL+"/auth/get_challenge",{address:e,apikey:this.apiKey});return JSON.parse(t.challenge)}createNonce(e){let t="",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=s.length;for(let a=0;a<e;a++)t+=s.charAt(Math.floor(Math.random()*i));return t}async verifyWalletSignature(e){let t={address:this.address,signature:e,nonce:this.createNonce(20),apikey:this.apiKey};return this.post(this.baseURL+"/auth/verify_signature",t)}};var Jg={1e4:"10 seconds",3e4:"30 seconds",6e4:"1 minute",3e5:"5 minutes",9e5:"15 minutes",36e5:"60 minutes"};function er(n,e){return e[n]??n}function Kp(n,e){if(!n||typeof n!="string")return n??"";let t=n.trim();if(!t)return"";let s=t.split(" "),i=s[0],a=s[1]??"",r=a?er(a,e):"User";switch(i){case"1":{let o=s.slice(2).join(" ");return`${r} changed the channel name to ${o}.`}case"2":return`${r} changed the channel avatar.`;case"3":return`${r} changed the channel description.`;case"4":return`${r} was removed from the channel.`;case"5":return`${r} was banned.`;case"6":return`${r} was unbanned.`;case"7":return`${r} was promoted to moderator.`;case"8":return`${r} was demoted from moderator.`;case"9":return`${r}'s permissions were updated.`;case"10":return`${r} joined the channel.`;case"11":return`${r} declined the channel invitation.`;case"12":return`${r} left the channel.`;case"13":return`${r} cleared the chat history.`;case"14":{let l=(s[2]??"")==="true"?"public":"private";return`${r} changed the channel to ${l}.`}case"15":{let o=s[2]??"0";if(o==="0")return`${r} disabled cooldown.`;let l=Jg[o]??`${o}ms`;return`${r} enabled cooldown for ${l}.`}case"16":return`${r} updated the banned words.`;case"17":return`${r} was added to the channel.`;case"18":{let o=s[1]??"",l=s[2]??"",c=o?er(o,e):"User",p=l?er(l,e):"User";return`Admin ${c} left and assigned ${p} as the new admin.`}case"19":return`${r} pinned a message.`;case"20":return`${r} unpinned a message.`;default:return t}}var ze={AUDIO:"audio",VIDEO:"video"};function Xg(n){if(!n)return"";let e=parseInt(n,10);if(isNaN(e)||e<=0)return"";let t=Math.floor(e/1e3),s=Math.floor(t/60),i=t%60;return`${s} min, ${i} sec`}function Jp(n,e){if(!n||typeof n!="string")return null;let t=n.trim();if(!t)return null;let s=t.split(" "),i=parseInt(s[0],10),a=s[1]??"",r=e===a,o="",l="",c="",p="";(i===3||i===6)&&(o=s[2]??"",l=s[3]==="0"?"":s[3]??"");let u;switch(i){case 1:u=r?"Calling...":"Incoming audio call...",c=ze.AUDIO,p="#54D62C";break;case 2:u=r?"Outgoing audio call":"You missed audio call",c=ze.AUDIO,p="#FF4842";break;case 3:l?(u=r?"Outgoing audio call":"Incoming audio call",p="#54D62C"):(o===e?u="You cancel audio call":u="You missed audio call",p="#FF4842"),c=ze.AUDIO;break;case 4:u=r?"Calling...":"Incoming video call...",c=ze.VIDEO,p="#54D62C";break;case 5:u=r?"Outgoing video call":"You missed video call",c=ze.VIDEO,p="#FF4842";break;case 6:l?(u=r?"Outgoing video call":"Incoming video call",p="#54D62C"):(o===e?u="You cancel video call":u="You missed video call",p="#FF4842"),c=ze.VIDEO;break;case 7:u=r?"Recipient rejected audio call":"You rejected audio call",c=ze.AUDIO,p="#FF4842";break;case 8:u=r?"Recipient rejected video call":"You rejected video call",c=ze.VIDEO,p="#FF4842";break;case 9:u=r?"Recipient was busy":"You missed audio call",c=ze.AUDIO,p="#FF4842";break;case 10:u=r?"Recipient was busy":"You missed video call",c=ze.VIDEO,p="#FF4842";break;default:u=t,c="",p=""}return{text:u,duration:Xg(l),callType:c,color:p}}return bn(Qg);})();
22
22
  //! NOTE: check lai o day
23
23
  /*! Bundled license information:
24
24