@multiplechain/bitcoin 0.4.5 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,19 +1,12 @@
1
- "use strict";var L7=Object.create;var Lp=Object.defineProperty;var D7=Object.getOwnPropertyDescriptor;var U7=Object.getOwnPropertyNames;var q7=Object.getPrototypeOf,F7=Object.prototype.hasOwnProperty;var W=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Oa=(e,t)=>{for(var r in t)Lp(e,r,{get:t[r],enumerable:!0})},q_=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of U7(t))!F7.call(e,n)&&n!==r&&Lp(e,n,{get:()=>t[n],enumerable:!(i=D7(t,n))||i.enumerable});return e};var Yr=(e,t,r)=>(r=e!=null?L7(q7(e)):{},q_(t||!e||!e.__esModule?Lp(r,"default",{value:e,enumerable:!0}):r,e)),H7=e=>q_(Lp({},"__esModule",{value:!0}),e);var Q_=W((fH,J_)=>{var Z_=require("stream").Stream,w9=require("util");J_.exports=Ln;function Ln(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}w9.inherits(Ln,Z_);Ln.create=function(e,t){var r=new this;t=t||{};for(var i in t)r[i]=t[i];r.source=e;var n=e.emit;return e.emit=function(){return r._handleEmit(arguments),n.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(Ln.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Ln.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Ln.prototype.resume=function(){this._released||this.release(),this.source.resume()};Ln.prototype.pause=function(){this.source.pause()};Ln.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};Ln.prototype.pipe=function(){var e=Z_.prototype.pipe.apply(this,arguments);return this.resume(),e};Ln.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};Ln.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var iy=W((lH,ry)=>{var S9=require("util"),ty=require("stream").Stream,ey=Q_();ry.exports=yr;function yr(){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}S9.inherits(yr,ty);yr.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};yr.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};yr.prototype.append=function(e){var t=yr.isStreamLike(e);if(t){if(!(e instanceof ey)){var r=ey.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};yr.prototype.pipe=function(e,t){return ty.prototype.pipe.call(this,e,t),this.resume(),e};yr.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}};yr.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var i=yr.isStreamLike(r);i&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};yr.prototype._pipeNext=function(e){this._currentStream=e;var t=yr.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};yr.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};yr.prototype.write=function(e){this.emit("data",e)};yr.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};yr.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")};yr.prototype.end=function(){this._reset(),this.emit("end")};yr.prototype.destroy=function(){this._reset(),this.emit("close")};yr.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};yr.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};yr.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};yr.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var ny=W((pH,E9)=>{E9.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 ay=W((hH,sy)=>{sy.exports=ny()});var uy=W(Oi=>{"use strict";var Hp=ay(),T9=require("path").extname,oy=/^\s*([^;\s]*)(?:;|\s|$)/,I9=/^text\//i;Oi.charset=cy;Oi.charsets={lookup:cy};Oi.contentType=R9;Oi.extension=A9;Oi.extensions=Object.create(null);Oi.lookup=O9;Oi.types=Object.create(null);k9(Oi.extensions,Oi.types);function cy(e){if(!e||typeof e!="string")return!1;var t=oy.exec(e),r=t&&Hp[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&I9.test(t[1])?"UTF-8":!1}function R9(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Oi.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Oi.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}function A9(e){if(!e||typeof e!="string")return!1;var t=oy.exec(e),r=t&&Oi.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}function O9(e){if(!e||typeof e!="string")return!1;var t=T9("x."+e).toLowerCase().substr(1);return t&&Oi.types[t]||!1}function k9(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Hp).forEach(function(n){var a=Hp[n],u=a.extensions;if(!(!u||!u.length)){e[n]=u;for(var h=0;h<u.length;h++){var b=u[h];if(t[b]){var w=r.indexOf(Hp[t[b]].source),T=r.indexOf(a.source);if(t[b]!=="application/octet-stream"&&(w>T||w===T&&t[b].substr(0,12)==="application/"))continue}t[b]=n}}})}});var ly=W((mH,fy)=>{fy.exports=N9;function N9(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}});var fm=W((vH,hy)=>{var py=ly();hy.exports=P9;function P9(e){var t=!1;return py(function(){t=!0}),function(i,n){t?e(i,n):py(function(){e(i,n)})}}});var lm=W((gH,dy)=>{dy.exports=B9;function B9(e){Object.keys(e.jobs).forEach(M9.bind(e)),e.jobs={}}function M9(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}});var pm=W((bH,vy)=>{var my=fm(),C9=lm();vy.exports=L9;function L9(e,t,r,i){var n=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[n]=D9(t,n,e[n],function(a,u){n in r.jobs&&(delete r.jobs[n],a?C9(r):r.results[n]=u,i(a,r.results))})}function D9(e,t,r,i){var n;return e.length==2?n=e(r,my(i)):n=e(r,t,my(i)),n}});var hm=W((xH,gy)=>{gy.exports=U9;function U9(e,t){var r=!Array.isArray(e),i={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&i.keyedList.sort(r?t:function(n,a){return t(e[n],e[a])}),i}});var dm=W((_H,by)=>{var q9=lm(),F9=fm();by.exports=H9;function H9(e){Object.keys(this.jobs).length&&(this.index=this.size,q9(this),F9(e)(null,this.results))}});var _y=W((yH,xy)=>{var z9=pm(),j9=hm(),V9=dm();xy.exports=K9;function K9(e,t,r){for(var i=j9(e);i.index<(i.keyedList||e).length;)z9(e,t,i,function(n,a){if(n){r(n,a);return}if(Object.keys(i.jobs).length===0){r(null,i.results);return}}),i.index++;return V9.bind(i,r)}});var mm=W((wH,zp)=>{var yy=pm(),W9=hm(),G9=dm();zp.exports=$9;zp.exports.ascending=wy;zp.exports.descending=X9;function $9(e,t,r,i){var n=W9(e,r);return yy(e,t,n,function a(u,h){if(u){i(u,h);return}if(n.index++,n.index<(n.keyedList||e).length){yy(e,t,n,a);return}i(null,n.results)}),G9.bind(n,i)}function wy(e,t){return e<t?-1:e>t?1:0}function X9(e,t){return-1*wy(e,t)}});var Ey=W((SH,Sy)=>{var Y9=mm();Sy.exports=Z9;function Z9(e,t,r){return Y9(e,t,null,r)}});var Iy=W((EH,Ty)=>{Ty.exports={parallel:_y(),serial:Ey(),serialOrdered:mm()}});var Ay=W((TH,Ry)=>{Ry.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Ny=W((IH,ky)=>{var xm=iy(),Oy=require("util"),vm=require("path"),J9=require("http"),Q9=require("https"),ek=require("url").parse,tk=require("fs"),rk=require("stream").Stream,gm=uy(),ik=Iy(),bm=Ay();ky.exports=yt;Oy.inherits(yt,xm);function yt(e){if(!(this instanceof yt))return new yt(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],xm.call(this),e=e||{};for(var t in e)this[t]=e[t]}yt.LINE_BREAK=`\r
2
- `;yt.DEFAULT_CONTENT_TYPE="application/octet-stream";yt.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var i=xm.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),Oy.isArray(t)){this._error(new Error("Arrays are not supported."));return}var n=this._multiPartHeader(e,t,r),a=this._multiPartFooter();i(n),i(t),i(a),this._trackLength(n,t,r)};yt.prototype._trackLength=function(e,t,r){var i=0;r.knownLength!=null?i+=+r.knownLength:Buffer.isBuffer(t)?i=t.length:typeof t=="string"&&(i=Buffer.byteLength(t)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(e)+yt.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof rk))&&(r.knownLength||this._valuesToMeasure.push(t))};yt.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):tk.stat(e.path,function(r,i){var n;if(r){t(r);return}n=i.size-(e.start?e.start:0),t(null,n)}):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",function(r){e.pause(),t(null,+r.headers["content-length"])}),e.resume()):t("Unknown stream")};yt.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var i=this._getContentDisposition(t,r),n=this._getContentType(t,r),a="",u={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(n||[])};typeof r.header=="object"&&bm(u,r.header);var h;for(var b in u)u.hasOwnProperty(b)&&(h=u[b],h!=null&&(Array.isArray(h)||(h=[h]),h.length&&(a+=b+": "+h.join("; ")+yt.LINE_BREAK)));return"--"+this.getBoundary()+yt.LINE_BREAK+a+yt.LINE_BREAK};yt.prototype._getContentDisposition=function(e,t){var r,i;return typeof t.filepath=="string"?r=vm.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?r=vm.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(r=vm.basename(e.client._httpMessage.path||"")),r&&(i='filename="'+r+'"'),i};yt.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e.name&&(r=gm.lookup(e.name)),!r&&e.path&&(r=gm.lookup(e.path)),!r&&e.readable&&e.hasOwnProperty("httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=gm.lookup(t.filepath||t.filename)),!r&&typeof e=="object"&&(r=yt.DEFAULT_CONTENT_TYPE),r};yt.prototype._multiPartFooter=function(){return function(e){var t=yt.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};yt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+yt.LINE_BREAK};yt.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(r[t.toLowerCase()]=e[t]);return r};yt.prototype.setBoundary=function(e){this._boundary=e};yt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};yt.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,i=this._streams.length;r<i;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(yt.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};yt.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(Math.random()*10).toString(16);this._boundary=e};yt.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};yt.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};yt.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}ik.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,i){if(r){e(r);return}i.forEach(function(n){t+=n}),e(null,t)})};yt.prototype.submit=function(e,t){var r,i,n={method:"post"};return typeof e=="string"?(e=ek(e),i=bm({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},n)):(i=bm(e,n),i.port||(i.port=i.protocol=="https:"?443:80)),i.headers=this.getHeaders(e.headers),i.protocol=="https:"?r=Q9.request(i):r=J9.request(i),this.getLength(function(a,u){if(a&&a!=="Unknown stream"){this._error(a);return}if(u&&r.setHeader("Content-Length",u),this.pipe(r),t){var h,b=function(w,T){return r.removeListener("error",b),r.removeListener("response",h),t.call(this,w,T)};h=b.bind(this,null),r.on("error",b),r.on("response",h)}}.bind(this)),r};yt.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};yt.prototype.toString=function(){return"[object FormData]"}});var Gy=W(Wy=>{"use strict";var xk=require("url").parse,_k={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},yk=String.prototype.endsWith||function(e){return e.length<=this.length&&this.indexOf(e,this.length-e.length)!==-1};function wk(e){var t=typeof e=="string"?xk(e):e||{},r=t.protocol,i=t.host,n=t.port;if(typeof i!="string"||!i||typeof r!="string"||(r=r.split(":",1)[0],i=i.replace(/:\d*$/,""),n=parseInt(n)||_k[r]||0,!Sk(i,n)))return"";var a=qc("npm_config_"+r+"_proxy")||qc(r+"_proxy")||qc("npm_config_proxy")||qc("all_proxy");return a&&a.indexOf("://")===-1&&(a=r+"://"+a),a}function Sk(e,t){var r=(qc("npm_config_no_proxy")||qc("no_proxy")).toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(i){if(!i)return!0;var n=i.match(/^(.+):(\d+)$/),a=n?n[1]:i,u=n?parseInt(n[2]):0;return u&&u!==t?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!yk.call(e,a)):e!==a}):!0}function qc(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}Wy.getProxyForUrl=wk});var Xy=W((Rz,$y)=>{var hf;$y.exports=function(){if(!hf){try{hf=require("debug")("follow-redirects")}catch{}typeof hf!="function"&&(hf=function(){})}hf.apply(null,arguments)}});var e2=W((Az,Fm)=>{var vf=require("url"),df=vf.URL,Ek=require("http"),Tk=require("https"),Bm=require("stream").Writable,Mm=require("assert"),Yy=Xy(),Cm=!1;try{Mm(new df)}catch(e){Cm=e.code==="ERR_INVALID_URL"}var Ik=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Lm=["abort","aborted","connect","error","socket","timeout"],Dm=Object.create(null);Lm.forEach(function(e){Dm[e]=function(t,r,i){this._redirectable.emit(e,t,r,i)}});var km=gf("ERR_INVALID_URL","Invalid URL",TypeError),Nm=gf("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Rk=gf("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Nm),Ak=gf("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Ok=gf("ERR_STREAM_WRITE_AFTER_END","write after end"),kk=Bm.prototype.destroy||Jy;function ki(e,t){Bm.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(i){try{r._processResponse(i)}catch(n){r.emit("error",n instanceof Nm?n:new Nm({cause:n}))}},this._performRequest()}ki.prototype=Object.create(Bm.prototype);ki.prototype.abort=function(){qm(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};ki.prototype.destroy=function(e){return qm(this._currentRequest,e),kk.call(this,e),this};ki.prototype.write=function(e,t,r){if(this._ending)throw new Ok;if(!Ro(e)&&!Bk(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(mf(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new Ak),this.abort())};ki.prototype.end=function(e,t,r){if(mf(e)?(r=e,e=t=null):mf(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var i=this,n=this._currentRequest;this.write(e,t,function(){i._ended=!0,n.end(null,null,r)}),this._ending=!0}};ki.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};ki.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};ki.prototype.setTimeout=function(e,t){var r=this;function i(u){u.setTimeout(e),u.removeListener("timeout",u.destroy),u.addListener("timeout",u.destroy)}function n(u){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),a()},e),i(u)}function a(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",a),r.removeListener("error",a),r.removeListener("response",a),r.removeListener("close",a),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",n)}return t&&this.on("timeout",t),this.socket?n(this.socket):this._currentRequest.once("socket",n),this.on("socket",i),this.on("abort",a),this.on("error",a),this.on("response",a),this.on("close",a),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){ki.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(ki.prototype,e,{get:function(){return this._currentRequest[e]}})});ki.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};ki.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var n of Lm)i.on(n,Dm[n]);if(this._currentUrl=/^\//.test(this._options.path)?vf.format(this._options):this._options.path,this._isRedirect){var a=0,u=this,h=this._requestBodyBuffers;(function b(w){if(i===u._currentRequest)if(w)u.emit("error",w);else if(a<h.length){var T=h[a++];i.finished||i.write(T.data,T.encoding,b)}else u._ended&&i.end()})()}};ki.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(qm(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Rk;var i,n=this._options.beforeRedirect;n&&(i=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var a=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Om(/^content-/i,this._options.headers));var u=Om(/^host$/i,this._options.headers),h=Um(this._currentUrl),b=u||h.host,w=/^\w+:/.test(r)?this._currentUrl:vf.format(Object.assign(h,{host:b})),T=Nk(r,w);if(Yy("redirecting to",T.href),this._isRedirect=!0,Pm(T,this._options),(T.protocol!==h.protocol&&T.protocol!=="https:"||T.host!==b&&!Pk(T.host,b))&&Om(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),mf(n)){var I={headers:e.headers,statusCode:t},B={url:w,method:a,headers:i};n(this._options,I,B),this._sanitizeOptions(this._options)}this._performRequest()};function Zy(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(i){var n=i+":",a=r[n]=e[i],u=t[i]=Object.create(a);function h(w,T,I){return Mk(w)?w=Pm(w):Ro(w)?w=Pm(Um(w)):(I=T,T=Qy(w),w={protocol:n}),mf(T)&&(I=T,T=null),T=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},w,T),T.nativeProtocols=r,!Ro(T.host)&&!Ro(T.hostname)&&(T.hostname="::1"),Mm.equal(T.protocol,n,"protocol mismatch"),Yy("options",T),new ki(T,I)}function b(w,T,I){var B=u.request(w,T,I);return B.end(),B}Object.defineProperties(u,{request:{value:h,configurable:!0,enumerable:!0,writable:!0},get:{value:b,configurable:!0,enumerable:!0,writable:!0}})}),t}function Jy(){}function Um(e){var t;if(Cm)t=new df(e);else if(t=Qy(vf.parse(e)),!Ro(t.protocol))throw new km({input:e});return t}function Nk(e,t){return Cm?new df(e,t):Um(vf.resolve(t,e))}function Qy(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new km({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new km({input:e.href||e});return e}function Pm(e,t){var r=t||{};for(var i of Ik)r[i]=e[i];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function Om(e,t){var r;for(var i in t)e.test(i)&&(r=t[i],delete t[i]);return r===null||typeof r>"u"?void 0:String(r).trim()}function gf(e,t,r){function i(n){Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return i.prototype=new(r||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),i}function qm(e,t){for(var r of Lm)e.removeListener(r,Dm[r]);e.on("error",Jy),e.destroy(t)}function Pk(e,t){Mm(Ro(e)&&Ro(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function Ro(e){return typeof e=="string"||e instanceof String}function mf(e){return typeof e=="function"}function Bk(e){return typeof e=="object"&&"length"in e}function Mk(e){return df&&e instanceof df}Fm.exports=Zy({http:Ek,https:Tk});Fm.exports.wrap=Zy});var _w=W((kY,Nv)=>{"use strict";var NP=Object.prototype.hasOwnProperty,yi="~";function Xf(){}Object.create&&(Xf.prototype=Object.create(null),new Xf().__proto__||(yi=!1));function PP(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function xw(e,t,r,i,n){if(typeof r!="function")throw new TypeError("The listener must be a function");var a=new PP(r,i||e,n),u=yi?yi+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function Rh(e,t){--e._eventsCount===0?e._events=new Xf:delete e._events[t]}function pi(){this._events=new Xf,this._eventsCount=0}pi.prototype.eventNames=function(){var t=[],r,i;if(this._eventsCount===0)return t;for(i in r=this._events)NP.call(r,i)&&t.push(yi?i.slice(1):i);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};pi.prototype.listeners=function(t){var r=yi?yi+t:t,i=this._events[r];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,a=i.length,u=new Array(a);n<a;n++)u[n]=i[n].fn;return u};pi.prototype.listenerCount=function(t){var r=yi?yi+t:t,i=this._events[r];return i?i.fn?1:i.length:0};pi.prototype.emit=function(t,r,i,n,a,u){var h=yi?yi+t:t;if(!this._events[h])return!1;var b=this._events[h],w=arguments.length,T,I;if(b.fn){switch(b.once&&this.removeListener(t,b.fn,void 0,!0),w){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,r),!0;case 3:return b.fn.call(b.context,r,i),!0;case 4:return b.fn.call(b.context,r,i,n),!0;case 5:return b.fn.call(b.context,r,i,n,a),!0;case 6:return b.fn.call(b.context,r,i,n,a,u),!0}for(I=1,T=new Array(w-1);I<w;I++)T[I-1]=arguments[I];b.fn.apply(b.context,T)}else{var B=b.length,M;for(I=0;I<B;I++)switch(b[I].once&&this.removeListener(t,b[I].fn,void 0,!0),w){case 1:b[I].fn.call(b[I].context);break;case 2:b[I].fn.call(b[I].context,r);break;case 3:b[I].fn.call(b[I].context,r,i);break;case 4:b[I].fn.call(b[I].context,r,i,n);break;default:if(!T)for(M=1,T=new Array(w-1);M<w;M++)T[M-1]=arguments[M];b[I].fn.apply(b[I].context,T)}}return!0};pi.prototype.on=function(t,r,i){return xw(this,t,r,i,!1)};pi.prototype.once=function(t,r,i){return xw(this,t,r,i,!0)};pi.prototype.removeListener=function(t,r,i,n){var a=yi?yi+t:t;if(!this._events[a])return this;if(!r)return Rh(this,a),this;var u=this._events[a];if(u.fn)u.fn===r&&(!n||u.once)&&(!i||u.context===i)&&Rh(this,a);else{for(var h=0,b=[],w=u.length;h<w;h++)(u[h].fn!==r||n&&!u[h].once||i&&u[h].context!==i)&&b.push(u[h]);b.length?this._events[a]=b.length===1?b[0]:b:Rh(this,a)}return this};pi.prototype.removeAllListeners=function(t){var r;return t?(r=yi?yi+t:t,this._events[r]&&Rh(this,r)):(this._events=new Xf,this._eventsCount=0),this};pi.prototype.off=pi.prototype.removeListener;pi.prototype.addListener=pi.prototype.on;pi.prefixed=yi;pi.EventEmitter=pi;typeof Nv<"u"&&(Nv.exports=pi)});var Aw=W((FJ,Rw)=>{"use strict";var{Duplex:UP}=require("stream");function Tw(e){e.emit("close")}function qP(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Iw(e){this.removeListener("error",Iw),this.destroy(),this.listenerCount("error")===0&&this.emit("error",e)}function FP(e,t){let r=!0,i=new UP({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",function(a,u){let h=!u&&i._readableState.objectMode?a.toString():a;i.push(h)||e.pause()}),e.once("error",function(a){i.destroyed||(r=!1,i.destroy(a))}),e.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(n,a){if(e.readyState===e.CLOSED){a(n),process.nextTick(Tw,i);return}let u=!1;e.once("error",function(b){u=!0,a(b)}),e.once("close",function(){u||a(n),process.nextTick(Tw,i)}),r&&e.terminate()},i._final=function(n){if(e.readyState===e.CONNECTING){e.once("open",function(){i._final(n)});return}e._socket!==null&&(e._socket._writableState.finished?(n(),i._readableState.endEmitted&&i.destroy()):(e._socket.once("finish",function(){n()}),e.close()))},i._read=function(){e.isPaused&&e.resume()},i._write=function(n,a,u){if(e.readyState===e.CONNECTING){e.once("open",function(){i._write(n,a,u)});return}e.send(n,u)},i.on("end",qP),i.on("error",Iw),i}Rw.exports=FP});var za=W((HJ,Ow)=>{"use strict";Ow.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Yf=W((zJ,kh)=>{"use strict";var{EMPTY_BUFFER:HP}=za(),Cv=Buffer[Symbol.species];function zP(e,t){if(e.length===0)return HP;if(e.length===1)return e[0];let r=Buffer.allocUnsafe(t),i=0;for(let n=0;n<e.length;n++){let a=e[n];r.set(a,i),i+=a.length}return i<t?new Cv(r.buffer,r.byteOffset,i):r}function kw(e,t,r,i,n){for(let a=0;a<n;a++)r[i+a]=e[a]^t[a&3]}function Nw(e,t){for(let r=0;r<e.length;r++)e[r]^=t[r&3]}function jP(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}function Lv(e){if(Lv.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new Cv(e):ArrayBuffer.isView(e)?t=new Cv(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),Lv.readOnly=!1),t}kh.exports={concat:zP,mask:kw,toArrayBuffer:jP,toBuffer:Lv,unmask:Nw};if(!process.env.WS_NO_BUFFER_UTIL)try{let e=require("bufferutil");kh.exports.mask=function(t,r,i,n,a){a<48?kw(t,r,i,n,a):e.mask(t,r,i,n,a)},kh.exports.unmask=function(t,r){t.length<32?Nw(t,r):e.unmask(t,r)}}catch{}});var Mw=W((jJ,Bw)=>{"use strict";var Pw=Symbol("kDone"),Dv=Symbol("kRun"),Uv=class{constructor(t){this[Pw]=()=>{this.pending--,this[Dv]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[Dv]()}[Dv](){if(this.pending!==this.concurrency&&this.jobs.length){let t=this.jobs.shift();this.pending++,t(this[Pw])}}};Bw.exports=Uv});var Qf=W((VJ,Uw)=>{"use strict";var Zf=require("zlib"),Cw=Yf(),VP=Mw(),{kStatusCode:Lw}=za(),KP=Buffer[Symbol.species],WP=Buffer.from([0,0,255,255]),Bh=Symbol("permessage-deflate"),ia=Symbol("total-length"),Jf=Symbol("callback"),ja=Symbol("buffers"),Ph=Symbol("error"),Nh,qv=class{constructor(t,r,i){if(this._maxPayload=i|0,this._options=t||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!r,this._deflate=null,this._inflate=null,this.params=null,!Nh){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Nh=new VP(n)}}static get extensionName(){return"permessage-deflate"}offer(){let t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let t=this._deflate[Jf];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){let r=this._options,i=t.find(n=>!(r.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(r.serverMaxWindowBits===!1||typeof r.serverMaxWindowBits=="number"&&r.serverMaxWindowBits>n.server_max_window_bits)||typeof r.clientMaxWindowBits=="number"&&!n.client_max_window_bits));if(!i)throw new Error("None of the extension offers can be accepted");return r.serverNoContextTakeover&&(i.server_no_context_takeover=!0),r.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof r.serverMaxWindowBits=="number"&&(i.server_max_window_bits=r.serverMaxWindowBits),typeof r.clientMaxWindowBits=="number"?i.client_max_window_bits=r.clientMaxWindowBits:(i.client_max_window_bits===!0||r.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(t){let r=t[0];if(this._options.clientNoContextTakeover===!1&&r.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!r.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(r.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&r.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return r}normalizeParams(t){return t.forEach(r=>{Object.keys(r).forEach(i=>{let n=r[i];if(n.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(n=n[0],i==="client_max_window_bits"){if(n!==!0){let a=+n;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=a}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else if(i==="server_max_window_bits"){let a=+n;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=a}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else throw new Error(`Unknown parameter "${i}"`);r[i]=n})}),t}decompress(t,r,i){Nh.add(n=>{this._decompress(t,r,(a,u)=>{n(),i(a,u)})})}compress(t,r,i){Nh.add(n=>{this._compress(t,r,(a,u)=>{n(),i(a,u)})})}_decompress(t,r,i){let n=this._isServer?"client":"server";if(!this._inflate){let a=`${n}_max_window_bits`,u=typeof this.params[a]!="number"?Zf.Z_DEFAULT_WINDOWBITS:this.params[a];this._inflate=Zf.createInflateRaw({...this._options.zlibInflateOptions,windowBits:u}),this._inflate[Bh]=this,this._inflate[ia]=0,this._inflate[ja]=[],this._inflate.on("error",$P),this._inflate.on("data",Dw)}this._inflate[Jf]=i,this._inflate.write(t),r&&this._inflate.write(WP),this._inflate.flush(()=>{let a=this._inflate[Ph];if(a){this._inflate.close(),this._inflate=null,i(a);return}let u=Cw.concat(this._inflate[ja],this._inflate[ia]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[ia]=0,this._inflate[ja]=[],r&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),i(null,u)})}_compress(t,r,i){let n=this._isServer?"server":"client";if(!this._deflate){let a=`${n}_max_window_bits`,u=typeof this.params[a]!="number"?Zf.Z_DEFAULT_WINDOWBITS:this.params[a];this._deflate=Zf.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:u}),this._deflate[ia]=0,this._deflate[ja]=[],this._deflate.on("data",GP)}this._deflate[Jf]=i,this._deflate.write(t),this._deflate.flush(Zf.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let a=Cw.concat(this._deflate[ja],this._deflate[ia]);r&&(a=new KP(a.buffer,a.byteOffset,a.length-4)),this._deflate[Jf]=null,this._deflate[ia]=0,this._deflate[ja]=[],r&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),i(null,a)})}};Uw.exports=qv;function GP(e){this[ja].push(e),this[ia]+=e.length}function Dw(e){if(this[ia]+=e.length,this[Bh]._maxPayload<1||this[ia]<=this[Bh]._maxPayload){this[ja].push(e);return}this[Ph]=new RangeError("Max payload size exceeded"),this[Ph].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Ph][Lw]=1009,this.removeListener("data",Dw),this.reset()}function $P(e){this[Bh]._inflate=null,e[Lw]=1007,this[Jf](e)}});var el=W((KJ,Mh)=>{"use strict";var{isUtf8:qw}=require("buffer"),XP=[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 YP(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}function Fv(e){let t=e.length,r=0;for(;r<t;)if(!(e[r]&128))r++;else if((e[r]&224)===192){if(r+1===t||(e[r+1]&192)!==128||(e[r]&254)===192)return!1;r+=2}else if((e[r]&240)===224){if(r+2>=t||(e[r+1]&192)!==128||(e[r+2]&192)!==128||e[r]===224&&(e[r+1]&224)===128||e[r]===237&&(e[r+1]&224)===160)return!1;r+=3}else if((e[r]&248)===240){if(r+3>=t||(e[r+1]&192)!==128||(e[r+2]&192)!==128||(e[r+3]&192)!==128||e[r]===240&&(e[r+1]&240)===128||e[r]===244&&e[r+1]>143||e[r]>244)return!1;r+=4}else return!1;return!0}Mh.exports={isValidStatusCode:YP,isValidUTF8:Fv,tokenChars:XP};if(qw)Mh.exports.isValidUTF8=function(e){return e.length<24?Fv(e):qw(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=require("utf-8-validate");Mh.exports.isValidUTF8=function(t){return t.length<32?Fv(t):e(t)}}catch{}});var Kv=W((WJ,Ww)=>{"use strict";var{Writable:ZP}=require("stream"),Fw=Qf(),{BINARY_TYPES:JP,EMPTY_BUFFER:Hw,kStatusCode:QP,kWebSocket:eB}=za(),{concat:Hv,toArrayBuffer:tB,unmask:rB}=Yf(),{isValidStatusCode:iB,isValidUTF8:zw}=el(),Ch=Buffer[Symbol.species],yn=0,jw=1,Vw=2,Kw=3,zv=4,jv=5,Lh=6,Vv=class extends ZP{constructor(t={}){super(),this._allowSynchronousEvents=t.allowSynchronousEvents!==void 0?t.allowSynchronousEvents:!0,this._binaryType=t.binaryType||JP[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=t.maxPayload|0,this._skipUTF8Validation=!!t.skipUTF8Validation,this[eB]=void 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._errored=!1,this._loop=!1,this._state=yn}_write(t,r,i){if(this._opcode===8&&this._state==yn)return i();this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(i)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t<this._buffers[0].length){let i=this._buffers[0];return this._buffers[0]=new Ch(i.buffer,i.byteOffset+t,i.length-t),new Ch(i.buffer,i.byteOffset,t)}let r=Buffer.allocUnsafe(t);do{let i=this._buffers[0],n=r.length-t;t>=i.length?r.set(this._buffers.shift(),n):(r.set(new Uint8Array(i.buffer,i.byteOffset,t),n),this._buffers[0]=new Ch(i.buffer,i.byteOffset+t,i.length-t)),t-=i.length}while(t>0);return r}startLoop(t){this._loop=!0;do switch(this._state){case yn:this.getInfo(t);break;case jw:this.getPayloadLength16(t);break;case Vw:this.getPayloadLength64(t);break;case Kw:this.getMask();break;case zv:this.getData(t);break;case jv:case Lh:this._loop=!1;return}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2){this._loop=!1;return}let r=this.consume(2);if(r[0]&48){let n=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");t(n);return}let i=(r[0]&64)===64;if(i&&!this._extensions[Fw.extensionName]){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(n);return}if(this._fin=(r[0]&128)===128,this._opcode=r[0]&15,this._payloadLength=r[1]&127,this._opcode===0){if(i){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(n);return}if(!this._fragmented){let n=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");t(n);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(n);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let n=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");t(n);return}if(i){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(n);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let n=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");t(n);return}}else{let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(n);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(r[1]&128)===128,this._isServer){if(!this._masked){let n=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");t(n);return}}else if(this._masked){let n=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");t(n);return}this._payloadLength===126?this._state=jw:this._payloadLength===127?this._state=Vw:this.haveLength(t)}getPayloadLength16(t){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t)}getPayloadLength64(t){if(this._bufferedBytes<8){this._loop=!1;return}let r=this.consume(8),i=r.readUInt32BE(0);if(i>Math.pow(2,21)-1){let n=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");t(n);return}this._payloadLength=i*Math.pow(2,32)+r.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let r=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(r);return}this._masked?this._state=Kw:this._state=zv}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=zv}getData(t){let r=Hw;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}r=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&rB(r,this._mask)}if(this._opcode>7){this.controlMessage(r,t);return}if(this._compressed){this._state=jv,this.decompress(r,t);return}r.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(r)),this.dataMessage(t)}decompress(t,r){this._extensions[Fw.extensionName].decompress(t,this._fin,(n,a)=>{if(n)return r(n);if(a.length){if(this._messageLength+=a.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let u=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");r(u);return}this._fragments.push(a)}this.dataMessage(r),this._state===yn&&this.startLoop(r)})}dataMessage(t){if(!this._fin){this._state=yn;return}let r=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let n;this._binaryType==="nodebuffer"?n=Hv(i,r):this._binaryType==="arraybuffer"?n=tB(Hv(i,r)):n=i,this._allowSynchronousEvents?(this.emit("message",n,!0),this._state=yn):(this._state=Lh,setImmediate(()=>{this.emit("message",n,!0),this._state=yn,this.startLoop(t)}))}else{let n=Hv(i,r);if(!this._skipUTF8Validation&&!zw(n)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(a);return}this._state===jv||this._allowSynchronousEvents?(this.emit("message",n,!1),this._state=yn):(this._state=Lh,setImmediate(()=>{this.emit("message",n,!1),this._state=yn,this.startLoop(t)}))}}controlMessage(t,r){if(this._opcode===8){if(t.length===0)this._loop=!1,this.emit("conclude",1005,Hw),this.end();else{let i=t.readUInt16BE(0);if(!iB(i)){let a=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");r(a);return}let n=new Ch(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!zw(n)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");r(a);return}this._loop=!1,this.emit("conclude",i,n),this.end()}this._state=yn;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",t),this._state=yn):(this._state=Lh,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",t),this._state=yn,this.startLoop(r)}))}createError(t,r,i,n,a){this._loop=!1,this._errored=!0;let u=new t(i?`Invalid WebSocket frame: ${r}`:r);return Error.captureStackTrace(u,this.createError),u.code=a,u[QP]=n,u}};Ww.exports=Vv});var Gv=W(($J,Xw)=>{"use strict";var{Duplex:GJ}=require("stream"),{randomFillSync:nB}=require("crypto"),Gw=Qf(),{EMPTY_BUFFER:sB}=za(),{isValidStatusCode:aB}=el(),{mask:$w,toBuffer:Qc}=Yf(),jn=Symbol("kByteLength"),oB=Buffer.alloc(4),Wv=class e{constructor(t,r,i){this._extensions=r||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(t,r){let i,n=!1,a=2,u=!1;r.mask&&(i=r.maskBuffer||oB,r.generateMask?r.generateMask(i):nB(i,0,4),u=(i[0]|i[1]|i[2]|i[3])===0,a=6);let h;typeof t=="string"?(!r.mask||u)&&r[jn]!==void 0?h=r[jn]:(t=Buffer.from(t),h=t.length):(h=t.length,n=r.mask&&r.readOnly&&!u);let b=h;h>=65536?(a+=8,b=127):h>125&&(a+=2,b=126);let w=Buffer.allocUnsafe(n?h+a:a);return w[0]=r.fin?r.opcode|128:r.opcode,r.rsv1&&(w[0]|=64),w[1]=b,b===126?w.writeUInt16BE(h,2):b===127&&(w[2]=w[3]=0,w.writeUIntBE(h,4,6)),r.mask?(w[1]|=128,w[a-4]=i[0],w[a-3]=i[1],w[a-2]=i[2],w[a-1]=i[3],u?[w,t]:n?($w(t,i,w,a,h),[w]):($w(t,i,t,0,h),[w,t])):[w,t]}close(t,r,i,n){let a;if(t===void 0)a=sB;else{if(typeof t!="number"||!aB(t))throw new TypeError("First argument must be a valid error code number");if(r===void 0||!r.length)a=Buffer.allocUnsafe(2),a.writeUInt16BE(t,0);else{let h=Buffer.byteLength(r);if(h>123)throw new RangeError("The message must not be greater than 123 bytes");a=Buffer.allocUnsafe(2+h),a.writeUInt16BE(t,0),typeof r=="string"?a.write(r,2):a.set(r,2)}}let u={[jn]:a.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,a,!1,u,n]):this.sendFrame(e.frame(a,u),n)}ping(t,r,i){let n,a;if(typeof t=="string"?(n=Buffer.byteLength(t),a=!1):(t=Qc(t),n=t.length,a=Qc.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let u={[jn]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,u,i]):this.sendFrame(e.frame(t,u),i)}pong(t,r,i){let n,a;if(typeof t=="string"?(n=Buffer.byteLength(t),a=!1):(t=Qc(t),n=t.length,a=Qc.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let u={[jn]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,u,i]):this.sendFrame(e.frame(t,u),i)}send(t,r,i){let n=this._extensions[Gw.extensionName],a=r.binary?2:1,u=r.compress,h,b;if(typeof t=="string"?(h=Buffer.byteLength(t),b=!1):(t=Qc(t),h=t.length,b=Qc.readOnly),this._firstFragment?(this._firstFragment=!1,u&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(u=h>=n._threshold),this._compress=u):(u=!1,a=0),r.fin&&(this._firstFragment=!0),n){let w={[jn]:h,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:b,rsv1:u};this._deflating?this.enqueue([this.dispatch,t,this._compress,w,i]):this.dispatch(t,this._compress,w,i)}else this.sendFrame(e.frame(t,{[jn]:h,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:b,rsv1:!1}),i)}dispatch(t,r,i,n){if(!r){this.sendFrame(e.frame(t,i),n);return}let a=this._extensions[Gw.extensionName];this._bufferedBytes+=i[jn],this._deflating=!0,a.compress(t,i.fin,(u,h)=>{if(this._socket.destroyed){let b=new Error("The socket was closed while data was being compressed");typeof n=="function"&&n(b);for(let w=0;w<this._queue.length;w++){let T=this._queue[w],I=T[T.length-1];typeof I=="function"&&I(b)}return}this._bufferedBytes-=i[jn],this._deflating=!1,i.readOnly=!1,this.sendFrame(e.frame(h,i),n),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let t=this._queue.shift();this._bufferedBytes-=t[3][jn],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][jn],this._queue.push(t)}sendFrame(t,r){t.length===2?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],r),this._socket.uncork()):this._socket.write(t[0],r)}};Xw.exports=Wv});var nS=W((XJ,iS)=>{"use strict";var{kForOnEventAttribute:tl,kListener:$v}=za(),Yw=Symbol("kCode"),Zw=Symbol("kData"),Jw=Symbol("kError"),Qw=Symbol("kMessage"),eS=Symbol("kReason"),eu=Symbol("kTarget"),tS=Symbol("kType"),rS=Symbol("kWasClean"),na=class{constructor(t){this[eu]=null,this[tS]=t}get target(){return this[eu]}get type(){return this[tS]}};Object.defineProperty(na.prototype,"target",{enumerable:!0});Object.defineProperty(na.prototype,"type",{enumerable:!0});var Ko=class extends na{constructor(t,r={}){super(t),this[Yw]=r.code===void 0?0:r.code,this[eS]=r.reason===void 0?"":r.reason,this[rS]=r.wasClean===void 0?!1:r.wasClean}get code(){return this[Yw]}get reason(){return this[eS]}get wasClean(){return this[rS]}};Object.defineProperty(Ko.prototype,"code",{enumerable:!0});Object.defineProperty(Ko.prototype,"reason",{enumerable:!0});Object.defineProperty(Ko.prototype,"wasClean",{enumerable:!0});var tu=class extends na{constructor(t,r={}){super(t),this[Jw]=r.error===void 0?null:r.error,this[Qw]=r.message===void 0?"":r.message}get error(){return this[Jw]}get message(){return this[Qw]}};Object.defineProperty(tu.prototype,"error",{enumerable:!0});Object.defineProperty(tu.prototype,"message",{enumerable:!0});var rl=class extends na{constructor(t,r={}){super(t),this[Zw]=r.data===void 0?null:r.data}get data(){return this[Zw]}};Object.defineProperty(rl.prototype,"data",{enumerable:!0});var cB={addEventListener(e,t,r={}){for(let n of this.listeners(e))if(!r[tl]&&n[$v]===t&&!n[tl])return;let i;if(e==="message")i=function(a,u){let h=new rl("message",{data:u?a:a.toString()});h[eu]=this,Dh(t,this,h)};else if(e==="close")i=function(a,u){let h=new Ko("close",{code:a,reason:u.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});h[eu]=this,Dh(t,this,h)};else if(e==="error")i=function(a){let u=new tu("error",{error:a,message:a.message});u[eu]=this,Dh(t,this,u)};else if(e==="open")i=function(){let a=new na("open");a[eu]=this,Dh(t,this,a)};else return;i[tl]=!!r[tl],i[$v]=t,r.once?this.once(e,i):this.on(e,i)},removeEventListener(e,t){for(let r of this.listeners(e))if(r[$v]===t&&!r[tl]){this.removeListener(e,r);break}}};iS.exports={CloseEvent:Ko,ErrorEvent:tu,Event:na,EventTarget:cB,MessageEvent:rl};function Dh(e,t,r){typeof e=="object"&&e.handleEvent?e.handleEvent.call(e,r):e.call(t,r)}});var Xv=W((YJ,sS)=>{"use strict";var{tokenChars:il}=el();function ps(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}function uB(e){let t=Object.create(null),r=Object.create(null),i=!1,n=!1,a=!1,u,h,b=-1,w=-1,T=-1,I=0;for(;I<e.length;I++)if(w=e.charCodeAt(I),u===void 0)if(T===-1&&il[w]===1)b===-1&&(b=I);else if(I!==0&&(w===32||w===9))T===-1&&b!==-1&&(T=I);else if(w===59||w===44){if(b===-1)throw new SyntaxError(`Unexpected character at index ${I}`);T===-1&&(T=I);let M=e.slice(b,T);w===44?(ps(t,M,r),r=Object.create(null)):u=M,b=T=-1}else throw new SyntaxError(`Unexpected character at index ${I}`);else if(h===void 0)if(T===-1&&il[w]===1)b===-1&&(b=I);else if(w===32||w===9)T===-1&&b!==-1&&(T=I);else if(w===59||w===44){if(b===-1)throw new SyntaxError(`Unexpected character at index ${I}`);T===-1&&(T=I),ps(r,e.slice(b,T),!0),w===44&&(ps(t,u,r),r=Object.create(null),u=void 0),b=T=-1}else if(w===61&&b!==-1&&T===-1)h=e.slice(b,I),b=T=-1;else throw new SyntaxError(`Unexpected character at index ${I}`);else if(n){if(il[w]!==1)throw new SyntaxError(`Unexpected character at index ${I}`);b===-1?b=I:i||(i=!0),n=!1}else if(a)if(il[w]===1)b===-1&&(b=I);else if(w===34&&b!==-1)a=!1,T=I;else if(w===92)n=!0;else throw new SyntaxError(`Unexpected character at index ${I}`);else if(w===34&&e.charCodeAt(I-1)===61)a=!0;else if(T===-1&&il[w]===1)b===-1&&(b=I);else if(b!==-1&&(w===32||w===9))T===-1&&(T=I);else if(w===59||w===44){if(b===-1)throw new SyntaxError(`Unexpected character at index ${I}`);T===-1&&(T=I);let M=e.slice(b,T);i&&(M=M.replace(/\\/g,""),i=!1),ps(r,h,M),w===44&&(ps(t,u,r),r=Object.create(null),u=void 0),h=void 0,b=T=-1}else throw new SyntaxError(`Unexpected character at index ${I}`);if(b===-1||a||w===32||w===9)throw new SyntaxError("Unexpected end of input");T===-1&&(T=I);let B=e.slice(b,T);return u===void 0?ps(t,B,r):(h===void 0?ps(r,B,!0):i?ps(r,h,B.replace(/\\/g,"")):ps(r,h,B),ps(t,u,r)),t}function fB(e){return Object.keys(e).map(t=>{let r=e[t];return Array.isArray(r)||(r=[r]),r.map(i=>[t].concat(Object.keys(i).map(n=>{let a=i[n];return Array.isArray(a)||(a=[a]),a.map(u=>u===!0?n:`${n}=${u}`).join("; ")})).join("; ")).join(", ")}).join(", ")}sS.exports={format:fB,parse:uB}});var eg=W((QJ,vS)=>{"use strict";var lB=require("events"),pB=require("https"),hB=require("http"),cS=require("net"),dB=require("tls"),{randomBytes:mB,createHash:vB}=require("crypto"),{Duplex:ZJ,Readable:JJ}=require("stream"),{URL:Yv}=require("url"),Va=Qf(),gB=Kv(),bB=Gv(),{BINARY_TYPES:aS,EMPTY_BUFFER:Uh,GUID:xB,kForOnEventAttribute:Zv,kListener:_B,kStatusCode:yB,kWebSocket:hi,NOOP:uS}=za(),{EventTarget:{addEventListener:wB,removeEventListener:SB}}=nS(),{format:EB,parse:TB}=Xv(),{toBuffer:IB}=Yf(),RB=30*1e3,fS=Symbol("kAborted"),Jv=[8,13],sa=["CONNECTING","OPEN","CLOSING","CLOSED"],AB=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,Ir=class e extends lB{constructor(t,r,i){super(),this._binaryType=aS[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Uh,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,r===void 0?r=[]:Array.isArray(r)||(typeof r=="object"&&r!==null?(i=r,r=[]):r=[r]),lS(this,t,r,i)):(this._autoPong=i.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){aS.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,r,i){let n=new gB({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation});this._sender=new bB(t,this._extensions,i.generateMask),this._receiver=n,this._socket=t,n[hi]=this,t[hi]=this,n.on("conclude",NB),n.on("drain",PB),n.on("error",BB),n.on("message",MB),n.on("ping",CB),n.on("pong",LB),t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),r.length>0&&t.unshift(r),t.on("close",hS),t.on("data",Fh),t.on("end",dS),t.on("error",mS),this._readyState=e.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Va.extensionName]&&this._extensions[Va.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,r){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){en(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===e.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=e.CLOSING,this._sender.close(t,r,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),RB)}}pause(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,r,i){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(i=t,t=r=void 0):typeof r=="function"&&(i=r,r=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){Qv(this,t,i);return}r===void 0&&(r=!this._isServer),this._sender.ping(t||Uh,r,i)}pong(t,r,i){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(i=t,t=r=void 0):typeof r=="function"&&(i=r,r=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){Qv(this,t,i);return}r===void 0&&(r=!this._isServer),this._sender.pong(t||Uh,r,i)}resume(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,r,i){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof r=="function"&&(i=r,r={}),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){Qv(this,t,i);return}let n={binary:typeof t!="string",mask:!this._isServer,compress:!0,fin:!0,...r};this._extensions[Va.extensionName]||(n.compress=!1),this._sender.send(t||Uh,n,i)}terminate(){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){en(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=e.CLOSING,this._socket.destroy())}}};Object.defineProperty(Ir,"CONNECTING",{enumerable:!0,value:sa.indexOf("CONNECTING")});Object.defineProperty(Ir.prototype,"CONNECTING",{enumerable:!0,value:sa.indexOf("CONNECTING")});Object.defineProperty(Ir,"OPEN",{enumerable:!0,value:sa.indexOf("OPEN")});Object.defineProperty(Ir.prototype,"OPEN",{enumerable:!0,value:sa.indexOf("OPEN")});Object.defineProperty(Ir,"CLOSING",{enumerable:!0,value:sa.indexOf("CLOSING")});Object.defineProperty(Ir.prototype,"CLOSING",{enumerable:!0,value:sa.indexOf("CLOSING")});Object.defineProperty(Ir,"CLOSED",{enumerable:!0,value:sa.indexOf("CLOSED")});Object.defineProperty(Ir.prototype,"CLOSED",{enumerable:!0,value:sa.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(e=>{Object.defineProperty(Ir.prototype,e,{enumerable:!0})});["open","error","close","message"].forEach(e=>{Object.defineProperty(Ir.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[Zv])return t[_B];return null},set(t){for(let r of this.listeners(e))if(r[Zv]){this.removeListener(e,r);break}typeof t=="function"&&this.addEventListener(e,t,{[Zv]:!0})}})});Ir.prototype.addEventListener=wB;Ir.prototype.removeEventListener=SB;vS.exports=Ir;function lS(e,t,r,i){let n={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Jv[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=n.autoPong,!Jv.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${Jv.join(", ")})`);let a;if(t instanceof Yv)a=t;else try{a=new Yv(t)}catch{throw new SyntaxError(`Invalid URL: ${t}`)}a.protocol==="http:"?a.protocol="ws:":a.protocol==="https:"&&(a.protocol="wss:"),e._url=a.href;let u=a.protocol==="wss:",h=a.protocol==="ws+unix:",b;if(a.protocol!=="ws:"&&!u&&!h?b=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:h&&!a.pathname?b="The URL's pathname is empty":a.hash&&(b="The URL contains a fragment identifier"),b){let L=new SyntaxError(b);if(e._redirects===0)throw L;qh(e,L);return}let w=u?443:80,T=mB(16).toString("base64"),I=u?pB.request:hB.request,B=new Set,M;if(n.createConnection=n.createConnection||(u?kB:OB),n.defaultPort=n.defaultPort||w,n.port=a.port||w,n.host=a.hostname.startsWith("[")?a.hostname.slice(1,-1):a.hostname,n.headers={...n.headers,"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":T,Connection:"Upgrade",Upgrade:"websocket"},n.path=a.pathname+a.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(M=new Va(n.perMessageDeflate!==!0?n.perMessageDeflate:{},!1,n.maxPayload),n.headers["Sec-WebSocket-Extensions"]=EB({[Va.extensionName]:M.offer()})),r.length){for(let L of r){if(typeof L!="string"||!AB.test(L)||B.has(L))throw new SyntaxError("An invalid or duplicated subprotocol was specified");B.add(L)}n.headers["Sec-WebSocket-Protocol"]=r.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(a.username||a.password)&&(n.auth=`${a.username}:${a.password}`),h){let L=n.path.split(":");n.socketPath=L[0],n.path=L[1]}let P;if(n.followRedirects){if(e._redirects===0){e._originalIpc=h,e._originalSecure=u,e._originalHostOrSocketPath=h?n.socketPath:a.host;let L=i&&i.headers;if(i={...i,headers:{}},L)for(let[X,V]of Object.entries(L))i.headers[X.toLowerCase()]=V}else if(e.listenerCount("redirect")===0){let L=h?e._originalIpc?n.socketPath===e._originalHostOrSocketPath:!1:e._originalIpc?!1:a.host===e._originalHostOrSocketPath;(!L||e._originalSecure&&!u)&&(delete n.headers.authorization,delete n.headers.cookie,L||delete n.headers.host,n.auth=void 0)}n.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64")),P=e._req=I(n),e._redirects&&e.emit("redirect",e.url,P)}else P=e._req=I(n);n.timeout&&P.on("timeout",()=>{en(e,P,"Opening handshake has timed out")}),P.on("error",L=>{P===null||P[fS]||(P=e._req=null,qh(e,L))}),P.on("response",L=>{let X=L.headers.location,V=L.statusCode;if(X&&n.followRedirects&&V>=300&&V<400){if(++e._redirects>n.maxRedirects){en(e,P,"Maximum redirects exceeded");return}P.abort();let q;try{q=new Yv(X,t)}catch{let fe=new SyntaxError(`Invalid URL: ${X}`);qh(e,fe);return}lS(e,q,r,i)}else e.emit("unexpected-response",P,L)||en(e,P,`Unexpected server response: ${L.statusCode}`)}),P.on("upgrade",(L,X,V)=>{if(e.emit("upgrade",L),e.readyState!==Ir.CONNECTING)return;if(P=e._req=null,L.headers.upgrade.toLowerCase()!=="websocket"){en(e,X,"Invalid Upgrade header");return}let q=vB("sha1").update(T+xB).digest("base64");if(L.headers["sec-websocket-accept"]!==q){en(e,X,"Invalid Sec-WebSocket-Accept header");return}let ee=L.headers["sec-websocket-protocol"],fe;if(ee!==void 0?B.size?B.has(ee)||(fe="Server sent an invalid subprotocol"):fe="Server sent a subprotocol but none was requested":B.size&&(fe="Server sent no subprotocol"),fe){en(e,X,fe);return}ee&&(e._protocol=ee);let _e=L.headers["sec-websocket-extensions"];if(_e!==void 0){if(!M){en(e,X,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let Te;try{Te=TB(_e)}catch{en(e,X,"Invalid Sec-WebSocket-Extensions header");return}let be=Object.keys(Te);if(be.length!==1||be[0]!==Va.extensionName){en(e,X,"Server indicated an extension that was not requested");return}try{M.accept(Te[Va.extensionName])}catch{en(e,X,"Invalid Sec-WebSocket-Extensions header");return}e._extensions[Va.extensionName]=M}e.setSocket(X,V,{allowSynchronousEvents:n.allowSynchronousEvents,generateMask:n.generateMask,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})}),n.finishRequest?n.finishRequest(P,e):P.end()}function qh(e,t){e._readyState=Ir.CLOSING,e.emit("error",t),e.emitClose()}function OB(e){return e.path=e.socketPath,cS.connect(e)}function kB(e){return e.path=void 0,!e.servername&&e.servername!==""&&(e.servername=cS.isIP(e.host)?"":e.host),dB.connect(e)}function en(e,t,r){e._readyState=Ir.CLOSING;let i=new Error(r);Error.captureStackTrace(i,en),t.setHeader?(t[fS]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(qh,e,i)):(t.destroy(i),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function Qv(e,t,r){if(t){let i=IB(t).length;e._socket?e._sender._bufferedBytes+=i:e._bufferedAmount+=i}if(r){let i=new Error(`WebSocket is not open: readyState ${e.readyState} (${sa[e.readyState]})`);process.nextTick(r,i)}}function NB(e,t){let r=this[hi];r._closeFrameReceived=!0,r._closeMessage=t,r._closeCode=e,r._socket[hi]!==void 0&&(r._socket.removeListener("data",Fh),process.nextTick(pS,r._socket),e===1005?r.close():r.close(e,t))}function PB(){let e=this[hi];e.isPaused||e._socket.resume()}function BB(e){let t=this[hi];t._socket[hi]!==void 0&&(t._socket.removeListener("data",Fh),process.nextTick(pS,t._socket),t.close(e[yB])),t.emit("error",e)}function oS(){this[hi].emitClose()}function MB(e,t){this[hi].emit("message",e,t)}function CB(e){let t=this[hi];t._autoPong&&t.pong(e,!this._isServer,uS),t.emit("ping",e)}function LB(e){this[hi].emit("pong",e)}function pS(e){e.resume()}function hS(){let e=this[hi];this.removeListener("close",hS),this.removeListener("data",Fh),this.removeListener("end",dS),e._readyState=Ir.CLOSING;let t;!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&(t=e._socket.read())!==null&&e._receiver.write(t),e._receiver.end(),this[hi]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",oS),e._receiver.on("finish",oS))}function Fh(e){this[hi]._receiver.write(e)||this.pause()}function dS(){let e=this[hi];e._readyState=Ir.CLOSING,e._receiver.end(),this.end()}function mS(){let e=this[hi];this.removeListener("error",mS),this.on("error",uS),e&&(e._readyState=Ir.CLOSING,this.destroy())}});var bS=W((eQ,gS)=>{"use strict";var{tokenChars:DB}=el();function UB(e){let t=new Set,r=-1,i=-1,n=0;for(n;n<e.length;n++){let u=e.charCodeAt(n);if(i===-1&&DB[u]===1)r===-1&&(r=n);else if(n!==0&&(u===32||u===9))i===-1&&r!==-1&&(i=n);else if(u===44){if(r===-1)throw new SyntaxError(`Unexpected character at index ${n}`);i===-1&&(i=n);let h=e.slice(r,i);if(t.has(h))throw new SyntaxError(`The "${h}" subprotocol is duplicated`);t.add(h),r=i=-1}else throw new SyntaxError(`Unexpected character at index ${n}`)}if(r===-1||i!==-1)throw new SyntaxError("Unexpected end of input");let a=e.slice(r,n);if(t.has(a))throw new SyntaxError(`The "${a}" subprotocol is duplicated`);return t.add(a),t}gS.exports={parse:UB}});var TS=W((rQ,ES)=>{"use strict";var qB=require("events"),Hh=require("http"),{Duplex:tQ}=require("stream"),{createHash:FB}=require("crypto"),xS=Xv(),Wo=Qf(),HB=bS(),zB=eg(),{GUID:jB,kWebSocket:VB}=za(),KB=/^[+/0-9A-Za-z]{22}==$/,_S=0,yS=1,SS=2,tg=class extends qB{constructor(t,r){if(super(),t={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:zB,...t},t.port==null&&!t.server&&!t.noServer||t.port!=null&&(t.server||t.noServer)||t.server&&t.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(t.port!=null?(this._server=Hh.createServer((i,n)=>{let a=Hh.STATUS_CODES[426];n.writeHead(426,{"Content-Length":a.length,"Content-Type":"text/plain"}),n.end(a)}),this._server.listen(t.port,t.host,t.backlog,r)):t.server&&(this._server=t.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=WB(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,a,u)=>{this.handleUpgrade(n,a,u,i)}})}t.perMessageDeflate===!0&&(t.perMessageDeflate={}),t.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=t,this._state=_S}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(t){if(this._state===SS){t&&this.once("close",()=>{t(new Error("The server is not running"))}),process.nextTick(nl,this);return}if(t&&this.once("close",t),this._state!==yS)if(this._state=yS,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(nl,this):process.nextTick(nl,this);else{let r=this._server;this._removeListeners(),this._removeListeners=this._server=null,r.close(()=>{nl(this)})}}shouldHandle(t){if(this.options.path){let r=t.url.indexOf("?");if((r!==-1?t.url.slice(0,r):t.url)!==this.options.path)return!1}return!0}handleUpgrade(t,r,i,n){r.on("error",wS);let a=t.headers["sec-websocket-key"],u=+t.headers["sec-websocket-version"];if(t.method!=="GET"){Go(this,t,r,405,"Invalid HTTP method");return}if(t.headers.upgrade.toLowerCase()!=="websocket"){Go(this,t,r,400,"Invalid Upgrade header");return}if(!a||!KB.test(a)){Go(this,t,r,400,"Missing or invalid Sec-WebSocket-Key header");return}if(u!==8&&u!==13){Go(this,t,r,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(t)){sl(r,400);return}let h=t.headers["sec-websocket-protocol"],b=new Set;if(h!==void 0)try{b=HB.parse(h)}catch{Go(this,t,r,400,"Invalid Sec-WebSocket-Protocol header");return}let w=t.headers["sec-websocket-extensions"],T={};if(this.options.perMessageDeflate&&w!==void 0){let I=new Wo(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let B=xS.parse(w);B[Wo.extensionName]&&(I.accept(B[Wo.extensionName]),T[Wo.extensionName]=I)}catch{Go(this,t,r,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let I={origin:t.headers[`${u===8?"sec-websocket-origin":"origin"}`],secure:!!(t.socket.authorized||t.socket.encrypted),req:t};if(this.options.verifyClient.length===2){this.options.verifyClient(I,(B,M,P,L)=>{if(!B)return sl(r,M||401,P,L);this.completeUpgrade(T,a,b,t,r,i,n)});return}if(!this.options.verifyClient(I))return sl(r,401)}this.completeUpgrade(T,a,b,t,r,i,n)}completeUpgrade(t,r,i,n,a,u,h){if(!a.readable||!a.writable)return a.destroy();if(a[VB])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>_S)return sl(a,503);let w=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${FB("sha1").update(r+jB).digest("base64")}`],T=new this.options.WebSocket(null,void 0,this.options);if(i.size){let I=this.options.handleProtocols?this.options.handleProtocols(i,n):i.values().next().value;I&&(w.push(`Sec-WebSocket-Protocol: ${I}`),T._protocol=I)}if(t[Wo.extensionName]){let I=t[Wo.extensionName].params,B=xS.format({[Wo.extensionName]:[I]});w.push(`Sec-WebSocket-Extensions: ${B}`),T._extensions=t}this.emit("headers",w,n),a.write(w.concat(`\r
3
- `).join(`\r
4
- `)),a.removeListener("error",wS),T.setSocket(a,u,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(T),T.on("close",()=>{this.clients.delete(T),this._shouldEmitClose&&!this.clients.size&&process.nextTick(nl,this)})),h(T,n)}};ES.exports=tg;function WB(e,t){for(let r of Object.keys(t))e.on(r,t[r]);return function(){for(let i of Object.keys(t))e.removeListener(i,t[i])}}function nl(e){e._state=SS,e.emit("close")}function wS(){this.destroy()}function sl(e,t,r,i){r=r||Hh.STATUS_CODES[t],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(r),...i},e.once("finish",e.destroy),e.end(`HTTP/1.1 ${t} ${Hh.STATUS_CODES[t]}\r
5
- `+Object.keys(i).map(n=>`${n}: ${i[n]}`).join(`\r
6
- `)+`\r
7
- \r
8
- `+r)}function Go(e,t,r,i,n){if(e.listenerCount("wsClientError")){let a=new Error(n);Error.captureStackTrace(a,Go),e.emit("wsClientError",a,r,t)}else sl(r,i,n)}});var AS=W((xQ,oM)=>{oM.exports={name:"bitcore-lib",version:"10.0.28",description:"A pure and powerful JavaScript Bitcoin library.",author:"BitPay <dev@bitpay.com>",main:"index.js",scripts:{test:"gulp test","test:ci":"npm run test",coverage:"gulp coverage",build:"gulp",pub:"npm run build && npm publish"},keywords:["bitcoin","transaction","address","p2p","ecies","cryptocurrency","blockchain","payment","bip21","bip32","bip37","bip69","bip70","multisig"],repository:{type:"git",url:"https://github.com/bitpay/bitcore/tree/master/packages/bitcore-lib"},browser:{request:"browser-request"},dependencies:{bech32:"=2.0.0","bip-schnorr":"=0.6.4","bn.js":"=4.11.8",bs58:"^4.0.1","buffer-compare":"=1.1.1",elliptic:"^6.5.3",inherits:"=2.0.1",lodash:"^4.17.20"},devDependencies:{"bitcore-build":"^10.0.21",brfs:"^2.0.1",chai:"^4.2.0",gulp:"^4.0.0",sinon:"^7.1.1"},license:"MIT",gitHead:"c47030e29c2ef353b41955d78fd0ca5c8422c590"}});var fg=W((OS,ug)=>{(function(e,t){"use strict";function r(E,f){if(!E)throw new Error(f||"Assertion failed")}function i(E,f){E.super_=f;var c=function(){};c.prototype=f.prototype,E.prototype=new c,E.prototype.constructor=E}function n(E,f,c){if(n.isBN(E))return E;this.negative=0,this.words=null,this.length=0,this.red=null,E!==null&&((f==="le"||f==="be")&&(c=f,f=10),this._init(E||0,f||10,c||"be"))}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var a;try{a=require("buffer").Buffer}catch{}n.isBN=function(f){return f instanceof n?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===n.wordSize&&Array.isArray(f.words)},n.max=function(f,c){return f.cmp(c)>0?f:c},n.min=function(f,c){return f.cmp(c)<0?f:c},n.prototype._init=function(f,c,p){if(typeof f=="number")return this._initNumber(f,c,p);if(typeof f=="object")return this._initArray(f,c,p);c==="hex"&&(c=16),r(c===(c|0)&&c>=2&&c<=36),f=f.toString().replace(/\s+/g,"");var v=0;f[0]==="-"&&v++,c===16?this._parseHex(f,v):this._parseBase(f,c,v),f[0]==="-"&&(this.negative=1),this.strip(),p==="le"&&this._initArray(this.toArray(),c,p)},n.prototype._initNumber=function(f,c,p){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(r(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),p==="le"&&this._initArray(this.toArray(),c,p)},n.prototype._initArray=function(f,c,p){if(r(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var v=0;v<this.length;v++)this.words[v]=0;var g,x,S=0;if(p==="be")for(v=f.length-1,g=0;v>=0;v-=3)x=f[v]|f[v-1]<<8|f[v-2]<<16,this.words[g]|=x<<S&67108863,this.words[g+1]=x>>>26-S&67108863,S+=24,S>=26&&(S-=26,g++);else if(p==="le")for(v=0,g=0;v<f.length;v+=3)x=f[v]|f[v+1]<<8|f[v+2]<<16,this.words[g]|=x<<S&67108863,this.words[g+1]=x>>>26-S&67108863,S+=24,S>=26&&(S-=26,g++);return this.strip()};function u(E,f,c){for(var p=0,v=Math.min(E.length,c),g=f;g<v;g++){var x=E.charCodeAt(g)-48;p<<=4,x>=49&&x<=54?p|=x-49+10:x>=17&&x<=22?p|=x-17+10:p|=x&15}return p}n.prototype._parseHex=function(f,c){this.length=Math.ceil((f.length-c)/6),this.words=new Array(this.length);for(var p=0;p<this.length;p++)this.words[p]=0;var v,g,x=0;for(p=f.length-6,v=0;p>=c;p-=6)g=u(f,p,p+6),this.words[v]|=g<<x&67108863,this.words[v+1]|=g>>>26-x&4194303,x+=24,x>=26&&(x-=26,v++);p+6!==c&&(g=u(f,c,p+6),this.words[v]|=g<<x&67108863,this.words[v+1]|=g>>>26-x&4194303),this.strip()};function h(E,f,c,p){for(var v=0,g=Math.min(E.length,c),x=f;x<g;x++){var S=E.charCodeAt(x)-48;v*=p,S>=49?v+=S-49+10:S>=17?v+=S-17+10:v+=S}return v}n.prototype._parseBase=function(f,c,p){this.words=[0],this.length=1;for(var v=0,g=1;g<=67108863;g*=c)v++;v--,g=g/c|0;for(var x=f.length-p,S=x%v,_=Math.min(x,x-S)+p,l=0,m=p;m<_;m+=v)l=h(f,m,m+v,c),this.imuln(g),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(S!==0){var A=1;for(l=h(f,m,f.length,c),m=0;m<S;m++)A*=c;this.imuln(A),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},n.prototype.copy=function(f){f.words=new Array(this.length);for(var c=0;c<this.length;c++)f.words[c]=this.words[c];f.length=this.length,f.negative=this.negative,f.red=this.red},n.prototype.clone=function(){var f=new n(null);return this.copy(f),f},n.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(f,c){f=f||10,c=c|0||1;var p;if(f===16||f==="hex"){p="";for(var v=0,g=0,x=0;x<this.length;x++){var S=this.words[x],_=((S<<v|g)&16777215).toString(16);g=S>>>24-v&16777215,g!==0||x!==this.length-1?p=b[6-_.length]+_+p:p=_+p,v+=2,v>=26&&(v-=26,x--)}for(g!==0&&(p=g.toString(16)+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}if(f===(f|0)&&f>=2&&f<=36){var l=w[f],m=T[f];p="";var A=this.clone();for(A.negative=0;!A.isZero();){var U=A.modn(m).toString(f);A=A.idivn(m),A.isZero()?p=U+p:p=b[l-U.length]+U+p}for(this.isZero()&&(p="0"+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(f,c){return r(typeof a<"u"),this.toArrayLike(a,f,c)},n.prototype.toArray=function(f,c){return this.toArrayLike(Array,f,c)},n.prototype.toArrayLike=function(f,c,p){var v=this.byteLength(),g=p||Math.max(1,v);r(v<=g,"byte array longer than desired length"),r(g>0,"Requested array length <= 0"),this.strip();var x=c==="le",S=new f(g),_,l,m=this.clone();if(x){for(l=0;!m.isZero();l++)_=m.andln(255),m.iushrn(8),S[l]=_;for(;l<g;l++)S[l]=0}else{for(l=0;l<g-v;l++)S[l]=0;for(l=0;!m.isZero();l++)_=m.andln(255),m.iushrn(8),S[g-l-1]=_}return S},Math.clz32?n.prototype._countBits=function(f){return 32-Math.clz32(f)}:n.prototype._countBits=function(f){var c=f,p=0;return c>=4096&&(p+=13,c>>>=13),c>=64&&(p+=7,c>>>=7),c>=8&&(p+=4,c>>>=4),c>=2&&(p+=2,c>>>=2),p+c},n.prototype._zeroBits=function(f){if(f===0)return 26;var c=f,p=0;return c&8191||(p+=13,c>>>=13),c&127||(p+=7,c>>>=7),c&15||(p+=4,c>>>=4),c&3||(p+=2,c>>>=2),c&1||p++,p},n.prototype.bitLength=function(){var f=this.words[this.length-1],c=this._countBits(f);return(this.length-1)*26+c};function I(E){for(var f=new Array(E.bitLength()),c=0;c<f.length;c++){var p=c/26|0,v=c%26;f[c]=(E.words[p]&1<<v)>>>v}return f}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,c=0;c<this.length;c++){var p=this._zeroBits(this.words[c]);if(f+=p,p!==26)break}return f},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},n.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var c=0;c<f.length;c++)this.words[c]=this.words[c]|f.words[c];return this.strip()},n.prototype.ior=function(f){return r((this.negative|f.negative)===0),this.iuor(f)},n.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},n.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},n.prototype.iuand=function(f){var c;this.length>f.length?c=f:c=this;for(var p=0;p<c.length;p++)this.words[p]=this.words[p]&f.words[p];return this.length=c.length,this.strip()},n.prototype.iand=function(f){return r((this.negative|f.negative)===0),this.iuand(f)},n.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},n.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},n.prototype.iuxor=function(f){var c,p;this.length>f.length?(c=this,p=f):(c=f,p=this);for(var v=0;v<p.length;v++)this.words[v]=c.words[v]^p.words[v];if(this!==c)for(;v<c.length;v++)this.words[v]=c.words[v];return this.length=c.length,this.strip()},n.prototype.ixor=function(f){return r((this.negative|f.negative)===0),this.iuxor(f)},n.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},n.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},n.prototype.inotn=function(f){r(typeof f=="number"&&f>=0);var c=Math.ceil(f/26)|0,p=f%26;this._expand(c),p>0&&c--;for(var v=0;v<c;v++)this.words[v]=~this.words[v]&67108863;return p>0&&(this.words[v]=~this.words[v]&67108863>>26-p),this.strip()},n.prototype.notn=function(f){return this.clone().inotn(f)},n.prototype.setn=function(f,c){r(typeof f=="number"&&f>=0);var p=f/26|0,v=f%26;return this._expand(p+1),c?this.words[p]=this.words[p]|1<<v:this.words[p]=this.words[p]&~(1<<v),this.strip()},n.prototype.iadd=function(f){var c;if(this.negative!==0&&f.negative===0)return this.negative=0,c=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,c=this.isub(f),f.negative=1,c._normSign();var p,v;this.length>f.length?(p=this,v=f):(p=f,v=this);for(var g=0,x=0;x<v.length;x++)c=(p.words[x]|0)+(v.words[x]|0)+g,this.words[x]=c&67108863,g=c>>>26;for(;g!==0&&x<p.length;x++)c=(p.words[x]|0)+g,this.words[x]=c&67108863,g=c>>>26;if(this.length=p.length,g!==0)this.words[this.length]=g,this.length++;else if(p!==this)for(;x<p.length;x++)this.words[x]=p.words[x];return this},n.prototype.add=function(f){var c;return f.negative!==0&&this.negative===0?(f.negative=0,c=this.sub(f),f.negative^=1,c):f.negative===0&&this.negative!==0?(this.negative=0,c=f.sub(this),this.negative=1,c):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},n.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var c=this.iadd(f);return f.negative=1,c._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var p=this.cmp(f);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;var v,g;p>0?(v=this,g=f):(v=f,g=this);for(var x=0,S=0;S<g.length;S++)c=(v.words[S]|0)-(g.words[S]|0)+x,x=c>>26,this.words[S]=c&67108863;for(;x!==0&&S<v.length;S++)c=(v.words[S]|0)+x,x=c>>26,this.words[S]=c&67108863;if(x===0&&S<v.length&&v!==this)for(;S<v.length;S++)this.words[S]=v.words[S];return this.length=Math.max(this.length,S),v!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(f){return this.clone().isub(f)};function B(E,f,c){c.negative=f.negative^E.negative;var p=E.length+f.length|0;c.length=p,p=p-1|0;var v=E.words[0]|0,g=f.words[0]|0,x=v*g,S=x&67108863,_=x/67108864|0;c.words[0]=S;for(var l=1;l<p;l++){for(var m=_>>>26,A=_&67108863,U=Math.min(l,f.length-1),j=Math.max(0,l-E.length+1);j<=U;j++){var Z=l-j|0;v=E.words[Z]|0,g=f.words[j]|0,x=v*g+A,m+=x/67108864|0,A=x&67108863}c.words[l]=A|0,_=m|0}return _!==0?c.words[l]=_|0:c.length--,c.strip()}var M=function(f,c,p){var v=f.words,g=c.words,x=p.words,S=0,_,l,m,A=v[0]|0,U=A&8191,j=A>>>13,Z=v[1]|0,se=Z&8191,ae=Z>>>13,he=v[2]|0,Ee=he&8191,me=he>>>13,dt=v[3]|0,St=dt&8191,Oe=dt>>>13,st=v[4]|0,rt=st&8191,Re=st>>>13,Ae=v[5]|0,Wt=Ae&8191,Ke=Ae>>>13,At=v[6]|0,gt=At&8191,De=At>>>13,Pt=v[7]|0,Qt=Pt&8191,Ue=Pt>>>13,er=v[8]|0,Ot=er&8191,Le=er>>>13,Ct=v[9]|0,Lt=Ct&8191,qe=Ct>>>13,Dt=g[0]|0,Ut=Dt&8191,Fe=Dt>>>13,qt=g[1]|0,Ft=qt&8191,He=qt>>>13,tr=g[2]|0,rr=tr&8191,We=tr>>>13,Gt=g[3]|0,$t=Gt&8191,Ge=Gt>>>13,ir=g[4]|0,nr=ir&8191,$e=ir>>>13,Xt=g[5]|0,sr=Xt&8191,Xe=Xt>>>13,ar=g[6]|0,Ht=ar&8191,Ye=ar>>>13,zt=g[7]|0,or=zt&8191,Ze=zt>>>13,cr=g[8]|0,ur=cr&8191,Je=cr>>>13,fr=g[9]|0,lr=fr&8191,Qe=fr>>>13;p.negative=f.negative^c.negative,p.length=19,_=Math.imul(U,Ut),l=Math.imul(U,Fe),l=l+Math.imul(j,Ut)|0,m=Math.imul(j,Fe);var jt=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(jt>>>26)|0,jt&=67108863,_=Math.imul(se,Ut),l=Math.imul(se,Fe),l=l+Math.imul(ae,Ut)|0,m=Math.imul(ae,Fe),_=_+Math.imul(U,Ft)|0,l=l+Math.imul(U,He)|0,l=l+Math.imul(j,Ft)|0,m=m+Math.imul(j,He)|0;var Is=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Is>>>26)|0,Is&=67108863,_=Math.imul(Ee,Ut),l=Math.imul(Ee,Fe),l=l+Math.imul(me,Ut)|0,m=Math.imul(me,Fe),_=_+Math.imul(se,Ft)|0,l=l+Math.imul(se,He)|0,l=l+Math.imul(ae,Ft)|0,m=m+Math.imul(ae,He)|0,_=_+Math.imul(U,rr)|0,l=l+Math.imul(U,We)|0,l=l+Math.imul(j,rr)|0,m=m+Math.imul(j,We)|0;var Rs=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,_=Math.imul(St,Ut),l=Math.imul(St,Fe),l=l+Math.imul(Oe,Ut)|0,m=Math.imul(Oe,Fe),_=_+Math.imul(Ee,Ft)|0,l=l+Math.imul(Ee,He)|0,l=l+Math.imul(me,Ft)|0,m=m+Math.imul(me,He)|0,_=_+Math.imul(se,rr)|0,l=l+Math.imul(se,We)|0,l=l+Math.imul(ae,rr)|0,m=m+Math.imul(ae,We)|0,_=_+Math.imul(U,$t)|0,l=l+Math.imul(U,Ge)|0,l=l+Math.imul(j,$t)|0,m=m+Math.imul(j,Ge)|0;var As=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(As>>>26)|0,As&=67108863,_=Math.imul(rt,Ut),l=Math.imul(rt,Fe),l=l+Math.imul(Re,Ut)|0,m=Math.imul(Re,Fe),_=_+Math.imul(St,Ft)|0,l=l+Math.imul(St,He)|0,l=l+Math.imul(Oe,Ft)|0,m=m+Math.imul(Oe,He)|0,_=_+Math.imul(Ee,rr)|0,l=l+Math.imul(Ee,We)|0,l=l+Math.imul(me,rr)|0,m=m+Math.imul(me,We)|0,_=_+Math.imul(se,$t)|0,l=l+Math.imul(se,Ge)|0,l=l+Math.imul(ae,$t)|0,m=m+Math.imul(ae,Ge)|0,_=_+Math.imul(U,nr)|0,l=l+Math.imul(U,$e)|0,l=l+Math.imul(j,nr)|0,m=m+Math.imul(j,$e)|0;var Os=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Os>>>26)|0,Os&=67108863,_=Math.imul(Wt,Ut),l=Math.imul(Wt,Fe),l=l+Math.imul(Ke,Ut)|0,m=Math.imul(Ke,Fe),_=_+Math.imul(rt,Ft)|0,l=l+Math.imul(rt,He)|0,l=l+Math.imul(Re,Ft)|0,m=m+Math.imul(Re,He)|0,_=_+Math.imul(St,rr)|0,l=l+Math.imul(St,We)|0,l=l+Math.imul(Oe,rr)|0,m=m+Math.imul(Oe,We)|0,_=_+Math.imul(Ee,$t)|0,l=l+Math.imul(Ee,Ge)|0,l=l+Math.imul(me,$t)|0,m=m+Math.imul(me,Ge)|0,_=_+Math.imul(se,nr)|0,l=l+Math.imul(se,$e)|0,l=l+Math.imul(ae,nr)|0,m=m+Math.imul(ae,$e)|0,_=_+Math.imul(U,sr)|0,l=l+Math.imul(U,Xe)|0,l=l+Math.imul(j,sr)|0,m=m+Math.imul(j,Xe)|0;var ks=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(ks>>>26)|0,ks&=67108863,_=Math.imul(gt,Ut),l=Math.imul(gt,Fe),l=l+Math.imul(De,Ut)|0,m=Math.imul(De,Fe),_=_+Math.imul(Wt,Ft)|0,l=l+Math.imul(Wt,He)|0,l=l+Math.imul(Ke,Ft)|0,m=m+Math.imul(Ke,He)|0,_=_+Math.imul(rt,rr)|0,l=l+Math.imul(rt,We)|0,l=l+Math.imul(Re,rr)|0,m=m+Math.imul(Re,We)|0,_=_+Math.imul(St,$t)|0,l=l+Math.imul(St,Ge)|0,l=l+Math.imul(Oe,$t)|0,m=m+Math.imul(Oe,Ge)|0,_=_+Math.imul(Ee,nr)|0,l=l+Math.imul(Ee,$e)|0,l=l+Math.imul(me,nr)|0,m=m+Math.imul(me,$e)|0,_=_+Math.imul(se,sr)|0,l=l+Math.imul(se,Xe)|0,l=l+Math.imul(ae,sr)|0,m=m+Math.imul(ae,Xe)|0,_=_+Math.imul(U,Ht)|0,l=l+Math.imul(U,Ye)|0,l=l+Math.imul(j,Ht)|0,m=m+Math.imul(j,Ye)|0;var Ns=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Ns>>>26)|0,Ns&=67108863,_=Math.imul(Qt,Ut),l=Math.imul(Qt,Fe),l=l+Math.imul(Ue,Ut)|0,m=Math.imul(Ue,Fe),_=_+Math.imul(gt,Ft)|0,l=l+Math.imul(gt,He)|0,l=l+Math.imul(De,Ft)|0,m=m+Math.imul(De,He)|0,_=_+Math.imul(Wt,rr)|0,l=l+Math.imul(Wt,We)|0,l=l+Math.imul(Ke,rr)|0,m=m+Math.imul(Ke,We)|0,_=_+Math.imul(rt,$t)|0,l=l+Math.imul(rt,Ge)|0,l=l+Math.imul(Re,$t)|0,m=m+Math.imul(Re,Ge)|0,_=_+Math.imul(St,nr)|0,l=l+Math.imul(St,$e)|0,l=l+Math.imul(Oe,nr)|0,m=m+Math.imul(Oe,$e)|0,_=_+Math.imul(Ee,sr)|0,l=l+Math.imul(Ee,Xe)|0,l=l+Math.imul(me,sr)|0,m=m+Math.imul(me,Xe)|0,_=_+Math.imul(se,Ht)|0,l=l+Math.imul(se,Ye)|0,l=l+Math.imul(ae,Ht)|0,m=m+Math.imul(ae,Ye)|0,_=_+Math.imul(U,or)|0,l=l+Math.imul(U,Ze)|0,l=l+Math.imul(j,or)|0,m=m+Math.imul(j,Ze)|0;var sn=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(sn>>>26)|0,sn&=67108863,_=Math.imul(Ot,Ut),l=Math.imul(Ot,Fe),l=l+Math.imul(Le,Ut)|0,m=Math.imul(Le,Fe),_=_+Math.imul(Qt,Ft)|0,l=l+Math.imul(Qt,He)|0,l=l+Math.imul(Ue,Ft)|0,m=m+Math.imul(Ue,He)|0,_=_+Math.imul(gt,rr)|0,l=l+Math.imul(gt,We)|0,l=l+Math.imul(De,rr)|0,m=m+Math.imul(De,We)|0,_=_+Math.imul(Wt,$t)|0,l=l+Math.imul(Wt,Ge)|0,l=l+Math.imul(Ke,$t)|0,m=m+Math.imul(Ke,Ge)|0,_=_+Math.imul(rt,nr)|0,l=l+Math.imul(rt,$e)|0,l=l+Math.imul(Re,nr)|0,m=m+Math.imul(Re,$e)|0,_=_+Math.imul(St,sr)|0,l=l+Math.imul(St,Xe)|0,l=l+Math.imul(Oe,sr)|0,m=m+Math.imul(Oe,Xe)|0,_=_+Math.imul(Ee,Ht)|0,l=l+Math.imul(Ee,Ye)|0,l=l+Math.imul(me,Ht)|0,m=m+Math.imul(me,Ye)|0,_=_+Math.imul(se,or)|0,l=l+Math.imul(se,Ze)|0,l=l+Math.imul(ae,or)|0,m=m+Math.imul(ae,Ze)|0,_=_+Math.imul(U,ur)|0,l=l+Math.imul(U,Je)|0,l=l+Math.imul(j,ur)|0,m=m+Math.imul(j,Je)|0;var Ps=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Ps>>>26)|0,Ps&=67108863,_=Math.imul(Lt,Ut),l=Math.imul(Lt,Fe),l=l+Math.imul(qe,Ut)|0,m=Math.imul(qe,Fe),_=_+Math.imul(Ot,Ft)|0,l=l+Math.imul(Ot,He)|0,l=l+Math.imul(Le,Ft)|0,m=m+Math.imul(Le,He)|0,_=_+Math.imul(Qt,rr)|0,l=l+Math.imul(Qt,We)|0,l=l+Math.imul(Ue,rr)|0,m=m+Math.imul(Ue,We)|0,_=_+Math.imul(gt,$t)|0,l=l+Math.imul(gt,Ge)|0,l=l+Math.imul(De,$t)|0,m=m+Math.imul(De,Ge)|0,_=_+Math.imul(Wt,nr)|0,l=l+Math.imul(Wt,$e)|0,l=l+Math.imul(Ke,nr)|0,m=m+Math.imul(Ke,$e)|0,_=_+Math.imul(rt,sr)|0,l=l+Math.imul(rt,Xe)|0,l=l+Math.imul(Re,sr)|0,m=m+Math.imul(Re,Xe)|0,_=_+Math.imul(St,Ht)|0,l=l+Math.imul(St,Ye)|0,l=l+Math.imul(Oe,Ht)|0,m=m+Math.imul(Oe,Ye)|0,_=_+Math.imul(Ee,or)|0,l=l+Math.imul(Ee,Ze)|0,l=l+Math.imul(me,or)|0,m=m+Math.imul(me,Ze)|0,_=_+Math.imul(se,ur)|0,l=l+Math.imul(se,Je)|0,l=l+Math.imul(ae,ur)|0,m=m+Math.imul(ae,Je)|0,_=_+Math.imul(U,lr)|0,l=l+Math.imul(U,Qe)|0,l=l+Math.imul(j,lr)|0,m=m+Math.imul(j,Qe)|0;var an=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(an>>>26)|0,an&=67108863,_=Math.imul(Lt,Ft),l=Math.imul(Lt,He),l=l+Math.imul(qe,Ft)|0,m=Math.imul(qe,He),_=_+Math.imul(Ot,rr)|0,l=l+Math.imul(Ot,We)|0,l=l+Math.imul(Le,rr)|0,m=m+Math.imul(Le,We)|0,_=_+Math.imul(Qt,$t)|0,l=l+Math.imul(Qt,Ge)|0,l=l+Math.imul(Ue,$t)|0,m=m+Math.imul(Ue,Ge)|0,_=_+Math.imul(gt,nr)|0,l=l+Math.imul(gt,$e)|0,l=l+Math.imul(De,nr)|0,m=m+Math.imul(De,$e)|0,_=_+Math.imul(Wt,sr)|0,l=l+Math.imul(Wt,Xe)|0,l=l+Math.imul(Ke,sr)|0,m=m+Math.imul(Ke,Xe)|0,_=_+Math.imul(rt,Ht)|0,l=l+Math.imul(rt,Ye)|0,l=l+Math.imul(Re,Ht)|0,m=m+Math.imul(Re,Ye)|0,_=_+Math.imul(St,or)|0,l=l+Math.imul(St,Ze)|0,l=l+Math.imul(Oe,or)|0,m=m+Math.imul(Oe,Ze)|0,_=_+Math.imul(Ee,ur)|0,l=l+Math.imul(Ee,Je)|0,l=l+Math.imul(me,ur)|0,m=m+Math.imul(me,Je)|0,_=_+Math.imul(se,lr)|0,l=l+Math.imul(se,Qe)|0,l=l+Math.imul(ae,lr)|0,m=m+Math.imul(ae,Qe)|0;var Bs=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,_=Math.imul(Lt,rr),l=Math.imul(Lt,We),l=l+Math.imul(qe,rr)|0,m=Math.imul(qe,We),_=_+Math.imul(Ot,$t)|0,l=l+Math.imul(Ot,Ge)|0,l=l+Math.imul(Le,$t)|0,m=m+Math.imul(Le,Ge)|0,_=_+Math.imul(Qt,nr)|0,l=l+Math.imul(Qt,$e)|0,l=l+Math.imul(Ue,nr)|0,m=m+Math.imul(Ue,$e)|0,_=_+Math.imul(gt,sr)|0,l=l+Math.imul(gt,Xe)|0,l=l+Math.imul(De,sr)|0,m=m+Math.imul(De,Xe)|0,_=_+Math.imul(Wt,Ht)|0,l=l+Math.imul(Wt,Ye)|0,l=l+Math.imul(Ke,Ht)|0,m=m+Math.imul(Ke,Ye)|0,_=_+Math.imul(rt,or)|0,l=l+Math.imul(rt,Ze)|0,l=l+Math.imul(Re,or)|0,m=m+Math.imul(Re,Ze)|0,_=_+Math.imul(St,ur)|0,l=l+Math.imul(St,Je)|0,l=l+Math.imul(Oe,ur)|0,m=m+Math.imul(Oe,Je)|0,_=_+Math.imul(Ee,lr)|0,l=l+Math.imul(Ee,Qe)|0,l=l+Math.imul(me,lr)|0,m=m+Math.imul(me,Qe)|0;var Ms=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,_=Math.imul(Lt,$t),l=Math.imul(Lt,Ge),l=l+Math.imul(qe,$t)|0,m=Math.imul(qe,Ge),_=_+Math.imul(Ot,nr)|0,l=l+Math.imul(Ot,$e)|0,l=l+Math.imul(Le,nr)|0,m=m+Math.imul(Le,$e)|0,_=_+Math.imul(Qt,sr)|0,l=l+Math.imul(Qt,Xe)|0,l=l+Math.imul(Ue,sr)|0,m=m+Math.imul(Ue,Xe)|0,_=_+Math.imul(gt,Ht)|0,l=l+Math.imul(gt,Ye)|0,l=l+Math.imul(De,Ht)|0,m=m+Math.imul(De,Ye)|0,_=_+Math.imul(Wt,or)|0,l=l+Math.imul(Wt,Ze)|0,l=l+Math.imul(Ke,or)|0,m=m+Math.imul(Ke,Ze)|0,_=_+Math.imul(rt,ur)|0,l=l+Math.imul(rt,Je)|0,l=l+Math.imul(Re,ur)|0,m=m+Math.imul(Re,Je)|0,_=_+Math.imul(St,lr)|0,l=l+Math.imul(St,Qe)|0,l=l+Math.imul(Oe,lr)|0,m=m+Math.imul(Oe,Qe)|0;var Cs=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Cs>>>26)|0,Cs&=67108863,_=Math.imul(Lt,nr),l=Math.imul(Lt,$e),l=l+Math.imul(qe,nr)|0,m=Math.imul(qe,$e),_=_+Math.imul(Ot,sr)|0,l=l+Math.imul(Ot,Xe)|0,l=l+Math.imul(Le,sr)|0,m=m+Math.imul(Le,Xe)|0,_=_+Math.imul(Qt,Ht)|0,l=l+Math.imul(Qt,Ye)|0,l=l+Math.imul(Ue,Ht)|0,m=m+Math.imul(Ue,Ye)|0,_=_+Math.imul(gt,or)|0,l=l+Math.imul(gt,Ze)|0,l=l+Math.imul(De,or)|0,m=m+Math.imul(De,Ze)|0,_=_+Math.imul(Wt,ur)|0,l=l+Math.imul(Wt,Je)|0,l=l+Math.imul(Ke,ur)|0,m=m+Math.imul(Ke,Je)|0,_=_+Math.imul(rt,lr)|0,l=l+Math.imul(rt,Qe)|0,l=l+Math.imul(Re,lr)|0,m=m+Math.imul(Re,Qe)|0;var rs=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(rs>>>26)|0,rs&=67108863,_=Math.imul(Lt,sr),l=Math.imul(Lt,Xe),l=l+Math.imul(qe,sr)|0,m=Math.imul(qe,Xe),_=_+Math.imul(Ot,Ht)|0,l=l+Math.imul(Ot,Ye)|0,l=l+Math.imul(Le,Ht)|0,m=m+Math.imul(Le,Ye)|0,_=_+Math.imul(Qt,or)|0,l=l+Math.imul(Qt,Ze)|0,l=l+Math.imul(Ue,or)|0,m=m+Math.imul(Ue,Ze)|0,_=_+Math.imul(gt,ur)|0,l=l+Math.imul(gt,Je)|0,l=l+Math.imul(De,ur)|0,m=m+Math.imul(De,Je)|0,_=_+Math.imul(Wt,lr)|0,l=l+Math.imul(Wt,Qe)|0,l=l+Math.imul(Ke,lr)|0,m=m+Math.imul(Ke,Qe)|0;var is=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(is>>>26)|0,is&=67108863,_=Math.imul(Lt,Ht),l=Math.imul(Lt,Ye),l=l+Math.imul(qe,Ht)|0,m=Math.imul(qe,Ye),_=_+Math.imul(Ot,or)|0,l=l+Math.imul(Ot,Ze)|0,l=l+Math.imul(Le,or)|0,m=m+Math.imul(Le,Ze)|0,_=_+Math.imul(Qt,ur)|0,l=l+Math.imul(Qt,Je)|0,l=l+Math.imul(Ue,ur)|0,m=m+Math.imul(Ue,Je)|0,_=_+Math.imul(gt,lr)|0,l=l+Math.imul(gt,Qe)|0,l=l+Math.imul(De,lr)|0,m=m+Math.imul(De,Qe)|0;var ns=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(ns>>>26)|0,ns&=67108863,_=Math.imul(Lt,or),l=Math.imul(Lt,Ze),l=l+Math.imul(qe,or)|0,m=Math.imul(qe,Ze),_=_+Math.imul(Ot,ur)|0,l=l+Math.imul(Ot,Je)|0,l=l+Math.imul(Le,ur)|0,m=m+Math.imul(Le,Je)|0,_=_+Math.imul(Qt,lr)|0,l=l+Math.imul(Qt,Qe)|0,l=l+Math.imul(Ue,lr)|0,m=m+Math.imul(Ue,Qe)|0;var Ls=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Ls>>>26)|0,Ls&=67108863,_=Math.imul(Lt,ur),l=Math.imul(Lt,Je),l=l+Math.imul(qe,ur)|0,m=Math.imul(qe,Je),_=_+Math.imul(Ot,lr)|0,l=l+Math.imul(Ot,Qe)|0,l=l+Math.imul(Le,lr)|0,m=m+Math.imul(Le,Qe)|0;var Ds=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Ds>>>26)|0,Ds&=67108863,_=Math.imul(Lt,lr),l=Math.imul(Lt,Qe),l=l+Math.imul(qe,lr)|0,m=Math.imul(qe,Qe);var Us=(S+_|0)+((l&8191)<<13)|0;return S=(m+(l>>>13)|0)+(Us>>>26)|0,Us&=67108863,x[0]=jt,x[1]=Is,x[2]=Rs,x[3]=As,x[4]=Os,x[5]=ks,x[6]=Ns,x[7]=sn,x[8]=Ps,x[9]=an,x[10]=Bs,x[11]=Ms,x[12]=Cs,x[13]=rs,x[14]=is,x[15]=ns,x[16]=Ls,x[17]=Ds,x[18]=Us,S!==0&&(x[19]=S,p.length++),p};Math.imul||(M=B);function P(E,f,c){c.negative=f.negative^E.negative,c.length=E.length+f.length;for(var p=0,v=0,g=0;g<c.length-1;g++){var x=v;v=0;for(var S=p&67108863,_=Math.min(g,f.length-1),l=Math.max(0,g-E.length+1);l<=_;l++){var m=g-l,A=E.words[m]|0,U=f.words[l]|0,j=A*U,Z=j&67108863;x=x+(j/67108864|0)|0,Z=Z+S|0,S=Z&67108863,x=x+(Z>>>26)|0,v+=x>>>26,x&=67108863}c.words[g]=S,p=x,x=v}return p!==0?c.words[g]=p:c.length--,c.strip()}function L(E,f,c){var p=new X;return p.mulp(E,f,c)}n.prototype.mulTo=function(f,c){var p,v=this.length+f.length;return this.length===10&&f.length===10?p=M(this,f,c):v<63?p=B(this,f,c):v<1024?p=P(this,f,c):p=L(this,f,c),p};function X(E,f){this.x=E,this.y=f}X.prototype.makeRBT=function(f){for(var c=new Array(f),p=n.prototype._countBits(f)-1,v=0;v<f;v++)c[v]=this.revBin(v,p,f);return c},X.prototype.revBin=function(f,c,p){if(f===0||f===p-1)return f;for(var v=0,g=0;g<c;g++)v|=(f&1)<<c-g-1,f>>=1;return v},X.prototype.permute=function(f,c,p,v,g,x){for(var S=0;S<x;S++)v[S]=c[f[S]],g[S]=p[f[S]]},X.prototype.transform=function(f,c,p,v,g,x){this.permute(x,f,c,p,v,g);for(var S=1;S<g;S<<=1)for(var _=S<<1,l=Math.cos(2*Math.PI/_),m=Math.sin(2*Math.PI/_),A=0;A<g;A+=_)for(var U=l,j=m,Z=0;Z<S;Z++){var se=p[A+Z],ae=v[A+Z],he=p[A+Z+S],Ee=v[A+Z+S],me=U*he-j*Ee;Ee=U*Ee+j*he,he=me,p[A+Z]=se+he,v[A+Z]=ae+Ee,p[A+Z+S]=se-he,v[A+Z+S]=ae-Ee,Z!==_&&(me=l*U-m*j,j=l*j+m*U,U=me)}},X.prototype.guessLen13b=function(f,c){var p=Math.max(c,f)|1,v=p&1,g=0;for(p=p/2|0;p;p=p>>>1)g++;return 1<<g+1+v},X.prototype.conjugate=function(f,c,p){if(!(p<=1))for(var v=0;v<p/2;v++){var g=f[v];f[v]=f[p-v-1],f[p-v-1]=g,g=c[v],c[v]=-c[p-v-1],c[p-v-1]=-g}},X.prototype.normalize13b=function(f,c){for(var p=0,v=0;v<c/2;v++){var g=Math.round(f[2*v+1]/c)*8192+Math.round(f[2*v]/c)+p;f[v]=g&67108863,g<67108864?p=0:p=g/67108864|0}return f},X.prototype.convert13b=function(f,c,p,v){for(var g=0,x=0;x<c;x++)g=g+(f[x]|0),p[2*x]=g&8191,g=g>>>13,p[2*x+1]=g&8191,g=g>>>13;for(x=2*c;x<v;++x)p[x]=0;r(g===0),r((g&-8192)===0)},X.prototype.stub=function(f){for(var c=new Array(f),p=0;p<f;p++)c[p]=0;return c},X.prototype.mulp=function(f,c,p){var v=2*this.guessLen13b(f.length,c.length),g=this.makeRBT(v),x=this.stub(v),S=new Array(v),_=new Array(v),l=new Array(v),m=new Array(v),A=new Array(v),U=new Array(v),j=p.words;j.length=v,this.convert13b(f.words,f.length,S,v),this.convert13b(c.words,c.length,m,v),this.transform(S,x,_,l,v,g),this.transform(m,x,A,U,v,g);for(var Z=0;Z<v;Z++){var se=_[Z]*A[Z]-l[Z]*U[Z];l[Z]=_[Z]*U[Z]+l[Z]*A[Z],_[Z]=se}return this.conjugate(_,l,v),this.transform(_,l,j,x,v,g),this.conjugate(j,x,v),this.normalize13b(j,v),p.negative=f.negative^c.negative,p.length=f.length+c.length,p.strip()},n.prototype.mul=function(f){var c=new n(null);return c.words=new Array(this.length+f.length),this.mulTo(f,c)},n.prototype.mulf=function(f){var c=new n(null);return c.words=new Array(this.length+f.length),L(this,f,c)},n.prototype.imul=function(f){return this.clone().mulTo(f,this)},n.prototype.imuln=function(f){r(typeof f=="number"),r(f<67108864);for(var c=0,p=0;p<this.length;p++){var v=(this.words[p]|0)*f,g=(v&67108863)+(c&67108863);c>>=26,c+=v/67108864|0,c+=g>>>26,this.words[p]=g&67108863}return c!==0&&(this.words[p]=c,this.length++),this},n.prototype.muln=function(f){return this.clone().imuln(f)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(f){var c=I(f);if(c.length===0)return new n(1);for(var p=this,v=0;v<c.length&&c[v]===0;v++,p=p.sqr());if(++v<c.length)for(var g=p.sqr();v<c.length;v++,g=g.sqr())c[v]!==0&&(p=p.mul(g));return p},n.prototype.iushln=function(f){r(typeof f=="number"&&f>=0);var c=f%26,p=(f-c)/26,v=67108863>>>26-c<<26-c,g;if(c!==0){var x=0;for(g=0;g<this.length;g++){var S=this.words[g]&v,_=(this.words[g]|0)-S<<c;this.words[g]=_|x,x=S>>>26-c}x&&(this.words[g]=x,this.length++)}if(p!==0){for(g=this.length-1;g>=0;g--)this.words[g+p]=this.words[g];for(g=0;g<p;g++)this.words[g]=0;this.length+=p}return this.strip()},n.prototype.ishln=function(f){return r(this.negative===0),this.iushln(f)},n.prototype.iushrn=function(f,c,p){r(typeof f=="number"&&f>=0);var v;c?v=(c-c%26)/26:v=0;var g=f%26,x=Math.min((f-g)/26,this.length),S=67108863^67108863>>>g<<g,_=p;if(v-=x,v=Math.max(0,v),_){for(var l=0;l<x;l++)_.words[l]=this.words[l];_.length=x}if(x!==0)if(this.length>x)for(this.length-=x,l=0;l<this.length;l++)this.words[l]=this.words[l+x];else this.words[0]=0,this.length=1;var m=0;for(l=this.length-1;l>=0&&(m!==0||l>=v);l--){var A=this.words[l]|0;this.words[l]=m<<26-g|A>>>g,m=A&S}return _&&m!==0&&(_.words[_.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(f,c,p){return r(this.negative===0),this.iushrn(f,c,p)},n.prototype.shln=function(f){return this.clone().ishln(f)},n.prototype.ushln=function(f){return this.clone().iushln(f)},n.prototype.shrn=function(f){return this.clone().ishrn(f)},n.prototype.ushrn=function(f){return this.clone().iushrn(f)},n.prototype.testn=function(f){r(typeof f=="number"&&f>=0);var c=f%26,p=(f-c)/26,v=1<<c;if(this.length<=p)return!1;var g=this.words[p];return!!(g&v)},n.prototype.imaskn=function(f){r(typeof f=="number"&&f>=0);var c=f%26,p=(f-c)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=p)return this;if(c!==0&&p++,this.length=Math.min(p,this.length),c!==0){var v=67108863^67108863>>>c<<c;this.words[this.length-1]&=v}return this.strip()},n.prototype.maskn=function(f){return this.clone().imaskn(f)},n.prototype.iaddn=function(f){return r(typeof f=="number"),r(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},n.prototype._iaddn=function(f){this.words[0]+=f;for(var c=0;c<this.length&&this.words[c]>=67108864;c++)this.words[c]-=67108864,c===this.length-1?this.words[c+1]=1:this.words[c+1]++;return this.length=Math.max(this.length,c+1),this},n.prototype.isubn=function(f){if(r(typeof f=="number"),r(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var c=0;c<this.length&&this.words[c]<0;c++)this.words[c]+=67108864,this.words[c+1]-=1;return this.strip()},n.prototype.addn=function(f){return this.clone().iaddn(f)},n.prototype.subn=function(f){return this.clone().isubn(f)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(f,c,p){var v=f.length+p,g;this._expand(v);var x,S=0;for(g=0;g<f.length;g++){x=(this.words[g+p]|0)+S;var _=(f.words[g]|0)*c;x-=_&67108863,S=(x>>26)-(_/67108864|0),this.words[g+p]=x&67108863}for(;g<this.length-p;g++)x=(this.words[g+p]|0)+S,S=x>>26,this.words[g+p]=x&67108863;if(S===0)return this.strip();for(r(S===-1),S=0,g=0;g<this.length;g++)x=-(this.words[g]|0)+S,S=x>>26,this.words[g]=x&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(f,c){var p=this.length-f.length,v=this.clone(),g=f,x=g.words[g.length-1]|0,S=this._countBits(x);p=26-S,p!==0&&(g=g.ushln(p),v.iushln(p),x=g.words[g.length-1]|0);var _=v.length-g.length,l;if(c!=="mod"){l=new n(null),l.length=_+1,l.words=new Array(l.length);for(var m=0;m<l.length;m++)l.words[m]=0}var A=v.clone()._ishlnsubmul(g,1,_);A.negative===0&&(v=A,l&&(l.words[_]=1));for(var U=_-1;U>=0;U--){var j=(v.words[g.length+U]|0)*67108864+(v.words[g.length+U-1]|0);for(j=Math.min(j/x|0,67108863),v._ishlnsubmul(g,j,U);v.negative!==0;)j--,v.negative=0,v._ishlnsubmul(g,1,U),v.isZero()||(v.negative^=1);l&&(l.words[U]=j)}return l&&l.strip(),v.strip(),c!=="div"&&p!==0&&v.iushrn(p),{div:l||null,mod:v}},n.prototype.divmod=function(f,c,p){if(r(!f.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var v,g,x;return this.negative!==0&&f.negative===0?(x=this.neg().divmod(f,c),c!=="mod"&&(v=x.div.neg()),c!=="div"&&(g=x.mod.neg(),p&&g.negative!==0&&g.iadd(f)),{div:v,mod:g}):this.negative===0&&f.negative!==0?(x=this.divmod(f.neg(),c),c!=="mod"&&(v=x.div.neg()),{div:v,mod:x.mod}):this.negative&f.negative?(x=this.neg().divmod(f.neg(),c),c!=="div"&&(g=x.mod.neg(),p&&g.negative!==0&&g.isub(f)),{div:x.div,mod:g}):f.length>this.length||this.cmp(f)<0?{div:new n(0),mod:this}:f.length===1?c==="div"?{div:this.divn(f.words[0]),mod:null}:c==="mod"?{div:null,mod:new n(this.modn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new n(this.modn(f.words[0]))}:this._wordDiv(f,c)},n.prototype.div=function(f){return this.divmod(f,"div",!1).div},n.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},n.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},n.prototype.divRound=function(f){var c=this.divmod(f);if(c.mod.isZero())return c.div;var p=c.div.negative!==0?c.mod.isub(f):c.mod,v=f.ushrn(1),g=f.andln(1),x=p.cmp(v);return x<0||g===1&&x===0?c.div:c.div.negative!==0?c.div.isubn(1):c.div.iaddn(1)},n.prototype.modn=function(f){r(f<=67108863);for(var c=(1<<26)%f,p=0,v=this.length-1;v>=0;v--)p=(c*p+(this.words[v]|0))%f;return p},n.prototype.idivn=function(f){r(f<=67108863);for(var c=0,p=this.length-1;p>=0;p--){var v=(this.words[p]|0)+c*67108864;this.words[p]=v/f|0,c=v%f}return this.strip()},n.prototype.divn=function(f){return this.clone().idivn(f)},n.prototype.egcd=function(f){r(f.negative===0),r(!f.isZero());var c=this,p=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var v=new n(1),g=new n(0),x=new n(0),S=new n(1),_=0;c.isEven()&&p.isEven();)c.iushrn(1),p.iushrn(1),++_;for(var l=p.clone(),m=c.clone();!c.isZero();){for(var A=0,U=1;!(c.words[0]&U)&&A<26;++A,U<<=1);if(A>0)for(c.iushrn(A);A-- >0;)(v.isOdd()||g.isOdd())&&(v.iadd(l),g.isub(m)),v.iushrn(1),g.iushrn(1);for(var j=0,Z=1;!(p.words[0]&Z)&&j<26;++j,Z<<=1);if(j>0)for(p.iushrn(j);j-- >0;)(x.isOdd()||S.isOdd())&&(x.iadd(l),S.isub(m)),x.iushrn(1),S.iushrn(1);c.cmp(p)>=0?(c.isub(p),v.isub(x),g.isub(S)):(p.isub(c),x.isub(v),S.isub(g))}return{a:x,b:S,gcd:p.iushln(_)}},n.prototype._invmp=function(f){r(f.negative===0),r(!f.isZero());var c=this,p=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var v=new n(1),g=new n(0),x=p.clone();c.cmpn(1)>0&&p.cmpn(1)>0;){for(var S=0,_=1;!(c.words[0]&_)&&S<26;++S,_<<=1);if(S>0)for(c.iushrn(S);S-- >0;)v.isOdd()&&v.iadd(x),v.iushrn(1);for(var l=0,m=1;!(p.words[0]&m)&&l<26;++l,m<<=1);if(l>0)for(p.iushrn(l);l-- >0;)g.isOdd()&&g.iadd(x),g.iushrn(1);c.cmp(p)>=0?(c.isub(p),v.isub(g)):(p.isub(c),g.isub(v))}var A;return c.cmpn(1)===0?A=v:A=g,A.cmpn(0)<0&&A.iadd(f),A},n.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var c=this.clone(),p=f.clone();c.negative=0,p.negative=0;for(var v=0;c.isEven()&&p.isEven();v++)c.iushrn(1),p.iushrn(1);do{for(;c.isEven();)c.iushrn(1);for(;p.isEven();)p.iushrn(1);var g=c.cmp(p);if(g<0){var x=c;c=p,p=x}else if(g===0||p.cmpn(1)===0)break;c.isub(p)}while(!0);return p.iushln(v)},n.prototype.invm=function(f){return this.egcd(f).a.umod(f)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(f){return this.words[0]&f},n.prototype.bincn=function(f){r(typeof f=="number");var c=f%26,p=(f-c)/26,v=1<<c;if(this.length<=p)return this._expand(p+1),this.words[p]|=v,this;for(var g=v,x=p;g!==0&&x<this.length;x++){var S=this.words[x]|0;S+=g,g=S>>>26,S&=67108863,this.words[x]=S}return g!==0&&(this.words[x]=g,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(f){var c=f<0;if(this.negative!==0&&!c)return-1;if(this.negative===0&&c)return 1;this.strip();var p;if(this.length>1)p=1;else{c&&(f=-f),r(f<=67108863,"Number is too big");var v=this.words[0]|0;p=v===f?0:v<f?-1:1}return this.negative!==0?-p|0:p},n.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return-1;if(this.negative===0&&f.negative!==0)return 1;var c=this.ucmp(f);return this.negative!==0?-c|0:c},n.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return-1;for(var c=0,p=this.length-1;p>=0;p--){var v=this.words[p]|0,g=f.words[p]|0;if(v!==g){v<g?c=-1:v>g&&(c=1);break}}return c},n.prototype.gtn=function(f){return this.cmpn(f)===1},n.prototype.gt=function(f){return this.cmp(f)===1},n.prototype.gten=function(f){return this.cmpn(f)>=0},n.prototype.gte=function(f){return this.cmp(f)>=0},n.prototype.ltn=function(f){return this.cmpn(f)===-1},n.prototype.lt=function(f){return this.cmp(f)===-1},n.prototype.lten=function(f){return this.cmpn(f)<=0},n.prototype.lte=function(f){return this.cmp(f)<=0},n.prototype.eqn=function(f){return this.cmpn(f)===0},n.prototype.eq=function(f){return this.cmp(f)===0},n.red=function(f){return new be(f)},n.prototype.toRed=function(f){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(f){return this.red=f,this},n.prototype.forceRed=function(f){return r(!this.red,"Already a number in reduction context"),this._forceRed(f)},n.prototype.redAdd=function(f){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},n.prototype.redIAdd=function(f){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},n.prototype.redSub=function(f){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},n.prototype.redISub=function(f){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},n.prototype.redShl=function(f){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},n.prototype.redMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},n.prototype.redIMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(f){return r(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var V={k256:null,p224:null,p192:null,p25519:null};function q(E,f){this.name=E,this.p=new n(f,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}q.prototype._tmp=function(){var f=new n(null);return f.words=new Array(Math.ceil(this.n/13)),f},q.prototype.ireduce=function(f){var c=f,p;do this.split(c,this.tmp),c=this.imulK(c),c=c.iadd(this.tmp),p=c.bitLength();while(p>this.n);var v=p<this.n?-1:c.ucmp(this.p);return v===0?(c.words[0]=0,c.length=1):v>0?c.isub(this.p):c.strip(),c},q.prototype.split=function(f,c){f.iushrn(this.n,0,c)},q.prototype.imulK=function(f){return f.imul(this.k)};function ee(){q.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(ee,q),ee.prototype.split=function(f,c){for(var p=4194303,v=Math.min(f.length,9),g=0;g<v;g++)c.words[g]=f.words[g];if(c.length=v,f.length<=9){f.words[0]=0,f.length=1;return}var x=f.words[9];for(c.words[c.length++]=x&p,g=10;g<f.length;g++){var S=f.words[g]|0;f.words[g-10]=(S&p)<<4|x>>>22,x=S}x>>>=22,f.words[g-10]=x,x===0&&f.length>10?f.length-=10:f.length-=9},ee.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var c=0,p=0;p<f.length;p++){var v=f.words[p]|0;c+=v*977,f.words[p]=c&67108863,c=v*64+(c/67108864|0)}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function fe(){q.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(fe,q);function _e(){q.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(_e,q);function Te(){q.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(Te,q),Te.prototype.imulK=function(f){for(var c=0,p=0;p<f.length;p++){var v=(f.words[p]|0)*19+c,g=v&67108863;v>>>=26,f.words[p]=g,c=v}return c!==0&&(f.words[f.length++]=c),f},n._prime=function(f){if(V[f])return V[f];var c;if(f==="k256")c=new ee;else if(f==="p224")c=new fe;else if(f==="p192")c=new _e;else if(f==="p25519")c=new Te;else throw new Error("Unknown prime "+f);return V[f]=c,c};function be(E){if(typeof E=="string"){var f=n._prime(E);this.m=f.p,this.prime=f}else r(E.gtn(1),"modulus must be greater than 1"),this.m=E,this.prime=null}be.prototype._verify1=function(f){r(f.negative===0,"red works only with positives"),r(f.red,"red works only with red numbers")},be.prototype._verify2=function(f,c){r((f.negative|c.negative)===0,"red works only with positives"),r(f.red&&f.red===c.red,"red works only with red numbers")},be.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):f.umod(this.m)._forceRed(this)},be.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},be.prototype.add=function(f,c){this._verify2(f,c);var p=f.add(c);return p.cmp(this.m)>=0&&p.isub(this.m),p._forceRed(this)},be.prototype.iadd=function(f,c){this._verify2(f,c);var p=f.iadd(c);return p.cmp(this.m)>=0&&p.isub(this.m),p},be.prototype.sub=function(f,c){this._verify2(f,c);var p=f.sub(c);return p.cmpn(0)<0&&p.iadd(this.m),p._forceRed(this)},be.prototype.isub=function(f,c){this._verify2(f,c);var p=f.isub(c);return p.cmpn(0)<0&&p.iadd(this.m),p},be.prototype.shl=function(f,c){return this._verify1(f),this.imod(f.ushln(c))},be.prototype.imul=function(f,c){return this._verify2(f,c),this.imod(f.imul(c))},be.prototype.mul=function(f,c){return this._verify2(f,c),this.imod(f.mul(c))},be.prototype.isqr=function(f){return this.imul(f,f.clone())},be.prototype.sqr=function(f){return this.mul(f,f)},be.prototype.sqrt=function(f){if(f.isZero())return f.clone();var c=this.m.andln(3);if(r(c%2===1),c===3){var p=this.m.add(new n(1)).iushrn(2);return this.pow(f,p)}for(var v=this.m.subn(1),g=0;!v.isZero()&&v.andln(1)===0;)g++,v.iushrn(1);r(!v.isZero());var x=new n(1).toRed(this),S=x.redNeg(),_=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new n(2*l*l).toRed(this);this.pow(l,_).cmp(S)!==0;)l.redIAdd(S);for(var m=this.pow(l,v),A=this.pow(f,v.addn(1).iushrn(1)),U=this.pow(f,v),j=g;U.cmp(x)!==0;){for(var Z=U,se=0;Z.cmp(x)!==0;se++)Z=Z.redSqr();r(se<j);var ae=this.pow(m,new n(1).iushln(j-se-1));A=A.redMul(ae),m=ae.redSqr(),U=U.redMul(m),j=se}return A},be.prototype.invm=function(f){var c=f._invmp(this.m);return c.negative!==0?(c.negative=0,this.imod(c).redNeg()):this.imod(c)},be.prototype.pow=function(f,c){if(c.isZero())return new n(1).toRed(this);if(c.cmpn(1)===0)return f.clone();var p=4,v=new Array(1<<p);v[0]=new n(1).toRed(this),v[1]=f;for(var g=2;g<v.length;g++)v[g]=this.mul(v[g-1],f);var x=v[0],S=0,_=0,l=c.bitLength()%26;for(l===0&&(l=26),g=c.length-1;g>=0;g--){for(var m=c.words[g],A=l-1;A>=0;A--){var U=m>>A&1;if(x!==v[0]&&(x=this.sqr(x)),U===0&&S===0){_=0;continue}S<<=1,S|=U,_++,!(_!==p&&(g!==0||A!==0))&&(x=this.mul(x,v[S]),_=0,S=0)}l=26}return x},be.prototype.convertTo=function(f){var c=f.umod(this.m);return c===f?c.clone():c},be.prototype.convertFrom=function(f){var c=f.clone();return c.red=null,c},n.mont=function(f){return new O(f)};function O(E){be.call(this,E),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(O,be),O.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},O.prototype.convertFrom=function(f){var c=this.imod(f.mul(this.rinv));return c.red=null,c},O.prototype.imul=function(f,c){if(f.isZero()||c.isZero())return f.words[0]=0,f.length=1,f;var p=f.imul(c),v=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=p.isub(v).iushrn(this.shift),x=g;return g.cmp(this.m)>=0?x=g.isub(this.m):g.cmpn(0)<0&&(x=g.iadd(this.m)),x._forceRed(this)},O.prototype.mul=function(f,c){if(f.isZero()||c.isZero())return new n(0)._forceRed(this);var p=f.mul(c),v=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=p.isub(v).iushrn(this.shift),x=g;return g.cmp(this.m)>=0?x=g.isub(this.m):g.cmpn(0)<0&&(x=g.iadd(this.m)),x._forceRed(this)},O.prototype.invm=function(f){var c=this.imod(f._invmp(this.m).mul(this.r2));return c._forceRed(this)}})(typeof ug>"u"||ug,OS)});var xt=W((ru,cl)=>{(function(){var e,t="4.17.21",r=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",n="Expected a function",a="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",h=500,b="__lodash_placeholder__",w=1,T=2,I=4,B=1,M=2,P=1,L=2,X=4,V=8,q=16,ee=32,fe=64,_e=128,Te=256,be=512,O=30,E="...",f=800,c=16,p=1,v=2,g=3,x=1/0,S=9007199254740991,_=17976931348623157e292,l=NaN,m=4294967295,A=m-1,U=m>>>1,j=[["ary",_e],["bind",P],["bindKey",L],["curry",V],["curryRight",q],["flip",be],["partial",ee],["partialRight",fe],["rearg",Te]],Z="[object Arguments]",se="[object Array]",ae="[object AsyncFunction]",he="[object Boolean]",Ee="[object Date]",me="[object DOMException]",dt="[object Error]",St="[object Function]",Oe="[object GeneratorFunction]",st="[object Map]",rt="[object Number]",Re="[object Null]",Ae="[object Object]",Wt="[object Promise]",Ke="[object Proxy]",At="[object RegExp]",gt="[object Set]",De="[object String]",Pt="[object Symbol]",Qt="[object Undefined]",Ue="[object WeakMap]",er="[object WeakSet]",Ot="[object ArrayBuffer]",Le="[object DataView]",Ct="[object Float32Array]",Lt="[object Float64Array]",qe="[object Int8Array]",Dt="[object Int16Array]",Ut="[object Int32Array]",Fe="[object Uint8Array]",qt="[object Uint8ClampedArray]",Ft="[object Uint16Array]",He="[object Uint32Array]",tr=/\b__p \+= '';/g,rr=/\b(__p \+=) '' \+/g,We=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Gt=/&(?:amp|lt|gt|quot|#39);/g,$t=/[&<>"']/g,Ge=RegExp(Gt.source),ir=RegExp($t.source),nr=/<%-([\s\S]+?)%>/g,$e=/<%([\s\S]+?)%>/g,Xt=/<%=([\s\S]+?)%>/g,sr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xe=/^\w*$/,ar=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ht=/[\\^$.*+?()[\]{}|]/g,Ye=RegExp(Ht.source),zt=/^\s+/,or=/\s/,Ze=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,cr=/\{\n\/\* \[wrapped with (.+)\] \*/,ur=/,? & /,Je=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fr=/[()=,{}\[\]\/\s]/,lr=/\\(\\)?/g,Qe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,jt=/\w*$/,Is=/^[-+]0x[0-9a-f]+$/i,Rs=/^0b[01]+$/i,As=/^\[object .+?Constructor\]$/,Os=/^0o[0-7]+$/i,ks=/^(?:0|[1-9]\d*)$/,Ns=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,sn=/($^)/,Ps=/['\n\r\u2028\u2029\\]/g,an="\\ud800-\\udfff",Bs="\\u0300-\\u036f",Ms="\\ufe20-\\ufe2f",Cs="\\u20d0-\\u20ff",rs=Bs+Ms+Cs,is="\\u2700-\\u27bf",ns="a-z\\xdf-\\xf6\\xf8-\\xff",Ls="\\xac\\xb1\\xd7\\xf7",Ds="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Us="\\u2000-\\u206f",Vu=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",gx="A-Z\\xc0-\\xd6\\xd8-\\xde",bx="\\ufe0e\\ufe0f",xx=Ls+Ds+Us+Vu,Zd="['\u2019]",LT="["+an+"]",_x="["+xx+"]",Yl="["+rs+"]",yx="\\d+",DT="["+is+"]",wx="["+ns+"]",Sx="[^"+an+xx+yx+is+ns+gx+"]",Jd="\\ud83c[\\udffb-\\udfff]",UT="(?:"+Yl+"|"+Jd+")",Ex="[^"+an+"]",Qd="(?:\\ud83c[\\udde6-\\uddff]){2}",e0="[\\ud800-\\udbff][\\udc00-\\udfff]",yc="["+gx+"]",Tx="\\u200d",Ix="(?:"+wx+"|"+Sx+")",qT="(?:"+yc+"|"+Sx+")",Rx="(?:"+Zd+"(?:d|ll|m|re|s|t|ve))?",Ax="(?:"+Zd+"(?:D|LL|M|RE|S|T|VE))?",Ox=UT+"?",kx="["+bx+"]?",FT="(?:"+Tx+"(?:"+[Ex,Qd,e0].join("|")+")"+kx+Ox+")*",HT="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",zT="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Nx=kx+Ox+FT,jT="(?:"+[DT,Qd,e0].join("|")+")"+Nx,VT="(?:"+[Ex+Yl+"?",Yl,Qd,e0,LT].join("|")+")",KT=RegExp(Zd,"g"),WT=RegExp(Yl,"g"),t0=RegExp(Jd+"(?="+Jd+")|"+VT+Nx,"g"),GT=RegExp([yc+"?"+wx+"+"+Rx+"(?="+[_x,yc,"$"].join("|")+")",qT+"+"+Ax+"(?="+[_x,yc+Ix,"$"].join("|")+")",yc+"?"+Ix+"+"+Rx,yc+"+"+Ax,zT,HT,yx,jT].join("|"),"g"),$T=RegExp("["+Tx+an+rs+bx+"]"),XT=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,YT=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ZT=-1,pr={};pr[Ct]=pr[Lt]=pr[qe]=pr[Dt]=pr[Ut]=pr[Fe]=pr[qt]=pr[Ft]=pr[He]=!0,pr[Z]=pr[se]=pr[Ot]=pr[he]=pr[Le]=pr[Ee]=pr[dt]=pr[St]=pr[st]=pr[rt]=pr[Ae]=pr[At]=pr[gt]=pr[De]=pr[Ue]=!1;var Yt={};Yt[Z]=Yt[se]=Yt[Ot]=Yt[Le]=Yt[he]=Yt[Ee]=Yt[Ct]=Yt[Lt]=Yt[qe]=Yt[Dt]=Yt[Ut]=Yt[st]=Yt[rt]=Yt[Ae]=Yt[At]=Yt[gt]=Yt[De]=Yt[Pt]=Yt[Fe]=Yt[qt]=Yt[Ft]=Yt[He]=!0,Yt[dt]=Yt[St]=Yt[Ue]=!1;var JT={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},QT={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},eI={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},tI={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},rI=parseFloat,iI=parseInt,Px=typeof global=="object"&&global&&global.Object===Object&&global,nI=typeof self=="object"&&self&&self.Object===Object&&self,$r=Px||nI||Function("return this")(),r0=typeof ru=="object"&&ru&&!ru.nodeType&&ru,vo=r0&&typeof cl=="object"&&cl&&!cl.nodeType&&cl,Bx=vo&&vo.exports===r0,i0=Bx&&Px.process,on=function(){try{var F=vo&&vo.require&&vo.require("util").types;return F||i0&&i0.binding&&i0.binding("util")}catch{}}(),Mx=on&&on.isArrayBuffer,Cx=on&&on.isDate,Lx=on&&on.isMap,Dx=on&&on.isRegExp,Ux=on&&on.isSet,qx=on&&on.isTypedArray;function Vi(F,Q,$){switch($.length){case 0:return F.call(Q);case 1:return F.call(Q,$[0]);case 2:return F.call(Q,$[0],$[1]);case 3:return F.call(Q,$[0],$[1],$[2])}return F.apply(Q,$)}function sI(F,Q,$,ye){for(var ze=-1,Tt=F==null?0:F.length;++ze<Tt;){var Hr=F[ze];Q(ye,Hr,$(Hr),F)}return ye}function cn(F,Q){for(var $=-1,ye=F==null?0:F.length;++$<ye&&Q(F[$],$,F)!==!1;);return F}function aI(F,Q){for(var $=F==null?0:F.length;$--&&Q(F[$],$,F)!==!1;);return F}function Fx(F,Q){for(var $=-1,ye=F==null?0:F.length;++$<ye;)if(!Q(F[$],$,F))return!1;return!0}function xa(F,Q){for(var $=-1,ye=F==null?0:F.length,ze=0,Tt=[];++$<ye;){var Hr=F[$];Q(Hr,$,F)&&(Tt[ze++]=Hr)}return Tt}function Zl(F,Q){var $=F==null?0:F.length;return!!$&&wc(F,Q,0)>-1}function n0(F,Q,$){for(var ye=-1,ze=F==null?0:F.length;++ye<ze;)if($(Q,F[ye]))return!0;return!1}function vr(F,Q){for(var $=-1,ye=F==null?0:F.length,ze=Array(ye);++$<ye;)ze[$]=Q(F[$],$,F);return ze}function _a(F,Q){for(var $=-1,ye=Q.length,ze=F.length;++$<ye;)F[ze+$]=Q[$];return F}function s0(F,Q,$,ye){var ze=-1,Tt=F==null?0:F.length;for(ye&&Tt&&($=F[++ze]);++ze<Tt;)$=Q($,F[ze],ze,F);return $}function oI(F,Q,$,ye){var ze=F==null?0:F.length;for(ye&&ze&&($=F[--ze]);ze--;)$=Q($,F[ze],ze,F);return $}function a0(F,Q){for(var $=-1,ye=F==null?0:F.length;++$<ye;)if(Q(F[$],$,F))return!0;return!1}var cI=o0("length");function uI(F){return F.split("")}function fI(F){return F.match(Je)||[]}function Hx(F,Q,$){var ye;return $(F,function(ze,Tt,Hr){if(Q(ze,Tt,Hr))return ye=Tt,!1}),ye}function Jl(F,Q,$,ye){for(var ze=F.length,Tt=$+(ye?1:-1);ye?Tt--:++Tt<ze;)if(Q(F[Tt],Tt,F))return Tt;return-1}function wc(F,Q,$){return Q===Q?wI(F,Q,$):Jl(F,zx,$)}function lI(F,Q,$,ye){for(var ze=$-1,Tt=F.length;++ze<Tt;)if(ye(F[ze],Q))return ze;return-1}function zx(F){return F!==F}function jx(F,Q){var $=F==null?0:F.length;return $?u0(F,Q)/$:l}function o0(F){return function(Q){return Q==null?e:Q[F]}}function c0(F){return function(Q){return F==null?e:F[Q]}}function Vx(F,Q,$,ye,ze){return ze(F,function(Tt,Hr,Vt){$=ye?(ye=!1,Tt):Q($,Tt,Hr,Vt)}),$}function pI(F,Q){var $=F.length;for(F.sort(Q);$--;)F[$]=F[$].value;return F}function u0(F,Q){for(var $,ye=-1,ze=F.length;++ye<ze;){var Tt=Q(F[ye]);Tt!==e&&($=$===e?Tt:$+Tt)}return $}function f0(F,Q){for(var $=-1,ye=Array(F);++$<F;)ye[$]=Q($);return ye}function hI(F,Q){return vr(Q,function($){return[$,F[$]]})}function Kx(F){return F&&F.slice(0,Xx(F)+1).replace(zt,"")}function Ki(F){return function(Q){return F(Q)}}function l0(F,Q){return vr(Q,function($){return F[$]})}function Ku(F,Q){return F.has(Q)}function Wx(F,Q){for(var $=-1,ye=F.length;++$<ye&&wc(Q,F[$],0)>-1;);return $}function Gx(F,Q){for(var $=F.length;$--&&wc(Q,F[$],0)>-1;);return $}function dI(F,Q){for(var $=F.length,ye=0;$--;)F[$]===Q&&++ye;return ye}var mI=c0(JT),vI=c0(QT);function gI(F){return"\\"+tI[F]}function bI(F,Q){return F==null?e:F[Q]}function Sc(F){return $T.test(F)}function xI(F){return XT.test(F)}function _I(F){for(var Q,$=[];!(Q=F.next()).done;)$.push(Q.value);return $}function p0(F){var Q=-1,$=Array(F.size);return F.forEach(function(ye,ze){$[++Q]=[ze,ye]}),$}function $x(F,Q){return function($){return F(Q($))}}function ya(F,Q){for(var $=-1,ye=F.length,ze=0,Tt=[];++$<ye;){var Hr=F[$];(Hr===Q||Hr===b)&&(F[$]=b,Tt[ze++]=$)}return Tt}function Ql(F){var Q=-1,$=Array(F.size);return F.forEach(function(ye){$[++Q]=ye}),$}function yI(F){var Q=-1,$=Array(F.size);return F.forEach(function(ye){$[++Q]=[ye,ye]}),$}function wI(F,Q,$){for(var ye=$-1,ze=F.length;++ye<ze;)if(F[ye]===Q)return ye;return-1}function SI(F,Q,$){for(var ye=$+1;ye--;)if(F[ye]===Q)return ye;return ye}function Ec(F){return Sc(F)?TI(F):cI(F)}function Pn(F){return Sc(F)?II(F):uI(F)}function Xx(F){for(var Q=F.length;Q--&&or.test(F.charAt(Q)););return Q}var EI=c0(eI);function TI(F){for(var Q=t0.lastIndex=0;t0.test(F);)++Q;return Q}function II(F){return F.match(t0)||[]}function RI(F){return F.match(GT)||[]}var AI=function F(Q){Q=Q==null?$r:wa.defaults($r.Object(),Q,wa.pick($r,YT));var $=Q.Array,ye=Q.Date,ze=Q.Error,Tt=Q.Function,Hr=Q.Math,Vt=Q.Object,h0=Q.RegExp,OI=Q.String,un=Q.TypeError,ep=$.prototype,kI=Tt.prototype,Tc=Vt.prototype,tp=Q["__core-js_shared__"],rp=kI.toString,kt=Tc.hasOwnProperty,NI=0,Yx=function(){var s=/[^.]+$/.exec(tp&&tp.keys&&tp.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),ip=Tc.toString,PI=rp.call(Vt),BI=$r._,MI=h0("^"+rp.call(kt).replace(Ht,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),np=Bx?Q.Buffer:e,Sa=Q.Symbol,sp=Q.Uint8Array,Zx=np?np.allocUnsafe:e,ap=$x(Vt.getPrototypeOf,Vt),Jx=Vt.create,Qx=Tc.propertyIsEnumerable,op=ep.splice,e1=Sa?Sa.isConcatSpreadable:e,Wu=Sa?Sa.iterator:e,go=Sa?Sa.toStringTag:e,cp=function(){try{var s=wo(Vt,"defineProperty");return s({},"",{}),s}catch{}}(),CI=Q.clearTimeout!==$r.clearTimeout&&Q.clearTimeout,LI=ye&&ye.now!==$r.Date.now&&ye.now,DI=Q.setTimeout!==$r.setTimeout&&Q.setTimeout,up=Hr.ceil,fp=Hr.floor,d0=Vt.getOwnPropertySymbols,UI=np?np.isBuffer:e,t1=Q.isFinite,qI=ep.join,FI=$x(Vt.keys,Vt),zr=Hr.max,ui=Hr.min,HI=ye.now,zI=Q.parseInt,r1=Hr.random,jI=ep.reverse,m0=wo(Q,"DataView"),Gu=wo(Q,"Map"),v0=wo(Q,"Promise"),Ic=wo(Q,"Set"),$u=wo(Q,"WeakMap"),Xu=wo(Vt,"create"),lp=$u&&new $u,Rc={},VI=So(m0),KI=So(Gu),WI=So(v0),GI=So(Ic),$I=So($u),pp=Sa?Sa.prototype:e,Yu=pp?pp.valueOf:e,i1=pp?pp.toString:e;function k(s){if(_r(s)&&!et(s)&&!(s instanceof mt)){if(s instanceof fn)return s;if(kt.call(s,"__wrapped__"))return n_(s)}return new fn(s)}var Ac=function(){function s(){}return function(o){if(!br(o))return{};if(Jx)return Jx(o);s.prototype=o;var d=new s;return s.prototype=e,d}}();function hp(){}function fn(s,o){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=e}k.templateSettings={escape:nr,evaluate:$e,interpolate:Xt,variable:"",imports:{_:k}},k.prototype=hp.prototype,k.prototype.constructor=k,fn.prototype=Ac(hp.prototype),fn.prototype.constructor=fn;function mt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function XI(){var s=new mt(this.__wrapped__);return s.__actions__=Ti(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Ti(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Ti(this.__views__),s}function YI(){if(this.__filtered__){var s=new mt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function ZI(){var s=this.__wrapped__.value(),o=this.__dir__,d=et(s),y=o<0,R=d?s.length:0,N=uA(0,R,this.__views__),C=N.start,D=N.end,H=D-C,te=y?D:C-1,re=this.__iteratees__,oe=re.length,de=0,Ie=ui(H,this.__takeCount__);if(!d||!y&&R==H&&Ie==H)return R1(s,this.__actions__);var Be=[];e:for(;H--&&de<Ie;){te+=o;for(var ft=-1,Me=s[te];++ft<oe;){var ht=re[ft],bt=ht.iteratee,$i=ht.type,xi=bt(Me);if($i==v)Me=xi;else if(!xi){if($i==p)continue e;break e}}Be[de++]=Me}return Be}mt.prototype=Ac(hp.prototype),mt.prototype.constructor=mt;function bo(s){var o=-1,d=s==null?0:s.length;for(this.clear();++o<d;){var y=s[o];this.set(y[0],y[1])}}function JI(){this.__data__=Xu?Xu(null):{},this.size=0}function QI(s){var o=this.has(s)&&delete this.__data__[s];return this.size-=o?1:0,o}function eR(s){var o=this.__data__;if(Xu){var d=o[s];return d===u?e:d}return kt.call(o,s)?o[s]:e}function tR(s){var o=this.__data__;return Xu?o[s]!==e:kt.call(o,s)}function rR(s,o){var d=this.__data__;return this.size+=this.has(s)?0:1,d[s]=Xu&&o===e?u:o,this}bo.prototype.clear=JI,bo.prototype.delete=QI,bo.prototype.get=eR,bo.prototype.has=tR,bo.prototype.set=rR;function qs(s){var o=-1,d=s==null?0:s.length;for(this.clear();++o<d;){var y=s[o];this.set(y[0],y[1])}}function iR(){this.__data__=[],this.size=0}function nR(s){var o=this.__data__,d=dp(o,s);if(d<0)return!1;var y=o.length-1;return d==y?o.pop():op.call(o,d,1),--this.size,!0}function sR(s){var o=this.__data__,d=dp(o,s);return d<0?e:o[d][1]}function aR(s){return dp(this.__data__,s)>-1}function oR(s,o){var d=this.__data__,y=dp(d,s);return y<0?(++this.size,d.push([s,o])):d[y][1]=o,this}qs.prototype.clear=iR,qs.prototype.delete=nR,qs.prototype.get=sR,qs.prototype.has=aR,qs.prototype.set=oR;function Fs(s){var o=-1,d=s==null?0:s.length;for(this.clear();++o<d;){var y=s[o];this.set(y[0],y[1])}}function cR(){this.size=0,this.__data__={hash:new bo,map:new(Gu||qs),string:new bo}}function uR(s){var o=Ip(this,s).delete(s);return this.size-=o?1:0,o}function fR(s){return Ip(this,s).get(s)}function lR(s){return Ip(this,s).has(s)}function pR(s,o){var d=Ip(this,s),y=d.size;return d.set(s,o),this.size+=d.size==y?0:1,this}Fs.prototype.clear=cR,Fs.prototype.delete=uR,Fs.prototype.get=fR,Fs.prototype.has=lR,Fs.prototype.set=pR;function xo(s){var o=-1,d=s==null?0:s.length;for(this.__data__=new Fs;++o<d;)this.add(s[o])}function hR(s){return this.__data__.set(s,u),this}function dR(s){return this.__data__.has(s)}xo.prototype.add=xo.prototype.push=hR,xo.prototype.has=dR;function Bn(s){var o=this.__data__=new qs(s);this.size=o.size}function mR(){this.__data__=new qs,this.size=0}function vR(s){var o=this.__data__,d=o.delete(s);return this.size=o.size,d}function gR(s){return this.__data__.get(s)}function bR(s){return this.__data__.has(s)}function xR(s,o){var d=this.__data__;if(d instanceof qs){var y=d.__data__;if(!Gu||y.length<r-1)return y.push([s,o]),this.size=++d.size,this;d=this.__data__=new Fs(y)}return d.set(s,o),this.size=d.size,this}Bn.prototype.clear=mR,Bn.prototype.delete=vR,Bn.prototype.get=gR,Bn.prototype.has=bR,Bn.prototype.set=xR;function n1(s,o){var d=et(s),y=!d&&Eo(s),R=!d&&!y&&Aa(s),N=!d&&!y&&!R&&Pc(s),C=d||y||R||N,D=C?f0(s.length,OI):[],H=D.length;for(var te in s)(o||kt.call(s,te))&&!(C&&(te=="length"||R&&(te=="offset"||te=="parent")||N&&(te=="buffer"||te=="byteLength"||te=="byteOffset")||Vs(te,H)))&&D.push(te);return D}function s1(s){var o=s.length;return o?s[R0(0,o-1)]:e}function _R(s,o){return Rp(Ti(s),_o(o,0,s.length))}function yR(s){return Rp(Ti(s))}function g0(s,o,d){(d!==e&&!Mn(s[o],d)||d===e&&!(o in s))&&Hs(s,o,d)}function Zu(s,o,d){var y=s[o];(!(kt.call(s,o)&&Mn(y,d))||d===e&&!(o in s))&&Hs(s,o,d)}function dp(s,o){for(var d=s.length;d--;)if(Mn(s[d][0],o))return d;return-1}function wR(s,o,d,y){return Ea(s,function(R,N,C){o(y,R,d(R),C)}),y}function a1(s,o){return s&&as(o,Xr(o),s)}function SR(s,o){return s&&as(o,Ri(o),s)}function Hs(s,o,d){o=="__proto__"&&cp?cp(s,o,{configurable:!0,enumerable:!0,value:d,writable:!0}):s[o]=d}function b0(s,o){for(var d=-1,y=o.length,R=$(y),N=s==null;++d<y;)R[d]=N?e:J0(s,o[d]);return R}function _o(s,o,d){return s===s&&(d!==e&&(s=s<=d?s:d),o!==e&&(s=s>=o?s:o)),s}function ln(s,o,d,y,R,N){var C,D=o&w,H=o&T,te=o&I;if(d&&(C=R?d(s,y,R,N):d(s)),C!==e)return C;if(!br(s))return s;var re=et(s);if(re){if(C=lA(s),!D)return Ti(s,C)}else{var oe=fi(s),de=oe==St||oe==Oe;if(Aa(s))return k1(s,D);if(oe==Ae||oe==Z||de&&!R){if(C=H||de?{}:X1(s),!D)return H?eA(s,SR(C,s)):QR(s,a1(C,s))}else{if(!Yt[oe])return R?s:{};C=pA(s,oe,D)}}N||(N=new Bn);var Ie=N.get(s);if(Ie)return Ie;N.set(s,C),E_(s)?s.forEach(function(Me){C.add(ln(Me,o,d,Me,s,N))}):w_(s)&&s.forEach(function(Me,ht){C.set(ht,ln(Me,o,d,ht,s,N))});var Be=te?H?U0:D0:H?Ri:Xr,ft=re?e:Be(s);return cn(ft||s,function(Me,ht){ft&&(ht=Me,Me=s[ht]),Zu(C,ht,ln(Me,o,d,ht,s,N))}),C}function ER(s){var o=Xr(s);return function(d){return o1(d,s,o)}}function o1(s,o,d){var y=d.length;if(s==null)return!y;for(s=Vt(s);y--;){var R=d[y],N=o[R],C=s[R];if(C===e&&!(R in s)||!N(C))return!1}return!0}function c1(s,o,d){if(typeof s!="function")throw new un(n);return sf(function(){s.apply(e,d)},o)}function Ju(s,o,d,y){var R=-1,N=Zl,C=!0,D=s.length,H=[],te=o.length;if(!D)return H;d&&(o=vr(o,Ki(d))),y?(N=n0,C=!1):o.length>=r&&(N=Ku,C=!1,o=new xo(o));e:for(;++R<D;){var re=s[R],oe=d==null?re:d(re);if(re=y||re!==0?re:0,C&&oe===oe){for(var de=te;de--;)if(o[de]===oe)continue e;H.push(re)}else N(o,oe,y)||H.push(re)}return H}var Ea=C1(ss),u1=C1(_0,!0);function TR(s,o){var d=!0;return Ea(s,function(y,R,N){return d=!!o(y,R,N),d}),d}function mp(s,o,d){for(var y=-1,R=s.length;++y<R;){var N=s[y],C=o(N);if(C!=null&&(D===e?C===C&&!Gi(C):d(C,D)))var D=C,H=N}return H}function IR(s,o,d,y){var R=s.length;for(d=at(d),d<0&&(d=-d>R?0:R+d),y=y===e||y>R?R:at(y),y<0&&(y+=R),y=d>y?0:I_(y);d<y;)s[d++]=o;return s}function f1(s,o){var d=[];return Ea(s,function(y,R,N){o(y,R,N)&&d.push(y)}),d}function ii(s,o,d,y,R){var N=-1,C=s.length;for(d||(d=dA),R||(R=[]);++N<C;){var D=s[N];o>0&&d(D)?o>1?ii(D,o-1,d,y,R):_a(R,D):y||(R[R.length]=D)}return R}var x0=L1(),l1=L1(!0);function ss(s,o){return s&&x0(s,o,Xr)}function _0(s,o){return s&&l1(s,o,Xr)}function vp(s,o){return xa(o,function(d){return Ks(s[d])})}function yo(s,o){o=Ia(o,s);for(var d=0,y=o.length;s!=null&&d<y;)s=s[os(o[d++])];return d&&d==y?s:e}function p1(s,o,d){var y=o(s);return et(s)?y:_a(y,d(s))}function gi(s){return s==null?s===e?Qt:Re:go&&go in Vt(s)?cA(s):yA(s)}function y0(s,o){return s>o}function RR(s,o){return s!=null&&kt.call(s,o)}function AR(s,o){return s!=null&&o in Vt(s)}function OR(s,o,d){return s>=ui(o,d)&&s<zr(o,d)}function w0(s,o,d){for(var y=d?n0:Zl,R=s[0].length,N=s.length,C=N,D=$(N),H=1/0,te=[];C--;){var re=s[C];C&&o&&(re=vr(re,Ki(o))),H=ui(re.length,H),D[C]=!d&&(o||R>=120&&re.length>=120)?new xo(C&&re):e}re=s[0];var oe=-1,de=D[0];e:for(;++oe<R&&te.length<H;){var Ie=re[oe],Be=o?o(Ie):Ie;if(Ie=d||Ie!==0?Ie:0,!(de?Ku(de,Be):y(te,Be,d))){for(C=N;--C;){var ft=D[C];if(!(ft?Ku(ft,Be):y(s[C],Be,d)))continue e}de&&de.push(Be),te.push(Ie)}}return te}function kR(s,o,d,y){return ss(s,function(R,N,C){o(y,d(R),N,C)}),y}function Qu(s,o,d){o=Ia(o,s),s=Q1(s,o);var y=s==null?s:s[os(hn(o))];return y==null?e:Vi(y,s,d)}function h1(s){return _r(s)&&gi(s)==Z}function NR(s){return _r(s)&&gi(s)==Ot}function PR(s){return _r(s)&&gi(s)==Ee}function ef(s,o,d,y,R){return s===o?!0:s==null||o==null||!_r(s)&&!_r(o)?s!==s&&o!==o:BR(s,o,d,y,ef,R)}function BR(s,o,d,y,R,N){var C=et(s),D=et(o),H=C?se:fi(s),te=D?se:fi(o);H=H==Z?Ae:H,te=te==Z?Ae:te;var re=H==Ae,oe=te==Ae,de=H==te;if(de&&Aa(s)){if(!Aa(o))return!1;C=!0,re=!1}if(de&&!re)return N||(N=new Bn),C||Pc(s)?W1(s,o,d,y,R,N):aA(s,o,H,d,y,R,N);if(!(d&B)){var Ie=re&&kt.call(s,"__wrapped__"),Be=oe&&kt.call(o,"__wrapped__");if(Ie||Be){var ft=Ie?s.value():s,Me=Be?o.value():o;return N||(N=new Bn),R(ft,Me,d,y,N)}}return de?(N||(N=new Bn),oA(s,o,d,y,R,N)):!1}function MR(s){return _r(s)&&fi(s)==st}function S0(s,o,d,y){var R=d.length,N=R,C=!y;if(s==null)return!N;for(s=Vt(s);R--;){var D=d[R];if(C&&D[2]?D[1]!==s[D[0]]:!(D[0]in s))return!1}for(;++R<N;){D=d[R];var H=D[0],te=s[H],re=D[1];if(C&&D[2]){if(te===e&&!(H in s))return!1}else{var oe=new Bn;if(y)var de=y(te,re,H,s,o,oe);if(!(de===e?ef(re,te,B|M,y,oe):de))return!1}}return!0}function d1(s){if(!br(s)||vA(s))return!1;var o=Ks(s)?MI:As;return o.test(So(s))}function CR(s){return _r(s)&&gi(s)==At}function LR(s){return _r(s)&&fi(s)==gt}function DR(s){return _r(s)&&Bp(s.length)&&!!pr[gi(s)]}function m1(s){return typeof s=="function"?s:s==null?Ai:typeof s=="object"?et(s)?b1(s[0],s[1]):g1(s):D_(s)}function E0(s){if(!nf(s))return FI(s);var o=[];for(var d in Vt(s))kt.call(s,d)&&d!="constructor"&&o.push(d);return o}function UR(s){if(!br(s))return _A(s);var o=nf(s),d=[];for(var y in s)y=="constructor"&&(o||!kt.call(s,y))||d.push(y);return d}function T0(s,o){return s<o}function v1(s,o){var d=-1,y=Ii(s)?$(s.length):[];return Ea(s,function(R,N,C){y[++d]=o(R,N,C)}),y}function g1(s){var o=F0(s);return o.length==1&&o[0][2]?Z1(o[0][0],o[0][1]):function(d){return d===s||S0(d,s,o)}}function b1(s,o){return z0(s)&&Y1(o)?Z1(os(s),o):function(d){var y=J0(d,s);return y===e&&y===o?Q0(d,s):ef(o,y,B|M)}}function gp(s,o,d,y,R){s!==o&&x0(o,function(N,C){if(R||(R=new Bn),br(N))qR(s,o,C,d,gp,y,R);else{var D=y?y(V0(s,C),N,C+"",s,o,R):e;D===e&&(D=N),g0(s,C,D)}},Ri)}function qR(s,o,d,y,R,N,C){var D=V0(s,d),H=V0(o,d),te=C.get(H);if(te){g0(s,d,te);return}var re=N?N(D,H,d+"",s,o,C):e,oe=re===e;if(oe){var de=et(H),Ie=!de&&Aa(H),Be=!de&&!Ie&&Pc(H);re=H,de||Ie||Be?et(D)?re=D:Er(D)?re=Ti(D):Ie?(oe=!1,re=k1(H,!0)):Be?(oe=!1,re=N1(H,!0)):re=[]:af(H)||Eo(H)?(re=D,Eo(D)?re=R_(D):(!br(D)||Ks(D))&&(re=X1(H))):oe=!1}oe&&(C.set(H,re),R(re,H,y,N,C),C.delete(H)),g0(s,d,re)}function x1(s,o){var d=s.length;if(d)return o+=o<0?d:0,Vs(o,d)?s[o]:e}function _1(s,o,d){o.length?o=vr(o,function(N){return et(N)?function(C){return yo(C,N.length===1?N[0]:N)}:N}):o=[Ai];var y=-1;o=vr(o,Ki(Ne()));var R=v1(s,function(N,C,D){var H=vr(o,function(te){return te(N)});return{criteria:H,index:++y,value:N}});return pI(R,function(N,C){return JR(N,C,d)})}function FR(s,o){return y1(s,o,function(d,y){return Q0(s,y)})}function y1(s,o,d){for(var y=-1,R=o.length,N={};++y<R;){var C=o[y],D=yo(s,C);d(D,C)&&tf(N,Ia(C,s),D)}return N}function HR(s){return function(o){return yo(o,s)}}function I0(s,o,d,y){var R=y?lI:wc,N=-1,C=o.length,D=s;for(s===o&&(o=Ti(o)),d&&(D=vr(s,Ki(d)));++N<C;)for(var H=0,te=o[N],re=d?d(te):te;(H=R(D,re,H,y))>-1;)D!==s&&op.call(D,H,1),op.call(s,H,1);return s}function w1(s,o){for(var d=s?o.length:0,y=d-1;d--;){var R=o[d];if(d==y||R!==N){var N=R;Vs(R)?op.call(s,R,1):k0(s,R)}}return s}function R0(s,o){return s+fp(r1()*(o-s+1))}function zR(s,o,d,y){for(var R=-1,N=zr(up((o-s)/(d||1)),0),C=$(N);N--;)C[y?N:++R]=s,s+=d;return C}function A0(s,o){var d="";if(!s||o<1||o>S)return d;do o%2&&(d+=s),o=fp(o/2),o&&(s+=s);while(o);return d}function lt(s,o){return K0(J1(s,o,Ai),s+"")}function jR(s){return s1(Bc(s))}function VR(s,o){var d=Bc(s);return Rp(d,_o(o,0,d.length))}function tf(s,o,d,y){if(!br(s))return s;o=Ia(o,s);for(var R=-1,N=o.length,C=N-1,D=s;D!=null&&++R<N;){var H=os(o[R]),te=d;if(H==="__proto__"||H==="constructor"||H==="prototype")return s;if(R!=C){var re=D[H];te=y?y(re,H,D):e,te===e&&(te=br(re)?re:Vs(o[R+1])?[]:{})}Zu(D,H,te),D=D[H]}return s}var S1=lp?function(s,o){return lp.set(s,o),s}:Ai,KR=cp?function(s,o){return cp(s,"toString",{configurable:!0,enumerable:!1,value:tm(o),writable:!0})}:Ai;function WR(s){return Rp(Bc(s))}function pn(s,o,d){var y=-1,R=s.length;o<0&&(o=-o>R?0:R+o),d=d>R?R:d,d<0&&(d+=R),R=o>d?0:d-o>>>0,o>>>=0;for(var N=$(R);++y<R;)N[y]=s[y+o];return N}function GR(s,o){var d;return Ea(s,function(y,R,N){return d=o(y,R,N),!d}),!!d}function bp(s,o,d){var y=0,R=s==null?y:s.length;if(typeof o=="number"&&o===o&&R<=U){for(;y<R;){var N=y+R>>>1,C=s[N];C!==null&&!Gi(C)&&(d?C<=o:C<o)?y=N+1:R=N}return R}return O0(s,o,Ai,d)}function O0(s,o,d,y){var R=0,N=s==null?0:s.length;if(N===0)return 0;o=d(o);for(var C=o!==o,D=o===null,H=Gi(o),te=o===e;R<N;){var re=fp((R+N)/2),oe=d(s[re]),de=oe!==e,Ie=oe===null,Be=oe===oe,ft=Gi(oe);if(C)var Me=y||Be;else te?Me=Be&&(y||de):D?Me=Be&&de&&(y||!Ie):H?Me=Be&&de&&!Ie&&(y||!ft):Ie||ft?Me=!1:Me=y?oe<=o:oe<o;Me?R=re+1:N=re}return ui(N,A)}function E1(s,o){for(var d=-1,y=s.length,R=0,N=[];++d<y;){var C=s[d],D=o?o(C):C;if(!d||!Mn(D,H)){var H=D;N[R++]=C===0?0:C}}return N}function T1(s){return typeof s=="number"?s:Gi(s)?l:+s}function Wi(s){if(typeof s=="string")return s;if(et(s))return vr(s,Wi)+"";if(Gi(s))return i1?i1.call(s):"";var o=s+"";return o=="0"&&1/s==-x?"-0":o}function Ta(s,o,d){var y=-1,R=Zl,N=s.length,C=!0,D=[],H=D;if(d)C=!1,R=n0;else if(N>=r){var te=o?null:nA(s);if(te)return Ql(te);C=!1,R=Ku,H=new xo}else H=o?[]:D;e:for(;++y<N;){var re=s[y],oe=o?o(re):re;if(re=d||re!==0?re:0,C&&oe===oe){for(var de=H.length;de--;)if(H[de]===oe)continue e;o&&H.push(oe),D.push(re)}else R(H,oe,d)||(H!==D&&H.push(oe),D.push(re))}return D}function k0(s,o){return o=Ia(o,s),s=Q1(s,o),s==null||delete s[os(hn(o))]}function I1(s,o,d,y){return tf(s,o,d(yo(s,o)),y)}function xp(s,o,d,y){for(var R=s.length,N=y?R:-1;(y?N--:++N<R)&&o(s[N],N,s););return d?pn(s,y?0:N,y?N+1:R):pn(s,y?N+1:0,y?R:N)}function R1(s,o){var d=s;return d instanceof mt&&(d=d.value()),s0(o,function(y,R){return R.func.apply(R.thisArg,_a([y],R.args))},d)}function N0(s,o,d){var y=s.length;if(y<2)return y?Ta(s[0]):[];for(var R=-1,N=$(y);++R<y;)for(var C=s[R],D=-1;++D<y;)D!=R&&(N[R]=Ju(N[R]||C,s[D],o,d));return Ta(ii(N,1),o,d)}function A1(s,o,d){for(var y=-1,R=s.length,N=o.length,C={};++y<R;){var D=y<N?o[y]:e;d(C,s[y],D)}return C}function P0(s){return Er(s)?s:[]}function B0(s){return typeof s=="function"?s:Ai}function Ia(s,o){return et(s)?s:z0(s,o)?[s]:i_(Rt(s))}var $R=lt;function Ra(s,o,d){var y=s.length;return d=d===e?y:d,!o&&d>=y?s:pn(s,o,d)}var O1=CI||function(s){return $r.clearTimeout(s)};function k1(s,o){if(o)return s.slice();var d=s.length,y=Zx?Zx(d):new s.constructor(d);return s.copy(y),y}function M0(s){var o=new s.constructor(s.byteLength);return new sp(o).set(new sp(s)),o}function XR(s,o){var d=o?M0(s.buffer):s.buffer;return new s.constructor(d,s.byteOffset,s.byteLength)}function YR(s){var o=new s.constructor(s.source,jt.exec(s));return o.lastIndex=s.lastIndex,o}function ZR(s){return Yu?Vt(Yu.call(s)):{}}function N1(s,o){var d=o?M0(s.buffer):s.buffer;return new s.constructor(d,s.byteOffset,s.length)}function P1(s,o){if(s!==o){var d=s!==e,y=s===null,R=s===s,N=Gi(s),C=o!==e,D=o===null,H=o===o,te=Gi(o);if(!D&&!te&&!N&&s>o||N&&C&&H&&!D&&!te||y&&C&&H||!d&&H||!R)return 1;if(!y&&!N&&!te&&s<o||te&&d&&R&&!y&&!N||D&&d&&R||!C&&R||!H)return-1}return 0}function JR(s,o,d){for(var y=-1,R=s.criteria,N=o.criteria,C=R.length,D=d.length;++y<C;){var H=P1(R[y],N[y]);if(H){if(y>=D)return H;var te=d[y];return H*(te=="desc"?-1:1)}}return s.index-o.index}function B1(s,o,d,y){for(var R=-1,N=s.length,C=d.length,D=-1,H=o.length,te=zr(N-C,0),re=$(H+te),oe=!y;++D<H;)re[D]=o[D];for(;++R<C;)(oe||R<N)&&(re[d[R]]=s[R]);for(;te--;)re[D++]=s[R++];return re}function M1(s,o,d,y){for(var R=-1,N=s.length,C=-1,D=d.length,H=-1,te=o.length,re=zr(N-D,0),oe=$(re+te),de=!y;++R<re;)oe[R]=s[R];for(var Ie=R;++H<te;)oe[Ie+H]=o[H];for(;++C<D;)(de||R<N)&&(oe[Ie+d[C]]=s[R++]);return oe}function Ti(s,o){var d=-1,y=s.length;for(o||(o=$(y));++d<y;)o[d]=s[d];return o}function as(s,o,d,y){var R=!d;d||(d={});for(var N=-1,C=o.length;++N<C;){var D=o[N],H=y?y(d[D],s[D],D,d,s):e;H===e&&(H=s[D]),R?Hs(d,D,H):Zu(d,D,H)}return d}function QR(s,o){return as(s,H0(s),o)}function eA(s,o){return as(s,G1(s),o)}function _p(s,o){return function(d,y){var R=et(d)?sI:wR,N=o?o():{};return R(d,s,Ne(y,2),N)}}function Oc(s){return lt(function(o,d){var y=-1,R=d.length,N=R>1?d[R-1]:e,C=R>2?d[2]:e;for(N=s.length>3&&typeof N=="function"?(R--,N):e,C&&bi(d[0],d[1],C)&&(N=R<3?e:N,R=1),o=Vt(o);++y<R;){var D=d[y];D&&s(o,D,y,N)}return o})}function C1(s,o){return function(d,y){if(d==null)return d;if(!Ii(d))return s(d,y);for(var R=d.length,N=o?R:-1,C=Vt(d);(o?N--:++N<R)&&y(C[N],N,C)!==!1;);return d}}function L1(s){return function(o,d,y){for(var R=-1,N=Vt(o),C=y(o),D=C.length;D--;){var H=C[s?D:++R];if(d(N[H],H,N)===!1)break}return o}}function tA(s,o,d){var y=o&P,R=rf(s);function N(){var C=this&&this!==$r&&this instanceof N?R:s;return C.apply(y?d:this,arguments)}return N}function D1(s){return function(o){o=Rt(o);var d=Sc(o)?Pn(o):e,y=d?d[0]:o.charAt(0),R=d?Ra(d,1).join(""):o.slice(1);return y[s]()+R}}function kc(s){return function(o){return s0(C_(M_(o).replace(KT,"")),s,"")}}function rf(s){return function(){var o=arguments;switch(o.length){case 0:return new s;case 1:return new s(o[0]);case 2:return new s(o[0],o[1]);case 3:return new s(o[0],o[1],o[2]);case 4:return new s(o[0],o[1],o[2],o[3]);case 5:return new s(o[0],o[1],o[2],o[3],o[4]);case 6:return new s(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new s(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var d=Ac(s.prototype),y=s.apply(d,o);return br(y)?y:d}}function rA(s,o,d){var y=rf(s);function R(){for(var N=arguments.length,C=$(N),D=N,H=Nc(R);D--;)C[D]=arguments[D];var te=N<3&&C[0]!==H&&C[N-1]!==H?[]:ya(C,H);if(N-=te.length,N<d)return z1(s,o,yp,R.placeholder,e,C,te,e,e,d-N);var re=this&&this!==$r&&this instanceof R?y:s;return Vi(re,this,C)}return R}function U1(s){return function(o,d,y){var R=Vt(o);if(!Ii(o)){var N=Ne(d,3);o=Xr(o),d=function(D){return N(R[D],D,R)}}var C=s(o,d,y);return C>-1?R[N?o[C]:C]:e}}function q1(s){return js(function(o){var d=o.length,y=d,R=fn.prototype.thru;for(s&&o.reverse();y--;){var N=o[y];if(typeof N!="function")throw new un(n);if(R&&!C&&Tp(N)=="wrapper")var C=new fn([],!0)}for(y=C?y:d;++y<d;){N=o[y];var D=Tp(N),H=D=="wrapper"?q0(N):e;H&&j0(H[0])&&H[1]==(_e|V|ee|Te)&&!H[4].length&&H[9]==1?C=C[Tp(H[0])].apply(C,H[3]):C=N.length==1&&j0(N)?C[D]():C.thru(N)}return function(){var te=arguments,re=te[0];if(C&&te.length==1&&et(re))return C.plant(re).value();for(var oe=0,de=d?o[oe].apply(this,te):re;++oe<d;)de=o[oe].call(this,de);return de}})}function yp(s,o,d,y,R,N,C,D,H,te){var re=o&_e,oe=o&P,de=o&L,Ie=o&(V|q),Be=o&be,ft=de?e:rf(s);function Me(){for(var ht=arguments.length,bt=$(ht),$i=ht;$i--;)bt[$i]=arguments[$i];if(Ie)var xi=Nc(Me),Xi=dI(bt,xi);if(y&&(bt=B1(bt,y,R,Ie)),N&&(bt=M1(bt,N,C,Ie)),ht-=Xi,Ie&&ht<te){var Tr=ya(bt,xi);return z1(s,o,yp,Me.placeholder,d,bt,Tr,D,H,te-ht)}var Cn=oe?d:this,Gs=de?Cn[s]:s;return ht=bt.length,D?bt=wA(bt,D):Be&&ht>1&&bt.reverse(),re&&H<ht&&(bt.length=H),this&&this!==$r&&this instanceof Me&&(Gs=ft||rf(Gs)),Gs.apply(Cn,bt)}return Me}function F1(s,o){return function(d,y){return kR(d,s,o(y),{})}}function wp(s,o){return function(d,y){var R;if(d===e&&y===e)return o;if(d!==e&&(R=d),y!==e){if(R===e)return y;typeof d=="string"||typeof y=="string"?(d=Wi(d),y=Wi(y)):(d=T1(d),y=T1(y)),R=s(d,y)}return R}}function C0(s){return js(function(o){return o=vr(o,Ki(Ne())),lt(function(d){var y=this;return s(o,function(R){return Vi(R,y,d)})})})}function Sp(s,o){o=o===e?" ":Wi(o);var d=o.length;if(d<2)return d?A0(o,s):o;var y=A0(o,up(s/Ec(o)));return Sc(o)?Ra(Pn(y),0,s).join(""):y.slice(0,s)}function iA(s,o,d,y){var R=o&P,N=rf(s);function C(){for(var D=-1,H=arguments.length,te=-1,re=y.length,oe=$(re+H),de=this&&this!==$r&&this instanceof C?N:s;++te<re;)oe[te]=y[te];for(;H--;)oe[te++]=arguments[++D];return Vi(de,R?d:this,oe)}return C}function H1(s){return function(o,d,y){return y&&typeof y!="number"&&bi(o,d,y)&&(d=y=e),o=Ws(o),d===e?(d=o,o=0):d=Ws(d),y=y===e?o<d?1:-1:Ws(y),zR(o,d,y,s)}}function Ep(s){return function(o,d){return typeof o=="string"&&typeof d=="string"||(o=dn(o),d=dn(d)),s(o,d)}}function z1(s,o,d,y,R,N,C,D,H,te){var re=o&V,oe=re?C:e,de=re?e:C,Ie=re?N:e,Be=re?e:N;o|=re?ee:fe,o&=~(re?fe:ee),o&X||(o&=~(P|L));var ft=[s,o,R,Ie,oe,Be,de,D,H,te],Me=d.apply(e,ft);return j0(s)&&e_(Me,ft),Me.placeholder=y,t_(Me,s,o)}function L0(s){var o=Hr[s];return function(d,y){if(d=dn(d),y=y==null?0:ui(at(y),292),y&&t1(d)){var R=(Rt(d)+"e").split("e"),N=o(R[0]+"e"+(+R[1]+y));return R=(Rt(N)+"e").split("e"),+(R[0]+"e"+(+R[1]-y))}return o(d)}}var nA=Ic&&1/Ql(new Ic([,-0]))[1]==x?function(s){return new Ic(s)}:nm;function j1(s){return function(o){var d=fi(o);return d==st?p0(o):d==gt?yI(o):hI(o,s(o))}}function zs(s,o,d,y,R,N,C,D){var H=o&L;if(!H&&typeof s!="function")throw new un(n);var te=y?y.length:0;if(te||(o&=~(ee|fe),y=R=e),C=C===e?C:zr(at(C),0),D=D===e?D:at(D),te-=R?R.length:0,o&fe){var re=y,oe=R;y=R=e}var de=H?e:q0(s),Ie=[s,o,d,y,R,re,oe,N,C,D];if(de&&xA(Ie,de),s=Ie[0],o=Ie[1],d=Ie[2],y=Ie[3],R=Ie[4],D=Ie[9]=Ie[9]===e?H?0:s.length:zr(Ie[9]-te,0),!D&&o&(V|q)&&(o&=~(V|q)),!o||o==P)var Be=tA(s,o,d);else o==V||o==q?Be=rA(s,o,D):(o==ee||o==(P|ee))&&!R.length?Be=iA(s,o,d,y):Be=yp.apply(e,Ie);var ft=de?S1:e_;return t_(ft(Be,Ie),s,o)}function V1(s,o,d,y){return s===e||Mn(s,Tc[d])&&!kt.call(y,d)?o:s}function K1(s,o,d,y,R,N){return br(s)&&br(o)&&(N.set(o,s),gp(s,o,e,K1,N),N.delete(o)),s}function sA(s){return af(s)?e:s}function W1(s,o,d,y,R,N){var C=d&B,D=s.length,H=o.length;if(D!=H&&!(C&&H>D))return!1;var te=N.get(s),re=N.get(o);if(te&&re)return te==o&&re==s;var oe=-1,de=!0,Ie=d&M?new xo:e;for(N.set(s,o),N.set(o,s);++oe<D;){var Be=s[oe],ft=o[oe];if(y)var Me=C?y(ft,Be,oe,o,s,N):y(Be,ft,oe,s,o,N);if(Me!==e){if(Me)continue;de=!1;break}if(Ie){if(!a0(o,function(ht,bt){if(!Ku(Ie,bt)&&(Be===ht||R(Be,ht,d,y,N)))return Ie.push(bt)})){de=!1;break}}else if(!(Be===ft||R(Be,ft,d,y,N))){de=!1;break}}return N.delete(s),N.delete(o),de}function aA(s,o,d,y,R,N,C){switch(d){case Le:if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case Ot:return!(s.byteLength!=o.byteLength||!N(new sp(s),new sp(o)));case he:case Ee:case rt:return Mn(+s,+o);case dt:return s.name==o.name&&s.message==o.message;case At:case De:return s==o+"";case st:var D=p0;case gt:var H=y&B;if(D||(D=Ql),s.size!=o.size&&!H)return!1;var te=C.get(s);if(te)return te==o;y|=M,C.set(s,o);var re=W1(D(s),D(o),y,R,N,C);return C.delete(s),re;case Pt:if(Yu)return Yu.call(s)==Yu.call(o)}return!1}function oA(s,o,d,y,R,N){var C=d&B,D=D0(s),H=D.length,te=D0(o),re=te.length;if(H!=re&&!C)return!1;for(var oe=H;oe--;){var de=D[oe];if(!(C?de in o:kt.call(o,de)))return!1}var Ie=N.get(s),Be=N.get(o);if(Ie&&Be)return Ie==o&&Be==s;var ft=!0;N.set(s,o),N.set(o,s);for(var Me=C;++oe<H;){de=D[oe];var ht=s[de],bt=o[de];if(y)var $i=C?y(bt,ht,de,o,s,N):y(ht,bt,de,s,o,N);if(!($i===e?ht===bt||R(ht,bt,d,y,N):$i)){ft=!1;break}Me||(Me=de=="constructor")}if(ft&&!Me){var xi=s.constructor,Xi=o.constructor;xi!=Xi&&"constructor"in s&&"constructor"in o&&!(typeof xi=="function"&&xi instanceof xi&&typeof Xi=="function"&&Xi instanceof Xi)&&(ft=!1)}return N.delete(s),N.delete(o),ft}function js(s){return K0(J1(s,e,o_),s+"")}function D0(s){return p1(s,Xr,H0)}function U0(s){return p1(s,Ri,G1)}var q0=lp?function(s){return lp.get(s)}:nm;function Tp(s){for(var o=s.name+"",d=Rc[o],y=kt.call(Rc,o)?d.length:0;y--;){var R=d[y],N=R.func;if(N==null||N==s)return R.name}return o}function Nc(s){var o=kt.call(k,"placeholder")?k:s;return o.placeholder}function Ne(){var s=k.iteratee||rm;return s=s===rm?m1:s,arguments.length?s(arguments[0],arguments[1]):s}function Ip(s,o){var d=s.__data__;return mA(o)?d[typeof o=="string"?"string":"hash"]:d.map}function F0(s){for(var o=Xr(s),d=o.length;d--;){var y=o[d],R=s[y];o[d]=[y,R,Y1(R)]}return o}function wo(s,o){var d=bI(s,o);return d1(d)?d:e}function cA(s){var o=kt.call(s,go),d=s[go];try{s[go]=e;var y=!0}catch{}var R=ip.call(s);return y&&(o?s[go]=d:delete s[go]),R}var H0=d0?function(s){return s==null?[]:(s=Vt(s),xa(d0(s),function(o){return Qx.call(s,o)}))}:sm,G1=d0?function(s){for(var o=[];s;)_a(o,H0(s)),s=ap(s);return o}:sm,fi=gi;(m0&&fi(new m0(new ArrayBuffer(1)))!=Le||Gu&&fi(new Gu)!=st||v0&&fi(v0.resolve())!=Wt||Ic&&fi(new Ic)!=gt||$u&&fi(new $u)!=Ue)&&(fi=function(s){var o=gi(s),d=o==Ae?s.constructor:e,y=d?So(d):"";if(y)switch(y){case VI:return Le;case KI:return st;case WI:return Wt;case GI:return gt;case $I:return Ue}return o});function uA(s,o,d){for(var y=-1,R=d.length;++y<R;){var N=d[y],C=N.size;switch(N.type){case"drop":s+=C;break;case"dropRight":o-=C;break;case"take":o=ui(o,s+C);break;case"takeRight":s=zr(s,o-C);break}}return{start:s,end:o}}function fA(s){var o=s.match(cr);return o?o[1].split(ur):[]}function $1(s,o,d){o=Ia(o,s);for(var y=-1,R=o.length,N=!1;++y<R;){var C=os(o[y]);if(!(N=s!=null&&d(s,C)))break;s=s[C]}return N||++y!=R?N:(R=s==null?0:s.length,!!R&&Bp(R)&&Vs(C,R)&&(et(s)||Eo(s)))}function lA(s){var o=s.length,d=new s.constructor(o);return o&&typeof s[0]=="string"&&kt.call(s,"index")&&(d.index=s.index,d.input=s.input),d}function X1(s){return typeof s.constructor=="function"&&!nf(s)?Ac(ap(s)):{}}function pA(s,o,d){var y=s.constructor;switch(o){case Ot:return M0(s);case he:case Ee:return new y(+s);case Le:return XR(s,d);case Ct:case Lt:case qe:case Dt:case Ut:case Fe:case qt:case Ft:case He:return N1(s,d);case st:return new y;case rt:case De:return new y(s);case At:return YR(s);case gt:return new y;case Pt:return ZR(s)}}function hA(s,o){var d=o.length;if(!d)return s;var y=d-1;return o[y]=(d>1?"& ":"")+o[y],o=o.join(d>2?", ":" "),s.replace(Ze,`{
1
+ "use strict";var U7=Object.create;var Dp=Object.defineProperty;var q7=Object.getOwnPropertyDescriptor;var F7=Object.getOwnPropertyNames;var H7=Object.getPrototypeOf,z7=Object.prototype.hasOwnProperty;var W=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ka=(e,t)=>{for(var r in t)Dp(e,r,{get:t[r],enumerable:!0})},H_=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of F7(t))!z7.call(e,n)&&n!==r&&Dp(e,n,{get:()=>t[n],enumerable:!(i=q7(t,n))||i.enumerable});return e};var Ir=(e,t,r)=>(r=e!=null?U7(H7(e)):{},H_(t||!e||!e.__esModule?Dp(r,"default",{value:e,enumerable:!0}):r,e)),j7=e=>H_(Dp({},"__esModule",{value:!0}),e);var vt=W((Cc,cf)=>{(function(){var e,t="4.17.21",r=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",n="Expected a function",a="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",h=500,b="__lodash_placeholder__",w=1,T=2,I=4,B=1,M=2,P=1,L=2,X=4,V=8,q=16,ee=32,fe=64,_e=128,Te=256,be=512,O=30,E="...",f=800,c=16,p=1,v=2,g=3,x=1/0,S=9007199254740991,_=17976931348623157e292,l=NaN,m=4294967295,A=m-1,U=m>>>1,j=[["ary",_e],["bind",P],["bindKey",L],["curry",V],["curryRight",q],["flip",be],["partial",ee],["partialRight",fe],["rearg",Te]],Z="[object Arguments]",se="[object Array]",ae="[object AsyncFunction]",he="[object Boolean]",Ee="[object Date]",me="[object DOMException]",dt="[object Error]",St="[object Function]",Oe="[object GeneratorFunction]",st="[object Map]",rt="[object Number]",Re="[object Null]",Ae="[object Object]",Wt="[object Promise]",Ke="[object Proxy]",At="[object RegExp]",bt="[object Set]",De="[object String]",Pt="[object Symbol]",Qt="[object Undefined]",Ue="[object WeakMap]",er="[object WeakSet]",Ot="[object ArrayBuffer]",Le="[object DataView]",Ct="[object Float32Array]",Lt="[object Float64Array]",qe="[object Int8Array]",Dt="[object Int16Array]",Ut="[object Int32Array]",Fe="[object Uint8Array]",qt="[object Uint8ClampedArray]",Ft="[object Uint16Array]",He="[object Uint32Array]",tr=/\b__p \+= '';/g,rr=/\b(__p \+=) '' \+/g,We=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Gt=/&(?:amp|lt|gt|quot|#39);/g,$t=/[&<>"']/g,Ge=RegExp(Gt.source),ir=RegExp($t.source),nr=/<%-([\s\S]+?)%>/g,$e=/<%([\s\S]+?)%>/g,Xt=/<%=([\s\S]+?)%>/g,sr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xe=/^\w*$/,ar=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ht=/[\\^$.*+?()[\]{}|]/g,Ye=RegExp(Ht.source),zt=/^\s+/,or=/\s/,Ze=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,cr=/\{\n\/\* \[wrapped with (.+)\] \*/,ur=/,? & /,Je=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fr=/[()=,{}\[\]\/\s]/,lr=/\\(\\)?/g,Qe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,jt=/\w*$/,Rs=/^[-+]0x[0-9a-f]+$/i,As=/^0b[01]+$/i,Os=/^\[object .+?Constructor\]$/,ks=/^0o[0-7]+$/i,Ns=/^(?:0|[1-9]\d*)$/,Ps=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,sn=/($^)/,Bs=/['\n\r\u2028\u2029\\]/g,an="\\ud800-\\udfff",Ms="\\u0300-\\u036f",Cs="\\ufe20-\\ufe2f",Ls="\\u20d0-\\u20ff",is=Ms+Cs+Ls,ns="\\u2700-\\u27bf",ss="a-z\\xdf-\\xf6\\xf8-\\xff",Ds="\\xac\\xb1\\xd7\\xf7",Us="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qs="\\u2000-\\u206f",Ku=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xx="A-Z\\xc0-\\xd6\\xd8-\\xde",_x="\\ufe0e\\ufe0f",yx=Ds+Us+qs+Ku,Qd="['\u2019]",UT="["+an+"]",wx="["+yx+"]",Zl="["+is+"]",Sx="\\d+",qT="["+ns+"]",Ex="["+ss+"]",Tx="[^"+an+yx+Sx+ns+ss+xx+"]",e0="\\ud83c[\\udffb-\\udfff]",FT="(?:"+Zl+"|"+e0+")",Ix="[^"+an+"]",t0="(?:\\ud83c[\\udde6-\\uddff]){2}",r0="[\\ud800-\\udbff][\\udc00-\\udfff]",wc="["+xx+"]",Rx="\\u200d",Ax="(?:"+Ex+"|"+Tx+")",HT="(?:"+wc+"|"+Tx+")",Ox="(?:"+Qd+"(?:d|ll|m|re|s|t|ve))?",kx="(?:"+Qd+"(?:D|LL|M|RE|S|T|VE))?",Nx=FT+"?",Px="["+_x+"]?",zT="(?:"+Rx+"(?:"+[Ix,t0,r0].join("|")+")"+Px+Nx+")*",jT="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",VT="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Bx=Px+Nx+zT,KT="(?:"+[qT,t0,r0].join("|")+")"+Bx,WT="(?:"+[Ix+Zl+"?",Zl,t0,r0,UT].join("|")+")",GT=RegExp(Qd,"g"),$T=RegExp(Zl,"g"),i0=RegExp(e0+"(?="+e0+")|"+WT+Bx,"g"),XT=RegExp([wc+"?"+Ex+"+"+Ox+"(?="+[wx,wc,"$"].join("|")+")",HT+"+"+kx+"(?="+[wx,wc+Ax,"$"].join("|")+")",wc+"?"+Ax+"+"+Ox,wc+"+"+kx,VT,jT,Sx,KT].join("|"),"g"),YT=RegExp("["+Rx+an+is+_x+"]"),ZT=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,JT=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],QT=-1,pr={};pr[Ct]=pr[Lt]=pr[qe]=pr[Dt]=pr[Ut]=pr[Fe]=pr[qt]=pr[Ft]=pr[He]=!0,pr[Z]=pr[se]=pr[Ot]=pr[he]=pr[Le]=pr[Ee]=pr[dt]=pr[St]=pr[st]=pr[rt]=pr[Ae]=pr[At]=pr[bt]=pr[De]=pr[Ue]=!1;var Yt={};Yt[Z]=Yt[se]=Yt[Ot]=Yt[Le]=Yt[he]=Yt[Ee]=Yt[Ct]=Yt[Lt]=Yt[qe]=Yt[Dt]=Yt[Ut]=Yt[st]=Yt[rt]=Yt[Ae]=Yt[At]=Yt[bt]=Yt[De]=Yt[Pt]=Yt[Fe]=Yt[qt]=Yt[Ft]=Yt[He]=!0,Yt[dt]=Yt[St]=Yt[Ue]=!1;var eI={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},tI={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},rI={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},iI={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nI=parseFloat,sI=parseInt,Mx=typeof global=="object"&&global&&global.Object===Object&&global,aI=typeof self=="object"&&self&&self.Object===Object&&self,Xr=Mx||aI||Function("return this")(),n0=typeof Cc=="object"&&Cc&&!Cc.nodeType&&Cc,go=n0&&typeof cf=="object"&&cf&&!cf.nodeType&&cf,Cx=go&&go.exports===n0,s0=Cx&&Mx.process,on=function(){try{var F=go&&go.require&&go.require("util").types;return F||s0&&s0.binding&&s0.binding("util")}catch{}}(),Lx=on&&on.isArrayBuffer,Dx=on&&on.isDate,Ux=on&&on.isMap,qx=on&&on.isRegExp,Fx=on&&on.isSet,Hx=on&&on.isTypedArray;function Vi(F,Q,$){switch($.length){case 0:return F.call(Q);case 1:return F.call(Q,$[0]);case 2:return F.call(Q,$[0],$[1]);case 3:return F.call(Q,$[0],$[1],$[2])}return F.apply(Q,$)}function oI(F,Q,$,ye){for(var ze=-1,Tt=F==null?0:F.length;++ze<Tt;){var zr=F[ze];Q(ye,zr,$(zr),F)}return ye}function cn(F,Q){for(var $=-1,ye=F==null?0:F.length;++$<ye&&Q(F[$],$,F)!==!1;);return F}function cI(F,Q){for(var $=F==null?0:F.length;$--&&Q(F[$],$,F)!==!1;);return F}function zx(F,Q){for(var $=-1,ye=F==null?0:F.length;++$<ye;)if(!Q(F[$],$,F))return!1;return!0}function _a(F,Q){for(var $=-1,ye=F==null?0:F.length,ze=0,Tt=[];++$<ye;){var zr=F[$];Q(zr,$,F)&&(Tt[ze++]=zr)}return Tt}function Jl(F,Q){var $=F==null?0:F.length;return!!$&&Sc(F,Q,0)>-1}function a0(F,Q,$){for(var ye=-1,ze=F==null?0:F.length;++ye<ze;)if($(Q,F[ye]))return!0;return!1}function vr(F,Q){for(var $=-1,ye=F==null?0:F.length,ze=Array(ye);++$<ye;)ze[$]=Q(F[$],$,F);return ze}function ya(F,Q){for(var $=-1,ye=Q.length,ze=F.length;++$<ye;)F[ze+$]=Q[$];return F}function o0(F,Q,$,ye){var ze=-1,Tt=F==null?0:F.length;for(ye&&Tt&&($=F[++ze]);++ze<Tt;)$=Q($,F[ze],ze,F);return $}function uI(F,Q,$,ye){var ze=F==null?0:F.length;for(ye&&ze&&($=F[--ze]);ze--;)$=Q($,F[ze],ze,F);return $}function c0(F,Q){for(var $=-1,ye=F==null?0:F.length;++$<ye;)if(Q(F[$],$,F))return!0;return!1}var fI=u0("length");function lI(F){return F.split("")}function pI(F){return F.match(Je)||[]}function jx(F,Q,$){var ye;return $(F,function(ze,Tt,zr){if(Q(ze,Tt,zr))return ye=Tt,!1}),ye}function Ql(F,Q,$,ye){for(var ze=F.length,Tt=$+(ye?1:-1);ye?Tt--:++Tt<ze;)if(Q(F[Tt],Tt,F))return Tt;return-1}function Sc(F,Q,$){return Q===Q?EI(F,Q,$):Ql(F,Vx,$)}function hI(F,Q,$,ye){for(var ze=$-1,Tt=F.length;++ze<Tt;)if(ye(F[ze],Q))return ze;return-1}function Vx(F){return F!==F}function Kx(F,Q){var $=F==null?0:F.length;return $?l0(F,Q)/$:l}function u0(F){return function(Q){return Q==null?e:Q[F]}}function f0(F){return function(Q){return F==null?e:F[Q]}}function Wx(F,Q,$,ye,ze){return ze(F,function(Tt,zr,Vt){$=ye?(ye=!1,Tt):Q($,Tt,zr,Vt)}),$}function dI(F,Q){var $=F.length;for(F.sort(Q);$--;)F[$]=F[$].value;return F}function l0(F,Q){for(var $,ye=-1,ze=F.length;++ye<ze;){var Tt=Q(F[ye]);Tt!==e&&($=$===e?Tt:$+Tt)}return $}function p0(F,Q){for(var $=-1,ye=Array(F);++$<F;)ye[$]=Q($);return ye}function mI(F,Q){return vr(Q,function($){return[$,F[$]]})}function Gx(F){return F&&F.slice(0,Zx(F)+1).replace(zt,"")}function Ki(F){return function(Q){return F(Q)}}function h0(F,Q){return vr(Q,function($){return F[$]})}function Wu(F,Q){return F.has(Q)}function $x(F,Q){for(var $=-1,ye=F.length;++$<ye&&Sc(Q,F[$],0)>-1;);return $}function Xx(F,Q){for(var $=F.length;$--&&Sc(Q,F[$],0)>-1;);return $}function vI(F,Q){for(var $=F.length,ye=0;$--;)F[$]===Q&&++ye;return ye}var gI=f0(eI),bI=f0(tI);function xI(F){return"\\"+iI[F]}function _I(F,Q){return F==null?e:F[Q]}function Ec(F){return YT.test(F)}function yI(F){return ZT.test(F)}function wI(F){for(var Q,$=[];!(Q=F.next()).done;)$.push(Q.value);return $}function d0(F){var Q=-1,$=Array(F.size);return F.forEach(function(ye,ze){$[++Q]=[ze,ye]}),$}function Yx(F,Q){return function($){return F(Q($))}}function wa(F,Q){for(var $=-1,ye=F.length,ze=0,Tt=[];++$<ye;){var zr=F[$];(zr===Q||zr===b)&&(F[$]=b,Tt[ze++]=$)}return Tt}function ep(F){var Q=-1,$=Array(F.size);return F.forEach(function(ye){$[++Q]=ye}),$}function SI(F){var Q=-1,$=Array(F.size);return F.forEach(function(ye){$[++Q]=[ye,ye]}),$}function EI(F,Q,$){for(var ye=$-1,ze=F.length;++ye<ze;)if(F[ye]===Q)return ye;return-1}function TI(F,Q,$){for(var ye=$+1;ye--;)if(F[ye]===Q)return ye;return ye}function Tc(F){return Ec(F)?RI(F):fI(F)}function Bn(F){return Ec(F)?AI(F):lI(F)}function Zx(F){for(var Q=F.length;Q--&&or.test(F.charAt(Q)););return Q}var II=f0(rI);function RI(F){for(var Q=i0.lastIndex=0;i0.test(F);)++Q;return Q}function AI(F){return F.match(i0)||[]}function OI(F){return F.match(XT)||[]}var kI=function F(Q){Q=Q==null?Xr:Sa.defaults(Xr.Object(),Q,Sa.pick(Xr,JT));var $=Q.Array,ye=Q.Date,ze=Q.Error,Tt=Q.Function,zr=Q.Math,Vt=Q.Object,m0=Q.RegExp,NI=Q.String,un=Q.TypeError,tp=$.prototype,PI=Tt.prototype,Ic=Vt.prototype,rp=Q["__core-js_shared__"],ip=PI.toString,kt=Ic.hasOwnProperty,BI=0,Jx=function(){var s=/[^.]+$/.exec(rp&&rp.keys&&rp.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),np=Ic.toString,MI=ip.call(Vt),CI=Xr._,LI=m0("^"+ip.call(kt).replace(Ht,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),sp=Cx?Q.Buffer:e,Ea=Q.Symbol,ap=Q.Uint8Array,Qx=sp?sp.allocUnsafe:e,op=Yx(Vt.getPrototypeOf,Vt),e1=Vt.create,t1=Ic.propertyIsEnumerable,cp=tp.splice,r1=Ea?Ea.isConcatSpreadable:e,Gu=Ea?Ea.iterator:e,bo=Ea?Ea.toStringTag:e,up=function(){try{var s=So(Vt,"defineProperty");return s({},"",{}),s}catch{}}(),DI=Q.clearTimeout!==Xr.clearTimeout&&Q.clearTimeout,UI=ye&&ye.now!==Xr.Date.now&&ye.now,qI=Q.setTimeout!==Xr.setTimeout&&Q.setTimeout,fp=zr.ceil,lp=zr.floor,v0=Vt.getOwnPropertySymbols,FI=sp?sp.isBuffer:e,i1=Q.isFinite,HI=tp.join,zI=Yx(Vt.keys,Vt),jr=zr.max,ui=zr.min,jI=ye.now,VI=Q.parseInt,n1=zr.random,KI=tp.reverse,g0=So(Q,"DataView"),$u=So(Q,"Map"),b0=So(Q,"Promise"),Rc=So(Q,"Set"),Xu=So(Q,"WeakMap"),Yu=So(Vt,"create"),pp=Xu&&new Xu,Ac={},WI=Eo(g0),GI=Eo($u),$I=Eo(b0),XI=Eo(Rc),YI=Eo(Xu),hp=Ea?Ea.prototype:e,Zu=hp?hp.valueOf:e,s1=hp?hp.toString:e;function k(s){if(_r(s)&&!et(s)&&!(s instanceof mt)){if(s instanceof fn)return s;if(kt.call(s,"__wrapped__"))return a_(s)}return new fn(s)}var Oc=function(){function s(){}return function(o){if(!br(o))return{};if(e1)return e1(o);s.prototype=o;var d=new s;return s.prototype=e,d}}();function dp(){}function fn(s,o){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=e}k.templateSettings={escape:nr,evaluate:$e,interpolate:Xt,variable:"",imports:{_:k}},k.prototype=dp.prototype,k.prototype.constructor=k,fn.prototype=Oc(dp.prototype),fn.prototype.constructor=fn;function mt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function ZI(){var s=new mt(this.__wrapped__);return s.__actions__=Ti(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Ti(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Ti(this.__views__),s}function JI(){if(this.__filtered__){var s=new mt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function QI(){var s=this.__wrapped__.value(),o=this.__dir__,d=et(s),y=o<0,R=d?s.length:0,N=lA(0,R,this.__views__),C=N.start,D=N.end,H=D-C,te=y?D:C-1,re=this.__iteratees__,oe=re.length,de=0,Ie=ui(H,this.__takeCount__);if(!d||!y&&R==H&&Ie==H)return O1(s,this.__actions__);var Be=[];e:for(;H--&&de<Ie;){te+=o;for(var ft=-1,Me=s[te];++ft<oe;){var ht=re[ft],xt=ht.iteratee,$i=ht.type,xi=xt(Me);if($i==v)Me=xi;else if(!xi){if($i==p)continue e;break e}}Be[de++]=Me}return Be}mt.prototype=Oc(dp.prototype),mt.prototype.constructor=mt;function xo(s){var o=-1,d=s==null?0:s.length;for(this.clear();++o<d;){var y=s[o];this.set(y[0],y[1])}}function eR(){this.__data__=Yu?Yu(null):{},this.size=0}function tR(s){var o=this.has(s)&&delete this.__data__[s];return this.size-=o?1:0,o}function rR(s){var o=this.__data__;if(Yu){var d=o[s];return d===u?e:d}return kt.call(o,s)?o[s]:e}function iR(s){var o=this.__data__;return Yu?o[s]!==e:kt.call(o,s)}function nR(s,o){var d=this.__data__;return this.size+=this.has(s)?0:1,d[s]=Yu&&o===e?u:o,this}xo.prototype.clear=eR,xo.prototype.delete=tR,xo.prototype.get=rR,xo.prototype.has=iR,xo.prototype.set=nR;function Fs(s){var o=-1,d=s==null?0:s.length;for(this.clear();++o<d;){var y=s[o];this.set(y[0],y[1])}}function sR(){this.__data__=[],this.size=0}function aR(s){var o=this.__data__,d=mp(o,s);if(d<0)return!1;var y=o.length-1;return d==y?o.pop():cp.call(o,d,1),--this.size,!0}function oR(s){var o=this.__data__,d=mp(o,s);return d<0?e:o[d][1]}function cR(s){return mp(this.__data__,s)>-1}function uR(s,o){var d=this.__data__,y=mp(d,s);return y<0?(++this.size,d.push([s,o])):d[y][1]=o,this}Fs.prototype.clear=sR,Fs.prototype.delete=aR,Fs.prototype.get=oR,Fs.prototype.has=cR,Fs.prototype.set=uR;function Hs(s){var o=-1,d=s==null?0:s.length;for(this.clear();++o<d;){var y=s[o];this.set(y[0],y[1])}}function fR(){this.size=0,this.__data__={hash:new xo,map:new($u||Fs),string:new xo}}function lR(s){var o=Rp(this,s).delete(s);return this.size-=o?1:0,o}function pR(s){return Rp(this,s).get(s)}function hR(s){return Rp(this,s).has(s)}function dR(s,o){var d=Rp(this,s),y=d.size;return d.set(s,o),this.size+=d.size==y?0:1,this}Hs.prototype.clear=fR,Hs.prototype.delete=lR,Hs.prototype.get=pR,Hs.prototype.has=hR,Hs.prototype.set=dR;function _o(s){var o=-1,d=s==null?0:s.length;for(this.__data__=new Hs;++o<d;)this.add(s[o])}function mR(s){return this.__data__.set(s,u),this}function vR(s){return this.__data__.has(s)}_o.prototype.add=_o.prototype.push=mR,_o.prototype.has=vR;function Mn(s){var o=this.__data__=new Fs(s);this.size=o.size}function gR(){this.__data__=new Fs,this.size=0}function bR(s){var o=this.__data__,d=o.delete(s);return this.size=o.size,d}function xR(s){return this.__data__.get(s)}function _R(s){return this.__data__.has(s)}function yR(s,o){var d=this.__data__;if(d instanceof Fs){var y=d.__data__;if(!$u||y.length<r-1)return y.push([s,o]),this.size=++d.size,this;d=this.__data__=new Hs(y)}return d.set(s,o),this.size=d.size,this}Mn.prototype.clear=gR,Mn.prototype.delete=bR,Mn.prototype.get=xR,Mn.prototype.has=_R,Mn.prototype.set=yR;function a1(s,o){var d=et(s),y=!d&&To(s),R=!d&&!y&&Oa(s),N=!d&&!y&&!R&&Bc(s),C=d||y||R||N,D=C?p0(s.length,NI):[],H=D.length;for(var te in s)(o||kt.call(s,te))&&!(C&&(te=="length"||R&&(te=="offset"||te=="parent")||N&&(te=="buffer"||te=="byteLength"||te=="byteOffset")||Ks(te,H)))&&D.push(te);return D}function o1(s){var o=s.length;return o?s[O0(0,o-1)]:e}function wR(s,o){return Ap(Ti(s),yo(o,0,s.length))}function SR(s){return Ap(Ti(s))}function x0(s,o,d){(d!==e&&!Cn(s[o],d)||d===e&&!(o in s))&&zs(s,o,d)}function Ju(s,o,d){var y=s[o];(!(kt.call(s,o)&&Cn(y,d))||d===e&&!(o in s))&&zs(s,o,d)}function mp(s,o){for(var d=s.length;d--;)if(Cn(s[d][0],o))return d;return-1}function ER(s,o,d,y){return Ta(s,function(R,N,C){o(y,R,d(R),C)}),y}function c1(s,o){return s&&os(o,Yr(o),s)}function TR(s,o){return s&&os(o,Ri(o),s)}function zs(s,o,d){o=="__proto__"&&up?up(s,o,{configurable:!0,enumerable:!0,value:d,writable:!0}):s[o]=d}function _0(s,o){for(var d=-1,y=o.length,R=$(y),N=s==null;++d<y;)R[d]=N?e:em(s,o[d]);return R}function yo(s,o,d){return s===s&&(d!==e&&(s=s<=d?s:d),o!==e&&(s=s>=o?s:o)),s}function ln(s,o,d,y,R,N){var C,D=o&w,H=o&T,te=o&I;if(d&&(C=R?d(s,y,R,N):d(s)),C!==e)return C;if(!br(s))return s;var re=et(s);if(re){if(C=hA(s),!D)return Ti(s,C)}else{var oe=fi(s),de=oe==St||oe==Oe;if(Oa(s))return P1(s,D);if(oe==Ae||oe==Z||de&&!R){if(C=H||de?{}:Z1(s),!D)return H?rA(s,TR(C,s)):tA(s,c1(C,s))}else{if(!Yt[oe])return R?s:{};C=dA(s,oe,D)}}N||(N=new Mn);var Ie=N.get(s);if(Ie)return Ie;N.set(s,C),I_(s)?s.forEach(function(Me){C.add(ln(Me,o,d,Me,s,N))}):E_(s)&&s.forEach(function(Me,ht){C.set(ht,ln(Me,o,d,ht,s,N))});var Be=te?H?F0:q0:H?Ri:Yr,ft=re?e:Be(s);return cn(ft||s,function(Me,ht){ft&&(ht=Me,Me=s[ht]),Ju(C,ht,ln(Me,o,d,ht,s,N))}),C}function IR(s){var o=Yr(s);return function(d){return u1(d,s,o)}}function u1(s,o,d){var y=d.length;if(s==null)return!y;for(s=Vt(s);y--;){var R=d[y],N=o[R],C=s[R];if(C===e&&!(R in s)||!N(C))return!1}return!0}function f1(s,o,d){if(typeof s!="function")throw new un(n);return af(function(){s.apply(e,d)},o)}function Qu(s,o,d,y){var R=-1,N=Jl,C=!0,D=s.length,H=[],te=o.length;if(!D)return H;d&&(o=vr(o,Ki(d))),y?(N=a0,C=!1):o.length>=r&&(N=Wu,C=!1,o=new _o(o));e:for(;++R<D;){var re=s[R],oe=d==null?re:d(re);if(re=y||re!==0?re:0,C&&oe===oe){for(var de=te;de--;)if(o[de]===oe)continue e;H.push(re)}else N(o,oe,y)||H.push(re)}return H}var Ta=D1(as),l1=D1(w0,!0);function RR(s,o){var d=!0;return Ta(s,function(y,R,N){return d=!!o(y,R,N),d}),d}function vp(s,o,d){for(var y=-1,R=s.length;++y<R;){var N=s[y],C=o(N);if(C!=null&&(D===e?C===C&&!Gi(C):d(C,D)))var D=C,H=N}return H}function AR(s,o,d,y){var R=s.length;for(d=at(d),d<0&&(d=-d>R?0:R+d),y=y===e||y>R?R:at(y),y<0&&(y+=R),y=d>y?0:A_(y);d<y;)s[d++]=o;return s}function p1(s,o){var d=[];return Ta(s,function(y,R,N){o(y,R,N)&&d.push(y)}),d}function ii(s,o,d,y,R){var N=-1,C=s.length;for(d||(d=vA),R||(R=[]);++N<C;){var D=s[N];o>0&&d(D)?o>1?ii(D,o-1,d,y,R):ya(R,D):y||(R[R.length]=D)}return R}var y0=U1(),h1=U1(!0);function as(s,o){return s&&y0(s,o,Yr)}function w0(s,o){return s&&h1(s,o,Yr)}function gp(s,o){return _a(o,function(d){return Ws(s[d])})}function wo(s,o){o=Ra(o,s);for(var d=0,y=o.length;s!=null&&d<y;)s=s[cs(o[d++])];return d&&d==y?s:e}function d1(s,o,d){var y=o(s);return et(s)?y:ya(y,d(s))}function gi(s){return s==null?s===e?Qt:Re:bo&&bo in Vt(s)?fA(s):SA(s)}function S0(s,o){return s>o}function OR(s,o){return s!=null&&kt.call(s,o)}function kR(s,o){return s!=null&&o in Vt(s)}function NR(s,o,d){return s>=ui(o,d)&&s<jr(o,d)}function E0(s,o,d){for(var y=d?a0:Jl,R=s[0].length,N=s.length,C=N,D=$(N),H=1/0,te=[];C--;){var re=s[C];C&&o&&(re=vr(re,Ki(o))),H=ui(re.length,H),D[C]=!d&&(o||R>=120&&re.length>=120)?new _o(C&&re):e}re=s[0];var oe=-1,de=D[0];e:for(;++oe<R&&te.length<H;){var Ie=re[oe],Be=o?o(Ie):Ie;if(Ie=d||Ie!==0?Ie:0,!(de?Wu(de,Be):y(te,Be,d))){for(C=N;--C;){var ft=D[C];if(!(ft?Wu(ft,Be):y(s[C],Be,d)))continue e}de&&de.push(Be),te.push(Ie)}}return te}function PR(s,o,d,y){return as(s,function(R,N,C){o(y,d(R),N,C)}),y}function ef(s,o,d){o=Ra(o,s),s=t_(s,o);var y=s==null?s:s[cs(hn(o))];return y==null?e:Vi(y,s,d)}function m1(s){return _r(s)&&gi(s)==Z}function BR(s){return _r(s)&&gi(s)==Ot}function MR(s){return _r(s)&&gi(s)==Ee}function tf(s,o,d,y,R){return s===o?!0:s==null||o==null||!_r(s)&&!_r(o)?s!==s&&o!==o:CR(s,o,d,y,tf,R)}function CR(s,o,d,y,R,N){var C=et(s),D=et(o),H=C?se:fi(s),te=D?se:fi(o);H=H==Z?Ae:H,te=te==Z?Ae:te;var re=H==Ae,oe=te==Ae,de=H==te;if(de&&Oa(s)){if(!Oa(o))return!1;C=!0,re=!1}if(de&&!re)return N||(N=new Mn),C||Bc(s)?$1(s,o,d,y,R,N):cA(s,o,H,d,y,R,N);if(!(d&B)){var Ie=re&&kt.call(s,"__wrapped__"),Be=oe&&kt.call(o,"__wrapped__");if(Ie||Be){var ft=Ie?s.value():s,Me=Be?o.value():o;return N||(N=new Mn),R(ft,Me,d,y,N)}}return de?(N||(N=new Mn),uA(s,o,d,y,R,N)):!1}function LR(s){return _r(s)&&fi(s)==st}function T0(s,o,d,y){var R=d.length,N=R,C=!y;if(s==null)return!N;for(s=Vt(s);R--;){var D=d[R];if(C&&D[2]?D[1]!==s[D[0]]:!(D[0]in s))return!1}for(;++R<N;){D=d[R];var H=D[0],te=s[H],re=D[1];if(C&&D[2]){if(te===e&&!(H in s))return!1}else{var oe=new Mn;if(y)var de=y(te,re,H,s,o,oe);if(!(de===e?tf(re,te,B|M,y,oe):de))return!1}}return!0}function v1(s){if(!br(s)||bA(s))return!1;var o=Ws(s)?LI:Os;return o.test(Eo(s))}function DR(s){return _r(s)&&gi(s)==At}function UR(s){return _r(s)&&fi(s)==bt}function qR(s){return _r(s)&&Mp(s.length)&&!!pr[gi(s)]}function g1(s){return typeof s=="function"?s:s==null?Ai:typeof s=="object"?et(s)?_1(s[0],s[1]):x1(s):q_(s)}function I0(s){if(!sf(s))return zI(s);var o=[];for(var d in Vt(s))kt.call(s,d)&&d!="constructor"&&o.push(d);return o}function FR(s){if(!br(s))return wA(s);var o=sf(s),d=[];for(var y in s)y=="constructor"&&(o||!kt.call(s,y))||d.push(y);return d}function R0(s,o){return s<o}function b1(s,o){var d=-1,y=Ii(s)?$(s.length):[];return Ta(s,function(R,N,C){y[++d]=o(R,N,C)}),y}function x1(s){var o=z0(s);return o.length==1&&o[0][2]?Q1(o[0][0],o[0][1]):function(d){return d===s||T0(d,s,o)}}function _1(s,o){return V0(s)&&J1(o)?Q1(cs(s),o):function(d){var y=em(d,s);return y===e&&y===o?tm(d,s):tf(o,y,B|M)}}function bp(s,o,d,y,R){s!==o&&y0(o,function(N,C){if(R||(R=new Mn),br(N))HR(s,o,C,d,bp,y,R);else{var D=y?y(W0(s,C),N,C+"",s,o,R):e;D===e&&(D=N),x0(s,C,D)}},Ri)}function HR(s,o,d,y,R,N,C){var D=W0(s,d),H=W0(o,d),te=C.get(H);if(te){x0(s,d,te);return}var re=N?N(D,H,d+"",s,o,C):e,oe=re===e;if(oe){var de=et(H),Ie=!de&&Oa(H),Be=!de&&!Ie&&Bc(H);re=H,de||Ie||Be?et(D)?re=D:Er(D)?re=Ti(D):Ie?(oe=!1,re=P1(H,!0)):Be?(oe=!1,re=B1(H,!0)):re=[]:of(H)||To(H)?(re=D,To(D)?re=O_(D):(!br(D)||Ws(D))&&(re=Z1(H))):oe=!1}oe&&(C.set(H,re),R(re,H,y,N,C),C.delete(H)),x0(s,d,re)}function y1(s,o){var d=s.length;if(d)return o+=o<0?d:0,Ks(o,d)?s[o]:e}function w1(s,o,d){o.length?o=vr(o,function(N){return et(N)?function(C){return wo(C,N.length===1?N[0]:N)}:N}):o=[Ai];var y=-1;o=vr(o,Ki(Ne()));var R=b1(s,function(N,C,D){var H=vr(o,function(te){return te(N)});return{criteria:H,index:++y,value:N}});return dI(R,function(N,C){return eA(N,C,d)})}function zR(s,o){return S1(s,o,function(d,y){return tm(s,y)})}function S1(s,o,d){for(var y=-1,R=o.length,N={};++y<R;){var C=o[y],D=wo(s,C);d(D,C)&&rf(N,Ra(C,s),D)}return N}function jR(s){return function(o){return wo(o,s)}}function A0(s,o,d,y){var R=y?hI:Sc,N=-1,C=o.length,D=s;for(s===o&&(o=Ti(o)),d&&(D=vr(s,Ki(d)));++N<C;)for(var H=0,te=o[N],re=d?d(te):te;(H=R(D,re,H,y))>-1;)D!==s&&cp.call(D,H,1),cp.call(s,H,1);return s}function E1(s,o){for(var d=s?o.length:0,y=d-1;d--;){var R=o[d];if(d==y||R!==N){var N=R;Ks(R)?cp.call(s,R,1):P0(s,R)}}return s}function O0(s,o){return s+lp(n1()*(o-s+1))}function VR(s,o,d,y){for(var R=-1,N=jr(fp((o-s)/(d||1)),0),C=$(N);N--;)C[y?N:++R]=s,s+=d;return C}function k0(s,o){var d="";if(!s||o<1||o>S)return d;do o%2&&(d+=s),o=lp(o/2),o&&(s+=s);while(o);return d}function lt(s,o){return G0(e_(s,o,Ai),s+"")}function KR(s){return o1(Mc(s))}function WR(s,o){var d=Mc(s);return Ap(d,yo(o,0,d.length))}function rf(s,o,d,y){if(!br(s))return s;o=Ra(o,s);for(var R=-1,N=o.length,C=N-1,D=s;D!=null&&++R<N;){var H=cs(o[R]),te=d;if(H==="__proto__"||H==="constructor"||H==="prototype")return s;if(R!=C){var re=D[H];te=y?y(re,H,D):e,te===e&&(te=br(re)?re:Ks(o[R+1])?[]:{})}Ju(D,H,te),D=D[H]}return s}var T1=pp?function(s,o){return pp.set(s,o),s}:Ai,GR=up?function(s,o){return up(s,"toString",{configurable:!0,enumerable:!1,value:im(o),writable:!0})}:Ai;function $R(s){return Ap(Mc(s))}function pn(s,o,d){var y=-1,R=s.length;o<0&&(o=-o>R?0:R+o),d=d>R?R:d,d<0&&(d+=R),R=o>d?0:d-o>>>0,o>>>=0;for(var N=$(R);++y<R;)N[y]=s[y+o];return N}function XR(s,o){var d;return Ta(s,function(y,R,N){return d=o(y,R,N),!d}),!!d}function xp(s,o,d){var y=0,R=s==null?y:s.length;if(typeof o=="number"&&o===o&&R<=U){for(;y<R;){var N=y+R>>>1,C=s[N];C!==null&&!Gi(C)&&(d?C<=o:C<o)?y=N+1:R=N}return R}return N0(s,o,Ai,d)}function N0(s,o,d,y){var R=0,N=s==null?0:s.length;if(N===0)return 0;o=d(o);for(var C=o!==o,D=o===null,H=Gi(o),te=o===e;R<N;){var re=lp((R+N)/2),oe=d(s[re]),de=oe!==e,Ie=oe===null,Be=oe===oe,ft=Gi(oe);if(C)var Me=y||Be;else te?Me=Be&&(y||de):D?Me=Be&&de&&(y||!Ie):H?Me=Be&&de&&!Ie&&(y||!ft):Ie||ft?Me=!1:Me=y?oe<=o:oe<o;Me?R=re+1:N=re}return ui(N,A)}function I1(s,o){for(var d=-1,y=s.length,R=0,N=[];++d<y;){var C=s[d],D=o?o(C):C;if(!d||!Cn(D,H)){var H=D;N[R++]=C===0?0:C}}return N}function R1(s){return typeof s=="number"?s:Gi(s)?l:+s}function Wi(s){if(typeof s=="string")return s;if(et(s))return vr(s,Wi)+"";if(Gi(s))return s1?s1.call(s):"";var o=s+"";return o=="0"&&1/s==-x?"-0":o}function Ia(s,o,d){var y=-1,R=Jl,N=s.length,C=!0,D=[],H=D;if(d)C=!1,R=a0;else if(N>=r){var te=o?null:aA(s);if(te)return ep(te);C=!1,R=Wu,H=new _o}else H=o?[]:D;e:for(;++y<N;){var re=s[y],oe=o?o(re):re;if(re=d||re!==0?re:0,C&&oe===oe){for(var de=H.length;de--;)if(H[de]===oe)continue e;o&&H.push(oe),D.push(re)}else R(H,oe,d)||(H!==D&&H.push(oe),D.push(re))}return D}function P0(s,o){return o=Ra(o,s),s=t_(s,o),s==null||delete s[cs(hn(o))]}function A1(s,o,d,y){return rf(s,o,d(wo(s,o)),y)}function _p(s,o,d,y){for(var R=s.length,N=y?R:-1;(y?N--:++N<R)&&o(s[N],N,s););return d?pn(s,y?0:N,y?N+1:R):pn(s,y?N+1:0,y?R:N)}function O1(s,o){var d=s;return d instanceof mt&&(d=d.value()),o0(o,function(y,R){return R.func.apply(R.thisArg,ya([y],R.args))},d)}function B0(s,o,d){var y=s.length;if(y<2)return y?Ia(s[0]):[];for(var R=-1,N=$(y);++R<y;)for(var C=s[R],D=-1;++D<y;)D!=R&&(N[R]=Qu(N[R]||C,s[D],o,d));return Ia(ii(N,1),o,d)}function k1(s,o,d){for(var y=-1,R=s.length,N=o.length,C={};++y<R;){var D=y<N?o[y]:e;d(C,s[y],D)}return C}function M0(s){return Er(s)?s:[]}function C0(s){return typeof s=="function"?s:Ai}function Ra(s,o){return et(s)?s:V0(s,o)?[s]:s_(Rt(s))}var YR=lt;function Aa(s,o,d){var y=s.length;return d=d===e?y:d,!o&&d>=y?s:pn(s,o,d)}var N1=DI||function(s){return Xr.clearTimeout(s)};function P1(s,o){if(o)return s.slice();var d=s.length,y=Qx?Qx(d):new s.constructor(d);return s.copy(y),y}function L0(s){var o=new s.constructor(s.byteLength);return new ap(o).set(new ap(s)),o}function ZR(s,o){var d=o?L0(s.buffer):s.buffer;return new s.constructor(d,s.byteOffset,s.byteLength)}function JR(s){var o=new s.constructor(s.source,jt.exec(s));return o.lastIndex=s.lastIndex,o}function QR(s){return Zu?Vt(Zu.call(s)):{}}function B1(s,o){var d=o?L0(s.buffer):s.buffer;return new s.constructor(d,s.byteOffset,s.length)}function M1(s,o){if(s!==o){var d=s!==e,y=s===null,R=s===s,N=Gi(s),C=o!==e,D=o===null,H=o===o,te=Gi(o);if(!D&&!te&&!N&&s>o||N&&C&&H&&!D&&!te||y&&C&&H||!d&&H||!R)return 1;if(!y&&!N&&!te&&s<o||te&&d&&R&&!y&&!N||D&&d&&R||!C&&R||!H)return-1}return 0}function eA(s,o,d){for(var y=-1,R=s.criteria,N=o.criteria,C=R.length,D=d.length;++y<C;){var H=M1(R[y],N[y]);if(H){if(y>=D)return H;var te=d[y];return H*(te=="desc"?-1:1)}}return s.index-o.index}function C1(s,o,d,y){for(var R=-1,N=s.length,C=d.length,D=-1,H=o.length,te=jr(N-C,0),re=$(H+te),oe=!y;++D<H;)re[D]=o[D];for(;++R<C;)(oe||R<N)&&(re[d[R]]=s[R]);for(;te--;)re[D++]=s[R++];return re}function L1(s,o,d,y){for(var R=-1,N=s.length,C=-1,D=d.length,H=-1,te=o.length,re=jr(N-D,0),oe=$(re+te),de=!y;++R<re;)oe[R]=s[R];for(var Ie=R;++H<te;)oe[Ie+H]=o[H];for(;++C<D;)(de||R<N)&&(oe[Ie+d[C]]=s[R++]);return oe}function Ti(s,o){var d=-1,y=s.length;for(o||(o=$(y));++d<y;)o[d]=s[d];return o}function os(s,o,d,y){var R=!d;d||(d={});for(var N=-1,C=o.length;++N<C;){var D=o[N],H=y?y(d[D],s[D],D,d,s):e;H===e&&(H=s[D]),R?zs(d,D,H):Ju(d,D,H)}return d}function tA(s,o){return os(s,j0(s),o)}function rA(s,o){return os(s,X1(s),o)}function yp(s,o){return function(d,y){var R=et(d)?oI:ER,N=o?o():{};return R(d,s,Ne(y,2),N)}}function kc(s){return lt(function(o,d){var y=-1,R=d.length,N=R>1?d[R-1]:e,C=R>2?d[2]:e;for(N=s.length>3&&typeof N=="function"?(R--,N):e,C&&bi(d[0],d[1],C)&&(N=R<3?e:N,R=1),o=Vt(o);++y<R;){var D=d[y];D&&s(o,D,y,N)}return o})}function D1(s,o){return function(d,y){if(d==null)return d;if(!Ii(d))return s(d,y);for(var R=d.length,N=o?R:-1,C=Vt(d);(o?N--:++N<R)&&y(C[N],N,C)!==!1;);return d}}function U1(s){return function(o,d,y){for(var R=-1,N=Vt(o),C=y(o),D=C.length;D--;){var H=C[s?D:++R];if(d(N[H],H,N)===!1)break}return o}}function iA(s,o,d){var y=o&P,R=nf(s);function N(){var C=this&&this!==Xr&&this instanceof N?R:s;return C.apply(y?d:this,arguments)}return N}function q1(s){return function(o){o=Rt(o);var d=Ec(o)?Bn(o):e,y=d?d[0]:o.charAt(0),R=d?Aa(d,1).join(""):o.slice(1);return y[s]()+R}}function Nc(s){return function(o){return o0(D_(L_(o).replace(GT,"")),s,"")}}function nf(s){return function(){var o=arguments;switch(o.length){case 0:return new s;case 1:return new s(o[0]);case 2:return new s(o[0],o[1]);case 3:return new s(o[0],o[1],o[2]);case 4:return new s(o[0],o[1],o[2],o[3]);case 5:return new s(o[0],o[1],o[2],o[3],o[4]);case 6:return new s(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new s(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var d=Oc(s.prototype),y=s.apply(d,o);return br(y)?y:d}}function nA(s,o,d){var y=nf(s);function R(){for(var N=arguments.length,C=$(N),D=N,H=Pc(R);D--;)C[D]=arguments[D];var te=N<3&&C[0]!==H&&C[N-1]!==H?[]:wa(C,H);if(N-=te.length,N<d)return V1(s,o,wp,R.placeholder,e,C,te,e,e,d-N);var re=this&&this!==Xr&&this instanceof R?y:s;return Vi(re,this,C)}return R}function F1(s){return function(o,d,y){var R=Vt(o);if(!Ii(o)){var N=Ne(d,3);o=Yr(o),d=function(D){return N(R[D],D,R)}}var C=s(o,d,y);return C>-1?R[N?o[C]:C]:e}}function H1(s){return Vs(function(o){var d=o.length,y=d,R=fn.prototype.thru;for(s&&o.reverse();y--;){var N=o[y];if(typeof N!="function")throw new un(n);if(R&&!C&&Ip(N)=="wrapper")var C=new fn([],!0)}for(y=C?y:d;++y<d;){N=o[y];var D=Ip(N),H=D=="wrapper"?H0(N):e;H&&K0(H[0])&&H[1]==(_e|V|ee|Te)&&!H[4].length&&H[9]==1?C=C[Ip(H[0])].apply(C,H[3]):C=N.length==1&&K0(N)?C[D]():C.thru(N)}return function(){var te=arguments,re=te[0];if(C&&te.length==1&&et(re))return C.plant(re).value();for(var oe=0,de=d?o[oe].apply(this,te):re;++oe<d;)de=o[oe].call(this,de);return de}})}function wp(s,o,d,y,R,N,C,D,H,te){var re=o&_e,oe=o&P,de=o&L,Ie=o&(V|q),Be=o&be,ft=de?e:nf(s);function Me(){for(var ht=arguments.length,xt=$(ht),$i=ht;$i--;)xt[$i]=arguments[$i];if(Ie)var xi=Pc(Me),Xi=vI(xt,xi);if(y&&(xt=C1(xt,y,R,Ie)),N&&(xt=L1(xt,N,C,Ie)),ht-=Xi,Ie&&ht<te){var Tr=wa(xt,xi);return V1(s,o,wp,Me.placeholder,d,xt,Tr,D,H,te-ht)}var Ln=oe?d:this,$s=de?Ln[s]:s;return ht=xt.length,D?xt=EA(xt,D):Be&&ht>1&&xt.reverse(),re&&H<ht&&(xt.length=H),this&&this!==Xr&&this instanceof Me&&($s=ft||nf($s)),$s.apply(Ln,xt)}return Me}function z1(s,o){return function(d,y){return PR(d,s,o(y),{})}}function Sp(s,o){return function(d,y){var R;if(d===e&&y===e)return o;if(d!==e&&(R=d),y!==e){if(R===e)return y;typeof d=="string"||typeof y=="string"?(d=Wi(d),y=Wi(y)):(d=R1(d),y=R1(y)),R=s(d,y)}return R}}function D0(s){return Vs(function(o){return o=vr(o,Ki(Ne())),lt(function(d){var y=this;return s(o,function(R){return Vi(R,y,d)})})})}function Ep(s,o){o=o===e?" ":Wi(o);var d=o.length;if(d<2)return d?k0(o,s):o;var y=k0(o,fp(s/Tc(o)));return Ec(o)?Aa(Bn(y),0,s).join(""):y.slice(0,s)}function sA(s,o,d,y){var R=o&P,N=nf(s);function C(){for(var D=-1,H=arguments.length,te=-1,re=y.length,oe=$(re+H),de=this&&this!==Xr&&this instanceof C?N:s;++te<re;)oe[te]=y[te];for(;H--;)oe[te++]=arguments[++D];return Vi(de,R?d:this,oe)}return C}function j1(s){return function(o,d,y){return y&&typeof y!="number"&&bi(o,d,y)&&(d=y=e),o=Gs(o),d===e?(d=o,o=0):d=Gs(d),y=y===e?o<d?1:-1:Gs(y),VR(o,d,y,s)}}function Tp(s){return function(o,d){return typeof o=="string"&&typeof d=="string"||(o=dn(o),d=dn(d)),s(o,d)}}function V1(s,o,d,y,R,N,C,D,H,te){var re=o&V,oe=re?C:e,de=re?e:C,Ie=re?N:e,Be=re?e:N;o|=re?ee:fe,o&=~(re?fe:ee),o&X||(o&=~(P|L));var ft=[s,o,R,Ie,oe,Be,de,D,H,te],Me=d.apply(e,ft);return K0(s)&&r_(Me,ft),Me.placeholder=y,i_(Me,s,o)}function U0(s){var o=zr[s];return function(d,y){if(d=dn(d),y=y==null?0:ui(at(y),292),y&&i1(d)){var R=(Rt(d)+"e").split("e"),N=o(R[0]+"e"+(+R[1]+y));return R=(Rt(N)+"e").split("e"),+(R[0]+"e"+(+R[1]-y))}return o(d)}}var aA=Rc&&1/ep(new Rc([,-0]))[1]==x?function(s){return new Rc(s)}:am;function K1(s){return function(o){var d=fi(o);return d==st?d0(o):d==bt?SI(o):mI(o,s(o))}}function js(s,o,d,y,R,N,C,D){var H=o&L;if(!H&&typeof s!="function")throw new un(n);var te=y?y.length:0;if(te||(o&=~(ee|fe),y=R=e),C=C===e?C:jr(at(C),0),D=D===e?D:at(D),te-=R?R.length:0,o&fe){var re=y,oe=R;y=R=e}var de=H?e:H0(s),Ie=[s,o,d,y,R,re,oe,N,C,D];if(de&&yA(Ie,de),s=Ie[0],o=Ie[1],d=Ie[2],y=Ie[3],R=Ie[4],D=Ie[9]=Ie[9]===e?H?0:s.length:jr(Ie[9]-te,0),!D&&o&(V|q)&&(o&=~(V|q)),!o||o==P)var Be=iA(s,o,d);else o==V||o==q?Be=nA(s,o,D):(o==ee||o==(P|ee))&&!R.length?Be=sA(s,o,d,y):Be=wp.apply(e,Ie);var ft=de?T1:r_;return i_(ft(Be,Ie),s,o)}function W1(s,o,d,y){return s===e||Cn(s,Ic[d])&&!kt.call(y,d)?o:s}function G1(s,o,d,y,R,N){return br(s)&&br(o)&&(N.set(o,s),bp(s,o,e,G1,N),N.delete(o)),s}function oA(s){return of(s)?e:s}function $1(s,o,d,y,R,N){var C=d&B,D=s.length,H=o.length;if(D!=H&&!(C&&H>D))return!1;var te=N.get(s),re=N.get(o);if(te&&re)return te==o&&re==s;var oe=-1,de=!0,Ie=d&M?new _o:e;for(N.set(s,o),N.set(o,s);++oe<D;){var Be=s[oe],ft=o[oe];if(y)var Me=C?y(ft,Be,oe,o,s,N):y(Be,ft,oe,s,o,N);if(Me!==e){if(Me)continue;de=!1;break}if(Ie){if(!c0(o,function(ht,xt){if(!Wu(Ie,xt)&&(Be===ht||R(Be,ht,d,y,N)))return Ie.push(xt)})){de=!1;break}}else if(!(Be===ft||R(Be,ft,d,y,N))){de=!1;break}}return N.delete(s),N.delete(o),de}function cA(s,o,d,y,R,N,C){switch(d){case Le:if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case Ot:return!(s.byteLength!=o.byteLength||!N(new ap(s),new ap(o)));case he:case Ee:case rt:return Cn(+s,+o);case dt:return s.name==o.name&&s.message==o.message;case At:case De:return s==o+"";case st:var D=d0;case bt:var H=y&B;if(D||(D=ep),s.size!=o.size&&!H)return!1;var te=C.get(s);if(te)return te==o;y|=M,C.set(s,o);var re=$1(D(s),D(o),y,R,N,C);return C.delete(s),re;case Pt:if(Zu)return Zu.call(s)==Zu.call(o)}return!1}function uA(s,o,d,y,R,N){var C=d&B,D=q0(s),H=D.length,te=q0(o),re=te.length;if(H!=re&&!C)return!1;for(var oe=H;oe--;){var de=D[oe];if(!(C?de in o:kt.call(o,de)))return!1}var Ie=N.get(s),Be=N.get(o);if(Ie&&Be)return Ie==o&&Be==s;var ft=!0;N.set(s,o),N.set(o,s);for(var Me=C;++oe<H;){de=D[oe];var ht=s[de],xt=o[de];if(y)var $i=C?y(xt,ht,de,o,s,N):y(ht,xt,de,s,o,N);if(!($i===e?ht===xt||R(ht,xt,d,y,N):$i)){ft=!1;break}Me||(Me=de=="constructor")}if(ft&&!Me){var xi=s.constructor,Xi=o.constructor;xi!=Xi&&"constructor"in s&&"constructor"in o&&!(typeof xi=="function"&&xi instanceof xi&&typeof Xi=="function"&&Xi instanceof Xi)&&(ft=!1)}return N.delete(s),N.delete(o),ft}function Vs(s){return G0(e_(s,e,u_),s+"")}function q0(s){return d1(s,Yr,j0)}function F0(s){return d1(s,Ri,X1)}var H0=pp?function(s){return pp.get(s)}:am;function Ip(s){for(var o=s.name+"",d=Ac[o],y=kt.call(Ac,o)?d.length:0;y--;){var R=d[y],N=R.func;if(N==null||N==s)return R.name}return o}function Pc(s){var o=kt.call(k,"placeholder")?k:s;return o.placeholder}function Ne(){var s=k.iteratee||nm;return s=s===nm?g1:s,arguments.length?s(arguments[0],arguments[1]):s}function Rp(s,o){var d=s.__data__;return gA(o)?d[typeof o=="string"?"string":"hash"]:d.map}function z0(s){for(var o=Yr(s),d=o.length;d--;){var y=o[d],R=s[y];o[d]=[y,R,J1(R)]}return o}function So(s,o){var d=_I(s,o);return v1(d)?d:e}function fA(s){var o=kt.call(s,bo),d=s[bo];try{s[bo]=e;var y=!0}catch{}var R=np.call(s);return y&&(o?s[bo]=d:delete s[bo]),R}var j0=v0?function(s){return s==null?[]:(s=Vt(s),_a(v0(s),function(o){return t1.call(s,o)}))}:om,X1=v0?function(s){for(var o=[];s;)ya(o,j0(s)),s=op(s);return o}:om,fi=gi;(g0&&fi(new g0(new ArrayBuffer(1)))!=Le||$u&&fi(new $u)!=st||b0&&fi(b0.resolve())!=Wt||Rc&&fi(new Rc)!=bt||Xu&&fi(new Xu)!=Ue)&&(fi=function(s){var o=gi(s),d=o==Ae?s.constructor:e,y=d?Eo(d):"";if(y)switch(y){case WI:return Le;case GI:return st;case $I:return Wt;case XI:return bt;case YI:return Ue}return o});function lA(s,o,d){for(var y=-1,R=d.length;++y<R;){var N=d[y],C=N.size;switch(N.type){case"drop":s+=C;break;case"dropRight":o-=C;break;case"take":o=ui(o,s+C);break;case"takeRight":s=jr(s,o-C);break}}return{start:s,end:o}}function pA(s){var o=s.match(cr);return o?o[1].split(ur):[]}function Y1(s,o,d){o=Ra(o,s);for(var y=-1,R=o.length,N=!1;++y<R;){var C=cs(o[y]);if(!(N=s!=null&&d(s,C)))break;s=s[C]}return N||++y!=R?N:(R=s==null?0:s.length,!!R&&Mp(R)&&Ks(C,R)&&(et(s)||To(s)))}function hA(s){var o=s.length,d=new s.constructor(o);return o&&typeof s[0]=="string"&&kt.call(s,"index")&&(d.index=s.index,d.input=s.input),d}function Z1(s){return typeof s.constructor=="function"&&!sf(s)?Oc(op(s)):{}}function dA(s,o,d){var y=s.constructor;switch(o){case Ot:return L0(s);case he:case Ee:return new y(+s);case Le:return ZR(s,d);case Ct:case Lt:case qe:case Dt:case Ut:case Fe:case qt:case Ft:case He:return B1(s,d);case st:return new y;case rt:case De:return new y(s);case At:return JR(s);case bt:return new y;case Pt:return QR(s)}}function mA(s,o){var d=o.length;if(!d)return s;var y=d-1;return o[y]=(d>1?"& ":"")+o[y],o=o.join(d>2?", ":" "),s.replace(Ze,`{
9
2
  /* [wrapped with `+o+`] */
10
- `)}function dA(s){return et(s)||Eo(s)||!!(e1&&s&&s[e1])}function Vs(s,o){var d=typeof s;return o=o??S,!!o&&(d=="number"||d!="symbol"&&ks.test(s))&&s>-1&&s%1==0&&s<o}function bi(s,o,d){if(!br(d))return!1;var y=typeof o;return(y=="number"?Ii(d)&&Vs(o,d.length):y=="string"&&o in d)?Mn(d[o],s):!1}function z0(s,o){if(et(s))return!1;var d=typeof s;return d=="number"||d=="symbol"||d=="boolean"||s==null||Gi(s)?!0:Xe.test(s)||!sr.test(s)||o!=null&&s in Vt(o)}function mA(s){var o=typeof s;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?s!=="__proto__":s===null}function j0(s){var o=Tp(s),d=k[o];if(typeof d!="function"||!(o in mt.prototype))return!1;if(s===d)return!0;var y=q0(d);return!!y&&s===y[0]}function vA(s){return!!Yx&&Yx in s}var gA=tp?Ks:am;function nf(s){var o=s&&s.constructor,d=typeof o=="function"&&o.prototype||Tc;return s===d}function Y1(s){return s===s&&!br(s)}function Z1(s,o){return function(d){return d==null?!1:d[s]===o&&(o!==e||s in Vt(d))}}function bA(s){var o=Np(s,function(y){return d.size===h&&d.clear(),y}),d=o.cache;return o}function xA(s,o){var d=s[1],y=o[1],R=d|y,N=R<(P|L|_e),C=y==_e&&d==V||y==_e&&d==Te&&s[7].length<=o[8]||y==(_e|Te)&&o[7].length<=o[8]&&d==V;if(!(N||C))return s;y&P&&(s[2]=o[2],R|=d&P?0:X);var D=o[3];if(D){var H=s[3];s[3]=H?B1(H,D,o[4]):D,s[4]=H?ya(s[3],b):o[4]}return D=o[5],D&&(H=s[5],s[5]=H?M1(H,D,o[6]):D,s[6]=H?ya(s[5],b):o[6]),D=o[7],D&&(s[7]=D),y&_e&&(s[8]=s[8]==null?o[8]:ui(s[8],o[8])),s[9]==null&&(s[9]=o[9]),s[0]=o[0],s[1]=R,s}function _A(s){var o=[];if(s!=null)for(var d in Vt(s))o.push(d);return o}function yA(s){return ip.call(s)}function J1(s,o,d){return o=zr(o===e?s.length-1:o,0),function(){for(var y=arguments,R=-1,N=zr(y.length-o,0),C=$(N);++R<N;)C[R]=y[o+R];R=-1;for(var D=$(o+1);++R<o;)D[R]=y[R];return D[o]=d(C),Vi(s,this,D)}}function Q1(s,o){return o.length<2?s:yo(s,pn(o,0,-1))}function wA(s,o){for(var d=s.length,y=ui(o.length,d),R=Ti(s);y--;){var N=o[y];s[y]=Vs(N,d)?R[N]:e}return s}function V0(s,o){if(!(o==="constructor"&&typeof s[o]=="function")&&o!="__proto__")return s[o]}var e_=r_(S1),sf=DI||function(s,o){return $r.setTimeout(s,o)},K0=r_(KR);function t_(s,o,d){var y=o+"";return K0(s,hA(y,SA(fA(y),d)))}function r_(s){var o=0,d=0;return function(){var y=HI(),R=c-(y-d);if(d=y,R>0){if(++o>=f)return arguments[0]}else o=0;return s.apply(e,arguments)}}function Rp(s,o){var d=-1,y=s.length,R=y-1;for(o=o===e?y:o;++d<o;){var N=R0(d,R),C=s[N];s[N]=s[d],s[d]=C}return s.length=o,s}var i_=bA(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(ar,function(d,y,R,N){o.push(R?N.replace(lr,"$1"):y||d)}),o});function os(s){if(typeof s=="string"||Gi(s))return s;var o=s+"";return o=="0"&&1/s==-x?"-0":o}function So(s){if(s!=null){try{return rp.call(s)}catch{}try{return s+""}catch{}}return""}function SA(s,o){return cn(j,function(d){var y="_."+d[0];o&d[1]&&!Zl(s,y)&&s.push(y)}),s.sort()}function n_(s){if(s instanceof mt)return s.clone();var o=new fn(s.__wrapped__,s.__chain__);return o.__actions__=Ti(s.__actions__),o.__index__=s.__index__,o.__values__=s.__values__,o}function EA(s,o,d){(d?bi(s,o,d):o===e)?o=1:o=zr(at(o),0);var y=s==null?0:s.length;if(!y||o<1)return[];for(var R=0,N=0,C=$(up(y/o));R<y;)C[N++]=pn(s,R,R+=o);return C}function TA(s){for(var o=-1,d=s==null?0:s.length,y=0,R=[];++o<d;){var N=s[o];N&&(R[y++]=N)}return R}function IA(){var s=arguments.length;if(!s)return[];for(var o=$(s-1),d=arguments[0],y=s;y--;)o[y-1]=arguments[y];return _a(et(d)?Ti(d):[d],ii(o,1))}var RA=lt(function(s,o){return Er(s)?Ju(s,ii(o,1,Er,!0)):[]}),AA=lt(function(s,o){var d=hn(o);return Er(d)&&(d=e),Er(s)?Ju(s,ii(o,1,Er,!0),Ne(d,2)):[]}),OA=lt(function(s,o){var d=hn(o);return Er(d)&&(d=e),Er(s)?Ju(s,ii(o,1,Er,!0),e,d):[]});function kA(s,o,d){var y=s==null?0:s.length;return y?(o=d||o===e?1:at(o),pn(s,o<0?0:o,y)):[]}function NA(s,o,d){var y=s==null?0:s.length;return y?(o=d||o===e?1:at(o),o=y-o,pn(s,0,o<0?0:o)):[]}function PA(s,o){return s&&s.length?xp(s,Ne(o,3),!0,!0):[]}function BA(s,o){return s&&s.length?xp(s,Ne(o,3),!0):[]}function MA(s,o,d,y){var R=s==null?0:s.length;return R?(d&&typeof d!="number"&&bi(s,o,d)&&(d=0,y=R),IR(s,o,d,y)):[]}function s_(s,o,d){var y=s==null?0:s.length;if(!y)return-1;var R=d==null?0:at(d);return R<0&&(R=zr(y+R,0)),Jl(s,Ne(o,3),R)}function a_(s,o,d){var y=s==null?0:s.length;if(!y)return-1;var R=y-1;return d!==e&&(R=at(d),R=d<0?zr(y+R,0):ui(R,y-1)),Jl(s,Ne(o,3),R,!0)}function o_(s){var o=s==null?0:s.length;return o?ii(s,1):[]}function CA(s){var o=s==null?0:s.length;return o?ii(s,x):[]}function LA(s,o){var d=s==null?0:s.length;return d?(o=o===e?1:at(o),ii(s,o)):[]}function DA(s){for(var o=-1,d=s==null?0:s.length,y={};++o<d;){var R=s[o];y[R[0]]=R[1]}return y}function c_(s){return s&&s.length?s[0]:e}function UA(s,o,d){var y=s==null?0:s.length;if(!y)return-1;var R=d==null?0:at(d);return R<0&&(R=zr(y+R,0)),wc(s,o,R)}function qA(s){var o=s==null?0:s.length;return o?pn(s,0,-1):[]}var FA=lt(function(s){var o=vr(s,P0);return o.length&&o[0]===s[0]?w0(o):[]}),HA=lt(function(s){var o=hn(s),d=vr(s,P0);return o===hn(d)?o=e:d.pop(),d.length&&d[0]===s[0]?w0(d,Ne(o,2)):[]}),zA=lt(function(s){var o=hn(s),d=vr(s,P0);return o=typeof o=="function"?o:e,o&&d.pop(),d.length&&d[0]===s[0]?w0(d,e,o):[]});function jA(s,o){return s==null?"":qI.call(s,o)}function hn(s){var o=s==null?0:s.length;return o?s[o-1]:e}function VA(s,o,d){var y=s==null?0:s.length;if(!y)return-1;var R=y;return d!==e&&(R=at(d),R=R<0?zr(y+R,0):ui(R,y-1)),o===o?SI(s,o,R):Jl(s,zx,R,!0)}function KA(s,o){return s&&s.length?x1(s,at(o)):e}var WA=lt(u_);function u_(s,o){return s&&s.length&&o&&o.length?I0(s,o):s}function GA(s,o,d){return s&&s.length&&o&&o.length?I0(s,o,Ne(d,2)):s}function $A(s,o,d){return s&&s.length&&o&&o.length?I0(s,o,e,d):s}var XA=js(function(s,o){var d=s==null?0:s.length,y=b0(s,o);return w1(s,vr(o,function(R){return Vs(R,d)?+R:R}).sort(P1)),y});function YA(s,o){var d=[];if(!(s&&s.length))return d;var y=-1,R=[],N=s.length;for(o=Ne(o,3);++y<N;){var C=s[y];o(C,y,s)&&(d.push(C),R.push(y))}return w1(s,R),d}function W0(s){return s==null?s:jI.call(s)}function ZA(s,o,d){var y=s==null?0:s.length;return y?(d&&typeof d!="number"&&bi(s,o,d)?(o=0,d=y):(o=o==null?0:at(o),d=d===e?y:at(d)),pn(s,o,d)):[]}function JA(s,o){return bp(s,o)}function QA(s,o,d){return O0(s,o,Ne(d,2))}function e8(s,o){var d=s==null?0:s.length;if(d){var y=bp(s,o);if(y<d&&Mn(s[y],o))return y}return-1}function t8(s,o){return bp(s,o,!0)}function r8(s,o,d){return O0(s,o,Ne(d,2),!0)}function i8(s,o){var d=s==null?0:s.length;if(d){var y=bp(s,o,!0)-1;if(Mn(s[y],o))return y}return-1}function n8(s){return s&&s.length?E1(s):[]}function s8(s,o){return s&&s.length?E1(s,Ne(o,2)):[]}function a8(s){var o=s==null?0:s.length;return o?pn(s,1,o):[]}function o8(s,o,d){return s&&s.length?(o=d||o===e?1:at(o),pn(s,0,o<0?0:o)):[]}function c8(s,o,d){var y=s==null?0:s.length;return y?(o=d||o===e?1:at(o),o=y-o,pn(s,o<0?0:o,y)):[]}function u8(s,o){return s&&s.length?xp(s,Ne(o,3),!1,!0):[]}function f8(s,o){return s&&s.length?xp(s,Ne(o,3)):[]}var l8=lt(function(s){return Ta(ii(s,1,Er,!0))}),p8=lt(function(s){var o=hn(s);return Er(o)&&(o=e),Ta(ii(s,1,Er,!0),Ne(o,2))}),h8=lt(function(s){var o=hn(s);return o=typeof o=="function"?o:e,Ta(ii(s,1,Er,!0),e,o)});function d8(s){return s&&s.length?Ta(s):[]}function m8(s,o){return s&&s.length?Ta(s,Ne(o,2)):[]}function v8(s,o){return o=typeof o=="function"?o:e,s&&s.length?Ta(s,e,o):[]}function G0(s){if(!(s&&s.length))return[];var o=0;return s=xa(s,function(d){if(Er(d))return o=zr(d.length,o),!0}),f0(o,function(d){return vr(s,o0(d))})}function f_(s,o){if(!(s&&s.length))return[];var d=G0(s);return o==null?d:vr(d,function(y){return Vi(o,e,y)})}var g8=lt(function(s,o){return Er(s)?Ju(s,o):[]}),b8=lt(function(s){return N0(xa(s,Er))}),x8=lt(function(s){var o=hn(s);return Er(o)&&(o=e),N0(xa(s,Er),Ne(o,2))}),_8=lt(function(s){var o=hn(s);return o=typeof o=="function"?o:e,N0(xa(s,Er),e,o)}),y8=lt(G0);function w8(s,o){return A1(s||[],o||[],Zu)}function S8(s,o){return A1(s||[],o||[],tf)}var E8=lt(function(s){var o=s.length,d=o>1?s[o-1]:e;return d=typeof d=="function"?(s.pop(),d):e,f_(s,d)});function l_(s){var o=k(s);return o.__chain__=!0,o}function T8(s,o){return o(s),s}function Ap(s,o){return o(s)}var I8=js(function(s){var o=s.length,d=o?s[0]:0,y=this.__wrapped__,R=function(N){return b0(N,s)};return o>1||this.__actions__.length||!(y instanceof mt)||!Vs(d)?this.thru(R):(y=y.slice(d,+d+(o?1:0)),y.__actions__.push({func:Ap,args:[R],thisArg:e}),new fn(y,this.__chain__).thru(function(N){return o&&!N.length&&N.push(e),N}))});function R8(){return l_(this)}function A8(){return new fn(this.value(),this.__chain__)}function O8(){this.__values__===e&&(this.__values__=T_(this.value()));var s=this.__index__>=this.__values__.length,o=s?e:this.__values__[this.__index__++];return{done:s,value:o}}function k8(){return this}function N8(s){for(var o,d=this;d instanceof hp;){var y=n_(d);y.__index__=0,y.__values__=e,o?R.__wrapped__=y:o=y;var R=y;d=d.__wrapped__}return R.__wrapped__=s,o}function P8(){var s=this.__wrapped__;if(s instanceof mt){var o=s;return this.__actions__.length&&(o=new mt(this)),o=o.reverse(),o.__actions__.push({func:Ap,args:[W0],thisArg:e}),new fn(o,this.__chain__)}return this.thru(W0)}function B8(){return R1(this.__wrapped__,this.__actions__)}var M8=_p(function(s,o,d){kt.call(s,d)?++s[d]:Hs(s,d,1)});function C8(s,o,d){var y=et(s)?Fx:TR;return d&&bi(s,o,d)&&(o=e),y(s,Ne(o,3))}function L8(s,o){var d=et(s)?xa:f1;return d(s,Ne(o,3))}var D8=U1(s_),U8=U1(a_);function q8(s,o){return ii(Op(s,o),1)}function F8(s,o){return ii(Op(s,o),x)}function H8(s,o,d){return d=d===e?1:at(d),ii(Op(s,o),d)}function p_(s,o){var d=et(s)?cn:Ea;return d(s,Ne(o,3))}function h_(s,o){var d=et(s)?aI:u1;return d(s,Ne(o,3))}var z8=_p(function(s,o,d){kt.call(s,d)?s[d].push(o):Hs(s,d,[o])});function j8(s,o,d,y){s=Ii(s)?s:Bc(s),d=d&&!y?at(d):0;var R=s.length;return d<0&&(d=zr(R+d,0)),Mp(s)?d<=R&&s.indexOf(o,d)>-1:!!R&&wc(s,o,d)>-1}var V8=lt(function(s,o,d){var y=-1,R=typeof o=="function",N=Ii(s)?$(s.length):[];return Ea(s,function(C){N[++y]=R?Vi(o,C,d):Qu(C,o,d)}),N}),K8=_p(function(s,o,d){Hs(s,d,o)});function Op(s,o){var d=et(s)?vr:v1;return d(s,Ne(o,3))}function W8(s,o,d,y){return s==null?[]:(et(o)||(o=o==null?[]:[o]),d=y?e:d,et(d)||(d=d==null?[]:[d]),_1(s,o,d))}var G8=_p(function(s,o,d){s[d?0:1].push(o)},function(){return[[],[]]});function $8(s,o,d){var y=et(s)?s0:Vx,R=arguments.length<3;return y(s,Ne(o,4),d,R,Ea)}function X8(s,o,d){var y=et(s)?oI:Vx,R=arguments.length<3;return y(s,Ne(o,4),d,R,u1)}function Y8(s,o){var d=et(s)?xa:f1;return d(s,Pp(Ne(o,3)))}function Z8(s){var o=et(s)?s1:jR;return o(s)}function J8(s,o,d){(d?bi(s,o,d):o===e)?o=1:o=at(o);var y=et(s)?_R:VR;return y(s,o)}function Q8(s){var o=et(s)?yR:WR;return o(s)}function e5(s){if(s==null)return 0;if(Ii(s))return Mp(s)?Ec(s):s.length;var o=fi(s);return o==st||o==gt?s.size:E0(s).length}function t5(s,o,d){var y=et(s)?a0:GR;return d&&bi(s,o,d)&&(o=e),y(s,Ne(o,3))}var r5=lt(function(s,o){if(s==null)return[];var d=o.length;return d>1&&bi(s,o[0],o[1])?o=[]:d>2&&bi(o[0],o[1],o[2])&&(o=[o[0]]),_1(s,ii(o,1),[])}),kp=LI||function(){return $r.Date.now()};function i5(s,o){if(typeof o!="function")throw new un(n);return s=at(s),function(){if(--s<1)return o.apply(this,arguments)}}function d_(s,o,d){return o=d?e:o,o=s&&o==null?s.length:o,zs(s,_e,e,e,e,e,o)}function m_(s,o){var d;if(typeof o!="function")throw new un(n);return s=at(s),function(){return--s>0&&(d=o.apply(this,arguments)),s<=1&&(o=e),d}}var $0=lt(function(s,o,d){var y=P;if(d.length){var R=ya(d,Nc($0));y|=ee}return zs(s,y,o,d,R)}),v_=lt(function(s,o,d){var y=P|L;if(d.length){var R=ya(d,Nc(v_));y|=ee}return zs(o,y,s,d,R)});function g_(s,o,d){o=d?e:o;var y=zs(s,V,e,e,e,e,e,o);return y.placeholder=g_.placeholder,y}function b_(s,o,d){o=d?e:o;var y=zs(s,q,e,e,e,e,e,o);return y.placeholder=b_.placeholder,y}function x_(s,o,d){var y,R,N,C,D,H,te=0,re=!1,oe=!1,de=!0;if(typeof s!="function")throw new un(n);o=dn(o)||0,br(d)&&(re=!!d.leading,oe="maxWait"in d,N=oe?zr(dn(d.maxWait)||0,o):N,de="trailing"in d?!!d.trailing:de);function Ie(Tr){var Cn=y,Gs=R;return y=R=e,te=Tr,C=s.apply(Gs,Cn),C}function Be(Tr){return te=Tr,D=sf(ht,o),re?Ie(Tr):C}function ft(Tr){var Cn=Tr-H,Gs=Tr-te,U_=o-Cn;return oe?ui(U_,N-Gs):U_}function Me(Tr){var Cn=Tr-H,Gs=Tr-te;return H===e||Cn>=o||Cn<0||oe&&Gs>=N}function ht(){var Tr=kp();if(Me(Tr))return bt(Tr);D=sf(ht,ft(Tr))}function bt(Tr){return D=e,de&&y?Ie(Tr):(y=R=e,C)}function $i(){D!==e&&O1(D),te=0,y=H=R=D=e}function xi(){return D===e?C:bt(kp())}function Xi(){var Tr=kp(),Cn=Me(Tr);if(y=arguments,R=this,H=Tr,Cn){if(D===e)return Be(H);if(oe)return O1(D),D=sf(ht,o),Ie(H)}return D===e&&(D=sf(ht,o)),C}return Xi.cancel=$i,Xi.flush=xi,Xi}var n5=lt(function(s,o){return c1(s,1,o)}),s5=lt(function(s,o,d){return c1(s,dn(o)||0,d)});function a5(s){return zs(s,be)}function Np(s,o){if(typeof s!="function"||o!=null&&typeof o!="function")throw new un(n);var d=function(){var y=arguments,R=o?o.apply(this,y):y[0],N=d.cache;if(N.has(R))return N.get(R);var C=s.apply(this,y);return d.cache=N.set(R,C)||N,C};return d.cache=new(Np.Cache||Fs),d}Np.Cache=Fs;function Pp(s){if(typeof s!="function")throw new un(n);return function(){var o=arguments;switch(o.length){case 0:return!s.call(this);case 1:return!s.call(this,o[0]);case 2:return!s.call(this,o[0],o[1]);case 3:return!s.call(this,o[0],o[1],o[2])}return!s.apply(this,o)}}function o5(s){return m_(2,s)}var c5=$R(function(s,o){o=o.length==1&&et(o[0])?vr(o[0],Ki(Ne())):vr(ii(o,1),Ki(Ne()));var d=o.length;return lt(function(y){for(var R=-1,N=ui(y.length,d);++R<N;)y[R]=o[R].call(this,y[R]);return Vi(s,this,y)})}),X0=lt(function(s,o){var d=ya(o,Nc(X0));return zs(s,ee,e,o,d)}),__=lt(function(s,o){var d=ya(o,Nc(__));return zs(s,fe,e,o,d)}),u5=js(function(s,o){return zs(s,Te,e,e,e,o)});function f5(s,o){if(typeof s!="function")throw new un(n);return o=o===e?o:at(o),lt(s,o)}function l5(s,o){if(typeof s!="function")throw new un(n);return o=o==null?0:zr(at(o),0),lt(function(d){var y=d[o],R=Ra(d,0,o);return y&&_a(R,y),Vi(s,this,R)})}function p5(s,o,d){var y=!0,R=!0;if(typeof s!="function")throw new un(n);return br(d)&&(y="leading"in d?!!d.leading:y,R="trailing"in d?!!d.trailing:R),x_(s,o,{leading:y,maxWait:o,trailing:R})}function h5(s){return d_(s,1)}function d5(s,o){return X0(B0(o),s)}function m5(){if(!arguments.length)return[];var s=arguments[0];return et(s)?s:[s]}function v5(s){return ln(s,I)}function g5(s,o){return o=typeof o=="function"?o:e,ln(s,I,o)}function b5(s){return ln(s,w|I)}function x5(s,o){return o=typeof o=="function"?o:e,ln(s,w|I,o)}function _5(s,o){return o==null||o1(s,o,Xr(o))}function Mn(s,o){return s===o||s!==s&&o!==o}var y5=Ep(y0),w5=Ep(function(s,o){return s>=o}),Eo=h1(function(){return arguments}())?h1:function(s){return _r(s)&&kt.call(s,"callee")&&!Qx.call(s,"callee")},et=$.isArray,S5=Mx?Ki(Mx):NR;function Ii(s){return s!=null&&Bp(s.length)&&!Ks(s)}function Er(s){return _r(s)&&Ii(s)}function E5(s){return s===!0||s===!1||_r(s)&&gi(s)==he}var Aa=UI||am,T5=Cx?Ki(Cx):PR;function I5(s){return _r(s)&&s.nodeType===1&&!af(s)}function R5(s){if(s==null)return!0;if(Ii(s)&&(et(s)||typeof s=="string"||typeof s.splice=="function"||Aa(s)||Pc(s)||Eo(s)))return!s.length;var o=fi(s);if(o==st||o==gt)return!s.size;if(nf(s))return!E0(s).length;for(var d in s)if(kt.call(s,d))return!1;return!0}function A5(s,o){return ef(s,o)}function O5(s,o,d){d=typeof d=="function"?d:e;var y=d?d(s,o):e;return y===e?ef(s,o,e,d):!!y}function Y0(s){if(!_r(s))return!1;var o=gi(s);return o==dt||o==me||typeof s.message=="string"&&typeof s.name=="string"&&!af(s)}function k5(s){return typeof s=="number"&&t1(s)}function Ks(s){if(!br(s))return!1;var o=gi(s);return o==St||o==Oe||o==ae||o==Ke}function y_(s){return typeof s=="number"&&s==at(s)}function Bp(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=S}function br(s){var o=typeof s;return s!=null&&(o=="object"||o=="function")}function _r(s){return s!=null&&typeof s=="object"}var w_=Lx?Ki(Lx):MR;function N5(s,o){return s===o||S0(s,o,F0(o))}function P5(s,o,d){return d=typeof d=="function"?d:e,S0(s,o,F0(o),d)}function B5(s){return S_(s)&&s!=+s}function M5(s){if(gA(s))throw new ze(i);return d1(s)}function C5(s){return s===null}function L5(s){return s==null}function S_(s){return typeof s=="number"||_r(s)&&gi(s)==rt}function af(s){if(!_r(s)||gi(s)!=Ae)return!1;var o=ap(s);if(o===null)return!0;var d=kt.call(o,"constructor")&&o.constructor;return typeof d=="function"&&d instanceof d&&rp.call(d)==PI}var Z0=Dx?Ki(Dx):CR;function D5(s){return y_(s)&&s>=-S&&s<=S}var E_=Ux?Ki(Ux):LR;function Mp(s){return typeof s=="string"||!et(s)&&_r(s)&&gi(s)==De}function Gi(s){return typeof s=="symbol"||_r(s)&&gi(s)==Pt}var Pc=qx?Ki(qx):DR;function U5(s){return s===e}function q5(s){return _r(s)&&fi(s)==Ue}function F5(s){return _r(s)&&gi(s)==er}var H5=Ep(T0),z5=Ep(function(s,o){return s<=o});function T_(s){if(!s)return[];if(Ii(s))return Mp(s)?Pn(s):Ti(s);if(Wu&&s[Wu])return _I(s[Wu]());var o=fi(s),d=o==st?p0:o==gt?Ql:Bc;return d(s)}function Ws(s){if(!s)return s===0?s:0;if(s=dn(s),s===x||s===-x){var o=s<0?-1:1;return o*_}return s===s?s:0}function at(s){var o=Ws(s),d=o%1;return o===o?d?o-d:o:0}function I_(s){return s?_o(at(s),0,m):0}function dn(s){if(typeof s=="number")return s;if(Gi(s))return l;if(br(s)){var o=typeof s.valueOf=="function"?s.valueOf():s;s=br(o)?o+"":o}if(typeof s!="string")return s===0?s:+s;s=Kx(s);var d=Rs.test(s);return d||Os.test(s)?iI(s.slice(2),d?2:8):Is.test(s)?l:+s}function R_(s){return as(s,Ri(s))}function j5(s){return s?_o(at(s),-S,S):s===0?s:0}function Rt(s){return s==null?"":Wi(s)}var V5=Oc(function(s,o){if(nf(o)||Ii(o)){as(o,Xr(o),s);return}for(var d in o)kt.call(o,d)&&Zu(s,d,o[d])}),A_=Oc(function(s,o){as(o,Ri(o),s)}),Cp=Oc(function(s,o,d,y){as(o,Ri(o),s,y)}),K5=Oc(function(s,o,d,y){as(o,Xr(o),s,y)}),W5=js(b0);function G5(s,o){var d=Ac(s);return o==null?d:a1(d,o)}var $5=lt(function(s,o){s=Vt(s);var d=-1,y=o.length,R=y>2?o[2]:e;for(R&&bi(o[0],o[1],R)&&(y=1);++d<y;)for(var N=o[d],C=Ri(N),D=-1,H=C.length;++D<H;){var te=C[D],re=s[te];(re===e||Mn(re,Tc[te])&&!kt.call(s,te))&&(s[te]=N[te])}return s}),X5=lt(function(s){return s.push(e,K1),Vi(O_,e,s)});function Y5(s,o){return Hx(s,Ne(o,3),ss)}function Z5(s,o){return Hx(s,Ne(o,3),_0)}function J5(s,o){return s==null?s:x0(s,Ne(o,3),Ri)}function Q5(s,o){return s==null?s:l1(s,Ne(o,3),Ri)}function eO(s,o){return s&&ss(s,Ne(o,3))}function tO(s,o){return s&&_0(s,Ne(o,3))}function rO(s){return s==null?[]:vp(s,Xr(s))}function iO(s){return s==null?[]:vp(s,Ri(s))}function J0(s,o,d){var y=s==null?e:yo(s,o);return y===e?d:y}function nO(s,o){return s!=null&&$1(s,o,RR)}function Q0(s,o){return s!=null&&$1(s,o,AR)}var sO=F1(function(s,o,d){o!=null&&typeof o.toString!="function"&&(o=ip.call(o)),s[o]=d},tm(Ai)),aO=F1(function(s,o,d){o!=null&&typeof o.toString!="function"&&(o=ip.call(o)),kt.call(s,o)?s[o].push(d):s[o]=[d]},Ne),oO=lt(Qu);function Xr(s){return Ii(s)?n1(s):E0(s)}function Ri(s){return Ii(s)?n1(s,!0):UR(s)}function cO(s,o){var d={};return o=Ne(o,3),ss(s,function(y,R,N){Hs(d,o(y,R,N),y)}),d}function uO(s,o){var d={};return o=Ne(o,3),ss(s,function(y,R,N){Hs(d,R,o(y,R,N))}),d}var fO=Oc(function(s,o,d){gp(s,o,d)}),O_=Oc(function(s,o,d,y){gp(s,o,d,y)}),lO=js(function(s,o){var d={};if(s==null)return d;var y=!1;o=vr(o,function(N){return N=Ia(N,s),y||(y=N.length>1),N}),as(s,U0(s),d),y&&(d=ln(d,w|T|I,sA));for(var R=o.length;R--;)k0(d,o[R]);return d});function pO(s,o){return k_(s,Pp(Ne(o)))}var hO=js(function(s,o){return s==null?{}:FR(s,o)});function k_(s,o){if(s==null)return{};var d=vr(U0(s),function(y){return[y]});return o=Ne(o),y1(s,d,function(y,R){return o(y,R[0])})}function dO(s,o,d){o=Ia(o,s);var y=-1,R=o.length;for(R||(R=1,s=e);++y<R;){var N=s==null?e:s[os(o[y])];N===e&&(y=R,N=d),s=Ks(N)?N.call(s):N}return s}function mO(s,o,d){return s==null?s:tf(s,o,d)}function vO(s,o,d,y){return y=typeof y=="function"?y:e,s==null?s:tf(s,o,d,y)}var N_=j1(Xr),P_=j1(Ri);function gO(s,o,d){var y=et(s),R=y||Aa(s)||Pc(s);if(o=Ne(o,4),d==null){var N=s&&s.constructor;R?d=y?new N:[]:br(s)?d=Ks(N)?Ac(ap(s)):{}:d={}}return(R?cn:ss)(s,function(C,D,H){return o(d,C,D,H)}),d}function bO(s,o){return s==null?!0:k0(s,o)}function xO(s,o,d){return s==null?s:I1(s,o,B0(d))}function _O(s,o,d,y){return y=typeof y=="function"?y:e,s==null?s:I1(s,o,B0(d),y)}function Bc(s){return s==null?[]:l0(s,Xr(s))}function yO(s){return s==null?[]:l0(s,Ri(s))}function wO(s,o,d){return d===e&&(d=o,o=e),d!==e&&(d=dn(d),d=d===d?d:0),o!==e&&(o=dn(o),o=o===o?o:0),_o(dn(s),o,d)}function SO(s,o,d){return o=Ws(o),d===e?(d=o,o=0):d=Ws(d),s=dn(s),OR(s,o,d)}function EO(s,o,d){if(d&&typeof d!="boolean"&&bi(s,o,d)&&(o=d=e),d===e&&(typeof o=="boolean"?(d=o,o=e):typeof s=="boolean"&&(d=s,s=e)),s===e&&o===e?(s=0,o=1):(s=Ws(s),o===e?(o=s,s=0):o=Ws(o)),s>o){var y=s;s=o,o=y}if(d||s%1||o%1){var R=r1();return ui(s+R*(o-s+rI("1e-"+((R+"").length-1))),o)}return R0(s,o)}var TO=kc(function(s,o,d){return o=o.toLowerCase(),s+(d?B_(o):o)});function B_(s){return em(Rt(s).toLowerCase())}function M_(s){return s=Rt(s),s&&s.replace(Ns,mI).replace(WT,"")}function IO(s,o,d){s=Rt(s),o=Wi(o);var y=s.length;d=d===e?y:_o(at(d),0,y);var R=d;return d-=o.length,d>=0&&s.slice(d,R)==o}function RO(s){return s=Rt(s),s&&ir.test(s)?s.replace($t,vI):s}function AO(s){return s=Rt(s),s&&Ye.test(s)?s.replace(Ht,"\\$&"):s}var OO=kc(function(s,o,d){return s+(d?"-":"")+o.toLowerCase()}),kO=kc(function(s,o,d){return s+(d?" ":"")+o.toLowerCase()}),NO=D1("toLowerCase");function PO(s,o,d){s=Rt(s),o=at(o);var y=o?Ec(s):0;if(!o||y>=o)return s;var R=(o-y)/2;return Sp(fp(R),d)+s+Sp(up(R),d)}function BO(s,o,d){s=Rt(s),o=at(o);var y=o?Ec(s):0;return o&&y<o?s+Sp(o-y,d):s}function MO(s,o,d){s=Rt(s),o=at(o);var y=o?Ec(s):0;return o&&y<o?Sp(o-y,d)+s:s}function CO(s,o,d){return d||o==null?o=0:o&&(o=+o),zI(Rt(s).replace(zt,""),o||0)}function LO(s,o,d){return(d?bi(s,o,d):o===e)?o=1:o=at(o),A0(Rt(s),o)}function DO(){var s=arguments,o=Rt(s[0]);return s.length<3?o:o.replace(s[1],s[2])}var UO=kc(function(s,o,d){return s+(d?"_":"")+o.toLowerCase()});function qO(s,o,d){return d&&typeof d!="number"&&bi(s,o,d)&&(o=d=e),d=d===e?m:d>>>0,d?(s=Rt(s),s&&(typeof o=="string"||o!=null&&!Z0(o))&&(o=Wi(o),!o&&Sc(s))?Ra(Pn(s),0,d):s.split(o,d)):[]}var FO=kc(function(s,o,d){return s+(d?" ":"")+em(o)});function HO(s,o,d){return s=Rt(s),d=d==null?0:_o(at(d),0,s.length),o=Wi(o),s.slice(d,d+o.length)==o}function zO(s,o,d){var y=k.templateSettings;d&&bi(s,o,d)&&(o=e),s=Rt(s),o=Cp({},o,y,V1);var R=Cp({},o.imports,y.imports,V1),N=Xr(R),C=l0(R,N),D,H,te=0,re=o.interpolate||sn,oe="__p += '",de=h0((o.escape||sn).source+"|"+re.source+"|"+(re===Xt?Qe:sn).source+"|"+(o.evaluate||sn).source+"|$","g"),Ie="//# sourceURL="+(kt.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ZT+"]")+`
11
- `;s.replace(de,function(Me,ht,bt,$i,xi,Xi){return bt||(bt=$i),oe+=s.slice(te,Xi).replace(Ps,gI),ht&&(D=!0,oe+=`' +
3
+ `)}function vA(s){return et(s)||To(s)||!!(r1&&s&&s[r1])}function Ks(s,o){var d=typeof s;return o=o??S,!!o&&(d=="number"||d!="symbol"&&Ns.test(s))&&s>-1&&s%1==0&&s<o}function bi(s,o,d){if(!br(d))return!1;var y=typeof o;return(y=="number"?Ii(d)&&Ks(o,d.length):y=="string"&&o in d)?Cn(d[o],s):!1}function V0(s,o){if(et(s))return!1;var d=typeof s;return d=="number"||d=="symbol"||d=="boolean"||s==null||Gi(s)?!0:Xe.test(s)||!sr.test(s)||o!=null&&s in Vt(o)}function gA(s){var o=typeof s;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?s!=="__proto__":s===null}function K0(s){var o=Ip(s),d=k[o];if(typeof d!="function"||!(o in mt.prototype))return!1;if(s===d)return!0;var y=H0(d);return!!y&&s===y[0]}function bA(s){return!!Jx&&Jx in s}var xA=rp?Ws:cm;function sf(s){var o=s&&s.constructor,d=typeof o=="function"&&o.prototype||Ic;return s===d}function J1(s){return s===s&&!br(s)}function Q1(s,o){return function(d){return d==null?!1:d[s]===o&&(o!==e||s in Vt(d))}}function _A(s){var o=Pp(s,function(y){return d.size===h&&d.clear(),y}),d=o.cache;return o}function yA(s,o){var d=s[1],y=o[1],R=d|y,N=R<(P|L|_e),C=y==_e&&d==V||y==_e&&d==Te&&s[7].length<=o[8]||y==(_e|Te)&&o[7].length<=o[8]&&d==V;if(!(N||C))return s;y&P&&(s[2]=o[2],R|=d&P?0:X);var D=o[3];if(D){var H=s[3];s[3]=H?C1(H,D,o[4]):D,s[4]=H?wa(s[3],b):o[4]}return D=o[5],D&&(H=s[5],s[5]=H?L1(H,D,o[6]):D,s[6]=H?wa(s[5],b):o[6]),D=o[7],D&&(s[7]=D),y&_e&&(s[8]=s[8]==null?o[8]:ui(s[8],o[8])),s[9]==null&&(s[9]=o[9]),s[0]=o[0],s[1]=R,s}function wA(s){var o=[];if(s!=null)for(var d in Vt(s))o.push(d);return o}function SA(s){return np.call(s)}function e_(s,o,d){return o=jr(o===e?s.length-1:o,0),function(){for(var y=arguments,R=-1,N=jr(y.length-o,0),C=$(N);++R<N;)C[R]=y[o+R];R=-1;for(var D=$(o+1);++R<o;)D[R]=y[R];return D[o]=d(C),Vi(s,this,D)}}function t_(s,o){return o.length<2?s:wo(s,pn(o,0,-1))}function EA(s,o){for(var d=s.length,y=ui(o.length,d),R=Ti(s);y--;){var N=o[y];s[y]=Ks(N,d)?R[N]:e}return s}function W0(s,o){if(!(o==="constructor"&&typeof s[o]=="function")&&o!="__proto__")return s[o]}var r_=n_(T1),af=qI||function(s,o){return Xr.setTimeout(s,o)},G0=n_(GR);function i_(s,o,d){var y=o+"";return G0(s,mA(y,TA(pA(y),d)))}function n_(s){var o=0,d=0;return function(){var y=jI(),R=c-(y-d);if(d=y,R>0){if(++o>=f)return arguments[0]}else o=0;return s.apply(e,arguments)}}function Ap(s,o){var d=-1,y=s.length,R=y-1;for(o=o===e?y:o;++d<o;){var N=O0(d,R),C=s[N];s[N]=s[d],s[d]=C}return s.length=o,s}var s_=_A(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(ar,function(d,y,R,N){o.push(R?N.replace(lr,"$1"):y||d)}),o});function cs(s){if(typeof s=="string"||Gi(s))return s;var o=s+"";return o=="0"&&1/s==-x?"-0":o}function Eo(s){if(s!=null){try{return ip.call(s)}catch{}try{return s+""}catch{}}return""}function TA(s,o){return cn(j,function(d){var y="_."+d[0];o&d[1]&&!Jl(s,y)&&s.push(y)}),s.sort()}function a_(s){if(s instanceof mt)return s.clone();var o=new fn(s.__wrapped__,s.__chain__);return o.__actions__=Ti(s.__actions__),o.__index__=s.__index__,o.__values__=s.__values__,o}function IA(s,o,d){(d?bi(s,o,d):o===e)?o=1:o=jr(at(o),0);var y=s==null?0:s.length;if(!y||o<1)return[];for(var R=0,N=0,C=$(fp(y/o));R<y;)C[N++]=pn(s,R,R+=o);return C}function RA(s){for(var o=-1,d=s==null?0:s.length,y=0,R=[];++o<d;){var N=s[o];N&&(R[y++]=N)}return R}function AA(){var s=arguments.length;if(!s)return[];for(var o=$(s-1),d=arguments[0],y=s;y--;)o[y-1]=arguments[y];return ya(et(d)?Ti(d):[d],ii(o,1))}var OA=lt(function(s,o){return Er(s)?Qu(s,ii(o,1,Er,!0)):[]}),kA=lt(function(s,o){var d=hn(o);return Er(d)&&(d=e),Er(s)?Qu(s,ii(o,1,Er,!0),Ne(d,2)):[]}),NA=lt(function(s,o){var d=hn(o);return Er(d)&&(d=e),Er(s)?Qu(s,ii(o,1,Er,!0),e,d):[]});function PA(s,o,d){var y=s==null?0:s.length;return y?(o=d||o===e?1:at(o),pn(s,o<0?0:o,y)):[]}function BA(s,o,d){var y=s==null?0:s.length;return y?(o=d||o===e?1:at(o),o=y-o,pn(s,0,o<0?0:o)):[]}function MA(s,o){return s&&s.length?_p(s,Ne(o,3),!0,!0):[]}function CA(s,o){return s&&s.length?_p(s,Ne(o,3),!0):[]}function LA(s,o,d,y){var R=s==null?0:s.length;return R?(d&&typeof d!="number"&&bi(s,o,d)&&(d=0,y=R),AR(s,o,d,y)):[]}function o_(s,o,d){var y=s==null?0:s.length;if(!y)return-1;var R=d==null?0:at(d);return R<0&&(R=jr(y+R,0)),Ql(s,Ne(o,3),R)}function c_(s,o,d){var y=s==null?0:s.length;if(!y)return-1;var R=y-1;return d!==e&&(R=at(d),R=d<0?jr(y+R,0):ui(R,y-1)),Ql(s,Ne(o,3),R,!0)}function u_(s){var o=s==null?0:s.length;return o?ii(s,1):[]}function DA(s){var o=s==null?0:s.length;return o?ii(s,x):[]}function UA(s,o){var d=s==null?0:s.length;return d?(o=o===e?1:at(o),ii(s,o)):[]}function qA(s){for(var o=-1,d=s==null?0:s.length,y={};++o<d;){var R=s[o];y[R[0]]=R[1]}return y}function f_(s){return s&&s.length?s[0]:e}function FA(s,o,d){var y=s==null?0:s.length;if(!y)return-1;var R=d==null?0:at(d);return R<0&&(R=jr(y+R,0)),Sc(s,o,R)}function HA(s){var o=s==null?0:s.length;return o?pn(s,0,-1):[]}var zA=lt(function(s){var o=vr(s,M0);return o.length&&o[0]===s[0]?E0(o):[]}),jA=lt(function(s){var o=hn(s),d=vr(s,M0);return o===hn(d)?o=e:d.pop(),d.length&&d[0]===s[0]?E0(d,Ne(o,2)):[]}),VA=lt(function(s){var o=hn(s),d=vr(s,M0);return o=typeof o=="function"?o:e,o&&d.pop(),d.length&&d[0]===s[0]?E0(d,e,o):[]});function KA(s,o){return s==null?"":HI.call(s,o)}function hn(s){var o=s==null?0:s.length;return o?s[o-1]:e}function WA(s,o,d){var y=s==null?0:s.length;if(!y)return-1;var R=y;return d!==e&&(R=at(d),R=R<0?jr(y+R,0):ui(R,y-1)),o===o?TI(s,o,R):Ql(s,Vx,R,!0)}function GA(s,o){return s&&s.length?y1(s,at(o)):e}var $A=lt(l_);function l_(s,o){return s&&s.length&&o&&o.length?A0(s,o):s}function XA(s,o,d){return s&&s.length&&o&&o.length?A0(s,o,Ne(d,2)):s}function YA(s,o,d){return s&&s.length&&o&&o.length?A0(s,o,e,d):s}var ZA=Vs(function(s,o){var d=s==null?0:s.length,y=_0(s,o);return E1(s,vr(o,function(R){return Ks(R,d)?+R:R}).sort(M1)),y});function JA(s,o){var d=[];if(!(s&&s.length))return d;var y=-1,R=[],N=s.length;for(o=Ne(o,3);++y<N;){var C=s[y];o(C,y,s)&&(d.push(C),R.push(y))}return E1(s,R),d}function $0(s){return s==null?s:KI.call(s)}function QA(s,o,d){var y=s==null?0:s.length;return y?(d&&typeof d!="number"&&bi(s,o,d)?(o=0,d=y):(o=o==null?0:at(o),d=d===e?y:at(d)),pn(s,o,d)):[]}function e8(s,o){return xp(s,o)}function t8(s,o,d){return N0(s,o,Ne(d,2))}function r8(s,o){var d=s==null?0:s.length;if(d){var y=xp(s,o);if(y<d&&Cn(s[y],o))return y}return-1}function i8(s,o){return xp(s,o,!0)}function n8(s,o,d){return N0(s,o,Ne(d,2),!0)}function s8(s,o){var d=s==null?0:s.length;if(d){var y=xp(s,o,!0)-1;if(Cn(s[y],o))return y}return-1}function a8(s){return s&&s.length?I1(s):[]}function o8(s,o){return s&&s.length?I1(s,Ne(o,2)):[]}function c8(s){var o=s==null?0:s.length;return o?pn(s,1,o):[]}function u8(s,o,d){return s&&s.length?(o=d||o===e?1:at(o),pn(s,0,o<0?0:o)):[]}function f8(s,o,d){var y=s==null?0:s.length;return y?(o=d||o===e?1:at(o),o=y-o,pn(s,o<0?0:o,y)):[]}function l8(s,o){return s&&s.length?_p(s,Ne(o,3),!1,!0):[]}function p8(s,o){return s&&s.length?_p(s,Ne(o,3)):[]}var h8=lt(function(s){return Ia(ii(s,1,Er,!0))}),d8=lt(function(s){var o=hn(s);return Er(o)&&(o=e),Ia(ii(s,1,Er,!0),Ne(o,2))}),m8=lt(function(s){var o=hn(s);return o=typeof o=="function"?o:e,Ia(ii(s,1,Er,!0),e,o)});function v8(s){return s&&s.length?Ia(s):[]}function g8(s,o){return s&&s.length?Ia(s,Ne(o,2)):[]}function b8(s,o){return o=typeof o=="function"?o:e,s&&s.length?Ia(s,e,o):[]}function X0(s){if(!(s&&s.length))return[];var o=0;return s=_a(s,function(d){if(Er(d))return o=jr(d.length,o),!0}),p0(o,function(d){return vr(s,u0(d))})}function p_(s,o){if(!(s&&s.length))return[];var d=X0(s);return o==null?d:vr(d,function(y){return Vi(o,e,y)})}var x8=lt(function(s,o){return Er(s)?Qu(s,o):[]}),_8=lt(function(s){return B0(_a(s,Er))}),y8=lt(function(s){var o=hn(s);return Er(o)&&(o=e),B0(_a(s,Er),Ne(o,2))}),w8=lt(function(s){var o=hn(s);return o=typeof o=="function"?o:e,B0(_a(s,Er),e,o)}),S8=lt(X0);function E8(s,o){return k1(s||[],o||[],Ju)}function T8(s,o){return k1(s||[],o||[],rf)}var I8=lt(function(s){var o=s.length,d=o>1?s[o-1]:e;return d=typeof d=="function"?(s.pop(),d):e,p_(s,d)});function h_(s){var o=k(s);return o.__chain__=!0,o}function R8(s,o){return o(s),s}function Op(s,o){return o(s)}var A8=Vs(function(s){var o=s.length,d=o?s[0]:0,y=this.__wrapped__,R=function(N){return _0(N,s)};return o>1||this.__actions__.length||!(y instanceof mt)||!Ks(d)?this.thru(R):(y=y.slice(d,+d+(o?1:0)),y.__actions__.push({func:Op,args:[R],thisArg:e}),new fn(y,this.__chain__).thru(function(N){return o&&!N.length&&N.push(e),N}))});function O8(){return h_(this)}function k8(){return new fn(this.value(),this.__chain__)}function N8(){this.__values__===e&&(this.__values__=R_(this.value()));var s=this.__index__>=this.__values__.length,o=s?e:this.__values__[this.__index__++];return{done:s,value:o}}function P8(){return this}function B8(s){for(var o,d=this;d instanceof dp;){var y=a_(d);y.__index__=0,y.__values__=e,o?R.__wrapped__=y:o=y;var R=y;d=d.__wrapped__}return R.__wrapped__=s,o}function M8(){var s=this.__wrapped__;if(s instanceof mt){var o=s;return this.__actions__.length&&(o=new mt(this)),o=o.reverse(),o.__actions__.push({func:Op,args:[$0],thisArg:e}),new fn(o,this.__chain__)}return this.thru($0)}function C8(){return O1(this.__wrapped__,this.__actions__)}var L8=yp(function(s,o,d){kt.call(s,d)?++s[d]:zs(s,d,1)});function D8(s,o,d){var y=et(s)?zx:RR;return d&&bi(s,o,d)&&(o=e),y(s,Ne(o,3))}function U8(s,o){var d=et(s)?_a:p1;return d(s,Ne(o,3))}var q8=F1(o_),F8=F1(c_);function H8(s,o){return ii(kp(s,o),1)}function z8(s,o){return ii(kp(s,o),x)}function j8(s,o,d){return d=d===e?1:at(d),ii(kp(s,o),d)}function d_(s,o){var d=et(s)?cn:Ta;return d(s,Ne(o,3))}function m_(s,o){var d=et(s)?cI:l1;return d(s,Ne(o,3))}var V8=yp(function(s,o,d){kt.call(s,d)?s[d].push(o):zs(s,d,[o])});function K8(s,o,d,y){s=Ii(s)?s:Mc(s),d=d&&!y?at(d):0;var R=s.length;return d<0&&(d=jr(R+d,0)),Cp(s)?d<=R&&s.indexOf(o,d)>-1:!!R&&Sc(s,o,d)>-1}var W8=lt(function(s,o,d){var y=-1,R=typeof o=="function",N=Ii(s)?$(s.length):[];return Ta(s,function(C){N[++y]=R?Vi(o,C,d):ef(C,o,d)}),N}),G8=yp(function(s,o,d){zs(s,d,o)});function kp(s,o){var d=et(s)?vr:b1;return d(s,Ne(o,3))}function $8(s,o,d,y){return s==null?[]:(et(o)||(o=o==null?[]:[o]),d=y?e:d,et(d)||(d=d==null?[]:[d]),w1(s,o,d))}var X8=yp(function(s,o,d){s[d?0:1].push(o)},function(){return[[],[]]});function Y8(s,o,d){var y=et(s)?o0:Wx,R=arguments.length<3;return y(s,Ne(o,4),d,R,Ta)}function Z8(s,o,d){var y=et(s)?uI:Wx,R=arguments.length<3;return y(s,Ne(o,4),d,R,l1)}function J8(s,o){var d=et(s)?_a:p1;return d(s,Bp(Ne(o,3)))}function Q8(s){var o=et(s)?o1:KR;return o(s)}function e5(s,o,d){(d?bi(s,o,d):o===e)?o=1:o=at(o);var y=et(s)?wR:WR;return y(s,o)}function t5(s){var o=et(s)?SR:$R;return o(s)}function r5(s){if(s==null)return 0;if(Ii(s))return Cp(s)?Tc(s):s.length;var o=fi(s);return o==st||o==bt?s.size:I0(s).length}function i5(s,o,d){var y=et(s)?c0:XR;return d&&bi(s,o,d)&&(o=e),y(s,Ne(o,3))}var n5=lt(function(s,o){if(s==null)return[];var d=o.length;return d>1&&bi(s,o[0],o[1])?o=[]:d>2&&bi(o[0],o[1],o[2])&&(o=[o[0]]),w1(s,ii(o,1),[])}),Np=UI||function(){return Xr.Date.now()};function s5(s,o){if(typeof o!="function")throw new un(n);return s=at(s),function(){if(--s<1)return o.apply(this,arguments)}}function v_(s,o,d){return o=d?e:o,o=s&&o==null?s.length:o,js(s,_e,e,e,e,e,o)}function g_(s,o){var d;if(typeof o!="function")throw new un(n);return s=at(s),function(){return--s>0&&(d=o.apply(this,arguments)),s<=1&&(o=e),d}}var Y0=lt(function(s,o,d){var y=P;if(d.length){var R=wa(d,Pc(Y0));y|=ee}return js(s,y,o,d,R)}),b_=lt(function(s,o,d){var y=P|L;if(d.length){var R=wa(d,Pc(b_));y|=ee}return js(o,y,s,d,R)});function x_(s,o,d){o=d?e:o;var y=js(s,V,e,e,e,e,e,o);return y.placeholder=x_.placeholder,y}function __(s,o,d){o=d?e:o;var y=js(s,q,e,e,e,e,e,o);return y.placeholder=__.placeholder,y}function y_(s,o,d){var y,R,N,C,D,H,te=0,re=!1,oe=!1,de=!0;if(typeof s!="function")throw new un(n);o=dn(o)||0,br(d)&&(re=!!d.leading,oe="maxWait"in d,N=oe?jr(dn(d.maxWait)||0,o):N,de="trailing"in d?!!d.trailing:de);function Ie(Tr){var Ln=y,$s=R;return y=R=e,te=Tr,C=s.apply($s,Ln),C}function Be(Tr){return te=Tr,D=af(ht,o),re?Ie(Tr):C}function ft(Tr){var Ln=Tr-H,$s=Tr-te,F_=o-Ln;return oe?ui(F_,N-$s):F_}function Me(Tr){var Ln=Tr-H,$s=Tr-te;return H===e||Ln>=o||Ln<0||oe&&$s>=N}function ht(){var Tr=Np();if(Me(Tr))return xt(Tr);D=af(ht,ft(Tr))}function xt(Tr){return D=e,de&&y?Ie(Tr):(y=R=e,C)}function $i(){D!==e&&N1(D),te=0,y=H=R=D=e}function xi(){return D===e?C:xt(Np())}function Xi(){var Tr=Np(),Ln=Me(Tr);if(y=arguments,R=this,H=Tr,Ln){if(D===e)return Be(H);if(oe)return N1(D),D=af(ht,o),Ie(H)}return D===e&&(D=af(ht,o)),C}return Xi.cancel=$i,Xi.flush=xi,Xi}var a5=lt(function(s,o){return f1(s,1,o)}),o5=lt(function(s,o,d){return f1(s,dn(o)||0,d)});function c5(s){return js(s,be)}function Pp(s,o){if(typeof s!="function"||o!=null&&typeof o!="function")throw new un(n);var d=function(){var y=arguments,R=o?o.apply(this,y):y[0],N=d.cache;if(N.has(R))return N.get(R);var C=s.apply(this,y);return d.cache=N.set(R,C)||N,C};return d.cache=new(Pp.Cache||Hs),d}Pp.Cache=Hs;function Bp(s){if(typeof s!="function")throw new un(n);return function(){var o=arguments;switch(o.length){case 0:return!s.call(this);case 1:return!s.call(this,o[0]);case 2:return!s.call(this,o[0],o[1]);case 3:return!s.call(this,o[0],o[1],o[2])}return!s.apply(this,o)}}function u5(s){return g_(2,s)}var f5=YR(function(s,o){o=o.length==1&&et(o[0])?vr(o[0],Ki(Ne())):vr(ii(o,1),Ki(Ne()));var d=o.length;return lt(function(y){for(var R=-1,N=ui(y.length,d);++R<N;)y[R]=o[R].call(this,y[R]);return Vi(s,this,y)})}),Z0=lt(function(s,o){var d=wa(o,Pc(Z0));return js(s,ee,e,o,d)}),w_=lt(function(s,o){var d=wa(o,Pc(w_));return js(s,fe,e,o,d)}),l5=Vs(function(s,o){return js(s,Te,e,e,e,o)});function p5(s,o){if(typeof s!="function")throw new un(n);return o=o===e?o:at(o),lt(s,o)}function h5(s,o){if(typeof s!="function")throw new un(n);return o=o==null?0:jr(at(o),0),lt(function(d){var y=d[o],R=Aa(d,0,o);return y&&ya(R,y),Vi(s,this,R)})}function d5(s,o,d){var y=!0,R=!0;if(typeof s!="function")throw new un(n);return br(d)&&(y="leading"in d?!!d.leading:y,R="trailing"in d?!!d.trailing:R),y_(s,o,{leading:y,maxWait:o,trailing:R})}function m5(s){return v_(s,1)}function v5(s,o){return Z0(C0(o),s)}function g5(){if(!arguments.length)return[];var s=arguments[0];return et(s)?s:[s]}function b5(s){return ln(s,I)}function x5(s,o){return o=typeof o=="function"?o:e,ln(s,I,o)}function _5(s){return ln(s,w|I)}function y5(s,o){return o=typeof o=="function"?o:e,ln(s,w|I,o)}function w5(s,o){return o==null||u1(s,o,Yr(o))}function Cn(s,o){return s===o||s!==s&&o!==o}var S5=Tp(S0),E5=Tp(function(s,o){return s>=o}),To=m1(function(){return arguments}())?m1:function(s){return _r(s)&&kt.call(s,"callee")&&!t1.call(s,"callee")},et=$.isArray,T5=Lx?Ki(Lx):BR;function Ii(s){return s!=null&&Mp(s.length)&&!Ws(s)}function Er(s){return _r(s)&&Ii(s)}function I5(s){return s===!0||s===!1||_r(s)&&gi(s)==he}var Oa=FI||cm,R5=Dx?Ki(Dx):MR;function A5(s){return _r(s)&&s.nodeType===1&&!of(s)}function O5(s){if(s==null)return!0;if(Ii(s)&&(et(s)||typeof s=="string"||typeof s.splice=="function"||Oa(s)||Bc(s)||To(s)))return!s.length;var o=fi(s);if(o==st||o==bt)return!s.size;if(sf(s))return!I0(s).length;for(var d in s)if(kt.call(s,d))return!1;return!0}function k5(s,o){return tf(s,o)}function N5(s,o,d){d=typeof d=="function"?d:e;var y=d?d(s,o):e;return y===e?tf(s,o,e,d):!!y}function J0(s){if(!_r(s))return!1;var o=gi(s);return o==dt||o==me||typeof s.message=="string"&&typeof s.name=="string"&&!of(s)}function P5(s){return typeof s=="number"&&i1(s)}function Ws(s){if(!br(s))return!1;var o=gi(s);return o==St||o==Oe||o==ae||o==Ke}function S_(s){return typeof s=="number"&&s==at(s)}function Mp(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=S}function br(s){var o=typeof s;return s!=null&&(o=="object"||o=="function")}function _r(s){return s!=null&&typeof s=="object"}var E_=Ux?Ki(Ux):LR;function B5(s,o){return s===o||T0(s,o,z0(o))}function M5(s,o,d){return d=typeof d=="function"?d:e,T0(s,o,z0(o),d)}function C5(s){return T_(s)&&s!=+s}function L5(s){if(xA(s))throw new ze(i);return v1(s)}function D5(s){return s===null}function U5(s){return s==null}function T_(s){return typeof s=="number"||_r(s)&&gi(s)==rt}function of(s){if(!_r(s)||gi(s)!=Ae)return!1;var o=op(s);if(o===null)return!0;var d=kt.call(o,"constructor")&&o.constructor;return typeof d=="function"&&d instanceof d&&ip.call(d)==MI}var Q0=qx?Ki(qx):DR;function q5(s){return S_(s)&&s>=-S&&s<=S}var I_=Fx?Ki(Fx):UR;function Cp(s){return typeof s=="string"||!et(s)&&_r(s)&&gi(s)==De}function Gi(s){return typeof s=="symbol"||_r(s)&&gi(s)==Pt}var Bc=Hx?Ki(Hx):qR;function F5(s){return s===e}function H5(s){return _r(s)&&fi(s)==Ue}function z5(s){return _r(s)&&gi(s)==er}var j5=Tp(R0),V5=Tp(function(s,o){return s<=o});function R_(s){if(!s)return[];if(Ii(s))return Cp(s)?Bn(s):Ti(s);if(Gu&&s[Gu])return wI(s[Gu]());var o=fi(s),d=o==st?d0:o==bt?ep:Mc;return d(s)}function Gs(s){if(!s)return s===0?s:0;if(s=dn(s),s===x||s===-x){var o=s<0?-1:1;return o*_}return s===s?s:0}function at(s){var o=Gs(s),d=o%1;return o===o?d?o-d:o:0}function A_(s){return s?yo(at(s),0,m):0}function dn(s){if(typeof s=="number")return s;if(Gi(s))return l;if(br(s)){var o=typeof s.valueOf=="function"?s.valueOf():s;s=br(o)?o+"":o}if(typeof s!="string")return s===0?s:+s;s=Gx(s);var d=As.test(s);return d||ks.test(s)?sI(s.slice(2),d?2:8):Rs.test(s)?l:+s}function O_(s){return os(s,Ri(s))}function K5(s){return s?yo(at(s),-S,S):s===0?s:0}function Rt(s){return s==null?"":Wi(s)}var W5=kc(function(s,o){if(sf(o)||Ii(o)){os(o,Yr(o),s);return}for(var d in o)kt.call(o,d)&&Ju(s,d,o[d])}),k_=kc(function(s,o){os(o,Ri(o),s)}),Lp=kc(function(s,o,d,y){os(o,Ri(o),s,y)}),G5=kc(function(s,o,d,y){os(o,Yr(o),s,y)}),$5=Vs(_0);function X5(s,o){var d=Oc(s);return o==null?d:c1(d,o)}var Y5=lt(function(s,o){s=Vt(s);var d=-1,y=o.length,R=y>2?o[2]:e;for(R&&bi(o[0],o[1],R)&&(y=1);++d<y;)for(var N=o[d],C=Ri(N),D=-1,H=C.length;++D<H;){var te=C[D],re=s[te];(re===e||Cn(re,Ic[te])&&!kt.call(s,te))&&(s[te]=N[te])}return s}),Z5=lt(function(s){return s.push(e,G1),Vi(N_,e,s)});function J5(s,o){return jx(s,Ne(o,3),as)}function Q5(s,o){return jx(s,Ne(o,3),w0)}function eO(s,o){return s==null?s:y0(s,Ne(o,3),Ri)}function tO(s,o){return s==null?s:h1(s,Ne(o,3),Ri)}function rO(s,o){return s&&as(s,Ne(o,3))}function iO(s,o){return s&&w0(s,Ne(o,3))}function nO(s){return s==null?[]:gp(s,Yr(s))}function sO(s){return s==null?[]:gp(s,Ri(s))}function em(s,o,d){var y=s==null?e:wo(s,o);return y===e?d:y}function aO(s,o){return s!=null&&Y1(s,o,OR)}function tm(s,o){return s!=null&&Y1(s,o,kR)}var oO=z1(function(s,o,d){o!=null&&typeof o.toString!="function"&&(o=np.call(o)),s[o]=d},im(Ai)),cO=z1(function(s,o,d){o!=null&&typeof o.toString!="function"&&(o=np.call(o)),kt.call(s,o)?s[o].push(d):s[o]=[d]},Ne),uO=lt(ef);function Yr(s){return Ii(s)?a1(s):I0(s)}function Ri(s){return Ii(s)?a1(s,!0):FR(s)}function fO(s,o){var d={};return o=Ne(o,3),as(s,function(y,R,N){zs(d,o(y,R,N),y)}),d}function lO(s,o){var d={};return o=Ne(o,3),as(s,function(y,R,N){zs(d,R,o(y,R,N))}),d}var pO=kc(function(s,o,d){bp(s,o,d)}),N_=kc(function(s,o,d,y){bp(s,o,d,y)}),hO=Vs(function(s,o){var d={};if(s==null)return d;var y=!1;o=vr(o,function(N){return N=Ra(N,s),y||(y=N.length>1),N}),os(s,F0(s),d),y&&(d=ln(d,w|T|I,oA));for(var R=o.length;R--;)P0(d,o[R]);return d});function dO(s,o){return P_(s,Bp(Ne(o)))}var mO=Vs(function(s,o){return s==null?{}:zR(s,o)});function P_(s,o){if(s==null)return{};var d=vr(F0(s),function(y){return[y]});return o=Ne(o),S1(s,d,function(y,R){return o(y,R[0])})}function vO(s,o,d){o=Ra(o,s);var y=-1,R=o.length;for(R||(R=1,s=e);++y<R;){var N=s==null?e:s[cs(o[y])];N===e&&(y=R,N=d),s=Ws(N)?N.call(s):N}return s}function gO(s,o,d){return s==null?s:rf(s,o,d)}function bO(s,o,d,y){return y=typeof y=="function"?y:e,s==null?s:rf(s,o,d,y)}var B_=K1(Yr),M_=K1(Ri);function xO(s,o,d){var y=et(s),R=y||Oa(s)||Bc(s);if(o=Ne(o,4),d==null){var N=s&&s.constructor;R?d=y?new N:[]:br(s)?d=Ws(N)?Oc(op(s)):{}:d={}}return(R?cn:as)(s,function(C,D,H){return o(d,C,D,H)}),d}function _O(s,o){return s==null?!0:P0(s,o)}function yO(s,o,d){return s==null?s:A1(s,o,C0(d))}function wO(s,o,d,y){return y=typeof y=="function"?y:e,s==null?s:A1(s,o,C0(d),y)}function Mc(s){return s==null?[]:h0(s,Yr(s))}function SO(s){return s==null?[]:h0(s,Ri(s))}function EO(s,o,d){return d===e&&(d=o,o=e),d!==e&&(d=dn(d),d=d===d?d:0),o!==e&&(o=dn(o),o=o===o?o:0),yo(dn(s),o,d)}function TO(s,o,d){return o=Gs(o),d===e?(d=o,o=0):d=Gs(d),s=dn(s),NR(s,o,d)}function IO(s,o,d){if(d&&typeof d!="boolean"&&bi(s,o,d)&&(o=d=e),d===e&&(typeof o=="boolean"?(d=o,o=e):typeof s=="boolean"&&(d=s,s=e)),s===e&&o===e?(s=0,o=1):(s=Gs(s),o===e?(o=s,s=0):o=Gs(o)),s>o){var y=s;s=o,o=y}if(d||s%1||o%1){var R=n1();return ui(s+R*(o-s+nI("1e-"+((R+"").length-1))),o)}return O0(s,o)}var RO=Nc(function(s,o,d){return o=o.toLowerCase(),s+(d?C_(o):o)});function C_(s){return rm(Rt(s).toLowerCase())}function L_(s){return s=Rt(s),s&&s.replace(Ps,gI).replace($T,"")}function AO(s,o,d){s=Rt(s),o=Wi(o);var y=s.length;d=d===e?y:yo(at(d),0,y);var R=d;return d-=o.length,d>=0&&s.slice(d,R)==o}function OO(s){return s=Rt(s),s&&ir.test(s)?s.replace($t,bI):s}function kO(s){return s=Rt(s),s&&Ye.test(s)?s.replace(Ht,"\\$&"):s}var NO=Nc(function(s,o,d){return s+(d?"-":"")+o.toLowerCase()}),PO=Nc(function(s,o,d){return s+(d?" ":"")+o.toLowerCase()}),BO=q1("toLowerCase");function MO(s,o,d){s=Rt(s),o=at(o);var y=o?Tc(s):0;if(!o||y>=o)return s;var R=(o-y)/2;return Ep(lp(R),d)+s+Ep(fp(R),d)}function CO(s,o,d){s=Rt(s),o=at(o);var y=o?Tc(s):0;return o&&y<o?s+Ep(o-y,d):s}function LO(s,o,d){s=Rt(s),o=at(o);var y=o?Tc(s):0;return o&&y<o?Ep(o-y,d)+s:s}function DO(s,o,d){return d||o==null?o=0:o&&(o=+o),VI(Rt(s).replace(zt,""),o||0)}function UO(s,o,d){return(d?bi(s,o,d):o===e)?o=1:o=at(o),k0(Rt(s),o)}function qO(){var s=arguments,o=Rt(s[0]);return s.length<3?o:o.replace(s[1],s[2])}var FO=Nc(function(s,o,d){return s+(d?"_":"")+o.toLowerCase()});function HO(s,o,d){return d&&typeof d!="number"&&bi(s,o,d)&&(o=d=e),d=d===e?m:d>>>0,d?(s=Rt(s),s&&(typeof o=="string"||o!=null&&!Q0(o))&&(o=Wi(o),!o&&Ec(s))?Aa(Bn(s),0,d):s.split(o,d)):[]}var zO=Nc(function(s,o,d){return s+(d?" ":"")+rm(o)});function jO(s,o,d){return s=Rt(s),d=d==null?0:yo(at(d),0,s.length),o=Wi(o),s.slice(d,d+o.length)==o}function VO(s,o,d){var y=k.templateSettings;d&&bi(s,o,d)&&(o=e),s=Rt(s),o=Lp({},o,y,W1);var R=Lp({},o.imports,y.imports,W1),N=Yr(R),C=h0(R,N),D,H,te=0,re=o.interpolate||sn,oe="__p += '",de=m0((o.escape||sn).source+"|"+re.source+"|"+(re===Xt?Qe:sn).source+"|"+(o.evaluate||sn).source+"|$","g"),Ie="//# sourceURL="+(kt.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++QT+"]")+`
4
+ `;s.replace(de,function(Me,ht,xt,$i,xi,Xi){return xt||(xt=$i),oe+=s.slice(te,Xi).replace(Bs,xI),ht&&(D=!0,oe+=`' +
12
5
  __e(`+ht+`) +
13
6
  '`),xi&&(H=!0,oe+=`';
14
7
  `+xi+`;
15
- __p += '`),bt&&(oe+=`' +
16
- ((__t = (`+bt+`)) == null ? '' : __t) +
8
+ __p += '`),xt&&(oe+=`' +
9
+ ((__t = (`+xt+`)) == null ? '' : __t) +
17
10
  '`),te=Xi+Me.length,Me}),oe+=`';
18
11
  `;var Be=kt.call(o,"variable")&&o.variable;if(!Be)oe=`with (obj) {
19
12
  `+oe+`
@@ -24,36 +17,27 @@ __p += '`),bt&&(oe+=`' +
24
17
  function print() { __p += __j.call(arguments, '') }
25
18
  `:`;
26
19
  `)+oe+`return __p
27
- }`;var ft=L_(function(){return Tt(N,Ie+"return "+oe).apply(e,C)});if(ft.source=oe,Y0(ft))throw ft;return ft}function jO(s){return Rt(s).toLowerCase()}function VO(s){return Rt(s).toUpperCase()}function KO(s,o,d){if(s=Rt(s),s&&(d||o===e))return Kx(s);if(!s||!(o=Wi(o)))return s;var y=Pn(s),R=Pn(o),N=Wx(y,R),C=Gx(y,R)+1;return Ra(y,N,C).join("")}function WO(s,o,d){if(s=Rt(s),s&&(d||o===e))return s.slice(0,Xx(s)+1);if(!s||!(o=Wi(o)))return s;var y=Pn(s),R=Gx(y,Pn(o))+1;return Ra(y,0,R).join("")}function GO(s,o,d){if(s=Rt(s),s&&(d||o===e))return s.replace(zt,"");if(!s||!(o=Wi(o)))return s;var y=Pn(s),R=Wx(y,Pn(o));return Ra(y,R).join("")}function $O(s,o){var d=O,y=E;if(br(o)){var R="separator"in o?o.separator:R;d="length"in o?at(o.length):d,y="omission"in o?Wi(o.omission):y}s=Rt(s);var N=s.length;if(Sc(s)){var C=Pn(s);N=C.length}if(d>=N)return s;var D=d-Ec(y);if(D<1)return y;var H=C?Ra(C,0,D).join(""):s.slice(0,D);if(R===e)return H+y;if(C&&(D+=H.length-D),Z0(R)){if(s.slice(D).search(R)){var te,re=H;for(R.global||(R=h0(R.source,Rt(jt.exec(R))+"g")),R.lastIndex=0;te=R.exec(re);)var oe=te.index;H=H.slice(0,oe===e?D:oe)}}else if(s.indexOf(Wi(R),D)!=D){var de=H.lastIndexOf(R);de>-1&&(H=H.slice(0,de))}return H+y}function XO(s){return s=Rt(s),s&&Ge.test(s)?s.replace(Gt,EI):s}var YO=kc(function(s,o,d){return s+(d?" ":"")+o.toUpperCase()}),em=D1("toUpperCase");function C_(s,o,d){return s=Rt(s),o=d?e:o,o===e?xI(s)?RI(s):fI(s):s.match(o)||[]}var L_=lt(function(s,o){try{return Vi(s,e,o)}catch(d){return Y0(d)?d:new ze(d)}}),ZO=js(function(s,o){return cn(o,function(d){d=os(d),Hs(s,d,$0(s[d],s))}),s});function JO(s){var o=s==null?0:s.length,d=Ne();return s=o?vr(s,function(y){if(typeof y[1]!="function")throw new un(n);return[d(y[0]),y[1]]}):[],lt(function(y){for(var R=-1;++R<o;){var N=s[R];if(Vi(N[0],this,y))return Vi(N[1],this,y)}})}function QO(s){return ER(ln(s,w))}function tm(s){return function(){return s}}function e7(s,o){return s==null||s!==s?o:s}var t7=q1(),r7=q1(!0);function Ai(s){return s}function rm(s){return m1(typeof s=="function"?s:ln(s,w))}function i7(s){return g1(ln(s,w))}function n7(s,o){return b1(s,ln(o,w))}var s7=lt(function(s,o){return function(d){return Qu(d,s,o)}}),a7=lt(function(s,o){return function(d){return Qu(s,d,o)}});function im(s,o,d){var y=Xr(o),R=vp(o,y);d==null&&!(br(o)&&(R.length||!y.length))&&(d=o,o=s,s=this,R=vp(o,Xr(o)));var N=!(br(d)&&"chain"in d)||!!d.chain,C=Ks(s);return cn(R,function(D){var H=o[D];s[D]=H,C&&(s.prototype[D]=function(){var te=this.__chain__;if(N||te){var re=s(this.__wrapped__),oe=re.__actions__=Ti(this.__actions__);return oe.push({func:H,args:arguments,thisArg:s}),re.__chain__=te,re}return H.apply(s,_a([this.value()],arguments))})}),s}function o7(){return $r._===this&&($r._=BI),this}function nm(){}function c7(s){return s=at(s),lt(function(o){return x1(o,s)})}var u7=C0(vr),f7=C0(Fx),l7=C0(a0);function D_(s){return z0(s)?o0(os(s)):HR(s)}function p7(s){return function(o){return s==null?e:yo(s,o)}}var h7=H1(),d7=H1(!0);function sm(){return[]}function am(){return!1}function m7(){return{}}function v7(){return""}function g7(){return!0}function b7(s,o){if(s=at(s),s<1||s>S)return[];var d=m,y=ui(s,m);o=Ne(o),s-=m;for(var R=f0(y,o);++d<s;)o(d);return R}function x7(s){return et(s)?vr(s,os):Gi(s)?[s]:Ti(i_(Rt(s)))}function _7(s){var o=++NI;return Rt(s)+o}var y7=wp(function(s,o){return s+o},0),w7=L0("ceil"),S7=wp(function(s,o){return s/o},1),E7=L0("floor");function T7(s){return s&&s.length?mp(s,Ai,y0):e}function I7(s,o){return s&&s.length?mp(s,Ne(o,2),y0):e}function R7(s){return jx(s,Ai)}function A7(s,o){return jx(s,Ne(o,2))}function O7(s){return s&&s.length?mp(s,Ai,T0):e}function k7(s,o){return s&&s.length?mp(s,Ne(o,2),T0):e}var N7=wp(function(s,o){return s*o},1),P7=L0("round"),B7=wp(function(s,o){return s-o},0);function M7(s){return s&&s.length?u0(s,Ai):0}function C7(s,o){return s&&s.length?u0(s,Ne(o,2)):0}return k.after=i5,k.ary=d_,k.assign=V5,k.assignIn=A_,k.assignInWith=Cp,k.assignWith=K5,k.at=W5,k.before=m_,k.bind=$0,k.bindAll=ZO,k.bindKey=v_,k.castArray=m5,k.chain=l_,k.chunk=EA,k.compact=TA,k.concat=IA,k.cond=JO,k.conforms=QO,k.constant=tm,k.countBy=M8,k.create=G5,k.curry=g_,k.curryRight=b_,k.debounce=x_,k.defaults=$5,k.defaultsDeep=X5,k.defer=n5,k.delay=s5,k.difference=RA,k.differenceBy=AA,k.differenceWith=OA,k.drop=kA,k.dropRight=NA,k.dropRightWhile=PA,k.dropWhile=BA,k.fill=MA,k.filter=L8,k.flatMap=q8,k.flatMapDeep=F8,k.flatMapDepth=H8,k.flatten=o_,k.flattenDeep=CA,k.flattenDepth=LA,k.flip=a5,k.flow=t7,k.flowRight=r7,k.fromPairs=DA,k.functions=rO,k.functionsIn=iO,k.groupBy=z8,k.initial=qA,k.intersection=FA,k.intersectionBy=HA,k.intersectionWith=zA,k.invert=sO,k.invertBy=aO,k.invokeMap=V8,k.iteratee=rm,k.keyBy=K8,k.keys=Xr,k.keysIn=Ri,k.map=Op,k.mapKeys=cO,k.mapValues=uO,k.matches=i7,k.matchesProperty=n7,k.memoize=Np,k.merge=fO,k.mergeWith=O_,k.method=s7,k.methodOf=a7,k.mixin=im,k.negate=Pp,k.nthArg=c7,k.omit=lO,k.omitBy=pO,k.once=o5,k.orderBy=W8,k.over=u7,k.overArgs=c5,k.overEvery=f7,k.overSome=l7,k.partial=X0,k.partialRight=__,k.partition=G8,k.pick=hO,k.pickBy=k_,k.property=D_,k.propertyOf=p7,k.pull=WA,k.pullAll=u_,k.pullAllBy=GA,k.pullAllWith=$A,k.pullAt=XA,k.range=h7,k.rangeRight=d7,k.rearg=u5,k.reject=Y8,k.remove=YA,k.rest=f5,k.reverse=W0,k.sampleSize=J8,k.set=mO,k.setWith=vO,k.shuffle=Q8,k.slice=ZA,k.sortBy=r5,k.sortedUniq=n8,k.sortedUniqBy=s8,k.split=qO,k.spread=l5,k.tail=a8,k.take=o8,k.takeRight=c8,k.takeRightWhile=u8,k.takeWhile=f8,k.tap=T8,k.throttle=p5,k.thru=Ap,k.toArray=T_,k.toPairs=N_,k.toPairsIn=P_,k.toPath=x7,k.toPlainObject=R_,k.transform=gO,k.unary=h5,k.union=l8,k.unionBy=p8,k.unionWith=h8,k.uniq=d8,k.uniqBy=m8,k.uniqWith=v8,k.unset=bO,k.unzip=G0,k.unzipWith=f_,k.update=xO,k.updateWith=_O,k.values=Bc,k.valuesIn=yO,k.without=g8,k.words=C_,k.wrap=d5,k.xor=b8,k.xorBy=x8,k.xorWith=_8,k.zip=y8,k.zipObject=w8,k.zipObjectDeep=S8,k.zipWith=E8,k.entries=N_,k.entriesIn=P_,k.extend=A_,k.extendWith=Cp,im(k,k),k.add=y7,k.attempt=L_,k.camelCase=TO,k.capitalize=B_,k.ceil=w7,k.clamp=wO,k.clone=v5,k.cloneDeep=b5,k.cloneDeepWith=x5,k.cloneWith=g5,k.conformsTo=_5,k.deburr=M_,k.defaultTo=e7,k.divide=S7,k.endsWith=IO,k.eq=Mn,k.escape=RO,k.escapeRegExp=AO,k.every=C8,k.find=D8,k.findIndex=s_,k.findKey=Y5,k.findLast=U8,k.findLastIndex=a_,k.findLastKey=Z5,k.floor=E7,k.forEach=p_,k.forEachRight=h_,k.forIn=J5,k.forInRight=Q5,k.forOwn=eO,k.forOwnRight=tO,k.get=J0,k.gt=y5,k.gte=w5,k.has=nO,k.hasIn=Q0,k.head=c_,k.identity=Ai,k.includes=j8,k.indexOf=UA,k.inRange=SO,k.invoke=oO,k.isArguments=Eo,k.isArray=et,k.isArrayBuffer=S5,k.isArrayLike=Ii,k.isArrayLikeObject=Er,k.isBoolean=E5,k.isBuffer=Aa,k.isDate=T5,k.isElement=I5,k.isEmpty=R5,k.isEqual=A5,k.isEqualWith=O5,k.isError=Y0,k.isFinite=k5,k.isFunction=Ks,k.isInteger=y_,k.isLength=Bp,k.isMap=w_,k.isMatch=N5,k.isMatchWith=P5,k.isNaN=B5,k.isNative=M5,k.isNil=L5,k.isNull=C5,k.isNumber=S_,k.isObject=br,k.isObjectLike=_r,k.isPlainObject=af,k.isRegExp=Z0,k.isSafeInteger=D5,k.isSet=E_,k.isString=Mp,k.isSymbol=Gi,k.isTypedArray=Pc,k.isUndefined=U5,k.isWeakMap=q5,k.isWeakSet=F5,k.join=jA,k.kebabCase=OO,k.last=hn,k.lastIndexOf=VA,k.lowerCase=kO,k.lowerFirst=NO,k.lt=H5,k.lte=z5,k.max=T7,k.maxBy=I7,k.mean=R7,k.meanBy=A7,k.min=O7,k.minBy=k7,k.stubArray=sm,k.stubFalse=am,k.stubObject=m7,k.stubString=v7,k.stubTrue=g7,k.multiply=N7,k.nth=KA,k.noConflict=o7,k.noop=nm,k.now=kp,k.pad=PO,k.padEnd=BO,k.padStart=MO,k.parseInt=CO,k.random=EO,k.reduce=$8,k.reduceRight=X8,k.repeat=LO,k.replace=DO,k.result=dO,k.round=P7,k.runInContext=F,k.sample=Z8,k.size=e5,k.snakeCase=UO,k.some=t5,k.sortedIndex=JA,k.sortedIndexBy=QA,k.sortedIndexOf=e8,k.sortedLastIndex=t8,k.sortedLastIndexBy=r8,k.sortedLastIndexOf=i8,k.startCase=FO,k.startsWith=HO,k.subtract=B7,k.sum=M7,k.sumBy=C7,k.template=zO,k.times=b7,k.toFinite=Ws,k.toInteger=at,k.toLength=I_,k.toLower=jO,k.toNumber=dn,k.toSafeInteger=j5,k.toString=Rt,k.toUpper=VO,k.trim=KO,k.trimEnd=WO,k.trimStart=GO,k.truncate=$O,k.unescape=XO,k.uniqueId=_7,k.upperCase=YO,k.upperFirst=em,k.each=p_,k.eachRight=h_,k.first=c_,im(k,function(){var s={};return ss(k,function(o,d){kt.call(k.prototype,d)||(s[d]=o)}),s}(),{chain:!1}),k.VERSION=t,cn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){k[s].placeholder=k}),cn(["drop","take"],function(s,o){mt.prototype[s]=function(d){d=d===e?1:zr(at(d),0);var y=this.__filtered__&&!o?new mt(this):this.clone();return y.__filtered__?y.__takeCount__=ui(d,y.__takeCount__):y.__views__.push({size:ui(d,m),type:s+(y.__dir__<0?"Right":"")}),y},mt.prototype[s+"Right"]=function(d){return this.reverse()[s](d).reverse()}}),cn(["filter","map","takeWhile"],function(s,o){var d=o+1,y=d==p||d==g;mt.prototype[s]=function(R){var N=this.clone();return N.__iteratees__.push({iteratee:Ne(R,3),type:d}),N.__filtered__=N.__filtered__||y,N}}),cn(["head","last"],function(s,o){var d="take"+(o?"Right":"");mt.prototype[s]=function(){return this[d](1).value()[0]}}),cn(["initial","tail"],function(s,o){var d="drop"+(o?"":"Right");mt.prototype[s]=function(){return this.__filtered__?new mt(this):this[d](1)}}),mt.prototype.compact=function(){return this.filter(Ai)},mt.prototype.find=function(s){return this.filter(s).head()},mt.prototype.findLast=function(s){return this.reverse().find(s)},mt.prototype.invokeMap=lt(function(s,o){return typeof s=="function"?new mt(this):this.map(function(d){return Qu(d,s,o)})}),mt.prototype.reject=function(s){return this.filter(Pp(Ne(s)))},mt.prototype.slice=function(s,o){s=at(s);var d=this;return d.__filtered__&&(s>0||o<0)?new mt(d):(s<0?d=d.takeRight(-s):s&&(d=d.drop(s)),o!==e&&(o=at(o),d=o<0?d.dropRight(-o):d.take(o-s)),d)},mt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},mt.prototype.toArray=function(){return this.take(m)},ss(mt.prototype,function(s,o){var d=/^(?:filter|find|map|reject)|While$/.test(o),y=/^(?:head|last)$/.test(o),R=k[y?"take"+(o=="last"?"Right":""):o],N=y||/^find/.test(o);R&&(k.prototype[o]=function(){var C=this.__wrapped__,D=y?[1]:arguments,H=C instanceof mt,te=D[0],re=H||et(C),oe=function(ht){var bt=R.apply(k,_a([ht],D));return y&&de?bt[0]:bt};re&&d&&typeof te=="function"&&te.length!=1&&(H=re=!1);var de=this.__chain__,Ie=!!this.__actions__.length,Be=N&&!de,ft=H&&!Ie;if(!N&&re){C=ft?C:new mt(this);var Me=s.apply(C,D);return Me.__actions__.push({func:Ap,args:[oe],thisArg:e}),new fn(Me,de)}return Be&&ft?s.apply(this,D):(Me=this.thru(oe),Be?y?Me.value()[0]:Me.value():Me)})}),cn(["pop","push","shift","sort","splice","unshift"],function(s){var o=ep[s],d=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",y=/^(?:pop|shift)$/.test(s);k.prototype[s]=function(){var R=arguments;if(y&&!this.__chain__){var N=this.value();return o.apply(et(N)?N:[],R)}return this[d](function(C){return o.apply(et(C)?C:[],R)})}}),ss(mt.prototype,function(s,o){var d=k[o];if(d){var y=d.name+"";kt.call(Rc,y)||(Rc[y]=[]),Rc[y].push({name:o,func:d})}}),Rc[yp(e,L).name]=[{name:"wrapper",func:e}],mt.prototype.clone=XI,mt.prototype.reverse=YI,mt.prototype.value=ZI,k.prototype.at=I8,k.prototype.chain=R8,k.prototype.commit=A8,k.prototype.next=O8,k.prototype.plant=N8,k.prototype.reverse=P8,k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=B8,k.prototype.first=k.prototype.head,Wu&&(k.prototype[Wu]=k8),k},wa=AI();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($r._=wa,define(function(){return wa})):vo?((vo.exports=wa)._=wa,r0._=wa):$r._=wa}).call(ru)});var NS=W((_Q,kS)=>{"use strict";var cM="http://bitcore.io/";kS.exports=[{name:"InvalidB58Char",message:"Invalid Base58 character: {0} in {1}"},{name:"InvalidB58Checksum",message:"Invalid Base58 checksum for {0}"},{name:"InvalidNetwork",message:"Invalid version for network: got {0}"},{name:"InvalidState",message:"Invalid state: {0}"},{name:"NotImplemented",message:"Function {0} was not implemented yet"},{name:"InvalidNetworkArgument",message:'Invalid network: must be "livenet" or "testnet", got {0}'},{name:"InvalidArgument",message:function(){return"Invalid Argument"+(arguments[0]?": "+arguments[0]:"")+(arguments[1]?" Documentation: "+cM+arguments[1]:"")}},{name:"AbstractMethodInvoked",message:"Abstract Method Invocation: {0}"},{name:"InvalidArgumentType",message:function(){return"Invalid Argument for "+arguments[2]+", expected "+arguments[1]+" but got "+typeof arguments[0]}},{name:"Unit",message:"Internal Error on Unit {0}",errors:[{name:"UnknownCode",message:"Unrecognized unit code: {0}"},{name:"InvalidRate",message:"Invalid exchange rate: {0}"}]},{name:"MerkleBlock",message:"Internal Error on MerkleBlock {0}",errors:[{name:"InvalidMerkleTree",message:"This MerkleBlock contain an invalid Merkle Tree"}]},{name:"Transaction",message:"Internal Error on Transaction {0}",errors:[{name:"Input",message:"Internal Error on Input {0}",errors:[{name:"MissingScript",message:"Need a script to create an input"},{name:"UnsupportedScript",message:"Unsupported input script type: {0}"},{name:"MissingPreviousOutput",message:"No previous output information."},{name:"BlockHeightOutOfRange",message:"Block Height can only be between 0 and 65535"},{name:"LockTimeRange",message:"Seconds needs to be more that 0 and less that 33553920"}]},{name:"NeedMoreInfo",message:"{0}"},{name:"InvalidSorting",message:"The sorting function provided did not return the change output as one of the array elements"},{name:"InvalidOutputAmountSum",message:"{0}"},{name:"MissingSignatures",message:"Some inputs have not been fully signed"},{name:"InvalidIndex",message:"Invalid index: {0} is not between 0, {1}"},{name:"UnableToVerifySignature",message:"Unable to verify signature: {0}"},{name:"DustOutputs",message:"Dust amount detected in one output"},{name:"InvalidSatoshis",message:"Output satoshis are invalid"},{name:"FeeError",message:"Internal Error on Fee {0}",errors:[{name:"TooSmall",message:"Fee is too small: {0}"},{name:"TooLarge",message:"Fee is too large: {0}"},{name:"Different",message:"Unspent value is different from specified fee: {0}"}]},{name:"ChangeAddressMissing",message:"Change address is missing"},{name:"BlockHeightTooHigh",message:"Block Height can be at most 2^32 -1"},{name:"NLockTimeOutOfRange",message:"Block Height can only be between 0 and 499 999 999"},{name:"LockTimeTooEarly",message:"Lock Time can't be earlier than UNIX date 500 000 000"}]},{name:"Script",message:"Internal Error on Script {0}",errors:[{name:"UnrecognizedAddress",message:"Expected argument {0} to be an address"},{name:"CantDeriveAddress",message:"Can't derive address associated with script {0}, needs to be p2pkh in, p2pkh out, p2sh in, or p2sh out."},{name:"InvalidBuffer",message:"Invalid script buffer: can't parse valid script from given buffer {0}"}]},{name:"HDPrivateKey",message:"Internal Error on HDPrivateKey {0}",errors:[{name:"InvalidDerivationArgument",message:"Invalid derivation argument {0}, expected string, or number and boolean"},{name:"InvalidEntropyArgument",message:"Invalid entropy: must be an hexa string or binary buffer, got {0}",errors:[{name:"TooMuchEntropy",message:'Invalid entropy: more than 512 bits is non standard, got "{0}"'},{name:"NotEnoughEntropy",message:'Invalid entropy: at least 128 bits needed, got "{0}"'}]},{name:"InvalidLength",message:"Invalid length for xprivkey string in {0}"},{name:"InvalidPath",message:"Invalid derivation path: {0}"},{name:"UnrecognizedArgument",message:'Invalid argument: creating a HDPrivateKey requires a string, buffer, json or object, got "{0}"'}]},{name:"HDPublicKey",message:"Internal Error on HDPublicKey {0}",errors:[{name:"ArgumentIsPrivateExtended",message:"Argument is an extended private key: {0}"},{name:"InvalidDerivationArgument",message:"Invalid derivation argument: got {0}"},{name:"InvalidLength",message:'Invalid length for xpubkey: got "{0}"'},{name:"InvalidPath",message:'Invalid derivation path, it should look like: "m/1/100", got "{0}"'},{name:"InvalidIndexCantDeriveHardened",message:"Invalid argument: creating a hardened path requires an HDPrivateKey"},{name:"MustSupplyArgument",message:"Must supply an argument to create a HDPublicKey"},{name:"UnrecognizedArgument",message:"Invalid argument for creation, must be string, json, buffer, or object"}]}]});var tn=W((yQ,pg)=>{"use strict";var lg=xt();function uM(e,t){return e.replace("{0}",t[0]).replace("{1}",t[1]).replace("{2}",t[2])}var PS=function(e,t){var r=function(){if(lg.isString(t.message))this.message=uM(t.message,arguments);else if(lg.isFunction(t.message))this.message=t.message.apply(null,arguments);else throw new Error("Invalid error definition for "+t.name);this.stack=this.message+`
28
- `+new Error().stack};return r.prototype=Object.create(e.prototype),r.prototype.name=e.prototype.name+t.name,e[t.name]=r,t.errors&&BS(r,t.errors),r},BS=function(e,t){lg.each(t,function(r){PS(e,r)})},fM=function(e,t){return BS(e,t),e},iu={};iu.Error=function(){this.message="Internal error",this.stack=this.message+`
29
- `+new Error().stack};iu.Error.prototype=Object.create(Error.prototype);iu.Error.prototype.name="bitcore.Error";var lM=NS();fM(iu.Error,lM);pg.exports=iu.Error;pg.exports.extend=function(e){return PS(iu.Error,e)}});var It=W((wQ,MS)=>{"use strict";var ul=tn(),pM=xt();MS.exports={checkState:function(e,t){if(!e)throw new ul.InvalidState(t)},checkArgument:function(e,t,r,i){if(!e)throw new ul.InvalidArgument(t,r,i)},checkArgumentType:function(e,t,r){if(r=r||"(unknown name)",pM.isString(t)){if(t==="Buffer"){var i=require("buffer");if(!i.Buffer.isBuffer(e))throw new ul.InvalidArgumentType(e,t,r)}else if(typeof e!==t)throw new ul.InvalidArgumentType(e,t,r)}else if(!(e instanceof t))throw new ul.InvalidArgumentType(e,t.name,r)}}});var Jr=W((SQ,LS)=>{"use strict";var Nt=fg(),hg=It(),CS=xt(),Gh=function(e){for(var t=Buffer.alloc(e.length),r=0;r<e.length;r++)t[r]=e[e.length-1-r];return t};Nt.Zero=new Nt(0);Nt.One=new Nt(1);Nt.Minus1=new Nt(-1);Nt.fromNumber=function(e){return hg.checkArgument(CS.isNumber(e)),new Nt(e)};Nt.fromString=function(e,t){return hg.checkArgument(CS.isString(e)),new Nt(e,t)};Nt.fromBuffer=function(e,t){typeof t<"u"&&t.endian==="little"&&(e=Gh(e));var r=e.toString("hex"),i=new Nt(r,16);return i};Nt.fromSM=function(e,t){var r;if(e.length===0)return Nt.fromBuffer(Buffer.from([0]));var i="big";return t&&(i=t.endian),i==="little"&&(e=Gh(e)),e[0]&128?(e[0]=e[0]&127,r=Nt.fromBuffer(e),r.neg().copy(r)):r=Nt.fromBuffer(e),r};Nt.prototype.toNumber=function(){return parseInt(this.toString(10),10)};Nt.prototype.toBuffer=function(e){var t,r;if(e&&e.size){r=this.toString(16,2);var i=r.length/2;t=Buffer.from(r,"hex"),i===e.size?t=t:i>e.size?t=Nt.trim(t,i):i<e.size&&(t=Nt.pad(t,i,e.size))}else r=this.toString(16,2),t=Buffer.from(r,"hex");return typeof e<"u"&&e.endian==="little"&&(t=Gh(t)),t};Nt.prototype.toSMBigEndian=function(){var e;return this.cmp(Nt.Zero)===-1?(e=this.neg().toBuffer(),e[0]&128?e=Buffer.concat([Buffer.from([128]),e]):e[0]=e[0]|128):(e=this.toBuffer(),e[0]&128&&(e=Buffer.concat([Buffer.from([0]),e]))),e.length===1&e[0]===0&&(e=Buffer.from([])),e};Nt.prototype.toSM=function(e){var t=e?e.endian:"big",r=this.toSMBigEndian();return t==="little"&&(r=Gh(r)),r};Nt.fromScriptNumBuffer=function(e,t,r){var i=r||4;if(hg.checkArgument(e.length<=i,new Error("script number overflow")),t&&e.length>0&&!(e[e.length-1]&127)&&(e.length<=1||!(e[e.length-2]&128)))throw new Error("non-minimally encoded script number");return Nt.fromSM(e,{endian:"little"})};Nt.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})};Nt.trim=function(e,t){return e.slice(t-e.length,e.length)};Nt.pad=function(e,t,r){for(var i=Buffer.alloc(r),n=0;n<e.length;n++)i[i.length-1-n]=e[e.length-1-n];for(n=0;n<r-t;n++)i[n]=0;return i};LS.exports=Nt});var Dr=W((EQ,qS)=>{"use strict";var US=xt(),DS=function(t){return US.isString(t)?/^[0-9a-fA-F]+$/.test(t):!1};qS.exports={isValidJSON:function(t){var r;if(!US.isString(t))return!1;try{r=JSON.parse(t)}catch{return!1}return typeof r=="object"},isHexa:DS,isHexaString:DS,cloneArray:function(e){return[].concat(e)},defineImmutable:function(t,r){return Object.keys(r).forEach(function(i){Object.defineProperty(t,i,{configurable:!1,enumerable:!0,value:r[i]})}),t},isNaturalNumber:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}}});var dr=W((RQ,fl)=>{"use strict";var FS=require("buffer"),TQ=require("assert"),IQ=Dr(),Ka=It();function HS(e,t){if(e.length!==t.length)return!1;for(var r=e.length,i=0;i<r;i++)if(e[i]!==t[i])return!1;return!0}fl.exports={fill:function(t,r){Ka.checkArgumentType(t,"Buffer","buffer"),Ka.checkArgumentType(r,"number","value");for(var i=t.length,n=0;n<i;n++)t[n]=r;return t},copy:function(e){var t=Buffer.alloc(e.length);return e.copy(t),t},isBuffer:function(t){return FS.Buffer.isBuffer(t)||t instanceof Uint8Array},emptyBuffer:function(t){Ka.checkArgumentType(t,"number","bytes");for(var r=Buffer.alloc(t),i=0;i<t;i++)r.write("\0",i);return r},concat:FS.Buffer.concat,equals:HS,equal:HS,integerAsSingleByteBuffer:function(t){return Ka.checkArgumentType(t,"number","integer"),Buffer.from([t&255])},integerAsBuffer:function(t){Ka.checkArgumentType(t,"number","integer");var r=[];return r.push(t>>24&255),r.push(t>>16&255),r.push(t>>8&255),r.push(t&255),Buffer.from(r)},integerFromBuffer:function(t){return Ka.checkArgumentType(t,"Buffer","buffer"),t[0]<<24|t[1]<<16|t[2]<<8|t[3]},integerFromSingleByteBuffer:function(t){return Ka.checkArgumentType(t,"Buffer","buffer"),t[0]},bufferToHex:function(t){return Ka.checkArgumentType(t,"Buffer","buffer"),t.toString("hex")},reverse:function(t){return Buffer.from(t).reverse()}};fl.exports.NULL_HASH=fl.exports.fill(Buffer.alloc(32),0);fl.exports.EMPTY_BUFFER=Buffer.alloc(0)});var zS=W((AQ,hM)=>{hM.exports={name:"elliptic",version:"6.5.5",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}});var ds=W((jS,dg)=>{(function(e,t){"use strict";function r(f,c){if(!f)throw new Error(c||"Assertion failed")}function i(f,c){f.super_=c;var p=function(){};p.prototype=c.prototype,f.prototype=new p,f.prototype.constructor=f}function n(f,c,p){if(n.isBN(f))return f;this.negative=0,this.words=null,this.length=0,this.red=null,f!==null&&((c==="le"||c==="be")&&(p=c,c=10),this._init(f||0,c||10,p||"be"))}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=require("buffer").Buffer}catch{}n.isBN=function(c){return c instanceof n?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===n.wordSize&&Array.isArray(c.words)},n.max=function(c,p){return c.cmp(p)>0?c:p},n.min=function(c,p){return c.cmp(p)<0?c:p},n.prototype._init=function(c,p,v){if(typeof c=="number")return this._initNumber(c,p,v);if(typeof c=="object")return this._initArray(c,p,v);p==="hex"&&(p=16),r(p===(p|0)&&p>=2&&p<=36),c=c.toString().replace(/\s+/g,"");var g=0;c[0]==="-"&&(g++,this.negative=1),g<c.length&&(p===16?this._parseHex(c,g,v):(this._parseBase(c,p,g),v==="le"&&this._initArray(this.toArray(),p,v)))},n.prototype._initNumber=function(c,p,v){c<0&&(this.negative=1,c=-c),c<67108864?(this.words=[c&67108863],this.length=1):c<4503599627370496?(this.words=[c&67108863,c/67108864&67108863],this.length=2):(r(c<9007199254740992),this.words=[c&67108863,c/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),p,v)},n.prototype._initArray=function(c,p,v){if(r(typeof c.length=="number"),c.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(c.length/3),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var x,S,_=0;if(v==="be")for(g=c.length-1,x=0;g>=0;g-=3)S=c[g]|c[g-1]<<8|c[g-2]<<16,this.words[x]|=S<<_&67108863,this.words[x+1]=S>>>26-_&67108863,_+=24,_>=26&&(_-=26,x++);else if(v==="le")for(g=0,x=0;g<c.length;g+=3)S=c[g]|c[g+1]<<8|c[g+2]<<16,this.words[x]|=S<<_&67108863,this.words[x+1]=S>>>26-_&67108863,_+=24,_>=26&&(_-=26,x++);return this.strip()};function u(f,c){var p=f.charCodeAt(c);return p>=65&&p<=70?p-55:p>=97&&p<=102?p-87:p-48&15}function h(f,c,p){var v=u(f,p);return p-1>=c&&(v|=u(f,p-1)<<4),v}n.prototype._parseHex=function(c,p,v){this.length=Math.ceil((c.length-p)/6),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var x=0,S=0,_;if(v==="be")for(g=c.length-1;g>=p;g-=2)_=h(c,p,g)<<x,this.words[S]|=_&67108863,x>=18?(x-=18,S+=1,this.words[S]|=_>>>26):x+=8;else{var l=c.length-p;for(g=l%2===0?p+1:p;g<c.length;g+=2)_=h(c,p,g)<<x,this.words[S]|=_&67108863,x>=18?(x-=18,S+=1,this.words[S]|=_>>>26):x+=8}this.strip()};function b(f,c,p,v){for(var g=0,x=Math.min(f.length,p),S=c;S<x;S++){var _=f.charCodeAt(S)-48;g*=v,_>=49?g+=_-49+10:_>=17?g+=_-17+10:g+=_}return g}n.prototype._parseBase=function(c,p,v){this.words=[0],this.length=1;for(var g=0,x=1;x<=67108863;x*=p)g++;g--,x=x/p|0;for(var S=c.length-v,_=S%g,l=Math.min(S,S-_)+v,m=0,A=v;A<l;A+=g)m=b(c,A,A+g,p),this.imuln(x),this.words[0]+m<67108864?this.words[0]+=m:this._iaddn(m);if(_!==0){var U=1;for(m=b(c,A,c.length,p),A=0;A<_;A++)U*=p;this.imuln(U),this.words[0]+m<67108864?this.words[0]+=m:this._iaddn(m)}this.strip()},n.prototype.copy=function(c){c.words=new Array(this.length);for(var p=0;p<this.length;p++)c.words[p]=this.words[p];c.length=this.length,c.negative=this.negative,c.red=this.red},n.prototype.clone=function(){var c=new n(null);return this.copy(c),c},n.prototype._expand=function(c){for(;this.length<c;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var w=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],T=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],I=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(c,p){c=c||10,p=p|0||1;var v;if(c===16||c==="hex"){v="";for(var g=0,x=0,S=0;S<this.length;S++){var _=this.words[S],l=((_<<g|x)&16777215).toString(16);x=_>>>24-g&16777215,x!==0||S!==this.length-1?v=w[6-l.length]+l+v:v=l+v,g+=2,g>=26&&(g-=26,S--)}for(x!==0&&(v=x.toString(16)+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(c===(c|0)&&c>=2&&c<=36){var m=T[c],A=I[c];v="";var U=this.clone();for(U.negative=0;!U.isZero();){var j=U.modn(A).toString(c);U=U.idivn(A),U.isZero()?v=j+v:v=w[m-j.length]+j+v}for(this.isZero()&&(v="0"+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var c=this.words[0];return this.length===2?c+=this.words[1]*67108864:this.length===3&&this.words[2]===1?c+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-c:c},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(c,p){return r(typeof a<"u"),this.toArrayLike(a,c,p)},n.prototype.toArray=function(c,p){return this.toArrayLike(Array,c,p)},n.prototype.toArrayLike=function(c,p,v){var g=this.byteLength(),x=v||Math.max(1,g);r(g<=x,"byte array longer than desired length"),r(x>0,"Requested array length <= 0"),this.strip();var S=p==="le",_=new c(x),l,m,A=this.clone();if(S){for(m=0;!A.isZero();m++)l=A.andln(255),A.iushrn(8),_[m]=l;for(;m<x;m++)_[m]=0}else{for(m=0;m<x-g;m++)_[m]=0;for(m=0;!A.isZero();m++)l=A.andln(255),A.iushrn(8),_[x-m-1]=l}return _},Math.clz32?n.prototype._countBits=function(c){return 32-Math.clz32(c)}:n.prototype._countBits=function(c){var p=c,v=0;return p>=4096&&(v+=13,p>>>=13),p>=64&&(v+=7,p>>>=7),p>=8&&(v+=4,p>>>=4),p>=2&&(v+=2,p>>>=2),v+p},n.prototype._zeroBits=function(c){if(c===0)return 26;var p=c,v=0;return p&8191||(v+=13,p>>>=13),p&127||(v+=7,p>>>=7),p&15||(v+=4,p>>>=4),p&3||(v+=2,p>>>=2),p&1||v++,v},n.prototype.bitLength=function(){var c=this.words[this.length-1],p=this._countBits(c);return(this.length-1)*26+p};function B(f){for(var c=new Array(f.bitLength()),p=0;p<c.length;p++){var v=p/26|0,g=p%26;c[p]=(f.words[v]&1<<g)>>>g}return c}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,p=0;p<this.length;p++){var v=this._zeroBits(this.words[p]);if(c+=v,v!==26)break}return c},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(c){return this.negative!==0?this.abs().inotn(c).iaddn(1):this.clone()},n.prototype.fromTwos=function(c){return this.testn(c-1)?this.notn(c).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(c){for(;this.length<c.length;)this.words[this.length++]=0;for(var p=0;p<c.length;p++)this.words[p]=this.words[p]|c.words[p];return this.strip()},n.prototype.ior=function(c){return r((this.negative|c.negative)===0),this.iuor(c)},n.prototype.or=function(c){return this.length>c.length?this.clone().ior(c):c.clone().ior(this)},n.prototype.uor=function(c){return this.length>c.length?this.clone().iuor(c):c.clone().iuor(this)},n.prototype.iuand=function(c){var p;this.length>c.length?p=c:p=this;for(var v=0;v<p.length;v++)this.words[v]=this.words[v]&c.words[v];return this.length=p.length,this.strip()},n.prototype.iand=function(c){return r((this.negative|c.negative)===0),this.iuand(c)},n.prototype.and=function(c){return this.length>c.length?this.clone().iand(c):c.clone().iand(this)},n.prototype.uand=function(c){return this.length>c.length?this.clone().iuand(c):c.clone().iuand(this)},n.prototype.iuxor=function(c){var p,v;this.length>c.length?(p=this,v=c):(p=c,v=this);for(var g=0;g<v.length;g++)this.words[g]=p.words[g]^v.words[g];if(this!==p)for(;g<p.length;g++)this.words[g]=p.words[g];return this.length=p.length,this.strip()},n.prototype.ixor=function(c){return r((this.negative|c.negative)===0),this.iuxor(c)},n.prototype.xor=function(c){return this.length>c.length?this.clone().ixor(c):c.clone().ixor(this)},n.prototype.uxor=function(c){return this.length>c.length?this.clone().iuxor(c):c.clone().iuxor(this)},n.prototype.inotn=function(c){r(typeof c=="number"&&c>=0);var p=Math.ceil(c/26)|0,v=c%26;this._expand(p),v>0&&p--;for(var g=0;g<p;g++)this.words[g]=~this.words[g]&67108863;return v>0&&(this.words[g]=~this.words[g]&67108863>>26-v),this.strip()},n.prototype.notn=function(c){return this.clone().inotn(c)},n.prototype.setn=function(c,p){r(typeof c=="number"&&c>=0);var v=c/26|0,g=c%26;return this._expand(v+1),p?this.words[v]=this.words[v]|1<<g:this.words[v]=this.words[v]&~(1<<g),this.strip()},n.prototype.iadd=function(c){var p;if(this.negative!==0&&c.negative===0)return this.negative=0,p=this.isub(c),this.negative^=1,this._normSign();if(this.negative===0&&c.negative!==0)return c.negative=0,p=this.isub(c),c.negative=1,p._normSign();var v,g;this.length>c.length?(v=this,g=c):(v=c,g=this);for(var x=0,S=0;S<g.length;S++)p=(v.words[S]|0)+(g.words[S]|0)+x,this.words[S]=p&67108863,x=p>>>26;for(;x!==0&&S<v.length;S++)p=(v.words[S]|0)+x,this.words[S]=p&67108863,x=p>>>26;if(this.length=v.length,x!==0)this.words[this.length]=x,this.length++;else if(v!==this)for(;S<v.length;S++)this.words[S]=v.words[S];return this},n.prototype.add=function(c){var p;return c.negative!==0&&this.negative===0?(c.negative=0,p=this.sub(c),c.negative^=1,p):c.negative===0&&this.negative!==0?(this.negative=0,p=c.sub(this),this.negative=1,p):this.length>c.length?this.clone().iadd(c):c.clone().iadd(this)},n.prototype.isub=function(c){if(c.negative!==0){c.negative=0;var p=this.iadd(c);return c.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var v=this.cmp(c);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,x;v>0?(g=this,x=c):(g=c,x=this);for(var S=0,_=0;_<x.length;_++)p=(g.words[_]|0)-(x.words[_]|0)+S,S=p>>26,this.words[_]=p&67108863;for(;S!==0&&_<g.length;_++)p=(g.words[_]|0)+S,S=p>>26,this.words[_]=p&67108863;if(S===0&&_<g.length&&g!==this)for(;_<g.length;_++)this.words[_]=g.words[_];return this.length=Math.max(this.length,_),g!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(c){return this.clone().isub(c)};function M(f,c,p){p.negative=c.negative^f.negative;var v=f.length+c.length|0;p.length=v,v=v-1|0;var g=f.words[0]|0,x=c.words[0]|0,S=g*x,_=S&67108863,l=S/67108864|0;p.words[0]=_;for(var m=1;m<v;m++){for(var A=l>>>26,U=l&67108863,j=Math.min(m,c.length-1),Z=Math.max(0,m-f.length+1);Z<=j;Z++){var se=m-Z|0;g=f.words[se]|0,x=c.words[Z]|0,S=g*x+U,A+=S/67108864|0,U=S&67108863}p.words[m]=U|0,l=A|0}return l!==0?p.words[m]=l|0:p.length--,p.strip()}var P=function(c,p,v){var g=c.words,x=p.words,S=v.words,_=0,l,m,A,U=g[0]|0,j=U&8191,Z=U>>>13,se=g[1]|0,ae=se&8191,he=se>>>13,Ee=g[2]|0,me=Ee&8191,dt=Ee>>>13,St=g[3]|0,Oe=St&8191,st=St>>>13,rt=g[4]|0,Re=rt&8191,Ae=rt>>>13,Wt=g[5]|0,Ke=Wt&8191,At=Wt>>>13,gt=g[6]|0,De=gt&8191,Pt=gt>>>13,Qt=g[7]|0,Ue=Qt&8191,er=Qt>>>13,Ot=g[8]|0,Le=Ot&8191,Ct=Ot>>>13,Lt=g[9]|0,qe=Lt&8191,Dt=Lt>>>13,Ut=x[0]|0,Fe=Ut&8191,qt=Ut>>>13,Ft=x[1]|0,He=Ft&8191,tr=Ft>>>13,rr=x[2]|0,We=rr&8191,Gt=rr>>>13,$t=x[3]|0,Ge=$t&8191,ir=$t>>>13,nr=x[4]|0,$e=nr&8191,Xt=nr>>>13,sr=x[5]|0,Xe=sr&8191,ar=sr>>>13,Ht=x[6]|0,Ye=Ht&8191,zt=Ht>>>13,or=x[7]|0,Ze=or&8191,cr=or>>>13,ur=x[8]|0,Je=ur&8191,fr=ur>>>13,lr=x[9]|0,Qe=lr&8191,jt=lr>>>13;v.negative=c.negative^p.negative,v.length=19,l=Math.imul(j,Fe),m=Math.imul(j,qt),m=m+Math.imul(Z,Fe)|0,A=Math.imul(Z,qt);var Is=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Is>>>26)|0,Is&=67108863,l=Math.imul(ae,Fe),m=Math.imul(ae,qt),m=m+Math.imul(he,Fe)|0,A=Math.imul(he,qt),l=l+Math.imul(j,He)|0,m=m+Math.imul(j,tr)|0,m=m+Math.imul(Z,He)|0,A=A+Math.imul(Z,tr)|0;var Rs=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,l=Math.imul(me,Fe),m=Math.imul(me,qt),m=m+Math.imul(dt,Fe)|0,A=Math.imul(dt,qt),l=l+Math.imul(ae,He)|0,m=m+Math.imul(ae,tr)|0,m=m+Math.imul(he,He)|0,A=A+Math.imul(he,tr)|0,l=l+Math.imul(j,We)|0,m=m+Math.imul(j,Gt)|0,m=m+Math.imul(Z,We)|0,A=A+Math.imul(Z,Gt)|0;var As=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(As>>>26)|0,As&=67108863,l=Math.imul(Oe,Fe),m=Math.imul(Oe,qt),m=m+Math.imul(st,Fe)|0,A=Math.imul(st,qt),l=l+Math.imul(me,He)|0,m=m+Math.imul(me,tr)|0,m=m+Math.imul(dt,He)|0,A=A+Math.imul(dt,tr)|0,l=l+Math.imul(ae,We)|0,m=m+Math.imul(ae,Gt)|0,m=m+Math.imul(he,We)|0,A=A+Math.imul(he,Gt)|0,l=l+Math.imul(j,Ge)|0,m=m+Math.imul(j,ir)|0,m=m+Math.imul(Z,Ge)|0,A=A+Math.imul(Z,ir)|0;var Os=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Os>>>26)|0,Os&=67108863,l=Math.imul(Re,Fe),m=Math.imul(Re,qt),m=m+Math.imul(Ae,Fe)|0,A=Math.imul(Ae,qt),l=l+Math.imul(Oe,He)|0,m=m+Math.imul(Oe,tr)|0,m=m+Math.imul(st,He)|0,A=A+Math.imul(st,tr)|0,l=l+Math.imul(me,We)|0,m=m+Math.imul(me,Gt)|0,m=m+Math.imul(dt,We)|0,A=A+Math.imul(dt,Gt)|0,l=l+Math.imul(ae,Ge)|0,m=m+Math.imul(ae,ir)|0,m=m+Math.imul(he,Ge)|0,A=A+Math.imul(he,ir)|0,l=l+Math.imul(j,$e)|0,m=m+Math.imul(j,Xt)|0,m=m+Math.imul(Z,$e)|0,A=A+Math.imul(Z,Xt)|0;var ks=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(ks>>>26)|0,ks&=67108863,l=Math.imul(Ke,Fe),m=Math.imul(Ke,qt),m=m+Math.imul(At,Fe)|0,A=Math.imul(At,qt),l=l+Math.imul(Re,He)|0,m=m+Math.imul(Re,tr)|0,m=m+Math.imul(Ae,He)|0,A=A+Math.imul(Ae,tr)|0,l=l+Math.imul(Oe,We)|0,m=m+Math.imul(Oe,Gt)|0,m=m+Math.imul(st,We)|0,A=A+Math.imul(st,Gt)|0,l=l+Math.imul(me,Ge)|0,m=m+Math.imul(me,ir)|0,m=m+Math.imul(dt,Ge)|0,A=A+Math.imul(dt,ir)|0,l=l+Math.imul(ae,$e)|0,m=m+Math.imul(ae,Xt)|0,m=m+Math.imul(he,$e)|0,A=A+Math.imul(he,Xt)|0,l=l+Math.imul(j,Xe)|0,m=m+Math.imul(j,ar)|0,m=m+Math.imul(Z,Xe)|0,A=A+Math.imul(Z,ar)|0;var Ns=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Ns>>>26)|0,Ns&=67108863,l=Math.imul(De,Fe),m=Math.imul(De,qt),m=m+Math.imul(Pt,Fe)|0,A=Math.imul(Pt,qt),l=l+Math.imul(Ke,He)|0,m=m+Math.imul(Ke,tr)|0,m=m+Math.imul(At,He)|0,A=A+Math.imul(At,tr)|0,l=l+Math.imul(Re,We)|0,m=m+Math.imul(Re,Gt)|0,m=m+Math.imul(Ae,We)|0,A=A+Math.imul(Ae,Gt)|0,l=l+Math.imul(Oe,Ge)|0,m=m+Math.imul(Oe,ir)|0,m=m+Math.imul(st,Ge)|0,A=A+Math.imul(st,ir)|0,l=l+Math.imul(me,$e)|0,m=m+Math.imul(me,Xt)|0,m=m+Math.imul(dt,$e)|0,A=A+Math.imul(dt,Xt)|0,l=l+Math.imul(ae,Xe)|0,m=m+Math.imul(ae,ar)|0,m=m+Math.imul(he,Xe)|0,A=A+Math.imul(he,ar)|0,l=l+Math.imul(j,Ye)|0,m=m+Math.imul(j,zt)|0,m=m+Math.imul(Z,Ye)|0,A=A+Math.imul(Z,zt)|0;var sn=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(sn>>>26)|0,sn&=67108863,l=Math.imul(Ue,Fe),m=Math.imul(Ue,qt),m=m+Math.imul(er,Fe)|0,A=Math.imul(er,qt),l=l+Math.imul(De,He)|0,m=m+Math.imul(De,tr)|0,m=m+Math.imul(Pt,He)|0,A=A+Math.imul(Pt,tr)|0,l=l+Math.imul(Ke,We)|0,m=m+Math.imul(Ke,Gt)|0,m=m+Math.imul(At,We)|0,A=A+Math.imul(At,Gt)|0,l=l+Math.imul(Re,Ge)|0,m=m+Math.imul(Re,ir)|0,m=m+Math.imul(Ae,Ge)|0,A=A+Math.imul(Ae,ir)|0,l=l+Math.imul(Oe,$e)|0,m=m+Math.imul(Oe,Xt)|0,m=m+Math.imul(st,$e)|0,A=A+Math.imul(st,Xt)|0,l=l+Math.imul(me,Xe)|0,m=m+Math.imul(me,ar)|0,m=m+Math.imul(dt,Xe)|0,A=A+Math.imul(dt,ar)|0,l=l+Math.imul(ae,Ye)|0,m=m+Math.imul(ae,zt)|0,m=m+Math.imul(he,Ye)|0,A=A+Math.imul(he,zt)|0,l=l+Math.imul(j,Ze)|0,m=m+Math.imul(j,cr)|0,m=m+Math.imul(Z,Ze)|0,A=A+Math.imul(Z,cr)|0;var Ps=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Ps>>>26)|0,Ps&=67108863,l=Math.imul(Le,Fe),m=Math.imul(Le,qt),m=m+Math.imul(Ct,Fe)|0,A=Math.imul(Ct,qt),l=l+Math.imul(Ue,He)|0,m=m+Math.imul(Ue,tr)|0,m=m+Math.imul(er,He)|0,A=A+Math.imul(er,tr)|0,l=l+Math.imul(De,We)|0,m=m+Math.imul(De,Gt)|0,m=m+Math.imul(Pt,We)|0,A=A+Math.imul(Pt,Gt)|0,l=l+Math.imul(Ke,Ge)|0,m=m+Math.imul(Ke,ir)|0,m=m+Math.imul(At,Ge)|0,A=A+Math.imul(At,ir)|0,l=l+Math.imul(Re,$e)|0,m=m+Math.imul(Re,Xt)|0,m=m+Math.imul(Ae,$e)|0,A=A+Math.imul(Ae,Xt)|0,l=l+Math.imul(Oe,Xe)|0,m=m+Math.imul(Oe,ar)|0,m=m+Math.imul(st,Xe)|0,A=A+Math.imul(st,ar)|0,l=l+Math.imul(me,Ye)|0,m=m+Math.imul(me,zt)|0,m=m+Math.imul(dt,Ye)|0,A=A+Math.imul(dt,zt)|0,l=l+Math.imul(ae,Ze)|0,m=m+Math.imul(ae,cr)|0,m=m+Math.imul(he,Ze)|0,A=A+Math.imul(he,cr)|0,l=l+Math.imul(j,Je)|0,m=m+Math.imul(j,fr)|0,m=m+Math.imul(Z,Je)|0,A=A+Math.imul(Z,fr)|0;var an=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(an>>>26)|0,an&=67108863,l=Math.imul(qe,Fe),m=Math.imul(qe,qt),m=m+Math.imul(Dt,Fe)|0,A=Math.imul(Dt,qt),l=l+Math.imul(Le,He)|0,m=m+Math.imul(Le,tr)|0,m=m+Math.imul(Ct,He)|0,A=A+Math.imul(Ct,tr)|0,l=l+Math.imul(Ue,We)|0,m=m+Math.imul(Ue,Gt)|0,m=m+Math.imul(er,We)|0,A=A+Math.imul(er,Gt)|0,l=l+Math.imul(De,Ge)|0,m=m+Math.imul(De,ir)|0,m=m+Math.imul(Pt,Ge)|0,A=A+Math.imul(Pt,ir)|0,l=l+Math.imul(Ke,$e)|0,m=m+Math.imul(Ke,Xt)|0,m=m+Math.imul(At,$e)|0,A=A+Math.imul(At,Xt)|0,l=l+Math.imul(Re,Xe)|0,m=m+Math.imul(Re,ar)|0,m=m+Math.imul(Ae,Xe)|0,A=A+Math.imul(Ae,ar)|0,l=l+Math.imul(Oe,Ye)|0,m=m+Math.imul(Oe,zt)|0,m=m+Math.imul(st,Ye)|0,A=A+Math.imul(st,zt)|0,l=l+Math.imul(me,Ze)|0,m=m+Math.imul(me,cr)|0,m=m+Math.imul(dt,Ze)|0,A=A+Math.imul(dt,cr)|0,l=l+Math.imul(ae,Je)|0,m=m+Math.imul(ae,fr)|0,m=m+Math.imul(he,Je)|0,A=A+Math.imul(he,fr)|0,l=l+Math.imul(j,Qe)|0,m=m+Math.imul(j,jt)|0,m=m+Math.imul(Z,Qe)|0,A=A+Math.imul(Z,jt)|0;var Bs=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,l=Math.imul(qe,He),m=Math.imul(qe,tr),m=m+Math.imul(Dt,He)|0,A=Math.imul(Dt,tr),l=l+Math.imul(Le,We)|0,m=m+Math.imul(Le,Gt)|0,m=m+Math.imul(Ct,We)|0,A=A+Math.imul(Ct,Gt)|0,l=l+Math.imul(Ue,Ge)|0,m=m+Math.imul(Ue,ir)|0,m=m+Math.imul(er,Ge)|0,A=A+Math.imul(er,ir)|0,l=l+Math.imul(De,$e)|0,m=m+Math.imul(De,Xt)|0,m=m+Math.imul(Pt,$e)|0,A=A+Math.imul(Pt,Xt)|0,l=l+Math.imul(Ke,Xe)|0,m=m+Math.imul(Ke,ar)|0,m=m+Math.imul(At,Xe)|0,A=A+Math.imul(At,ar)|0,l=l+Math.imul(Re,Ye)|0,m=m+Math.imul(Re,zt)|0,m=m+Math.imul(Ae,Ye)|0,A=A+Math.imul(Ae,zt)|0,l=l+Math.imul(Oe,Ze)|0,m=m+Math.imul(Oe,cr)|0,m=m+Math.imul(st,Ze)|0,A=A+Math.imul(st,cr)|0,l=l+Math.imul(me,Je)|0,m=m+Math.imul(me,fr)|0,m=m+Math.imul(dt,Je)|0,A=A+Math.imul(dt,fr)|0,l=l+Math.imul(ae,Qe)|0,m=m+Math.imul(ae,jt)|0,m=m+Math.imul(he,Qe)|0,A=A+Math.imul(he,jt)|0;var Ms=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,l=Math.imul(qe,We),m=Math.imul(qe,Gt),m=m+Math.imul(Dt,We)|0,A=Math.imul(Dt,Gt),l=l+Math.imul(Le,Ge)|0,m=m+Math.imul(Le,ir)|0,m=m+Math.imul(Ct,Ge)|0,A=A+Math.imul(Ct,ir)|0,l=l+Math.imul(Ue,$e)|0,m=m+Math.imul(Ue,Xt)|0,m=m+Math.imul(er,$e)|0,A=A+Math.imul(er,Xt)|0,l=l+Math.imul(De,Xe)|0,m=m+Math.imul(De,ar)|0,m=m+Math.imul(Pt,Xe)|0,A=A+Math.imul(Pt,ar)|0,l=l+Math.imul(Ke,Ye)|0,m=m+Math.imul(Ke,zt)|0,m=m+Math.imul(At,Ye)|0,A=A+Math.imul(At,zt)|0,l=l+Math.imul(Re,Ze)|0,m=m+Math.imul(Re,cr)|0,m=m+Math.imul(Ae,Ze)|0,A=A+Math.imul(Ae,cr)|0,l=l+Math.imul(Oe,Je)|0,m=m+Math.imul(Oe,fr)|0,m=m+Math.imul(st,Je)|0,A=A+Math.imul(st,fr)|0,l=l+Math.imul(me,Qe)|0,m=m+Math.imul(me,jt)|0,m=m+Math.imul(dt,Qe)|0,A=A+Math.imul(dt,jt)|0;var Cs=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Cs>>>26)|0,Cs&=67108863,l=Math.imul(qe,Ge),m=Math.imul(qe,ir),m=m+Math.imul(Dt,Ge)|0,A=Math.imul(Dt,ir),l=l+Math.imul(Le,$e)|0,m=m+Math.imul(Le,Xt)|0,m=m+Math.imul(Ct,$e)|0,A=A+Math.imul(Ct,Xt)|0,l=l+Math.imul(Ue,Xe)|0,m=m+Math.imul(Ue,ar)|0,m=m+Math.imul(er,Xe)|0,A=A+Math.imul(er,ar)|0,l=l+Math.imul(De,Ye)|0,m=m+Math.imul(De,zt)|0,m=m+Math.imul(Pt,Ye)|0,A=A+Math.imul(Pt,zt)|0,l=l+Math.imul(Ke,Ze)|0,m=m+Math.imul(Ke,cr)|0,m=m+Math.imul(At,Ze)|0,A=A+Math.imul(At,cr)|0,l=l+Math.imul(Re,Je)|0,m=m+Math.imul(Re,fr)|0,m=m+Math.imul(Ae,Je)|0,A=A+Math.imul(Ae,fr)|0,l=l+Math.imul(Oe,Qe)|0,m=m+Math.imul(Oe,jt)|0,m=m+Math.imul(st,Qe)|0,A=A+Math.imul(st,jt)|0;var rs=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(rs>>>26)|0,rs&=67108863,l=Math.imul(qe,$e),m=Math.imul(qe,Xt),m=m+Math.imul(Dt,$e)|0,A=Math.imul(Dt,Xt),l=l+Math.imul(Le,Xe)|0,m=m+Math.imul(Le,ar)|0,m=m+Math.imul(Ct,Xe)|0,A=A+Math.imul(Ct,ar)|0,l=l+Math.imul(Ue,Ye)|0,m=m+Math.imul(Ue,zt)|0,m=m+Math.imul(er,Ye)|0,A=A+Math.imul(er,zt)|0,l=l+Math.imul(De,Ze)|0,m=m+Math.imul(De,cr)|0,m=m+Math.imul(Pt,Ze)|0,A=A+Math.imul(Pt,cr)|0,l=l+Math.imul(Ke,Je)|0,m=m+Math.imul(Ke,fr)|0,m=m+Math.imul(At,Je)|0,A=A+Math.imul(At,fr)|0,l=l+Math.imul(Re,Qe)|0,m=m+Math.imul(Re,jt)|0,m=m+Math.imul(Ae,Qe)|0,A=A+Math.imul(Ae,jt)|0;var is=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(is>>>26)|0,is&=67108863,l=Math.imul(qe,Xe),m=Math.imul(qe,ar),m=m+Math.imul(Dt,Xe)|0,A=Math.imul(Dt,ar),l=l+Math.imul(Le,Ye)|0,m=m+Math.imul(Le,zt)|0,m=m+Math.imul(Ct,Ye)|0,A=A+Math.imul(Ct,zt)|0,l=l+Math.imul(Ue,Ze)|0,m=m+Math.imul(Ue,cr)|0,m=m+Math.imul(er,Ze)|0,A=A+Math.imul(er,cr)|0,l=l+Math.imul(De,Je)|0,m=m+Math.imul(De,fr)|0,m=m+Math.imul(Pt,Je)|0,A=A+Math.imul(Pt,fr)|0,l=l+Math.imul(Ke,Qe)|0,m=m+Math.imul(Ke,jt)|0,m=m+Math.imul(At,Qe)|0,A=A+Math.imul(At,jt)|0;var ns=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(ns>>>26)|0,ns&=67108863,l=Math.imul(qe,Ye),m=Math.imul(qe,zt),m=m+Math.imul(Dt,Ye)|0,A=Math.imul(Dt,zt),l=l+Math.imul(Le,Ze)|0,m=m+Math.imul(Le,cr)|0,m=m+Math.imul(Ct,Ze)|0,A=A+Math.imul(Ct,cr)|0,l=l+Math.imul(Ue,Je)|0,m=m+Math.imul(Ue,fr)|0,m=m+Math.imul(er,Je)|0,A=A+Math.imul(er,fr)|0,l=l+Math.imul(De,Qe)|0,m=m+Math.imul(De,jt)|0,m=m+Math.imul(Pt,Qe)|0,A=A+Math.imul(Pt,jt)|0;var Ls=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Ls>>>26)|0,Ls&=67108863,l=Math.imul(qe,Ze),m=Math.imul(qe,cr),m=m+Math.imul(Dt,Ze)|0,A=Math.imul(Dt,cr),l=l+Math.imul(Le,Je)|0,m=m+Math.imul(Le,fr)|0,m=m+Math.imul(Ct,Je)|0,A=A+Math.imul(Ct,fr)|0,l=l+Math.imul(Ue,Qe)|0,m=m+Math.imul(Ue,jt)|0,m=m+Math.imul(er,Qe)|0,A=A+Math.imul(er,jt)|0;var Ds=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Ds>>>26)|0,Ds&=67108863,l=Math.imul(qe,Je),m=Math.imul(qe,fr),m=m+Math.imul(Dt,Je)|0,A=Math.imul(Dt,fr),l=l+Math.imul(Le,Qe)|0,m=m+Math.imul(Le,jt)|0,m=m+Math.imul(Ct,Qe)|0,A=A+Math.imul(Ct,jt)|0;var Us=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Us>>>26)|0,Us&=67108863,l=Math.imul(qe,Qe),m=Math.imul(qe,jt),m=m+Math.imul(Dt,Qe)|0,A=Math.imul(Dt,jt);var Vu=(_+l|0)+((m&8191)<<13)|0;return _=(A+(m>>>13)|0)+(Vu>>>26)|0,Vu&=67108863,S[0]=Is,S[1]=Rs,S[2]=As,S[3]=Os,S[4]=ks,S[5]=Ns,S[6]=sn,S[7]=Ps,S[8]=an,S[9]=Bs,S[10]=Ms,S[11]=Cs,S[12]=rs,S[13]=is,S[14]=ns,S[15]=Ls,S[16]=Ds,S[17]=Us,S[18]=Vu,_!==0&&(S[19]=_,v.length++),v};Math.imul||(P=M);function L(f,c,p){p.negative=c.negative^f.negative,p.length=f.length+c.length;for(var v=0,g=0,x=0;x<p.length-1;x++){var S=g;g=0;for(var _=v&67108863,l=Math.min(x,c.length-1),m=Math.max(0,x-f.length+1);m<=l;m++){var A=x-m,U=f.words[A]|0,j=c.words[m]|0,Z=U*j,se=Z&67108863;S=S+(Z/67108864|0)|0,se=se+_|0,_=se&67108863,S=S+(se>>>26)|0,g+=S>>>26,S&=67108863}p.words[x]=_,v=S,S=g}return v!==0?p.words[x]=v:p.length--,p.strip()}function X(f,c,p){var v=new V;return v.mulp(f,c,p)}n.prototype.mulTo=function(c,p){var v,g=this.length+c.length;return this.length===10&&c.length===10?v=P(this,c,p):g<63?v=M(this,c,p):g<1024?v=L(this,c,p):v=X(this,c,p),v};function V(f,c){this.x=f,this.y=c}V.prototype.makeRBT=function(c){for(var p=new Array(c),v=n.prototype._countBits(c)-1,g=0;g<c;g++)p[g]=this.revBin(g,v,c);return p},V.prototype.revBin=function(c,p,v){if(c===0||c===v-1)return c;for(var g=0,x=0;x<p;x++)g|=(c&1)<<p-x-1,c>>=1;return g},V.prototype.permute=function(c,p,v,g,x,S){for(var _=0;_<S;_++)g[_]=p[c[_]],x[_]=v[c[_]]},V.prototype.transform=function(c,p,v,g,x,S){this.permute(S,c,p,v,g,x);for(var _=1;_<x;_<<=1)for(var l=_<<1,m=Math.cos(2*Math.PI/l),A=Math.sin(2*Math.PI/l),U=0;U<x;U+=l)for(var j=m,Z=A,se=0;se<_;se++){var ae=v[U+se],he=g[U+se],Ee=v[U+se+_],me=g[U+se+_],dt=j*Ee-Z*me;me=j*me+Z*Ee,Ee=dt,v[U+se]=ae+Ee,g[U+se]=he+me,v[U+se+_]=ae-Ee,g[U+se+_]=he-me,se!==l&&(dt=m*j-A*Z,Z=m*Z+A*j,j=dt)}},V.prototype.guessLen13b=function(c,p){var v=Math.max(p,c)|1,g=v&1,x=0;for(v=v/2|0;v;v=v>>>1)x++;return 1<<x+1+g},V.prototype.conjugate=function(c,p,v){if(!(v<=1))for(var g=0;g<v/2;g++){var x=c[g];c[g]=c[v-g-1],c[v-g-1]=x,x=p[g],p[g]=-p[v-g-1],p[v-g-1]=-x}},V.prototype.normalize13b=function(c,p){for(var v=0,g=0;g<p/2;g++){var x=Math.round(c[2*g+1]/p)*8192+Math.round(c[2*g]/p)+v;c[g]=x&67108863,x<67108864?v=0:v=x/67108864|0}return c},V.prototype.convert13b=function(c,p,v,g){for(var x=0,S=0;S<p;S++)x=x+(c[S]|0),v[2*S]=x&8191,x=x>>>13,v[2*S+1]=x&8191,x=x>>>13;for(S=2*p;S<g;++S)v[S]=0;r(x===0),r((x&-8192)===0)},V.prototype.stub=function(c){for(var p=new Array(c),v=0;v<c;v++)p[v]=0;return p},V.prototype.mulp=function(c,p,v){var g=2*this.guessLen13b(c.length,p.length),x=this.makeRBT(g),S=this.stub(g),_=new Array(g),l=new Array(g),m=new Array(g),A=new Array(g),U=new Array(g),j=new Array(g),Z=v.words;Z.length=g,this.convert13b(c.words,c.length,_,g),this.convert13b(p.words,p.length,A,g),this.transform(_,S,l,m,g,x),this.transform(A,S,U,j,g,x);for(var se=0;se<g;se++){var ae=l[se]*U[se]-m[se]*j[se];m[se]=l[se]*j[se]+m[se]*U[se],l[se]=ae}return this.conjugate(l,m,g),this.transform(l,m,Z,S,g,x),this.conjugate(Z,S,g),this.normalize13b(Z,g),v.negative=c.negative^p.negative,v.length=c.length+p.length,v.strip()},n.prototype.mul=function(c){var p=new n(null);return p.words=new Array(this.length+c.length),this.mulTo(c,p)},n.prototype.mulf=function(c){var p=new n(null);return p.words=new Array(this.length+c.length),X(this,c,p)},n.prototype.imul=function(c){return this.clone().mulTo(c,this)},n.prototype.imuln=function(c){r(typeof c=="number"),r(c<67108864);for(var p=0,v=0;v<this.length;v++){var g=(this.words[v]|0)*c,x=(g&67108863)+(p&67108863);p>>=26,p+=g/67108864|0,p+=x>>>26,this.words[v]=x&67108863}return p!==0&&(this.words[v]=p,this.length++),this},n.prototype.muln=function(c){return this.clone().imuln(c)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(c){var p=B(c);if(p.length===0)return new n(1);for(var v=this,g=0;g<p.length&&p[g]===0;g++,v=v.sqr());if(++g<p.length)for(var x=v.sqr();g<p.length;g++,x=x.sqr())p[g]!==0&&(v=v.mul(x));return v},n.prototype.iushln=function(c){r(typeof c=="number"&&c>=0);var p=c%26,v=(c-p)/26,g=67108863>>>26-p<<26-p,x;if(p!==0){var S=0;for(x=0;x<this.length;x++){var _=this.words[x]&g,l=(this.words[x]|0)-_<<p;this.words[x]=l|S,S=_>>>26-p}S&&(this.words[x]=S,this.length++)}if(v!==0){for(x=this.length-1;x>=0;x--)this.words[x+v]=this.words[x];for(x=0;x<v;x++)this.words[x]=0;this.length+=v}return this.strip()},n.prototype.ishln=function(c){return r(this.negative===0),this.iushln(c)},n.prototype.iushrn=function(c,p,v){r(typeof c=="number"&&c>=0);var g;p?g=(p-p%26)/26:g=0;var x=c%26,S=Math.min((c-x)/26,this.length),_=67108863^67108863>>>x<<x,l=v;if(g-=S,g=Math.max(0,g),l){for(var m=0;m<S;m++)l.words[m]=this.words[m];l.length=S}if(S!==0)if(this.length>S)for(this.length-=S,m=0;m<this.length;m++)this.words[m]=this.words[m+S];else this.words[0]=0,this.length=1;var A=0;for(m=this.length-1;m>=0&&(A!==0||m>=g);m--){var U=this.words[m]|0;this.words[m]=A<<26-x|U>>>x,A=U&_}return l&&A!==0&&(l.words[l.length++]=A),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(c,p,v){return r(this.negative===0),this.iushrn(c,p,v)},n.prototype.shln=function(c){return this.clone().ishln(c)},n.prototype.ushln=function(c){return this.clone().iushln(c)},n.prototype.shrn=function(c){return this.clone().ishrn(c)},n.prototype.ushrn=function(c){return this.clone().iushrn(c)},n.prototype.testn=function(c){r(typeof c=="number"&&c>=0);var p=c%26,v=(c-p)/26,g=1<<p;if(this.length<=v)return!1;var x=this.words[v];return!!(x&g)},n.prototype.imaskn=function(c){r(typeof c=="number"&&c>=0);var p=c%26,v=(c-p)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(p!==0&&v++,this.length=Math.min(v,this.length),p!==0){var g=67108863^67108863>>>p<<p;this.words[this.length-1]&=g}return this.strip()},n.prototype.maskn=function(c){return this.clone().imaskn(c)},n.prototype.iaddn=function(c){return r(typeof c=="number"),r(c<67108864),c<0?this.isubn(-c):this.negative!==0?this.length===1&&(this.words[0]|0)<c?(this.words[0]=c-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(c),this.negative=1,this):this._iaddn(c)},n.prototype._iaddn=function(c){this.words[0]+=c;for(var p=0;p<this.length&&this.words[p]>=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},n.prototype.isubn=function(c){if(r(typeof c=="number"),r(c<67108864),c<0)return this.iaddn(-c);if(this.negative!==0)return this.negative=0,this.iaddn(c),this.negative=1,this;if(this.words[0]-=c,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p<this.length&&this.words[p]<0;p++)this.words[p]+=67108864,this.words[p+1]-=1;return this.strip()},n.prototype.addn=function(c){return this.clone().iaddn(c)},n.prototype.subn=function(c){return this.clone().isubn(c)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(c,p,v){var g=c.length+v,x;this._expand(g);var S,_=0;for(x=0;x<c.length;x++){S=(this.words[x+v]|0)+_;var l=(c.words[x]|0)*p;S-=l&67108863,_=(S>>26)-(l/67108864|0),this.words[x+v]=S&67108863}for(;x<this.length-v;x++)S=(this.words[x+v]|0)+_,_=S>>26,this.words[x+v]=S&67108863;if(_===0)return this.strip();for(r(_===-1),_=0,x=0;x<this.length;x++)S=-(this.words[x]|0)+_,_=S>>26,this.words[x]=S&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(c,p){var v=this.length-c.length,g=this.clone(),x=c,S=x.words[x.length-1]|0,_=this._countBits(S);v=26-_,v!==0&&(x=x.ushln(v),g.iushln(v),S=x.words[x.length-1]|0);var l=g.length-x.length,m;if(p!=="mod"){m=new n(null),m.length=l+1,m.words=new Array(m.length);for(var A=0;A<m.length;A++)m.words[A]=0}var U=g.clone()._ishlnsubmul(x,1,l);U.negative===0&&(g=U,m&&(m.words[l]=1));for(var j=l-1;j>=0;j--){var Z=(g.words[x.length+j]|0)*67108864+(g.words[x.length+j-1]|0);for(Z=Math.min(Z/S|0,67108863),g._ishlnsubmul(x,Z,j);g.negative!==0;)Z--,g.negative=0,g._ishlnsubmul(x,1,j),g.isZero()||(g.negative^=1);m&&(m.words[j]=Z)}return m&&m.strip(),g.strip(),p!=="div"&&v!==0&&g.iushrn(v),{div:m||null,mod:g}},n.prototype.divmod=function(c,p,v){if(r(!c.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var g,x,S;return this.negative!==0&&c.negative===0?(S=this.neg().divmod(c,p),p!=="mod"&&(g=S.div.neg()),p!=="div"&&(x=S.mod.neg(),v&&x.negative!==0&&x.iadd(c)),{div:g,mod:x}):this.negative===0&&c.negative!==0?(S=this.divmod(c.neg(),p),p!=="mod"&&(g=S.div.neg()),{div:g,mod:S.mod}):this.negative&c.negative?(S=this.neg().divmod(c.neg(),p),p!=="div"&&(x=S.mod.neg(),v&&x.negative!==0&&x.isub(c)),{div:S.div,mod:x}):c.length>this.length||this.cmp(c)<0?{div:new n(0),mod:this}:c.length===1?p==="div"?{div:this.divn(c.words[0]),mod:null}:p==="mod"?{div:null,mod:new n(this.modn(c.words[0]))}:{div:this.divn(c.words[0]),mod:new n(this.modn(c.words[0]))}:this._wordDiv(c,p)},n.prototype.div=function(c){return this.divmod(c,"div",!1).div},n.prototype.mod=function(c){return this.divmod(c,"mod",!1).mod},n.prototype.umod=function(c){return this.divmod(c,"mod",!0).mod},n.prototype.divRound=function(c){var p=this.divmod(c);if(p.mod.isZero())return p.div;var v=p.div.negative!==0?p.mod.isub(c):p.mod,g=c.ushrn(1),x=c.andln(1),S=v.cmp(g);return S<0||x===1&&S===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},n.prototype.modn=function(c){r(c<=67108863);for(var p=(1<<26)%c,v=0,g=this.length-1;g>=0;g--)v=(p*v+(this.words[g]|0))%c;return v},n.prototype.idivn=function(c){r(c<=67108863);for(var p=0,v=this.length-1;v>=0;v--){var g=(this.words[v]|0)+p*67108864;this.words[v]=g/c|0,p=g%c}return this.strip()},n.prototype.divn=function(c){return this.clone().idivn(c)},n.prototype.egcd=function(c){r(c.negative===0),r(!c.isZero());var p=this,v=c.clone();p.negative!==0?p=p.umod(c):p=p.clone();for(var g=new n(1),x=new n(0),S=new n(0),_=new n(1),l=0;p.isEven()&&v.isEven();)p.iushrn(1),v.iushrn(1),++l;for(var m=v.clone(),A=p.clone();!p.isZero();){for(var U=0,j=1;!(p.words[0]&j)&&U<26;++U,j<<=1);if(U>0)for(p.iushrn(U);U-- >0;)(g.isOdd()||x.isOdd())&&(g.iadd(m),x.isub(A)),g.iushrn(1),x.iushrn(1);for(var Z=0,se=1;!(v.words[0]&se)&&Z<26;++Z,se<<=1);if(Z>0)for(v.iushrn(Z);Z-- >0;)(S.isOdd()||_.isOdd())&&(S.iadd(m),_.isub(A)),S.iushrn(1),_.iushrn(1);p.cmp(v)>=0?(p.isub(v),g.isub(S),x.isub(_)):(v.isub(p),S.isub(g),_.isub(x))}return{a:S,b:_,gcd:v.iushln(l)}},n.prototype._invmp=function(c){r(c.negative===0),r(!c.isZero());var p=this,v=c.clone();p.negative!==0?p=p.umod(c):p=p.clone();for(var g=new n(1),x=new n(0),S=v.clone();p.cmpn(1)>0&&v.cmpn(1)>0;){for(var _=0,l=1;!(p.words[0]&l)&&_<26;++_,l<<=1);if(_>0)for(p.iushrn(_);_-- >0;)g.isOdd()&&g.iadd(S),g.iushrn(1);for(var m=0,A=1;!(v.words[0]&A)&&m<26;++m,A<<=1);if(m>0)for(v.iushrn(m);m-- >0;)x.isOdd()&&x.iadd(S),x.iushrn(1);p.cmp(v)>=0?(p.isub(v),g.isub(x)):(v.isub(p),x.isub(g))}var U;return p.cmpn(1)===0?U=g:U=x,U.cmpn(0)<0&&U.iadd(c),U},n.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var p=this.clone(),v=c.clone();p.negative=0,v.negative=0;for(var g=0;p.isEven()&&v.isEven();g++)p.iushrn(1),v.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;v.isEven();)v.iushrn(1);var x=p.cmp(v);if(x<0){var S=p;p=v,v=S}else if(x===0||v.cmpn(1)===0)break;p.isub(v)}while(!0);return v.iushln(g)},n.prototype.invm=function(c){return this.egcd(c).a.umod(c)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(c){return this.words[0]&c},n.prototype.bincn=function(c){r(typeof c=="number");var p=c%26,v=(c-p)/26,g=1<<p;if(this.length<=v)return this._expand(v+1),this.words[v]|=g,this;for(var x=g,S=v;x!==0&&S<this.length;S++){var _=this.words[S]|0;_+=x,x=_>>>26,_&=67108863,this.words[S]=_}return x!==0&&(this.words[S]=x,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(c){var p=c<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this.strip();var v;if(this.length>1)v=1;else{p&&(c=-c),r(c<=67108863,"Number is too big");var g=this.words[0]|0;v=g===c?0:g<c?-1:1}return this.negative!==0?-v|0:v},n.prototype.cmp=function(c){if(this.negative!==0&&c.negative===0)return-1;if(this.negative===0&&c.negative!==0)return 1;var p=this.ucmp(c);return this.negative!==0?-p|0:p},n.prototype.ucmp=function(c){if(this.length>c.length)return 1;if(this.length<c.length)return-1;for(var p=0,v=this.length-1;v>=0;v--){var g=this.words[v]|0,x=c.words[v]|0;if(g!==x){g<x?p=-1:g>x&&(p=1);break}}return p},n.prototype.gtn=function(c){return this.cmpn(c)===1},n.prototype.gt=function(c){return this.cmp(c)===1},n.prototype.gten=function(c){return this.cmpn(c)>=0},n.prototype.gte=function(c){return this.cmp(c)>=0},n.prototype.ltn=function(c){return this.cmpn(c)===-1},n.prototype.lt=function(c){return this.cmp(c)===-1},n.prototype.lten=function(c){return this.cmpn(c)<=0},n.prototype.lte=function(c){return this.cmp(c)<=0},n.prototype.eqn=function(c){return this.cmpn(c)===0},n.prototype.eq=function(c){return this.cmp(c)===0},n.red=function(c){return new O(c)},n.prototype.toRed=function(c){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),c.convertTo(this)._forceRed(c)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(c){return this.red=c,this},n.prototype.forceRed=function(c){return r(!this.red,"Already a number in reduction context"),this._forceRed(c)},n.prototype.redAdd=function(c){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,c)},n.prototype.redIAdd=function(c){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,c)},n.prototype.redSub=function(c){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,c)},n.prototype.redISub=function(c){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,c)},n.prototype.redShl=function(c){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,c)},n.prototype.redMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.mul(this,c)},n.prototype.redIMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.imul(this,c)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(c){return r(this.red&&!c.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,c)};var q={k256:null,p224:null,p192:null,p25519:null};function ee(f,c){this.name=f,this.p=new n(c,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}ee.prototype._tmp=function(){var c=new n(null);return c.words=new Array(Math.ceil(this.n/13)),c},ee.prototype.ireduce=function(c){var p=c,v;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),v=p.bitLength();while(v>this.n);var g=v<this.n?-1:p.ucmp(this.p);return g===0?(p.words[0]=0,p.length=1):g>0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},ee.prototype.split=function(c,p){c.iushrn(this.n,0,p)},ee.prototype.imulK=function(c){return c.imul(this.k)};function fe(){ee.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(fe,ee),fe.prototype.split=function(c,p){for(var v=4194303,g=Math.min(c.length,9),x=0;x<g;x++)p.words[x]=c.words[x];if(p.length=g,c.length<=9){c.words[0]=0,c.length=1;return}var S=c.words[9];for(p.words[p.length++]=S&v,x=10;x<c.length;x++){var _=c.words[x]|0;c.words[x-10]=(_&v)<<4|S>>>22,S=_}S>>>=22,c.words[x-10]=S,S===0&&c.length>10?c.length-=10:c.length-=9},fe.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var p=0,v=0;v<c.length;v++){var g=c.words[v]|0;p+=g*977,c.words[v]=p&67108863,p=g*64+(p/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function _e(){ee.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(_e,ee);function Te(){ee.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(Te,ee);function be(){ee.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(be,ee),be.prototype.imulK=function(c){for(var p=0,v=0;v<c.length;v++){var g=(c.words[v]|0)*19+p,x=g&67108863;g>>>=26,c.words[v]=x,p=g}return p!==0&&(c.words[c.length++]=p),c},n._prime=function(c){if(q[c])return q[c];var p;if(c==="k256")p=new fe;else if(c==="p224")p=new _e;else if(c==="p192")p=new Te;else if(c==="p25519")p=new be;else throw new Error("Unknown prime "+c);return q[c]=p,p};function O(f){if(typeof f=="string"){var c=n._prime(f);this.m=c.p,this.prime=c}else r(f.gtn(1),"modulus must be greater than 1"),this.m=f,this.prime=null}O.prototype._verify1=function(c){r(c.negative===0,"red works only with positives"),r(c.red,"red works only with red numbers")},O.prototype._verify2=function(c,p){r((c.negative|p.negative)===0,"red works only with positives"),r(c.red&&c.red===p.red,"red works only with red numbers")},O.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):c.umod(this.m)._forceRed(this)},O.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},O.prototype.add=function(c,p){this._verify2(c,p);var v=c.add(p);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},O.prototype.iadd=function(c,p){this._verify2(c,p);var v=c.iadd(p);return v.cmp(this.m)>=0&&v.isub(this.m),v},O.prototype.sub=function(c,p){this._verify2(c,p);var v=c.sub(p);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},O.prototype.isub=function(c,p){this._verify2(c,p);var v=c.isub(p);return v.cmpn(0)<0&&v.iadd(this.m),v},O.prototype.shl=function(c,p){return this._verify1(c),this.imod(c.ushln(p))},O.prototype.imul=function(c,p){return this._verify2(c,p),this.imod(c.imul(p))},O.prototype.mul=function(c,p){return this._verify2(c,p),this.imod(c.mul(p))},O.prototype.isqr=function(c){return this.imul(c,c.clone())},O.prototype.sqr=function(c){return this.mul(c,c)},O.prototype.sqrt=function(c){if(c.isZero())return c.clone();var p=this.m.andln(3);if(r(p%2===1),p===3){var v=this.m.add(new n(1)).iushrn(2);return this.pow(c,v)}for(var g=this.m.subn(1),x=0;!g.isZero()&&g.andln(1)===0;)x++,g.iushrn(1);r(!g.isZero());var S=new n(1).toRed(this),_=S.redNeg(),l=this.m.subn(1).iushrn(1),m=this.m.bitLength();for(m=new n(2*m*m).toRed(this);this.pow(m,l).cmp(_)!==0;)m.redIAdd(_);for(var A=this.pow(m,g),U=this.pow(c,g.addn(1).iushrn(1)),j=this.pow(c,g),Z=x;j.cmp(S)!==0;){for(var se=j,ae=0;se.cmp(S)!==0;ae++)se=se.redSqr();r(ae<Z);var he=this.pow(A,new n(1).iushln(Z-ae-1));U=U.redMul(he),A=he.redSqr(),j=j.redMul(A),Z=ae}return U},O.prototype.invm=function(c){var p=c._invmp(this.m);return p.negative!==0?(p.negative=0,this.imod(p).redNeg()):this.imod(p)},O.prototype.pow=function(c,p){if(p.isZero())return new n(1).toRed(this);if(p.cmpn(1)===0)return c.clone();var v=4,g=new Array(1<<v);g[0]=new n(1).toRed(this),g[1]=c;for(var x=2;x<g.length;x++)g[x]=this.mul(g[x-1],c);var S=g[0],_=0,l=0,m=p.bitLength()%26;for(m===0&&(m=26),x=p.length-1;x>=0;x--){for(var A=p.words[x],U=m-1;U>=0;U--){var j=A>>U&1;if(S!==g[0]&&(S=this.sqr(S)),j===0&&_===0){l=0;continue}_<<=1,_|=j,l++,!(l!==v&&(x!==0||U!==0))&&(S=this.mul(S,g[_]),l=0,_=0)}m=26}return S},O.prototype.convertTo=function(c){var p=c.umod(this.m);return p===c?p.clone():p},O.prototype.convertFrom=function(c){var p=c.clone();return p.red=null,p},n.mont=function(c){return new E(c)};function E(f){O.call(this,f),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(E,O),E.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},E.prototype.convertFrom=function(c){var p=this.imod(c.mul(this.rinv));return p.red=null,p},E.prototype.imul=function(c,p){if(c.isZero()||p.isZero())return c.words[0]=0,c.length=1,c;var v=c.imul(p),g=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=v.isub(g).iushrn(this.shift),S=x;return x.cmp(this.m)>=0?S=x.isub(this.m):x.cmpn(0)<0&&(S=x.iadd(this.m)),S._forceRed(this)},E.prototype.mul=function(c,p){if(c.isZero()||p.isZero())return new n(0)._forceRed(this);var v=c.mul(p),g=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=v.isub(g).iushrn(this.shift),S=x;return x.cmp(this.m)>=0?S=x.isub(this.m):x.cmpn(0)<0&&(S=x.iadd(this.m)),S._forceRed(this)},E.prototype.invm=function(c){var p=this.imod(c._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(typeof dg>"u"||dg,jS)});var Wa=W((OQ,KS)=>{KS.exports=VS;function VS(e,t){if(!e)throw new Error(t||"Assertion failed")}VS.equal=function(t,r,i){if(t!=r)throw new Error(i||"Assertion failed: "+t+" != "+r)}});var mg=W($S=>{"use strict";var $h=$S;function dM(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e!="string"){for(var i=0;i<e.length;i++)r[i]=e[i]|0;return r}if(t==="hex"){e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e);for(var i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var i=0;i<e.length;i++){var n=e.charCodeAt(i),a=n>>8,u=n&255;a?r.push(a,u):r.push(u)}return r}$h.toArray=dM;function WS(e){return e.length===1?"0"+e:e}$h.zero2=WS;function GS(e){for(var t="",r=0;r<e.length;r++)t+=WS(e[r].toString(16));return t}$h.toHex=GS;$h.encode=function(t,r){return r==="hex"?GS(t):t}});var rn=W(XS=>{"use strict";var Kn=XS,mM=ds(),vM=Wa(),Xh=mg();Kn.assert=vM;Kn.toArray=Xh.toArray;Kn.zero2=Xh.zero2;Kn.toHex=Xh.toHex;Kn.encode=Xh.encode;function gM(e,t,r){var i=new Array(Math.max(e.bitLength(),r)+1),n;for(n=0;n<i.length;n+=1)i[n]=0;var a=1<<t+1,u=e.clone();for(n=0;n<i.length;n++){var h,b=u.andln(a-1);u.isOdd()?(b>(a>>1)-1?h=(a>>1)-b:h=b,u.isubn(h)):h=0,i[n]=h,u.iushrn(1)}return i}Kn.getNAF=gM;function bM(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var i=0,n=0,a;e.cmpn(-i)>0||t.cmpn(-n)>0;){var u=e.andln(3)+i&3,h=t.andln(3)+n&3;u===3&&(u=-1),h===3&&(h=-1);var b;u&1?(a=e.andln(7)+i&7,(a===3||a===5)&&h===2?b=-u:b=u):b=0,r[0].push(b);var w;h&1?(a=t.andln(7)+n&7,(a===3||a===5)&&u===2?w=-h:w=h):w=0,r[1].push(w),2*i===b+1&&(i=1-i),2*n===w+1&&(n=1-n),e.iushrn(1),t.iushrn(1)}return r}Kn.getJSF=bM;function xM(e,t,r){var i="_"+t;e.prototype[t]=function(){return this[i]!==void 0?this[i]:this[i]=r.call(this)}}Kn.cachedProperty=xM;function _M(e){return typeof e=="string"?Kn.toArray(e,"hex"):e}Kn.parseBytes=_M;function yM(e){return new mM(e,"hex","le")}Kn.intFromLE=yM});var xg=W((PQ,bg)=>{var vg;bg.exports=function(t){return vg||(vg=new Ga(null)),vg.generate(t)};function Ga(e){this.rand=e}bg.exports.Rand=Ga;Ga.prototype.generate=function(t){return this._rand(t)};Ga.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var r=new Uint8Array(t),i=0;i<r.length;i++)r[i]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?Ga.prototype._rand=function(t){var r=new Uint8Array(t);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?Ga.prototype._rand=function(t){var r=new Uint8Array(t);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(Ga.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(gg=require("crypto"),typeof gg.randomBytes!="function")throw new Error("Not supported");Ga.prototype._rand=function(t){return gg.randomBytes(t)}}catch{}var gg});var pl=W((BQ,YS)=>{"use strict";var $o=ds(),ll=rn(),Yh=ll.getNAF,wM=ll.getJSF,Zh=ll.assert;function $a(e,t){this.type=e,this.p=new $o(t.p,16),this.red=t.prime?$o.red(t.prime):$o.mont(this.p),this.zero=new $o(0).toRed(this.red),this.one=new $o(1).toRed(this.red),this.two=new $o(2).toRed(this.red),this.n=t.n&&new $o(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}YS.exports=$a;$a.prototype.point=function(){throw new Error("Not implemented")};$a.prototype.validate=function(){throw new Error("Not implemented")};$a.prototype._fixedNafMul=function(t,r){Zh(t.precomputed);var i=t._getDoubles(),n=Yh(r,1,this._bitLength),a=(1<<i.step+1)-(i.step%2===0?2:1);a/=3;var u=[],h,b;for(h=0;h<n.length;h+=i.step){b=0;for(var w=h+i.step-1;w>=h;w--)b=(b<<1)+n[w];u.push(b)}for(var T=this.jpoint(null,null,null),I=this.jpoint(null,null,null),B=a;B>0;B--){for(h=0;h<u.length;h++)b=u[h],b===B?I=I.mixedAdd(i.points[h]):b===-B&&(I=I.mixedAdd(i.points[h].neg()));T=T.add(I)}return T.toP()};$a.prototype._wnafMul=function(t,r){var i=4,n=t._getNAFPoints(i);i=n.wnd;for(var a=n.points,u=Yh(r,i,this._bitLength),h=this.jpoint(null,null,null),b=u.length-1;b>=0;b--){for(var w=0;b>=0&&u[b]===0;b--)w++;if(b>=0&&w++,h=h.dblp(w),b<0)break;var T=u[b];Zh(T!==0),t.type==="affine"?T>0?h=h.mixedAdd(a[T-1>>1]):h=h.mixedAdd(a[-T-1>>1].neg()):T>0?h=h.add(a[T-1>>1]):h=h.add(a[-T-1>>1].neg())}return t.type==="affine"?h.toP():h};$a.prototype._wnafMulAdd=function(t,r,i,n,a){var u=this._wnafT1,h=this._wnafT2,b=this._wnafT3,w=0,T,I,B;for(T=0;T<n;T++){B=r[T];var M=B._getNAFPoints(t);u[T]=M.wnd,h[T]=M.points}for(T=n-1;T>=1;T-=2){var P=T-1,L=T;if(u[P]!==1||u[L]!==1){b[P]=Yh(i[P],u[P],this._bitLength),b[L]=Yh(i[L],u[L],this._bitLength),w=Math.max(b[P].length,w),w=Math.max(b[L].length,w);continue}var X=[r[P],null,null,r[L]];r[P].y.cmp(r[L].y)===0?(X[1]=r[P].add(r[L]),X[2]=r[P].toJ().mixedAdd(r[L].neg())):r[P].y.cmp(r[L].y.redNeg())===0?(X[1]=r[P].toJ().mixedAdd(r[L]),X[2]=r[P].add(r[L].neg())):(X[1]=r[P].toJ().mixedAdd(r[L]),X[2]=r[P].toJ().mixedAdd(r[L].neg()));var V=[-3,-1,-5,-7,0,7,5,1,3],q=wM(i[P],i[L]);for(w=Math.max(q[0].length,w),b[P]=new Array(w),b[L]=new Array(w),I=0;I<w;I++){var ee=q[0][I]|0,fe=q[1][I]|0;b[P][I]=V[(ee+1)*3+(fe+1)],b[L][I]=0,h[P]=X}}var _e=this.jpoint(null,null,null),Te=this._wnafT4;for(T=w;T>=0;T--){for(var be=0;T>=0;){var O=!0;for(I=0;I<n;I++)Te[I]=b[I][T]|0,Te[I]!==0&&(O=!1);if(!O)break;be++,T--}if(T>=0&&be++,_e=_e.dblp(be),T<0)break;for(I=0;I<n;I++){var E=Te[I];E!==0&&(E>0?B=h[I][E-1>>1]:E<0&&(B=h[I][-E-1>>1].neg()),B.type==="affine"?_e=_e.mixedAdd(B):_e=_e.add(B))}}for(T=0;T<n;T++)h[T]=null;return a?_e:_e.toP()};function wn(e,t){this.curve=e,this.type=t,this.precomputed=null}$a.BasePoint=wn;wn.prototype.eq=function(){throw new Error("Not implemented")};wn.prototype.validate=function(){return this.curve.validate(this)};$a.prototype.decodePoint=function(t,r){t=ll.toArray(t,r);var i=this.p.byteLength();if((t[0]===4||t[0]===6||t[0]===7)&&t.length-1===2*i){t[0]===6?Zh(t[t.length-1]%2===0):t[0]===7&&Zh(t[t.length-1]%2===1);var n=this.point(t.slice(1,1+i),t.slice(1+i,1+2*i));return n}else if((t[0]===2||t[0]===3)&&t.length-1===i)return this.pointFromX(t.slice(1,1+i),t[0]===3);throw new Error("Unknown point format")};wn.prototype.encodeCompressed=function(t){return this.encode(t,!0)};wn.prototype._encode=function(t){var r=this.curve.p.byteLength(),i=this.getX().toArray("be",r);return t?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",r))};wn.prototype.encode=function(t,r){return ll.encode(this._encode(r),t)};wn.prototype.precompute=function(t){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,t),r.beta=this._getBeta(),this.precomputed=r,this};wn.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((t.bitLength()+1)/r.step):!1};wn.prototype._getDoubles=function(t,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],n=this,a=0;a<r;a+=t){for(var u=0;u<t;u++)n=n.dbl();i.push(n)}return{step:t,points:i}};wn.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],i=(1<<t)-1,n=i===1?null:this.dbl(),a=1;a<i;a++)r[a]=r[a-1].add(n);return{wnd:t,points:r}};wn.prototype._getBeta=function(){return null};wn.prototype.dblp=function(t){for(var r=this,i=0;i<t;i++)r=r.dbl();return r}});var ZS=W((MQ,_g)=>{typeof Object.create=="function"?_g.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:_g.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var hl=W((CQ,wg)=>{try{if(yg=require("util"),typeof yg.inherits!="function")throw"";wg.exports=yg.inherits}catch{wg.exports=ZS()}var yg});var QS=W((LQ,JS)=>{"use strict";var SM=rn(),wr=ds(),Sg=hl(),nu=pl(),EM=SM.assert;function Sn(e){nu.call(this,"short",e),this.a=new wr(e.a,16).toRed(this.red),this.b=new wr(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Sg(Sn,nu);JS.exports=Sn;Sn.prototype._getEndomorphism=function(t){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,i;if(t.beta)r=new wr(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);r=n[0].cmp(n[1])<0?n[0]:n[1],r=r.toRed(this.red)}if(t.lambda)i=new wr(t.lambda,16);else{var a=this._getEndoRoots(this.n);this.g.mul(a[0]).x.cmp(this.g.x.redMul(r))===0?i=a[0]:(i=a[1],EM(this.g.mul(i).x.cmp(this.g.x.redMul(r))===0))}var u;return t.basis?u=t.basis.map(function(h){return{a:new wr(h.a,16),b:new wr(h.b,16)}}):u=this._getEndoBasis(i),{beta:r,lambda:i,basis:u}}};Sn.prototype._getEndoRoots=function(t){var r=t===this.p?this.red:wr.mont(t),i=new wr(2).toRed(r).redInvm(),n=i.redNeg(),a=new wr(3).toRed(r).redNeg().redSqrt().redMul(i),u=n.redAdd(a).fromRed(),h=n.redSub(a).fromRed();return[u,h]};Sn.prototype._getEndoBasis=function(t){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),i=t,n=this.n.clone(),a=new wr(1),u=new wr(0),h=new wr(0),b=new wr(1),w,T,I,B,M,P,L,X=0,V,q;i.cmpn(0)!==0;){var ee=n.div(i);V=n.sub(ee.mul(i)),q=h.sub(ee.mul(a));var fe=b.sub(ee.mul(u));if(!I&&V.cmp(r)<0)w=L.neg(),T=a,I=V.neg(),B=q;else if(I&&++X===2)break;L=V,n=i,i=V,h=a,a=q,b=u,u=fe}M=V.neg(),P=q;var _e=I.sqr().add(B.sqr()),Te=M.sqr().add(P.sqr());return Te.cmp(_e)>=0&&(M=w,P=T),I.negative&&(I=I.neg(),B=B.neg()),M.negative&&(M=M.neg(),P=P.neg()),[{a:I,b:B},{a:M,b:P}]};Sn.prototype._endoSplit=function(t){var r=this.endo.basis,i=r[0],n=r[1],a=n.b.mul(t).divRound(this.n),u=i.b.neg().mul(t).divRound(this.n),h=a.mul(i.a),b=u.mul(n.a),w=a.mul(i.b),T=u.mul(n.b),I=t.sub(h).sub(b),B=w.add(T).neg();return{k1:I,k2:B}};Sn.prototype.pointFromX=function(t,r){t=new wr(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=i.redSqrt();if(n.redSqr().redSub(i).cmp(this.zero)!==0)throw new Error("invalid point");var a=n.fromRed().isOdd();return(r&&!a||!r&&a)&&(n=n.redNeg()),this.point(t,n)};Sn.prototype.validate=function(t){if(t.inf)return!0;var r=t.x,i=t.y,n=this.a.redMul(r),a=r.redSqr().redMul(r).redIAdd(n).redIAdd(this.b);return i.redSqr().redISub(a).cmpn(0)===0};Sn.prototype._endoWnafMulAdd=function(t,r,i){for(var n=this._endoWnafT1,a=this._endoWnafT2,u=0;u<t.length;u++){var h=this._endoSplit(r[u]),b=t[u],w=b._getBeta();h.k1.negative&&(h.k1.ineg(),b=b.neg(!0)),h.k2.negative&&(h.k2.ineg(),w=w.neg(!0)),n[u*2]=b,n[u*2+1]=w,a[u*2]=h.k1,a[u*2+1]=h.k2}for(var T=this._wnafMulAdd(1,n,a,u*2,i),I=0;I<u*2;I++)n[I]=null,a[I]=null;return T};function Qr(e,t,r,i){nu.BasePoint.call(this,e,"affine"),t===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new wr(t,16),this.y=new wr(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}Sg(Qr,nu.BasePoint);Sn.prototype.point=function(t,r,i){return new Qr(this,t,r,i)};Sn.prototype.pointFromJSON=function(t,r){return Qr.fromJSON(this,t,r)};Qr.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var i=this.curve,n=function(a){return i.point(a.x.redMul(i.endo.beta),a.y)};t.beta=r,r.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return r}};Qr.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};Qr.fromJSON=function(t,r,i){typeof r=="string"&&(r=JSON.parse(r));var n=t.point(r[0],r[1],i);if(!r[2])return n;function a(h){return t.point(h[0],h[1],i)}var u=r[2];return n.precomputed={beta:null,doubles:u.doubles&&{step:u.doubles.step,points:[n].concat(u.doubles.points.map(a))},naf:u.naf&&{wnd:u.naf.wnd,points:[n].concat(u.naf.points.map(a))}},n};Qr.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};Qr.prototype.isInfinity=function(){return this.inf};Qr.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var r=this.y.redSub(t.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(t.x).redInvm()));var i=r.redSqr().redISub(this.x).redISub(t.x),n=r.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,n)};Qr.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,i=this.x.redSqr(),n=t.redInvm(),a=i.redAdd(i).redIAdd(i).redIAdd(r).redMul(n),u=a.redSqr().redISub(this.x.redAdd(this.x)),h=a.redMul(this.x.redSub(u)).redISub(this.y);return this.curve.point(u,h)};Qr.prototype.getX=function(){return this.x.fromRed()};Qr.prototype.getY=function(){return this.y.fromRed()};Qr.prototype.mul=function(t){return t=new wr(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)};Qr.prototype.mulAdd=function(t,r,i){var n=[this,r],a=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,a):this.curve._wnafMulAdd(1,n,a,2)};Qr.prototype.jmulAdd=function(t,r,i){var n=[this,r],a=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,a,!0):this.curve._wnafMulAdd(1,n,a,2,!0)};Qr.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)};Qr.prototype.neg=function(t){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var i=this.precomputed,n=function(a){return a.neg()};r.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(n)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(n)}}}return r};Qr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t};function ni(e,t,r,i){nu.BasePoint.call(this,e,"jacobian"),t===null&&r===null&&i===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new wr(0)):(this.x=new wr(t,16),this.y=new wr(r,16),this.z=new wr(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Sg(ni,nu.BasePoint);Sn.prototype.jpoint=function(t,r,i){return new ni(this,t,r,i)};ni.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),r=t.redSqr(),i=this.x.redMul(r),n=this.y.redMul(r).redMul(t);return this.curve.point(i,n)};ni.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};ni.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var r=t.z.redSqr(),i=this.z.redSqr(),n=this.x.redMul(r),a=t.x.redMul(i),u=this.y.redMul(r.redMul(t.z)),h=t.y.redMul(i.redMul(this.z)),b=n.redSub(a),w=u.redSub(h);if(b.cmpn(0)===0)return w.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var T=b.redSqr(),I=T.redMul(b),B=n.redMul(T),M=w.redSqr().redIAdd(I).redISub(B).redISub(B),P=w.redMul(B.redISub(M)).redISub(u.redMul(I)),L=this.z.redMul(t.z).redMul(b);return this.curve.jpoint(M,P,L)};ni.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var r=this.z.redSqr(),i=this.x,n=t.x.redMul(r),a=this.y,u=t.y.redMul(r).redMul(this.z),h=i.redSub(n),b=a.redSub(u);if(h.cmpn(0)===0)return b.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var w=h.redSqr(),T=w.redMul(h),I=i.redMul(w),B=b.redSqr().redIAdd(T).redISub(I).redISub(I),M=b.redMul(I.redISub(B)).redISub(a.redMul(T)),P=this.z.redMul(h);return this.curve.jpoint(B,M,P)};ni.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var i=this;for(r=0;r<t;r++)i=i.dbl();return i}var n=this.curve.a,a=this.curve.tinv,u=this.x,h=this.y,b=this.z,w=b.redSqr().redSqr(),T=h.redAdd(h);for(r=0;r<t;r++){var I=u.redSqr(),B=T.redSqr(),M=B.redSqr(),P=I.redAdd(I).redIAdd(I).redIAdd(n.redMul(w)),L=u.redMul(B),X=P.redSqr().redISub(L.redAdd(L)),V=L.redISub(X),q=P.redMul(V);q=q.redIAdd(q).redISub(M);var ee=T.redMul(b);r+1<t&&(w=w.redMul(M)),u=X,b=ee,T=q}return this.curve.jpoint(u,T.redMul(a),b)};ni.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};ni.prototype._zeroDbl=function(){var t,r,i;if(this.zOne){var n=this.x.redSqr(),a=this.y.redSqr(),u=a.redSqr(),h=this.x.redAdd(a).redSqr().redISub(n).redISub(u);h=h.redIAdd(h);var b=n.redAdd(n).redIAdd(n),w=b.redSqr().redISub(h).redISub(h),T=u.redIAdd(u);T=T.redIAdd(T),T=T.redIAdd(T),t=w,r=b.redMul(h.redISub(w)).redISub(T),i=this.y.redAdd(this.y)}else{var I=this.x.redSqr(),B=this.y.redSqr(),M=B.redSqr(),P=this.x.redAdd(B).redSqr().redISub(I).redISub(M);P=P.redIAdd(P);var L=I.redAdd(I).redIAdd(I),X=L.redSqr(),V=M.redIAdd(M);V=V.redIAdd(V),V=V.redIAdd(V),t=X.redISub(P).redISub(P),r=L.redMul(P.redISub(t)).redISub(V),i=this.y.redMul(this.z),i=i.redIAdd(i)}return this.curve.jpoint(t,r,i)};ni.prototype._threeDbl=function(){var t,r,i;if(this.zOne){var n=this.x.redSqr(),a=this.y.redSqr(),u=a.redSqr(),h=this.x.redAdd(a).redSqr().redISub(n).redISub(u);h=h.redIAdd(h);var b=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),w=b.redSqr().redISub(h).redISub(h);t=w;var T=u.redIAdd(u);T=T.redIAdd(T),T=T.redIAdd(T),r=b.redMul(h.redISub(w)).redISub(T),i=this.y.redAdd(this.y)}else{var I=this.z.redSqr(),B=this.y.redSqr(),M=this.x.redMul(B),P=this.x.redSub(I).redMul(this.x.redAdd(I));P=P.redAdd(P).redIAdd(P);var L=M.redIAdd(M);L=L.redIAdd(L);var X=L.redAdd(L);t=P.redSqr().redISub(X),i=this.y.redAdd(this.z).redSqr().redISub(B).redISub(I);var V=B.redSqr();V=V.redIAdd(V),V=V.redIAdd(V),V=V.redIAdd(V),r=P.redMul(L.redISub(t)).redISub(V)}return this.curve.jpoint(t,r,i)};ni.prototype._dbl=function(){var t=this.curve.a,r=this.x,i=this.y,n=this.z,a=n.redSqr().redSqr(),u=r.redSqr(),h=i.redSqr(),b=u.redAdd(u).redIAdd(u).redIAdd(t.redMul(a)),w=r.redAdd(r);w=w.redIAdd(w);var T=w.redMul(h),I=b.redSqr().redISub(T.redAdd(T)),B=T.redISub(I),M=h.redSqr();M=M.redIAdd(M),M=M.redIAdd(M),M=M.redIAdd(M);var P=b.redMul(B).redISub(M),L=i.redAdd(i).redMul(n);return this.curve.jpoint(I,P,L)};ni.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr(),n=r.redSqr(),a=t.redAdd(t).redIAdd(t),u=a.redSqr(),h=this.x.redAdd(r).redSqr().redISub(t).redISub(n);h=h.redIAdd(h),h=h.redAdd(h).redIAdd(h),h=h.redISub(u);var b=h.redSqr(),w=n.redIAdd(n);w=w.redIAdd(w),w=w.redIAdd(w),w=w.redIAdd(w);var T=a.redIAdd(h).redSqr().redISub(u).redISub(b).redISub(w),I=r.redMul(T);I=I.redIAdd(I),I=I.redIAdd(I);var B=this.x.redMul(b).redISub(I);B=B.redIAdd(B),B=B.redIAdd(B);var M=this.y.redMul(T.redMul(w.redISub(T)).redISub(h.redMul(b)));M=M.redIAdd(M),M=M.redIAdd(M),M=M.redIAdd(M);var P=this.z.redAdd(h).redSqr().redISub(i).redISub(b);return this.curve.jpoint(B,M,P)};ni.prototype.mul=function(t,r){return t=new wr(t,r),this.curve._wnafMul(this,t)};ni.prototype.eq=function(t){if(t.type==="affine")return this.eq(t.toJ());if(this===t)return!0;var r=this.z.redSqr(),i=t.z.redSqr();if(this.x.redMul(i).redISub(t.x.redMul(r)).cmpn(0)!==0)return!1;var n=r.redMul(this.z),a=i.redMul(t.z);return this.y.redMul(a).redISub(t.y.redMul(n)).cmpn(0)===0};ni.prototype.eqXToP=function(t){var r=this.z.redSqr(),i=t.toRed(this.curve.red).redMul(r);if(this.x.cmp(i)===0)return!0;for(var n=t.clone(),a=this.curve.redN.redMul(r);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(a),this.x.cmp(i)===0)return!0}};ni.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};ni.prototype.isInfinity=function(){return this.z.cmpn(0)===0}});var r3=W((DQ,t3)=>{"use strict";var su=ds(),e3=hl(),Jh=pl(),TM=rn();function au(e){Jh.call(this,"mont",e),this.a=new su(e.a,16).toRed(this.red),this.b=new su(e.b,16).toRed(this.red),this.i4=new su(4).toRed(this.red).redInvm(),this.two=new su(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}e3(au,Jh);t3.exports=au;au.prototype.validate=function(t){var r=t.normalize().x,i=r.redSqr(),n=i.redMul(r).redAdd(i.redMul(this.a)).redAdd(r),a=n.redSqrt();return a.redSqr().cmp(n)===0};function ei(e,t,r){Jh.BasePoint.call(this,e,"projective"),t===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new su(t,16),this.z=new su(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}e3(ei,Jh.BasePoint);au.prototype.decodePoint=function(t,r){return this.point(TM.toArray(t,r),1)};au.prototype.point=function(t,r){return new ei(this,t,r)};au.prototype.pointFromJSON=function(t){return ei.fromJSON(this,t)};ei.prototype.precompute=function(){};ei.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};ei.fromJSON=function(t,r){return new ei(t,r[0],r[1]||t.one)};ei.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};ei.prototype.isInfinity=function(){return this.z.cmpn(0)===0};ei.prototype.dbl=function(){var t=this.x.redAdd(this.z),r=t.redSqr(),i=this.x.redSub(this.z),n=i.redSqr(),a=r.redSub(n),u=r.redMul(n),h=a.redMul(n.redAdd(this.curve.a24.redMul(a)));return this.curve.point(u,h)};ei.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};ei.prototype.diffAdd=function(t,r){var i=this.x.redAdd(this.z),n=this.x.redSub(this.z),a=t.x.redAdd(t.z),u=t.x.redSub(t.z),h=u.redMul(i),b=a.redMul(n),w=r.z.redMul(h.redAdd(b).redSqr()),T=r.x.redMul(h.redISub(b).redSqr());return this.curve.point(w,T)};ei.prototype.mul=function(t){for(var r=t.clone(),i=this,n=this.curve.point(null,null),a=this,u=[];r.cmpn(0)!==0;r.iushrn(1))u.push(r.andln(1));for(var h=u.length-1;h>=0;h--)u[h]===0?(i=i.diffAdd(n,a),n=n.dbl()):(n=i.diffAdd(n,a),i=i.dbl());return n};ei.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};ei.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};ei.prototype.eq=function(t){return this.getX().cmp(t.getX())===0};ei.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};ei.prototype.getX=function(){return this.normalize(),this.x.fromRed()}});var s3=W((UQ,n3)=>{"use strict";var IM=rn(),aa=ds(),i3=hl(),Qh=pl(),RM=IM.assert;function ms(e){this.twisted=(e.a|0)!==1,this.mOneA=this.twisted&&(e.a|0)===-1,this.extended=this.mOneA,Qh.call(this,"edwards",e),this.a=new aa(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new aa(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new aa(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),RM(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(e.c|0)===1}i3(ms,Qh);n3.exports=ms;ms.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)};ms.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)};ms.prototype.jpoint=function(t,r,i,n){return this.point(t,r,i,n)};ms.prototype.pointFromX=function(t,r){t=new aa(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr(),n=this.c2.redSub(this.a.redMul(i)),a=this.one.redSub(this.c2.redMul(this.d).redMul(i)),u=n.redMul(a.redInvm()),h=u.redSqrt();if(h.redSqr().redSub(u).cmp(this.zero)!==0)throw new Error("invalid point");var b=h.fromRed().isOdd();return(r&&!b||!r&&b)&&(h=h.redNeg()),this.point(t,h)};ms.prototype.pointFromY=function(t,r){t=new aa(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr(),n=i.redSub(this.c2),a=i.redMul(this.d).redMul(this.c2).redSub(this.a),u=n.redMul(a.redInvm());if(u.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,t)}var h=u.redSqrt();if(h.redSqr().redSub(u).cmp(this.zero)!==0)throw new Error("invalid point");return h.fromRed().isOdd()!==r&&(h=h.redNeg()),this.point(h,t)};ms.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var r=t.x.redSqr(),i=t.y.redSqr(),n=r.redMul(this.a).redAdd(i),a=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(i)));return n.cmp(a)===0};function Zt(e,t,r,i,n){Qh.BasePoint.call(this,e,"projective"),t===null&&r===null&&i===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new aa(t,16),this.y=new aa(r,16),this.z=i?new aa(i,16):this.curve.one,this.t=n&&new aa(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}i3(Zt,Qh.BasePoint);ms.prototype.pointFromJSON=function(t){return Zt.fromJSON(this,t)};ms.prototype.point=function(t,r,i,n){return new Zt(this,t,r,i,n)};Zt.fromJSON=function(t,r){return new Zt(t,r[0],r[1],r[2])};Zt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Zt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Zt.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var n=this.curve._mulA(t),a=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),u=n.redAdd(r),h=u.redSub(i),b=n.redSub(r),w=a.redMul(h),T=u.redMul(b),I=a.redMul(b),B=h.redMul(u);return this.curve.point(w,T,B,I)};Zt.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),i=this.y.redSqr(),n,a,u,h,b,w;if(this.curve.twisted){h=this.curve._mulA(r);var T=h.redAdd(i);this.zOne?(n=t.redSub(r).redSub(i).redMul(T.redSub(this.curve.two)),a=T.redMul(h.redSub(i)),u=T.redSqr().redSub(T).redSub(T)):(b=this.z.redSqr(),w=T.redSub(b).redISub(b),n=t.redSub(r).redISub(i).redMul(w),a=T.redMul(h.redSub(i)),u=T.redMul(w))}else h=r.redAdd(i),b=this.curve._mulC(this.z).redSqr(),w=h.redSub(b).redSub(b),n=this.curve._mulC(t.redISub(h)).redMul(w),a=this.curve._mulC(h).redMul(r.redISub(i)),u=h.redMul(w);return this.curve.point(n,a,u)};Zt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Zt.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),i=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),a=this.z.redMul(t.z.redAdd(t.z)),u=i.redSub(r),h=a.redSub(n),b=a.redAdd(n),w=i.redAdd(r),T=u.redMul(h),I=b.redMul(w),B=u.redMul(w),M=h.redMul(b);return this.curve.point(T,I,M,B)};Zt.prototype._projAdd=function(t){var r=this.z.redMul(t.z),i=r.redSqr(),n=this.x.redMul(t.x),a=this.y.redMul(t.y),u=this.curve.d.redMul(n).redMul(a),h=i.redSub(u),b=i.redAdd(u),w=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(n).redISub(a),T=r.redMul(h).redMul(w),I,B;return this.curve.twisted?(I=r.redMul(b).redMul(a.redSub(this.curve._mulA(n))),B=h.redMul(b)):(I=r.redMul(b).redMul(a.redSub(n)),B=this.curve._mulC(h).redMul(b)),this.curve.point(T,I,B)};Zt.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)};Zt.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)};Zt.prototype.mulAdd=function(t,r,i){return this.curve._wnafMulAdd(1,[this,r],[t,i],2,!1)};Zt.prototype.jmulAdd=function(t,r,i){return this.curve._wnafMulAdd(1,[this,r],[t,i],2,!0)};Zt.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this};Zt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Zt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Zt.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Zt.prototype.eq=function(t){return this===t||this.getX().cmp(t.getX())===0&&this.getY().cmp(t.getY())===0};Zt.prototype.eqXToP=function(t){var r=t.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var i=t.clone(),n=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),this.x.cmp(r)===0)return!0}};Zt.prototype.toP=Zt.prototype.normalize;Zt.prototype.mixedAdd=Zt.prototype.add});var Eg=W(a3=>{"use strict";var ed=a3;ed.base=pl();ed.short=QS();ed.mont=r3();ed.edwards=s3()});var Wn=W(Kt=>{"use strict";var AM=Wa(),OM=hl();Kt.inherits=OM;function kM(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function NM(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var i=0,n=0;n<e.length;n++){var a=e.charCodeAt(n);a<128?r[i++]=a:a<2048?(r[i++]=a>>6|192,r[i++]=a&63|128):kM(e,n)?(a=65536+((a&1023)<<10)+(e.charCodeAt(++n)&1023),r[i++]=a>>18|240,r[i++]=a>>12&63|128,r[i++]=a>>6&63|128,r[i++]=a&63|128):(r[i++]=a>>12|224,r[i++]=a>>6&63|128,r[i++]=a&63|128)}else for(n=0;n<e.length;n++)r[n]=e[n]|0;return r}Kt.toArray=NM;function PM(e){for(var t="",r=0;r<e.length;r++)t+=c3(e[r].toString(16));return t}Kt.toHex=PM;function o3(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}Kt.htonl=o3;function BM(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];t==="little"&&(n=o3(n)),r+=u3(n.toString(16))}return r}Kt.toHex32=BM;function c3(e){return e.length===1?"0"+e:e}Kt.zero2=c3;function u3(e){return e.length===7?"0"+e:e.length===6?"00"+e:e.length===5?"000"+e:e.length===4?"0000"+e:e.length===3?"00000"+e:e.length===2?"000000"+e:e.length===1?"0000000"+e:e}Kt.zero8=u3;function MM(e,t,r,i){var n=r-t;AM(n%4===0);for(var a=new Array(n/4),u=0,h=t;u<a.length;u++,h+=4){var b;i==="big"?b=e[h]<<24|e[h+1]<<16|e[h+2]<<8|e[h+3]:b=e[h+3]<<24|e[h+2]<<16|e[h+1]<<8|e[h],a[u]=b>>>0}return a}Kt.join32=MM;function CM(e,t){for(var r=new Array(e.length*4),i=0,n=0;i<e.length;i++,n+=4){var a=e[i];t==="big"?(r[n]=a>>>24,r[n+1]=a>>>16&255,r[n+2]=a>>>8&255,r[n+3]=a&255):(r[n+3]=a>>>24,r[n+2]=a>>>16&255,r[n+1]=a>>>8&255,r[n]=a&255)}return r}Kt.split32=CM;function LM(e,t){return e>>>t|e<<32-t}Kt.rotr32=LM;function DM(e,t){return e<<t|e>>>32-t}Kt.rotl32=DM;function UM(e,t){return e+t>>>0}Kt.sum32=UM;function qM(e,t,r){return e+t+r>>>0}Kt.sum32_3=qM;function FM(e,t,r,i){return e+t+r+i>>>0}Kt.sum32_4=FM;function HM(e,t,r,i,n){return e+t+r+i+n>>>0}Kt.sum32_5=HM;function zM(e,t,r,i){var n=e[t],a=e[t+1],u=i+a>>>0,h=(u<i?1:0)+r+n;e[t]=h>>>0,e[t+1]=u}Kt.sum64=zM;function jM(e,t,r,i){var n=t+i>>>0,a=(n<t?1:0)+e+r;return a>>>0}Kt.sum64_hi=jM;function VM(e,t,r,i){var n=t+i;return n>>>0}Kt.sum64_lo=VM;function KM(e,t,r,i,n,a,u,h){var b=0,w=t;w=w+i>>>0,b+=w<t?1:0,w=w+a>>>0,b+=w<a?1:0,w=w+h>>>0,b+=w<h?1:0;var T=e+r+n+u+b;return T>>>0}Kt.sum64_4_hi=KM;function WM(e,t,r,i,n,a,u,h){var b=t+i+a+h;return b>>>0}Kt.sum64_4_lo=WM;function GM(e,t,r,i,n,a,u,h,b,w){var T=0,I=t;I=I+i>>>0,T+=I<t?1:0,I=I+a>>>0,T+=I<a?1:0,I=I+h>>>0,T+=I<h?1:0,I=I+w>>>0,T+=I<w?1:0;var B=e+r+n+u+b+T;return B>>>0}Kt.sum64_5_hi=GM;function $M(e,t,r,i,n,a,u,h,b,w){var T=t+i+a+h+w;return T>>>0}Kt.sum64_5_lo=$M;function XM(e,t,r){var i=t<<32-r|e>>>r;return i>>>0}Kt.rotr64_hi=XM;function YM(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Kt.rotr64_lo=YM;function ZM(e,t,r){return e>>>r}Kt.shr64_hi=ZM;function JM(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Kt.shr64_lo=JM});var ou=W(l3=>{"use strict";var f3=Wn(),QM=Wa();function td(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}l3.BlockHash=td;td.prototype.update=function(t,r){if(t=f3.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var i=t.length%this._delta8;this.pending=t.slice(t.length-i,t.length),this.pending.length===0&&(this.pending=null),t=f3.join32(t,0,t.length-i,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this};td.prototype.digest=function(t){return this.update(this._pad()),QM(this.pending===null),this._digest(t)};td.prototype._pad=function(){var t=this.pendingTotal,r=this._delta8,i=r-(t+this.padLength)%r,n=new Array(i+this.padLength);n[0]=128;for(var a=1;a<i;a++)n[a]=0;if(t<<=3,this.endian==="big"){for(var u=8;u<this.padLength;u++)n[a++]=0;n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=t>>>24&255,n[a++]=t>>>16&255,n[a++]=t>>>8&255,n[a++]=t&255}else for(n[a++]=t&255,n[a++]=t>>>8&255,n[a++]=t>>>16&255,n[a++]=t>>>24&255,n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=0,u=8;u<this.padLength;u++)n[a++]=0;return n}});var Tg=W(oa=>{"use strict";var eC=Wn(),vs=eC.rotr32;function tC(e,t,r,i){if(e===0)return p3(t,r,i);if(e===1||e===3)return d3(t,r,i);if(e===2)return h3(t,r,i)}oa.ft_1=tC;function p3(e,t,r){return e&t^~e&r}oa.ch32=p3;function h3(e,t,r){return e&t^e&r^t&r}oa.maj32=h3;function d3(e,t,r){return e^t^r}oa.p32=d3;function rC(e){return vs(e,2)^vs(e,13)^vs(e,22)}oa.s0_256=rC;function iC(e){return vs(e,6)^vs(e,11)^vs(e,25)}oa.s1_256=iC;function nC(e){return vs(e,7)^vs(e,18)^e>>>3}oa.g0_256=nC;function sC(e){return vs(e,17)^vs(e,19)^e>>>10}oa.g1_256=sC});var g3=W((jQ,v3)=>{"use strict";var cu=Wn(),aC=ou(),oC=Tg(),Ig=cu.rotl32,dl=cu.sum32,cC=cu.sum32_5,uC=oC.ft_1,m3=aC.BlockHash,fC=[1518500249,1859775393,2400959708,3395469782];function gs(){if(!(this instanceof gs))return new gs;m3.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}cu.inherits(gs,m3);v3.exports=gs;gs.blockSize=512;gs.outSize=160;gs.hmacStrength=80;gs.padLength=64;gs.prototype._update=function(t,r){for(var i=this.W,n=0;n<16;n++)i[n]=t[r+n];for(;n<i.length;n++)i[n]=Ig(i[n-3]^i[n-8]^i[n-14]^i[n-16],1);var a=this.h[0],u=this.h[1],h=this.h[2],b=this.h[3],w=this.h[4];for(n=0;n<i.length;n++){var T=~~(n/20),I=cC(Ig(a,5),uC(T,u,h,b),w,i[n],fC[T]);w=b,b=h,h=Ig(u,30),u=a,a=I}this.h[0]=dl(this.h[0],a),this.h[1]=dl(this.h[1],u),this.h[2]=dl(this.h[2],h),this.h[3]=dl(this.h[3],b),this.h[4]=dl(this.h[4],w)};gs.prototype._digest=function(t){return t==="hex"?cu.toHex32(this.h,"big"):cu.split32(this.h,"big")}});var Rg=W((VQ,x3)=>{"use strict";var uu=Wn(),lC=ou(),fu=Tg(),pC=Wa(),Gn=uu.sum32,hC=uu.sum32_4,dC=uu.sum32_5,mC=fu.ch32,vC=fu.maj32,gC=fu.s0_256,bC=fu.s1_256,xC=fu.g0_256,_C=fu.g1_256,b3=lC.BlockHash,yC=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function bs(){if(!(this instanceof bs))return new bs;b3.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=yC,this.W=new Array(64)}uu.inherits(bs,b3);x3.exports=bs;bs.blockSize=512;bs.outSize=256;bs.hmacStrength=192;bs.padLength=64;bs.prototype._update=function(t,r){for(var i=this.W,n=0;n<16;n++)i[n]=t[r+n];for(;n<i.length;n++)i[n]=hC(_C(i[n-2]),i[n-7],xC(i[n-15]),i[n-16]);var a=this.h[0],u=this.h[1],h=this.h[2],b=this.h[3],w=this.h[4],T=this.h[5],I=this.h[6],B=this.h[7];for(pC(this.k.length===i.length),n=0;n<i.length;n++){var M=dC(B,bC(w),mC(w,T,I),this.k[n],i[n]),P=Gn(gC(a),vC(a,u,h));B=I,I=T,T=w,w=Gn(b,M),b=h,h=u,u=a,a=Gn(M,P)}this.h[0]=Gn(this.h[0],a),this.h[1]=Gn(this.h[1],u),this.h[2]=Gn(this.h[2],h),this.h[3]=Gn(this.h[3],b),this.h[4]=Gn(this.h[4],w),this.h[5]=Gn(this.h[5],T),this.h[6]=Gn(this.h[6],I),this.h[7]=Gn(this.h[7],B)};bs.prototype._digest=function(t){return t==="hex"?uu.toHex32(this.h,"big"):uu.split32(this.h,"big")}});var w3=W((KQ,y3)=>{"use strict";var Ag=Wn(),_3=Rg();function ca(){if(!(this instanceof ca))return new ca;_3.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Ag.inherits(ca,_3);y3.exports=ca;ca.blockSize=512;ca.outSize=224;ca.hmacStrength=192;ca.padLength=64;ca.prototype._digest=function(t){return t==="hex"?Ag.toHex32(this.h.slice(0,7),"big"):Ag.split32(this.h.slice(0,7),"big")}});var Ng=W((WQ,I3)=>{"use strict";var Ci=Wn(),wC=ou(),SC=Wa(),xs=Ci.rotr64_hi,_s=Ci.rotr64_lo,S3=Ci.shr64_hi,E3=Ci.shr64_lo,Xa=Ci.sum64,Og=Ci.sum64_hi,kg=Ci.sum64_lo,EC=Ci.sum64_4_hi,TC=Ci.sum64_4_lo,IC=Ci.sum64_5_hi,RC=Ci.sum64_5_lo,T3=wC.BlockHash,AC=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function $n(){if(!(this instanceof $n))return new $n;T3.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=AC,this.W=new Array(160)}Ci.inherits($n,T3);I3.exports=$n;$n.blockSize=1024;$n.outSize=512;$n.hmacStrength=192;$n.padLength=128;$n.prototype._prepareBlock=function(t,r){for(var i=this.W,n=0;n<32;n++)i[n]=t[r+n];for(;n<i.length;n+=2){var a=qC(i[n-4],i[n-3]),u=FC(i[n-4],i[n-3]),h=i[n-14],b=i[n-13],w=DC(i[n-30],i[n-29]),T=UC(i[n-30],i[n-29]),I=i[n-32],B=i[n-31];i[n]=EC(a,u,h,b,w,T,I,B),i[n+1]=TC(a,u,h,b,w,T,I,B)}};$n.prototype._update=function(t,r){this._prepareBlock(t,r);var i=this.W,n=this.h[0],a=this.h[1],u=this.h[2],h=this.h[3],b=this.h[4],w=this.h[5],T=this.h[6],I=this.h[7],B=this.h[8],M=this.h[9],P=this.h[10],L=this.h[11],X=this.h[12],V=this.h[13],q=this.h[14],ee=this.h[15];SC(this.k.length===i.length);for(var fe=0;fe<i.length;fe+=2){var _e=q,Te=ee,be=CC(B,M),O=LC(B,M),E=OC(B,M,P,L,X,V),f=kC(B,M,P,L,X,V),c=this.k[fe],p=this.k[fe+1],v=i[fe],g=i[fe+1],x=IC(_e,Te,be,O,E,f,c,p,v,g),S=RC(_e,Te,be,O,E,f,c,p,v,g);_e=BC(n,a),Te=MC(n,a),be=NC(n,a,u,h,b,w),O=PC(n,a,u,h,b,w);var _=Og(_e,Te,be,O),l=kg(_e,Te,be,O);q=X,ee=V,X=P,V=L,P=B,L=M,B=Og(T,I,x,S),M=kg(I,I,x,S),T=b,I=w,b=u,w=h,u=n,h=a,n=Og(x,S,_,l),a=kg(x,S,_,l)}Xa(this.h,0,n,a),Xa(this.h,2,u,h),Xa(this.h,4,b,w),Xa(this.h,6,T,I),Xa(this.h,8,B,M),Xa(this.h,10,P,L),Xa(this.h,12,X,V),Xa(this.h,14,q,ee)};$n.prototype._digest=function(t){return t==="hex"?Ci.toHex32(this.h,"big"):Ci.split32(this.h,"big")};function OC(e,t,r,i,n){var a=e&r^~e&n;return a<0&&(a+=4294967296),a}function kC(e,t,r,i,n,a){var u=t&i^~t&a;return u<0&&(u+=4294967296),u}function NC(e,t,r,i,n){var a=e&r^e&n^r&n;return a<0&&(a+=4294967296),a}function PC(e,t,r,i,n,a){var u=t&i^t&a^i&a;return u<0&&(u+=4294967296),u}function BC(e,t){var r=xs(e,t,28),i=xs(t,e,2),n=xs(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function MC(e,t){var r=_s(e,t,28),i=_s(t,e,2),n=_s(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function CC(e,t){var r=xs(e,t,14),i=xs(e,t,18),n=xs(t,e,9),a=r^i^n;return a<0&&(a+=4294967296),a}function LC(e,t){var r=_s(e,t,14),i=_s(e,t,18),n=_s(t,e,9),a=r^i^n;return a<0&&(a+=4294967296),a}function DC(e,t){var r=xs(e,t,1),i=xs(e,t,8),n=S3(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function UC(e,t){var r=_s(e,t,1),i=_s(e,t,8),n=E3(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function qC(e,t){var r=xs(e,t,19),i=xs(t,e,29),n=S3(e,t,6),a=r^i^n;return a<0&&(a+=4294967296),a}function FC(e,t){var r=_s(e,t,19),i=_s(t,e,29),n=E3(e,t,6),a=r^i^n;return a<0&&(a+=4294967296),a}});var O3=W((GQ,A3)=>{"use strict";var Pg=Wn(),R3=Ng();function ua(){if(!(this instanceof ua))return new ua;R3.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Pg.inherits(ua,R3);A3.exports=ua;ua.blockSize=1024;ua.outSize=384;ua.hmacStrength=192;ua.padLength=128;ua.prototype._digest=function(t){return t==="hex"?Pg.toHex32(this.h.slice(0,12),"big"):Pg.split32(this.h.slice(0,12),"big")}});var k3=W(lu=>{"use strict";lu.sha1=g3();lu.sha224=w3();lu.sha256=Rg();lu.sha384=O3();lu.sha512=Ng()});var L3=W(C3=>{"use strict";var Xo=Wn(),HC=ou(),rd=Xo.rotl32,N3=Xo.sum32,ml=Xo.sum32_3,P3=Xo.sum32_4,M3=HC.BlockHash;function ys(){if(!(this instanceof ys))return new ys;M3.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Xo.inherits(ys,M3);C3.ripemd160=ys;ys.blockSize=512;ys.outSize=160;ys.hmacStrength=192;ys.padLength=64;ys.prototype._update=function(t,r){for(var i=this.h[0],n=this.h[1],a=this.h[2],u=this.h[3],h=this.h[4],b=i,w=n,T=a,I=u,B=h,M=0;M<80;M++){var P=N3(rd(P3(i,B3(M,n,a,u),t[VC[M]+r],zC(M)),WC[M]),h);i=h,h=u,u=rd(a,10),a=n,n=P,P=N3(rd(P3(b,B3(79-M,w,T,I),t[KC[M]+r],jC(M)),GC[M]),B),b=B,B=I,I=rd(T,10),T=w,w=P}P=ml(this.h[1],a,I),this.h[1]=ml(this.h[2],u,B),this.h[2]=ml(this.h[3],h,b),this.h[3]=ml(this.h[4],i,w),this.h[4]=ml(this.h[0],n,T),this.h[0]=P};ys.prototype._digest=function(t){return t==="hex"?Xo.toHex32(this.h,"little"):Xo.split32(this.h,"little")};function B3(e,t,r,i){return e<=15?t^r^i:e<=31?t&r|~t&i:e<=47?(t|~r)^i:e<=63?t&i|r&~i:t^(r|~i)}function zC(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function jC(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}var VC=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],KC=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],WC=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],GC=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var U3=W((YQ,D3)=>{"use strict";var $C=Wn(),XC=Wa();function pu(e,t,r){if(!(this instanceof pu))return new pu(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init($C.toArray(t,r))}D3.exports=pu;pu.prototype._init=function(t){t.length>this.blockSize&&(t=new this.Hash().update(t).digest()),XC(t.length<=this.blockSize);for(var r=t.length;r<this.blockSize;r++)t.push(0);for(r=0;r<t.length;r++)t[r]^=54;for(this.inner=new this.Hash().update(t),r=0;r<t.length;r++)t[r]^=106;this.outer=new this.Hash().update(t)};pu.prototype.update=function(t,r){return this.inner.update(t,r),this};pu.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}});var id=W(q3=>{var si=q3;si.utils=Wn();si.common=ou();si.sha=k3();si.ripemd=L3();si.hmac=U3();si.sha1=si.sha.sha1;si.sha256=si.sha.sha256;si.sha224=si.sha.sha224;si.sha384=si.sha.sha384;si.sha512=si.sha.sha512;si.ripemd160=si.ripemd.ripemd160});var H3=W((JQ,F3)=>{F3.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}});var nd=W(V3=>{"use strict";var Mg=V3,Ya=id(),Bg=Eg(),YC=rn(),z3=YC.assert;function j3(e){e.type==="short"?this.curve=new Bg.short(e):e.type==="edwards"?this.curve=new Bg.edwards(e):this.curve=new Bg.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,z3(this.g.validate(),"Invalid curve"),z3(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}Mg.PresetCurve=j3;function Za(e,t){Object.defineProperty(Mg,e,{configurable:!0,enumerable:!0,get:function(){var r=new j3(t);return Object.defineProperty(Mg,e,{configurable:!0,enumerable:!0,value:r}),r}})}Za("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Ya.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});Za("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Ya.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});Za("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Ya.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});Za("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Ya.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});Za("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Ya.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]});Za("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ya.sha256,gRed:!1,g:["9"]});Za("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ya.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var Cg;try{Cg=H3()}catch{Cg=void 0}Za("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Ya.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",Cg]})});var G3=W((eee,W3)=>{"use strict";var ZC=id(),Yo=mg(),K3=Wa();function Ja(e){if(!(this instanceof Ja))return new Ja(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=Yo.toArray(e.entropy,e.entropyEnc||"hex"),r=Yo.toArray(e.nonce,e.nonceEnc||"hex"),i=Yo.toArray(e.pers,e.persEnc||"hex");K3(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,i)}W3.exports=Ja;Ja.prototype._init=function(t,r,i){var n=t.concat(r).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a<this.V.length;a++)this.K[a]=0,this.V[a]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656};Ja.prototype._hmac=function(){return new ZC.hmac(this.hash,this.K)};Ja.prototype._update=function(t){var r=this._hmac().update(this.V).update([0]);t&&(r=r.update(t)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())};Ja.prototype.reseed=function(t,r,i,n){typeof r!="string"&&(n=i,i=r,r=null),t=Yo.toArray(t,r),i=Yo.toArray(i,n),K3(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(i||[])),this._reseed=1};Ja.prototype.generate=function(t,r,i,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(n=i,i=r,r=null),i&&(i=Yo.toArray(i,n||"hex"),this._update(i));for(var a=[];a.length<t;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var u=a.slice(0,t);return this._update(i),this._reseed++,Yo.encode(u,r)}});var X3=W((tee,$3)=>{"use strict";var JC=ds(),QC=rn(),Lg=QC.assert;function di(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}$3.exports=di;di.fromPublic=function(t,r,i){return r instanceof di?r:new di(t,{pub:r,pubEnc:i})};di.fromPrivate=function(t,r,i){return r instanceof di?r:new di(t,{priv:r,privEnc:i})};di.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};di.prototype.getPublic=function(t,r){return typeof t=="string"&&(r=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,t):this.pub};di.prototype.getPrivate=function(t){return t==="hex"?this.priv.toString(16,2):this.priv};di.prototype._importPrivate=function(t,r){this.priv=new JC(t,r||16),this.priv=this.priv.umod(this.ec.curve.n)};di.prototype._importPublic=function(t,r){if(t.x||t.y){this.ec.curve.type==="mont"?Lg(t.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&Lg(t.x&&t.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(t.x,t.y);return}this.pub=this.ec.curve.decodePoint(t,r)};di.prototype.derive=function(t){return t.validate()||Lg(t.validate(),"public point not validated"),t.mul(this.priv).getX()};di.prototype.sign=function(t,r,i){return this.ec.sign(t,this,r,i)};di.prototype.verify=function(t,r){return this.ec.verify(t,r,this)};di.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}});var J3=W((ree,Z3)=>{"use strict";var sd=ds(),qg=rn(),eL=qg.assert;function ad(e,t){if(e instanceof ad)return e;this._importDER(e,t)||(eL(e.r&&e.s,"Signature without r or s"),this.r=new sd(e.r,16),this.s=new sd(e.s,16),e.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}Z3.exports=ad;function tL(){this.place=0}function Dg(e,t){var r=e[t.place++];if(!(r&128))return r;var i=r&15;if(i===0||i>4)return!1;for(var n=0,a=0,u=t.place;a<i;a++,u++)n<<=8,n|=e[u],n>>>=0;return n<=127?!1:(t.place=u,n)}function Y3(e){for(var t=0,r=e.length-1;!e[t]&&!(e[t+1]&128)&&t<r;)t++;return t===0?e:e.slice(t)}ad.prototype._importDER=function(t,r){t=qg.toArray(t,r);var i=new tL;if(t[i.place++]!==48)return!1;var n=Dg(t,i);if(n===!1||n+i.place!==t.length||t[i.place++]!==2)return!1;var a=Dg(t,i);if(a===!1)return!1;var u=t.slice(i.place,a+i.place);if(i.place+=a,t[i.place++]!==2)return!1;var h=Dg(t,i);if(h===!1||t.length!==h+i.place)return!1;var b=t.slice(i.place,h+i.place);if(u[0]===0)if(u[1]&128)u=u.slice(1);else return!1;if(b[0]===0)if(b[1]&128)b=b.slice(1);else return!1;return this.r=new sd(u),this.s=new sd(b),this.recoveryParam=null,!0};function Ug(e,t){if(t<128){e.push(t);return}var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(r|128);--r;)e.push(t>>>(r<<3)&255);e.push(t)}ad.prototype.toDER=function(t){var r=this.r.toArray(),i=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),i[0]&128&&(i=[0].concat(i)),r=Y3(r),i=Y3(i);!i[0]&&!(i[1]&128);)i=i.slice(1);var n=[2];Ug(n,r.length),n=n.concat(r),n.push(2),Ug(n,i.length);var a=n.concat(i),u=[48];return Ug(u,a.length),u=u.concat(a),qg.encode(u,t)}});var rE=W((iee,tE)=>{"use strict";var Zo=ds(),Q3=G3(),rL=rn(),Fg=nd(),iL=xg(),eE=rL.assert,Hg=X3(),od=J3();function En(e){if(!(this instanceof En))return new En(e);typeof e=="string"&&(eE(Object.prototype.hasOwnProperty.call(Fg,e),"Unknown curve "+e),e=Fg[e]),e instanceof Fg.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}tE.exports=En;En.prototype.keyPair=function(t){return new Hg(this,t)};En.prototype.keyFromPrivate=function(t,r){return Hg.fromPrivate(this,t,r)};En.prototype.keyFromPublic=function(t,r){return Hg.fromPublic(this,t,r)};En.prototype.genKeyPair=function(t){t||(t={});for(var r=new Q3({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||iL(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),n=this.n.sub(new Zo(2));;){var a=new Zo(r.generate(i));if(!(a.cmp(n)>0))return a.iaddn(1),this.keyFromPrivate(a)}};En.prototype._truncateToN=function(t,r){var i=t.byteLength()*8-this.n.bitLength();return i>0&&(t=t.ushrn(i)),!r&&t.cmp(this.n)>=0?t.sub(this.n):t};En.prototype.sign=function(t,r,i,n){typeof i=="object"&&(n=i,i=null),n||(n={}),r=this.keyFromPrivate(r,i),t=this._truncateToN(new Zo(t,16));for(var a=this.n.byteLength(),u=r.getPrivate().toArray("be",a),h=t.toArray("be",a),b=new Q3({hash:this.hash,entropy:u,nonce:h,pers:n.pers,persEnc:n.persEnc||"utf8"}),w=this.n.sub(new Zo(1)),T=0;;T++){var I=n.k?n.k(T):new Zo(b.generate(this.n.byteLength()));if(I=this._truncateToN(I,!0),!(I.cmpn(1)<=0||I.cmp(w)>=0)){var B=this.g.mul(I);if(!B.isInfinity()){var M=B.getX(),P=M.umod(this.n);if(P.cmpn(0)!==0){var L=I.invm(this.n).mul(P.mul(r.getPrivate()).iadd(t));if(L=L.umod(this.n),L.cmpn(0)!==0){var X=(B.getY().isOdd()?1:0)|(M.cmp(P)!==0?2:0);return n.canonical&&L.cmp(this.nh)>0&&(L=this.n.sub(L),X^=1),new od({r:P,s:L,recoveryParam:X})}}}}}};En.prototype.verify=function(t,r,i,n){t=this._truncateToN(new Zo(t,16)),i=this.keyFromPublic(i,n),r=new od(r,"hex");var a=r.r,u=r.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||u.cmpn(1)<0||u.cmp(this.n)>=0)return!1;var h=u.invm(this.n),b=h.mul(t).umod(this.n),w=h.mul(a).umod(this.n),T;return this.curve._maxwellTrick?(T=this.g.jmulAdd(b,i.getPublic(),w),T.isInfinity()?!1:T.eqXToP(a)):(T=this.g.mulAdd(b,i.getPublic(),w),T.isInfinity()?!1:T.getX().umod(this.n).cmp(a)===0)};En.prototype.recoverPubKey=function(e,t,r,i){eE((3&r)===r,"The recovery param is more than two bits"),t=new od(t,i);var n=this.n,a=new Zo(e),u=t.r,h=t.s,b=r&1,w=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&w)throw new Error("Unable to find sencond key candinate");w?u=this.curve.pointFromX(u.add(this.curve.n),b):u=this.curve.pointFromX(u,b);var T=t.r.invm(n),I=n.sub(a).mul(T).umod(n),B=h.mul(T).umod(n);return this.g.mulAdd(I,u,B)};En.prototype.getKeyRecoveryParam=function(e,t,r,i){if(t=new od(t,i),t.recoveryParam!==null)return t.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(e,t,n)}catch{continue}if(a.eq(r))return n}throw new Error("Unable to find valid recovery factor")}});var aE=W((nee,sE)=>{"use strict";var vl=rn(),nE=vl.assert,iE=vl.parseBytes,hu=vl.cachedProperty;function ti(e,t){this.eddsa=e,this._secret=iE(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=iE(t.pub)}ti.fromPublic=function(t,r){return r instanceof ti?r:new ti(t,{pub:r})};ti.fromSecret=function(t,r){return r instanceof ti?r:new ti(t,{secret:r})};ti.prototype.secret=function(){return this._secret};hu(ti,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});hu(ti,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});hu(ti,"privBytes",function(){var t=this.eddsa,r=this.hash(),i=t.encodingLength-1,n=r.slice(0,t.encodingLength);return n[0]&=248,n[i]&=127,n[i]|=64,n});hu(ti,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});hu(ti,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});hu(ti,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});ti.prototype.sign=function(t){return nE(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)};ti.prototype.verify=function(t,r){return this.eddsa.verify(t,r,this)};ti.prototype.getSecret=function(t){return nE(this._secret,"KeyPair is public only"),vl.encode(this.secret(),t)};ti.prototype.getPublic=function(t){return vl.encode(this.pubBytes(),t)};sE.exports=ti});var cE=W((see,oE)=>{"use strict";var nL=ds(),cd=rn(),sL=cd.assert,ud=cd.cachedProperty,aL=cd.parseBytes;function Jo(e,t){this.eddsa=e,typeof t!="object"&&(t=aL(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),sL(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof nL&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}ud(Jo,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});ud(Jo,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});ud(Jo,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});ud(Jo,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});Jo.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};Jo.prototype.toHex=function(){return cd.encode(this.toBytes(),"hex").toUpperCase()};oE.exports=Jo});var hE=W((aee,pE)=>{"use strict";var oL=id(),cL=nd(),du=rn(),uL=du.assert,fE=du.parseBytes,lE=aE(),uE=cE();function Li(e){if(uL(e==="ed25519","only tested with ed25519 so far"),!(this instanceof Li))return new Li(e);e=cL[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=oL.sha512}pE.exports=Li;Li.prototype.sign=function(t,r){t=fE(t);var i=this.keyFromSecret(r),n=this.hashInt(i.messagePrefix(),t),a=this.g.mul(n),u=this.encodePoint(a),h=this.hashInt(u,i.pubBytes(),t).mul(i.priv()),b=n.add(h).umod(this.curve.n);return this.makeSignature({R:a,S:b,Rencoded:u})};Li.prototype.verify=function(t,r,i){t=fE(t),r=this.makeSignature(r);var n=this.keyFromPublic(i),a=this.hashInt(r.Rencoded(),n.pubBytes(),t),u=this.g.mul(r.S()),h=r.R().add(n.pub().mul(a));return h.eq(u)};Li.prototype.hashInt=function(){for(var t=this.hash(),r=0;r<arguments.length;r++)t.update(arguments[r]);return du.intFromLE(t.digest()).umod(this.curve.n)};Li.prototype.keyFromPublic=function(t){return lE.fromPublic(this,t)};Li.prototype.keyFromSecret=function(t){return lE.fromSecret(this,t)};Li.prototype.makeSignature=function(t){return t instanceof uE?t:new uE(this,t)};Li.prototype.encodePoint=function(t){var r=t.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=t.getX().isOdd()?128:0,r};Li.prototype.decodePoint=function(t){t=du.parseBytes(t);var r=t.length-1,i=t.slice(0,r).concat(t[r]&-129),n=(t[r]&128)!==0,a=du.intFromLE(i);return this.curve.pointFromY(a,n)};Li.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)};Li.prototype.decodeInt=function(t){return du.intFromLE(t)};Li.prototype.isPoint=function(t){return t instanceof this.pointClass}});var zg=W(dE=>{"use strict";var Qo=dE;Qo.version=zS().version;Qo.utils=rn();Qo.rand=xg();Qo.curve=Eg();Qo.curves=nd();Qo.ec=rE();Qo.eddsa=hE()});var tc=W((cee,vE)=>{"use strict";var jg=Jr(),fL=dr(),lL=zg().ec,ec=new lL("secp256k1"),pL=ec.curve.point.bind(ec.curve),mE=ec.curve.pointFromX.bind(ec.curve),Di=function(t,r,i){try{var n=pL(t,r,i)}catch{throw new Error("Invalid Point")}return n.validate(),n};Di.prototype=Object.getPrototypeOf(ec.curve.point());Di.fromX=function(t,r){try{var i=mE(r,t)}catch{throw new Error("Invalid X")}return i.validate(),i};Di.getG=function(){return ec.curve.g};Di.getN=function(){return new jg(ec.curve.n.toArray())};Di.prototype._getX=Di.prototype.getX;Di.prototype.getX=function(){return new jg(this._getX().toArray())};Di.prototype._getY=Di.prototype.getY;Di.prototype.getY=function(){return new jg(this._getY().toArray())};Di.prototype.validate=function(){if(this.isInfinity())throw new Error("Point cannot be equal to Infinity");var t;try{t=mE(this.getX(),this.getY().isOdd())}catch{throw new Error("Point does not lie on the curve")}if(t.y.cmp(this.y)!==0)throw new Error("Invalid y value for curve.");if(!this.mul(Di.getN()).isInfinity())throw new Error("Point times N must be infinity");return this};Di.pointToCompressed=function(t){var r=t.getX().toBuffer({size:32}),i=t.getY().toBuffer({size:32}),n,a=i[i.length-1]%2;return a?n=Buffer.from([3]):n=Buffer.from([2]),fL.concat([n,r])};vE.exports=Di});var Ui=W((uee,bE)=>{"use strict";var rc=Jr(),hL=xt(),Tn=It(),gE=dr(),dL=Dr(),Bt=function e(t,r){if(!(this instanceof e))return new e(t,r);if(t instanceof rc)this.set({r:t,s:r});else if(t){var i=t;this.set(i)}};Bt.prototype.set=function(e){return this.r=e.r||this.r||void 0,this.s=e.s||this.s||void 0,this.i=typeof e.i<"u"?e.i:this.i,this.compressed=typeof e.compressed<"u"?e.compressed:this.compressed,this.nhashtype=e.nhashtype||this.nhashtype||void 0,this};Bt.fromCompact=function(e){Tn.checkArgument(gE.isBuffer(e),"Argument is expected to be a Buffer");var t=new Bt,r=!0,i=e.slice(0,1)[0]-27-4;i<0&&(r=!1,i=i+4);var n=e.slice(1,33),a=e.slice(33,65);return Tn.checkArgument(i===0||i===1||i===2||i===3,new Error("i must be 0, 1, 2, or 3")),Tn.checkArgument(n.length===32,new Error("r must be 32 bytes")),Tn.checkArgument(a.length===32,new Error("s must be 32 bytes")),t.compressed=r,t.i=i,t.r=rc.fromBuffer(n),t.s=rc.fromBuffer(a),t};Bt.fromDER=Bt.fromBuffer=function(e,t){var r=Bt.parseDER(e,t),i=new Bt;return i.r=r.r,i.s=r.s,i};Bt.fromTxFormat=function(e){var t=e.readUInt8(e.length-1),r=e.slice(0,e.length-1),i=new Bt.fromDER(r,!1);return i.nhashtype=t,i};Bt.fromString=function(e){var t=Buffer.from(e,"hex");return Bt.fromDER(t)};Bt.parseDER=function(e,t){Tn.checkArgument(gE.isBuffer(e),new Error("DER formatted signature should be a buffer")),hL.isUndefined(t)&&(t=!0);var r=e[0];Tn.checkArgument(r===48,new Error("Header byte should be 0x30"));var i=e[1],n=e.slice(2).length;Tn.checkArgument(!t||i===n,new Error("Length byte should length of what follows")),i=i<n?i:n;var a=e[2];Tn.checkArgument(a===2,new Error("Integer byte for r should be 0x02"));var u=e[3],h=e.slice(4,4+u),b=rc.fromBuffer(h),w=e[4]===0;Tn.checkArgument(u===h.length,new Error("Length of r incorrect"));var T=e[4+u+0];Tn.checkArgument(T===2,new Error("Integer byte for s should be 0x02"));var I=e[4+u+1],B=e.slice(4+u+2,4+u+2+I),M=rc.fromBuffer(B),P=e[4+u+2+2]===0;Tn.checkArgument(I===B.length,new Error("Length of s incorrect"));var L=4+u+2+I;Tn.checkArgument(i===L-2,new Error("Length of signature incorrect"));var X={header:r,length:i,rheader:a,rlength:u,rneg:w,rbuf:h,r:b,sheader:T,slength:I,sneg:P,sbuf:B,s:M};return X};Bt.prototype.toCompact=function(e,t){if(e=typeof e=="number"?e:this.i,t=typeof t=="boolean"?t:this.compressed,!(e===0||e===1||e===2||e===3))throw new Error("i must be equal to 0, 1, 2, or 3");var r=e+27+4;t===!1&&(r=r-4);var i=Buffer.from([r]),n=this.r.toBuffer({size:32}),a=this.s.toBuffer({size:32});return Buffer.concat([i,n,a])};Bt.prototype.toBuffer=Bt.prototype.toDER=function(){var e=this.r.toBuffer(),t=this.s.toBuffer(),r=!!(e[0]&128),i=!!(t[0]&128),n=r?Buffer.concat([Buffer.from([0]),e]):e,a=i?Buffer.concat([Buffer.from([0]),t]):t,u=n.length,h=a.length,b=2+u+2+h,w=2,T=2,I=48,B=Buffer.concat([Buffer.from([I,b,w,u]),n,Buffer.from([T,h]),a]);return B};Bt.prototype.toString=function(){var e=this.toDER();return e.toString("hex")};Bt.isTxDER=function(e){if(e.length<9||e.length>73||e[0]!==48||e[1]!==e.length-3)return!1;var t=e[3];if(5+t>=e.length)return!1;var r=e[5+t];if(t+r+7!==e.length)return!1;var i=e.slice(4);if(e[2]!==2||t===0||i[0]&128||t>1&&i[0]===0&&!(i[1]&128))return!1;var n=e.slice(6+t);return!(e[6+t-2]!==2||r===0||n[0]&128||r>1&&n[0]===0&&!(n[1]&128))};Bt.prototype.hasLowS=function(){return!(this.s.lt(new rc(1))||this.s.gt(new rc("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))};Bt.prototype.hasDefinedHashtype=function(){if(!dL.isNaturalNumber(this.nhashtype))return!1;var e=this.nhashtype&~Bt.SIGHASH_ANYONECANPAY;return!(e<Bt.SIGHASH_ALL||e>Bt.SIGHASH_SINGLE)};Bt.prototype.toTxFormat=function(){var e=this.toDER(),t=Buffer.alloc(1);return t.writeUInt8(this.nhashtype,0),Buffer.concat([e,t])};Bt.SIGHASH_ALL=1;Bt.SIGHASH_NONE=2;Bt.SIGHASH_SINGLE=3;Bt.SIGHASH_ANYONECANPAY=128;bE.exports=Bt});var ri=W((fee,xE)=>{"use strict";var fd=require("crypto"),Qa=dr(),fa=It(),Ur=xE.exports;Ur.sha1=function(e){return fa.checkArgument(Qa.isBuffer(e)),fd.createHash("sha1").update(e).digest()};Ur.sha1.blocksize=512;Ur.sha256=function(e){return fa.checkArgument(Qa.isBuffer(e)),fd.createHash("sha256").update(e).digest()};Ur.sha256.blocksize=512;Ur.sha256sha256=function(e){return fa.checkArgument(Qa.isBuffer(e)),Ur.sha256(Ur.sha256(e))};Ur.ripemd160=function(e){return fa.checkArgument(Qa.isBuffer(e)),fd.createHash("ripemd160").update(e).digest()};Ur.sha256ripemd160=function(e){return fa.checkArgument(Qa.isBuffer(e)),Ur.ripemd160(Ur.sha256(e))};Ur.sha512=function(e){return fa.checkArgument(Qa.isBuffer(e)),fd.createHash("sha512").update(e).digest()};Ur.sha512.blocksize=1024;Ur.hmac=function(e,t,r){fa.checkArgument(Qa.isBuffer(t)),fa.checkArgument(Qa.isBuffer(r)),fa.checkArgument(e.blocksize);var i=e.blocksize/8;if(r.length>i)r=e(r);else if(r<i){var n=Buffer.alloc(i);n.fill(0),r.copy(n),r=n}var a=Buffer.alloc(i);a.fill(92);var u=Buffer.alloc(i);u.fill(54);for(var h=Buffer.alloc(i),b=Buffer.alloc(i),w=0;w<i;w++)h[w]=a[w]^r[w],b[w]=u[w]^r[w];return e(Buffer.concat([h,e(Buffer.concat([b,t]))]))};Ur.sha256hmac=function(e,t){return Ur.hmac(Ur.sha256,e,t)};Ur.sha512hmac=function(e,t){return Ur.hmac(Ur.sha512,e,t)}});var to=W((lee,yE)=>{"use strict";var gl=xt(),mL=dr(),ld=Dr(),eo=[],wi={};function _E(){}_E.prototype.toString=function(){return this.name};function bl(e,t){if(~eo.indexOf(e))return e;if(t){gl.isArray(t)||(t=[t]);var r=function(n){return eo[i][n]===e};for(var i in eo)if(gl.some(t,r))return eo[i];return}return wi[e]&&wi[e].length>=1?wi[e][0]:wi[e]}function pd(e){var t=new _E;return ld.defineImmutable(t,{name:e.name,alias:e.alias,pubkeyhash:e.pubkeyhash,privatekey:e.privatekey,scripthash:e.scripthash,bech32prefix:e.bech32prefix,xpubkey:e.xpubkey,xprivkey:e.xprivkey}),e.networkMagic&&ld.defineImmutable(t,{networkMagic:mL.integerAsBuffer(e.networkMagic)}),e.port&&ld.defineImmutable(t,{port:e.port}),e.dnsSeeds&&ld.defineImmutable(t,{dnsSeeds:e.dnsSeeds}),gl.each(t,function(r){!gl.isUndefined(r)&&!gl.isObject(r)&&(wi[r]||(wi[r]=[]),wi[r].push(t))}),eo.push(t),t}function vL(e){typeof e!="object"&&(e=bl(e));for(var t=0;t<eo.length;t++)eo[t]===e&&eo.splice(t,1);for(var r in wi)if(wi[r].length){let i=wi[r].indexOf(e);i>=0&&wi[r].splice(i,1),wi[r].length===0&&delete wi[r]}else wi[r]===e&&delete wi[r]}pd({name:"livenet",alias:"mainnet",pubkeyhash:0,privatekey:128,scripthash:5,bech32prefix:"bc",xpubkey:76067358,xprivkey:76066276,networkMagic:4190024921,port:8333,dnsSeeds:["seed.bitcoin.sipa.be","dnsseed.bluematt.me","dnsseed.bitcoin.dashjr.org","seed.bitcoinstats.com","seed.bitnodes.io","bitseed.xf2.org"]});var Vg=bl("livenet");pd({name:"testnet",alias:"test",pubkeyhash:111,privatekey:239,scripthash:196,bech32prefix:"tb",xpubkey:70617039,xprivkey:70615956,networkMagic:185665799,port:18333,dnsSeeds:["testnet-seed.bitcoin.petertodd.org","testnet-seed.bluematt.me","testnet-seed.alexykot.me","testnet-seed.bitcoin.schildbach.de"]});var Kg=bl("testnet");pd({name:"regtest",alias:"dev",pubkeyhash:111,privatekey:239,scripthash:196,bech32prefix:"bcrt",xpubkey:70617039,xprivkey:70615956,networkMagic:4206867930,port:18444,dnsSeeds:[]});var gL=bl("regtest");function bL(){Kg.regtestEnabled=!0}function xL(){Kg.regtestEnabled=!1}yE.exports={add:pd,remove:vL,defaultNetwork:Vg,livenet:Vg,mainnet:Vg,testnet:Kg,regtest:gL,get:bl,enableRegtest:bL,disableRegtest:xL}});var la=W((Wg,SE)=>{var hd=require("buffer"),ws=hd.Buffer;function wE(e,t){for(var r in e)t[r]=e[r]}ws.from&&ws.alloc&&ws.allocUnsafe&&ws.allocUnsafeSlow?SE.exports=hd:(wE(hd,Wg),Wg.Buffer=ic);function ic(e,t,r){return ws(e,t,r)}ic.prototype=Object.create(ws.prototype);wE(ws,ic);ic.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ws(e,t,r)};ic.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ws(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};ic.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ws(e)};ic.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return hd.SlowBuffer(e)}});var TE=W((pee,EE)=>{"use strict";var dd=la().Buffer;function _L(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var i=0;i<e.length;i++){var n=e.charAt(i),a=n.charCodeAt(0);if(t[a]!==255)throw new TypeError(n+" is ambiguous");t[a]=i}var u=e.length,h=e.charAt(0),b=Math.log(u)/Math.log(256),w=Math.log(256)/Math.log(u);function T(M){if((Array.isArray(M)||M instanceof Uint8Array)&&(M=dd.from(M)),!dd.isBuffer(M))throw new TypeError("Expected Buffer");if(M.length===0)return"";for(var P=0,L=0,X=0,V=M.length;X!==V&&M[X]===0;)X++,P++;for(var q=(V-X)*w+1>>>0,ee=new Uint8Array(q);X!==V;){for(var fe=M[X],_e=0,Te=q-1;(fe!==0||_e<L)&&Te!==-1;Te--,_e++)fe+=256*ee[Te]>>>0,ee[Te]=fe%u>>>0,fe=fe/u>>>0;if(fe!==0)throw new Error("Non-zero carry");L=_e,X++}for(var be=q-L;be!==q&&ee[be]===0;)be++;for(var O=h.repeat(P);be<q;++be)O+=e.charAt(ee[be]);return O}function I(M){if(typeof M!="string")throw new TypeError("Expected String");if(M.length===0)return dd.alloc(0);for(var P=0,L=0,X=0;M[P]===h;)L++,P++;for(var V=(M.length-P)*b+1>>>0,q=new Uint8Array(V);M[P];){var ee=t[M.charCodeAt(P)];if(ee===255)return;for(var fe=0,_e=V-1;(ee!==0||fe<X)&&_e!==-1;_e--,fe++)ee+=u*q[_e]>>>0,q[_e]=ee%256>>>0,ee=ee/256>>>0;if(ee!==0)throw new Error("Non-zero carry");X=fe,P++}for(var Te=V-X;Te!==V&&q[Te]===0;)Te++;var be=dd.allocUnsafe(L+(V-Te));be.fill(0,0,L);for(var O=L;Te!==V;)be[O++]=q[Te++];return be}function B(M){var P=I(M);if(P)return P;throw new Error("Non-base"+u+" character")}return{encode:T,decodeUnsafe:I,decode:B}}EE.exports=_L});var Gg=W((hee,IE)=>{var yL=TE(),wL="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";IE.exports=yL(wL)});var xl=W((dee,OE)=>{"use strict";var $g=xt(),RE=Gg(),AE=require("buffer"),SL="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".split(""),Xn=function e(t){if(!(this instanceof e))return new e(t);if(Buffer.isBuffer(t)){var r=t;this.fromBuffer(r)}else if(typeof t=="string"){var i=t;this.fromString(i)}else t&&this.set(t)};Xn.validCharacters=function(t){return AE.Buffer.isBuffer(t)&&(t=t.toString()),$g.every($g.map(t,function(r){return $g.includes(SL,r)}))};Xn.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this};Xn.encode=function(e){if(!AE.Buffer.isBuffer(e))throw new Error("Input should be a buffer");return RE.encode(e)};Xn.decode=function(e){if(typeof e!="string")throw new Error("Input should be a string");return Buffer.from(RE.decode(e))};Xn.prototype.fromBuffer=function(e){return this.buf=e,this};Xn.prototype.fromString=function(e){var t=Xn.decode(e);return this.buf=t,this};Xn.prototype.toBuffer=function(){return this.buf};Xn.prototype.toString=function(){return Xn.encode(this.buf)};OE.exports=Xn});var mu=W((vee,PE)=>{"use strict";var kE=xt(),md=xl(),mee=require("buffer"),NE=ri().sha256sha256,qi=function e(t){if(!(this instanceof e))return new e(t);if(Buffer.isBuffer(t)){var r=t;this.fromBuffer(r)}else if(typeof t=="string"){var i=t;this.fromString(i)}else t&&this.set(t)};qi.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this};qi.validChecksum=function(t,r){return kE.isString(t)&&(t=Buffer.from(md.decode(t))),kE.isString(r)&&(r=Buffer.from(md.decode(r))),r||(r=t.slice(-4),t=t.slice(0,-4)),qi.checksum(t).toString("hex")===r.toString("hex")};qi.decode=function(e){if(typeof e!="string")throw new Error("Input must be a string");var t=Buffer.from(md.decode(e));if(t.length<4)throw new Error("Input string too short");var r=t.slice(0,-4),i=t.slice(-4),n=NE(r),a=n.slice(0,4);if(i.toString("hex")!==a.toString("hex"))throw new Error("Checksum mismatch");return r};qi.checksum=function(e){return NE(e).slice(0,4)};qi.encode=function(e){if(!Buffer.isBuffer(e))throw new Error("Input must be a buffer");var t=Buffer.alloc(e.length+4),r=qi.checksum(e);return e.copy(t),r.copy(t,e.length),md.encode(t)};qi.prototype.fromBuffer=function(e){return this.buf=e,this};qi.prototype.fromString=function(e){var t=qi.decode(e);return this.buf=t,this};qi.prototype.toBuffer=function(){return this.buf};qi.prototype.toString=function(){return qi.encode(this.buf)};PE.exports=qi});var LE=W(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.bech32m=gu.bech32=void 0;var vd="qpzry9x8gf2tvdw0s3jn54khce6mua7l",ME={};for(let e=0;e<vd.length;e++){let t=vd.charAt(e);ME[t]=e}function vu(e){let t=e>>25;return(e&33554431)<<5^-(t>>0&1)&996825010^-(t>>1&1)&642813549^-(t>>2&1)&513874426^-(t>>3&1)&1027748829^-(t>>4&1)&705979059}function BE(e){let t=1;for(let r=0;r<e.length;++r){let i=e.charCodeAt(r);if(i<33||i>126)return"Invalid prefix ("+e+")";t=vu(t)^i>>5}t=vu(t);for(let r=0;r<e.length;++r){let i=e.charCodeAt(r);t=vu(t)^i&31}return t}function Xg(e,t,r,i){let n=0,a=0,u=(1<<r)-1,h=[];for(let b=0;b<e.length;++b)for(n=n<<t|e[b],a+=t;a>=r;)a-=r,h.push(n>>a&u);if(i)a>0&&h.push(n<<r-a&u);else{if(a>=t)return"Excess padding";if(n<<r-a&u)return"Non-zero padding"}return h}function EL(e){return Xg(e,8,5,!0)}function TL(e){let t=Xg(e,5,8,!1);if(Array.isArray(t))return t}function IL(e){let t=Xg(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}function CE(e){let t;e==="bech32"?t=1:t=734539939;function r(u,h,b){if(b=b||90,u.length+7+h.length>b)throw new TypeError("Exceeds length limit");u=u.toLowerCase();let w=BE(u);if(typeof w=="string")throw new Error(w);let T=u+"1";for(let I=0;I<h.length;++I){let B=h[I];if(B>>5)throw new Error("Non 5-bit word");w=vu(w)^B,T+=vd.charAt(B)}for(let I=0;I<6;++I)w=vu(w);w^=t;for(let I=0;I<6;++I){let B=w>>(5-I)*5&31;T+=vd.charAt(B)}return T}function i(u,h){if(h=h||90,u.length<8)return u+" too short";if(u.length>h)return"Exceeds length limit";let b=u.toLowerCase(),w=u.toUpperCase();if(u!==b&&u!==w)return"Mixed-case string "+u;u=b;let T=u.lastIndexOf("1");if(T===-1)return"No separator character for "+u;if(T===0)return"Missing prefix for "+u;let I=u.slice(0,T),B=u.slice(T+1);if(B.length<6)return"Data too short";let M=BE(I);if(typeof M=="string")return M;let P=[];for(let L=0;L<B.length;++L){let X=B.charAt(L),V=ME[X];if(V===void 0)return"Unknown character "+X;M=vu(M)^V,!(L+6>=B.length)&&P.push(V)}return M!==t?"Invalid checksum for "+u:{prefix:I,words:P}}function n(u,h){let b=i(u,h);if(typeof b=="object")return b}function a(u,h){let b=i(u,h);if(typeof b=="object")return b;throw new Error(b)}return{decodeUnsafe:n,decode:a,encode:r,toWords:EL,fromWordsUnsafe:TL,fromWords:IL}}gu.bech32=CE("bech32");gu.bech32m=CE("bech32m")});var UE=W((bee,DE)=>{"use strict";var bu=LE(),RL=function(e){if(typeof e!="string")throw new Error("Input should be a string");var t;let r=bu.bech32.fromWords,i=ro.BECH32;try{t=bu.bech32.decode(e)}catch(a){if(a.message.indexOf("Invalid checksum")>-1)t=bu.bech32m.decode(e),i=ro.BECH32M,r=bu.bech32m.fromWords;else throw a}let n=t.words[0];if(n>=1&&i!==ro.BECH32M)throw new Error("Version 1+ witness address must use Bech32m checksum");return{prefix:t.prefix,data:Buffer.from(r(t.words.slice(1))),version:n}},AL=function(e,t,r,i){if(typeof e!="string")throw new Error("Prefix should be a string");if(typeof t!="number")throw new Error("version should be a number");if(i&&typeof i=="string"&&(i=ro[i.toUpperCase()]||-1),i&&!(i==ro.BECH32||i==ro.BECH32M))throw new Error("Invalid encoding specified");let n=i==ro.BECH32M?bu.bech32m:bu.bech32,a=n.toWords(r);return a.unshift(t),n.encode(e,a)},ro={BECH32:1,BECH32M:2};DE.exports={decode:RL,encode:AL,encodings:ro}});var Ss=W((xee,FE)=>{"use strict";var _l=xt(),qE=It(),OL=dr(),xu=Jr(),Rr=function e(t){if(!(this instanceof e))return new e(t);if(!_l.isUndefined(t))if(Buffer.isBuffer(t))this.set({buf:t});else if(_l.isString(t))this.set({buf:Buffer.from(t,"hex")});else if(_l.isObject(t)){var r=t;this.set(r)}else throw new TypeError("Unrecognized argument for BufferReader")};Rr.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this.pos=e.pos||this.pos||0,this};Rr.prototype.eof=function(){return this.buf?this.pos>=this.buf.length:!0};Rr.prototype.finished=Rr.prototype.eof;Rr.prototype.read=function(e){qE.checkArgument(!_l.isUndefined(e),"Must specify a length");var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,t};Rr.prototype.readAll=function(){var e=this.buf.slice(this.pos,this.buf.length);return this.pos=this.buf.length,e};Rr.prototype.readUInt8=function(){var e=this.buf.readUInt8(this.pos);return this.pos=this.pos+1,e};Rr.prototype.readUInt16BE=function(){var e=this.buf.readUInt16BE(this.pos);return this.pos=this.pos+2,e};Rr.prototype.readUInt16LE=function(){var e=this.buf.readUInt16LE(this.pos);return this.pos=this.pos+2,e};Rr.prototype.readUInt32BE=function(){var e=this.buf.readUInt32BE(this.pos);return this.pos=this.pos+4,e};Rr.prototype.readUInt32LE=function(){var e=this.buf.readUInt32LE(this.pos);return this.pos=this.pos+4,e};Rr.prototype.readInt32LE=function(){var e=this.buf.readInt32LE(this.pos);return this.pos=this.pos+4,e};Rr.prototype.readUInt64BEBN=function(){var e=this.buf.slice(this.pos,this.pos+8),t=xu.fromBuffer(e);return this.pos=this.pos+8,t};Rr.prototype.readUInt64LEBN=function(){var e=this.buf.readUInt32LE(this.pos),t=this.buf.readUInt32LE(this.pos+4),r=t*4294967296+e,i;if(r<=9007199254740991)i=new xu(r);else{var n=Array.prototype.slice.call(this.buf,this.pos,this.pos+8);i=new xu(n,10,"le")}return this.pos=this.pos+8,i};Rr.prototype.readVarintNum=function(){var e=this.readUInt8();switch(e){case 253:return this.readUInt16LE();case 254:return this.readUInt32LE();case 255:var t=this.readUInt64LEBN(),r=t.toNumber();if(r<=Math.pow(2,53))return r;throw new Error("number too large to retain precision - use readVarintBN");default:return e}};Rr.prototype.readVarLengthBuffer=function(){var e=this.readVarintNum(),t=this.read(e);return qE.checkState(t.length===e,"Invalid length while reading varlength buffer. Expected to read: "+e+" and read "+t.length),t};Rr.prototype.readVarintBuf=function(){var e=this.buf.readUInt8(this.pos);switch(e){case 253:return this.read(3);case 254:return this.read(5);case 255:return this.read(9);default:return this.read(1)}};Rr.prototype.readVarintBN=function(){var e=this.readUInt8();switch(e){case 253:return new xu(this.readUInt16LE());case 254:return new xu(this.readUInt32LE());case 255:return this.readUInt64LEBN();default:return new xu(e)}};Rr.prototype.reverse=function(){for(var e=Buffer.alloc(this.buf.length),t=0;t<e.length;t++)e[t]=this.buf[this.buf.length-1-t];return this.buf=e,this};Rr.prototype.readReverse=function(e){_l.isUndefined(e)&&(e=this.buf.length);var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,OL.reverse(t)};FE.exports=Rr});var Si=W((_ee,zE)=>{"use strict";var Yg=dr(),HE=require("assert"),Ar=function e(t){if(!(this instanceof e))return new e(t);this.bufLen=0,t?this.set(t):this.bufs=[]};Ar.prototype.set=function(e){return this.bufs=e.bufs||this.bufs||[],this.bufLen=this.bufs.reduce(function(t,r){return t+r.length},0),this};Ar.prototype.toBuffer=function(){return this.concat()};Ar.prototype.concat=function(){return Buffer.concat(this.bufs,this.bufLen)};Ar.prototype.write=function(e){return HE(Yg.isBuffer(e)),this.bufs.push(e),this.bufLen+=e.length,this};Ar.prototype.writeReverse=function(e){return HE(Yg.isBuffer(e)),this.bufs.push(Yg.reverse(e)),this.bufLen+=e.length,this};Ar.prototype.writeUInt8=function(e){var t=Buffer.alloc(1);return t.writeUInt8(e,0),this.write(t),this};Ar.prototype.writeUInt16BE=function(e){var t=Buffer.alloc(2);return t.writeUInt16BE(e,0),this.write(t),this};Ar.prototype.writeUInt16LE=function(e){var t=Buffer.alloc(2);return t.writeUInt16LE(e,0),this.write(t),this};Ar.prototype.writeUInt32BE=function(e){var t=Buffer.alloc(4);return t.writeUInt32BE(e,0),this.write(t),this};Ar.prototype.writeInt32LE=function(e){var t=Buffer.alloc(4);return t.writeInt32LE(e,0),this.write(t),this};Ar.prototype.writeUInt32LE=function(e){var t=Buffer.alloc(4);return t.writeUInt32LE(e,0),this.write(t),this};Ar.prototype.writeUInt64BEBN=function(e){var t=e.toBuffer({size:8});return this.write(t),this};Ar.prototype.writeUInt64LEBN=function(e){var t=e.toBuffer({size:8});return this.writeReverse(t),this};Ar.prototype.writeVarintNum=function(e){var t=Ar.varintBufNum(e);return this.write(t),this};Ar.prototype.writeVarintBN=function(e){var t=Ar.varintBufBN(e);return this.write(t),this};Ar.varintBufNum=function(e){var t=void 0;return e<253?(t=Buffer.alloc(1),t.writeUInt8(e,0)):e<65536?(t=Buffer.alloc(3),t.writeUInt8(253,0),t.writeUInt16LE(e,1)):e<4294967296?(t=Buffer.alloc(5),t.writeUInt8(254,0),t.writeUInt32LE(e,1)):(t=Buffer.alloc(9),t.writeUInt8(255,0),t.writeInt32LE(e&-1,1),t.writeUInt32LE(Math.floor(e/4294967296),5)),t};Ar.varintBufBN=function(e){var t=void 0,r=e.toNumber();if(r<253)t=Buffer.alloc(1),t.writeUInt8(r,0);else if(r<65536)t=Buffer.alloc(3),t.writeUInt8(253,0),t.writeUInt16LE(r,1);else if(r<4294967296)t=Buffer.alloc(5),t.writeUInt8(254,0),t.writeUInt32LE(r,1);else{var i=new Ar;i.writeUInt8(255),i.writeUInt64LEBN(e);var t=i.concat()}return t};zE.exports=Ar});var gd=W((yee,jE)=>{"use strict";var _u=xt(),yl=It(),kL=dr(),NL=Dr();function wt(e){if(!(this instanceof wt))return new wt(e);var t;if(_u.isNumber(e))t=e;else if(_u.isString(e))t=wt.map[e];else throw new TypeError('Unrecognized num type: "'+typeof e+'" for Opcode');return NL.defineImmutable(this,{num:t}),this}wt.fromBuffer=function(e){return yl.checkArgument(kL.isBuffer(e)),new wt(+("0x"+e.toString("hex")))};wt.fromNumber=function(e){return yl.checkArgument(_u.isNumber(e)),new wt(e)};wt.fromString=function(e){yl.checkArgument(_u.isString(e));var t=wt.map[e];if(typeof t>"u")throw new TypeError("Invalid opcodestr");return new wt(t)};wt.prototype.toHex=function(){return this.num.toString(16)};wt.prototype.toBuffer=function(){return Buffer.from(this.toHex(),"hex")};wt.prototype.toNumber=function(){return this.num};wt.prototype.toString=function(){var e=wt.reverseMap[this.num];if(typeof e>"u")throw new Error("Opcode does not have a string representation");return e};wt.smallInt=function(e){return yl.checkArgument(_u.isNumber(e),"Invalid Argument: n should be number"),yl.checkArgument(e>=0&&e<=16,"Invalid Argument: n must be between 0 and 16"),e===0?wt("OP_0"):new wt(wt.map.OP_1+e-1)};wt.map={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_CHECKLOCKTIMEVERIFY:177,OP_CHECKSEQUENCEVERIFY:178,OP_NOP1:176,OP_NOP2:177,OP_NOP3:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255};wt.reverseMap=[];for(Zg in wt.map)wt.reverseMap[wt.map[Zg]]=Zg;var Zg;_u.extend(wt,wt.map);wt.isSmallIntOp=function(e){return e instanceof wt&&(e=e.toNumber()),e===wt.map.OP_0||e>=wt.map.OP_1&&e<=wt.map.OP_16};wt.prototype.inspect=function(){return"<Opcode: "+this.toString()+", hex: "+this.toHex()+", decimal: "+this.num+">"};jE.exports=wt});var eb=W((See,KE)=>{"use strict";var ai=Yn(),PL=Ss(),BL=Si(),bd=ri(),pe=gd(),io=Zn(),nc=Ui(),VE=to(),gr=It(),Jg=xt(),Qg=tn(),wee=require("buffer"),oi=dr(),ML=Dr(),Y=function e(t){if(!(this instanceof e))return new e(t);if(this.chunks=[],oi.isBuffer(t))return e.fromBuffer(t);if(t instanceof ai)return e.fromAddress(t);if(t instanceof e)return e.fromBuffer(t.toBuffer());if(typeof t=="string")return e.fromString(t);Jg.isObject(t)&&Array.isArray(t.chunks)&&this.set(t)};Y.VERIFY_TAPROOT=1<<17;Y.prototype.set=function(e){return gr.checkArgument(Jg.isObject(e)),gr.checkArgument(Array.isArray(e.chunks)),this.chunks=e.chunks,this};Y.fromBuffer=function(e){var t=new Y;t.chunks=[];for(var r=new PL(e);!r.finished();)try{var i=r.readUInt8(),n,a;i>0&&i<pe.OP_PUSHDATA1?(n=i,t.chunks.push({buf:r.read(n),len:n,opcodenum:i})):i===pe.OP_PUSHDATA1?(n=r.readUInt8(),a=r.read(n),t.chunks.push({buf:a,len:n,opcodenum:i})):i===pe.OP_PUSHDATA2?(n=r.readUInt16LE(),a=r.read(n),t.chunks.push({buf:a,len:n,opcodenum:i})):i===pe.OP_PUSHDATA4?(n=r.readUInt32LE(),a=r.read(n),t.chunks.push({buf:a,len:n,opcodenum:i})):t.chunks.push({opcodenum:i})}catch(u){throw u instanceof RangeError?new Qg.Script.InvalidBuffer(e.toString("hex")):u}return t};Y.prototype.toBuffer=function(){for(var e=new BL,t=0;t<this.chunks.length;t++){var r=this.chunks[t],i=r.opcodenum;e.writeUInt8(r.opcodenum),r.buf&&(i<pe.OP_PUSHDATA1?e.write(r.buf):i===pe.OP_PUSHDATA1?(e.writeUInt8(r.len),e.write(r.buf)):i===pe.OP_PUSHDATA2?(e.writeUInt16LE(r.len),e.write(r.buf)):i===pe.OP_PUSHDATA4&&(e.writeUInt32LE(r.len),e.write(r.buf)))}return e.concat()};Y.fromASM=function(e){var t=new Y;t.chunks=[];for(var r=e.split(" "),i=0;i<r.length;){var n=r[i],a=pe(n),u=a.toNumber();if(u==null){var h=Buffer.from(r[i],"hex");t.chunks.push({buf:h,len:h.length,opcodenum:h.length}),i=i+1}else u===pe.OP_PUSHDATA1||u===pe.OP_PUSHDATA2||u===pe.OP_PUSHDATA4?(t.chunks.push({buf:Buffer.from(r[i+2],"hex"),len:parseInt(r[i+1]),opcodenum:u}),i=i+3):(t.chunks.push({opcodenum:u}),i=i+1)}return t};Y.fromHex=function(e){return new Y(Buffer.from(e,"hex"))};Y.fromString=function(e){if(ML.isHexa(e)||e.length===0)return new Y(Buffer.from(e,"hex"));var t=new Y;t.chunks=[];for(var r=e.split(" "),i=0;i<r.length;){var n=r[i],a=pe(n),u=a.toNumber();if(u==null)if(u=parseInt(n),u>0&&u<pe.OP_PUSHDATA1)t.chunks.push({buf:Buffer.from(r[i+1].slice(2),"hex"),len:u,opcodenum:u}),i=i+2;else throw new Error("Invalid script: "+JSON.stringify(e));else if(u===pe.OP_PUSHDATA1||u===pe.OP_PUSHDATA2||u===pe.OP_PUSHDATA4){if(r[i+2].slice(0,2)!=="0x")throw new Error("Pushdata data must start with 0x");t.chunks.push({buf:Buffer.from(r[i+2].slice(2),"hex"),len:parseInt(r[i+1]),opcodenum:u}),i=i+3}else t.chunks.push({opcodenum:u}),i=i+1}return t};Y.prototype._chunkToString=function(e,t){var r=e.opcodenum,i=t==="asm",n="";if(e.buf)(!i&&r===pe.OP_PUSHDATA1||r===pe.OP_PUSHDATA2||r===pe.OP_PUSHDATA4)&&(n=n+" "+pe(r).toString()),e.len>0&&(i?n=n+" "+e.buf.toString("hex"):n=n+" "+e.len+" 0x"+e.buf.toString("hex"));else if(typeof pe.reverseMap[r]<"u")i?r===0?n=n+" 0":r===79?n=n+" -1":n=n+" "+pe(r).toString():n=n+" "+pe(r).toString();else{var a=r.toString(16);a.length%2!==0&&(a="0"+a),i?n=n+" "+a:n=n+" 0x"+a}return n};Y.prototype.toASM=function(){for(var e="",t=0;t<this.chunks.length;t++){var r=this.chunks[t];e+=this._chunkToString(r,"asm")}return e.substr(1)};Y.prototype.toString=function(){for(var e="",t=0;t<this.chunks.length;t++){var r=this.chunks[t];e+=this._chunkToString(r)}return e.substr(1)};Y.prototype.toHex=function(){return this.toBuffer().toString("hex")};Y.prototype.inspect=function(){return"<Script: "+this.toString()+">"};Y.prototype.isPublicKeyHashOut=function(){return!!(this.chunks.length===5&&this.chunks[0].opcodenum===pe.OP_DUP&&this.chunks[1].opcodenum===pe.OP_HASH160&&this.chunks[2].buf&&this.chunks[2].buf.length===20&&this.chunks[3].opcodenum===pe.OP_EQUALVERIFY&&this.chunks[4].opcodenum===pe.OP_CHECKSIG)};Y.prototype.isPublicKeyHashIn=function(){if(this.chunks.length===2){var e=this.chunks[0].buf,t=this.chunks[1].buf;if(e&&e.length&&e[0]===48&&t&&t.length){var r=t[0];if((r===4||r===6||r===7)&&t.length===65)return!0;if((r===3||r===2)&&t.length===33)return!0}}return!1};Y.prototype.getPublicKey=function(){return gr.checkState(this.isPublicKeyOut(),"Can't retrieve PublicKey from a non-PK output"),this.chunks[0].buf};Y.prototype.getPublicKeyHash=function(){if(this.isPublicKeyHashOut())return this.chunks[2].buf;if(this.isWitnessPublicKeyHashOut())return this.chunks[1].buf;throw new Error("Can't retrieve PublicKeyHash from a non-PKH output")};Y.prototype.isPublicKeyOut=function(){if(this.chunks.length===2&&this.chunks[0].buf&&this.chunks[0].buf.length&&this.chunks[1].opcodenum===pe.OP_CHECKSIG){var e=this.chunks[0].buf,t=e[0],r=!1;if(((t===4||t===6||t===7)&&e.length===65||(t===3||t===2)&&e.length===33)&&(r=!0),r)return io.isValid(e)}return!1};Y.prototype.isPublicKeyIn=function(){if(this.chunks.length===1){var e=this.chunks[0].buf;if(e&&e.length&&e[0]===48)return!0}return!1};Y.prototype.isScriptHashOut=function(){var e=this.toBuffer();return e.length===23&&e[0]===pe.OP_HASH160&&e[1]===20&&e[e.length-1]===pe.OP_EQUAL};Y.prototype.isWitnessScriptHashOut=function(){var e=this.toBuffer();return e.length===34&&e[0]===pe.OP_0&&e[1]===32};Y.prototype.isWitnessPublicKeyHashOut=function(){var e=this.toBuffer();return e.length===22&&e[0]===pe.OP_0&&e[1]===20};Y.prototype.isTaproot=function(){var e=this.toBuffer();return e.length===34&&e[0]===pe.OP_1&&e[1]===32};Y.prototype.isWitnessProgram=function(e){e||(e={});var t=this.toBuffer();return t.length<4||t.length>42||t[0]!==pe.OP_0&&!(t[0]>=pe.OP_1&&t[0]<=pe.OP_16)?!1:t.length===t[1]+2?(e.version=t[0],e.program=t.slice(2,t.length),!0):!1};Y.prototype.isScriptHashIn=function(){if(this.chunks.length<=1)return!1;var e=this.chunks[this.chunks.length-1],t=e.buf;if(!t)return!1;var r;try{r=Y.fromBuffer(t)}catch(n){if(n instanceof Qg.Script.InvalidBuffer)return!1;throw n}var i=r.classify();return i!==Y.types.UNKNOWN};Y.prototype.isMultisigOut=function(){return this.chunks.length>3&&pe.isSmallIntOp(this.chunks[0].opcodenum)&&this.chunks.slice(1,this.chunks.length-2).every(function(e){return e.buf&&oi.isBuffer(e.buf)})&&pe.isSmallIntOp(this.chunks[this.chunks.length-2].opcodenum)&&this.chunks[this.chunks.length-1].opcodenum===pe.OP_CHECKMULTISIG};Y.prototype.isMultisigIn=function(){return this.chunks.length>=2&&this.chunks[0].opcodenum===0&&this.chunks.slice(1,this.chunks.length).every(function(e){return e.buf&&oi.isBuffer(e.buf)&&nc.isTxDER(e.buf)})};Y.prototype.isDataOut=function(){return this.chunks.length>=1&&this.chunks[0].opcodenum===pe.OP_RETURN&&(this.chunks.length===1||this.chunks.length===2&&this.chunks[1].buf&&this.chunks[1].buf.length<=Y.OP_RETURN_STANDARD_SIZE&&this.chunks[1].length===this.chunks.len)};Y.prototype.getData=function(){if(this.isDataOut()||this.isScriptHashOut()||this.isWitnessScriptHashOut()||this.isWitnessPublicKeyHashOut()||this.isTaproot())return this.chunks[1]==null?Buffer.alloc(0):Buffer.from(this.chunks[1].buf);if(this.isPublicKeyHashOut())return Buffer.from(this.chunks[2].buf);throw new Error("Unrecognized script type to get data from")};Y.prototype.isPushOnly=function(){return this.chunks.every(function(e){return e.opcodenum<=pe.OP_16})};Y.types={};Y.types.UNKNOWN="Unknown";Y.types.PUBKEY_OUT="Pay to public key";Y.types.PUBKEY_IN="Spend from public key";Y.types.PUBKEYHASH_OUT="Pay to public key hash";Y.types.PUBKEYHASH_IN="Spend from public key hash";Y.types.SCRIPTHASH_OUT="Pay to script hash";Y.types.SCRIPTHASH_IN="Spend from script hash";Y.types.MULTISIG_OUT="Pay to multisig";Y.types.MULTISIG_IN="Spend from multisig";Y.types.DATA_OUT="Data push";Y.OP_RETURN_STANDARD_SIZE=80;Y.prototype.classify=function(){if(this._isInput)return this.classifyInput();if(this._isOutput)return this.classifyOutput();var e=this.classifyOutput();return e!=Y.types.UNKNOWN?e:this.classifyInput()};Y.outputIdentifiers={};Y.outputIdentifiers.PUBKEY_OUT=Y.prototype.isPublicKeyOut;Y.outputIdentifiers.PUBKEYHASH_OUT=Y.prototype.isPublicKeyHashOut;Y.outputIdentifiers.MULTISIG_OUT=Y.prototype.isMultisigOut;Y.outputIdentifiers.SCRIPTHASH_OUT=Y.prototype.isScriptHashOut;Y.outputIdentifiers.DATA_OUT=Y.prototype.isDataOut;Y.prototype.classifyOutput=function(){for(var e in Y.outputIdentifiers)if(Y.outputIdentifiers[e].bind(this)())return Y.types[e];return Y.types.UNKNOWN};Y.inputIdentifiers={};Y.inputIdentifiers.PUBKEY_IN=Y.prototype.isPublicKeyIn;Y.inputIdentifiers.PUBKEYHASH_IN=Y.prototype.isPublicKeyHashIn;Y.inputIdentifiers.MULTISIG_IN=Y.prototype.isMultisigIn;Y.inputIdentifiers.SCRIPTHASH_IN=Y.prototype.isScriptHashIn;Y.prototype.classifyInput=function(){for(var e in Y.inputIdentifiers)if(Y.inputIdentifiers[e].bind(this)())return Y.types[e];return Y.types.UNKNOWN};Y.prototype.isStandard=function(){return this.classify()!==Y.types.UNKNOWN};Y.prototype.prepend=function(e){return this._addByType(e,!0),this};Y.prototype.equals=function(e){if(gr.checkState(e instanceof Y,"Must provide another script"),this.chunks.length!==e.chunks.length)return!1;var t;for(t=0;t<this.chunks.length;t++){if(oi.isBuffer(this.chunks[t].buf)&&!oi.isBuffer(e.chunks[t].buf)||oi.isBuffer(this.chunks[t].buf)&&!oi.equals(this.chunks[t].buf,e.chunks[t].buf))return!1;if(this.chunks[t].opcodenum!==e.chunks[t].opcodenum)return!1}return!0};Y.prototype.add=function(e){return this._addByType(e,!1),this};Y.prototype._addByType=function(e,t){if(typeof e=="string")this._addOpcode(e,t);else if(typeof e=="number")this._addOpcode(e,t);else if(e instanceof pe)this._addOpcode(e,t);else if(oi.isBuffer(e))this._addBuffer(e,t);else if(e instanceof Y)this.chunks=this.chunks.concat(e.chunks);else if(typeof e=="object")this._insertAtPosition(e,t);else throw new Error("Invalid script chunk")};Y.prototype._insertAtPosition=function(e,t){t?this.chunks.unshift(e):this.chunks.push(e)};Y.prototype._addOpcode=function(e,t){var r;return typeof e=="number"?r=e:e instanceof pe?r=e.toNumber():r=pe(e).toNumber(),this._insertAtPosition({opcodenum:r},t),this};Y.prototype._addBuffer=function(e,t){var r,i=e.length;if(i>=0&&i<pe.OP_PUSHDATA1)r=i;else if(i<Math.pow(2,8))r=pe.OP_PUSHDATA1;else if(i<Math.pow(2,16))r=pe.OP_PUSHDATA2;else if(i<Math.pow(2,32))r=pe.OP_PUSHDATA4;else throw new Error("You can't push that much data");return this._insertAtPosition({buf:e,len:i,opcodenum:r},t),this};Y.prototype.hasCodeseparators=function(){for(var e=0;e<this.chunks.length;e++)if(this.chunks[e].opcodenum===pe.OP_CODESEPARATOR)return!0;return!1};Y.prototype.removeCodeseparators=function(){for(var e=[],t=0;t<this.chunks.length;t++)this.chunks[t].opcodenum!==pe.OP_CODESEPARATOR&&e.push(this.chunks[t]);return this.chunks=e,this};Y.buildMultisigOut=function(e,t,r){gr.checkArgument(t<=e.length,"Number of required signatures must be less than or equal to the number of public keys"),r=r||{};var i=new Y;i.add(pe.smallInt(t)),e=e.map(io);var n=e;r.noSorting||(n=Jg.sortBy(e,function(h){return h.toString("hex")}));for(var a=0;a<n.length;a++){var u=n[a];i.add(u.toBuffer())}return i.add(pe.smallInt(e.length)),i.add(pe.OP_CHECKMULTISIG),i};Y.buildWitnessMultisigOutFromScript=function(e){if(e instanceof Y){var t=new Y;return t.add(pe.OP_0),t.add(bd.sha256(e.toBuffer())),t}else throw new TypeError("First argument is expected to be a p2sh script")};Y.buildMultisigIn=function(e,t,r,i){gr.checkArgument(Array.isArray(e)),gr.checkArgument(!isNaN(t)),gr.checkArgument(Array.isArray(r)),i=i||{};var n=new Y;n.add(pe.OP_0);for(let a of r)gr.checkArgument(oi.isBuffer(a),"Signatures must be an array of Buffers"),n.add(a);return n};Y.buildP2SHMultisigIn=function(e,t,r,i){gr.checkArgument(Array.isArray(e)),gr.checkArgument(!isNaN(t)),gr.checkArgument(Array.isArray(r)),i=i||{};var n=new Y;n.add(pe.OP_0);for(let a of r)gr.checkArgument(oi.isBuffer(a),"Signatures must be an array of Buffers"),n.add(a);return n.add((i.cachedMultisig||Y.buildMultisigOut(e,t,i)).toBuffer()),n};Y.buildPublicKeyHashOut=function(e){gr.checkArgument(e!=null),gr.checkArgument(e instanceof io||e instanceof ai||typeof e=="string"),e instanceof io?e=e.toAddress():typeof e=="string"&&(e=new ai(e));var t=new Y;return t.add(pe.OP_DUP).add(pe.OP_HASH160).add(e.hashBuffer).add(pe.OP_EQUALVERIFY).add(pe.OP_CHECKSIG),t._network=e.network,t};Y.buildWitnessV0Out=function(e){gr.checkArgument(e!=null),gr.checkArgument(e instanceof io||e instanceof ai||typeof e=="string"),e instanceof io?e=e.toAddress(null,ai.PayToWitnessPublicKeyHash):typeof e=="string"&&(e=new ai(e));var t=new Y;return t.add(pe.OP_0).add(e.hashBuffer),t._network=e.network,t};Y.buildPublicKeyOut=function(e){gr.checkArgument(e instanceof io);var t=new Y;return t.add(e.toBuffer()).add(pe.OP_CHECKSIG),t};Y.buildDataOut=function(e,t){gr.checkArgument(e==null||typeof e=="string"||oi.isBuffer(e)),typeof e=="string"&&(e=Buffer.from(e,t));var r=new Y;return r.add(pe.OP_RETURN),e!=null&&r.add(e),r};Y.buildScriptHashOut=function(e){gr.checkArgument(e instanceof Y||e instanceof ai&&e.isPayToScriptHash());var t=new Y;return t.add(pe.OP_HASH160).add(e instanceof ai?e.hashBuffer:bd.sha256ripemd160(e.toBuffer())).add(pe.OP_EQUAL),t._network=e._network||e.network,t};Y.buildPublicKeyIn=function(e,t){gr.checkArgument(e instanceof nc||oi.isBuffer(e)),gr.checkArgument(t==null||!isNaN(t)),e instanceof nc&&(e=e.toBuffer());var r=new Y;return r.add(oi.concat([e,oi.integerAsSingleByteBuffer(t||nc.SIGHASH_ALL)])),r};Y.buildPublicKeyHashIn=function(e,t,r){gr.checkArgument(t instanceof nc||oi.isBuffer(t)),gr.checkArgument(r==null||!isNaN(r)),t instanceof nc&&(t=t.toBuffer());var i=new Y().add(oi.concat([t,oi.integerAsSingleByteBuffer(r||nc.SIGHASH_ALL)])).add(new io(e).toBuffer());return i};Y.empty=function(){return new Y};Y.prototype.toScriptHashOut=function(){return Y.buildScriptHashOut(this)};Y.fromAddress=function(e){if(e=ai(e),e.isPayToScriptHash())return Y.buildScriptHashOut(e);if(e.isPayToPublicKeyHash())return Y.buildPublicKeyHashOut(e);if(e.isPayToWitnessPublicKeyHash())return Y.buildWitnessV0Out(e);if(e.isPayToWitnessScriptHash())return Y.buildWitnessV0Out(e);throw new Qg.Script.UnrecognizedAddress(e)};Y.prototype.getAddressInfo=function(e){if(this._isInput)return this._getInputAddressInfo();if(this._isOutput)return this._getOutputAddressInfo();var t=this._getOutputAddressInfo();return t||this._getInputAddressInfo()};Y.prototype._getOutputAddressInfo=function(){var e={};if(this.isScriptHashOut())e.hashBuffer=this.getData(),e.type=ai.PayToScriptHash;else if(this.isPublicKeyHashOut())e.hashBuffer=this.getData(),e.type=ai.PayToPublicKeyHash;else if(this.isWitnessScriptHashOut())e.hashBuffer=this.getData(),e.type=ai.PayToWitnessScriptHash;else if(this.isWitnessPublicKeyHashOut())e.hashBuffer=this.getData(),e.type=ai.PayToWitnessPublicKeyHash;else if(this.isTaproot())e.hashBuffer=this.getData(),e.type=ai.PayToTaproot;else return!1;return e};Y.prototype._getInputAddressInfo=function(){var e={};if(this.isPublicKeyHashIn())e.hashBuffer=bd.sha256ripemd160(this.chunks[1].buf),e.type=ai.PayToPublicKeyHash;else if(this.isScriptHashIn())e.hashBuffer=bd.sha256ripemd160(this.chunks[this.chunks.length-1].buf),e.type=ai.PayToScriptHash;else return!1;return e};Y.prototype.toAddress=function(e){var t=this.getAddressInfo();return t?(t.network=VE.get(e)||this._network||VE.defaultNetwork,new ai(t)):!1};Y.prototype.findAndDelete=function(e){for(var t=e.toBuffer(),r=t.toString("hex"),i=0;i<this.chunks.length;i++){var n=Y({chunks:[this.chunks[i]]}),a=n.toBuffer(),u=a.toString("hex");r===u&&this.chunks.splice(i,1)}return this};Y.prototype.checkMinimalPush=function(e){var t=this.chunks[e],r=t.buf,i=t.opcodenum;return r?r.length===0?i===pe.OP_0:r.length===1&&r[0]>=1&&r[0]<=16?i===pe.OP_1+(r[0]-1):r.length===1&&r[0]===129?i===pe.OP_1NEGATE:r.length<=75?i===r.length:r.length<=255?i===pe.OP_PUSHDATA1:r.length<=65535?i===pe.OP_PUSHDATA2:!0:!0};Y.prototype._decodeOP_N=function(e){if(e===pe.OP_0)return 0;if(e>=pe.OP_1&&e<=pe.OP_16)return e-(pe.OP_1-1);throw new Error("Invalid opcode: "+JSON.stringify(e))};Y.prototype.getSignatureOperationsCount=function(e){e=e??!0;var t=0,r=pe.OP_INVALIDOPCODE;for(let n of this.chunks){var i=n.opcodenum;i==pe.OP_CHECKSIG||i==pe.OP_CHECKSIGVERIFY?t++:(i==pe.OP_CHECKMULTISIG||i==pe.OP_CHECKMULTISIGVERIFY)&&(e&&r>=pe.OP_1&&r<=pe.OP_16?t+=this._decodeOP_N(r):t+=20),r=i}return t};KE.exports=Y});var GE=W((Eee,WE)=>{WE.exports=function(e,t){if(typeof e.compare=="function")return e.compare(t);if(e===t)return 0;for(var r=e.length,i=t.length,n=0,a=Math.min(r,i);n<a&&e[n]===t[n];)++n;return n!==a&&(r=e[n],i=t[n]),r<i?-1:i<r?1:0}});var Es=W((Iee,ZE)=>{"use strict";var xd=xt(),tb=Jr(),Tee=require("buffer"),XE=dr(),rb=Dr(),YE=Si(),ib=Fi(),$E=It(),CL=tn(),LL=9007199254740991;function ci(e){if(!(this instanceof ci))return new ci(e);if(xd.isObject(e))if(this.satoshis=e.satoshis,XE.isBuffer(e.script))this._scriptBuffer=e.script;else{var t;xd.isString(e.script)&&rb.isHexa(e.script)?t=Buffer.from(e.script,"hex"):t=e.script,this.setScript(t)}else throw new TypeError("Unrecognized argument for Output")}Object.defineProperty(ci.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this._script?this._script:(this.setScriptFromBuffer(this._scriptBuffer),this._script)}});Object.defineProperty(ci.prototype,"satoshis",{configurable:!1,enumerable:!0,get:function(){return this._satoshis},set:function(e){e instanceof tb?(this._satoshisBN=e,this._satoshis=e.toNumber()):xd.isString(e)?(this._satoshis=parseInt(e),this._satoshisBN=tb.fromNumber(this._satoshis)):($E.checkArgument(rb.isNaturalNumber(e),"Output satoshis is not a natural number"),this._satoshisBN=tb.fromNumber(e),this._satoshis=e),$E.checkState(rb.isNaturalNumber(this._satoshis),"Output satoshis is not a natural number")}});ci.prototype.invalidSatoshis=function(){return this._satoshis>LL?"transaction txout satoshis greater than max safe integer":this._satoshis!==this._satoshisBN.toNumber()?"transaction txout satoshis has corrupted value":this._satoshis<0?"transaction txout negative":!1};ci.prototype.toObject=ci.prototype.toJSON=function(){var t={satoshis:this.satoshis};return t.script=this._scriptBuffer.toString("hex"),t};ci.fromObject=function(e){return new ci(e)};ci.prototype.setScriptFromBuffer=function(e){this._scriptBuffer=e;try{this._script=ib.fromBuffer(this._scriptBuffer),this._script._isOutput=!0}catch(t){if(t instanceof CL.Script.InvalidBuffer)this._script=null;else throw t}};ci.prototype.setScript=function(e){if(e instanceof ib)this._scriptBuffer=e.toBuffer(),this._script=e,this._script._isOutput=!0;else if(xd.isString(e))this._script=ib.fromString(e),this._scriptBuffer=this._script.toBuffer(),this._script._isOutput=!0;else if(XE.isBuffer(e))this.setScriptFromBuffer(e);else throw new TypeError("Invalid argument type: script");return this};ci.prototype.inspect=function(){var e;return this.script?e=this.script.inspect():e=this._scriptBuffer.toString("hex"),"<Output ("+this.satoshis+" sats) "+e+">"};ci.fromBufferReader=function(e){var t={};t.satoshis=e.readUInt64LEBN();var r=e.readVarintNum();return r!==0?t.script=e.read(r):t.script=Buffer.from([]),new ci(t)};ci.prototype.toBufferWriter=function(e){e||(e=new YE),e.writeUInt64LEBN(this._satoshisBN);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e};ci.prototype.calculateSize=function(){let e=8;return e+=YE.varintBufNum(this._scriptBuffer.length).length,e+=this._scriptBuffer.length,e};ZE.exports=ci});var JE=W((Ree,DL)=>{DL.exports={name:"bigi",version:"1.4.2",description:"Big integers.",keywords:["cryptography","math","bitcoin","arbitrary","precision","arithmetic","big","integer","int","number","biginteger","bigint","bignumber","decimal","float"],devDependencies:{coveralls:"^2.11.2",istanbul:"^0.3.5",jshint:"^2.5.1",mocha:"^2.1.0",mochify:"^2.1.0"},repository:{url:"https://github.com/cryptocoinjs/bigi",type:"git"},main:"./lib/index.js",scripts:{"browser-test":"./node_modules/.bin/mochify --wd -R spec",test:"./node_modules/.bin/_mocha -- test/*.js",jshint:"./node_modules/.bin/jshint --config jshint.json lib/*.js ; true",unit:"./node_modules/.bin/mocha",coverage:"./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js",coveralls:"npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info"},dependencies:{},testling:{files:"test/*.js",harness:"mocha",browsers:["ie/9..latest","firefox/latest","chrome/latest","safari/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]}}});var ab=W((Aee,n6)=>{function ge(e,t,r){if(!(this instanceof ge))return new ge(e,t,r);e!=null&&(typeof e=="number"?this.fromNumber(e,t,r):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}var ve=ge.prototype;ve.__bigi=JE().version;ge.isBigInteger=function(e,t){return e&&e.__bigi&&(!t||e.__bigi===ve.__bigi)};var yu;function UL(e,t,r,i,n,a){for(;--a>=0;){var u=t*this[e++]+r[i]+n;n=Math.floor(u/67108864),r[i++]=u&67108863}return n}ge.prototype.am=UL;yu=26;ge.prototype.DB=yu;ge.prototype.DM=(1<<yu)-1;var qL=ge.prototype.DV=1<<yu,nb=52;ge.prototype.FV=Math.pow(2,nb);ge.prototype.F1=nb-yu;ge.prototype.F2=2*yu-nb;var FL="0123456789abcdefghijklmnopqrstuvwxyz",_d=new Array,wu,In;wu=48;for(In=0;In<=9;++In)_d[wu++]=In;wu=97;for(In=10;In<36;++In)_d[wu++]=In;wu=65;for(In=10;In<36;++In)_d[wu++]=In;function QE(e){return FL.charAt(e)}function e6(e,t){var r=_d[e.charCodeAt(t)];return r??-1}function HL(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function zL(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+qL:this.t=0}function pa(e){var t=new ge;return t.fromInt(e),t}function jL(e,t){var r=this,i;if(t==16)i=4;else if(t==8)i=3;else if(t==256)i=8;else if(t==2)i=1;else if(t==32)i=5;else if(t==4)i=2;else{r.fromRadix(e,t);return}r.t=0,r.s=0;for(var n=e.length,a=!1,u=0;--n>=0;){var h=i==8?e[n]&255:e6(e,n);if(h<0){e.charAt(n)=="-"&&(a=!0);continue}a=!1,u==0?r[r.t++]=h:u+i>r.DB?(r[r.t-1]|=(h&(1<<r.DB-u)-1)<<u,r[r.t++]=h>>r.DB-u):r[r.t-1]|=h<<u,u+=i,u>=r.DB&&(u-=r.DB)}i==8&&e[0]&128&&(r.s=-1,u>0&&(r[r.t-1]|=(1<<r.DB-u)-1<<u)),r.clamp(),a&&ge.ZERO.subTo(r,r)}function VL(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t}function KL(e){var t=this;if(t.s<0)return"-"+t.negate().toString(e);var r;if(e==16)r=4;else if(e==8)r=3;else if(e==2)r=1;else if(e==32)r=5;else if(e==4)r=2;else return t.toRadix(e);var i=(1<<r)-1,n,a=!1,u="",h=t.t,b=t.DB-h*t.DB%r;if(h-- >0)for(b<t.DB&&(n=t[h]>>b)>0&&(a=!0,u=QE(n));h>=0;)b<r?(n=(t[h]&(1<<b)-1)<<r-b,n|=t[--h]>>(b+=t.DB-r)):(n=t[h]>>(b-=r)&i,b<=0&&(b+=t.DB,--h)),n>0&&(a=!0),a&&(u+=QE(n));return a?u:"0"}function WL(){var e=new ge;return ge.ZERO.subTo(this,e),e}function GL(){return this.s<0?this.negate():this}function $L(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;if(t=r-e.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this[r]-e[r])!=0)return t;return 0}function yd(e){var t=1,r;return(r=e>>>16)!=0&&(e=r,t+=16),(r=e>>8)!=0&&(e=r,t+=8),(r=e>>4)!=0&&(e=r,t+=4),(r=e>>2)!=0&&(e=r,t+=2),(r=e>>1)!=0&&(e=r,t+=1),t}function XL(){return this.t<=0?0:this.DB*(this.t-1)+yd(this[this.t-1]^this.s&this.DM)}function YL(){return this.bitLength()>>3}function ZL(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s}function JL(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s}function QL(e,t){var r=this,i=e%r.DB,n=r.DB-i,a=(1<<n)-1,u=Math.floor(e/r.DB),h=r.s<<i&r.DM,b;for(b=r.t-1;b>=0;--b)t[b+u+1]=r[b]>>n|h,h=(r[b]&a)<<i;for(b=u-1;b>=0;--b)t[b]=0;t[u]=h,t.t=r.t+u+1,t.s=r.s,t.clamp()}function eD(e,t){var r=this;t.s=r.s;var i=Math.floor(e/r.DB);if(i>=r.t){t.t=0;return}var n=e%r.DB,a=r.DB-n,u=(1<<n)-1;t[0]=r[i]>>n;for(var h=i+1;h<r.t;++h)t[h-i-1]|=(r[h]&u)<<a,t[h-i]=r[h]>>n;n>0&&(t[r.t-i-1]|=(r.s&u)<<a),t.t=r.t-i,t.clamp()}function tD(e,t){for(var r=this,i=0,n=0,a=Math.min(e.t,r.t);i<a;)n+=r[i]-e[i],t[i++]=n&r.DM,n>>=r.DB;if(e.t<r.t){for(n-=e.s;i<r.t;)n+=r[i],t[i++]=n&r.DM,n>>=r.DB;n+=r.s}else{for(n+=r.s;i<e.t;)n-=e[i],t[i++]=n&r.DM,n>>=r.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[i++]=r.DV+n:n>0&&(t[i++]=n),t.t=i,t.clamp()}function rD(e,t){var r=this.abs(),i=e.abs(),n=r.t;for(t.t=n+i.t;--n>=0;)t[n]=0;for(n=0;n<i.t;++n)t[n+r.t]=r.am(0,i[n],t,n,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&ge.ZERO.subTo(t,t)}function iD(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var i=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,i,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()}function nD(e,t,r){var i=this,n=e.abs();if(!(n.t<=0)){var a=i.abs();if(a.t<n.t){t?.fromInt(0),r!=null&&i.copyTo(r);return}r==null&&(r=new ge);var u=new ge,h=i.s,b=e.s,w=i.DB-yd(n[n.t-1]);w>0?(n.lShiftTo(w,u),a.lShiftTo(w,r)):(n.copyTo(u),a.copyTo(r));var T=u.t,I=u[T-1];if(I!=0){var B=I*(1<<i.F1)+(T>1?u[T-2]>>i.F2:0),M=i.FV/B,P=(1<<i.F1)/B,L=1<<i.F2,X=r.t,V=X-T,q=t??new ge;for(u.dlShiftTo(V,q),r.compareTo(q)>=0&&(r[r.t++]=1,r.subTo(q,r)),ge.ONE.dlShiftTo(T,q),q.subTo(u,u);u.t<T;)u[u.t++]=0;for(;--V>=0;){var ee=r[--X]==I?i.DM:Math.floor(r[X]*M+(r[X-1]+L)*P);if((r[X]+=u.am(0,ee,r,V,0,T))<ee)for(u.dlShiftTo(V,q),r.subTo(q,r);r[X]<--ee;)r.subTo(q,r)}t!=null&&(r.drShiftTo(T,t),h!=b&&ge.ZERO.subTo(t,t)),r.t=T,r.clamp(),w>0&&r.rShiftTo(w,r),h<0&&ge.ZERO.subTo(r,r)}}}function sD(e){var t=new ge;return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(ge.ZERO)>0&&e.subTo(t,t),t}function sc(e){this.m=e}function aD(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function oD(e){return e}function cD(e){e.divRemTo(this.m,null,e)}function uD(e,t,r){e.multiplyTo(t,r),this.reduce(r)}function fD(e,t){e.squareTo(t),this.reduce(t)}sc.prototype.convert=aD;sc.prototype.revert=oD;sc.prototype.reduce=cD;sc.prototype.mulTo=uD;sc.prototype.sqrTo=fD;function lD(){if(this.t<1)return 0;var e=this[0];if(!(e&1))return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function ac(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function pD(e){var t=new ge;return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(ge.ZERO)>0&&this.m.subTo(t,t),t}function hD(e){var t=new ge;return e.copyTo(t),this.reduce(t),t}function dD(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=e[t]&32767,i=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e[r]+=this.m.am(0,i,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function mD(e,t){e.squareTo(t),this.reduce(t)}function vD(e,t,r){e.multiplyTo(t,r),this.reduce(r)}ac.prototype.convert=pD;ac.prototype.revert=hD;ac.prototype.reduce=dD;ac.prototype.mulTo=vD;ac.prototype.sqrTo=mD;function gD(){return(this.t>0?this[0]&1:this.s)==0}function bD(e,t){if(e>4294967295||e<1)return ge.ONE;var r=new ge,i=new ge,n=t.convert(this),a=yd(e)-1;for(n.copyTo(r);--a>=0;)if(t.sqrTo(r,i),(e&1<<a)>0)t.mulTo(i,n,r);else{var u=r;r=i,i=u}return t.revert(r)}function xD(e,t){var r;return e<256||t.isEven()?r=new sc(t):r=new ac(t),this.exp(e,r)}ve.copyTo=HL;ve.fromInt=zL;ve.fromString=jL;ve.clamp=VL;ve.dlShiftTo=ZL;ve.drShiftTo=JL;ve.lShiftTo=QL;ve.rShiftTo=eD;ve.subTo=tD;ve.multiplyTo=rD;ve.squareTo=iD;ve.divRemTo=nD;ve.invDigit=lD;ve.isEven=gD;ve.exp=bD;ve.toString=KL;ve.negate=WL;ve.abs=GL;ve.compareTo=$L;ve.bitLength=XL;ve.byteLength=YL;ve.mod=sD;ve.modPowInt=xD;function _D(){var e=new ge;return this.copyTo(e),e}function yD(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function wD(){return this.t==0?this.s:this[0]<<24>>24}function SD(){return this.t==0?this.s:this[0]<<16>>16}function ED(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function TD(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function ID(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),i=pa(r),n=new ge,a=new ge,u="";for(this.divRemTo(i,n,a);n.signum()>0;)u=(r+a.intValue()).toString(e).substr(1)+u,n.divRemTo(i,n,a);return a.intValue().toString(e)+u}function RD(e,t){var r=this;r.fromInt(0),t==null&&(t=10);for(var i=r.chunkSize(t),n=Math.pow(t,i),a=!1,u=0,h=0,b=0;b<e.length;++b){var w=e6(e,b);if(w<0){e.charAt(b)=="-"&&r.signum()==0&&(a=!0);continue}h=t*h+w,++u>=i&&(r.dMultiply(n),r.dAddOffset(h,0),u=0,h=0)}u>0&&(r.dMultiply(Math.pow(t,u)),r.dAddOffset(h,0)),a&&ge.ZERO.subTo(r,r)}function AD(e,t,r){var i=this;if(typeof t=="number")if(e<2)i.fromInt(1);else for(i.fromNumber(e,r),i.testBit(e-1)||i.bitwiseTo(ge.ONE.shiftLeft(e-1),sb,i),i.isEven()&&i.dAddOffset(1,0);!i.isProbablePrime(t);)i.dAddOffset(2,0),i.bitLength()>e&&i.subTo(ge.ONE.shiftLeft(e-1),i);else{var n=new Array,a=e&7;n.length=(e>>3)+1,t.nextBytes(n),a>0?n[0]&=(1<<a)-1:n[0]=0,i.fromString(n,256)}}function OD(){var e=this,t=e.t,r=new Array;r[0]=e.s;var i=e.DB-t*e.DB%8,n,a=0;if(t-- >0)for(i<e.DB&&(n=e[t]>>i)!=(e.s&e.DM)>>i&&(r[a++]=n|e.s<<e.DB-i);t>=0;)i<8?(n=(e[t]&(1<<i)-1)<<8-i,n|=e[--t]>>(i+=e.DB-8)):(n=e[t]>>(i-=8)&255,i<=0&&(i+=e.DB,--t)),n&128&&(n|=-256),a===0&&(e.s&128)!=(n&128)&&++a,(a>0||n!=e.s)&&(r[a++]=n);return r}function kD(e){return this.compareTo(e)==0}function ND(e){return this.compareTo(e)<0?this:e}function PD(e){return this.compareTo(e)>0?this:e}function BD(e,t,r){var i=this,n,a,u=Math.min(e.t,i.t);for(n=0;n<u;++n)r[n]=t(i[n],e[n]);if(e.t<i.t){for(a=e.s&i.DM,n=u;n<i.t;++n)r[n]=t(i[n],a);r.t=i.t}else{for(a=i.s&i.DM,n=u;n<e.t;++n)r[n]=t(a,e[n]);r.t=e.t}r.s=t(i.s,e.s),r.clamp()}function MD(e,t){return e&t}function CD(e){var t=new ge;return this.bitwiseTo(e,MD,t),t}function sb(e,t){return e|t}function LD(e){var t=new ge;return this.bitwiseTo(e,sb,t),t}function t6(e,t){return e^t}function DD(e){var t=new ge;return this.bitwiseTo(e,t6,t),t}function r6(e,t){return e&~t}function UD(e){var t=new ge;return this.bitwiseTo(e,r6,t),t}function qD(){for(var e=new ge,t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e}function FD(e){var t=new ge;return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function HD(e){var t=new ge;return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function zD(e){if(e==0)return-1;var t=0;return e&65535||(e>>=16,t+=16),e&255||(e>>=8,t+=8),e&15||(e>>=4,t+=4),e&3||(e>>=2,t+=2),e&1||++t,t}function jD(){for(var e=0;e<this.t;++e)if(this[e]!=0)return e*this.DB+zD(this[e]);return this.s<0?this.t*this.DB:-1}function VD(e){for(var t=0;e!=0;)e&=e-1,++t;return t}function KD(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=VD(this[r]^t);return e}function WD(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this[t]&1<<e%this.DB)!=0}function GD(e,t){var r=ge.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r}function $D(e){return this.changeBit(e,sb)}function XD(e){return this.changeBit(e,r6)}function YD(e){return this.changeBit(e,t6)}function ZD(e,t){for(var r=this,i=0,n=0,a=Math.min(e.t,r.t);i<a;)n+=r[i]+e[i],t[i++]=n&r.DM,n>>=r.DB;if(e.t<r.t){for(n+=e.s;i<r.t;)n+=r[i],t[i++]=n&r.DM,n>>=r.DB;n+=r.s}else{for(n+=r.s;i<e.t;)n+=e[i],t[i++]=n&r.DM,n>>=r.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[i++]=n:n<-1&&(t[i++]=r.DV+n),t.t=i,t.clamp()}function JD(e){var t=new ge;return this.addTo(e,t),t}function QD(e){var t=new ge;return this.subTo(e,t),t}function eU(e){var t=new ge;return this.multiplyTo(e,t),t}function tU(){var e=new ge;return this.squareTo(e),e}function rU(e){var t=new ge;return this.divRemTo(e,t,null),t}function iU(e){var t=new ge;return this.divRemTo(e,null,t),t}function nU(e){var t=new ge,r=new ge;return this.divRemTo(e,t,r),new Array(t,r)}function sU(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function aU(e,t){if(e!=0){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}}function wl(){}function i6(e){return e}function oU(e,t,r){e.multiplyTo(t,r)}function cU(e,t){e.squareTo(t)}wl.prototype.convert=i6;wl.prototype.revert=i6;wl.prototype.mulTo=oU;wl.prototype.sqrTo=cU;function uU(e){return this.exp(e,new wl)}function fU(e,t,r){var i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;var n;for(n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,e[i],r,i,0,this.t);for(n=Math.min(e.t,t);i<n;++i)this.am(0,e[i],r,i,0,t-i);r.clamp()}function lU(e,t,r){--t;var i=r.t=this.t+e.t-t;for(r.s=0;--i>=0;)r[i]=0;for(i=Math.max(t-this.t,0);i<e.t;++i)r[this.t+i-t]=this.am(t-i,e[i],r,0,0,this.t+i-t);r.clamp(),r.drShiftTo(1,r)}function Su(e){this.r2=new ge,this.q3=new ge,ge.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function pU(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=new ge;return e.copyTo(t),this.reduce(t),t}function hU(e){return e}function dU(e){var t=this;for(e.drShiftTo(t.m.t-1,t.r2),e.t>t.m.t+1&&(e.t=t.m.t+1,e.clamp()),t.mu.multiplyUpperTo(t.r2,t.m.t+1,t.q3),t.m.multiplyLowerTo(t.q3,t.m.t+1,t.r2);e.compareTo(t.r2)<0;)e.dAddOffset(1,t.m.t+1);for(e.subTo(t.r2,e);e.compareTo(t.m)>=0;)e.subTo(t.m,e)}function mU(e,t){e.squareTo(t),this.reduce(t)}function vU(e,t,r){e.multiplyTo(t,r),this.reduce(r)}Su.prototype.convert=pU;Su.prototype.revert=hU;Su.prototype.reduce=dU;Su.prototype.mulTo=vU;Su.prototype.sqrTo=mU;function gU(e,t){var r=e.bitLength(),i,n=pa(1),a;if(r<=0)return n;r<18?i=1:r<48?i=3:r<144?i=4:r<768?i=5:i=6,r<8?a=new sc(t):t.isEven()?a=new Su(t):a=new ac(t);var u=new Array,h=3,b=i-1,w=(1<<i)-1;if(u[1]=a.convert(this),i>1){var T=new ge;for(a.sqrTo(u[1],T);h<=w;)u[h]=new ge,a.mulTo(T,u[h-2],u[h]),h+=2}var I=e.t-1,B,M=!0,P=new ge,L;for(r=yd(e[I])-1;I>=0;){for(r>=b?B=e[I]>>r-b&w:(B=(e[I]&(1<<r+1)-1)<<b-r,I>0&&(B|=e[I-1]>>this.DB+r-b)),h=i;!(B&1);)B>>=1,--h;if((r-=h)<0&&(r+=this.DB,--I),M)u[B].copyTo(n),M=!1;else{for(;h>1;)a.sqrTo(n,P),a.sqrTo(P,n),h-=2;h>0?a.sqrTo(n,P):(L=n,n=P,P=L),a.mulTo(P,u[B],n)}for(;I>=0&&!(e[I]&1<<r);)a.sqrTo(n,P),L=n,n=P,P=L,--r<0&&(r=this.DB-1,--I)}return a.revert(n)}function bU(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var i=t;t=r,r=i}var n=t.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return t;for(n<a&&(a=n),a>0&&(t.rShiftTo(a,t),r.rShiftTo(a,r));t.signum()>0;)(n=t.getLowestSetBit())>0&&t.rShiftTo(n,t),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r}function xU(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this[0]%e;else for(var i=this.t-1;i>=0;--i)r=(t*r+this[i])%e;return r}function _U(e){var t=e.isEven();if(this.signum()===0)throw new Error("division by zero");if(this.isEven()&&t||e.signum()==0)return ge.ZERO;for(var r=e.clone(),i=this.clone(),n=pa(1),a=pa(0),u=pa(0),h=pa(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!n.isEven()||!a.isEven())&&(n.addTo(this,n),a.subTo(e,a)),n.rShiftTo(1,n)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),t?((!u.isEven()||!h.isEven())&&(u.addTo(this,u),h.subTo(e,h)),u.rShiftTo(1,u)):h.isEven()||h.subTo(e,h),h.rShiftTo(1,h);r.compareTo(i)>=0?(r.subTo(i,r),t&&n.subTo(u,n),a.subTo(h,a)):(i.subTo(r,i),t&&u.subTo(n,u),h.subTo(a,h))}if(i.compareTo(ge.ONE)!=0)return ge.ZERO;for(;h.compareTo(e)>=0;)h.subTo(e,h);for(;h.signum()<0;)h.addTo(e,h);return h}var Ei=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],yU=(1<<26)/Ei[Ei.length-1];function wU(e){var t,r=this.abs();if(r.t==1&&r[0]<=Ei[Ei.length-1]){for(t=0;t<Ei.length;++t)if(r[0]==Ei[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<Ei.length;){for(var i=Ei[t],n=t+1;n<Ei.length&&i<yU;)i*=Ei[n++];for(i=r.modInt(i);t<n;)if(i%Ei[t++]==0)return!1}return r.millerRabin(e)}function SU(e){var t=this.subtract(ge.ONE),r=t.getLowestSetBit();if(r<=0)return!1;var i=t.shiftRight(r);e=e+1>>1,e>Ei.length&&(e=Ei.length);for(var n=new ge(null),a,u=[],h=0;h<e;++h){for(;a=Ei[Math.floor(Math.random()*Ei.length)],u.indexOf(a)!=-1;);u.push(a),n.fromInt(a);var b=n.modPow(i,this);if(b.compareTo(ge.ONE)!=0&&b.compareTo(t)!=0){for(var a=1;a++<r&&b.compareTo(t)!=0;)if(b=b.modPowInt(2,this),b.compareTo(ge.ONE)==0)return!1;if(b.compareTo(t)!=0)return!1}}return!0}ve.chunkSize=ED;ve.toRadix=ID;ve.fromRadix=RD;ve.fromNumber=AD;ve.bitwiseTo=BD;ve.changeBit=GD;ve.addTo=ZD;ve.dMultiply=sU;ve.dAddOffset=aU;ve.multiplyLowerTo=fU;ve.multiplyUpperTo=lU;ve.modInt=xU;ve.millerRabin=SU;ve.clone=_D;ve.intValue=yD;ve.byteValue=wD;ve.shortValue=SD;ve.signum=TD;ve.toByteArray=OD;ve.equals=kD;ve.min=ND;ve.max=PD;ve.and=CD;ve.or=LD;ve.xor=DD;ve.andNot=UD;ve.not=qD;ve.shiftLeft=FD;ve.shiftRight=HD;ve.getLowestSetBit=jD;ve.bitCount=KD;ve.testBit=WD;ve.setBit=$D;ve.clearBit=XD;ve.flipBit=YD;ve.add=JD;ve.subtract=QD;ve.multiply=eU;ve.divide=rU;ve.remainder=iU;ve.divideAndRemainder=nU;ve.modPow=gU;ve.modInverse=_U;ve.pow=uU;ve.gcd=bU;ve.isProbablePrime=wU;ve.square=tU;ge.ZERO=pa(0);ge.ONE=pa(1);ge.valueOf=pa;n6.exports=ge});var a6=W(()=>{var s6=require("assert"),mi=ab();mi.fromByteArrayUnsigned=function(e){return e[0]&128?new mi([0].concat(e)):new mi(e)};mi.prototype.toByteArrayUnsigned=function(){var e=this.toByteArray();return e[0]===0?e.slice(1):e};mi.fromDERInteger=function(e){return new mi(e)};mi.prototype.toDERInteger=mi.prototype.toByteArray;mi.fromBuffer=function(e){if(e[0]&128){var t=Array.prototype.slice.call(e);return new mi([0].concat(t))}return new mi(e)};mi.fromHex=function(e){return e===""?mi.ZERO:(s6.equal(e,e.match(/^[A-Fa-f0-9]+/),"Invalid hex string"),s6.equal(e.length%2,0,"Incomplete hex"),new mi(e,16))};mi.prototype.toBuffer=function(e){for(var t=this.toByteArrayUnsigned(),r=[],i=e-t.length;r.length<i;)r.push(0);return new Buffer(r.concat(t))};mi.prototype.toHex=function(e){return this.toBuffer(e).toString("hex")}});var no=W((Nee,o6)=>{var EU=ab();a6();o6.exports=EU});var cb=W((Pee,c6)=>{var wd=require("assert"),ob=la().Buffer,Sd=no(),Ed=Sd.valueOf(3);function Wr(e,t,r,i){wd.notStrictEqual(i,void 0,"Missing Z coordinate"),this.curve=e,this.x=t,this.y=r,this.z=i,this._zInv=null,this.compressed=!0}Object.defineProperty(Wr.prototype,"zInv",{get:function(){return this._zInv===null&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}});Object.defineProperty(Wr.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}});Object.defineProperty(Wr.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}});Wr.fromAffine=function(e,t,r){return new Wr(e,t,r,Sd.ONE)};Wr.prototype.equals=function(e){if(e===this)return!0;if(this.curve.isInfinity(this))return this.curve.isInfinity(e);if(this.curve.isInfinity(e))return this.curve.isInfinity(this);var t=e.y.multiply(this.z).subtract(this.y.multiply(e.z)).mod(this.curve.p);if(t.signum()!==0)return!1;var r=e.x.multiply(this.z).subtract(this.x.multiply(e.z)).mod(this.curve.p);return r.signum()===0};Wr.prototype.negate=function(){var e=this.curve.p.subtract(this.y);return new Wr(this.curve,this.x,e,this.z)};Wr.prototype.add=function(e){if(this.curve.isInfinity(this))return e;if(this.curve.isInfinity(e))return this;var t=this.x,r=this.y,i=e.x,n=e.y,a=n.multiply(this.z).subtract(r.multiply(e.z)).mod(this.curve.p),u=i.multiply(this.z).subtract(t.multiply(e.z)).mod(this.curve.p);if(u.signum()===0)return a.signum()===0?this.twice():this.curve.infinity;var h=u.square(),b=h.multiply(u),w=t.multiply(h),T=a.square().multiply(this.z),I=T.subtract(w.shiftLeft(1)).multiply(e.z).subtract(b).multiply(u).mod(this.curve.p),B=w.multiply(Ed).multiply(a).subtract(r.multiply(b)).subtract(T.multiply(a)).multiply(e.z).add(a.multiply(b)).mod(this.curve.p),M=b.multiply(this.z).multiply(e.z).mod(this.curve.p);return new Wr(this.curve,I,B,M)};Wr.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(this.y.signum()===0)return this.curve.infinity;var e=this.x,t=this.y,r=t.multiply(this.z).mod(this.curve.p),i=r.multiply(t).mod(this.curve.p),n=this.curve.a,a=e.square().multiply(Ed);n.signum()!==0&&(a=a.add(this.z.square().multiply(n))),a=a.mod(this.curve.p);var u=a.square().subtract(e.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(r).mod(this.curve.p),h=a.multiply(Ed).multiply(e).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(a.pow(3)).mod(this.curve.p),b=r.pow(3).shiftLeft(3).mod(this.curve.p);return new Wr(this.curve,u,h,b)};Wr.prototype.multiply=function(e){if(this.curve.isInfinity(this))return this;if(e.signum()===0)return this.curve.infinity;for(var t=e,r=t.multiply(Ed),i=this.negate(),n=this,a=r.bitLength()-2;a>0;--a){var u=r.testBit(a),h=t.testBit(a);n=n.twice(),u!==h&&(n=n.add(u?this:i))}return n};Wr.prototype.multiplyTwo=function(e,t,r){for(var i=Math.max(e.bitLength(),r.bitLength())-1,n=this.curve.infinity,a=this.add(t);i>=0;){var u=e.testBit(i),h=r.testBit(i);n=n.twice(),u?h?n=n.add(a):n=n.add(this):h&&(n=n.add(t)),--i}return n};Wr.prototype.getEncoded=function(e){if(e==null&&(e=this.compressed),this.curve.isInfinity(this))return ob.alloc(1,0);var t=this.affineX,r=this.affineY,i=this.curve.pLength,n;return e?(n=ob.allocUnsafe(1+i),n.writeUInt8(r.isEven()?2:3,0)):(n=ob.allocUnsafe(1+i+i),n.writeUInt8(4,0),r.toBuffer(i).copy(n,1+i)),t.toBuffer(i).copy(n,1),n};Wr.decodeFrom=function(e,t){var r=t.readUInt8(0),i=r!==4,n=Math.floor((e.p.bitLength()+7)/8),a=Sd.fromBuffer(t.slice(1,1+n)),u;if(i){wd.equal(t.length,n+1,"Invalid sequence length"),wd(r===2||r===3,"Invalid sequence tag");var h=r===3;u=e.pointFromX(h,a)}else{wd.equal(t.length,1+n+n,"Invalid sequence length");var b=Sd.fromBuffer(t.slice(1+n));u=Wr.fromAffine(e,a,b)}return u.compressed=i,u};Wr.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"};c6.exports=Wr});var lb=W((Bee,f6)=>{var ub=require("assert"),u6=no(),fb=cb();function Sl(e,t,r,i,n,a,u){this.p=e,this.a=t,this.b=r,this.G=fb.fromAffine(this,i,n),this.n=a,this.h=u,this.infinity=new fb(this,null,null,u6.ZERO),this.pOverFour=e.add(u6.ONE).shiftRight(2),this.pLength=Math.floor((this.p.bitLength()+7)/8)}Sl.prototype.pointFromX=function(e,t){var r=t.pow(3).add(this.a.multiply(t)).add(this.b).mod(this.p),i=r.modPow(this.pOverFour,this.p),n=i;return i.isEven()^!e&&(n=this.p.subtract(n)),fb.fromAffine(this,t,n)};Sl.prototype.isInfinity=function(e){return e===this.infinity?!0:e.z.signum()===0&&e.y.signum()!==0};Sl.prototype.isOnCurve=function(e){if(this.isInfinity(e))return!0;var t=e.affineX,r=e.affineY,i=this.a,n=this.b,a=this.p;if(t.signum()<0||t.compareTo(a)>=0||r.signum()<0||r.compareTo(a)>=0)return!1;var u=r.square().mod(a),h=t.pow(3).add(i.multiply(t)).add(n).mod(a);return u.equals(h)};Sl.prototype.validate=function(e){ub(!this.isInfinity(e),"Point is at infinity"),ub(this.isOnCurve(e),"Point is not on the curve");var t=e.multiply(this.n);return ub(this.isInfinity(t),"Point is not a scalar multiple of G"),!0};f6.exports=Sl});var l6=W((Mee,TU)=>{TU.exports={secp128r1:{p:"fffffffdffffffffffffffffffffffff",a:"fffffffdfffffffffffffffffffffffc",b:"e87579c11079f43dd824993c2cee5ed3",n:"fffffffe0000000075a30d1b9038a115",h:"01",Gx:"161ff7528b899b2d0c28607ca52c5b86",Gy:"cf5ac8395bafeb13c02da292dded7a83"},secp160k1:{p:"fffffffffffffffffffffffffffffffeffffac73",a:"00",b:"07",n:"0100000000000000000001b8fa16dfab9aca16b6b3",h:"01",Gx:"3b4c382ce37aa192a4019e763036f4f5dd4d7ebb",Gy:"938cf935318fdced6bc28286531733c3f03c4fee"},secp160r1:{p:"ffffffffffffffffffffffffffffffff7fffffff",a:"ffffffffffffffffffffffffffffffff7ffffffc",b:"1c97befc54bd7a8b65acf89f81d4d4adc565fa45",n:"0100000000000000000001f4c8f927aed3ca752257",h:"01",Gx:"4a96b5688ef573284664698968c38bb913cbfc82",Gy:"23a628553168947d59dcc912042351377ac5fb32"},secp192k1:{p:"fffffffffffffffffffffffffffffffffffffffeffffee37",a:"00",b:"03",n:"fffffffffffffffffffffffe26f2fc170f69466a74defd8d",h:"01",Gx:"db4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d",Gy:"9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d"},secp192r1:{p:"fffffffffffffffffffffffffffffffeffffffffffffffff",a:"fffffffffffffffffffffffffffffffefffffffffffffffc",b:"64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1",n:"ffffffffffffffffffffffff99def836146bc9b1b4d22831",h:"01",Gx:"188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012",Gy:"07192b95ffc8da78631011ed6b24cdd573f977a11e794811"},secp256k1:{p:"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",a:"00",b:"07",n:"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",h:"01",Gx:"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",Gy:"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"},secp256r1:{p:"ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",a:"ffffffff00000001000000000000000000000000fffffffffffffffffffffffc",b:"5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b",n:"ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",h:"01",Gx:"6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296",Gy:"4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"}}});var h6=W((Cee,p6)=>{var oc=no(),IU=l6(),RU=lb();function AU(e){var t=IU[e];if(!t)return null;var r=new oc(t.p,16),i=new oc(t.a,16),n=new oc(t.b,16),a=new oc(t.n,16),u=new oc(t.h,16),h=new oc(t.Gx,16),b=new oc(t.Gy,16);return new RU(r,i,n,h,b,a,u)}p6.exports=AU});var Eu=W((Lee,d6)=>{var OU=cb(),kU=lb(),NU=h6();d6.exports={Curve:kU,Point:OU,getCurveByName:NU}});var v6=W((Dee,m6)=>{m6.exports=require("crypto").randomBytes});var Tl=W((Uee,w6)=>{var pb=no(),PU=la().Buffer,BU=Eu(),b6=BU.getCurveByName("secp256k1"),g6=pb.ONE,x6=b6.n,MU=b6.p;function Jn(e,t,r,i){let n=i!==void 0?"["+i+"]":"";if(!PU.isBuffer(t))throw new Error(e+n+" must be a Buffer");if(t.length!==r)throw new Error(e+n+" must be "+r+" bytes long")}function El(e,t){if(!t||!t.length)throw new Error(e+" must be an array with one or more elements")}function _6(e){El("pubKeys",e);for(let t=0;t<e.length;t++)Jn("pubKey",e[t],32,t)}function CU(e){El("messages",e);for(let t=0;t<e.length;t++)Jn("message",e[t],32,t)}function LU(e){El("signatures",e);for(let t=0;t<e.length;t++)Jn("signature",e[t],64,t)}function DU(e){El("nonces",e);for(let t=0;t<e.length;t++)Jn("nonce",e[t],32,t)}function UU(e,t){let r=t!==void 0?"["+t+"]":"";if(!pb.isBigInteger(e)&&typeof e!="string")throw new Error("privateKey"+r+" must be a BigInteger or valid hex string");if(typeof e=="string"){if(e.match(/[^a-f^A-F^0-9]+/))throw new Error("privateKey must be a BigInteger or valid hex string");hb("privateKey",pb.fromHex(e));return}hb("privateKey",e)}function y6(e,t){UU(e),Jn("message",t,32)}function qU(e,t,r){Jn("pubKey",e,32),Jn("message",t,32),Jn("signature",r,64)}function FU(e,t,r){if(_6(e),CU(t),LU(r),e.length!==t.length||t.length!==r.length)throw new Error("all parameters must be an array with the same length")}function HU(e,t,r,i,n){y6(t,r),Jn("sessionId",e,32),Jn("pubKeyCombined",i,32),Jn("ell",n,32)}function hb(e,t){if(t.compareTo(g6)<0||t.compareTo(x6.subtract(g6))>0)throw new Error(e+" must be an integer in the range 1..n-1")}function zU(e,t){if(e.compareTo(MU)>=0)throw new Error("r is larger than or equal to field size");if(t.compareTo(x6)>=0)throw new Error("s is larger than or equal to curve order")}function jU(e,t){if(t.curve.isInfinity(t))throw new Error("point is at infinity");let r=t.affineY.isEven();if(e!==r)throw new Error("point does not exist")}function VU(e){if(e.length!==32)throw new Error("aux must be 32 bytes")}w6.exports={checkSessionParams:HU,checkSignParams:y6,checkVerifyParams:qU,checkBatchVerifyParams:FU,checkRange:hb,checkSignatureInput:zU,checkPointExists:jU,checkPubKeyArr:_6,checkArray:El,checkNonceArr:DU,checkAux:VU}});var S6=W((exports,module)=>{(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=typeof define=="function"&&define.amd,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(r){return new Sha256(t,!0).update(r)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(n){return t.create().update(n)};for(var r=0;r<OUTPUT_TYPES.length;++r){var i=OUTPUT_TYPES[r];t[i]=createOutputMethod(i,e)}return t},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(e){if(typeof e=="string")return crypto.createHash(algorithm).update(e,"utf8").digest("hex");if(e==null)throw new Error(ERROR);return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(e)).digest("hex"):method(e)};return nodeMethod},createHmacOutputMethod=function(e,t){return function(r,i){return new HmacSha256(r,t,!0).update(i)[e]()}},createHmacMethod=function(e){var t=createHmacOutputMethod("hex",e);t.create=function(n){return new HmacSha256(n,e)},t.update=function(n,a){return t.create(n).update(a)};for(var r=0;r<OUTPUT_TYPES.length;++r){var i=OUTPUT_TYPES[r];t[i]=createHmacOutputMethod(i,e)}return t};function Sha256(e,t){t?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}Sha256.prototype.update=function(e){if(!this.finalized){var t,r=typeof e;if(r!=="string"){if(r==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);t=!0}for(var i,n=0,a,u=e.length,h=this.blocks;n<u;){if(this.hashed&&(this.hashed=!1,h[0]=this.block,h[16]=h[1]=h[2]=h[3]=h[4]=h[5]=h[6]=h[7]=h[8]=h[9]=h[10]=h[11]=h[12]=h[13]=h[14]=h[15]=0),t)for(a=this.start;n<u&&a<64;++n)h[a>>2]|=e[n]<<SHIFT[a++&3];else for(a=this.start;n<u&&a<64;++n)i=e.charCodeAt(n),i<128?h[a>>2]|=i<<SHIFT[a++&3]:i<2048?(h[a>>2]|=(192|i>>6)<<SHIFT[a++&3],h[a>>2]|=(128|i&63)<<SHIFT[a++&3]):i<55296||i>=57344?(h[a>>2]|=(224|i>>12)<<SHIFT[a++&3],h[a>>2]|=(128|i>>6&63)<<SHIFT[a++&3],h[a>>2]|=(128|i&63)<<SHIFT[a++&3]):(i=65536+((i&1023)<<10|e.charCodeAt(++n)&1023),h[a>>2]|=(240|i>>18)<<SHIFT[a++&3],h[a>>2]|=(128|i>>12&63)<<SHIFT[a++&3],h[a>>2]|=(128|i>>6&63)<<SHIFT[a++&3],h[a>>2]|=(128|i&63)<<SHIFT[a++&3]);this.lastByteIndex=a,this.bytes+=a-this.start,a>=64?(this.block=h[16],this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e=this.h0,t=this.h1,r=this.h2,i=this.h3,n=this.h4,a=this.h5,u=this.h6,h=this.h7,b=this.blocks,w,T,I,B,M,P,L,X,V,q,ee;for(w=16;w<64;++w)M=b[w-15],T=(M>>>7|M<<25)^(M>>>18|M<<14)^M>>>3,M=b[w-2],I=(M>>>17|M<<15)^(M>>>19|M<<13)^M>>>10,b[w]=b[w-16]+T+b[w-7]+I<<0;for(ee=t&r,w=0;w<64;w+=4)this.first?(this.is224?(X=300032,M=b[0]-1413257819,h=M-150054599<<0,i=M+24177077<<0):(X=704751109,M=b[0]-210244248,h=M-1521486534<<0,i=M+143694565<<0),this.first=!1):(T=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),I=(n>>>6|n<<26)^(n>>>11|n<<21)^(n>>>25|n<<7),X=e&t,B=X^e&r^ee,L=n&a^~n&u,M=h+I+L+K[w]+b[w],P=T+B,h=i+M<<0,i=M+P<<0),T=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),I=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7),V=i&e,B=V^i&t^X,L=h&n^~h&a,M=u+I+L+K[w+1]+b[w+1],P=T+B,u=r+M<<0,r=M+P<<0,T=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),I=(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7),q=r&i,B=q^r&e^V,L=u&h^~u&n,M=a+I+L+K[w+2]+b[w+2],P=T+B,a=t+M<<0,t=M+P<<0,T=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),I=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),ee=t&r,B=ee^t&i^q,L=a&u^~a&h,M=n+I+L+K[w+3]+b[w+3],P=T+B,n=e+M<<0,e=M+P<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+r<<0,this.h3=this.h3+i<<0,this.h4=this.h4+n<<0,this.h5=this.h5+a<<0,this.h6=this.h6+u<<0,this.h7=this.h7+h<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,i=this.h3,n=this.h4,a=this.h5,u=this.h6,h=this.h7,b=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[a&15]+HEX_CHARS[u>>28&15]+HEX_CHARS[u>>24&15]+HEX_CHARS[u>>20&15]+HEX_CHARS[u>>16&15]+HEX_CHARS[u>>12&15]+HEX_CHARS[u>>8&15]+HEX_CHARS[u>>4&15]+HEX_CHARS[u&15];return this.is224||(b+=HEX_CHARS[h>>28&15]+HEX_CHARS[h>>24&15]+HEX_CHARS[h>>20&15]+HEX_CHARS[h>>16&15]+HEX_CHARS[h>>12&15]+HEX_CHARS[h>>8&15]+HEX_CHARS[h>>4&15]+HEX_CHARS[h&15]),b},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,i=this.h3,n=this.h4,a=this.h5,u=this.h6,h=this.h7,b=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,r>>24&255,r>>16&255,r>>8&255,r&255,i>>24&255,i>>16&255,i>>8&255,i&255,n>>24&255,n>>16&255,n>>8&255,n&255,a>>24&255,a>>16&255,a>>8&255,a&255,u>>24&255,u>>16&255,u>>8&255,u&255];return this.is224||b.push(h>>24&255,h>>16&255,h>>8&255,h&255),b},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function HmacSha256(e,t,r){var i,n=typeof e;if(n==="string"){var a=[],u=e.length,h=0,b;for(i=0;i<u;++i)b=e.charCodeAt(i),b<128?a[h++]=b:b<2048?(a[h++]=192|b>>6,a[h++]=128|b&63):b<55296||b>=57344?(a[h++]=224|b>>12,a[h++]=128|b>>6&63,a[h++]=128|b&63):(b=65536+((b&1023)<<10|e.charCodeAt(++i)&1023),a[h++]=240|b>>18,a[h++]=128|b>>12&63,a[h++]=128|b>>6&63,a[h++]=128|b&63);e=a}else if(n==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);e.length>64&&(e=new Sha256(t,!0).update(e).array());var w=[],T=[];for(i=0;i<64;++i){var I=e[i]||0;w[i]=92^I,T[i]=54^I}Sha256.call(this,t,r),this.update(T),this.oKeyPad=w,this.inner=!0,this.sharedMemory=r}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&define(function(){return exports}))})()});var Tu=W((qee,E6)=>{var KU=no(),WU=la().Buffer,GU=S6();function $U(e){return KU.fromBuffer(e)}function XU(e){return e.toBuffer(32)}function YU(e){return WU.from(GU.create().update(e).array())}E6.exports={bufferToInt:$U,intToBuffer:XU,hash:YU}});var Al=W((Fee,I6)=>{var Iu=no(),mb=la().Buffer,db=Eu(),ZU=v6(),Rl=db.getCurveByName("secp256k1"),vb=Tl(),cc=Tu(),gb=mb.concat,JU=Rl.G,Il=Rl.p,bb=Rl.n,QU=Iu.ZERO,eq=Iu.ONE,T6=Iu.valueOf(2),tq=Iu.valueOf(3),rq=Iu.valueOf(4),iq=Iu.valueOf(7);function nq(e,t,r){vb.checkSignParams(e,r);let i=_b("BIP0340/nonce",gb([cc.intToBuffer(e),t,r]));return cc.bufferToInt(i).mod(bb)}function xb(e){return e.affineY.mod(T6).equals(QU)}function sq(e,t){return xb(e)?t.clone():bb.subtract(t)}function aq(e,t,r){let i=_b("BIP0340/challenge",gb([e,t,r]));return cc.bufferToInt(i).mod(bb)}function oq(e,t,r){let i=JU.multiply(e),n=r.multiply(t);return i.add(n.negate())}function _b(e,t){let r=cc.hash(e);return cc.hash(gb([r,r,mb.from(t)]))}function cq(e){let t=cc.bufferToInt(e),r=t.pow(tq).add(iq).mod(Il),i=r.modPow(Il.add(eq).divide(rq),Il);if(r.compareTo(i.modPow(T6,Il))!==0)throw new Error("c is not equal to y^2");let n=db.Point.fromAffine(Rl,t,i);return xb(n)||(n=db.Point.fromAffine(Rl,t,Il.subtract(i))),vb.checkPointExists(!0,n),n}function uq(){let e=null;for(;;){e=cc.bufferToInt(mb.from(ZU(32)));try{return vb.checkRange("a",e),e}catch{}}}I6.exports={deterministicGetK0:nq,isEven:xb,getEvenKey:sq,getE:aq,getR:oq,taggedHash:_b,liftX:cq,randomA:uq}});var N6=W((zee,k6)=>{var O6=no(),fq=la().Buffer,lq=Eu(),wb=lq.getCurveByName("secp256k1"),Hi=Al(),Ru=Tl(),zi=Tu(),R6=fq.concat,yb=wb.G,Hee=wb.p,A6=wb.n,pq=O6.ZERO;function hq(e,t,r){Ru.checkSignParams(e,t),e=typeof e=="string"?O6.fromHex(e):e;let i=yb.multiply(e),n=zi.intToBuffer(i.affineX),a=Hi.getEvenKey(i,e),u;if(r){Ru.checkAux(r);let I=zi.intToBuffer(a.xor(zi.bufferToInt(Hi.taggedHash("BIP0340/aux",r)))),B=Hi.taggedHash("BIP0340/nonce",R6([I,n,t]));u=zi.bufferToInt(B).mod(A6)}else u=Hi.deterministicGetK0(a,n,t);if(u.signum()===0)throw new Error("kPrime is zero");let h=yb.multiply(u),b=Hi.getEvenKey(h,u),w=zi.intToBuffer(h.affineX),T=Hi.getE(w,n,t);return R6([w,zi.intToBuffer(b.add(T.multiply(a)).mod(A6))])}function dq(e,t,r){Ru.checkVerifyParams(e,t,r);let i=Hi.liftX(e),n=zi.intToBuffer(i.affineX),a=zi.bufferToInt(r.slice(0,32)),u=zi.bufferToInt(r.slice(32,64));Ru.checkSignatureInput(a,u);let h=Hi.getE(zi.intToBuffer(a),n,t),b=Hi.getR(u,h,i);if(b.curve.isInfinity(b)||!Hi.isEven(b)||!b.affineX.equals(a))throw new Error("signature verification failed")}function mq(e,t,r){Ru.checkBatchVerifyParams(e,t,r);let i=pq,n=null;for(let a=0;a<e.length;a++){let u=Hi.liftX(e[a]),h=zi.intToBuffer(u.affineX),b=zi.bufferToInt(r[a].slice(0,32)),w=zi.bufferToInt(r[a].slice(32,64));Ru.checkSignatureInput(b,w);let T=Hi.getE(zi.intToBuffer(b),h,t[a]),I=Hi.liftX(r[a].slice(0,32));if(a===0)i=i.add(w),n=I,n=n.add(u.multiply(T));else{let B=Hi.randomA();i=i.add(B.multiply(w)),n=n.add(I.multiply(B)),n=n.add(u.multiply(B.multiply(T)))}}if(!yb.multiply(i).equals(n))throw new Error("signature verification failed")}k6.exports={sign:hq,verify:dq,batchVerify:mq}});var D6=W((jee,L6)=>{var Sb=la().Buffer,vq=Eu(),M6=vq.getCurveByName("secp256k1"),An=Al(),Ol=Tl(),Rn=Tu(),Td=Sb.concat,P6=M6.G,so=M6.n,B6=Rn.hash(Sb.from("MuSig coefficient"));function C6(e){return Ol.checkPubKeyArr(e),Rn.hash(Td(e))}function Id(e,t){let r=Sb.alloc(4);r.writeUInt32LE(t);let i=Td([B6,B6,e,r]);return Rn.bufferToInt(Rn.hash(i)).mod(so)}function gq(e,t){let r=t||C6(e),i=null;for(let n=0;n<e.length;n++){let a=An.liftX(e[n]),u=Id(r,n),h=a.multiply(u);i===null?i=h:i=i.add(h)}return i}function bq(e,t,r,i,n,a,u){Ol.checkSessionParams(e,t,r,i,a);let h={sessionId:e,message:r,pubKeyCombined:i,pkParity:n,ell:a,idx:u},b=Id(a,u);h.secretKey=t.multiply(b).mod(so),h.ownKeyParity=An.isEven(P6.multiply(t)),h.pkParity!==h.ownKeyParity&&(h.secretKey=so.subtract(h.secretKey));let w=Td([e,r,h.pubKeyCombined,Rn.intToBuffer(t)]);h.secretNonce=Rn.bufferToInt(Rn.hash(w)),Ol.checkRange("secretNonce",h.secretNonce);let T=P6.multiply(h.secretNonce);return h.nonce=Rn.intToBuffer(T.affineX),h.nonceParity=An.isEven(T),h.commitment=Rn.hash(h.nonce),h}function xq(e,t){Ol.checkNonceArr(t);let r=An.liftX(t[0]);for(let i=1;i<t.length;i++)r=r.add(An.liftX(t[i]));return e.combinedNonceParity=An.isEven(r),Rn.intToBuffer(r.affineX)}function _q(e,t,r,i){let n=An.getE(r,i,t),a=e.secretKey,u=e.secretNonce;return e.nonceParity!==e.combinedNonceParity&&(u=so.subtract(u)),a.multiply(n).add(u).mod(so)}function yq(e,t,r,i,n,a){let u=An.getE(r,e.pubKeyCombined,e.message),h=Id(e.ell,i),b=An.liftX(n),w=An.liftX(a);e.pkParity||(u=so.subtract(u));let T=An.getR(t,u.multiply(h).mod(so),b);e.combinedNonceParity&&(T=T.negate());let I=T.add(w);if(!I.curve.isInfinity(I))throw new Error("partial signature verification failed")}function wq(e,t){let r=An.liftX(e);Ol.checkArray("partialSigs",t);let i=Rn.intToBuffer(r.affineX),n=t[0];for(let a=1;a<t.length;a++)n=n.add(t[a]).mod(so);return Td([i,Rn.intToBuffer(n)])}L6.exports={computeEll:C6,computeCoefficient:Id,pubKeyCombine:gq,sessionInitialize:bq,sessionNonceCombine:xq,partialSign:_q,partialSigVerify:yq,partialSigCombine:wq}});var F6=W((Vee,q6)=>{var Tb=la().Buffer,Sq=Eu(),Eq=Sq.getCurveByName("secp256k1"),U6=Al(),Eb=Tu(),Tq=Tb.concat,Iq=Eq.G;function Rq(e,t){t||(t=[]);let r=Aq(t),i=Eb.intToBuffer(e.affineX),n=U6.liftX(i),a=Eb.bufferToInt(U6.taggedHash("TapTweak",Tq([i,r]))),u=n.add(Iq.multiply(a));return Eb.intToBuffer(u.affineX)}function Aq(e){let t=Tb.alloc(32,0);return!e||e.length===0?new Tb(0):t}q6.exports={taprootConstruct:Rq}});var z6=W((Kee,H6)=>{var Au=N6();Au.check=Tl();Au.convert=Tu();Au.math=Al();Au.muSig=D6();Au.taproot=F6();H6.exports=Au});var Ou=W((Gee,W6)=>{"use strict";var Rd=xt(),kl=It(),uc=tn(),j6=Si(),Wee=require("buffer"),Oq=dr(),V6=Dr(),Ib=Fi(),kq=ha(),Rb=Es(),Ad=4294967295,K6=Ad,Nq=Ad-1,Pq=Ad-2,Bq=Math.pow(2,31),kb=Math.pow(2,22),Ab=65535,Ob=512,Mq=Math.pow(2,16)-1;function _t(e){if(!(this instanceof _t))return new _t(e);if(e)return this._fromObject(e)}_t.MAXINT=Ad;_t.DEFAULT_SEQNUMBER=K6;_t.DEFAULT_LOCKTIME_SEQNUMBER=Nq;_t.DEFAULT_RBF_SEQNUMBER=Pq;_t.SEQUENCE_LOCKTIME_TYPE_FLAG=kb;Object.defineProperty(_t.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this.isNull()?null:(this._script||(this._script=new Ib(this._scriptBuffer),this._script._isInput=!0),this._script)}});_t.fromObject=function(e){kl.checkArgument(Rd.isObject(e));var t=new _t;return t._fromObject(e)};_t.prototype._fromObject=function(e){var t;if(typeof e.prevTxId=="string"&&V6.isHexa(e.prevTxId)?t=Buffer.from(e.prevTxId,"hex"):t=e.prevTxId,this.witnesses=[],this.output=e.output?e.output instanceof Rb?e.output:new Rb(e.output):void 0,this.prevTxId=t||e.txidbuf,this.outputIndex=e.outputIndex==null?e.txoutnum:e.outputIndex,this.sequenceNumber=e.sequenceNumber==null?e.seqnum==null?K6:e.seqnum:e.sequenceNumber,e.script===void 0&&e.scriptBuffer===void 0)throw new uc.Transaction.Input.MissingScript;return this.setScript(e.scriptBuffer||e.script),this};_t.prototype.toObject=_t.prototype.toJSON=function(){var t={prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,sequenceNumber:this.sequenceNumber,script:this._scriptBuffer.toString("hex")};return this.script&&(t.scriptString=this.script.toString()),this.output&&(t.output=this.output.toObject()),t};_t.fromBufferReader=function(e){var t=new _t;return t.prevTxId=e.readReverse(32),t.outputIndex=e.readUInt32LE(),t._scriptBuffer=e.readVarLengthBuffer(),t.sequenceNumber=e.readUInt32LE(),t};_t.prototype.toBufferWriter=function(e){e||(e=new j6),e.writeReverse(this.prevTxId),e.writeUInt32LE(this.outputIndex);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e.writeUInt32LE(this.sequenceNumber),e};_t.prototype.setScript=function(e){if(this._script=null,e instanceof Ib)this._script=e,this._script._isInput=!0,this._scriptBuffer=e.toBuffer();else if(V6.isHexa(e))this._scriptBuffer=Buffer.from(e,"hex");else if(Rd.isString(e))this._script=new Ib(e),this._script._isInput=!0,this._scriptBuffer=this._script.toBuffer();else if(Oq.isBuffer(e))this._scriptBuffer=Buffer.from(e);else throw new TypeError("Invalid argument type: script");return this};_t.prototype.getSignatures=function(){throw new uc.AbstractMethodInvoked("Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input: "+JSON.stringify(this))};_t.prototype.getSatoshisBuffer=function(){return kl.checkState(this.output instanceof Rb),kl.checkState(this.output._satoshisBN),new j6().writeUInt64LEBN(this.output._satoshisBN).toBuffer()};_t.prototype.isFullySigned=function(){throw new uc.AbstractMethodInvoked("Input#isFullySigned")};_t.prototype.isFinal=function(){return this.sequenceNumber!==_t.MAXINT};_t.prototype.addSignature=function(){throw new uc.AbstractMethodInvoked("Input#addSignature")};_t.prototype.clearSignatures=function(){throw new uc.AbstractMethodInvoked("Input#clearSignatures")};_t.prototype.hasWitnesses=function(){return!!(this.witnesses&&this.witnesses.length>0)};_t.prototype.getWitnesses=function(){return this.witnesses};_t.prototype.setWitnesses=function(e){this.witnesses=e};_t.prototype.isValidSignature=function(e,t,r){return r=r||"ecdsa",t.signature.nhashtype=t.sigtype,kq.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script,r)};_t.prototype.isNull=function(){return this.prevTxId.toString("hex")==="0000000000000000000000000000000000000000000000000000000000000000"&&this.outputIndex===4294967295};_t.prototype._estimateSize=function(){return this.toBufferWriter().toBuffer().length};_t.prototype._getBaseSize=function(){return 40};_t.prototype.lockForSeconds=function(e){if(kl.checkArgument(Rd.isNumber(e)),e<0||e>=Ob*Ab)throw new uc.Transaction.Input.LockTimeRange;return e=parseInt(Math.floor(e/Ob)),this.sequenceNumber=e|kb,this};_t.prototype.lockUntilBlockHeight=function(e){if(kl.checkArgument(Rd.isNumber(e)),e<0||e>=Mq)throw new uc.Transaction.Input.BlockHeightOutOfRange;return this.sequenceNumber=e,this};_t.prototype.getLockTime=function(){if(this.sequenceNumber&Bq)return null;if(this.sequenceNumber&kb){var e=Ob*(this.sequenceNumber&Ab);return e}else{var t=this.sequenceNumber&Ab;return t}};W6.exports=_t});var ku=W(($ee,G6)=>{G6.exports=require("util").inherits});var Pu=W((Xee,Y6)=>{"use strict";var Nu=xt(),On=It(),Cq=ku(),Od=dr(),$6=Dr(),X6=Zn(),Lq=tn(),Nl=Ui();function Qn(e){if(!(this instanceof Qn))return new Qn(e);if(e instanceof Qn)return e;if(Nu.isObject(e))return this._fromObject(e);throw new Lq.InvalidArgument("TransactionSignatures must be instantiated from an object")}Cq(Qn,Nl);Qn.prototype._fromObject=function(e){return this._checkObjectArgs(e),this.publicKey=new X6(e.publicKey),this.prevTxId=Od.isBuffer(e.prevTxId)?e.prevTxId:Buffer.from(e.prevTxId,"hex"),this.outputIndex=e.outputIndex,this.inputIndex=e.inputIndex,this.signature=e.signature instanceof Nl?e.signature:Od.isBuffer(e.signature)?Nl.fromBuffer(e.signature):Nl.fromString(e.signature),this.sigtype=e.sigtype,this};Qn.prototype._checkObjectArgs=function(e){On.checkArgument(X6(e.publicKey),"publicKey"),On.checkArgument(!Nu.isUndefined(e.inputIndex),"inputIndex"),On.checkArgument(!Nu.isUndefined(e.outputIndex),"outputIndex"),On.checkState(Nu.isNumber(e.inputIndex),"inputIndex must be a number"),On.checkState(Nu.isNumber(e.outputIndex),"outputIndex must be a number"),On.checkArgument(e.signature,"signature"),On.checkArgument(e.prevTxId,"prevTxId"),On.checkState(e.signature instanceof Nl||Od.isBuffer(e.signature)||$6.isHexa(e.signature),"signature must be a buffer or hexa value"),On.checkState(Od.isBuffer(e.prevTxId)||$6.isHexa(e.prevTxId),"prevTxId must be a buffer or hexa value"),On.checkArgument(e.sigtype,"sigtype"),On.checkState(Nu.isNumber(e.sigtype),"sigtype must be a number")};Qn.prototype.toObject=Qn.prototype.toJSON=function(){return{publicKey:this.publicKey.toString(),prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,inputIndex:this.inputIndex,signature:this.signature.toString(),sigtype:this.sigtype}};Qn.fromObject=function(e){return On.checkArgument(e),new Qn(e)};Y6.exports=Qn});var t4=W((Zee,e4)=>{"use strict";var Dq=ku(),Z6=It(),Yee=dr(),J6=Ou(),Uq=Es(),qq=ha(),Q6=Fi(),Fq=Ui(),Hq=Pu();function da(){J6.apply(this,arguments)}Dq(da,J6);da.prototype.getSignatures=function(e,t,r,i,n,a){Z6.checkState(this.output instanceof Uq),i=i||Fq.SIGHASH_ALL;var u=t.toPublicKey();return u.toString()===this.output.script.getPublicKey().toString("hex")?[new Hq({publicKey:u,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:qq.sign(e,t,i,r,this.output.script,a),sigtype:i})]:[]};da.prototype.addSignature=function(e,t,r){return Z6.checkState(this.isValidSignature(e,t,r),"Signature is invalid"),this.setScript(Q6.buildPublicKeyIn(t.signature.toDER(),t.sigtype)),this};da.prototype.clearSignatures=function(){return this.setScript(Q6.empty()),this};da.prototype.isFullySigned=function(){return this.script.isPublicKeyIn()};da.SCRIPT_MAX_SIZE=73;da.prototype._estimateSize=function(){return this._getBaseSize()+da.SCRIPT_MAX_SIZE};e4.exports=da});var Bl=W((tte,a4)=>{"use strict";var fc=Ui(),Jee=Fi(),Qee=Es(),r4=Ss(),i4=Si(),ete=Jr(),Pl=ri(),s4=Ml(),n4=It(),Nb=xt(),Pb=function(t,r,i,n,a){var u,h,b;if(!(r&fc.SIGHASH_ANYONECANPAY)){for(var w=[],T=0;T<t.inputs.length;T++){var I=t.inputs[T],B=new r4(I.prevTxId).readReverse();w.push(B);var M=Buffer.alloc(4);M.writeUInt32LE(I.outputIndex,0),w.push(M)}u=Pl.sha256sha256(Buffer.concat(w))}if(!(r&fc.SIGHASH_ANYONECANPAY)&&(r&31)!==fc.SIGHASH_SINGLE&&(r&31)!==fc.SIGHASH_NONE){for(var P=[],L=0;L<t.inputs.length;L++){var X=Buffer.alloc(4);X.writeUInt32LE(t.inputs[L].sequenceNumber,0),P.push(X)}h=Pl.sha256sha256(Buffer.concat(P))}var V=new i4;if((r&31)!==fc.SIGHASH_SINGLE&&(r&31)!==fc.SIGHASH_NONE){for(var q=0;q<t.outputs.length;q++)t.outputs[q].toBufferWriter(V);b=Pl.sha256sha256(V.toBuffer())}else(r&31)===fc.SIGHASH_SINGLE&&i<t.outputs.length&&(t.outputs[i].toBufferWriter(V),b=Pl.sha256sha256(V.toBuffer()));var ee=new i4;ee.writeUInt32LE(t.version),ee.write(u),ee.write(h);var fe=new r4(t.inputs[i].prevTxId).readReverse();return ee.write(fe),ee.writeUInt32LE(t.inputs[i].outputIndex),ee.write(n),ee.write(a),ee.writeUInt32LE(t.inputs[i].sequenceNumber),ee.write(b),ee.writeUInt32LE(t.nLockTime),ee.writeInt32LE(r),Pl.sha256sha256(ee.toBuffer())};function zq(e,t,r,i,n,a,u){u=u||"ecdsa";var h;if(u==="ecdsa"){let b=Pb(e,r,i,n,a);return h=s4.sign(b,t).set({nhashtype:r}),h}throw new Error("signingMethod not supported ",u)}function jq(e,t,r,i,n,a,u){if(n4.checkArgument(!Nb.isUndefined(e)),n4.checkArgument(!Nb.isUndefined(t)&&!Nb.isUndefined(t.nhashtype)),u=u||"ecdsa",u==="ecdsa"){let h=Pb(e,t.nhashtype,i,n,a);return s4.verify(h,t,r)}throw new Error("signingMethod not supported ",u)}a4.exports={sighash:Pb,sign:zq,verify:jq}});var l4=W((ite,f4)=>{"use strict";var Vq=ku(),o4=It(),kd=dr(),rte=Yn(),Kq=ri(),c4=Ou(),Wq=Es(),u4=ha(),Bb=Bl(),Gq=Si(),kd=dr(),Bu=Fi(),$q=Ui(),Xq=Pu();function vi(){c4.apply(this,arguments)}Vq(vi,c4);vi.prototype.getRedeemScript=function(e){if(!this.redeemScript){var t=Bu.buildWitnessV0Out(e);if(Bu.buildScriptHashOut(t).equals(this.output.script)){var r=new Bu;r.add(t.toBuffer()),this.setScript(r),this.redeemScript=t}}return this.redeemScript};vi.prototype.getScriptCode=function(e){var t=new Gq,r;this.output.script.isScriptHashOut()?r=this.getRedeemScript(e):r=this.output.script;var i=Bu.buildPublicKeyHashOut(r.toAddress()).toBuffer();return t.writeVarintNum(i.length),t.write(i),t.toBuffer()};vi.prototype.getSighash=function(e,t,r,i){var n=this.getScriptCode(t),a=this.getSatoshisBuffer();return Bb.sighash(e,i,r,n,a)};vi.prototype.getSignatures=function(e,t,r,i,n,a){o4.checkState(this.output instanceof Wq),n=n||Kq.sha256ripemd160(t.publicKey.toBuffer()),i=i||$q.SIGHASH_ALL,a=a||"ecdsa";var u;if(this.output.script.isScriptHashOut()?u=this.getRedeemScript(t.publicKey):u=this.output.script,u&&kd.equals(n,u.getPublicKeyHash())){var h;if(u.isWitnessPublicKeyHashOut()){var b=this.getSatoshisBuffer(),w=this.getScriptCode(t.publicKey);h=Bb.sign(e,t,i,r,w,b,a)}else h=u4.sign(e,t,i,r,this.output.script,a);return[new Xq({publicKey:t.publicKey,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:h,sigtype:i})]}return[]};vi.prototype.addSignature=function(e,t,r){return o4.checkState(this.isValidSignature(e,t,r),"Signature is invalid"),this.output.script.isWitnessPublicKeyHashOut()||this.output.script.isScriptHashOut()?this.setWitnesses([kd.concat([t.signature.toDER(),kd.integerAsSingleByteBuffer(t.sigtype)]),t.publicKey.toBuffer()]):this.setScript(Bu.buildPublicKeyHashIn(t.publicKey,t.signature.toDER(),t.sigtype)),this};vi.prototype.clearSignatures=function(){return this.setScript(Bu.empty()),this.setWitnesses([]),this};vi.prototype.isFullySigned=function(){return this.script.isPublicKeyHashIn()||this.hasWitnesses()};vi.prototype.isValidSignature=function(e,t,r){if(t.signature.nhashtype=t.sigtype,this.output.script.isWitnessPublicKeyHashOut()||this.output.script.isScriptHashOut()){var i=this.getScriptCode(),n=this.getSatoshisBuffer();return Bb.verify(e,t.signature,t.publicKey,t.inputIndex,i,n,r)}else return u4.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script,r)};vi.SCRIPT_MAX_SIZE=107;vi.REDEEM_SCRIPT_SIZE=23;vi.prototype._estimateSize=function(){let e=this._getBaseSize();e+=1;let r=vi.SCRIPT_MAX_SIZE/4;return this.output.script.isWitnessPublicKeyHashOut()?e+=r:this.output.script.isScriptHashOut()?e+=r+vi.REDEEM_SCRIPT_SIZE:e+=vi.SCRIPT_MAX_SIZE,e};f4.exports=vi});var m4=W((ate,d4)=>{"use strict";var kn=xt(),Yq=ku(),nte=Nd(),Cb=Ou(),Zq=Es(),Cl=It(),h4=Fi(),Mb=Ui(),Lb=ha(),ste=Zn(),p4=dr(),Db=Pu();function Or(e,t,r,i,n){n=n||{},Cb.apply(this,arguments);var a=this;t=t||e.publicKeys,r=r||e.threshold,i=i||e.signatures,n.noSorting?this.publicKeys=t:this.publicKeys=kn.sortBy(t,function(u){return u.toString("hex")}),Cl.checkState(h4.buildMultisigOut(this.publicKeys,r).equals(this.output.script),"Provided public keys don't match to the provided output script"),this.publicKeyIndex={},kn.each(this.publicKeys,function(u,h){a.publicKeyIndex[u.toString()]=h}),this.threshold=r,this.signatures=i?this._deserializeSignatures(i):new Array(this.publicKeys.length)}Yq(Or,Cb);Or.prototype.toObject=function(){var e=Cb.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=kn.map(this.publicKeys,function(t){return t.toString()}),e.signatures=this._serializeSignatures(),e};Or.prototype._deserializeSignatures=function(e){return kn.map(e,function(t){if(t)return new Db(t)})};Or.prototype._serializeSignatures=function(){return kn.map(this.signatures,function(e){if(e)return e.toObject()})};Or.prototype.getSignatures=function(e,t,r,i,n,a){Cl.checkState(this.output instanceof Zq),i=i||Mb.SIGHASH_ALL,a=a||"ecdsa";var u=this,h=[];return kn.each(this.publicKeys,function(b){b.toString()===t.publicKey.toString()&&h.push(new Db({publicKey:t.publicKey,prevTxId:u.prevTxId,outputIndex:u.outputIndex,inputIndex:r,signature:Lb.sign(e,t,i,r,u.output.script,a),sigtype:i}))}),h};Or.prototype.addSignature=function(e,t,r){return Cl.checkState(!this.isFullySigned(),"All needed signatures have already been added"),Cl.checkArgument(!kn.isUndefined(this.publicKeyIndex[t.publicKey.toString()],"Signature Undefined"),"Signature has no matching public key"),Cl.checkState(this.isValidSignature(e,t,r),"Invalid Signature"),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this};Or.prototype._updateScript=function(){return this.setScript(h4.buildMultisigIn(this.publicKeys,this.threshold,this._createSignatures())),this};Or.prototype._createSignatures=function(){return kn.map(kn.filter(this.signatures,function(e){return!kn.isUndefined(e)}),function(e){return p4.concat([e.signature.toDER(),p4.integerAsSingleByteBuffer(e.sigtype)])})};Or.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()};Or.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold};Or.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()};Or.prototype.countSignatures=function(){return kn.reduce(this.signatures,function(e,t){return e+!!t},0)};Or.prototype.publicKeysWithoutSignature=function(){var e=this;return kn.filter(this.publicKeys,function(t){return!e.signatures[e.publicKeyIndex[t.toString()]]})};Or.prototype.isValidSignature=function(e,t,r){return t.signature.nhashtype=t.sigtype,Lb.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script,r)};Or.normalizeSignatures=function(e,t,r,i,n,a){return n.map(function(u){var h=null;return i=i.filter(function(b){if(h)return!0;var w=new Db({signature:Mb.fromTxFormat(b),publicKey:u,prevTxId:t.prevTxId,outputIndex:t.outputIndex,inputIndex:r,sigtype:Mb.SIGHASH_ALL});w.signature.nhashtype=w.sigtype;var T=Lb.verify(e,w.signature,w.publicKey,w.inputIndex,t.output.script,a);return T?(h=w,!1):!0}),h||null})};Or.OPCODES_SIZE=1;Or.SIGNATURE_SIZE=73;Or.prototype._estimateSize=function(){return this._getBaseSize()+Or.OPCODES_SIZE+this.threshold*Or.SIGNATURE_SIZE};d4.exports=Or});var x4=W((ote,b4)=>{"use strict";var Jq=xt(),Qq=ku(),Ub=Ou(),eF=Es(),Pd=It(),ao=Yn(),Mu=Fi(),tF=Ui(),qb=ha(),Fb=Bl(),rF=Si(),v4=dr(),g4=Pu();function Jt(e,t,r,i,n){n=n||{},Ub.apply(this,arguments),t=t||e.publicKeys,r=r||e.threshold,i=i||e.signatures,n.noSorting?this.publicKeys=t:this.publicKeys=Jq.sortBy(t,function(h){return h.toString("hex")}),this.redeemScript=Mu.buildMultisigOut(this.publicKeys,r,n);var a=Mu.buildWitnessMultisigOutFromScript(this.redeemScript);if(a.equals(this.output.script))this.nestedWitness=!1,this.type=ao.PayToWitnessScriptHash;else if(Mu.buildScriptHashOut(a).equals(this.output.script))this.nestedWitness=!0,this.type=ao.PayToScriptHash;else if(Mu.buildScriptHashOut(this.redeemScript).equals(this.output.script))this.nestedWitness=!1,this.type=ao.PayToScriptHash;else throw new Error("Provided public keys don't hash to the provided output");if(this.nestedWitness){var u=new Mu;u.add(a.toBuffer()),this.setScript(u)}this.publicKeyIndex={};for(let h=0;h<this.publicKeys.length;h++){let b=this.publicKeys[h];this.publicKeyIndex[b.toString()]=h}this.threshold=r,this.signatures=i?this._deserializeSignatures(i):new Array(this.publicKeys.length)}Qq(Jt,Ub);Jt.prototype.toObject=function(){var e=Ub.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=this.publicKeys.map(function(t){return t.toString()}),e.signatures=this._serializeSignatures(),e};Jt.prototype._deserializeSignatures=function(e){return e.map(function(t){if(t)return new g4(t)})};Jt.prototype._serializeSignatures=function(){return this.signatures.map(function(e){if(e)return e.toObject()})};Jt.prototype.getScriptCode=function(){var e=new rF;if(this.redeemScript.hasCodeseparators())throw new Error("@TODO");var t=this.redeemScript.toBuffer();return e.writeVarintNum(t.length),e.write(t),e.toBuffer()};Jt.prototype.getSighash=function(e,t,r,i){var n;if(this.nestedWitness||this.type===ao.PayToWitnessScriptHash){var a=this.getScriptCode(),u=this.getSatoshisBuffer();n=Fb.sighash(e,i,r,a,u)}else n=qb.sighash(e,i,r,this.redeemScript);return n};Jt.prototype.getSignatures=function(e,t,r,i,n,a){Pd.checkState(this.output instanceof eF),i=i||tF.SIGHASH_ALL,a=a||"ecdsa";let u=[];for(let T of this.publicKeys)if(T.toString()===t.publicKey.toString()){var h;if(this.nestedWitness||this.type===ao.PayToWitnessScriptHash){var b=this.getScriptCode(),w=this.getSatoshisBuffer();h=Fb.sign(e,t,i,r,b,w,a)}else h=qb.sign(e,t,i,r,this.redeemScript,a);u.push(new g4({publicKey:t.publicKey,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:h,sigtype:i}))}return u};Jt.prototype.addSignature=function(e,t,r){return Pd.checkState(!this.isFullySigned(),"All needed signatures have already been added"),Pd.checkArgument(this.publicKeyIndex[t.publicKey.toString()]!=null,"Signature has no matching public key"),Pd.checkState(this.isValidSignature(e,t,r),"Invalid Signature!"),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this};Jt.prototype._updateScript=function(){if(this.nestedWitness||this.type===ao.PayToWitnessScriptHash){for(var e=[Buffer.alloc(0)],t=this._createSignatures(),r=0;r<t.length;r++)e.push(t[r]);e.push(this.redeemScript.toBuffer()),this.setWitnesses(e)}else{var i=Mu.buildP2SHMultisigIn(this.publicKeys,this.threshold,this._createSignatures(),{cachedMultisig:this.redeemScript});this.setScript(i)}return this};Jt.prototype._createSignatures=function(){return this.signatures.filter(function(e){return e!=null}).map(function(e){return v4.concat([e.signature.toDER(),v4.integerAsSingleByteBuffer(e.sigtype)])})};Jt.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()};Jt.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold};Jt.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()};Jt.prototype.countSignatures=function(){return this.signatures.reduce(function(e,t){return e+!!t},0)};Jt.prototype.publicKeysWithoutSignature=function(){return this.publicKeys.filter(e=>!this.signatures[this.publicKeyIndex[e.toString()]])};Jt.prototype.isValidSignature=function(e,t,r){if(r=r||"ecdsa",this.nestedWitness||this.type===ao.PayToWitnessScriptHash){t.signature.nhashtype=t.sigtype;var i=this.getScriptCode(),n=this.getSatoshisBuffer();return Fb.verify(e,t.signature,t.publicKey,t.inputIndex,i,n,r)}else return t.signature.nhashtype=t.sigtype,qb.verify(e,t.signature,t.publicKey,t.inputIndex,this.redeemScript,r)};Jt.MAX_OPCODES_SIZE=8;Jt.MAX_SIGNATURE_SIZE=74;Jt.MAX_PUBKEY_SIZE=34;Jt.REDEEM_SCRIPT_SIZE=34;Jt.prototype._estimateSize=function(){let e=this._getBaseSize(),t=4,r=Jt.MAX_OPCODES_SIZE+this.threshold*Jt.MAX_SIGNATURE_SIZE+this.publicKeys.length*Jt.MAX_PUBKEY_SIZE;return this.type===ao.PayToWitnessScriptHash?e+=r/t:this.nestedWitness?e+=r/t+Jt.REDEEM_SCRIPT_SIZE:e+=r,e};b4.exports=Jt});var Bd=W((cte,Cu)=>{Cu.exports=Ou();Cu.exports.PublicKey=t4();Cu.exports.PublicKeyHash=l4();Cu.exports.MultiSig=m4();Cu.exports.MultiSigScriptHash=x4()});var ha=W((ute,S4)=>{"use strict";var Ll=Ui(),Hb=Fi(),iF=Es(),nF=Ss(),sF=Si(),aF=Jr(),oF=ri(),y4=Ml(),_4=It(),zb=xt(),w4=z6(),cF="0000000000000000000000000000000000000000000000000000000000000001",uF="ffffffffffffffff",jb=function(t,r,i,n){var a=Nd(),u=Bd(),h,b=a.shallowCopy(t);for(n=new Hb(n),n.removeCodeseparators(),h=0;h<b.inputs.length;h++)b.inputs[h]=new u(b.inputs[h]).setScript(Hb.empty());if(b.inputs[i]=new u(b.inputs[i]).setScript(n),(r&31)===Ll.SIGHASH_NONE||(r&31)===Ll.SIGHASH_SINGLE)for(h=0;h<b.inputs.length;h++)h!==i&&(b.inputs[h].sequenceNumber=0);if((r&31)===Ll.SIGHASH_NONE)b.outputs=[];else if((r&31)===Ll.SIGHASH_SINGLE){if(i>=b.outputs.length)return Buffer.from(cF,"hex");for(b.outputs.length=i+1,h=0;h<i;h++)b.outputs[h]=new iF({satoshis:aF.fromBuffer(Buffer.from(uF,"hex")),script:Hb.empty()})}r&Ll.SIGHASH_ANYONECANPAY&&(b.inputs=[b.inputs[i]]);var w=new sF().write(b.toBuffer()).writeInt32LE(r).toBuffer(),T=oF.sha256sha256(w);return T=new nF(T).readReverse(),T};function fF(e,t,r,i,n,a){a=a||"ecdsa";let u=jb(e,r,i,n),h;switch(a){case"ecdsa":h=y4.sign(u,t,"little").set({nhashtype:r});break;case"schnorr":h=w4.sign(t.toString(),u);break;default:throw new Error("signingMethod not supported ",a)}return h}function lF(e,t,r,i,n,a){_4.checkArgument(!zb.isUndefined(e),"Transaction Undefined"),_4.checkArgument(!zb.isUndefined(t)&&!zb.isUndefined(t.nhashtype),"Signature Undefined"),a=a||"ecdsa";let u=jb(e,t.nhashtype,i,n),h=!1;switch(a){case"ecdsa":h=y4.verify(u,t,r,"little");break;case"schnorr":h=w4.verify(r,u,t);break;default:throw new Error("signingMethod not supported ",a)}return h}S4.exports={sighash:jb,sign:fF,verify:lF}});var Cd=W((fte,E4)=>{"use strict";var Vb=xt(),Md=tn(),pF=It(),lc={BTC:[1e8,8],mBTC:[1e5,5],uBTC:[100,2],bits:[100,2],satoshis:[1,0]};function ot(e,t){if(!(this instanceof ot))return new ot(e,t);if(Vb.isNumber(t)){if(t<=0)throw new Md.Unit.InvalidRate(t);e=e/t,t=ot.BTC}this._value=this._from(e,t);var r=this,i=function(n){Object.defineProperty(r,n,{get:function(){return r.to(n)},enumerable:!0})};Object.keys(lc).forEach(i)}Object.keys(lc).forEach(function(e){ot[e]=e});ot.fromObject=function(t){return pF.checkArgument(Vb.isObject(t),"Argument is expected to be an object"),new ot(t.amount,t.code)};ot.fromBTC=function(e){return new ot(e,ot.BTC)};ot.fromMillis=ot.fromMilis=function(e){return new ot(e,ot.mBTC)};ot.fromMicros=ot.fromBits=function(e){return new ot(e,ot.bits)};ot.fromSatoshis=function(e){return new ot(e,ot.satoshis)};ot.fromFiat=function(e,t){return new ot(e,t)};ot.prototype._from=function(e,t){if(!lc[t])throw new Md.Unit.UnknownCode(t);return parseInt((e*lc[t][0]).toFixed())};ot.prototype.to=function(e){if(Vb.isNumber(e)){if(e<=0)throw new Md.Unit.InvalidRate(e);return parseFloat((this.BTC*e).toFixed(2))}if(!lc[e])throw new Md.Unit.UnknownCode(e);var t=this._value/lc[e][0];return parseFloat(t.toFixed(lc[e][1]))};ot.prototype.toBTC=function(){return this.to(ot.BTC)};ot.prototype.toMillis=ot.prototype.toMilis=function(){return this.to(ot.mBTC)};ot.prototype.toMicros=ot.prototype.toBits=function(){return this.to(ot.bits)};ot.prototype.toSatoshis=function(){return this.to(ot.satoshis)};ot.prototype.atRate=function(e){return this.to(e)};ot.prototype.toString=function(){return this.satoshis+" satoshis"};ot.prototype.toObject=ot.prototype.toJSON=function(){return{amount:this.BTC,code:ot.BTC}};ot.prototype.inspect=function(){return"<Unit: "+this.toString()+">"};E4.exports=ot});var Kb=W((lte,R4)=>{"use strict";var ma=xt(),Ld=It(),T4=Dr(),hF=Fi(),dF=Yn(),I4=Cd();function va(e){if(!(this instanceof va))return new va(e);Ld.checkArgument(ma.isObject(e),"Must provide an object from where to extract data");var t=e.address?new dF(e.address):void 0,r=e.txid?e.txid:e.txId;if(!r||!T4.isHexaString(r)||r.length>64)throw new Error("Invalid TXID in object",e);var i=ma.isUndefined(e.vout)?e.outputIndex:e.vout;if(!ma.isNumber(i))throw new Error("Invalid outputIndex, received "+i);Ld.checkArgument(!ma.isUndefined(e.scriptPubKey)||!ma.isUndefined(e.script),"Must provide the scriptPubKey for that output!");var n=new hF(e.scriptPubKey||e.script);Ld.checkArgument(!ma.isUndefined(e.amount)||!ma.isUndefined(e.satoshis),"Must provide an amount for the output");var a=ma.isUndefined(e.amount)?e.satoshis:new I4.fromBTC(e.amount).toSatoshis();Ld.checkArgument(ma.isNumber(a),"Amount must be a number"),T4.defineImmutable(this,{address:t,txId:r,outputIndex:i,script:n,satoshis:a})}va.prototype.inspect=function(){return"<UnspentOutput: "+this.txId+":"+this.outputIndex+", satoshis: "+this.satoshis+", address: "+this.address+">"};va.prototype.toString=function(){return this.txId+":"+this.outputIndex};va.fromObject=function(e){return new va(e)};va.prototype.toObject=va.prototype.toJSON=function(){return{address:this.address?this.address.toString():void 0,txid:this.txId,vout:this.outputIndex,scriptPubKey:this.script.toBuffer().toString("hex"),amount:I4.fromSatoshis(this.satoshis).toBTC()}};R4.exports=va});var Nd=W((pte,P4)=>{"use strict";var co=xt(),kr=It(),mF=require("buffer"),A4=Buffer.compare||GE(),Gr=tn(),vF=dr(),Ud=Dr(),Wb=Ss(),Lu=Si(),Gb=ri(),gF=Ui(),bF=ha(),xF=Bl(),_F=Yn(),O4=Kb(),Nr=Bd(),yF=Nr.PublicKeyHash,wF=Nr.PublicKey,SF=Nr.MultiSigScriptHash,EF=Nr.MultiSig,uo=Es(),oo=Fi(),TF=Du(),Dd=Jr();function ie(e,t){if(!(this instanceof ie))return new ie(e);if(this.inputs=[],this.outputs=[],this._inputAmount=void 0,this._outputAmount=void 0,e){if(e instanceof ie)return ie.shallowCopy(e);if(Ud.isHexa(e))this.fromString(e);else if(vF.isBuffer(e))this.fromBuffer(e);else if(co.isObject(e))this.fromObject(e,t);else throw new Gr.InvalidArgument("Must provide an object or string to deserialize a transaction")}else this._newTransaction()}var k4=2,IF=0,RF=1e6;ie.DUST_AMOUNT=546;ie.FEE_SECURITY_MARGIN=150;ie.MAX_MONEY=21e6*1e8;ie.NLOCKTIME_BLOCKHEIGHT_LIMIT=5e8;ie.NLOCKTIME_MAX_VALUE=4294967295;ie.FEE_PER_KB=1e5;ie.CHANGE_OUTPUT_MAX_SIZE=62;ie.MAXIMUM_EXTRA_SIZE=26;ie.shallowCopy=function(e){var t=new ie(e.toBuffer());return t};var N4={configurable:!1,enumerable:!0,get:function(){return this._hash=new Wb(this._getHash()).readReverse().toString("hex"),this._hash}},AF={configurable:!1,enumerable:!0,get:function(){return new Wb(this._getWitnessHash()).readReverse().toString("hex")}};Object.defineProperty(ie.prototype,"witnessHash",AF);Object.defineProperty(ie.prototype,"hash",N4);Object.defineProperty(ie.prototype,"id",N4);var $b={configurable:!1,enumerable:!0,get:function(){return this._getInputAmount()}};Object.defineProperty(ie.prototype,"inputAmount",$b);$b.get=function(){return this._getOutputAmount()};Object.defineProperty(ie.prototype,"outputAmount",$b);Object.defineProperty(ie.prototype,"size",{configurable:!1,enumerable:!1,get:function(){return this._calculateSize()}});Object.defineProperty(ie.prototype,"vsize",{configurable:!1,enumerable:!1,get:function(){return this._calculateVSize()}});Object.defineProperty(ie.prototype,"weight",{configurable:!1,enumerable:!1,get:function(){return this._calculateWeight()}});ie.prototype._getHash=function(){return Gb.sha256sha256(this.toBuffer(!0))};ie.prototype._getWitnessHash=function(){return Gb.sha256sha256(this.toBuffer(!1))};ie.prototype.serialize=function(e){return e===!0||e&&e.disableAll?this.uncheckedSerialize():this.checkedSerialize(e)};ie.prototype.uncheckedSerialize=ie.prototype.toString=function(){return this.toBuffer().toString("hex")};ie.prototype.checkedSerialize=function(e){var t=this.getSerializationError(e);if(t)throw t.message+=" - For more information please see: https://github.com/bitpay/bitcore/blob/master/packages/bitcore-lib/docs/transaction.md#serialization-checks",t;return this.uncheckedSerialize()};ie.prototype.invalidSatoshis=function(){for(var e=!1,t=0;t<this.outputs.length;t++)this.outputs[t].invalidSatoshis()&&(e=!0);return e};ie.prototype.getSerializationError=function(e){if(e=e||{},this.invalidSatoshis())return new Gr.Transaction.InvalidSatoshis;var t=this._getUnspentValue(),r;return t<0?e.disableMoreOutputThanInput||(r=new Gr.Transaction.InvalidOutputAmountSum):r=this._hasFeeError(e,t),r||this._hasDustOutputs(e)||this._isMissingSignatures(e)};ie.prototype._hasFeeError=function(e,t){if(this._fee!=null&&this._fee!==t)return new Gr.Transaction.FeeError.Different("Unspent value is "+t+" but specified fee is "+this._fee);if(!e.disableLargeFees){var r=Math.floor(ie.FEE_SECURITY_MARGIN*this._estimateFee());if(t>r)return this._missingChange()?new Gr.Transaction.ChangeAddressMissing("Fee is too large and no change address was provided"):new Gr.Transaction.FeeError.TooLarge("expected less than "+r+" but got "+t)}if(!e.disableSmallFees){var i=Math.ceil(this._estimateFee()/ie.FEE_SECURITY_MARGIN);if(t<i)return new Gr.Transaction.FeeError.TooSmall("expected more than "+i+" but got "+t)}};ie.prototype._missingChange=function(){return!this._changeScript};ie.prototype._hasDustOutputs=function(e){if(!e.disableDustOutputs){var t,r;for(t in this.outputs)if(r=this.outputs[t],r.satoshis<ie.DUST_AMOUNT&&!r.script.isDataOut())return new Gr.Transaction.DustOutputs}};ie.prototype._isMissingSignatures=function(e){if(!e.disableIsFullySigned&&!this.isFullySigned())return new Gr.Transaction.MissingSignatures};ie.prototype.inspect=function(){return"<Transaction: "+this.uncheckedSerialize()+">"};ie.prototype.toBuffer=function(e){var t=new Lu;return this.toBufferWriter(t,e).toBuffer()};ie.prototype.hasWitnesses=function(){for(var e=0;e<this.inputs.length;e++)if(this.inputs[e].hasWitnesses())return!0;return!1};ie.prototype.toBufferWriter=function(e,t){e.writeInt32LE(this.version);let r=this.hasWitnesses();r&&!t&&e.write(Buffer.from("0001","hex")),e.writeVarintNum(this.inputs?this.inputs.length:0);for(let i of this.inputs||[])i.toBufferWriter(e);e.writeVarintNum(this.outputs?this.outputs.length:0);for(let i of this.outputs||[])i.toBufferWriter(e);if(r&&!t)for(let i of this.inputs){let n=i.getWitnesses();e.writeVarintNum(n.length);for(let a=0;a<n.length;a++)e.writeVarintNum(n[a].length),e.write(n[a])}return e.writeUInt32LE(this.nLockTime),e};ie.prototype.fromBuffer=function(e){var t=new Wb(e);return this.fromBufferReader(t)};ie.prototype.fromBufferReader=function(e){kr.checkArgument(!e.finished(),"No transaction data received"),this.version=e.readInt32LE();var t=e.readVarintNum(),r=!1;t===0&&e.buf[e.pos]!==0&&(e.pos+=1,r=!0,t=e.readVarintNum());for(var i=0;i<t;i++){var n=Nr.fromBufferReader(e);this.inputs.push(n)}for(var a=e.readVarintNum(),u=0;u<a;u++)this.outputs.push(uo.fromBufferReader(e));if(r)for(var h=0;h<t;h++){for(var b=e.readVarintNum(),w=[],T=0;T<b;T++){var I=e.readVarintNum(),B=e.read(I);w.push(B)}this.inputs[h].setWitnesses(w)}return this.nLockTime=e.readUInt32LE(),this};ie.prototype.toObject=ie.prototype.toJSON=function(){var t=[];this.inputs.forEach(function(n){t.push(n.toObject())});var r=[];this.outputs.forEach(function(n){r.push(n.toObject())});var i={hash:this.hash,version:this.version,inputs:t,outputs:r,nLockTime:this.nLockTime};return this._changeScript&&(i.changeScript=this._changeScript.toString()),this._changeIndex!=null&&(i.changeIndex=this._changeIndex),this._fee!=null&&(i.fee=this._fee),i};ie.prototype.fromObject=function(t,r){kr.checkArgument(co.isObject(t)||t instanceof ie);var i;t instanceof ie?i=t.toObject():i=t;for(let u of i.inputs||[]){if(!u.output||!u.output.script){this.uncheckedAddInput(new Nr(u));continue}var n=new oo(u.output.script),a;if((n.isScriptHashOut()||n.isWitnessScriptHashOut())&&u.publicKeys&&u.threshold)a=new Nr.MultiSigScriptHash(u,u.publicKeys,u.threshold,u.signatures,r);else if(n.isPublicKeyHashOut()||n.isWitnessPublicKeyHashOut()||n.isScriptHashOut())a=new Nr.PublicKeyHash(u);else if(n.isPublicKeyOut())a=new Nr.PublicKey(u);else throw new Gr.Transaction.Input.UnsupportedScript(u.output.script);this.addInput(a)}for(let u of i.outputs||[])this.addOutput(new uo(u));return i.changeIndex&&(this._changeIndex=i.changeIndex),i.changeScript&&(this._changeScript=new oo(i.changeScript)),i.fee&&(this._fee=i.fee),this.nLockTime=i.nLockTime,this.version=i.version,this._checkConsistency(t),this};ie.prototype._checkConsistency=function(e){this._changeIndex!=null&&(kr.checkState(this._changeScript,"Change script is expected."),kr.checkState(this.outputs[this._changeIndex],"Change index points to undefined output."),kr.checkState(this.outputs[this._changeIndex].script.toString()===this._changeScript.toString(),"Change output has an unexpected script.")),e&&e.hash&&kr.checkState(e.hash===this.hash,"Hash in object does not match transaction hash.")};ie.prototype.lockUntilDate=function(e){if(kr.checkArgument(e),!isNaN(e)&&e<ie.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new Gr.Transaction.LockTimeTooEarly;co.isDate(e)&&(e=e.getTime()/1e3);for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===Nr.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=Nr.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this};ie.prototype.lockUntilBlockHeight=function(e){if(kr.checkArgument(!isNaN(e)),e>=ie.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new Gr.Transaction.BlockHeightTooHigh;if(e<0)throw new Gr.Transaction.NLockTimeOutOfRange;for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===Nr.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=Nr.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this};ie.prototype.getLockTime=function(){return this.nLockTime?this.nLockTime<ie.NLOCKTIME_BLOCKHEIGHT_LIMIT?this.nLockTime:new Date(1e3*this.nLockTime):null};ie.prototype.fromString=function(e){this.fromBuffer(mF.Buffer.from(e,"hex"))};ie.prototype._newTransaction=function(){this.version=k4,this.nLockTime=IF};ie.prototype.from=function(e,t,r,i){if(Array.isArray(e)){for(let a of e)this.from(a,t,r,i);return this}return this.inputs.some(function(a){return a.prevTxId.toString("hex")===e.txId&&a.outputIndex===e.outputIndex})?this:(t&&r?this._fromMultisigUtxo(e,t,r,i):this._fromNonP2SH(e),this)};ie.prototype.associateInputs=function(e,t,r,i){let n=[];for(let a of e){let u=this.inputs.findIndex(h=>h.prevTxId.toString("hex")===a.txId&&h.outputIndex===a.outputIndex);if(n.push(u),u>=0){let h=this.inputs[u].sequenceNumber;this.inputs[u]=this._getInputFrom(a,t,r,i),this.inputs[u].sequenceNumber=h}}return n};ie.prototype._selectInputType=function(e,t,r){var i;return e=new O4(e),t&&r?e.script.isMultisigOut()?i=EF:(e.script.isScriptHashOut()||e.script.isWitnessScriptHashOut())&&(i=SF):e.script.isPublicKeyHashOut()||e.script.isWitnessPublicKeyHashOut()||e.script.isScriptHashOut()?i=yF:e.script.isPublicKeyOut()?i=wF:i=Nr,i};ie.prototype._getInputFrom=function(e,t,r,i){e=new O4(e);let n=this._selectInputType(e,t,r),a={output:new uo({script:e.script,satoshis:e.satoshis}),prevTxId:e.txId,outputIndex:e.outputIndex,sequenceNumber:e.sequenceNumber,script:oo.empty()},u=t&&r?[t,r,!1,i]:[];return new n(a,...u)};ie.prototype._fromNonP2SH=function(e){let t=this._getInputFrom(e);this.addInput(t)};ie.prototype._fromMultisigUtxo=function(e,t,r,i){kr.checkArgument(r<=t.length,"Number of required signatures must be greater than the number of public keys");let n=this._getInputFrom(e,t,r,i);this.addInput(n)};ie.prototype.addInput=function(e,t,r){if(kr.checkArgumentType(e,Nr,"input"),!e.output&&(t==null||r==null))throw new Gr.Transaction.NeedMoreInfo("Need information about the UTXO script and satoshis");return!e.output&&t&&r!=null&&(t=t instanceof oo?t:new oo(t),kr.checkArgumentType(r,"number","satoshis"),e.output=new uo({script:t,satoshis:r})),this.uncheckedAddInput(e)};ie.prototype.uncheckedAddInput=function(e){return kr.checkArgumentType(e,Nr,"input"),this.inputs.push(e),this._inputAmount=void 0,this._updateChangeOutput(),this};ie.prototype.hasAllUtxoInfo=function(){return this.inputs.every(function(e){return!!e.output})};ie.prototype.fee=function(e){return kr.checkArgument(!isNaN(e),"amount must be a number"),this._fee=e,this._updateChangeOutput(),this};ie.prototype.feePerKb=function(e){return kr.checkArgument(!isNaN(e),"amount must be a number"),this._feePerKb=e,this._updateChangeOutput(),this};ie.prototype.feePerByte=function(e){return kr.checkArgument(!isNaN(e),"amount must be a number"),this._feePerByte=e,this._updateChangeOutput(),this};ie.prototype.change=function(e){return kr.checkArgument(e,"address is required"),this._changeScript=oo.fromAddress(e),this._updateChangeOutput(),this};ie.prototype.getChangeOutput=function(){return this._changeIndex!=null?this.outputs[this._changeIndex]:null};ie.prototype.to=function(e,t){if(Array.isArray(e)){for(let r of e)this.to(r.address,r.satoshis);return this}return kr.checkArgument(Ud.isNaturalNumber(t),"Amount is expected to be a positive integer"),this.addOutput(new uo({script:oo(new _F(e)),satoshis:t})),this};ie.prototype.addData=function(e){return this.addOutput(new uo({script:oo.buildDataOut(e),satoshis:0})),this};ie.prototype.addOutput=function(e){return kr.checkArgumentType(e,uo,"output"),this._addOutput(e),this._updateChangeOutput(),this};ie.prototype.clearOutputs=function(){return this.outputs=[],this._clearSignatures(),this._outputAmount=void 0,this._changeIndex=void 0,this._updateChangeOutput(),this};ie.prototype._addOutput=function(e){this.outputs.push(e),this._outputAmount=void 0};ie.prototype._getOutputAmount=function(){if(this._outputAmount==null){var e=this;this._outputAmount=0;for(let t of this.outputs||[])e._outputAmount+=t.satoshis}return this._outputAmount};ie.prototype._getInputAmount=function(){return this._inputAmount==null&&(this._inputAmount=co.sumBy(this.inputs,function(e){if(e.output==null)throw new Gr.Transaction.Input.MissingPreviousOutput;return e.output.satoshis})),this._inputAmount};ie.prototype._updateChangeOutput=function(e){if(this._changeScript){e||this._clearSignatures(),this._changeIndex!=null&&this._removeOutput(this._changeIndex);var t=this._getUnspentValue(),r=this.getFee(),i=t-r;i>ie.DUST_AMOUNT?(this._changeIndex=this.outputs.length,this._addOutput(new uo({script:this._changeScript,satoshis:i}))):this._changeIndex=void 0}};ie.prototype.getFee=function(){return this.isCoinbase()?0:this._fee!=null?this._fee:this._changeScript?this._estimateFee():this._getUnspentValue()};ie.prototype._estimateFee=function(){let e=this._estimateSize(),t=this._getUnspentValue(),r=this._feePerByte||(this._feePerKb||ie.FEE_PER_KB)/1e3;function i(u){return u*r}let n=Math.ceil(i(e)),a=Math.ceil(i(e)+i(this._estimateSizeOfChangeOutput()));return!this._changeScript||t<=a?n:a};ie.prototype._estimateSizeOfChangeOutput=function(){if(!this._changeScript)return 0;let e=this._changeScript.toBuffer().length;return 8+Lu.varintBufNum(e).length+e};ie.prototype._getUnspentValue=function(){return this._getInputAmount()-this._getOutputAmount()};ie.prototype._clearSignatures=function(){for(let e of this.inputs||[])e.clearSignatures()};ie.prototype._estimateSize=function(){let e=4;this.hasWitnesses()&&(e+=.5),e+=Lu.varintBufNum(this.inputs.length).length;for(let t of this.inputs||[])e+=t._estimateSize();e+=Lu.varintBufNum(this.outputs.length).length;for(let t of this.outputs||[])e+=t.calculateSize();return e+=4,Math.ceil(e)};ie.prototype._calculateSize=function(){return this.toBuffer().length};ie.prototype._calculateVSize=function(e){let t=this._calculateWeight()/4;return e?t:Math.ceil(t)};ie.prototype._calculateWeight=function(){return this.toBuffer(!0).length*3+this.toBuffer(!1).length};ie.prototype._removeOutput=function(e){var t=this.outputs[e];this.outputs=co.without(this.outputs,t),this._outputAmount=void 0};ie.prototype.removeOutput=function(e){this._removeOutput(e),this._updateChangeOutput()};ie.prototype.sort=function(){return this.sortInputs(function(e){var t=Array.prototype.concat.apply([],e);let r=0;return t.forEach(i=>{i.i=r++}),t.sort(function(i,n){return A4(i.prevTxId,n.prevTxId)||i.outputIndex-n.outputIndex||i.i-n.i}),t}),this.sortOutputs(function(e){var t=Array.prototype.concat.apply([],e);let r=0;return t.forEach(i=>{i.i=r++}),t.sort(function(i,n){return i.satoshis-n.satoshis||A4(i.script.toBuffer(),n.script.toBuffer())||i.i-n.i}),t}),this};ie.prototype.shuffleOutputs=function(){return this.sortOutputs(co.shuffle)};ie.prototype.sortOutputs=function(e){var t=e(this.outputs);return this._newOutputOrder(t)};ie.prototype.sortInputs=function(e){return this.inputs=e(this.inputs),this._clearSignatures(),this};ie.prototype._newOutputOrder=function(e){var t=this.outputs.length!==e.length||co.difference(this.outputs,e).length!==0;if(t)throw new Gr.Transaction.InvalidSorting;if(this._changeIndex!=null){var r=this.outputs[this._changeIndex];this._changeIndex=e.indexOf(r)}return this.outputs=e,this};ie.prototype.removeInput=function(e,t){var r;if(!t&&!isNaN(e)?r=e:r=this.inputs.findIndex(function(n){return n.prevTxId.toString("hex")===e&&n.outputIndex===t}),r<0||r>=this.inputs.length)throw new Gr.Transaction.InvalidIndex(r,this.inputs.length);var i=this.inputs[r];this.inputs=co.without(this.inputs,i),this._inputAmount=void 0,this._updateChangeOutput()};ie.prototype.sign=function(e,t,r){if(kr.checkState(this.hasAllUtxoInfo(),"Not all utxo information is available to sign the transaction."),Array.isArray(e)){for(let i of e)this.sign(i,t,r);return this}for(let i of this.getSignatures(e,t,r))this.applySignature(i,r);return this};ie.prototype.getSignatures=function(e,t,r){e=new TF(e),t=t||gF.SIGHASH_ALL;var i=this,n=[],a=Gb.sha256ripemd160(e.publicKey.toBuffer());for(let u=0;u<this.inputs.length;u++){let h=this.inputs[u];for(let b of h.getSignatures(i,e,u,t,a,r))n.push(b)}return n};ie.prototype.applySignature=function(e,t){return this.inputs[e.inputIndex].addSignature(this,e,t),this};ie.prototype.isFullySigned=function(){for(let e of this.inputs||[])if(e.isFullySigned===Nr.prototype.isFullySigned)throw new Gr.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs.every(function(e){return e.isFullySigned()})};ie.prototype.isValidSignature=function(e,t){if(this.inputs[e.inputIndex].isValidSignature===Nr.prototype.isValidSignature)throw new Gr.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs[e.inputIndex].isValidSignature(this,e,t)};ie.prototype.verifySignature=function(e,t,r,i,n,a,u){if(n==null&&(n=0),n===1){var h=i.toBuffer(),b=new Lu;b.writeVarintNum(h.length),b.write(h);var w;a?(kr.checkState(Ud.isNaturalNumber(a)),w=new Lu().writeUInt64LEBN(new Dd(a)).toBuffer()):w=this.inputs[r].getSatoshisBuffer();var T=xF.verify(this,e,t,r,b.toBuffer(),w,u);return T}return bF.verify(this,e,t,r,i,u)};ie.prototype.verify=function(){if(this.inputs.length===0)return"transaction txins empty";if(this.outputs.length===0)return"transaction txouts empty";for(var e=new Dd(0),t=0;t<this.outputs.length;t++){var r=this.outputs[t];if(r.invalidSatoshis())return"transaction txout "+t+" satoshis is invalid";if(r._satoshisBN.gt(new Dd(ie.MAX_MONEY,10)))return"transaction txout "+t+" greater than MAX_MONEY";if(e=e.add(r._satoshisBN),e.gt(new Dd(ie.MAX_MONEY)))return"transaction txout "+t+" total output greater than MAX_MONEY"}if(this.toBuffer().length>RF)return"transaction over the maximum block size";var i={};for(t=0;t<this.inputs.length;t++){var n=this.inputs[t],a=n.prevTxId+":"+n.outputIndex;if(i[a]!=null)return"transaction input "+t+" duplicate input";i[a]=!0}var u=this.isCoinbase();if(u){var h=this.inputs[0]._scriptBuffer;if(h.length<2||h.length>100)return"coinbase transaction script size invalid"}else for(t=0;t<this.inputs.length;t++)if(this.inputs[t].isNull())return"transaction input "+t+" has null input";return!0};ie.prototype.isCoinbase=function(){return this.inputs.length===1&&this.inputs[0].isNull()};ie.prototype.isRBF=function(){for(var e=0;e<this.inputs.length;e++){var t=this.inputs[e];if(t.sequenceNumber<Nr.MAXINT-1)return!0}return!1};ie.prototype.enableRBF=function(){for(var e=0;e<this.inputs.length;e++){var t=this.inputs[e];t.sequenceNumber>=Nr.MAXINT-1&&(t.sequenceNumber=Nr.DEFAULT_RBF_SEQNUMBER)}return this};ie.prototype.setVersion=function(e){return kr.checkArgument(Ud.isNaturalNumber(e)&&e<=k4,"Wrong version number"),this.version=e,this};P4.exports=ie});var Dl=W((hte,fo)=>{fo.exports=Nd();fo.exports.Input=Bd();fo.exports.Output=Es();fo.exports.UnspentOutput=Kb();fo.exports.Signature=Pu();fo.exports.Sighash=ha();fo.exports.SighashWitness=Bl()});var M4=W((dte,B4)=>{"use strict";var Uu=xt(),lo=eb(),G=gd(),ct=Jr(),qu=ri(),Ul=Ui(),qd=Zn(),ue=function e(t){if(!(this instanceof e))return new e(t);t?(this.initialize(),this.set(t)):this.initialize()};ue.SIGVERSION_BASE=0;ue.SIGVERSION_WITNESS_V0=1;ue.SIGVERSION_TAPROOT=2;ue.SIGVERSION_TAPSCRIPT=3;ue.prototype.verifyWitnessProgram=function(e,t,r,i,n){var a=new lo,u=[];if(e===0)if(t.length===32){if(r.length===0)return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY",!1;var h=r[r.length-1];a=new lo(h);var b=qu.sha256(h);if(b.toString("hex")!==t.toString("hex"))return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH",!1;u=r.slice(0,-1)}else if(t.length===20){if(r.length!==2)return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH",!1;a.add(G.OP_DUP),a.add(G.OP_HASH160),a.add(t),a.add(G.OP_EQUALVERIFY),a.add(G.OP_CHECKSIG),u=r}else return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH",!1;else return n&ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM?(this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM",!1):!0;if(this.initialize(),this.set({script:a,stack:u,sigversion:ue.SIGVERSION_WITNESS_V0,satoshis:i,flags:n}),!this.evaluate())return!1;if(this.stack.length!==1)return this.errstr="SCRIPT_ERR_EVAL_FALSE",!1;var w=this.stack[this.stack.length-1];return ue.castToBool(w)?!0:(this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_STACK",!1)};ue.prototype.verify=function(e,t,r,i,n,a,u){var h=Dl();Uu.isUndefined(r)&&(r=new h),Uu.isUndefined(i)&&(i=0),Uu.isUndefined(n)&&(n=0),Uu.isUndefined(a)&&(a=null),Uu.isUndefined(u)&&(u=0),this.set({script:e,tx:r,nin:i,sigversion:ue.SIGVERSION_BASE,satoshis:0,flags:n});var b;if(n&ue.SCRIPT_VERIFY_SIGPUSHONLY&&!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(!this.evaluate())return!1;n&ue.SCRIPT_VERIFY_P2SH&&(b=this.stack.slice());var w=this.stack;if(this.initialize(),this.set({script:t,stack:w,tx:r,nin:i,flags:n}),!this.evaluate())return!1;if(this.stack.length===0)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_RESULT",!1;var T=this.stack[this.stack.length-1];if(!ue.castToBool(T))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_STACK",!1;var I=!1;if(n&ue.SCRIPT_VERIFY_WITNESS){var B={};if(t.isWitnessProgram(B)&&(I=!0,e.toBuffer().length!==0||!this.verifyWitnessProgram(B.version,B.program,a,u,this.flags)))return!1}if(n&ue.SCRIPT_VERIFY_P2SH&&t.isScriptHashOut()){if(!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(b.length===0)throw new Error("internal error - stack copy empty");var M=b[b.length-1],P=lo.fromBuffer(M);if(b.pop(),this.initialize(),this.set({script:P,stack:b,tx:r,nin:i,flags:n}),!this.evaluate())return!1;if(b.length===0)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_P2SH_STACK",!1;if(!ue.castToBool(b[b.length-1]))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_P2SH_STACK",!1;if(n&ue.SCRIPT_VERIFY_WITNESS){var L={};if(P.isWitnessProgram(L)){I=!0;var X=new lo;if(X.add(P.toBuffer()),e.toHex()!==X.toHex())return this.errstr="SCRIPT_ERR_WITNESS_MALLEATED_P2SH",!1;if(!this.verifyWitnessProgram(L.version,L.program,a,u,this.flags))return!1;w=[w[0]]}}}if(this.flags&ue.SCRIPT_VERIFY_CLEANSTACK){if(!(this.flags&ue.SCRIPT_VERIFY_P2SH))throw"flags & SCRIPT_VERIFY_P2SH";if(b.length!=1)return this.errstr="SCRIPT_ERR_CLEANSTACK",!1}return this.flags&ue.SCRIPT_VERIFY_WITNESS&&!I&&a.length>0?(this.errstr="SCRIPT_ERR_WITNESS_UNEXPECTED",!1):!0};B4.exports=ue;ue.prototype.initialize=function(e){this.stack=[],this.altstack=[],this.pc=0,this.satoshis=0,this.sigversion=ue.SIGVERSION_BASE,this.pbegincodehash=0,this.nOpCount=0,this.vfExec=[],this.errstr="",this.flags=0};ue.prototype.set=function(e){this.script=e.script||this.script,this.tx=e.tx||this.tx,this.nin=typeof e.nin<"u"?e.nin:this.nin,this.stack=e.stack||this.stack,this.altstack=e.altack||this.altstack,this.pc=typeof e.pc<"u"?e.pc:this.pc,this.pbegincodehash=typeof e.pbegincodehash<"u"?e.pbegincodehash:this.pbegincodehash,this.sigversion=typeof e.sigversion<"u"?e.sigversion:this.sigversion,this.satoshis=typeof e.satoshis<"u"?e.satoshis:this.satoshis,this.nOpCount=typeof e.nOpCount<"u"?e.nOpCount:this.nOpCount,this.vfExec=e.vfExec||this.vfExec,this.errstr=e.errstr||this.errstr,this.flags=typeof e.flags<"u"?e.flags:this.flags};ue.true=Buffer.from([1]);ue.false=Buffer.from([]);ue.MAX_SCRIPT_ELEMENT_SIZE=520;ue.LOCKTIME_THRESHOLD=5e8;ue.LOCKTIME_THRESHOLD_BN=new ct(ue.LOCKTIME_THRESHOLD);ue.SCRIPT_VERIFY_NONE=0;ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM=4096;ue.SCRIPT_VERIFY_P2SH=1;ue.SCRIPT_VERIFY_STRICTENC=2;ue.SCRIPT_VERIFY_DERSIG=4;ue.SCRIPT_VERIFY_LOW_S=8;ue.SCRIPT_VERIFY_NULLDUMMY=16;ue.SCRIPT_VERIFY_SIGPUSHONLY=32;ue.SCRIPT_VERIFY_MINIMALDATA=64;ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=128;ue.SCRIPT_VERIFY_CLEANSTACK=256,ue.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY=512;ue.SCRIPT_VERIFY_WITNESS=1024;ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=2048;ue.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY=1024;ue.SCRIPT_VERIFY_MINIMALIF=8192;ue.SCRIPT_VERIFY_NULLFAIL=16384;ue.SCRIPT_VERIFY_WITNESS_PUBKEYTYPE=32768;ue.SCRIPT_ENABLE_SIGHASH_FORKID=65536;ue.SCRIPT_ENABLE_REPLAY_PROTECTION=1<<17;ue.SCRIPT_ENABLE_MONOLITH_OPCODES=1<<18;ue.SEQUENCE_LOCKTIME_DISABLE_FLAG=1<<31;ue.SEQUENCE_LOCKTIME_TYPE_FLAG=1<<22;ue.SEQUENCE_LOCKTIME_MASK=65535;ue.castToBool=function(e){for(var t=0;t<e.length;t++)if(e[t]!==0)return!(t===e.length-1&&e[t]===128);return!1};ue.prototype.checkSignatureEncoding=function(e){var t;if(e.length==0)return!0;if(this.flags&(ue.SCRIPT_VERIFY_DERSIG|ue.SCRIPT_VERIFY_LOW_S|ue.SCRIPT_VERIFY_STRICTENC)&&!Ul.isTxDER(e))return this.errstr="SCRIPT_ERR_SIG_DER_INVALID_FORMAT",!1;if(this.flags&ue.SCRIPT_VERIFY_LOW_S){if(t=Ul.fromTxFormat(e),!t.hasLowS())return this.errstr="SCRIPT_ERR_SIG_DER_HIGH_S",!1}else if(this.flags&ue.SCRIPT_VERIFY_STRICTENC&&(t=Ul.fromTxFormat(e),!t.hasDefinedHashtype()))return this.errstr="SCRIPT_ERR_SIG_HASHTYPE",!1;return!0};ue.prototype.checkPubkeyEncoding=function(e){return this.flags&ue.SCRIPT_VERIFY_STRICTENC&&!qd.isValid(e)?(this.errstr="SCRIPT_ERR_PUBKEYTYPE",!1):this.flags&ue.SCRIPT_VERIFY_WITNESS_PUBKEYTYPE&&this.sigversion==ue.SIGVERSION_WITNESS_V0&&!qd.fromBuffer(e).compressed?(this.errstr="SCRIPT_ERR_WITNESS_PUBKEYTYPE",!1):!0};ue.prototype.evaluate=function(){if(this.script.toBuffer().length>1e4)return this.errstr="SCRIPT_ERR_SCRIPT_SIZE",!1;try{for(;this.pc<this.script.chunks.length;){var e=this.step();if(!e)return!1}if(this.stack.length+this.altstack.length>1e3)return this.errstr="SCRIPT_ERR_STACK_SIZE",!1}catch(t){return this.errstr="SCRIPT_ERR_UNKNOWN_ERROR: "+t,!1}return this.vfExec.length>0?(this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1):!0};ue.prototype.checkLockTime=function(e){return!(!(this.tx.nLockTime<ue.LOCKTIME_THRESHOLD&&e.lt(ue.LOCKTIME_THRESHOLD_BN)||this.tx.nLockTime>=ue.LOCKTIME_THRESHOLD&&e.gte(ue.LOCKTIME_THRESHOLD_BN))||e.gt(new ct(this.tx.nLockTime))||!this.tx.inputs[this.nin].isFinal())};ue.prototype.checkSequence=function(e){var t=this.tx.inputs[this.nin].sequenceNumber;if(this.tx.version<2||t&SEQUENCE_LOCKTIME_DISABLE_FLAG)return!1;var r=ue.SEQUENCE_LOCKTIME_TYPE_FLAG|ue.SEQUENCE_LOCKTIME_MASK,i=new ct(t&r),n=e.and(r),a=new ct(ue.SEQUENCE_LOCKTIME_TYPE_FLAG);return!(!(i.lt(a)&&n.lt(a)||i.gte(a)&&n.gte(a))||n.gt(i))};ue.prototype.step=function(){var e=(this.flags&ue.SCRIPT_VERIFY_MINIMALDATA)!==0,t=this.vfExec.indexOf(!1)===-1,r,i,n,a,u,h,b,w,T,I,B,M,P,L,X,V,q,ee=this.script.chunks[this.pc];this.pc++;var fe=ee.opcodenum;if(Uu.isUndefined(fe))return this.errstr="SCRIPT_ERR_UNDEFINED_OPCODE",!1;if(ee.buf&&ee.buf.length>ue.MAX_SCRIPT_ELEMENT_SIZE)return this.errstr="SCRIPT_ERR_PUSH_SIZE",!1;if(fe>G.OP_16&&++this.nOpCount>201)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;if(fe===G.OP_CAT||fe===G.OP_SUBSTR||fe===G.OP_LEFT||fe===G.OP_RIGHT||fe===G.OP_INVERT||fe===G.OP_AND||fe===G.OP_OR||fe===G.OP_XOR||fe===G.OP_2MUL||fe===G.OP_2DIV||fe===G.OP_MUL||fe===G.OP_DIV||fe===G.OP_MOD||fe===G.OP_LSHIFT||fe===G.OP_RSHIFT)return this.errstr="SCRIPT_ERR_DISABLED_OPCODE",!1;if(t&&0<=fe&&fe<=G.OP_PUSHDATA4){if(e&&!this.script.checkMinimalPush(this.pc-1))return this.errstr="SCRIPT_ERR_MINIMALDATA",!1;if(!ee.buf)this.stack.push(ue.false);else{if(ee.len!==ee.buf.length)throw new Error("Length of push value not equal to length of data");this.stack.push(ee.buf)}}else if(t||G.OP_IF<=fe&&fe<=G.OP_ENDIF)switch(fe){case G.OP_1NEGATE:case G.OP_1:case G.OP_2:case G.OP_3:case G.OP_4:case G.OP_5:case G.OP_6:case G.OP_7:case G.OP_8:case G.OP_9:case G.OP_10:case G.OP_11:case G.OP_12:case G.OP_13:case G.OP_14:case G.OP_15:case G.OP_16:u=fe-(G.OP_1-1),r=new ct(u).toScriptNumBuffer(),this.stack.push(r);break;case G.OP_NOP:break;case G.OP_NOP2:case G.OP_CHECKLOCKTIMEVERIFY:if(!(this.flags&ue.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)){if(this.flags&ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var _e=ct.fromScriptNumBuffer(this.stack[this.stack.length-1],e,5);if(_e.lt(new ct(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(!this.checkLockTime(_e))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case G.OP_NOP3:case G.OP_CHECKSEQUENCEVERIFY:if(!(this.flags&ue.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY)){if(this.flags&ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var Te=ct.fromScriptNumBuffer(this.stack[this.stack.length-1],e,5);if(Te.lt(new ct(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(Te&ue.SEQUENCE_LOCKTIME_DISABLE_FLAG)break;if(!this.checkSequence(Te))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case G.OP_NOP1:case G.OP_NOP4:case G.OP_NOP5:case G.OP_NOP6:case G.OP_NOP7:case G.OP_NOP8:case G.OP_NOP9:case G.OP_NOP10:if(this.flags&ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break;case G.OP_IF:case G.OP_NOTIF:{if(V=!1,t){if(this.stack.length<1)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;if(r=this.stack[this.stack.length-1],this.flags&ue.SCRIPT_VERIFY_MINIMALIF){if(r=this.stack[this.stack.length-1],r.length>1)return this.errstr="SCRIPT_ERR_MINIMALIF",!1;if(r.length==1&&r[0]!=1)return this.errstr="SCRIPT_ERR_MINIMALIF",!1}V=ue.castToBool(r),fe===G.OP_NOTIF&&(V=!V),this.stack.pop()}this.vfExec.push(V)}break;case G.OP_ELSE:{if(this.vfExec.length===0)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec[this.vfExec.length-1]=!this.vfExec[this.vfExec.length-1]}break;case G.OP_ENDIF:{if(this.vfExec.length===0)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec.pop()}break;case G.OP_VERIFY:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(r=this.stack[this.stack.length-1],V=ue.castToBool(r),V)this.stack.pop();else return this.errstr="SCRIPT_ERR_VERIFY",!1}break;case G.OP_RETURN:return this.errstr="SCRIPT_ERR_OP_RETURN",!1;case G.OP_TOALTSTACK:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.altstack.push(this.stack.pop())}break;case G.OP_FROMALTSTACK:{if(this.altstack.length<1)return this.errstr="SCRIPT_ERR_INVALID_ALTSTACK_OPERATION",!1;this.stack.push(this.altstack.pop())}break;case G.OP_2DROP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop(),this.stack.pop()}break;case G.OP_2DUP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-2],n=this.stack[this.stack.length-1],this.stack.push(i),this.stack.push(n)}break;case G.OP_3DUP:{if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-3],n=this.stack[this.stack.length-2];var be=this.stack[this.stack.length-1];this.stack.push(i),this.stack.push(n),this.stack.push(be)}break;case G.OP_2OVER:{if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-4],n=this.stack[this.stack.length-3],this.stack.push(i),this.stack.push(n)}break;case G.OP_2ROT:{if(this.stack.length<6)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=this.stack.splice(this.stack.length-6,2),this.stack.push(a[0]),this.stack.push(a[1])}break;case G.OP_2SWAP:{if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=this.stack.splice(this.stack.length-4,2),this.stack.push(a[0]),this.stack.push(a[1])}break;case G.OP_IFDUP:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;r=this.stack[this.stack.length-1],V=ue.castToBool(r),V&&this.stack.push(r)}break;case G.OP_DEPTH:r=new ct(this.stack.length).toScriptNumBuffer(),this.stack.push(r);break;case G.OP_DROP:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop()}break;case G.OP_DUP:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-1])}break;case G.OP_NIP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,1)}break;case G.OP_OVER:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-2])}break;case G.OP_PICK:case G.OP_ROLL:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(r=this.stack[this.stack.length-1],w=ct.fromScriptNumBuffer(r,e),u=w.toNumber(),this.stack.pop(),u<0||u>=this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;r=this.stack[this.stack.length-u-1],fe===G.OP_ROLL&&this.stack.splice(this.stack.length-u-1,1),this.stack.push(r)}break;case G.OP_ROT:{if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;h=this.stack[this.stack.length-3],b=this.stack[this.stack.length-2];var O=this.stack[this.stack.length-1];this.stack[this.stack.length-3]=b,this.stack[this.stack.length-2]=O,this.stack[this.stack.length-1]=h}break;case G.OP_SWAP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;h=this.stack[this.stack.length-2],b=this.stack[this.stack.length-1],this.stack[this.stack.length-2]=b,this.stack[this.stack.length-1]=h}break;case G.OP_TUCK:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,0,this.stack[this.stack.length-1])}break;case G.OP_SIZE:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;w=new ct(this.stack[this.stack.length-1].length),this.stack.push(w.toScriptNumBuffer())}break;case G.OP_EQUAL:case G.OP_EQUALVERIFY:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-2],n=this.stack[this.stack.length-1];var E=i.toString("hex")===n.toString("hex");if(this.stack.pop(),this.stack.pop(),this.stack.push(E?ue.true:ue.false),fe===G.OP_EQUALVERIFY)if(E)this.stack.pop();else return this.errstr="SCRIPT_ERR_EQUALVERIFY",!1}break;case G.OP_1ADD:case G.OP_1SUB:case G.OP_NEGATE:case G.OP_ABS:case G.OP_NOT:case G.OP_0NOTEQUAL:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(r=this.stack[this.stack.length-1],w=ct.fromScriptNumBuffer(r,e),fe){case G.OP_1ADD:w=w.add(ct.One);break;case G.OP_1SUB:w=w.sub(ct.One);break;case G.OP_NEGATE:w=w.neg();break;case G.OP_ABS:w.cmp(ct.Zero)<0&&(w=w.neg());break;case G.OP_NOT:w=new ct((w.cmp(ct.Zero)===0)+0);break;case G.OP_0NOTEQUAL:w=new ct((w.cmp(ct.Zero)!==0)+0);break}this.stack.pop(),this.stack.push(w.toScriptNumBuffer())}break;case G.OP_ADD:case G.OP_SUB:case G.OP_BOOLAND:case G.OP_BOOLOR:case G.OP_NUMEQUAL:case G.OP_NUMEQUALVERIFY:case G.OP_NUMNOTEQUAL:case G.OP_LESSTHAN:case G.OP_GREATERTHAN:case G.OP_LESSTHANOREQUAL:case G.OP_GREATERTHANOREQUAL:case G.OP_MIN:case G.OP_MAX:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(T=ct.fromScriptNumBuffer(this.stack[this.stack.length-2],e),I=ct.fromScriptNumBuffer(this.stack[this.stack.length-1],e),w=new ct(0),fe){case G.OP_ADD:w=T.add(I);break;case G.OP_SUB:w=T.sub(I);break;case G.OP_BOOLAND:w=new ct((T.cmp(ct.Zero)!==0&&I.cmp(ct.Zero)!==0)+0);break;case G.OP_BOOLOR:w=new ct((T.cmp(ct.Zero)!==0||I.cmp(ct.Zero)!==0)+0);break;case G.OP_NUMEQUAL:w=new ct((T.cmp(I)===0)+0);break;case G.OP_NUMEQUALVERIFY:w=new ct((T.cmp(I)===0)+0);break;case G.OP_NUMNOTEQUAL:w=new ct((T.cmp(I)!==0)+0);break;case G.OP_LESSTHAN:w=new ct((T.cmp(I)<0)+0);break;case G.OP_GREATERTHAN:w=new ct((T.cmp(I)>0)+0);break;case G.OP_LESSTHANOREQUAL:w=new ct((T.cmp(I)<=0)+0);break;case G.OP_GREATERTHANOREQUAL:w=new ct((T.cmp(I)>=0)+0);break;case G.OP_MIN:w=T.cmp(I)<0?T:I;break;case G.OP_MAX:w=T.cmp(I)>0?T:I;break}if(this.stack.pop(),this.stack.pop(),this.stack.push(w.toScriptNumBuffer()),fe===G.OP_NUMEQUALVERIFY)if(ue.castToBool(this.stack[this.stack.length-1]))this.stack.pop();else return this.errstr="SCRIPT_ERR_NUMEQUALVERIFY",!1}break;case G.OP_WITHIN:{if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;T=ct.fromScriptNumBuffer(this.stack[this.stack.length-3],e),I=ct.fromScriptNumBuffer(this.stack[this.stack.length-2],e);var f=ct.fromScriptNumBuffer(this.stack[this.stack.length-1],e);V=I.cmp(T)<=0&&T.cmp(f)<0,this.stack.pop(),this.stack.pop(),this.stack.pop(),this.stack.push(V?ue.true:ue.false)}break;case G.OP_RIPEMD160:case G.OP_SHA1:case G.OP_SHA256:case G.OP_HASH160:case G.OP_HASH256:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;r=this.stack[this.stack.length-1];var c;fe===G.OP_RIPEMD160?c=qu.ripemd160(r):fe===G.OP_SHA1?c=qu.sha1(r):fe===G.OP_SHA256?c=qu.sha256(r):fe===G.OP_HASH160?c=qu.sha256ripemd160(r):fe===G.OP_HASH256&&(c=qu.sha256sha256(r)),this.stack.pop(),this.stack.push(c)}break;case G.OP_CODESEPARATOR:this.pbegincodehash=this.pc;break;case G.OP_CHECKSIG:case G.OP_CHECKSIGVERIFY:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(B=this.stack[this.stack.length-2],M=this.stack[this.stack.length-1],!this.checkSignatureEncoding(B)||!this.checkPubkeyEncoding(M))return!1;P=new lo().set({chunks:this.script.chunks.slice(this.pbegincodehash)});var p=new lo().add(B);P.findAndDelete(p);try{L=Ul.fromTxFormat(B),X=qd.fromBuffer(M,!1),q=this.tx.verifySignature(L,X,this.nin,P,this.sigversion,this.satoshis)}catch{q=!1}if(!q&&this.flags&ue.SCRIPT_VERIFY_NULLFAIL&&B.length)return this.errstr="SCRIPT_ERR_NULLFAIL",!1;if(this.stack.pop(),this.stack.pop(),this.stack.push(q?ue.true:ue.false),fe===G.OP_CHECKSIGVERIFY)if(q)this.stack.pop();else return this.errstr="SCRIPT_ERR_CHECKSIGVERIFY",!1}break;case G.OP_CHECKMULTISIG:case G.OP_CHECKMULTISIGVERIFY:{var v=1;if(this.stack.length<v)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var g=ct.fromScriptNumBuffer(this.stack[this.stack.length-v],e).toNumber();if(g<0||g>20)return this.errstr="SCRIPT_ERR_PUBKEY_COUNT",!1;if(this.nOpCount+=g,this.nOpCount>201)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;var x=++v;v+=g;var S=g+2;if(this.stack.length<v)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var _=ct.fromScriptNumBuffer(this.stack[this.stack.length-v],e).toNumber();if(_<0||_>g)return this.errstr="SCRIPT_ERR_SIG_COUNT",!1;var l=++v;if(v+=_,this.stack.length<v)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;P=new lo().set({chunks:this.script.chunks.slice(this.pbegincodehash)});for(var m=0;m<_;m++)B=this.stack[this.stack.length-l-m],P.findAndDelete(new lo().add(B));for(q=!0;q&&_>0;){if(B=this.stack[this.stack.length-l],M=this.stack[this.stack.length-x],!this.checkSignatureEncoding(B)||!this.checkPubkeyEncoding(M))return!1;var A;try{L=Ul.fromTxFormat(B),X=qd.fromBuffer(M,!1),A=this.tx.verifySignature(L,X,this.nin,P,this.sigversion,this.satoshis)}catch{A=!1}A&&(l++,_--),x++,g--,_>g&&(q=!1)}for(;v-- >1;){if(!q&&this.flags&ue.SCRIPT_VERIFY_NULLFAIL&&!S&&this.stack[this.stack.length-1].length)return this.errstr="SCRIPT_ERR_NULLFAIL",!1;S>0&&S--,this.stack.pop()}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(this.flags&ue.SCRIPT_VERIFY_NULLDUMMY&&this.stack[this.stack.length-1].length)return this.errstr="SCRIPT_ERR_SIG_NULLDUMMY",!1;if(this.stack.pop(),this.stack.push(q?ue.true:ue.false),fe===G.OP_CHECKMULTISIGVERIFY)if(q)this.stack.pop();else return this.errstr="SCRIPT_ERR_CHECKMULTISIGVERIFY",!1}break;default:return this.errstr="SCRIPT_ERR_BAD_OPCODE",!1}return!0}});var Fi=W((mte,Xb)=>{Xb.exports=eb();Xb.exports.Interpreter=M4()});var Yn=W((vte,D4)=>{"use strict";var Fd=xt(),ga=It(),OF=tn(),C4=mu(),ql=UE(),ji=to(),Fl=ri(),L4=Dr(),Yb=Zn();function ce(e,t,r,i){if(!(this instanceof ce))return new ce(e,t,r);if(Fd.isArray(e)&&Fd.isNumber(t))return ce.createMultisig(e,t,r,!1,i);if(e instanceof ce)return e;if(ga.checkArgument(e,"First argument is required, please include address data.","guide/address.html"),t&&!ji.get(t))throw new TypeError('Second argument must be "livenet" or "testnet".');if(r&&r!==ce.PayToPublicKeyHash&&r!==ce.PayToScriptHash&&r!==ce.PayToWitnessPublicKeyHash&&r!==ce.PayToWitnessScriptHash&&r!==ce.PayToTaproot)throw new TypeError('Third argument must be "pubkeyhash", "scripthash", "witnesspubkeyhash", "witnessscripthash", or "taproot".');var n=this._classifyArguments(e,t,r);return n.network=n.network||ji.get(t)||ji.defaultNetwork,n.type=n.type||r||ce.PayToPublicKeyHash,L4.defineImmutable(this,{hashBuffer:n.hashBuffer,network:n.network,type:n.type}),this}ce.prototype._classifyArguments=function(e,t,r){if((e instanceof Buffer||e instanceof Uint8Array)&&(e.length===20||e.length===32))return ce._transformHash(e,t,r);if((e instanceof Buffer||e instanceof Uint8Array)&&e.length>=21)return ce._transformBuffer(e,t,r);if(e instanceof Yb)return ce._transformPublicKey(e,t,r);if(e instanceof po)return ce._transformScript(e,t);if(typeof e=="string")return ce._transformString(e,t,r);if(Fd.isObject(e))return ce._transformObject(e);throw new TypeError("First argument is an unrecognized data format.")};ce.PayToPublicKeyHash="pubkeyhash";ce.PayToScriptHash="scripthash";ce.PayToWitnessPublicKeyHash="witnesspubkeyhash";ce.PayToWitnessScriptHash="witnessscripthash";ce.PayToTaproot="taproot";ce._transformHash=function(e,t,r){var i={};if(!(e instanceof Buffer)&&!(e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(e.length!==20&&e.length!==32)throw new TypeError("Address hashbuffers must be either 20 or 32 bytes.");return i.hashBuffer=e,i.network=ji.get(t)||ji.defaultNetwork,i.type=r,i};ce._transformObject=function(e){return ga.checkArgument(e.hash||e.hashBuffer,"Must provide a `hash` or `hashBuffer` property"),ga.checkArgument(e.type,"Must provide a `type` property"),{hashBuffer:e.hash?Buffer.from(e.hash,"hex"):e.hashBuffer,network:ji.get(e.network)||ji.defaultNetwork,type:e.type}};ce._classifyFromVersion=function(e){var t={};if(e.length>21){var r=ql.decode(e.toString("utf8"));if(r.version!==0&&r.version!==1)throw new TypeError("Only witness v0 and v1 addresses are supported.");if(r.version===0)if(r.data.length===20)t.type=ce.PayToWitnessPublicKeyHash;else if(r.data.length===32)t.type=ce.PayToWitnessScriptHash;else throw new TypeError("Witness data must be either 20 or 32 bytes.");else if(r.version===1)if(r.data.length===32)t.type=ce.PayToTaproot;else throw new TypeError("Witness data must be 32 bytes for v1");t.network=ji.get(r.prefix,"bech32prefix")}else{var i=ji.get(e[0],"pubkeyhash"),n=ji.get(e[0],"scripthash");i?(t.network=i,t.type=ce.PayToPublicKeyHash):n&&(t.network=n,t.type=ce.PayToScriptHash)}return t};ce._transformBuffer=function(e,t,r){var i={};if(!(e instanceof Buffer)&&!(e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(e.length<21)throw new TypeError("Address buffer is incorrect length.");var n=ji.get(t),a=ce._classifyFromVersion(e);if(t&&!n)throw new TypeError("Unknown network");if(!a.network||n&&n.xpubkey!==a.network.xpubkey)throw new TypeError("Address has mismatched network type.");if(!a.type||r&&r!==a.type)throw new TypeError("Address has mismatched type.");return e.length>21?i.hashBuffer=ql.decode(e.toString("utf8")).data:i.hashBuffer=e.slice(1),i.network=n||a.network,i.type=a.type,i};ce._transformPublicKey=function(e,t,r){var i={};if(!(e instanceof Yb))throw new TypeError("Address must be an instance of PublicKey.");if(r&&r!==ce.PayToScriptHash&&r!==ce.PayToWitnessPublicKeyHash&&r!==ce.PayToPublicKeyHash&&r!==ce.PayToTaproot)throw new TypeError("Type must be either pubkeyhash, witnesspubkeyhash, scripthash, or taproot to transform public key.");if(!e.compressed&&(r===ce.PayToScriptHash||r===ce.PayToWitnessPublicKeyHash))throw new TypeError("Witness addresses must use compressed public keys.");return r===ce.PayToScriptHash?i.hashBuffer=Fl.sha256ripemd160(po.buildWitnessV0Out(e).toBuffer()):r===ce.PayToTaproot?i.hashBuffer=Fl.sha256ripemd160(po.buildWitnessV1Out(e).toBuffer()):i.hashBuffer=Fl.sha256ripemd160(e.toBuffer()),i.type=r||ce.PayToPublicKeyHash,i};ce._transformScript=function(e,t){ga.checkArgument(e instanceof po,"script must be a Script instance");var r=e.getAddressInfo(t);if(!r)throw new OF.Script.CantDeriveAddress(e);return r};ce.createMultisig=function(e,t,r,i,n){if(r=r||e[0].network||ji.defaultNetwork,n&&n!==ce.PayToScriptHash&&n!==ce.PayToWitnessScriptHash)throw new TypeError("Type must be either scripthash or witnessscripthash to create multisig.");if(i||n===ce.PayToWitnessScriptHash){e=Fd.map(e,Yb);for(var a=0;a<e.length;a++)if(!e[a].compressed)throw new TypeError("Witness addresses must use compressed public keys.")}var u=po.buildMultisigOut(e,t);return i?ce.payingTo(po.buildWitnessMultisigOutFromScript(u),r):ce.payingTo(u,r,n)};ce._transformString=function(e,t,r){if(typeof e!="string")throw new TypeError("data parameter supplied is not a string.");if(e.length>100)throw new TypeError("address string is too long");if(t&&!ji.get(t))throw new TypeError("Unknown network");e=e.trim();try{var n=ce._transformBuffer(Buffer.from(e,"utf8"),t,r);return n}catch(a){if(r===ce.PayToWitnessPublicKeyHash||r===ce.PayToWitnessScriptHash||r===ce.PayToTaproot)throw a}var i=C4.decode(e),n=ce._transformBuffer(i,t,r);return n};ce.fromPublicKey=function(e,t,r){var i=ce._transformPublicKey(e,t,r);return t=t||ji.defaultNetwork,new ce(i.hashBuffer,t,i.type)};ce.fromPublicKeyHash=function(e,t){var r=ce._transformHash(e);return new ce(r.hashBuffer,t,ce.PayToPublicKeyHash)};ce.fromScriptHash=function(e,t,n){ga.checkArgument(e,"hash parameter is required");var i=ce._transformHash(e);if(n===ce.PayToWitnessScriptHash&&e.length!==32)throw new TypeError("Address hashbuffer must be exactly 32 bytes for v0 witness script hash.");var n=n||ce.PayToScriptHash;return new ce(i.hashBuffer,t,n)};ce.payingTo=function(e,t,n){ga.checkArgument(e,"script is required"),ga.checkArgument(e instanceof po,"script must be instance of Script");var i;n===ce.PayToWitnessScriptHash?i=Fl.sha256(e.toBuffer()):i=Fl.sha256ripemd160(e.toBuffer());var n=n||ce.PayToScriptHash;return ce.fromScriptHash(i,t,n)};ce.fromScript=function(e,t){ga.checkArgument(e instanceof po,"script must be a Script instance");var r=ce._transformScript(e,t);return new ce(r.hashBuffer,t,r.type)};ce.fromBuffer=function(e,t,r){var i=ce._transformBuffer(e,t,r);return new ce(i.hashBuffer,i.network,i.type)};ce.fromString=function(e,t,r){var i=ce._transformString(e,t,r);return new ce(i.hashBuffer,i.network,i.type)};ce.fromObject=function(t){ga.checkState(L4.isHexa(t.hash),'Unexpected hash property, "'+t.hash+'", expected to be hex.');var r=Buffer.from(t.hash,"hex");return new ce(r,t.network,t.type)};ce.getValidationError=function(e,t,r){var i;try{new ce(e,t,r)}catch(n){i=n}return i};ce.isValid=function(e,t,r){return!ce.getValidationError(e,t,r)};ce.prototype.isPayToPublicKeyHash=function(){return this.type===ce.PayToPublicKeyHash};ce.prototype.isPayToScriptHash=function(){return this.type===ce.PayToScriptHash};ce.prototype.isPayToWitnessPublicKeyHash=function(){return this.type===ce.PayToWitnessPublicKeyHash};ce.prototype.isPayToWitnessScriptHash=function(){return this.type===ce.PayToWitnessScriptHash};ce.prototype.isPayToTaproot=function(){return this.type===ce.PayToTaproot};ce.prototype.toBuffer=function(){if(this.isPayToWitnessPublicKeyHash()||this.isPayToWitnessScriptHash())return Buffer.from(this.toString(),"utf8");var e=Buffer.from([this.network[this.type]]);return Buffer.concat([e,this.hashBuffer])};ce.prototype.toObject=ce.prototype.toJSON=function(){return{hash:this.hashBuffer.toString("hex"),type:this.type,network:this.network.toString()}};ce.prototype.toString=function(){if(this.isPayToWitnessPublicKeyHash()||this.isPayToWitnessScriptHash()||this.isPayToTaproot()){let e=this.network.bech32prefix,t=0,r=ql.encodings.BECH32;return this.isPayToTaproot()&&(t=1,r=ql.encodings.BECH32M),ql.encode(e,t,this.hashBuffer,r)}return C4.encode(this.toBuffer())};ce.prototype.inspect=function(){return"<Address: "+this.toString()+", type: "+this.type+", network: "+this.network+">"};D4.exports=ce;var po=Fi()});var Hl=W((gte,U4)=>{"use strict";function pc(){}pc.getRandomBuffer=function(e){return process.browser?pc.getRandomBufferBrowser(e):pc.getRandomBufferNode(e)};pc.getRandomBufferNode=function(e){var t=require("crypto");return t.randomBytes(e)};pc.getRandomBufferBrowser=function(e){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");if(window.crypto&&window.crypto.getRandomValues)var t=window.crypto;else if(window.msCrypto&&window.msCrypto.getRandomValues)var t=window.msCrypto;else throw new Error("window.crypto.getRandomValues not available");var r=new Uint8Array(e);t.getRandomValues(r);var i=Buffer.from(r);return i};pc.getPseudoRandomBuffer=function(e){for(var t=4294967296,r=Buffer.alloc(e),i,n=0;n<=e;n++){var a=Math.floor(n/4),u=n-a*4;u===0?(i=Math.random()*t,r[n]=i&255):r[n]=(i=i>>>8)&255}return r};U4.exports=pc});var Du=W((bte,j4)=>{"use strict";var Hd=xt(),kF=Yn(),q4=mu(),hc=Jr(),F4=Dr(),ba=to(),H4=tc(),NF=Zn(),PF=Hl(),z4=It();function ut(e,t){if(!(this instanceof ut))return new ut(e,t);if(e instanceof ut)return e;var r=this._classifyArguments(e,t);if(!r.bn||r.bn.cmp(new hc(0))===0)throw new TypeError("Number can not be equal to zero, undefined, null or false");if(!r.bn.lt(H4.getN()))throw new TypeError("Number must be less than N");if(typeof r.network>"u")throw new TypeError('Must specify the network ("livenet" or "testnet")');return F4.defineImmutable(this,{bn:r.bn,compressed:r.compressed,network:r.network}),Object.defineProperty(this,"publicKey",{configurable:!1,enumerable:!0,get:this.toPublicKey.bind(this)}),this}ut.prototype._classifyArguments=function(e,t){var r={compressed:!0,network:t?ba.get(t):ba.defaultNetwork};if(Hd.isUndefined(e)||Hd.isNull(e))r.bn=ut._getRandomBN();else if(e instanceof hc)r.bn=e;else if(e instanceof Buffer||e instanceof Uint8Array)r=ut._transformBuffer(e,t);else if(e.bn&&e.network)r=ut._transformObject(e);else if(!t&&ba.get(e))r.bn=ut._getRandomBN(),r.network=ba.get(e);else if(typeof e=="string")F4.isHexa(e)?r.bn=new hc(Buffer.from(e,"hex")):r=ut._transformWIF(e,t);else throw new TypeError("First argument is an unrecognized data type.");return r};ut._getRandomBN=function(){var e,t;do{var r=PF.getRandomBuffer(32);t=hc.fromBuffer(r),e=t.lt(H4.getN())}while(!e);return t};ut._transformBuffer=function(e,t){var r={};if(e.length===32)return ut._transformBNBuffer(e,t);if(r.network=ba.get(e[0],"privatekey"),!r.network)throw new Error("Invalid network");if(t&&r.network!==ba.get(t))throw new TypeError("Private key network mismatch");if(e.length===34&&e[33]===1)r.compressed=!0;else if(e.length===33)r.compressed=!1;else throw new Error("Length of buffer must be 33 (uncompressed) or 34 (compressed)");return r.bn=hc.fromBuffer(e.slice(1,33)),r};ut._transformBNBuffer=function(e,t){var r={};return r.network=ba.get(t)||ba.defaultNetwork,r.bn=hc.fromBuffer(e),r.compressed=!1,r};ut._transformWIF=function(e,t){return ut._transformBuffer(q4.decode(e),t)};ut.fromBuffer=function(e,t){return new ut(e,t)};ut._transformObject=function(e){var t=new hc(e.bn,"hex"),r=ba.get(e.network);return{bn:t,network:r,compressed:e.compressed}};ut.fromString=ut.fromWIF=function(e){return z4.checkArgument(Hd.isString(e),"First argument is expected to be a string."),new ut(e)};ut.fromObject=function(e){return z4.checkArgument(Hd.isObject(e),"First argument is expected to be an object."),new ut(e)};ut.fromRandom=function(e){var t=ut._getRandomBN();return new ut(t,e)};ut.getValidationError=function(e,t){var r;try{new ut(e,t)}catch(i){r=i}return r};ut.isValid=function(e,t){return e?!ut.getValidationError(e,t):!1};ut.prototype.toString=function(){return this.toBuffer().toString("hex")};ut.prototype.toWIF=function(){var e=this.network,t=this.compressed,r;return t?r=Buffer.concat([Buffer.from([e.privatekey]),this.bn.toBuffer({size:32}),Buffer.from([1])]):r=Buffer.concat([Buffer.from([e.privatekey]),this.bn.toBuffer({size:32})]),q4.encode(r)};ut.prototype.toBigNumber=function(){return this.bn};ut.prototype.toBuffer=function(){return this.bn.toBuffer({size:32})};ut.prototype.toBufferNoPadding=function(){return this.bn.toBuffer()};ut.prototype.toPublicKey=function(){return this._pubkey||(this._pubkey=NF.fromPrivateKey(this)),this._pubkey};ut.prototype.toAddress=function(e,t){var r=this.toPublicKey();return kF.fromPublicKey(r,e||this.network,t)};ut.prototype.toObject=ut.prototype.toJSON=function(){return{bn:this.bn.toString("hex"),compressed:this.compressed,network:this.network.toString()}};ut.prototype.inspect=function(){var e=this.compressed?"":", uncompressed";return"<PrivateKey: "+this.toString()+", network: "+this.network+e+">"};j4.exports=ut});var Zn=W((xte,K4)=>{"use strict";var Fu=Jr(),Hu=tc(),BF=ri(),MF=Dr(),V4=to(),Zb=xt(),dc=It();function Pe(e,t){if(!(this instanceof Pe))return new Pe(e,t);if(dc.checkArgument(e,"First argument is required, please include public key data."),e instanceof Pe)return e;t=t||{};var r=this._classifyArgs(e,t);return r.point.validate(),MF.defineImmutable(this,{point:r.point,compressed:r.compressed,network:r.network||V4.defaultNetwork}),this}Pe.prototype._classifyArgs=function(e,t){var r={compressed:Zb.isUndefined(t.compressed)||t.compressed};if(e instanceof Hu)r.point=e;else if(e.x&&e.y)r=Pe._transformObject(e);else if(typeof e=="string")r=Pe._transformDER(Buffer.from(e,"hex"));else if(Pe._isBuffer(e))r=Pe._transformDER(e);else if(Pe._isPrivateKey(e))r=Pe._transformPrivateKey(e);else throw new TypeError("First argument is an unrecognized data format.");return r.network||(r.network=Zb.isUndefined(t.network)?void 0:V4.get(t.network)),r};Pe._isPrivateKey=function(e){var t=Du();return e instanceof t};Pe._isBuffer=function(e){return e instanceof Buffer||e instanceof Uint8Array};Pe._transformPrivateKey=function(e){dc.checkArgument(Pe._isPrivateKey(e),"Must be an instance of PrivateKey");var t={};return t.point=Hu.getG().mul(e.bn),t.compressed=e.compressed,t.network=e.network,t};Pe._transformDER=function(e,t){dc.checkArgument(Pe._isBuffer(e),"Must be a hex buffer of DER encoded public key");var r={};t=Zb.isUndefined(t)?!0:t;var i,n,a,u;if(e[0]===4||!t&&(e[0]===6||e[0]===7)){if(a=e.slice(1,33),u=e.slice(33,65),a.length!==32||u.length!==32||e.length!==65)throw new TypeError("Length of x and y must be 32 bytes");i=new Fu(a),n=new Fu(u),r.point=new Hu(i,n),r.compressed=!1}else if(e[0]===3)a=e.slice(1),i=new Fu(a),r=Pe._transformX(!0,i),r.compressed=!0;else if(e[0]===2)a=e.slice(1),i=new Fu(a),r=Pe._transformX(!1,i),r.compressed=!0;else throw new TypeError("Invalid DER format public key");return r};Pe._transformX=function(e,t){dc.checkArgument(typeof e=="boolean","Must specify whether y is odd or not (true or false)");var r={};return r.point=Hu.fromX(e,t),r};Pe._transformObject=function(e){var t=new Fu(e.x,"hex"),r=new Fu(e.y,"hex"),i=new Hu(t,r);return new Pe(i,{compressed:e.compressed})};Pe.fromPrivateKey=function(e){dc.checkArgument(Pe._isPrivateKey(e),"Must be an instance of PrivateKey");var t=Pe._transformPrivateKey(e);return new Pe(t.point,{compressed:t.compressed,network:t.network})};Pe.fromDER=Pe.fromBuffer=function(e,t){dc.checkArgument(Pe._isBuffer(e),"Must be a hex buffer of DER encoded public key");var r=Pe._transformDER(e,t);return new Pe(r.point,{compressed:r.compressed})};Pe.fromPoint=function(e,t){return dc.checkArgument(e instanceof Hu,"First argument must be an instance of Point."),new Pe(e,{compressed:t})};Pe.fromString=function(e,t){var r=Buffer.from(e,t||"hex"),i=Pe._transformDER(r);return new Pe(i.point,{compressed:i.compressed})};Pe.fromX=function(e,t){var r=Pe._transformX(e,t);return new Pe(r.point,{compressed:r.compressed})};Pe.getValidationError=function(e){var t;try{new Pe(e)}catch(r){t=r}return t};Pe.isValid=function(e){return!Pe.getValidationError(e)};Pe.prototype.toObject=Pe.prototype.toJSON=function(){return{x:this.point.getX().toString("hex",2),y:this.point.getY().toString("hex",2),compressed:this.compressed}};Pe.prototype.toBuffer=Pe.prototype.toDER=function(){var e=this.point.getX(),t=this.point.getY(),r=e.toBuffer({size:32}),i=t.toBuffer({size:32}),n;if(this.compressed){var a=i[i.length-1]%2;return a?n=Buffer.from([3]):n=Buffer.from([2]),Buffer.concat([n,r])}else return n=Buffer.from([4]),Buffer.concat([n,r,i])};Pe.prototype._getID=function(){return BF.sha256ripemd160(this.toBuffer())};Pe.prototype.toAddress=function(e,t){var r=Yn();return r.fromPublicKey(this,e||this.network,t)};Pe.prototype.toString=function(){return this.toDER().toString("hex")};Pe.prototype.inspect=function(){return"<PublicKey: "+this.toString()+(this.compressed?"":", uncompressed")+">"};K4.exports=Pe});var Ml=W((_te,W4)=>{"use strict";var nn=Jr(),Nn=tc(),CF=Ui(),LF=Zn(),DF=Hl(),ho=ri(),Qb=dr(),UF=xt(),Jb=It(),Pr=function e(t){if(!(this instanceof e))return new e(t);t&&this.set(t)};Pr.prototype.set=function(e){return this.hashbuf=e.hashbuf||this.hashbuf,this.endian=e.endian||this.endian,this.privkey=e.privkey||this.privkey,this.pubkey=e.pubkey||(this.privkey?this.privkey.publicKey:this.pubkey),this.sig=e.sig||this.sig,this.k=e.k||this.k,this.verified=e.verified||this.verified,this};Pr.prototype.privkey2pubkey=function(){this.pubkey=this.privkey.toPublicKey()};Pr.prototype.calci=function(){for(var e=0;e<4;e++){this.sig.i=e;var t;try{t=this.toPublicKey()}catch(r){console.error(r);continue}if(t.point.eq(this.pubkey.point))return this.sig.compressed=this.pubkey.compressed,this}throw this.sig.i=void 0,new Error("Unable to find valid recovery factor")};Pr.fromString=function(e){var t=JSON.parse(e);return new Pr(t)};Pr.prototype.randomK=function(){var e=Nn.getN(),t;do t=nn.fromBuffer(DF.getRandomBuffer(32));while(!(t.lt(e)&&t.gt(nn.Zero)));return this.k=t,this};Pr.prototype.deterministicK=function(e){UF.isUndefined(e)&&(e=0);var t=Buffer.alloc(32);t.fill(1);var r=Buffer.alloc(32);r.fill(0);var i=this.privkey.bn.toBuffer({size:32}),n=this.endian==="little"?Qb.reverse(this.hashbuf):this.hashbuf;r=ho.sha256hmac(Buffer.concat([t,Buffer.from([0]),i,n]),r),t=ho.sha256hmac(t,r),r=ho.sha256hmac(Buffer.concat([t,Buffer.from([1]),i,n]),r),t=ho.sha256hmac(t,r),t=ho.sha256hmac(t,r);for(var a=nn.fromBuffer(t),u=Nn.getN(),h=0;h<e||!(a.lt(u)&&a.gt(nn.Zero));h++)r=ho.sha256hmac(Buffer.concat([t,Buffer.from([0])]),r),t=ho.sha256hmac(t,r),t=ho.sha256hmac(t,r),a=nn.fromBuffer(t);return this.k=a,this};Pr.prototype.toPublicKey=function(){var e=this.sig.i;Jb.checkArgument(e===0||e===1||e===2||e===3,new Error("i must be equal to 0, 1, 2, or 3"));var t=nn.fromBuffer(this.hashbuf),r=this.sig.r,i=this.sig.s,n=e&1,a=e>>1,u=Nn.getN(),h=Nn.getG(),b=a?r.add(u):r,w=Nn.fromX(n,b),T=w.mul(u);if(!T.isInfinity())throw new Error("nR is not a valid curve point");var I=t.neg().umod(u),B=r.invm(u),M=w.mul(i).add(h.mul(I)).mul(B),P=LF.fromPoint(M,this.sig.compressed);return P};Pr.prototype.sigError=function(){if(!Qb.isBuffer(this.hashbuf)||this.hashbuf.length!==32)return"hashbuf must be a 32 byte buffer";var e=this.sig.r,t=this.sig.s;if(!(e.gt(nn.Zero)&&e.lt(Nn.getN()))||!(t.gt(nn.Zero)&&t.lt(Nn.getN())))return"r and s not in range";var r=nn.fromBuffer(this.hashbuf,this.endian?{endian:this.endian}:void 0),i=Nn.getN(),n=t.invm(i),a=n.mul(r).umod(i),u=n.mul(e).umod(i),h=Nn.getG().mulAdd(a,this.pubkey.point,u);return h.isInfinity()?"p is infinity":h.getX().umod(i).cmp(e)!==0?"Invalid signature":!1};Pr.toLowS=function(e){return e.gt(nn.fromBuffer(Buffer.from("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))&&(e=Nn.getN().sub(e)),e};Pr.prototype._findSignature=function(e,t){var r=Nn.getN(),i=Nn.getG(),n=0,a,u,h,b;do(!this.k||n>0)&&this.deterministicK(n),n++,a=this.k,u=i.mul(a),h=u.x.umod(r),b=a.invm(r).mul(t.add(e.mul(h))).umod(r);while(h.cmp(nn.Zero)<=0||b.cmp(nn.Zero)<=0);return b=Pr.toLowS(b),{s:b,r:h}};Pr.prototype.sign=function(){var e=this.hashbuf,t=this.privkey,r=t.bn;Jb.checkState(e&&t&&r,new Error("invalid parameters")),Jb.checkState(Qb.isBuffer(e)&&e.length===32,new Error("hashbuf must be a 32 byte buffer"));var i=nn.fromBuffer(e,this.endian?{endian:this.endian}:void 0),n=this._findSignature(r,i);return n.compressed=this.pubkey.compressed,this.sig=new CF(n),this};Pr.prototype.signRandomK=function(){return this.randomK(),this.sign()};Pr.prototype.toString=function(){var e={};return this.hashbuf&&(e.hashbuf=this.hashbuf.toString("hex")),this.privkey&&(e.privkey=this.privkey.toString()),this.pubkey&&(e.pubkey=this.pubkey.toString()),this.sig&&(e.sig=this.sig.toString()),this.k&&(e.k=this.k.toString()),JSON.stringify(e)};Pr.prototype.verify=function(){return this.sigError()?this.verified=!1:this.verified=!0,this};Pr.sign=function(e,t,r){return Pr().set({hashbuf:e,endian:r,privkey:t}).sign().sig};Pr.verify=function(e,t,r,i){return Pr().set({hashbuf:e,endian:i,sig:t,pubkey:r}).verify().verified};W4.exports=Pr});var Y4=W((yte,X4)=>{"use strict";var G4=Si(),$4=Ss(),qF=Jr(),es=function e(t){if(!(this instanceof e))return new e(t);if(Buffer.isBuffer(t))this.buf=t;else if(typeof t=="number"){var r=t;this.fromNumber(r)}else if(t instanceof qF){var i=t;this.fromBN(i)}else if(t){var n=t;this.set(n)}};es.prototype.set=function(e){return this.buf=e.buf||this.buf,this};es.prototype.fromString=function(e){return this.set({buf:Buffer.from(e,"hex")}),this};es.prototype.toString=function(){return this.buf.toString("hex")};es.prototype.fromBuffer=function(e){return this.buf=e,this};es.prototype.fromBufferReader=function(e){return this.buf=e.readVarintBuf(),this};es.prototype.fromBN=function(e){return this.buf=G4().writeVarintBN(e).concat(),this};es.prototype.fromNumber=function(e){return this.buf=G4().writeVarintNum(e).concat(),this};es.prototype.toBuffer=function(){return this.buf};es.prototype.toBN=function(){return $4(this.buf).readVarintBN()};es.prototype.toNumber=function(){return $4(this.buf).readVarintNum()};X4.exports=es});var jl=W((Ste,Q4)=>{"use strict";var zd=xt(),zl=Jr(),zu=dr(),jd=Ss(),FF=Si(),HF=ri(),wte=Dr(),Z4=It(),zF=486604799,vt=function e(t){if(!(this instanceof e))return new e(t);var r=e._from(t);return this.version=r.version,this.prevHash=r.prevHash,this.merkleRoot=r.merkleRoot,this.time=r.time,this.timestamp=r.time,this.bits=r.bits,this.nonce=r.nonce,r.hash&&Z4.checkState(this.hash===r.hash,"Argument object hash property does not match block hash."),this};vt._from=function(t){var r={};if(zu.isBuffer(t))r=vt._fromBufferReader(jd(t));else if(zd.isObject(t))r=vt._fromObject(t);else throw new TypeError("Unrecognized argument for BlockHeader");return r};vt._fromObject=function(t){Z4.checkArgument(t,"data is required");var r=t.prevHash,i=t.merkleRoot;zd.isString(t.prevHash)&&(r=zu.reverse(Buffer.from(t.prevHash,"hex"))),zd.isString(t.merkleRoot)&&(i=zu.reverse(Buffer.from(t.merkleRoot,"hex")));var n={hash:t.hash,version:t.version,prevHash:r,merkleRoot:i,time:t.time,timestamp:t.time,bits:t.bits,nonce:t.nonce};return n};vt.fromObject=function(t){var r=vt._fromObject(t);return new vt(r)};vt.fromRawBlock=function(t){zu.isBuffer(t)||(t=Buffer.from(t,"binary"));var r=jd(t);r.pos=vt.Constants.START_OF_HEADER;var i=vt._fromBufferReader(r);return new vt(i)};vt.fromBuffer=function(t){var r=vt._fromBufferReader(jd(t));return new vt(r)};vt.fromString=function(t){var r=Buffer.from(t,"hex");return vt.fromBuffer(r)};vt._fromBufferReader=function(t){var r={};return r.version=t.readInt32LE(),r.prevHash=t.read(32),r.merkleRoot=t.read(32),r.time=t.readUInt32LE(),r.bits=t.readUInt32LE(),r.nonce=t.readUInt32LE(),r};vt.fromBufferReader=function(t){var r=vt._fromBufferReader(t);return new vt(r)};vt.prototype.toObject=vt.prototype.toJSON=function(){return{hash:this.hash,version:this.version,prevHash:zu.reverse(this.prevHash).toString("hex"),merkleRoot:zu.reverse(this.merkleRoot).toString("hex"),time:this.time,bits:this.bits,nonce:this.nonce}};vt.prototype.toBuffer=function(){return this.toBufferWriter().concat()};vt.prototype.toString=function(){return this.toBuffer().toString("hex")};vt.prototype.toBufferWriter=function(t){return t||(t=new FF),t.writeInt32LE(this.version),t.write(this.prevHash),t.write(this.merkleRoot),t.writeUInt32LE(this.time),t.writeUInt32LE(this.bits),t.writeUInt32LE(this.nonce),t};vt.prototype.getTargetDifficulty=function(t){t=t||this.bits;for(var r=new zl(t&16777215),i=8*((t>>>24)-3);i-- >0;)r=r.mul(new zl(2));return r};vt.prototype.getDifficulty=function(){var t=this.getTargetDifficulty(zF).mul(new zl(Math.pow(10,8))),r=this.getTargetDifficulty(),i=t.div(r).toString(10),n=i.length-8;return i=i.slice(0,n)+"."+i.slice(n),parseFloat(i)};vt.prototype._getHash=function(){var t=this.toBuffer();return HF.sha256sha256(t)};var J4={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=jd(this._getHash()).readReverse().toString("hex")),this._id},set:zd.noop};Object.defineProperty(vt.prototype,"id",J4);Object.defineProperty(vt.prototype,"hash",J4);vt.prototype.validTimestamp=function(){var t=Math.round(new Date().getTime()/1e3);return!(this.time>t+vt.Constants.MAX_TIME_OFFSET)};vt.prototype.validProofOfWork=function(){var t=new zl(this.id,"hex"),r=this.getTargetDifficulty();return!(t.cmp(r)>0)};vt.prototype.inspect=function(){return"<BlockHeader "+this.id+">"};vt.Constants={START_OF_HEADER:8,MAX_TIME_OFFSET:2*60*60,LARGEST_HASH:new zl("10000000000000000000000000000000000000000000000000000000000000000","hex")};Q4.exports=vt});var aT=W((Ete,sT)=>{"use strict";var tx=xt(),tT=jl(),eT=Jr(),rT=dr(),rx=Ss(),jF=Si(),VF=ri(),ex=Dl(),iT=It();function pt(e){return this instanceof pt?(tx.extend(this,pt._from(e)),this):new pt(e)}pt.MAX_BLOCK_SIZE=1e6;pt._from=function(t){var r={};if(rT.isBuffer(t))r=pt._fromBufferReader(rx(t));else if(tx.isObject(t))r=pt._fromObject(t);else throw new TypeError("Unrecognized argument for Block");return r};pt._fromObject=function(t){var r=[];t.transactions.forEach(function(n){n instanceof ex?r.push(n):r.push(ex().fromObject(n))});var i={header:tT.fromObject(t.header),transactions:r};return i};pt.fromObject=function(t){var r=pt._fromObject(t);return new pt(r)};pt._fromBufferReader=function(t){var r={};iT.checkState(!t.finished(),"No block data received"),r.header=tT.fromBufferReader(t);var i=t.readVarintNum();r.transactions=[];for(var n=0;n<i;n++)r.transactions.push(ex().fromBufferReader(t));return r};pt.fromBufferReader=function(t){iT.checkArgument(t,"br is required");var r=pt._fromBufferReader(t);return new pt(r)};pt.fromBuffer=function(t){return pt.fromBufferReader(new rx(t))};pt.fromString=function(t){var r=Buffer.from(t,"hex");return pt.fromBuffer(r)};pt.fromRawBlock=function(t){rT.isBuffer(t)||(t=Buffer.from(t,"binary"));var r=rx(t);r.pos=pt.Values.START_OF_BLOCK;var i=pt._fromBufferReader(r);return new pt(i)};pt.prototype.toObject=pt.prototype.toJSON=function(){var t=[];return this.transactions.forEach(function(r){t.push(r.toObject())}),{header:this.header.toObject(),transactions:t}};pt.prototype.toBuffer=function(){return this.toBufferWriter().concat()};pt.prototype.toString=function(){return this.toBuffer().toString("hex")};pt.prototype.toBufferWriter=function(t){t||(t=new jF),t.write(this.header.toBuffer()),t.writeVarintNum(this.transactions.length);for(var r=0;r<this.transactions.length;r++)this.transactions[r].toBufferWriter(t);return t};pt.prototype.getTransactionHashes=function(){var t=[];if(this.transactions.length===0)return[pt.Values.NULL_HASH];for(var r=0;r<this.transactions.length;r++)t.push(this.transactions[r]._getHash());return t};pt.prototype.getMerkleTree=function(){for(var t=this.getTransactionHashes(),r=0,i=this.transactions.length;i>1;i=Math.floor((i+1)/2)){for(var n=0;n<i;n+=2){var a=Math.min(n+1,i-1),u=Buffer.concat([t[r+n],t[r+a]]);t.push(VF.sha256sha256(u))}r+=i}return t};pt.prototype.getMerkleRoot=function(){var t=this.getMerkleTree();return t[t.length-1]};pt.prototype.validMerkleRoot=function(){var t=new eT(this.header.merkleRoot.toString("hex"),"hex"),r=new eT(this.getMerkleRoot().toString("hex"),"hex");return t.cmp(r)===0};pt.prototype._getHash=function(){return this.header._getHash()};var nT={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=this.header.id),this._id},set:tx.noop};Object.defineProperty(pt.prototype,"id",nT);Object.defineProperty(pt.prototype,"hash",nT);pt.prototype.inspect=function(){return"<Block "+this.id+">"};pt.Values={START_OF_BLOCK:8,NULL_HASH:Buffer.from("0000000000000000000000000000000000000000000000000000000000000000","hex")};sT.exports=pt});var ax=W((Ite,uT)=>{"use strict";var mc=xt(),nx=jl(),sx=dr(),cT=Ss(),KF=Si(),WF=ri(),Tte=Dr(),oT=Dl(),ix=tn(),vc=It();function Sr(e){if(!(this instanceof Sr))return new Sr(e);var t={};if(sx.isBuffer(e))t=Sr._fromBufferReader(cT(e));else if(mc.isObject(e)){var r;e.header instanceof nx?r=e.header:r=nx.fromObject(e.header),t={header:r,numTransactions:e.numTransactions,hashes:e.hashes,flags:e.flags}}else throw new TypeError("Unrecognized argument for MerkleBlock");return mc.extend(this,t),this._flagBitsUsed=0,this._hashesUsed=0,this}Sr.fromBuffer=function(t){return Sr.fromBufferReader(cT(t))};Sr.fromBufferReader=function(t){return new Sr(Sr._fromBufferReader(t))};Sr.prototype.toBuffer=function(){return this.toBufferWriter().concat()};Sr.prototype.toBufferWriter=function(t){t||(t=new KF),t.write(this.header.toBuffer()),t.writeUInt32LE(this.numTransactions),t.writeVarintNum(this.hashes.length);for(var r=0;r<this.hashes.length;r++)t.write(Buffer.from(this.hashes[r],"hex"));for(t.writeVarintNum(this.flags.length),r=0;r<this.flags.length;r++)t.writeUInt8(this.flags[r]);return t};Sr.prototype.toObject=Sr.prototype.toJSON=function(){return{header:this.header.toObject(),numTransactions:this.numTransactions,hashes:this.hashes,flags:this.flags}};Sr.prototype.validMerkleTree=function(){if(vc.checkState(mc.isArray(this.flags),"MerkleBlock flags is not an array"),vc.checkState(mc.isArray(this.hashes),"MerkleBlock hashes is not an array"),this.hashes.length>this.numTransactions||this.flags.length*8<this.hashes.length)return!1;var t=this._calcTreeHeight(),r={hashesUsed:0,flagBitsUsed:0},i=this._traverseMerkleTree(t,0,r);return r.hashesUsed!==this.hashes.length?!1:sx.equals(i,this.header.merkleRoot)};Sr.prototype.filterdTxsHash=function(){if(vc.checkState(mc.isArray(this.flags),"MerkleBlock flags is not an array"),vc.checkState(mc.isArray(this.hashes),"MerkleBlock hashes is not an array"),this.hashes.length>this.numTransactions)throw new ix.MerkleBlock.InvalidMerkleTree;if(this.flags.length*8<this.hashes.length)throw new ix.MerkleBlock.InvalidMerkleTree;if(this.hashes.length===1)return[];var t=this._calcTreeHeight(),r={hashesUsed:0,flagBitsUsed:0},i=this._traverseMerkleTree(t,0,r,!0);if(r.hashesUsed!==this.hashes.length)throw new ix.MerkleBlock.InvalidMerkleTree;return i};Sr.prototype._traverseMerkleTree=function(t,r,i,a){i=i||{},i.txs=i.txs||[],i.flagBitsUsed=i.flagBitsUsed||0,i.hashesUsed=i.hashesUsed||0;var a=a||!1;if(i.flagBitsUsed>this.flags.length*8)return null;var u=this.flags[i.flagBitsUsed>>3]>>>(i.flagBitsUsed++&7)&1;if(t===0||!u){if(i.hashesUsed>=this.hashes.length)return null;var h=this.hashes[i.hashesUsed++];return t===0&&u&&i.txs.push(h),Buffer.from(h,"hex")}else{var b=this._traverseMerkleTree(t-1,r*2,i),w=b;return r*2+1<this._calcTreeWidth(t-1)&&(w=this._traverseMerkleTree(t-1,r*2+1,i)),a?i.txs:WF.sha256sha256(new Buffer.concat([b,w]))}};Sr.prototype._calcTreeWidth=function(t){return this.numTransactions+(1<<t)-1>>t};Sr.prototype._calcTreeHeight=function(){for(var t=0;this._calcTreeWidth(t)>1;)t++;return t};Sr.prototype.hasTransaction=function(t){vc.checkArgument(!mc.isUndefined(t),"tx cannot be undefined"),vc.checkArgument(t instanceof oT||typeof t=="string",'Invalid tx given, tx must be a "string" or "Transaction"');var r=t;t instanceof oT&&(r=sx.reverse(Buffer.from(t.id,"hex")).toString("hex"));var i=[],n=this._calcTreeHeight();return this._traverseMerkleTree(n,0,{txs:i}),i.indexOf(r)!==-1};Sr._fromBufferReader=function(t){vc.checkState(!t.finished(),"No merkleblock data received");var r={};r.header=nx.fromBufferReader(t),r.numTransactions=t.readUInt32LE();var i=t.readVarintNum();r.hashes=[];for(var n=0;n<i;n++)r.hashes.push(t.read(32).toString("hex"));var a=t.readVarintNum();for(r.flags=[],n=0;n<a;n++)r.flags.push(t.readUInt8());return r};Sr.fromObject=function(t){return new Sr(t)};uT.exports=Sr});var fT=W((Rte,Vd)=>{Vd.exports=aT();Vd.exports.BlockHeader=jl();Vd.exports.MerkleBlock=ax()});var cx=W((Ate,gT)=>{"use strict";var qr=xt(),pT=It(),hT=Jr(),GF=xl(),Kd=mu(),dT=ri(),Wd=ux(),gc=to(),ox=tc(),mT=Zn(),vT=tn(),Vl=vT,ts=vT.HDPublicKey,Gd=require("assert"),lT=Dr(),Mt=dr();function ne(e){if(e instanceof ne)return e;if(!(this instanceof ne))return new ne(e);if(e)if(qr.isString(e)||Mt.isBuffer(e)){var t=ne.getSerializedError(e);if(t){if(Mt.isBuffer(e)&&!ne.getSerializedError(e.toString()))return this._buildFromSerialized(e.toString());if(t instanceof ts.ArgumentIsPrivateExtended)return new Wd(e).hdPublicKey;throw t}else return this._buildFromSerialized(e)}else{if(qr.isObject(e))return e instanceof Wd?this._buildFromPrivate(e):this._buildFromObject(e);throw new ts.UnrecognizedArgument(e)}else throw new ts.MustSupplyArgument}ne.isValidPath=function(e){if(qr.isString(e)){var t=Wd._getDerivationIndexes(e);return t!==null&&qr.every(t,ne.isValidPath)}return qr.isNumber(e)?e>=0&&e<ne.Hardened:!1};ne.prototype.derive=function(e,t){return this.deriveChild(e,t)};ne.prototype.deriveChild=function(e,t){if(qr.isNumber(e))return this._deriveWithNumber(e,t);if(qr.isString(e))return this._deriveFromString(e);throw new ts.InvalidDerivationArgument(e)};ne.prototype._deriveWithNumber=function(e,t){if(e>=ne.Hardened||t)throw new ts.InvalidIndexCantDeriveHardened;if(e<0)throw new ts.InvalidPath(e);var r=Mt.integerAsBuffer(e),i=Mt.concat([this.publicKey.toBuffer(),r]),n=dT.sha512hmac(i,this._buffers.chainCode),a=hT.fromBuffer(n.slice(0,32),{size:32}),u=n.slice(32,64),h;try{h=mT.fromPoint(ox.getG().mul(a).add(this.publicKey.point))}catch{return this._deriveWithNumber(e+1)}var b=new ne({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:u,publicKey:h});return b};ne.prototype._deriveFromString=function(e){if(qr.includes(e,"'"))throw new ts.InvalidIndexCantDeriveHardened;if(!ne.isValidPath(e))throw new ts.InvalidPath(e);var t=Wd._getDerivationIndexes(e),r=t.reduce(function(i,n){return i._deriveWithNumber(n)},this);return r};ne.isValidSerialized=function(e,t){return qr.isNull(ne.getSerializedError(e,t))};ne.getSerializedError=function(e,t){if(!(qr.isString(e)||Mt.isBuffer(e)))return new ts.UnrecognizedArgument("expected buffer or string");if(!GF.validCharacters(e))return new Vl.InvalidB58Char("(unknown)",e);try{e=Kd.decode(e)}catch{return new Vl.InvalidB58Checksum(e)}if(e.length!==ne.DataSize)return new ts.InvalidLength(e);if(!qr.isUndefined(t)){var r=ne._validateNetwork(e,t);if(r)return r}var i=Mt.integerFromBuffer(e.slice(0,4));return i===gc.livenet.xprivkey||i===gc.testnet.xprivkey?new ts.ArgumentIsPrivateExtended:null};ne._validateNetwork=function(e,t){var r=gc.get(t);if(!r)return new Vl.InvalidNetworkArgument(t);var i=e.slice(ne.VersionStart,ne.VersionEnd);return Mt.integerFromBuffer(i)!==r.xpubkey?new Vl.InvalidNetwork(i):null};ne.prototype._buildFromPrivate=function(e){var t=qr.clone(e._buffers),r=ox.getG().mul(hT.fromBuffer(t.privateKey));return t.publicKey=ox.pointToCompressed(r),t.version=Mt.integerAsBuffer(gc.get(Mt.integerFromBuffer(t.version)).xpubkey),t.privateKey=void 0,t.checksum=void 0,t.xprivkey=void 0,this._buildFromBuffers(t)};ne.prototype._buildFromObject=function(e){var t={version:e.network?Mt.integerAsBuffer(gc.get(e.network).xpubkey):e.version,depth:qr.isNumber(e.depth)?Mt.integerAsSingleByteBuffer(e.depth):e.depth,parentFingerPrint:qr.isNumber(e.parentFingerPrint)?Mt.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:qr.isNumber(e.childIndex)?Mt.integerAsBuffer(e.childIndex):e.childIndex,chainCode:qr.isString(e.chainCode)?Buffer.from(e.chainCode,"hex"):e.chainCode,publicKey:qr.isString(e.publicKey)?Buffer.from(e.publicKey,"hex"):Mt.isBuffer(e.publicKey)?e.publicKey:e.publicKey.toBuffer(),checksum:qr.isNumber(e.checksum)?Mt.integerAsBuffer(e.checksum):e.checksum};return this._buildFromBuffers(t)};ne.prototype._buildFromSerialized=function(e){var t=Kd.decode(e),r={version:t.slice(ne.VersionStart,ne.VersionEnd),depth:t.slice(ne.DepthStart,ne.DepthEnd),parentFingerPrint:t.slice(ne.ParentFingerPrintStart,ne.ParentFingerPrintEnd),childIndex:t.slice(ne.ChildIndexStart,ne.ChildIndexEnd),chainCode:t.slice(ne.ChainCodeStart,ne.ChainCodeEnd),publicKey:t.slice(ne.PublicKeyStart,ne.PublicKeyEnd),checksum:t.slice(ne.ChecksumStart,ne.ChecksumEnd),xpubkey:e};return this._buildFromBuffers(r)};ne.prototype._buildFromBuffers=function(e){ne._validateBufferArguments(e),lT.defineImmutable(this,{_buffers:e});var t=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,e.publicKey],r=Mt.concat(t),i=Kd.checksum(r);if(!e.checksum||!e.checksum.length)e.checksum=i;else if(e.checksum.toString("hex")!==i.toString("hex"))throw new Vl.InvalidB58Checksum(r,i);var n=gc.get(Mt.integerFromBuffer(e.version)),a;a=Kd.encode(Mt.concat(t)),e.xpubkey=Buffer.from(a);var u=new mT(e.publicKey,{network:n}),h=ne.ParentFingerPrintSize,b=dT.sha256ripemd160(u.toBuffer()).slice(0,h);return lT.defineImmutable(this,{xpubkey:a,network:n,depth:Mt.integerFromSingleByteBuffer(e.depth),publicKey:u,fingerPrint:b}),this};ne._validateBufferArguments=function(e){var t=function(r,i){var n=e[r];Gd(Mt.isBuffer(n),r+" argument is not a buffer, it's "+typeof n),Gd(n.length===i,r+" has not the expected size: found "+n.length+", expected "+i)};t("version",ne.VersionSize),t("depth",ne.DepthSize),t("parentFingerPrint",ne.ParentFingerPrintSize),t("childIndex",ne.ChildIndexSize),t("chainCode",ne.ChainCodeSize),t("publicKey",ne.PublicKeySize),e.checksum&&e.checksum.length&&t("checksum",ne.CheckSumSize)};ne.fromString=function(e){return pT.checkArgument(qr.isString(e),"No valid string was provided"),new ne(e)};ne.fromObject=function(e){return pT.checkArgument(qr.isObject(e),"No valid argument was provided"),new ne(e)};ne.prototype.toString=function(){return this.xpubkey};ne.prototype.inspect=function(){return"<HDPublicKey: "+this.xpubkey+">"};ne.prototype.toObject=ne.prototype.toJSON=function(){return{network:gc.get(Mt.integerFromBuffer(this._buffers.version)).name,depth:Mt.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:Mt.integerFromBuffer(this.fingerPrint),parentFingerPrint:Mt.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:Mt.integerFromBuffer(this._buffers.childIndex),chainCode:Mt.bufferToHex(this._buffers.chainCode),publicKey:this.publicKey.toString(),checksum:Mt.integerFromBuffer(this._buffers.checksum),xpubkey:this.xpubkey}};ne.fromBuffer=function(e){return new ne(e)};ne.prototype.toBuffer=function(){return Mt.copy(this._buffers.xpubkey)};ne.Hardened=2147483648;ne.RootElementAlias=["m","M"];ne.VersionSize=4;ne.DepthSize=1;ne.ParentFingerPrintSize=4;ne.ChildIndexSize=4;ne.ChainCodeSize=32;ne.PublicKeySize=33;ne.CheckSumSize=4;ne.DataSize=78;ne.SerializedByteSize=82;ne.VersionStart=0;ne.VersionEnd=ne.VersionStart+ne.VersionSize;ne.DepthStart=ne.VersionEnd;ne.DepthEnd=ne.DepthStart+ne.DepthSize;ne.ParentFingerPrintStart=ne.DepthEnd;ne.ParentFingerPrintEnd=ne.ParentFingerPrintStart+ne.ParentFingerPrintSize;ne.ChildIndexStart=ne.ParentFingerPrintEnd;ne.ChildIndexEnd=ne.ChildIndexStart+ne.ChildIndexSize;ne.ChainCodeStart=ne.ChildIndexEnd;ne.ChainCodeEnd=ne.ChainCodeStart+ne.ChainCodeSize;ne.PublicKeyStart=ne.ChainCodeEnd;ne.PublicKeyEnd=ne.PublicKeyStart+ne.PublicKeySize;ne.ChecksumStart=ne.PublicKeyEnd;ne.ChecksumEnd=ne.ChecksumStart+ne.CheckSumSize;Gd(ne.PublicKeyEnd===ne.DataSize);Gd(ne.ChecksumEnd===ne.SerializedByteSize);gT.exports=ne});var ux=W((Ote,ST)=>{"use strict";var $d=require("assert"),bT=require("buffer"),Br=xt(),_T=It(),yT=Jr(),$F=xl(),Kl=mu(),fx=ri(),bc=to(),XF=tc(),wT=Du(),YF=Hl(),ju=tn(),Ts=ju.HDPrivateKey,mr=dr(),Wl=Dr(),ZF=128,xT=1/8,JF=512;function J(e){if(e instanceof J)return e;if(!(this instanceof J))return new J(e);if(!e)return this._generateRandomly();if(bc.get(e))return this._generateRandomly(e);if(Br.isString(e)||mr.isBuffer(e))if(J.isValidSerialized(e))this._buildFromSerialized(e);else if(Wl.isValidJSON(e))this._buildFromJSON(e);else if(mr.isBuffer(e)&&J.isValidSerialized(e.toString()))this._buildFromSerialized(e.toString());else throw J.getSerializedError(e);else if(Br.isObject(e))this._buildFromObject(e);else throw new Ts.UnrecognizedArgument(e)}J.isValidPath=function(e,t){if(Br.isString(e)){var r=J._getDerivationIndexes(e);return r!==null&&Br.every(r,J.isValidPath)}return Br.isNumber(e)?(e<J.Hardened&&t===!0&&(e+=J.Hardened),e>=0&&e<J.MaxIndex):!1};J._getDerivationIndexes=function(e){var t=e.split("/");if(Br.includes(J.RootElementAlias,e))return[];if(!Br.includes(J.RootElementAlias,t[0]))return null;var r=t.slice(1).map(function(i){var n=i.slice(-1)==="'";if(n&&(i=i.slice(0,-1)),!i||i[0]==="-")return NaN;var a=+i;return n&&(a+=J.Hardened),a});return Br.some(r,isNaN)?null:r};J.prototype.derive=function(e,t){return this.deriveNonCompliantChild(e,t)};J.prototype.deriveChild=function(e,t){if(Br.isNumber(e))return this._deriveWithNumber(e,t);if(Br.isString(e))return this._deriveFromString(e);throw new Ts.InvalidDerivationArgument(e)};J.prototype.deriveNonCompliantChild=function(e,t){if(Br.isNumber(e))return this._deriveWithNumber(e,t,!0);if(Br.isString(e))return this._deriveFromString(e,!0);throw new Ts.InvalidDerivationArgument(e)};J.prototype._deriveWithNumber=function(e,t,r){if(!J.isValidPath(e,t))throw new Ts.InvalidPath(e);t=e>=J.Hardened?!0:t,e<J.Hardened&&t===!0&&(e+=J.Hardened);var i=mr.integerAsBuffer(e),n;if(t&&r){var a=this.privateKey.bn.toBuffer();n=mr.concat([Buffer.from([0]),a,i])}else if(t){var u=this.privateKey.bn.toBuffer({size:32});$d(u.length===32,"length of private key buffer is expected to be 32 bytes"),n=mr.concat([Buffer.from([0]),u,i])}else n=mr.concat([this.publicKey.toBuffer(),i]);var h=fx.sha512hmac(n,this._buffers.chainCode),b=yT.fromBuffer(h.slice(0,32),{size:32}),w=h.slice(32,64),T=b.add(this.privateKey.toBigNumber()).umod(XF.getN()).toBuffer({size:32});if(!wT.isValid(T))return this._deriveWithNumber(e+1,null,r);var I=new J({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:w,privateKey:T});return I};J.prototype._deriveFromString=function(e,t){if(!J.isValidPath(e))throw new Ts.InvalidPath(e);var r=J._getDerivationIndexes(e),i=r.reduce(function(n,a){return n._deriveWithNumber(a,null,t)},this);return i};J.isValidSerialized=function(e,t){return!J.getSerializedError(e,t)};J.getSerializedError=function(e,t){if(!(Br.isString(e)||mr.isBuffer(e)))return new Ts.UnrecognizedArgument("Expected string or buffer");if(!$F.validCharacters(e))return new ju.InvalidB58Char("(unknown)",e);try{e=Kl.decode(e)}catch{return new ju.InvalidB58Checksum(e)}if(e.length!==J.DataLength)return new Ts.InvalidLength(e);if(!Br.isUndefined(t)){var r=J._validateNetwork(e,t);if(r)return r}return null};J._validateNetwork=function(e,t){var r=bc.get(t);if(!r)return new ju.InvalidNetworkArgument(t);var i=e.slice(0,4);return mr.integerFromBuffer(i)!==r.xprivkey?new ju.InvalidNetwork(i):null};J.fromString=function(e){return _T.checkArgument(Br.isString(e),"No valid string was provided"),new J(e)};J.fromObject=function(e){return _T.checkArgument(Br.isObject(e),"No valid argument was provided"),new J(e)};J.prototype._buildFromJSON=function(e){return this._buildFromObject(JSON.parse(e))};J.prototype._buildFromObject=function(e){var t={version:e.network?mr.integerAsBuffer(bc.get(e.network).xprivkey):e.version,depth:Br.isNumber(e.depth)?mr.integerAsSingleByteBuffer(e.depth):e.depth,parentFingerPrint:Br.isNumber(e.parentFingerPrint)?mr.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:Br.isNumber(e.childIndex)?mr.integerAsBuffer(e.childIndex):e.childIndex,chainCode:Br.isString(e.chainCode)?Buffer.from(e.chainCode,"hex"):e.chainCode,privateKey:Br.isString(e.privateKey)&&Wl.isHexa(e.privateKey)?Buffer.from(e.privateKey,"hex"):e.privateKey,checksum:e.checksum?e.checksum.length?e.checksum:mr.integerAsBuffer(e.checksum):void 0};return this._buildFromBuffers(t)};J.prototype._buildFromSerialized=function(e){var t=Kl.decode(e),r={version:t.slice(J.VersionStart,J.VersionEnd),depth:t.slice(J.DepthStart,J.DepthEnd),parentFingerPrint:t.slice(J.ParentFingerPrintStart,J.ParentFingerPrintEnd),childIndex:t.slice(J.ChildIndexStart,J.ChildIndexEnd),chainCode:t.slice(J.ChainCodeStart,J.ChainCodeEnd),privateKey:t.slice(J.PrivateKeyStart,J.PrivateKeyEnd),checksum:t.slice(J.ChecksumStart,J.ChecksumEnd),xprivkey:e};return this._buildFromBuffers(r)};J.prototype._generateRandomly=function(e){return J.fromSeed(YF.getRandomBuffer(64),e)};J.fromSeed=function(e,t){if(Wl.isHexaString(e)&&(e=Buffer.from(e,"hex")),!Buffer.isBuffer(e))throw new Ts.InvalidEntropyArgument(e);if(e.length<ZF*xT)throw new Ts.InvalidEntropyArgument.NotEnoughEntropy(e);if(e.length>JF*xT)throw new Ts.InvalidEntropyArgument.TooMuchEntropy(e);var r=fx.sha512hmac(e,Buffer.from("Bitcoin seed"));return new J({network:bc.get(t)||bc.defaultNetwork,depth:0,parentFingerPrint:0,childIndex:0,privateKey:r.slice(0,32),chainCode:r.slice(32,64)})};J.prototype._calcHDPublicKey=function(){if(!this._hdPublicKey){var e=cx();this._hdPublicKey=new e(this)}};J.prototype._buildFromBuffers=function(e){J._validateBufferArguments(e),Wl.defineImmutable(this,{_buffers:e});var t=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,mr.emptyBuffer(1),e.privateKey],r=bT.Buffer.concat(t);if(!e.checksum||!e.checksum.length)e.checksum=Kl.checksum(r);else if(e.checksum.toString()!==Kl.checksum(r).toString())throw new ju.InvalidB58Checksum(r);var i=bc.get(mr.integerFromBuffer(e.version)),n;n=Kl.encode(bT.Buffer.concat(t)),e.xprivkey=Buffer.from(n);var a=new wT(yT.fromBuffer(e.privateKey),i),u=a.toPublicKey(),h=J.ParentFingerPrintSize,b=fx.sha256ripemd160(u.toBuffer()).slice(0,h);return Wl.defineImmutable(this,{xprivkey:n,network:i,depth:mr.integerFromSingleByteBuffer(e.depth),privateKey:a,publicKey:u,fingerPrint:b}),this._hdPublicKey=null,Object.defineProperty(this,"hdPublicKey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey}}),Object.defineProperty(this,"xpubkey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey.xpubkey}}),this};J._validateBufferArguments=function(e){var t=function(r,i){var n=e[r];$d(mr.isBuffer(n),r+" argument is not a buffer"),$d(n.length===i,r+" has not the expected size: found "+n.length+", expected "+i)};t("version",J.VersionSize),t("depth",J.DepthSize),t("parentFingerPrint",J.ParentFingerPrintSize),t("childIndex",J.ChildIndexSize),t("chainCode",J.ChainCodeSize),t("privateKey",J.PrivateKeySize),e.checksum&&e.checksum.length&&t("checksum",J.CheckSumSize)};J.prototype.toString=function(){return this.xprivkey};J.prototype.inspect=function(){return"<HDPrivateKey: "+this.xprivkey+">"};J.prototype.toObject=J.prototype.toJSON=function(){return{network:bc.get(mr.integerFromBuffer(this._buffers.version),"xprivkey").name,depth:mr.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:mr.integerFromBuffer(this.fingerPrint),parentFingerPrint:mr.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:mr.integerFromBuffer(this._buffers.childIndex),chainCode:mr.bufferToHex(this._buffers.chainCode),privateKey:this.privateKey.toBuffer().toString("hex"),checksum:mr.integerFromBuffer(this._buffers.checksum),xprivkey:this.xprivkey}};J.fromBuffer=function(e){return new J(e.toString())};J.prototype.toBuffer=function(){return mr.copy(this._buffers.xprivkey)};J.DefaultDepth=0;J.DefaultFingerprint=0;J.DefaultChildIndex=0;J.Hardened=2147483648;J.MaxIndex=2*J.Hardened;J.RootElementAlias=["m","M","m'","M'"];J.VersionSize=4;J.DepthSize=1;J.ParentFingerPrintSize=4;J.ChildIndexSize=4;J.ChainCodeSize=32;J.PrivateKeySize=32;J.CheckSumSize=4;J.DataLength=78;J.SerializedByteSize=82;J.VersionStart=0;J.VersionEnd=J.VersionStart+J.VersionSize;J.DepthStart=J.VersionEnd;J.DepthEnd=J.DepthStart+J.DepthSize;J.ParentFingerPrintStart=J.DepthEnd;J.ParentFingerPrintEnd=J.ParentFingerPrintStart+J.ParentFingerPrintSize;J.ChildIndexStart=J.ParentFingerPrintEnd;J.ChildIndexEnd=J.ChildIndexStart+J.ChildIndexSize;J.ChainCodeStart=J.ChildIndexEnd;J.ChainCodeEnd=J.ChainCodeStart+J.ChainCodeSize;J.PrivateKeyStart=J.ChainCodeEnd+1;J.PrivateKeyEnd=J.PrivateKeyStart+J.PrivateKeySize;J.ChecksumStart=J.PrivateKeyEnd;J.ChecksumEnd=J.ChecksumStart+J.CheckSumSize;$d(J.ChecksumEnd===J.SerializedByteSize);ST.exports=J});var IT=W((Nte,TT)=>{"use strict";var Gl=xt(),QF=Du(),eH=Zn(),Xd=Yn(),ET=Si(),Yd=Ml(),lx=Ui(),tH=ri().sha256sha256,rH=Dr(),mo=It();function Fr(e){return this instanceof Fr?(mo.checkArgument(Gl.isString(e),"First argument should be a string"),this.message=e,this):new Fr(e)}Fr.MAGIC_BYTES=Buffer.from(`Bitcoin Signed Message:
30
- `);Fr.prototype.magicHash=function(){var t=ET.varintBufNum(Fr.MAGIC_BYTES.length),r=Buffer.from(this.message),i=ET.varintBufNum(r.length),n=Buffer.concat([t,Fr.MAGIC_BYTES,i,r]),a=tH(n);return a};Fr.prototype._sign=function(t){mo.checkArgument(t instanceof QF,"First argument should be an instance of PrivateKey");var r=this.magicHash(),i=new Yd;return i.hashbuf=r,i.privkey=t,i.pubkey=t.toPublicKey(),i.signRandomK(),i.calci(),i.sig};Fr.prototype.sign=function(t){var r=this._sign(t);return r.toCompact().toString("base64")};Fr.prototype._verify=function(t,r){mo.checkArgument(t instanceof eH,"First argument should be an instance of PublicKey"),mo.checkArgument(r instanceof lx,"Second argument should be an instance of Signature");var i=this.magicHash(),n=Yd.verify(i,r,t);return n||(this.error="The signature was invalid"),n};Fr.prototype.verify=function(t,r){mo.checkArgument(t),mo.checkArgument(r&&Gl.isString(r)),Gl.isString(t)&&(t=Xd.fromString(t));var i=lx.fromCompact(Buffer.from(r,"base64")),n=new Yd;n.hashbuf=this.magicHash(),n.sig=i;var a=n.toPublicKey(),u=Xd.fromPublicKey(a,t.network);return t.toString()!==u.toString()?(this.error="The signature did not match the message digest",!1):this._verify(a,i)};Fr.prototype.recoverPublicKey=function(t,r){mo.checkArgument(t),mo.checkArgument(r&&Gl.isString(r)),Gl.isString(t)&&(t=Xd.fromString(t));var i=lx.fromCompact(Buffer.from(r,"base64")),n=new Yd;n.hashbuf=this.magicHash(),n.sig=i;var a=n.toPublicKey(),u=Xd.fromPublicKey(a,t.network);return t.toString()!==u.toString()&&(this.error="The signature did not match the message digest"),a.toString()};Fr.fromString=function(e){return new Fr(e)};Fr.fromJSON=function(t){return rH.isValidJSON(t)&&(t=JSON.parse(t)),new Fr(t.message)};Fr.prototype.toObject=function(){return{message:this.message}};Fr.prototype.toJSON=function(){return JSON.stringify(this.toObject())};Fr.prototype.toString=function(){return this.message};Fr.prototype.inspect=function(){return"<Message: "+this.toString()+">"};TT.exports=Fr;var kte=Fi()});var PT=W((Pte,NT)=>{"use strict";var AT=xt(),OT=require("url"),RT=Yn(),kT=Cd(),Mr=function(e,t){if(!(this instanceof Mr))return new Mr(e,t);if(this.extras={},this.knownParams=t||[],this.address=this.network=this.amount=this.message=null,typeof e=="string"){var r=Mr.parse(e);r.amount&&(r.amount=this._parseAmount(r.amount)),this._fromObject(r)}else if(typeof e=="object")this._fromObject(e);else throw new TypeError("Unrecognized data format.")};Mr.fromString=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return new Mr(t)};Mr.fromObject=function(t){return new Mr(t)};Mr.isValid=function(e,t){try{new Mr(e,t)}catch{return!1}return!0};Mr.parse=function(e){var t=OT.parse(e,!0);if(t.protocol!=="bitcoin:")throw new TypeError("Invalid bitcoin URI");var r=/[^:]*:\/?\/?([^?]*)/.exec(e);return t.query.address=r&&r[1]||void 0,t.query};Mr.Members=["address","amount","message","label","r"];Mr.prototype._fromObject=function(e){if(!RT.isValid(e.address))throw new TypeError("Invalid bitcoin address");this.address=new RT(e.address),this.network=this.address.network,this.amount=e.amount;for(var t in e)if(!(t==="address"||t==="amount")){if(/^req-/.exec(t)&&this.knownParams.indexOf(t)===-1)throw Error("Unknown required argument "+t);var r=Mr.Members.indexOf(t)>-1?this:this.extras;r[t]=e[t]}};Mr.prototype._parseAmount=function(e){if(e=Number(e),isNaN(e))throw new TypeError("Invalid amount");return kT.fromBTC(e).toSatoshis()};Mr.prototype.toObject=Mr.prototype.toJSON=function(){for(var t={},r=0;r<Mr.Members.length;r++){var i=Mr.Members[r];this.hasOwnProperty(i)&&typeof this[i]<"u"&&(t[i]=this[i].toString())}return AT.extend(t,this.extras),t};Mr.prototype.toString=function(){var e={};return this.amount&&(e.amount=kT.fromSatoshis(this.amount).toBTC()),this.message&&(e.message=this.message),this.label&&(e.label=this.label),this.r&&(e.r=this.r),AT.extend(e,this.extras),OT.format({protocol:"bitcoin:",host:this.address,query:e})};Mr.prototype.inspect=function(){return"<URI: "+this.toString()+">"};NT.exports=Mr});var MT=W((Bte,BT)=>{"use strict";var Ve=BT.exports;Ve.version="v"+AS().version;Ve.versionGuard=function(e){if(e!==void 0){var t="More than one instance of bitcore-lib found. Please make sure to require bitcore-lib and check that submodules do not also include their own bitcore-lib dependency.";throw new Error(t)}};Ve.versionGuard(global._bitcore);global._bitcore=Ve.version;Ve.crypto={};Ve.crypto.BN=Jr();Ve.crypto.ECDSA=Ml();Ve.crypto.Hash=ri();Ve.crypto.Random=Hl();Ve.crypto.Point=tc();Ve.crypto.Signature=Ui();Ve.encoding={};Ve.encoding.Base58=xl();Ve.encoding.Base58Check=mu();Ve.encoding.BufferReader=Ss();Ve.encoding.BufferWriter=Si();Ve.encoding.Varint=Y4();Ve.util={};Ve.util.buffer=dr();Ve.util.js=Dr();Ve.util.preconditions=It();Ve.errors=tn();Ve.Address=Yn();Ve.Block=fT();Ve.MerkleBlock=ax();Ve.BlockHeader=jl();Ve.HDPrivateKey=ux();Ve.HDPublicKey=cx();Ve.Message=IT();Ve.Networks=to();Ve.Opcode=gd();Ve.PrivateKey=Du();Ve.PublicKey=Zn();Ve.Script=Fi();Ve.Transaction=Dl();Ve.URI=PT();Ve.Unit=Cd();Ve.deps={};Ve.deps.bnjs=fg();Ve.deps.bs58=Gg();Ve.deps.Buffer=Buffer;Ve.deps.elliptic=zg();Ve.deps._=xt();Ve.Transaction.sighash=ha()});var iH={};Oa(iH,{Provider:()=>Vn,assets:()=>hx,models:()=>dx,services:()=>vx,types:()=>ag,utils:()=>cg});module.exports=H7(iH);function of(e,t){return function(){return e.apply(t,arguments)}}var{toString:z7}=Object.prototype,{getPrototypeOf:um}=Object,Up=(e=>t=>{let r=z7.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),cs=e=>(e=e.toLowerCase(),t=>Up(t)===e),qp=e=>t=>typeof t===e,{isArray:Mc}=Array,cf=qp("undefined");function j7(e){return e!==null&&!cf(e)&&e.constructor!==null&&!cf(e.constructor)&&mn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var z_=cs("ArrayBuffer");function V7(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&z_(e.buffer),t}var K7=qp("string"),mn=qp("function"),j_=qp("number"),Fp=e=>e!==null&&typeof e=="object",W7=e=>e===!0||e===!1,Dp=e=>{if(Up(e)!=="object")return!1;let t=um(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},G7=cs("Date"),$7=cs("File"),X7=cs("Blob"),Y7=cs("FileList"),Z7=e=>Fp(e)&&mn(e.pipe),J7=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||mn(e.append)&&((t=Up(e))==="formdata"||t==="object"&&mn(e.toString)&&e.toString()==="[object FormData]"))},Q7=cs("URLSearchParams"),e9=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function uf(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,n;if(typeof e!="object"&&(e=[e]),Mc(e))for(i=0,n=e.length;i<n;i++)t.call(null,e[i],i,e);else{let a=r?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length,h;for(i=0;i<u;i++)h=a[i],t.call(null,e[h],h,e)}}function V_(e,t){t=t.toLowerCase();let r=Object.keys(e),i=r.length,n;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}var K_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,W_=e=>!cf(e)&&e!==K_;function cm(){let{caseless:e}=W_(this)&&this||{},t={},r=(i,n)=>{let a=e&&V_(t,n)||n;Dp(t[a])&&Dp(i)?t[a]=cm(t[a],i):Dp(i)?t[a]=cm({},i):Mc(i)?t[a]=i.slice():t[a]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&uf(arguments[i],r);return t}var t9=(e,t,r,{allOwnKeys:i}={})=>(uf(t,(n,a)=>{r&&mn(n)?e[a]=of(n,r):e[a]=n},{allOwnKeys:i}),e),r9=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),i9=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},n9=(e,t,r,i)=>{let n,a,u,h={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),a=n.length;a-- >0;)u=n[a],(!i||i(u,e,t))&&!h[u]&&(t[u]=e[u],h[u]=!0);e=r!==!1&&um(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},s9=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let i=e.indexOf(t,r);return i!==-1&&i===r},a9=e=>{if(!e)return null;if(Mc(e))return e;let t=e.length;if(!j_(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},o9=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&um(Uint8Array)),c9=(e,t)=>{let i=(e&&e[Symbol.iterator]).call(e),n;for(;(n=i.next())&&!n.done;){let a=n.value;t.call(e,a[0],a[1])}},u9=(e,t)=>{let r,i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},f9=cs("HTMLFormElement"),l9=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,n){return i.toUpperCase()+n}),F_=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),p9=cs("RegExp"),G_=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),i={};uf(r,(n,a)=>{let u;(u=t(n,a,e))!==!1&&(i[a]=u||n)}),Object.defineProperties(e,i)},h9=e=>{G_(e,(t,r)=>{if(mn(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let i=e[r];if(mn(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},d9=(e,t)=>{let r={},i=n=>{n.forEach(a=>{r[a]=!0})};return Mc(e)?i(e):i(String(e).split(t)),r},m9=()=>{},v9=(e,t)=>(e=+e,Number.isFinite(e)?e:t),om="abcdefghijklmnopqrstuvwxyz",H_="0123456789",$_={DIGIT:H_,ALPHA:om,ALPHA_DIGIT:om+om.toUpperCase()+H_},g9=(e=16,t=$_.ALPHA_DIGIT)=>{let r="",{length:i}=t;for(;e--;)r+=t[Math.random()*i|0];return r};function b9(e){return!!(e&&mn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var x9=e=>{let t=new Array(10),r=(i,n)=>{if(Fp(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[n]=i;let a=Mc(i)?[]:{};return uf(i,(u,h)=>{let b=r(u,n+1);!cf(b)&&(a[h]=b)}),t[n]=void 0,a}}return i};return r(e,0)},_9=cs("AsyncFunction"),y9=e=>e&&(Fp(e)||mn(e))&&mn(e.then)&&mn(e.catch),z={isArray:Mc,isArrayBuffer:z_,isBuffer:j7,isFormData:J7,isArrayBufferView:V7,isString:K7,isNumber:j_,isBoolean:W7,isObject:Fp,isPlainObject:Dp,isUndefined:cf,isDate:G7,isFile:$7,isBlob:X7,isRegExp:p9,isFunction:mn,isStream:Z7,isURLSearchParams:Q7,isTypedArray:o9,isFileList:Y7,forEach:uf,merge:cm,extend:t9,trim:e9,stripBOM:r9,inherits:i9,toFlatObject:n9,kindOf:Up,kindOfTest:cs,endsWith:s9,toArray:a9,forEachEntry:c9,matchAll:u9,isHTMLForm:f9,hasOwnProperty:F_,hasOwnProp:F_,reduceDescriptors:G_,freezeMethods:h9,toObjectSet:d9,toCamelCase:l9,noop:m9,toFiniteNumber:v9,findKey:V_,global:K_,isContextDefined:W_,ALPHABET:$_,generateString:g9,isSpecCompliantForm:b9,toJSONObject:x9,isAsyncFn:_9,isThenable:y9};function Cc(e,t,r,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),n&&(this.response=n)}z.inherits(Cc,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:z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var X_=Cc.prototype,Y_={};["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(e=>{Y_[e]={value:e}});Object.defineProperties(Cc,Y_);Object.defineProperty(X_,"isAxiosError",{value:!0});Cc.from=(e,t,r,i,n,a)=>{let u=Object.create(X_);return z.toFlatObject(e,u,function(b){return b!==Error.prototype},h=>h!=="isAxiosError"),Cc.call(u,e.message,t,r,i,n),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};var Se=Cc;var Py=Yr(Ny(),1),jp=Py.default;function _m(e){return z.isPlainObject(e)||z.isArray(e)}function My(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function By(e,t,r){return e?e.concat(t).map(function(n,a){return n=My(n),!r&&a?"["+n+"]":n}).join(r?".":""):t}function nk(e){return z.isArray(e)&&!e.some(_m)}var sk=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function ak(e,t,r){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new(jp||FormData),r=z.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(L,X){return!z.isUndefined(X[L])});let i=r.metaTokens,n=r.visitor||T,a=r.dots,u=r.indexes,b=(r.Blob||typeof Blob<"u"&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(n))throw new TypeError("visitor must be a function");function w(P){if(P===null)return"";if(z.isDate(P))return P.toISOString();if(!b&&z.isBlob(P))throw new Se("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(P)||z.isTypedArray(P)?b&&typeof Blob=="function"?new Blob([P]):Buffer.from(P):P}function T(P,L,X){let V=P;if(P&&!X&&typeof P=="object"){if(z.endsWith(L,"{}"))L=i?L:L.slice(0,-2),P=JSON.stringify(P);else if(z.isArray(P)&&nk(P)||(z.isFileList(P)||z.endsWith(L,"[]"))&&(V=z.toArray(P)))return L=My(L),V.forEach(function(ee,fe){!(z.isUndefined(ee)||ee===null)&&t.append(u===!0?By([L],fe,a):u===null?L:L+"[]",w(ee))}),!1}return _m(P)?!0:(t.append(By(X,L,a),w(P)),!1)}let I=[],B=Object.assign(sk,{defaultVisitor:T,convertValue:w,isVisitable:_m});function M(P,L){if(!z.isUndefined(P)){if(I.indexOf(P)!==-1)throw Error("Circular reference detected in "+L.join("."));I.push(P),z.forEach(P,function(V,q){(!(z.isUndefined(V)||V===null)&&n.call(t,V,z.isString(q)?q.trim():q,L,B))===!0&&M(V,L?L.concat(q):[q])}),I.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return M(e),t}var ka=ak;function Cy(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function Ly(e,t){this._pairs=[],e&&ka(e,this,t)}var Dy=Ly.prototype;Dy.append=function(t,r){this._pairs.push([t,r])};Dy.toString=function(t){let r=t?function(i){return t.call(this,i,Cy)}:Cy;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var Uy=Ly;function ok(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function To(e,t,r){if(!t)return e;let i=r&&r.encode||ok,n=r&&r.serialize,a;if(n?a=n(t,r):a=z.isURLSearchParams(t)?t.toString():new Uy(t,r).toString(i),a){let u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}var ym=class{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(i){i!==null&&t(i)})}},wm=ym;var Lc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var qy=Yr(require("url"),1),Fy=qy.default.URLSearchParams;var Hy={isNode:!0,classes:{URLSearchParams:Fy,FormData:jp,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};var Sm={};Oa(Sm,{hasBrowserEnv:()=>zy,hasStandardBrowserEnv:()=>ck,hasStandardBrowserWebWorkerEnv:()=>uk});var zy=typeof window<"u"&&typeof document<"u",ck=(e=>zy&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),uk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function";var jr={...Sm,...Hy};function Em(e,t){return ka(e,new jr.classes.URLSearchParams,Object.assign({visitor:function(r,i,n,a){return jr.isNode&&z.isBuffer(r)?(this.append(i,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function fk(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function lk(e){let t={},r=Object.keys(e),i,n=r.length,a;for(i=0;i<n;i++)a=r[i],t[a]=e[a];return t}function pk(e){function t(r,i,n,a){let u=r[a++];if(u==="__proto__")return!0;let h=Number.isFinite(+u),b=a>=r.length;return u=!u&&z.isArray(n)?n.length:u,b?(z.hasOwnProp(n,u)?n[u]=[n[u],i]:n[u]=i,!h):((!n[u]||!z.isObject(n[u]))&&(n[u]=[]),t(r,i,n[u],a)&&z.isArray(n[u])&&(n[u]=lk(n[u])),!h)}if(z.isFormData(e)&&z.isFunction(e.entries)){let r={};return z.forEachEntry(e,(i,n)=>{t(fk(i),n,r,0)}),r}return null}var Vp=pk;function hk(e,t,r){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}var Tm={transitional:Lc,adapter:["xhr","http"],transformRequest:[function(t,r){let i=r.getContentType()||"",n=i.indexOf("application/json")>-1,a=z.isObject(t);if(a&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return n?JSON.stringify(Vp(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Em(t,this.formSerializer).toString();if((h=z.isFileList(t))||i.indexOf("multipart/form-data")>-1){let b=this.env&&this.env.FormData;return ka(h?{"files[]":t}:t,b&&new b,this.formSerializer)}}return a||n?(r.setContentType("application/json",!1),hk(t)):t}],transformResponse:[function(t){let r=this.transitional||Tm.transitional,i=r&&r.forcedJSONParsing,n=this.responseType==="json";if(t&&z.isString(t)&&(i&&!this.responseType||n)){let u=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(h){if(u)throw h.name==="SyntaxError"?Se.from(h,Se.ERR_BAD_RESPONSE,this,null,this.response):h}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:jr.classes.FormData,Blob:jr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],e=>{Tm.headers[e]={}});var Dc=Tm;var dk=z.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"]),jy=e=>{let t={},r,i,n;return e&&e.split(`
31
- `).forEach(function(u){n=u.indexOf(":"),r=u.substring(0,n).trim().toLowerCase(),i=u.substring(n+1).trim(),!(!r||t[r]&&dk[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t};var Vy=Symbol("internals");function ff(e){return e&&String(e).trim().toLowerCase()}function Kp(e){return e===!1||e==null?e:z.isArray(e)?e.map(Kp):String(e)}function mk(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}var vk=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Im(e,t,r,i,n){if(z.isFunction(i))return i.call(this,t,r);if(n&&(t=r),!!z.isString(t)){if(z.isString(i))return t.indexOf(i)!==-1;if(z.isRegExp(i))return i.test(t)}}function gk(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function bk(e,t){let r=z.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(n,a,u){return this[i].call(this,t,n,a,u)},configurable:!0})})}var Uc=class{constructor(t){t&&this.set(t)}set(t,r,i){let n=this;function a(h,b,w){let T=ff(b);if(!T)throw new Error("header name must be a non-empty string");let I=z.findKey(n,T);(!I||n[I]===void 0||w===!0||w===void 0&&n[I]!==!1)&&(n[I||b]=Kp(h))}let u=(h,b)=>z.forEach(h,(w,T)=>a(w,T,b));return z.isPlainObject(t)||t instanceof this.constructor?u(t,r):z.isString(t)&&(t=t.trim())&&!vk(t)?u(jy(t),r):t!=null&&a(r,t,i),this}get(t,r){if(t=ff(t),t){let i=z.findKey(this,t);if(i){let n=this[i];if(!r)return n;if(r===!0)return mk(n);if(z.isFunction(r))return r.call(this,n,i);if(z.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ff(t),t){let i=z.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||Im(this,this[i],i,r)))}return!1}delete(t,r){let i=this,n=!1;function a(u){if(u=ff(u),u){let h=z.findKey(i,u);h&&(!r||Im(i,i[h],h,r))&&(delete i[h],n=!0)}}return z.isArray(t)?t.forEach(a):a(t),n}clear(t){let r=Object.keys(this),i=r.length,n=!1;for(;i--;){let a=r[i];(!t||Im(this,this[a],a,t,!0))&&(delete this[a],n=!0)}return n}normalize(t){let r=this,i={};return z.forEach(this,(n,a)=>{let u=z.findKey(i,a);if(u){r[u]=Kp(n),delete r[a];return}let h=t?gk(a):String(a).trim();h!==a&&delete r[a],r[h]=Kp(n),i[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return z.forEach(this,(i,n)=>{i!=null&&i!==!1&&(r[n]=t&&z.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
32
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let i=new this(t);return r.forEach(n=>i.set(n)),i}static accessor(t){let i=(this[Vy]=this[Vy]={accessors:{}}).accessors,n=this.prototype;function a(u){let h=ff(u);i[h]||(bk(n,u),i[h]=!0)}return z.isArray(t)?t.forEach(a):a(t),this}};Uc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);z.reduceDescriptors(Uc.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}});z.freezeMethods(Uc);var Vr=Uc;function lf(e,t){let r=this||Dc,i=t||r,n=Vr.from(i.headers),a=i.data;return z.forEach(e,function(h){a=h.call(r,a,n.normalize(),t?t.status:void 0)}),n.normalize(),a}function pf(e){return!!(e&&e.__CANCEL__)}function Ky(e,t,r){Se.call(this,e??"canceled",Se.ERR_CANCELED,t,r),this.name="CanceledError"}z.inherits(Ky,Se,{__CANCEL__:!0});var Dn=Ky;function Na(e,t,r){let i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new Se("Request failed with status code "+r.status,[Se.ERR_BAD_REQUEST,Se.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Rm(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Am(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Io(e,t){return e&&!Rm(t)?Am(e,t):t}var d2=Yr(Gy(),1),m2=Yr(require("http"),1),v2=Yr(require("https"),1),g2=Yr(require("util"),1),b2=Yr(e2(),1),$s=Yr(require("zlib"),1);var Ao="1.6.8";function bf(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var Ck=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Hm(e,t,r){let i=r&&r.Blob||jr.classes.Blob,n=bf(e);if(t===void 0&&i&&(t=!0),n==="data"){e=n.length?e.slice(n.length+1):e;let a=Ck.exec(e);if(!a)throw new Se("Invalid URL",Se.ERR_INVALID_URL);let u=a[1],h=a[2],b=a[3],w=Buffer.from(decodeURIComponent(b),h?"base64":"utf8");if(t){if(!i)throw new Se("Blob is not supported",Se.ERR_NOT_SUPPORT);return new i([w],{type:u})}return w}throw new Se("Unsupported protocol "+n,Se.ERR_NOT_SUPPORT)}var Oo=Yr(require("stream"),1);var r2=Yr(require("stream"),1);function Lk(e,t){let r=0,i=1e3/t,n=null;return function(u,h){let b=Date.now();if(u||b-r>i)return n&&(clearTimeout(n),n=null),r=b,e.apply(null,h);n||(n=setTimeout(()=>(n=null,r=Date.now(),e.apply(null,h)),i-(b-r)))}}var t2=Lk;function Dk(e,t){e=e||10;let r=new Array(e),i=new Array(e),n=0,a=0,u;return t=t!==void 0?t:1e3,function(b){let w=Date.now(),T=i[a];u||(u=w),r[n]=b,i[n]=w;let I=a,B=0;for(;I!==n;)B+=r[I++],I=I%e;if(n=(n+1)%e,n===a&&(a=(a+1)%e),w-u<t)return;let M=T&&w-T;return M?Math.round(B*1e3/M):void 0}}var Wp=Dk;var Gp=Symbol("internals"),zm=class extends r2.default.Transform{constructor(t){t=z.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(h,b)=>!z.isUndefined(b[h])),super({readableHighWaterMark:t.chunkSize});let r=this,i=this[Gp]={length:t.length,timeWindow:t.timeWindow,ticksRate:t.ticksRate,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},n=Wp(i.ticksRate*t.samplesCount,i.timeWindow);this.on("newListener",h=>{h==="progress"&&(i.isCaptured||(i.isCaptured=!0))});let a=0;i.updateProgress=t2(function(){let b=i.length,w=i.bytesSeen,T=w-a;if(!T||r.destroyed)return;let I=n(T);a=w,process.nextTick(()=>{r.emit("progress",{loaded:w,total:b,progress:b?w/b:void 0,bytes:T,rate:I||void 0,estimated:I&&b&&w<=b?(b-w)/I:void 0})})},i.ticksRate);let u=()=>{i.updateProgress(!0)};this.once("end",u),this.once("error",u)}_read(t){let r=this[Gp];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,i){let n=this,a=this[Gp],u=a.maxRate,h=this.readableHighWaterMark,b=a.timeWindow,w=1e3/b,T=u/w,I=a.minChunkSize!==!1?Math.max(a.minChunkSize,T*.01):0;function B(P,L){let X=Buffer.byteLength(P);a.bytesSeen+=X,a.bytes+=X,a.isCaptured&&a.updateProgress(),n.push(P)?process.nextTick(L):a.onReadCallback=()=>{a.onReadCallback=null,process.nextTick(L)}}let M=(P,L)=>{let X=Buffer.byteLength(P),V=null,q=h,ee,fe=0;if(u){let _e=Date.now();(!a.ts||(fe=_e-a.ts)>=b)&&(a.ts=_e,ee=T-a.bytes,a.bytes=ee<0?-ee:0,fe=0),ee=T-a.bytes}if(u){if(ee<=0)return setTimeout(()=>{L(null,P)},b-fe);ee<q&&(q=ee)}q&&X>q&&X-q>I&&(V=P.subarray(q),P=P.subarray(0,q)),B(P,V?()=>{process.nextTick(L,null,V)}:L)};M(t,function P(L,X){if(L)return i(L);X?M(X,P):i(null)})}setLength(t){return this[Gp].length=+t,this}},jm=zm;var x2=require("events");var n2=require("util"),s2=require("stream");var{asyncIterator:i2}=Symbol,Uk=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[i2]?yield*e[i2]():yield e},$p=Uk;var qk=z.ALPHABET.ALPHA_DIGIT+"-_",xf=new n2.TextEncoder,Pa=`\r
33
- `,Fk=xf.encode(Pa),Hk=2,Vm=class{constructor(t,r){let{escapeName:i}=this.constructor,n=z.isString(r),a=`Content-Disposition: form-data; name="${i(t)}"${!n&&r.name?`; filename="${i(r.name)}"`:""}${Pa}`;n?r=xf.encode(String(r).replace(/\r?\n|\r\n?/g,Pa)):a+=`Content-Type: ${r.type||"application/octet-stream"}${Pa}`,this.headers=xf.encode(a+Pa),this.contentLength=n?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+Hk,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;z.isTypedArray(t)?yield t:yield*$p(t),yield Fk}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},zk=(e,t,r)=>{let{tag:i="form-data-boundary",size:n=25,boundary:a=i+"-"+z.generateString(n,qk)}=r||{};if(!z.isFormData(e))throw TypeError("FormData instance required");if(a.length<1||a.length>70)throw Error("boundary must be 10-70 characters long");let u=xf.encode("--"+a+Pa),h=xf.encode("--"+a+"--"+Pa+Pa),b=h.byteLength,w=Array.from(e.entries()).map(([I,B])=>{let M=new Vm(I,B);return b+=M.size,M});b+=u.byteLength*w.length,b=z.toFiniteNumber(b);let T={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(b)&&(T["Content-Length"]=b),t&&t(T),s2.Readable.from(async function*(){for(let I of w)yield u,yield*I.encode();yield h}())},a2=zk;var o2=Yr(require("stream"),1),Km=class extends o2.default.Transform{__transform(t,r,i){this.push(t),i()}_transform(t,r,i){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let n=Buffer.alloc(2);n[0]=120,n[1]=156,this.push(n,r)}this.__transform(t,r,i)}},c2=Km;var jk=(e,t)=>z.isAsyncFn(e)?function(...r){let i=r.pop();e.apply(this,r).then(n=>{try{t?i(null,...t(n)):i(null,n)}catch(a){i(a)}},i)}:e,u2=jk;var f2={flush:$s.default.constants.Z_SYNC_FLUSH,finishFlush:$s.default.constants.Z_SYNC_FLUSH},Vk={flush:$s.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:$s.default.constants.BROTLI_OPERATION_FLUSH},l2=z.isFunction($s.default.createBrotliDecompress),{http:Kk,https:Wk}=b2.default,Gk=/https:?/,p2=jr.protocols.map(e=>e+":");function $k(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function _2(e,t,r){let i=t;if(!i&&i!==!1){let n=(0,d2.getProxyForUrl)(r);n&&(i=new URL(n))}if(i){if(i.username&&(i.auth=(i.username||"")+":"+(i.password||"")),i.auth){(i.auth.username||i.auth.password)&&(i.auth=(i.auth.username||"")+":"+(i.auth.password||""));let a=Buffer.from(i.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+a}e.headers.host=e.hostname+(e.port?":"+e.port:"");let n=i.hostname||i.host;e.hostname=n,e.host=n,e.port=i.port,e.path=r,i.protocol&&(e.protocol=i.protocol.includes(":")?i.protocol:`${i.protocol}:`)}e.beforeRedirects.proxy=function(a){_2(a,t,a.href)}}var Xk=typeof process<"u"&&z.kindOf(process)==="process",Yk=e=>new Promise((t,r)=>{let i,n,a=(b,w)=>{n||(n=!0,i&&i(b,w))},u=b=>{a(b),t(b)},h=b=>{a(b,!0),r(b)};e(u,h,b=>i=b).catch(h)}),Zk=({address:e,family:t})=>{if(!z.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},h2=(e,t)=>Zk(z.isObject(e)?e:{address:e,family:t}),y2=Xk&&function(t){return Yk(async function(i,n,a){let{data:u,lookup:h,family:b}=t,{responseType:w,responseEncoding:T}=t,I=t.method.toUpperCase(),B,M=!1,P;if(h){let _=u2(h,l=>z.isArray(l)?l:[l]);h=(l,m,A)=>{_(l,m,(U,j,Z)=>{if(U)return A(U);let se=z.isArray(j)?j.map(ae=>h2(ae)):[h2(j,Z)];m.all?A(U,se):A(U,se[0].address,se[0].family)})}}let L=new x2.EventEmitter,X=()=>{t.cancelToken&&t.cancelToken.unsubscribe(V),t.signal&&t.signal.removeEventListener("abort",V),L.removeAllListeners()};a((_,l)=>{B=!0,l&&(M=!0,X())});function V(_){L.emit("abort",!_||_.type?new Dn(null,t,P):_)}L.once("abort",n),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(V),t.signal&&(t.signal.aborted?V():t.signal.addEventListener("abort",V)));let q=Io(t.baseURL,t.url),ee=new URL(q,"http://localhost"),fe=ee.protocol||p2[0];if(fe==="data:"){let _;if(I!=="GET")return Na(i,n,{status:405,statusText:"method not allowed",headers:{},config:t});try{_=Hm(t.url,w==="blob",{Blob:t.env&&t.env.Blob})}catch(l){throw Se.from(l,Se.ERR_BAD_REQUEST,t)}return w==="text"?(_=_.toString(T),(!T||T==="utf8")&&(_=z.stripBOM(_))):w==="stream"&&(_=Oo.default.Readable.from(_)),Na(i,n,{data:_,status:200,statusText:"OK",headers:new Vr,config:t})}if(p2.indexOf(fe)===-1)return n(new Se("Unsupported protocol "+fe,Se.ERR_BAD_REQUEST,t));let _e=Vr.from(t.headers).normalize();_e.set("User-Agent","axios/"+Ao,!1);let Te=t.onDownloadProgress,be=t.onUploadProgress,O=t.maxRate,E,f;if(z.isSpecCompliantForm(u)){let _=_e.getContentType(/boundary=([-_\w\d]{10,70})/i);u=a2(u,l=>{_e.set(l)},{tag:`axios-${Ao}-boundary`,boundary:_&&_[1]||void 0})}else if(z.isFormData(u)&&z.isFunction(u.getHeaders)){if(_e.set(u.getHeaders()),!_e.hasContentLength())try{let _=await g2.default.promisify(u.getLength).call(u);Number.isFinite(_)&&_>=0&&_e.setContentLength(_)}catch{}}else if(z.isBlob(u))u.size&&_e.setContentType(u.type||"application/octet-stream"),_e.setContentLength(u.size||0),u=Oo.default.Readable.from($p(u));else if(u&&!z.isStream(u)){if(!Buffer.isBuffer(u))if(z.isArrayBuffer(u))u=Buffer.from(new Uint8Array(u));else if(z.isString(u))u=Buffer.from(u,"utf-8");else return n(new Se("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Se.ERR_BAD_REQUEST,t));if(_e.setContentLength(u.length,!1),t.maxBodyLength>-1&&u.length>t.maxBodyLength)return n(new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,t))}let c=z.toFiniteNumber(_e.getContentLength());z.isArray(O)?(E=O[0],f=O[1]):E=f=O,u&&(be||E)&&(z.isStream(u)||(u=Oo.default.Readable.from(u,{objectMode:!1})),u=Oo.default.pipeline([u,new jm({length:c,maxRate:z.toFiniteNumber(E)})],z.noop),be&&u.on("progress",_=>{be(Object.assign(_,{upload:!0}))}));let p;if(t.auth){let _=t.auth.username||"",l=t.auth.password||"";p=_+":"+l}if(!p&&ee.username){let _=ee.username,l=ee.password;p=_+":"+l}p&&_e.delete("authorization");let v;try{v=To(ee.pathname+ee.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(_){let l=new Error(_.message);return l.config=t,l.url=t.url,l.exists=!0,n(l)}_e.set("Accept-Encoding","gzip, compress, deflate"+(l2?", br":""),!1);let g={path:v,method:I,headers:_e.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:p,protocol:fe,family:b,beforeRedirect:$k,beforeRedirects:{}};!z.isUndefined(h)&&(g.lookup=h),t.socketPath?g.socketPath=t.socketPath:(g.hostname=ee.hostname,g.port=ee.port,_2(g,t.proxy,fe+"//"+ee.hostname+(ee.port?":"+ee.port:"")+g.path));let x,S=Gk.test(g.protocol);if(g.agent=S?t.httpsAgent:t.httpAgent,t.transport?x=t.transport:t.maxRedirects===0?x=S?v2.default:m2.default:(t.maxRedirects&&(g.maxRedirects=t.maxRedirects),t.beforeRedirect&&(g.beforeRedirects.config=t.beforeRedirect),x=S?Wk:Kk),t.maxBodyLength>-1?g.maxBodyLength=t.maxBodyLength:g.maxBodyLength=1/0,t.insecureHTTPParser&&(g.insecureHTTPParser=t.insecureHTTPParser),P=x.request(g,function(l){if(P.destroyed)return;let m=[l],A=+l.headers["content-length"];if(Te){let ae=new jm({length:z.toFiniteNumber(A),maxRate:z.toFiniteNumber(f)});Te&&ae.on("progress",he=>{Te(Object.assign(he,{download:!0}))}),m.push(ae)}let U=l,j=l.req||P;if(t.decompress!==!1&&l.headers["content-encoding"])switch((I==="HEAD"||l.statusCode===204)&&delete l.headers["content-encoding"],(l.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":m.push($s.default.createUnzip(f2)),delete l.headers["content-encoding"];break;case"deflate":m.push(new c2),m.push($s.default.createUnzip(f2)),delete l.headers["content-encoding"];break;case"br":l2&&(m.push($s.default.createBrotliDecompress(Vk)),delete l.headers["content-encoding"])}U=m.length>1?Oo.default.pipeline(m,z.noop):m[0];let Z=Oo.default.finished(U,()=>{Z(),X()}),se={status:l.statusCode,statusText:l.statusMessage,headers:new Vr(l.headers),config:t,request:j};if(w==="stream")se.data=U,Na(i,n,se);else{let ae=[],he=0;U.on("data",function(me){ae.push(me),he+=me.length,t.maxContentLength>-1&&he>t.maxContentLength&&(M=!0,U.destroy(),n(new Se("maxContentLength size of "+t.maxContentLength+" exceeded",Se.ERR_BAD_RESPONSE,t,j)))}),U.on("aborted",function(){if(M)return;let me=new Se("maxContentLength size of "+t.maxContentLength+" exceeded",Se.ERR_BAD_RESPONSE,t,j);U.destroy(me),n(me)}),U.on("error",function(me){P.destroyed||n(Se.from(me,null,t,j))}),U.on("end",function(){try{let me=ae.length===1?ae[0]:Buffer.concat(ae);w!=="arraybuffer"&&(me=me.toString(T),(!T||T==="utf8")&&(me=z.stripBOM(me))),se.data=me}catch(me){return n(Se.from(me,null,t,se.request,se))}Na(i,n,se)})}L.once("abort",ae=>{U.destroyed||(U.emit("error",ae),U.destroy())})}),L.once("abort",_=>{n(_),P.destroy(_)}),P.on("error",function(l){n(Se.from(l,null,t,P))}),P.on("socket",function(l){l.setKeepAlive(!0,1e3*60)}),t.timeout){let _=parseInt(t.timeout,10);if(Number.isNaN(_)){n(new Se("error trying to parse `config.timeout` to int",Se.ERR_BAD_OPTION_VALUE,t,P));return}P.setTimeout(_,function(){if(B)return;let m=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",A=t.transitional||Lc;t.timeoutErrorMessage&&(m=t.timeoutErrorMessage),n(new Se(m,A.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,t,P)),V()})}if(z.isStream(u)){let _=!1,l=!1;u.on("end",()=>{_=!0}),u.once("error",m=>{l=!0,P.destroy(m)}),u.on("close",()=>{!_&&!l&&V(new Dn("Request stream has been aborted",t,P))}),u.pipe(P)}else P.end(u)})};var w2=jr.hasStandardBrowserEnv?{write(e,t,r,i,n,a){let u=[e+"="+encodeURIComponent(t)];z.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),z.isString(i)&&u.push("path="+i),z.isString(n)&&u.push("domain="+n),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var S2=jr.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),i;function n(a){let u=a;return t&&(r.setAttribute("href",u),u=r.href),r.setAttribute("href",u),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=n(window.location.href),function(u){let h=z.isString(u)?n(u):u;return h.protocol===i.protocol&&h.host===i.host}}():function(){return function(){return!0}}();function E2(e,t){let r=0,i=Wp(50,250);return n=>{let a=n.loaded,u=n.lengthComputable?n.total:void 0,h=a-r,b=i(h),w=a<=u;r=a;let T={loaded:a,total:u,progress:u?a/u:void 0,bytes:h,rate:b||void 0,estimated:b&&u&&w?(u-a)/b:void 0,event:n};T[t?"download":"upload"]=!0,e(T)}}var Jk=typeof XMLHttpRequest<"u",T2=Jk&&function(e){return new Promise(function(r,i){let n=e.data,a=Vr.from(e.headers).normalize(),{responseType:u,withXSRFToken:h}=e,b;function w(){e.cancelToken&&e.cancelToken.unsubscribe(b),e.signal&&e.signal.removeEventListener("abort",b)}let T;if(z.isFormData(n)){if(jr.hasStandardBrowserEnv||jr.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((T=a.getContentType())!==!1){let[L,...X]=T?T.split(";").map(V=>V.trim()).filter(Boolean):[];a.setContentType([L||"multipart/form-data",...X].join("; "))}}let I=new XMLHttpRequest;if(e.auth){let L=e.auth.username||"",X=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(L+":"+X))}let B=Io(e.baseURL,e.url);I.open(e.method.toUpperCase(),To(B,e.params,e.paramsSerializer),!0),I.timeout=e.timeout;function M(){if(!I)return;let L=Vr.from("getAllResponseHeaders"in I&&I.getAllResponseHeaders()),V={data:!u||u==="text"||u==="json"?I.responseText:I.response,status:I.status,statusText:I.statusText,headers:L,config:e,request:I};Na(function(ee){r(ee),w()},function(ee){i(ee),w()},V),I=null}if("onloadend"in I?I.onloadend=M:I.onreadystatechange=function(){!I||I.readyState!==4||I.status===0&&!(I.responseURL&&I.responseURL.indexOf("file:")===0)||setTimeout(M)},I.onabort=function(){I&&(i(new Se("Request aborted",Se.ECONNABORTED,e,I)),I=null)},I.onerror=function(){i(new Se("Network Error",Se.ERR_NETWORK,e,I)),I=null},I.ontimeout=function(){let X=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",V=e.transitional||Lc;e.timeoutErrorMessage&&(X=e.timeoutErrorMessage),i(new Se(X,V.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,I)),I=null},jr.hasStandardBrowserEnv&&(h&&z.isFunction(h)&&(h=h(e)),h||h!==!1&&S2(B))){let L=e.xsrfHeaderName&&e.xsrfCookieName&&w2.read(e.xsrfCookieName);L&&a.set(e.xsrfHeaderName,L)}n===void 0&&a.setContentType(null),"setRequestHeader"in I&&z.forEach(a.toJSON(),function(X,V){I.setRequestHeader(V,X)}),z.isUndefined(e.withCredentials)||(I.withCredentials=!!e.withCredentials),u&&u!=="json"&&(I.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&I.addEventListener("progress",E2(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&I.upload&&I.upload.addEventListener("progress",E2(e.onUploadProgress)),(e.cancelToken||e.signal)&&(b=L=>{I&&(i(!L||L.type?new Dn(null,e,I):L),I.abort(),I=null)},e.cancelToken&&e.cancelToken.subscribe(b),e.signal&&(e.signal.aborted?b():e.signal.addEventListener("abort",b)));let P=bf(B);if(P&&jr.protocols.indexOf(P)===-1){i(new Se("Unsupported protocol "+P+":",Se.ERR_BAD_REQUEST,e));return}I.send(n||null)})};var Wm={http:y2,xhr:T2};z.forEach(Wm,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var I2=e=>`- ${e}`,Qk=e=>z.isFunction(e)||e===null||e===!1,Xp={getAdapter:e=>{e=z.isArray(e)?e:[e];let{length:t}=e,r,i,n={};for(let a=0;a<t;a++){r=e[a];let u;if(i=r,!Qk(r)&&(i=Wm[(u=String(r)).toLowerCase()],i===void 0))throw new Se(`Unknown adapter '${u}'`);if(i)break;n[u||"#"+a]=i}if(!i){let a=Object.entries(n).map(([h,b])=>`adapter ${h} `+(b===!1?"is not supported by the environment":"is not available in the build")),u=t?a.length>1?`since :
34
- `+a.map(I2).join(`
35
- `):" "+I2(a[0]):"as no adapter specified";throw new Se("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i},adapters:Wm};function Gm(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Dn(null,e)}function Yp(e){return Gm(e),e.headers=Vr.from(e.headers),e.data=lf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Xp.getAdapter(e.adapter||Dc.adapter)(e).then(function(i){return Gm(e),i.data=lf.call(e,e.transformResponse,i),i.headers=Vr.from(i.headers),i},function(i){return pf(i)||(Gm(e),i&&i.response&&(i.response.data=lf.call(e,e.transformResponse,i.response),i.response.headers=Vr.from(i.response.headers))),Promise.reject(i)})}var R2=e=>e instanceof Vr?{...e}:e;function Xs(e,t){t=t||{};let r={};function i(w,T,I){return z.isPlainObject(w)&&z.isPlainObject(T)?z.merge.call({caseless:I},w,T):z.isPlainObject(T)?z.merge({},T):z.isArray(T)?T.slice():T}function n(w,T,I){if(z.isUndefined(T)){if(!z.isUndefined(w))return i(void 0,w,I)}else return i(w,T,I)}function a(w,T){if(!z.isUndefined(T))return i(void 0,T)}function u(w,T){if(z.isUndefined(T)){if(!z.isUndefined(w))return i(void 0,w)}else return i(void 0,T)}function h(w,T,I){if(I in t)return i(w,T);if(I in e)return i(void 0,w)}let b={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:h,headers:(w,T)=>n(R2(w),R2(T),!0)};return z.forEach(Object.keys(Object.assign({},e,t)),function(T){let I=b[T]||n,B=I(e[T],t[T],T);z.isUndefined(B)&&I!==h||(r[T]=B)}),r}var $m={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$m[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});var A2={};$m.transitional=function(t,r,i){function n(a,u){return"[Axios v"+Ao+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,h)=>{if(t===!1)throw new Se(n(u," has been removed"+(r?" in "+r:"")),Se.ERR_DEPRECATED);return r&&!A2[u]&&(A2[u]=!0,console.warn(n(u," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,u,h):!0}};function eN(e,t,r){if(typeof e!="object")throw new Se("options must be an object",Se.ERR_BAD_OPTION_VALUE);let i=Object.keys(e),n=i.length;for(;n-- >0;){let a=i[n],u=t[a];if(u){let h=e[a],b=h===void 0||u(h,a,e);if(b!==!0)throw new Se("option "+a+" must be "+b,Se.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Se("Unknown option "+a,Se.ERR_BAD_OPTION)}}var Zp={assertOptions:eN,validators:$m};var Ba=Zp.validators,Fc=class{constructor(t){this.defaults=t,this.interceptors={request:new wm,response:new wm}}async request(t,r){try{return await this._request(t,r)}catch(i){if(i instanceof Error){let n;Error.captureStackTrace?Error.captureStackTrace(n={}):n=new Error;let a=n.stack?n.stack.replace(/^.+\n/,""):"";i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=`
36
- `+a):i.stack=a}throw i}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Xs(this.defaults,r);let{transitional:i,paramsSerializer:n,headers:a}=r;i!==void 0&&Zp.assertOptions(i,{silentJSONParsing:Ba.transitional(Ba.boolean),forcedJSONParsing:Ba.transitional(Ba.boolean),clarifyTimeoutError:Ba.transitional(Ba.boolean)},!1),n!=null&&(z.isFunction(n)?r.paramsSerializer={serialize:n}:Zp.assertOptions(n,{encode:Ba.function,serialize:Ba.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u=a&&z.merge(a.common,a[r.method]);a&&z.forEach(["delete","get","head","post","put","patch","common"],P=>{delete a[P]}),r.headers=Vr.concat(u,a);let h=[],b=!0;this.interceptors.request.forEach(function(L){typeof L.runWhen=="function"&&L.runWhen(r)===!1||(b=b&&L.synchronous,h.unshift(L.fulfilled,L.rejected))});let w=[];this.interceptors.response.forEach(function(L){w.push(L.fulfilled,L.rejected)});let T,I=0,B;if(!b){let P=[Yp.bind(this),void 0];for(P.unshift.apply(P,h),P.push.apply(P,w),B=P.length,T=Promise.resolve(r);I<B;)T=T.then(P[I++],P[I++]);return T}B=h.length;let M=r;for(I=0;I<B;){let P=h[I++],L=h[I++];try{M=P(M)}catch(X){L.call(this,X);break}}try{T=Yp.call(this,M)}catch(P){return Promise.reject(P)}for(I=0,B=w.length;I<B;)T=T.then(w[I++],w[I++]);return T}getUri(t){t=Xs(this.defaults,t);let r=Io(t.baseURL,t.url);return To(r,t.params,t.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(t){Fc.prototype[t]=function(r,i){return this.request(Xs(i||{},{method:t,url:r,data:(i||{}).data}))}});z.forEach(["post","put","patch"],function(t){function r(i){return function(a,u,h){return this.request(Xs(h||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Fc.prototype[t]=r(),Fc.prototype[t+"Form"]=r(!0)});var _f=Fc;var Xm=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});let i=this;this.promise.then(n=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](n);i._listeners=null}),this.promise.then=n=>{let a,u=new Promise(h=>{i.subscribe(h),a=h}).then(n);return u.cancel=function(){i.unsubscribe(a)},u},t(function(a,u,h){i.reason||(i.reason=new Dn(a,u,h),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new e(function(n){t=n}),cancel:t}}},O2=Xm;function Ym(e){return function(r){return e.apply(null,r)}}function Zm(e){return z.isObject(e)&&e.isAxiosError===!0}var Jm={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(Jm).forEach(([e,t])=>{Jm[t]=e});var k2=Jm;function N2(e){let t=new _f(e),r=of(_f.prototype.request,t);return z.extend(r,_f.prototype,t,{allOwnKeys:!0}),z.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return N2(Xs(e,n))},r}var Cr=N2(Dc);Cr.Axios=_f;Cr.CanceledError=Dn;Cr.CancelToken=O2;Cr.isCancel=pf;Cr.VERSION=Ao;Cr.toFormData=ka;Cr.AxiosError=Se;Cr.Cancel=Cr.CanceledError;Cr.all=function(t){return Promise.all(t)};Cr.spread=Ym;Cr.isAxiosError=Zm;Cr.mergeConfig=Xs;Cr.AxiosHeaders=Vr;Cr.formToJSON=e=>Vp(z.isHTMLForm(e)?new FormData(e):e);Cr.getAdapter=Xp.getAdapter;Cr.HttpStatusCode=k2;Cr.default=Cr;var vn=Cr;var{Axios:OV,AxiosError:kV,CanceledError:NV,isCancel:PV,CancelToken:BV,VERSION:MV,all:CV,Cancel:LV,isAxiosError:DV,spread:UV,toFormData:qV,AxiosHeaders:FV,HttpStatusCode:HV,formToJSON:zV,getAdapter:jV,mergeConfig:VV}=vn;function Hc(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function tN(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}function rN(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Jp(e,...t){if(!rN(e))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function iN(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Hc(e.outputLen),Hc(e.blockLen)}function Qp(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Qm(e,t){Jp(e);let r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}var nN={number:Hc,bool:tN,bytes:Jp,hash:iN,exists:Qp,output:Qm},eh=nN;var th=BigInt(4294967295),P2=BigInt(32);function sN(e,t=!1){return t?{h:Number(e&th),l:Number(e>>P2&th)}:{h:Number(e>>P2&th)|0,l:Number(e&th)|0}}function B2(e,t=!1){let r=new Uint32Array(e.length),i=new Uint32Array(e.length);for(let n=0;n<e.length;n++){let{h:a,l:u}=sN(e[n],t);[r[n],i[n]]=[a,u]}return[r,i]}var M2=(e,t,r)=>e<<r|t>>>32-r,C2=(e,t,r)=>t<<r|e>>>32-r,L2=(e,t,r)=>t<<r-32|e>>>64-r,D2=(e,t,r)=>e<<r-32|t>>>64-r;var U2=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));function aN(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}var oN=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!oN)throw new Error("Non little-endian hardware is not supported");function zc(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function ih(e){if(typeof e=="string"&&(e=zc(e)),!aN(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}var rh=class{clone(){return this._cloneInto()}},$V={}.toString;function q2(e){let t=i=>e().update(ih(i)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function F2(e){let t=(i,n)=>e(n).update(ih(i)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=i=>e(i),t}var[j2,V2,K2]=[[],[],[]],cN=BigInt(0),yf=BigInt(1),uN=BigInt(2),fN=BigInt(7),lN=BigInt(256),pN=BigInt(113);for(let e=0,t=yf,r=1,i=0;e<24;e++){[r,i]=[i,(2*r+3*i)%5],j2.push(2*(5*i+r)),V2.push((e+1)*(e+2)/2%64);let n=cN;for(let a=0;a<7;a++)t=(t<<yf^(t>>fN)*pN)%lN,t&uN&&(n^=yf<<(yf<<BigInt(a))-yf);K2.push(n)}var[hN,dN]=B2(K2,!0),H2=(e,t,r)=>r>32?L2(e,t,r):M2(e,t,r),z2=(e,t,r)=>r>32?D2(e,t,r):C2(e,t,r);function mN(e,t=24){let r=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let u=0;u<10;u++)r[u]=e[u]^e[u+10]^e[u+20]^e[u+30]^e[u+40];for(let u=0;u<10;u+=2){let h=(u+8)%10,b=(u+2)%10,w=r[b],T=r[b+1],I=H2(w,T,1)^r[h],B=z2(w,T,1)^r[h+1];for(let M=0;M<50;M+=10)e[u+M]^=I,e[u+M+1]^=B}let n=e[2],a=e[3];for(let u=0;u<24;u++){let h=V2[u],b=H2(n,a,h),w=z2(n,a,h),T=j2[u];n=e[T],a=e[T+1],e[T]=b,e[T+1]=w}for(let u=0;u<50;u+=10){for(let h=0;h<10;h++)r[h]=e[u+h];for(let h=0;h<10;h++)e[u+h]^=~r[(h+2)%10]&r[(h+4)%10]}e[0]^=hN[i],e[1]^=dN[i]}r.fill(0)}var nh=class e extends rh{constructor(t,r,i,n=!1,a=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=i,this.enableXOF=n,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Hc(i),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=U2(this.state)}keccak(){mN(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){Qp(this);let{blockLen:r,state:i}=this;t=ih(t);let n=t.length;for(let a=0;a<n;){let u=Math.min(r-this.pos,n-a);for(let h=0;h<u;h++)i[this.pos++]^=t[a++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:r,pos:i,blockLen:n}=this;t[i]^=r,r&128&&i===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){Qp(this,!1),Jp(t),this.finish();let r=this.state,{blockLen:i}=this;for(let n=0,a=t.length;n<a;){this.posOut>=i&&this.keccak();let u=Math.min(i-this.posOut,a-n);t.set(r.subarray(this.posOut,this.posOut+u),n),this.posOut+=u,n+=u}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Hc(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Qm(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:i,outputLen:n,rounds:a,enableXOF:u}=this;return t||(t=new e(r,i,n,u,a)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=i,t.outputLen=n,t.enableXOF=u,t.destroyed=this.destroyed,t}},Ma=(e,t,r)=>q2(()=>new nh(t,e,r)),QV=Ma(6,144,224/8),eK=Ma(6,136,256/8),tK=Ma(6,104,384/8),rK=Ma(6,72,512/8),W2=Ma(1,144,224/8),ev=Ma(1,136,256/8),G2=Ma(1,104,384/8),$2=Ma(1,72,512/8),X2=(e,t,r)=>F2((i={})=>new nh(t,e,i.dkLen===void 0?r:i.dkLen,!0)),iK=X2(31,168,128/8),nK=X2(31,136,256/8);var uK=eh.bool,fK=eh.bytes;function wf(e){return t=>(eh.bytes(t),e(t))}var lK=(()=>{let e=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,t=typeof module<"u"&&typeof module.require=="function"&&module.require.bind(module);return{node:t&&!e?t("crypto"):void 0,web:e}})();var vK=wf(W2),Sf=(()=>{let e=wf(ev);return e.create=ev.create,e})(),gK=wf(G2),bK=wf($2);var Kr=class extends Error{constructor(t,r){super(t),this.innerError=r,this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(new.target.constructor):this.stack=new Error().stack}static convertToString(t,r=!1){if(t==null)return"undefined";let i=JSON.stringify(t,(n,a)=>typeof a=="bigint"?a.toString():a);return r&&["bigint","string"].includes(typeof t)?i.replace(/['\\"]+/g,""):i}toJSON(){return{name:this.name,code:this.code,message:this.message,innerError:this.innerError}}},Ys=class extends Kr{constructor(t,r){super(`Invalid value given "${Kr.convertToString(t,!0)}". Error: ${r}.`),this.name=this.constructor.name}};var Ca=class extends Ys{constructor(t){super(t,"can not parse as byte data"),this.code=1002}},Ef=class extends Ys{constructor(t){super(t,"can not parse as number data"),this.code=1003}};var sh=class extends Ys{constructor(t){super(t,"can not be converted to hex"),this.code=1006}};var Y2="An Rpc error has occured with a code of *code*",Yi={[-32700]:{message:"Parse error",description:"Invalid JSON"},[-32600]:{message:"Invalid request",description:"JSON is not a valid request object "},[-32601]:{message:"Method not found",description:"Method does not exist "},[-32602]:{message:"Invalid params",description:"Invalid method parameters"},[-32603]:{message:"Internal error",description:"Internal JSON-RPC error"},[-32e3]:{message:"Invalid input",description:"Missing or invalid parameters"},[-32001]:{message:"Resource not found",description:"Requested resource not found"},[-32002]:{message:"Resource unavailable",description:"Requested resource not available"},[-32003]:{message:"Transaction rejected",description:"Transaction creation failed"},[-32004]:{message:"Method not supported",description:"Method is not implemented"},[-32005]:{message:"Limit exceeded",description:"Request exceeds defined limit"},[-32006]:{message:"JSON-RPC version not supported",description:"Version of JSON-RPC protocol is not supported"},[4001]:{name:"User Rejected Request",message:"The user rejected the request."},[4100]:{name:"Unauthorized",message:"The requested method and/or account has not been authorized by the user."},[4200]:{name:"Unsupported Method",message:"The Provider does not support the requested method."},[4900]:{name:"Disconnected",message:"The Provider is disconnected from all chains."},[4901]:{name:"Chain Disconnected",message:"The Provider is not connected to the requested chain."},"0-999":{name:"",message:"Not used."},1e3:{name:"Normal Closure",message:"The connection successfully completed the purpose for which it was created."},1001:{name:"Going Away",message:"The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection."},1002:{name:"Protocol error",message:"The endpoint is terminating the connection due to a protocol error."},1003:{name:"Unsupported Data",message:"The connection is being terminated because the endpoint received data of a type it cannot accept. (For example, a text-only endpoint received binary data.)"},1004:{name:"Reserved",message:"Reserved. A meaning might be defined in the future."},1005:{name:"No Status Rcvd",message:"Reserved. Indicates that no status code was provided even though one was expected."},1006:{name:"Abnormal Closure",message:"Reserved. Indicates that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected."},1007:{name:"Invalid frame payload data",message:"The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message)."},1008:{name:"Policy Violation",message:"The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable."},1009:{name:"Message Too Big",message:"The endpoint is terminating the connection because a data frame was received that is too large."},1010:{name:"Mandatory Ext.",message:"The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't."},1011:{name:"Internal Error",message:"The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request."},1012:{name:"Service Restart",message:"The server is terminating the connection because it is restarting."},1013:{name:"Try Again Later",message:"The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients."},1014:{name:"Bad Gateway",message:"The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code."},1015:{name:"TLS handshake",message:"Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified)."},"1016-2999":{name:"",message:"For definition by future revisions of the WebSocket Protocol specification, and for definition by extension specifications."},"3000-3999":{name:"",message:"For use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol."},"4000-4999":{name:"",message:"For private use, and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol."}};var Ni=class extends Kr{constructor(t,r){super(r??Y2.replace("*code*",t.error.code.toString())),this.code=t.error.code,this.id=t.id,this.jsonrpc=t.jsonrpc,this.jsonRpcError=t.error}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{error:this.jsonRpcError,id:this.id,jsonRpc:this.jsonrpc})}};var tv=class extends Ni{constructor(t){super(t,Yi[-32700].message),this.code=-32700}},rv=class extends Ni{constructor(t){super(t,Yi[-32600].message),this.code=-32600}},iv=class extends Ni{constructor(t){super(t,Yi[-32601].message),this.code=-32601}},nv=class extends Ni{constructor(t){super(t,Yi[-32602].message),this.code=-32602}},sv=class extends Ni{constructor(t){super(t,Yi[-32603].message),this.code=-32603}},av=class extends Ni{constructor(t){super(t,Yi[-32e3].message),this.code=-32e3}},ov=class extends Ni{constructor(t){super(t,Yi[-32004].message),this.code=-32004}},cv=class extends Ni{constructor(t){super(t,Yi[-32002].message),this.code=-32002}},uv=class extends Ni{constructor(t){super(t,Yi[-32001].message),this.code=-32001}},fv=class extends Ni{constructor(t){super(t,Yi[-32006].message),this.code=-32006}},lv=class extends Ni{constructor(t){super(t,Yi[-32003].message),this.code=-32003}},pv=class extends Ni{constructor(t){super(t,Yi[-32005].message),this.code=-32005}},Zi=new Map;Zi.set(-32700,{error:tv});Zi.set(-32600,{error:rv});Zi.set(-32601,{error:iv});Zi.set(-32602,{error:nv});Zi.set(-32603,{error:sv});Zi.set(-32e3,{error:av});Zi.set(-32004,{error:ov});Zi.set(-32002,{error:cv});Zi.set(-32003,{error:lv});Zi.set(-32001,{error:uv});Zi.set(-32006,{error:fv});Zi.set(-32005,{error:pv});var ah=class extends Kr{constructor(t){super(`Format for the type ${t} is unsupported`),this.type=t,this.code=1200}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type})}};var Et;(function(e){e.assertEqual=n=>n;function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let a={};for(let u of n)a[u]=u;return a},e.getValidEnumValues=n=>{let a=e.objectKeys(n).filter(h=>typeof n[n[h]]!="number"),u={};for(let h of a)u[h]=n[h];return e.objectValues(u)},e.objectValues=n=>e.objectKeys(n).map(function(a){return n[a]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let u in n)Object.prototype.hasOwnProperty.call(n,u)&&a.push(u);return a},e.find=(n,a)=>{for(let u of n)if(a(u))return u},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function i(n,a=" | "){return n.map(u=>typeof u=="string"?`'${u}'`:u).join(a)}e.joinValues=i,e.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(Et||(Et={}));var dv;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(dv||(dv={}));var xe=Et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),La=e=>{switch(typeof e){case"undefined":return xe.undefined;case"string":return xe.string;case"number":return isNaN(e)?xe.nan:xe.number;case"boolean":return xe.boolean;case"function":return xe.function;case"bigint":return xe.bigint;case"symbol":return xe.symbol;case"object":return Array.isArray(e)?xe.array:e===null?xe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?xe.promise:typeof Map<"u"&&e instanceof Map?xe.map:typeof Set<"u"&&e instanceof Set?xe.set:typeof Date<"u"&&e instanceof Date?xe.date:xe.object;default:return xe.unknown}},le=Et.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),IN=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Ji=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let r=t||function(a){return a.message},i={_errors:[]},n=a=>{for(let u of a.issues)if(u.code==="invalid_union")u.unionErrors.map(n);else if(u.code==="invalid_return_type")n(u.returnTypeError);else if(u.code==="invalid_arguments")n(u.argumentsError);else if(u.path.length===0)i._errors.push(r(u));else{let h=i,b=0;for(;b<u.path.length;){let w=u.path[b];b===u.path.length-1?(h[w]=h[w]||{_errors:[]},h[w]._errors.push(r(u))):h[w]=h[w]||{_errors:[]},h=h[w],b++}}};return n(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,Et.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},i=[];for(let n of this.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};Ji.create=e=>new Ji(e);var Df=(e,t)=>{let r;switch(e.code){case le.invalid_type:e.received===xe.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case le.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Et.jsonStringifyReplacer)}`;break;case le.unrecognized_keys:r=`Unrecognized key(s) in object: ${Et.joinValues(e.keys,", ")}`;break;case le.invalid_union:r="Invalid input";break;case le.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Et.joinValues(e.options)}`;break;case le.invalid_enum_value:r=`Invalid enum value. Expected ${Et.joinValues(e.options)}, received '${e.received}'`;break;case le.invalid_arguments:r="Invalid function arguments";break;case le.invalid_return_type:r="Invalid function return type";break;case le.invalid_date:r="Invalid date";break;case le.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Et.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case le.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case le.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case le.custom:r="Invalid input";break;case le.invalid_intersection_types:r="Intersection results could not be merged";break;case le.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case le.not_finite:r="Number must be finite";break;default:r=t.defaultError,Et.assertNever(e)}return{message:r}},Q2=Df;function RN(e){Q2=e}function ch(){return Q2}var uh=e=>{let{data:t,path:r,errorMaps:i,issueData:n}=e,a=[...r,...n.path||[]],u={...n,path:a},h="",b=i.filter(w=>!!w).slice().reverse();for(let w of b)h=w(u,{data:t,defaultError:h}).message;return{...n,path:a,message:n.message||h}},AN=[];function we(e,t){let r=uh({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,ch(),Df].filter(i=>!!i)});e.common.issues.push(r)}var li=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let i=[];for(let n of r){if(n.status==="aborted")return je;n.status==="dirty"&&t.dirty(),i.push(n.value)}return{status:t.value,value:i}}static async mergeObjectAsync(t,r){let i=[];for(let n of r)i.push({key:await n.key,value:await n.value});return e.mergeObjectSync(t,i)}static mergeObjectSync(t,r){let i={};for(let n of r){let{key:a,value:u}=n;if(a.status==="aborted"||u.status==="aborted")return je;a.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof u.value<"u"||n.alwaysSet)&&(i[a.value]=u.value)}return{status:t.value,value:i}}},je=Object.freeze({status:"aborted"}),ew=e=>({status:"dirty",value:e}),_i=e=>({status:"valid",value:e}),mv=e=>e.status==="aborted",vv=e=>e.status==="dirty",Uf=e=>e.status==="valid",fh=e=>typeof Promise<"u"&&e instanceof Promise,ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ke||(ke={}));var gn=class{constructor(t,r,i,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=i,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Z2=(e,t)=>{if(Uf(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Ji(e.common.issues);return this._error=r,this._error}}};function it(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:i,description:n}=e;if(t&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(u,h)=>u.code!=="invalid_type"?{message:h.defaultError}:typeof h.data>"u"?{message:i??h.defaultError}:{message:r??h.defaultError},description:n}}var nt=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return La(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:La(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new li,ctx:{common:t.parent.common,data:t.data,parsedType:La(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(fh(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let i=this.safeParse(t,r);if(i.success)return i.data;throw i.error}safeParse(t,r){var i;let n={common:{issues:[],async:(i=r?.async)!==null&&i!==void 0?i:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:La(t)},a=this._parseSync({data:t,path:n.path,parent:n});return Z2(n,a)}async parseAsync(t,r){let i=await this.safeParseAsync(t,r);if(i.success)return i.data;throw i.error}async safeParseAsync(t,r){let i={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:La(t)},n=this._parse({data:t,path:i.path,parent:i}),a=await(fh(n)?n:Promise.resolve(n));return Z2(i,a)}refine(t,r){let i=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,a)=>{let u=t(n),h=()=>a.addIssue({code:le.custom,...i(n)});return typeof Promise<"u"&&u instanceof Promise?u.then(b=>b?!0:(h(),!1)):u?!0:(h(),!1)})}refinement(t,r){return this._refinement((i,n)=>t(i)?!0:(n.addIssue(typeof r=="function"?r(i,n):r),!1))}_refinement(t){return new Qi({schema:this,typeName:Ce.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Un.create(this,this._def)}nullable(){return Qs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Js.create(this,this._def)}promise(){return qa.create(this,this._def)}or(t){return Lo.create([this,t],this._def)}and(t){return Do.create(this,t,this._def)}transform(t){return new Qi({...it(this._def),schema:this,typeName:Ce.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new zo({...it(this._def),innerType:this,defaultValue:r,typeName:Ce.ZodDefault})}brand(){return new dh({typeName:Ce.ZodBranded,type:this,...it(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new $c({...it(this._def),innerType:this,catchValue:r,typeName:Ce.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return qf.create(this,t)}readonly(){return Yc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},ON=/^c[^\s-]{8,}$/i,kN=/^[a-z][a-z0-9]*$/,NN=/^[0-9A-HJKMNP-TV-Z]{26}$/,PN=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,BN=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,MN="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",hv,CN=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,LN=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,DN=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function UN(e,t){return!!((t==="v4"||!t)&&CN.test(e)||(t==="v6"||!t)&&LN.test(e))}var Da=class e extends nt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==xe.string){let a=this._getOrReturnCtx(t);return we(a,{code:le.invalid_type,expected:xe.string,received:a.parsedType}),je}let i=new li,n;for(let a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(n=this._getOrReturnCtx(t,n),we(n,{code:le.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="max")t.data.length>a.value&&(n=this._getOrReturnCtx(t,n),we(n,{code:le.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="length"){let u=t.data.length>a.value,h=t.data.length<a.value;(u||h)&&(n=this._getOrReturnCtx(t,n),u?we(n,{code:le.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):h&&we(n,{code:le.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),i.dirty())}else if(a.kind==="email")BN.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"email",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="emoji")hv||(hv=new RegExp(MN,"u")),hv.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"emoji",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="uuid")PN.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"uuid",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid")ON.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"cuid",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid2")kN.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"cuid2",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="ulid")NN.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"ulid",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),we(n,{validation:"url",code:le.invalid_string,message:a.message}),i.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"regex",code:le.invalid_string,message:a.message}),i.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(t,n),we(n,{code:le.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),i.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(n=this._getOrReturnCtx(t,n),we(n,{code:le.invalid_string,validation:{startsWith:a.value},message:a.message}),i.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(n=this._getOrReturnCtx(t,n),we(n,{code:le.invalid_string,validation:{endsWith:a.value},message:a.message}),i.dirty()):a.kind==="datetime"?DN(a).test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{code:le.invalid_string,validation:"datetime",message:a.message}),i.dirty()):a.kind==="ip"?UN(t.data,a.version)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"ip",code:le.invalid_string,message:a.message}),i.dirty()):Et.assertNever(a);return{status:i.value,value:t.data}}_regex(t,r,i){return this.refinement(n=>t.test(n),{validation:r,code:le.invalid_string,...ke.errToObj(i)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ke.errToObj(t)})}datetime(t){var r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(r=t?.offset)!==null&&r!==void 0?r:!1,...ke.errToObj(t?.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...ke.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...ke.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...ke.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...ke.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...ke.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...ke.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...ke.errToObj(r)})}nonempty(t){return this.min(1,ke.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Da.create=e=>{var t;return new Da({checks:[],typeName:Ce.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...it(e)})};function qN(e,t){let r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=r>i?r:i,a=parseInt(e.toFixed(n).replace(".","")),u=parseInt(t.toFixed(n).replace(".",""));return a%u/Math.pow(10,n)}var ko=class e extends nt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==xe.number){let a=this._getOrReturnCtx(t);return we(a,{code:le.invalid_type,expected:xe.number,received:a.parsedType}),je}let i,n=new li;for(let a of this._def.checks)a.kind==="int"?Et.isInteger(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{code:le.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?qN(t.data,a.value)!==0&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{code:le.not_finite,message:a.message}),n.dirty()):Et.assertNever(a);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ke.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ke.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ke.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ke.toString(r))}setLimit(t,r,i,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:ke.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Et.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(t===null||i.value<t)&&(t=i.value)}return Number.isFinite(r)&&Number.isFinite(t)}};ko.create=e=>new ko({checks:[],typeName:Ce.ZodNumber,coerce:e?.coerce||!1,...it(e)});var No=class e extends nt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==xe.bigint){let a=this._getOrReturnCtx(t);return we(a,{code:le.invalid_type,expected:xe.bigint,received:a.parsedType}),je}let i,n=new li;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):Et.assertNever(a);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ke.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ke.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ke.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ke.toString(r))}setLimit(t,r,i,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:ke.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};No.create=e=>{var t;return new No({checks:[],typeName:Ce.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...it(e)})};var Po=class extends nt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==xe.boolean){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.boolean,received:i.parsedType}),je}return _i(t.data)}};Po.create=e=>new Po({typeName:Ce.ZodBoolean,coerce:e?.coerce||!1,...it(e)});var Bo=class e extends nt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==xe.date){let a=this._getOrReturnCtx(t);return we(a,{code:le.invalid_type,expected:xe.date,received:a.parsedType}),je}if(isNaN(t.data.getTime())){let a=this._getOrReturnCtx(t);return we(a,{code:le.invalid_date}),je}let i=new li,n;for(let a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(n=this._getOrReturnCtx(t,n),we(n,{code:le.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),i.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(n=this._getOrReturnCtx(t,n),we(n,{code:le.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),i.dirty()):Et.assertNever(a);return{status:i.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:ke.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:ke.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Bo.create=e=>new Bo({checks:[],coerce:e?.coerce||!1,typeName:Ce.ZodDate,...it(e)});var Vc=class extends nt{_parse(t){if(this._getType(t)!==xe.symbol){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.symbol,received:i.parsedType}),je}return _i(t.data)}};Vc.create=e=>new Vc({typeName:Ce.ZodSymbol,...it(e)});var Mo=class extends nt{_parse(t){if(this._getType(t)!==xe.undefined){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.undefined,received:i.parsedType}),je}return _i(t.data)}};Mo.create=e=>new Mo({typeName:Ce.ZodUndefined,...it(e)});var Co=class extends nt{_parse(t){if(this._getType(t)!==xe.null){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.null,received:i.parsedType}),je}return _i(t.data)}};Co.create=e=>new Co({typeName:Ce.ZodNull,...it(e)});var Ua=class extends nt{constructor(){super(...arguments),this._any=!0}_parse(t){return _i(t.data)}};Ua.create=e=>new Ua({typeName:Ce.ZodAny,...it(e)});var Zs=class extends nt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return _i(t.data)}};Zs.create=e=>new Zs({typeName:Ce.ZodUnknown,...it(e)});var qn=class extends nt{_parse(t){let r=this._getOrReturnCtx(t);return we(r,{code:le.invalid_type,expected:xe.never,received:r.parsedType}),je}};qn.create=e=>new qn({typeName:Ce.ZodNever,...it(e)});var Kc=class extends nt{_parse(t){if(this._getType(t)!==xe.undefined){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.void,received:i.parsedType}),je}return _i(t.data)}};Kc.create=e=>new Kc({typeName:Ce.ZodVoid,...it(e)});var Js=class e extends nt{_parse(t){let{ctx:r,status:i}=this._processInputParams(t),n=this._def;if(r.parsedType!==xe.array)return we(r,{code:le.invalid_type,expected:xe.array,received:r.parsedType}),je;if(n.exactLength!==null){let u=r.data.length>n.exactLength.value,h=r.data.length<n.exactLength.value;(u||h)&&(we(r,{code:u?le.too_big:le.too_small,minimum:h?n.exactLength.value:void 0,maximum:u?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(we(r,{code:le.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(we(r,{code:le.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((u,h)=>n.type._parseAsync(new gn(r,u,r.path,h)))).then(u=>li.mergeArray(i,u));let a=[...r.data].map((u,h)=>n.type._parseSync(new gn(r,u,r.path,h)));return li.mergeArray(i,a)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:ke.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:ke.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:ke.toString(r)}})}nonempty(t){return this.min(1,t)}};Js.create=(e,t)=>new Js({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ce.ZodArray,...it(t)});function jc(e){if(e instanceof Pi){let t={};for(let r in e.shape){let i=e.shape[r];t[r]=Un.create(jc(i))}return new Pi({...e._def,shape:()=>t})}else return e instanceof Js?new Js({...e._def,type:jc(e.element)}):e instanceof Un?Un.create(jc(e.unwrap())):e instanceof Qs?Qs.create(jc(e.unwrap())):e instanceof us?us.create(e.items.map(t=>jc(t))):e}var Pi=class e extends nt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=Et.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==xe.object){let w=this._getOrReturnCtx(t);return we(w,{code:le.invalid_type,expected:xe.object,received:w.parsedType}),je}let{status:i,ctx:n}=this._processInputParams(t),{shape:a,keys:u}=this._getCached(),h=[];if(!(this._def.catchall instanceof qn&&this._def.unknownKeys==="strip"))for(let w in n.data)u.includes(w)||h.push(w);let b=[];for(let w of u){let T=a[w],I=n.data[w];b.push({key:{status:"valid",value:w},value:T._parse(new gn(n,I,n.path,w)),alwaysSet:w in n.data})}if(this._def.catchall instanceof qn){let w=this._def.unknownKeys;if(w==="passthrough")for(let T of h)b.push({key:{status:"valid",value:T},value:{status:"valid",value:n.data[T]}});else if(w==="strict")h.length>0&&(we(n,{code:le.unrecognized_keys,keys:h}),i.dirty());else if(w!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let w=this._def.catchall;for(let T of h){let I=n.data[T];b.push({key:{status:"valid",value:T},value:w._parse(new gn(n,I,n.path,T)),alwaysSet:T in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let w=[];for(let T of b){let I=await T.key;w.push({key:I,value:await T.value,alwaysSet:T.alwaysSet})}return w}).then(w=>li.mergeObjectSync(i,w)):li.mergeObjectSync(i,b)}get shape(){return this._def.shape()}strict(t){return ke.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,i)=>{var n,a,u,h;let b=(u=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,r,i).message)!==null&&u!==void 0?u:i.defaultError;return r.code==="unrecognized_keys"?{message:(h=ke.errToObj(t).message)!==null&&h!==void 0?h:b}:{message:b}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ce.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};return Et.objectKeys(t).forEach(i=>{t[i]&&this.shape[i]&&(r[i]=this.shape[i])}),new e({...this._def,shape:()=>r})}omit(t){let r={};return Et.objectKeys(this.shape).forEach(i=>{t[i]||(r[i]=this.shape[i])}),new e({...this._def,shape:()=>r})}deepPartial(){return jc(this)}partial(t){let r={};return Et.objectKeys(this.shape).forEach(i=>{let n=this.shape[i];t&&!t[i]?r[i]=n:r[i]=n.optional()}),new e({...this._def,shape:()=>r})}required(t){let r={};return Et.objectKeys(this.shape).forEach(i=>{if(t&&!t[i])r[i]=this.shape[i];else{let a=this.shape[i];for(;a instanceof Un;)a=a._def.innerType;r[i]=a}}),new e({...this._def,shape:()=>r})}keyof(){return tw(Et.objectKeys(this.shape))}};Pi.create=(e,t)=>new Pi({shape:()=>e,unknownKeys:"strip",catchall:qn.create(),typeName:Ce.ZodObject,...it(t)});Pi.strictCreate=(e,t)=>new Pi({shape:()=>e,unknownKeys:"strict",catchall:qn.create(),typeName:Ce.ZodObject,...it(t)});Pi.lazycreate=(e,t)=>new Pi({shape:e,unknownKeys:"strip",catchall:qn.create(),typeName:Ce.ZodObject,...it(t)});var Lo=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i=this._def.options;function n(a){for(let h of a)if(h.result.status==="valid")return h.result;for(let h of a)if(h.result.status==="dirty")return r.common.issues.push(...h.ctx.common.issues),h.result;let u=a.map(h=>new Ji(h.ctx.common.issues));return we(r,{code:le.invalid_union,unionErrors:u}),je}if(r.common.async)return Promise.all(i.map(async a=>{let u={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:u}),ctx:u}})).then(n);{let a,u=[];for(let b of i){let w={...r,common:{...r.common,issues:[]},parent:null},T=b._parseSync({data:r.data,path:r.path,parent:w});if(T.status==="valid")return T;T.status==="dirty"&&!a&&(a={result:T,ctx:w}),w.common.issues.length&&u.push(w.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let h=u.map(b=>new Ji(b));return we(r,{code:le.invalid_union,unionErrors:h}),je}}get options(){return this._def.options}};Lo.create=(e,t)=>new Lo({options:e,typeName:Ce.ZodUnion,...it(t)});var oh=e=>e instanceof Uo?oh(e.schema):e instanceof Qi?oh(e.innerType()):e instanceof qo?[e.value]:e instanceof Fo?e.options:e instanceof Ho?Object.keys(e.enum):e instanceof zo?oh(e._def.innerType):e instanceof Mo?[void 0]:e instanceof Co?[null]:null,lh=class e extends nt{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.object)return we(r,{code:le.invalid_type,expected:xe.object,received:r.parsedType}),je;let i=this.discriminator,n=r.data[i],a=this.optionsMap.get(n);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(we(r,{code:le.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),je)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,i){let n=new Map;for(let a of r){let u=oh(a.shape[t]);if(!u)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let h of u){if(n.has(h))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(h)}`);n.set(h,a)}}return new e({typeName:Ce.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...it(i)})}};function gv(e,t){let r=La(e),i=La(t);if(e===t)return{valid:!0,data:e};if(r===xe.object&&i===xe.object){let n=Et.objectKeys(t),a=Et.objectKeys(e).filter(h=>n.indexOf(h)!==-1),u={...e,...t};for(let h of a){let b=gv(e[h],t[h]);if(!b.valid)return{valid:!1};u[h]=b.data}return{valid:!0,data:u}}else if(r===xe.array&&i===xe.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let a=0;a<e.length;a++){let u=e[a],h=t[a],b=gv(u,h);if(!b.valid)return{valid:!1};n.push(b.data)}return{valid:!0,data:n}}else return r===xe.date&&i===xe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Do=class extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t),n=(a,u)=>{if(mv(a)||mv(u))return je;let h=gv(a.value,u.value);return h.valid?((vv(a)||vv(u))&&r.dirty(),{status:r.value,value:h.data}):(we(i,{code:le.invalid_intersection_types}),je)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([a,u])=>n(a,u)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};Do.create=(e,t,r)=>new Do({left:e,right:t,typeName:Ce.ZodIntersection,...it(r)});var us=class e extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==xe.array)return we(i,{code:le.invalid_type,expected:xe.array,received:i.parsedType}),je;if(i.data.length<this._def.items.length)return we(i,{code:le.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),je;!this._def.rest&&i.data.length>this._def.items.length&&(we(i,{code:le.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...i.data].map((u,h)=>{let b=this._def.items[h]||this._def.rest;return b?b._parse(new gn(i,u,i.path,h)):null}).filter(u=>!!u);return i.common.async?Promise.all(a).then(u=>li.mergeArray(r,u)):li.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};us.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new us({items:e,typeName:Ce.ZodTuple,rest:null,...it(t)})};var ph=class e extends nt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==xe.object)return we(i,{code:le.invalid_type,expected:xe.object,received:i.parsedType}),je;let n=[],a=this._def.keyType,u=this._def.valueType;for(let h in i.data)n.push({key:a._parse(new gn(i,h,i.path,h)),value:u._parse(new gn(i,i.data[h],i.path,h))});return i.common.async?li.mergeObjectAsync(r,n):li.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,i){return r instanceof nt?new e({keyType:t,valueType:r,typeName:Ce.ZodRecord,...it(i)}):new e({keyType:Da.create(),valueType:t,typeName:Ce.ZodRecord,...it(r)})}},Wc=class extends nt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==xe.map)return we(i,{code:le.invalid_type,expected:xe.map,received:i.parsedType}),je;let n=this._def.keyType,a=this._def.valueType,u=[...i.data.entries()].map(([h,b],w)=>({key:n._parse(new gn(i,h,i.path,[w,"key"])),value:a._parse(new gn(i,b,i.path,[w,"value"]))}));if(i.common.async){let h=new Map;return Promise.resolve().then(async()=>{for(let b of u){let w=await b.key,T=await b.value;if(w.status==="aborted"||T.status==="aborted")return je;(w.status==="dirty"||T.status==="dirty")&&r.dirty(),h.set(w.value,T.value)}return{status:r.value,value:h}})}else{let h=new Map;for(let b of u){let w=b.key,T=b.value;if(w.status==="aborted"||T.status==="aborted")return je;(w.status==="dirty"||T.status==="dirty")&&r.dirty(),h.set(w.value,T.value)}return{status:r.value,value:h}}}};Wc.create=(e,t,r)=>new Wc({valueType:t,keyType:e,typeName:Ce.ZodMap,...it(r)});var Gc=class e extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==xe.set)return we(i,{code:le.invalid_type,expected:xe.set,received:i.parsedType}),je;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&(we(i,{code:le.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&(we(i,{code:le.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let a=this._def.valueType;function u(b){let w=new Set;for(let T of b){if(T.status==="aborted")return je;T.status==="dirty"&&r.dirty(),w.add(T.value)}return{status:r.value,value:w}}let h=[...i.data.values()].map((b,w)=>a._parse(new gn(i,b,i.path,w)));return i.common.async?Promise.all(h).then(b=>u(b)):u(h)}min(t,r){return new e({...this._def,minSize:{value:t,message:ke.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:ke.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Gc.create=(e,t)=>new Gc({valueType:e,minSize:null,maxSize:null,typeName:Ce.ZodSet,...it(t)});var hh=class e extends nt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.function)return we(r,{code:le.invalid_type,expected:xe.function,received:r.parsedType}),je;function i(h,b){return uh({data:h,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ch(),Df].filter(w=>!!w),issueData:{code:le.invalid_arguments,argumentsError:b}})}function n(h,b){return uh({data:h,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ch(),Df].filter(w=>!!w),issueData:{code:le.invalid_return_type,returnTypeError:b}})}let a={errorMap:r.common.contextualErrorMap},u=r.data;if(this._def.returns instanceof qa){let h=this;return _i(async function(...b){let w=new Ji([]),T=await h._def.args.parseAsync(b,a).catch(M=>{throw w.addIssue(i(b,M)),w}),I=await Reflect.apply(u,this,T);return await h._def.returns._def.type.parseAsync(I,a).catch(M=>{throw w.addIssue(n(I,M)),w})})}else{let h=this;return _i(function(...b){let w=h._def.args.safeParse(b,a);if(!w.success)throw new Ji([i(b,w.error)]);let T=Reflect.apply(u,this,w.data),I=h._def.returns.safeParse(T,a);if(!I.success)throw new Ji([n(T,I.error)]);return I.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:us.create(t).rest(Zs.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,i){return new e({args:t||us.create([]).rest(Zs.create()),returns:r||Zs.create(),typeName:Ce.ZodFunction,...it(i)})}},Uo=class extends nt{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Uo.create=(e,t)=>new Uo({getter:e,typeName:Ce.ZodLazy,...it(t)});var qo=class extends nt{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return we(r,{received:r.data,code:le.invalid_literal,expected:this._def.value}),je}return{status:"valid",value:t.data}}get value(){return this._def.value}};qo.create=(e,t)=>new qo({value:e,typeName:Ce.ZodLiteral,...it(t)});function tw(e,t){return new Fo({values:e,typeName:Ce.ZodEnum,...it(t)})}var Fo=class e extends nt{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),i=this._def.values;return we(r,{expected:Et.joinValues(i),received:r.parsedType,code:le.invalid_type}),je}if(this._def.values.indexOf(t.data)===-1){let r=this._getOrReturnCtx(t),i=this._def.values;return we(r,{received:r.data,code:le.invalid_enum_value,options:i}),je}return _i(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t){return e.create(t)}exclude(t){return e.create(this.options.filter(r=>!t.includes(r)))}};Fo.create=tw;var Ho=class extends nt{_parse(t){let r=Et.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==xe.string&&i.parsedType!==xe.number){let n=Et.objectValues(r);return we(i,{expected:Et.joinValues(n),received:i.parsedType,code:le.invalid_type}),je}if(r.indexOf(t.data)===-1){let n=Et.objectValues(r);return we(i,{received:i.data,code:le.invalid_enum_value,options:n}),je}return _i(t.data)}get enum(){return this._def.values}};Ho.create=(e,t)=>new Ho({values:e,typeName:Ce.ZodNativeEnum,...it(t)});var qa=class extends nt{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.promise&&r.common.async===!1)return we(r,{code:le.invalid_type,expected:xe.promise,received:r.parsedType}),je;let i=r.parsedType===xe.promise?r.data:Promise.resolve(r.data);return _i(i.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};qa.create=(e,t)=>new qa({type:e,typeName:Ce.ZodPromise,...it(t)});var Qi=class extends nt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:i}=this._processInputParams(t),n=this._def.effect||null,a={addIssue:u=>{we(i,u),u.fatal?r.abort():r.dirty()},get path(){return i.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let u=n.transform(i.data,a);return i.common.issues.length?{status:"dirty",value:i.data}:i.common.async?Promise.resolve(u).then(h=>this._def.schema._parseAsync({data:h,path:i.path,parent:i})):this._def.schema._parseSync({data:u,path:i.path,parent:i})}if(n.type==="refinement"){let u=h=>{let b=n.refinement(h,a);if(i.common.async)return Promise.resolve(b);if(b instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h};if(i.common.async===!1){let h=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return h.status==="aborted"?je:(h.status==="dirty"&&r.dirty(),u(h.value),{status:r.value,value:h.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(h=>h.status==="aborted"?je:(h.status==="dirty"&&r.dirty(),u(h.value).then(()=>({status:r.value,value:h.value}))))}if(n.type==="transform")if(i.common.async===!1){let u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Uf(u))return u;let h=n.transform(u.value,a);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:h}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(u=>Uf(u)?Promise.resolve(n.transform(u.value,a)).then(h=>({status:r.value,value:h})):u);Et.assertNever(n)}};Qi.create=(e,t,r)=>new Qi({schema:e,typeName:Ce.ZodEffects,effect:t,...it(r)});Qi.createWithPreprocess=(e,t,r)=>new Qi({schema:t,effect:{type:"preprocess",transform:e},typeName:Ce.ZodEffects,...it(r)});var Un=class extends nt{_parse(t){return this._getType(t)===xe.undefined?_i(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Un.create=(e,t)=>new Un({innerType:e,typeName:Ce.ZodOptional,...it(t)});var Qs=class extends nt{_parse(t){return this._getType(t)===xe.null?_i(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Qs.create=(e,t)=>new Qs({innerType:e,typeName:Ce.ZodNullable,...it(t)});var zo=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i=r.data;return r.parsedType===xe.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};zo.create=(e,t)=>new zo({innerType:e,typeName:Ce.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...it(t)});var $c=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return fh(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ji(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Ji(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};$c.create=(e,t)=>new $c({innerType:e,typeName:Ce.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...it(t)});var Xc=class extends nt{_parse(t){if(this._getType(t)!==xe.nan){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.nan,received:i.parsedType}),je}return{status:"valid",value:t.data}}};Xc.create=e=>new Xc({typeName:Ce.ZodNaN,...it(e)});var FN=Symbol("zod_brand"),dh=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}},qf=class e extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?je:a.status==="dirty"?(r.dirty(),ew(a.value)):this._def.out._parseAsync({data:a.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?je:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(t,r){return new e({in:t,out:r,typeName:Ce.ZodPipeline})}},Yc=class extends nt{_parse(t){let r=this._def.innerType._parse(t);return Uf(r)&&(r.value=Object.freeze(r.value)),r}};Yc.create=(e,t)=>new Yc({innerType:e,typeName:Ce.ZodReadonly,...it(t)});var rw=(e,t={},r)=>e?Ua.create().superRefine((i,n)=>{var a,u;if(!e(i)){let h=typeof t=="function"?t(i):typeof t=="string"?{message:t}:t,b=(u=(a=h.fatal)!==null&&a!==void 0?a:r)!==null&&u!==void 0?u:!0,w=typeof h=="string"?{message:h}:h;n.addIssue({code:"custom",...w,fatal:b})}}):Ua.create(),HN={object:Pi.lazycreate},Ce;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ce||(Ce={}));var zN=(e,t={message:`Input not instance of ${e.name}`})=>rw(r=>r instanceof e,t),iw=Da.create,nw=ko.create,jN=Xc.create,VN=No.create,sw=Po.create,KN=Bo.create,WN=Vc.create,GN=Mo.create,$N=Co.create,XN=Ua.create,YN=Zs.create,ZN=qn.create,JN=Kc.create,QN=Js.create,eP=Pi.create,tP=Pi.strictCreate,rP=Lo.create,iP=lh.create,nP=Do.create,sP=us.create,aP=ph.create,oP=Wc.create,cP=Gc.create,uP=hh.create,fP=Uo.create,lP=qo.create,pP=Fo.create,hP=Ho.create,dP=qa.create,J2=Qi.create,mP=Un.create,vP=Qs.create,gP=Qi.createWithPreprocess,bP=qf.create,xP=()=>iw().optional(),_P=()=>nw().optional(),yP=()=>sw().optional(),wP={string:e=>Da.create({...e,coerce:!0}),number:e=>ko.create({...e,coerce:!0}),boolean:e=>Po.create({...e,coerce:!0}),bigint:e=>No.create({...e,coerce:!0}),date:e=>Bo.create({...e,coerce:!0})},SP=je,Fn=Object.freeze({__proto__:null,defaultErrorMap:Df,setErrorMap:RN,getErrorMap:ch,makeIssue:uh,EMPTY_PATH:AN,addIssueToContext:we,ParseStatus:li,INVALID:je,DIRTY:ew,OK:_i,isAborted:mv,isDirty:vv,isValid:Uf,isAsync:fh,get util(){return Et},get objectUtil(){return dv},ZodParsedType:xe,getParsedType:La,ZodType:nt,ZodString:Da,ZodNumber:ko,ZodBigInt:No,ZodBoolean:Po,ZodDate:Bo,ZodSymbol:Vc,ZodUndefined:Mo,ZodNull:Co,ZodAny:Ua,ZodUnknown:Zs,ZodNever:qn,ZodVoid:Kc,ZodArray:Js,ZodObject:Pi,ZodUnion:Lo,ZodDiscriminatedUnion:lh,ZodIntersection:Do,ZodTuple:us,ZodRecord:ph,ZodMap:Wc,ZodSet:Gc,ZodFunction:hh,ZodLazy:Uo,ZodLiteral:qo,ZodEnum:Fo,ZodNativeEnum:Ho,ZodPromise:qa,ZodEffects:Qi,ZodTransformer:Qi,ZodOptional:Un,ZodNullable:Qs,ZodDefault:zo,ZodCatch:$c,ZodNaN:Xc,BRAND:FN,ZodBranded:dh,ZodPipeline:qf,ZodReadonly:Yc,custom:rw,Schema:nt,ZodSchema:nt,late:HN,get ZodFirstPartyTypeKind(){return Ce},coerce:wP,any:XN,array:QN,bigint:VN,boolean:sw,date:KN,discriminatedUnion:iP,effect:J2,enum:pP,function:uP,instanceof:zN,intersection:nP,lazy:fP,literal:lP,map:oP,nan:jN,nativeEnum:hP,never:ZN,null:$N,nullable:vP,number:nw,object:eP,oboolean:yP,onumber:_P,optional:mP,ostring:xP,pipeline:bP,preprocess:gP,promise:dP,record:aP,set:cP,strictObject:tP,string:iw,symbol:WN,transformer:J2,tuple:sP,undefined:GN,union:rP,unknown:YN,void:JN,NEVER:SP,ZodIssueCode:le,quotelessJson:IN,ZodError:Ji});var TP=e=>e.message?e.message:"unspecified error",ea=class extends Kr{constructor(t){super(),this.code=1100,this.errors=t,super.message=`Web3 validator found ${t.length} error[s]:
20
+ }`;var ft=U_(function(){return Tt(N,Ie+"return "+oe).apply(e,C)});if(ft.source=oe,J0(ft))throw ft;return ft}function KO(s){return Rt(s).toLowerCase()}function WO(s){return Rt(s).toUpperCase()}function GO(s,o,d){if(s=Rt(s),s&&(d||o===e))return Gx(s);if(!s||!(o=Wi(o)))return s;var y=Bn(s),R=Bn(o),N=$x(y,R),C=Xx(y,R)+1;return Aa(y,N,C).join("")}function $O(s,o,d){if(s=Rt(s),s&&(d||o===e))return s.slice(0,Zx(s)+1);if(!s||!(o=Wi(o)))return s;var y=Bn(s),R=Xx(y,Bn(o))+1;return Aa(y,0,R).join("")}function XO(s,o,d){if(s=Rt(s),s&&(d||o===e))return s.replace(zt,"");if(!s||!(o=Wi(o)))return s;var y=Bn(s),R=$x(y,Bn(o));return Aa(y,R).join("")}function YO(s,o){var d=O,y=E;if(br(o)){var R="separator"in o?o.separator:R;d="length"in o?at(o.length):d,y="omission"in o?Wi(o.omission):y}s=Rt(s);var N=s.length;if(Ec(s)){var C=Bn(s);N=C.length}if(d>=N)return s;var D=d-Tc(y);if(D<1)return y;var H=C?Aa(C,0,D).join(""):s.slice(0,D);if(R===e)return H+y;if(C&&(D+=H.length-D),Q0(R)){if(s.slice(D).search(R)){var te,re=H;for(R.global||(R=m0(R.source,Rt(jt.exec(R))+"g")),R.lastIndex=0;te=R.exec(re);)var oe=te.index;H=H.slice(0,oe===e?D:oe)}}else if(s.indexOf(Wi(R),D)!=D){var de=H.lastIndexOf(R);de>-1&&(H=H.slice(0,de))}return H+y}function ZO(s){return s=Rt(s),s&&Ge.test(s)?s.replace(Gt,II):s}var JO=Nc(function(s,o,d){return s+(d?" ":"")+o.toUpperCase()}),rm=q1("toUpperCase");function D_(s,o,d){return s=Rt(s),o=d?e:o,o===e?yI(s)?OI(s):pI(s):s.match(o)||[]}var U_=lt(function(s,o){try{return Vi(s,e,o)}catch(d){return J0(d)?d:new ze(d)}}),QO=Vs(function(s,o){return cn(o,function(d){d=cs(d),zs(s,d,Y0(s[d],s))}),s});function e7(s){var o=s==null?0:s.length,d=Ne();return s=o?vr(s,function(y){if(typeof y[1]!="function")throw new un(n);return[d(y[0]),y[1]]}):[],lt(function(y){for(var R=-1;++R<o;){var N=s[R];if(Vi(N[0],this,y))return Vi(N[1],this,y)}})}function t7(s){return IR(ln(s,w))}function im(s){return function(){return s}}function r7(s,o){return s==null||s!==s?o:s}var i7=H1(),n7=H1(!0);function Ai(s){return s}function nm(s){return g1(typeof s=="function"?s:ln(s,w))}function s7(s){return x1(ln(s,w))}function a7(s,o){return _1(s,ln(o,w))}var o7=lt(function(s,o){return function(d){return ef(d,s,o)}}),c7=lt(function(s,o){return function(d){return ef(s,d,o)}});function sm(s,o,d){var y=Yr(o),R=gp(o,y);d==null&&!(br(o)&&(R.length||!y.length))&&(d=o,o=s,s=this,R=gp(o,Yr(o)));var N=!(br(d)&&"chain"in d)||!!d.chain,C=Ws(s);return cn(R,function(D){var H=o[D];s[D]=H,C&&(s.prototype[D]=function(){var te=this.__chain__;if(N||te){var re=s(this.__wrapped__),oe=re.__actions__=Ti(this.__actions__);return oe.push({func:H,args:arguments,thisArg:s}),re.__chain__=te,re}return H.apply(s,ya([this.value()],arguments))})}),s}function u7(){return Xr._===this&&(Xr._=CI),this}function am(){}function f7(s){return s=at(s),lt(function(o){return y1(o,s)})}var l7=D0(vr),p7=D0(zx),h7=D0(c0);function q_(s){return V0(s)?u0(cs(s)):jR(s)}function d7(s){return function(o){return s==null?e:wo(s,o)}}var m7=j1(),v7=j1(!0);function om(){return[]}function cm(){return!1}function g7(){return{}}function b7(){return""}function x7(){return!0}function _7(s,o){if(s=at(s),s<1||s>S)return[];var d=m,y=ui(s,m);o=Ne(o),s-=m;for(var R=p0(y,o);++d<s;)o(d);return R}function y7(s){return et(s)?vr(s,cs):Gi(s)?[s]:Ti(s_(Rt(s)))}function w7(s){var o=++BI;return Rt(s)+o}var S7=Sp(function(s,o){return s+o},0),E7=U0("ceil"),T7=Sp(function(s,o){return s/o},1),I7=U0("floor");function R7(s){return s&&s.length?vp(s,Ai,S0):e}function A7(s,o){return s&&s.length?vp(s,Ne(o,2),S0):e}function O7(s){return Kx(s,Ai)}function k7(s,o){return Kx(s,Ne(o,2))}function N7(s){return s&&s.length?vp(s,Ai,R0):e}function P7(s,o){return s&&s.length?vp(s,Ne(o,2),R0):e}var B7=Sp(function(s,o){return s*o},1),M7=U0("round"),C7=Sp(function(s,o){return s-o},0);function L7(s){return s&&s.length?l0(s,Ai):0}function D7(s,o){return s&&s.length?l0(s,Ne(o,2)):0}return k.after=s5,k.ary=v_,k.assign=W5,k.assignIn=k_,k.assignInWith=Lp,k.assignWith=G5,k.at=$5,k.before=g_,k.bind=Y0,k.bindAll=QO,k.bindKey=b_,k.castArray=g5,k.chain=h_,k.chunk=IA,k.compact=RA,k.concat=AA,k.cond=e7,k.conforms=t7,k.constant=im,k.countBy=L8,k.create=X5,k.curry=x_,k.curryRight=__,k.debounce=y_,k.defaults=Y5,k.defaultsDeep=Z5,k.defer=a5,k.delay=o5,k.difference=OA,k.differenceBy=kA,k.differenceWith=NA,k.drop=PA,k.dropRight=BA,k.dropRightWhile=MA,k.dropWhile=CA,k.fill=LA,k.filter=U8,k.flatMap=H8,k.flatMapDeep=z8,k.flatMapDepth=j8,k.flatten=u_,k.flattenDeep=DA,k.flattenDepth=UA,k.flip=c5,k.flow=i7,k.flowRight=n7,k.fromPairs=qA,k.functions=nO,k.functionsIn=sO,k.groupBy=V8,k.initial=HA,k.intersection=zA,k.intersectionBy=jA,k.intersectionWith=VA,k.invert=oO,k.invertBy=cO,k.invokeMap=W8,k.iteratee=nm,k.keyBy=G8,k.keys=Yr,k.keysIn=Ri,k.map=kp,k.mapKeys=fO,k.mapValues=lO,k.matches=s7,k.matchesProperty=a7,k.memoize=Pp,k.merge=pO,k.mergeWith=N_,k.method=o7,k.methodOf=c7,k.mixin=sm,k.negate=Bp,k.nthArg=f7,k.omit=hO,k.omitBy=dO,k.once=u5,k.orderBy=$8,k.over=l7,k.overArgs=f5,k.overEvery=p7,k.overSome=h7,k.partial=Z0,k.partialRight=w_,k.partition=X8,k.pick=mO,k.pickBy=P_,k.property=q_,k.propertyOf=d7,k.pull=$A,k.pullAll=l_,k.pullAllBy=XA,k.pullAllWith=YA,k.pullAt=ZA,k.range=m7,k.rangeRight=v7,k.rearg=l5,k.reject=J8,k.remove=JA,k.rest=p5,k.reverse=$0,k.sampleSize=e5,k.set=gO,k.setWith=bO,k.shuffle=t5,k.slice=QA,k.sortBy=n5,k.sortedUniq=a8,k.sortedUniqBy=o8,k.split=HO,k.spread=h5,k.tail=c8,k.take=u8,k.takeRight=f8,k.takeRightWhile=l8,k.takeWhile=p8,k.tap=R8,k.throttle=d5,k.thru=Op,k.toArray=R_,k.toPairs=B_,k.toPairsIn=M_,k.toPath=y7,k.toPlainObject=O_,k.transform=xO,k.unary=m5,k.union=h8,k.unionBy=d8,k.unionWith=m8,k.uniq=v8,k.uniqBy=g8,k.uniqWith=b8,k.unset=_O,k.unzip=X0,k.unzipWith=p_,k.update=yO,k.updateWith=wO,k.values=Mc,k.valuesIn=SO,k.without=x8,k.words=D_,k.wrap=v5,k.xor=_8,k.xorBy=y8,k.xorWith=w8,k.zip=S8,k.zipObject=E8,k.zipObjectDeep=T8,k.zipWith=I8,k.entries=B_,k.entriesIn=M_,k.extend=k_,k.extendWith=Lp,sm(k,k),k.add=S7,k.attempt=U_,k.camelCase=RO,k.capitalize=C_,k.ceil=E7,k.clamp=EO,k.clone=b5,k.cloneDeep=_5,k.cloneDeepWith=y5,k.cloneWith=x5,k.conformsTo=w5,k.deburr=L_,k.defaultTo=r7,k.divide=T7,k.endsWith=AO,k.eq=Cn,k.escape=OO,k.escapeRegExp=kO,k.every=D8,k.find=q8,k.findIndex=o_,k.findKey=J5,k.findLast=F8,k.findLastIndex=c_,k.findLastKey=Q5,k.floor=I7,k.forEach=d_,k.forEachRight=m_,k.forIn=eO,k.forInRight=tO,k.forOwn=rO,k.forOwnRight=iO,k.get=em,k.gt=S5,k.gte=E5,k.has=aO,k.hasIn=tm,k.head=f_,k.identity=Ai,k.includes=K8,k.indexOf=FA,k.inRange=TO,k.invoke=uO,k.isArguments=To,k.isArray=et,k.isArrayBuffer=T5,k.isArrayLike=Ii,k.isArrayLikeObject=Er,k.isBoolean=I5,k.isBuffer=Oa,k.isDate=R5,k.isElement=A5,k.isEmpty=O5,k.isEqual=k5,k.isEqualWith=N5,k.isError=J0,k.isFinite=P5,k.isFunction=Ws,k.isInteger=S_,k.isLength=Mp,k.isMap=E_,k.isMatch=B5,k.isMatchWith=M5,k.isNaN=C5,k.isNative=L5,k.isNil=U5,k.isNull=D5,k.isNumber=T_,k.isObject=br,k.isObjectLike=_r,k.isPlainObject=of,k.isRegExp=Q0,k.isSafeInteger=q5,k.isSet=I_,k.isString=Cp,k.isSymbol=Gi,k.isTypedArray=Bc,k.isUndefined=F5,k.isWeakMap=H5,k.isWeakSet=z5,k.join=KA,k.kebabCase=NO,k.last=hn,k.lastIndexOf=WA,k.lowerCase=PO,k.lowerFirst=BO,k.lt=j5,k.lte=V5,k.max=R7,k.maxBy=A7,k.mean=O7,k.meanBy=k7,k.min=N7,k.minBy=P7,k.stubArray=om,k.stubFalse=cm,k.stubObject=g7,k.stubString=b7,k.stubTrue=x7,k.multiply=B7,k.nth=GA,k.noConflict=u7,k.noop=am,k.now=Np,k.pad=MO,k.padEnd=CO,k.padStart=LO,k.parseInt=DO,k.random=IO,k.reduce=Y8,k.reduceRight=Z8,k.repeat=UO,k.replace=qO,k.result=vO,k.round=M7,k.runInContext=F,k.sample=Q8,k.size=r5,k.snakeCase=FO,k.some=i5,k.sortedIndex=e8,k.sortedIndexBy=t8,k.sortedIndexOf=r8,k.sortedLastIndex=i8,k.sortedLastIndexBy=n8,k.sortedLastIndexOf=s8,k.startCase=zO,k.startsWith=jO,k.subtract=C7,k.sum=L7,k.sumBy=D7,k.template=VO,k.times=_7,k.toFinite=Gs,k.toInteger=at,k.toLength=A_,k.toLower=KO,k.toNumber=dn,k.toSafeInteger=K5,k.toString=Rt,k.toUpper=WO,k.trim=GO,k.trimEnd=$O,k.trimStart=XO,k.truncate=YO,k.unescape=ZO,k.uniqueId=w7,k.upperCase=JO,k.upperFirst=rm,k.each=d_,k.eachRight=m_,k.first=f_,sm(k,function(){var s={};return as(k,function(o,d){kt.call(k.prototype,d)||(s[d]=o)}),s}(),{chain:!1}),k.VERSION=t,cn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){k[s].placeholder=k}),cn(["drop","take"],function(s,o){mt.prototype[s]=function(d){d=d===e?1:jr(at(d),0);var y=this.__filtered__&&!o?new mt(this):this.clone();return y.__filtered__?y.__takeCount__=ui(d,y.__takeCount__):y.__views__.push({size:ui(d,m),type:s+(y.__dir__<0?"Right":"")}),y},mt.prototype[s+"Right"]=function(d){return this.reverse()[s](d).reverse()}}),cn(["filter","map","takeWhile"],function(s,o){var d=o+1,y=d==p||d==g;mt.prototype[s]=function(R){var N=this.clone();return N.__iteratees__.push({iteratee:Ne(R,3),type:d}),N.__filtered__=N.__filtered__||y,N}}),cn(["head","last"],function(s,o){var d="take"+(o?"Right":"");mt.prototype[s]=function(){return this[d](1).value()[0]}}),cn(["initial","tail"],function(s,o){var d="drop"+(o?"":"Right");mt.prototype[s]=function(){return this.__filtered__?new mt(this):this[d](1)}}),mt.prototype.compact=function(){return this.filter(Ai)},mt.prototype.find=function(s){return this.filter(s).head()},mt.prototype.findLast=function(s){return this.reverse().find(s)},mt.prototype.invokeMap=lt(function(s,o){return typeof s=="function"?new mt(this):this.map(function(d){return ef(d,s,o)})}),mt.prototype.reject=function(s){return this.filter(Bp(Ne(s)))},mt.prototype.slice=function(s,o){s=at(s);var d=this;return d.__filtered__&&(s>0||o<0)?new mt(d):(s<0?d=d.takeRight(-s):s&&(d=d.drop(s)),o!==e&&(o=at(o),d=o<0?d.dropRight(-o):d.take(o-s)),d)},mt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},mt.prototype.toArray=function(){return this.take(m)},as(mt.prototype,function(s,o){var d=/^(?:filter|find|map|reject)|While$/.test(o),y=/^(?:head|last)$/.test(o),R=k[y?"take"+(o=="last"?"Right":""):o],N=y||/^find/.test(o);R&&(k.prototype[o]=function(){var C=this.__wrapped__,D=y?[1]:arguments,H=C instanceof mt,te=D[0],re=H||et(C),oe=function(ht){var xt=R.apply(k,ya([ht],D));return y&&de?xt[0]:xt};re&&d&&typeof te=="function"&&te.length!=1&&(H=re=!1);var de=this.__chain__,Ie=!!this.__actions__.length,Be=N&&!de,ft=H&&!Ie;if(!N&&re){C=ft?C:new mt(this);var Me=s.apply(C,D);return Me.__actions__.push({func:Op,args:[oe],thisArg:e}),new fn(Me,de)}return Be&&ft?s.apply(this,D):(Me=this.thru(oe),Be?y?Me.value()[0]:Me.value():Me)})}),cn(["pop","push","shift","sort","splice","unshift"],function(s){var o=tp[s],d=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",y=/^(?:pop|shift)$/.test(s);k.prototype[s]=function(){var R=arguments;if(y&&!this.__chain__){var N=this.value();return o.apply(et(N)?N:[],R)}return this[d](function(C){return o.apply(et(C)?C:[],R)})}}),as(mt.prototype,function(s,o){var d=k[o];if(d){var y=d.name+"";kt.call(Ac,y)||(Ac[y]=[]),Ac[y].push({name:o,func:d})}}),Ac[wp(e,L).name]=[{name:"wrapper",func:e}],mt.prototype.clone=ZI,mt.prototype.reverse=JI,mt.prototype.value=QI,k.prototype.at=A8,k.prototype.chain=O8,k.prototype.commit=k8,k.prototype.next=N8,k.prototype.plant=B8,k.prototype.reverse=M8,k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=C8,k.prototype.first=k.prototype.head,Gu&&(k.prototype[Gu]=P8),k},Sa=kI();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Xr._=Sa,define(function(){return Sa})):go?((go.exports=Sa)._=Sa,n0._=Sa):Xr._=Sa}).call(Cc)});var z_=W((cH,V7)=>{V7.exports={name:"bitcore-lib",version:"10.0.28",description:"A pure and powerful JavaScript Bitcoin library.",author:"BitPay <dev@bitpay.com>",main:"index.js",scripts:{test:"gulp test","test:ci":"npm run test",coverage:"gulp coverage",build:"gulp",pub:"npm run build && npm publish"},keywords:["bitcoin","transaction","address","p2p","ecies","cryptocurrency","blockchain","payment","bip21","bip32","bip37","bip69","bip70","multisig"],repository:{type:"git",url:"https://github.com/bitpay/bitcore/tree/master/packages/bitcore-lib"},browser:{request:"browser-request"},dependencies:{bech32:"=2.0.0","bip-schnorr":"=0.6.4","bn.js":"=4.11.8",bs58:"^4.0.1","buffer-compare":"=1.1.1",elliptic:"^6.5.3",inherits:"=2.0.1",lodash:"^4.17.20"},devDependencies:{"bitcore-build":"^10.0.21",brfs:"^2.0.1",chai:"^4.2.0",gulp:"^4.0.0",sinon:"^7.1.1"},license:"MIT",gitHead:"c47030e29c2ef353b41955d78fd0ca5c8422c590"}});var fm=W((j_,um)=>{(function(e,t){"use strict";function r(E,f){if(!E)throw new Error(f||"Assertion failed")}function i(E,f){E.super_=f;var c=function(){};c.prototype=f.prototype,E.prototype=new c,E.prototype.constructor=E}function n(E,f,c){if(n.isBN(E))return E;this.negative=0,this.words=null,this.length=0,this.red=null,E!==null&&((f==="le"||f==="be")&&(c=f,f=10),this._init(E||0,f||10,c||"be"))}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var a;try{a=require("buffer").Buffer}catch{}n.isBN=function(f){return f instanceof n?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===n.wordSize&&Array.isArray(f.words)},n.max=function(f,c){return f.cmp(c)>0?f:c},n.min=function(f,c){return f.cmp(c)<0?f:c},n.prototype._init=function(f,c,p){if(typeof f=="number")return this._initNumber(f,c,p);if(typeof f=="object")return this._initArray(f,c,p);c==="hex"&&(c=16),r(c===(c|0)&&c>=2&&c<=36),f=f.toString().replace(/\s+/g,"");var v=0;f[0]==="-"&&v++,c===16?this._parseHex(f,v):this._parseBase(f,c,v),f[0]==="-"&&(this.negative=1),this.strip(),p==="le"&&this._initArray(this.toArray(),c,p)},n.prototype._initNumber=function(f,c,p){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(r(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),p==="le"&&this._initArray(this.toArray(),c,p)},n.prototype._initArray=function(f,c,p){if(r(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var v=0;v<this.length;v++)this.words[v]=0;var g,x,S=0;if(p==="be")for(v=f.length-1,g=0;v>=0;v-=3)x=f[v]|f[v-1]<<8|f[v-2]<<16,this.words[g]|=x<<S&67108863,this.words[g+1]=x>>>26-S&67108863,S+=24,S>=26&&(S-=26,g++);else if(p==="le")for(v=0,g=0;v<f.length;v+=3)x=f[v]|f[v+1]<<8|f[v+2]<<16,this.words[g]|=x<<S&67108863,this.words[g+1]=x>>>26-S&67108863,S+=24,S>=26&&(S-=26,g++);return this.strip()};function u(E,f,c){for(var p=0,v=Math.min(E.length,c),g=f;g<v;g++){var x=E.charCodeAt(g)-48;p<<=4,x>=49&&x<=54?p|=x-49+10:x>=17&&x<=22?p|=x-17+10:p|=x&15}return p}n.prototype._parseHex=function(f,c){this.length=Math.ceil((f.length-c)/6),this.words=new Array(this.length);for(var p=0;p<this.length;p++)this.words[p]=0;var v,g,x=0;for(p=f.length-6,v=0;p>=c;p-=6)g=u(f,p,p+6),this.words[v]|=g<<x&67108863,this.words[v+1]|=g>>>26-x&4194303,x+=24,x>=26&&(x-=26,v++);p+6!==c&&(g=u(f,c,p+6),this.words[v]|=g<<x&67108863,this.words[v+1]|=g>>>26-x&4194303),this.strip()};function h(E,f,c,p){for(var v=0,g=Math.min(E.length,c),x=f;x<g;x++){var S=E.charCodeAt(x)-48;v*=p,S>=49?v+=S-49+10:S>=17?v+=S-17+10:v+=S}return v}n.prototype._parseBase=function(f,c,p){this.words=[0],this.length=1;for(var v=0,g=1;g<=67108863;g*=c)v++;v--,g=g/c|0;for(var x=f.length-p,S=x%v,_=Math.min(x,x-S)+p,l=0,m=p;m<_;m+=v)l=h(f,m,m+v,c),this.imuln(g),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(S!==0){var A=1;for(l=h(f,m,f.length,c),m=0;m<S;m++)A*=c;this.imuln(A),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},n.prototype.copy=function(f){f.words=new Array(this.length);for(var c=0;c<this.length;c++)f.words[c]=this.words[c];f.length=this.length,f.negative=this.negative,f.red=this.red},n.prototype.clone=function(){var f=new n(null);return this.copy(f),f},n.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(f,c){f=f||10,c=c|0||1;var p;if(f===16||f==="hex"){p="";for(var v=0,g=0,x=0;x<this.length;x++){var S=this.words[x],_=((S<<v|g)&16777215).toString(16);g=S>>>24-v&16777215,g!==0||x!==this.length-1?p=b[6-_.length]+_+p:p=_+p,v+=2,v>=26&&(v-=26,x--)}for(g!==0&&(p=g.toString(16)+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}if(f===(f|0)&&f>=2&&f<=36){var l=w[f],m=T[f];p="";var A=this.clone();for(A.negative=0;!A.isZero();){var U=A.modn(m).toString(f);A=A.idivn(m),A.isZero()?p=U+p:p=b[l-U.length]+U+p}for(this.isZero()&&(p="0"+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(f,c){return r(typeof a<"u"),this.toArrayLike(a,f,c)},n.prototype.toArray=function(f,c){return this.toArrayLike(Array,f,c)},n.prototype.toArrayLike=function(f,c,p){var v=this.byteLength(),g=p||Math.max(1,v);r(v<=g,"byte array longer than desired length"),r(g>0,"Requested array length <= 0"),this.strip();var x=c==="le",S=new f(g),_,l,m=this.clone();if(x){for(l=0;!m.isZero();l++)_=m.andln(255),m.iushrn(8),S[l]=_;for(;l<g;l++)S[l]=0}else{for(l=0;l<g-v;l++)S[l]=0;for(l=0;!m.isZero();l++)_=m.andln(255),m.iushrn(8),S[g-l-1]=_}return S},Math.clz32?n.prototype._countBits=function(f){return 32-Math.clz32(f)}:n.prototype._countBits=function(f){var c=f,p=0;return c>=4096&&(p+=13,c>>>=13),c>=64&&(p+=7,c>>>=7),c>=8&&(p+=4,c>>>=4),c>=2&&(p+=2,c>>>=2),p+c},n.prototype._zeroBits=function(f){if(f===0)return 26;var c=f,p=0;return c&8191||(p+=13,c>>>=13),c&127||(p+=7,c>>>=7),c&15||(p+=4,c>>>=4),c&3||(p+=2,c>>>=2),c&1||p++,p},n.prototype.bitLength=function(){var f=this.words[this.length-1],c=this._countBits(f);return(this.length-1)*26+c};function I(E){for(var f=new Array(E.bitLength()),c=0;c<f.length;c++){var p=c/26|0,v=c%26;f[c]=(E.words[p]&1<<v)>>>v}return f}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,c=0;c<this.length;c++){var p=this._zeroBits(this.words[c]);if(f+=p,p!==26)break}return f},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},n.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var c=0;c<f.length;c++)this.words[c]=this.words[c]|f.words[c];return this.strip()},n.prototype.ior=function(f){return r((this.negative|f.negative)===0),this.iuor(f)},n.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},n.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},n.prototype.iuand=function(f){var c;this.length>f.length?c=f:c=this;for(var p=0;p<c.length;p++)this.words[p]=this.words[p]&f.words[p];return this.length=c.length,this.strip()},n.prototype.iand=function(f){return r((this.negative|f.negative)===0),this.iuand(f)},n.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},n.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},n.prototype.iuxor=function(f){var c,p;this.length>f.length?(c=this,p=f):(c=f,p=this);for(var v=0;v<p.length;v++)this.words[v]=c.words[v]^p.words[v];if(this!==c)for(;v<c.length;v++)this.words[v]=c.words[v];return this.length=c.length,this.strip()},n.prototype.ixor=function(f){return r((this.negative|f.negative)===0),this.iuxor(f)},n.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},n.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},n.prototype.inotn=function(f){r(typeof f=="number"&&f>=0);var c=Math.ceil(f/26)|0,p=f%26;this._expand(c),p>0&&c--;for(var v=0;v<c;v++)this.words[v]=~this.words[v]&67108863;return p>0&&(this.words[v]=~this.words[v]&67108863>>26-p),this.strip()},n.prototype.notn=function(f){return this.clone().inotn(f)},n.prototype.setn=function(f,c){r(typeof f=="number"&&f>=0);var p=f/26|0,v=f%26;return this._expand(p+1),c?this.words[p]=this.words[p]|1<<v:this.words[p]=this.words[p]&~(1<<v),this.strip()},n.prototype.iadd=function(f){var c;if(this.negative!==0&&f.negative===0)return this.negative=0,c=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,c=this.isub(f),f.negative=1,c._normSign();var p,v;this.length>f.length?(p=this,v=f):(p=f,v=this);for(var g=0,x=0;x<v.length;x++)c=(p.words[x]|0)+(v.words[x]|0)+g,this.words[x]=c&67108863,g=c>>>26;for(;g!==0&&x<p.length;x++)c=(p.words[x]|0)+g,this.words[x]=c&67108863,g=c>>>26;if(this.length=p.length,g!==0)this.words[this.length]=g,this.length++;else if(p!==this)for(;x<p.length;x++)this.words[x]=p.words[x];return this},n.prototype.add=function(f){var c;return f.negative!==0&&this.negative===0?(f.negative=0,c=this.sub(f),f.negative^=1,c):f.negative===0&&this.negative!==0?(this.negative=0,c=f.sub(this),this.negative=1,c):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},n.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var c=this.iadd(f);return f.negative=1,c._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var p=this.cmp(f);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;var v,g;p>0?(v=this,g=f):(v=f,g=this);for(var x=0,S=0;S<g.length;S++)c=(v.words[S]|0)-(g.words[S]|0)+x,x=c>>26,this.words[S]=c&67108863;for(;x!==0&&S<v.length;S++)c=(v.words[S]|0)+x,x=c>>26,this.words[S]=c&67108863;if(x===0&&S<v.length&&v!==this)for(;S<v.length;S++)this.words[S]=v.words[S];return this.length=Math.max(this.length,S),v!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(f){return this.clone().isub(f)};function B(E,f,c){c.negative=f.negative^E.negative;var p=E.length+f.length|0;c.length=p,p=p-1|0;var v=E.words[0]|0,g=f.words[0]|0,x=v*g,S=x&67108863,_=x/67108864|0;c.words[0]=S;for(var l=1;l<p;l++){for(var m=_>>>26,A=_&67108863,U=Math.min(l,f.length-1),j=Math.max(0,l-E.length+1);j<=U;j++){var Z=l-j|0;v=E.words[Z]|0,g=f.words[j]|0,x=v*g+A,m+=x/67108864|0,A=x&67108863}c.words[l]=A|0,_=m|0}return _!==0?c.words[l]=_|0:c.length--,c.strip()}var M=function(f,c,p){var v=f.words,g=c.words,x=p.words,S=0,_,l,m,A=v[0]|0,U=A&8191,j=A>>>13,Z=v[1]|0,se=Z&8191,ae=Z>>>13,he=v[2]|0,Ee=he&8191,me=he>>>13,dt=v[3]|0,St=dt&8191,Oe=dt>>>13,st=v[4]|0,rt=st&8191,Re=st>>>13,Ae=v[5]|0,Wt=Ae&8191,Ke=Ae>>>13,At=v[6]|0,bt=At&8191,De=At>>>13,Pt=v[7]|0,Qt=Pt&8191,Ue=Pt>>>13,er=v[8]|0,Ot=er&8191,Le=er>>>13,Ct=v[9]|0,Lt=Ct&8191,qe=Ct>>>13,Dt=g[0]|0,Ut=Dt&8191,Fe=Dt>>>13,qt=g[1]|0,Ft=qt&8191,He=qt>>>13,tr=g[2]|0,rr=tr&8191,We=tr>>>13,Gt=g[3]|0,$t=Gt&8191,Ge=Gt>>>13,ir=g[4]|0,nr=ir&8191,$e=ir>>>13,Xt=g[5]|0,sr=Xt&8191,Xe=Xt>>>13,ar=g[6]|0,Ht=ar&8191,Ye=ar>>>13,zt=g[7]|0,or=zt&8191,Ze=zt>>>13,cr=g[8]|0,ur=cr&8191,Je=cr>>>13,fr=g[9]|0,lr=fr&8191,Qe=fr>>>13;p.negative=f.negative^c.negative,p.length=19,_=Math.imul(U,Ut),l=Math.imul(U,Fe),l=l+Math.imul(j,Ut)|0,m=Math.imul(j,Fe);var jt=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(jt>>>26)|0,jt&=67108863,_=Math.imul(se,Ut),l=Math.imul(se,Fe),l=l+Math.imul(ae,Ut)|0,m=Math.imul(ae,Fe),_=_+Math.imul(U,Ft)|0,l=l+Math.imul(U,He)|0,l=l+Math.imul(j,Ft)|0,m=m+Math.imul(j,He)|0;var Rs=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,_=Math.imul(Ee,Ut),l=Math.imul(Ee,Fe),l=l+Math.imul(me,Ut)|0,m=Math.imul(me,Fe),_=_+Math.imul(se,Ft)|0,l=l+Math.imul(se,He)|0,l=l+Math.imul(ae,Ft)|0,m=m+Math.imul(ae,He)|0,_=_+Math.imul(U,rr)|0,l=l+Math.imul(U,We)|0,l=l+Math.imul(j,rr)|0,m=m+Math.imul(j,We)|0;var As=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(As>>>26)|0,As&=67108863,_=Math.imul(St,Ut),l=Math.imul(St,Fe),l=l+Math.imul(Oe,Ut)|0,m=Math.imul(Oe,Fe),_=_+Math.imul(Ee,Ft)|0,l=l+Math.imul(Ee,He)|0,l=l+Math.imul(me,Ft)|0,m=m+Math.imul(me,He)|0,_=_+Math.imul(se,rr)|0,l=l+Math.imul(se,We)|0,l=l+Math.imul(ae,rr)|0,m=m+Math.imul(ae,We)|0,_=_+Math.imul(U,$t)|0,l=l+Math.imul(U,Ge)|0,l=l+Math.imul(j,$t)|0,m=m+Math.imul(j,Ge)|0;var Os=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Os>>>26)|0,Os&=67108863,_=Math.imul(rt,Ut),l=Math.imul(rt,Fe),l=l+Math.imul(Re,Ut)|0,m=Math.imul(Re,Fe),_=_+Math.imul(St,Ft)|0,l=l+Math.imul(St,He)|0,l=l+Math.imul(Oe,Ft)|0,m=m+Math.imul(Oe,He)|0,_=_+Math.imul(Ee,rr)|0,l=l+Math.imul(Ee,We)|0,l=l+Math.imul(me,rr)|0,m=m+Math.imul(me,We)|0,_=_+Math.imul(se,$t)|0,l=l+Math.imul(se,Ge)|0,l=l+Math.imul(ae,$t)|0,m=m+Math.imul(ae,Ge)|0,_=_+Math.imul(U,nr)|0,l=l+Math.imul(U,$e)|0,l=l+Math.imul(j,nr)|0,m=m+Math.imul(j,$e)|0;var ks=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(ks>>>26)|0,ks&=67108863,_=Math.imul(Wt,Ut),l=Math.imul(Wt,Fe),l=l+Math.imul(Ke,Ut)|0,m=Math.imul(Ke,Fe),_=_+Math.imul(rt,Ft)|0,l=l+Math.imul(rt,He)|0,l=l+Math.imul(Re,Ft)|0,m=m+Math.imul(Re,He)|0,_=_+Math.imul(St,rr)|0,l=l+Math.imul(St,We)|0,l=l+Math.imul(Oe,rr)|0,m=m+Math.imul(Oe,We)|0,_=_+Math.imul(Ee,$t)|0,l=l+Math.imul(Ee,Ge)|0,l=l+Math.imul(me,$t)|0,m=m+Math.imul(me,Ge)|0,_=_+Math.imul(se,nr)|0,l=l+Math.imul(se,$e)|0,l=l+Math.imul(ae,nr)|0,m=m+Math.imul(ae,$e)|0,_=_+Math.imul(U,sr)|0,l=l+Math.imul(U,Xe)|0,l=l+Math.imul(j,sr)|0,m=m+Math.imul(j,Xe)|0;var Ns=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Ns>>>26)|0,Ns&=67108863,_=Math.imul(bt,Ut),l=Math.imul(bt,Fe),l=l+Math.imul(De,Ut)|0,m=Math.imul(De,Fe),_=_+Math.imul(Wt,Ft)|0,l=l+Math.imul(Wt,He)|0,l=l+Math.imul(Ke,Ft)|0,m=m+Math.imul(Ke,He)|0,_=_+Math.imul(rt,rr)|0,l=l+Math.imul(rt,We)|0,l=l+Math.imul(Re,rr)|0,m=m+Math.imul(Re,We)|0,_=_+Math.imul(St,$t)|0,l=l+Math.imul(St,Ge)|0,l=l+Math.imul(Oe,$t)|0,m=m+Math.imul(Oe,Ge)|0,_=_+Math.imul(Ee,nr)|0,l=l+Math.imul(Ee,$e)|0,l=l+Math.imul(me,nr)|0,m=m+Math.imul(me,$e)|0,_=_+Math.imul(se,sr)|0,l=l+Math.imul(se,Xe)|0,l=l+Math.imul(ae,sr)|0,m=m+Math.imul(ae,Xe)|0,_=_+Math.imul(U,Ht)|0,l=l+Math.imul(U,Ye)|0,l=l+Math.imul(j,Ht)|0,m=m+Math.imul(j,Ye)|0;var Ps=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Ps>>>26)|0,Ps&=67108863,_=Math.imul(Qt,Ut),l=Math.imul(Qt,Fe),l=l+Math.imul(Ue,Ut)|0,m=Math.imul(Ue,Fe),_=_+Math.imul(bt,Ft)|0,l=l+Math.imul(bt,He)|0,l=l+Math.imul(De,Ft)|0,m=m+Math.imul(De,He)|0,_=_+Math.imul(Wt,rr)|0,l=l+Math.imul(Wt,We)|0,l=l+Math.imul(Ke,rr)|0,m=m+Math.imul(Ke,We)|0,_=_+Math.imul(rt,$t)|0,l=l+Math.imul(rt,Ge)|0,l=l+Math.imul(Re,$t)|0,m=m+Math.imul(Re,Ge)|0,_=_+Math.imul(St,nr)|0,l=l+Math.imul(St,$e)|0,l=l+Math.imul(Oe,nr)|0,m=m+Math.imul(Oe,$e)|0,_=_+Math.imul(Ee,sr)|0,l=l+Math.imul(Ee,Xe)|0,l=l+Math.imul(me,sr)|0,m=m+Math.imul(me,Xe)|0,_=_+Math.imul(se,Ht)|0,l=l+Math.imul(se,Ye)|0,l=l+Math.imul(ae,Ht)|0,m=m+Math.imul(ae,Ye)|0,_=_+Math.imul(U,or)|0,l=l+Math.imul(U,Ze)|0,l=l+Math.imul(j,or)|0,m=m+Math.imul(j,Ze)|0;var sn=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(sn>>>26)|0,sn&=67108863,_=Math.imul(Ot,Ut),l=Math.imul(Ot,Fe),l=l+Math.imul(Le,Ut)|0,m=Math.imul(Le,Fe),_=_+Math.imul(Qt,Ft)|0,l=l+Math.imul(Qt,He)|0,l=l+Math.imul(Ue,Ft)|0,m=m+Math.imul(Ue,He)|0,_=_+Math.imul(bt,rr)|0,l=l+Math.imul(bt,We)|0,l=l+Math.imul(De,rr)|0,m=m+Math.imul(De,We)|0,_=_+Math.imul(Wt,$t)|0,l=l+Math.imul(Wt,Ge)|0,l=l+Math.imul(Ke,$t)|0,m=m+Math.imul(Ke,Ge)|0,_=_+Math.imul(rt,nr)|0,l=l+Math.imul(rt,$e)|0,l=l+Math.imul(Re,nr)|0,m=m+Math.imul(Re,$e)|0,_=_+Math.imul(St,sr)|0,l=l+Math.imul(St,Xe)|0,l=l+Math.imul(Oe,sr)|0,m=m+Math.imul(Oe,Xe)|0,_=_+Math.imul(Ee,Ht)|0,l=l+Math.imul(Ee,Ye)|0,l=l+Math.imul(me,Ht)|0,m=m+Math.imul(me,Ye)|0,_=_+Math.imul(se,or)|0,l=l+Math.imul(se,Ze)|0,l=l+Math.imul(ae,or)|0,m=m+Math.imul(ae,Ze)|0,_=_+Math.imul(U,ur)|0,l=l+Math.imul(U,Je)|0,l=l+Math.imul(j,ur)|0,m=m+Math.imul(j,Je)|0;var Bs=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,_=Math.imul(Lt,Ut),l=Math.imul(Lt,Fe),l=l+Math.imul(qe,Ut)|0,m=Math.imul(qe,Fe),_=_+Math.imul(Ot,Ft)|0,l=l+Math.imul(Ot,He)|0,l=l+Math.imul(Le,Ft)|0,m=m+Math.imul(Le,He)|0,_=_+Math.imul(Qt,rr)|0,l=l+Math.imul(Qt,We)|0,l=l+Math.imul(Ue,rr)|0,m=m+Math.imul(Ue,We)|0,_=_+Math.imul(bt,$t)|0,l=l+Math.imul(bt,Ge)|0,l=l+Math.imul(De,$t)|0,m=m+Math.imul(De,Ge)|0,_=_+Math.imul(Wt,nr)|0,l=l+Math.imul(Wt,$e)|0,l=l+Math.imul(Ke,nr)|0,m=m+Math.imul(Ke,$e)|0,_=_+Math.imul(rt,sr)|0,l=l+Math.imul(rt,Xe)|0,l=l+Math.imul(Re,sr)|0,m=m+Math.imul(Re,Xe)|0,_=_+Math.imul(St,Ht)|0,l=l+Math.imul(St,Ye)|0,l=l+Math.imul(Oe,Ht)|0,m=m+Math.imul(Oe,Ye)|0,_=_+Math.imul(Ee,or)|0,l=l+Math.imul(Ee,Ze)|0,l=l+Math.imul(me,or)|0,m=m+Math.imul(me,Ze)|0,_=_+Math.imul(se,ur)|0,l=l+Math.imul(se,Je)|0,l=l+Math.imul(ae,ur)|0,m=m+Math.imul(ae,Je)|0,_=_+Math.imul(U,lr)|0,l=l+Math.imul(U,Qe)|0,l=l+Math.imul(j,lr)|0,m=m+Math.imul(j,Qe)|0;var an=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(an>>>26)|0,an&=67108863,_=Math.imul(Lt,Ft),l=Math.imul(Lt,He),l=l+Math.imul(qe,Ft)|0,m=Math.imul(qe,He),_=_+Math.imul(Ot,rr)|0,l=l+Math.imul(Ot,We)|0,l=l+Math.imul(Le,rr)|0,m=m+Math.imul(Le,We)|0,_=_+Math.imul(Qt,$t)|0,l=l+Math.imul(Qt,Ge)|0,l=l+Math.imul(Ue,$t)|0,m=m+Math.imul(Ue,Ge)|0,_=_+Math.imul(bt,nr)|0,l=l+Math.imul(bt,$e)|0,l=l+Math.imul(De,nr)|0,m=m+Math.imul(De,$e)|0,_=_+Math.imul(Wt,sr)|0,l=l+Math.imul(Wt,Xe)|0,l=l+Math.imul(Ke,sr)|0,m=m+Math.imul(Ke,Xe)|0,_=_+Math.imul(rt,Ht)|0,l=l+Math.imul(rt,Ye)|0,l=l+Math.imul(Re,Ht)|0,m=m+Math.imul(Re,Ye)|0,_=_+Math.imul(St,or)|0,l=l+Math.imul(St,Ze)|0,l=l+Math.imul(Oe,or)|0,m=m+Math.imul(Oe,Ze)|0,_=_+Math.imul(Ee,ur)|0,l=l+Math.imul(Ee,Je)|0,l=l+Math.imul(me,ur)|0,m=m+Math.imul(me,Je)|0,_=_+Math.imul(se,lr)|0,l=l+Math.imul(se,Qe)|0,l=l+Math.imul(ae,lr)|0,m=m+Math.imul(ae,Qe)|0;var Ms=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,_=Math.imul(Lt,rr),l=Math.imul(Lt,We),l=l+Math.imul(qe,rr)|0,m=Math.imul(qe,We),_=_+Math.imul(Ot,$t)|0,l=l+Math.imul(Ot,Ge)|0,l=l+Math.imul(Le,$t)|0,m=m+Math.imul(Le,Ge)|0,_=_+Math.imul(Qt,nr)|0,l=l+Math.imul(Qt,$e)|0,l=l+Math.imul(Ue,nr)|0,m=m+Math.imul(Ue,$e)|0,_=_+Math.imul(bt,sr)|0,l=l+Math.imul(bt,Xe)|0,l=l+Math.imul(De,sr)|0,m=m+Math.imul(De,Xe)|0,_=_+Math.imul(Wt,Ht)|0,l=l+Math.imul(Wt,Ye)|0,l=l+Math.imul(Ke,Ht)|0,m=m+Math.imul(Ke,Ye)|0,_=_+Math.imul(rt,or)|0,l=l+Math.imul(rt,Ze)|0,l=l+Math.imul(Re,or)|0,m=m+Math.imul(Re,Ze)|0,_=_+Math.imul(St,ur)|0,l=l+Math.imul(St,Je)|0,l=l+Math.imul(Oe,ur)|0,m=m+Math.imul(Oe,Je)|0,_=_+Math.imul(Ee,lr)|0,l=l+Math.imul(Ee,Qe)|0,l=l+Math.imul(me,lr)|0,m=m+Math.imul(me,Qe)|0;var Cs=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Cs>>>26)|0,Cs&=67108863,_=Math.imul(Lt,$t),l=Math.imul(Lt,Ge),l=l+Math.imul(qe,$t)|0,m=Math.imul(qe,Ge),_=_+Math.imul(Ot,nr)|0,l=l+Math.imul(Ot,$e)|0,l=l+Math.imul(Le,nr)|0,m=m+Math.imul(Le,$e)|0,_=_+Math.imul(Qt,sr)|0,l=l+Math.imul(Qt,Xe)|0,l=l+Math.imul(Ue,sr)|0,m=m+Math.imul(Ue,Xe)|0,_=_+Math.imul(bt,Ht)|0,l=l+Math.imul(bt,Ye)|0,l=l+Math.imul(De,Ht)|0,m=m+Math.imul(De,Ye)|0,_=_+Math.imul(Wt,or)|0,l=l+Math.imul(Wt,Ze)|0,l=l+Math.imul(Ke,or)|0,m=m+Math.imul(Ke,Ze)|0,_=_+Math.imul(rt,ur)|0,l=l+Math.imul(rt,Je)|0,l=l+Math.imul(Re,ur)|0,m=m+Math.imul(Re,Je)|0,_=_+Math.imul(St,lr)|0,l=l+Math.imul(St,Qe)|0,l=l+Math.imul(Oe,lr)|0,m=m+Math.imul(Oe,Qe)|0;var Ls=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Ls>>>26)|0,Ls&=67108863,_=Math.imul(Lt,nr),l=Math.imul(Lt,$e),l=l+Math.imul(qe,nr)|0,m=Math.imul(qe,$e),_=_+Math.imul(Ot,sr)|0,l=l+Math.imul(Ot,Xe)|0,l=l+Math.imul(Le,sr)|0,m=m+Math.imul(Le,Xe)|0,_=_+Math.imul(Qt,Ht)|0,l=l+Math.imul(Qt,Ye)|0,l=l+Math.imul(Ue,Ht)|0,m=m+Math.imul(Ue,Ye)|0,_=_+Math.imul(bt,or)|0,l=l+Math.imul(bt,Ze)|0,l=l+Math.imul(De,or)|0,m=m+Math.imul(De,Ze)|0,_=_+Math.imul(Wt,ur)|0,l=l+Math.imul(Wt,Je)|0,l=l+Math.imul(Ke,ur)|0,m=m+Math.imul(Ke,Je)|0,_=_+Math.imul(rt,lr)|0,l=l+Math.imul(rt,Qe)|0,l=l+Math.imul(Re,lr)|0,m=m+Math.imul(Re,Qe)|0;var is=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(is>>>26)|0,is&=67108863,_=Math.imul(Lt,sr),l=Math.imul(Lt,Xe),l=l+Math.imul(qe,sr)|0,m=Math.imul(qe,Xe),_=_+Math.imul(Ot,Ht)|0,l=l+Math.imul(Ot,Ye)|0,l=l+Math.imul(Le,Ht)|0,m=m+Math.imul(Le,Ye)|0,_=_+Math.imul(Qt,or)|0,l=l+Math.imul(Qt,Ze)|0,l=l+Math.imul(Ue,or)|0,m=m+Math.imul(Ue,Ze)|0,_=_+Math.imul(bt,ur)|0,l=l+Math.imul(bt,Je)|0,l=l+Math.imul(De,ur)|0,m=m+Math.imul(De,Je)|0,_=_+Math.imul(Wt,lr)|0,l=l+Math.imul(Wt,Qe)|0,l=l+Math.imul(Ke,lr)|0,m=m+Math.imul(Ke,Qe)|0;var ns=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(ns>>>26)|0,ns&=67108863,_=Math.imul(Lt,Ht),l=Math.imul(Lt,Ye),l=l+Math.imul(qe,Ht)|0,m=Math.imul(qe,Ye),_=_+Math.imul(Ot,or)|0,l=l+Math.imul(Ot,Ze)|0,l=l+Math.imul(Le,or)|0,m=m+Math.imul(Le,Ze)|0,_=_+Math.imul(Qt,ur)|0,l=l+Math.imul(Qt,Je)|0,l=l+Math.imul(Ue,ur)|0,m=m+Math.imul(Ue,Je)|0,_=_+Math.imul(bt,lr)|0,l=l+Math.imul(bt,Qe)|0,l=l+Math.imul(De,lr)|0,m=m+Math.imul(De,Qe)|0;var ss=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(ss>>>26)|0,ss&=67108863,_=Math.imul(Lt,or),l=Math.imul(Lt,Ze),l=l+Math.imul(qe,or)|0,m=Math.imul(qe,Ze),_=_+Math.imul(Ot,ur)|0,l=l+Math.imul(Ot,Je)|0,l=l+Math.imul(Le,ur)|0,m=m+Math.imul(Le,Je)|0,_=_+Math.imul(Qt,lr)|0,l=l+Math.imul(Qt,Qe)|0,l=l+Math.imul(Ue,lr)|0,m=m+Math.imul(Ue,Qe)|0;var Ds=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Ds>>>26)|0,Ds&=67108863,_=Math.imul(Lt,ur),l=Math.imul(Lt,Je),l=l+Math.imul(qe,ur)|0,m=Math.imul(qe,Je),_=_+Math.imul(Ot,lr)|0,l=l+Math.imul(Ot,Qe)|0,l=l+Math.imul(Le,lr)|0,m=m+Math.imul(Le,Qe)|0;var Us=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Us>>>26)|0,Us&=67108863,_=Math.imul(Lt,lr),l=Math.imul(Lt,Qe),l=l+Math.imul(qe,lr)|0,m=Math.imul(qe,Qe);var qs=(S+_|0)+((l&8191)<<13)|0;return S=(m+(l>>>13)|0)+(qs>>>26)|0,qs&=67108863,x[0]=jt,x[1]=Rs,x[2]=As,x[3]=Os,x[4]=ks,x[5]=Ns,x[6]=Ps,x[7]=sn,x[8]=Bs,x[9]=an,x[10]=Ms,x[11]=Cs,x[12]=Ls,x[13]=is,x[14]=ns,x[15]=ss,x[16]=Ds,x[17]=Us,x[18]=qs,S!==0&&(x[19]=S,p.length++),p};Math.imul||(M=B);function P(E,f,c){c.negative=f.negative^E.negative,c.length=E.length+f.length;for(var p=0,v=0,g=0;g<c.length-1;g++){var x=v;v=0;for(var S=p&67108863,_=Math.min(g,f.length-1),l=Math.max(0,g-E.length+1);l<=_;l++){var m=g-l,A=E.words[m]|0,U=f.words[l]|0,j=A*U,Z=j&67108863;x=x+(j/67108864|0)|0,Z=Z+S|0,S=Z&67108863,x=x+(Z>>>26)|0,v+=x>>>26,x&=67108863}c.words[g]=S,p=x,x=v}return p!==0?c.words[g]=p:c.length--,c.strip()}function L(E,f,c){var p=new X;return p.mulp(E,f,c)}n.prototype.mulTo=function(f,c){var p,v=this.length+f.length;return this.length===10&&f.length===10?p=M(this,f,c):v<63?p=B(this,f,c):v<1024?p=P(this,f,c):p=L(this,f,c),p};function X(E,f){this.x=E,this.y=f}X.prototype.makeRBT=function(f){for(var c=new Array(f),p=n.prototype._countBits(f)-1,v=0;v<f;v++)c[v]=this.revBin(v,p,f);return c},X.prototype.revBin=function(f,c,p){if(f===0||f===p-1)return f;for(var v=0,g=0;g<c;g++)v|=(f&1)<<c-g-1,f>>=1;return v},X.prototype.permute=function(f,c,p,v,g,x){for(var S=0;S<x;S++)v[S]=c[f[S]],g[S]=p[f[S]]},X.prototype.transform=function(f,c,p,v,g,x){this.permute(x,f,c,p,v,g);for(var S=1;S<g;S<<=1)for(var _=S<<1,l=Math.cos(2*Math.PI/_),m=Math.sin(2*Math.PI/_),A=0;A<g;A+=_)for(var U=l,j=m,Z=0;Z<S;Z++){var se=p[A+Z],ae=v[A+Z],he=p[A+Z+S],Ee=v[A+Z+S],me=U*he-j*Ee;Ee=U*Ee+j*he,he=me,p[A+Z]=se+he,v[A+Z]=ae+Ee,p[A+Z+S]=se-he,v[A+Z+S]=ae-Ee,Z!==_&&(me=l*U-m*j,j=l*j+m*U,U=me)}},X.prototype.guessLen13b=function(f,c){var p=Math.max(c,f)|1,v=p&1,g=0;for(p=p/2|0;p;p=p>>>1)g++;return 1<<g+1+v},X.prototype.conjugate=function(f,c,p){if(!(p<=1))for(var v=0;v<p/2;v++){var g=f[v];f[v]=f[p-v-1],f[p-v-1]=g,g=c[v],c[v]=-c[p-v-1],c[p-v-1]=-g}},X.prototype.normalize13b=function(f,c){for(var p=0,v=0;v<c/2;v++){var g=Math.round(f[2*v+1]/c)*8192+Math.round(f[2*v]/c)+p;f[v]=g&67108863,g<67108864?p=0:p=g/67108864|0}return f},X.prototype.convert13b=function(f,c,p,v){for(var g=0,x=0;x<c;x++)g=g+(f[x]|0),p[2*x]=g&8191,g=g>>>13,p[2*x+1]=g&8191,g=g>>>13;for(x=2*c;x<v;++x)p[x]=0;r(g===0),r((g&-8192)===0)},X.prototype.stub=function(f){for(var c=new Array(f),p=0;p<f;p++)c[p]=0;return c},X.prototype.mulp=function(f,c,p){var v=2*this.guessLen13b(f.length,c.length),g=this.makeRBT(v),x=this.stub(v),S=new Array(v),_=new Array(v),l=new Array(v),m=new Array(v),A=new Array(v),U=new Array(v),j=p.words;j.length=v,this.convert13b(f.words,f.length,S,v),this.convert13b(c.words,c.length,m,v),this.transform(S,x,_,l,v,g),this.transform(m,x,A,U,v,g);for(var Z=0;Z<v;Z++){var se=_[Z]*A[Z]-l[Z]*U[Z];l[Z]=_[Z]*U[Z]+l[Z]*A[Z],_[Z]=se}return this.conjugate(_,l,v),this.transform(_,l,j,x,v,g),this.conjugate(j,x,v),this.normalize13b(j,v),p.negative=f.negative^c.negative,p.length=f.length+c.length,p.strip()},n.prototype.mul=function(f){var c=new n(null);return c.words=new Array(this.length+f.length),this.mulTo(f,c)},n.prototype.mulf=function(f){var c=new n(null);return c.words=new Array(this.length+f.length),L(this,f,c)},n.prototype.imul=function(f){return this.clone().mulTo(f,this)},n.prototype.imuln=function(f){r(typeof f=="number"),r(f<67108864);for(var c=0,p=0;p<this.length;p++){var v=(this.words[p]|0)*f,g=(v&67108863)+(c&67108863);c>>=26,c+=v/67108864|0,c+=g>>>26,this.words[p]=g&67108863}return c!==0&&(this.words[p]=c,this.length++),this},n.prototype.muln=function(f){return this.clone().imuln(f)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(f){var c=I(f);if(c.length===0)return new n(1);for(var p=this,v=0;v<c.length&&c[v]===0;v++,p=p.sqr());if(++v<c.length)for(var g=p.sqr();v<c.length;v++,g=g.sqr())c[v]!==0&&(p=p.mul(g));return p},n.prototype.iushln=function(f){r(typeof f=="number"&&f>=0);var c=f%26,p=(f-c)/26,v=67108863>>>26-c<<26-c,g;if(c!==0){var x=0;for(g=0;g<this.length;g++){var S=this.words[g]&v,_=(this.words[g]|0)-S<<c;this.words[g]=_|x,x=S>>>26-c}x&&(this.words[g]=x,this.length++)}if(p!==0){for(g=this.length-1;g>=0;g--)this.words[g+p]=this.words[g];for(g=0;g<p;g++)this.words[g]=0;this.length+=p}return this.strip()},n.prototype.ishln=function(f){return r(this.negative===0),this.iushln(f)},n.prototype.iushrn=function(f,c,p){r(typeof f=="number"&&f>=0);var v;c?v=(c-c%26)/26:v=0;var g=f%26,x=Math.min((f-g)/26,this.length),S=67108863^67108863>>>g<<g,_=p;if(v-=x,v=Math.max(0,v),_){for(var l=0;l<x;l++)_.words[l]=this.words[l];_.length=x}if(x!==0)if(this.length>x)for(this.length-=x,l=0;l<this.length;l++)this.words[l]=this.words[l+x];else this.words[0]=0,this.length=1;var m=0;for(l=this.length-1;l>=0&&(m!==0||l>=v);l--){var A=this.words[l]|0;this.words[l]=m<<26-g|A>>>g,m=A&S}return _&&m!==0&&(_.words[_.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(f,c,p){return r(this.negative===0),this.iushrn(f,c,p)},n.prototype.shln=function(f){return this.clone().ishln(f)},n.prototype.ushln=function(f){return this.clone().iushln(f)},n.prototype.shrn=function(f){return this.clone().ishrn(f)},n.prototype.ushrn=function(f){return this.clone().iushrn(f)},n.prototype.testn=function(f){r(typeof f=="number"&&f>=0);var c=f%26,p=(f-c)/26,v=1<<c;if(this.length<=p)return!1;var g=this.words[p];return!!(g&v)},n.prototype.imaskn=function(f){r(typeof f=="number"&&f>=0);var c=f%26,p=(f-c)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=p)return this;if(c!==0&&p++,this.length=Math.min(p,this.length),c!==0){var v=67108863^67108863>>>c<<c;this.words[this.length-1]&=v}return this.strip()},n.prototype.maskn=function(f){return this.clone().imaskn(f)},n.prototype.iaddn=function(f){return r(typeof f=="number"),r(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},n.prototype._iaddn=function(f){this.words[0]+=f;for(var c=0;c<this.length&&this.words[c]>=67108864;c++)this.words[c]-=67108864,c===this.length-1?this.words[c+1]=1:this.words[c+1]++;return this.length=Math.max(this.length,c+1),this},n.prototype.isubn=function(f){if(r(typeof f=="number"),r(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var c=0;c<this.length&&this.words[c]<0;c++)this.words[c]+=67108864,this.words[c+1]-=1;return this.strip()},n.prototype.addn=function(f){return this.clone().iaddn(f)},n.prototype.subn=function(f){return this.clone().isubn(f)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(f,c,p){var v=f.length+p,g;this._expand(v);var x,S=0;for(g=0;g<f.length;g++){x=(this.words[g+p]|0)+S;var _=(f.words[g]|0)*c;x-=_&67108863,S=(x>>26)-(_/67108864|0),this.words[g+p]=x&67108863}for(;g<this.length-p;g++)x=(this.words[g+p]|0)+S,S=x>>26,this.words[g+p]=x&67108863;if(S===0)return this.strip();for(r(S===-1),S=0,g=0;g<this.length;g++)x=-(this.words[g]|0)+S,S=x>>26,this.words[g]=x&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(f,c){var p=this.length-f.length,v=this.clone(),g=f,x=g.words[g.length-1]|0,S=this._countBits(x);p=26-S,p!==0&&(g=g.ushln(p),v.iushln(p),x=g.words[g.length-1]|0);var _=v.length-g.length,l;if(c!=="mod"){l=new n(null),l.length=_+1,l.words=new Array(l.length);for(var m=0;m<l.length;m++)l.words[m]=0}var A=v.clone()._ishlnsubmul(g,1,_);A.negative===0&&(v=A,l&&(l.words[_]=1));for(var U=_-1;U>=0;U--){var j=(v.words[g.length+U]|0)*67108864+(v.words[g.length+U-1]|0);for(j=Math.min(j/x|0,67108863),v._ishlnsubmul(g,j,U);v.negative!==0;)j--,v.negative=0,v._ishlnsubmul(g,1,U),v.isZero()||(v.negative^=1);l&&(l.words[U]=j)}return l&&l.strip(),v.strip(),c!=="div"&&p!==0&&v.iushrn(p),{div:l||null,mod:v}},n.prototype.divmod=function(f,c,p){if(r(!f.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var v,g,x;return this.negative!==0&&f.negative===0?(x=this.neg().divmod(f,c),c!=="mod"&&(v=x.div.neg()),c!=="div"&&(g=x.mod.neg(),p&&g.negative!==0&&g.iadd(f)),{div:v,mod:g}):this.negative===0&&f.negative!==0?(x=this.divmod(f.neg(),c),c!=="mod"&&(v=x.div.neg()),{div:v,mod:x.mod}):this.negative&f.negative?(x=this.neg().divmod(f.neg(),c),c!=="div"&&(g=x.mod.neg(),p&&g.negative!==0&&g.isub(f)),{div:x.div,mod:g}):f.length>this.length||this.cmp(f)<0?{div:new n(0),mod:this}:f.length===1?c==="div"?{div:this.divn(f.words[0]),mod:null}:c==="mod"?{div:null,mod:new n(this.modn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new n(this.modn(f.words[0]))}:this._wordDiv(f,c)},n.prototype.div=function(f){return this.divmod(f,"div",!1).div},n.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},n.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},n.prototype.divRound=function(f){var c=this.divmod(f);if(c.mod.isZero())return c.div;var p=c.div.negative!==0?c.mod.isub(f):c.mod,v=f.ushrn(1),g=f.andln(1),x=p.cmp(v);return x<0||g===1&&x===0?c.div:c.div.negative!==0?c.div.isubn(1):c.div.iaddn(1)},n.prototype.modn=function(f){r(f<=67108863);for(var c=(1<<26)%f,p=0,v=this.length-1;v>=0;v--)p=(c*p+(this.words[v]|0))%f;return p},n.prototype.idivn=function(f){r(f<=67108863);for(var c=0,p=this.length-1;p>=0;p--){var v=(this.words[p]|0)+c*67108864;this.words[p]=v/f|0,c=v%f}return this.strip()},n.prototype.divn=function(f){return this.clone().idivn(f)},n.prototype.egcd=function(f){r(f.negative===0),r(!f.isZero());var c=this,p=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var v=new n(1),g=new n(0),x=new n(0),S=new n(1),_=0;c.isEven()&&p.isEven();)c.iushrn(1),p.iushrn(1),++_;for(var l=p.clone(),m=c.clone();!c.isZero();){for(var A=0,U=1;!(c.words[0]&U)&&A<26;++A,U<<=1);if(A>0)for(c.iushrn(A);A-- >0;)(v.isOdd()||g.isOdd())&&(v.iadd(l),g.isub(m)),v.iushrn(1),g.iushrn(1);for(var j=0,Z=1;!(p.words[0]&Z)&&j<26;++j,Z<<=1);if(j>0)for(p.iushrn(j);j-- >0;)(x.isOdd()||S.isOdd())&&(x.iadd(l),S.isub(m)),x.iushrn(1),S.iushrn(1);c.cmp(p)>=0?(c.isub(p),v.isub(x),g.isub(S)):(p.isub(c),x.isub(v),S.isub(g))}return{a:x,b:S,gcd:p.iushln(_)}},n.prototype._invmp=function(f){r(f.negative===0),r(!f.isZero());var c=this,p=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var v=new n(1),g=new n(0),x=p.clone();c.cmpn(1)>0&&p.cmpn(1)>0;){for(var S=0,_=1;!(c.words[0]&_)&&S<26;++S,_<<=1);if(S>0)for(c.iushrn(S);S-- >0;)v.isOdd()&&v.iadd(x),v.iushrn(1);for(var l=0,m=1;!(p.words[0]&m)&&l<26;++l,m<<=1);if(l>0)for(p.iushrn(l);l-- >0;)g.isOdd()&&g.iadd(x),g.iushrn(1);c.cmp(p)>=0?(c.isub(p),v.isub(g)):(p.isub(c),g.isub(v))}var A;return c.cmpn(1)===0?A=v:A=g,A.cmpn(0)<0&&A.iadd(f),A},n.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var c=this.clone(),p=f.clone();c.negative=0,p.negative=0;for(var v=0;c.isEven()&&p.isEven();v++)c.iushrn(1),p.iushrn(1);do{for(;c.isEven();)c.iushrn(1);for(;p.isEven();)p.iushrn(1);var g=c.cmp(p);if(g<0){var x=c;c=p,p=x}else if(g===0||p.cmpn(1)===0)break;c.isub(p)}while(!0);return p.iushln(v)},n.prototype.invm=function(f){return this.egcd(f).a.umod(f)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(f){return this.words[0]&f},n.prototype.bincn=function(f){r(typeof f=="number");var c=f%26,p=(f-c)/26,v=1<<c;if(this.length<=p)return this._expand(p+1),this.words[p]|=v,this;for(var g=v,x=p;g!==0&&x<this.length;x++){var S=this.words[x]|0;S+=g,g=S>>>26,S&=67108863,this.words[x]=S}return g!==0&&(this.words[x]=g,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(f){var c=f<0;if(this.negative!==0&&!c)return-1;if(this.negative===0&&c)return 1;this.strip();var p;if(this.length>1)p=1;else{c&&(f=-f),r(f<=67108863,"Number is too big");var v=this.words[0]|0;p=v===f?0:v<f?-1:1}return this.negative!==0?-p|0:p},n.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return-1;if(this.negative===0&&f.negative!==0)return 1;var c=this.ucmp(f);return this.negative!==0?-c|0:c},n.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return-1;for(var c=0,p=this.length-1;p>=0;p--){var v=this.words[p]|0,g=f.words[p]|0;if(v!==g){v<g?c=-1:v>g&&(c=1);break}}return c},n.prototype.gtn=function(f){return this.cmpn(f)===1},n.prototype.gt=function(f){return this.cmp(f)===1},n.prototype.gten=function(f){return this.cmpn(f)>=0},n.prototype.gte=function(f){return this.cmp(f)>=0},n.prototype.ltn=function(f){return this.cmpn(f)===-1},n.prototype.lt=function(f){return this.cmp(f)===-1},n.prototype.lten=function(f){return this.cmpn(f)<=0},n.prototype.lte=function(f){return this.cmp(f)<=0},n.prototype.eqn=function(f){return this.cmpn(f)===0},n.prototype.eq=function(f){return this.cmp(f)===0},n.red=function(f){return new be(f)},n.prototype.toRed=function(f){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(f){return this.red=f,this},n.prototype.forceRed=function(f){return r(!this.red,"Already a number in reduction context"),this._forceRed(f)},n.prototype.redAdd=function(f){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},n.prototype.redIAdd=function(f){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},n.prototype.redSub=function(f){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},n.prototype.redISub=function(f){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},n.prototype.redShl=function(f){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},n.prototype.redMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},n.prototype.redIMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(f){return r(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var V={k256:null,p224:null,p192:null,p25519:null};function q(E,f){this.name=E,this.p=new n(f,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}q.prototype._tmp=function(){var f=new n(null);return f.words=new Array(Math.ceil(this.n/13)),f},q.prototype.ireduce=function(f){var c=f,p;do this.split(c,this.tmp),c=this.imulK(c),c=c.iadd(this.tmp),p=c.bitLength();while(p>this.n);var v=p<this.n?-1:c.ucmp(this.p);return v===0?(c.words[0]=0,c.length=1):v>0?c.isub(this.p):c.strip(),c},q.prototype.split=function(f,c){f.iushrn(this.n,0,c)},q.prototype.imulK=function(f){return f.imul(this.k)};function ee(){q.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(ee,q),ee.prototype.split=function(f,c){for(var p=4194303,v=Math.min(f.length,9),g=0;g<v;g++)c.words[g]=f.words[g];if(c.length=v,f.length<=9){f.words[0]=0,f.length=1;return}var x=f.words[9];for(c.words[c.length++]=x&p,g=10;g<f.length;g++){var S=f.words[g]|0;f.words[g-10]=(S&p)<<4|x>>>22,x=S}x>>>=22,f.words[g-10]=x,x===0&&f.length>10?f.length-=10:f.length-=9},ee.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var c=0,p=0;p<f.length;p++){var v=f.words[p]|0;c+=v*977,f.words[p]=c&67108863,c=v*64+(c/67108864|0)}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function fe(){q.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(fe,q);function _e(){q.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(_e,q);function Te(){q.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(Te,q),Te.prototype.imulK=function(f){for(var c=0,p=0;p<f.length;p++){var v=(f.words[p]|0)*19+c,g=v&67108863;v>>>=26,f.words[p]=g,c=v}return c!==0&&(f.words[f.length++]=c),f},n._prime=function(f){if(V[f])return V[f];var c;if(f==="k256")c=new ee;else if(f==="p224")c=new fe;else if(f==="p192")c=new _e;else if(f==="p25519")c=new Te;else throw new Error("Unknown prime "+f);return V[f]=c,c};function be(E){if(typeof E=="string"){var f=n._prime(E);this.m=f.p,this.prime=f}else r(E.gtn(1),"modulus must be greater than 1"),this.m=E,this.prime=null}be.prototype._verify1=function(f){r(f.negative===0,"red works only with positives"),r(f.red,"red works only with red numbers")},be.prototype._verify2=function(f,c){r((f.negative|c.negative)===0,"red works only with positives"),r(f.red&&f.red===c.red,"red works only with red numbers")},be.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):f.umod(this.m)._forceRed(this)},be.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},be.prototype.add=function(f,c){this._verify2(f,c);var p=f.add(c);return p.cmp(this.m)>=0&&p.isub(this.m),p._forceRed(this)},be.prototype.iadd=function(f,c){this._verify2(f,c);var p=f.iadd(c);return p.cmp(this.m)>=0&&p.isub(this.m),p},be.prototype.sub=function(f,c){this._verify2(f,c);var p=f.sub(c);return p.cmpn(0)<0&&p.iadd(this.m),p._forceRed(this)},be.prototype.isub=function(f,c){this._verify2(f,c);var p=f.isub(c);return p.cmpn(0)<0&&p.iadd(this.m),p},be.prototype.shl=function(f,c){return this._verify1(f),this.imod(f.ushln(c))},be.prototype.imul=function(f,c){return this._verify2(f,c),this.imod(f.imul(c))},be.prototype.mul=function(f,c){return this._verify2(f,c),this.imod(f.mul(c))},be.prototype.isqr=function(f){return this.imul(f,f.clone())},be.prototype.sqr=function(f){return this.mul(f,f)},be.prototype.sqrt=function(f){if(f.isZero())return f.clone();var c=this.m.andln(3);if(r(c%2===1),c===3){var p=this.m.add(new n(1)).iushrn(2);return this.pow(f,p)}for(var v=this.m.subn(1),g=0;!v.isZero()&&v.andln(1)===0;)g++,v.iushrn(1);r(!v.isZero());var x=new n(1).toRed(this),S=x.redNeg(),_=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new n(2*l*l).toRed(this);this.pow(l,_).cmp(S)!==0;)l.redIAdd(S);for(var m=this.pow(l,v),A=this.pow(f,v.addn(1).iushrn(1)),U=this.pow(f,v),j=g;U.cmp(x)!==0;){for(var Z=U,se=0;Z.cmp(x)!==0;se++)Z=Z.redSqr();r(se<j);var ae=this.pow(m,new n(1).iushln(j-se-1));A=A.redMul(ae),m=ae.redSqr(),U=U.redMul(m),j=se}return A},be.prototype.invm=function(f){var c=f._invmp(this.m);return c.negative!==0?(c.negative=0,this.imod(c).redNeg()):this.imod(c)},be.prototype.pow=function(f,c){if(c.isZero())return new n(1).toRed(this);if(c.cmpn(1)===0)return f.clone();var p=4,v=new Array(1<<p);v[0]=new n(1).toRed(this),v[1]=f;for(var g=2;g<v.length;g++)v[g]=this.mul(v[g-1],f);var x=v[0],S=0,_=0,l=c.bitLength()%26;for(l===0&&(l=26),g=c.length-1;g>=0;g--){for(var m=c.words[g],A=l-1;A>=0;A--){var U=m>>A&1;if(x!==v[0]&&(x=this.sqr(x)),U===0&&S===0){_=0;continue}S<<=1,S|=U,_++,!(_!==p&&(g!==0||A!==0))&&(x=this.mul(x,v[S]),_=0,S=0)}l=26}return x},be.prototype.convertTo=function(f){var c=f.umod(this.m);return c===f?c.clone():c},be.prototype.convertFrom=function(f){var c=f.clone();return c.red=null,c},n.mont=function(f){return new O(f)};function O(E){be.call(this,E),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(O,be),O.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},O.prototype.convertFrom=function(f){var c=this.imod(f.mul(this.rinv));return c.red=null,c},O.prototype.imul=function(f,c){if(f.isZero()||c.isZero())return f.words[0]=0,f.length=1,f;var p=f.imul(c),v=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=p.isub(v).iushrn(this.shift),x=g;return g.cmp(this.m)>=0?x=g.isub(this.m):g.cmpn(0)<0&&(x=g.iadd(this.m)),x._forceRed(this)},O.prototype.mul=function(f,c){if(f.isZero()||c.isZero())return new n(0)._forceRed(this);var p=f.mul(c),v=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=p.isub(v).iushrn(this.shift),x=g;return g.cmp(this.m)>=0?x=g.isub(this.m):g.cmpn(0)<0&&(x=g.iadd(this.m)),x._forceRed(this)},O.prototype.invm=function(f){var c=this.imod(f._invmp(this.m).mul(this.r2));return c._forceRed(this)}})(typeof um>"u"||um,j_)});var K_=W((uH,V_)=>{"use strict";var K7="http://bitcore.io/";V_.exports=[{name:"InvalidB58Char",message:"Invalid Base58 character: {0} in {1}"},{name:"InvalidB58Checksum",message:"Invalid Base58 checksum for {0}"},{name:"InvalidNetwork",message:"Invalid version for network: got {0}"},{name:"InvalidState",message:"Invalid state: {0}"},{name:"NotImplemented",message:"Function {0} was not implemented yet"},{name:"InvalidNetworkArgument",message:'Invalid network: must be "livenet" or "testnet", got {0}'},{name:"InvalidArgument",message:function(){return"Invalid Argument"+(arguments[0]?": "+arguments[0]:"")+(arguments[1]?" Documentation: "+K7+arguments[1]:"")}},{name:"AbstractMethodInvoked",message:"Abstract Method Invocation: {0}"},{name:"InvalidArgumentType",message:function(){return"Invalid Argument for "+arguments[2]+", expected "+arguments[1]+" but got "+typeof arguments[0]}},{name:"Unit",message:"Internal Error on Unit {0}",errors:[{name:"UnknownCode",message:"Unrecognized unit code: {0}"},{name:"InvalidRate",message:"Invalid exchange rate: {0}"}]},{name:"MerkleBlock",message:"Internal Error on MerkleBlock {0}",errors:[{name:"InvalidMerkleTree",message:"This MerkleBlock contain an invalid Merkle Tree"}]},{name:"Transaction",message:"Internal Error on Transaction {0}",errors:[{name:"Input",message:"Internal Error on Input {0}",errors:[{name:"MissingScript",message:"Need a script to create an input"},{name:"UnsupportedScript",message:"Unsupported input script type: {0}"},{name:"MissingPreviousOutput",message:"No previous output information."},{name:"BlockHeightOutOfRange",message:"Block Height can only be between 0 and 65535"},{name:"LockTimeRange",message:"Seconds needs to be more that 0 and less that 33553920"}]},{name:"NeedMoreInfo",message:"{0}"},{name:"InvalidSorting",message:"The sorting function provided did not return the change output as one of the array elements"},{name:"InvalidOutputAmountSum",message:"{0}"},{name:"MissingSignatures",message:"Some inputs have not been fully signed"},{name:"InvalidIndex",message:"Invalid index: {0} is not between 0, {1}"},{name:"UnableToVerifySignature",message:"Unable to verify signature: {0}"},{name:"DustOutputs",message:"Dust amount detected in one output"},{name:"InvalidSatoshis",message:"Output satoshis are invalid"},{name:"FeeError",message:"Internal Error on Fee {0}",errors:[{name:"TooSmall",message:"Fee is too small: {0}"},{name:"TooLarge",message:"Fee is too large: {0}"},{name:"Different",message:"Unspent value is different from specified fee: {0}"}]},{name:"ChangeAddressMissing",message:"Change address is missing"},{name:"BlockHeightTooHigh",message:"Block Height can be at most 2^32 -1"},{name:"NLockTimeOutOfRange",message:"Block Height can only be between 0 and 499 999 999"},{name:"LockTimeTooEarly",message:"Lock Time can't be earlier than UNIX date 500 000 000"}]},{name:"Script",message:"Internal Error on Script {0}",errors:[{name:"UnrecognizedAddress",message:"Expected argument {0} to be an address"},{name:"CantDeriveAddress",message:"Can't derive address associated with script {0}, needs to be p2pkh in, p2pkh out, p2sh in, or p2sh out."},{name:"InvalidBuffer",message:"Invalid script buffer: can't parse valid script from given buffer {0}"}]},{name:"HDPrivateKey",message:"Internal Error on HDPrivateKey {0}",errors:[{name:"InvalidDerivationArgument",message:"Invalid derivation argument {0}, expected string, or number and boolean"},{name:"InvalidEntropyArgument",message:"Invalid entropy: must be an hexa string or binary buffer, got {0}",errors:[{name:"TooMuchEntropy",message:'Invalid entropy: more than 512 bits is non standard, got "{0}"'},{name:"NotEnoughEntropy",message:'Invalid entropy: at least 128 bits needed, got "{0}"'}]},{name:"InvalidLength",message:"Invalid length for xprivkey string in {0}"},{name:"InvalidPath",message:"Invalid derivation path: {0}"},{name:"UnrecognizedArgument",message:'Invalid argument: creating a HDPrivateKey requires a string, buffer, json or object, got "{0}"'}]},{name:"HDPublicKey",message:"Internal Error on HDPublicKey {0}",errors:[{name:"ArgumentIsPrivateExtended",message:"Argument is an extended private key: {0}"},{name:"InvalidDerivationArgument",message:"Invalid derivation argument: got {0}"},{name:"InvalidLength",message:'Invalid length for xpubkey: got "{0}"'},{name:"InvalidPath",message:'Invalid derivation path, it should look like: "m/1/100", got "{0}"'},{name:"InvalidIndexCantDeriveHardened",message:"Invalid argument: creating a hardened path requires an HDPrivateKey"},{name:"MustSupplyArgument",message:"Must supply an argument to create a HDPublicKey"},{name:"UnrecognizedArgument",message:"Invalid argument for creation, must be string, json, buffer, or object"}]}]});var Yi=W((fH,pm)=>{"use strict";var lm=vt();function W7(e,t){return e.replace("{0}",t[0]).replace("{1}",t[1]).replace("{2}",t[2])}var W_=function(e,t){var r=function(){if(lm.isString(t.message))this.message=W7(t.message,arguments);else if(lm.isFunction(t.message))this.message=t.message.apply(null,arguments);else throw new Error("Invalid error definition for "+t.name);this.stack=this.message+`
21
+ `+new Error().stack};return r.prototype=Object.create(e.prototype),r.prototype.name=e.prototype.name+t.name,e[t.name]=r,t.errors&&G_(r,t.errors),r},G_=function(e,t){lm.each(t,function(r){W_(e,r)})},G7=function(e,t){return G_(e,t),e},Lc={};Lc.Error=function(){this.message="Internal error",this.stack=this.message+`
22
+ `+new Error().stack};Lc.Error.prototype=Object.create(Error.prototype);Lc.Error.prototype.name="bitcore.Error";var $7=K_();G7(Lc.Error,$7);pm.exports=Lc.Error;pm.exports.extend=function(e){return W_(Lc.Error,e)}});var It=W((lH,$_)=>{"use strict";var uf=Yi(),X7=vt();$_.exports={checkState:function(e,t){if(!e)throw new uf.InvalidState(t)},checkArgument:function(e,t,r,i){if(!e)throw new uf.InvalidArgument(t,r,i)},checkArgumentType:function(e,t,r){if(r=r||"(unknown name)",X7.isString(t)){if(t==="Buffer"){var i=require("buffer");if(!i.Buffer.isBuffer(e))throw new uf.InvalidArgumentType(e,t,r)}else if(typeof e!==t)throw new uf.InvalidArgumentType(e,t,r)}else if(!(e instanceof t))throw new uf.InvalidArgumentType(e,t.name,r)}}});var Zr=W((pH,Y_)=>{"use strict";var Nt=fm(),hm=It(),X_=vt(),Up=function(e){for(var t=Buffer.alloc(e.length),r=0;r<e.length;r++)t[r]=e[e.length-1-r];return t};Nt.Zero=new Nt(0);Nt.One=new Nt(1);Nt.Minus1=new Nt(-1);Nt.fromNumber=function(e){return hm.checkArgument(X_.isNumber(e)),new Nt(e)};Nt.fromString=function(e,t){return hm.checkArgument(X_.isString(e)),new Nt(e,t)};Nt.fromBuffer=function(e,t){typeof t<"u"&&t.endian==="little"&&(e=Up(e));var r=e.toString("hex"),i=new Nt(r,16);return i};Nt.fromSM=function(e,t){var r;if(e.length===0)return Nt.fromBuffer(Buffer.from([0]));var i="big";return t&&(i=t.endian),i==="little"&&(e=Up(e)),e[0]&128?(e[0]=e[0]&127,r=Nt.fromBuffer(e),r.neg().copy(r)):r=Nt.fromBuffer(e),r};Nt.prototype.toNumber=function(){return parseInt(this.toString(10),10)};Nt.prototype.toBuffer=function(e){var t,r;if(e&&e.size){r=this.toString(16,2);var i=r.length/2;t=Buffer.from(r,"hex"),i===e.size?t=t:i>e.size?t=Nt.trim(t,i):i<e.size&&(t=Nt.pad(t,i,e.size))}else r=this.toString(16,2),t=Buffer.from(r,"hex");return typeof e<"u"&&e.endian==="little"&&(t=Up(t)),t};Nt.prototype.toSMBigEndian=function(){var e;return this.cmp(Nt.Zero)===-1?(e=this.neg().toBuffer(),e[0]&128?e=Buffer.concat([Buffer.from([128]),e]):e[0]=e[0]|128):(e=this.toBuffer(),e[0]&128&&(e=Buffer.concat([Buffer.from([0]),e]))),e.length===1&e[0]===0&&(e=Buffer.from([])),e};Nt.prototype.toSM=function(e){var t=e?e.endian:"big",r=this.toSMBigEndian();return t==="little"&&(r=Up(r)),r};Nt.fromScriptNumBuffer=function(e,t,r){var i=r||4;if(hm.checkArgument(e.length<=i,new Error("script number overflow")),t&&e.length>0&&!(e[e.length-1]&127)&&(e.length<=1||!(e[e.length-2]&128)))throw new Error("non-minimally encoded script number");return Nt.fromSM(e,{endian:"little"})};Nt.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})};Nt.trim=function(e,t){return e.slice(t-e.length,e.length)};Nt.pad=function(e,t,r){for(var i=Buffer.alloc(r),n=0;n<e.length;n++)i[i.length-1-n]=e[e.length-1-n];for(n=0;n<r-t;n++)i[n]=0;return i};Y_.exports=Nt});var Lr=W((hH,Q_)=>{"use strict";var J_=vt(),Z_=function(t){return J_.isString(t)?/^[0-9a-fA-F]+$/.test(t):!1};Q_.exports={isValidJSON:function(t){var r;if(!J_.isString(t))return!1;try{r=JSON.parse(t)}catch{return!1}return typeof r=="object"},isHexa:Z_,isHexaString:Z_,cloneArray:function(e){return[].concat(e)},defineImmutable:function(t,r){return Object.keys(r).forEach(function(i){Object.defineProperty(t,i,{configurable:!1,enumerable:!0,value:r[i]})}),t},isNaturalNumber:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}}});var hr=W((vH,ff)=>{"use strict";var ey=require("buffer"),dH=require("assert"),mH=Lr(),Na=It();function ty(e,t){if(e.length!==t.length)return!1;for(var r=e.length,i=0;i<r;i++)if(e[i]!==t[i])return!1;return!0}ff.exports={fill:function(t,r){Na.checkArgumentType(t,"Buffer","buffer"),Na.checkArgumentType(r,"number","value");for(var i=t.length,n=0;n<i;n++)t[n]=r;return t},copy:function(e){var t=Buffer.alloc(e.length);return e.copy(t),t},isBuffer:function(t){return ey.Buffer.isBuffer(t)||t instanceof Uint8Array},emptyBuffer:function(t){Na.checkArgumentType(t,"number","bytes");for(var r=Buffer.alloc(t),i=0;i<t;i++)r.write("\0",i);return r},concat:ey.Buffer.concat,equals:ty,equal:ty,integerAsSingleByteBuffer:function(t){return Na.checkArgumentType(t,"number","integer"),Buffer.from([t&255])},integerAsBuffer:function(t){Na.checkArgumentType(t,"number","integer");var r=[];return r.push(t>>24&255),r.push(t>>16&255),r.push(t>>8&255),r.push(t&255),Buffer.from(r)},integerFromBuffer:function(t){return Na.checkArgumentType(t,"Buffer","buffer"),t[0]<<24|t[1]<<16|t[2]<<8|t[3]},integerFromSingleByteBuffer:function(t){return Na.checkArgumentType(t,"Buffer","buffer"),t[0]},bufferToHex:function(t){return Na.checkArgumentType(t,"Buffer","buffer"),t.toString("hex")},reverse:function(t){return Buffer.from(t).reverse()}};ff.exports.NULL_HASH=ff.exports.fill(Buffer.alloc(32),0);ff.exports.EMPTY_BUFFER=Buffer.alloc(0)});var ry=W((gH,Y7)=>{Y7.exports={name:"elliptic",version:"6.5.5",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}});var us=W((iy,dm)=>{(function(e,t){"use strict";function r(f,c){if(!f)throw new Error(c||"Assertion failed")}function i(f,c){f.super_=c;var p=function(){};p.prototype=c.prototype,f.prototype=new p,f.prototype.constructor=f}function n(f,c,p){if(n.isBN(f))return f;this.negative=0,this.words=null,this.length=0,this.red=null,f!==null&&((c==="le"||c==="be")&&(p=c,c=10),this._init(f||0,c||10,p||"be"))}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=require("buffer").Buffer}catch{}n.isBN=function(c){return c instanceof n?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===n.wordSize&&Array.isArray(c.words)},n.max=function(c,p){return c.cmp(p)>0?c:p},n.min=function(c,p){return c.cmp(p)<0?c:p},n.prototype._init=function(c,p,v){if(typeof c=="number")return this._initNumber(c,p,v);if(typeof c=="object")return this._initArray(c,p,v);p==="hex"&&(p=16),r(p===(p|0)&&p>=2&&p<=36),c=c.toString().replace(/\s+/g,"");var g=0;c[0]==="-"&&(g++,this.negative=1),g<c.length&&(p===16?this._parseHex(c,g,v):(this._parseBase(c,p,g),v==="le"&&this._initArray(this.toArray(),p,v)))},n.prototype._initNumber=function(c,p,v){c<0&&(this.negative=1,c=-c),c<67108864?(this.words=[c&67108863],this.length=1):c<4503599627370496?(this.words=[c&67108863,c/67108864&67108863],this.length=2):(r(c<9007199254740992),this.words=[c&67108863,c/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),p,v)},n.prototype._initArray=function(c,p,v){if(r(typeof c.length=="number"),c.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(c.length/3),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var x,S,_=0;if(v==="be")for(g=c.length-1,x=0;g>=0;g-=3)S=c[g]|c[g-1]<<8|c[g-2]<<16,this.words[x]|=S<<_&67108863,this.words[x+1]=S>>>26-_&67108863,_+=24,_>=26&&(_-=26,x++);else if(v==="le")for(g=0,x=0;g<c.length;g+=3)S=c[g]|c[g+1]<<8|c[g+2]<<16,this.words[x]|=S<<_&67108863,this.words[x+1]=S>>>26-_&67108863,_+=24,_>=26&&(_-=26,x++);return this.strip()};function u(f,c){var p=f.charCodeAt(c);return p>=65&&p<=70?p-55:p>=97&&p<=102?p-87:p-48&15}function h(f,c,p){var v=u(f,p);return p-1>=c&&(v|=u(f,p-1)<<4),v}n.prototype._parseHex=function(c,p,v){this.length=Math.ceil((c.length-p)/6),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var x=0,S=0,_;if(v==="be")for(g=c.length-1;g>=p;g-=2)_=h(c,p,g)<<x,this.words[S]|=_&67108863,x>=18?(x-=18,S+=1,this.words[S]|=_>>>26):x+=8;else{var l=c.length-p;for(g=l%2===0?p+1:p;g<c.length;g+=2)_=h(c,p,g)<<x,this.words[S]|=_&67108863,x>=18?(x-=18,S+=1,this.words[S]|=_>>>26):x+=8}this.strip()};function b(f,c,p,v){for(var g=0,x=Math.min(f.length,p),S=c;S<x;S++){var _=f.charCodeAt(S)-48;g*=v,_>=49?g+=_-49+10:_>=17?g+=_-17+10:g+=_}return g}n.prototype._parseBase=function(c,p,v){this.words=[0],this.length=1;for(var g=0,x=1;x<=67108863;x*=p)g++;g--,x=x/p|0;for(var S=c.length-v,_=S%g,l=Math.min(S,S-_)+v,m=0,A=v;A<l;A+=g)m=b(c,A,A+g,p),this.imuln(x),this.words[0]+m<67108864?this.words[0]+=m:this._iaddn(m);if(_!==0){var U=1;for(m=b(c,A,c.length,p),A=0;A<_;A++)U*=p;this.imuln(U),this.words[0]+m<67108864?this.words[0]+=m:this._iaddn(m)}this.strip()},n.prototype.copy=function(c){c.words=new Array(this.length);for(var p=0;p<this.length;p++)c.words[p]=this.words[p];c.length=this.length,c.negative=this.negative,c.red=this.red},n.prototype.clone=function(){var c=new n(null);return this.copy(c),c},n.prototype._expand=function(c){for(;this.length<c;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var w=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],T=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],I=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(c,p){c=c||10,p=p|0||1;var v;if(c===16||c==="hex"){v="";for(var g=0,x=0,S=0;S<this.length;S++){var _=this.words[S],l=((_<<g|x)&16777215).toString(16);x=_>>>24-g&16777215,x!==0||S!==this.length-1?v=w[6-l.length]+l+v:v=l+v,g+=2,g>=26&&(g-=26,S--)}for(x!==0&&(v=x.toString(16)+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(c===(c|0)&&c>=2&&c<=36){var m=T[c],A=I[c];v="";var U=this.clone();for(U.negative=0;!U.isZero();){var j=U.modn(A).toString(c);U=U.idivn(A),U.isZero()?v=j+v:v=w[m-j.length]+j+v}for(this.isZero()&&(v="0"+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var c=this.words[0];return this.length===2?c+=this.words[1]*67108864:this.length===3&&this.words[2]===1?c+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-c:c},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(c,p){return r(typeof a<"u"),this.toArrayLike(a,c,p)},n.prototype.toArray=function(c,p){return this.toArrayLike(Array,c,p)},n.prototype.toArrayLike=function(c,p,v){var g=this.byteLength(),x=v||Math.max(1,g);r(g<=x,"byte array longer than desired length"),r(x>0,"Requested array length <= 0"),this.strip();var S=p==="le",_=new c(x),l,m,A=this.clone();if(S){for(m=0;!A.isZero();m++)l=A.andln(255),A.iushrn(8),_[m]=l;for(;m<x;m++)_[m]=0}else{for(m=0;m<x-g;m++)_[m]=0;for(m=0;!A.isZero();m++)l=A.andln(255),A.iushrn(8),_[x-m-1]=l}return _},Math.clz32?n.prototype._countBits=function(c){return 32-Math.clz32(c)}:n.prototype._countBits=function(c){var p=c,v=0;return p>=4096&&(v+=13,p>>>=13),p>=64&&(v+=7,p>>>=7),p>=8&&(v+=4,p>>>=4),p>=2&&(v+=2,p>>>=2),v+p},n.prototype._zeroBits=function(c){if(c===0)return 26;var p=c,v=0;return p&8191||(v+=13,p>>>=13),p&127||(v+=7,p>>>=7),p&15||(v+=4,p>>>=4),p&3||(v+=2,p>>>=2),p&1||v++,v},n.prototype.bitLength=function(){var c=this.words[this.length-1],p=this._countBits(c);return(this.length-1)*26+p};function B(f){for(var c=new Array(f.bitLength()),p=0;p<c.length;p++){var v=p/26|0,g=p%26;c[p]=(f.words[v]&1<<g)>>>g}return c}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,p=0;p<this.length;p++){var v=this._zeroBits(this.words[p]);if(c+=v,v!==26)break}return c},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(c){return this.negative!==0?this.abs().inotn(c).iaddn(1):this.clone()},n.prototype.fromTwos=function(c){return this.testn(c-1)?this.notn(c).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(c){for(;this.length<c.length;)this.words[this.length++]=0;for(var p=0;p<c.length;p++)this.words[p]=this.words[p]|c.words[p];return this.strip()},n.prototype.ior=function(c){return r((this.negative|c.negative)===0),this.iuor(c)},n.prototype.or=function(c){return this.length>c.length?this.clone().ior(c):c.clone().ior(this)},n.prototype.uor=function(c){return this.length>c.length?this.clone().iuor(c):c.clone().iuor(this)},n.prototype.iuand=function(c){var p;this.length>c.length?p=c:p=this;for(var v=0;v<p.length;v++)this.words[v]=this.words[v]&c.words[v];return this.length=p.length,this.strip()},n.prototype.iand=function(c){return r((this.negative|c.negative)===0),this.iuand(c)},n.prototype.and=function(c){return this.length>c.length?this.clone().iand(c):c.clone().iand(this)},n.prototype.uand=function(c){return this.length>c.length?this.clone().iuand(c):c.clone().iuand(this)},n.prototype.iuxor=function(c){var p,v;this.length>c.length?(p=this,v=c):(p=c,v=this);for(var g=0;g<v.length;g++)this.words[g]=p.words[g]^v.words[g];if(this!==p)for(;g<p.length;g++)this.words[g]=p.words[g];return this.length=p.length,this.strip()},n.prototype.ixor=function(c){return r((this.negative|c.negative)===0),this.iuxor(c)},n.prototype.xor=function(c){return this.length>c.length?this.clone().ixor(c):c.clone().ixor(this)},n.prototype.uxor=function(c){return this.length>c.length?this.clone().iuxor(c):c.clone().iuxor(this)},n.prototype.inotn=function(c){r(typeof c=="number"&&c>=0);var p=Math.ceil(c/26)|0,v=c%26;this._expand(p),v>0&&p--;for(var g=0;g<p;g++)this.words[g]=~this.words[g]&67108863;return v>0&&(this.words[g]=~this.words[g]&67108863>>26-v),this.strip()},n.prototype.notn=function(c){return this.clone().inotn(c)},n.prototype.setn=function(c,p){r(typeof c=="number"&&c>=0);var v=c/26|0,g=c%26;return this._expand(v+1),p?this.words[v]=this.words[v]|1<<g:this.words[v]=this.words[v]&~(1<<g),this.strip()},n.prototype.iadd=function(c){var p;if(this.negative!==0&&c.negative===0)return this.negative=0,p=this.isub(c),this.negative^=1,this._normSign();if(this.negative===0&&c.negative!==0)return c.negative=0,p=this.isub(c),c.negative=1,p._normSign();var v,g;this.length>c.length?(v=this,g=c):(v=c,g=this);for(var x=0,S=0;S<g.length;S++)p=(v.words[S]|0)+(g.words[S]|0)+x,this.words[S]=p&67108863,x=p>>>26;for(;x!==0&&S<v.length;S++)p=(v.words[S]|0)+x,this.words[S]=p&67108863,x=p>>>26;if(this.length=v.length,x!==0)this.words[this.length]=x,this.length++;else if(v!==this)for(;S<v.length;S++)this.words[S]=v.words[S];return this},n.prototype.add=function(c){var p;return c.negative!==0&&this.negative===0?(c.negative=0,p=this.sub(c),c.negative^=1,p):c.negative===0&&this.negative!==0?(this.negative=0,p=c.sub(this),this.negative=1,p):this.length>c.length?this.clone().iadd(c):c.clone().iadd(this)},n.prototype.isub=function(c){if(c.negative!==0){c.negative=0;var p=this.iadd(c);return c.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var v=this.cmp(c);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,x;v>0?(g=this,x=c):(g=c,x=this);for(var S=0,_=0;_<x.length;_++)p=(g.words[_]|0)-(x.words[_]|0)+S,S=p>>26,this.words[_]=p&67108863;for(;S!==0&&_<g.length;_++)p=(g.words[_]|0)+S,S=p>>26,this.words[_]=p&67108863;if(S===0&&_<g.length&&g!==this)for(;_<g.length;_++)this.words[_]=g.words[_];return this.length=Math.max(this.length,_),g!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(c){return this.clone().isub(c)};function M(f,c,p){p.negative=c.negative^f.negative;var v=f.length+c.length|0;p.length=v,v=v-1|0;var g=f.words[0]|0,x=c.words[0]|0,S=g*x,_=S&67108863,l=S/67108864|0;p.words[0]=_;for(var m=1;m<v;m++){for(var A=l>>>26,U=l&67108863,j=Math.min(m,c.length-1),Z=Math.max(0,m-f.length+1);Z<=j;Z++){var se=m-Z|0;g=f.words[se]|0,x=c.words[Z]|0,S=g*x+U,A+=S/67108864|0,U=S&67108863}p.words[m]=U|0,l=A|0}return l!==0?p.words[m]=l|0:p.length--,p.strip()}var P=function(c,p,v){var g=c.words,x=p.words,S=v.words,_=0,l,m,A,U=g[0]|0,j=U&8191,Z=U>>>13,se=g[1]|0,ae=se&8191,he=se>>>13,Ee=g[2]|0,me=Ee&8191,dt=Ee>>>13,St=g[3]|0,Oe=St&8191,st=St>>>13,rt=g[4]|0,Re=rt&8191,Ae=rt>>>13,Wt=g[5]|0,Ke=Wt&8191,At=Wt>>>13,bt=g[6]|0,De=bt&8191,Pt=bt>>>13,Qt=g[7]|0,Ue=Qt&8191,er=Qt>>>13,Ot=g[8]|0,Le=Ot&8191,Ct=Ot>>>13,Lt=g[9]|0,qe=Lt&8191,Dt=Lt>>>13,Ut=x[0]|0,Fe=Ut&8191,qt=Ut>>>13,Ft=x[1]|0,He=Ft&8191,tr=Ft>>>13,rr=x[2]|0,We=rr&8191,Gt=rr>>>13,$t=x[3]|0,Ge=$t&8191,ir=$t>>>13,nr=x[4]|0,$e=nr&8191,Xt=nr>>>13,sr=x[5]|0,Xe=sr&8191,ar=sr>>>13,Ht=x[6]|0,Ye=Ht&8191,zt=Ht>>>13,or=x[7]|0,Ze=or&8191,cr=or>>>13,ur=x[8]|0,Je=ur&8191,fr=ur>>>13,lr=x[9]|0,Qe=lr&8191,jt=lr>>>13;v.negative=c.negative^p.negative,v.length=19,l=Math.imul(j,Fe),m=Math.imul(j,qt),m=m+Math.imul(Z,Fe)|0,A=Math.imul(Z,qt);var Rs=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,l=Math.imul(ae,Fe),m=Math.imul(ae,qt),m=m+Math.imul(he,Fe)|0,A=Math.imul(he,qt),l=l+Math.imul(j,He)|0,m=m+Math.imul(j,tr)|0,m=m+Math.imul(Z,He)|0,A=A+Math.imul(Z,tr)|0;var As=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(As>>>26)|0,As&=67108863,l=Math.imul(me,Fe),m=Math.imul(me,qt),m=m+Math.imul(dt,Fe)|0,A=Math.imul(dt,qt),l=l+Math.imul(ae,He)|0,m=m+Math.imul(ae,tr)|0,m=m+Math.imul(he,He)|0,A=A+Math.imul(he,tr)|0,l=l+Math.imul(j,We)|0,m=m+Math.imul(j,Gt)|0,m=m+Math.imul(Z,We)|0,A=A+Math.imul(Z,Gt)|0;var Os=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Os>>>26)|0,Os&=67108863,l=Math.imul(Oe,Fe),m=Math.imul(Oe,qt),m=m+Math.imul(st,Fe)|0,A=Math.imul(st,qt),l=l+Math.imul(me,He)|0,m=m+Math.imul(me,tr)|0,m=m+Math.imul(dt,He)|0,A=A+Math.imul(dt,tr)|0,l=l+Math.imul(ae,We)|0,m=m+Math.imul(ae,Gt)|0,m=m+Math.imul(he,We)|0,A=A+Math.imul(he,Gt)|0,l=l+Math.imul(j,Ge)|0,m=m+Math.imul(j,ir)|0,m=m+Math.imul(Z,Ge)|0,A=A+Math.imul(Z,ir)|0;var ks=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(ks>>>26)|0,ks&=67108863,l=Math.imul(Re,Fe),m=Math.imul(Re,qt),m=m+Math.imul(Ae,Fe)|0,A=Math.imul(Ae,qt),l=l+Math.imul(Oe,He)|0,m=m+Math.imul(Oe,tr)|0,m=m+Math.imul(st,He)|0,A=A+Math.imul(st,tr)|0,l=l+Math.imul(me,We)|0,m=m+Math.imul(me,Gt)|0,m=m+Math.imul(dt,We)|0,A=A+Math.imul(dt,Gt)|0,l=l+Math.imul(ae,Ge)|0,m=m+Math.imul(ae,ir)|0,m=m+Math.imul(he,Ge)|0,A=A+Math.imul(he,ir)|0,l=l+Math.imul(j,$e)|0,m=m+Math.imul(j,Xt)|0,m=m+Math.imul(Z,$e)|0,A=A+Math.imul(Z,Xt)|0;var Ns=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Ns>>>26)|0,Ns&=67108863,l=Math.imul(Ke,Fe),m=Math.imul(Ke,qt),m=m+Math.imul(At,Fe)|0,A=Math.imul(At,qt),l=l+Math.imul(Re,He)|0,m=m+Math.imul(Re,tr)|0,m=m+Math.imul(Ae,He)|0,A=A+Math.imul(Ae,tr)|0,l=l+Math.imul(Oe,We)|0,m=m+Math.imul(Oe,Gt)|0,m=m+Math.imul(st,We)|0,A=A+Math.imul(st,Gt)|0,l=l+Math.imul(me,Ge)|0,m=m+Math.imul(me,ir)|0,m=m+Math.imul(dt,Ge)|0,A=A+Math.imul(dt,ir)|0,l=l+Math.imul(ae,$e)|0,m=m+Math.imul(ae,Xt)|0,m=m+Math.imul(he,$e)|0,A=A+Math.imul(he,Xt)|0,l=l+Math.imul(j,Xe)|0,m=m+Math.imul(j,ar)|0,m=m+Math.imul(Z,Xe)|0,A=A+Math.imul(Z,ar)|0;var Ps=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Ps>>>26)|0,Ps&=67108863,l=Math.imul(De,Fe),m=Math.imul(De,qt),m=m+Math.imul(Pt,Fe)|0,A=Math.imul(Pt,qt),l=l+Math.imul(Ke,He)|0,m=m+Math.imul(Ke,tr)|0,m=m+Math.imul(At,He)|0,A=A+Math.imul(At,tr)|0,l=l+Math.imul(Re,We)|0,m=m+Math.imul(Re,Gt)|0,m=m+Math.imul(Ae,We)|0,A=A+Math.imul(Ae,Gt)|0,l=l+Math.imul(Oe,Ge)|0,m=m+Math.imul(Oe,ir)|0,m=m+Math.imul(st,Ge)|0,A=A+Math.imul(st,ir)|0,l=l+Math.imul(me,$e)|0,m=m+Math.imul(me,Xt)|0,m=m+Math.imul(dt,$e)|0,A=A+Math.imul(dt,Xt)|0,l=l+Math.imul(ae,Xe)|0,m=m+Math.imul(ae,ar)|0,m=m+Math.imul(he,Xe)|0,A=A+Math.imul(he,ar)|0,l=l+Math.imul(j,Ye)|0,m=m+Math.imul(j,zt)|0,m=m+Math.imul(Z,Ye)|0,A=A+Math.imul(Z,zt)|0;var sn=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(sn>>>26)|0,sn&=67108863,l=Math.imul(Ue,Fe),m=Math.imul(Ue,qt),m=m+Math.imul(er,Fe)|0,A=Math.imul(er,qt),l=l+Math.imul(De,He)|0,m=m+Math.imul(De,tr)|0,m=m+Math.imul(Pt,He)|0,A=A+Math.imul(Pt,tr)|0,l=l+Math.imul(Ke,We)|0,m=m+Math.imul(Ke,Gt)|0,m=m+Math.imul(At,We)|0,A=A+Math.imul(At,Gt)|0,l=l+Math.imul(Re,Ge)|0,m=m+Math.imul(Re,ir)|0,m=m+Math.imul(Ae,Ge)|0,A=A+Math.imul(Ae,ir)|0,l=l+Math.imul(Oe,$e)|0,m=m+Math.imul(Oe,Xt)|0,m=m+Math.imul(st,$e)|0,A=A+Math.imul(st,Xt)|0,l=l+Math.imul(me,Xe)|0,m=m+Math.imul(me,ar)|0,m=m+Math.imul(dt,Xe)|0,A=A+Math.imul(dt,ar)|0,l=l+Math.imul(ae,Ye)|0,m=m+Math.imul(ae,zt)|0,m=m+Math.imul(he,Ye)|0,A=A+Math.imul(he,zt)|0,l=l+Math.imul(j,Ze)|0,m=m+Math.imul(j,cr)|0,m=m+Math.imul(Z,Ze)|0,A=A+Math.imul(Z,cr)|0;var Bs=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,l=Math.imul(Le,Fe),m=Math.imul(Le,qt),m=m+Math.imul(Ct,Fe)|0,A=Math.imul(Ct,qt),l=l+Math.imul(Ue,He)|0,m=m+Math.imul(Ue,tr)|0,m=m+Math.imul(er,He)|0,A=A+Math.imul(er,tr)|0,l=l+Math.imul(De,We)|0,m=m+Math.imul(De,Gt)|0,m=m+Math.imul(Pt,We)|0,A=A+Math.imul(Pt,Gt)|0,l=l+Math.imul(Ke,Ge)|0,m=m+Math.imul(Ke,ir)|0,m=m+Math.imul(At,Ge)|0,A=A+Math.imul(At,ir)|0,l=l+Math.imul(Re,$e)|0,m=m+Math.imul(Re,Xt)|0,m=m+Math.imul(Ae,$e)|0,A=A+Math.imul(Ae,Xt)|0,l=l+Math.imul(Oe,Xe)|0,m=m+Math.imul(Oe,ar)|0,m=m+Math.imul(st,Xe)|0,A=A+Math.imul(st,ar)|0,l=l+Math.imul(me,Ye)|0,m=m+Math.imul(me,zt)|0,m=m+Math.imul(dt,Ye)|0,A=A+Math.imul(dt,zt)|0,l=l+Math.imul(ae,Ze)|0,m=m+Math.imul(ae,cr)|0,m=m+Math.imul(he,Ze)|0,A=A+Math.imul(he,cr)|0,l=l+Math.imul(j,Je)|0,m=m+Math.imul(j,fr)|0,m=m+Math.imul(Z,Je)|0,A=A+Math.imul(Z,fr)|0;var an=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(an>>>26)|0,an&=67108863,l=Math.imul(qe,Fe),m=Math.imul(qe,qt),m=m+Math.imul(Dt,Fe)|0,A=Math.imul(Dt,qt),l=l+Math.imul(Le,He)|0,m=m+Math.imul(Le,tr)|0,m=m+Math.imul(Ct,He)|0,A=A+Math.imul(Ct,tr)|0,l=l+Math.imul(Ue,We)|0,m=m+Math.imul(Ue,Gt)|0,m=m+Math.imul(er,We)|0,A=A+Math.imul(er,Gt)|0,l=l+Math.imul(De,Ge)|0,m=m+Math.imul(De,ir)|0,m=m+Math.imul(Pt,Ge)|0,A=A+Math.imul(Pt,ir)|0,l=l+Math.imul(Ke,$e)|0,m=m+Math.imul(Ke,Xt)|0,m=m+Math.imul(At,$e)|0,A=A+Math.imul(At,Xt)|0,l=l+Math.imul(Re,Xe)|0,m=m+Math.imul(Re,ar)|0,m=m+Math.imul(Ae,Xe)|0,A=A+Math.imul(Ae,ar)|0,l=l+Math.imul(Oe,Ye)|0,m=m+Math.imul(Oe,zt)|0,m=m+Math.imul(st,Ye)|0,A=A+Math.imul(st,zt)|0,l=l+Math.imul(me,Ze)|0,m=m+Math.imul(me,cr)|0,m=m+Math.imul(dt,Ze)|0,A=A+Math.imul(dt,cr)|0,l=l+Math.imul(ae,Je)|0,m=m+Math.imul(ae,fr)|0,m=m+Math.imul(he,Je)|0,A=A+Math.imul(he,fr)|0,l=l+Math.imul(j,Qe)|0,m=m+Math.imul(j,jt)|0,m=m+Math.imul(Z,Qe)|0,A=A+Math.imul(Z,jt)|0;var Ms=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,l=Math.imul(qe,He),m=Math.imul(qe,tr),m=m+Math.imul(Dt,He)|0,A=Math.imul(Dt,tr),l=l+Math.imul(Le,We)|0,m=m+Math.imul(Le,Gt)|0,m=m+Math.imul(Ct,We)|0,A=A+Math.imul(Ct,Gt)|0,l=l+Math.imul(Ue,Ge)|0,m=m+Math.imul(Ue,ir)|0,m=m+Math.imul(er,Ge)|0,A=A+Math.imul(er,ir)|0,l=l+Math.imul(De,$e)|0,m=m+Math.imul(De,Xt)|0,m=m+Math.imul(Pt,$e)|0,A=A+Math.imul(Pt,Xt)|0,l=l+Math.imul(Ke,Xe)|0,m=m+Math.imul(Ke,ar)|0,m=m+Math.imul(At,Xe)|0,A=A+Math.imul(At,ar)|0,l=l+Math.imul(Re,Ye)|0,m=m+Math.imul(Re,zt)|0,m=m+Math.imul(Ae,Ye)|0,A=A+Math.imul(Ae,zt)|0,l=l+Math.imul(Oe,Ze)|0,m=m+Math.imul(Oe,cr)|0,m=m+Math.imul(st,Ze)|0,A=A+Math.imul(st,cr)|0,l=l+Math.imul(me,Je)|0,m=m+Math.imul(me,fr)|0,m=m+Math.imul(dt,Je)|0,A=A+Math.imul(dt,fr)|0,l=l+Math.imul(ae,Qe)|0,m=m+Math.imul(ae,jt)|0,m=m+Math.imul(he,Qe)|0,A=A+Math.imul(he,jt)|0;var Cs=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Cs>>>26)|0,Cs&=67108863,l=Math.imul(qe,We),m=Math.imul(qe,Gt),m=m+Math.imul(Dt,We)|0,A=Math.imul(Dt,Gt),l=l+Math.imul(Le,Ge)|0,m=m+Math.imul(Le,ir)|0,m=m+Math.imul(Ct,Ge)|0,A=A+Math.imul(Ct,ir)|0,l=l+Math.imul(Ue,$e)|0,m=m+Math.imul(Ue,Xt)|0,m=m+Math.imul(er,$e)|0,A=A+Math.imul(er,Xt)|0,l=l+Math.imul(De,Xe)|0,m=m+Math.imul(De,ar)|0,m=m+Math.imul(Pt,Xe)|0,A=A+Math.imul(Pt,ar)|0,l=l+Math.imul(Ke,Ye)|0,m=m+Math.imul(Ke,zt)|0,m=m+Math.imul(At,Ye)|0,A=A+Math.imul(At,zt)|0,l=l+Math.imul(Re,Ze)|0,m=m+Math.imul(Re,cr)|0,m=m+Math.imul(Ae,Ze)|0,A=A+Math.imul(Ae,cr)|0,l=l+Math.imul(Oe,Je)|0,m=m+Math.imul(Oe,fr)|0,m=m+Math.imul(st,Je)|0,A=A+Math.imul(st,fr)|0,l=l+Math.imul(me,Qe)|0,m=m+Math.imul(me,jt)|0,m=m+Math.imul(dt,Qe)|0,A=A+Math.imul(dt,jt)|0;var Ls=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Ls>>>26)|0,Ls&=67108863,l=Math.imul(qe,Ge),m=Math.imul(qe,ir),m=m+Math.imul(Dt,Ge)|0,A=Math.imul(Dt,ir),l=l+Math.imul(Le,$e)|0,m=m+Math.imul(Le,Xt)|0,m=m+Math.imul(Ct,$e)|0,A=A+Math.imul(Ct,Xt)|0,l=l+Math.imul(Ue,Xe)|0,m=m+Math.imul(Ue,ar)|0,m=m+Math.imul(er,Xe)|0,A=A+Math.imul(er,ar)|0,l=l+Math.imul(De,Ye)|0,m=m+Math.imul(De,zt)|0,m=m+Math.imul(Pt,Ye)|0,A=A+Math.imul(Pt,zt)|0,l=l+Math.imul(Ke,Ze)|0,m=m+Math.imul(Ke,cr)|0,m=m+Math.imul(At,Ze)|0,A=A+Math.imul(At,cr)|0,l=l+Math.imul(Re,Je)|0,m=m+Math.imul(Re,fr)|0,m=m+Math.imul(Ae,Je)|0,A=A+Math.imul(Ae,fr)|0,l=l+Math.imul(Oe,Qe)|0,m=m+Math.imul(Oe,jt)|0,m=m+Math.imul(st,Qe)|0,A=A+Math.imul(st,jt)|0;var is=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(is>>>26)|0,is&=67108863,l=Math.imul(qe,$e),m=Math.imul(qe,Xt),m=m+Math.imul(Dt,$e)|0,A=Math.imul(Dt,Xt),l=l+Math.imul(Le,Xe)|0,m=m+Math.imul(Le,ar)|0,m=m+Math.imul(Ct,Xe)|0,A=A+Math.imul(Ct,ar)|0,l=l+Math.imul(Ue,Ye)|0,m=m+Math.imul(Ue,zt)|0,m=m+Math.imul(er,Ye)|0,A=A+Math.imul(er,zt)|0,l=l+Math.imul(De,Ze)|0,m=m+Math.imul(De,cr)|0,m=m+Math.imul(Pt,Ze)|0,A=A+Math.imul(Pt,cr)|0,l=l+Math.imul(Ke,Je)|0,m=m+Math.imul(Ke,fr)|0,m=m+Math.imul(At,Je)|0,A=A+Math.imul(At,fr)|0,l=l+Math.imul(Re,Qe)|0,m=m+Math.imul(Re,jt)|0,m=m+Math.imul(Ae,Qe)|0,A=A+Math.imul(Ae,jt)|0;var ns=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(ns>>>26)|0,ns&=67108863,l=Math.imul(qe,Xe),m=Math.imul(qe,ar),m=m+Math.imul(Dt,Xe)|0,A=Math.imul(Dt,ar),l=l+Math.imul(Le,Ye)|0,m=m+Math.imul(Le,zt)|0,m=m+Math.imul(Ct,Ye)|0,A=A+Math.imul(Ct,zt)|0,l=l+Math.imul(Ue,Ze)|0,m=m+Math.imul(Ue,cr)|0,m=m+Math.imul(er,Ze)|0,A=A+Math.imul(er,cr)|0,l=l+Math.imul(De,Je)|0,m=m+Math.imul(De,fr)|0,m=m+Math.imul(Pt,Je)|0,A=A+Math.imul(Pt,fr)|0,l=l+Math.imul(Ke,Qe)|0,m=m+Math.imul(Ke,jt)|0,m=m+Math.imul(At,Qe)|0,A=A+Math.imul(At,jt)|0;var ss=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(ss>>>26)|0,ss&=67108863,l=Math.imul(qe,Ye),m=Math.imul(qe,zt),m=m+Math.imul(Dt,Ye)|0,A=Math.imul(Dt,zt),l=l+Math.imul(Le,Ze)|0,m=m+Math.imul(Le,cr)|0,m=m+Math.imul(Ct,Ze)|0,A=A+Math.imul(Ct,cr)|0,l=l+Math.imul(Ue,Je)|0,m=m+Math.imul(Ue,fr)|0,m=m+Math.imul(er,Je)|0,A=A+Math.imul(er,fr)|0,l=l+Math.imul(De,Qe)|0,m=m+Math.imul(De,jt)|0,m=m+Math.imul(Pt,Qe)|0,A=A+Math.imul(Pt,jt)|0;var Ds=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Ds>>>26)|0,Ds&=67108863,l=Math.imul(qe,Ze),m=Math.imul(qe,cr),m=m+Math.imul(Dt,Ze)|0,A=Math.imul(Dt,cr),l=l+Math.imul(Le,Je)|0,m=m+Math.imul(Le,fr)|0,m=m+Math.imul(Ct,Je)|0,A=A+Math.imul(Ct,fr)|0,l=l+Math.imul(Ue,Qe)|0,m=m+Math.imul(Ue,jt)|0,m=m+Math.imul(er,Qe)|0,A=A+Math.imul(er,jt)|0;var Us=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Us>>>26)|0,Us&=67108863,l=Math.imul(qe,Je),m=Math.imul(qe,fr),m=m+Math.imul(Dt,Je)|0,A=Math.imul(Dt,fr),l=l+Math.imul(Le,Qe)|0,m=m+Math.imul(Le,jt)|0,m=m+Math.imul(Ct,Qe)|0,A=A+Math.imul(Ct,jt)|0;var qs=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(qs>>>26)|0,qs&=67108863,l=Math.imul(qe,Qe),m=Math.imul(qe,jt),m=m+Math.imul(Dt,Qe)|0,A=Math.imul(Dt,jt);var Ku=(_+l|0)+((m&8191)<<13)|0;return _=(A+(m>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,S[0]=Rs,S[1]=As,S[2]=Os,S[3]=ks,S[4]=Ns,S[5]=Ps,S[6]=sn,S[7]=Bs,S[8]=an,S[9]=Ms,S[10]=Cs,S[11]=Ls,S[12]=is,S[13]=ns,S[14]=ss,S[15]=Ds,S[16]=Us,S[17]=qs,S[18]=Ku,_!==0&&(S[19]=_,v.length++),v};Math.imul||(P=M);function L(f,c,p){p.negative=c.negative^f.negative,p.length=f.length+c.length;for(var v=0,g=0,x=0;x<p.length-1;x++){var S=g;g=0;for(var _=v&67108863,l=Math.min(x,c.length-1),m=Math.max(0,x-f.length+1);m<=l;m++){var A=x-m,U=f.words[A]|0,j=c.words[m]|0,Z=U*j,se=Z&67108863;S=S+(Z/67108864|0)|0,se=se+_|0,_=se&67108863,S=S+(se>>>26)|0,g+=S>>>26,S&=67108863}p.words[x]=_,v=S,S=g}return v!==0?p.words[x]=v:p.length--,p.strip()}function X(f,c,p){var v=new V;return v.mulp(f,c,p)}n.prototype.mulTo=function(c,p){var v,g=this.length+c.length;return this.length===10&&c.length===10?v=P(this,c,p):g<63?v=M(this,c,p):g<1024?v=L(this,c,p):v=X(this,c,p),v};function V(f,c){this.x=f,this.y=c}V.prototype.makeRBT=function(c){for(var p=new Array(c),v=n.prototype._countBits(c)-1,g=0;g<c;g++)p[g]=this.revBin(g,v,c);return p},V.prototype.revBin=function(c,p,v){if(c===0||c===v-1)return c;for(var g=0,x=0;x<p;x++)g|=(c&1)<<p-x-1,c>>=1;return g},V.prototype.permute=function(c,p,v,g,x,S){for(var _=0;_<S;_++)g[_]=p[c[_]],x[_]=v[c[_]]},V.prototype.transform=function(c,p,v,g,x,S){this.permute(S,c,p,v,g,x);for(var _=1;_<x;_<<=1)for(var l=_<<1,m=Math.cos(2*Math.PI/l),A=Math.sin(2*Math.PI/l),U=0;U<x;U+=l)for(var j=m,Z=A,se=0;se<_;se++){var ae=v[U+se],he=g[U+se],Ee=v[U+se+_],me=g[U+se+_],dt=j*Ee-Z*me;me=j*me+Z*Ee,Ee=dt,v[U+se]=ae+Ee,g[U+se]=he+me,v[U+se+_]=ae-Ee,g[U+se+_]=he-me,se!==l&&(dt=m*j-A*Z,Z=m*Z+A*j,j=dt)}},V.prototype.guessLen13b=function(c,p){var v=Math.max(p,c)|1,g=v&1,x=0;for(v=v/2|0;v;v=v>>>1)x++;return 1<<x+1+g},V.prototype.conjugate=function(c,p,v){if(!(v<=1))for(var g=0;g<v/2;g++){var x=c[g];c[g]=c[v-g-1],c[v-g-1]=x,x=p[g],p[g]=-p[v-g-1],p[v-g-1]=-x}},V.prototype.normalize13b=function(c,p){for(var v=0,g=0;g<p/2;g++){var x=Math.round(c[2*g+1]/p)*8192+Math.round(c[2*g]/p)+v;c[g]=x&67108863,x<67108864?v=0:v=x/67108864|0}return c},V.prototype.convert13b=function(c,p,v,g){for(var x=0,S=0;S<p;S++)x=x+(c[S]|0),v[2*S]=x&8191,x=x>>>13,v[2*S+1]=x&8191,x=x>>>13;for(S=2*p;S<g;++S)v[S]=0;r(x===0),r((x&-8192)===0)},V.prototype.stub=function(c){for(var p=new Array(c),v=0;v<c;v++)p[v]=0;return p},V.prototype.mulp=function(c,p,v){var g=2*this.guessLen13b(c.length,p.length),x=this.makeRBT(g),S=this.stub(g),_=new Array(g),l=new Array(g),m=new Array(g),A=new Array(g),U=new Array(g),j=new Array(g),Z=v.words;Z.length=g,this.convert13b(c.words,c.length,_,g),this.convert13b(p.words,p.length,A,g),this.transform(_,S,l,m,g,x),this.transform(A,S,U,j,g,x);for(var se=0;se<g;se++){var ae=l[se]*U[se]-m[se]*j[se];m[se]=l[se]*j[se]+m[se]*U[se],l[se]=ae}return this.conjugate(l,m,g),this.transform(l,m,Z,S,g,x),this.conjugate(Z,S,g),this.normalize13b(Z,g),v.negative=c.negative^p.negative,v.length=c.length+p.length,v.strip()},n.prototype.mul=function(c){var p=new n(null);return p.words=new Array(this.length+c.length),this.mulTo(c,p)},n.prototype.mulf=function(c){var p=new n(null);return p.words=new Array(this.length+c.length),X(this,c,p)},n.prototype.imul=function(c){return this.clone().mulTo(c,this)},n.prototype.imuln=function(c){r(typeof c=="number"),r(c<67108864);for(var p=0,v=0;v<this.length;v++){var g=(this.words[v]|0)*c,x=(g&67108863)+(p&67108863);p>>=26,p+=g/67108864|0,p+=x>>>26,this.words[v]=x&67108863}return p!==0&&(this.words[v]=p,this.length++),this},n.prototype.muln=function(c){return this.clone().imuln(c)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(c){var p=B(c);if(p.length===0)return new n(1);for(var v=this,g=0;g<p.length&&p[g]===0;g++,v=v.sqr());if(++g<p.length)for(var x=v.sqr();g<p.length;g++,x=x.sqr())p[g]!==0&&(v=v.mul(x));return v},n.prototype.iushln=function(c){r(typeof c=="number"&&c>=0);var p=c%26,v=(c-p)/26,g=67108863>>>26-p<<26-p,x;if(p!==0){var S=0;for(x=0;x<this.length;x++){var _=this.words[x]&g,l=(this.words[x]|0)-_<<p;this.words[x]=l|S,S=_>>>26-p}S&&(this.words[x]=S,this.length++)}if(v!==0){for(x=this.length-1;x>=0;x--)this.words[x+v]=this.words[x];for(x=0;x<v;x++)this.words[x]=0;this.length+=v}return this.strip()},n.prototype.ishln=function(c){return r(this.negative===0),this.iushln(c)},n.prototype.iushrn=function(c,p,v){r(typeof c=="number"&&c>=0);var g;p?g=(p-p%26)/26:g=0;var x=c%26,S=Math.min((c-x)/26,this.length),_=67108863^67108863>>>x<<x,l=v;if(g-=S,g=Math.max(0,g),l){for(var m=0;m<S;m++)l.words[m]=this.words[m];l.length=S}if(S!==0)if(this.length>S)for(this.length-=S,m=0;m<this.length;m++)this.words[m]=this.words[m+S];else this.words[0]=0,this.length=1;var A=0;for(m=this.length-1;m>=0&&(A!==0||m>=g);m--){var U=this.words[m]|0;this.words[m]=A<<26-x|U>>>x,A=U&_}return l&&A!==0&&(l.words[l.length++]=A),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(c,p,v){return r(this.negative===0),this.iushrn(c,p,v)},n.prototype.shln=function(c){return this.clone().ishln(c)},n.prototype.ushln=function(c){return this.clone().iushln(c)},n.prototype.shrn=function(c){return this.clone().ishrn(c)},n.prototype.ushrn=function(c){return this.clone().iushrn(c)},n.prototype.testn=function(c){r(typeof c=="number"&&c>=0);var p=c%26,v=(c-p)/26,g=1<<p;if(this.length<=v)return!1;var x=this.words[v];return!!(x&g)},n.prototype.imaskn=function(c){r(typeof c=="number"&&c>=0);var p=c%26,v=(c-p)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(p!==0&&v++,this.length=Math.min(v,this.length),p!==0){var g=67108863^67108863>>>p<<p;this.words[this.length-1]&=g}return this.strip()},n.prototype.maskn=function(c){return this.clone().imaskn(c)},n.prototype.iaddn=function(c){return r(typeof c=="number"),r(c<67108864),c<0?this.isubn(-c):this.negative!==0?this.length===1&&(this.words[0]|0)<c?(this.words[0]=c-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(c),this.negative=1,this):this._iaddn(c)},n.prototype._iaddn=function(c){this.words[0]+=c;for(var p=0;p<this.length&&this.words[p]>=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},n.prototype.isubn=function(c){if(r(typeof c=="number"),r(c<67108864),c<0)return this.iaddn(-c);if(this.negative!==0)return this.negative=0,this.iaddn(c),this.negative=1,this;if(this.words[0]-=c,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p<this.length&&this.words[p]<0;p++)this.words[p]+=67108864,this.words[p+1]-=1;return this.strip()},n.prototype.addn=function(c){return this.clone().iaddn(c)},n.prototype.subn=function(c){return this.clone().isubn(c)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(c,p,v){var g=c.length+v,x;this._expand(g);var S,_=0;for(x=0;x<c.length;x++){S=(this.words[x+v]|0)+_;var l=(c.words[x]|0)*p;S-=l&67108863,_=(S>>26)-(l/67108864|0),this.words[x+v]=S&67108863}for(;x<this.length-v;x++)S=(this.words[x+v]|0)+_,_=S>>26,this.words[x+v]=S&67108863;if(_===0)return this.strip();for(r(_===-1),_=0,x=0;x<this.length;x++)S=-(this.words[x]|0)+_,_=S>>26,this.words[x]=S&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(c,p){var v=this.length-c.length,g=this.clone(),x=c,S=x.words[x.length-1]|0,_=this._countBits(S);v=26-_,v!==0&&(x=x.ushln(v),g.iushln(v),S=x.words[x.length-1]|0);var l=g.length-x.length,m;if(p!=="mod"){m=new n(null),m.length=l+1,m.words=new Array(m.length);for(var A=0;A<m.length;A++)m.words[A]=0}var U=g.clone()._ishlnsubmul(x,1,l);U.negative===0&&(g=U,m&&(m.words[l]=1));for(var j=l-1;j>=0;j--){var Z=(g.words[x.length+j]|0)*67108864+(g.words[x.length+j-1]|0);for(Z=Math.min(Z/S|0,67108863),g._ishlnsubmul(x,Z,j);g.negative!==0;)Z--,g.negative=0,g._ishlnsubmul(x,1,j),g.isZero()||(g.negative^=1);m&&(m.words[j]=Z)}return m&&m.strip(),g.strip(),p!=="div"&&v!==0&&g.iushrn(v),{div:m||null,mod:g}},n.prototype.divmod=function(c,p,v){if(r(!c.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var g,x,S;return this.negative!==0&&c.negative===0?(S=this.neg().divmod(c,p),p!=="mod"&&(g=S.div.neg()),p!=="div"&&(x=S.mod.neg(),v&&x.negative!==0&&x.iadd(c)),{div:g,mod:x}):this.negative===0&&c.negative!==0?(S=this.divmod(c.neg(),p),p!=="mod"&&(g=S.div.neg()),{div:g,mod:S.mod}):this.negative&c.negative?(S=this.neg().divmod(c.neg(),p),p!=="div"&&(x=S.mod.neg(),v&&x.negative!==0&&x.isub(c)),{div:S.div,mod:x}):c.length>this.length||this.cmp(c)<0?{div:new n(0),mod:this}:c.length===1?p==="div"?{div:this.divn(c.words[0]),mod:null}:p==="mod"?{div:null,mod:new n(this.modn(c.words[0]))}:{div:this.divn(c.words[0]),mod:new n(this.modn(c.words[0]))}:this._wordDiv(c,p)},n.prototype.div=function(c){return this.divmod(c,"div",!1).div},n.prototype.mod=function(c){return this.divmod(c,"mod",!1).mod},n.prototype.umod=function(c){return this.divmod(c,"mod",!0).mod},n.prototype.divRound=function(c){var p=this.divmod(c);if(p.mod.isZero())return p.div;var v=p.div.negative!==0?p.mod.isub(c):p.mod,g=c.ushrn(1),x=c.andln(1),S=v.cmp(g);return S<0||x===1&&S===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},n.prototype.modn=function(c){r(c<=67108863);for(var p=(1<<26)%c,v=0,g=this.length-1;g>=0;g--)v=(p*v+(this.words[g]|0))%c;return v},n.prototype.idivn=function(c){r(c<=67108863);for(var p=0,v=this.length-1;v>=0;v--){var g=(this.words[v]|0)+p*67108864;this.words[v]=g/c|0,p=g%c}return this.strip()},n.prototype.divn=function(c){return this.clone().idivn(c)},n.prototype.egcd=function(c){r(c.negative===0),r(!c.isZero());var p=this,v=c.clone();p.negative!==0?p=p.umod(c):p=p.clone();for(var g=new n(1),x=new n(0),S=new n(0),_=new n(1),l=0;p.isEven()&&v.isEven();)p.iushrn(1),v.iushrn(1),++l;for(var m=v.clone(),A=p.clone();!p.isZero();){for(var U=0,j=1;!(p.words[0]&j)&&U<26;++U,j<<=1);if(U>0)for(p.iushrn(U);U-- >0;)(g.isOdd()||x.isOdd())&&(g.iadd(m),x.isub(A)),g.iushrn(1),x.iushrn(1);for(var Z=0,se=1;!(v.words[0]&se)&&Z<26;++Z,se<<=1);if(Z>0)for(v.iushrn(Z);Z-- >0;)(S.isOdd()||_.isOdd())&&(S.iadd(m),_.isub(A)),S.iushrn(1),_.iushrn(1);p.cmp(v)>=0?(p.isub(v),g.isub(S),x.isub(_)):(v.isub(p),S.isub(g),_.isub(x))}return{a:S,b:_,gcd:v.iushln(l)}},n.prototype._invmp=function(c){r(c.negative===0),r(!c.isZero());var p=this,v=c.clone();p.negative!==0?p=p.umod(c):p=p.clone();for(var g=new n(1),x=new n(0),S=v.clone();p.cmpn(1)>0&&v.cmpn(1)>0;){for(var _=0,l=1;!(p.words[0]&l)&&_<26;++_,l<<=1);if(_>0)for(p.iushrn(_);_-- >0;)g.isOdd()&&g.iadd(S),g.iushrn(1);for(var m=0,A=1;!(v.words[0]&A)&&m<26;++m,A<<=1);if(m>0)for(v.iushrn(m);m-- >0;)x.isOdd()&&x.iadd(S),x.iushrn(1);p.cmp(v)>=0?(p.isub(v),g.isub(x)):(v.isub(p),x.isub(g))}var U;return p.cmpn(1)===0?U=g:U=x,U.cmpn(0)<0&&U.iadd(c),U},n.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var p=this.clone(),v=c.clone();p.negative=0,v.negative=0;for(var g=0;p.isEven()&&v.isEven();g++)p.iushrn(1),v.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;v.isEven();)v.iushrn(1);var x=p.cmp(v);if(x<0){var S=p;p=v,v=S}else if(x===0||v.cmpn(1)===0)break;p.isub(v)}while(!0);return v.iushln(g)},n.prototype.invm=function(c){return this.egcd(c).a.umod(c)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(c){return this.words[0]&c},n.prototype.bincn=function(c){r(typeof c=="number");var p=c%26,v=(c-p)/26,g=1<<p;if(this.length<=v)return this._expand(v+1),this.words[v]|=g,this;for(var x=g,S=v;x!==0&&S<this.length;S++){var _=this.words[S]|0;_+=x,x=_>>>26,_&=67108863,this.words[S]=_}return x!==0&&(this.words[S]=x,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(c){var p=c<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this.strip();var v;if(this.length>1)v=1;else{p&&(c=-c),r(c<=67108863,"Number is too big");var g=this.words[0]|0;v=g===c?0:g<c?-1:1}return this.negative!==0?-v|0:v},n.prototype.cmp=function(c){if(this.negative!==0&&c.negative===0)return-1;if(this.negative===0&&c.negative!==0)return 1;var p=this.ucmp(c);return this.negative!==0?-p|0:p},n.prototype.ucmp=function(c){if(this.length>c.length)return 1;if(this.length<c.length)return-1;for(var p=0,v=this.length-1;v>=0;v--){var g=this.words[v]|0,x=c.words[v]|0;if(g!==x){g<x?p=-1:g>x&&(p=1);break}}return p},n.prototype.gtn=function(c){return this.cmpn(c)===1},n.prototype.gt=function(c){return this.cmp(c)===1},n.prototype.gten=function(c){return this.cmpn(c)>=0},n.prototype.gte=function(c){return this.cmp(c)>=0},n.prototype.ltn=function(c){return this.cmpn(c)===-1},n.prototype.lt=function(c){return this.cmp(c)===-1},n.prototype.lten=function(c){return this.cmpn(c)<=0},n.prototype.lte=function(c){return this.cmp(c)<=0},n.prototype.eqn=function(c){return this.cmpn(c)===0},n.prototype.eq=function(c){return this.cmp(c)===0},n.red=function(c){return new O(c)},n.prototype.toRed=function(c){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),c.convertTo(this)._forceRed(c)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(c){return this.red=c,this},n.prototype.forceRed=function(c){return r(!this.red,"Already a number in reduction context"),this._forceRed(c)},n.prototype.redAdd=function(c){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,c)},n.prototype.redIAdd=function(c){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,c)},n.prototype.redSub=function(c){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,c)},n.prototype.redISub=function(c){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,c)},n.prototype.redShl=function(c){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,c)},n.prototype.redMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.mul(this,c)},n.prototype.redIMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.imul(this,c)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(c){return r(this.red&&!c.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,c)};var q={k256:null,p224:null,p192:null,p25519:null};function ee(f,c){this.name=f,this.p=new n(c,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}ee.prototype._tmp=function(){var c=new n(null);return c.words=new Array(Math.ceil(this.n/13)),c},ee.prototype.ireduce=function(c){var p=c,v;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),v=p.bitLength();while(v>this.n);var g=v<this.n?-1:p.ucmp(this.p);return g===0?(p.words[0]=0,p.length=1):g>0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},ee.prototype.split=function(c,p){c.iushrn(this.n,0,p)},ee.prototype.imulK=function(c){return c.imul(this.k)};function fe(){ee.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(fe,ee),fe.prototype.split=function(c,p){for(var v=4194303,g=Math.min(c.length,9),x=0;x<g;x++)p.words[x]=c.words[x];if(p.length=g,c.length<=9){c.words[0]=0,c.length=1;return}var S=c.words[9];for(p.words[p.length++]=S&v,x=10;x<c.length;x++){var _=c.words[x]|0;c.words[x-10]=(_&v)<<4|S>>>22,S=_}S>>>=22,c.words[x-10]=S,S===0&&c.length>10?c.length-=10:c.length-=9},fe.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var p=0,v=0;v<c.length;v++){var g=c.words[v]|0;p+=g*977,c.words[v]=p&67108863,p=g*64+(p/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function _e(){ee.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(_e,ee);function Te(){ee.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(Te,ee);function be(){ee.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(be,ee),be.prototype.imulK=function(c){for(var p=0,v=0;v<c.length;v++){var g=(c.words[v]|0)*19+p,x=g&67108863;g>>>=26,c.words[v]=x,p=g}return p!==0&&(c.words[c.length++]=p),c},n._prime=function(c){if(q[c])return q[c];var p;if(c==="k256")p=new fe;else if(c==="p224")p=new _e;else if(c==="p192")p=new Te;else if(c==="p25519")p=new be;else throw new Error("Unknown prime "+c);return q[c]=p,p};function O(f){if(typeof f=="string"){var c=n._prime(f);this.m=c.p,this.prime=c}else r(f.gtn(1),"modulus must be greater than 1"),this.m=f,this.prime=null}O.prototype._verify1=function(c){r(c.negative===0,"red works only with positives"),r(c.red,"red works only with red numbers")},O.prototype._verify2=function(c,p){r((c.negative|p.negative)===0,"red works only with positives"),r(c.red&&c.red===p.red,"red works only with red numbers")},O.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):c.umod(this.m)._forceRed(this)},O.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},O.prototype.add=function(c,p){this._verify2(c,p);var v=c.add(p);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},O.prototype.iadd=function(c,p){this._verify2(c,p);var v=c.iadd(p);return v.cmp(this.m)>=0&&v.isub(this.m),v},O.prototype.sub=function(c,p){this._verify2(c,p);var v=c.sub(p);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},O.prototype.isub=function(c,p){this._verify2(c,p);var v=c.isub(p);return v.cmpn(0)<0&&v.iadd(this.m),v},O.prototype.shl=function(c,p){return this._verify1(c),this.imod(c.ushln(p))},O.prototype.imul=function(c,p){return this._verify2(c,p),this.imod(c.imul(p))},O.prototype.mul=function(c,p){return this._verify2(c,p),this.imod(c.mul(p))},O.prototype.isqr=function(c){return this.imul(c,c.clone())},O.prototype.sqr=function(c){return this.mul(c,c)},O.prototype.sqrt=function(c){if(c.isZero())return c.clone();var p=this.m.andln(3);if(r(p%2===1),p===3){var v=this.m.add(new n(1)).iushrn(2);return this.pow(c,v)}for(var g=this.m.subn(1),x=0;!g.isZero()&&g.andln(1)===0;)x++,g.iushrn(1);r(!g.isZero());var S=new n(1).toRed(this),_=S.redNeg(),l=this.m.subn(1).iushrn(1),m=this.m.bitLength();for(m=new n(2*m*m).toRed(this);this.pow(m,l).cmp(_)!==0;)m.redIAdd(_);for(var A=this.pow(m,g),U=this.pow(c,g.addn(1).iushrn(1)),j=this.pow(c,g),Z=x;j.cmp(S)!==0;){for(var se=j,ae=0;se.cmp(S)!==0;ae++)se=se.redSqr();r(ae<Z);var he=this.pow(A,new n(1).iushln(Z-ae-1));U=U.redMul(he),A=he.redSqr(),j=j.redMul(A),Z=ae}return U},O.prototype.invm=function(c){var p=c._invmp(this.m);return p.negative!==0?(p.negative=0,this.imod(p).redNeg()):this.imod(p)},O.prototype.pow=function(c,p){if(p.isZero())return new n(1).toRed(this);if(p.cmpn(1)===0)return c.clone();var v=4,g=new Array(1<<v);g[0]=new n(1).toRed(this),g[1]=c;for(var x=2;x<g.length;x++)g[x]=this.mul(g[x-1],c);var S=g[0],_=0,l=0,m=p.bitLength()%26;for(m===0&&(m=26),x=p.length-1;x>=0;x--){for(var A=p.words[x],U=m-1;U>=0;U--){var j=A>>U&1;if(S!==g[0]&&(S=this.sqr(S)),j===0&&_===0){l=0;continue}_<<=1,_|=j,l++,!(l!==v&&(x!==0||U!==0))&&(S=this.mul(S,g[_]),l=0,_=0)}m=26}return S},O.prototype.convertTo=function(c){var p=c.umod(this.m);return p===c?p.clone():p},O.prototype.convertFrom=function(c){var p=c.clone();return p.red=null,p},n.mont=function(c){return new E(c)};function E(f){O.call(this,f),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(E,O),E.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},E.prototype.convertFrom=function(c){var p=this.imod(c.mul(this.rinv));return p.red=null,p},E.prototype.imul=function(c,p){if(c.isZero()||p.isZero())return c.words[0]=0,c.length=1,c;var v=c.imul(p),g=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=v.isub(g).iushrn(this.shift),S=x;return x.cmp(this.m)>=0?S=x.isub(this.m):x.cmpn(0)<0&&(S=x.iadd(this.m)),S._forceRed(this)},E.prototype.mul=function(c,p){if(c.isZero()||p.isZero())return new n(0)._forceRed(this);var v=c.mul(p),g=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=v.isub(g).iushrn(this.shift),S=x;return x.cmp(this.m)>=0?S=x.isub(this.m):x.cmpn(0)<0&&(S=x.iadd(this.m)),S._forceRed(this)},E.prototype.invm=function(c){var p=this.imod(c._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(typeof dm>"u"||dm,iy)});var Pa=W((bH,sy)=>{sy.exports=ny;function ny(e,t){if(!e)throw new Error(t||"Assertion failed")}ny.equal=function(t,r,i){if(t!=r)throw new Error(i||"Assertion failed: "+t+" != "+r)}});var mm=W(cy=>{"use strict";var qp=cy;function Z7(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e!="string"){for(var i=0;i<e.length;i++)r[i]=e[i]|0;return r}if(t==="hex"){e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e);for(var i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var i=0;i<e.length;i++){var n=e.charCodeAt(i),a=n>>8,u=n&255;a?r.push(a,u):r.push(u)}return r}qp.toArray=Z7;function ay(e){return e.length===1?"0"+e:e}qp.zero2=ay;function oy(e){for(var t="",r=0;r<e.length;r++)t+=ay(e[r].toString(16));return t}qp.toHex=oy;qp.encode=function(t,r){return r==="hex"?oy(t):t}});var Zi=W(uy=>{"use strict";var Dn=uy,J7=us(),Q7=Pa(),Fp=mm();Dn.assert=Q7;Dn.toArray=Fp.toArray;Dn.zero2=Fp.zero2;Dn.toHex=Fp.toHex;Dn.encode=Fp.encode;function e9(e,t,r){var i=new Array(Math.max(e.bitLength(),r)+1),n;for(n=0;n<i.length;n+=1)i[n]=0;var a=1<<t+1,u=e.clone();for(n=0;n<i.length;n++){var h,b=u.andln(a-1);u.isOdd()?(b>(a>>1)-1?h=(a>>1)-b:h=b,u.isubn(h)):h=0,i[n]=h,u.iushrn(1)}return i}Dn.getNAF=e9;function t9(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var i=0,n=0,a;e.cmpn(-i)>0||t.cmpn(-n)>0;){var u=e.andln(3)+i&3,h=t.andln(3)+n&3;u===3&&(u=-1),h===3&&(h=-1);var b;u&1?(a=e.andln(7)+i&7,(a===3||a===5)&&h===2?b=-u:b=u):b=0,r[0].push(b);var w;h&1?(a=t.andln(7)+n&7,(a===3||a===5)&&u===2?w=-h:w=h):w=0,r[1].push(w),2*i===b+1&&(i=1-i),2*n===w+1&&(n=1-n),e.iushrn(1),t.iushrn(1)}return r}Dn.getJSF=t9;function r9(e,t,r){var i="_"+t;e.prototype[t]=function(){return this[i]!==void 0?this[i]:this[i]=r.call(this)}}Dn.cachedProperty=r9;function i9(e){return typeof e=="string"?Dn.toArray(e,"hex"):e}Dn.parseBytes=i9;function n9(e){return new J7(e,"hex","le")}Dn.intFromLE=n9});var xm=W((yH,bm)=>{var vm;bm.exports=function(t){return vm||(vm=new Ba(null)),vm.generate(t)};function Ba(e){this.rand=e}bm.exports.Rand=Ba;Ba.prototype.generate=function(t){return this._rand(t)};Ba.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var r=new Uint8Array(t),i=0;i<r.length;i++)r[i]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?Ba.prototype._rand=function(t){var r=new Uint8Array(t);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?Ba.prototype._rand=function(t){var r=new Uint8Array(t);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(Ba.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(gm=require("crypto"),typeof gm.randomBytes!="function")throw new Error("Not supported");Ba.prototype._rand=function(t){return gm.randomBytes(t)}}catch{}var gm});var pf=W((wH,fy)=>{"use strict";var Io=us(),lf=Zi(),Hp=lf.getNAF,s9=lf.getJSF,zp=lf.assert;function Ma(e,t){this.type=e,this.p=new Io(t.p,16),this.red=t.prime?Io.red(t.prime):Io.mont(this.p),this.zero=new Io(0).toRed(this.red),this.one=new Io(1).toRed(this.red),this.two=new Io(2).toRed(this.red),this.n=t.n&&new Io(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}fy.exports=Ma;Ma.prototype.point=function(){throw new Error("Not implemented")};Ma.prototype.validate=function(){throw new Error("Not implemented")};Ma.prototype._fixedNafMul=function(t,r){zp(t.precomputed);var i=t._getDoubles(),n=Hp(r,1,this._bitLength),a=(1<<i.step+1)-(i.step%2===0?2:1);a/=3;var u=[],h,b;for(h=0;h<n.length;h+=i.step){b=0;for(var w=h+i.step-1;w>=h;w--)b=(b<<1)+n[w];u.push(b)}for(var T=this.jpoint(null,null,null),I=this.jpoint(null,null,null),B=a;B>0;B--){for(h=0;h<u.length;h++)b=u[h],b===B?I=I.mixedAdd(i.points[h]):b===-B&&(I=I.mixedAdd(i.points[h].neg()));T=T.add(I)}return T.toP()};Ma.prototype._wnafMul=function(t,r){var i=4,n=t._getNAFPoints(i);i=n.wnd;for(var a=n.points,u=Hp(r,i,this._bitLength),h=this.jpoint(null,null,null),b=u.length-1;b>=0;b--){for(var w=0;b>=0&&u[b]===0;b--)w++;if(b>=0&&w++,h=h.dblp(w),b<0)break;var T=u[b];zp(T!==0),t.type==="affine"?T>0?h=h.mixedAdd(a[T-1>>1]):h=h.mixedAdd(a[-T-1>>1].neg()):T>0?h=h.add(a[T-1>>1]):h=h.add(a[-T-1>>1].neg())}return t.type==="affine"?h.toP():h};Ma.prototype._wnafMulAdd=function(t,r,i,n,a){var u=this._wnafT1,h=this._wnafT2,b=this._wnafT3,w=0,T,I,B;for(T=0;T<n;T++){B=r[T];var M=B._getNAFPoints(t);u[T]=M.wnd,h[T]=M.points}for(T=n-1;T>=1;T-=2){var P=T-1,L=T;if(u[P]!==1||u[L]!==1){b[P]=Hp(i[P],u[P],this._bitLength),b[L]=Hp(i[L],u[L],this._bitLength),w=Math.max(b[P].length,w),w=Math.max(b[L].length,w);continue}var X=[r[P],null,null,r[L]];r[P].y.cmp(r[L].y)===0?(X[1]=r[P].add(r[L]),X[2]=r[P].toJ().mixedAdd(r[L].neg())):r[P].y.cmp(r[L].y.redNeg())===0?(X[1]=r[P].toJ().mixedAdd(r[L]),X[2]=r[P].add(r[L].neg())):(X[1]=r[P].toJ().mixedAdd(r[L]),X[2]=r[P].toJ().mixedAdd(r[L].neg()));var V=[-3,-1,-5,-7,0,7,5,1,3],q=s9(i[P],i[L]);for(w=Math.max(q[0].length,w),b[P]=new Array(w),b[L]=new Array(w),I=0;I<w;I++){var ee=q[0][I]|0,fe=q[1][I]|0;b[P][I]=V[(ee+1)*3+(fe+1)],b[L][I]=0,h[P]=X}}var _e=this.jpoint(null,null,null),Te=this._wnafT4;for(T=w;T>=0;T--){for(var be=0;T>=0;){var O=!0;for(I=0;I<n;I++)Te[I]=b[I][T]|0,Te[I]!==0&&(O=!1);if(!O)break;be++,T--}if(T>=0&&be++,_e=_e.dblp(be),T<0)break;for(I=0;I<n;I++){var E=Te[I];E!==0&&(E>0?B=h[I][E-1>>1]:E<0&&(B=h[I][-E-1>>1].neg()),B.type==="affine"?_e=_e.mixedAdd(B):_e=_e.add(B))}}for(T=0;T<n;T++)h[T]=null;return a?_e:_e.toP()};function mn(e,t){this.curve=e,this.type=t,this.precomputed=null}Ma.BasePoint=mn;mn.prototype.eq=function(){throw new Error("Not implemented")};mn.prototype.validate=function(){return this.curve.validate(this)};Ma.prototype.decodePoint=function(t,r){t=lf.toArray(t,r);var i=this.p.byteLength();if((t[0]===4||t[0]===6||t[0]===7)&&t.length-1===2*i){t[0]===6?zp(t[t.length-1]%2===0):t[0]===7&&zp(t[t.length-1]%2===1);var n=this.point(t.slice(1,1+i),t.slice(1+i,1+2*i));return n}else if((t[0]===2||t[0]===3)&&t.length-1===i)return this.pointFromX(t.slice(1,1+i),t[0]===3);throw new Error("Unknown point format")};mn.prototype.encodeCompressed=function(t){return this.encode(t,!0)};mn.prototype._encode=function(t){var r=this.curve.p.byteLength(),i=this.getX().toArray("be",r);return t?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",r))};mn.prototype.encode=function(t,r){return lf.encode(this._encode(r),t)};mn.prototype.precompute=function(t){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,t),r.beta=this._getBeta(),this.precomputed=r,this};mn.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((t.bitLength()+1)/r.step):!1};mn.prototype._getDoubles=function(t,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],n=this,a=0;a<r;a+=t){for(var u=0;u<t;u++)n=n.dbl();i.push(n)}return{step:t,points:i}};mn.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],i=(1<<t)-1,n=i===1?null:this.dbl(),a=1;a<i;a++)r[a]=r[a-1].add(n);return{wnd:t,points:r}};mn.prototype._getBeta=function(){return null};mn.prototype.dblp=function(t){for(var r=this,i=0;i<t;i++)r=r.dbl();return r}});var ly=W((SH,_m)=>{typeof Object.create=="function"?_m.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:_m.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var hf=W((EH,wm)=>{try{if(ym=require("util"),typeof ym.inherits!="function")throw"";wm.exports=ym.inherits}catch{wm.exports=ly()}var ym});var hy=W((TH,py)=>{"use strict";var a9=Zi(),yr=us(),Sm=hf(),Dc=pf(),o9=a9.assert;function vn(e){Dc.call(this,"short",e),this.a=new yr(e.a,16).toRed(this.red),this.b=new yr(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Sm(vn,Dc);py.exports=vn;vn.prototype._getEndomorphism=function(t){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,i;if(t.beta)r=new yr(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);r=n[0].cmp(n[1])<0?n[0]:n[1],r=r.toRed(this.red)}if(t.lambda)i=new yr(t.lambda,16);else{var a=this._getEndoRoots(this.n);this.g.mul(a[0]).x.cmp(this.g.x.redMul(r))===0?i=a[0]:(i=a[1],o9(this.g.mul(i).x.cmp(this.g.x.redMul(r))===0))}var u;return t.basis?u=t.basis.map(function(h){return{a:new yr(h.a,16),b:new yr(h.b,16)}}):u=this._getEndoBasis(i),{beta:r,lambda:i,basis:u}}};vn.prototype._getEndoRoots=function(t){var r=t===this.p?this.red:yr.mont(t),i=new yr(2).toRed(r).redInvm(),n=i.redNeg(),a=new yr(3).toRed(r).redNeg().redSqrt().redMul(i),u=n.redAdd(a).fromRed(),h=n.redSub(a).fromRed();return[u,h]};vn.prototype._getEndoBasis=function(t){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),i=t,n=this.n.clone(),a=new yr(1),u=new yr(0),h=new yr(0),b=new yr(1),w,T,I,B,M,P,L,X=0,V,q;i.cmpn(0)!==0;){var ee=n.div(i);V=n.sub(ee.mul(i)),q=h.sub(ee.mul(a));var fe=b.sub(ee.mul(u));if(!I&&V.cmp(r)<0)w=L.neg(),T=a,I=V.neg(),B=q;else if(I&&++X===2)break;L=V,n=i,i=V,h=a,a=q,b=u,u=fe}M=V.neg(),P=q;var _e=I.sqr().add(B.sqr()),Te=M.sqr().add(P.sqr());return Te.cmp(_e)>=0&&(M=w,P=T),I.negative&&(I=I.neg(),B=B.neg()),M.negative&&(M=M.neg(),P=P.neg()),[{a:I,b:B},{a:M,b:P}]};vn.prototype._endoSplit=function(t){var r=this.endo.basis,i=r[0],n=r[1],a=n.b.mul(t).divRound(this.n),u=i.b.neg().mul(t).divRound(this.n),h=a.mul(i.a),b=u.mul(n.a),w=a.mul(i.b),T=u.mul(n.b),I=t.sub(h).sub(b),B=w.add(T).neg();return{k1:I,k2:B}};vn.prototype.pointFromX=function(t,r){t=new yr(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=i.redSqrt();if(n.redSqr().redSub(i).cmp(this.zero)!==0)throw new Error("invalid point");var a=n.fromRed().isOdd();return(r&&!a||!r&&a)&&(n=n.redNeg()),this.point(t,n)};vn.prototype.validate=function(t){if(t.inf)return!0;var r=t.x,i=t.y,n=this.a.redMul(r),a=r.redSqr().redMul(r).redIAdd(n).redIAdd(this.b);return i.redSqr().redISub(a).cmpn(0)===0};vn.prototype._endoWnafMulAdd=function(t,r,i){for(var n=this._endoWnafT1,a=this._endoWnafT2,u=0;u<t.length;u++){var h=this._endoSplit(r[u]),b=t[u],w=b._getBeta();h.k1.negative&&(h.k1.ineg(),b=b.neg(!0)),h.k2.negative&&(h.k2.ineg(),w=w.neg(!0)),n[u*2]=b,n[u*2+1]=w,a[u*2]=h.k1,a[u*2+1]=h.k2}for(var T=this._wnafMulAdd(1,n,a,u*2,i),I=0;I<u*2;I++)n[I]=null,a[I]=null;return T};function Jr(e,t,r,i){Dc.BasePoint.call(this,e,"affine"),t===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new yr(t,16),this.y=new yr(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}Sm(Jr,Dc.BasePoint);vn.prototype.point=function(t,r,i){return new Jr(this,t,r,i)};vn.prototype.pointFromJSON=function(t,r){return Jr.fromJSON(this,t,r)};Jr.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var i=this.curve,n=function(a){return i.point(a.x.redMul(i.endo.beta),a.y)};t.beta=r,r.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return r}};Jr.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};Jr.fromJSON=function(t,r,i){typeof r=="string"&&(r=JSON.parse(r));var n=t.point(r[0],r[1],i);if(!r[2])return n;function a(h){return t.point(h[0],h[1],i)}var u=r[2];return n.precomputed={beta:null,doubles:u.doubles&&{step:u.doubles.step,points:[n].concat(u.doubles.points.map(a))},naf:u.naf&&{wnd:u.naf.wnd,points:[n].concat(u.naf.points.map(a))}},n};Jr.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};Jr.prototype.isInfinity=function(){return this.inf};Jr.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var r=this.y.redSub(t.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(t.x).redInvm()));var i=r.redSqr().redISub(this.x).redISub(t.x),n=r.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,n)};Jr.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,i=this.x.redSqr(),n=t.redInvm(),a=i.redAdd(i).redIAdd(i).redIAdd(r).redMul(n),u=a.redSqr().redISub(this.x.redAdd(this.x)),h=a.redMul(this.x.redSub(u)).redISub(this.y);return this.curve.point(u,h)};Jr.prototype.getX=function(){return this.x.fromRed()};Jr.prototype.getY=function(){return this.y.fromRed()};Jr.prototype.mul=function(t){return t=new yr(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)};Jr.prototype.mulAdd=function(t,r,i){var n=[this,r],a=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,a):this.curve._wnafMulAdd(1,n,a,2)};Jr.prototype.jmulAdd=function(t,r,i){var n=[this,r],a=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,a,!0):this.curve._wnafMulAdd(1,n,a,2,!0)};Jr.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)};Jr.prototype.neg=function(t){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var i=this.precomputed,n=function(a){return a.neg()};r.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(n)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(n)}}}return r};Jr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t};function ni(e,t,r,i){Dc.BasePoint.call(this,e,"jacobian"),t===null&&r===null&&i===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new yr(0)):(this.x=new yr(t,16),this.y=new yr(r,16),this.z=new yr(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Sm(ni,Dc.BasePoint);vn.prototype.jpoint=function(t,r,i){return new ni(this,t,r,i)};ni.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),r=t.redSqr(),i=this.x.redMul(r),n=this.y.redMul(r).redMul(t);return this.curve.point(i,n)};ni.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};ni.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var r=t.z.redSqr(),i=this.z.redSqr(),n=this.x.redMul(r),a=t.x.redMul(i),u=this.y.redMul(r.redMul(t.z)),h=t.y.redMul(i.redMul(this.z)),b=n.redSub(a),w=u.redSub(h);if(b.cmpn(0)===0)return w.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var T=b.redSqr(),I=T.redMul(b),B=n.redMul(T),M=w.redSqr().redIAdd(I).redISub(B).redISub(B),P=w.redMul(B.redISub(M)).redISub(u.redMul(I)),L=this.z.redMul(t.z).redMul(b);return this.curve.jpoint(M,P,L)};ni.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var r=this.z.redSqr(),i=this.x,n=t.x.redMul(r),a=this.y,u=t.y.redMul(r).redMul(this.z),h=i.redSub(n),b=a.redSub(u);if(h.cmpn(0)===0)return b.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var w=h.redSqr(),T=w.redMul(h),I=i.redMul(w),B=b.redSqr().redIAdd(T).redISub(I).redISub(I),M=b.redMul(I.redISub(B)).redISub(a.redMul(T)),P=this.z.redMul(h);return this.curve.jpoint(B,M,P)};ni.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var i=this;for(r=0;r<t;r++)i=i.dbl();return i}var n=this.curve.a,a=this.curve.tinv,u=this.x,h=this.y,b=this.z,w=b.redSqr().redSqr(),T=h.redAdd(h);for(r=0;r<t;r++){var I=u.redSqr(),B=T.redSqr(),M=B.redSqr(),P=I.redAdd(I).redIAdd(I).redIAdd(n.redMul(w)),L=u.redMul(B),X=P.redSqr().redISub(L.redAdd(L)),V=L.redISub(X),q=P.redMul(V);q=q.redIAdd(q).redISub(M);var ee=T.redMul(b);r+1<t&&(w=w.redMul(M)),u=X,b=ee,T=q}return this.curve.jpoint(u,T.redMul(a),b)};ni.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};ni.prototype._zeroDbl=function(){var t,r,i;if(this.zOne){var n=this.x.redSqr(),a=this.y.redSqr(),u=a.redSqr(),h=this.x.redAdd(a).redSqr().redISub(n).redISub(u);h=h.redIAdd(h);var b=n.redAdd(n).redIAdd(n),w=b.redSqr().redISub(h).redISub(h),T=u.redIAdd(u);T=T.redIAdd(T),T=T.redIAdd(T),t=w,r=b.redMul(h.redISub(w)).redISub(T),i=this.y.redAdd(this.y)}else{var I=this.x.redSqr(),B=this.y.redSqr(),M=B.redSqr(),P=this.x.redAdd(B).redSqr().redISub(I).redISub(M);P=P.redIAdd(P);var L=I.redAdd(I).redIAdd(I),X=L.redSqr(),V=M.redIAdd(M);V=V.redIAdd(V),V=V.redIAdd(V),t=X.redISub(P).redISub(P),r=L.redMul(P.redISub(t)).redISub(V),i=this.y.redMul(this.z),i=i.redIAdd(i)}return this.curve.jpoint(t,r,i)};ni.prototype._threeDbl=function(){var t,r,i;if(this.zOne){var n=this.x.redSqr(),a=this.y.redSqr(),u=a.redSqr(),h=this.x.redAdd(a).redSqr().redISub(n).redISub(u);h=h.redIAdd(h);var b=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),w=b.redSqr().redISub(h).redISub(h);t=w;var T=u.redIAdd(u);T=T.redIAdd(T),T=T.redIAdd(T),r=b.redMul(h.redISub(w)).redISub(T),i=this.y.redAdd(this.y)}else{var I=this.z.redSqr(),B=this.y.redSqr(),M=this.x.redMul(B),P=this.x.redSub(I).redMul(this.x.redAdd(I));P=P.redAdd(P).redIAdd(P);var L=M.redIAdd(M);L=L.redIAdd(L);var X=L.redAdd(L);t=P.redSqr().redISub(X),i=this.y.redAdd(this.z).redSqr().redISub(B).redISub(I);var V=B.redSqr();V=V.redIAdd(V),V=V.redIAdd(V),V=V.redIAdd(V),r=P.redMul(L.redISub(t)).redISub(V)}return this.curve.jpoint(t,r,i)};ni.prototype._dbl=function(){var t=this.curve.a,r=this.x,i=this.y,n=this.z,a=n.redSqr().redSqr(),u=r.redSqr(),h=i.redSqr(),b=u.redAdd(u).redIAdd(u).redIAdd(t.redMul(a)),w=r.redAdd(r);w=w.redIAdd(w);var T=w.redMul(h),I=b.redSqr().redISub(T.redAdd(T)),B=T.redISub(I),M=h.redSqr();M=M.redIAdd(M),M=M.redIAdd(M),M=M.redIAdd(M);var P=b.redMul(B).redISub(M),L=i.redAdd(i).redMul(n);return this.curve.jpoint(I,P,L)};ni.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr(),n=r.redSqr(),a=t.redAdd(t).redIAdd(t),u=a.redSqr(),h=this.x.redAdd(r).redSqr().redISub(t).redISub(n);h=h.redIAdd(h),h=h.redAdd(h).redIAdd(h),h=h.redISub(u);var b=h.redSqr(),w=n.redIAdd(n);w=w.redIAdd(w),w=w.redIAdd(w),w=w.redIAdd(w);var T=a.redIAdd(h).redSqr().redISub(u).redISub(b).redISub(w),I=r.redMul(T);I=I.redIAdd(I),I=I.redIAdd(I);var B=this.x.redMul(b).redISub(I);B=B.redIAdd(B),B=B.redIAdd(B);var M=this.y.redMul(T.redMul(w.redISub(T)).redISub(h.redMul(b)));M=M.redIAdd(M),M=M.redIAdd(M),M=M.redIAdd(M);var P=this.z.redAdd(h).redSqr().redISub(i).redISub(b);return this.curve.jpoint(B,M,P)};ni.prototype.mul=function(t,r){return t=new yr(t,r),this.curve._wnafMul(this,t)};ni.prototype.eq=function(t){if(t.type==="affine")return this.eq(t.toJ());if(this===t)return!0;var r=this.z.redSqr(),i=t.z.redSqr();if(this.x.redMul(i).redISub(t.x.redMul(r)).cmpn(0)!==0)return!1;var n=r.redMul(this.z),a=i.redMul(t.z);return this.y.redMul(a).redISub(t.y.redMul(n)).cmpn(0)===0};ni.prototype.eqXToP=function(t){var r=this.z.redSqr(),i=t.toRed(this.curve.red).redMul(r);if(this.x.cmp(i)===0)return!0;for(var n=t.clone(),a=this.curve.redN.redMul(r);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(a),this.x.cmp(i)===0)return!0}};ni.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};ni.prototype.isInfinity=function(){return this.z.cmpn(0)===0}});var vy=W((IH,my)=>{"use strict";var Uc=us(),dy=hf(),jp=pf(),c9=Zi();function qc(e){jp.call(this,"mont",e),this.a=new Uc(e.a,16).toRed(this.red),this.b=new Uc(e.b,16).toRed(this.red),this.i4=new Uc(4).toRed(this.red).redInvm(),this.two=new Uc(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}dy(qc,jp);my.exports=qc;qc.prototype.validate=function(t){var r=t.normalize().x,i=r.redSqr(),n=i.redMul(r).redAdd(i.redMul(this.a)).redAdd(r),a=n.redSqrt();return a.redSqr().cmp(n)===0};function Qr(e,t,r){jp.BasePoint.call(this,e,"projective"),t===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Uc(t,16),this.z=new Uc(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}dy(Qr,jp.BasePoint);qc.prototype.decodePoint=function(t,r){return this.point(c9.toArray(t,r),1)};qc.prototype.point=function(t,r){return new Qr(this,t,r)};qc.prototype.pointFromJSON=function(t){return Qr.fromJSON(this,t)};Qr.prototype.precompute=function(){};Qr.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Qr.fromJSON=function(t,r){return new Qr(t,r[0],r[1]||t.one)};Qr.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Qr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Qr.prototype.dbl=function(){var t=this.x.redAdd(this.z),r=t.redSqr(),i=this.x.redSub(this.z),n=i.redSqr(),a=r.redSub(n),u=r.redMul(n),h=a.redMul(n.redAdd(this.curve.a24.redMul(a)));return this.curve.point(u,h)};Qr.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Qr.prototype.diffAdd=function(t,r){var i=this.x.redAdd(this.z),n=this.x.redSub(this.z),a=t.x.redAdd(t.z),u=t.x.redSub(t.z),h=u.redMul(i),b=a.redMul(n),w=r.z.redMul(h.redAdd(b).redSqr()),T=r.x.redMul(h.redISub(b).redSqr());return this.curve.point(w,T)};Qr.prototype.mul=function(t){for(var r=t.clone(),i=this,n=this.curve.point(null,null),a=this,u=[];r.cmpn(0)!==0;r.iushrn(1))u.push(r.andln(1));for(var h=u.length-1;h>=0;h--)u[h]===0?(i=i.diffAdd(n,a),n=n.dbl()):(n=i.diffAdd(n,a),i=i.dbl());return n};Qr.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Qr.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Qr.prototype.eq=function(t){return this.getX().cmp(t.getX())===0};Qr.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Qr.prototype.getX=function(){return this.normalize(),this.x.fromRed()}});var xy=W((RH,by)=>{"use strict";var u9=Zi(),Xs=us(),gy=hf(),Vp=pf(),f9=u9.assert;function fs(e){this.twisted=(e.a|0)!==1,this.mOneA=this.twisted&&(e.a|0)===-1,this.extended=this.mOneA,Vp.call(this,"edwards",e),this.a=new Xs(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Xs(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Xs(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),f9(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(e.c|0)===1}gy(fs,Vp);by.exports=fs;fs.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)};fs.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)};fs.prototype.jpoint=function(t,r,i,n){return this.point(t,r,i,n)};fs.prototype.pointFromX=function(t,r){t=new Xs(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr(),n=this.c2.redSub(this.a.redMul(i)),a=this.one.redSub(this.c2.redMul(this.d).redMul(i)),u=n.redMul(a.redInvm()),h=u.redSqrt();if(h.redSqr().redSub(u).cmp(this.zero)!==0)throw new Error("invalid point");var b=h.fromRed().isOdd();return(r&&!b||!r&&b)&&(h=h.redNeg()),this.point(t,h)};fs.prototype.pointFromY=function(t,r){t=new Xs(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr(),n=i.redSub(this.c2),a=i.redMul(this.d).redMul(this.c2).redSub(this.a),u=n.redMul(a.redInvm());if(u.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,t)}var h=u.redSqrt();if(h.redSqr().redSub(u).cmp(this.zero)!==0)throw new Error("invalid point");return h.fromRed().isOdd()!==r&&(h=h.redNeg()),this.point(h,t)};fs.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var r=t.x.redSqr(),i=t.y.redSqr(),n=r.redMul(this.a).redAdd(i),a=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(i)));return n.cmp(a)===0};function Zt(e,t,r,i,n){Vp.BasePoint.call(this,e,"projective"),t===null&&r===null&&i===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Xs(t,16),this.y=new Xs(r,16),this.z=i?new Xs(i,16):this.curve.one,this.t=n&&new Xs(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}gy(Zt,Vp.BasePoint);fs.prototype.pointFromJSON=function(t){return Zt.fromJSON(this,t)};fs.prototype.point=function(t,r,i,n){return new Zt(this,t,r,i,n)};Zt.fromJSON=function(t,r){return new Zt(t,r[0],r[1],r[2])};Zt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Zt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Zt.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var n=this.curve._mulA(t),a=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),u=n.redAdd(r),h=u.redSub(i),b=n.redSub(r),w=a.redMul(h),T=u.redMul(b),I=a.redMul(b),B=h.redMul(u);return this.curve.point(w,T,B,I)};Zt.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),i=this.y.redSqr(),n,a,u,h,b,w;if(this.curve.twisted){h=this.curve._mulA(r);var T=h.redAdd(i);this.zOne?(n=t.redSub(r).redSub(i).redMul(T.redSub(this.curve.two)),a=T.redMul(h.redSub(i)),u=T.redSqr().redSub(T).redSub(T)):(b=this.z.redSqr(),w=T.redSub(b).redISub(b),n=t.redSub(r).redISub(i).redMul(w),a=T.redMul(h.redSub(i)),u=T.redMul(w))}else h=r.redAdd(i),b=this.curve._mulC(this.z).redSqr(),w=h.redSub(b).redSub(b),n=this.curve._mulC(t.redISub(h)).redMul(w),a=this.curve._mulC(h).redMul(r.redISub(i)),u=h.redMul(w);return this.curve.point(n,a,u)};Zt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Zt.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),i=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),a=this.z.redMul(t.z.redAdd(t.z)),u=i.redSub(r),h=a.redSub(n),b=a.redAdd(n),w=i.redAdd(r),T=u.redMul(h),I=b.redMul(w),B=u.redMul(w),M=h.redMul(b);return this.curve.point(T,I,M,B)};Zt.prototype._projAdd=function(t){var r=this.z.redMul(t.z),i=r.redSqr(),n=this.x.redMul(t.x),a=this.y.redMul(t.y),u=this.curve.d.redMul(n).redMul(a),h=i.redSub(u),b=i.redAdd(u),w=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(n).redISub(a),T=r.redMul(h).redMul(w),I,B;return this.curve.twisted?(I=r.redMul(b).redMul(a.redSub(this.curve._mulA(n))),B=h.redMul(b)):(I=r.redMul(b).redMul(a.redSub(n)),B=this.curve._mulC(h).redMul(b)),this.curve.point(T,I,B)};Zt.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)};Zt.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)};Zt.prototype.mulAdd=function(t,r,i){return this.curve._wnafMulAdd(1,[this,r],[t,i],2,!1)};Zt.prototype.jmulAdd=function(t,r,i){return this.curve._wnafMulAdd(1,[this,r],[t,i],2,!0)};Zt.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this};Zt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Zt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Zt.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Zt.prototype.eq=function(t){return this===t||this.getX().cmp(t.getX())===0&&this.getY().cmp(t.getY())===0};Zt.prototype.eqXToP=function(t){var r=t.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var i=t.clone(),n=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),this.x.cmp(r)===0)return!0}};Zt.prototype.toP=Zt.prototype.normalize;Zt.prototype.mixedAdd=Zt.prototype.add});var Em=W(_y=>{"use strict";var Kp=_y;Kp.base=pf();Kp.short=hy();Kp.mont=vy();Kp.edwards=xy()});var Un=W(Kt=>{"use strict";var l9=Pa(),p9=hf();Kt.inherits=p9;function h9(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function d9(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var i=0,n=0;n<e.length;n++){var a=e.charCodeAt(n);a<128?r[i++]=a:a<2048?(r[i++]=a>>6|192,r[i++]=a&63|128):h9(e,n)?(a=65536+((a&1023)<<10)+(e.charCodeAt(++n)&1023),r[i++]=a>>18|240,r[i++]=a>>12&63|128,r[i++]=a>>6&63|128,r[i++]=a&63|128):(r[i++]=a>>12|224,r[i++]=a>>6&63|128,r[i++]=a&63|128)}else for(n=0;n<e.length;n++)r[n]=e[n]|0;return r}Kt.toArray=d9;function m9(e){for(var t="",r=0;r<e.length;r++)t+=wy(e[r].toString(16));return t}Kt.toHex=m9;function yy(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}Kt.htonl=yy;function v9(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];t==="little"&&(n=yy(n)),r+=Sy(n.toString(16))}return r}Kt.toHex32=v9;function wy(e){return e.length===1?"0"+e:e}Kt.zero2=wy;function Sy(e){return e.length===7?"0"+e:e.length===6?"00"+e:e.length===5?"000"+e:e.length===4?"0000"+e:e.length===3?"00000"+e:e.length===2?"000000"+e:e.length===1?"0000000"+e:e}Kt.zero8=Sy;function g9(e,t,r,i){var n=r-t;l9(n%4===0);for(var a=new Array(n/4),u=0,h=t;u<a.length;u++,h+=4){var b;i==="big"?b=e[h]<<24|e[h+1]<<16|e[h+2]<<8|e[h+3]:b=e[h+3]<<24|e[h+2]<<16|e[h+1]<<8|e[h],a[u]=b>>>0}return a}Kt.join32=g9;function b9(e,t){for(var r=new Array(e.length*4),i=0,n=0;i<e.length;i++,n+=4){var a=e[i];t==="big"?(r[n]=a>>>24,r[n+1]=a>>>16&255,r[n+2]=a>>>8&255,r[n+3]=a&255):(r[n+3]=a>>>24,r[n+2]=a>>>16&255,r[n+1]=a>>>8&255,r[n]=a&255)}return r}Kt.split32=b9;function x9(e,t){return e>>>t|e<<32-t}Kt.rotr32=x9;function _9(e,t){return e<<t|e>>>32-t}Kt.rotl32=_9;function y9(e,t){return e+t>>>0}Kt.sum32=y9;function w9(e,t,r){return e+t+r>>>0}Kt.sum32_3=w9;function S9(e,t,r,i){return e+t+r+i>>>0}Kt.sum32_4=S9;function E9(e,t,r,i,n){return e+t+r+i+n>>>0}Kt.sum32_5=E9;function T9(e,t,r,i){var n=e[t],a=e[t+1],u=i+a>>>0,h=(u<i?1:0)+r+n;e[t]=h>>>0,e[t+1]=u}Kt.sum64=T9;function I9(e,t,r,i){var n=t+i>>>0,a=(n<t?1:0)+e+r;return a>>>0}Kt.sum64_hi=I9;function R9(e,t,r,i){var n=t+i;return n>>>0}Kt.sum64_lo=R9;function A9(e,t,r,i,n,a,u,h){var b=0,w=t;w=w+i>>>0,b+=w<t?1:0,w=w+a>>>0,b+=w<a?1:0,w=w+h>>>0,b+=w<h?1:0;var T=e+r+n+u+b;return T>>>0}Kt.sum64_4_hi=A9;function O9(e,t,r,i,n,a,u,h){var b=t+i+a+h;return b>>>0}Kt.sum64_4_lo=O9;function k9(e,t,r,i,n,a,u,h,b,w){var T=0,I=t;I=I+i>>>0,T+=I<t?1:0,I=I+a>>>0,T+=I<a?1:0,I=I+h>>>0,T+=I<h?1:0,I=I+w>>>0,T+=I<w?1:0;var B=e+r+n+u+b+T;return B>>>0}Kt.sum64_5_hi=k9;function N9(e,t,r,i,n,a,u,h,b,w){var T=t+i+a+h+w;return T>>>0}Kt.sum64_5_lo=N9;function P9(e,t,r){var i=t<<32-r|e>>>r;return i>>>0}Kt.rotr64_hi=P9;function B9(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Kt.rotr64_lo=B9;function M9(e,t,r){return e>>>r}Kt.shr64_hi=M9;function C9(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Kt.shr64_lo=C9});var Fc=W(Ty=>{"use strict";var Ey=Un(),L9=Pa();function Wp(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Ty.BlockHash=Wp;Wp.prototype.update=function(t,r){if(t=Ey.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var i=t.length%this._delta8;this.pending=t.slice(t.length-i,t.length),this.pending.length===0&&(this.pending=null),t=Ey.join32(t,0,t.length-i,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this};Wp.prototype.digest=function(t){return this.update(this._pad()),L9(this.pending===null),this._digest(t)};Wp.prototype._pad=function(){var t=this.pendingTotal,r=this._delta8,i=r-(t+this.padLength)%r,n=new Array(i+this.padLength);n[0]=128;for(var a=1;a<i;a++)n[a]=0;if(t<<=3,this.endian==="big"){for(var u=8;u<this.padLength;u++)n[a++]=0;n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=t>>>24&255,n[a++]=t>>>16&255,n[a++]=t>>>8&255,n[a++]=t&255}else for(n[a++]=t&255,n[a++]=t>>>8&255,n[a++]=t>>>16&255,n[a++]=t>>>24&255,n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=0,u=8;u<this.padLength;u++)n[a++]=0;return n}});var Tm=W(Ys=>{"use strict";var D9=Un(),ls=D9.rotr32;function U9(e,t,r,i){if(e===0)return Iy(t,r,i);if(e===1||e===3)return Ay(t,r,i);if(e===2)return Ry(t,r,i)}Ys.ft_1=U9;function Iy(e,t,r){return e&t^~e&r}Ys.ch32=Iy;function Ry(e,t,r){return e&t^e&r^t&r}Ys.maj32=Ry;function Ay(e,t,r){return e^t^r}Ys.p32=Ay;function q9(e){return ls(e,2)^ls(e,13)^ls(e,22)}Ys.s0_256=q9;function F9(e){return ls(e,6)^ls(e,11)^ls(e,25)}Ys.s1_256=F9;function H9(e){return ls(e,7)^ls(e,18)^e>>>3}Ys.g0_256=H9;function z9(e){return ls(e,17)^ls(e,19)^e>>>10}Ys.g1_256=z9});var Ny=W((PH,ky)=>{"use strict";var Hc=Un(),j9=Fc(),V9=Tm(),Im=Hc.rotl32,df=Hc.sum32,K9=Hc.sum32_5,W9=V9.ft_1,Oy=j9.BlockHash,G9=[1518500249,1859775393,2400959708,3395469782];function ps(){if(!(this instanceof ps))return new ps;Oy.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Hc.inherits(ps,Oy);ky.exports=ps;ps.blockSize=512;ps.outSize=160;ps.hmacStrength=80;ps.padLength=64;ps.prototype._update=function(t,r){for(var i=this.W,n=0;n<16;n++)i[n]=t[r+n];for(;n<i.length;n++)i[n]=Im(i[n-3]^i[n-8]^i[n-14]^i[n-16],1);var a=this.h[0],u=this.h[1],h=this.h[2],b=this.h[3],w=this.h[4];for(n=0;n<i.length;n++){var T=~~(n/20),I=K9(Im(a,5),W9(T,u,h,b),w,i[n],G9[T]);w=b,b=h,h=Im(u,30),u=a,a=I}this.h[0]=df(this.h[0],a),this.h[1]=df(this.h[1],u),this.h[2]=df(this.h[2],h),this.h[3]=df(this.h[3],b),this.h[4]=df(this.h[4],w)};ps.prototype._digest=function(t){return t==="hex"?Hc.toHex32(this.h,"big"):Hc.split32(this.h,"big")}});var Rm=W((BH,By)=>{"use strict";var zc=Un(),$9=Fc(),jc=Tm(),X9=Pa(),qn=zc.sum32,Y9=zc.sum32_4,Z9=zc.sum32_5,J9=jc.ch32,Q9=jc.maj32,ek=jc.s0_256,tk=jc.s1_256,rk=jc.g0_256,ik=jc.g1_256,Py=$9.BlockHash,nk=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function hs(){if(!(this instanceof hs))return new hs;Py.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=nk,this.W=new Array(64)}zc.inherits(hs,Py);By.exports=hs;hs.blockSize=512;hs.outSize=256;hs.hmacStrength=192;hs.padLength=64;hs.prototype._update=function(t,r){for(var i=this.W,n=0;n<16;n++)i[n]=t[r+n];for(;n<i.length;n++)i[n]=Y9(ik(i[n-2]),i[n-7],rk(i[n-15]),i[n-16]);var a=this.h[0],u=this.h[1],h=this.h[2],b=this.h[3],w=this.h[4],T=this.h[5],I=this.h[6],B=this.h[7];for(X9(this.k.length===i.length),n=0;n<i.length;n++){var M=Z9(B,tk(w),J9(w,T,I),this.k[n],i[n]),P=qn(ek(a),Q9(a,u,h));B=I,I=T,T=w,w=qn(b,M),b=h,h=u,u=a,a=qn(M,P)}this.h[0]=qn(this.h[0],a),this.h[1]=qn(this.h[1],u),this.h[2]=qn(this.h[2],h),this.h[3]=qn(this.h[3],b),this.h[4]=qn(this.h[4],w),this.h[5]=qn(this.h[5],T),this.h[6]=qn(this.h[6],I),this.h[7]=qn(this.h[7],B)};hs.prototype._digest=function(t){return t==="hex"?zc.toHex32(this.h,"big"):zc.split32(this.h,"big")}});var Ly=W((MH,Cy)=>{"use strict";var Am=Un(),My=Rm();function Zs(){if(!(this instanceof Zs))return new Zs;My.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Am.inherits(Zs,My);Cy.exports=Zs;Zs.blockSize=512;Zs.outSize=224;Zs.hmacStrength=192;Zs.padLength=64;Zs.prototype._digest=function(t){return t==="hex"?Am.toHex32(this.h.slice(0,7),"big"):Am.split32(this.h.slice(0,7),"big")}});var Nm=W((CH,Fy)=>{"use strict";var Oi=Un(),sk=Fc(),ak=Pa(),ds=Oi.rotr64_hi,ms=Oi.rotr64_lo,Dy=Oi.shr64_hi,Uy=Oi.shr64_lo,Ca=Oi.sum64,Om=Oi.sum64_hi,km=Oi.sum64_lo,ok=Oi.sum64_4_hi,ck=Oi.sum64_4_lo,uk=Oi.sum64_5_hi,fk=Oi.sum64_5_lo,qy=sk.BlockHash,lk=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Fn(){if(!(this instanceof Fn))return new Fn;qy.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=lk,this.W=new Array(160)}Oi.inherits(Fn,qy);Fy.exports=Fn;Fn.blockSize=1024;Fn.outSize=512;Fn.hmacStrength=192;Fn.padLength=128;Fn.prototype._prepareBlock=function(t,r){for(var i=this.W,n=0;n<32;n++)i[n]=t[r+n];for(;n<i.length;n+=2){var a=wk(i[n-4],i[n-3]),u=Sk(i[n-4],i[n-3]),h=i[n-14],b=i[n-13],w=_k(i[n-30],i[n-29]),T=yk(i[n-30],i[n-29]),I=i[n-32],B=i[n-31];i[n]=ok(a,u,h,b,w,T,I,B),i[n+1]=ck(a,u,h,b,w,T,I,B)}};Fn.prototype._update=function(t,r){this._prepareBlock(t,r);var i=this.W,n=this.h[0],a=this.h[1],u=this.h[2],h=this.h[3],b=this.h[4],w=this.h[5],T=this.h[6],I=this.h[7],B=this.h[8],M=this.h[9],P=this.h[10],L=this.h[11],X=this.h[12],V=this.h[13],q=this.h[14],ee=this.h[15];ak(this.k.length===i.length);for(var fe=0;fe<i.length;fe+=2){var _e=q,Te=ee,be=bk(B,M),O=xk(B,M),E=pk(B,M,P,L,X,V),f=hk(B,M,P,L,X,V),c=this.k[fe],p=this.k[fe+1],v=i[fe],g=i[fe+1],x=uk(_e,Te,be,O,E,f,c,p,v,g),S=fk(_e,Te,be,O,E,f,c,p,v,g);_e=vk(n,a),Te=gk(n,a),be=dk(n,a,u,h,b,w),O=mk(n,a,u,h,b,w);var _=Om(_e,Te,be,O),l=km(_e,Te,be,O);q=X,ee=V,X=P,V=L,P=B,L=M,B=Om(T,I,x,S),M=km(I,I,x,S),T=b,I=w,b=u,w=h,u=n,h=a,n=Om(x,S,_,l),a=km(x,S,_,l)}Ca(this.h,0,n,a),Ca(this.h,2,u,h),Ca(this.h,4,b,w),Ca(this.h,6,T,I),Ca(this.h,8,B,M),Ca(this.h,10,P,L),Ca(this.h,12,X,V),Ca(this.h,14,q,ee)};Fn.prototype._digest=function(t){return t==="hex"?Oi.toHex32(this.h,"big"):Oi.split32(this.h,"big")};function pk(e,t,r,i,n){var a=e&r^~e&n;return a<0&&(a+=4294967296),a}function hk(e,t,r,i,n,a){var u=t&i^~t&a;return u<0&&(u+=4294967296),u}function dk(e,t,r,i,n){var a=e&r^e&n^r&n;return a<0&&(a+=4294967296),a}function mk(e,t,r,i,n,a){var u=t&i^t&a^i&a;return u<0&&(u+=4294967296),u}function vk(e,t){var r=ds(e,t,28),i=ds(t,e,2),n=ds(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function gk(e,t){var r=ms(e,t,28),i=ms(t,e,2),n=ms(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function bk(e,t){var r=ds(e,t,14),i=ds(e,t,18),n=ds(t,e,9),a=r^i^n;return a<0&&(a+=4294967296),a}function xk(e,t){var r=ms(e,t,14),i=ms(e,t,18),n=ms(t,e,9),a=r^i^n;return a<0&&(a+=4294967296),a}function _k(e,t){var r=ds(e,t,1),i=ds(e,t,8),n=Dy(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function yk(e,t){var r=ms(e,t,1),i=ms(e,t,8),n=Uy(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function wk(e,t){var r=ds(e,t,19),i=ds(t,e,29),n=Dy(e,t,6),a=r^i^n;return a<0&&(a+=4294967296),a}function Sk(e,t){var r=ms(e,t,19),i=ms(t,e,29),n=Uy(e,t,6),a=r^i^n;return a<0&&(a+=4294967296),a}});var jy=W((LH,zy)=>{"use strict";var Pm=Un(),Hy=Nm();function Js(){if(!(this instanceof Js))return new Js;Hy.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Pm.inherits(Js,Hy);zy.exports=Js;Js.blockSize=1024;Js.outSize=384;Js.hmacStrength=192;Js.padLength=128;Js.prototype._digest=function(t){return t==="hex"?Pm.toHex32(this.h.slice(0,12),"big"):Pm.split32(this.h.slice(0,12),"big")}});var Vy=W(Vc=>{"use strict";Vc.sha1=Ny();Vc.sha224=Ly();Vc.sha256=Rm();Vc.sha384=jy();Vc.sha512=Nm()});var Yy=W(Xy=>{"use strict";var Ro=Un(),Ek=Fc(),Gp=Ro.rotl32,Ky=Ro.sum32,mf=Ro.sum32_3,Wy=Ro.sum32_4,$y=Ek.BlockHash;function vs(){if(!(this instanceof vs))return new vs;$y.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Ro.inherits(vs,$y);Xy.ripemd160=vs;vs.blockSize=512;vs.outSize=160;vs.hmacStrength=192;vs.padLength=64;vs.prototype._update=function(t,r){for(var i=this.h[0],n=this.h[1],a=this.h[2],u=this.h[3],h=this.h[4],b=i,w=n,T=a,I=u,B=h,M=0;M<80;M++){var P=Ky(Gp(Wy(i,Gy(M,n,a,u),t[Rk[M]+r],Tk(M)),Ok[M]),h);i=h,h=u,u=Gp(a,10),a=n,n=P,P=Ky(Gp(Wy(b,Gy(79-M,w,T,I),t[Ak[M]+r],Ik(M)),kk[M]),B),b=B,B=I,I=Gp(T,10),T=w,w=P}P=mf(this.h[1],a,I),this.h[1]=mf(this.h[2],u,B),this.h[2]=mf(this.h[3],h,b),this.h[3]=mf(this.h[4],i,w),this.h[4]=mf(this.h[0],n,T),this.h[0]=P};vs.prototype._digest=function(t){return t==="hex"?Ro.toHex32(this.h,"little"):Ro.split32(this.h,"little")};function Gy(e,t,r,i){return e<=15?t^r^i:e<=31?t&r|~t&i:e<=47?(t|~r)^i:e<=63?t&i|r&~i:t^(r|~i)}function Tk(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function Ik(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}var Rk=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Ak=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Ok=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],kk=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var Jy=W((qH,Zy)=>{"use strict";var Nk=Un(),Pk=Pa();function Kc(e,t,r){if(!(this instanceof Kc))return new Kc(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(Nk.toArray(t,r))}Zy.exports=Kc;Kc.prototype._init=function(t){t.length>this.blockSize&&(t=new this.Hash().update(t).digest()),Pk(t.length<=this.blockSize);for(var r=t.length;r<this.blockSize;r++)t.push(0);for(r=0;r<t.length;r++)t[r]^=54;for(this.inner=new this.Hash().update(t),r=0;r<t.length;r++)t[r]^=106;this.outer=new this.Hash().update(t)};Kc.prototype.update=function(t,r){return this.inner.update(t,r),this};Kc.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}});var $p=W(Qy=>{var si=Qy;si.utils=Un();si.common=Fc();si.sha=Vy();si.ripemd=Yy();si.hmac=Jy();si.sha1=si.sha.sha1;si.sha256=si.sha.sha256;si.sha224=si.sha.sha224;si.sha384=si.sha.sha384;si.sha512=si.sha.sha512;si.ripemd160=si.ripemd.ripemd160});var t2=W((HH,e2)=>{e2.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}});var Xp=W(n2=>{"use strict";var Mm=n2,La=$p(),Bm=Em(),Bk=Zi(),r2=Bk.assert;function i2(e){e.type==="short"?this.curve=new Bm.short(e):e.type==="edwards"?this.curve=new Bm.edwards(e):this.curve=new Bm.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,r2(this.g.validate(),"Invalid curve"),r2(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}Mm.PresetCurve=i2;function Da(e,t){Object.defineProperty(Mm,e,{configurable:!0,enumerable:!0,get:function(){var r=new i2(t);return Object.defineProperty(Mm,e,{configurable:!0,enumerable:!0,value:r}),r}})}Da("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:La.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});Da("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:La.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});Da("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:La.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});Da("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:La.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});Da("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:La.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]});Da("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:La.sha256,gRed:!1,g:["9"]});Da("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:La.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var Cm;try{Cm=t2()}catch{Cm=void 0}Da("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:La.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",Cm]})});var o2=W((jH,a2)=>{"use strict";var Mk=$p(),Ao=mm(),s2=Pa();function Ua(e){if(!(this instanceof Ua))return new Ua(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=Ao.toArray(e.entropy,e.entropyEnc||"hex"),r=Ao.toArray(e.nonce,e.nonceEnc||"hex"),i=Ao.toArray(e.pers,e.persEnc||"hex");s2(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,i)}a2.exports=Ua;Ua.prototype._init=function(t,r,i){var n=t.concat(r).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a<this.V.length;a++)this.K[a]=0,this.V[a]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656};Ua.prototype._hmac=function(){return new Mk.hmac(this.hash,this.K)};Ua.prototype._update=function(t){var r=this._hmac().update(this.V).update([0]);t&&(r=r.update(t)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())};Ua.prototype.reseed=function(t,r,i,n){typeof r!="string"&&(n=i,i=r,r=null),t=Ao.toArray(t,r),i=Ao.toArray(i,n),s2(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(i||[])),this._reseed=1};Ua.prototype.generate=function(t,r,i,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(n=i,i=r,r=null),i&&(i=Ao.toArray(i,n||"hex"),this._update(i));for(var a=[];a.length<t;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var u=a.slice(0,t);return this._update(i),this._reseed++,Ao.encode(u,r)}});var u2=W((VH,c2)=>{"use strict";var Ck=us(),Lk=Zi(),Lm=Lk.assert;function li(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}c2.exports=li;li.fromPublic=function(t,r,i){return r instanceof li?r:new li(t,{pub:r,pubEnc:i})};li.fromPrivate=function(t,r,i){return r instanceof li?r:new li(t,{priv:r,privEnc:i})};li.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};li.prototype.getPublic=function(t,r){return typeof t=="string"&&(r=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,t):this.pub};li.prototype.getPrivate=function(t){return t==="hex"?this.priv.toString(16,2):this.priv};li.prototype._importPrivate=function(t,r){this.priv=new Ck(t,r||16),this.priv=this.priv.umod(this.ec.curve.n)};li.prototype._importPublic=function(t,r){if(t.x||t.y){this.ec.curve.type==="mont"?Lm(t.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&Lm(t.x&&t.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(t.x,t.y);return}this.pub=this.ec.curve.decodePoint(t,r)};li.prototype.derive=function(t){return t.validate()||Lm(t.validate(),"public point not validated"),t.mul(this.priv).getX()};li.prototype.sign=function(t,r,i){return this.ec.sign(t,this,r,i)};li.prototype.verify=function(t,r){return this.ec.verify(t,r,this)};li.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}});var p2=W((KH,l2)=>{"use strict";var Yp=us(),qm=Zi(),Dk=qm.assert;function Zp(e,t){if(e instanceof Zp)return e;this._importDER(e,t)||(Dk(e.r&&e.s,"Signature without r or s"),this.r=new Yp(e.r,16),this.s=new Yp(e.s,16),e.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}l2.exports=Zp;function Uk(){this.place=0}function Dm(e,t){var r=e[t.place++];if(!(r&128))return r;var i=r&15;if(i===0||i>4)return!1;for(var n=0,a=0,u=t.place;a<i;a++,u++)n<<=8,n|=e[u],n>>>=0;return n<=127?!1:(t.place=u,n)}function f2(e){for(var t=0,r=e.length-1;!e[t]&&!(e[t+1]&128)&&t<r;)t++;return t===0?e:e.slice(t)}Zp.prototype._importDER=function(t,r){t=qm.toArray(t,r);var i=new Uk;if(t[i.place++]!==48)return!1;var n=Dm(t,i);if(n===!1||n+i.place!==t.length||t[i.place++]!==2)return!1;var a=Dm(t,i);if(a===!1)return!1;var u=t.slice(i.place,a+i.place);if(i.place+=a,t[i.place++]!==2)return!1;var h=Dm(t,i);if(h===!1||t.length!==h+i.place)return!1;var b=t.slice(i.place,h+i.place);if(u[0]===0)if(u[1]&128)u=u.slice(1);else return!1;if(b[0]===0)if(b[1]&128)b=b.slice(1);else return!1;return this.r=new Yp(u),this.s=new Yp(b),this.recoveryParam=null,!0};function Um(e,t){if(t<128){e.push(t);return}var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(r|128);--r;)e.push(t>>>(r<<3)&255);e.push(t)}Zp.prototype.toDER=function(t){var r=this.r.toArray(),i=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),i[0]&128&&(i=[0].concat(i)),r=f2(r),i=f2(i);!i[0]&&!(i[1]&128);)i=i.slice(1);var n=[2];Um(n,r.length),n=n.concat(r),n.push(2),Um(n,i.length);var a=n.concat(i),u=[48];return Um(u,a.length),u=u.concat(a),qm.encode(u,t)}});var v2=W((WH,m2)=>{"use strict";var Oo=us(),h2=o2(),qk=Zi(),Fm=Xp(),Fk=xm(),d2=qk.assert,Hm=u2(),Jp=p2();function gn(e){if(!(this instanceof gn))return new gn(e);typeof e=="string"&&(d2(Object.prototype.hasOwnProperty.call(Fm,e),"Unknown curve "+e),e=Fm[e]),e instanceof Fm.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}m2.exports=gn;gn.prototype.keyPair=function(t){return new Hm(this,t)};gn.prototype.keyFromPrivate=function(t,r){return Hm.fromPrivate(this,t,r)};gn.prototype.keyFromPublic=function(t,r){return Hm.fromPublic(this,t,r)};gn.prototype.genKeyPair=function(t){t||(t={});for(var r=new h2({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||Fk(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),n=this.n.sub(new Oo(2));;){var a=new Oo(r.generate(i));if(!(a.cmp(n)>0))return a.iaddn(1),this.keyFromPrivate(a)}};gn.prototype._truncateToN=function(t,r){var i=t.byteLength()*8-this.n.bitLength();return i>0&&(t=t.ushrn(i)),!r&&t.cmp(this.n)>=0?t.sub(this.n):t};gn.prototype.sign=function(t,r,i,n){typeof i=="object"&&(n=i,i=null),n||(n={}),r=this.keyFromPrivate(r,i),t=this._truncateToN(new Oo(t,16));for(var a=this.n.byteLength(),u=r.getPrivate().toArray("be",a),h=t.toArray("be",a),b=new h2({hash:this.hash,entropy:u,nonce:h,pers:n.pers,persEnc:n.persEnc||"utf8"}),w=this.n.sub(new Oo(1)),T=0;;T++){var I=n.k?n.k(T):new Oo(b.generate(this.n.byteLength()));if(I=this._truncateToN(I,!0),!(I.cmpn(1)<=0||I.cmp(w)>=0)){var B=this.g.mul(I);if(!B.isInfinity()){var M=B.getX(),P=M.umod(this.n);if(P.cmpn(0)!==0){var L=I.invm(this.n).mul(P.mul(r.getPrivate()).iadd(t));if(L=L.umod(this.n),L.cmpn(0)!==0){var X=(B.getY().isOdd()?1:0)|(M.cmp(P)!==0?2:0);return n.canonical&&L.cmp(this.nh)>0&&(L=this.n.sub(L),X^=1),new Jp({r:P,s:L,recoveryParam:X})}}}}}};gn.prototype.verify=function(t,r,i,n){t=this._truncateToN(new Oo(t,16)),i=this.keyFromPublic(i,n),r=new Jp(r,"hex");var a=r.r,u=r.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||u.cmpn(1)<0||u.cmp(this.n)>=0)return!1;var h=u.invm(this.n),b=h.mul(t).umod(this.n),w=h.mul(a).umod(this.n),T;return this.curve._maxwellTrick?(T=this.g.jmulAdd(b,i.getPublic(),w),T.isInfinity()?!1:T.eqXToP(a)):(T=this.g.mulAdd(b,i.getPublic(),w),T.isInfinity()?!1:T.getX().umod(this.n).cmp(a)===0)};gn.prototype.recoverPubKey=function(e,t,r,i){d2((3&r)===r,"The recovery param is more than two bits"),t=new Jp(t,i);var n=this.n,a=new Oo(e),u=t.r,h=t.s,b=r&1,w=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&w)throw new Error("Unable to find sencond key candinate");w?u=this.curve.pointFromX(u.add(this.curve.n),b):u=this.curve.pointFromX(u,b);var T=t.r.invm(n),I=n.sub(a).mul(T).umod(n),B=h.mul(T).umod(n);return this.g.mulAdd(I,u,B)};gn.prototype.getKeyRecoveryParam=function(e,t,r,i){if(t=new Jp(t,i),t.recoveryParam!==null)return t.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(e,t,n)}catch{continue}if(a.eq(r))return n}throw new Error("Unable to find valid recovery factor")}});var _2=W((GH,x2)=>{"use strict";var vf=Zi(),b2=vf.assert,g2=vf.parseBytes,Wc=vf.cachedProperty;function ei(e,t){this.eddsa=e,this._secret=g2(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=g2(t.pub)}ei.fromPublic=function(t,r){return r instanceof ei?r:new ei(t,{pub:r})};ei.fromSecret=function(t,r){return r instanceof ei?r:new ei(t,{secret:r})};ei.prototype.secret=function(){return this._secret};Wc(ei,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});Wc(ei,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});Wc(ei,"privBytes",function(){var t=this.eddsa,r=this.hash(),i=t.encodingLength-1,n=r.slice(0,t.encodingLength);return n[0]&=248,n[i]&=127,n[i]|=64,n});Wc(ei,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});Wc(ei,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});Wc(ei,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});ei.prototype.sign=function(t){return b2(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)};ei.prototype.verify=function(t,r){return this.eddsa.verify(t,r,this)};ei.prototype.getSecret=function(t){return b2(this._secret,"KeyPair is public only"),vf.encode(this.secret(),t)};ei.prototype.getPublic=function(t){return vf.encode(this.pubBytes(),t)};x2.exports=ei});var w2=W(($H,y2)=>{"use strict";var Hk=us(),Qp=Zi(),zk=Qp.assert,eh=Qp.cachedProperty,jk=Qp.parseBytes;function ko(e,t){this.eddsa=e,typeof t!="object"&&(t=jk(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),zk(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof Hk&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}eh(ko,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});eh(ko,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});eh(ko,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});eh(ko,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});ko.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};ko.prototype.toHex=function(){return Qp.encode(this.toBytes(),"hex").toUpperCase()};y2.exports=ko});var R2=W((XH,I2)=>{"use strict";var Vk=$p(),Kk=Xp(),Gc=Zi(),Wk=Gc.assert,E2=Gc.parseBytes,T2=_2(),S2=w2();function ki(e){if(Wk(e==="ed25519","only tested with ed25519 so far"),!(this instanceof ki))return new ki(e);e=Kk[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=Vk.sha512}I2.exports=ki;ki.prototype.sign=function(t,r){t=E2(t);var i=this.keyFromSecret(r),n=this.hashInt(i.messagePrefix(),t),a=this.g.mul(n),u=this.encodePoint(a),h=this.hashInt(u,i.pubBytes(),t).mul(i.priv()),b=n.add(h).umod(this.curve.n);return this.makeSignature({R:a,S:b,Rencoded:u})};ki.prototype.verify=function(t,r,i){t=E2(t),r=this.makeSignature(r);var n=this.keyFromPublic(i),a=this.hashInt(r.Rencoded(),n.pubBytes(),t),u=this.g.mul(r.S()),h=r.R().add(n.pub().mul(a));return h.eq(u)};ki.prototype.hashInt=function(){for(var t=this.hash(),r=0;r<arguments.length;r++)t.update(arguments[r]);return Gc.intFromLE(t.digest()).umod(this.curve.n)};ki.prototype.keyFromPublic=function(t){return T2.fromPublic(this,t)};ki.prototype.keyFromSecret=function(t){return T2.fromSecret(this,t)};ki.prototype.makeSignature=function(t){return t instanceof S2?t:new S2(this,t)};ki.prototype.encodePoint=function(t){var r=t.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=t.getX().isOdd()?128:0,r};ki.prototype.decodePoint=function(t){t=Gc.parseBytes(t);var r=t.length-1,i=t.slice(0,r).concat(t[r]&-129),n=(t[r]&128)!==0,a=Gc.intFromLE(i);return this.curve.pointFromY(a,n)};ki.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)};ki.prototype.decodeInt=function(t){return Gc.intFromLE(t)};ki.prototype.isPoint=function(t){return t instanceof this.pointClass}});var zm=W(A2=>{"use strict";var No=A2;No.version=ry().version;No.utils=Zi();No.rand=xm();No.curve=Em();No.curves=Xp();No.ec=v2();No.eddsa=R2()});var Bo=W((ZH,k2)=>{"use strict";var jm=Zr(),Gk=hr(),$k=zm().ec,Po=new $k("secp256k1"),Xk=Po.curve.point.bind(Po.curve),O2=Po.curve.pointFromX.bind(Po.curve),Ni=function(t,r,i){try{var n=Xk(t,r,i)}catch{throw new Error("Invalid Point")}return n.validate(),n};Ni.prototype=Object.getPrototypeOf(Po.curve.point());Ni.fromX=function(t,r){try{var i=O2(r,t)}catch{throw new Error("Invalid X")}return i.validate(),i};Ni.getG=function(){return Po.curve.g};Ni.getN=function(){return new jm(Po.curve.n.toArray())};Ni.prototype._getX=Ni.prototype.getX;Ni.prototype.getX=function(){return new jm(this._getX().toArray())};Ni.prototype._getY=Ni.prototype.getY;Ni.prototype.getY=function(){return new jm(this._getY().toArray())};Ni.prototype.validate=function(){if(this.isInfinity())throw new Error("Point cannot be equal to Infinity");var t;try{t=O2(this.getX(),this.getY().isOdd())}catch{throw new Error("Point does not lie on the curve")}if(t.y.cmp(this.y)!==0)throw new Error("Invalid y value for curve.");if(!this.mul(Ni.getN()).isInfinity())throw new Error("Point times N must be infinity");return this};Ni.pointToCompressed=function(t){var r=t.getX().toBuffer({size:32}),i=t.getY().toBuffer({size:32}),n,a=i[i.length-1]%2;return a?n=Buffer.from([3]):n=Buffer.from([2]),Gk.concat([n,r])};k2.exports=Ni});var Pi=W((JH,P2)=>{"use strict";var Mo=Zr(),Yk=vt(),bn=It(),N2=hr(),Zk=Lr(),Bt=function e(t,r){if(!(this instanceof e))return new e(t,r);if(t instanceof Mo)this.set({r:t,s:r});else if(t){var i=t;this.set(i)}};Bt.prototype.set=function(e){return this.r=e.r||this.r||void 0,this.s=e.s||this.s||void 0,this.i=typeof e.i<"u"?e.i:this.i,this.compressed=typeof e.compressed<"u"?e.compressed:this.compressed,this.nhashtype=e.nhashtype||this.nhashtype||void 0,this};Bt.fromCompact=function(e){bn.checkArgument(N2.isBuffer(e),"Argument is expected to be a Buffer");var t=new Bt,r=!0,i=e.slice(0,1)[0]-27-4;i<0&&(r=!1,i=i+4);var n=e.slice(1,33),a=e.slice(33,65);return bn.checkArgument(i===0||i===1||i===2||i===3,new Error("i must be 0, 1, 2, or 3")),bn.checkArgument(n.length===32,new Error("r must be 32 bytes")),bn.checkArgument(a.length===32,new Error("s must be 32 bytes")),t.compressed=r,t.i=i,t.r=Mo.fromBuffer(n),t.s=Mo.fromBuffer(a),t};Bt.fromDER=Bt.fromBuffer=function(e,t){var r=Bt.parseDER(e,t),i=new Bt;return i.r=r.r,i.s=r.s,i};Bt.fromTxFormat=function(e){var t=e.readUInt8(e.length-1),r=e.slice(0,e.length-1),i=new Bt.fromDER(r,!1);return i.nhashtype=t,i};Bt.fromString=function(e){var t=Buffer.from(e,"hex");return Bt.fromDER(t)};Bt.parseDER=function(e,t){bn.checkArgument(N2.isBuffer(e),new Error("DER formatted signature should be a buffer")),Yk.isUndefined(t)&&(t=!0);var r=e[0];bn.checkArgument(r===48,new Error("Header byte should be 0x30"));var i=e[1],n=e.slice(2).length;bn.checkArgument(!t||i===n,new Error("Length byte should length of what follows")),i=i<n?i:n;var a=e[2];bn.checkArgument(a===2,new Error("Integer byte for r should be 0x02"));var u=e[3],h=e.slice(4,4+u),b=Mo.fromBuffer(h),w=e[4]===0;bn.checkArgument(u===h.length,new Error("Length of r incorrect"));var T=e[4+u+0];bn.checkArgument(T===2,new Error("Integer byte for s should be 0x02"));var I=e[4+u+1],B=e.slice(4+u+2,4+u+2+I),M=Mo.fromBuffer(B),P=e[4+u+2+2]===0;bn.checkArgument(I===B.length,new Error("Length of s incorrect"));var L=4+u+2+I;bn.checkArgument(i===L-2,new Error("Length of signature incorrect"));var X={header:r,length:i,rheader:a,rlength:u,rneg:w,rbuf:h,r:b,sheader:T,slength:I,sneg:P,sbuf:B,s:M};return X};Bt.prototype.toCompact=function(e,t){if(e=typeof e=="number"?e:this.i,t=typeof t=="boolean"?t:this.compressed,!(e===0||e===1||e===2||e===3))throw new Error("i must be equal to 0, 1, 2, or 3");var r=e+27+4;t===!1&&(r=r-4);var i=Buffer.from([r]),n=this.r.toBuffer({size:32}),a=this.s.toBuffer({size:32});return Buffer.concat([i,n,a])};Bt.prototype.toBuffer=Bt.prototype.toDER=function(){var e=this.r.toBuffer(),t=this.s.toBuffer(),r=!!(e[0]&128),i=!!(t[0]&128),n=r?Buffer.concat([Buffer.from([0]),e]):e,a=i?Buffer.concat([Buffer.from([0]),t]):t,u=n.length,h=a.length,b=2+u+2+h,w=2,T=2,I=48,B=Buffer.concat([Buffer.from([I,b,w,u]),n,Buffer.from([T,h]),a]);return B};Bt.prototype.toString=function(){var e=this.toDER();return e.toString("hex")};Bt.isTxDER=function(e){if(e.length<9||e.length>73||e[0]!==48||e[1]!==e.length-3)return!1;var t=e[3];if(5+t>=e.length)return!1;var r=e[5+t];if(t+r+7!==e.length)return!1;var i=e.slice(4);if(e[2]!==2||t===0||i[0]&128||t>1&&i[0]===0&&!(i[1]&128))return!1;var n=e.slice(6+t);return!(e[6+t-2]!==2||r===0||n[0]&128||r>1&&n[0]===0&&!(n[1]&128))};Bt.prototype.hasLowS=function(){return!(this.s.lt(new Mo(1))||this.s.gt(new Mo("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))};Bt.prototype.hasDefinedHashtype=function(){if(!Zk.isNaturalNumber(this.nhashtype))return!1;var e=this.nhashtype&~Bt.SIGHASH_ANYONECANPAY;return!(e<Bt.SIGHASH_ALL||e>Bt.SIGHASH_SINGLE)};Bt.prototype.toTxFormat=function(){var e=this.toDER(),t=Buffer.alloc(1);return t.writeUInt8(this.nhashtype,0),Buffer.concat([e,t])};Bt.SIGHASH_ALL=1;Bt.SIGHASH_NONE=2;Bt.SIGHASH_SINGLE=3;Bt.SIGHASH_ANYONECANPAY=128;P2.exports=Bt});var ti=W((QH,B2)=>{"use strict";var th=require("crypto"),qa=hr(),Qs=It(),Dr=B2.exports;Dr.sha1=function(e){return Qs.checkArgument(qa.isBuffer(e)),th.createHash("sha1").update(e).digest()};Dr.sha1.blocksize=512;Dr.sha256=function(e){return Qs.checkArgument(qa.isBuffer(e)),th.createHash("sha256").update(e).digest()};Dr.sha256.blocksize=512;Dr.sha256sha256=function(e){return Qs.checkArgument(qa.isBuffer(e)),Dr.sha256(Dr.sha256(e))};Dr.ripemd160=function(e){return Qs.checkArgument(qa.isBuffer(e)),th.createHash("ripemd160").update(e).digest()};Dr.sha256ripemd160=function(e){return Qs.checkArgument(qa.isBuffer(e)),Dr.ripemd160(Dr.sha256(e))};Dr.sha512=function(e){return Qs.checkArgument(qa.isBuffer(e)),th.createHash("sha512").update(e).digest()};Dr.sha512.blocksize=1024;Dr.hmac=function(e,t,r){Qs.checkArgument(qa.isBuffer(t)),Qs.checkArgument(qa.isBuffer(r)),Qs.checkArgument(e.blocksize);var i=e.blocksize/8;if(r.length>i)r=e(r);else if(r<i){var n=Buffer.alloc(i);n.fill(0),r.copy(n),r=n}var a=Buffer.alloc(i);a.fill(92);var u=Buffer.alloc(i);u.fill(54);for(var h=Buffer.alloc(i),b=Buffer.alloc(i),w=0;w<i;w++)h[w]=a[w]^r[w],b[w]=u[w]^r[w];return e(Buffer.concat([h,e(Buffer.concat([b,t]))]))};Dr.sha256hmac=function(e,t){return Dr.hmac(Dr.sha256,e,t)};Dr.sha512hmac=function(e,t){return Dr.hmac(Dr.sha512,e,t)}});var Ha=W((ez,C2)=>{"use strict";var gf=vt(),Jk=hr(),rh=Lr(),Fa=[],_i={};function M2(){}M2.prototype.toString=function(){return this.name};function bf(e,t){if(~Fa.indexOf(e))return e;if(t){gf.isArray(t)||(t=[t]);var r=function(n){return Fa[i][n]===e};for(var i in Fa)if(gf.some(t,r))return Fa[i];return}return _i[e]&&_i[e].length>=1?_i[e][0]:_i[e]}function ih(e){var t=new M2;return rh.defineImmutable(t,{name:e.name,alias:e.alias,pubkeyhash:e.pubkeyhash,privatekey:e.privatekey,scripthash:e.scripthash,bech32prefix:e.bech32prefix,xpubkey:e.xpubkey,xprivkey:e.xprivkey}),e.networkMagic&&rh.defineImmutable(t,{networkMagic:Jk.integerAsBuffer(e.networkMagic)}),e.port&&rh.defineImmutable(t,{port:e.port}),e.dnsSeeds&&rh.defineImmutable(t,{dnsSeeds:e.dnsSeeds}),gf.each(t,function(r){!gf.isUndefined(r)&&!gf.isObject(r)&&(_i[r]||(_i[r]=[]),_i[r].push(t))}),Fa.push(t),t}function Qk(e){typeof e!="object"&&(e=bf(e));for(var t=0;t<Fa.length;t++)Fa[t]===e&&Fa.splice(t,1);for(var r in _i)if(_i[r].length){let i=_i[r].indexOf(e);i>=0&&_i[r].splice(i,1),_i[r].length===0&&delete _i[r]}else _i[r]===e&&delete _i[r]}ih({name:"livenet",alias:"mainnet",pubkeyhash:0,privatekey:128,scripthash:5,bech32prefix:"bc",xpubkey:76067358,xprivkey:76066276,networkMagic:4190024921,port:8333,dnsSeeds:["seed.bitcoin.sipa.be","dnsseed.bluematt.me","dnsseed.bitcoin.dashjr.org","seed.bitcoinstats.com","seed.bitnodes.io","bitseed.xf2.org"]});var Vm=bf("livenet");ih({name:"testnet",alias:"test",pubkeyhash:111,privatekey:239,scripthash:196,bech32prefix:"tb",xpubkey:70617039,xprivkey:70615956,networkMagic:185665799,port:18333,dnsSeeds:["testnet-seed.bitcoin.petertodd.org","testnet-seed.bluematt.me","testnet-seed.alexykot.me","testnet-seed.bitcoin.schildbach.de"]});var Km=bf("testnet");ih({name:"regtest",alias:"dev",pubkeyhash:111,privatekey:239,scripthash:196,bech32prefix:"bcrt",xpubkey:70617039,xprivkey:70615956,networkMagic:4206867930,port:18444,dnsSeeds:[]});var eN=bf("regtest");function tN(){Km.regtestEnabled=!0}function rN(){Km.regtestEnabled=!1}C2.exports={add:ih,remove:Qk,defaultNetwork:Vm,livenet:Vm,mainnet:Vm,testnet:Km,regtest:eN,get:bf,enableRegtest:tN,disableRegtest:rN}});var ea=W((Wm,D2)=>{var nh=require("buffer"),gs=nh.Buffer;function L2(e,t){for(var r in e)t[r]=e[r]}gs.from&&gs.alloc&&gs.allocUnsafe&&gs.allocUnsafeSlow?D2.exports=nh:(L2(nh,Wm),Wm.Buffer=Co);function Co(e,t,r){return gs(e,t,r)}Co.prototype=Object.create(gs.prototype);L2(gs,Co);Co.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return gs(e,t,r)};Co.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=gs(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};Co.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return gs(e)};Co.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return nh.SlowBuffer(e)}});var q2=W((tz,U2)=>{"use strict";var sh=ea().Buffer;function iN(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var i=0;i<e.length;i++){var n=e.charAt(i),a=n.charCodeAt(0);if(t[a]!==255)throw new TypeError(n+" is ambiguous");t[a]=i}var u=e.length,h=e.charAt(0),b=Math.log(u)/Math.log(256),w=Math.log(256)/Math.log(u);function T(M){if((Array.isArray(M)||M instanceof Uint8Array)&&(M=sh.from(M)),!sh.isBuffer(M))throw new TypeError("Expected Buffer");if(M.length===0)return"";for(var P=0,L=0,X=0,V=M.length;X!==V&&M[X]===0;)X++,P++;for(var q=(V-X)*w+1>>>0,ee=new Uint8Array(q);X!==V;){for(var fe=M[X],_e=0,Te=q-1;(fe!==0||_e<L)&&Te!==-1;Te--,_e++)fe+=256*ee[Te]>>>0,ee[Te]=fe%u>>>0,fe=fe/u>>>0;if(fe!==0)throw new Error("Non-zero carry");L=_e,X++}for(var be=q-L;be!==q&&ee[be]===0;)be++;for(var O=h.repeat(P);be<q;++be)O+=e.charAt(ee[be]);return O}function I(M){if(typeof M!="string")throw new TypeError("Expected String");if(M.length===0)return sh.alloc(0);for(var P=0,L=0,X=0;M[P]===h;)L++,P++;for(var V=(M.length-P)*b+1>>>0,q=new Uint8Array(V);M[P];){var ee=t[M.charCodeAt(P)];if(ee===255)return;for(var fe=0,_e=V-1;(ee!==0||fe<X)&&_e!==-1;_e--,fe++)ee+=u*q[_e]>>>0,q[_e]=ee%256>>>0,ee=ee/256>>>0;if(ee!==0)throw new Error("Non-zero carry");X=fe,P++}for(var Te=V-X;Te!==V&&q[Te]===0;)Te++;var be=sh.allocUnsafe(L+(V-Te));be.fill(0,0,L);for(var O=L;Te!==V;)be[O++]=q[Te++];return be}function B(M){var P=I(M);if(P)return P;throw new Error("Non-base"+u+" character")}return{encode:T,decodeUnsafe:I,decode:B}}U2.exports=iN});var Gm=W((rz,F2)=>{var nN=q2(),sN="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";F2.exports=nN(sN)});var xf=W((iz,j2)=>{"use strict";var $m=vt(),H2=Gm(),z2=require("buffer"),aN="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".split(""),Hn=function e(t){if(!(this instanceof e))return new e(t);if(Buffer.isBuffer(t)){var r=t;this.fromBuffer(r)}else if(typeof t=="string"){var i=t;this.fromString(i)}else t&&this.set(t)};Hn.validCharacters=function(t){return z2.Buffer.isBuffer(t)&&(t=t.toString()),$m.every($m.map(t,function(r){return $m.includes(aN,r)}))};Hn.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this};Hn.encode=function(e){if(!z2.Buffer.isBuffer(e))throw new Error("Input should be a buffer");return H2.encode(e)};Hn.decode=function(e){if(typeof e!="string")throw new Error("Input should be a string");return Buffer.from(H2.decode(e))};Hn.prototype.fromBuffer=function(e){return this.buf=e,this};Hn.prototype.fromString=function(e){var t=Hn.decode(e);return this.buf=t,this};Hn.prototype.toBuffer=function(){return this.buf};Hn.prototype.toString=function(){return Hn.encode(this.buf)};j2.exports=Hn});var $c=W((sz,W2)=>{"use strict";var V2=vt(),ah=xf(),nz=require("buffer"),K2=ti().sha256sha256,Bi=function e(t){if(!(this instanceof e))return new e(t);if(Buffer.isBuffer(t)){var r=t;this.fromBuffer(r)}else if(typeof t=="string"){var i=t;this.fromString(i)}else t&&this.set(t)};Bi.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this};Bi.validChecksum=function(t,r){return V2.isString(t)&&(t=Buffer.from(ah.decode(t))),V2.isString(r)&&(r=Buffer.from(ah.decode(r))),r||(r=t.slice(-4),t=t.slice(0,-4)),Bi.checksum(t).toString("hex")===r.toString("hex")};Bi.decode=function(e){if(typeof e!="string")throw new Error("Input must be a string");var t=Buffer.from(ah.decode(e));if(t.length<4)throw new Error("Input string too short");var r=t.slice(0,-4),i=t.slice(-4),n=K2(r),a=n.slice(0,4);if(i.toString("hex")!==a.toString("hex"))throw new Error("Checksum mismatch");return r};Bi.checksum=function(e){return K2(e).slice(0,4)};Bi.encode=function(e){if(!Buffer.isBuffer(e))throw new Error("Input must be a buffer");var t=Buffer.alloc(e.length+4),r=Bi.checksum(e);return e.copy(t),r.copy(t,e.length),ah.encode(t)};Bi.prototype.fromBuffer=function(e){return this.buf=e,this};Bi.prototype.fromString=function(e){var t=Bi.decode(e);return this.buf=t,this};Bi.prototype.toBuffer=function(){return this.buf};Bi.prototype.toString=function(){return Bi.encode(this.buf)};W2.exports=Bi});var Y2=W(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.bech32m=Yc.bech32=void 0;var oh="qpzry9x8gf2tvdw0s3jn54khce6mua7l",$2={};for(let e=0;e<oh.length;e++){let t=oh.charAt(e);$2[t]=e}function Xc(e){let t=e>>25;return(e&33554431)<<5^-(t>>0&1)&996825010^-(t>>1&1)&642813549^-(t>>2&1)&513874426^-(t>>3&1)&1027748829^-(t>>4&1)&705979059}function G2(e){let t=1;for(let r=0;r<e.length;++r){let i=e.charCodeAt(r);if(i<33||i>126)return"Invalid prefix ("+e+")";t=Xc(t)^i>>5}t=Xc(t);for(let r=0;r<e.length;++r){let i=e.charCodeAt(r);t=Xc(t)^i&31}return t}function Xm(e,t,r,i){let n=0,a=0,u=(1<<r)-1,h=[];for(let b=0;b<e.length;++b)for(n=n<<t|e[b],a+=t;a>=r;)a-=r,h.push(n>>a&u);if(i)a>0&&h.push(n<<r-a&u);else{if(a>=t)return"Excess padding";if(n<<r-a&u)return"Non-zero padding"}return h}function oN(e){return Xm(e,8,5,!0)}function cN(e){let t=Xm(e,5,8,!1);if(Array.isArray(t))return t}function uN(e){let t=Xm(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}function X2(e){let t;e==="bech32"?t=1:t=734539939;function r(u,h,b){if(b=b||90,u.length+7+h.length>b)throw new TypeError("Exceeds length limit");u=u.toLowerCase();let w=G2(u);if(typeof w=="string")throw new Error(w);let T=u+"1";for(let I=0;I<h.length;++I){let B=h[I];if(B>>5)throw new Error("Non 5-bit word");w=Xc(w)^B,T+=oh.charAt(B)}for(let I=0;I<6;++I)w=Xc(w);w^=t;for(let I=0;I<6;++I){let B=w>>(5-I)*5&31;T+=oh.charAt(B)}return T}function i(u,h){if(h=h||90,u.length<8)return u+" too short";if(u.length>h)return"Exceeds length limit";let b=u.toLowerCase(),w=u.toUpperCase();if(u!==b&&u!==w)return"Mixed-case string "+u;u=b;let T=u.lastIndexOf("1");if(T===-1)return"No separator character for "+u;if(T===0)return"Missing prefix for "+u;let I=u.slice(0,T),B=u.slice(T+1);if(B.length<6)return"Data too short";let M=G2(I);if(typeof M=="string")return M;let P=[];for(let L=0;L<B.length;++L){let X=B.charAt(L),V=$2[X];if(V===void 0)return"Unknown character "+X;M=Xc(M)^V,!(L+6>=B.length)&&P.push(V)}return M!==t?"Invalid checksum for "+u:{prefix:I,words:P}}function n(u,h){let b=i(u,h);if(typeof b=="object")return b}function a(u,h){let b=i(u,h);if(typeof b=="object")return b;throw new Error(b)}return{decodeUnsafe:n,decode:a,encode:r,toWords:oN,fromWordsUnsafe:cN,fromWords:uN}}Yc.bech32=X2("bech32");Yc.bech32m=X2("bech32m")});var J2=W((oz,Z2)=>{"use strict";var Zc=Y2(),fN=function(e){if(typeof e!="string")throw new Error("Input should be a string");var t;let r=Zc.bech32.fromWords,i=za.BECH32;try{t=Zc.bech32.decode(e)}catch(a){if(a.message.indexOf("Invalid checksum")>-1)t=Zc.bech32m.decode(e),i=za.BECH32M,r=Zc.bech32m.fromWords;else throw a}let n=t.words[0];if(n>=1&&i!==za.BECH32M)throw new Error("Version 1+ witness address must use Bech32m checksum");return{prefix:t.prefix,data:Buffer.from(r(t.words.slice(1))),version:n}},lN=function(e,t,r,i){if(typeof e!="string")throw new Error("Prefix should be a string");if(typeof t!="number")throw new Error("version should be a number");if(i&&typeof i=="string"&&(i=za[i.toUpperCase()]||-1),i&&!(i==za.BECH32||i==za.BECH32M))throw new Error("Invalid encoding specified");let n=i==za.BECH32M?Zc.bech32m:Zc.bech32,a=n.toWords(r);return a.unshift(t),n.encode(e,a)},za={BECH32:1,BECH32M:2};Z2.exports={decode:fN,encode:lN,encodings:za}});var bs=W((cz,ew)=>{"use strict";var _f=vt(),Q2=It(),pN=hr(),Jc=Zr(),Rr=function e(t){if(!(this instanceof e))return new e(t);if(!_f.isUndefined(t))if(Buffer.isBuffer(t))this.set({buf:t});else if(_f.isString(t))this.set({buf:Buffer.from(t,"hex")});else if(_f.isObject(t)){var r=t;this.set(r)}else throw new TypeError("Unrecognized argument for BufferReader")};Rr.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this.pos=e.pos||this.pos||0,this};Rr.prototype.eof=function(){return this.buf?this.pos>=this.buf.length:!0};Rr.prototype.finished=Rr.prototype.eof;Rr.prototype.read=function(e){Q2.checkArgument(!_f.isUndefined(e),"Must specify a length");var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,t};Rr.prototype.readAll=function(){var e=this.buf.slice(this.pos,this.buf.length);return this.pos=this.buf.length,e};Rr.prototype.readUInt8=function(){var e=this.buf.readUInt8(this.pos);return this.pos=this.pos+1,e};Rr.prototype.readUInt16BE=function(){var e=this.buf.readUInt16BE(this.pos);return this.pos=this.pos+2,e};Rr.prototype.readUInt16LE=function(){var e=this.buf.readUInt16LE(this.pos);return this.pos=this.pos+2,e};Rr.prototype.readUInt32BE=function(){var e=this.buf.readUInt32BE(this.pos);return this.pos=this.pos+4,e};Rr.prototype.readUInt32LE=function(){var e=this.buf.readUInt32LE(this.pos);return this.pos=this.pos+4,e};Rr.prototype.readInt32LE=function(){var e=this.buf.readInt32LE(this.pos);return this.pos=this.pos+4,e};Rr.prototype.readUInt64BEBN=function(){var e=this.buf.slice(this.pos,this.pos+8),t=Jc.fromBuffer(e);return this.pos=this.pos+8,t};Rr.prototype.readUInt64LEBN=function(){var e=this.buf.readUInt32LE(this.pos),t=this.buf.readUInt32LE(this.pos+4),r=t*4294967296+e,i;if(r<=9007199254740991)i=new Jc(r);else{var n=Array.prototype.slice.call(this.buf,this.pos,this.pos+8);i=new Jc(n,10,"le")}return this.pos=this.pos+8,i};Rr.prototype.readVarintNum=function(){var e=this.readUInt8();switch(e){case 253:return this.readUInt16LE();case 254:return this.readUInt32LE();case 255:var t=this.readUInt64LEBN(),r=t.toNumber();if(r<=Math.pow(2,53))return r;throw new Error("number too large to retain precision - use readVarintBN");default:return e}};Rr.prototype.readVarLengthBuffer=function(){var e=this.readVarintNum(),t=this.read(e);return Q2.checkState(t.length===e,"Invalid length while reading varlength buffer. Expected to read: "+e+" and read "+t.length),t};Rr.prototype.readVarintBuf=function(){var e=this.buf.readUInt8(this.pos);switch(e){case 253:return this.read(3);case 254:return this.read(5);case 255:return this.read(9);default:return this.read(1)}};Rr.prototype.readVarintBN=function(){var e=this.readUInt8();switch(e){case 253:return new Jc(this.readUInt16LE());case 254:return new Jc(this.readUInt32LE());case 255:return this.readUInt64LEBN();default:return new Jc(e)}};Rr.prototype.reverse=function(){for(var e=Buffer.alloc(this.buf.length),t=0;t<e.length;t++)e[t]=this.buf[this.buf.length-1-t];return this.buf=e,this};Rr.prototype.readReverse=function(e){_f.isUndefined(e)&&(e=this.buf.length);var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,pN.reverse(t)};ew.exports=Rr});var yi=W((uz,rw)=>{"use strict";var Ym=hr(),tw=require("assert"),Ar=function e(t){if(!(this instanceof e))return new e(t);this.bufLen=0,t?this.set(t):this.bufs=[]};Ar.prototype.set=function(e){return this.bufs=e.bufs||this.bufs||[],this.bufLen=this.bufs.reduce(function(t,r){return t+r.length},0),this};Ar.prototype.toBuffer=function(){return this.concat()};Ar.prototype.concat=function(){return Buffer.concat(this.bufs,this.bufLen)};Ar.prototype.write=function(e){return tw(Ym.isBuffer(e)),this.bufs.push(e),this.bufLen+=e.length,this};Ar.prototype.writeReverse=function(e){return tw(Ym.isBuffer(e)),this.bufs.push(Ym.reverse(e)),this.bufLen+=e.length,this};Ar.prototype.writeUInt8=function(e){var t=Buffer.alloc(1);return t.writeUInt8(e,0),this.write(t),this};Ar.prototype.writeUInt16BE=function(e){var t=Buffer.alloc(2);return t.writeUInt16BE(e,0),this.write(t),this};Ar.prototype.writeUInt16LE=function(e){var t=Buffer.alloc(2);return t.writeUInt16LE(e,0),this.write(t),this};Ar.prototype.writeUInt32BE=function(e){var t=Buffer.alloc(4);return t.writeUInt32BE(e,0),this.write(t),this};Ar.prototype.writeInt32LE=function(e){var t=Buffer.alloc(4);return t.writeInt32LE(e,0),this.write(t),this};Ar.prototype.writeUInt32LE=function(e){var t=Buffer.alloc(4);return t.writeUInt32LE(e,0),this.write(t),this};Ar.prototype.writeUInt64BEBN=function(e){var t=e.toBuffer({size:8});return this.write(t),this};Ar.prototype.writeUInt64LEBN=function(e){var t=e.toBuffer({size:8});return this.writeReverse(t),this};Ar.prototype.writeVarintNum=function(e){var t=Ar.varintBufNum(e);return this.write(t),this};Ar.prototype.writeVarintBN=function(e){var t=Ar.varintBufBN(e);return this.write(t),this};Ar.varintBufNum=function(e){var t=void 0;return e<253?(t=Buffer.alloc(1),t.writeUInt8(e,0)):e<65536?(t=Buffer.alloc(3),t.writeUInt8(253,0),t.writeUInt16LE(e,1)):e<4294967296?(t=Buffer.alloc(5),t.writeUInt8(254,0),t.writeUInt32LE(e,1)):(t=Buffer.alloc(9),t.writeUInt8(255,0),t.writeInt32LE(e&-1,1),t.writeUInt32LE(Math.floor(e/4294967296),5)),t};Ar.varintBufBN=function(e){var t=void 0,r=e.toNumber();if(r<253)t=Buffer.alloc(1),t.writeUInt8(r,0);else if(r<65536)t=Buffer.alloc(3),t.writeUInt8(253,0),t.writeUInt16LE(r,1);else if(r<4294967296)t=Buffer.alloc(5),t.writeUInt8(254,0),t.writeUInt32LE(r,1);else{var i=new Ar;i.writeUInt8(255),i.writeUInt64LEBN(e);var t=i.concat()}return t};rw.exports=Ar});var ch=W((fz,iw)=>{"use strict";var Qc=vt(),yf=It(),hN=hr(),dN=Lr();function yt(e){if(!(this instanceof yt))return new yt(e);var t;if(Qc.isNumber(e))t=e;else if(Qc.isString(e))t=yt.map[e];else throw new TypeError('Unrecognized num type: "'+typeof e+'" for Opcode');return dN.defineImmutable(this,{num:t}),this}yt.fromBuffer=function(e){return yf.checkArgument(hN.isBuffer(e)),new yt(+("0x"+e.toString("hex")))};yt.fromNumber=function(e){return yf.checkArgument(Qc.isNumber(e)),new yt(e)};yt.fromString=function(e){yf.checkArgument(Qc.isString(e));var t=yt.map[e];if(typeof t>"u")throw new TypeError("Invalid opcodestr");return new yt(t)};yt.prototype.toHex=function(){return this.num.toString(16)};yt.prototype.toBuffer=function(){return Buffer.from(this.toHex(),"hex")};yt.prototype.toNumber=function(){return this.num};yt.prototype.toString=function(){var e=yt.reverseMap[this.num];if(typeof e>"u")throw new Error("Opcode does not have a string representation");return e};yt.smallInt=function(e){return yf.checkArgument(Qc.isNumber(e),"Invalid Argument: n should be number"),yf.checkArgument(e>=0&&e<=16,"Invalid Argument: n must be between 0 and 16"),e===0?yt("OP_0"):new yt(yt.map.OP_1+e-1)};yt.map={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_CHECKLOCKTIMEVERIFY:177,OP_CHECKSEQUENCEVERIFY:178,OP_NOP1:176,OP_NOP2:177,OP_NOP3:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255};yt.reverseMap=[];for(Zm in yt.map)yt.reverseMap[yt.map[Zm]]=Zm;var Zm;Qc.extend(yt,yt.map);yt.isSmallIntOp=function(e){return e instanceof yt&&(e=e.toNumber()),e===yt.map.OP_0||e>=yt.map.OP_1&&e<=yt.map.OP_16};yt.prototype.inspect=function(){return"<Opcode: "+this.toString()+", hex: "+this.toHex()+", decimal: "+this.num+">"};iw.exports=yt});var ev=W((pz,sw)=>{"use strict";var ai=zn(),mN=bs(),vN=yi(),uh=ti(),pe=ch(),ja=jn(),Lo=Pi(),nw=Ha(),gr=It(),Jm=vt(),Qm=Yi(),lz=require("buffer"),oi=hr(),gN=Lr(),Y=function e(t){if(!(this instanceof e))return new e(t);if(this.chunks=[],oi.isBuffer(t))return e.fromBuffer(t);if(t instanceof ai)return e.fromAddress(t);if(t instanceof e)return e.fromBuffer(t.toBuffer());if(typeof t=="string")return e.fromString(t);Jm.isObject(t)&&Array.isArray(t.chunks)&&this.set(t)};Y.VERIFY_TAPROOT=1<<17;Y.prototype.set=function(e){return gr.checkArgument(Jm.isObject(e)),gr.checkArgument(Array.isArray(e.chunks)),this.chunks=e.chunks,this};Y.fromBuffer=function(e){var t=new Y;t.chunks=[];for(var r=new mN(e);!r.finished();)try{var i=r.readUInt8(),n,a;i>0&&i<pe.OP_PUSHDATA1?(n=i,t.chunks.push({buf:r.read(n),len:n,opcodenum:i})):i===pe.OP_PUSHDATA1?(n=r.readUInt8(),a=r.read(n),t.chunks.push({buf:a,len:n,opcodenum:i})):i===pe.OP_PUSHDATA2?(n=r.readUInt16LE(),a=r.read(n),t.chunks.push({buf:a,len:n,opcodenum:i})):i===pe.OP_PUSHDATA4?(n=r.readUInt32LE(),a=r.read(n),t.chunks.push({buf:a,len:n,opcodenum:i})):t.chunks.push({opcodenum:i})}catch(u){throw u instanceof RangeError?new Qm.Script.InvalidBuffer(e.toString("hex")):u}return t};Y.prototype.toBuffer=function(){for(var e=new vN,t=0;t<this.chunks.length;t++){var r=this.chunks[t],i=r.opcodenum;e.writeUInt8(r.opcodenum),r.buf&&(i<pe.OP_PUSHDATA1?e.write(r.buf):i===pe.OP_PUSHDATA1?(e.writeUInt8(r.len),e.write(r.buf)):i===pe.OP_PUSHDATA2?(e.writeUInt16LE(r.len),e.write(r.buf)):i===pe.OP_PUSHDATA4&&(e.writeUInt32LE(r.len),e.write(r.buf)))}return e.concat()};Y.fromASM=function(e){var t=new Y;t.chunks=[];for(var r=e.split(" "),i=0;i<r.length;){var n=r[i],a=pe(n),u=a.toNumber();if(u==null){var h=Buffer.from(r[i],"hex");t.chunks.push({buf:h,len:h.length,opcodenum:h.length}),i=i+1}else u===pe.OP_PUSHDATA1||u===pe.OP_PUSHDATA2||u===pe.OP_PUSHDATA4?(t.chunks.push({buf:Buffer.from(r[i+2],"hex"),len:parseInt(r[i+1]),opcodenum:u}),i=i+3):(t.chunks.push({opcodenum:u}),i=i+1)}return t};Y.fromHex=function(e){return new Y(Buffer.from(e,"hex"))};Y.fromString=function(e){if(gN.isHexa(e)||e.length===0)return new Y(Buffer.from(e,"hex"));var t=new Y;t.chunks=[];for(var r=e.split(" "),i=0;i<r.length;){var n=r[i],a=pe(n),u=a.toNumber();if(u==null)if(u=parseInt(n),u>0&&u<pe.OP_PUSHDATA1)t.chunks.push({buf:Buffer.from(r[i+1].slice(2),"hex"),len:u,opcodenum:u}),i=i+2;else throw new Error("Invalid script: "+JSON.stringify(e));else if(u===pe.OP_PUSHDATA1||u===pe.OP_PUSHDATA2||u===pe.OP_PUSHDATA4){if(r[i+2].slice(0,2)!=="0x")throw new Error("Pushdata data must start with 0x");t.chunks.push({buf:Buffer.from(r[i+2].slice(2),"hex"),len:parseInt(r[i+1]),opcodenum:u}),i=i+3}else t.chunks.push({opcodenum:u}),i=i+1}return t};Y.prototype._chunkToString=function(e,t){var r=e.opcodenum,i=t==="asm",n="";if(e.buf)(!i&&r===pe.OP_PUSHDATA1||r===pe.OP_PUSHDATA2||r===pe.OP_PUSHDATA4)&&(n=n+" "+pe(r).toString()),e.len>0&&(i?n=n+" "+e.buf.toString("hex"):n=n+" "+e.len+" 0x"+e.buf.toString("hex"));else if(typeof pe.reverseMap[r]<"u")i?r===0?n=n+" 0":r===79?n=n+" -1":n=n+" "+pe(r).toString():n=n+" "+pe(r).toString();else{var a=r.toString(16);a.length%2!==0&&(a="0"+a),i?n=n+" "+a:n=n+" 0x"+a}return n};Y.prototype.toASM=function(){for(var e="",t=0;t<this.chunks.length;t++){var r=this.chunks[t];e+=this._chunkToString(r,"asm")}return e.substr(1)};Y.prototype.toString=function(){for(var e="",t=0;t<this.chunks.length;t++){var r=this.chunks[t];e+=this._chunkToString(r)}return e.substr(1)};Y.prototype.toHex=function(){return this.toBuffer().toString("hex")};Y.prototype.inspect=function(){return"<Script: "+this.toString()+">"};Y.prototype.isPublicKeyHashOut=function(){return!!(this.chunks.length===5&&this.chunks[0].opcodenum===pe.OP_DUP&&this.chunks[1].opcodenum===pe.OP_HASH160&&this.chunks[2].buf&&this.chunks[2].buf.length===20&&this.chunks[3].opcodenum===pe.OP_EQUALVERIFY&&this.chunks[4].opcodenum===pe.OP_CHECKSIG)};Y.prototype.isPublicKeyHashIn=function(){if(this.chunks.length===2){var e=this.chunks[0].buf,t=this.chunks[1].buf;if(e&&e.length&&e[0]===48&&t&&t.length){var r=t[0];if((r===4||r===6||r===7)&&t.length===65)return!0;if((r===3||r===2)&&t.length===33)return!0}}return!1};Y.prototype.getPublicKey=function(){return gr.checkState(this.isPublicKeyOut(),"Can't retrieve PublicKey from a non-PK output"),this.chunks[0].buf};Y.prototype.getPublicKeyHash=function(){if(this.isPublicKeyHashOut())return this.chunks[2].buf;if(this.isWitnessPublicKeyHashOut())return this.chunks[1].buf;throw new Error("Can't retrieve PublicKeyHash from a non-PKH output")};Y.prototype.isPublicKeyOut=function(){if(this.chunks.length===2&&this.chunks[0].buf&&this.chunks[0].buf.length&&this.chunks[1].opcodenum===pe.OP_CHECKSIG){var e=this.chunks[0].buf,t=e[0],r=!1;if(((t===4||t===6||t===7)&&e.length===65||(t===3||t===2)&&e.length===33)&&(r=!0),r)return ja.isValid(e)}return!1};Y.prototype.isPublicKeyIn=function(){if(this.chunks.length===1){var e=this.chunks[0].buf;if(e&&e.length&&e[0]===48)return!0}return!1};Y.prototype.isScriptHashOut=function(){var e=this.toBuffer();return e.length===23&&e[0]===pe.OP_HASH160&&e[1]===20&&e[e.length-1]===pe.OP_EQUAL};Y.prototype.isWitnessScriptHashOut=function(){var e=this.toBuffer();return e.length===34&&e[0]===pe.OP_0&&e[1]===32};Y.prototype.isWitnessPublicKeyHashOut=function(){var e=this.toBuffer();return e.length===22&&e[0]===pe.OP_0&&e[1]===20};Y.prototype.isTaproot=function(){var e=this.toBuffer();return e.length===34&&e[0]===pe.OP_1&&e[1]===32};Y.prototype.isWitnessProgram=function(e){e||(e={});var t=this.toBuffer();return t.length<4||t.length>42||t[0]!==pe.OP_0&&!(t[0]>=pe.OP_1&&t[0]<=pe.OP_16)?!1:t.length===t[1]+2?(e.version=t[0],e.program=t.slice(2,t.length),!0):!1};Y.prototype.isScriptHashIn=function(){if(this.chunks.length<=1)return!1;var e=this.chunks[this.chunks.length-1],t=e.buf;if(!t)return!1;var r;try{r=Y.fromBuffer(t)}catch(n){if(n instanceof Qm.Script.InvalidBuffer)return!1;throw n}var i=r.classify();return i!==Y.types.UNKNOWN};Y.prototype.isMultisigOut=function(){return this.chunks.length>3&&pe.isSmallIntOp(this.chunks[0].opcodenum)&&this.chunks.slice(1,this.chunks.length-2).every(function(e){return e.buf&&oi.isBuffer(e.buf)})&&pe.isSmallIntOp(this.chunks[this.chunks.length-2].opcodenum)&&this.chunks[this.chunks.length-1].opcodenum===pe.OP_CHECKMULTISIG};Y.prototype.isMultisigIn=function(){return this.chunks.length>=2&&this.chunks[0].opcodenum===0&&this.chunks.slice(1,this.chunks.length).every(function(e){return e.buf&&oi.isBuffer(e.buf)&&Lo.isTxDER(e.buf)})};Y.prototype.isDataOut=function(){return this.chunks.length>=1&&this.chunks[0].opcodenum===pe.OP_RETURN&&(this.chunks.length===1||this.chunks.length===2&&this.chunks[1].buf&&this.chunks[1].buf.length<=Y.OP_RETURN_STANDARD_SIZE&&this.chunks[1].length===this.chunks.len)};Y.prototype.getData=function(){if(this.isDataOut()||this.isScriptHashOut()||this.isWitnessScriptHashOut()||this.isWitnessPublicKeyHashOut()||this.isTaproot())return this.chunks[1]==null?Buffer.alloc(0):Buffer.from(this.chunks[1].buf);if(this.isPublicKeyHashOut())return Buffer.from(this.chunks[2].buf);throw new Error("Unrecognized script type to get data from")};Y.prototype.isPushOnly=function(){return this.chunks.every(function(e){return e.opcodenum<=pe.OP_16})};Y.types={};Y.types.UNKNOWN="Unknown";Y.types.PUBKEY_OUT="Pay to public key";Y.types.PUBKEY_IN="Spend from public key";Y.types.PUBKEYHASH_OUT="Pay to public key hash";Y.types.PUBKEYHASH_IN="Spend from public key hash";Y.types.SCRIPTHASH_OUT="Pay to script hash";Y.types.SCRIPTHASH_IN="Spend from script hash";Y.types.MULTISIG_OUT="Pay to multisig";Y.types.MULTISIG_IN="Spend from multisig";Y.types.DATA_OUT="Data push";Y.OP_RETURN_STANDARD_SIZE=80;Y.prototype.classify=function(){if(this._isInput)return this.classifyInput();if(this._isOutput)return this.classifyOutput();var e=this.classifyOutput();return e!=Y.types.UNKNOWN?e:this.classifyInput()};Y.outputIdentifiers={};Y.outputIdentifiers.PUBKEY_OUT=Y.prototype.isPublicKeyOut;Y.outputIdentifiers.PUBKEYHASH_OUT=Y.prototype.isPublicKeyHashOut;Y.outputIdentifiers.MULTISIG_OUT=Y.prototype.isMultisigOut;Y.outputIdentifiers.SCRIPTHASH_OUT=Y.prototype.isScriptHashOut;Y.outputIdentifiers.DATA_OUT=Y.prototype.isDataOut;Y.prototype.classifyOutput=function(){for(var e in Y.outputIdentifiers)if(Y.outputIdentifiers[e].bind(this)())return Y.types[e];return Y.types.UNKNOWN};Y.inputIdentifiers={};Y.inputIdentifiers.PUBKEY_IN=Y.prototype.isPublicKeyIn;Y.inputIdentifiers.PUBKEYHASH_IN=Y.prototype.isPublicKeyHashIn;Y.inputIdentifiers.MULTISIG_IN=Y.prototype.isMultisigIn;Y.inputIdentifiers.SCRIPTHASH_IN=Y.prototype.isScriptHashIn;Y.prototype.classifyInput=function(){for(var e in Y.inputIdentifiers)if(Y.inputIdentifiers[e].bind(this)())return Y.types[e];return Y.types.UNKNOWN};Y.prototype.isStandard=function(){return this.classify()!==Y.types.UNKNOWN};Y.prototype.prepend=function(e){return this._addByType(e,!0),this};Y.prototype.equals=function(e){if(gr.checkState(e instanceof Y,"Must provide another script"),this.chunks.length!==e.chunks.length)return!1;var t;for(t=0;t<this.chunks.length;t++){if(oi.isBuffer(this.chunks[t].buf)&&!oi.isBuffer(e.chunks[t].buf)||oi.isBuffer(this.chunks[t].buf)&&!oi.equals(this.chunks[t].buf,e.chunks[t].buf))return!1;if(this.chunks[t].opcodenum!==e.chunks[t].opcodenum)return!1}return!0};Y.prototype.add=function(e){return this._addByType(e,!1),this};Y.prototype._addByType=function(e,t){if(typeof e=="string")this._addOpcode(e,t);else if(typeof e=="number")this._addOpcode(e,t);else if(e instanceof pe)this._addOpcode(e,t);else if(oi.isBuffer(e))this._addBuffer(e,t);else if(e instanceof Y)this.chunks=this.chunks.concat(e.chunks);else if(typeof e=="object")this._insertAtPosition(e,t);else throw new Error("Invalid script chunk")};Y.prototype._insertAtPosition=function(e,t){t?this.chunks.unshift(e):this.chunks.push(e)};Y.prototype._addOpcode=function(e,t){var r;return typeof e=="number"?r=e:e instanceof pe?r=e.toNumber():r=pe(e).toNumber(),this._insertAtPosition({opcodenum:r},t),this};Y.prototype._addBuffer=function(e,t){var r,i=e.length;if(i>=0&&i<pe.OP_PUSHDATA1)r=i;else if(i<Math.pow(2,8))r=pe.OP_PUSHDATA1;else if(i<Math.pow(2,16))r=pe.OP_PUSHDATA2;else if(i<Math.pow(2,32))r=pe.OP_PUSHDATA4;else throw new Error("You can't push that much data");return this._insertAtPosition({buf:e,len:i,opcodenum:r},t),this};Y.prototype.hasCodeseparators=function(){for(var e=0;e<this.chunks.length;e++)if(this.chunks[e].opcodenum===pe.OP_CODESEPARATOR)return!0;return!1};Y.prototype.removeCodeseparators=function(){for(var e=[],t=0;t<this.chunks.length;t++)this.chunks[t].opcodenum!==pe.OP_CODESEPARATOR&&e.push(this.chunks[t]);return this.chunks=e,this};Y.buildMultisigOut=function(e,t,r){gr.checkArgument(t<=e.length,"Number of required signatures must be less than or equal to the number of public keys"),r=r||{};var i=new Y;i.add(pe.smallInt(t)),e=e.map(ja);var n=e;r.noSorting||(n=Jm.sortBy(e,function(h){return h.toString("hex")}));for(var a=0;a<n.length;a++){var u=n[a];i.add(u.toBuffer())}return i.add(pe.smallInt(e.length)),i.add(pe.OP_CHECKMULTISIG),i};Y.buildWitnessMultisigOutFromScript=function(e){if(e instanceof Y){var t=new Y;return t.add(pe.OP_0),t.add(uh.sha256(e.toBuffer())),t}else throw new TypeError("First argument is expected to be a p2sh script")};Y.buildMultisigIn=function(e,t,r,i){gr.checkArgument(Array.isArray(e)),gr.checkArgument(!isNaN(t)),gr.checkArgument(Array.isArray(r)),i=i||{};var n=new Y;n.add(pe.OP_0);for(let a of r)gr.checkArgument(oi.isBuffer(a),"Signatures must be an array of Buffers"),n.add(a);return n};Y.buildP2SHMultisigIn=function(e,t,r,i){gr.checkArgument(Array.isArray(e)),gr.checkArgument(!isNaN(t)),gr.checkArgument(Array.isArray(r)),i=i||{};var n=new Y;n.add(pe.OP_0);for(let a of r)gr.checkArgument(oi.isBuffer(a),"Signatures must be an array of Buffers"),n.add(a);return n.add((i.cachedMultisig||Y.buildMultisigOut(e,t,i)).toBuffer()),n};Y.buildPublicKeyHashOut=function(e){gr.checkArgument(e!=null),gr.checkArgument(e instanceof ja||e instanceof ai||typeof e=="string"),e instanceof ja?e=e.toAddress():typeof e=="string"&&(e=new ai(e));var t=new Y;return t.add(pe.OP_DUP).add(pe.OP_HASH160).add(e.hashBuffer).add(pe.OP_EQUALVERIFY).add(pe.OP_CHECKSIG),t._network=e.network,t};Y.buildWitnessV0Out=function(e){gr.checkArgument(e!=null),gr.checkArgument(e instanceof ja||e instanceof ai||typeof e=="string"),e instanceof ja?e=e.toAddress(null,ai.PayToWitnessPublicKeyHash):typeof e=="string"&&(e=new ai(e));var t=new Y;return t.add(pe.OP_0).add(e.hashBuffer),t._network=e.network,t};Y.buildPublicKeyOut=function(e){gr.checkArgument(e instanceof ja);var t=new Y;return t.add(e.toBuffer()).add(pe.OP_CHECKSIG),t};Y.buildDataOut=function(e,t){gr.checkArgument(e==null||typeof e=="string"||oi.isBuffer(e)),typeof e=="string"&&(e=Buffer.from(e,t));var r=new Y;return r.add(pe.OP_RETURN),e!=null&&r.add(e),r};Y.buildScriptHashOut=function(e){gr.checkArgument(e instanceof Y||e instanceof ai&&e.isPayToScriptHash());var t=new Y;return t.add(pe.OP_HASH160).add(e instanceof ai?e.hashBuffer:uh.sha256ripemd160(e.toBuffer())).add(pe.OP_EQUAL),t._network=e._network||e.network,t};Y.buildPublicKeyIn=function(e,t){gr.checkArgument(e instanceof Lo||oi.isBuffer(e)),gr.checkArgument(t==null||!isNaN(t)),e instanceof Lo&&(e=e.toBuffer());var r=new Y;return r.add(oi.concat([e,oi.integerAsSingleByteBuffer(t||Lo.SIGHASH_ALL)])),r};Y.buildPublicKeyHashIn=function(e,t,r){gr.checkArgument(t instanceof Lo||oi.isBuffer(t)),gr.checkArgument(r==null||!isNaN(r)),t instanceof Lo&&(t=t.toBuffer());var i=new Y().add(oi.concat([t,oi.integerAsSingleByteBuffer(r||Lo.SIGHASH_ALL)])).add(new ja(e).toBuffer());return i};Y.empty=function(){return new Y};Y.prototype.toScriptHashOut=function(){return Y.buildScriptHashOut(this)};Y.fromAddress=function(e){if(e=ai(e),e.isPayToScriptHash())return Y.buildScriptHashOut(e);if(e.isPayToPublicKeyHash())return Y.buildPublicKeyHashOut(e);if(e.isPayToWitnessPublicKeyHash())return Y.buildWitnessV0Out(e);if(e.isPayToWitnessScriptHash())return Y.buildWitnessV0Out(e);throw new Qm.Script.UnrecognizedAddress(e)};Y.prototype.getAddressInfo=function(e){if(this._isInput)return this._getInputAddressInfo();if(this._isOutput)return this._getOutputAddressInfo();var t=this._getOutputAddressInfo();return t||this._getInputAddressInfo()};Y.prototype._getOutputAddressInfo=function(){var e={};if(this.isScriptHashOut())e.hashBuffer=this.getData(),e.type=ai.PayToScriptHash;else if(this.isPublicKeyHashOut())e.hashBuffer=this.getData(),e.type=ai.PayToPublicKeyHash;else if(this.isWitnessScriptHashOut())e.hashBuffer=this.getData(),e.type=ai.PayToWitnessScriptHash;else if(this.isWitnessPublicKeyHashOut())e.hashBuffer=this.getData(),e.type=ai.PayToWitnessPublicKeyHash;else if(this.isTaproot())e.hashBuffer=this.getData(),e.type=ai.PayToTaproot;else return!1;return e};Y.prototype._getInputAddressInfo=function(){var e={};if(this.isPublicKeyHashIn())e.hashBuffer=uh.sha256ripemd160(this.chunks[1].buf),e.type=ai.PayToPublicKeyHash;else if(this.isScriptHashIn())e.hashBuffer=uh.sha256ripemd160(this.chunks[this.chunks.length-1].buf),e.type=ai.PayToScriptHash;else return!1;return e};Y.prototype.toAddress=function(e){var t=this.getAddressInfo();return t?(t.network=nw.get(e)||this._network||nw.defaultNetwork,new ai(t)):!1};Y.prototype.findAndDelete=function(e){for(var t=e.toBuffer(),r=t.toString("hex"),i=0;i<this.chunks.length;i++){var n=Y({chunks:[this.chunks[i]]}),a=n.toBuffer(),u=a.toString("hex");r===u&&this.chunks.splice(i,1)}return this};Y.prototype.checkMinimalPush=function(e){var t=this.chunks[e],r=t.buf,i=t.opcodenum;return r?r.length===0?i===pe.OP_0:r.length===1&&r[0]>=1&&r[0]<=16?i===pe.OP_1+(r[0]-1):r.length===1&&r[0]===129?i===pe.OP_1NEGATE:r.length<=75?i===r.length:r.length<=255?i===pe.OP_PUSHDATA1:r.length<=65535?i===pe.OP_PUSHDATA2:!0:!0};Y.prototype._decodeOP_N=function(e){if(e===pe.OP_0)return 0;if(e>=pe.OP_1&&e<=pe.OP_16)return e-(pe.OP_1-1);throw new Error("Invalid opcode: "+JSON.stringify(e))};Y.prototype.getSignatureOperationsCount=function(e){e=e??!0;var t=0,r=pe.OP_INVALIDOPCODE;for(let n of this.chunks){var i=n.opcodenum;i==pe.OP_CHECKSIG||i==pe.OP_CHECKSIGVERIFY?t++:(i==pe.OP_CHECKMULTISIG||i==pe.OP_CHECKMULTISIGVERIFY)&&(e&&r>=pe.OP_1&&r<=pe.OP_16?t+=this._decodeOP_N(r):t+=20),r=i}return t};sw.exports=Y});var ow=W((hz,aw)=>{aw.exports=function(e,t){if(typeof e.compare=="function")return e.compare(t);if(e===t)return 0;for(var r=e.length,i=t.length,n=0,a=Math.min(r,i);n<a&&e[n]===t[n];)++n;return n!==a&&(r=e[n],i=t[n]),r<i?-1:i<r?1:0}});var xs=W((mz,lw)=>{"use strict";var fh=vt(),tv=Zr(),dz=require("buffer"),uw=hr(),rv=Lr(),fw=yi(),iv=Mi(),cw=It(),bN=Yi(),xN=9007199254740991;function ci(e){if(!(this instanceof ci))return new ci(e);if(fh.isObject(e))if(this.satoshis=e.satoshis,uw.isBuffer(e.script))this._scriptBuffer=e.script;else{var t;fh.isString(e.script)&&rv.isHexa(e.script)?t=Buffer.from(e.script,"hex"):t=e.script,this.setScript(t)}else throw new TypeError("Unrecognized argument for Output")}Object.defineProperty(ci.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this._script?this._script:(this.setScriptFromBuffer(this._scriptBuffer),this._script)}});Object.defineProperty(ci.prototype,"satoshis",{configurable:!1,enumerable:!0,get:function(){return this._satoshis},set:function(e){e instanceof tv?(this._satoshisBN=e,this._satoshis=e.toNumber()):fh.isString(e)?(this._satoshis=parseInt(e),this._satoshisBN=tv.fromNumber(this._satoshis)):(cw.checkArgument(rv.isNaturalNumber(e),"Output satoshis is not a natural number"),this._satoshisBN=tv.fromNumber(e),this._satoshis=e),cw.checkState(rv.isNaturalNumber(this._satoshis),"Output satoshis is not a natural number")}});ci.prototype.invalidSatoshis=function(){return this._satoshis>xN?"transaction txout satoshis greater than max safe integer":this._satoshis!==this._satoshisBN.toNumber()?"transaction txout satoshis has corrupted value":this._satoshis<0?"transaction txout negative":!1};ci.prototype.toObject=ci.prototype.toJSON=function(){var t={satoshis:this.satoshis};return t.script=this._scriptBuffer.toString("hex"),t};ci.fromObject=function(e){return new ci(e)};ci.prototype.setScriptFromBuffer=function(e){this._scriptBuffer=e;try{this._script=iv.fromBuffer(this._scriptBuffer),this._script._isOutput=!0}catch(t){if(t instanceof bN.Script.InvalidBuffer)this._script=null;else throw t}};ci.prototype.setScript=function(e){if(e instanceof iv)this._scriptBuffer=e.toBuffer(),this._script=e,this._script._isOutput=!0;else if(fh.isString(e))this._script=iv.fromString(e),this._scriptBuffer=this._script.toBuffer(),this._script._isOutput=!0;else if(uw.isBuffer(e))this.setScriptFromBuffer(e);else throw new TypeError("Invalid argument type: script");return this};ci.prototype.inspect=function(){var e;return this.script?e=this.script.inspect():e=this._scriptBuffer.toString("hex"),"<Output ("+this.satoshis+" sats) "+e+">"};ci.fromBufferReader=function(e){var t={};t.satoshis=e.readUInt64LEBN();var r=e.readVarintNum();return r!==0?t.script=e.read(r):t.script=Buffer.from([]),new ci(t)};ci.prototype.toBufferWriter=function(e){e||(e=new fw),e.writeUInt64LEBN(this._satoshisBN);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e};ci.prototype.calculateSize=function(){let e=8;return e+=fw.varintBufNum(this._scriptBuffer.length).length,e+=this._scriptBuffer.length,e};lw.exports=ci});var pw=W((vz,_N)=>{_N.exports={name:"bigi",version:"1.4.2",description:"Big integers.",keywords:["cryptography","math","bitcoin","arbitrary","precision","arithmetic","big","integer","int","number","biginteger","bigint","bignumber","decimal","float"],devDependencies:{coveralls:"^2.11.2",istanbul:"^0.3.5",jshint:"^2.5.1",mocha:"^2.1.0",mochify:"^2.1.0"},repository:{url:"https://github.com/cryptocoinjs/bigi",type:"git"},main:"./lib/index.js",scripts:{"browser-test":"./node_modules/.bin/mochify --wd -R spec",test:"./node_modules/.bin/_mocha -- test/*.js",jshint:"./node_modules/.bin/jshint --config jshint.json lib/*.js ; true",unit:"./node_modules/.bin/mocha",coverage:"./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js",coveralls:"npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info"},dependencies:{},testling:{files:"test/*.js",harness:"mocha",browsers:["ie/9..latest","firefox/latest","chrome/latest","safari/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]}}});var av=W((gz,bw)=>{function ge(e,t,r){if(!(this instanceof ge))return new ge(e,t,r);e!=null&&(typeof e=="number"?this.fromNumber(e,t,r):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}var ve=ge.prototype;ve.__bigi=pw().version;ge.isBigInteger=function(e,t){return e&&e.__bigi&&(!t||e.__bigi===ve.__bigi)};var eu;function yN(e,t,r,i,n,a){for(;--a>=0;){var u=t*this[e++]+r[i]+n;n=Math.floor(u/67108864),r[i++]=u&67108863}return n}ge.prototype.am=yN;eu=26;ge.prototype.DB=eu;ge.prototype.DM=(1<<eu)-1;var wN=ge.prototype.DV=1<<eu,nv=52;ge.prototype.FV=Math.pow(2,nv);ge.prototype.F1=nv-eu;ge.prototype.F2=2*eu-nv;var SN="0123456789abcdefghijklmnopqrstuvwxyz",lh=new Array,tu,xn;tu=48;for(xn=0;xn<=9;++xn)lh[tu++]=xn;tu=97;for(xn=10;xn<36;++xn)lh[tu++]=xn;tu=65;for(xn=10;xn<36;++xn)lh[tu++]=xn;function hw(e){return SN.charAt(e)}function dw(e,t){var r=lh[e.charCodeAt(t)];return r??-1}function EN(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function TN(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+wN:this.t=0}function ta(e){var t=new ge;return t.fromInt(e),t}function IN(e,t){var r=this,i;if(t==16)i=4;else if(t==8)i=3;else if(t==256)i=8;else if(t==2)i=1;else if(t==32)i=5;else if(t==4)i=2;else{r.fromRadix(e,t);return}r.t=0,r.s=0;for(var n=e.length,a=!1,u=0;--n>=0;){var h=i==8?e[n]&255:dw(e,n);if(h<0){e.charAt(n)=="-"&&(a=!0);continue}a=!1,u==0?r[r.t++]=h:u+i>r.DB?(r[r.t-1]|=(h&(1<<r.DB-u)-1)<<u,r[r.t++]=h>>r.DB-u):r[r.t-1]|=h<<u,u+=i,u>=r.DB&&(u-=r.DB)}i==8&&e[0]&128&&(r.s=-1,u>0&&(r[r.t-1]|=(1<<r.DB-u)-1<<u)),r.clamp(),a&&ge.ZERO.subTo(r,r)}function RN(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t}function AN(e){var t=this;if(t.s<0)return"-"+t.negate().toString(e);var r;if(e==16)r=4;else if(e==8)r=3;else if(e==2)r=1;else if(e==32)r=5;else if(e==4)r=2;else return t.toRadix(e);var i=(1<<r)-1,n,a=!1,u="",h=t.t,b=t.DB-h*t.DB%r;if(h-- >0)for(b<t.DB&&(n=t[h]>>b)>0&&(a=!0,u=hw(n));h>=0;)b<r?(n=(t[h]&(1<<b)-1)<<r-b,n|=t[--h]>>(b+=t.DB-r)):(n=t[h]>>(b-=r)&i,b<=0&&(b+=t.DB,--h)),n>0&&(a=!0),a&&(u+=hw(n));return a?u:"0"}function ON(){var e=new ge;return ge.ZERO.subTo(this,e),e}function kN(){return this.s<0?this.negate():this}function NN(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;if(t=r-e.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this[r]-e[r])!=0)return t;return 0}function ph(e){var t=1,r;return(r=e>>>16)!=0&&(e=r,t+=16),(r=e>>8)!=0&&(e=r,t+=8),(r=e>>4)!=0&&(e=r,t+=4),(r=e>>2)!=0&&(e=r,t+=2),(r=e>>1)!=0&&(e=r,t+=1),t}function PN(){return this.t<=0?0:this.DB*(this.t-1)+ph(this[this.t-1]^this.s&this.DM)}function BN(){return this.bitLength()>>3}function MN(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s}function CN(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s}function LN(e,t){var r=this,i=e%r.DB,n=r.DB-i,a=(1<<n)-1,u=Math.floor(e/r.DB),h=r.s<<i&r.DM,b;for(b=r.t-1;b>=0;--b)t[b+u+1]=r[b]>>n|h,h=(r[b]&a)<<i;for(b=u-1;b>=0;--b)t[b]=0;t[u]=h,t.t=r.t+u+1,t.s=r.s,t.clamp()}function DN(e,t){var r=this;t.s=r.s;var i=Math.floor(e/r.DB);if(i>=r.t){t.t=0;return}var n=e%r.DB,a=r.DB-n,u=(1<<n)-1;t[0]=r[i]>>n;for(var h=i+1;h<r.t;++h)t[h-i-1]|=(r[h]&u)<<a,t[h-i]=r[h]>>n;n>0&&(t[r.t-i-1]|=(r.s&u)<<a),t.t=r.t-i,t.clamp()}function UN(e,t){for(var r=this,i=0,n=0,a=Math.min(e.t,r.t);i<a;)n+=r[i]-e[i],t[i++]=n&r.DM,n>>=r.DB;if(e.t<r.t){for(n-=e.s;i<r.t;)n+=r[i],t[i++]=n&r.DM,n>>=r.DB;n+=r.s}else{for(n+=r.s;i<e.t;)n-=e[i],t[i++]=n&r.DM,n>>=r.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[i++]=r.DV+n:n>0&&(t[i++]=n),t.t=i,t.clamp()}function qN(e,t){var r=this.abs(),i=e.abs(),n=r.t;for(t.t=n+i.t;--n>=0;)t[n]=0;for(n=0;n<i.t;++n)t[n+r.t]=r.am(0,i[n],t,n,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&ge.ZERO.subTo(t,t)}function FN(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var i=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,i,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()}function HN(e,t,r){var i=this,n=e.abs();if(!(n.t<=0)){var a=i.abs();if(a.t<n.t){t?.fromInt(0),r!=null&&i.copyTo(r);return}r==null&&(r=new ge);var u=new ge,h=i.s,b=e.s,w=i.DB-ph(n[n.t-1]);w>0?(n.lShiftTo(w,u),a.lShiftTo(w,r)):(n.copyTo(u),a.copyTo(r));var T=u.t,I=u[T-1];if(I!=0){var B=I*(1<<i.F1)+(T>1?u[T-2]>>i.F2:0),M=i.FV/B,P=(1<<i.F1)/B,L=1<<i.F2,X=r.t,V=X-T,q=t??new ge;for(u.dlShiftTo(V,q),r.compareTo(q)>=0&&(r[r.t++]=1,r.subTo(q,r)),ge.ONE.dlShiftTo(T,q),q.subTo(u,u);u.t<T;)u[u.t++]=0;for(;--V>=0;){var ee=r[--X]==I?i.DM:Math.floor(r[X]*M+(r[X-1]+L)*P);if((r[X]+=u.am(0,ee,r,V,0,T))<ee)for(u.dlShiftTo(V,q),r.subTo(q,r);r[X]<--ee;)r.subTo(q,r)}t!=null&&(r.drShiftTo(T,t),h!=b&&ge.ZERO.subTo(t,t)),r.t=T,r.clamp(),w>0&&r.rShiftTo(w,r),h<0&&ge.ZERO.subTo(r,r)}}}function zN(e){var t=new ge;return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(ge.ZERO)>0&&e.subTo(t,t),t}function Do(e){this.m=e}function jN(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function VN(e){return e}function KN(e){e.divRemTo(this.m,null,e)}function WN(e,t,r){e.multiplyTo(t,r),this.reduce(r)}function GN(e,t){e.squareTo(t),this.reduce(t)}Do.prototype.convert=jN;Do.prototype.revert=VN;Do.prototype.reduce=KN;Do.prototype.mulTo=WN;Do.prototype.sqrTo=GN;function $N(){if(this.t<1)return 0;var e=this[0];if(!(e&1))return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function Uo(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function XN(e){var t=new ge;return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(ge.ZERO)>0&&this.m.subTo(t,t),t}function YN(e){var t=new ge;return e.copyTo(t),this.reduce(t),t}function ZN(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=e[t]&32767,i=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e[r]+=this.m.am(0,i,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function JN(e,t){e.squareTo(t),this.reduce(t)}function QN(e,t,r){e.multiplyTo(t,r),this.reduce(r)}Uo.prototype.convert=XN;Uo.prototype.revert=YN;Uo.prototype.reduce=ZN;Uo.prototype.mulTo=QN;Uo.prototype.sqrTo=JN;function eP(){return(this.t>0?this[0]&1:this.s)==0}function tP(e,t){if(e>4294967295||e<1)return ge.ONE;var r=new ge,i=new ge,n=t.convert(this),a=ph(e)-1;for(n.copyTo(r);--a>=0;)if(t.sqrTo(r,i),(e&1<<a)>0)t.mulTo(i,n,r);else{var u=r;r=i,i=u}return t.revert(r)}function rP(e,t){var r;return e<256||t.isEven()?r=new Do(t):r=new Uo(t),this.exp(e,r)}ve.copyTo=EN;ve.fromInt=TN;ve.fromString=IN;ve.clamp=RN;ve.dlShiftTo=MN;ve.drShiftTo=CN;ve.lShiftTo=LN;ve.rShiftTo=DN;ve.subTo=UN;ve.multiplyTo=qN;ve.squareTo=FN;ve.divRemTo=HN;ve.invDigit=$N;ve.isEven=eP;ve.exp=tP;ve.toString=AN;ve.negate=ON;ve.abs=kN;ve.compareTo=NN;ve.bitLength=PN;ve.byteLength=BN;ve.mod=zN;ve.modPowInt=rP;function iP(){var e=new ge;return this.copyTo(e),e}function nP(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function sP(){return this.t==0?this.s:this[0]<<24>>24}function aP(){return this.t==0?this.s:this[0]<<16>>16}function oP(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function cP(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function uP(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),i=ta(r),n=new ge,a=new ge,u="";for(this.divRemTo(i,n,a);n.signum()>0;)u=(r+a.intValue()).toString(e).substr(1)+u,n.divRemTo(i,n,a);return a.intValue().toString(e)+u}function fP(e,t){var r=this;r.fromInt(0),t==null&&(t=10);for(var i=r.chunkSize(t),n=Math.pow(t,i),a=!1,u=0,h=0,b=0;b<e.length;++b){var w=dw(e,b);if(w<0){e.charAt(b)=="-"&&r.signum()==0&&(a=!0);continue}h=t*h+w,++u>=i&&(r.dMultiply(n),r.dAddOffset(h,0),u=0,h=0)}u>0&&(r.dMultiply(Math.pow(t,u)),r.dAddOffset(h,0)),a&&ge.ZERO.subTo(r,r)}function lP(e,t,r){var i=this;if(typeof t=="number")if(e<2)i.fromInt(1);else for(i.fromNumber(e,r),i.testBit(e-1)||i.bitwiseTo(ge.ONE.shiftLeft(e-1),sv,i),i.isEven()&&i.dAddOffset(1,0);!i.isProbablePrime(t);)i.dAddOffset(2,0),i.bitLength()>e&&i.subTo(ge.ONE.shiftLeft(e-1),i);else{var n=new Array,a=e&7;n.length=(e>>3)+1,t.nextBytes(n),a>0?n[0]&=(1<<a)-1:n[0]=0,i.fromString(n,256)}}function pP(){var e=this,t=e.t,r=new Array;r[0]=e.s;var i=e.DB-t*e.DB%8,n,a=0;if(t-- >0)for(i<e.DB&&(n=e[t]>>i)!=(e.s&e.DM)>>i&&(r[a++]=n|e.s<<e.DB-i);t>=0;)i<8?(n=(e[t]&(1<<i)-1)<<8-i,n|=e[--t]>>(i+=e.DB-8)):(n=e[t]>>(i-=8)&255,i<=0&&(i+=e.DB,--t)),n&128&&(n|=-256),a===0&&(e.s&128)!=(n&128)&&++a,(a>0||n!=e.s)&&(r[a++]=n);return r}function hP(e){return this.compareTo(e)==0}function dP(e){return this.compareTo(e)<0?this:e}function mP(e){return this.compareTo(e)>0?this:e}function vP(e,t,r){var i=this,n,a,u=Math.min(e.t,i.t);for(n=0;n<u;++n)r[n]=t(i[n],e[n]);if(e.t<i.t){for(a=e.s&i.DM,n=u;n<i.t;++n)r[n]=t(i[n],a);r.t=i.t}else{for(a=i.s&i.DM,n=u;n<e.t;++n)r[n]=t(a,e[n]);r.t=e.t}r.s=t(i.s,e.s),r.clamp()}function gP(e,t){return e&t}function bP(e){var t=new ge;return this.bitwiseTo(e,gP,t),t}function sv(e,t){return e|t}function xP(e){var t=new ge;return this.bitwiseTo(e,sv,t),t}function mw(e,t){return e^t}function _P(e){var t=new ge;return this.bitwiseTo(e,mw,t),t}function vw(e,t){return e&~t}function yP(e){var t=new ge;return this.bitwiseTo(e,vw,t),t}function wP(){for(var e=new ge,t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e}function SP(e){var t=new ge;return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function EP(e){var t=new ge;return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function TP(e){if(e==0)return-1;var t=0;return e&65535||(e>>=16,t+=16),e&255||(e>>=8,t+=8),e&15||(e>>=4,t+=4),e&3||(e>>=2,t+=2),e&1||++t,t}function IP(){for(var e=0;e<this.t;++e)if(this[e]!=0)return e*this.DB+TP(this[e]);return this.s<0?this.t*this.DB:-1}function RP(e){for(var t=0;e!=0;)e&=e-1,++t;return t}function AP(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=RP(this[r]^t);return e}function OP(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this[t]&1<<e%this.DB)!=0}function kP(e,t){var r=ge.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r}function NP(e){return this.changeBit(e,sv)}function PP(e){return this.changeBit(e,vw)}function BP(e){return this.changeBit(e,mw)}function MP(e,t){for(var r=this,i=0,n=0,a=Math.min(e.t,r.t);i<a;)n+=r[i]+e[i],t[i++]=n&r.DM,n>>=r.DB;if(e.t<r.t){for(n+=e.s;i<r.t;)n+=r[i],t[i++]=n&r.DM,n>>=r.DB;n+=r.s}else{for(n+=r.s;i<e.t;)n+=e[i],t[i++]=n&r.DM,n>>=r.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[i++]=n:n<-1&&(t[i++]=r.DV+n),t.t=i,t.clamp()}function CP(e){var t=new ge;return this.addTo(e,t),t}function LP(e){var t=new ge;return this.subTo(e,t),t}function DP(e){var t=new ge;return this.multiplyTo(e,t),t}function UP(){var e=new ge;return this.squareTo(e),e}function qP(e){var t=new ge;return this.divRemTo(e,t,null),t}function FP(e){var t=new ge;return this.divRemTo(e,null,t),t}function HP(e){var t=new ge,r=new ge;return this.divRemTo(e,t,r),new Array(t,r)}function zP(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function jP(e,t){if(e!=0){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}}function wf(){}function gw(e){return e}function VP(e,t,r){e.multiplyTo(t,r)}function KP(e,t){e.squareTo(t)}wf.prototype.convert=gw;wf.prototype.revert=gw;wf.prototype.mulTo=VP;wf.prototype.sqrTo=KP;function WP(e){return this.exp(e,new wf)}function GP(e,t,r){var i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;var n;for(n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,e[i],r,i,0,this.t);for(n=Math.min(e.t,t);i<n;++i)this.am(0,e[i],r,i,0,t-i);r.clamp()}function $P(e,t,r){--t;var i=r.t=this.t+e.t-t;for(r.s=0;--i>=0;)r[i]=0;for(i=Math.max(t-this.t,0);i<e.t;++i)r[this.t+i-t]=this.am(t-i,e[i],r,0,0,this.t+i-t);r.clamp(),r.drShiftTo(1,r)}function ru(e){this.r2=new ge,this.q3=new ge,ge.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function XP(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=new ge;return e.copyTo(t),this.reduce(t),t}function YP(e){return e}function ZP(e){var t=this;for(e.drShiftTo(t.m.t-1,t.r2),e.t>t.m.t+1&&(e.t=t.m.t+1,e.clamp()),t.mu.multiplyUpperTo(t.r2,t.m.t+1,t.q3),t.m.multiplyLowerTo(t.q3,t.m.t+1,t.r2);e.compareTo(t.r2)<0;)e.dAddOffset(1,t.m.t+1);for(e.subTo(t.r2,e);e.compareTo(t.m)>=0;)e.subTo(t.m,e)}function JP(e,t){e.squareTo(t),this.reduce(t)}function QP(e,t,r){e.multiplyTo(t,r),this.reduce(r)}ru.prototype.convert=XP;ru.prototype.revert=YP;ru.prototype.reduce=ZP;ru.prototype.mulTo=QP;ru.prototype.sqrTo=JP;function eB(e,t){var r=e.bitLength(),i,n=ta(1),a;if(r<=0)return n;r<18?i=1:r<48?i=3:r<144?i=4:r<768?i=5:i=6,r<8?a=new Do(t):t.isEven()?a=new ru(t):a=new Uo(t);var u=new Array,h=3,b=i-1,w=(1<<i)-1;if(u[1]=a.convert(this),i>1){var T=new ge;for(a.sqrTo(u[1],T);h<=w;)u[h]=new ge,a.mulTo(T,u[h-2],u[h]),h+=2}var I=e.t-1,B,M=!0,P=new ge,L;for(r=ph(e[I])-1;I>=0;){for(r>=b?B=e[I]>>r-b&w:(B=(e[I]&(1<<r+1)-1)<<b-r,I>0&&(B|=e[I-1]>>this.DB+r-b)),h=i;!(B&1);)B>>=1,--h;if((r-=h)<0&&(r+=this.DB,--I),M)u[B].copyTo(n),M=!1;else{for(;h>1;)a.sqrTo(n,P),a.sqrTo(P,n),h-=2;h>0?a.sqrTo(n,P):(L=n,n=P,P=L),a.mulTo(P,u[B],n)}for(;I>=0&&!(e[I]&1<<r);)a.sqrTo(n,P),L=n,n=P,P=L,--r<0&&(r=this.DB-1,--I)}return a.revert(n)}function tB(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var i=t;t=r,r=i}var n=t.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return t;for(n<a&&(a=n),a>0&&(t.rShiftTo(a,t),r.rShiftTo(a,r));t.signum()>0;)(n=t.getLowestSetBit())>0&&t.rShiftTo(n,t),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r}function rB(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this[0]%e;else for(var i=this.t-1;i>=0;--i)r=(t*r+this[i])%e;return r}function iB(e){var t=e.isEven();if(this.signum()===0)throw new Error("division by zero");if(this.isEven()&&t||e.signum()==0)return ge.ZERO;for(var r=e.clone(),i=this.clone(),n=ta(1),a=ta(0),u=ta(0),h=ta(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!n.isEven()||!a.isEven())&&(n.addTo(this,n),a.subTo(e,a)),n.rShiftTo(1,n)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),t?((!u.isEven()||!h.isEven())&&(u.addTo(this,u),h.subTo(e,h)),u.rShiftTo(1,u)):h.isEven()||h.subTo(e,h),h.rShiftTo(1,h);r.compareTo(i)>=0?(r.subTo(i,r),t&&n.subTo(u,n),a.subTo(h,a)):(i.subTo(r,i),t&&u.subTo(n,u),h.subTo(a,h))}if(i.compareTo(ge.ONE)!=0)return ge.ZERO;for(;h.compareTo(e)>=0;)h.subTo(e,h);for(;h.signum()<0;)h.addTo(e,h);return h}var wi=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],nB=(1<<26)/wi[wi.length-1];function sB(e){var t,r=this.abs();if(r.t==1&&r[0]<=wi[wi.length-1]){for(t=0;t<wi.length;++t)if(r[0]==wi[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<wi.length;){for(var i=wi[t],n=t+1;n<wi.length&&i<nB;)i*=wi[n++];for(i=r.modInt(i);t<n;)if(i%wi[t++]==0)return!1}return r.millerRabin(e)}function aB(e){var t=this.subtract(ge.ONE),r=t.getLowestSetBit();if(r<=0)return!1;var i=t.shiftRight(r);e=e+1>>1,e>wi.length&&(e=wi.length);for(var n=new ge(null),a,u=[],h=0;h<e;++h){for(;a=wi[Math.floor(Math.random()*wi.length)],u.indexOf(a)!=-1;);u.push(a),n.fromInt(a);var b=n.modPow(i,this);if(b.compareTo(ge.ONE)!=0&&b.compareTo(t)!=0){for(var a=1;a++<r&&b.compareTo(t)!=0;)if(b=b.modPowInt(2,this),b.compareTo(ge.ONE)==0)return!1;if(b.compareTo(t)!=0)return!1}}return!0}ve.chunkSize=oP;ve.toRadix=uP;ve.fromRadix=fP;ve.fromNumber=lP;ve.bitwiseTo=vP;ve.changeBit=kP;ve.addTo=MP;ve.dMultiply=zP;ve.dAddOffset=jP;ve.multiplyLowerTo=GP;ve.multiplyUpperTo=$P;ve.modInt=rB;ve.millerRabin=aB;ve.clone=iP;ve.intValue=nP;ve.byteValue=sP;ve.shortValue=aP;ve.signum=cP;ve.toByteArray=pP;ve.equals=hP;ve.min=dP;ve.max=mP;ve.and=bP;ve.or=xP;ve.xor=_P;ve.andNot=yP;ve.not=wP;ve.shiftLeft=SP;ve.shiftRight=EP;ve.getLowestSetBit=IP;ve.bitCount=AP;ve.testBit=OP;ve.setBit=NP;ve.clearBit=PP;ve.flipBit=BP;ve.add=CP;ve.subtract=LP;ve.multiply=DP;ve.divide=qP;ve.remainder=FP;ve.divideAndRemainder=HP;ve.modPow=eB;ve.modInverse=iB;ve.pow=WP;ve.gcd=tB;ve.isProbablePrime=sB;ve.square=UP;ge.ZERO=ta(0);ge.ONE=ta(1);ge.valueOf=ta;bw.exports=ge});var _w=W(()=>{var xw=require("assert"),pi=av();pi.fromByteArrayUnsigned=function(e){return e[0]&128?new pi([0].concat(e)):new pi(e)};pi.prototype.toByteArrayUnsigned=function(){var e=this.toByteArray();return e[0]===0?e.slice(1):e};pi.fromDERInteger=function(e){return new pi(e)};pi.prototype.toDERInteger=pi.prototype.toByteArray;pi.fromBuffer=function(e){if(e[0]&128){var t=Array.prototype.slice.call(e);return new pi([0].concat(t))}return new pi(e)};pi.fromHex=function(e){return e===""?pi.ZERO:(xw.equal(e,e.match(/^[A-Fa-f0-9]+/),"Invalid hex string"),xw.equal(e.length%2,0,"Incomplete hex"),new pi(e,16))};pi.prototype.toBuffer=function(e){for(var t=this.toByteArrayUnsigned(),r=[],i=e-t.length;r.length<i;)r.push(0);return new Buffer(r.concat(t))};pi.prototype.toHex=function(e){return this.toBuffer(e).toString("hex")}});var Va=W((_z,yw)=>{var oB=av();_w();yw.exports=oB});var cv=W((yz,ww)=>{var hh=require("assert"),ov=ea().Buffer,dh=Va(),mh=dh.valueOf(3);function Vr(e,t,r,i){hh.notStrictEqual(i,void 0,"Missing Z coordinate"),this.curve=e,this.x=t,this.y=r,this.z=i,this._zInv=null,this.compressed=!0}Object.defineProperty(Vr.prototype,"zInv",{get:function(){return this._zInv===null&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}});Object.defineProperty(Vr.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}});Object.defineProperty(Vr.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}});Vr.fromAffine=function(e,t,r){return new Vr(e,t,r,dh.ONE)};Vr.prototype.equals=function(e){if(e===this)return!0;if(this.curve.isInfinity(this))return this.curve.isInfinity(e);if(this.curve.isInfinity(e))return this.curve.isInfinity(this);var t=e.y.multiply(this.z).subtract(this.y.multiply(e.z)).mod(this.curve.p);if(t.signum()!==0)return!1;var r=e.x.multiply(this.z).subtract(this.x.multiply(e.z)).mod(this.curve.p);return r.signum()===0};Vr.prototype.negate=function(){var e=this.curve.p.subtract(this.y);return new Vr(this.curve,this.x,e,this.z)};Vr.prototype.add=function(e){if(this.curve.isInfinity(this))return e;if(this.curve.isInfinity(e))return this;var t=this.x,r=this.y,i=e.x,n=e.y,a=n.multiply(this.z).subtract(r.multiply(e.z)).mod(this.curve.p),u=i.multiply(this.z).subtract(t.multiply(e.z)).mod(this.curve.p);if(u.signum()===0)return a.signum()===0?this.twice():this.curve.infinity;var h=u.square(),b=h.multiply(u),w=t.multiply(h),T=a.square().multiply(this.z),I=T.subtract(w.shiftLeft(1)).multiply(e.z).subtract(b).multiply(u).mod(this.curve.p),B=w.multiply(mh).multiply(a).subtract(r.multiply(b)).subtract(T.multiply(a)).multiply(e.z).add(a.multiply(b)).mod(this.curve.p),M=b.multiply(this.z).multiply(e.z).mod(this.curve.p);return new Vr(this.curve,I,B,M)};Vr.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(this.y.signum()===0)return this.curve.infinity;var e=this.x,t=this.y,r=t.multiply(this.z).mod(this.curve.p),i=r.multiply(t).mod(this.curve.p),n=this.curve.a,a=e.square().multiply(mh);n.signum()!==0&&(a=a.add(this.z.square().multiply(n))),a=a.mod(this.curve.p);var u=a.square().subtract(e.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(r).mod(this.curve.p),h=a.multiply(mh).multiply(e).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(a.pow(3)).mod(this.curve.p),b=r.pow(3).shiftLeft(3).mod(this.curve.p);return new Vr(this.curve,u,h,b)};Vr.prototype.multiply=function(e){if(this.curve.isInfinity(this))return this;if(e.signum()===0)return this.curve.infinity;for(var t=e,r=t.multiply(mh),i=this.negate(),n=this,a=r.bitLength()-2;a>0;--a){var u=r.testBit(a),h=t.testBit(a);n=n.twice(),u!==h&&(n=n.add(u?this:i))}return n};Vr.prototype.multiplyTwo=function(e,t,r){for(var i=Math.max(e.bitLength(),r.bitLength())-1,n=this.curve.infinity,a=this.add(t);i>=0;){var u=e.testBit(i),h=r.testBit(i);n=n.twice(),u?h?n=n.add(a):n=n.add(this):h&&(n=n.add(t)),--i}return n};Vr.prototype.getEncoded=function(e){if(e==null&&(e=this.compressed),this.curve.isInfinity(this))return ov.alloc(1,0);var t=this.affineX,r=this.affineY,i=this.curve.pLength,n;return e?(n=ov.allocUnsafe(1+i),n.writeUInt8(r.isEven()?2:3,0)):(n=ov.allocUnsafe(1+i+i),n.writeUInt8(4,0),r.toBuffer(i).copy(n,1+i)),t.toBuffer(i).copy(n,1),n};Vr.decodeFrom=function(e,t){var r=t.readUInt8(0),i=r!==4,n=Math.floor((e.p.bitLength()+7)/8),a=dh.fromBuffer(t.slice(1,1+n)),u;if(i){hh.equal(t.length,n+1,"Invalid sequence length"),hh(r===2||r===3,"Invalid sequence tag");var h=r===3;u=e.pointFromX(h,a)}else{hh.equal(t.length,1+n+n,"Invalid sequence length");var b=dh.fromBuffer(t.slice(1+n));u=Vr.fromAffine(e,a,b)}return u.compressed=i,u};Vr.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"};ww.exports=Vr});var lv=W((wz,Ew)=>{var uv=require("assert"),Sw=Va(),fv=cv();function Sf(e,t,r,i,n,a,u){this.p=e,this.a=t,this.b=r,this.G=fv.fromAffine(this,i,n),this.n=a,this.h=u,this.infinity=new fv(this,null,null,Sw.ZERO),this.pOverFour=e.add(Sw.ONE).shiftRight(2),this.pLength=Math.floor((this.p.bitLength()+7)/8)}Sf.prototype.pointFromX=function(e,t){var r=t.pow(3).add(this.a.multiply(t)).add(this.b).mod(this.p),i=r.modPow(this.pOverFour,this.p),n=i;return i.isEven()^!e&&(n=this.p.subtract(n)),fv.fromAffine(this,t,n)};Sf.prototype.isInfinity=function(e){return e===this.infinity?!0:e.z.signum()===0&&e.y.signum()!==0};Sf.prototype.isOnCurve=function(e){if(this.isInfinity(e))return!0;var t=e.affineX,r=e.affineY,i=this.a,n=this.b,a=this.p;if(t.signum()<0||t.compareTo(a)>=0||r.signum()<0||r.compareTo(a)>=0)return!1;var u=r.square().mod(a),h=t.pow(3).add(i.multiply(t)).add(n).mod(a);return u.equals(h)};Sf.prototype.validate=function(e){uv(!this.isInfinity(e),"Point is at infinity"),uv(this.isOnCurve(e),"Point is not on the curve");var t=e.multiply(this.n);return uv(this.isInfinity(t),"Point is not a scalar multiple of G"),!0};Ew.exports=Sf});var Tw=W((Sz,cB)=>{cB.exports={secp128r1:{p:"fffffffdffffffffffffffffffffffff",a:"fffffffdfffffffffffffffffffffffc",b:"e87579c11079f43dd824993c2cee5ed3",n:"fffffffe0000000075a30d1b9038a115",h:"01",Gx:"161ff7528b899b2d0c28607ca52c5b86",Gy:"cf5ac8395bafeb13c02da292dded7a83"},secp160k1:{p:"fffffffffffffffffffffffffffffffeffffac73",a:"00",b:"07",n:"0100000000000000000001b8fa16dfab9aca16b6b3",h:"01",Gx:"3b4c382ce37aa192a4019e763036f4f5dd4d7ebb",Gy:"938cf935318fdced6bc28286531733c3f03c4fee"},secp160r1:{p:"ffffffffffffffffffffffffffffffff7fffffff",a:"ffffffffffffffffffffffffffffffff7ffffffc",b:"1c97befc54bd7a8b65acf89f81d4d4adc565fa45",n:"0100000000000000000001f4c8f927aed3ca752257",h:"01",Gx:"4a96b5688ef573284664698968c38bb913cbfc82",Gy:"23a628553168947d59dcc912042351377ac5fb32"},secp192k1:{p:"fffffffffffffffffffffffffffffffffffffffeffffee37",a:"00",b:"03",n:"fffffffffffffffffffffffe26f2fc170f69466a74defd8d",h:"01",Gx:"db4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d",Gy:"9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d"},secp192r1:{p:"fffffffffffffffffffffffffffffffeffffffffffffffff",a:"fffffffffffffffffffffffffffffffefffffffffffffffc",b:"64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1",n:"ffffffffffffffffffffffff99def836146bc9b1b4d22831",h:"01",Gx:"188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012",Gy:"07192b95ffc8da78631011ed6b24cdd573f977a11e794811"},secp256k1:{p:"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",a:"00",b:"07",n:"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",h:"01",Gx:"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",Gy:"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"},secp256r1:{p:"ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",a:"ffffffff00000001000000000000000000000000fffffffffffffffffffffffc",b:"5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b",n:"ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",h:"01",Gx:"6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296",Gy:"4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"}}});var Rw=W((Ez,Iw)=>{var qo=Va(),uB=Tw(),fB=lv();function lB(e){var t=uB[e];if(!t)return null;var r=new qo(t.p,16),i=new qo(t.a,16),n=new qo(t.b,16),a=new qo(t.n,16),u=new qo(t.h,16),h=new qo(t.Gx,16),b=new qo(t.Gy,16);return new fB(r,i,n,h,b,a,u)}Iw.exports=lB});var iu=W((Tz,Aw)=>{var pB=cv(),hB=lv(),dB=Rw();Aw.exports={Curve:hB,Point:pB,getCurveByName:dB}});var kw=W((Iz,Ow)=>{Ow.exports=require("crypto").randomBytes});var Tf=W((Rz,Lw)=>{var pv=Va(),mB=ea().Buffer,vB=iu(),Pw=vB.getCurveByName("secp256k1"),Nw=pv.ONE,Bw=Pw.n,gB=Pw.p;function Vn(e,t,r,i){let n=i!==void 0?"["+i+"]":"";if(!mB.isBuffer(t))throw new Error(e+n+" must be a Buffer");if(t.length!==r)throw new Error(e+n+" must be "+r+" bytes long")}function Ef(e,t){if(!t||!t.length)throw new Error(e+" must be an array with one or more elements")}function Mw(e){Ef("pubKeys",e);for(let t=0;t<e.length;t++)Vn("pubKey",e[t],32,t)}function bB(e){Ef("messages",e);for(let t=0;t<e.length;t++)Vn("message",e[t],32,t)}function xB(e){Ef("signatures",e);for(let t=0;t<e.length;t++)Vn("signature",e[t],64,t)}function _B(e){Ef("nonces",e);for(let t=0;t<e.length;t++)Vn("nonce",e[t],32,t)}function yB(e,t){let r=t!==void 0?"["+t+"]":"";if(!pv.isBigInteger(e)&&typeof e!="string")throw new Error("privateKey"+r+" must be a BigInteger or valid hex string");if(typeof e=="string"){if(e.match(/[^a-f^A-F^0-9]+/))throw new Error("privateKey must be a BigInteger or valid hex string");hv("privateKey",pv.fromHex(e));return}hv("privateKey",e)}function Cw(e,t){yB(e),Vn("message",t,32)}function wB(e,t,r){Vn("pubKey",e,32),Vn("message",t,32),Vn("signature",r,64)}function SB(e,t,r){if(Mw(e),bB(t),xB(r),e.length!==t.length||t.length!==r.length)throw new Error("all parameters must be an array with the same length")}function EB(e,t,r,i,n){Cw(t,r),Vn("sessionId",e,32),Vn("pubKeyCombined",i,32),Vn("ell",n,32)}function hv(e,t){if(t.compareTo(Nw)<0||t.compareTo(Bw.subtract(Nw))>0)throw new Error(e+" must be an integer in the range 1..n-1")}function TB(e,t){if(e.compareTo(gB)>=0)throw new Error("r is larger than or equal to field size");if(t.compareTo(Bw)>=0)throw new Error("s is larger than or equal to curve order")}function IB(e,t){if(t.curve.isInfinity(t))throw new Error("point is at infinity");let r=t.affineY.isEven();if(e!==r)throw new Error("point does not exist")}function RB(e){if(e.length!==32)throw new Error("aux must be 32 bytes")}Lw.exports={checkSessionParams:EB,checkSignParams:Cw,checkVerifyParams:wB,checkBatchVerifyParams:SB,checkRange:hv,checkSignatureInput:TB,checkPointExists:IB,checkPubKeyArr:Mw,checkArray:Ef,checkNonceArr:_B,checkAux:RB}});var Dw=W((exports,module)=>{(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=typeof define=="function"&&define.amd,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(r){return new Sha256(t,!0).update(r)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(n){return t.create().update(n)};for(var r=0;r<OUTPUT_TYPES.length;++r){var i=OUTPUT_TYPES[r];t[i]=createOutputMethod(i,e)}return t},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(e){if(typeof e=="string")return crypto.createHash(algorithm).update(e,"utf8").digest("hex");if(e==null)throw new Error(ERROR);return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(e)).digest("hex"):method(e)};return nodeMethod},createHmacOutputMethod=function(e,t){return function(r,i){return new HmacSha256(r,t,!0).update(i)[e]()}},createHmacMethod=function(e){var t=createHmacOutputMethod("hex",e);t.create=function(n){return new HmacSha256(n,e)},t.update=function(n,a){return t.create(n).update(a)};for(var r=0;r<OUTPUT_TYPES.length;++r){var i=OUTPUT_TYPES[r];t[i]=createHmacOutputMethod(i,e)}return t};function Sha256(e,t){t?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}Sha256.prototype.update=function(e){if(!this.finalized){var t,r=typeof e;if(r!=="string"){if(r==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);t=!0}for(var i,n=0,a,u=e.length,h=this.blocks;n<u;){if(this.hashed&&(this.hashed=!1,h[0]=this.block,h[16]=h[1]=h[2]=h[3]=h[4]=h[5]=h[6]=h[7]=h[8]=h[9]=h[10]=h[11]=h[12]=h[13]=h[14]=h[15]=0),t)for(a=this.start;n<u&&a<64;++n)h[a>>2]|=e[n]<<SHIFT[a++&3];else for(a=this.start;n<u&&a<64;++n)i=e.charCodeAt(n),i<128?h[a>>2]|=i<<SHIFT[a++&3]:i<2048?(h[a>>2]|=(192|i>>6)<<SHIFT[a++&3],h[a>>2]|=(128|i&63)<<SHIFT[a++&3]):i<55296||i>=57344?(h[a>>2]|=(224|i>>12)<<SHIFT[a++&3],h[a>>2]|=(128|i>>6&63)<<SHIFT[a++&3],h[a>>2]|=(128|i&63)<<SHIFT[a++&3]):(i=65536+((i&1023)<<10|e.charCodeAt(++n)&1023),h[a>>2]|=(240|i>>18)<<SHIFT[a++&3],h[a>>2]|=(128|i>>12&63)<<SHIFT[a++&3],h[a>>2]|=(128|i>>6&63)<<SHIFT[a++&3],h[a>>2]|=(128|i&63)<<SHIFT[a++&3]);this.lastByteIndex=a,this.bytes+=a-this.start,a>=64?(this.block=h[16],this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e=this.h0,t=this.h1,r=this.h2,i=this.h3,n=this.h4,a=this.h5,u=this.h6,h=this.h7,b=this.blocks,w,T,I,B,M,P,L,X,V,q,ee;for(w=16;w<64;++w)M=b[w-15],T=(M>>>7|M<<25)^(M>>>18|M<<14)^M>>>3,M=b[w-2],I=(M>>>17|M<<15)^(M>>>19|M<<13)^M>>>10,b[w]=b[w-16]+T+b[w-7]+I<<0;for(ee=t&r,w=0;w<64;w+=4)this.first?(this.is224?(X=300032,M=b[0]-1413257819,h=M-150054599<<0,i=M+24177077<<0):(X=704751109,M=b[0]-210244248,h=M-1521486534<<0,i=M+143694565<<0),this.first=!1):(T=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),I=(n>>>6|n<<26)^(n>>>11|n<<21)^(n>>>25|n<<7),X=e&t,B=X^e&r^ee,L=n&a^~n&u,M=h+I+L+K[w]+b[w],P=T+B,h=i+M<<0,i=M+P<<0),T=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),I=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7),V=i&e,B=V^i&t^X,L=h&n^~h&a,M=u+I+L+K[w+1]+b[w+1],P=T+B,u=r+M<<0,r=M+P<<0,T=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),I=(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7),q=r&i,B=q^r&e^V,L=u&h^~u&n,M=a+I+L+K[w+2]+b[w+2],P=T+B,a=t+M<<0,t=M+P<<0,T=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),I=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),ee=t&r,B=ee^t&i^q,L=a&u^~a&h,M=n+I+L+K[w+3]+b[w+3],P=T+B,n=e+M<<0,e=M+P<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+r<<0,this.h3=this.h3+i<<0,this.h4=this.h4+n<<0,this.h5=this.h5+a<<0,this.h6=this.h6+u<<0,this.h7=this.h7+h<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,i=this.h3,n=this.h4,a=this.h5,u=this.h6,h=this.h7,b=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[a&15]+HEX_CHARS[u>>28&15]+HEX_CHARS[u>>24&15]+HEX_CHARS[u>>20&15]+HEX_CHARS[u>>16&15]+HEX_CHARS[u>>12&15]+HEX_CHARS[u>>8&15]+HEX_CHARS[u>>4&15]+HEX_CHARS[u&15];return this.is224||(b+=HEX_CHARS[h>>28&15]+HEX_CHARS[h>>24&15]+HEX_CHARS[h>>20&15]+HEX_CHARS[h>>16&15]+HEX_CHARS[h>>12&15]+HEX_CHARS[h>>8&15]+HEX_CHARS[h>>4&15]+HEX_CHARS[h&15]),b},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,i=this.h3,n=this.h4,a=this.h5,u=this.h6,h=this.h7,b=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,r>>24&255,r>>16&255,r>>8&255,r&255,i>>24&255,i>>16&255,i>>8&255,i&255,n>>24&255,n>>16&255,n>>8&255,n&255,a>>24&255,a>>16&255,a>>8&255,a&255,u>>24&255,u>>16&255,u>>8&255,u&255];return this.is224||b.push(h>>24&255,h>>16&255,h>>8&255,h&255),b},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function HmacSha256(e,t,r){var i,n=typeof e;if(n==="string"){var a=[],u=e.length,h=0,b;for(i=0;i<u;++i)b=e.charCodeAt(i),b<128?a[h++]=b:b<2048?(a[h++]=192|b>>6,a[h++]=128|b&63):b<55296||b>=57344?(a[h++]=224|b>>12,a[h++]=128|b>>6&63,a[h++]=128|b&63):(b=65536+((b&1023)<<10|e.charCodeAt(++i)&1023),a[h++]=240|b>>18,a[h++]=128|b>>12&63,a[h++]=128|b>>6&63,a[h++]=128|b&63);e=a}else if(n==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);e.length>64&&(e=new Sha256(t,!0).update(e).array());var w=[],T=[];for(i=0;i<64;++i){var I=e[i]||0;w[i]=92^I,T[i]=54^I}Sha256.call(this,t,r),this.update(T),this.oKeyPad=w,this.inner=!0,this.sharedMemory=r}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&define(function(){return exports}))})()});var nu=W((Az,Uw)=>{var AB=Va(),OB=ea().Buffer,kB=Dw();function NB(e){return AB.fromBuffer(e)}function PB(e){return e.toBuffer(32)}function BB(e){return OB.from(kB.create().update(e).array())}Uw.exports={bufferToInt:NB,intToBuffer:PB,hash:BB}});var Af=W((Oz,Fw)=>{var su=Va(),mv=ea().Buffer,dv=iu(),MB=kw(),Rf=dv.getCurveByName("secp256k1"),vv=Tf(),Fo=nu(),gv=mv.concat,CB=Rf.G,If=Rf.p,bv=Rf.n,LB=su.ZERO,DB=su.ONE,qw=su.valueOf(2),UB=su.valueOf(3),qB=su.valueOf(4),FB=su.valueOf(7);function HB(e,t,r){vv.checkSignParams(e,r);let i=_v("BIP0340/nonce",gv([Fo.intToBuffer(e),t,r]));return Fo.bufferToInt(i).mod(bv)}function xv(e){return e.affineY.mod(qw).equals(LB)}function zB(e,t){return xv(e)?t.clone():bv.subtract(t)}function jB(e,t,r){let i=_v("BIP0340/challenge",gv([e,t,r]));return Fo.bufferToInt(i).mod(bv)}function VB(e,t,r){let i=CB.multiply(e),n=r.multiply(t);return i.add(n.negate())}function _v(e,t){let r=Fo.hash(e);return Fo.hash(gv([r,r,mv.from(t)]))}function KB(e){let t=Fo.bufferToInt(e),r=t.pow(UB).add(FB).mod(If),i=r.modPow(If.add(DB).divide(qB),If);if(r.compareTo(i.modPow(qw,If))!==0)throw new Error("c is not equal to y^2");let n=dv.Point.fromAffine(Rf,t,i);return xv(n)||(n=dv.Point.fromAffine(Rf,t,If.subtract(i))),vv.checkPointExists(!0,n),n}function WB(){let e=null;for(;;){e=Fo.bufferToInt(mv.from(MB(32)));try{return vv.checkRange("a",e),e}catch{}}}Fw.exports={deterministicGetK0:HB,isEven:xv,getEvenKey:zB,getE:jB,getR:VB,taggedHash:_v,liftX:KB,randomA:WB}});var Kw=W((Nz,Vw)=>{var jw=Va(),GB=ea().Buffer,$B=iu(),wv=$B.getCurveByName("secp256k1"),Ci=Af(),au=Tf(),Li=nu(),Hw=GB.concat,yv=wv.G,kz=wv.p,zw=wv.n,XB=jw.ZERO;function YB(e,t,r){au.checkSignParams(e,t),e=typeof e=="string"?jw.fromHex(e):e;let i=yv.multiply(e),n=Li.intToBuffer(i.affineX),a=Ci.getEvenKey(i,e),u;if(r){au.checkAux(r);let I=Li.intToBuffer(a.xor(Li.bufferToInt(Ci.taggedHash("BIP0340/aux",r)))),B=Ci.taggedHash("BIP0340/nonce",Hw([I,n,t]));u=Li.bufferToInt(B).mod(zw)}else u=Ci.deterministicGetK0(a,n,t);if(u.signum()===0)throw new Error("kPrime is zero");let h=yv.multiply(u),b=Ci.getEvenKey(h,u),w=Li.intToBuffer(h.affineX),T=Ci.getE(w,n,t);return Hw([w,Li.intToBuffer(b.add(T.multiply(a)).mod(zw))])}function ZB(e,t,r){au.checkVerifyParams(e,t,r);let i=Ci.liftX(e),n=Li.intToBuffer(i.affineX),a=Li.bufferToInt(r.slice(0,32)),u=Li.bufferToInt(r.slice(32,64));au.checkSignatureInput(a,u);let h=Ci.getE(Li.intToBuffer(a),n,t),b=Ci.getR(u,h,i);if(b.curve.isInfinity(b)||!Ci.isEven(b)||!b.affineX.equals(a))throw new Error("signature verification failed")}function JB(e,t,r){au.checkBatchVerifyParams(e,t,r);let i=XB,n=null;for(let a=0;a<e.length;a++){let u=Ci.liftX(e[a]),h=Li.intToBuffer(u.affineX),b=Li.bufferToInt(r[a].slice(0,32)),w=Li.bufferToInt(r[a].slice(32,64));au.checkSignatureInput(b,w);let T=Ci.getE(Li.intToBuffer(b),h,t[a]),I=Ci.liftX(r[a].slice(0,32));if(a===0)i=i.add(w),n=I,n=n.add(u.multiply(T));else{let B=Ci.randomA();i=i.add(B.multiply(w)),n=n.add(I.multiply(B)),n=n.add(u.multiply(B.multiply(T)))}}if(!yv.multiply(i).equals(n))throw new Error("signature verification failed")}Vw.exports={sign:YB,verify:ZB,batchVerify:JB}});var Zw=W((Pz,Yw)=>{var Sv=ea().Buffer,QB=iu(),$w=QB.getCurveByName("secp256k1"),yn=Af(),Of=Tf(),_n=nu(),vh=Sv.concat,Ww=$w.G,Ka=$w.n,Gw=_n.hash(Sv.from("MuSig coefficient"));function Xw(e){return Of.checkPubKeyArr(e),_n.hash(vh(e))}function gh(e,t){let r=Sv.alloc(4);r.writeUInt32LE(t);let i=vh([Gw,Gw,e,r]);return _n.bufferToInt(_n.hash(i)).mod(Ka)}function eM(e,t){let r=t||Xw(e),i=null;for(let n=0;n<e.length;n++){let a=yn.liftX(e[n]),u=gh(r,n),h=a.multiply(u);i===null?i=h:i=i.add(h)}return i}function tM(e,t,r,i,n,a,u){Of.checkSessionParams(e,t,r,i,a);let h={sessionId:e,message:r,pubKeyCombined:i,pkParity:n,ell:a,idx:u},b=gh(a,u);h.secretKey=t.multiply(b).mod(Ka),h.ownKeyParity=yn.isEven(Ww.multiply(t)),h.pkParity!==h.ownKeyParity&&(h.secretKey=Ka.subtract(h.secretKey));let w=vh([e,r,h.pubKeyCombined,_n.intToBuffer(t)]);h.secretNonce=_n.bufferToInt(_n.hash(w)),Of.checkRange("secretNonce",h.secretNonce);let T=Ww.multiply(h.secretNonce);return h.nonce=_n.intToBuffer(T.affineX),h.nonceParity=yn.isEven(T),h.commitment=_n.hash(h.nonce),h}function rM(e,t){Of.checkNonceArr(t);let r=yn.liftX(t[0]);for(let i=1;i<t.length;i++)r=r.add(yn.liftX(t[i]));return e.combinedNonceParity=yn.isEven(r),_n.intToBuffer(r.affineX)}function iM(e,t,r,i){let n=yn.getE(r,i,t),a=e.secretKey,u=e.secretNonce;return e.nonceParity!==e.combinedNonceParity&&(u=Ka.subtract(u)),a.multiply(n).add(u).mod(Ka)}function nM(e,t,r,i,n,a){let u=yn.getE(r,e.pubKeyCombined,e.message),h=gh(e.ell,i),b=yn.liftX(n),w=yn.liftX(a);e.pkParity||(u=Ka.subtract(u));let T=yn.getR(t,u.multiply(h).mod(Ka),b);e.combinedNonceParity&&(T=T.negate());let I=T.add(w);if(!I.curve.isInfinity(I))throw new Error("partial signature verification failed")}function sM(e,t){let r=yn.liftX(e);Of.checkArray("partialSigs",t);let i=_n.intToBuffer(r.affineX),n=t[0];for(let a=1;a<t.length;a++)n=n.add(t[a]).mod(Ka);return vh([i,_n.intToBuffer(n)])}Yw.exports={computeEll:Xw,computeCoefficient:gh,pubKeyCombine:eM,sessionInitialize:tM,sessionNonceCombine:rM,partialSign:iM,partialSigVerify:nM,partialSigCombine:sM}});var eS=W((Bz,Qw)=>{var Tv=ea().Buffer,aM=iu(),oM=aM.getCurveByName("secp256k1"),Jw=Af(),Ev=nu(),cM=Tv.concat,uM=oM.G;function fM(e,t){t||(t=[]);let r=lM(t),i=Ev.intToBuffer(e.affineX),n=Jw.liftX(i),a=Ev.bufferToInt(Jw.taggedHash("TapTweak",cM([i,r]))),u=n.add(uM.multiply(a));return Ev.intToBuffer(u.affineX)}function lM(e){let t=Tv.alloc(32,0);return!e||e.length===0?new Tv(0):t}Qw.exports={taprootConstruct:fM}});var rS=W((Mz,tS)=>{var ou=Kw();ou.check=Tf();ou.convert=nu();ou.math=Af();ou.muSig=Zw();ou.taproot=eS();tS.exports=ou});var cu=W((Lz,aS)=>{"use strict";var bh=vt(),kf=It(),Ho=Yi(),iS=yi(),Cz=require("buffer"),pM=hr(),nS=Lr(),Iv=Mi(),hM=ra(),Rv=xs(),xh=4294967295,sS=xh,dM=xh-1,mM=xh-2,vM=Math.pow(2,31),kv=Math.pow(2,22),Av=65535,Ov=512,gM=Math.pow(2,16)-1;function _t(e){if(!(this instanceof _t))return new _t(e);if(e)return this._fromObject(e)}_t.MAXINT=xh;_t.DEFAULT_SEQNUMBER=sS;_t.DEFAULT_LOCKTIME_SEQNUMBER=dM;_t.DEFAULT_RBF_SEQNUMBER=mM;_t.SEQUENCE_LOCKTIME_TYPE_FLAG=kv;Object.defineProperty(_t.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this.isNull()?null:(this._script||(this._script=new Iv(this._scriptBuffer),this._script._isInput=!0),this._script)}});_t.fromObject=function(e){kf.checkArgument(bh.isObject(e));var t=new _t;return t._fromObject(e)};_t.prototype._fromObject=function(e){var t;if(typeof e.prevTxId=="string"&&nS.isHexa(e.prevTxId)?t=Buffer.from(e.prevTxId,"hex"):t=e.prevTxId,this.witnesses=[],this.output=e.output?e.output instanceof Rv?e.output:new Rv(e.output):void 0,this.prevTxId=t||e.txidbuf,this.outputIndex=e.outputIndex==null?e.txoutnum:e.outputIndex,this.sequenceNumber=e.sequenceNumber==null?e.seqnum==null?sS:e.seqnum:e.sequenceNumber,e.script===void 0&&e.scriptBuffer===void 0)throw new Ho.Transaction.Input.MissingScript;return this.setScript(e.scriptBuffer||e.script),this};_t.prototype.toObject=_t.prototype.toJSON=function(){var t={prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,sequenceNumber:this.sequenceNumber,script:this._scriptBuffer.toString("hex")};return this.script&&(t.scriptString=this.script.toString()),this.output&&(t.output=this.output.toObject()),t};_t.fromBufferReader=function(e){var t=new _t;return t.prevTxId=e.readReverse(32),t.outputIndex=e.readUInt32LE(),t._scriptBuffer=e.readVarLengthBuffer(),t.sequenceNumber=e.readUInt32LE(),t};_t.prototype.toBufferWriter=function(e){e||(e=new iS),e.writeReverse(this.prevTxId),e.writeUInt32LE(this.outputIndex);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e.writeUInt32LE(this.sequenceNumber),e};_t.prototype.setScript=function(e){if(this._script=null,e instanceof Iv)this._script=e,this._script._isInput=!0,this._scriptBuffer=e.toBuffer();else if(nS.isHexa(e))this._scriptBuffer=Buffer.from(e,"hex");else if(bh.isString(e))this._script=new Iv(e),this._script._isInput=!0,this._scriptBuffer=this._script.toBuffer();else if(pM.isBuffer(e))this._scriptBuffer=Buffer.from(e);else throw new TypeError("Invalid argument type: script");return this};_t.prototype.getSignatures=function(){throw new Ho.AbstractMethodInvoked("Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input: "+JSON.stringify(this))};_t.prototype.getSatoshisBuffer=function(){return kf.checkState(this.output instanceof Rv),kf.checkState(this.output._satoshisBN),new iS().writeUInt64LEBN(this.output._satoshisBN).toBuffer()};_t.prototype.isFullySigned=function(){throw new Ho.AbstractMethodInvoked("Input#isFullySigned")};_t.prototype.isFinal=function(){return this.sequenceNumber!==_t.MAXINT};_t.prototype.addSignature=function(){throw new Ho.AbstractMethodInvoked("Input#addSignature")};_t.prototype.clearSignatures=function(){throw new Ho.AbstractMethodInvoked("Input#clearSignatures")};_t.prototype.hasWitnesses=function(){return!!(this.witnesses&&this.witnesses.length>0)};_t.prototype.getWitnesses=function(){return this.witnesses};_t.prototype.setWitnesses=function(e){this.witnesses=e};_t.prototype.isValidSignature=function(e,t,r){return r=r||"ecdsa",t.signature.nhashtype=t.sigtype,hM.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script,r)};_t.prototype.isNull=function(){return this.prevTxId.toString("hex")==="0000000000000000000000000000000000000000000000000000000000000000"&&this.outputIndex===4294967295};_t.prototype._estimateSize=function(){return this.toBufferWriter().toBuffer().length};_t.prototype._getBaseSize=function(){return 40};_t.prototype.lockForSeconds=function(e){if(kf.checkArgument(bh.isNumber(e)),e<0||e>=Ov*Av)throw new Ho.Transaction.Input.LockTimeRange;return e=parseInt(Math.floor(e/Ov)),this.sequenceNumber=e|kv,this};_t.prototype.lockUntilBlockHeight=function(e){if(kf.checkArgument(bh.isNumber(e)),e<0||e>=gM)throw new Ho.Transaction.Input.BlockHeightOutOfRange;return this.sequenceNumber=e,this};_t.prototype.getLockTime=function(){if(this.sequenceNumber&vM)return null;if(this.sequenceNumber&kv){var e=Ov*(this.sequenceNumber&Av);return e}else{var t=this.sequenceNumber&Av;return t}};aS.exports=_t});var uu=W((Dz,oS)=>{oS.exports=require("util").inherits});var lu=W((Uz,fS)=>{"use strict";var fu=vt(),wn=It(),bM=uu(),_h=hr(),cS=Lr(),uS=jn(),xM=Yi(),Nf=Pi();function Kn(e){if(!(this instanceof Kn))return new Kn(e);if(e instanceof Kn)return e;if(fu.isObject(e))return this._fromObject(e);throw new xM.InvalidArgument("TransactionSignatures must be instantiated from an object")}bM(Kn,Nf);Kn.prototype._fromObject=function(e){return this._checkObjectArgs(e),this.publicKey=new uS(e.publicKey),this.prevTxId=_h.isBuffer(e.prevTxId)?e.prevTxId:Buffer.from(e.prevTxId,"hex"),this.outputIndex=e.outputIndex,this.inputIndex=e.inputIndex,this.signature=e.signature instanceof Nf?e.signature:_h.isBuffer(e.signature)?Nf.fromBuffer(e.signature):Nf.fromString(e.signature),this.sigtype=e.sigtype,this};Kn.prototype._checkObjectArgs=function(e){wn.checkArgument(uS(e.publicKey),"publicKey"),wn.checkArgument(!fu.isUndefined(e.inputIndex),"inputIndex"),wn.checkArgument(!fu.isUndefined(e.outputIndex),"outputIndex"),wn.checkState(fu.isNumber(e.inputIndex),"inputIndex must be a number"),wn.checkState(fu.isNumber(e.outputIndex),"outputIndex must be a number"),wn.checkArgument(e.signature,"signature"),wn.checkArgument(e.prevTxId,"prevTxId"),wn.checkState(e.signature instanceof Nf||_h.isBuffer(e.signature)||cS.isHexa(e.signature),"signature must be a buffer or hexa value"),wn.checkState(_h.isBuffer(e.prevTxId)||cS.isHexa(e.prevTxId),"prevTxId must be a buffer or hexa value"),wn.checkArgument(e.sigtype,"sigtype"),wn.checkState(fu.isNumber(e.sigtype),"sigtype must be a number")};Kn.prototype.toObject=Kn.prototype.toJSON=function(){return{publicKey:this.publicKey.toString(),prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,inputIndex:this.inputIndex,signature:this.signature.toString(),sigtype:this.sigtype}};Kn.fromObject=function(e){return wn.checkArgument(e),new Kn(e)};fS.exports=Kn});var mS=W((Fz,dS)=>{"use strict";var _M=uu(),lS=It(),qz=hr(),pS=cu(),yM=xs(),wM=ra(),hS=Mi(),SM=Pi(),EM=lu();function ia(){pS.apply(this,arguments)}_M(ia,pS);ia.prototype.getSignatures=function(e,t,r,i,n,a){lS.checkState(this.output instanceof yM),i=i||SM.SIGHASH_ALL;var u=t.toPublicKey();return u.toString()===this.output.script.getPublicKey().toString("hex")?[new EM({publicKey:u,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:wM.sign(e,t,i,r,this.output.script,a),sigtype:i})]:[]};ia.prototype.addSignature=function(e,t,r){return lS.checkState(this.isValidSignature(e,t,r),"Signature is invalid"),this.setScript(hS.buildPublicKeyIn(t.signature.toDER(),t.sigtype)),this};ia.prototype.clearSignatures=function(){return this.setScript(hS.empty()),this};ia.prototype.isFullySigned=function(){return this.script.isPublicKeyIn()};ia.SCRIPT_MAX_SIZE=73;ia.prototype._estimateSize=function(){return this._getBaseSize()+ia.SCRIPT_MAX_SIZE};dS.exports=ia});var Bf=W((Vz,_S)=>{"use strict";var zo=Pi(),Hz=Mi(),zz=xs(),vS=bs(),gS=yi(),jz=Zr(),Pf=ti(),xS=Mf(),bS=It(),Nv=vt(),Pv=function(t,r,i,n,a){var u,h,b;if(!(r&zo.SIGHASH_ANYONECANPAY)){for(var w=[],T=0;T<t.inputs.length;T++){var I=t.inputs[T],B=new vS(I.prevTxId).readReverse();w.push(B);var M=Buffer.alloc(4);M.writeUInt32LE(I.outputIndex,0),w.push(M)}u=Pf.sha256sha256(Buffer.concat(w))}if(!(r&zo.SIGHASH_ANYONECANPAY)&&(r&31)!==zo.SIGHASH_SINGLE&&(r&31)!==zo.SIGHASH_NONE){for(var P=[],L=0;L<t.inputs.length;L++){var X=Buffer.alloc(4);X.writeUInt32LE(t.inputs[L].sequenceNumber,0),P.push(X)}h=Pf.sha256sha256(Buffer.concat(P))}var V=new gS;if((r&31)!==zo.SIGHASH_SINGLE&&(r&31)!==zo.SIGHASH_NONE){for(var q=0;q<t.outputs.length;q++)t.outputs[q].toBufferWriter(V);b=Pf.sha256sha256(V.toBuffer())}else(r&31)===zo.SIGHASH_SINGLE&&i<t.outputs.length&&(t.outputs[i].toBufferWriter(V),b=Pf.sha256sha256(V.toBuffer()));var ee=new gS;ee.writeUInt32LE(t.version),ee.write(u),ee.write(h);var fe=new vS(t.inputs[i].prevTxId).readReverse();return ee.write(fe),ee.writeUInt32LE(t.inputs[i].outputIndex),ee.write(n),ee.write(a),ee.writeUInt32LE(t.inputs[i].sequenceNumber),ee.write(b),ee.writeUInt32LE(t.nLockTime),ee.writeInt32LE(r),Pf.sha256sha256(ee.toBuffer())};function TM(e,t,r,i,n,a,u){u=u||"ecdsa";var h;if(u==="ecdsa"){let b=Pv(e,r,i,n,a);return h=xS.sign(b,t).set({nhashtype:r}),h}throw new Error("signingMethod not supported ",u)}function IM(e,t,r,i,n,a,u){if(bS.checkArgument(!Nv.isUndefined(e)),bS.checkArgument(!Nv.isUndefined(t)&&!Nv.isUndefined(t.nhashtype)),u=u||"ecdsa",u==="ecdsa"){let h=Pv(e,t.nhashtype,i,n,a);return xS.verify(h,t,r)}throw new Error("signingMethod not supported ",u)}_S.exports={sighash:Pv,sign:TM,verify:IM}});var TS=W((Wz,ES)=>{"use strict";var RM=uu(),yS=It(),yh=hr(),Kz=zn(),AM=ti(),wS=cu(),OM=xs(),SS=ra(),Bv=Bf(),kM=yi(),yh=hr(),pu=Mi(),NM=Pi(),PM=lu();function hi(){wS.apply(this,arguments)}RM(hi,wS);hi.prototype.getRedeemScript=function(e){if(!this.redeemScript){var t=pu.buildWitnessV0Out(e);if(pu.buildScriptHashOut(t).equals(this.output.script)){var r=new pu;r.add(t.toBuffer()),this.setScript(r),this.redeemScript=t}}return this.redeemScript};hi.prototype.getScriptCode=function(e){var t=new kM,r;this.output.script.isScriptHashOut()?r=this.getRedeemScript(e):r=this.output.script;var i=pu.buildPublicKeyHashOut(r.toAddress()).toBuffer();return t.writeVarintNum(i.length),t.write(i),t.toBuffer()};hi.prototype.getSighash=function(e,t,r,i){var n=this.getScriptCode(t),a=this.getSatoshisBuffer();return Bv.sighash(e,i,r,n,a)};hi.prototype.getSignatures=function(e,t,r,i,n,a){yS.checkState(this.output instanceof OM),n=n||AM.sha256ripemd160(t.publicKey.toBuffer()),i=i||NM.SIGHASH_ALL,a=a||"ecdsa";var u;if(this.output.script.isScriptHashOut()?u=this.getRedeemScript(t.publicKey):u=this.output.script,u&&yh.equals(n,u.getPublicKeyHash())){var h;if(u.isWitnessPublicKeyHashOut()){var b=this.getSatoshisBuffer(),w=this.getScriptCode(t.publicKey);h=Bv.sign(e,t,i,r,w,b,a)}else h=SS.sign(e,t,i,r,this.output.script,a);return[new PM({publicKey:t.publicKey,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:h,sigtype:i})]}return[]};hi.prototype.addSignature=function(e,t,r){return yS.checkState(this.isValidSignature(e,t,r),"Signature is invalid"),this.output.script.isWitnessPublicKeyHashOut()||this.output.script.isScriptHashOut()?this.setWitnesses([yh.concat([t.signature.toDER(),yh.integerAsSingleByteBuffer(t.sigtype)]),t.publicKey.toBuffer()]):this.setScript(pu.buildPublicKeyHashIn(t.publicKey,t.signature.toDER(),t.sigtype)),this};hi.prototype.clearSignatures=function(){return this.setScript(pu.empty()),this.setWitnesses([]),this};hi.prototype.isFullySigned=function(){return this.script.isPublicKeyHashIn()||this.hasWitnesses()};hi.prototype.isValidSignature=function(e,t,r){if(t.signature.nhashtype=t.sigtype,this.output.script.isWitnessPublicKeyHashOut()||this.output.script.isScriptHashOut()){var i=this.getScriptCode(),n=this.getSatoshisBuffer();return Bv.verify(e,t.signature,t.publicKey,t.inputIndex,i,n,r)}else return SS.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script,r)};hi.SCRIPT_MAX_SIZE=107;hi.REDEEM_SCRIPT_SIZE=23;hi.prototype._estimateSize=function(){let e=this._getBaseSize();e+=1;let r=hi.SCRIPT_MAX_SIZE/4;return this.output.script.isWitnessPublicKeyHashOut()?e+=r:this.output.script.isScriptHashOut()?e+=r+hi.REDEEM_SCRIPT_SIZE:e+=hi.SCRIPT_MAX_SIZE,e};ES.exports=hi});var OS=W((Xz,AS)=>{"use strict";var Sn=vt(),BM=uu(),Gz=wh(),Cv=cu(),MM=xs(),Cf=It(),RS=Mi(),Mv=Pi(),Lv=ra(),$z=jn(),IS=hr(),Dv=lu();function Or(e,t,r,i,n){n=n||{},Cv.apply(this,arguments);var a=this;t=t||e.publicKeys,r=r||e.threshold,i=i||e.signatures,n.noSorting?this.publicKeys=t:this.publicKeys=Sn.sortBy(t,function(u){return u.toString("hex")}),Cf.checkState(RS.buildMultisigOut(this.publicKeys,r).equals(this.output.script),"Provided public keys don't match to the provided output script"),this.publicKeyIndex={},Sn.each(this.publicKeys,function(u,h){a.publicKeyIndex[u.toString()]=h}),this.threshold=r,this.signatures=i?this._deserializeSignatures(i):new Array(this.publicKeys.length)}BM(Or,Cv);Or.prototype.toObject=function(){var e=Cv.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=Sn.map(this.publicKeys,function(t){return t.toString()}),e.signatures=this._serializeSignatures(),e};Or.prototype._deserializeSignatures=function(e){return Sn.map(e,function(t){if(t)return new Dv(t)})};Or.prototype._serializeSignatures=function(){return Sn.map(this.signatures,function(e){if(e)return e.toObject()})};Or.prototype.getSignatures=function(e,t,r,i,n,a){Cf.checkState(this.output instanceof MM),i=i||Mv.SIGHASH_ALL,a=a||"ecdsa";var u=this,h=[];return Sn.each(this.publicKeys,function(b){b.toString()===t.publicKey.toString()&&h.push(new Dv({publicKey:t.publicKey,prevTxId:u.prevTxId,outputIndex:u.outputIndex,inputIndex:r,signature:Lv.sign(e,t,i,r,u.output.script,a),sigtype:i}))}),h};Or.prototype.addSignature=function(e,t,r){return Cf.checkState(!this.isFullySigned(),"All needed signatures have already been added"),Cf.checkArgument(!Sn.isUndefined(this.publicKeyIndex[t.publicKey.toString()],"Signature Undefined"),"Signature has no matching public key"),Cf.checkState(this.isValidSignature(e,t,r),"Invalid Signature"),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this};Or.prototype._updateScript=function(){return this.setScript(RS.buildMultisigIn(this.publicKeys,this.threshold,this._createSignatures())),this};Or.prototype._createSignatures=function(){return Sn.map(Sn.filter(this.signatures,function(e){return!Sn.isUndefined(e)}),function(e){return IS.concat([e.signature.toDER(),IS.integerAsSingleByteBuffer(e.sigtype)])})};Or.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()};Or.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold};Or.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()};Or.prototype.countSignatures=function(){return Sn.reduce(this.signatures,function(e,t){return e+!!t},0)};Or.prototype.publicKeysWithoutSignature=function(){var e=this;return Sn.filter(this.publicKeys,function(t){return!e.signatures[e.publicKeyIndex[t.toString()]]})};Or.prototype.isValidSignature=function(e,t,r){return t.signature.nhashtype=t.sigtype,Lv.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script,r)};Or.normalizeSignatures=function(e,t,r,i,n,a){return n.map(function(u){var h=null;return i=i.filter(function(b){if(h)return!0;var w=new Dv({signature:Mv.fromTxFormat(b),publicKey:u,prevTxId:t.prevTxId,outputIndex:t.outputIndex,inputIndex:r,sigtype:Mv.SIGHASH_ALL});w.signature.nhashtype=w.sigtype;var T=Lv.verify(e,w.signature,w.publicKey,w.inputIndex,t.output.script,a);return T?(h=w,!1):!0}),h||null})};Or.OPCODES_SIZE=1;Or.SIGNATURE_SIZE=73;Or.prototype._estimateSize=function(){return this._getBaseSize()+Or.OPCODES_SIZE+this.threshold*Or.SIGNATURE_SIZE};AS.exports=Or});var BS=W((Yz,PS)=>{"use strict";var CM=vt(),LM=uu(),Uv=cu(),DM=xs(),Sh=It(),Wa=zn(),hu=Mi(),UM=Pi(),qv=ra(),Fv=Bf(),qM=yi(),kS=hr(),NS=lu();function Jt(e,t,r,i,n){n=n||{},Uv.apply(this,arguments),t=t||e.publicKeys,r=r||e.threshold,i=i||e.signatures,n.noSorting?this.publicKeys=t:this.publicKeys=CM.sortBy(t,function(h){return h.toString("hex")}),this.redeemScript=hu.buildMultisigOut(this.publicKeys,r,n);var a=hu.buildWitnessMultisigOutFromScript(this.redeemScript);if(a.equals(this.output.script))this.nestedWitness=!1,this.type=Wa.PayToWitnessScriptHash;else if(hu.buildScriptHashOut(a).equals(this.output.script))this.nestedWitness=!0,this.type=Wa.PayToScriptHash;else if(hu.buildScriptHashOut(this.redeemScript).equals(this.output.script))this.nestedWitness=!1,this.type=Wa.PayToScriptHash;else throw new Error("Provided public keys don't hash to the provided output");if(this.nestedWitness){var u=new hu;u.add(a.toBuffer()),this.setScript(u)}this.publicKeyIndex={};for(let h=0;h<this.publicKeys.length;h++){let b=this.publicKeys[h];this.publicKeyIndex[b.toString()]=h}this.threshold=r,this.signatures=i?this._deserializeSignatures(i):new Array(this.publicKeys.length)}LM(Jt,Uv);Jt.prototype.toObject=function(){var e=Uv.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=this.publicKeys.map(function(t){return t.toString()}),e.signatures=this._serializeSignatures(),e};Jt.prototype._deserializeSignatures=function(e){return e.map(function(t){if(t)return new NS(t)})};Jt.prototype._serializeSignatures=function(){return this.signatures.map(function(e){if(e)return e.toObject()})};Jt.prototype.getScriptCode=function(){var e=new qM;if(this.redeemScript.hasCodeseparators())throw new Error("@TODO");var t=this.redeemScript.toBuffer();return e.writeVarintNum(t.length),e.write(t),e.toBuffer()};Jt.prototype.getSighash=function(e,t,r,i){var n;if(this.nestedWitness||this.type===Wa.PayToWitnessScriptHash){var a=this.getScriptCode(),u=this.getSatoshisBuffer();n=Fv.sighash(e,i,r,a,u)}else n=qv.sighash(e,i,r,this.redeemScript);return n};Jt.prototype.getSignatures=function(e,t,r,i,n,a){Sh.checkState(this.output instanceof DM),i=i||UM.SIGHASH_ALL,a=a||"ecdsa";let u=[];for(let T of this.publicKeys)if(T.toString()===t.publicKey.toString()){var h;if(this.nestedWitness||this.type===Wa.PayToWitnessScriptHash){var b=this.getScriptCode(),w=this.getSatoshisBuffer();h=Fv.sign(e,t,i,r,b,w,a)}else h=qv.sign(e,t,i,r,this.redeemScript,a);u.push(new NS({publicKey:t.publicKey,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:h,sigtype:i}))}return u};Jt.prototype.addSignature=function(e,t,r){return Sh.checkState(!this.isFullySigned(),"All needed signatures have already been added"),Sh.checkArgument(this.publicKeyIndex[t.publicKey.toString()]!=null,"Signature has no matching public key"),Sh.checkState(this.isValidSignature(e,t,r),"Invalid Signature!"),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this};Jt.prototype._updateScript=function(){if(this.nestedWitness||this.type===Wa.PayToWitnessScriptHash){for(var e=[Buffer.alloc(0)],t=this._createSignatures(),r=0;r<t.length;r++)e.push(t[r]);e.push(this.redeemScript.toBuffer()),this.setWitnesses(e)}else{var i=hu.buildP2SHMultisigIn(this.publicKeys,this.threshold,this._createSignatures(),{cachedMultisig:this.redeemScript});this.setScript(i)}return this};Jt.prototype._createSignatures=function(){return this.signatures.filter(function(e){return e!=null}).map(function(e){return kS.concat([e.signature.toDER(),kS.integerAsSingleByteBuffer(e.sigtype)])})};Jt.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()};Jt.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold};Jt.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()};Jt.prototype.countSignatures=function(){return this.signatures.reduce(function(e,t){return e+!!t},0)};Jt.prototype.publicKeysWithoutSignature=function(){return this.publicKeys.filter(e=>!this.signatures[this.publicKeyIndex[e.toString()]])};Jt.prototype.isValidSignature=function(e,t,r){if(r=r||"ecdsa",this.nestedWitness||this.type===Wa.PayToWitnessScriptHash){t.signature.nhashtype=t.sigtype;var i=this.getScriptCode(),n=this.getSatoshisBuffer();return Fv.verify(e,t.signature,t.publicKey,t.inputIndex,i,n,r)}else return t.signature.nhashtype=t.sigtype,qv.verify(e,t.signature,t.publicKey,t.inputIndex,this.redeemScript,r)};Jt.MAX_OPCODES_SIZE=8;Jt.MAX_SIGNATURE_SIZE=74;Jt.MAX_PUBKEY_SIZE=34;Jt.REDEEM_SCRIPT_SIZE=34;Jt.prototype._estimateSize=function(){let e=this._getBaseSize(),t=4,r=Jt.MAX_OPCODES_SIZE+this.threshold*Jt.MAX_SIGNATURE_SIZE+this.publicKeys.length*Jt.MAX_PUBKEY_SIZE;return this.type===Wa.PayToWitnessScriptHash?e+=r/t:this.nestedWitness?e+=r/t+Jt.REDEEM_SCRIPT_SIZE:e+=r,e};PS.exports=Jt});var Eh=W((Zz,du)=>{du.exports=cu();du.exports.PublicKey=mS();du.exports.PublicKeyHash=TS();du.exports.MultiSig=OS();du.exports.MultiSigScriptHash=BS()});var ra=W((Jz,DS)=>{"use strict";var Lf=Pi(),Hv=Mi(),FM=xs(),HM=bs(),zM=yi(),jM=Zr(),VM=ti(),CS=Mf(),MS=It(),zv=vt(),LS=rS(),KM="0000000000000000000000000000000000000000000000000000000000000001",WM="ffffffffffffffff",jv=function(t,r,i,n){var a=wh(),u=Eh(),h,b=a.shallowCopy(t);for(n=new Hv(n),n.removeCodeseparators(),h=0;h<b.inputs.length;h++)b.inputs[h]=new u(b.inputs[h]).setScript(Hv.empty());if(b.inputs[i]=new u(b.inputs[i]).setScript(n),(r&31)===Lf.SIGHASH_NONE||(r&31)===Lf.SIGHASH_SINGLE)for(h=0;h<b.inputs.length;h++)h!==i&&(b.inputs[h].sequenceNumber=0);if((r&31)===Lf.SIGHASH_NONE)b.outputs=[];else if((r&31)===Lf.SIGHASH_SINGLE){if(i>=b.outputs.length)return Buffer.from(KM,"hex");for(b.outputs.length=i+1,h=0;h<i;h++)b.outputs[h]=new FM({satoshis:jM.fromBuffer(Buffer.from(WM,"hex")),script:Hv.empty()})}r&Lf.SIGHASH_ANYONECANPAY&&(b.inputs=[b.inputs[i]]);var w=new zM().write(b.toBuffer()).writeInt32LE(r).toBuffer(),T=VM.sha256sha256(w);return T=new HM(T).readReverse(),T};function GM(e,t,r,i,n,a){a=a||"ecdsa";let u=jv(e,r,i,n),h;switch(a){case"ecdsa":h=CS.sign(u,t,"little").set({nhashtype:r});break;case"schnorr":h=LS.sign(t.toString(),u);break;default:throw new Error("signingMethod not supported ",a)}return h}function $M(e,t,r,i,n,a){MS.checkArgument(!zv.isUndefined(e),"Transaction Undefined"),MS.checkArgument(!zv.isUndefined(t)&&!zv.isUndefined(t.nhashtype),"Signature Undefined"),a=a||"ecdsa";let u=jv(e,t.nhashtype,i,n),h=!1;switch(a){case"ecdsa":h=CS.verify(u,t,r,"little");break;case"schnorr":h=LS.verify(r,u,t);break;default:throw new Error("signingMethod not supported ",a)}return h}DS.exports={sighash:jv,sign:GM,verify:$M}});var Ih=W((Qz,US)=>{"use strict";var Vv=vt(),Th=Yi(),XM=It(),jo={BTC:[1e8,8],mBTC:[1e5,5],uBTC:[100,2],bits:[100,2],satoshis:[1,0]};function ot(e,t){if(!(this instanceof ot))return new ot(e,t);if(Vv.isNumber(t)){if(t<=0)throw new Th.Unit.InvalidRate(t);e=e/t,t=ot.BTC}this._value=this._from(e,t);var r=this,i=function(n){Object.defineProperty(r,n,{get:function(){return r.to(n)},enumerable:!0})};Object.keys(jo).forEach(i)}Object.keys(jo).forEach(function(e){ot[e]=e});ot.fromObject=function(t){return XM.checkArgument(Vv.isObject(t),"Argument is expected to be an object"),new ot(t.amount,t.code)};ot.fromBTC=function(e){return new ot(e,ot.BTC)};ot.fromMillis=ot.fromMilis=function(e){return new ot(e,ot.mBTC)};ot.fromMicros=ot.fromBits=function(e){return new ot(e,ot.bits)};ot.fromSatoshis=function(e){return new ot(e,ot.satoshis)};ot.fromFiat=function(e,t){return new ot(e,t)};ot.prototype._from=function(e,t){if(!jo[t])throw new Th.Unit.UnknownCode(t);return parseInt((e*jo[t][0]).toFixed())};ot.prototype.to=function(e){if(Vv.isNumber(e)){if(e<=0)throw new Th.Unit.InvalidRate(e);return parseFloat((this.BTC*e).toFixed(2))}if(!jo[e])throw new Th.Unit.UnknownCode(e);var t=this._value/jo[e][0];return parseFloat(t.toFixed(jo[e][1]))};ot.prototype.toBTC=function(){return this.to(ot.BTC)};ot.prototype.toMillis=ot.prototype.toMilis=function(){return this.to(ot.mBTC)};ot.prototype.toMicros=ot.prototype.toBits=function(){return this.to(ot.bits)};ot.prototype.toSatoshis=function(){return this.to(ot.satoshis)};ot.prototype.atRate=function(e){return this.to(e)};ot.prototype.toString=function(){return this.satoshis+" satoshis"};ot.prototype.toObject=ot.prototype.toJSON=function(){return{amount:this.BTC,code:ot.BTC}};ot.prototype.inspect=function(){return"<Unit: "+this.toString()+">"};US.exports=ot});var Kv=W((ej,HS)=>{"use strict";var na=vt(),Rh=It(),qS=Lr(),YM=Mi(),ZM=zn(),FS=Ih();function sa(e){if(!(this instanceof sa))return new sa(e);Rh.checkArgument(na.isObject(e),"Must provide an object from where to extract data");var t=e.address?new ZM(e.address):void 0,r=e.txid?e.txid:e.txId;if(!r||!qS.isHexaString(r)||r.length>64)throw new Error("Invalid TXID in object",e);var i=na.isUndefined(e.vout)?e.outputIndex:e.vout;if(!na.isNumber(i))throw new Error("Invalid outputIndex, received "+i);Rh.checkArgument(!na.isUndefined(e.scriptPubKey)||!na.isUndefined(e.script),"Must provide the scriptPubKey for that output!");var n=new YM(e.scriptPubKey||e.script);Rh.checkArgument(!na.isUndefined(e.amount)||!na.isUndefined(e.satoshis),"Must provide an amount for the output");var a=na.isUndefined(e.amount)?e.satoshis:new FS.fromBTC(e.amount).toSatoshis();Rh.checkArgument(na.isNumber(a),"Amount must be a number"),qS.defineImmutable(this,{address:t,txId:r,outputIndex:i,script:n,satoshis:a})}sa.prototype.inspect=function(){return"<UnspentOutput: "+this.txId+":"+this.outputIndex+", satoshis: "+this.satoshis+", address: "+this.address+">"};sa.prototype.toString=function(){return this.txId+":"+this.outputIndex};sa.fromObject=function(e){return new sa(e)};sa.prototype.toObject=sa.prototype.toJSON=function(){return{address:this.address?this.address.toString():void 0,txid:this.txId,vout:this.outputIndex,scriptPubKey:this.script.toBuffer().toString("hex"),amount:FS.fromSatoshis(this.satoshis).toBTC()}};HS.exports=sa});var wh=W((tj,WS)=>{"use strict";var $a=vt(),kr=It(),JM=require("buffer"),zS=Buffer.compare||ow(),Kr=Yi(),QM=hr(),Oh=Lr(),Wv=bs(),mu=yi(),Gv=ti(),eC=Pi(),tC=ra(),rC=Bf(),iC=zn(),jS=Kv(),Nr=Eh(),nC=Nr.PublicKeyHash,sC=Nr.PublicKey,aC=Nr.MultiSigScriptHash,oC=Nr.MultiSig,Xa=xs(),Ga=Mi(),cC=vu(),Ah=Zr();function ie(e,t){if(!(this instanceof ie))return new ie(e);if(this.inputs=[],this.outputs=[],this._inputAmount=void 0,this._outputAmount=void 0,e){if(e instanceof ie)return ie.shallowCopy(e);if(Oh.isHexa(e))this.fromString(e);else if(QM.isBuffer(e))this.fromBuffer(e);else if($a.isObject(e))this.fromObject(e,t);else throw new Kr.InvalidArgument("Must provide an object or string to deserialize a transaction")}else this._newTransaction()}var VS=2,uC=0,fC=1e6;ie.DUST_AMOUNT=546;ie.FEE_SECURITY_MARGIN=150;ie.MAX_MONEY=21e6*1e8;ie.NLOCKTIME_BLOCKHEIGHT_LIMIT=5e8;ie.NLOCKTIME_MAX_VALUE=4294967295;ie.FEE_PER_KB=1e5;ie.CHANGE_OUTPUT_MAX_SIZE=62;ie.MAXIMUM_EXTRA_SIZE=26;ie.shallowCopy=function(e){var t=new ie(e.toBuffer());return t};var KS={configurable:!1,enumerable:!0,get:function(){return this._hash=new Wv(this._getHash()).readReverse().toString("hex"),this._hash}},lC={configurable:!1,enumerable:!0,get:function(){return new Wv(this._getWitnessHash()).readReverse().toString("hex")}};Object.defineProperty(ie.prototype,"witnessHash",lC);Object.defineProperty(ie.prototype,"hash",KS);Object.defineProperty(ie.prototype,"id",KS);var $v={configurable:!1,enumerable:!0,get:function(){return this._getInputAmount()}};Object.defineProperty(ie.prototype,"inputAmount",$v);$v.get=function(){return this._getOutputAmount()};Object.defineProperty(ie.prototype,"outputAmount",$v);Object.defineProperty(ie.prototype,"size",{configurable:!1,enumerable:!1,get:function(){return this._calculateSize()}});Object.defineProperty(ie.prototype,"vsize",{configurable:!1,enumerable:!1,get:function(){return this._calculateVSize()}});Object.defineProperty(ie.prototype,"weight",{configurable:!1,enumerable:!1,get:function(){return this._calculateWeight()}});ie.prototype._getHash=function(){return Gv.sha256sha256(this.toBuffer(!0))};ie.prototype._getWitnessHash=function(){return Gv.sha256sha256(this.toBuffer(!1))};ie.prototype.serialize=function(e){return e===!0||e&&e.disableAll?this.uncheckedSerialize():this.checkedSerialize(e)};ie.prototype.uncheckedSerialize=ie.prototype.toString=function(){return this.toBuffer().toString("hex")};ie.prototype.checkedSerialize=function(e){var t=this.getSerializationError(e);if(t)throw t.message+=" - For more information please see: https://github.com/bitpay/bitcore/blob/master/packages/bitcore-lib/docs/transaction.md#serialization-checks",t;return this.uncheckedSerialize()};ie.prototype.invalidSatoshis=function(){for(var e=!1,t=0;t<this.outputs.length;t++)this.outputs[t].invalidSatoshis()&&(e=!0);return e};ie.prototype.getSerializationError=function(e){if(e=e||{},this.invalidSatoshis())return new Kr.Transaction.InvalidSatoshis;var t=this._getUnspentValue(),r;return t<0?e.disableMoreOutputThanInput||(r=new Kr.Transaction.InvalidOutputAmountSum):r=this._hasFeeError(e,t),r||this._hasDustOutputs(e)||this._isMissingSignatures(e)};ie.prototype._hasFeeError=function(e,t){if(this._fee!=null&&this._fee!==t)return new Kr.Transaction.FeeError.Different("Unspent value is "+t+" but specified fee is "+this._fee);if(!e.disableLargeFees){var r=Math.floor(ie.FEE_SECURITY_MARGIN*this._estimateFee());if(t>r)return this._missingChange()?new Kr.Transaction.ChangeAddressMissing("Fee is too large and no change address was provided"):new Kr.Transaction.FeeError.TooLarge("expected less than "+r+" but got "+t)}if(!e.disableSmallFees){var i=Math.ceil(this._estimateFee()/ie.FEE_SECURITY_MARGIN);if(t<i)return new Kr.Transaction.FeeError.TooSmall("expected more than "+i+" but got "+t)}};ie.prototype._missingChange=function(){return!this._changeScript};ie.prototype._hasDustOutputs=function(e){if(!e.disableDustOutputs){var t,r;for(t in this.outputs)if(r=this.outputs[t],r.satoshis<ie.DUST_AMOUNT&&!r.script.isDataOut())return new Kr.Transaction.DustOutputs}};ie.prototype._isMissingSignatures=function(e){if(!e.disableIsFullySigned&&!this.isFullySigned())return new Kr.Transaction.MissingSignatures};ie.prototype.inspect=function(){return"<Transaction: "+this.uncheckedSerialize()+">"};ie.prototype.toBuffer=function(e){var t=new mu;return this.toBufferWriter(t,e).toBuffer()};ie.prototype.hasWitnesses=function(){for(var e=0;e<this.inputs.length;e++)if(this.inputs[e].hasWitnesses())return!0;return!1};ie.prototype.toBufferWriter=function(e,t){e.writeInt32LE(this.version);let r=this.hasWitnesses();r&&!t&&e.write(Buffer.from("0001","hex")),e.writeVarintNum(this.inputs?this.inputs.length:0);for(let i of this.inputs||[])i.toBufferWriter(e);e.writeVarintNum(this.outputs?this.outputs.length:0);for(let i of this.outputs||[])i.toBufferWriter(e);if(r&&!t)for(let i of this.inputs){let n=i.getWitnesses();e.writeVarintNum(n.length);for(let a=0;a<n.length;a++)e.writeVarintNum(n[a].length),e.write(n[a])}return e.writeUInt32LE(this.nLockTime),e};ie.prototype.fromBuffer=function(e){var t=new Wv(e);return this.fromBufferReader(t)};ie.prototype.fromBufferReader=function(e){kr.checkArgument(!e.finished(),"No transaction data received"),this.version=e.readInt32LE();var t=e.readVarintNum(),r=!1;t===0&&e.buf[e.pos]!==0&&(e.pos+=1,r=!0,t=e.readVarintNum());for(var i=0;i<t;i++){var n=Nr.fromBufferReader(e);this.inputs.push(n)}for(var a=e.readVarintNum(),u=0;u<a;u++)this.outputs.push(Xa.fromBufferReader(e));if(r)for(var h=0;h<t;h++){for(var b=e.readVarintNum(),w=[],T=0;T<b;T++){var I=e.readVarintNum(),B=e.read(I);w.push(B)}this.inputs[h].setWitnesses(w)}return this.nLockTime=e.readUInt32LE(),this};ie.prototype.toObject=ie.prototype.toJSON=function(){var t=[];this.inputs.forEach(function(n){t.push(n.toObject())});var r=[];this.outputs.forEach(function(n){r.push(n.toObject())});var i={hash:this.hash,version:this.version,inputs:t,outputs:r,nLockTime:this.nLockTime};return this._changeScript&&(i.changeScript=this._changeScript.toString()),this._changeIndex!=null&&(i.changeIndex=this._changeIndex),this._fee!=null&&(i.fee=this._fee),i};ie.prototype.fromObject=function(t,r){kr.checkArgument($a.isObject(t)||t instanceof ie);var i;t instanceof ie?i=t.toObject():i=t;for(let u of i.inputs||[]){if(!u.output||!u.output.script){this.uncheckedAddInput(new Nr(u));continue}var n=new Ga(u.output.script),a;if((n.isScriptHashOut()||n.isWitnessScriptHashOut())&&u.publicKeys&&u.threshold)a=new Nr.MultiSigScriptHash(u,u.publicKeys,u.threshold,u.signatures,r);else if(n.isPublicKeyHashOut()||n.isWitnessPublicKeyHashOut()||n.isScriptHashOut())a=new Nr.PublicKeyHash(u);else if(n.isPublicKeyOut())a=new Nr.PublicKey(u);else throw new Kr.Transaction.Input.UnsupportedScript(u.output.script);this.addInput(a)}for(let u of i.outputs||[])this.addOutput(new Xa(u));return i.changeIndex&&(this._changeIndex=i.changeIndex),i.changeScript&&(this._changeScript=new Ga(i.changeScript)),i.fee&&(this._fee=i.fee),this.nLockTime=i.nLockTime,this.version=i.version,this._checkConsistency(t),this};ie.prototype._checkConsistency=function(e){this._changeIndex!=null&&(kr.checkState(this._changeScript,"Change script is expected."),kr.checkState(this.outputs[this._changeIndex],"Change index points to undefined output."),kr.checkState(this.outputs[this._changeIndex].script.toString()===this._changeScript.toString(),"Change output has an unexpected script.")),e&&e.hash&&kr.checkState(e.hash===this.hash,"Hash in object does not match transaction hash.")};ie.prototype.lockUntilDate=function(e){if(kr.checkArgument(e),!isNaN(e)&&e<ie.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new Kr.Transaction.LockTimeTooEarly;$a.isDate(e)&&(e=e.getTime()/1e3);for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===Nr.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=Nr.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this};ie.prototype.lockUntilBlockHeight=function(e){if(kr.checkArgument(!isNaN(e)),e>=ie.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new Kr.Transaction.BlockHeightTooHigh;if(e<0)throw new Kr.Transaction.NLockTimeOutOfRange;for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===Nr.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=Nr.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this};ie.prototype.getLockTime=function(){return this.nLockTime?this.nLockTime<ie.NLOCKTIME_BLOCKHEIGHT_LIMIT?this.nLockTime:new Date(1e3*this.nLockTime):null};ie.prototype.fromString=function(e){this.fromBuffer(JM.Buffer.from(e,"hex"))};ie.prototype._newTransaction=function(){this.version=VS,this.nLockTime=uC};ie.prototype.from=function(e,t,r,i){if(Array.isArray(e)){for(let a of e)this.from(a,t,r,i);return this}return this.inputs.some(function(a){return a.prevTxId.toString("hex")===e.txId&&a.outputIndex===e.outputIndex})?this:(t&&r?this._fromMultisigUtxo(e,t,r,i):this._fromNonP2SH(e),this)};ie.prototype.associateInputs=function(e,t,r,i){let n=[];for(let a of e){let u=this.inputs.findIndex(h=>h.prevTxId.toString("hex")===a.txId&&h.outputIndex===a.outputIndex);if(n.push(u),u>=0){let h=this.inputs[u].sequenceNumber;this.inputs[u]=this._getInputFrom(a,t,r,i),this.inputs[u].sequenceNumber=h}}return n};ie.prototype._selectInputType=function(e,t,r){var i;return e=new jS(e),t&&r?e.script.isMultisigOut()?i=oC:(e.script.isScriptHashOut()||e.script.isWitnessScriptHashOut())&&(i=aC):e.script.isPublicKeyHashOut()||e.script.isWitnessPublicKeyHashOut()||e.script.isScriptHashOut()?i=nC:e.script.isPublicKeyOut()?i=sC:i=Nr,i};ie.prototype._getInputFrom=function(e,t,r,i){e=new jS(e);let n=this._selectInputType(e,t,r),a={output:new Xa({script:e.script,satoshis:e.satoshis}),prevTxId:e.txId,outputIndex:e.outputIndex,sequenceNumber:e.sequenceNumber,script:Ga.empty()},u=t&&r?[t,r,!1,i]:[];return new n(a,...u)};ie.prototype._fromNonP2SH=function(e){let t=this._getInputFrom(e);this.addInput(t)};ie.prototype._fromMultisigUtxo=function(e,t,r,i){kr.checkArgument(r<=t.length,"Number of required signatures must be greater than the number of public keys");let n=this._getInputFrom(e,t,r,i);this.addInput(n)};ie.prototype.addInput=function(e,t,r){if(kr.checkArgumentType(e,Nr,"input"),!e.output&&(t==null||r==null))throw new Kr.Transaction.NeedMoreInfo("Need information about the UTXO script and satoshis");return!e.output&&t&&r!=null&&(t=t instanceof Ga?t:new Ga(t),kr.checkArgumentType(r,"number","satoshis"),e.output=new Xa({script:t,satoshis:r})),this.uncheckedAddInput(e)};ie.prototype.uncheckedAddInput=function(e){return kr.checkArgumentType(e,Nr,"input"),this.inputs.push(e),this._inputAmount=void 0,this._updateChangeOutput(),this};ie.prototype.hasAllUtxoInfo=function(){return this.inputs.every(function(e){return!!e.output})};ie.prototype.fee=function(e){return kr.checkArgument(!isNaN(e),"amount must be a number"),this._fee=e,this._updateChangeOutput(),this};ie.prototype.feePerKb=function(e){return kr.checkArgument(!isNaN(e),"amount must be a number"),this._feePerKb=e,this._updateChangeOutput(),this};ie.prototype.feePerByte=function(e){return kr.checkArgument(!isNaN(e),"amount must be a number"),this._feePerByte=e,this._updateChangeOutput(),this};ie.prototype.change=function(e){return kr.checkArgument(e,"address is required"),this._changeScript=Ga.fromAddress(e),this._updateChangeOutput(),this};ie.prototype.getChangeOutput=function(){return this._changeIndex!=null?this.outputs[this._changeIndex]:null};ie.prototype.to=function(e,t){if(Array.isArray(e)){for(let r of e)this.to(r.address,r.satoshis);return this}return kr.checkArgument(Oh.isNaturalNumber(t),"Amount is expected to be a positive integer"),this.addOutput(new Xa({script:Ga(new iC(e)),satoshis:t})),this};ie.prototype.addData=function(e){return this.addOutput(new Xa({script:Ga.buildDataOut(e),satoshis:0})),this};ie.prototype.addOutput=function(e){return kr.checkArgumentType(e,Xa,"output"),this._addOutput(e),this._updateChangeOutput(),this};ie.prototype.clearOutputs=function(){return this.outputs=[],this._clearSignatures(),this._outputAmount=void 0,this._changeIndex=void 0,this._updateChangeOutput(),this};ie.prototype._addOutput=function(e){this.outputs.push(e),this._outputAmount=void 0};ie.prototype._getOutputAmount=function(){if(this._outputAmount==null){var e=this;this._outputAmount=0;for(let t of this.outputs||[])e._outputAmount+=t.satoshis}return this._outputAmount};ie.prototype._getInputAmount=function(){return this._inputAmount==null&&(this._inputAmount=$a.sumBy(this.inputs,function(e){if(e.output==null)throw new Kr.Transaction.Input.MissingPreviousOutput;return e.output.satoshis})),this._inputAmount};ie.prototype._updateChangeOutput=function(e){if(this._changeScript){e||this._clearSignatures(),this._changeIndex!=null&&this._removeOutput(this._changeIndex);var t=this._getUnspentValue(),r=this.getFee(),i=t-r;i>ie.DUST_AMOUNT?(this._changeIndex=this.outputs.length,this._addOutput(new Xa({script:this._changeScript,satoshis:i}))):this._changeIndex=void 0}};ie.prototype.getFee=function(){return this.isCoinbase()?0:this._fee!=null?this._fee:this._changeScript?this._estimateFee():this._getUnspentValue()};ie.prototype._estimateFee=function(){let e=this._estimateSize(),t=this._getUnspentValue(),r=this._feePerByte||(this._feePerKb||ie.FEE_PER_KB)/1e3;function i(u){return u*r}let n=Math.ceil(i(e)),a=Math.ceil(i(e)+i(this._estimateSizeOfChangeOutput()));return!this._changeScript||t<=a?n:a};ie.prototype._estimateSizeOfChangeOutput=function(){if(!this._changeScript)return 0;let e=this._changeScript.toBuffer().length;return 8+mu.varintBufNum(e).length+e};ie.prototype._getUnspentValue=function(){return this._getInputAmount()-this._getOutputAmount()};ie.prototype._clearSignatures=function(){for(let e of this.inputs||[])e.clearSignatures()};ie.prototype._estimateSize=function(){let e=4;this.hasWitnesses()&&(e+=.5),e+=mu.varintBufNum(this.inputs.length).length;for(let t of this.inputs||[])e+=t._estimateSize();e+=mu.varintBufNum(this.outputs.length).length;for(let t of this.outputs||[])e+=t.calculateSize();return e+=4,Math.ceil(e)};ie.prototype._calculateSize=function(){return this.toBuffer().length};ie.prototype._calculateVSize=function(e){let t=this._calculateWeight()/4;return e?t:Math.ceil(t)};ie.prototype._calculateWeight=function(){return this.toBuffer(!0).length*3+this.toBuffer(!1).length};ie.prototype._removeOutput=function(e){var t=this.outputs[e];this.outputs=$a.without(this.outputs,t),this._outputAmount=void 0};ie.prototype.removeOutput=function(e){this._removeOutput(e),this._updateChangeOutput()};ie.prototype.sort=function(){return this.sortInputs(function(e){var t=Array.prototype.concat.apply([],e);let r=0;return t.forEach(i=>{i.i=r++}),t.sort(function(i,n){return zS(i.prevTxId,n.prevTxId)||i.outputIndex-n.outputIndex||i.i-n.i}),t}),this.sortOutputs(function(e){var t=Array.prototype.concat.apply([],e);let r=0;return t.forEach(i=>{i.i=r++}),t.sort(function(i,n){return i.satoshis-n.satoshis||zS(i.script.toBuffer(),n.script.toBuffer())||i.i-n.i}),t}),this};ie.prototype.shuffleOutputs=function(){return this.sortOutputs($a.shuffle)};ie.prototype.sortOutputs=function(e){var t=e(this.outputs);return this._newOutputOrder(t)};ie.prototype.sortInputs=function(e){return this.inputs=e(this.inputs),this._clearSignatures(),this};ie.prototype._newOutputOrder=function(e){var t=this.outputs.length!==e.length||$a.difference(this.outputs,e).length!==0;if(t)throw new Kr.Transaction.InvalidSorting;if(this._changeIndex!=null){var r=this.outputs[this._changeIndex];this._changeIndex=e.indexOf(r)}return this.outputs=e,this};ie.prototype.removeInput=function(e,t){var r;if(!t&&!isNaN(e)?r=e:r=this.inputs.findIndex(function(n){return n.prevTxId.toString("hex")===e&&n.outputIndex===t}),r<0||r>=this.inputs.length)throw new Kr.Transaction.InvalidIndex(r,this.inputs.length);var i=this.inputs[r];this.inputs=$a.without(this.inputs,i),this._inputAmount=void 0,this._updateChangeOutput()};ie.prototype.sign=function(e,t,r){if(kr.checkState(this.hasAllUtxoInfo(),"Not all utxo information is available to sign the transaction."),Array.isArray(e)){for(let i of e)this.sign(i,t,r);return this}for(let i of this.getSignatures(e,t,r))this.applySignature(i,r);return this};ie.prototype.getSignatures=function(e,t,r){e=new cC(e),t=t||eC.SIGHASH_ALL;var i=this,n=[],a=Gv.sha256ripemd160(e.publicKey.toBuffer());for(let u=0;u<this.inputs.length;u++){let h=this.inputs[u];for(let b of h.getSignatures(i,e,u,t,a,r))n.push(b)}return n};ie.prototype.applySignature=function(e,t){return this.inputs[e.inputIndex].addSignature(this,e,t),this};ie.prototype.isFullySigned=function(){for(let e of this.inputs||[])if(e.isFullySigned===Nr.prototype.isFullySigned)throw new Kr.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs.every(function(e){return e.isFullySigned()})};ie.prototype.isValidSignature=function(e,t){if(this.inputs[e.inputIndex].isValidSignature===Nr.prototype.isValidSignature)throw new Kr.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs[e.inputIndex].isValidSignature(this,e,t)};ie.prototype.verifySignature=function(e,t,r,i,n,a,u){if(n==null&&(n=0),n===1){var h=i.toBuffer(),b=new mu;b.writeVarintNum(h.length),b.write(h);var w;a?(kr.checkState(Oh.isNaturalNumber(a)),w=new mu().writeUInt64LEBN(new Ah(a)).toBuffer()):w=this.inputs[r].getSatoshisBuffer();var T=rC.verify(this,e,t,r,b.toBuffer(),w,u);return T}return tC.verify(this,e,t,r,i,u)};ie.prototype.verify=function(){if(this.inputs.length===0)return"transaction txins empty";if(this.outputs.length===0)return"transaction txouts empty";for(var e=new Ah(0),t=0;t<this.outputs.length;t++){var r=this.outputs[t];if(r.invalidSatoshis())return"transaction txout "+t+" satoshis is invalid";if(r._satoshisBN.gt(new Ah(ie.MAX_MONEY,10)))return"transaction txout "+t+" greater than MAX_MONEY";if(e=e.add(r._satoshisBN),e.gt(new Ah(ie.MAX_MONEY)))return"transaction txout "+t+" total output greater than MAX_MONEY"}if(this.toBuffer().length>fC)return"transaction over the maximum block size";var i={};for(t=0;t<this.inputs.length;t++){var n=this.inputs[t],a=n.prevTxId+":"+n.outputIndex;if(i[a]!=null)return"transaction input "+t+" duplicate input";i[a]=!0}var u=this.isCoinbase();if(u){var h=this.inputs[0]._scriptBuffer;if(h.length<2||h.length>100)return"coinbase transaction script size invalid"}else for(t=0;t<this.inputs.length;t++)if(this.inputs[t].isNull())return"transaction input "+t+" has null input";return!0};ie.prototype.isCoinbase=function(){return this.inputs.length===1&&this.inputs[0].isNull()};ie.prototype.isRBF=function(){for(var e=0;e<this.inputs.length;e++){var t=this.inputs[e];if(t.sequenceNumber<Nr.MAXINT-1)return!0}return!1};ie.prototype.enableRBF=function(){for(var e=0;e<this.inputs.length;e++){var t=this.inputs[e];t.sequenceNumber>=Nr.MAXINT-1&&(t.sequenceNumber=Nr.DEFAULT_RBF_SEQNUMBER)}return this};ie.prototype.setVersion=function(e){return kr.checkArgument(Oh.isNaturalNumber(e)&&e<=VS,"Wrong version number"),this.version=e,this};WS.exports=ie});var Df=W((rj,Ya)=>{Ya.exports=wh();Ya.exports.Input=Eh();Ya.exports.Output=xs();Ya.exports.UnspentOutput=Kv();Ya.exports.Signature=lu();Ya.exports.Sighash=ra();Ya.exports.SighashWitness=Bf()});var $S=W((ij,GS)=>{"use strict";var gu=vt(),Za=ev(),G=ch(),ct=Zr(),bu=ti(),Uf=Pi(),kh=jn(),ue=function e(t){if(!(this instanceof e))return new e(t);t?(this.initialize(),this.set(t)):this.initialize()};ue.SIGVERSION_BASE=0;ue.SIGVERSION_WITNESS_V0=1;ue.SIGVERSION_TAPROOT=2;ue.SIGVERSION_TAPSCRIPT=3;ue.prototype.verifyWitnessProgram=function(e,t,r,i,n){var a=new Za,u=[];if(e===0)if(t.length===32){if(r.length===0)return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY",!1;var h=r[r.length-1];a=new Za(h);var b=bu.sha256(h);if(b.toString("hex")!==t.toString("hex"))return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH",!1;u=r.slice(0,-1)}else if(t.length===20){if(r.length!==2)return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH",!1;a.add(G.OP_DUP),a.add(G.OP_HASH160),a.add(t),a.add(G.OP_EQUALVERIFY),a.add(G.OP_CHECKSIG),u=r}else return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH",!1;else return n&ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM?(this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM",!1):!0;if(this.initialize(),this.set({script:a,stack:u,sigversion:ue.SIGVERSION_WITNESS_V0,satoshis:i,flags:n}),!this.evaluate())return!1;if(this.stack.length!==1)return this.errstr="SCRIPT_ERR_EVAL_FALSE",!1;var w=this.stack[this.stack.length-1];return ue.castToBool(w)?!0:(this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_STACK",!1)};ue.prototype.verify=function(e,t,r,i,n,a,u){var h=Df();gu.isUndefined(r)&&(r=new h),gu.isUndefined(i)&&(i=0),gu.isUndefined(n)&&(n=0),gu.isUndefined(a)&&(a=null),gu.isUndefined(u)&&(u=0),this.set({script:e,tx:r,nin:i,sigversion:ue.SIGVERSION_BASE,satoshis:0,flags:n});var b;if(n&ue.SCRIPT_VERIFY_SIGPUSHONLY&&!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(!this.evaluate())return!1;n&ue.SCRIPT_VERIFY_P2SH&&(b=this.stack.slice());var w=this.stack;if(this.initialize(),this.set({script:t,stack:w,tx:r,nin:i,flags:n}),!this.evaluate())return!1;if(this.stack.length===0)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_RESULT",!1;var T=this.stack[this.stack.length-1];if(!ue.castToBool(T))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_STACK",!1;var I=!1;if(n&ue.SCRIPT_VERIFY_WITNESS){var B={};if(t.isWitnessProgram(B)&&(I=!0,e.toBuffer().length!==0||!this.verifyWitnessProgram(B.version,B.program,a,u,this.flags)))return!1}if(n&ue.SCRIPT_VERIFY_P2SH&&t.isScriptHashOut()){if(!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(b.length===0)throw new Error("internal error - stack copy empty");var M=b[b.length-1],P=Za.fromBuffer(M);if(b.pop(),this.initialize(),this.set({script:P,stack:b,tx:r,nin:i,flags:n}),!this.evaluate())return!1;if(b.length===0)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_P2SH_STACK",!1;if(!ue.castToBool(b[b.length-1]))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_P2SH_STACK",!1;if(n&ue.SCRIPT_VERIFY_WITNESS){var L={};if(P.isWitnessProgram(L)){I=!0;var X=new Za;if(X.add(P.toBuffer()),e.toHex()!==X.toHex())return this.errstr="SCRIPT_ERR_WITNESS_MALLEATED_P2SH",!1;if(!this.verifyWitnessProgram(L.version,L.program,a,u,this.flags))return!1;w=[w[0]]}}}if(this.flags&ue.SCRIPT_VERIFY_CLEANSTACK){if(!(this.flags&ue.SCRIPT_VERIFY_P2SH))throw"flags & SCRIPT_VERIFY_P2SH";if(b.length!=1)return this.errstr="SCRIPT_ERR_CLEANSTACK",!1}return this.flags&ue.SCRIPT_VERIFY_WITNESS&&!I&&a.length>0?(this.errstr="SCRIPT_ERR_WITNESS_UNEXPECTED",!1):!0};GS.exports=ue;ue.prototype.initialize=function(e){this.stack=[],this.altstack=[],this.pc=0,this.satoshis=0,this.sigversion=ue.SIGVERSION_BASE,this.pbegincodehash=0,this.nOpCount=0,this.vfExec=[],this.errstr="",this.flags=0};ue.prototype.set=function(e){this.script=e.script||this.script,this.tx=e.tx||this.tx,this.nin=typeof e.nin<"u"?e.nin:this.nin,this.stack=e.stack||this.stack,this.altstack=e.altack||this.altstack,this.pc=typeof e.pc<"u"?e.pc:this.pc,this.pbegincodehash=typeof e.pbegincodehash<"u"?e.pbegincodehash:this.pbegincodehash,this.sigversion=typeof e.sigversion<"u"?e.sigversion:this.sigversion,this.satoshis=typeof e.satoshis<"u"?e.satoshis:this.satoshis,this.nOpCount=typeof e.nOpCount<"u"?e.nOpCount:this.nOpCount,this.vfExec=e.vfExec||this.vfExec,this.errstr=e.errstr||this.errstr,this.flags=typeof e.flags<"u"?e.flags:this.flags};ue.true=Buffer.from([1]);ue.false=Buffer.from([]);ue.MAX_SCRIPT_ELEMENT_SIZE=520;ue.LOCKTIME_THRESHOLD=5e8;ue.LOCKTIME_THRESHOLD_BN=new ct(ue.LOCKTIME_THRESHOLD);ue.SCRIPT_VERIFY_NONE=0;ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM=4096;ue.SCRIPT_VERIFY_P2SH=1;ue.SCRIPT_VERIFY_STRICTENC=2;ue.SCRIPT_VERIFY_DERSIG=4;ue.SCRIPT_VERIFY_LOW_S=8;ue.SCRIPT_VERIFY_NULLDUMMY=16;ue.SCRIPT_VERIFY_SIGPUSHONLY=32;ue.SCRIPT_VERIFY_MINIMALDATA=64;ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=128;ue.SCRIPT_VERIFY_CLEANSTACK=256,ue.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY=512;ue.SCRIPT_VERIFY_WITNESS=1024;ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=2048;ue.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY=1024;ue.SCRIPT_VERIFY_MINIMALIF=8192;ue.SCRIPT_VERIFY_NULLFAIL=16384;ue.SCRIPT_VERIFY_WITNESS_PUBKEYTYPE=32768;ue.SCRIPT_ENABLE_SIGHASH_FORKID=65536;ue.SCRIPT_ENABLE_REPLAY_PROTECTION=1<<17;ue.SCRIPT_ENABLE_MONOLITH_OPCODES=1<<18;ue.SEQUENCE_LOCKTIME_DISABLE_FLAG=1<<31;ue.SEQUENCE_LOCKTIME_TYPE_FLAG=1<<22;ue.SEQUENCE_LOCKTIME_MASK=65535;ue.castToBool=function(e){for(var t=0;t<e.length;t++)if(e[t]!==0)return!(t===e.length-1&&e[t]===128);return!1};ue.prototype.checkSignatureEncoding=function(e){var t;if(e.length==0)return!0;if(this.flags&(ue.SCRIPT_VERIFY_DERSIG|ue.SCRIPT_VERIFY_LOW_S|ue.SCRIPT_VERIFY_STRICTENC)&&!Uf.isTxDER(e))return this.errstr="SCRIPT_ERR_SIG_DER_INVALID_FORMAT",!1;if(this.flags&ue.SCRIPT_VERIFY_LOW_S){if(t=Uf.fromTxFormat(e),!t.hasLowS())return this.errstr="SCRIPT_ERR_SIG_DER_HIGH_S",!1}else if(this.flags&ue.SCRIPT_VERIFY_STRICTENC&&(t=Uf.fromTxFormat(e),!t.hasDefinedHashtype()))return this.errstr="SCRIPT_ERR_SIG_HASHTYPE",!1;return!0};ue.prototype.checkPubkeyEncoding=function(e){return this.flags&ue.SCRIPT_VERIFY_STRICTENC&&!kh.isValid(e)?(this.errstr="SCRIPT_ERR_PUBKEYTYPE",!1):this.flags&ue.SCRIPT_VERIFY_WITNESS_PUBKEYTYPE&&this.sigversion==ue.SIGVERSION_WITNESS_V0&&!kh.fromBuffer(e).compressed?(this.errstr="SCRIPT_ERR_WITNESS_PUBKEYTYPE",!1):!0};ue.prototype.evaluate=function(){if(this.script.toBuffer().length>1e4)return this.errstr="SCRIPT_ERR_SCRIPT_SIZE",!1;try{for(;this.pc<this.script.chunks.length;){var e=this.step();if(!e)return!1}if(this.stack.length+this.altstack.length>1e3)return this.errstr="SCRIPT_ERR_STACK_SIZE",!1}catch(t){return this.errstr="SCRIPT_ERR_UNKNOWN_ERROR: "+t,!1}return this.vfExec.length>0?(this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1):!0};ue.prototype.checkLockTime=function(e){return!(!(this.tx.nLockTime<ue.LOCKTIME_THRESHOLD&&e.lt(ue.LOCKTIME_THRESHOLD_BN)||this.tx.nLockTime>=ue.LOCKTIME_THRESHOLD&&e.gte(ue.LOCKTIME_THRESHOLD_BN))||e.gt(new ct(this.tx.nLockTime))||!this.tx.inputs[this.nin].isFinal())};ue.prototype.checkSequence=function(e){var t=this.tx.inputs[this.nin].sequenceNumber;if(this.tx.version<2||t&SEQUENCE_LOCKTIME_DISABLE_FLAG)return!1;var r=ue.SEQUENCE_LOCKTIME_TYPE_FLAG|ue.SEQUENCE_LOCKTIME_MASK,i=new ct(t&r),n=e.and(r),a=new ct(ue.SEQUENCE_LOCKTIME_TYPE_FLAG);return!(!(i.lt(a)&&n.lt(a)||i.gte(a)&&n.gte(a))||n.gt(i))};ue.prototype.step=function(){var e=(this.flags&ue.SCRIPT_VERIFY_MINIMALDATA)!==0,t=this.vfExec.indexOf(!1)===-1,r,i,n,a,u,h,b,w,T,I,B,M,P,L,X,V,q,ee=this.script.chunks[this.pc];this.pc++;var fe=ee.opcodenum;if(gu.isUndefined(fe))return this.errstr="SCRIPT_ERR_UNDEFINED_OPCODE",!1;if(ee.buf&&ee.buf.length>ue.MAX_SCRIPT_ELEMENT_SIZE)return this.errstr="SCRIPT_ERR_PUSH_SIZE",!1;if(fe>G.OP_16&&++this.nOpCount>201)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;if(fe===G.OP_CAT||fe===G.OP_SUBSTR||fe===G.OP_LEFT||fe===G.OP_RIGHT||fe===G.OP_INVERT||fe===G.OP_AND||fe===G.OP_OR||fe===G.OP_XOR||fe===G.OP_2MUL||fe===G.OP_2DIV||fe===G.OP_MUL||fe===G.OP_DIV||fe===G.OP_MOD||fe===G.OP_LSHIFT||fe===G.OP_RSHIFT)return this.errstr="SCRIPT_ERR_DISABLED_OPCODE",!1;if(t&&0<=fe&&fe<=G.OP_PUSHDATA4){if(e&&!this.script.checkMinimalPush(this.pc-1))return this.errstr="SCRIPT_ERR_MINIMALDATA",!1;if(!ee.buf)this.stack.push(ue.false);else{if(ee.len!==ee.buf.length)throw new Error("Length of push value not equal to length of data");this.stack.push(ee.buf)}}else if(t||G.OP_IF<=fe&&fe<=G.OP_ENDIF)switch(fe){case G.OP_1NEGATE:case G.OP_1:case G.OP_2:case G.OP_3:case G.OP_4:case G.OP_5:case G.OP_6:case G.OP_7:case G.OP_8:case G.OP_9:case G.OP_10:case G.OP_11:case G.OP_12:case G.OP_13:case G.OP_14:case G.OP_15:case G.OP_16:u=fe-(G.OP_1-1),r=new ct(u).toScriptNumBuffer(),this.stack.push(r);break;case G.OP_NOP:break;case G.OP_NOP2:case G.OP_CHECKLOCKTIMEVERIFY:if(!(this.flags&ue.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)){if(this.flags&ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var _e=ct.fromScriptNumBuffer(this.stack[this.stack.length-1],e,5);if(_e.lt(new ct(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(!this.checkLockTime(_e))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case G.OP_NOP3:case G.OP_CHECKSEQUENCEVERIFY:if(!(this.flags&ue.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY)){if(this.flags&ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var Te=ct.fromScriptNumBuffer(this.stack[this.stack.length-1],e,5);if(Te.lt(new ct(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(Te&ue.SEQUENCE_LOCKTIME_DISABLE_FLAG)break;if(!this.checkSequence(Te))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case G.OP_NOP1:case G.OP_NOP4:case G.OP_NOP5:case G.OP_NOP6:case G.OP_NOP7:case G.OP_NOP8:case G.OP_NOP9:case G.OP_NOP10:if(this.flags&ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break;case G.OP_IF:case G.OP_NOTIF:{if(V=!1,t){if(this.stack.length<1)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;if(r=this.stack[this.stack.length-1],this.flags&ue.SCRIPT_VERIFY_MINIMALIF){if(r=this.stack[this.stack.length-1],r.length>1)return this.errstr="SCRIPT_ERR_MINIMALIF",!1;if(r.length==1&&r[0]!=1)return this.errstr="SCRIPT_ERR_MINIMALIF",!1}V=ue.castToBool(r),fe===G.OP_NOTIF&&(V=!V),this.stack.pop()}this.vfExec.push(V)}break;case G.OP_ELSE:{if(this.vfExec.length===0)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec[this.vfExec.length-1]=!this.vfExec[this.vfExec.length-1]}break;case G.OP_ENDIF:{if(this.vfExec.length===0)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec.pop()}break;case G.OP_VERIFY:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(r=this.stack[this.stack.length-1],V=ue.castToBool(r),V)this.stack.pop();else return this.errstr="SCRIPT_ERR_VERIFY",!1}break;case G.OP_RETURN:return this.errstr="SCRIPT_ERR_OP_RETURN",!1;case G.OP_TOALTSTACK:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.altstack.push(this.stack.pop())}break;case G.OP_FROMALTSTACK:{if(this.altstack.length<1)return this.errstr="SCRIPT_ERR_INVALID_ALTSTACK_OPERATION",!1;this.stack.push(this.altstack.pop())}break;case G.OP_2DROP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop(),this.stack.pop()}break;case G.OP_2DUP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-2],n=this.stack[this.stack.length-1],this.stack.push(i),this.stack.push(n)}break;case G.OP_3DUP:{if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-3],n=this.stack[this.stack.length-2];var be=this.stack[this.stack.length-1];this.stack.push(i),this.stack.push(n),this.stack.push(be)}break;case G.OP_2OVER:{if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-4],n=this.stack[this.stack.length-3],this.stack.push(i),this.stack.push(n)}break;case G.OP_2ROT:{if(this.stack.length<6)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=this.stack.splice(this.stack.length-6,2),this.stack.push(a[0]),this.stack.push(a[1])}break;case G.OP_2SWAP:{if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=this.stack.splice(this.stack.length-4,2),this.stack.push(a[0]),this.stack.push(a[1])}break;case G.OP_IFDUP:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;r=this.stack[this.stack.length-1],V=ue.castToBool(r),V&&this.stack.push(r)}break;case G.OP_DEPTH:r=new ct(this.stack.length).toScriptNumBuffer(),this.stack.push(r);break;case G.OP_DROP:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop()}break;case G.OP_DUP:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-1])}break;case G.OP_NIP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,1)}break;case G.OP_OVER:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-2])}break;case G.OP_PICK:case G.OP_ROLL:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(r=this.stack[this.stack.length-1],w=ct.fromScriptNumBuffer(r,e),u=w.toNumber(),this.stack.pop(),u<0||u>=this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;r=this.stack[this.stack.length-u-1],fe===G.OP_ROLL&&this.stack.splice(this.stack.length-u-1,1),this.stack.push(r)}break;case G.OP_ROT:{if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;h=this.stack[this.stack.length-3],b=this.stack[this.stack.length-2];var O=this.stack[this.stack.length-1];this.stack[this.stack.length-3]=b,this.stack[this.stack.length-2]=O,this.stack[this.stack.length-1]=h}break;case G.OP_SWAP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;h=this.stack[this.stack.length-2],b=this.stack[this.stack.length-1],this.stack[this.stack.length-2]=b,this.stack[this.stack.length-1]=h}break;case G.OP_TUCK:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,0,this.stack[this.stack.length-1])}break;case G.OP_SIZE:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;w=new ct(this.stack[this.stack.length-1].length),this.stack.push(w.toScriptNumBuffer())}break;case G.OP_EQUAL:case G.OP_EQUALVERIFY:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-2],n=this.stack[this.stack.length-1];var E=i.toString("hex")===n.toString("hex");if(this.stack.pop(),this.stack.pop(),this.stack.push(E?ue.true:ue.false),fe===G.OP_EQUALVERIFY)if(E)this.stack.pop();else return this.errstr="SCRIPT_ERR_EQUALVERIFY",!1}break;case G.OP_1ADD:case G.OP_1SUB:case G.OP_NEGATE:case G.OP_ABS:case G.OP_NOT:case G.OP_0NOTEQUAL:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(r=this.stack[this.stack.length-1],w=ct.fromScriptNumBuffer(r,e),fe){case G.OP_1ADD:w=w.add(ct.One);break;case G.OP_1SUB:w=w.sub(ct.One);break;case G.OP_NEGATE:w=w.neg();break;case G.OP_ABS:w.cmp(ct.Zero)<0&&(w=w.neg());break;case G.OP_NOT:w=new ct((w.cmp(ct.Zero)===0)+0);break;case G.OP_0NOTEQUAL:w=new ct((w.cmp(ct.Zero)!==0)+0);break}this.stack.pop(),this.stack.push(w.toScriptNumBuffer())}break;case G.OP_ADD:case G.OP_SUB:case G.OP_BOOLAND:case G.OP_BOOLOR:case G.OP_NUMEQUAL:case G.OP_NUMEQUALVERIFY:case G.OP_NUMNOTEQUAL:case G.OP_LESSTHAN:case G.OP_GREATERTHAN:case G.OP_LESSTHANOREQUAL:case G.OP_GREATERTHANOREQUAL:case G.OP_MIN:case G.OP_MAX:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(T=ct.fromScriptNumBuffer(this.stack[this.stack.length-2],e),I=ct.fromScriptNumBuffer(this.stack[this.stack.length-1],e),w=new ct(0),fe){case G.OP_ADD:w=T.add(I);break;case G.OP_SUB:w=T.sub(I);break;case G.OP_BOOLAND:w=new ct((T.cmp(ct.Zero)!==0&&I.cmp(ct.Zero)!==0)+0);break;case G.OP_BOOLOR:w=new ct((T.cmp(ct.Zero)!==0||I.cmp(ct.Zero)!==0)+0);break;case G.OP_NUMEQUAL:w=new ct((T.cmp(I)===0)+0);break;case G.OP_NUMEQUALVERIFY:w=new ct((T.cmp(I)===0)+0);break;case G.OP_NUMNOTEQUAL:w=new ct((T.cmp(I)!==0)+0);break;case G.OP_LESSTHAN:w=new ct((T.cmp(I)<0)+0);break;case G.OP_GREATERTHAN:w=new ct((T.cmp(I)>0)+0);break;case G.OP_LESSTHANOREQUAL:w=new ct((T.cmp(I)<=0)+0);break;case G.OP_GREATERTHANOREQUAL:w=new ct((T.cmp(I)>=0)+0);break;case G.OP_MIN:w=T.cmp(I)<0?T:I;break;case G.OP_MAX:w=T.cmp(I)>0?T:I;break}if(this.stack.pop(),this.stack.pop(),this.stack.push(w.toScriptNumBuffer()),fe===G.OP_NUMEQUALVERIFY)if(ue.castToBool(this.stack[this.stack.length-1]))this.stack.pop();else return this.errstr="SCRIPT_ERR_NUMEQUALVERIFY",!1}break;case G.OP_WITHIN:{if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;T=ct.fromScriptNumBuffer(this.stack[this.stack.length-3],e),I=ct.fromScriptNumBuffer(this.stack[this.stack.length-2],e);var f=ct.fromScriptNumBuffer(this.stack[this.stack.length-1],e);V=I.cmp(T)<=0&&T.cmp(f)<0,this.stack.pop(),this.stack.pop(),this.stack.pop(),this.stack.push(V?ue.true:ue.false)}break;case G.OP_RIPEMD160:case G.OP_SHA1:case G.OP_SHA256:case G.OP_HASH160:case G.OP_HASH256:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;r=this.stack[this.stack.length-1];var c;fe===G.OP_RIPEMD160?c=bu.ripemd160(r):fe===G.OP_SHA1?c=bu.sha1(r):fe===G.OP_SHA256?c=bu.sha256(r):fe===G.OP_HASH160?c=bu.sha256ripemd160(r):fe===G.OP_HASH256&&(c=bu.sha256sha256(r)),this.stack.pop(),this.stack.push(c)}break;case G.OP_CODESEPARATOR:this.pbegincodehash=this.pc;break;case G.OP_CHECKSIG:case G.OP_CHECKSIGVERIFY:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(B=this.stack[this.stack.length-2],M=this.stack[this.stack.length-1],!this.checkSignatureEncoding(B)||!this.checkPubkeyEncoding(M))return!1;P=new Za().set({chunks:this.script.chunks.slice(this.pbegincodehash)});var p=new Za().add(B);P.findAndDelete(p);try{L=Uf.fromTxFormat(B),X=kh.fromBuffer(M,!1),q=this.tx.verifySignature(L,X,this.nin,P,this.sigversion,this.satoshis)}catch{q=!1}if(!q&&this.flags&ue.SCRIPT_VERIFY_NULLFAIL&&B.length)return this.errstr="SCRIPT_ERR_NULLFAIL",!1;if(this.stack.pop(),this.stack.pop(),this.stack.push(q?ue.true:ue.false),fe===G.OP_CHECKSIGVERIFY)if(q)this.stack.pop();else return this.errstr="SCRIPT_ERR_CHECKSIGVERIFY",!1}break;case G.OP_CHECKMULTISIG:case G.OP_CHECKMULTISIGVERIFY:{var v=1;if(this.stack.length<v)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var g=ct.fromScriptNumBuffer(this.stack[this.stack.length-v],e).toNumber();if(g<0||g>20)return this.errstr="SCRIPT_ERR_PUBKEY_COUNT",!1;if(this.nOpCount+=g,this.nOpCount>201)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;var x=++v;v+=g;var S=g+2;if(this.stack.length<v)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var _=ct.fromScriptNumBuffer(this.stack[this.stack.length-v],e).toNumber();if(_<0||_>g)return this.errstr="SCRIPT_ERR_SIG_COUNT",!1;var l=++v;if(v+=_,this.stack.length<v)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;P=new Za().set({chunks:this.script.chunks.slice(this.pbegincodehash)});for(var m=0;m<_;m++)B=this.stack[this.stack.length-l-m],P.findAndDelete(new Za().add(B));for(q=!0;q&&_>0;){if(B=this.stack[this.stack.length-l],M=this.stack[this.stack.length-x],!this.checkSignatureEncoding(B)||!this.checkPubkeyEncoding(M))return!1;var A;try{L=Uf.fromTxFormat(B),X=kh.fromBuffer(M,!1),A=this.tx.verifySignature(L,X,this.nin,P,this.sigversion,this.satoshis)}catch{A=!1}A&&(l++,_--),x++,g--,_>g&&(q=!1)}for(;v-- >1;){if(!q&&this.flags&ue.SCRIPT_VERIFY_NULLFAIL&&!S&&this.stack[this.stack.length-1].length)return this.errstr="SCRIPT_ERR_NULLFAIL",!1;S>0&&S--,this.stack.pop()}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(this.flags&ue.SCRIPT_VERIFY_NULLDUMMY&&this.stack[this.stack.length-1].length)return this.errstr="SCRIPT_ERR_SIG_NULLDUMMY",!1;if(this.stack.pop(),this.stack.push(q?ue.true:ue.false),fe===G.OP_CHECKMULTISIGVERIFY)if(q)this.stack.pop();else return this.errstr="SCRIPT_ERR_CHECKMULTISIGVERIFY",!1}break;default:return this.errstr="SCRIPT_ERR_BAD_OPCODE",!1}return!0}});var Mi=W((nj,Xv)=>{Xv.exports=ev();Xv.exports.Interpreter=$S()});var zn=W((sj,ZS)=>{"use strict";var Nh=vt(),aa=It(),pC=Yi(),XS=$c(),qf=J2(),Di=Ha(),Ff=ti(),YS=Lr(),Yv=jn();function ce(e,t,r,i){if(!(this instanceof ce))return new ce(e,t,r);if(Nh.isArray(e)&&Nh.isNumber(t))return ce.createMultisig(e,t,r,!1,i);if(e instanceof ce)return e;if(aa.checkArgument(e,"First argument is required, please include address data.","guide/address.html"),t&&!Di.get(t))throw new TypeError('Second argument must be "livenet" or "testnet".');if(r&&r!==ce.PayToPublicKeyHash&&r!==ce.PayToScriptHash&&r!==ce.PayToWitnessPublicKeyHash&&r!==ce.PayToWitnessScriptHash&&r!==ce.PayToTaproot)throw new TypeError('Third argument must be "pubkeyhash", "scripthash", "witnesspubkeyhash", "witnessscripthash", or "taproot".');var n=this._classifyArguments(e,t,r);return n.network=n.network||Di.get(t)||Di.defaultNetwork,n.type=n.type||r||ce.PayToPublicKeyHash,YS.defineImmutable(this,{hashBuffer:n.hashBuffer,network:n.network,type:n.type}),this}ce.prototype._classifyArguments=function(e,t,r){if((e instanceof Buffer||e instanceof Uint8Array)&&(e.length===20||e.length===32))return ce._transformHash(e,t,r);if((e instanceof Buffer||e instanceof Uint8Array)&&e.length>=21)return ce._transformBuffer(e,t,r);if(e instanceof Yv)return ce._transformPublicKey(e,t,r);if(e instanceof Ja)return ce._transformScript(e,t);if(typeof e=="string")return ce._transformString(e,t,r);if(Nh.isObject(e))return ce._transformObject(e);throw new TypeError("First argument is an unrecognized data format.")};ce.PayToPublicKeyHash="pubkeyhash";ce.PayToScriptHash="scripthash";ce.PayToWitnessPublicKeyHash="witnesspubkeyhash";ce.PayToWitnessScriptHash="witnessscripthash";ce.PayToTaproot="taproot";ce._transformHash=function(e,t,r){var i={};if(!(e instanceof Buffer)&&!(e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(e.length!==20&&e.length!==32)throw new TypeError("Address hashbuffers must be either 20 or 32 bytes.");return i.hashBuffer=e,i.network=Di.get(t)||Di.defaultNetwork,i.type=r,i};ce._transformObject=function(e){return aa.checkArgument(e.hash||e.hashBuffer,"Must provide a `hash` or `hashBuffer` property"),aa.checkArgument(e.type,"Must provide a `type` property"),{hashBuffer:e.hash?Buffer.from(e.hash,"hex"):e.hashBuffer,network:Di.get(e.network)||Di.defaultNetwork,type:e.type}};ce._classifyFromVersion=function(e){var t={};if(e.length>21){var r=qf.decode(e.toString("utf8"));if(r.version!==0&&r.version!==1)throw new TypeError("Only witness v0 and v1 addresses are supported.");if(r.version===0)if(r.data.length===20)t.type=ce.PayToWitnessPublicKeyHash;else if(r.data.length===32)t.type=ce.PayToWitnessScriptHash;else throw new TypeError("Witness data must be either 20 or 32 bytes.");else if(r.version===1)if(r.data.length===32)t.type=ce.PayToTaproot;else throw new TypeError("Witness data must be 32 bytes for v1");t.network=Di.get(r.prefix,"bech32prefix")}else{var i=Di.get(e[0],"pubkeyhash"),n=Di.get(e[0],"scripthash");i?(t.network=i,t.type=ce.PayToPublicKeyHash):n&&(t.network=n,t.type=ce.PayToScriptHash)}return t};ce._transformBuffer=function(e,t,r){var i={};if(!(e instanceof Buffer)&&!(e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(e.length<21)throw new TypeError("Address buffer is incorrect length.");var n=Di.get(t),a=ce._classifyFromVersion(e);if(t&&!n)throw new TypeError("Unknown network");if(!a.network||n&&n.xpubkey!==a.network.xpubkey)throw new TypeError("Address has mismatched network type.");if(!a.type||r&&r!==a.type)throw new TypeError("Address has mismatched type.");return e.length>21?i.hashBuffer=qf.decode(e.toString("utf8")).data:i.hashBuffer=e.slice(1),i.network=n||a.network,i.type=a.type,i};ce._transformPublicKey=function(e,t,r){var i={};if(!(e instanceof Yv))throw new TypeError("Address must be an instance of PublicKey.");if(r&&r!==ce.PayToScriptHash&&r!==ce.PayToWitnessPublicKeyHash&&r!==ce.PayToPublicKeyHash&&r!==ce.PayToTaproot)throw new TypeError("Type must be either pubkeyhash, witnesspubkeyhash, scripthash, or taproot to transform public key.");if(!e.compressed&&(r===ce.PayToScriptHash||r===ce.PayToWitnessPublicKeyHash))throw new TypeError("Witness addresses must use compressed public keys.");return r===ce.PayToScriptHash?i.hashBuffer=Ff.sha256ripemd160(Ja.buildWitnessV0Out(e).toBuffer()):r===ce.PayToTaproot?i.hashBuffer=Ff.sha256ripemd160(Ja.buildWitnessV1Out(e).toBuffer()):i.hashBuffer=Ff.sha256ripemd160(e.toBuffer()),i.type=r||ce.PayToPublicKeyHash,i};ce._transformScript=function(e,t){aa.checkArgument(e instanceof Ja,"script must be a Script instance");var r=e.getAddressInfo(t);if(!r)throw new pC.Script.CantDeriveAddress(e);return r};ce.createMultisig=function(e,t,r,i,n){if(r=r||e[0].network||Di.defaultNetwork,n&&n!==ce.PayToScriptHash&&n!==ce.PayToWitnessScriptHash)throw new TypeError("Type must be either scripthash or witnessscripthash to create multisig.");if(i||n===ce.PayToWitnessScriptHash){e=Nh.map(e,Yv);for(var a=0;a<e.length;a++)if(!e[a].compressed)throw new TypeError("Witness addresses must use compressed public keys.")}var u=Ja.buildMultisigOut(e,t);return i?ce.payingTo(Ja.buildWitnessMultisigOutFromScript(u),r):ce.payingTo(u,r,n)};ce._transformString=function(e,t,r){if(typeof e!="string")throw new TypeError("data parameter supplied is not a string.");if(e.length>100)throw new TypeError("address string is too long");if(t&&!Di.get(t))throw new TypeError("Unknown network");e=e.trim();try{var n=ce._transformBuffer(Buffer.from(e,"utf8"),t,r);return n}catch(a){if(r===ce.PayToWitnessPublicKeyHash||r===ce.PayToWitnessScriptHash||r===ce.PayToTaproot)throw a}var i=XS.decode(e),n=ce._transformBuffer(i,t,r);return n};ce.fromPublicKey=function(e,t,r){var i=ce._transformPublicKey(e,t,r);return t=t||Di.defaultNetwork,new ce(i.hashBuffer,t,i.type)};ce.fromPublicKeyHash=function(e,t){var r=ce._transformHash(e);return new ce(r.hashBuffer,t,ce.PayToPublicKeyHash)};ce.fromScriptHash=function(e,t,n){aa.checkArgument(e,"hash parameter is required");var i=ce._transformHash(e);if(n===ce.PayToWitnessScriptHash&&e.length!==32)throw new TypeError("Address hashbuffer must be exactly 32 bytes for v0 witness script hash.");var n=n||ce.PayToScriptHash;return new ce(i.hashBuffer,t,n)};ce.payingTo=function(e,t,n){aa.checkArgument(e,"script is required"),aa.checkArgument(e instanceof Ja,"script must be instance of Script");var i;n===ce.PayToWitnessScriptHash?i=Ff.sha256(e.toBuffer()):i=Ff.sha256ripemd160(e.toBuffer());var n=n||ce.PayToScriptHash;return ce.fromScriptHash(i,t,n)};ce.fromScript=function(e,t){aa.checkArgument(e instanceof Ja,"script must be a Script instance");var r=ce._transformScript(e,t);return new ce(r.hashBuffer,t,r.type)};ce.fromBuffer=function(e,t,r){var i=ce._transformBuffer(e,t,r);return new ce(i.hashBuffer,i.network,i.type)};ce.fromString=function(e,t,r){var i=ce._transformString(e,t,r);return new ce(i.hashBuffer,i.network,i.type)};ce.fromObject=function(t){aa.checkState(YS.isHexa(t.hash),'Unexpected hash property, "'+t.hash+'", expected to be hex.');var r=Buffer.from(t.hash,"hex");return new ce(r,t.network,t.type)};ce.getValidationError=function(e,t,r){var i;try{new ce(e,t,r)}catch(n){i=n}return i};ce.isValid=function(e,t,r){return!ce.getValidationError(e,t,r)};ce.prototype.isPayToPublicKeyHash=function(){return this.type===ce.PayToPublicKeyHash};ce.prototype.isPayToScriptHash=function(){return this.type===ce.PayToScriptHash};ce.prototype.isPayToWitnessPublicKeyHash=function(){return this.type===ce.PayToWitnessPublicKeyHash};ce.prototype.isPayToWitnessScriptHash=function(){return this.type===ce.PayToWitnessScriptHash};ce.prototype.isPayToTaproot=function(){return this.type===ce.PayToTaproot};ce.prototype.toBuffer=function(){if(this.isPayToWitnessPublicKeyHash()||this.isPayToWitnessScriptHash())return Buffer.from(this.toString(),"utf8");var e=Buffer.from([this.network[this.type]]);return Buffer.concat([e,this.hashBuffer])};ce.prototype.toObject=ce.prototype.toJSON=function(){return{hash:this.hashBuffer.toString("hex"),type:this.type,network:this.network.toString()}};ce.prototype.toString=function(){if(this.isPayToWitnessPublicKeyHash()||this.isPayToWitnessScriptHash()||this.isPayToTaproot()){let e=this.network.bech32prefix,t=0,r=qf.encodings.BECH32;return this.isPayToTaproot()&&(t=1,r=qf.encodings.BECH32M),qf.encode(e,t,this.hashBuffer,r)}return XS.encode(this.toBuffer())};ce.prototype.inspect=function(){return"<Address: "+this.toString()+", type: "+this.type+", network: "+this.network+">"};ZS.exports=ce;var Ja=Mi()});var Hf=W((aj,JS)=>{"use strict";function Vo(){}Vo.getRandomBuffer=function(e){return process.browser?Vo.getRandomBufferBrowser(e):Vo.getRandomBufferNode(e)};Vo.getRandomBufferNode=function(e){var t=require("crypto");return t.randomBytes(e)};Vo.getRandomBufferBrowser=function(e){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");if(window.crypto&&window.crypto.getRandomValues)var t=window.crypto;else if(window.msCrypto&&window.msCrypto.getRandomValues)var t=window.msCrypto;else throw new Error("window.crypto.getRandomValues not available");var r=new Uint8Array(e);t.getRandomValues(r);var i=Buffer.from(r);return i};Vo.getPseudoRandomBuffer=function(e){for(var t=4294967296,r=Buffer.alloc(e),i,n=0;n<=e;n++){var a=Math.floor(n/4),u=n-a*4;u===0?(i=Math.random()*t,r[n]=i&255):r[n]=(i=i>>>8)&255}return r};JS.exports=Vo});var vu=W((oj,i3)=>{"use strict";var Ph=vt(),hC=zn(),QS=$c(),Ko=Zr(),e3=Lr(),oa=Ha(),t3=Bo(),dC=jn(),mC=Hf(),r3=It();function ut(e,t){if(!(this instanceof ut))return new ut(e,t);if(e instanceof ut)return e;var r=this._classifyArguments(e,t);if(!r.bn||r.bn.cmp(new Ko(0))===0)throw new TypeError("Number can not be equal to zero, undefined, null or false");if(!r.bn.lt(t3.getN()))throw new TypeError("Number must be less than N");if(typeof r.network>"u")throw new TypeError('Must specify the network ("livenet" or "testnet")');return e3.defineImmutable(this,{bn:r.bn,compressed:r.compressed,network:r.network}),Object.defineProperty(this,"publicKey",{configurable:!1,enumerable:!0,get:this.toPublicKey.bind(this)}),this}ut.prototype._classifyArguments=function(e,t){var r={compressed:!0,network:t?oa.get(t):oa.defaultNetwork};if(Ph.isUndefined(e)||Ph.isNull(e))r.bn=ut._getRandomBN();else if(e instanceof Ko)r.bn=e;else if(e instanceof Buffer||e instanceof Uint8Array)r=ut._transformBuffer(e,t);else if(e.bn&&e.network)r=ut._transformObject(e);else if(!t&&oa.get(e))r.bn=ut._getRandomBN(),r.network=oa.get(e);else if(typeof e=="string")e3.isHexa(e)?r.bn=new Ko(Buffer.from(e,"hex")):r=ut._transformWIF(e,t);else throw new TypeError("First argument is an unrecognized data type.");return r};ut._getRandomBN=function(){var e,t;do{var r=mC.getRandomBuffer(32);t=Ko.fromBuffer(r),e=t.lt(t3.getN())}while(!e);return t};ut._transformBuffer=function(e,t){var r={};if(e.length===32)return ut._transformBNBuffer(e,t);if(r.network=oa.get(e[0],"privatekey"),!r.network)throw new Error("Invalid network");if(t&&r.network!==oa.get(t))throw new TypeError("Private key network mismatch");if(e.length===34&&e[33]===1)r.compressed=!0;else if(e.length===33)r.compressed=!1;else throw new Error("Length of buffer must be 33 (uncompressed) or 34 (compressed)");return r.bn=Ko.fromBuffer(e.slice(1,33)),r};ut._transformBNBuffer=function(e,t){var r={};return r.network=oa.get(t)||oa.defaultNetwork,r.bn=Ko.fromBuffer(e),r.compressed=!1,r};ut._transformWIF=function(e,t){return ut._transformBuffer(QS.decode(e),t)};ut.fromBuffer=function(e,t){return new ut(e,t)};ut._transformObject=function(e){var t=new Ko(e.bn,"hex"),r=oa.get(e.network);return{bn:t,network:r,compressed:e.compressed}};ut.fromString=ut.fromWIF=function(e){return r3.checkArgument(Ph.isString(e),"First argument is expected to be a string."),new ut(e)};ut.fromObject=function(e){return r3.checkArgument(Ph.isObject(e),"First argument is expected to be an object."),new ut(e)};ut.fromRandom=function(e){var t=ut._getRandomBN();return new ut(t,e)};ut.getValidationError=function(e,t){var r;try{new ut(e,t)}catch(i){r=i}return r};ut.isValid=function(e,t){return e?!ut.getValidationError(e,t):!1};ut.prototype.toString=function(){return this.toBuffer().toString("hex")};ut.prototype.toWIF=function(){var e=this.network,t=this.compressed,r;return t?r=Buffer.concat([Buffer.from([e.privatekey]),this.bn.toBuffer({size:32}),Buffer.from([1])]):r=Buffer.concat([Buffer.from([e.privatekey]),this.bn.toBuffer({size:32})]),QS.encode(r)};ut.prototype.toBigNumber=function(){return this.bn};ut.prototype.toBuffer=function(){return this.bn.toBuffer({size:32})};ut.prototype.toBufferNoPadding=function(){return this.bn.toBuffer()};ut.prototype.toPublicKey=function(){return this._pubkey||(this._pubkey=dC.fromPrivateKey(this)),this._pubkey};ut.prototype.toAddress=function(e,t){var r=this.toPublicKey();return hC.fromPublicKey(r,e||this.network,t)};ut.prototype.toObject=ut.prototype.toJSON=function(){return{bn:this.bn.toString("hex"),compressed:this.compressed,network:this.network.toString()}};ut.prototype.inspect=function(){var e=this.compressed?"":", uncompressed";return"<PrivateKey: "+this.toString()+", network: "+this.network+e+">"};i3.exports=ut});var jn=W((cj,s3)=>{"use strict";var xu=Zr(),_u=Bo(),vC=ti(),gC=Lr(),n3=Ha(),Zv=vt(),Wo=It();function Pe(e,t){if(!(this instanceof Pe))return new Pe(e,t);if(Wo.checkArgument(e,"First argument is required, please include public key data."),e instanceof Pe)return e;t=t||{};var r=this._classifyArgs(e,t);return r.point.validate(),gC.defineImmutable(this,{point:r.point,compressed:r.compressed,network:r.network||n3.defaultNetwork}),this}Pe.prototype._classifyArgs=function(e,t){var r={compressed:Zv.isUndefined(t.compressed)||t.compressed};if(e instanceof _u)r.point=e;else if(e.x&&e.y)r=Pe._transformObject(e);else if(typeof e=="string")r=Pe._transformDER(Buffer.from(e,"hex"));else if(Pe._isBuffer(e))r=Pe._transformDER(e);else if(Pe._isPrivateKey(e))r=Pe._transformPrivateKey(e);else throw new TypeError("First argument is an unrecognized data format.");return r.network||(r.network=Zv.isUndefined(t.network)?void 0:n3.get(t.network)),r};Pe._isPrivateKey=function(e){var t=vu();return e instanceof t};Pe._isBuffer=function(e){return e instanceof Buffer||e instanceof Uint8Array};Pe._transformPrivateKey=function(e){Wo.checkArgument(Pe._isPrivateKey(e),"Must be an instance of PrivateKey");var t={};return t.point=_u.getG().mul(e.bn),t.compressed=e.compressed,t.network=e.network,t};Pe._transformDER=function(e,t){Wo.checkArgument(Pe._isBuffer(e),"Must be a hex buffer of DER encoded public key");var r={};t=Zv.isUndefined(t)?!0:t;var i,n,a,u;if(e[0]===4||!t&&(e[0]===6||e[0]===7)){if(a=e.slice(1,33),u=e.slice(33,65),a.length!==32||u.length!==32||e.length!==65)throw new TypeError("Length of x and y must be 32 bytes");i=new xu(a),n=new xu(u),r.point=new _u(i,n),r.compressed=!1}else if(e[0]===3)a=e.slice(1),i=new xu(a),r=Pe._transformX(!0,i),r.compressed=!0;else if(e[0]===2)a=e.slice(1),i=new xu(a),r=Pe._transformX(!1,i),r.compressed=!0;else throw new TypeError("Invalid DER format public key");return r};Pe._transformX=function(e,t){Wo.checkArgument(typeof e=="boolean","Must specify whether y is odd or not (true or false)");var r={};return r.point=_u.fromX(e,t),r};Pe._transformObject=function(e){var t=new xu(e.x,"hex"),r=new xu(e.y,"hex"),i=new _u(t,r);return new Pe(i,{compressed:e.compressed})};Pe.fromPrivateKey=function(e){Wo.checkArgument(Pe._isPrivateKey(e),"Must be an instance of PrivateKey");var t=Pe._transformPrivateKey(e);return new Pe(t.point,{compressed:t.compressed,network:t.network})};Pe.fromDER=Pe.fromBuffer=function(e,t){Wo.checkArgument(Pe._isBuffer(e),"Must be a hex buffer of DER encoded public key");var r=Pe._transformDER(e,t);return new Pe(r.point,{compressed:r.compressed})};Pe.fromPoint=function(e,t){return Wo.checkArgument(e instanceof _u,"First argument must be an instance of Point."),new Pe(e,{compressed:t})};Pe.fromString=function(e,t){var r=Buffer.from(e,t||"hex"),i=Pe._transformDER(r);return new Pe(i.point,{compressed:i.compressed})};Pe.fromX=function(e,t){var r=Pe._transformX(e,t);return new Pe(r.point,{compressed:r.compressed})};Pe.getValidationError=function(e){var t;try{new Pe(e)}catch(r){t=r}return t};Pe.isValid=function(e){return!Pe.getValidationError(e)};Pe.prototype.toObject=Pe.prototype.toJSON=function(){return{x:this.point.getX().toString("hex",2),y:this.point.getY().toString("hex",2),compressed:this.compressed}};Pe.prototype.toBuffer=Pe.prototype.toDER=function(){var e=this.point.getX(),t=this.point.getY(),r=e.toBuffer({size:32}),i=t.toBuffer({size:32}),n;if(this.compressed){var a=i[i.length-1]%2;return a?n=Buffer.from([3]):n=Buffer.from([2]),Buffer.concat([n,r])}else return n=Buffer.from([4]),Buffer.concat([n,r,i])};Pe.prototype._getID=function(){return vC.sha256ripemd160(this.toBuffer())};Pe.prototype.toAddress=function(e,t){var r=zn();return r.fromPublicKey(this,e||this.network,t)};Pe.prototype.toString=function(){return this.toDER().toString("hex")};Pe.prototype.inspect=function(){return"<PublicKey: "+this.toString()+(this.compressed?"":", uncompressed")+">"};s3.exports=Pe});var Mf=W((uj,a3)=>{"use strict";var Ji=Zr(),En=Bo(),bC=Pi(),xC=jn(),_C=Hf(),Qa=ti(),Qv=hr(),yC=vt(),Jv=It(),Pr=function e(t){if(!(this instanceof e))return new e(t);t&&this.set(t)};Pr.prototype.set=function(e){return this.hashbuf=e.hashbuf||this.hashbuf,this.endian=e.endian||this.endian,this.privkey=e.privkey||this.privkey,this.pubkey=e.pubkey||(this.privkey?this.privkey.publicKey:this.pubkey),this.sig=e.sig||this.sig,this.k=e.k||this.k,this.verified=e.verified||this.verified,this};Pr.prototype.privkey2pubkey=function(){this.pubkey=this.privkey.toPublicKey()};Pr.prototype.calci=function(){for(var e=0;e<4;e++){this.sig.i=e;var t;try{t=this.toPublicKey()}catch(r){console.error(r);continue}if(t.point.eq(this.pubkey.point))return this.sig.compressed=this.pubkey.compressed,this}throw this.sig.i=void 0,new Error("Unable to find valid recovery factor")};Pr.fromString=function(e){var t=JSON.parse(e);return new Pr(t)};Pr.prototype.randomK=function(){var e=En.getN(),t;do t=Ji.fromBuffer(_C.getRandomBuffer(32));while(!(t.lt(e)&&t.gt(Ji.Zero)));return this.k=t,this};Pr.prototype.deterministicK=function(e){yC.isUndefined(e)&&(e=0);var t=Buffer.alloc(32);t.fill(1);var r=Buffer.alloc(32);r.fill(0);var i=this.privkey.bn.toBuffer({size:32}),n=this.endian==="little"?Qv.reverse(this.hashbuf):this.hashbuf;r=Qa.sha256hmac(Buffer.concat([t,Buffer.from([0]),i,n]),r),t=Qa.sha256hmac(t,r),r=Qa.sha256hmac(Buffer.concat([t,Buffer.from([1]),i,n]),r),t=Qa.sha256hmac(t,r),t=Qa.sha256hmac(t,r);for(var a=Ji.fromBuffer(t),u=En.getN(),h=0;h<e||!(a.lt(u)&&a.gt(Ji.Zero));h++)r=Qa.sha256hmac(Buffer.concat([t,Buffer.from([0])]),r),t=Qa.sha256hmac(t,r),t=Qa.sha256hmac(t,r),a=Ji.fromBuffer(t);return this.k=a,this};Pr.prototype.toPublicKey=function(){var e=this.sig.i;Jv.checkArgument(e===0||e===1||e===2||e===3,new Error("i must be equal to 0, 1, 2, or 3"));var t=Ji.fromBuffer(this.hashbuf),r=this.sig.r,i=this.sig.s,n=e&1,a=e>>1,u=En.getN(),h=En.getG(),b=a?r.add(u):r,w=En.fromX(n,b),T=w.mul(u);if(!T.isInfinity())throw new Error("nR is not a valid curve point");var I=t.neg().umod(u),B=r.invm(u),M=w.mul(i).add(h.mul(I)).mul(B),P=xC.fromPoint(M,this.sig.compressed);return P};Pr.prototype.sigError=function(){if(!Qv.isBuffer(this.hashbuf)||this.hashbuf.length!==32)return"hashbuf must be a 32 byte buffer";var e=this.sig.r,t=this.sig.s;if(!(e.gt(Ji.Zero)&&e.lt(En.getN()))||!(t.gt(Ji.Zero)&&t.lt(En.getN())))return"r and s not in range";var r=Ji.fromBuffer(this.hashbuf,this.endian?{endian:this.endian}:void 0),i=En.getN(),n=t.invm(i),a=n.mul(r).umod(i),u=n.mul(e).umod(i),h=En.getG().mulAdd(a,this.pubkey.point,u);return h.isInfinity()?"p is infinity":h.getX().umod(i).cmp(e)!==0?"Invalid signature":!1};Pr.toLowS=function(e){return e.gt(Ji.fromBuffer(Buffer.from("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))&&(e=En.getN().sub(e)),e};Pr.prototype._findSignature=function(e,t){var r=En.getN(),i=En.getG(),n=0,a,u,h,b;do(!this.k||n>0)&&this.deterministicK(n),n++,a=this.k,u=i.mul(a),h=u.x.umod(r),b=a.invm(r).mul(t.add(e.mul(h))).umod(r);while(h.cmp(Ji.Zero)<=0||b.cmp(Ji.Zero)<=0);return b=Pr.toLowS(b),{s:b,r:h}};Pr.prototype.sign=function(){var e=this.hashbuf,t=this.privkey,r=t.bn;Jv.checkState(e&&t&&r,new Error("invalid parameters")),Jv.checkState(Qv.isBuffer(e)&&e.length===32,new Error("hashbuf must be a 32 byte buffer"));var i=Ji.fromBuffer(e,this.endian?{endian:this.endian}:void 0),n=this._findSignature(r,i);return n.compressed=this.pubkey.compressed,this.sig=new bC(n),this};Pr.prototype.signRandomK=function(){return this.randomK(),this.sign()};Pr.prototype.toString=function(){var e={};return this.hashbuf&&(e.hashbuf=this.hashbuf.toString("hex")),this.privkey&&(e.privkey=this.privkey.toString()),this.pubkey&&(e.pubkey=this.pubkey.toString()),this.sig&&(e.sig=this.sig.toString()),this.k&&(e.k=this.k.toString()),JSON.stringify(e)};Pr.prototype.verify=function(){return this.sigError()?this.verified=!1:this.verified=!0,this};Pr.sign=function(e,t,r){return Pr().set({hashbuf:e,endian:r,privkey:t}).sign().sig};Pr.verify=function(e,t,r,i){return Pr().set({hashbuf:e,endian:i,sig:t,pubkey:r}).verify().verified};a3.exports=Pr});var f3=W((fj,u3)=>{"use strict";var o3=yi(),c3=bs(),wC=Zr(),Wn=function e(t){if(!(this instanceof e))return new e(t);if(Buffer.isBuffer(t))this.buf=t;else if(typeof t=="number"){var r=t;this.fromNumber(r)}else if(t instanceof wC){var i=t;this.fromBN(i)}else if(t){var n=t;this.set(n)}};Wn.prototype.set=function(e){return this.buf=e.buf||this.buf,this};Wn.prototype.fromString=function(e){return this.set({buf:Buffer.from(e,"hex")}),this};Wn.prototype.toString=function(){return this.buf.toString("hex")};Wn.prototype.fromBuffer=function(e){return this.buf=e,this};Wn.prototype.fromBufferReader=function(e){return this.buf=e.readVarintBuf(),this};Wn.prototype.fromBN=function(e){return this.buf=o3().writeVarintBN(e).concat(),this};Wn.prototype.fromNumber=function(e){return this.buf=o3().writeVarintNum(e).concat(),this};Wn.prototype.toBuffer=function(){return this.buf};Wn.prototype.toBN=function(){return c3(this.buf).readVarintBN()};Wn.prototype.toNumber=function(){return c3(this.buf).readVarintNum()};u3.exports=Wn});var jf=W((pj,h3)=>{"use strict";var Bh=vt(),zf=Zr(),yu=hr(),Mh=bs(),SC=yi(),EC=ti(),lj=Lr(),l3=It(),TC=486604799,gt=function e(t){if(!(this instanceof e))return new e(t);var r=e._from(t);return this.version=r.version,this.prevHash=r.prevHash,this.merkleRoot=r.merkleRoot,this.time=r.time,this.timestamp=r.time,this.bits=r.bits,this.nonce=r.nonce,r.hash&&l3.checkState(this.hash===r.hash,"Argument object hash property does not match block hash."),this};gt._from=function(t){var r={};if(yu.isBuffer(t))r=gt._fromBufferReader(Mh(t));else if(Bh.isObject(t))r=gt._fromObject(t);else throw new TypeError("Unrecognized argument for BlockHeader");return r};gt._fromObject=function(t){l3.checkArgument(t,"data is required");var r=t.prevHash,i=t.merkleRoot;Bh.isString(t.prevHash)&&(r=yu.reverse(Buffer.from(t.prevHash,"hex"))),Bh.isString(t.merkleRoot)&&(i=yu.reverse(Buffer.from(t.merkleRoot,"hex")));var n={hash:t.hash,version:t.version,prevHash:r,merkleRoot:i,time:t.time,timestamp:t.time,bits:t.bits,nonce:t.nonce};return n};gt.fromObject=function(t){var r=gt._fromObject(t);return new gt(r)};gt.fromRawBlock=function(t){yu.isBuffer(t)||(t=Buffer.from(t,"binary"));var r=Mh(t);r.pos=gt.Constants.START_OF_HEADER;var i=gt._fromBufferReader(r);return new gt(i)};gt.fromBuffer=function(t){var r=gt._fromBufferReader(Mh(t));return new gt(r)};gt.fromString=function(t){var r=Buffer.from(t,"hex");return gt.fromBuffer(r)};gt._fromBufferReader=function(t){var r={};return r.version=t.readInt32LE(),r.prevHash=t.read(32),r.merkleRoot=t.read(32),r.time=t.readUInt32LE(),r.bits=t.readUInt32LE(),r.nonce=t.readUInt32LE(),r};gt.fromBufferReader=function(t){var r=gt._fromBufferReader(t);return new gt(r)};gt.prototype.toObject=gt.prototype.toJSON=function(){return{hash:this.hash,version:this.version,prevHash:yu.reverse(this.prevHash).toString("hex"),merkleRoot:yu.reverse(this.merkleRoot).toString("hex"),time:this.time,bits:this.bits,nonce:this.nonce}};gt.prototype.toBuffer=function(){return this.toBufferWriter().concat()};gt.prototype.toString=function(){return this.toBuffer().toString("hex")};gt.prototype.toBufferWriter=function(t){return t||(t=new SC),t.writeInt32LE(this.version),t.write(this.prevHash),t.write(this.merkleRoot),t.writeUInt32LE(this.time),t.writeUInt32LE(this.bits),t.writeUInt32LE(this.nonce),t};gt.prototype.getTargetDifficulty=function(t){t=t||this.bits;for(var r=new zf(t&16777215),i=8*((t>>>24)-3);i-- >0;)r=r.mul(new zf(2));return r};gt.prototype.getDifficulty=function(){var t=this.getTargetDifficulty(TC).mul(new zf(Math.pow(10,8))),r=this.getTargetDifficulty(),i=t.div(r).toString(10),n=i.length-8;return i=i.slice(0,n)+"."+i.slice(n),parseFloat(i)};gt.prototype._getHash=function(){var t=this.toBuffer();return EC.sha256sha256(t)};var p3={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=Mh(this._getHash()).readReverse().toString("hex")),this._id},set:Bh.noop};Object.defineProperty(gt.prototype,"id",p3);Object.defineProperty(gt.prototype,"hash",p3);gt.prototype.validTimestamp=function(){var t=Math.round(new Date().getTime()/1e3);return!(this.time>t+gt.Constants.MAX_TIME_OFFSET)};gt.prototype.validProofOfWork=function(){var t=new zf(this.id,"hex"),r=this.getTargetDifficulty();return!(t.cmp(r)>0)};gt.prototype.inspect=function(){return"<BlockHeader "+this.id+">"};gt.Constants={START_OF_HEADER:8,MAX_TIME_OFFSET:2*60*60,LARGEST_HASH:new zf("10000000000000000000000000000000000000000000000000000000000000000","hex")};h3.exports=gt});var _3=W((hj,x3)=>{"use strict";var tg=vt(),m3=jf(),d3=Zr(),v3=hr(),rg=bs(),IC=yi(),RC=ti(),eg=Df(),g3=It();function pt(e){return this instanceof pt?(tg.extend(this,pt._from(e)),this):new pt(e)}pt.MAX_BLOCK_SIZE=1e6;pt._from=function(t){var r={};if(v3.isBuffer(t))r=pt._fromBufferReader(rg(t));else if(tg.isObject(t))r=pt._fromObject(t);else throw new TypeError("Unrecognized argument for Block");return r};pt._fromObject=function(t){var r=[];t.transactions.forEach(function(n){n instanceof eg?r.push(n):r.push(eg().fromObject(n))});var i={header:m3.fromObject(t.header),transactions:r};return i};pt.fromObject=function(t){var r=pt._fromObject(t);return new pt(r)};pt._fromBufferReader=function(t){var r={};g3.checkState(!t.finished(),"No block data received"),r.header=m3.fromBufferReader(t);var i=t.readVarintNum();r.transactions=[];for(var n=0;n<i;n++)r.transactions.push(eg().fromBufferReader(t));return r};pt.fromBufferReader=function(t){g3.checkArgument(t,"br is required");var r=pt._fromBufferReader(t);return new pt(r)};pt.fromBuffer=function(t){return pt.fromBufferReader(new rg(t))};pt.fromString=function(t){var r=Buffer.from(t,"hex");return pt.fromBuffer(r)};pt.fromRawBlock=function(t){v3.isBuffer(t)||(t=Buffer.from(t,"binary"));var r=rg(t);r.pos=pt.Values.START_OF_BLOCK;var i=pt._fromBufferReader(r);return new pt(i)};pt.prototype.toObject=pt.prototype.toJSON=function(){var t=[];return this.transactions.forEach(function(r){t.push(r.toObject())}),{header:this.header.toObject(),transactions:t}};pt.prototype.toBuffer=function(){return this.toBufferWriter().concat()};pt.prototype.toString=function(){return this.toBuffer().toString("hex")};pt.prototype.toBufferWriter=function(t){t||(t=new IC),t.write(this.header.toBuffer()),t.writeVarintNum(this.transactions.length);for(var r=0;r<this.transactions.length;r++)this.transactions[r].toBufferWriter(t);return t};pt.prototype.getTransactionHashes=function(){var t=[];if(this.transactions.length===0)return[pt.Values.NULL_HASH];for(var r=0;r<this.transactions.length;r++)t.push(this.transactions[r]._getHash());return t};pt.prototype.getMerkleTree=function(){for(var t=this.getTransactionHashes(),r=0,i=this.transactions.length;i>1;i=Math.floor((i+1)/2)){for(var n=0;n<i;n+=2){var a=Math.min(n+1,i-1),u=Buffer.concat([t[r+n],t[r+a]]);t.push(RC.sha256sha256(u))}r+=i}return t};pt.prototype.getMerkleRoot=function(){var t=this.getMerkleTree();return t[t.length-1]};pt.prototype.validMerkleRoot=function(){var t=new d3(this.header.merkleRoot.toString("hex"),"hex"),r=new d3(this.getMerkleRoot().toString("hex"),"hex");return t.cmp(r)===0};pt.prototype._getHash=function(){return this.header._getHash()};var b3={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=this.header.id),this._id},set:tg.noop};Object.defineProperty(pt.prototype,"id",b3);Object.defineProperty(pt.prototype,"hash",b3);pt.prototype.inspect=function(){return"<Block "+this.id+">"};pt.Values={START_OF_BLOCK:8,NULL_HASH:Buffer.from("0000000000000000000000000000000000000000000000000000000000000000","hex")};x3.exports=pt});var ag=W((mj,S3)=>{"use strict";var Go=vt(),ng=jf(),sg=hr(),w3=bs(),AC=yi(),OC=ti(),dj=Lr(),y3=Df(),ig=Yi(),$o=It();function wr(e){if(!(this instanceof wr))return new wr(e);var t={};if(sg.isBuffer(e))t=wr._fromBufferReader(w3(e));else if(Go.isObject(e)){var r;e.header instanceof ng?r=e.header:r=ng.fromObject(e.header),t={header:r,numTransactions:e.numTransactions,hashes:e.hashes,flags:e.flags}}else throw new TypeError("Unrecognized argument for MerkleBlock");return Go.extend(this,t),this._flagBitsUsed=0,this._hashesUsed=0,this}wr.fromBuffer=function(t){return wr.fromBufferReader(w3(t))};wr.fromBufferReader=function(t){return new wr(wr._fromBufferReader(t))};wr.prototype.toBuffer=function(){return this.toBufferWriter().concat()};wr.prototype.toBufferWriter=function(t){t||(t=new AC),t.write(this.header.toBuffer()),t.writeUInt32LE(this.numTransactions),t.writeVarintNum(this.hashes.length);for(var r=0;r<this.hashes.length;r++)t.write(Buffer.from(this.hashes[r],"hex"));for(t.writeVarintNum(this.flags.length),r=0;r<this.flags.length;r++)t.writeUInt8(this.flags[r]);return t};wr.prototype.toObject=wr.prototype.toJSON=function(){return{header:this.header.toObject(),numTransactions:this.numTransactions,hashes:this.hashes,flags:this.flags}};wr.prototype.validMerkleTree=function(){if($o.checkState(Go.isArray(this.flags),"MerkleBlock flags is not an array"),$o.checkState(Go.isArray(this.hashes),"MerkleBlock hashes is not an array"),this.hashes.length>this.numTransactions||this.flags.length*8<this.hashes.length)return!1;var t=this._calcTreeHeight(),r={hashesUsed:0,flagBitsUsed:0},i=this._traverseMerkleTree(t,0,r);return r.hashesUsed!==this.hashes.length?!1:sg.equals(i,this.header.merkleRoot)};wr.prototype.filterdTxsHash=function(){if($o.checkState(Go.isArray(this.flags),"MerkleBlock flags is not an array"),$o.checkState(Go.isArray(this.hashes),"MerkleBlock hashes is not an array"),this.hashes.length>this.numTransactions)throw new ig.MerkleBlock.InvalidMerkleTree;if(this.flags.length*8<this.hashes.length)throw new ig.MerkleBlock.InvalidMerkleTree;if(this.hashes.length===1)return[];var t=this._calcTreeHeight(),r={hashesUsed:0,flagBitsUsed:0},i=this._traverseMerkleTree(t,0,r,!0);if(r.hashesUsed!==this.hashes.length)throw new ig.MerkleBlock.InvalidMerkleTree;return i};wr.prototype._traverseMerkleTree=function(t,r,i,a){i=i||{},i.txs=i.txs||[],i.flagBitsUsed=i.flagBitsUsed||0,i.hashesUsed=i.hashesUsed||0;var a=a||!1;if(i.flagBitsUsed>this.flags.length*8)return null;var u=this.flags[i.flagBitsUsed>>3]>>>(i.flagBitsUsed++&7)&1;if(t===0||!u){if(i.hashesUsed>=this.hashes.length)return null;var h=this.hashes[i.hashesUsed++];return t===0&&u&&i.txs.push(h),Buffer.from(h,"hex")}else{var b=this._traverseMerkleTree(t-1,r*2,i),w=b;return r*2+1<this._calcTreeWidth(t-1)&&(w=this._traverseMerkleTree(t-1,r*2+1,i)),a?i.txs:OC.sha256sha256(new Buffer.concat([b,w]))}};wr.prototype._calcTreeWidth=function(t){return this.numTransactions+(1<<t)-1>>t};wr.prototype._calcTreeHeight=function(){for(var t=0;this._calcTreeWidth(t)>1;)t++;return t};wr.prototype.hasTransaction=function(t){$o.checkArgument(!Go.isUndefined(t),"tx cannot be undefined"),$o.checkArgument(t instanceof y3||typeof t=="string",'Invalid tx given, tx must be a "string" or "Transaction"');var r=t;t instanceof y3&&(r=sg.reverse(Buffer.from(t.id,"hex")).toString("hex"));var i=[],n=this._calcTreeHeight();return this._traverseMerkleTree(n,0,{txs:i}),i.indexOf(r)!==-1};wr._fromBufferReader=function(t){$o.checkState(!t.finished(),"No merkleblock data received");var r={};r.header=ng.fromBufferReader(t),r.numTransactions=t.readUInt32LE();var i=t.readVarintNum();r.hashes=[];for(var n=0;n<i;n++)r.hashes.push(t.read(32).toString("hex"));var a=t.readVarintNum();for(r.flags=[],n=0;n<a;n++)r.flags.push(t.readUInt8());return r};wr.fromObject=function(t){return new wr(t)};S3.exports=wr});var E3=W((vj,Ch)=>{Ch.exports=_3();Ch.exports.BlockHeader=jf();Ch.exports.MerkleBlock=ag()});var cg=W((gj,N3)=>{"use strict";var Ur=vt(),I3=It(),R3=Zr(),kC=xf(),Lh=$c(),A3=ti(),Dh=ug(),Xo=Ha(),og=Bo(),O3=jn(),k3=Yi(),Vf=k3,Gn=k3.HDPublicKey,Uh=require("assert"),T3=Lr(),Mt=hr();function ne(e){if(e instanceof ne)return e;if(!(this instanceof ne))return new ne(e);if(e)if(Ur.isString(e)||Mt.isBuffer(e)){var t=ne.getSerializedError(e);if(t){if(Mt.isBuffer(e)&&!ne.getSerializedError(e.toString()))return this._buildFromSerialized(e.toString());if(t instanceof Gn.ArgumentIsPrivateExtended)return new Dh(e).hdPublicKey;throw t}else return this._buildFromSerialized(e)}else{if(Ur.isObject(e))return e instanceof Dh?this._buildFromPrivate(e):this._buildFromObject(e);throw new Gn.UnrecognizedArgument(e)}else throw new Gn.MustSupplyArgument}ne.isValidPath=function(e){if(Ur.isString(e)){var t=Dh._getDerivationIndexes(e);return t!==null&&Ur.every(t,ne.isValidPath)}return Ur.isNumber(e)?e>=0&&e<ne.Hardened:!1};ne.prototype.derive=function(e,t){return this.deriveChild(e,t)};ne.prototype.deriveChild=function(e,t){if(Ur.isNumber(e))return this._deriveWithNumber(e,t);if(Ur.isString(e))return this._deriveFromString(e);throw new Gn.InvalidDerivationArgument(e)};ne.prototype._deriveWithNumber=function(e,t){if(e>=ne.Hardened||t)throw new Gn.InvalidIndexCantDeriveHardened;if(e<0)throw new Gn.InvalidPath(e);var r=Mt.integerAsBuffer(e),i=Mt.concat([this.publicKey.toBuffer(),r]),n=A3.sha512hmac(i,this._buffers.chainCode),a=R3.fromBuffer(n.slice(0,32),{size:32}),u=n.slice(32,64),h;try{h=O3.fromPoint(og.getG().mul(a).add(this.publicKey.point))}catch{return this._deriveWithNumber(e+1)}var b=new ne({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:u,publicKey:h});return b};ne.prototype._deriveFromString=function(e){if(Ur.includes(e,"'"))throw new Gn.InvalidIndexCantDeriveHardened;if(!ne.isValidPath(e))throw new Gn.InvalidPath(e);var t=Dh._getDerivationIndexes(e),r=t.reduce(function(i,n){return i._deriveWithNumber(n)},this);return r};ne.isValidSerialized=function(e,t){return Ur.isNull(ne.getSerializedError(e,t))};ne.getSerializedError=function(e,t){if(!(Ur.isString(e)||Mt.isBuffer(e)))return new Gn.UnrecognizedArgument("expected buffer or string");if(!kC.validCharacters(e))return new Vf.InvalidB58Char("(unknown)",e);try{e=Lh.decode(e)}catch{return new Vf.InvalidB58Checksum(e)}if(e.length!==ne.DataSize)return new Gn.InvalidLength(e);if(!Ur.isUndefined(t)){var r=ne._validateNetwork(e,t);if(r)return r}var i=Mt.integerFromBuffer(e.slice(0,4));return i===Xo.livenet.xprivkey||i===Xo.testnet.xprivkey?new Gn.ArgumentIsPrivateExtended:null};ne._validateNetwork=function(e,t){var r=Xo.get(t);if(!r)return new Vf.InvalidNetworkArgument(t);var i=e.slice(ne.VersionStart,ne.VersionEnd);return Mt.integerFromBuffer(i)!==r.xpubkey?new Vf.InvalidNetwork(i):null};ne.prototype._buildFromPrivate=function(e){var t=Ur.clone(e._buffers),r=og.getG().mul(R3.fromBuffer(t.privateKey));return t.publicKey=og.pointToCompressed(r),t.version=Mt.integerAsBuffer(Xo.get(Mt.integerFromBuffer(t.version)).xpubkey),t.privateKey=void 0,t.checksum=void 0,t.xprivkey=void 0,this._buildFromBuffers(t)};ne.prototype._buildFromObject=function(e){var t={version:e.network?Mt.integerAsBuffer(Xo.get(e.network).xpubkey):e.version,depth:Ur.isNumber(e.depth)?Mt.integerAsSingleByteBuffer(e.depth):e.depth,parentFingerPrint:Ur.isNumber(e.parentFingerPrint)?Mt.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:Ur.isNumber(e.childIndex)?Mt.integerAsBuffer(e.childIndex):e.childIndex,chainCode:Ur.isString(e.chainCode)?Buffer.from(e.chainCode,"hex"):e.chainCode,publicKey:Ur.isString(e.publicKey)?Buffer.from(e.publicKey,"hex"):Mt.isBuffer(e.publicKey)?e.publicKey:e.publicKey.toBuffer(),checksum:Ur.isNumber(e.checksum)?Mt.integerAsBuffer(e.checksum):e.checksum};return this._buildFromBuffers(t)};ne.prototype._buildFromSerialized=function(e){var t=Lh.decode(e),r={version:t.slice(ne.VersionStart,ne.VersionEnd),depth:t.slice(ne.DepthStart,ne.DepthEnd),parentFingerPrint:t.slice(ne.ParentFingerPrintStart,ne.ParentFingerPrintEnd),childIndex:t.slice(ne.ChildIndexStart,ne.ChildIndexEnd),chainCode:t.slice(ne.ChainCodeStart,ne.ChainCodeEnd),publicKey:t.slice(ne.PublicKeyStart,ne.PublicKeyEnd),checksum:t.slice(ne.ChecksumStart,ne.ChecksumEnd),xpubkey:e};return this._buildFromBuffers(r)};ne.prototype._buildFromBuffers=function(e){ne._validateBufferArguments(e),T3.defineImmutable(this,{_buffers:e});var t=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,e.publicKey],r=Mt.concat(t),i=Lh.checksum(r);if(!e.checksum||!e.checksum.length)e.checksum=i;else if(e.checksum.toString("hex")!==i.toString("hex"))throw new Vf.InvalidB58Checksum(r,i);var n=Xo.get(Mt.integerFromBuffer(e.version)),a;a=Lh.encode(Mt.concat(t)),e.xpubkey=Buffer.from(a);var u=new O3(e.publicKey,{network:n}),h=ne.ParentFingerPrintSize,b=A3.sha256ripemd160(u.toBuffer()).slice(0,h);return T3.defineImmutable(this,{xpubkey:a,network:n,depth:Mt.integerFromSingleByteBuffer(e.depth),publicKey:u,fingerPrint:b}),this};ne._validateBufferArguments=function(e){var t=function(r,i){var n=e[r];Uh(Mt.isBuffer(n),r+" argument is not a buffer, it's "+typeof n),Uh(n.length===i,r+" has not the expected size: found "+n.length+", expected "+i)};t("version",ne.VersionSize),t("depth",ne.DepthSize),t("parentFingerPrint",ne.ParentFingerPrintSize),t("childIndex",ne.ChildIndexSize),t("chainCode",ne.ChainCodeSize),t("publicKey",ne.PublicKeySize),e.checksum&&e.checksum.length&&t("checksum",ne.CheckSumSize)};ne.fromString=function(e){return I3.checkArgument(Ur.isString(e),"No valid string was provided"),new ne(e)};ne.fromObject=function(e){return I3.checkArgument(Ur.isObject(e),"No valid argument was provided"),new ne(e)};ne.prototype.toString=function(){return this.xpubkey};ne.prototype.inspect=function(){return"<HDPublicKey: "+this.xpubkey+">"};ne.prototype.toObject=ne.prototype.toJSON=function(){return{network:Xo.get(Mt.integerFromBuffer(this._buffers.version)).name,depth:Mt.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:Mt.integerFromBuffer(this.fingerPrint),parentFingerPrint:Mt.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:Mt.integerFromBuffer(this._buffers.childIndex),chainCode:Mt.bufferToHex(this._buffers.chainCode),publicKey:this.publicKey.toString(),checksum:Mt.integerFromBuffer(this._buffers.checksum),xpubkey:this.xpubkey}};ne.fromBuffer=function(e){return new ne(e)};ne.prototype.toBuffer=function(){return Mt.copy(this._buffers.xpubkey)};ne.Hardened=2147483648;ne.RootElementAlias=["m","M"];ne.VersionSize=4;ne.DepthSize=1;ne.ParentFingerPrintSize=4;ne.ChildIndexSize=4;ne.ChainCodeSize=32;ne.PublicKeySize=33;ne.CheckSumSize=4;ne.DataSize=78;ne.SerializedByteSize=82;ne.VersionStart=0;ne.VersionEnd=ne.VersionStart+ne.VersionSize;ne.DepthStart=ne.VersionEnd;ne.DepthEnd=ne.DepthStart+ne.DepthSize;ne.ParentFingerPrintStart=ne.DepthEnd;ne.ParentFingerPrintEnd=ne.ParentFingerPrintStart+ne.ParentFingerPrintSize;ne.ChildIndexStart=ne.ParentFingerPrintEnd;ne.ChildIndexEnd=ne.ChildIndexStart+ne.ChildIndexSize;ne.ChainCodeStart=ne.ChildIndexEnd;ne.ChainCodeEnd=ne.ChainCodeStart+ne.ChainCodeSize;ne.PublicKeyStart=ne.ChainCodeEnd;ne.PublicKeyEnd=ne.PublicKeyStart+ne.PublicKeySize;ne.ChecksumStart=ne.PublicKeyEnd;ne.ChecksumEnd=ne.ChecksumStart+ne.CheckSumSize;Uh(ne.PublicKeyEnd===ne.DataSize);Uh(ne.ChecksumEnd===ne.SerializedByteSize);N3.exports=ne});var ug=W((bj,D3)=>{"use strict";var qh=require("assert"),P3=require("buffer"),Br=vt(),M3=It(),C3=Zr(),NC=xf(),Kf=$c(),fg=ti(),Yo=Ha(),PC=Bo(),L3=vu(),BC=Hf(),wu=Yi(),_s=wu.HDPrivateKey,dr=hr(),Wf=Lr(),MC=128,B3=1/8,CC=512;function J(e){if(e instanceof J)return e;if(!(this instanceof J))return new J(e);if(!e)return this._generateRandomly();if(Yo.get(e))return this._generateRandomly(e);if(Br.isString(e)||dr.isBuffer(e))if(J.isValidSerialized(e))this._buildFromSerialized(e);else if(Wf.isValidJSON(e))this._buildFromJSON(e);else if(dr.isBuffer(e)&&J.isValidSerialized(e.toString()))this._buildFromSerialized(e.toString());else throw J.getSerializedError(e);else if(Br.isObject(e))this._buildFromObject(e);else throw new _s.UnrecognizedArgument(e)}J.isValidPath=function(e,t){if(Br.isString(e)){var r=J._getDerivationIndexes(e);return r!==null&&Br.every(r,J.isValidPath)}return Br.isNumber(e)?(e<J.Hardened&&t===!0&&(e+=J.Hardened),e>=0&&e<J.MaxIndex):!1};J._getDerivationIndexes=function(e){var t=e.split("/");if(Br.includes(J.RootElementAlias,e))return[];if(!Br.includes(J.RootElementAlias,t[0]))return null;var r=t.slice(1).map(function(i){var n=i.slice(-1)==="'";if(n&&(i=i.slice(0,-1)),!i||i[0]==="-")return NaN;var a=+i;return n&&(a+=J.Hardened),a});return Br.some(r,isNaN)?null:r};J.prototype.derive=function(e,t){return this.deriveNonCompliantChild(e,t)};J.prototype.deriveChild=function(e,t){if(Br.isNumber(e))return this._deriveWithNumber(e,t);if(Br.isString(e))return this._deriveFromString(e);throw new _s.InvalidDerivationArgument(e)};J.prototype.deriveNonCompliantChild=function(e,t){if(Br.isNumber(e))return this._deriveWithNumber(e,t,!0);if(Br.isString(e))return this._deriveFromString(e,!0);throw new _s.InvalidDerivationArgument(e)};J.prototype._deriveWithNumber=function(e,t,r){if(!J.isValidPath(e,t))throw new _s.InvalidPath(e);t=e>=J.Hardened?!0:t,e<J.Hardened&&t===!0&&(e+=J.Hardened);var i=dr.integerAsBuffer(e),n;if(t&&r){var a=this.privateKey.bn.toBuffer();n=dr.concat([Buffer.from([0]),a,i])}else if(t){var u=this.privateKey.bn.toBuffer({size:32});qh(u.length===32,"length of private key buffer is expected to be 32 bytes"),n=dr.concat([Buffer.from([0]),u,i])}else n=dr.concat([this.publicKey.toBuffer(),i]);var h=fg.sha512hmac(n,this._buffers.chainCode),b=C3.fromBuffer(h.slice(0,32),{size:32}),w=h.slice(32,64),T=b.add(this.privateKey.toBigNumber()).umod(PC.getN()).toBuffer({size:32});if(!L3.isValid(T))return this._deriveWithNumber(e+1,null,r);var I=new J({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:w,privateKey:T});return I};J.prototype._deriveFromString=function(e,t){if(!J.isValidPath(e))throw new _s.InvalidPath(e);var r=J._getDerivationIndexes(e),i=r.reduce(function(n,a){return n._deriveWithNumber(a,null,t)},this);return i};J.isValidSerialized=function(e,t){return!J.getSerializedError(e,t)};J.getSerializedError=function(e,t){if(!(Br.isString(e)||dr.isBuffer(e)))return new _s.UnrecognizedArgument("Expected string or buffer");if(!NC.validCharacters(e))return new wu.InvalidB58Char("(unknown)",e);try{e=Kf.decode(e)}catch{return new wu.InvalidB58Checksum(e)}if(e.length!==J.DataLength)return new _s.InvalidLength(e);if(!Br.isUndefined(t)){var r=J._validateNetwork(e,t);if(r)return r}return null};J._validateNetwork=function(e,t){var r=Yo.get(t);if(!r)return new wu.InvalidNetworkArgument(t);var i=e.slice(0,4);return dr.integerFromBuffer(i)!==r.xprivkey?new wu.InvalidNetwork(i):null};J.fromString=function(e){return M3.checkArgument(Br.isString(e),"No valid string was provided"),new J(e)};J.fromObject=function(e){return M3.checkArgument(Br.isObject(e),"No valid argument was provided"),new J(e)};J.prototype._buildFromJSON=function(e){return this._buildFromObject(JSON.parse(e))};J.prototype._buildFromObject=function(e){var t={version:e.network?dr.integerAsBuffer(Yo.get(e.network).xprivkey):e.version,depth:Br.isNumber(e.depth)?dr.integerAsSingleByteBuffer(e.depth):e.depth,parentFingerPrint:Br.isNumber(e.parentFingerPrint)?dr.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:Br.isNumber(e.childIndex)?dr.integerAsBuffer(e.childIndex):e.childIndex,chainCode:Br.isString(e.chainCode)?Buffer.from(e.chainCode,"hex"):e.chainCode,privateKey:Br.isString(e.privateKey)&&Wf.isHexa(e.privateKey)?Buffer.from(e.privateKey,"hex"):e.privateKey,checksum:e.checksum?e.checksum.length?e.checksum:dr.integerAsBuffer(e.checksum):void 0};return this._buildFromBuffers(t)};J.prototype._buildFromSerialized=function(e){var t=Kf.decode(e),r={version:t.slice(J.VersionStart,J.VersionEnd),depth:t.slice(J.DepthStart,J.DepthEnd),parentFingerPrint:t.slice(J.ParentFingerPrintStart,J.ParentFingerPrintEnd),childIndex:t.slice(J.ChildIndexStart,J.ChildIndexEnd),chainCode:t.slice(J.ChainCodeStart,J.ChainCodeEnd),privateKey:t.slice(J.PrivateKeyStart,J.PrivateKeyEnd),checksum:t.slice(J.ChecksumStart,J.ChecksumEnd),xprivkey:e};return this._buildFromBuffers(r)};J.prototype._generateRandomly=function(e){return J.fromSeed(BC.getRandomBuffer(64),e)};J.fromSeed=function(e,t){if(Wf.isHexaString(e)&&(e=Buffer.from(e,"hex")),!Buffer.isBuffer(e))throw new _s.InvalidEntropyArgument(e);if(e.length<MC*B3)throw new _s.InvalidEntropyArgument.NotEnoughEntropy(e);if(e.length>CC*B3)throw new _s.InvalidEntropyArgument.TooMuchEntropy(e);var r=fg.sha512hmac(e,Buffer.from("Bitcoin seed"));return new J({network:Yo.get(t)||Yo.defaultNetwork,depth:0,parentFingerPrint:0,childIndex:0,privateKey:r.slice(0,32),chainCode:r.slice(32,64)})};J.prototype._calcHDPublicKey=function(){if(!this._hdPublicKey){var e=cg();this._hdPublicKey=new e(this)}};J.prototype._buildFromBuffers=function(e){J._validateBufferArguments(e),Wf.defineImmutable(this,{_buffers:e});var t=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,dr.emptyBuffer(1),e.privateKey],r=P3.Buffer.concat(t);if(!e.checksum||!e.checksum.length)e.checksum=Kf.checksum(r);else if(e.checksum.toString()!==Kf.checksum(r).toString())throw new wu.InvalidB58Checksum(r);var i=Yo.get(dr.integerFromBuffer(e.version)),n;n=Kf.encode(P3.Buffer.concat(t)),e.xprivkey=Buffer.from(n);var a=new L3(C3.fromBuffer(e.privateKey),i),u=a.toPublicKey(),h=J.ParentFingerPrintSize,b=fg.sha256ripemd160(u.toBuffer()).slice(0,h);return Wf.defineImmutable(this,{xprivkey:n,network:i,depth:dr.integerFromSingleByteBuffer(e.depth),privateKey:a,publicKey:u,fingerPrint:b}),this._hdPublicKey=null,Object.defineProperty(this,"hdPublicKey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey}}),Object.defineProperty(this,"xpubkey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey.xpubkey}}),this};J._validateBufferArguments=function(e){var t=function(r,i){var n=e[r];qh(dr.isBuffer(n),r+" argument is not a buffer"),qh(n.length===i,r+" has not the expected size: found "+n.length+", expected "+i)};t("version",J.VersionSize),t("depth",J.DepthSize),t("parentFingerPrint",J.ParentFingerPrintSize),t("childIndex",J.ChildIndexSize),t("chainCode",J.ChainCodeSize),t("privateKey",J.PrivateKeySize),e.checksum&&e.checksum.length&&t("checksum",J.CheckSumSize)};J.prototype.toString=function(){return this.xprivkey};J.prototype.inspect=function(){return"<HDPrivateKey: "+this.xprivkey+">"};J.prototype.toObject=J.prototype.toJSON=function(){return{network:Yo.get(dr.integerFromBuffer(this._buffers.version),"xprivkey").name,depth:dr.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:dr.integerFromBuffer(this.fingerPrint),parentFingerPrint:dr.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:dr.integerFromBuffer(this._buffers.childIndex),chainCode:dr.bufferToHex(this._buffers.chainCode),privateKey:this.privateKey.toBuffer().toString("hex"),checksum:dr.integerFromBuffer(this._buffers.checksum),xprivkey:this.xprivkey}};J.fromBuffer=function(e){return new J(e.toString())};J.prototype.toBuffer=function(){return dr.copy(this._buffers.xprivkey)};J.DefaultDepth=0;J.DefaultFingerprint=0;J.DefaultChildIndex=0;J.Hardened=2147483648;J.MaxIndex=2*J.Hardened;J.RootElementAlias=["m","M","m'","M'"];J.VersionSize=4;J.DepthSize=1;J.ParentFingerPrintSize=4;J.ChildIndexSize=4;J.ChainCodeSize=32;J.PrivateKeySize=32;J.CheckSumSize=4;J.DataLength=78;J.SerializedByteSize=82;J.VersionStart=0;J.VersionEnd=J.VersionStart+J.VersionSize;J.DepthStart=J.VersionEnd;J.DepthEnd=J.DepthStart+J.DepthSize;J.ParentFingerPrintStart=J.DepthEnd;J.ParentFingerPrintEnd=J.ParentFingerPrintStart+J.ParentFingerPrintSize;J.ChildIndexStart=J.ParentFingerPrintEnd;J.ChildIndexEnd=J.ChildIndexStart+J.ChildIndexSize;J.ChainCodeStart=J.ChildIndexEnd;J.ChainCodeEnd=J.ChainCodeStart+J.ChainCodeSize;J.PrivateKeyStart=J.ChainCodeEnd+1;J.PrivateKeyEnd=J.PrivateKeyStart+J.PrivateKeySize;J.ChecksumStart=J.PrivateKeyEnd;J.ChecksumEnd=J.ChecksumStart+J.CheckSumSize;qh(J.ChecksumEnd===J.SerializedByteSize);D3.exports=J});var F3=W((_j,q3)=>{"use strict";var Gf=vt(),LC=vu(),DC=jn(),Fh=zn(),U3=yi(),Hh=Mf(),lg=Pi(),UC=ti().sha256sha256,qC=Lr(),eo=It();function qr(e){return this instanceof qr?(eo.checkArgument(Gf.isString(e),"First argument should be a string"),this.message=e,this):new qr(e)}qr.MAGIC_BYTES=Buffer.from(`Bitcoin Signed Message:
23
+ `);qr.prototype.magicHash=function(){var t=U3.varintBufNum(qr.MAGIC_BYTES.length),r=Buffer.from(this.message),i=U3.varintBufNum(r.length),n=Buffer.concat([t,qr.MAGIC_BYTES,i,r]),a=UC(n);return a};qr.prototype._sign=function(t){eo.checkArgument(t instanceof LC,"First argument should be an instance of PrivateKey");var r=this.magicHash(),i=new Hh;return i.hashbuf=r,i.privkey=t,i.pubkey=t.toPublicKey(),i.signRandomK(),i.calci(),i.sig};qr.prototype.sign=function(t){var r=this._sign(t);return r.toCompact().toString("base64")};qr.prototype._verify=function(t,r){eo.checkArgument(t instanceof DC,"First argument should be an instance of PublicKey"),eo.checkArgument(r instanceof lg,"Second argument should be an instance of Signature");var i=this.magicHash(),n=Hh.verify(i,r,t);return n||(this.error="The signature was invalid"),n};qr.prototype.verify=function(t,r){eo.checkArgument(t),eo.checkArgument(r&&Gf.isString(r)),Gf.isString(t)&&(t=Fh.fromString(t));var i=lg.fromCompact(Buffer.from(r,"base64")),n=new Hh;n.hashbuf=this.magicHash(),n.sig=i;var a=n.toPublicKey(),u=Fh.fromPublicKey(a,t.network);return t.toString()!==u.toString()?(this.error="The signature did not match the message digest",!1):this._verify(a,i)};qr.prototype.recoverPublicKey=function(t,r){eo.checkArgument(t),eo.checkArgument(r&&Gf.isString(r)),Gf.isString(t)&&(t=Fh.fromString(t));var i=lg.fromCompact(Buffer.from(r,"base64")),n=new Hh;n.hashbuf=this.magicHash(),n.sig=i;var a=n.toPublicKey(),u=Fh.fromPublicKey(a,t.network);return t.toString()!==u.toString()&&(this.error="The signature did not match the message digest"),a.toString()};qr.fromString=function(e){return new qr(e)};qr.fromJSON=function(t){return qC.isValidJSON(t)&&(t=JSON.parse(t)),new qr(t.message)};qr.prototype.toObject=function(){return{message:this.message}};qr.prototype.toJSON=function(){return JSON.stringify(this.toObject())};qr.prototype.toString=function(){return this.message};qr.prototype.inspect=function(){return"<Message: "+this.toString()+">"};q3.exports=qr;var xj=Mi()});var W3=W((yj,K3)=>{"use strict";var z3=vt(),j3=require("url"),H3=zn(),V3=Ih(),Mr=function(e,t){if(!(this instanceof Mr))return new Mr(e,t);if(this.extras={},this.knownParams=t||[],this.address=this.network=this.amount=this.message=null,typeof e=="string"){var r=Mr.parse(e);r.amount&&(r.amount=this._parseAmount(r.amount)),this._fromObject(r)}else if(typeof e=="object")this._fromObject(e);else throw new TypeError("Unrecognized data format.")};Mr.fromString=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return new Mr(t)};Mr.fromObject=function(t){return new Mr(t)};Mr.isValid=function(e,t){try{new Mr(e,t)}catch{return!1}return!0};Mr.parse=function(e){var t=j3.parse(e,!0);if(t.protocol!=="bitcoin:")throw new TypeError("Invalid bitcoin URI");var r=/[^:]*:\/?\/?([^?]*)/.exec(e);return t.query.address=r&&r[1]||void 0,t.query};Mr.Members=["address","amount","message","label","r"];Mr.prototype._fromObject=function(e){if(!H3.isValid(e.address))throw new TypeError("Invalid bitcoin address");this.address=new H3(e.address),this.network=this.address.network,this.amount=e.amount;for(var t in e)if(!(t==="address"||t==="amount")){if(/^req-/.exec(t)&&this.knownParams.indexOf(t)===-1)throw Error("Unknown required argument "+t);var r=Mr.Members.indexOf(t)>-1?this:this.extras;r[t]=e[t]}};Mr.prototype._parseAmount=function(e){if(e=Number(e),isNaN(e))throw new TypeError("Invalid amount");return V3.fromBTC(e).toSatoshis()};Mr.prototype.toObject=Mr.prototype.toJSON=function(){for(var t={},r=0;r<Mr.Members.length;r++){var i=Mr.Members[r];this.hasOwnProperty(i)&&typeof this[i]<"u"&&(t[i]=this[i].toString())}return z3.extend(t,this.extras),t};Mr.prototype.toString=function(){var e={};return this.amount&&(e.amount=V3.fromSatoshis(this.amount).toBTC()),this.message&&(e.message=this.message),this.label&&(e.label=this.label),this.r&&(e.r=this.r),z3.extend(e,this.extras),j3.format({protocol:"bitcoin:",host:this.address,query:e})};Mr.prototype.inspect=function(){return"<URI: "+this.toString()+">"};K3.exports=Mr});var zh=W((wj,G3)=>{"use strict";var je=G3.exports;je.version="v"+z_().version;je.versionGuard=function(e){if(e!==void 0){var t="More than one instance of bitcore-lib found. Please make sure to require bitcore-lib and check that submodules do not also include their own bitcore-lib dependency.";throw new Error(t)}};je.versionGuard(global._bitcore);global._bitcore=je.version;je.crypto={};je.crypto.BN=Zr();je.crypto.ECDSA=Mf();je.crypto.Hash=ti();je.crypto.Random=Hf();je.crypto.Point=Bo();je.crypto.Signature=Pi();je.encoding={};je.encoding.Base58=xf();je.encoding.Base58Check=$c();je.encoding.BufferReader=bs();je.encoding.BufferWriter=yi();je.encoding.Varint=f3();je.util={};je.util.buffer=hr();je.util.js=Lr();je.util.preconditions=It();je.errors=Yi();je.Address=zn();je.Block=E3();je.MerkleBlock=ag();je.BlockHeader=jf();je.HDPrivateKey=ug();je.HDPublicKey=cg();je.Message=F3();je.Networks=Ha();je.Opcode=ch();je.PrivateKey=vu();je.PublicKey=jn();je.Script=Mi();je.Transaction=Df();je.URI=W3();je.Unit=Ih();je.deps={};je.deps.bnjs=fm();je.deps.bs58=Gm();je.deps.Buffer=Buffer;je.deps.elliptic=zm();je.deps._=vt();je.Transaction.sighash=ra()});var oE=W((Aj,aE)=>{var sE=require("stream").Stream,_L=require("util");aE.exports=$n;function $n(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}_L.inherits($n,sE);$n.create=function(e,t){var r=new this;t=t||{};for(var i in t)r[i]=t[i];r.source=e;var n=e.emit;return e.emit=function(){return r._handleEmit(arguments),n.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty($n.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});$n.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};$n.prototype.resume=function(){this._released||this.release(),this.source.resume()};$n.prototype.pause=function(){this.source.pause()};$n.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};$n.prototype.pipe=function(){var e=sE.prototype.pipe.apply(this,arguments);return this.resume(),e};$n.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};$n.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var lE=W((Oj,fE)=>{var yL=require("util"),uE=require("stream").Stream,cE=oE();fE.exports=Sr;function Sr(){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}yL.inherits(Sr,uE);Sr.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};Sr.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};Sr.prototype.append=function(e){var t=Sr.isStreamLike(e);if(t){if(!(e instanceof cE)){var r=cE.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};Sr.prototype.pipe=function(e,t){return uE.prototype.pipe.call(this,e,t),this.resume(),e};Sr.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}};Sr.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var i=Sr.isStreamLike(r);i&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};Sr.prototype._pipeNext=function(e){this._currentStream=e;var t=Sr.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};Sr.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};Sr.prototype.write=function(e){this.emit("data",e)};Sr.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};Sr.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")};Sr.prototype.end=function(){this._reset(),this.emit("end")};Sr.prototype.destroy=function(){this._reset(),this.emit("close")};Sr.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};Sr.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};Sr.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};Sr.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var pE=W((kj,wL)=>{wL.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 dE=W((Nj,hE)=>{hE.exports=pE()});var gE=W(Ui=>{"use strict";var Gh=dE(),SL=require("path").extname,mE=/^\s*([^;\s]*)(?:;|\s|$)/,EL=/^text\//i;Ui.charset=vE;Ui.charsets={lookup:vE};Ui.contentType=TL;Ui.extension=IL;Ui.extensions=Object.create(null);Ui.lookup=RL;Ui.types=Object.create(null);AL(Ui.extensions,Ui.types);function vE(e){if(!e||typeof e!="string")return!1;var t=mE.exec(e),r=t&&Gh[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&EL.test(t[1])?"UTF-8":!1}function TL(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Ui.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Ui.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}function IL(e){if(!e||typeof e!="string")return!1;var t=mE.exec(e),r=t&&Ui.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}function RL(e){if(!e||typeof e!="string")return!1;var t=SL("x."+e).toLowerCase().substr(1);return t&&Ui.types[t]||!1}function AL(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Gh).forEach(function(n){var a=Gh[n],u=a.extensions;if(!(!u||!u.length)){e[n]=u;for(var h=0;h<u.length;h++){var b=u[h];if(t[b]){var w=r.indexOf(Gh[t[b]].source),T=r.indexOf(a.source);if(t[b]!=="application/octet-stream"&&(w>T||w===T&&t[b].substr(0,12)==="application/"))continue}t[b]=n}}})}});var xE=W((Bj,bE)=>{bE.exports=OL;function OL(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}});var mg=W((Mj,yE)=>{var _E=xE();yE.exports=kL;function kL(e){var t=!1;return _E(function(){t=!0}),function(i,n){t?e(i,n):_E(function(){e(i,n)})}}});var vg=W((Cj,wE)=>{wE.exports=NL;function NL(e){Object.keys(e.jobs).forEach(PL.bind(e)),e.jobs={}}function PL(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}});var gg=W((Lj,EE)=>{var SE=mg(),BL=vg();EE.exports=ML;function ML(e,t,r,i){var n=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[n]=CL(t,n,e[n],function(a,u){n in r.jobs&&(delete r.jobs[n],a?BL(r):r.results[n]=u,i(a,r.results))})}function CL(e,t,r,i){var n;return e.length==2?n=e(r,SE(i)):n=e(r,t,SE(i)),n}});var bg=W((Dj,TE)=>{TE.exports=LL;function LL(e,t){var r=!Array.isArray(e),i={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&i.keyedList.sort(r?t:function(n,a){return t(e[n],e[a])}),i}});var xg=W((Uj,IE)=>{var DL=vg(),UL=mg();IE.exports=qL;function qL(e){Object.keys(this.jobs).length&&(this.index=this.size,DL(this),UL(e)(null,this.results))}});var AE=W((qj,RE)=>{var FL=gg(),HL=bg(),zL=xg();RE.exports=jL;function jL(e,t,r){for(var i=HL(e);i.index<(i.keyedList||e).length;)FL(e,t,i,function(n,a){if(n){r(n,a);return}if(Object.keys(i.jobs).length===0){r(null,i.results);return}}),i.index++;return zL.bind(i,r)}});var _g=W((Fj,$h)=>{var OE=gg(),VL=bg(),KL=xg();$h.exports=WL;$h.exports.ascending=kE;$h.exports.descending=GL;function WL(e,t,r,i){var n=VL(e,r);return OE(e,t,n,function a(u,h){if(u){i(u,h);return}if(n.index++,n.index<(n.keyedList||e).length){OE(e,t,n,a);return}i(null,n.results)}),KL.bind(n,i)}function kE(e,t){return e<t?-1:e>t?1:0}function GL(e,t){return-1*kE(e,t)}});var PE=W((Hj,NE)=>{var $L=_g();NE.exports=XL;function XL(e,t,r){return $L(e,t,null,r)}});var ME=W((zj,BE)=>{BE.exports={parallel:AE(),serial:PE(),serialOrdered:_g()}});var LE=W((jj,CE)=>{CE.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var qE=W((Vj,UE)=>{var Eg=lE(),DE=require("util"),yg=require("path"),YL=require("http"),ZL=require("https"),JL=require("url").parse,QL=require("fs"),eD=require("stream").Stream,wg=gE(),tD=ME(),Sg=LE();UE.exports=wt;DE.inherits(wt,Eg);function wt(e){if(!(this instanceof wt))return new wt(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Eg.call(this),e=e||{};for(var t in e)this[t]=e[t]}wt.LINE_BREAK=`\r
24
+ `;wt.DEFAULT_CONTENT_TYPE="application/octet-stream";wt.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var i=Eg.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),DE.isArray(t)){this._error(new Error("Arrays are not supported."));return}var n=this._multiPartHeader(e,t,r),a=this._multiPartFooter();i(n),i(t),i(a),this._trackLength(n,t,r)};wt.prototype._trackLength=function(e,t,r){var i=0;r.knownLength!=null?i+=+r.knownLength:Buffer.isBuffer(t)?i=t.length:typeof t=="string"&&(i=Buffer.byteLength(t)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(e)+wt.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof eD))&&(r.knownLength||this._valuesToMeasure.push(t))};wt.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):QL.stat(e.path,function(r,i){var n;if(r){t(r);return}n=i.size-(e.start?e.start:0),t(null,n)}):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",function(r){e.pause(),t(null,+r.headers["content-length"])}),e.resume()):t("Unknown stream")};wt.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var i=this._getContentDisposition(t,r),n=this._getContentType(t,r),a="",u={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(n||[])};typeof r.header=="object"&&Sg(u,r.header);var h;for(var b in u)u.hasOwnProperty(b)&&(h=u[b],h!=null&&(Array.isArray(h)||(h=[h]),h.length&&(a+=b+": "+h.join("; ")+wt.LINE_BREAK)));return"--"+this.getBoundary()+wt.LINE_BREAK+a+wt.LINE_BREAK};wt.prototype._getContentDisposition=function(e,t){var r,i;return typeof t.filepath=="string"?r=yg.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?r=yg.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(r=yg.basename(e.client._httpMessage.path||"")),r&&(i='filename="'+r+'"'),i};wt.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e.name&&(r=wg.lookup(e.name)),!r&&e.path&&(r=wg.lookup(e.path)),!r&&e.readable&&e.hasOwnProperty("httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=wg.lookup(t.filepath||t.filename)),!r&&typeof e=="object"&&(r=wt.DEFAULT_CONTENT_TYPE),r};wt.prototype._multiPartFooter=function(){return function(e){var t=wt.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};wt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+wt.LINE_BREAK};wt.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(r[t.toLowerCase()]=e[t]);return r};wt.prototype.setBoundary=function(e){this._boundary=e};wt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};wt.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,i=this._streams.length;r<i;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(wt.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};wt.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(Math.random()*10).toString(16);this._boundary=e};wt.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};wt.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};wt.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}tD.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,i){if(r){e(r);return}i.forEach(function(n){t+=n}),e(null,t)})};wt.prototype.submit=function(e,t){var r,i,n={method:"post"};return typeof e=="string"?(e=JL(e),i=Sg({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},n)):(i=Sg(e,n),i.port||(i.port=i.protocol=="https:"?443:80)),i.headers=this.getHeaders(e.headers),i.protocol=="https:"?r=ZL.request(i):r=YL.request(i),this.getLength(function(a,u){if(a&&a!=="Unknown stream"){this._error(a);return}if(u&&r.setHeader("Content-Length",u),this.pipe(r),t){var h,b=function(w,T){return r.removeListener("error",b),r.removeListener("response",h),t.call(this,w,T)};h=b.bind(this,null),r.on("error",b),r.on("response",h)}}.bind(this)),r};wt.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};wt.prototype.toString=function(){return"[object FormData]"}});var t6=W(e6=>{"use strict";var gD=require("url").parse,bD={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},xD=String.prototype.endsWith||function(e){return e.length<=this.length&&this.indexOf(e,this.length-e.length)!==-1};function _D(e){var t=typeof e=="string"?gD(e):e||{},r=t.protocol,i=t.host,n=t.port;if(typeof i!="string"||!i||typeof r!="string"||(r=r.split(":",1)[0],i=i.replace(/:\d*$/,""),n=parseInt(n)||bD[r]||0,!yD(i,n)))return"";var a=Au("npm_config_"+r+"_proxy")||Au(r+"_proxy")||Au("npm_config_proxy")||Au("all_proxy");return a&&a.indexOf("://")===-1&&(a=r+"://"+a),a}function yD(e,t){var r=(Au("npm_config_no_proxy")||Au("no_proxy")).toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(i){if(!i)return!0;var n=i.match(/^(.+):(\d+)$/),a=n?n[1]:i,u=n?parseInt(n[2]):0;return u&&u!==t?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!xD.call(e,a)):e!==a}):!0}function Au(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}e6.getProxyForUrl=_D});var i6=W((KV,r6)=>{var el;r6.exports=function(){if(!el){try{el=require("debug")("follow-redirects")}catch{}typeof el!="function"&&(el=function(){})}el.apply(null,arguments)}});var c6=W((WV,Kg)=>{var il=require("url"),tl=il.URL,wD=require("http"),SD=require("https"),Ug=require("stream").Writable,qg=require("assert"),n6=i6(),Fg=!1;try{qg(new tl)}catch(e){Fg=e.code==="ERR_INVALID_URL"}var ED=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Hg=["abort","aborted","connect","error","socket","timeout"],zg=Object.create(null);Hg.forEach(function(e){zg[e]=function(t,r,i){this._redirectable.emit(e,t,r,i)}});var Cg=nl("ERR_INVALID_URL","Invalid URL",TypeError),Lg=nl("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),TD=nl("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Lg),ID=nl("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),RD=nl("ERR_STREAM_WRITE_AFTER_END","write after end"),AD=Ug.prototype.destroy||a6;function qi(e,t){Ug.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(i){try{r._processResponse(i)}catch(n){r.emit("error",n instanceof Lg?n:new Lg({cause:n}))}},this._performRequest()}qi.prototype=Object.create(Ug.prototype);qi.prototype.abort=function(){Vg(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};qi.prototype.destroy=function(e){return Vg(this._currentRequest,e),AD.call(this,e),this};qi.prototype.write=function(e,t,r){if(this._ending)throw new RD;if(!Qo(e)&&!ND(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(rl(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new ID),this.abort())};qi.prototype.end=function(e,t,r){if(rl(e)?(r=e,e=t=null):rl(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var i=this,n=this._currentRequest;this.write(e,t,function(){i._ended=!0,n.end(null,null,r)}),this._ending=!0}};qi.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};qi.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};qi.prototype.setTimeout=function(e,t){var r=this;function i(u){u.setTimeout(e),u.removeListener("timeout",u.destroy),u.addListener("timeout",u.destroy)}function n(u){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),a()},e),i(u)}function a(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",a),r.removeListener("error",a),r.removeListener("response",a),r.removeListener("close",a),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",n)}return t&&this.on("timeout",t),this.socket?n(this.socket):this._currentRequest.once("socket",n),this.on("socket",i),this.on("abort",a),this.on("error",a),this.on("response",a),this.on("close",a),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){qi.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(qi.prototype,e,{get:function(){return this._currentRequest[e]}})});qi.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};qi.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var n of Hg)i.on(n,zg[n]);if(this._currentUrl=/^\//.test(this._options.path)?il.format(this._options):this._options.path,this._isRedirect){var a=0,u=this,h=this._requestBodyBuffers;(function b(w){if(i===u._currentRequest)if(w)u.emit("error",w);else if(a<h.length){var T=h[a++];i.finished||i.write(T.data,T.encoding,b)}else u._ended&&i.end()})()}};qi.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(Vg(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new TD;var i,n=this._options.beforeRedirect;n&&(i=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var a=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Mg(/^content-/i,this._options.headers));var u=Mg(/^host$/i,this._options.headers),h=jg(this._currentUrl),b=u||h.host,w=/^\w+:/.test(r)?this._currentUrl:il.format(Object.assign(h,{host:b})),T=OD(r,w);if(n6("redirecting to",T.href),this._isRedirect=!0,Dg(T,this._options),(T.protocol!==h.protocol&&T.protocol!=="https:"||T.host!==b&&!kD(T.host,b))&&Mg(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),rl(n)){var I={headers:e.headers,statusCode:t},B={url:w,method:a,headers:i};n(this._options,I,B),this._sanitizeOptions(this._options)}this._performRequest()};function s6(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(i){var n=i+":",a=r[n]=e[i],u=t[i]=Object.create(a);function h(w,T,I){return PD(w)?w=Dg(w):Qo(w)?w=Dg(jg(w)):(I=T,T=o6(w),w={protocol:n}),rl(T)&&(I=T,T=null),T=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},w,T),T.nativeProtocols=r,!Qo(T.host)&&!Qo(T.hostname)&&(T.hostname="::1"),qg.equal(T.protocol,n,"protocol mismatch"),n6("options",T),new qi(T,I)}function b(w,T,I){var B=u.request(w,T,I);return B.end(),B}Object.defineProperties(u,{request:{value:h,configurable:!0,enumerable:!0,writable:!0},get:{value:b,configurable:!0,enumerable:!0,writable:!0}})}),t}function a6(){}function jg(e){var t;if(Fg)t=new tl(e);else if(t=o6(il.parse(e)),!Qo(t.protocol))throw new Cg({input:e});return t}function OD(e,t){return Fg?new tl(e,t):jg(il.resolve(t,e))}function o6(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new Cg({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new Cg({input:e.href||e});return e}function Dg(e,t){var r=t||{};for(var i of ED)r[i]=e[i];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function Mg(e,t){var r;for(var i in t)e.test(i)&&(r=t[i],delete t[i]);return r===null||typeof r>"u"?void 0:String(r).trim()}function nl(e,t,r){function i(n){Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return i.prototype=new(r||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),i}function Vg(e,t){for(var r of Hg)e.removeListener(r,zg[r]);e.on("error",a6),e.destroy(t)}function kD(e,t){qg(Qo(e)&&Qo(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function Qo(e){return typeof e=="string"||e instanceof String}function rl(e){return typeof e=="function"}function ND(e){return typeof e=="object"&&"length"in e}function PD(e){return tl&&e instanceof tl}Kg.exports=s6({http:wD,https:SD});Kg.exports.wrap=s6});var A4=W(($J,Lb)=>{"use strict";var Oq=Object.prototype.hasOwnProperty,Ei="~";function Ll(){}Object.create&&(Ll.prototype=Object.create(null),new Ll().__proto__||(Ei=!1));function kq(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function R4(e,t,r,i,n){if(typeof r!="function")throw new TypeError("The listener must be a function");var a=new kq(r,i||e,n),u=Ei?Ei+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function Bd(e,t){--e._eventsCount===0?e._events=new Ll:delete e._events[t]}function mi(){this._events=new Ll,this._eventsCount=0}mi.prototype.eventNames=function(){var t=[],r,i;if(this._eventsCount===0)return t;for(i in r=this._events)Oq.call(r,i)&&t.push(Ei?i.slice(1):i);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};mi.prototype.listeners=function(t){var r=Ei?Ei+t:t,i=this._events[r];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,a=i.length,u=new Array(a);n<a;n++)u[n]=i[n].fn;return u};mi.prototype.listenerCount=function(t){var r=Ei?Ei+t:t,i=this._events[r];return i?i.fn?1:i.length:0};mi.prototype.emit=function(t,r,i,n,a,u){var h=Ei?Ei+t:t;if(!this._events[h])return!1;var b=this._events[h],w=arguments.length,T,I;if(b.fn){switch(b.once&&this.removeListener(t,b.fn,void 0,!0),w){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,r),!0;case 3:return b.fn.call(b.context,r,i),!0;case 4:return b.fn.call(b.context,r,i,n),!0;case 5:return b.fn.call(b.context,r,i,n,a),!0;case 6:return b.fn.call(b.context,r,i,n,a,u),!0}for(I=1,T=new Array(w-1);I<w;I++)T[I-1]=arguments[I];b.fn.apply(b.context,T)}else{var B=b.length,M;for(I=0;I<B;I++)switch(b[I].once&&this.removeListener(t,b[I].fn,void 0,!0),w){case 1:b[I].fn.call(b[I].context);break;case 2:b[I].fn.call(b[I].context,r);break;case 3:b[I].fn.call(b[I].context,r,i);break;case 4:b[I].fn.call(b[I].context,r,i,n);break;default:if(!T)for(M=1,T=new Array(w-1);M<w;M++)T[M-1]=arguments[M];b[I].fn.apply(b[I].context,T)}}return!0};mi.prototype.on=function(t,r,i){return R4(this,t,r,i,!1)};mi.prototype.once=function(t,r,i){return R4(this,t,r,i,!0)};mi.prototype.removeListener=function(t,r,i,n){var a=Ei?Ei+t:t;if(!this._events[a])return this;if(!r)return Bd(this,a),this;var u=this._events[a];if(u.fn)u.fn===r&&(!n||u.once)&&(!i||u.context===i)&&Bd(this,a);else{for(var h=0,b=[],w=u.length;h<w;h++)(u[h].fn!==r||n&&!u[h].once||i&&u[h].context!==i)&&b.push(u[h]);b.length?this._events[a]=b.length===1?b[0]:b:Bd(this,a)}return this};mi.prototype.removeAllListeners=function(t){var r;return t?(r=Ei?Ei+t:t,this._events[r]&&Bd(this,r)):(this._events=new Ll,this._eventsCount=0),this};mi.prototype.off=mi.prototype.removeListener;mi.prototype.addListener=mi.prototype.on;mi.prefixed=Ei;mi.EventEmitter=mi;typeof Lb<"u"&&(Lb.exports=mi)});var L4=W((nte,C4)=>{"use strict";var{Duplex:Lq}=require("stream");function B4(e){e.emit("close")}function Dq(){!this.destroyed&&this._writableState.finished&&this.destroy()}function M4(e){this.removeListener("error",M4),this.destroy(),this.listenerCount("error")===0&&this.emit("error",e)}function Uq(e,t){let r=!0,i=new Lq({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",function(a,u){let h=!u&&i._readableState.objectMode?a.toString():a;i.push(h)||e.pause()}),e.once("error",function(a){i.destroyed||(r=!1,i.destroy(a))}),e.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(n,a){if(e.readyState===e.CLOSED){a(n),process.nextTick(B4,i);return}let u=!1;e.once("error",function(b){u=!0,a(b)}),e.once("close",function(){u||a(n),process.nextTick(B4,i)}),r&&e.terminate()},i._final=function(n){if(e.readyState===e.CONNECTING){e.once("open",function(){i._final(n)});return}e._socket!==null&&(e._socket._writableState.finished?(n(),i._readableState.endEmitted&&i.destroy()):(e._socket.once("finish",function(){n()}),e.close()))},i._read=function(){e.isPaused&&e.resume()},i._write=function(n,a,u){if(e.readyState===e.CONNECTING){e.once("open",function(){i._write(n,a,u)});return}e.send(n,u)},i.on("end",Dq),i.on("error",M4),i}C4.exports=Uq});var ho=W((ste,D4)=>{"use strict";D4.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Dl=W((ate,Ld)=>{"use strict";var{EMPTY_BUFFER:qq}=ho(),Fb=Buffer[Symbol.species];function Fq(e,t){if(e.length===0)return qq;if(e.length===1)return e[0];let r=Buffer.allocUnsafe(t),i=0;for(let n=0;n<e.length;n++){let a=e[n];r.set(a,i),i+=a.length}return i<t?new Fb(r.buffer,r.byteOffset,i):r}function U4(e,t,r,i,n){for(let a=0;a<n;a++)r[i+a]=e[a]^t[a&3]}function q4(e,t){for(let r=0;r<e.length;r++)e[r]^=t[r&3]}function Hq(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}function Hb(e){if(Hb.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new Fb(e):ArrayBuffer.isView(e)?t=new Fb(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),Hb.readOnly=!1),t}Ld.exports={concat:Fq,mask:U4,toArrayBuffer:Hq,toBuffer:Hb,unmask:q4};if(!process.env.WS_NO_BUFFER_UTIL)try{let e=require("bufferutil");Ld.exports.mask=function(t,r,i,n,a){a<48?U4(t,r,i,n,a):e.mask(t,r,i,n,a)},Ld.exports.unmask=function(t,r){t.length<32?q4(t,r):e.unmask(t,r)}}catch{}});var z4=W((ote,H4)=>{"use strict";var F4=Symbol("kDone"),zb=Symbol("kRun"),jb=class{constructor(t){this[F4]=()=>{this.pending--,this[zb]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[zb]()}[zb](){if(this.pending!==this.concurrency&&this.jobs.length){let t=this.jobs.shift();this.pending++,t(this[F4])}}};H4.exports=jb});var Fl=W((cte,W4)=>{"use strict";var Ul=require("zlib"),j4=Dl(),zq=z4(),{kStatusCode:V4}=ho(),jq=Buffer[Symbol.species],Vq=Buffer.from([0,0,255,255]),qd=Symbol("permessage-deflate"),ga=Symbol("total-length"),ql=Symbol("callback"),mo=Symbol("buffers"),Ud=Symbol("error"),Dd,Vb=class{constructor(t,r,i){if(this._maxPayload=i|0,this._options=t||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!r,this._deflate=null,this._inflate=null,this.params=null,!Dd){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Dd=new zq(n)}}static get extensionName(){return"permessage-deflate"}offer(){let t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let t=this._deflate[ql];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){let r=this._options,i=t.find(n=>!(r.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(r.serverMaxWindowBits===!1||typeof r.serverMaxWindowBits=="number"&&r.serverMaxWindowBits>n.server_max_window_bits)||typeof r.clientMaxWindowBits=="number"&&!n.client_max_window_bits));if(!i)throw new Error("None of the extension offers can be accepted");return r.serverNoContextTakeover&&(i.server_no_context_takeover=!0),r.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof r.serverMaxWindowBits=="number"&&(i.server_max_window_bits=r.serverMaxWindowBits),typeof r.clientMaxWindowBits=="number"?i.client_max_window_bits=r.clientMaxWindowBits:(i.client_max_window_bits===!0||r.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(t){let r=t[0];if(this._options.clientNoContextTakeover===!1&&r.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!r.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(r.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&r.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return r}normalizeParams(t){return t.forEach(r=>{Object.keys(r).forEach(i=>{let n=r[i];if(n.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(n=n[0],i==="client_max_window_bits"){if(n!==!0){let a=+n;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=a}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else if(i==="server_max_window_bits"){let a=+n;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=a}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else throw new Error(`Unknown parameter "${i}"`);r[i]=n})}),t}decompress(t,r,i){Dd.add(n=>{this._decompress(t,r,(a,u)=>{n(),i(a,u)})})}compress(t,r,i){Dd.add(n=>{this._compress(t,r,(a,u)=>{n(),i(a,u)})})}_decompress(t,r,i){let n=this._isServer?"client":"server";if(!this._inflate){let a=`${n}_max_window_bits`,u=typeof this.params[a]!="number"?Ul.Z_DEFAULT_WINDOWBITS:this.params[a];this._inflate=Ul.createInflateRaw({...this._options.zlibInflateOptions,windowBits:u}),this._inflate[qd]=this,this._inflate[ga]=0,this._inflate[mo]=[],this._inflate.on("error",Wq),this._inflate.on("data",K4)}this._inflate[ql]=i,this._inflate.write(t),r&&this._inflate.write(Vq),this._inflate.flush(()=>{let a=this._inflate[Ud];if(a){this._inflate.close(),this._inflate=null,i(a);return}let u=j4.concat(this._inflate[mo],this._inflate[ga]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[ga]=0,this._inflate[mo]=[],r&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),i(null,u)})}_compress(t,r,i){let n=this._isServer?"server":"client";if(!this._deflate){let a=`${n}_max_window_bits`,u=typeof this.params[a]!="number"?Ul.Z_DEFAULT_WINDOWBITS:this.params[a];this._deflate=Ul.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:u}),this._deflate[ga]=0,this._deflate[mo]=[],this._deflate.on("data",Kq)}this._deflate[ql]=i,this._deflate.write(t),this._deflate.flush(Ul.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let a=j4.concat(this._deflate[mo],this._deflate[ga]);r&&(a=new jq(a.buffer,a.byteOffset,a.length-4)),this._deflate[ql]=null,this._deflate[ga]=0,this._deflate[mo]=[],r&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),i(null,a)})}};W4.exports=Vb;function Kq(e){this[mo].push(e),this[ga]+=e.length}function K4(e){if(this[ga]+=e.length,this[qd]._maxPayload<1||this[ga]<=this[qd]._maxPayload){this[mo].push(e);return}this[Ud]=new RangeError("Max payload size exceeded"),this[Ud].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Ud][V4]=1009,this.removeListener("data",K4),this.reset()}function Wq(e){this[qd]._inflate=null,e[V4]=1007,this[ql](e)}});var Hl=W((ute,Fd)=>{"use strict";var{isUtf8:G4}=require("buffer"),Gq=[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 $q(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}function Kb(e){let t=e.length,r=0;for(;r<t;)if(!(e[r]&128))r++;else if((e[r]&224)===192){if(r+1===t||(e[r+1]&192)!==128||(e[r]&254)===192)return!1;r+=2}else if((e[r]&240)===224){if(r+2>=t||(e[r+1]&192)!==128||(e[r+2]&192)!==128||e[r]===224&&(e[r+1]&224)===128||e[r]===237&&(e[r+1]&224)===160)return!1;r+=3}else if((e[r]&248)===240){if(r+3>=t||(e[r+1]&192)!==128||(e[r+2]&192)!==128||(e[r+3]&192)!==128||e[r]===240&&(e[r+1]&240)===128||e[r]===244&&e[r+1]>143||e[r]>244)return!1;r+=4}else return!1;return!0}Fd.exports={isValidStatusCode:$q,isValidUTF8:Kb,tokenChars:Gq};if(G4)Fd.exports.isValidUTF8=function(e){return e.length<24?Kb(e):G4(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=require("utf-8-validate");Fd.exports.isValidUTF8=function(t){return t.length<32?Kb(t):e(t)}}catch{}});var Yb=W((fte,eT)=>{"use strict";var{Writable:Xq}=require("stream"),$4=Fl(),{BINARY_TYPES:Yq,EMPTY_BUFFER:X4,kStatusCode:Zq,kWebSocket:Jq}=ho(),{concat:Wb,toArrayBuffer:Qq,unmask:eF}=Dl(),{isValidStatusCode:tF,isValidUTF8:Y4}=Hl(),Hd=Buffer[Symbol.species],Nn=0,Z4=1,J4=2,Q4=3,Gb=4,$b=5,zd=6,Xb=class extends Xq{constructor(t={}){super(),this._allowSynchronousEvents=t.allowSynchronousEvents!==void 0?t.allowSynchronousEvents:!0,this._binaryType=t.binaryType||Yq[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=t.maxPayload|0,this._skipUTF8Validation=!!t.skipUTF8Validation,this[Jq]=void 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._errored=!1,this._loop=!1,this._state=Nn}_write(t,r,i){if(this._opcode===8&&this._state==Nn)return i();this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(i)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t<this._buffers[0].length){let i=this._buffers[0];return this._buffers[0]=new Hd(i.buffer,i.byteOffset+t,i.length-t),new Hd(i.buffer,i.byteOffset,t)}let r=Buffer.allocUnsafe(t);do{let i=this._buffers[0],n=r.length-t;t>=i.length?r.set(this._buffers.shift(),n):(r.set(new Uint8Array(i.buffer,i.byteOffset,t),n),this._buffers[0]=new Hd(i.buffer,i.byteOffset+t,i.length-t)),t-=i.length}while(t>0);return r}startLoop(t){this._loop=!0;do switch(this._state){case Nn:this.getInfo(t);break;case Z4:this.getPayloadLength16(t);break;case J4:this.getPayloadLength64(t);break;case Q4:this.getMask();break;case Gb:this.getData(t);break;case $b:case zd:this._loop=!1;return}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2){this._loop=!1;return}let r=this.consume(2);if(r[0]&48){let n=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");t(n);return}let i=(r[0]&64)===64;if(i&&!this._extensions[$4.extensionName]){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(n);return}if(this._fin=(r[0]&128)===128,this._opcode=r[0]&15,this._payloadLength=r[1]&127,this._opcode===0){if(i){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(n);return}if(!this._fragmented){let n=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");t(n);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(n);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let n=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");t(n);return}if(i){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(n);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let n=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");t(n);return}}else{let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(n);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(r[1]&128)===128,this._isServer){if(!this._masked){let n=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");t(n);return}}else if(this._masked){let n=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");t(n);return}this._payloadLength===126?this._state=Z4:this._payloadLength===127?this._state=J4:this.haveLength(t)}getPayloadLength16(t){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t)}getPayloadLength64(t){if(this._bufferedBytes<8){this._loop=!1;return}let r=this.consume(8),i=r.readUInt32BE(0);if(i>Math.pow(2,21)-1){let n=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");t(n);return}this._payloadLength=i*Math.pow(2,32)+r.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let r=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(r);return}this._masked?this._state=Q4:this._state=Gb}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Gb}getData(t){let r=X4;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}r=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&eF(r,this._mask)}if(this._opcode>7){this.controlMessage(r,t);return}if(this._compressed){this._state=$b,this.decompress(r,t);return}r.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(r)),this.dataMessage(t)}decompress(t,r){this._extensions[$4.extensionName].decompress(t,this._fin,(n,a)=>{if(n)return r(n);if(a.length){if(this._messageLength+=a.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let u=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");r(u);return}this._fragments.push(a)}this.dataMessage(r),this._state===Nn&&this.startLoop(r)})}dataMessage(t){if(!this._fin){this._state=Nn;return}let r=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let n;this._binaryType==="nodebuffer"?n=Wb(i,r):this._binaryType==="arraybuffer"?n=Qq(Wb(i,r)):n=i,this._allowSynchronousEvents?(this.emit("message",n,!0),this._state=Nn):(this._state=zd,setImmediate(()=>{this.emit("message",n,!0),this._state=Nn,this.startLoop(t)}))}else{let n=Wb(i,r);if(!this._skipUTF8Validation&&!Y4(n)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(a);return}this._state===$b||this._allowSynchronousEvents?(this.emit("message",n,!1),this._state=Nn):(this._state=zd,setImmediate(()=>{this.emit("message",n,!1),this._state=Nn,this.startLoop(t)}))}}controlMessage(t,r){if(this._opcode===8){if(t.length===0)this._loop=!1,this.emit("conclude",1005,X4),this.end();else{let i=t.readUInt16BE(0);if(!tF(i)){let a=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");r(a);return}let n=new Hd(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!Y4(n)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");r(a);return}this._loop=!1,this.emit("conclude",i,n),this.end()}this._state=Nn;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",t),this._state=Nn):(this._state=zd,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",t),this._state=Nn,this.startLoop(r)}))}createError(t,r,i,n,a){this._loop=!1,this._errored=!0;let u=new t(i?`Invalid WebSocket frame: ${r}`:r);return Error.captureStackTrace(u,this.createError),u.code=a,u[Zq]=n,u}};eT.exports=Xb});var Jb=W((pte,iT)=>{"use strict";var{Duplex:lte}=require("stream"),{randomFillSync:rF}=require("crypto"),tT=Fl(),{EMPTY_BUFFER:iF}=ho(),{isValidStatusCode:nF}=Hl(),{mask:rT,toBuffer:zu}=Dl(),ts=Symbol("kByteLength"),sF=Buffer.alloc(4),Zb=class e{constructor(t,r,i){this._extensions=r||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(t,r){let i,n=!1,a=2,u=!1;r.mask&&(i=r.maskBuffer||sF,r.generateMask?r.generateMask(i):rF(i,0,4),u=(i[0]|i[1]|i[2]|i[3])===0,a=6);let h;typeof t=="string"?(!r.mask||u)&&r[ts]!==void 0?h=r[ts]:(t=Buffer.from(t),h=t.length):(h=t.length,n=r.mask&&r.readOnly&&!u);let b=h;h>=65536?(a+=8,b=127):h>125&&(a+=2,b=126);let w=Buffer.allocUnsafe(n?h+a:a);return w[0]=r.fin?r.opcode|128:r.opcode,r.rsv1&&(w[0]|=64),w[1]=b,b===126?w.writeUInt16BE(h,2):b===127&&(w[2]=w[3]=0,w.writeUIntBE(h,4,6)),r.mask?(w[1]|=128,w[a-4]=i[0],w[a-3]=i[1],w[a-2]=i[2],w[a-1]=i[3],u?[w,t]:n?(rT(t,i,w,a,h),[w]):(rT(t,i,t,0,h),[w,t])):[w,t]}close(t,r,i,n){let a;if(t===void 0)a=iF;else{if(typeof t!="number"||!nF(t))throw new TypeError("First argument must be a valid error code number");if(r===void 0||!r.length)a=Buffer.allocUnsafe(2),a.writeUInt16BE(t,0);else{let h=Buffer.byteLength(r);if(h>123)throw new RangeError("The message must not be greater than 123 bytes");a=Buffer.allocUnsafe(2+h),a.writeUInt16BE(t,0),typeof r=="string"?a.write(r,2):a.set(r,2)}}let u={[ts]:a.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,a,!1,u,n]):this.sendFrame(e.frame(a,u),n)}ping(t,r,i){let n,a;if(typeof t=="string"?(n=Buffer.byteLength(t),a=!1):(t=zu(t),n=t.length,a=zu.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let u={[ts]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,u,i]):this.sendFrame(e.frame(t,u),i)}pong(t,r,i){let n,a;if(typeof t=="string"?(n=Buffer.byteLength(t),a=!1):(t=zu(t),n=t.length,a=zu.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let u={[ts]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,u,i]):this.sendFrame(e.frame(t,u),i)}send(t,r,i){let n=this._extensions[tT.extensionName],a=r.binary?2:1,u=r.compress,h,b;if(typeof t=="string"?(h=Buffer.byteLength(t),b=!1):(t=zu(t),h=t.length,b=zu.readOnly),this._firstFragment?(this._firstFragment=!1,u&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(u=h>=n._threshold),this._compress=u):(u=!1,a=0),r.fin&&(this._firstFragment=!0),n){let w={[ts]:h,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:b,rsv1:u};this._deflating?this.enqueue([this.dispatch,t,this._compress,w,i]):this.dispatch(t,this._compress,w,i)}else this.sendFrame(e.frame(t,{[ts]:h,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:b,rsv1:!1}),i)}dispatch(t,r,i,n){if(!r){this.sendFrame(e.frame(t,i),n);return}let a=this._extensions[tT.extensionName];this._bufferedBytes+=i[ts],this._deflating=!0,a.compress(t,i.fin,(u,h)=>{if(this._socket.destroyed){let b=new Error("The socket was closed while data was being compressed");typeof n=="function"&&n(b);for(let w=0;w<this._queue.length;w++){let T=this._queue[w],I=T[T.length-1];typeof I=="function"&&I(b)}return}this._bufferedBytes-=i[ts],this._deflating=!1,i.readOnly=!1,this.sendFrame(e.frame(h,i),n),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let t=this._queue.shift();this._bufferedBytes-=t[3][ts],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][ts],this._queue.push(t)}sendFrame(t,r){t.length===2?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],r),this._socket.uncork()):this._socket.write(t[0],r)}};iT.exports=Zb});var pT=W((hte,lT)=>{"use strict";var{kForOnEventAttribute:zl,kListener:Qb}=ho(),nT=Symbol("kCode"),sT=Symbol("kData"),aT=Symbol("kError"),oT=Symbol("kMessage"),cT=Symbol("kReason"),ju=Symbol("kTarget"),uT=Symbol("kType"),fT=Symbol("kWasClean"),ba=class{constructor(t){this[ju]=null,this[uT]=t}get target(){return this[ju]}get type(){return this[uT]}};Object.defineProperty(ba.prototype,"target",{enumerable:!0});Object.defineProperty(ba.prototype,"type",{enumerable:!0});var gc=class extends ba{constructor(t,r={}){super(t),this[nT]=r.code===void 0?0:r.code,this[cT]=r.reason===void 0?"":r.reason,this[fT]=r.wasClean===void 0?!1:r.wasClean}get code(){return this[nT]}get reason(){return this[cT]}get wasClean(){return this[fT]}};Object.defineProperty(gc.prototype,"code",{enumerable:!0});Object.defineProperty(gc.prototype,"reason",{enumerable:!0});Object.defineProperty(gc.prototype,"wasClean",{enumerable:!0});var Vu=class extends ba{constructor(t,r={}){super(t),this[aT]=r.error===void 0?null:r.error,this[oT]=r.message===void 0?"":r.message}get error(){return this[aT]}get message(){return this[oT]}};Object.defineProperty(Vu.prototype,"error",{enumerable:!0});Object.defineProperty(Vu.prototype,"message",{enumerable:!0});var jl=class extends ba{constructor(t,r={}){super(t),this[sT]=r.data===void 0?null:r.data}get data(){return this[sT]}};Object.defineProperty(jl.prototype,"data",{enumerable:!0});var aF={addEventListener(e,t,r={}){for(let n of this.listeners(e))if(!r[zl]&&n[Qb]===t&&!n[zl])return;let i;if(e==="message")i=function(a,u){let h=new jl("message",{data:u?a:a.toString()});h[ju]=this,jd(t,this,h)};else if(e==="close")i=function(a,u){let h=new gc("close",{code:a,reason:u.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});h[ju]=this,jd(t,this,h)};else if(e==="error")i=function(a){let u=new Vu("error",{error:a,message:a.message});u[ju]=this,jd(t,this,u)};else if(e==="open")i=function(){let a=new ba("open");a[ju]=this,jd(t,this,a)};else return;i[zl]=!!r[zl],i[Qb]=t,r.once?this.once(e,i):this.on(e,i)},removeEventListener(e,t){for(let r of this.listeners(e))if(r[Qb]===t&&!r[zl]){this.removeListener(e,r);break}}};lT.exports={CloseEvent:gc,ErrorEvent:Vu,Event:ba,EventTarget:aF,MessageEvent:jl};function jd(e,t,r){typeof e=="object"&&e.handleEvent?e.handleEvent.call(e,r):e.call(t,r)}});var ex=W((dte,hT)=>{"use strict";var{tokenChars:Vl}=Hl();function Ts(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}function oF(e){let t=Object.create(null),r=Object.create(null),i=!1,n=!1,a=!1,u,h,b=-1,w=-1,T=-1,I=0;for(;I<e.length;I++)if(w=e.charCodeAt(I),u===void 0)if(T===-1&&Vl[w]===1)b===-1&&(b=I);else if(I!==0&&(w===32||w===9))T===-1&&b!==-1&&(T=I);else if(w===59||w===44){if(b===-1)throw new SyntaxError(`Unexpected character at index ${I}`);T===-1&&(T=I);let M=e.slice(b,T);w===44?(Ts(t,M,r),r=Object.create(null)):u=M,b=T=-1}else throw new SyntaxError(`Unexpected character at index ${I}`);else if(h===void 0)if(T===-1&&Vl[w]===1)b===-1&&(b=I);else if(w===32||w===9)T===-1&&b!==-1&&(T=I);else if(w===59||w===44){if(b===-1)throw new SyntaxError(`Unexpected character at index ${I}`);T===-1&&(T=I),Ts(r,e.slice(b,T),!0),w===44&&(Ts(t,u,r),r=Object.create(null),u=void 0),b=T=-1}else if(w===61&&b!==-1&&T===-1)h=e.slice(b,I),b=T=-1;else throw new SyntaxError(`Unexpected character at index ${I}`);else if(n){if(Vl[w]!==1)throw new SyntaxError(`Unexpected character at index ${I}`);b===-1?b=I:i||(i=!0),n=!1}else if(a)if(Vl[w]===1)b===-1&&(b=I);else if(w===34&&b!==-1)a=!1,T=I;else if(w===92)n=!0;else throw new SyntaxError(`Unexpected character at index ${I}`);else if(w===34&&e.charCodeAt(I-1)===61)a=!0;else if(T===-1&&Vl[w]===1)b===-1&&(b=I);else if(b!==-1&&(w===32||w===9))T===-1&&(T=I);else if(w===59||w===44){if(b===-1)throw new SyntaxError(`Unexpected character at index ${I}`);T===-1&&(T=I);let M=e.slice(b,T);i&&(M=M.replace(/\\/g,""),i=!1),Ts(r,h,M),w===44&&(Ts(t,u,r),r=Object.create(null),u=void 0),h=void 0,b=T=-1}else throw new SyntaxError(`Unexpected character at index ${I}`);if(b===-1||a||w===32||w===9)throw new SyntaxError("Unexpected end of input");T===-1&&(T=I);let B=e.slice(b,T);return u===void 0?Ts(t,B,r):(h===void 0?Ts(r,B,!0):i?Ts(r,h,B.replace(/\\/g,"")):Ts(r,h,B),Ts(t,u,r)),t}function cF(e){return Object.keys(e).map(t=>{let r=e[t];return Array.isArray(r)||(r=[r]),r.map(i=>[t].concat(Object.keys(i).map(n=>{let a=i[n];return Array.isArray(a)||(a=[a]),a.map(u=>u===!0?n:`${n}=${u}`).join("; ")})).join("; ")).join(", ")}).join(", ")}hT.exports={format:cF,parse:oF}});var sx=W((gte,ET)=>{"use strict";var uF=require("events"),fF=require("https"),lF=require("http"),vT=require("net"),pF=require("tls"),{randomBytes:hF,createHash:dF}=require("crypto"),{Duplex:mte,Readable:vte}=require("stream"),{URL:tx}=require("url"),vo=Fl(),mF=Yb(),vF=Jb(),{BINARY_TYPES:dT,EMPTY_BUFFER:Vd,GUID:gF,kForOnEventAttribute:rx,kListener:bF,kStatusCode:xF,kWebSocket:vi,NOOP:gT}=ho(),{EventTarget:{addEventListener:_F,removeEventListener:yF}}=pT(),{format:wF,parse:SF}=ex(),{toBuffer:EF}=Dl(),TF=30*1e3,bT=Symbol("kAborted"),ix=[8,13],xa=["CONNECTING","OPEN","CLOSING","CLOSED"],IF=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,Cr=class e extends uF{constructor(t,r,i){super(),this._binaryType=dT[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Vd,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,r===void 0?r=[]:Array.isArray(r)||(typeof r=="object"&&r!==null?(i=r,r=[]):r=[r]),xT(this,t,r,i)):(this._autoPong=i.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){dT.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,r,i){let n=new mF({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation});this._sender=new vF(t,this._extensions,i.generateMask),this._receiver=n,this._socket=t,n[vi]=this,t[vi]=this,n.on("conclude",OF),n.on("drain",kF),n.on("error",NF),n.on("message",PF),n.on("ping",BF),n.on("pong",MF),t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),r.length>0&&t.unshift(r),t.on("close",yT),t.on("data",Wd),t.on("end",wT),t.on("error",ST),this._readyState=e.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[vo.extensionName]&&this._extensions[vo.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,r){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){nn(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===e.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=e.CLOSING,this._sender.close(t,r,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),TF)}}pause(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,r,i){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(i=t,t=r=void 0):typeof r=="function"&&(i=r,r=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){nx(this,t,i);return}r===void 0&&(r=!this._isServer),this._sender.ping(t||Vd,r,i)}pong(t,r,i){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(i=t,t=r=void 0):typeof r=="function"&&(i=r,r=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){nx(this,t,i);return}r===void 0&&(r=!this._isServer),this._sender.pong(t||Vd,r,i)}resume(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,r,i){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof r=="function"&&(i=r,r={}),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){nx(this,t,i);return}let n={binary:typeof t!="string",mask:!this._isServer,compress:!0,fin:!0,...r};this._extensions[vo.extensionName]||(n.compress=!1),this._sender.send(t||Vd,n,i)}terminate(){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){nn(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=e.CLOSING,this._socket.destroy())}}};Object.defineProperty(Cr,"CONNECTING",{enumerable:!0,value:xa.indexOf("CONNECTING")});Object.defineProperty(Cr.prototype,"CONNECTING",{enumerable:!0,value:xa.indexOf("CONNECTING")});Object.defineProperty(Cr,"OPEN",{enumerable:!0,value:xa.indexOf("OPEN")});Object.defineProperty(Cr.prototype,"OPEN",{enumerable:!0,value:xa.indexOf("OPEN")});Object.defineProperty(Cr,"CLOSING",{enumerable:!0,value:xa.indexOf("CLOSING")});Object.defineProperty(Cr.prototype,"CLOSING",{enumerable:!0,value:xa.indexOf("CLOSING")});Object.defineProperty(Cr,"CLOSED",{enumerable:!0,value:xa.indexOf("CLOSED")});Object.defineProperty(Cr.prototype,"CLOSED",{enumerable:!0,value:xa.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(e=>{Object.defineProperty(Cr.prototype,e,{enumerable:!0})});["open","error","close","message"].forEach(e=>{Object.defineProperty(Cr.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[rx])return t[bF];return null},set(t){for(let r of this.listeners(e))if(r[rx]){this.removeListener(e,r);break}typeof t=="function"&&this.addEventListener(e,t,{[rx]:!0})}})});Cr.prototype.addEventListener=_F;Cr.prototype.removeEventListener=yF;ET.exports=Cr;function xT(e,t,r,i){let n={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:ix[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=n.autoPong,!ix.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${ix.join(", ")})`);let a;if(t instanceof tx)a=t;else try{a=new tx(t)}catch{throw new SyntaxError(`Invalid URL: ${t}`)}a.protocol==="http:"?a.protocol="ws:":a.protocol==="https:"&&(a.protocol="wss:"),e._url=a.href;let u=a.protocol==="wss:",h=a.protocol==="ws+unix:",b;if(a.protocol!=="ws:"&&!u&&!h?b=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:h&&!a.pathname?b="The URL's pathname is empty":a.hash&&(b="The URL contains a fragment identifier"),b){let L=new SyntaxError(b);if(e._redirects===0)throw L;Kd(e,L);return}let w=u?443:80,T=hF(16).toString("base64"),I=u?fF.request:lF.request,B=new Set,M;if(n.createConnection=n.createConnection||(u?AF:RF),n.defaultPort=n.defaultPort||w,n.port=a.port||w,n.host=a.hostname.startsWith("[")?a.hostname.slice(1,-1):a.hostname,n.headers={...n.headers,"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":T,Connection:"Upgrade",Upgrade:"websocket"},n.path=a.pathname+a.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(M=new vo(n.perMessageDeflate!==!0?n.perMessageDeflate:{},!1,n.maxPayload),n.headers["Sec-WebSocket-Extensions"]=wF({[vo.extensionName]:M.offer()})),r.length){for(let L of r){if(typeof L!="string"||!IF.test(L)||B.has(L))throw new SyntaxError("An invalid or duplicated subprotocol was specified");B.add(L)}n.headers["Sec-WebSocket-Protocol"]=r.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(a.username||a.password)&&(n.auth=`${a.username}:${a.password}`),h){let L=n.path.split(":");n.socketPath=L[0],n.path=L[1]}let P;if(n.followRedirects){if(e._redirects===0){e._originalIpc=h,e._originalSecure=u,e._originalHostOrSocketPath=h?n.socketPath:a.host;let L=i&&i.headers;if(i={...i,headers:{}},L)for(let[X,V]of Object.entries(L))i.headers[X.toLowerCase()]=V}else if(e.listenerCount("redirect")===0){let L=h?e._originalIpc?n.socketPath===e._originalHostOrSocketPath:!1:e._originalIpc?!1:a.host===e._originalHostOrSocketPath;(!L||e._originalSecure&&!u)&&(delete n.headers.authorization,delete n.headers.cookie,L||delete n.headers.host,n.auth=void 0)}n.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64")),P=e._req=I(n),e._redirects&&e.emit("redirect",e.url,P)}else P=e._req=I(n);n.timeout&&P.on("timeout",()=>{nn(e,P,"Opening handshake has timed out")}),P.on("error",L=>{P===null||P[bT]||(P=e._req=null,Kd(e,L))}),P.on("response",L=>{let X=L.headers.location,V=L.statusCode;if(X&&n.followRedirects&&V>=300&&V<400){if(++e._redirects>n.maxRedirects){nn(e,P,"Maximum redirects exceeded");return}P.abort();let q;try{q=new tx(X,t)}catch{let fe=new SyntaxError(`Invalid URL: ${X}`);Kd(e,fe);return}xT(e,q,r,i)}else e.emit("unexpected-response",P,L)||nn(e,P,`Unexpected server response: ${L.statusCode}`)}),P.on("upgrade",(L,X,V)=>{if(e.emit("upgrade",L),e.readyState!==Cr.CONNECTING)return;if(P=e._req=null,L.headers.upgrade.toLowerCase()!=="websocket"){nn(e,X,"Invalid Upgrade header");return}let q=dF("sha1").update(T+gF).digest("base64");if(L.headers["sec-websocket-accept"]!==q){nn(e,X,"Invalid Sec-WebSocket-Accept header");return}let ee=L.headers["sec-websocket-protocol"],fe;if(ee!==void 0?B.size?B.has(ee)||(fe="Server sent an invalid subprotocol"):fe="Server sent a subprotocol but none was requested":B.size&&(fe="Server sent no subprotocol"),fe){nn(e,X,fe);return}ee&&(e._protocol=ee);let _e=L.headers["sec-websocket-extensions"];if(_e!==void 0){if(!M){nn(e,X,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let Te;try{Te=SF(_e)}catch{nn(e,X,"Invalid Sec-WebSocket-Extensions header");return}let be=Object.keys(Te);if(be.length!==1||be[0]!==vo.extensionName){nn(e,X,"Server indicated an extension that was not requested");return}try{M.accept(Te[vo.extensionName])}catch{nn(e,X,"Invalid Sec-WebSocket-Extensions header");return}e._extensions[vo.extensionName]=M}e.setSocket(X,V,{allowSynchronousEvents:n.allowSynchronousEvents,generateMask:n.generateMask,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})}),n.finishRequest?n.finishRequest(P,e):P.end()}function Kd(e,t){e._readyState=Cr.CLOSING,e.emit("error",t),e.emitClose()}function RF(e){return e.path=e.socketPath,vT.connect(e)}function AF(e){return e.path=void 0,!e.servername&&e.servername!==""&&(e.servername=vT.isIP(e.host)?"":e.host),pF.connect(e)}function nn(e,t,r){e._readyState=Cr.CLOSING;let i=new Error(r);Error.captureStackTrace(i,nn),t.setHeader?(t[bT]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(Kd,e,i)):(t.destroy(i),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function nx(e,t,r){if(t){let i=EF(t).length;e._socket?e._sender._bufferedBytes+=i:e._bufferedAmount+=i}if(r){let i=new Error(`WebSocket is not open: readyState ${e.readyState} (${xa[e.readyState]})`);process.nextTick(r,i)}}function OF(e,t){let r=this[vi];r._closeFrameReceived=!0,r._closeMessage=t,r._closeCode=e,r._socket[vi]!==void 0&&(r._socket.removeListener("data",Wd),process.nextTick(_T,r._socket),e===1005?r.close():r.close(e,t))}function kF(){let e=this[vi];e.isPaused||e._socket.resume()}function NF(e){let t=this[vi];t._socket[vi]!==void 0&&(t._socket.removeListener("data",Wd),process.nextTick(_T,t._socket),t.close(e[xF])),t.emit("error",e)}function mT(){this[vi].emitClose()}function PF(e,t){this[vi].emit("message",e,t)}function BF(e){let t=this[vi];t._autoPong&&t.pong(e,!this._isServer,gT),t.emit("ping",e)}function MF(e){this[vi].emit("pong",e)}function _T(e){e.resume()}function yT(){let e=this[vi];this.removeListener("close",yT),this.removeListener("data",Wd),this.removeListener("end",wT),e._readyState=Cr.CLOSING;let t;!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&(t=e._socket.read())!==null&&e._receiver.write(t),e._receiver.end(),this[vi]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",mT),e._receiver.on("finish",mT))}function Wd(e){this[vi]._receiver.write(e)||this.pause()}function wT(){let e=this[vi];e._readyState=Cr.CLOSING,e._receiver.end(),this.end()}function ST(){let e=this[vi];this.removeListener("error",ST),this.on("error",gT),e&&(e._readyState=Cr.CLOSING,this.destroy())}});var IT=W((bte,TT)=>{"use strict";var{tokenChars:CF}=Hl();function LF(e){let t=new Set,r=-1,i=-1,n=0;for(n;n<e.length;n++){let u=e.charCodeAt(n);if(i===-1&&CF[u]===1)r===-1&&(r=n);else if(n!==0&&(u===32||u===9))i===-1&&r!==-1&&(i=n);else if(u===44){if(r===-1)throw new SyntaxError(`Unexpected character at index ${n}`);i===-1&&(i=n);let h=e.slice(r,i);if(t.has(h))throw new SyntaxError(`The "${h}" subprotocol is duplicated`);t.add(h),r=i=-1}else throw new SyntaxError(`Unexpected character at index ${n}`)}if(r===-1||i!==-1)throw new SyntaxError("Unexpected end of input");let a=e.slice(r,n);if(t.has(a))throw new SyntaxError(`The "${a}" subprotocol is duplicated`);return t.add(a),t}TT.exports={parse:LF}});var BT=W((_te,PT)=>{"use strict";var DF=require("events"),Gd=require("http"),{Duplex:xte}=require("stream"),{createHash:UF}=require("crypto"),RT=ex(),bc=Fl(),qF=IT(),FF=sx(),{GUID:HF,kWebSocket:zF}=ho(),jF=/^[+/0-9A-Za-z]{22}==$/,AT=0,OT=1,NT=2,ax=class extends DF{constructor(t,r){if(super(),t={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:FF,...t},t.port==null&&!t.server&&!t.noServer||t.port!=null&&(t.server||t.noServer)||t.server&&t.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(t.port!=null?(this._server=Gd.createServer((i,n)=>{let a=Gd.STATUS_CODES[426];n.writeHead(426,{"Content-Length":a.length,"Content-Type":"text/plain"}),n.end(a)}),this._server.listen(t.port,t.host,t.backlog,r)):t.server&&(this._server=t.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=VF(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,a,u)=>{this.handleUpgrade(n,a,u,i)}})}t.perMessageDeflate===!0&&(t.perMessageDeflate={}),t.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=t,this._state=AT}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(t){if(this._state===NT){t&&this.once("close",()=>{t(new Error("The server is not running"))}),process.nextTick(Kl,this);return}if(t&&this.once("close",t),this._state!==OT)if(this._state=OT,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(Kl,this):process.nextTick(Kl,this);else{let r=this._server;this._removeListeners(),this._removeListeners=this._server=null,r.close(()=>{Kl(this)})}}shouldHandle(t){if(this.options.path){let r=t.url.indexOf("?");if((r!==-1?t.url.slice(0,r):t.url)!==this.options.path)return!1}return!0}handleUpgrade(t,r,i,n){r.on("error",kT);let a=t.headers["sec-websocket-key"],u=+t.headers["sec-websocket-version"];if(t.method!=="GET"){xc(this,t,r,405,"Invalid HTTP method");return}if(t.headers.upgrade.toLowerCase()!=="websocket"){xc(this,t,r,400,"Invalid Upgrade header");return}if(!a||!jF.test(a)){xc(this,t,r,400,"Missing or invalid Sec-WebSocket-Key header");return}if(u!==8&&u!==13){xc(this,t,r,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(t)){Wl(r,400);return}let h=t.headers["sec-websocket-protocol"],b=new Set;if(h!==void 0)try{b=qF.parse(h)}catch{xc(this,t,r,400,"Invalid Sec-WebSocket-Protocol header");return}let w=t.headers["sec-websocket-extensions"],T={};if(this.options.perMessageDeflate&&w!==void 0){let I=new bc(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let B=RT.parse(w);B[bc.extensionName]&&(I.accept(B[bc.extensionName]),T[bc.extensionName]=I)}catch{xc(this,t,r,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let I={origin:t.headers[`${u===8?"sec-websocket-origin":"origin"}`],secure:!!(t.socket.authorized||t.socket.encrypted),req:t};if(this.options.verifyClient.length===2){this.options.verifyClient(I,(B,M,P,L)=>{if(!B)return Wl(r,M||401,P,L);this.completeUpgrade(T,a,b,t,r,i,n)});return}if(!this.options.verifyClient(I))return Wl(r,401)}this.completeUpgrade(T,a,b,t,r,i,n)}completeUpgrade(t,r,i,n,a,u,h){if(!a.readable||!a.writable)return a.destroy();if(a[zF])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>AT)return Wl(a,503);let w=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${UF("sha1").update(r+HF).digest("base64")}`],T=new this.options.WebSocket(null,void 0,this.options);if(i.size){let I=this.options.handleProtocols?this.options.handleProtocols(i,n):i.values().next().value;I&&(w.push(`Sec-WebSocket-Protocol: ${I}`),T._protocol=I)}if(t[bc.extensionName]){let I=t[bc.extensionName].params,B=RT.format({[bc.extensionName]:[I]});w.push(`Sec-WebSocket-Extensions: ${B}`),T._extensions=t}this.emit("headers",w,n),a.write(w.concat(`\r
25
+ `).join(`\r
26
+ `)),a.removeListener("error",kT),T.setSocket(a,u,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(T),T.on("close",()=>{this.clients.delete(T),this._shouldEmitClose&&!this.clients.size&&process.nextTick(Kl,this)})),h(T,n)}};PT.exports=ax;function VF(e,t){for(let r of Object.keys(t))e.on(r,t[r]);return function(){for(let i of Object.keys(t))e.removeListener(i,t[i])}}function Kl(e){e._state=NT,e.emit("close")}function kT(){this.destroy()}function Wl(e,t,r,i){r=r||Gd.STATUS_CODES[t],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(r),...i},e.once("finish",e.destroy),e.end(`HTTP/1.1 ${t} ${Gd.STATUS_CODES[t]}\r
27
+ `+Object.keys(i).map(n=>`${n}: ${i[n]}`).join(`\r
28
+ `)+`\r
29
+ \r
30
+ `+r)}function xc(e,t,r,i,n){if(e.listenerCount("wsClientError")){let a=new Error(n);Error.captureStackTrace(a,xc),e.emit("wsClientError",a,r,t)}else Wl(r,i,n)}});var sH={};ka(sH,{Provider:()=>rs,assets:()=>mx,bitcore:()=>aH,models:()=>vx,services:()=>bx,types:()=>lx,utils:()=>hx});module.exports=j7(sH);var DT=Ir(vt(),1),Pn=Ir(zh(),1);function $f(e,t){return function(){return e.apply(t,arguments)}}var{toString:FC}=Object.prototype,{getPrototypeOf:dg}=Object,Vh=(e=>t=>{let r=FC.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ys=e=>(e=e.toLowerCase(),t=>Vh(t)===e),Kh=e=>t=>typeof t===e,{isArray:Su}=Array,Xf=Kh("undefined");function HC(e){return e!==null&&!Xf(e)&&e.constructor!==null&&!Xf(e.constructor)&&Tn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Y3=ys("ArrayBuffer");function zC(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Y3(e.buffer),t}var jC=Kh("string"),Tn=Kh("function"),Z3=Kh("number"),Wh=e=>e!==null&&typeof e=="object",VC=e=>e===!0||e===!1,jh=e=>{if(Vh(e)!=="object")return!1;let t=dg(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},KC=ys("Date"),WC=ys("File"),GC=ys("Blob"),$C=ys("FileList"),XC=e=>Wh(e)&&Tn(e.pipe),YC=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Tn(e.append)&&((t=Vh(e))==="formdata"||t==="object"&&Tn(e.toString)&&e.toString()==="[object FormData]"))},ZC=ys("URLSearchParams"),JC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yf(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,n;if(typeof e!="object"&&(e=[e]),Su(e))for(i=0,n=e.length;i<n;i++)t.call(null,e[i],i,e);else{let a=r?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length,h;for(i=0;i<u;i++)h=a[i],t.call(null,e[h],h,e)}}function J3(e,t){t=t.toLowerCase();let r=Object.keys(e),i=r.length,n;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}var Q3=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,eE=e=>!Xf(e)&&e!==Q3;function hg(){let{caseless:e}=eE(this)&&this||{},t={},r=(i,n)=>{let a=e&&J3(t,n)||n;jh(t[a])&&jh(i)?t[a]=hg(t[a],i):jh(i)?t[a]=hg({},i):Su(i)?t[a]=i.slice():t[a]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&Yf(arguments[i],r);return t}var QC=(e,t,r,{allOwnKeys:i}={})=>(Yf(t,(n,a)=>{r&&Tn(n)?e[a]=$f(n,r):e[a]=n},{allOwnKeys:i}),e),eL=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tL=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},rL=(e,t,r,i)=>{let n,a,u,h={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),a=n.length;a-- >0;)u=n[a],(!i||i(u,e,t))&&!h[u]&&(t[u]=e[u],h[u]=!0);e=r!==!1&&dg(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},iL=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let i=e.indexOf(t,r);return i!==-1&&i===r},nL=e=>{if(!e)return null;if(Su(e))return e;let t=e.length;if(!Z3(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},sL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&dg(Uint8Array)),aL=(e,t)=>{let i=(e&&e[Symbol.iterator]).call(e),n;for(;(n=i.next())&&!n.done;){let a=n.value;t.call(e,a[0],a[1])}},oL=(e,t)=>{let r,i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},cL=ys("HTMLFormElement"),uL=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,n){return i.toUpperCase()+n}),$3=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),fL=ys("RegExp"),tE=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),i={};Yf(r,(n,a)=>{let u;(u=t(n,a,e))!==!1&&(i[a]=u||n)}),Object.defineProperties(e,i)},lL=e=>{tE(e,(t,r)=>{if(Tn(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let i=e[r];if(Tn(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},pL=(e,t)=>{let r={},i=n=>{n.forEach(a=>{r[a]=!0})};return Su(e)?i(e):i(String(e).split(t)),r},hL=()=>{},dL=(e,t)=>(e=+e,Number.isFinite(e)?e:t),pg="abcdefghijklmnopqrstuvwxyz",X3="0123456789",rE={DIGIT:X3,ALPHA:pg,ALPHA_DIGIT:pg+pg.toUpperCase()+X3},mL=(e=16,t=rE.ALPHA_DIGIT)=>{let r="",{length:i}=t;for(;e--;)r+=t[Math.random()*i|0];return r};function vL(e){return!!(e&&Tn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var gL=e=>{let t=new Array(10),r=(i,n)=>{if(Wh(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[n]=i;let a=Su(i)?[]:{};return Yf(i,(u,h)=>{let b=r(u,n+1);!Xf(b)&&(a[h]=b)}),t[n]=void 0,a}}return i};return r(e,0)},bL=ys("AsyncFunction"),xL=e=>e&&(Wh(e)||Tn(e))&&Tn(e.then)&&Tn(e.catch),z={isArray:Su,isArrayBuffer:Y3,isBuffer:HC,isFormData:YC,isArrayBufferView:zC,isString:jC,isNumber:Z3,isBoolean:VC,isObject:Wh,isPlainObject:jh,isUndefined:Xf,isDate:KC,isFile:WC,isBlob:GC,isRegExp:fL,isFunction:Tn,isStream:XC,isURLSearchParams:ZC,isTypedArray:sL,isFileList:$C,forEach:Yf,merge:hg,extend:QC,trim:JC,stripBOM:eL,inherits:tL,toFlatObject:rL,kindOf:Vh,kindOfTest:ys,endsWith:iL,toArray:nL,forEachEntry:aL,matchAll:oL,isHTMLForm:cL,hasOwnProperty:$3,hasOwnProp:$3,reduceDescriptors:tE,freezeMethods:lL,toObjectSet:pL,toCamelCase:uL,noop:hL,toFiniteNumber:dL,findKey:J3,global:Q3,isContextDefined:eE,ALPHABET:rE,generateString:mL,isSpecCompliantForm:vL,toJSONObject:gL,isAsyncFn:bL,isThenable:xL};function Eu(e,t,r,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),n&&(this.response=n)}z.inherits(Eu,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:z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var iE=Eu.prototype,nE={};["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(e=>{nE[e]={value:e}});Object.defineProperties(Eu,nE);Object.defineProperty(iE,"isAxiosError",{value:!0});Eu.from=(e,t,r,i,n,a)=>{let u=Object.create(iE);return z.toFlatObject(e,u,function(b){return b!==Error.prototype},h=>h!=="isAxiosError"),Eu.call(u,e.message,t,r,i,n),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};var Se=Eu;var FE=Ir(qE(),1),Xh=FE.default;function Tg(e){return z.isPlainObject(e)||z.isArray(e)}function zE(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function HE(e,t,r){return e?e.concat(t).map(function(n,a){return n=zE(n),!r&&a?"["+n+"]":n}).join(r?".":""):t}function rD(e){return z.isArray(e)&&!e.some(Tg)}var iD=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function nD(e,t,r){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new(Xh||FormData),r=z.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(L,X){return!z.isUndefined(X[L])});let i=r.metaTokens,n=r.visitor||T,a=r.dots,u=r.indexes,b=(r.Blob||typeof Blob<"u"&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(n))throw new TypeError("visitor must be a function");function w(P){if(P===null)return"";if(z.isDate(P))return P.toISOString();if(!b&&z.isBlob(P))throw new Se("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(P)||z.isTypedArray(P)?b&&typeof Blob=="function"?new Blob([P]):Buffer.from(P):P}function T(P,L,X){let V=P;if(P&&!X&&typeof P=="object"){if(z.endsWith(L,"{}"))L=i?L:L.slice(0,-2),P=JSON.stringify(P);else if(z.isArray(P)&&rD(P)||(z.isFileList(P)||z.endsWith(L,"[]"))&&(V=z.toArray(P)))return L=zE(L),V.forEach(function(ee,fe){!(z.isUndefined(ee)||ee===null)&&t.append(u===!0?HE([L],fe,a):u===null?L:L+"[]",w(ee))}),!1}return Tg(P)?!0:(t.append(HE(X,L,a),w(P)),!1)}let I=[],B=Object.assign(iD,{defaultVisitor:T,convertValue:w,isVisitable:Tg});function M(P,L){if(!z.isUndefined(P)){if(I.indexOf(P)!==-1)throw Error("Circular reference detected in "+L.join("."));I.push(P),z.forEach(P,function(V,q){(!(z.isUndefined(V)||V===null)&&n.call(t,V,z.isString(q)?q.trim():q,L,B))===!0&&M(V,L?L.concat(q):[q])}),I.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return M(e),t}var to=nD;function jE(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function VE(e,t){this._pairs=[],e&&to(e,this,t)}var KE=VE.prototype;KE.append=function(t,r){this._pairs.push([t,r])};KE.toString=function(t){let r=t?function(i){return t.call(this,i,jE)}:jE;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var WE=VE;function sD(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Zo(e,t,r){if(!t)return e;let i=r&&r.encode||sD,n=r&&r.serialize,a;if(n?a=n(t,r):a=z.isURLSearchParams(t)?t.toString():new WE(t,r).toString(i),a){let u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}var Ig=class{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(i){i!==null&&t(i)})}},Rg=Ig;var Tu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var GE=Ir(require("url"),1),$E=GE.default.URLSearchParams;var XE={isNode:!0,classes:{URLSearchParams:$E,FormData:Xh,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};var Ag={};ka(Ag,{hasBrowserEnv:()=>YE,hasStandardBrowserEnv:()=>aD,hasStandardBrowserWebWorkerEnv:()=>oD});var YE=typeof window<"u"&&typeof document<"u",aD=(e=>YE&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),oD=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function";var Wr={...Ag,...XE};function Og(e,t){return to(e,new Wr.classes.URLSearchParams,Object.assign({visitor:function(r,i,n,a){return Wr.isNode&&z.isBuffer(r)?(this.append(i,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function cD(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function uD(e){let t={},r=Object.keys(e),i,n=r.length,a;for(i=0;i<n;i++)a=r[i],t[a]=e[a];return t}function fD(e){function t(r,i,n,a){let u=r[a++];if(u==="__proto__")return!0;let h=Number.isFinite(+u),b=a>=r.length;return u=!u&&z.isArray(n)?n.length:u,b?(z.hasOwnProp(n,u)?n[u]=[n[u],i]:n[u]=i,!h):((!n[u]||!z.isObject(n[u]))&&(n[u]=[]),t(r,i,n[u],a)&&z.isArray(n[u])&&(n[u]=uD(n[u])),!h)}if(z.isFormData(e)&&z.isFunction(e.entries)){let r={};return z.forEachEntry(e,(i,n)=>{t(cD(i),n,r,0)}),r}return null}var Yh=fD;function lD(e,t,r){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}var kg={transitional:Tu,adapter:["xhr","http"],transformRequest:[function(t,r){let i=r.getContentType()||"",n=i.indexOf("application/json")>-1,a=z.isObject(t);if(a&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return n?JSON.stringify(Yh(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Og(t,this.formSerializer).toString();if((h=z.isFileList(t))||i.indexOf("multipart/form-data")>-1){let b=this.env&&this.env.FormData;return to(h?{"files[]":t}:t,b&&new b,this.formSerializer)}}return a||n?(r.setContentType("application/json",!1),lD(t)):t}],transformResponse:[function(t){let r=this.transitional||kg.transitional,i=r&&r.forcedJSONParsing,n=this.responseType==="json";if(t&&z.isString(t)&&(i&&!this.responseType||n)){let u=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(h){if(u)throw h.name==="SyntaxError"?Se.from(h,Se.ERR_BAD_RESPONSE,this,null,this.response):h}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wr.classes.FormData,Blob:Wr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],e=>{kg.headers[e]={}});var Iu=kg;var pD=z.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"]),ZE=e=>{let t={},r,i,n;return e&&e.split(`
31
+ `).forEach(function(u){n=u.indexOf(":"),r=u.substring(0,n).trim().toLowerCase(),i=u.substring(n+1).trim(),!(!r||t[r]&&pD[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t};var JE=Symbol("internals");function Zf(e){return e&&String(e).trim().toLowerCase()}function Zh(e){return e===!1||e==null?e:z.isArray(e)?e.map(Zh):String(e)}function hD(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}var dD=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ng(e,t,r,i,n){if(z.isFunction(i))return i.call(this,t,r);if(n&&(t=r),!!z.isString(t)){if(z.isString(i))return t.indexOf(i)!==-1;if(z.isRegExp(i))return i.test(t)}}function mD(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function vD(e,t){let r=z.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(n,a,u){return this[i].call(this,t,n,a,u)},configurable:!0})})}var Ru=class{constructor(t){t&&this.set(t)}set(t,r,i){let n=this;function a(h,b,w){let T=Zf(b);if(!T)throw new Error("header name must be a non-empty string");let I=z.findKey(n,T);(!I||n[I]===void 0||w===!0||w===void 0&&n[I]!==!1)&&(n[I||b]=Zh(h))}let u=(h,b)=>z.forEach(h,(w,T)=>a(w,T,b));return z.isPlainObject(t)||t instanceof this.constructor?u(t,r):z.isString(t)&&(t=t.trim())&&!dD(t)?u(ZE(t),r):t!=null&&a(r,t,i),this}get(t,r){if(t=Zf(t),t){let i=z.findKey(this,t);if(i){let n=this[i];if(!r)return n;if(r===!0)return hD(n);if(z.isFunction(r))return r.call(this,n,i);if(z.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Zf(t),t){let i=z.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||Ng(this,this[i],i,r)))}return!1}delete(t,r){let i=this,n=!1;function a(u){if(u=Zf(u),u){let h=z.findKey(i,u);h&&(!r||Ng(i,i[h],h,r))&&(delete i[h],n=!0)}}return z.isArray(t)?t.forEach(a):a(t),n}clear(t){let r=Object.keys(this),i=r.length,n=!1;for(;i--;){let a=r[i];(!t||Ng(this,this[a],a,t,!0))&&(delete this[a],n=!0)}return n}normalize(t){let r=this,i={};return z.forEach(this,(n,a)=>{let u=z.findKey(i,a);if(u){r[u]=Zh(n),delete r[a];return}let h=t?mD(a):String(a).trim();h!==a&&delete r[a],r[h]=Zh(n),i[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return z.forEach(this,(i,n)=>{i!=null&&i!==!1&&(r[n]=t&&z.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
32
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let i=new this(t);return r.forEach(n=>i.set(n)),i}static accessor(t){let i=(this[JE]=this[JE]={accessors:{}}).accessors,n=this.prototype;function a(u){let h=Zf(u);i[h]||(vD(n,u),i[h]=!0)}return z.isArray(t)?t.forEach(a):a(t),this}};Ru.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);z.reduceDescriptors(Ru.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}});z.freezeMethods(Ru);var Gr=Ru;function Jf(e,t){let r=this||Iu,i=t||r,n=Gr.from(i.headers),a=i.data;return z.forEach(e,function(h){a=h.call(r,a,n.normalize(),t?t.status:void 0)}),n.normalize(),a}function Qf(e){return!!(e&&e.__CANCEL__)}function QE(e,t,r){Se.call(this,e??"canceled",Se.ERR_CANCELED,t,r),this.name="CanceledError"}z.inherits(QE,Se,{__CANCEL__:!0});var Xn=QE;function ro(e,t,r){let i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new Se("Request failed with status code "+r.status,[Se.ERR_BAD_REQUEST,Se.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Pg(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Bg(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Jo(e,t){return e&&!Pg(t)?Bg(e,t):t}var w6=Ir(t6(),1),S6=Ir(require("http"),1),E6=Ir(require("https"),1),T6=Ir(require("util"),1),I6=Ir(c6(),1),ca=Ir(require("zlib"),1);var ec="1.6.8";function sl(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var BD=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Wg(e,t,r){let i=r&&r.Blob||Wr.classes.Blob,n=sl(e);if(t===void 0&&i&&(t=!0),n==="data"){e=n.length?e.slice(n.length+1):e;let a=BD.exec(e);if(!a)throw new Se("Invalid URL",Se.ERR_INVALID_URL);let u=a[1],h=a[2],b=a[3],w=Buffer.from(decodeURIComponent(b),h?"base64":"utf8");if(t){if(!i)throw new Se("Blob is not supported",Se.ERR_NOT_SUPPORT);return new i([w],{type:u})}return w}throw new Se("Unsupported protocol "+n,Se.ERR_NOT_SUPPORT)}var tc=Ir(require("stream"),1);var f6=Ir(require("stream"),1);function MD(e,t){let r=0,i=1e3/t,n=null;return function(u,h){let b=Date.now();if(u||b-r>i)return n&&(clearTimeout(n),n=null),r=b,e.apply(null,h);n||(n=setTimeout(()=>(n=null,r=Date.now(),e.apply(null,h)),i-(b-r)))}}var u6=MD;function CD(e,t){e=e||10;let r=new Array(e),i=new Array(e),n=0,a=0,u;return t=t!==void 0?t:1e3,function(b){let w=Date.now(),T=i[a];u||(u=w),r[n]=b,i[n]=w;let I=a,B=0;for(;I!==n;)B+=r[I++],I=I%e;if(n=(n+1)%e,n===a&&(a=(a+1)%e),w-u<t)return;let M=T&&w-T;return M?Math.round(B*1e3/M):void 0}}var Jh=CD;var Qh=Symbol("internals"),Gg=class extends f6.default.Transform{constructor(t){t=z.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(h,b)=>!z.isUndefined(b[h])),super({readableHighWaterMark:t.chunkSize});let r=this,i=this[Qh]={length:t.length,timeWindow:t.timeWindow,ticksRate:t.ticksRate,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},n=Jh(i.ticksRate*t.samplesCount,i.timeWindow);this.on("newListener",h=>{h==="progress"&&(i.isCaptured||(i.isCaptured=!0))});let a=0;i.updateProgress=u6(function(){let b=i.length,w=i.bytesSeen,T=w-a;if(!T||r.destroyed)return;let I=n(T);a=w,process.nextTick(()=>{r.emit("progress",{loaded:w,total:b,progress:b?w/b:void 0,bytes:T,rate:I||void 0,estimated:I&&b&&w<=b?(b-w)/I:void 0})})},i.ticksRate);let u=()=>{i.updateProgress(!0)};this.once("end",u),this.once("error",u)}_read(t){let r=this[Qh];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,i){let n=this,a=this[Qh],u=a.maxRate,h=this.readableHighWaterMark,b=a.timeWindow,w=1e3/b,T=u/w,I=a.minChunkSize!==!1?Math.max(a.minChunkSize,T*.01):0;function B(P,L){let X=Buffer.byteLength(P);a.bytesSeen+=X,a.bytes+=X,a.isCaptured&&a.updateProgress(),n.push(P)?process.nextTick(L):a.onReadCallback=()=>{a.onReadCallback=null,process.nextTick(L)}}let M=(P,L)=>{let X=Buffer.byteLength(P),V=null,q=h,ee,fe=0;if(u){let _e=Date.now();(!a.ts||(fe=_e-a.ts)>=b)&&(a.ts=_e,ee=T-a.bytes,a.bytes=ee<0?-ee:0,fe=0),ee=T-a.bytes}if(u){if(ee<=0)return setTimeout(()=>{L(null,P)},b-fe);ee<q&&(q=ee)}q&&X>q&&X-q>I&&(V=P.subarray(q),P=P.subarray(0,q)),B(P,V?()=>{process.nextTick(L,null,V)}:L)};M(t,function P(L,X){if(L)return i(L);X?M(X,P):i(null)})}setLength(t){return this[Qh].length=+t,this}},$g=Gg;var R6=require("events");var p6=require("util"),h6=require("stream");var{asyncIterator:l6}=Symbol,LD=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[l6]?yield*e[l6]():yield e},ed=LD;var DD=z.ALPHABET.ALPHA_DIGIT+"-_",al=new p6.TextEncoder,io=`\r
33
+ `,UD=al.encode(io),qD=2,Xg=class{constructor(t,r){let{escapeName:i}=this.constructor,n=z.isString(r),a=`Content-Disposition: form-data; name="${i(t)}"${!n&&r.name?`; filename="${i(r.name)}"`:""}${io}`;n?r=al.encode(String(r).replace(/\r?\n|\r\n?/g,io)):a+=`Content-Type: ${r.type||"application/octet-stream"}${io}`,this.headers=al.encode(a+io),this.contentLength=n?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+qD,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;z.isTypedArray(t)?yield t:yield*ed(t),yield UD}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},FD=(e,t,r)=>{let{tag:i="form-data-boundary",size:n=25,boundary:a=i+"-"+z.generateString(n,DD)}=r||{};if(!z.isFormData(e))throw TypeError("FormData instance required");if(a.length<1||a.length>70)throw Error("boundary must be 10-70 characters long");let u=al.encode("--"+a+io),h=al.encode("--"+a+"--"+io+io),b=h.byteLength,w=Array.from(e.entries()).map(([I,B])=>{let M=new Xg(I,B);return b+=M.size,M});b+=u.byteLength*w.length,b=z.toFiniteNumber(b);let T={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(b)&&(T["Content-Length"]=b),t&&t(T),h6.Readable.from(async function*(){for(let I of w)yield u,yield*I.encode();yield h}())},d6=FD;var m6=Ir(require("stream"),1),Yg=class extends m6.default.Transform{__transform(t,r,i){this.push(t),i()}_transform(t,r,i){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let n=Buffer.alloc(2);n[0]=120,n[1]=156,this.push(n,r)}this.__transform(t,r,i)}},v6=Yg;var HD=(e,t)=>z.isAsyncFn(e)?function(...r){let i=r.pop();e.apply(this,r).then(n=>{try{t?i(null,...t(n)):i(null,n)}catch(a){i(a)}},i)}:e,g6=HD;var b6={flush:ca.default.constants.Z_SYNC_FLUSH,finishFlush:ca.default.constants.Z_SYNC_FLUSH},zD={flush:ca.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:ca.default.constants.BROTLI_OPERATION_FLUSH},x6=z.isFunction(ca.default.createBrotliDecompress),{http:jD,https:VD}=I6.default,KD=/https:?/,_6=Wr.protocols.map(e=>e+":");function WD(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function A6(e,t,r){let i=t;if(!i&&i!==!1){let n=(0,w6.getProxyForUrl)(r);n&&(i=new URL(n))}if(i){if(i.username&&(i.auth=(i.username||"")+":"+(i.password||"")),i.auth){(i.auth.username||i.auth.password)&&(i.auth=(i.auth.username||"")+":"+(i.auth.password||""));let a=Buffer.from(i.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+a}e.headers.host=e.hostname+(e.port?":"+e.port:"");let n=i.hostname||i.host;e.hostname=n,e.host=n,e.port=i.port,e.path=r,i.protocol&&(e.protocol=i.protocol.includes(":")?i.protocol:`${i.protocol}:`)}e.beforeRedirects.proxy=function(a){A6(a,t,a.href)}}var GD=typeof process<"u"&&z.kindOf(process)==="process",$D=e=>new Promise((t,r)=>{let i,n,a=(b,w)=>{n||(n=!0,i&&i(b,w))},u=b=>{a(b),t(b)},h=b=>{a(b,!0),r(b)};e(u,h,b=>i=b).catch(h)}),XD=({address:e,family:t})=>{if(!z.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},y6=(e,t)=>XD(z.isObject(e)?e:{address:e,family:t}),O6=GD&&function(t){return $D(async function(i,n,a){let{data:u,lookup:h,family:b}=t,{responseType:w,responseEncoding:T}=t,I=t.method.toUpperCase(),B,M=!1,P;if(h){let _=g6(h,l=>z.isArray(l)?l:[l]);h=(l,m,A)=>{_(l,m,(U,j,Z)=>{if(U)return A(U);let se=z.isArray(j)?j.map(ae=>y6(ae)):[y6(j,Z)];m.all?A(U,se):A(U,se[0].address,se[0].family)})}}let L=new R6.EventEmitter,X=()=>{t.cancelToken&&t.cancelToken.unsubscribe(V),t.signal&&t.signal.removeEventListener("abort",V),L.removeAllListeners()};a((_,l)=>{B=!0,l&&(M=!0,X())});function V(_){L.emit("abort",!_||_.type?new Xn(null,t,P):_)}L.once("abort",n),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(V),t.signal&&(t.signal.aborted?V():t.signal.addEventListener("abort",V)));let q=Jo(t.baseURL,t.url),ee=new URL(q,"http://localhost"),fe=ee.protocol||_6[0];if(fe==="data:"){let _;if(I!=="GET")return ro(i,n,{status:405,statusText:"method not allowed",headers:{},config:t});try{_=Wg(t.url,w==="blob",{Blob:t.env&&t.env.Blob})}catch(l){throw Se.from(l,Se.ERR_BAD_REQUEST,t)}return w==="text"?(_=_.toString(T),(!T||T==="utf8")&&(_=z.stripBOM(_))):w==="stream"&&(_=tc.default.Readable.from(_)),ro(i,n,{data:_,status:200,statusText:"OK",headers:new Gr,config:t})}if(_6.indexOf(fe)===-1)return n(new Se("Unsupported protocol "+fe,Se.ERR_BAD_REQUEST,t));let _e=Gr.from(t.headers).normalize();_e.set("User-Agent","axios/"+ec,!1);let Te=t.onDownloadProgress,be=t.onUploadProgress,O=t.maxRate,E,f;if(z.isSpecCompliantForm(u)){let _=_e.getContentType(/boundary=([-_\w\d]{10,70})/i);u=d6(u,l=>{_e.set(l)},{tag:`axios-${ec}-boundary`,boundary:_&&_[1]||void 0})}else if(z.isFormData(u)&&z.isFunction(u.getHeaders)){if(_e.set(u.getHeaders()),!_e.hasContentLength())try{let _=await T6.default.promisify(u.getLength).call(u);Number.isFinite(_)&&_>=0&&_e.setContentLength(_)}catch{}}else if(z.isBlob(u))u.size&&_e.setContentType(u.type||"application/octet-stream"),_e.setContentLength(u.size||0),u=tc.default.Readable.from(ed(u));else if(u&&!z.isStream(u)){if(!Buffer.isBuffer(u))if(z.isArrayBuffer(u))u=Buffer.from(new Uint8Array(u));else if(z.isString(u))u=Buffer.from(u,"utf-8");else return n(new Se("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Se.ERR_BAD_REQUEST,t));if(_e.setContentLength(u.length,!1),t.maxBodyLength>-1&&u.length>t.maxBodyLength)return n(new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,t))}let c=z.toFiniteNumber(_e.getContentLength());z.isArray(O)?(E=O[0],f=O[1]):E=f=O,u&&(be||E)&&(z.isStream(u)||(u=tc.default.Readable.from(u,{objectMode:!1})),u=tc.default.pipeline([u,new $g({length:c,maxRate:z.toFiniteNumber(E)})],z.noop),be&&u.on("progress",_=>{be(Object.assign(_,{upload:!0}))}));let p;if(t.auth){let _=t.auth.username||"",l=t.auth.password||"";p=_+":"+l}if(!p&&ee.username){let _=ee.username,l=ee.password;p=_+":"+l}p&&_e.delete("authorization");let v;try{v=Zo(ee.pathname+ee.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(_){let l=new Error(_.message);return l.config=t,l.url=t.url,l.exists=!0,n(l)}_e.set("Accept-Encoding","gzip, compress, deflate"+(x6?", br":""),!1);let g={path:v,method:I,headers:_e.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:p,protocol:fe,family:b,beforeRedirect:WD,beforeRedirects:{}};!z.isUndefined(h)&&(g.lookup=h),t.socketPath?g.socketPath=t.socketPath:(g.hostname=ee.hostname,g.port=ee.port,A6(g,t.proxy,fe+"//"+ee.hostname+(ee.port?":"+ee.port:"")+g.path));let x,S=KD.test(g.protocol);if(g.agent=S?t.httpsAgent:t.httpAgent,t.transport?x=t.transport:t.maxRedirects===0?x=S?E6.default:S6.default:(t.maxRedirects&&(g.maxRedirects=t.maxRedirects),t.beforeRedirect&&(g.beforeRedirects.config=t.beforeRedirect),x=S?VD:jD),t.maxBodyLength>-1?g.maxBodyLength=t.maxBodyLength:g.maxBodyLength=1/0,t.insecureHTTPParser&&(g.insecureHTTPParser=t.insecureHTTPParser),P=x.request(g,function(l){if(P.destroyed)return;let m=[l],A=+l.headers["content-length"];if(Te){let ae=new $g({length:z.toFiniteNumber(A),maxRate:z.toFiniteNumber(f)});Te&&ae.on("progress",he=>{Te(Object.assign(he,{download:!0}))}),m.push(ae)}let U=l,j=l.req||P;if(t.decompress!==!1&&l.headers["content-encoding"])switch((I==="HEAD"||l.statusCode===204)&&delete l.headers["content-encoding"],(l.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":m.push(ca.default.createUnzip(b6)),delete l.headers["content-encoding"];break;case"deflate":m.push(new v6),m.push(ca.default.createUnzip(b6)),delete l.headers["content-encoding"];break;case"br":x6&&(m.push(ca.default.createBrotliDecompress(zD)),delete l.headers["content-encoding"])}U=m.length>1?tc.default.pipeline(m,z.noop):m[0];let Z=tc.default.finished(U,()=>{Z(),X()}),se={status:l.statusCode,statusText:l.statusMessage,headers:new Gr(l.headers),config:t,request:j};if(w==="stream")se.data=U,ro(i,n,se);else{let ae=[],he=0;U.on("data",function(me){ae.push(me),he+=me.length,t.maxContentLength>-1&&he>t.maxContentLength&&(M=!0,U.destroy(),n(new Se("maxContentLength size of "+t.maxContentLength+" exceeded",Se.ERR_BAD_RESPONSE,t,j)))}),U.on("aborted",function(){if(M)return;let me=new Se("maxContentLength size of "+t.maxContentLength+" exceeded",Se.ERR_BAD_RESPONSE,t,j);U.destroy(me),n(me)}),U.on("error",function(me){P.destroyed||n(Se.from(me,null,t,j))}),U.on("end",function(){try{let me=ae.length===1?ae[0]:Buffer.concat(ae);w!=="arraybuffer"&&(me=me.toString(T),(!T||T==="utf8")&&(me=z.stripBOM(me))),se.data=me}catch(me){return n(Se.from(me,null,t,se.request,se))}ro(i,n,se)})}L.once("abort",ae=>{U.destroyed||(U.emit("error",ae),U.destroy())})}),L.once("abort",_=>{n(_),P.destroy(_)}),P.on("error",function(l){n(Se.from(l,null,t,P))}),P.on("socket",function(l){l.setKeepAlive(!0,1e3*60)}),t.timeout){let _=parseInt(t.timeout,10);if(Number.isNaN(_)){n(new Se("error trying to parse `config.timeout` to int",Se.ERR_BAD_OPTION_VALUE,t,P));return}P.setTimeout(_,function(){if(B)return;let m=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",A=t.transitional||Tu;t.timeoutErrorMessage&&(m=t.timeoutErrorMessage),n(new Se(m,A.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,t,P)),V()})}if(z.isStream(u)){let _=!1,l=!1;u.on("end",()=>{_=!0}),u.once("error",m=>{l=!0,P.destroy(m)}),u.on("close",()=>{!_&&!l&&V(new Xn("Request stream has been aborted",t,P))}),u.pipe(P)}else P.end(u)})};var k6=Wr.hasStandardBrowserEnv?{write(e,t,r,i,n,a){let u=[e+"="+encodeURIComponent(t)];z.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),z.isString(i)&&u.push("path="+i),z.isString(n)&&u.push("domain="+n),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var N6=Wr.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),i;function n(a){let u=a;return t&&(r.setAttribute("href",u),u=r.href),r.setAttribute("href",u),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=n(window.location.href),function(u){let h=z.isString(u)?n(u):u;return h.protocol===i.protocol&&h.host===i.host}}():function(){return function(){return!0}}();function P6(e,t){let r=0,i=Jh(50,250);return n=>{let a=n.loaded,u=n.lengthComputable?n.total:void 0,h=a-r,b=i(h),w=a<=u;r=a;let T={loaded:a,total:u,progress:u?a/u:void 0,bytes:h,rate:b||void 0,estimated:b&&u&&w?(u-a)/b:void 0,event:n};T[t?"download":"upload"]=!0,e(T)}}var YD=typeof XMLHttpRequest<"u",B6=YD&&function(e){return new Promise(function(r,i){let n=e.data,a=Gr.from(e.headers).normalize(),{responseType:u,withXSRFToken:h}=e,b;function w(){e.cancelToken&&e.cancelToken.unsubscribe(b),e.signal&&e.signal.removeEventListener("abort",b)}let T;if(z.isFormData(n)){if(Wr.hasStandardBrowserEnv||Wr.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((T=a.getContentType())!==!1){let[L,...X]=T?T.split(";").map(V=>V.trim()).filter(Boolean):[];a.setContentType([L||"multipart/form-data",...X].join("; "))}}let I=new XMLHttpRequest;if(e.auth){let L=e.auth.username||"",X=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(L+":"+X))}let B=Jo(e.baseURL,e.url);I.open(e.method.toUpperCase(),Zo(B,e.params,e.paramsSerializer),!0),I.timeout=e.timeout;function M(){if(!I)return;let L=Gr.from("getAllResponseHeaders"in I&&I.getAllResponseHeaders()),V={data:!u||u==="text"||u==="json"?I.responseText:I.response,status:I.status,statusText:I.statusText,headers:L,config:e,request:I};ro(function(ee){r(ee),w()},function(ee){i(ee),w()},V),I=null}if("onloadend"in I?I.onloadend=M:I.onreadystatechange=function(){!I||I.readyState!==4||I.status===0&&!(I.responseURL&&I.responseURL.indexOf("file:")===0)||setTimeout(M)},I.onabort=function(){I&&(i(new Se("Request aborted",Se.ECONNABORTED,e,I)),I=null)},I.onerror=function(){i(new Se("Network Error",Se.ERR_NETWORK,e,I)),I=null},I.ontimeout=function(){let X=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",V=e.transitional||Tu;e.timeoutErrorMessage&&(X=e.timeoutErrorMessage),i(new Se(X,V.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,I)),I=null},Wr.hasStandardBrowserEnv&&(h&&z.isFunction(h)&&(h=h(e)),h||h!==!1&&N6(B))){let L=e.xsrfHeaderName&&e.xsrfCookieName&&k6.read(e.xsrfCookieName);L&&a.set(e.xsrfHeaderName,L)}n===void 0&&a.setContentType(null),"setRequestHeader"in I&&z.forEach(a.toJSON(),function(X,V){I.setRequestHeader(V,X)}),z.isUndefined(e.withCredentials)||(I.withCredentials=!!e.withCredentials),u&&u!=="json"&&(I.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&I.addEventListener("progress",P6(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&I.upload&&I.upload.addEventListener("progress",P6(e.onUploadProgress)),(e.cancelToken||e.signal)&&(b=L=>{I&&(i(!L||L.type?new Xn(null,e,I):L),I.abort(),I=null)},e.cancelToken&&e.cancelToken.subscribe(b),e.signal&&(e.signal.aborted?b():e.signal.addEventListener("abort",b)));let P=sl(B);if(P&&Wr.protocols.indexOf(P)===-1){i(new Se("Unsupported protocol "+P+":",Se.ERR_BAD_REQUEST,e));return}I.send(n||null)})};var Zg={http:O6,xhr:B6};z.forEach(Zg,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var M6=e=>`- ${e}`,ZD=e=>z.isFunction(e)||e===null||e===!1,td={getAdapter:e=>{e=z.isArray(e)?e:[e];let{length:t}=e,r,i,n={};for(let a=0;a<t;a++){r=e[a];let u;if(i=r,!ZD(r)&&(i=Zg[(u=String(r)).toLowerCase()],i===void 0))throw new Se(`Unknown adapter '${u}'`);if(i)break;n[u||"#"+a]=i}if(!i){let a=Object.entries(n).map(([h,b])=>`adapter ${h} `+(b===!1?"is not supported by the environment":"is not available in the build")),u=t?a.length>1?`since :
34
+ `+a.map(M6).join(`
35
+ `):" "+M6(a[0]):"as no adapter specified";throw new Se("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i},adapters:Zg};function Jg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Xn(null,e)}function rd(e){return Jg(e),e.headers=Gr.from(e.headers),e.data=Jf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),td.getAdapter(e.adapter||Iu.adapter)(e).then(function(i){return Jg(e),i.data=Jf.call(e,e.transformResponse,i),i.headers=Gr.from(i.headers),i},function(i){return Qf(i)||(Jg(e),i&&i.response&&(i.response.data=Jf.call(e,e.transformResponse,i.response),i.response.headers=Gr.from(i.response.headers))),Promise.reject(i)})}var C6=e=>e instanceof Gr?{...e}:e;function ua(e,t){t=t||{};let r={};function i(w,T,I){return z.isPlainObject(w)&&z.isPlainObject(T)?z.merge.call({caseless:I},w,T):z.isPlainObject(T)?z.merge({},T):z.isArray(T)?T.slice():T}function n(w,T,I){if(z.isUndefined(T)){if(!z.isUndefined(w))return i(void 0,w,I)}else return i(w,T,I)}function a(w,T){if(!z.isUndefined(T))return i(void 0,T)}function u(w,T){if(z.isUndefined(T)){if(!z.isUndefined(w))return i(void 0,w)}else return i(void 0,T)}function h(w,T,I){if(I in t)return i(w,T);if(I in e)return i(void 0,w)}let b={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:h,headers:(w,T)=>n(C6(w),C6(T),!0)};return z.forEach(Object.keys(Object.assign({},e,t)),function(T){let I=b[T]||n,B=I(e[T],t[T],T);z.isUndefined(B)&&I!==h||(r[T]=B)}),r}var Qg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Qg[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});var L6={};Qg.transitional=function(t,r,i){function n(a,u){return"[Axios v"+ec+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,h)=>{if(t===!1)throw new Se(n(u," has been removed"+(r?" in "+r:"")),Se.ERR_DEPRECATED);return r&&!L6[u]&&(L6[u]=!0,console.warn(n(u," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,u,h):!0}};function JD(e,t,r){if(typeof e!="object")throw new Se("options must be an object",Se.ERR_BAD_OPTION_VALUE);let i=Object.keys(e),n=i.length;for(;n-- >0;){let a=i[n],u=t[a];if(u){let h=e[a],b=h===void 0||u(h,a,e);if(b!==!0)throw new Se("option "+a+" must be "+b,Se.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Se("Unknown option "+a,Se.ERR_BAD_OPTION)}}var id={assertOptions:JD,validators:Qg};var no=id.validators,Ou=class{constructor(t){this.defaults=t,this.interceptors={request:new Rg,response:new Rg}}async request(t,r){try{return await this._request(t,r)}catch(i){if(i instanceof Error){let n;Error.captureStackTrace?Error.captureStackTrace(n={}):n=new Error;let a=n.stack?n.stack.replace(/^.+\n/,""):"";i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=`
36
+ `+a):i.stack=a}throw i}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=ua(this.defaults,r);let{transitional:i,paramsSerializer:n,headers:a}=r;i!==void 0&&id.assertOptions(i,{silentJSONParsing:no.transitional(no.boolean),forcedJSONParsing:no.transitional(no.boolean),clarifyTimeoutError:no.transitional(no.boolean)},!1),n!=null&&(z.isFunction(n)?r.paramsSerializer={serialize:n}:id.assertOptions(n,{encode:no.function,serialize:no.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u=a&&z.merge(a.common,a[r.method]);a&&z.forEach(["delete","get","head","post","put","patch","common"],P=>{delete a[P]}),r.headers=Gr.concat(u,a);let h=[],b=!0;this.interceptors.request.forEach(function(L){typeof L.runWhen=="function"&&L.runWhen(r)===!1||(b=b&&L.synchronous,h.unshift(L.fulfilled,L.rejected))});let w=[];this.interceptors.response.forEach(function(L){w.push(L.fulfilled,L.rejected)});let T,I=0,B;if(!b){let P=[rd.bind(this),void 0];for(P.unshift.apply(P,h),P.push.apply(P,w),B=P.length,T=Promise.resolve(r);I<B;)T=T.then(P[I++],P[I++]);return T}B=h.length;let M=r;for(I=0;I<B;){let P=h[I++],L=h[I++];try{M=P(M)}catch(X){L.call(this,X);break}}try{T=rd.call(this,M)}catch(P){return Promise.reject(P)}for(I=0,B=w.length;I<B;)T=T.then(w[I++],w[I++]);return T}getUri(t){t=ua(this.defaults,t);let r=Jo(t.baseURL,t.url);return Zo(r,t.params,t.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(t){Ou.prototype[t]=function(r,i){return this.request(ua(i||{},{method:t,url:r,data:(i||{}).data}))}});z.forEach(["post","put","patch"],function(t){function r(i){return function(a,u,h){return this.request(ua(h||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Ou.prototype[t]=r(),Ou.prototype[t+"Form"]=r(!0)});var ol=Ou;var eb=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});let i=this;this.promise.then(n=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](n);i._listeners=null}),this.promise.then=n=>{let a,u=new Promise(h=>{i.subscribe(h),a=h}).then(n);return u.cancel=function(){i.unsubscribe(a)},u},t(function(a,u,h){i.reason||(i.reason=new Xn(a,u,h),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new e(function(n){t=n}),cancel:t}}},D6=eb;function tb(e){return function(r){return e.apply(null,r)}}function rb(e){return z.isObject(e)&&e.isAxiosError===!0}var ib={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(ib).forEach(([e,t])=>{ib[t]=e});var U6=ib;function q6(e){let t=new ol(e),r=$f(ol.prototype.request,t);return z.extend(r,ol.prototype,t,{allOwnKeys:!0}),z.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return q6(ua(e,n))},r}var Fr=q6(Iu);Fr.Axios=ol;Fr.CanceledError=Xn;Fr.CancelToken=D6;Fr.isCancel=Qf;Fr.VERSION=ec;Fr.toFormData=to;Fr.AxiosError=Se;Fr.Cancel=Fr.CanceledError;Fr.all=function(t){return Promise.all(t)};Fr.spread=tb;Fr.isAxiosError=rb;Fr.mergeConfig=ua;Fr.AxiosHeaders=Gr;Fr.formToJSON=e=>Yh(z.isHTMLForm(e)?new FormData(e):e);Fr.getAdapter=td.getAdapter;Fr.HttpStatusCode=U6;Fr.default=Fr;var In=Fr;var{Axios:GW,AxiosError:$W,CanceledError:XW,isCancel:YW,CancelToken:ZW,VERSION:JW,all:QW,Cancel:eG,isAxiosError:tG,spread:rG,toFormData:iG,AxiosHeaders:nG,HttpStatusCode:sG,formToJSON:aG,getAdapter:oG,mergeConfig:cG}=In;function ku(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function QD(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}function eU(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function nd(e,...t){if(!eU(e))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function tU(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");ku(e.outputLen),ku(e.blockLen)}function sd(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function nb(e,t){nd(e);let r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}var rU={number:ku,bool:QD,bytes:nd,hash:tU,exists:sd,output:nb},ad=rU;var od=BigInt(4294967295),F6=BigInt(32);function iU(e,t=!1){return t?{h:Number(e&od),l:Number(e>>F6&od)}:{h:Number(e>>F6&od)|0,l:Number(e&od)|0}}function H6(e,t=!1){let r=new Uint32Array(e.length),i=new Uint32Array(e.length);for(let n=0;n<e.length;n++){let{h:a,l:u}=iU(e[n],t);[r[n],i[n]]=[a,u]}return[r,i]}var z6=(e,t,r)=>e<<r|t>>>32-r,j6=(e,t,r)=>t<<r|e>>>32-r,V6=(e,t,r)=>t<<r-32|e>>>64-r,K6=(e,t,r)=>e<<r-32|t>>>64-r;var W6=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));function nU(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}var sU=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!sU)throw new Error("Non little-endian hardware is not supported");function Nu(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function ud(e){if(typeof e=="string"&&(e=Nu(e)),!nU(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}var cd=class{clone(){return this._cloneInto()}},pG={}.toString;function G6(e){let t=i=>e().update(ud(i)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function $6(e){let t=(i,n)=>e(n).update(ud(i)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=i=>e(i),t}var[Z6,J6,Q6]=[[],[],[]],aU=BigInt(0),cl=BigInt(1),oU=BigInt(2),cU=BigInt(7),uU=BigInt(256),fU=BigInt(113);for(let e=0,t=cl,r=1,i=0;e<24;e++){[r,i]=[i,(2*r+3*i)%5],Z6.push(2*(5*i+r)),J6.push((e+1)*(e+2)/2%64);let n=aU;for(let a=0;a<7;a++)t=(t<<cl^(t>>cU)*fU)%uU,t&oU&&(n^=cl<<(cl<<BigInt(a))-cl);Q6.push(n)}var[lU,pU]=H6(Q6,!0),X6=(e,t,r)=>r>32?V6(e,t,r):z6(e,t,r),Y6=(e,t,r)=>r>32?K6(e,t,r):j6(e,t,r);function hU(e,t=24){let r=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let u=0;u<10;u++)r[u]=e[u]^e[u+10]^e[u+20]^e[u+30]^e[u+40];for(let u=0;u<10;u+=2){let h=(u+8)%10,b=(u+2)%10,w=r[b],T=r[b+1],I=X6(w,T,1)^r[h],B=Y6(w,T,1)^r[h+1];for(let M=0;M<50;M+=10)e[u+M]^=I,e[u+M+1]^=B}let n=e[2],a=e[3];for(let u=0;u<24;u++){let h=J6[u],b=X6(n,a,h),w=Y6(n,a,h),T=Z6[u];n=e[T],a=e[T+1],e[T]=b,e[T+1]=w}for(let u=0;u<50;u+=10){for(let h=0;h<10;h++)r[h]=e[u+h];for(let h=0;h<10;h++)e[u+h]^=~r[(h+2)%10]&r[(h+4)%10]}e[0]^=lU[i],e[1]^=pU[i]}r.fill(0)}var fd=class e extends cd{constructor(t,r,i,n=!1,a=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=i,this.enableXOF=n,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,ku(i),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=W6(this.state)}keccak(){hU(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){sd(this);let{blockLen:r,state:i}=this;t=ud(t);let n=t.length;for(let a=0;a<n;){let u=Math.min(r-this.pos,n-a);for(let h=0;h<u;h++)i[this.pos++]^=t[a++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:r,pos:i,blockLen:n}=this;t[i]^=r,r&128&&i===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){sd(this,!1),nd(t),this.finish();let r=this.state,{blockLen:i}=this;for(let n=0,a=t.length;n<a;){this.posOut>=i&&this.keccak();let u=Math.min(i-this.posOut,a-n);t.set(r.subarray(this.posOut,this.posOut+u),n),this.posOut+=u,n+=u}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return ku(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(nb(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:i,outputLen:n,rounds:a,enableXOF:u}=this;return t||(t=new e(r,i,n,u,a)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=i,t.outputLen=n,t.enableXOF=u,t.destroyed=this.destroyed,t}},so=(e,t,r)=>G6(()=>new fd(t,e,r)),gG=so(6,144,224/8),bG=so(6,136,256/8),xG=so(6,104,384/8),_G=so(6,72,512/8),e4=so(1,144,224/8),sb=so(1,136,256/8),t4=so(1,104,384/8),r4=so(1,72,512/8),i4=(e,t,r)=>$6((i={})=>new fd(t,e,i.dkLen===void 0?r:i.dkLen,!0)),yG=i4(31,168,128/8),wG=i4(31,136,256/8);var RG=ad.bool,AG=ad.bytes;function ul(e){return t=>(ad.bytes(t),e(t))}var OG=(()=>{let e=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,t=typeof module<"u"&&typeof module.require=="function"&&module.require.bind(module);return{node:t&&!e?t("crypto"):void 0,web:e}})();var MG=ul(e4),fl=(()=>{let e=ul(sb);return e.create=sb.create,e})(),CG=ul(t4),LG=ul(r4);var $r=class extends Error{constructor(t,r){super(t),this.innerError=r,this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(new.target.constructor):this.stack=new Error().stack}static convertToString(t,r=!1){if(t==null)return"undefined";let i=JSON.stringify(t,(n,a)=>typeof a=="bigint"?a.toString():a);return r&&["bigint","string"].includes(typeof t)?i.replace(/['\\"]+/g,""):i}toJSON(){return{name:this.name,code:this.code,message:this.message,innerError:this.innerError}}},fa=class extends $r{constructor(t,r){super(`Invalid value given "${$r.convertToString(t,!0)}". Error: ${r}.`),this.name=this.constructor.name}};var ao=class extends fa{constructor(t){super(t,"can not parse as byte data"),this.code=1002}},ll=class extends fa{constructor(t){super(t,"can not parse as number data"),this.code=1003}};var ld=class extends fa{constructor(t){super(t,"can not be converted to hex"),this.code=1006}};var n4="An Rpc error has occured with a code of *code*",Qi={[-32700]:{message:"Parse error",description:"Invalid JSON"},[-32600]:{message:"Invalid request",description:"JSON is not a valid request object "},[-32601]:{message:"Method not found",description:"Method does not exist "},[-32602]:{message:"Invalid params",description:"Invalid method parameters"},[-32603]:{message:"Internal error",description:"Internal JSON-RPC error"},[-32e3]:{message:"Invalid input",description:"Missing or invalid parameters"},[-32001]:{message:"Resource not found",description:"Requested resource not found"},[-32002]:{message:"Resource unavailable",description:"Requested resource not available"},[-32003]:{message:"Transaction rejected",description:"Transaction creation failed"},[-32004]:{message:"Method not supported",description:"Method is not implemented"},[-32005]:{message:"Limit exceeded",description:"Request exceeds defined limit"},[-32006]:{message:"JSON-RPC version not supported",description:"Version of JSON-RPC protocol is not supported"},[4001]:{name:"User Rejected Request",message:"The user rejected the request."},[4100]:{name:"Unauthorized",message:"The requested method and/or account has not been authorized by the user."},[4200]:{name:"Unsupported Method",message:"The Provider does not support the requested method."},[4900]:{name:"Disconnected",message:"The Provider is disconnected from all chains."},[4901]:{name:"Chain Disconnected",message:"The Provider is not connected to the requested chain."},"0-999":{name:"",message:"Not used."},1e3:{name:"Normal Closure",message:"The connection successfully completed the purpose for which it was created."},1001:{name:"Going Away",message:"The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection."},1002:{name:"Protocol error",message:"The endpoint is terminating the connection due to a protocol error."},1003:{name:"Unsupported Data",message:"The connection is being terminated because the endpoint received data of a type it cannot accept. (For example, a text-only endpoint received binary data.)"},1004:{name:"Reserved",message:"Reserved. A meaning might be defined in the future."},1005:{name:"No Status Rcvd",message:"Reserved. Indicates that no status code was provided even though one was expected."},1006:{name:"Abnormal Closure",message:"Reserved. Indicates that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected."},1007:{name:"Invalid frame payload data",message:"The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message)."},1008:{name:"Policy Violation",message:"The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable."},1009:{name:"Message Too Big",message:"The endpoint is terminating the connection because a data frame was received that is too large."},1010:{name:"Mandatory Ext.",message:"The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't."},1011:{name:"Internal Error",message:"The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request."},1012:{name:"Service Restart",message:"The server is terminating the connection because it is restarting."},1013:{name:"Try Again Later",message:"The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients."},1014:{name:"Bad Gateway",message:"The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code."},1015:{name:"TLS handshake",message:"Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified)."},"1016-2999":{name:"",message:"For definition by future revisions of the WebSocket Protocol specification, and for definition by extension specifications."},"3000-3999":{name:"",message:"For use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol."},"4000-4999":{name:"",message:"For private use, and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol."}};var Fi=class extends $r{constructor(t,r){super(r??n4.replace("*code*",t.error.code.toString())),this.code=t.error.code,this.id=t.id,this.jsonrpc=t.jsonrpc,this.jsonRpcError=t.error}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{error:this.jsonRpcError,id:this.id,jsonRpc:this.jsonrpc})}};var ab=class extends Fi{constructor(t){super(t,Qi[-32700].message),this.code=-32700}},ob=class extends Fi{constructor(t){super(t,Qi[-32600].message),this.code=-32600}},cb=class extends Fi{constructor(t){super(t,Qi[-32601].message),this.code=-32601}},ub=class extends Fi{constructor(t){super(t,Qi[-32602].message),this.code=-32602}},fb=class extends Fi{constructor(t){super(t,Qi[-32603].message),this.code=-32603}},lb=class extends Fi{constructor(t){super(t,Qi[-32e3].message),this.code=-32e3}},pb=class extends Fi{constructor(t){super(t,Qi[-32004].message),this.code=-32004}},hb=class extends Fi{constructor(t){super(t,Qi[-32002].message),this.code=-32002}},db=class extends Fi{constructor(t){super(t,Qi[-32001].message),this.code=-32001}},mb=class extends Fi{constructor(t){super(t,Qi[-32006].message),this.code=-32006}},vb=class extends Fi{constructor(t){super(t,Qi[-32003].message),this.code=-32003}},gb=class extends Fi{constructor(t){super(t,Qi[-32005].message),this.code=-32005}},en=new Map;en.set(-32700,{error:ab});en.set(-32600,{error:ob});en.set(-32601,{error:cb});en.set(-32602,{error:ub});en.set(-32603,{error:fb});en.set(-32e3,{error:lb});en.set(-32004,{error:pb});en.set(-32002,{error:hb});en.set(-32003,{error:vb});en.set(-32001,{error:db});en.set(-32006,{error:mb});en.set(-32005,{error:gb});var pd=class extends $r{constructor(t){super(`Format for the type ${t} is unsupported`),this.type=t,this.code=1200}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type})}};var Et;(function(e){e.assertEqual=n=>n;function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let a={};for(let u of n)a[u]=u;return a},e.getValidEnumValues=n=>{let a=e.objectKeys(n).filter(h=>typeof n[n[h]]!="number"),u={};for(let h of a)u[h]=n[h];return e.objectValues(u)},e.objectValues=n=>e.objectKeys(n).map(function(a){return n[a]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let u in n)Object.prototype.hasOwnProperty.call(n,u)&&a.push(u);return a},e.find=(n,a)=>{for(let u of n)if(a(u))return u},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function i(n,a=" | "){return n.map(u=>typeof u=="string"?`'${u}'`:u).join(a)}e.joinValues=i,e.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(Et||(Et={}));var xb;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(xb||(xb={}));var xe=Et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),oo=e=>{switch(typeof e){case"undefined":return xe.undefined;case"string":return xe.string;case"number":return isNaN(e)?xe.nan:xe.number;case"boolean":return xe.boolean;case"function":return xe.function;case"bigint":return xe.bigint;case"symbol":return xe.symbol;case"object":return Array.isArray(e)?xe.array:e===null?xe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?xe.promise:typeof Map<"u"&&e instanceof Map?xe.map:typeof Set<"u"&&e instanceof Set?xe.set:typeof Date<"u"&&e instanceof Date?xe.date:xe.object;default:return xe.unknown}},le=Et.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),EU=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),tn=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let r=t||function(a){return a.message},i={_errors:[]},n=a=>{for(let u of a.issues)if(u.code==="invalid_union")u.unionErrors.map(n);else if(u.code==="invalid_return_type")n(u.returnTypeError);else if(u.code==="invalid_arguments")n(u.argumentsError);else if(u.path.length===0)i._errors.push(r(u));else{let h=i,b=0;for(;b<u.path.length;){let w=u.path[b];b===u.path.length-1?(h[w]=h[w]||{_errors:[]},h[w]._errors.push(r(u))):h[w]=h[w]||{_errors:[]},h=h[w],b++}}};return n(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,Et.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},i=[];for(let n of this.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};tn.create=e=>new tn(e);var El=(e,t)=>{let r;switch(e.code){case le.invalid_type:e.received===xe.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case le.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Et.jsonStringifyReplacer)}`;break;case le.unrecognized_keys:r=`Unrecognized key(s) in object: ${Et.joinValues(e.keys,", ")}`;break;case le.invalid_union:r="Invalid input";break;case le.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Et.joinValues(e.options)}`;break;case le.invalid_enum_value:r=`Invalid enum value. Expected ${Et.joinValues(e.options)}, received '${e.received}'`;break;case le.invalid_arguments:r="Invalid function arguments";break;case le.invalid_return_type:r="Invalid function return type";break;case le.invalid_date:r="Invalid date";break;case le.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Et.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case le.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case le.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case le.custom:r="Invalid input";break;case le.invalid_intersection_types:r="Intersection results could not be merged";break;case le.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case le.not_finite:r="Number must be finite";break;default:r=t.defaultError,Et.assertNever(e)}return{message:r}},o4=El;function TU(e){o4=e}function dd(){return o4}var md=e=>{let{data:t,path:r,errorMaps:i,issueData:n}=e,a=[...r,...n.path||[]],u={...n,path:a},h="",b=i.filter(w=>!!w).slice().reverse();for(let w of b)h=w(u,{data:t,defaultError:h}).message;return{...n,path:a,message:n.message||h}},IU=[];function we(e,t){let r=md({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,dd(),El].filter(i=>!!i)});e.common.issues.push(r)}var di=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let i=[];for(let n of r){if(n.status==="aborted")return Ve;n.status==="dirty"&&t.dirty(),i.push(n.value)}return{status:t.value,value:i}}static async mergeObjectAsync(t,r){let i=[];for(let n of r)i.push({key:await n.key,value:await n.value});return e.mergeObjectSync(t,i)}static mergeObjectSync(t,r){let i={};for(let n of r){let{key:a,value:u}=n;if(a.status==="aborted"||u.status==="aborted")return Ve;a.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof u.value<"u"||n.alwaysSet)&&(i[a.value]=u.value)}return{status:t.value,value:i}}},Ve=Object.freeze({status:"aborted"}),c4=e=>({status:"dirty",value:e}),Si=e=>({status:"valid",value:e}),_b=e=>e.status==="aborted",yb=e=>e.status==="dirty",Tl=e=>e.status==="valid",vd=e=>typeof Promise<"u"&&e instanceof Promise,ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ke||(ke={}));var Rn=class{constructor(t,r,i,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=i,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},s4=(e,t)=>{if(Tl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new tn(e.common.issues);return this._error=r,this._error}}};function it(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:i,description:n}=e;if(t&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(u,h)=>u.code!=="invalid_type"?{message:h.defaultError}:typeof h.data>"u"?{message:i??h.defaultError}:{message:r??h.defaultError},description:n}}var nt=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return oo(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:oo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new di,ctx:{common:t.parent.common,data:t.data,parsedType:oo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(vd(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let i=this.safeParse(t,r);if(i.success)return i.data;throw i.error}safeParse(t,r){var i;let n={common:{issues:[],async:(i=r?.async)!==null&&i!==void 0?i:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:oo(t)},a=this._parseSync({data:t,path:n.path,parent:n});return s4(n,a)}async parseAsync(t,r){let i=await this.safeParseAsync(t,r);if(i.success)return i.data;throw i.error}async safeParseAsync(t,r){let i={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:oo(t)},n=this._parse({data:t,path:i.path,parent:i}),a=await(vd(n)?n:Promise.resolve(n));return s4(i,a)}refine(t,r){let i=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,a)=>{let u=t(n),h=()=>a.addIssue({code:le.custom,...i(n)});return typeof Promise<"u"&&u instanceof Promise?u.then(b=>b?!0:(h(),!1)):u?!0:(h(),!1)})}refinement(t,r){return this._refinement((i,n)=>t(i)?!0:(n.addIssue(typeof r=="function"?r(i,n):r),!1))}_refinement(t){return new rn({schema:this,typeName:Ce.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Yn.create(this,this._def)}nullable(){return ha.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pa.create(this,this._def)}promise(){return fo.create(this,this._def)}or(t){return cc.create([this,t],this._def)}and(t){return uc.create(this,t,this._def)}transform(t){return new rn({...it(this._def),schema:this,typeName:Ce.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new dc({...it(this._def),innerType:this,defaultValue:r,typeName:Ce.ZodDefault})}brand(){return new _d({typeName:Ce.ZodBranded,type:this,...it(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Du({...it(this._def),innerType:this,catchValue:r,typeName:Ce.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Il.create(this,t)}readonly(){return qu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},RU=/^c[^\s-]{8,}$/i,AU=/^[a-z][a-z0-9]*$/,OU=/^[0-9A-HJKMNP-TV-Z]{26}$/,kU=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,NU=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,PU="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",bb,BU=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,MU=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,CU=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function LU(e,t){return!!((t==="v4"||!t)&&BU.test(e)||(t==="v6"||!t)&&MU.test(e))}var co=class e extends nt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==xe.string){let a=this._getOrReturnCtx(t);return we(a,{code:le.invalid_type,expected:xe.string,received:a.parsedType}),Ve}let i=new di,n;for(let a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(n=this._getOrReturnCtx(t,n),we(n,{code:le.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="max")t.data.length>a.value&&(n=this._getOrReturnCtx(t,n),we(n,{code:le.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="length"){let u=t.data.length>a.value,h=t.data.length<a.value;(u||h)&&(n=this._getOrReturnCtx(t,n),u?we(n,{code:le.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):h&&we(n,{code:le.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),i.dirty())}else if(a.kind==="email")NU.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"email",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="emoji")bb||(bb=new RegExp(PU,"u")),bb.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"emoji",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="uuid")kU.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"uuid",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid")RU.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"cuid",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid2")AU.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"cuid2",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="ulid")OU.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"ulid",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),we(n,{validation:"url",code:le.invalid_string,message:a.message}),i.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"regex",code:le.invalid_string,message:a.message}),i.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(t,n),we(n,{code:le.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),i.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(n=this._getOrReturnCtx(t,n),we(n,{code:le.invalid_string,validation:{startsWith:a.value},message:a.message}),i.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(n=this._getOrReturnCtx(t,n),we(n,{code:le.invalid_string,validation:{endsWith:a.value},message:a.message}),i.dirty()):a.kind==="datetime"?CU(a).test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{code:le.invalid_string,validation:"datetime",message:a.message}),i.dirty()):a.kind==="ip"?LU(t.data,a.version)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"ip",code:le.invalid_string,message:a.message}),i.dirty()):Et.assertNever(a);return{status:i.value,value:t.data}}_regex(t,r,i){return this.refinement(n=>t.test(n),{validation:r,code:le.invalid_string,...ke.errToObj(i)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ke.errToObj(t)})}datetime(t){var r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(r=t?.offset)!==null&&r!==void 0?r:!1,...ke.errToObj(t?.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...ke.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...ke.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...ke.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...ke.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...ke.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...ke.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...ke.errToObj(r)})}nonempty(t){return this.min(1,ke.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};co.create=e=>{var t;return new co({checks:[],typeName:Ce.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...it(e)})};function DU(e,t){let r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=r>i?r:i,a=parseInt(e.toFixed(n).replace(".","")),u=parseInt(t.toFixed(n).replace(".",""));return a%u/Math.pow(10,n)}var rc=class e extends nt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==xe.number){let a=this._getOrReturnCtx(t);return we(a,{code:le.invalid_type,expected:xe.number,received:a.parsedType}),Ve}let i,n=new di;for(let a of this._def.checks)a.kind==="int"?Et.isInteger(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{code:le.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?DU(t.data,a.value)!==0&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{code:le.not_finite,message:a.message}),n.dirty()):Et.assertNever(a);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ke.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ke.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ke.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ke.toString(r))}setLimit(t,r,i,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:ke.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Et.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(t===null||i.value<t)&&(t=i.value)}return Number.isFinite(r)&&Number.isFinite(t)}};rc.create=e=>new rc({checks:[],typeName:Ce.ZodNumber,coerce:e?.coerce||!1,...it(e)});var ic=class e extends nt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==xe.bigint){let a=this._getOrReturnCtx(t);return we(a,{code:le.invalid_type,expected:xe.bigint,received:a.parsedType}),Ve}let i,n=new di;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):Et.assertNever(a);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ke.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ke.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ke.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ke.toString(r))}setLimit(t,r,i,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:ke.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};ic.create=e=>{var t;return new ic({checks:[],typeName:Ce.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...it(e)})};var nc=class extends nt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==xe.boolean){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.boolean,received:i.parsedType}),Ve}return Si(t.data)}};nc.create=e=>new nc({typeName:Ce.ZodBoolean,coerce:e?.coerce||!1,...it(e)});var sc=class e extends nt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==xe.date){let a=this._getOrReturnCtx(t);return we(a,{code:le.invalid_type,expected:xe.date,received:a.parsedType}),Ve}if(isNaN(t.data.getTime())){let a=this._getOrReturnCtx(t);return we(a,{code:le.invalid_date}),Ve}let i=new di,n;for(let a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(n=this._getOrReturnCtx(t,n),we(n,{code:le.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),i.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(n=this._getOrReturnCtx(t,n),we(n,{code:le.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),i.dirty()):Et.assertNever(a);return{status:i.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:ke.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:ke.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};sc.create=e=>new sc({checks:[],coerce:e?.coerce||!1,typeName:Ce.ZodDate,...it(e)});var Bu=class extends nt{_parse(t){if(this._getType(t)!==xe.symbol){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.symbol,received:i.parsedType}),Ve}return Si(t.data)}};Bu.create=e=>new Bu({typeName:Ce.ZodSymbol,...it(e)});var ac=class extends nt{_parse(t){if(this._getType(t)!==xe.undefined){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.undefined,received:i.parsedType}),Ve}return Si(t.data)}};ac.create=e=>new ac({typeName:Ce.ZodUndefined,...it(e)});var oc=class extends nt{_parse(t){if(this._getType(t)!==xe.null){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.null,received:i.parsedType}),Ve}return Si(t.data)}};oc.create=e=>new oc({typeName:Ce.ZodNull,...it(e)});var uo=class extends nt{constructor(){super(...arguments),this._any=!0}_parse(t){return Si(t.data)}};uo.create=e=>new uo({typeName:Ce.ZodAny,...it(e)});var la=class extends nt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Si(t.data)}};la.create=e=>new la({typeName:Ce.ZodUnknown,...it(e)});var Zn=class extends nt{_parse(t){let r=this._getOrReturnCtx(t);return we(r,{code:le.invalid_type,expected:xe.never,received:r.parsedType}),Ve}};Zn.create=e=>new Zn({typeName:Ce.ZodNever,...it(e)});var Mu=class extends nt{_parse(t){if(this._getType(t)!==xe.undefined){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.void,received:i.parsedType}),Ve}return Si(t.data)}};Mu.create=e=>new Mu({typeName:Ce.ZodVoid,...it(e)});var pa=class e extends nt{_parse(t){let{ctx:r,status:i}=this._processInputParams(t),n=this._def;if(r.parsedType!==xe.array)return we(r,{code:le.invalid_type,expected:xe.array,received:r.parsedType}),Ve;if(n.exactLength!==null){let u=r.data.length>n.exactLength.value,h=r.data.length<n.exactLength.value;(u||h)&&(we(r,{code:u?le.too_big:le.too_small,minimum:h?n.exactLength.value:void 0,maximum:u?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(we(r,{code:le.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(we(r,{code:le.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((u,h)=>n.type._parseAsync(new Rn(r,u,r.path,h)))).then(u=>di.mergeArray(i,u));let a=[...r.data].map((u,h)=>n.type._parseSync(new Rn(r,u,r.path,h)));return di.mergeArray(i,a)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:ke.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:ke.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:ke.toString(r)}})}nonempty(t){return this.min(1,t)}};pa.create=(e,t)=>new pa({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ce.ZodArray,...it(t)});function Pu(e){if(e instanceof Hi){let t={};for(let r in e.shape){let i=e.shape[r];t[r]=Yn.create(Pu(i))}return new Hi({...e._def,shape:()=>t})}else return e instanceof pa?new pa({...e._def,type:Pu(e.element)}):e instanceof Yn?Yn.create(Pu(e.unwrap())):e instanceof ha?ha.create(Pu(e.unwrap())):e instanceof ws?ws.create(e.items.map(t=>Pu(t))):e}var Hi=class e extends nt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=Et.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==xe.object){let w=this._getOrReturnCtx(t);return we(w,{code:le.invalid_type,expected:xe.object,received:w.parsedType}),Ve}let{status:i,ctx:n}=this._processInputParams(t),{shape:a,keys:u}=this._getCached(),h=[];if(!(this._def.catchall instanceof Zn&&this._def.unknownKeys==="strip"))for(let w in n.data)u.includes(w)||h.push(w);let b=[];for(let w of u){let T=a[w],I=n.data[w];b.push({key:{status:"valid",value:w},value:T._parse(new Rn(n,I,n.path,w)),alwaysSet:w in n.data})}if(this._def.catchall instanceof Zn){let w=this._def.unknownKeys;if(w==="passthrough")for(let T of h)b.push({key:{status:"valid",value:T},value:{status:"valid",value:n.data[T]}});else if(w==="strict")h.length>0&&(we(n,{code:le.unrecognized_keys,keys:h}),i.dirty());else if(w!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let w=this._def.catchall;for(let T of h){let I=n.data[T];b.push({key:{status:"valid",value:T},value:w._parse(new Rn(n,I,n.path,T)),alwaysSet:T in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let w=[];for(let T of b){let I=await T.key;w.push({key:I,value:await T.value,alwaysSet:T.alwaysSet})}return w}).then(w=>di.mergeObjectSync(i,w)):di.mergeObjectSync(i,b)}get shape(){return this._def.shape()}strict(t){return ke.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,i)=>{var n,a,u,h;let b=(u=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,r,i).message)!==null&&u!==void 0?u:i.defaultError;return r.code==="unrecognized_keys"?{message:(h=ke.errToObj(t).message)!==null&&h!==void 0?h:b}:{message:b}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ce.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};return Et.objectKeys(t).forEach(i=>{t[i]&&this.shape[i]&&(r[i]=this.shape[i])}),new e({...this._def,shape:()=>r})}omit(t){let r={};return Et.objectKeys(this.shape).forEach(i=>{t[i]||(r[i]=this.shape[i])}),new e({...this._def,shape:()=>r})}deepPartial(){return Pu(this)}partial(t){let r={};return Et.objectKeys(this.shape).forEach(i=>{let n=this.shape[i];t&&!t[i]?r[i]=n:r[i]=n.optional()}),new e({...this._def,shape:()=>r})}required(t){let r={};return Et.objectKeys(this.shape).forEach(i=>{if(t&&!t[i])r[i]=this.shape[i];else{let a=this.shape[i];for(;a instanceof Yn;)a=a._def.innerType;r[i]=a}}),new e({...this._def,shape:()=>r})}keyof(){return u4(Et.objectKeys(this.shape))}};Hi.create=(e,t)=>new Hi({shape:()=>e,unknownKeys:"strip",catchall:Zn.create(),typeName:Ce.ZodObject,...it(t)});Hi.strictCreate=(e,t)=>new Hi({shape:()=>e,unknownKeys:"strict",catchall:Zn.create(),typeName:Ce.ZodObject,...it(t)});Hi.lazycreate=(e,t)=>new Hi({shape:e,unknownKeys:"strip",catchall:Zn.create(),typeName:Ce.ZodObject,...it(t)});var cc=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i=this._def.options;function n(a){for(let h of a)if(h.result.status==="valid")return h.result;for(let h of a)if(h.result.status==="dirty")return r.common.issues.push(...h.ctx.common.issues),h.result;let u=a.map(h=>new tn(h.ctx.common.issues));return we(r,{code:le.invalid_union,unionErrors:u}),Ve}if(r.common.async)return Promise.all(i.map(async a=>{let u={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:u}),ctx:u}})).then(n);{let a,u=[];for(let b of i){let w={...r,common:{...r.common,issues:[]},parent:null},T=b._parseSync({data:r.data,path:r.path,parent:w});if(T.status==="valid")return T;T.status==="dirty"&&!a&&(a={result:T,ctx:w}),w.common.issues.length&&u.push(w.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let h=u.map(b=>new tn(b));return we(r,{code:le.invalid_union,unionErrors:h}),Ve}}get options(){return this._def.options}};cc.create=(e,t)=>new cc({options:e,typeName:Ce.ZodUnion,...it(t)});var hd=e=>e instanceof fc?hd(e.schema):e instanceof rn?hd(e.innerType()):e instanceof lc?[e.value]:e instanceof pc?e.options:e instanceof hc?Object.keys(e.enum):e instanceof dc?hd(e._def.innerType):e instanceof ac?[void 0]:e instanceof oc?[null]:null,gd=class e extends nt{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.object)return we(r,{code:le.invalid_type,expected:xe.object,received:r.parsedType}),Ve;let i=this.discriminator,n=r.data[i],a=this.optionsMap.get(n);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(we(r,{code:le.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),Ve)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,i){let n=new Map;for(let a of r){let u=hd(a.shape[t]);if(!u)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let h of u){if(n.has(h))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(h)}`);n.set(h,a)}}return new e({typeName:Ce.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...it(i)})}};function wb(e,t){let r=oo(e),i=oo(t);if(e===t)return{valid:!0,data:e};if(r===xe.object&&i===xe.object){let n=Et.objectKeys(t),a=Et.objectKeys(e).filter(h=>n.indexOf(h)!==-1),u={...e,...t};for(let h of a){let b=wb(e[h],t[h]);if(!b.valid)return{valid:!1};u[h]=b.data}return{valid:!0,data:u}}else if(r===xe.array&&i===xe.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let a=0;a<e.length;a++){let u=e[a],h=t[a],b=wb(u,h);if(!b.valid)return{valid:!1};n.push(b.data)}return{valid:!0,data:n}}else return r===xe.date&&i===xe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var uc=class extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t),n=(a,u)=>{if(_b(a)||_b(u))return Ve;let h=wb(a.value,u.value);return h.valid?((yb(a)||yb(u))&&r.dirty(),{status:r.value,value:h.data}):(we(i,{code:le.invalid_intersection_types}),Ve)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([a,u])=>n(a,u)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};uc.create=(e,t,r)=>new uc({left:e,right:t,typeName:Ce.ZodIntersection,...it(r)});var ws=class e extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==xe.array)return we(i,{code:le.invalid_type,expected:xe.array,received:i.parsedType}),Ve;if(i.data.length<this._def.items.length)return we(i,{code:le.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ve;!this._def.rest&&i.data.length>this._def.items.length&&(we(i,{code:le.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...i.data].map((u,h)=>{let b=this._def.items[h]||this._def.rest;return b?b._parse(new Rn(i,u,i.path,h)):null}).filter(u=>!!u);return i.common.async?Promise.all(a).then(u=>di.mergeArray(r,u)):di.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};ws.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ws({items:e,typeName:Ce.ZodTuple,rest:null,...it(t)})};var bd=class e extends nt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==xe.object)return we(i,{code:le.invalid_type,expected:xe.object,received:i.parsedType}),Ve;let n=[],a=this._def.keyType,u=this._def.valueType;for(let h in i.data)n.push({key:a._parse(new Rn(i,h,i.path,h)),value:u._parse(new Rn(i,i.data[h],i.path,h))});return i.common.async?di.mergeObjectAsync(r,n):di.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,i){return r instanceof nt?new e({keyType:t,valueType:r,typeName:Ce.ZodRecord,...it(i)}):new e({keyType:co.create(),valueType:t,typeName:Ce.ZodRecord,...it(r)})}},Cu=class extends nt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==xe.map)return we(i,{code:le.invalid_type,expected:xe.map,received:i.parsedType}),Ve;let n=this._def.keyType,a=this._def.valueType,u=[...i.data.entries()].map(([h,b],w)=>({key:n._parse(new Rn(i,h,i.path,[w,"key"])),value:a._parse(new Rn(i,b,i.path,[w,"value"]))}));if(i.common.async){let h=new Map;return Promise.resolve().then(async()=>{for(let b of u){let w=await b.key,T=await b.value;if(w.status==="aborted"||T.status==="aborted")return Ve;(w.status==="dirty"||T.status==="dirty")&&r.dirty(),h.set(w.value,T.value)}return{status:r.value,value:h}})}else{let h=new Map;for(let b of u){let w=b.key,T=b.value;if(w.status==="aborted"||T.status==="aborted")return Ve;(w.status==="dirty"||T.status==="dirty")&&r.dirty(),h.set(w.value,T.value)}return{status:r.value,value:h}}}};Cu.create=(e,t,r)=>new Cu({valueType:t,keyType:e,typeName:Ce.ZodMap,...it(r)});var Lu=class e extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==xe.set)return we(i,{code:le.invalid_type,expected:xe.set,received:i.parsedType}),Ve;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&(we(i,{code:le.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&(we(i,{code:le.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let a=this._def.valueType;function u(b){let w=new Set;for(let T of b){if(T.status==="aborted")return Ve;T.status==="dirty"&&r.dirty(),w.add(T.value)}return{status:r.value,value:w}}let h=[...i.data.values()].map((b,w)=>a._parse(new Rn(i,b,i.path,w)));return i.common.async?Promise.all(h).then(b=>u(b)):u(h)}min(t,r){return new e({...this._def,minSize:{value:t,message:ke.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:ke.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Lu.create=(e,t)=>new Lu({valueType:e,minSize:null,maxSize:null,typeName:Ce.ZodSet,...it(t)});var xd=class e extends nt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.function)return we(r,{code:le.invalid_type,expected:xe.function,received:r.parsedType}),Ve;function i(h,b){return md({data:h,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,dd(),El].filter(w=>!!w),issueData:{code:le.invalid_arguments,argumentsError:b}})}function n(h,b){return md({data:h,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,dd(),El].filter(w=>!!w),issueData:{code:le.invalid_return_type,returnTypeError:b}})}let a={errorMap:r.common.contextualErrorMap},u=r.data;if(this._def.returns instanceof fo){let h=this;return Si(async function(...b){let w=new tn([]),T=await h._def.args.parseAsync(b,a).catch(M=>{throw w.addIssue(i(b,M)),w}),I=await Reflect.apply(u,this,T);return await h._def.returns._def.type.parseAsync(I,a).catch(M=>{throw w.addIssue(n(I,M)),w})})}else{let h=this;return Si(function(...b){let w=h._def.args.safeParse(b,a);if(!w.success)throw new tn([i(b,w.error)]);let T=Reflect.apply(u,this,w.data),I=h._def.returns.safeParse(T,a);if(!I.success)throw new tn([n(T,I.error)]);return I.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ws.create(t).rest(la.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,i){return new e({args:t||ws.create([]).rest(la.create()),returns:r||la.create(),typeName:Ce.ZodFunction,...it(i)})}},fc=class extends nt{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};fc.create=(e,t)=>new fc({getter:e,typeName:Ce.ZodLazy,...it(t)});var lc=class extends nt{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return we(r,{received:r.data,code:le.invalid_literal,expected:this._def.value}),Ve}return{status:"valid",value:t.data}}get value(){return this._def.value}};lc.create=(e,t)=>new lc({value:e,typeName:Ce.ZodLiteral,...it(t)});function u4(e,t){return new pc({values:e,typeName:Ce.ZodEnum,...it(t)})}var pc=class e extends nt{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),i=this._def.values;return we(r,{expected:Et.joinValues(i),received:r.parsedType,code:le.invalid_type}),Ve}if(this._def.values.indexOf(t.data)===-1){let r=this._getOrReturnCtx(t),i=this._def.values;return we(r,{received:r.data,code:le.invalid_enum_value,options:i}),Ve}return Si(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t){return e.create(t)}exclude(t){return e.create(this.options.filter(r=>!t.includes(r)))}};pc.create=u4;var hc=class extends nt{_parse(t){let r=Et.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==xe.string&&i.parsedType!==xe.number){let n=Et.objectValues(r);return we(i,{expected:Et.joinValues(n),received:i.parsedType,code:le.invalid_type}),Ve}if(r.indexOf(t.data)===-1){let n=Et.objectValues(r);return we(i,{received:i.data,code:le.invalid_enum_value,options:n}),Ve}return Si(t.data)}get enum(){return this._def.values}};hc.create=(e,t)=>new hc({values:e,typeName:Ce.ZodNativeEnum,...it(t)});var fo=class extends nt{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.promise&&r.common.async===!1)return we(r,{code:le.invalid_type,expected:xe.promise,received:r.parsedType}),Ve;let i=r.parsedType===xe.promise?r.data:Promise.resolve(r.data);return Si(i.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};fo.create=(e,t)=>new fo({type:e,typeName:Ce.ZodPromise,...it(t)});var rn=class extends nt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:i}=this._processInputParams(t),n=this._def.effect||null,a={addIssue:u=>{we(i,u),u.fatal?r.abort():r.dirty()},get path(){return i.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let u=n.transform(i.data,a);return i.common.issues.length?{status:"dirty",value:i.data}:i.common.async?Promise.resolve(u).then(h=>this._def.schema._parseAsync({data:h,path:i.path,parent:i})):this._def.schema._parseSync({data:u,path:i.path,parent:i})}if(n.type==="refinement"){let u=h=>{let b=n.refinement(h,a);if(i.common.async)return Promise.resolve(b);if(b instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h};if(i.common.async===!1){let h=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return h.status==="aborted"?Ve:(h.status==="dirty"&&r.dirty(),u(h.value),{status:r.value,value:h.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(h=>h.status==="aborted"?Ve:(h.status==="dirty"&&r.dirty(),u(h.value).then(()=>({status:r.value,value:h.value}))))}if(n.type==="transform")if(i.common.async===!1){let u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Tl(u))return u;let h=n.transform(u.value,a);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:h}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(u=>Tl(u)?Promise.resolve(n.transform(u.value,a)).then(h=>({status:r.value,value:h})):u);Et.assertNever(n)}};rn.create=(e,t,r)=>new rn({schema:e,typeName:Ce.ZodEffects,effect:t,...it(r)});rn.createWithPreprocess=(e,t,r)=>new rn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ce.ZodEffects,...it(r)});var Yn=class extends nt{_parse(t){return this._getType(t)===xe.undefined?Si(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Yn.create=(e,t)=>new Yn({innerType:e,typeName:Ce.ZodOptional,...it(t)});var ha=class extends nt{_parse(t){return this._getType(t)===xe.null?Si(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ha.create=(e,t)=>new ha({innerType:e,typeName:Ce.ZodNullable,...it(t)});var dc=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i=r.data;return r.parsedType===xe.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};dc.create=(e,t)=>new dc({innerType:e,typeName:Ce.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...it(t)});var Du=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return vd(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new tn(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new tn(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};Du.create=(e,t)=>new Du({innerType:e,typeName:Ce.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...it(t)});var Uu=class extends nt{_parse(t){if(this._getType(t)!==xe.nan){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.nan,received:i.parsedType}),Ve}return{status:"valid",value:t.data}}};Uu.create=e=>new Uu({typeName:Ce.ZodNaN,...it(e)});var UU=Symbol("zod_brand"),_d=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}},Il=class e extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?Ve:a.status==="dirty"?(r.dirty(),c4(a.value)):this._def.out._parseAsync({data:a.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?Ve:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(t,r){return new e({in:t,out:r,typeName:Ce.ZodPipeline})}},qu=class extends nt{_parse(t){let r=this._def.innerType._parse(t);return Tl(r)&&(r.value=Object.freeze(r.value)),r}};qu.create=(e,t)=>new qu({innerType:e,typeName:Ce.ZodReadonly,...it(t)});var f4=(e,t={},r)=>e?uo.create().superRefine((i,n)=>{var a,u;if(!e(i)){let h=typeof t=="function"?t(i):typeof t=="string"?{message:t}:t,b=(u=(a=h.fatal)!==null&&a!==void 0?a:r)!==null&&u!==void 0?u:!0,w=typeof h=="string"?{message:h}:h;n.addIssue({code:"custom",...w,fatal:b})}}):uo.create(),qU={object:Hi.lazycreate},Ce;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ce||(Ce={}));var FU=(e,t={message:`Input not instance of ${e.name}`})=>f4(r=>r instanceof e,t),l4=co.create,p4=rc.create,HU=Uu.create,zU=ic.create,h4=nc.create,jU=sc.create,VU=Bu.create,KU=ac.create,WU=oc.create,GU=uo.create,$U=la.create,XU=Zn.create,YU=Mu.create,ZU=pa.create,JU=Hi.create,QU=Hi.strictCreate,eq=cc.create,tq=gd.create,rq=uc.create,iq=ws.create,nq=bd.create,sq=Cu.create,aq=Lu.create,oq=xd.create,cq=fc.create,uq=lc.create,fq=pc.create,lq=hc.create,pq=fo.create,a4=rn.create,hq=Yn.create,dq=ha.create,mq=rn.createWithPreprocess,vq=Il.create,gq=()=>l4().optional(),bq=()=>p4().optional(),xq=()=>h4().optional(),_q={string:e=>co.create({...e,coerce:!0}),number:e=>rc.create({...e,coerce:!0}),boolean:e=>nc.create({...e,coerce:!0}),bigint:e=>ic.create({...e,coerce:!0}),date:e=>sc.create({...e,coerce:!0})},yq=Ve,Jn=Object.freeze({__proto__:null,defaultErrorMap:El,setErrorMap:TU,getErrorMap:dd,makeIssue:md,EMPTY_PATH:IU,addIssueToContext:we,ParseStatus:di,INVALID:Ve,DIRTY:c4,OK:Si,isAborted:_b,isDirty:yb,isValid:Tl,isAsync:vd,get util(){return Et},get objectUtil(){return xb},ZodParsedType:xe,getParsedType:oo,ZodType:nt,ZodString:co,ZodNumber:rc,ZodBigInt:ic,ZodBoolean:nc,ZodDate:sc,ZodSymbol:Bu,ZodUndefined:ac,ZodNull:oc,ZodAny:uo,ZodUnknown:la,ZodNever:Zn,ZodVoid:Mu,ZodArray:pa,ZodObject:Hi,ZodUnion:cc,ZodDiscriminatedUnion:gd,ZodIntersection:uc,ZodTuple:ws,ZodRecord:bd,ZodMap:Cu,ZodSet:Lu,ZodFunction:xd,ZodLazy:fc,ZodLiteral:lc,ZodEnum:pc,ZodNativeEnum:hc,ZodPromise:fo,ZodEffects:rn,ZodTransformer:rn,ZodOptional:Yn,ZodNullable:ha,ZodDefault:dc,ZodCatch:Du,ZodNaN:Uu,BRAND:UU,ZodBranded:_d,ZodPipeline:Il,ZodReadonly:qu,custom:f4,Schema:nt,ZodSchema:nt,late:qU,get ZodFirstPartyTypeKind(){return Ce},coerce:_q,any:GU,array:ZU,bigint:zU,boolean:h4,date:jU,discriminatedUnion:tq,effect:a4,enum:fq,function:oq,instanceof:FU,intersection:rq,lazy:cq,literal:uq,map:sq,nan:HU,nativeEnum:lq,never:XU,null:WU,nullable:dq,number:p4,object:JU,oboolean:xq,onumber:bq,optional:hq,ostring:gq,pipeline:vq,preprocess:mq,promise:pq,record:nq,set:aq,strictObject:QU,string:l4,symbol:VU,transformer:a4,tuple:iq,undefined:KU,union:eq,unknown:$U,void:YU,NEVER:yq,ZodIssueCode:le,quotelessJson:EU,ZodError:tn});var Sq=e=>e.message?e.message:"unspecified error",da=class extends $r{constructor(t){super(),this.code=1100,this.errors=t,super.message=`Web3 validator found ${t.length} error[s]:
37
37
  ${this._compileErrors().join(`
38
- `)}`}_compileErrors(){return this.errors.map(TP)}};var Hn={};Oa(Hn,{abiSchemaToJsonSchema:()=>gh,codePointToInt:()=>uw,ensureIfUint8Array:()=>Sv,ethAbiToJsonSchema:()=>_v,fetchArrayElement:()=>yv,hexToNumber:()=>bh,hexToUint8Array:()=>xh,numberToHex:()=>wv,padLeft:()=>fw,parseBaseType:()=>fs,transformJsonDataToAbiFormat:()=>vh,uint8ArrayToHexString:()=>Ff});var aw=["bool","int","uint","bytes","string","address","tuple"];var bv=e=>typeof e=="object"&&"type"in e&&"name"in e;var ow=e=>typeof e=="string",hr=e=>typeof e=="string"&&/^((-)?0x[0-9a-f]+|(0x))$/i.test(e);var mh=e=>typeof e=="number"||typeof e=="bigint"||typeof e=="string"&&/^((-0x|0x|-)?[0-9a-f]+|(0x))$/i.test(e);var IP=["hex","number","blockNumber","blockNumberOrTag","filter","bloom"],fs=e=>{let t=e.replace(/ /,""),r,i=!1,n=[];if(e.includes("[")&&(t=t.slice(0,t.indexOf("[")),n=[...e.matchAll(/(?:\[(\d*)\])/g)].map(a=>parseInt(a[1],10)).map(a=>Number.isNaN(a)?-1:a),i=n.length>0),aw.includes(t))return{baseType:t,isArray:i,baseTypeSize:r,arraySizes:n};if(t.startsWith("int"))r=parseInt(t.substring(3),10),t="int";else if(t.startsWith("uint"))r=parseInt(e.substring(4),10),t="uint";else if(t.startsWith("bytes"))r=parseInt(t.substring(5),10),t="bytes";else return{baseType:void 0,isArray:!1,baseTypeSize:void 0,arraySizes:n};return{baseType:t,isArray:i,baseTypeSize:r,arraySizes:n}},xv=(e,t={})=>{if(Object.keys(t).includes("type"))throw new ea([{keyword:"eth",message:'Either "eth" or "type" can be presented in schema',params:{eth:e},instancePath:"",schemaPath:""}]);let{baseType:i,baseTypeSize:n}=fs(e);if(!i&&!IP.includes(e))throw new ea([{keyword:"eth",message:`Eth data type "${e}" is not valid`,params:{eth:e},instancePath:"",schemaPath:""}]);if(i){if(i==="tuple")throw new Error('"tuple" type is not implemented directly.');return{format:`${i}${n??""}`,required:!0}}return e?{format:e,required:!0}:{}},gh=(e,t="/0")=>{let r={type:"array",items:[],maxItems:e.length,minItems:e.length};for(let[i,n]of e.entries()){let a,u,h=[];bv(n)?(a=n.type,u=n.name,h=n.components):typeof n=="string"?(a=n,u=`${t}/${i}`):Array.isArray(n)&&(n[0]&&typeof n[0]=="string"&&n[0].startsWith("tuple")&&!Array.isArray(n[0])&&n[1]&&Array.isArray(n[1])?(a=n[0],u=`${t}/${i}`,h=n[1]):(a="tuple",u=`${t}/${i}`,h=n));let{baseType:b,isArray:w,arraySizes:T}=fs(a),I,B=r;for(let M=T.length-1;M>0;M-=1)I={type:"array",items:[],maxItems:T[M],minItems:T[M]},T[M]<0&&(delete I.maxItems,delete I.minItems),Array.isArray(B.items)?B.items.length===0?B.items=I:B.items.push(I):B.items=[B.items,I],B=I;if(b==="tuple"&&!w){let M=gh(h,u);M.$id=u,B.items.push(M)}else if(b==="tuple"&&w){let M=T[0],P={$id:u,type:"array",items:gh(h,u),maxItems:M,minItems:M};M<0&&(delete P.maxItems,delete P.minItems),B.items.push(P)}else if(w){let M=T[0],P={type:"array",$id:u,items:xv(String(b)),minItems:M,maxItems:M};M<0&&(delete P.maxItems,delete P.minItems),B.items.push(P)}else Array.isArray(B.items)?B.items.push(Object.assign({$id:u},xv(a))):B.items.items.push(Object.assign({$id:u},xv(a)));B=r}return r},_v=e=>gh(e),yv=(e,t)=>t===1?e:yv(e[0],t-1),vh=(e,t,r)=>{let i=[];for(let[n,a]of e.entries()){let u,h,b=[];bv(a)?(u=a.type,h=a.name,b=a.components):typeof a=="string"?u=a:Array.isArray(a)&&(a[1]&&Array.isArray(a[1])?(u=a[0],b=a[1]):(u="tuple",b=a));let{baseType:w,isArray:T,arraySizes:I}=fs(u),B=Array.isArray(t)?t[n]:t[h];if(w==="tuple"&&!T)i.push(vh(b,B,r));else if(w==="tuple"&&T){let M=[];for(let P of B)if(I.length>1){let L=yv(P,I.length-1),X=[];for(let V of L)X.push(vh(b,V,r));M.push(X)}else M.push(vh(b,P,r));i.push(M)}else i.push(B)}return r=r??[],r.push(...i),r},uw=e=>{if(e>=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error(`Invalid code point: ${e}`)},bh=e=>{if(!hr(e))throw new Error("Invalid hex string");let[t,r]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e],i=BigInt(r);return i>Number.MAX_SAFE_INTEGER?t?-i:i:i<Number.MIN_SAFE_INTEGER?i:t?-1*Number(i):Number(i)},wv=e=>{if((typeof e=="number"||typeof e=="bigint")&&e<0)return`-0x${e.toString(16).slice(1)}`;if((typeof e=="number"||typeof e=="bigint")&&e>=0)return`0x${e.toString(16)}`;if(typeof e=="string"&&hr(e)){let[t,r]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e],i=r.split(/^(-)?0(x|X)/).slice(-1)[0];return`${t?"-":""}0x${i.replace(/^0+/,"").toLowerCase()}`}if(typeof e=="string"&&!hr(e))return wv(BigInt(e));throw new Ef(e)},fw=(e,t,r="0")=>{if(typeof e=="string"&&!hr(e))return e.padStart(t,r);let i=typeof e=="string"&&hr(e)?e:wv(e),[n,a]=i.startsWith("-")?["-0x",i.slice(3)]:["0x",i.slice(2)];return`${n}${a.padStart(t,r)}`};function Ff(e){let t="0x";for(let r of e){let i=r.toString(16);t+=i.length===1?`0${i}`:i}return t}var ta={zero:48,nine:57,A:65,F:70,a:97,f:102};function cw(e){if(e>=ta.zero&&e<=ta.nine)return e-ta.zero;if(e>=ta.A&&e<=ta.F)return e-(ta.A-10);if(e>=ta.a&&e<=ta.f)return e-(ta.a-10)}function xh(e){let t=0;if(e.startsWith("0")&&(e[1]==="x"||e[1]==="X")&&(t=2),e.length%2!==0)throw new Ca(`hex string has odd length: ${e}`);let r=(e.length-t)/2,i=new Uint8Array(r);for(let n=0,a=t;n<r;n+=1){let u=cw(e.charCodeAt(a++)),h=cw(e.charCodeAt(a++));if(u===void 0||h===void 0)throw new Ca(`Invalid byte sequence ("${e[a-2]}${e[a-1]}" in "${e}").`);i[n]=u*16+h}return i}function Sv(e){var t;return!(e instanceof Uint8Array)&&((t=e?.constructor)===null||t===void 0?void 0:t.name)==="Uint8Array"?Uint8Array.from(e):e}var _h=e=>{var t;return e instanceof Uint8Array||((t=e?.constructor)===null||t===void 0?void 0:t.name)==="Uint8Array"},Ev=(e,t={abiType:"bytes"})=>{if(typeof e!="string"&&!Array.isArray(e)&&!_h(e)||typeof e=="string"&&hr(e)&&e.startsWith("-")||typeof e=="string"&&!hr(e))return!1;let r;if(typeof e=="string"){if(e.length%2!==0)return!1;r=xh(e)}else if(Array.isArray(e)){if(e.some(i=>i<0||i>255||!Number.isInteger(i)))return!1;r=new Uint8Array(e)}else r=e;if(t?.abiType){let{baseTypeSize:i}=fs(t.abiType);return i?r.length===i:!0}return t?.size?r.length===t?.size:!0};var lw=e=>{if(!/^(0x)?[0-9a-f]{40}$/i.test(e))return!1;let t=e.slice(2),r=zc(t.toLowerCase()),i=Ff(Sf(Sv(r))).slice(2);for(let n=0;n<40;n+=1)if(parseInt(i[n],16)>7&&t[n].toUpperCase()!==t[n]||parseInt(i[n],16)<=7&&t[n].toLowerCase()!==t[n])return!1;return!0},ls=(e,t=!0)=>{if(typeof e!="string"&&!_h(e))return!1;let r;return _h(e)?r=Ff(e):typeof e=="string"&&!hr(e)?r=e.toLowerCase().startsWith("0x")?e:`0x${e}`:r=e,/^(0x)?[0-9a-f]{40}$/i.test(r)?/^(0x|0X)?[0-9a-f]{40}$/.test(r)||/^(0x|0X)?[0-9A-F]{40}$/.test(r)?!0:t?lw(r):!0:!1};var Hf;(function(e){e.NUMBER="NUMBER_NUMBER",e.HEX="NUMBER_HEX",e.STR="NUMBER_STR",e.BIGINT="NUMBER_BIGINT"})(Hf||(Hf={}));var zf;(function(e){e.HEX="BYTES_HEX",e.UINT8ARRAY="BYTES_UINT8ARRAY"})(zf||(zf={}));var H$={number:Hf.BIGINT,bytes:zf.HEX},z$={number:Hf.HEX,bytes:zf.HEX};var jf;(function(e){e.EARLIEST="earliest",e.LATEST="latest",e.PENDING="pending",e.SAFE="safe",e.FINALIZED="finalized"})(jf||(jf={}));var pw;(function(e){e.chainstart="chainstart",e.frontier="frontier",e.homestead="homestead",e.dao="dao",e.tangerineWhistle="tangerineWhistle",e.spuriousDragon="spuriousDragon",e.byzantium="byzantium",e.constantinople="constantinople",e.petersburg="petersburg",e.istanbul="istanbul",e.muirGlacier="muirGlacier",e.berlin="berlin",e.london="london",e.altair="altair",e.arrowGlacier="arrowGlacier",e.grayGlacier="grayGlacier",e.bellatrix="bellatrix",e.merge="merge",e.capella="capella",e.shanghai="shanghai"})(pw||(pw={}));var hw=Object.getPrototypeOf(Uint8Array);var dw=function(e,t,r,i){function n(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function h(T){try{w(i.next(T))}catch(I){u(I)}}function b(T){try{w(i.throw(T))}catch(I){u(I)}}function w(T){T.done?a(T.value):n(T.value).then(h,b)}w((i=i.apply(e,t||[])).next())})},mw=Symbol.for("web3/base-provider"),Tv=class e{static isWeb3Provider(t){return t instanceof e||!!(t&&t[mw])}get[mw](){return!0}send(t,r){this.request(t).then(i=>{r(null,i)}).catch(i=>{r(i)})}sendAsync(t){return dw(this,void 0,void 0,function*(){return this.request(t)})}asEIP1193Provider(){let t=Object.create(this),r=t.request;return t.request=function(n){return dw(this,void 0,void 0,function*(){return(yield r(n)).result})},t.asEIP1193Provider=void 0,t}};var yh=(e,t)=>{let r=e;for(let i=1;i<t;i+=1)r*=e;return r},Fa=(e,t={abiType:"uint"})=>{if(!["number","string","bigint"].includes(typeof e)||typeof e=="string"&&e.length===0)return!1;let r;if(t?.abiType){let{baseTypeSize:n}=fs(t.abiType);n&&(r=n)}else t.bitSize&&(r=t.bitSize);let i=yh(BigInt(2),BigInt(r??256))-BigInt(1);try{let n=typeof e=="string"&&hr(e)?BigInt(bh(e)):BigInt(e);return n>=0&&n<=i}catch{return!1}},jo=(e,t={abiType:"int"})=>{if(!["number","string","bigint"].includes(typeof e)||typeof e=="number"&&e>Number.MAX_SAFE_INTEGER)return!1;let r;if(t?.abiType){let{baseTypeSize:a,baseType:u}=fs(t.abiType);if(u!=="int")return!1;a&&(r=a)}else t.bitSize&&(r=t.bitSize);let i=yh(BigInt(2),BigInt((r??256)-1)),n=BigInt(-1)*yh(BigInt(2),BigInt((r??256)-1));try{let a=typeof e=="string"&&hr(e)?BigInt(bh(e)):BigInt(e);return a>=n&&a<=i}catch{return!1}},vw=e=>!!(jo(e)||typeof e=="string"&&/[0-9.]/.test(e)&&e.indexOf(".")===e.lastIndexOf(".")||typeof e=="number");var Iv=e=>Fa(e),wh=e=>Object.values(jf).includes(e),Vf=e=>wh(e)||Iv(e);var Sh=e=>typeof e!="string"||!/^(0x)?[0-9a-f]{512}$/i.test(e)?!1:!!(/^(0x)?[0-9a-f]{512}$/.test(e)||/^(0x)?[0-9A-F]{512}$/.test(e));var gw=e=>["number","string","boolean"].includes(typeof e)?typeof e=="boolean"?!0:typeof e=="string"&&!hr(e)?e==="1"||e==="0":typeof e=="string"&&hr(e)?e==="0x1"||e==="0x0":e===1||e===0:!1;var Bi=e=>e==null;var Eh=e=>typeof e!="string"||!/^(0x)?[0-9a-f]{64}$/i.test(e)?!1:!!(/^(0x)?[0-9a-f]{64}$/.test(e)||/^(0x)?[0-9A-F]{64}$/.test(e));var bw=e=>{let t=["fromBlock","toBlock","address","topics","blockHash"];if(Bi(e)||typeof e!="object"||!Object.keys(e).every(r=>t.includes(r))||!Bi(e.fromBlock)&&!Vf(e.fromBlock)||!Bi(e.toBlock)&&!Vf(e.toBlock))return!1;if(!Bi(e.address)){if(Array.isArray(e.address)){if(!e.address.every(r=>ls(r)))return!1}else if(!ls(e.address))return!1}return!(!Bi(e.topics)&&!e.topics.every(r=>Bi(r)?!0:Array.isArray(r)?r.every(i=>Eh(i)):!!Eh(r)))};var Zc={address:e=>ls(e),bloom:e=>Sh(e),blockNumber:e=>Iv(e),blockTag:e=>wh(e),blockNumberOrTag:e=>Vf(e),bool:e=>gw(e),bytes:e=>Ev(e),filter:e=>bw(e),hex:e=>hr(e),uint:e=>Fa(e),int:e=>jo(e),number:e=>vw(e),string:e=>ow(e)};for(let e=8;e<=256;e+=8)Zc[`int${e}`]=t=>jo(t,{bitSize:e}),Zc[`uint${e}`]=t=>Fa(t,{bitSize:e});for(let e=1;e<=32;e+=1)Zc[`bytes${e}`]=t=>Ev(t,{size:e});Zc.bytes256=Zc.bytes;var Rv=Zc;var Kf=e=>{if((!e?.type||e?.type==="object")&&e?.properties){let t={};for(let r of Object.keys(e.properties)){let i=Kf(e.properties[r]);i&&(t[r]=i)}return Array.isArray(e.required)?Fn.object(t).partial().required(e.required.reduce((r,i)=>Object.assign(Object.assign({},r),{[i]:!0}),{})):Fn.object(t).partial()}if(e?.type==="array"&&e?.items){if(Array.isArray(e.items)&&e.items.length>0){let t=[];for(let r of e.items){let i=Kf(r);i&&t.push(i)}return Fn.tuple(t)}return Fn.array(Kf(e.items))}if(e.oneOf&&Array.isArray(e.oneOf))return Fn.union(e.oneOf.map(t=>Kf(t)));if(e?.format){if(!Rv[e.format])throw new ah(e.format);return Fn.any().refine(Rv[e.format],t=>({params:{value:t,format:e.format}}))}return e?.type&&e?.type!=="object"&&typeof Fn[String(e.type)]=="function"?Fn[String(e.type)]():Fn.object({data:Fn.any()}).partial()},Th=class e{static factory(){return e.validatorInstance||(e.validatorInstance=new e),e.validatorInstance}validate(t,r,i){var n,a;let h=Kf(t).safeParse(r);if(!h.success){let b=this.convertErrors((a=(n=h.error)===null||n===void 0?void 0:n.issues)!==null&&a!==void 0?a:[]);if(b){if(i?.silent)return b;throw new ea(b)}}}convertErrors(t){if(t&&Array.isArray(t)&&t.length>0)return t.map(r=>{var i;let n,a,u,h;h=r.path.join("/");let b=String(r.path[r.path.length-1]),w=r.path.join("/");if(r.code===le.too_big)a="maxItems",h=`${w}/maxItems`,u={limit:r.maximum},n=`must NOT have more than ${r.maximum} items`;else if(r.code===le.too_small)a="minItems",h=`${w}/minItems`,u={limit:r.minimum},n=`must NOT have fewer than ${r.minimum} items`;else if(r.code===le.custom){let{value:T,format:I}=(i=r.params)!==null&&i!==void 0?i:{};typeof T>"u"?n=`value at "/${h}" is required`:n=`value "${typeof T=="object"?JSON.stringify(T):T}" at "/${h}" must pass "${I}" validation`,u={value:T}}return{keyword:a??b,instancePath:w?`/${w}`:"",schemaPath:h?`#${h}`:"#",params:u??{value:r.message},message:n??r.message}})}};var Ih=class{constructor(){this._validator=Th.factory()}validateJSONSchema(t,r,i){return this._validator.validate(t,r,i)}validate(t,r,i={silent:!1}){var n,a;let u=_v(t);if(!(Array.isArray(u.items)&&((n=u.items)===null||n===void 0?void 0:n.length)===0&&r.length===0)){if(Array.isArray(u.items)&&((a=u.items)===null||a===void 0?void 0:a.length)===0&&r.length!==0)throw new ea([{instancePath:"/0",schemaPath:"/",keyword:"required",message:"empty schema against data can not be validated",params:r}]);return this._validator.validate(u,r,i)}}};var Wf=new Ih;function Av(e){var t;return e instanceof Uint8Array||((t=e?.constructor)===null||t===void 0?void 0:t.name)==="Uint8Array"}var AY={noether:BigInt(0),wei:BigInt(1),kwei:BigInt(1e3),Kwei:BigInt(1e3),babbage:BigInt(1e3),femtoether:BigInt(1e3),mwei:BigInt(1e6),Mwei:BigInt(1e6),lovelace:BigInt(1e6),picoether:BigInt(1e6),gwei:BigInt(1e9),Gwei:BigInt(1e9),shannon:BigInt(1e9),nanoether:BigInt(1e9),nano:BigInt(1e9),szabo:BigInt(1e12),microether:BigInt(1e12),micro:BigInt(1e12),finney:BigInt(1e15),milliether:BigInt(1e15),milli:BigInt(1e15),ether:BigInt("1000000000000000000"),kether:BigInt("1000000000000000000000"),grand:BigInt("1000000000000000000000"),mether:BigInt("1000000000000000000000000"),gether:BigInt("1000000000000000000000000000"),tether:BigInt("1000000000000000000000000000000")},kv=e=>{if(Wf.validate(["bytes"],[e]),Av(e))return e;if(Array.isArray(e))return new Uint8Array(e);if(typeof e=="string")return Hn.hexToUint8Array(e);throw new Ca(e)},{uint8ArrayToHexString:kP}=Hn,Gf=e=>kP(kv(e));var Jc=(e,t)=>{typeof e!="bigint"&&Wf.validate(["int"],[e]);let r=Hn.numberToHex(e);return t&&(!r.startsWith("-")&&r.length%2===1?r="0x0".concat(r.slice(2)):r.length%2===0&&r.startsWith("-")&&(r="-0x0".concat(r.slice(3)))),r};var Ov=e=>{Wf.validate(["string"],[e]);let t=e.replace(/^(?:\u0000)/,"");return t=t.replace(/(?:\u0000)$/,""),Gf(new TextEncoder().encode(t))};var $f=(e,t)=>{if(typeof e=="string"&&ls(e))return t?"address":`0x${e.toLowerCase().replace(/^0x/i,"")}`;if(typeof e=="boolean")return t?"bool":e?"0x01":"0x00";if(typeof e=="number")return t?e<0?"int256":"uint256":Jc(e);if(typeof e=="bigint")return t?"bigint":Jc(e);if(typeof e=="object"&&e)return t?"string":Ov(JSON.stringify(e));if(typeof e=="string"){if(e.startsWith("-0x")||e.startsWith("-0X"))return t?"int256":Jc(e);if(hr(e))return t?"bytes":e;if(mh(e)&&!jo(e)&&!Fa(e))return t?"bytes":`0x${e}`;if(mh(e)&&!jo(e)&&Fa(e))return t?"uint":Jc(e);if(!Number.isFinite(e))return t?"string":Ov(e)}throw new sh(e)};var yw=Yr(_w(),1);var{parseBaseType:uZ}=Hn;var CP;CP=Symbol.toStringTag;var LP=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Pv=Math.ceil,xn=Math.floor,Mi="[BigNumber Error] ",Sw=Mi+"Number primitive has more than 15 significant digits: ",zn=1e14,tt=14,Bv=9007199254740991,Mv=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Ha=1e7,Zr=1e9;function Ew(e){var t,r,i,n=q.prototype={constructor:q,toString:null,valueOf:null},a=new q(1),u=20,h=4,b=-7,w=21,T=-1e7,I=1e7,B=!1,M=1,P=0,L={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},X="0123456789abcdefghijklmnopqrstuvwxyz",V=!0;function q(O,E){var f,c,p,v,g,x,S,_,l=this;if(!(l instanceof q))return new q(O,E);if(E==null){if(O&&O._isBigNumber===!0){l.s=O.s,!O.c||O.e>I?l.c=l.e=null:O.e<T?l.c=[l.e=0]:(l.e=O.e,l.c=O.c.slice());return}if((x=typeof O=="number")&&O*0==0){if(l.s=1/O<0?(O=-O,-1):1,O===~~O){for(v=0,g=O;g>=10;g/=10,v++);v>I?l.c=l.e=null:(l.e=v,l.c=[O]);return}_=String(O)}else{if(!LP.test(_=String(O)))return i(l,_,x);l.s=_.charCodeAt(0)==45?(_=_.slice(1),-1):1}(v=_.indexOf("."))>-1&&(_=_.replace(".","")),(g=_.search(/e/i))>0?(v<0&&(v=g),v+=+_.slice(g+1),_=_.substring(0,g)):v<0&&(v=_.length)}else{if(xr(E,2,X.length,"Base"),E==10&&V)return l=new q(O),Te(l,u+l.e+1,h);if(_=String(O),x=typeof O=="number"){if(O*0!=0)return i(l,_,x,E);if(l.s=1/O<0?(_=_.slice(1),-1):1,q.DEBUG&&_.replace(/^0\.0*|\./,"").length>15)throw Error(Sw+O)}else l.s=_.charCodeAt(0)===45?(_=_.slice(1),-1):1;for(f=X.slice(0,E),v=g=0,S=_.length;g<S;g++)if(f.indexOf(c=_.charAt(g))<0){if(c=="."){if(g>v){v=S;continue}}else if(!p&&(_==_.toUpperCase()&&(_=_.toLowerCase())||_==_.toLowerCase()&&(_=_.toUpperCase()))){p=!0,g=-1,v=0;continue}return i(l,String(O),x,E)}x=!1,_=r(_,E,10,l.s),(v=_.indexOf("."))>-1?_=_.replace(".",""):v=_.length}for(g=0;_.charCodeAt(g)===48;g++);for(S=_.length;_.charCodeAt(--S)===48;);if(_=_.slice(g,++S)){if(S-=g,x&&q.DEBUG&&S>15&&(O>Bv||O!==xn(O)))throw Error(Sw+l.s*O);if((v=v-g-1)>I)l.c=l.e=null;else if(v<T)l.c=[l.e=0];else{if(l.e=v,l.c=[],g=(v+1)%tt,v<0&&(g+=tt),g<S){for(g&&l.c.push(+_.slice(0,g)),S-=tt;g<S;)l.c.push(+_.slice(g,g+=tt));g=tt-(_=_.slice(g)).length}else g-=S;for(;g--;_+="0");l.c.push(+_)}}else l.c=[l.e=0]}q.clone=Ew,q.ROUND_UP=0,q.ROUND_DOWN=1,q.ROUND_CEIL=2,q.ROUND_FLOOR=3,q.ROUND_HALF_UP=4,q.ROUND_HALF_DOWN=5,q.ROUND_HALF_EVEN=6,q.ROUND_HALF_CEIL=7,q.ROUND_HALF_FLOOR=8,q.EUCLID=9,q.config=q.set=function(O){var E,f;if(O!=null)if(typeof O=="object"){if(O.hasOwnProperty(E="DECIMAL_PLACES")&&(f=O[E],xr(f,0,Zr,E),u=f),O.hasOwnProperty(E="ROUNDING_MODE")&&(f=O[E],xr(f,0,8,E),h=f),O.hasOwnProperty(E="EXPONENTIAL_AT")&&(f=O[E],f&&f.pop?(xr(f[0],-Zr,0,E),xr(f[1],0,Zr,E),b=f[0],w=f[1]):(xr(f,-Zr,Zr,E),b=-(w=f<0?-f:f))),O.hasOwnProperty(E="RANGE"))if(f=O[E],f&&f.pop)xr(f[0],-Zr,-1,E),xr(f[1],1,Zr,E),T=f[0],I=f[1];else if(xr(f,-Zr,Zr,E),f)T=-(I=f<0?-f:f);else throw Error(Mi+E+" cannot be zero: "+f);if(O.hasOwnProperty(E="CRYPTO"))if(f=O[E],f===!!f)if(f)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))B=f;else throw B=!f,Error(Mi+"crypto unavailable");else B=f;else throw Error(Mi+E+" not true or false: "+f);if(O.hasOwnProperty(E="MODULO_MODE")&&(f=O[E],xr(f,0,9,E),M=f),O.hasOwnProperty(E="POW_PRECISION")&&(f=O[E],xr(f,0,Zr,E),P=f),O.hasOwnProperty(E="FORMAT"))if(f=O[E],typeof f=="object")L=f;else throw Error(Mi+E+" not an object: "+f);if(O.hasOwnProperty(E="ALPHABET"))if(f=O[E],typeof f=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(f))V=f.slice(0,10)=="0123456789",X=f;else throw Error(Mi+E+" invalid: "+f)}else throw Error(Mi+"Object expected: "+O);return{DECIMAL_PLACES:u,ROUNDING_MODE:h,EXPONENTIAL_AT:[b,w],RANGE:[T,I],CRYPTO:B,MODULO_MODE:M,POW_PRECISION:P,FORMAT:L,ALPHABET:X}},q.isBigNumber=function(O){if(!O||O._isBigNumber!==!0)return!1;if(!q.DEBUG)return!0;var E,f,c=O.c,p=O.e,v=O.s;e:if({}.toString.call(c)=="[object Array]"){if((v===1||v===-1)&&p>=-Zr&&p<=Zr&&p===xn(p)){if(c[0]===0){if(p===0&&c.length===1)return!0;break e}if(E=(p+1)%tt,E<1&&(E+=tt),String(c[0]).length==E){for(E=0;E<c.length;E++)if(f=c[E],f<0||f>=zn||f!==xn(f))break e;if(f!==0)return!0}}}else if(c===null&&p===null&&(v===null||v===1||v===-1))return!0;throw Error(Mi+"Invalid BigNumber: "+O)},q.maximum=q.max=function(){return fe(arguments,-1)},q.minimum=q.min=function(){return fe(arguments,1)},q.random=function(){var O=9007199254740992,E=Math.random()*O&2097151?function(){return xn(Math.random()*O)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(f){var c,p,v,g,x,S=0,_=[],l=new q(a);if(f==null?f=u:xr(f,0,Zr),g=Pv(f/tt),B)if(crypto.getRandomValues){for(c=crypto.getRandomValues(new Uint32Array(g*=2));S<g;)x=c[S]*131072+(c[S+1]>>>11),x>=9e15?(p=crypto.getRandomValues(new Uint32Array(2)),c[S]=p[0],c[S+1]=p[1]):(_.push(x%1e14),S+=2);S=g/2}else if(crypto.randomBytes){for(c=crypto.randomBytes(g*=7);S<g;)x=(c[S]&31)*281474976710656+c[S+1]*1099511627776+c[S+2]*4294967296+c[S+3]*16777216+(c[S+4]<<16)+(c[S+5]<<8)+c[S+6],x>=9e15?crypto.randomBytes(7).copy(c,S):(_.push(x%1e14),S+=7);S=g/7}else throw B=!1,Error(Mi+"crypto unavailable");if(!B)for(;S<g;)x=E(),x<9e15&&(_[S++]=x%1e14);for(g=_[--S],f%=tt,g&&f&&(x=Mv[tt-f],_[S]=xn(g/x)*x);_[S]===0;_.pop(),S--);if(S<0)_=[v=0];else{for(v=-1;_[0]===0;_.splice(0,1),v-=tt);for(S=1,x=_[0];x>=10;x/=10,S++);S<tt&&(v-=tt-S)}return l.e=v,l.c=_,l}}(),q.sum=function(){for(var O=1,E=arguments,f=new q(E[0]);O<E.length;)f=f.plus(E[O++]);return f},r=function(){var O="0123456789";function E(f,c,p,v){for(var g,x=[0],S,_=0,l=f.length;_<l;){for(S=x.length;S--;x[S]*=c);for(x[0]+=v.indexOf(f.charAt(_++)),g=0;g<x.length;g++)x[g]>p-1&&(x[g+1]==null&&(x[g+1]=0),x[g+1]+=x[g]/p|0,x[g]%=p)}return x.reverse()}return function(f,c,p,v,g){var x,S,_,l,m,A,U,j,Z=f.indexOf("."),se=u,ae=h;for(Z>=0&&(l=P,P=0,f=f.replace(".",""),j=new q(c),A=j.pow(f.length-Z),P=l,j.c=E(ra(bn(A.c),A.e,"0"),10,p,O),j.e=j.c.length),U=E(f,c,p,g?(x=X,O):(x=O,X)),_=l=U.length;U[--l]==0;U.pop());if(!U[0])return x.charAt(0);if(Z<0?--_:(A.c=U,A.e=_,A.s=v,A=t(A,j,se,ae,p),U=A.c,m=A.r,_=A.e),S=_+se+1,Z=U[S],l=p/2,m=m||S<0||U[S+1]!=null,m=ae<4?(Z!=null||m)&&(ae==0||ae==(A.s<0?3:2)):Z>l||Z==l&&(ae==4||m||ae==6&&U[S-1]&1||ae==(A.s<0?8:7)),S<1||!U[0])f=m?ra(x.charAt(1),-se,x.charAt(0)):x.charAt(0);else{if(U.length=S,m)for(--p;++U[--S]>p;)U[S]=0,S||(++_,U=[1].concat(U));for(l=U.length;!U[--l];);for(Z=0,f="";Z<=l;f+=x.charAt(U[Z++]));f=ra(f,_,x.charAt(0))}return f}}(),t=function(){function O(c,p,v){var g,x,S,_,l=0,m=c.length,A=p%Ha,U=p/Ha|0;for(c=c.slice();m--;)S=c[m]%Ha,_=c[m]/Ha|0,g=U*S+_*A,x=A*S+g%Ha*Ha+l,l=(x/v|0)+(g/Ha|0)+U*_,c[m]=x%v;return l&&(c=[l].concat(c)),c}function E(c,p,v,g){var x,S;if(v!=g)S=v>g?1:-1;else for(x=S=0;x<v;x++)if(c[x]!=p[x]){S=c[x]>p[x]?1:-1;break}return S}function f(c,p,v,g){for(var x=0;v--;)c[v]-=x,x=c[v]<p[v]?1:0,c[v]=x*g+c[v]-p[v];for(;!c[0]&&c.length>1;c.splice(0,1));}return function(c,p,v,g,x){var S,_,l,m,A,U,j,Z,se,ae,he,Ee,me,dt,St,Oe,st,rt=c.s==p.s?1:-1,Re=c.c,Ae=p.c;if(!Re||!Re[0]||!Ae||!Ae[0])return new q(!c.s||!p.s||(Re?Ae&&Re[0]==Ae[0]:!Ae)?NaN:Re&&Re[0]==0||!Ae?rt*0:rt/0);for(Z=new q(rt),se=Z.c=[],_=c.e-p.e,rt=v+_+1,x||(x=zn,_=_n(c.e/tt)-_n(p.e/tt),rt=rt/tt|0),l=0;Ae[l]==(Re[l]||0);l++);if(Ae[l]>(Re[l]||0)&&_--,rt<0)se.push(1),m=!0;else{for(dt=Re.length,Oe=Ae.length,l=0,rt+=2,A=xn(x/(Ae[0]+1)),A>1&&(Ae=O(Ae,A,x),Re=O(Re,A,x),Oe=Ae.length,dt=Re.length),me=Oe,ae=Re.slice(0,Oe),he=ae.length;he<Oe;ae[he++]=0);st=Ae.slice(),st=[0].concat(st),St=Ae[0],Ae[1]>=x/2&&St++;do{if(A=0,S=E(Ae,ae,Oe,he),S<0){if(Ee=ae[0],Oe!=he&&(Ee=Ee*x+(ae[1]||0)),A=xn(Ee/St),A>1)for(A>=x&&(A=x-1),U=O(Ae,A,x),j=U.length,he=ae.length;E(U,ae,j,he)==1;)A--,f(U,Oe<j?st:Ae,j,x),j=U.length,S=1;else A==0&&(S=A=1),U=Ae.slice(),j=U.length;if(j<he&&(U=[0].concat(U)),f(ae,U,he,x),he=ae.length,S==-1)for(;E(Ae,ae,Oe,he)<1;)A++,f(ae,Oe<he?st:Ae,he,x),he=ae.length}else S===0&&(A++,ae=[0]);se[l++]=A,ae[0]?ae[he++]=Re[me]||0:(ae=[Re[me]],he=1)}while((me++<dt||ae[0]!=null)&&rt--);m=ae[0]!=null,se[0]||se.splice(0,1)}if(x==zn){for(l=1,rt=se[0];rt>=10;rt/=10,l++);Te(Z,v+(Z.e=l+_*tt-1)+1,g,m)}else Z.e=_,Z.r=+m;return Z}}();function ee(O,E,f,c){var p,v,g,x,S;if(f==null?f=h:xr(f,0,8),!O.c)return O.toString();if(p=O.c[0],g=O.e,E==null)S=bn(O.c),S=c==1||c==2&&(g<=b||g>=w)?Oh(S,g):ra(S,g,"0");else if(O=Te(new q(O),E,f),v=O.e,S=bn(O.c),x=S.length,c==1||c==2&&(E<=v||v<=b)){for(;x<E;S+="0",x++);S=Oh(S,v)}else if(E-=g,S=ra(S,v,"0"),v+1>x){if(--E>0)for(S+=".";E--;S+="0");}else if(E+=v-x,E>0)for(v+1==x&&(S+=".");E--;S+="0");return O.s<0&&p?"-"+S:S}function fe(O,E){for(var f,c,p=1,v=new q(O[0]);p<O.length;p++)c=new q(O[p]),(!c.s||(f=Vo(v,c))===E||f===0&&v.s===E)&&(v=c);return v}function _e(O,E,f){for(var c=1,p=E.length;!E[--p];E.pop());for(p=E[0];p>=10;p/=10,c++);return(f=c+f*tt-1)>I?O.c=O.e=null:f<T?O.c=[O.e=0]:(O.e=f,O.c=E),O}i=function(){var O=/^(-?)0([xbo])(?=\w[\w.]*$)/i,E=/^([^.]+)\.$/,f=/^\.([^.]+)$/,c=/^-?(Infinity|NaN)$/,p=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(v,g,x,S){var _,l=x?g:g.replace(p,"");if(c.test(l))v.s=isNaN(l)?null:l<0?-1:1;else{if(!x&&(l=l.replace(O,function(m,A,U){return _=(U=U.toLowerCase())=="x"?16:U=="b"?2:8,!S||S==_?A:m}),S&&(_=S,l=l.replace(E,"$1").replace(f,"0.$1")),g!=l))return new q(l,_);if(q.DEBUG)throw Error(Mi+"Not a"+(S?" base "+S:"")+" number: "+g);v.s=null}v.c=v.e=null}}();function Te(O,E,f,c){var p,v,g,x,S,_,l,m=O.c,A=Mv;if(m){e:{for(p=1,x=m[0];x>=10;x/=10,p++);if(v=E-p,v<0)v+=tt,g=E,S=m[_=0],l=xn(S/A[p-g-1]%10);else if(_=Pv((v+1)/tt),_>=m.length)if(c){for(;m.length<=_;m.push(0));S=l=0,p=1,v%=tt,g=v-tt+1}else break e;else{for(S=x=m[_],p=1;x>=10;x/=10,p++);v%=tt,g=v-tt+p,l=g<0?0:xn(S/A[p-g-1]%10)}if(c=c||E<0||m[_+1]!=null||(g<0?S:S%A[p-g-1]),c=f<4?(l||c)&&(f==0||f==(O.s<0?3:2)):l>5||l==5&&(f==4||c||f==6&&(v>0?g>0?S/A[p-g]:0:m[_-1])%10&1||f==(O.s<0?8:7)),E<1||!m[0])return m.length=0,c?(E-=O.e+1,m[0]=A[(tt-E%tt)%tt],O.e=-E||0):m[0]=O.e=0,O;if(v==0?(m.length=_,x=1,_--):(m.length=_+1,x=A[tt-v],m[_]=g>0?xn(S/A[p-g]%A[g])*x:0),c)for(;;)if(_==0){for(v=1,g=m[0];g>=10;g/=10,v++);for(g=m[0]+=x,x=1;g>=10;g/=10,x++);v!=x&&(O.e++,m[0]==zn&&(m[0]=1));break}else{if(m[_]+=x,m[_]!=zn)break;m[_--]=0,x=1}for(v=m.length;m[--v]===0;m.pop());}O.e>I?O.c=O.e=null:O.e<T&&(O.c=[O.e=0])}return O}function be(O){var E,f=O.e;return f===null?O.toString():(E=bn(O.c),E=f<=b||f>=w?Oh(E,f):ra(E,f,"0"),O.s<0?"-"+E:E)}return n.absoluteValue=n.abs=function(){var O=new q(this);return O.s<0&&(O.s=1),O},n.comparedTo=function(O,E){return Vo(this,new q(O,E))},n.decimalPlaces=n.dp=function(O,E){var f,c,p,v=this;if(O!=null)return xr(O,0,Zr),E==null?E=h:xr(E,0,8),Te(new q(v),O+v.e+1,E);if(!(f=v.c))return null;if(c=((p=f.length-1)-_n(this.e/tt))*tt,p=f[p])for(;p%10==0;p/=10,c--);return c<0&&(c=0),c},n.dividedBy=n.div=function(O,E){return t(this,new q(O,E),u,h)},n.dividedToIntegerBy=n.idiv=function(O,E){return t(this,new q(O,E),0,1)},n.exponentiatedBy=n.pow=function(O,E){var f,c,p,v,g,x,S,_,l,m=this;if(O=new q(O),O.c&&!O.isInteger())throw Error(Mi+"Exponent not an integer: "+be(O));if(E!=null&&(E=new q(E)),x=O.e>14,!m.c||!m.c[0]||m.c[0]==1&&!m.e&&m.c.length==1||!O.c||!O.c[0])return l=new q(Math.pow(+be(m),x?O.s*(2-Ah(O)):+be(O))),E?l.mod(E):l;if(S=O.s<0,E){if(E.c?!E.c[0]:!E.s)return new q(NaN);c=!S&&m.isInteger()&&E.isInteger(),c&&(m=m.mod(E))}else{if(O.e>9&&(m.e>0||m.e<-1||(m.e==0?m.c[0]>1||x&&m.c[1]>=24e7:m.c[0]<8e13||x&&m.c[0]<=9999975e7)))return v=m.s<0&&Ah(O)?-0:0,m.e>-1&&(v=1/v),new q(S?1/v:v);P&&(v=Pv(P/tt+2))}for(x?(f=new q(.5),S&&(O.s=1),_=Ah(O)):(p=Math.abs(+be(O)),_=p%2),l=new q(a);;){if(_){if(l=l.times(m),!l.c)break;v?l.c.length>v&&(l.c.length=v):c&&(l=l.mod(E))}if(p){if(p=xn(p/2),p===0)break;_=p%2}else if(O=O.times(f),Te(O,O.e+1,1),O.e>14)_=Ah(O);else{if(p=+be(O),p===0)break;_=p%2}m=m.times(m),v?m.c&&m.c.length>v&&(m.c.length=v):c&&(m=m.mod(E))}return c?l:(S&&(l=a.div(l)),E?l.mod(E):v?Te(l,P,h,g):l)},n.integerValue=function(O){var E=new q(this);return O==null?O=h:xr(O,0,8),Te(E,E.e+1,O)},n.isEqualTo=n.eq=function(O,E){return Vo(this,new q(O,E))===0},n.isFinite=function(){return!!this.c},n.isGreaterThan=n.gt=function(O,E){return Vo(this,new q(O,E))>0},n.isGreaterThanOrEqualTo=n.gte=function(O,E){return(E=Vo(this,new q(O,E)))===1||E===0},n.isInteger=function(){return!!this.c&&_n(this.e/tt)>this.c.length-2},n.isLessThan=n.lt=function(O,E){return Vo(this,new q(O,E))<0},n.isLessThanOrEqualTo=n.lte=function(O,E){return(E=Vo(this,new q(O,E)))===-1||E===0},n.isNaN=function(){return!this.s},n.isNegative=function(){return this.s<0},n.isPositive=function(){return this.s>0},n.isZero=function(){return!!this.c&&this.c[0]==0},n.minus=function(O,E){var f,c,p,v,g=this,x=g.s;if(O=new q(O,E),E=O.s,!x||!E)return new q(NaN);if(x!=E)return O.s=-E,g.plus(O);var S=g.e/tt,_=O.e/tt,l=g.c,m=O.c;if(!S||!_){if(!l||!m)return l?(O.s=-E,O):new q(m?g:NaN);if(!l[0]||!m[0])return m[0]?(O.s=-E,O):new q(l[0]?g:h==3?-0:0)}if(S=_n(S),_=_n(_),l=l.slice(),x=S-_){for((v=x<0)?(x=-x,p=l):(_=S,p=m),p.reverse(),E=x;E--;p.push(0));p.reverse()}else for(c=(v=(x=l.length)<(E=m.length))?x:E,x=E=0;E<c;E++)if(l[E]!=m[E]){v=l[E]<m[E];break}if(v&&(p=l,l=m,m=p,O.s=-O.s),E=(c=m.length)-(f=l.length),E>0)for(;E--;l[f++]=0);for(E=zn-1;c>x;){if(l[--c]<m[c]){for(f=c;f&&!l[--f];l[f]=E);--l[f],l[c]+=zn}l[c]-=m[c]}for(;l[0]==0;l.splice(0,1),--_);return l[0]?_e(O,l,_):(O.s=h==3?-1:1,O.c=[O.e=0],O)},n.modulo=n.mod=function(O,E){var f,c,p=this;return O=new q(O,E),!p.c||!O.s||O.c&&!O.c[0]?new q(NaN):!O.c||p.c&&!p.c[0]?new q(p):(M==9?(c=O.s,O.s=1,f=t(p,O,0,3),O.s=c,f.s*=c):f=t(p,O,0,M),O=p.minus(f.times(O)),!O.c[0]&&M==1&&(O.s=p.s),O)},n.multipliedBy=n.times=function(O,E){var f,c,p,v,g,x,S,_,l,m,A,U,j,Z,se,ae=this,he=ae.c,Ee=(O=new q(O,E)).c;if(!he||!Ee||!he[0]||!Ee[0])return!ae.s||!O.s||he&&!he[0]&&!Ee||Ee&&!Ee[0]&&!he?O.c=O.e=O.s=null:(O.s*=ae.s,!he||!Ee?O.c=O.e=null:(O.c=[0],O.e=0)),O;for(c=_n(ae.e/tt)+_n(O.e/tt),O.s*=ae.s,S=he.length,m=Ee.length,S<m&&(j=he,he=Ee,Ee=j,p=S,S=m,m=p),p=S+m,j=[];p--;j.push(0));for(Z=zn,se=Ha,p=m;--p>=0;){for(f=0,A=Ee[p]%se,U=Ee[p]/se|0,g=S,v=p+g;v>p;)_=he[--g]%se,l=he[g]/se|0,x=U*_+l*A,_=A*_+x%se*se+j[v]+f,f=(_/Z|0)+(x/se|0)+U*l,j[v--]=_%Z;j[v]=f}return f?++c:j.splice(0,1),_e(O,j,c)},n.negated=function(){var O=new q(this);return O.s=-O.s||null,O},n.plus=function(O,E){var f,c=this,p=c.s;if(O=new q(O,E),E=O.s,!p||!E)return new q(NaN);if(p!=E)return O.s=-E,c.minus(O);var v=c.e/tt,g=O.e/tt,x=c.c,S=O.c;if(!v||!g){if(!x||!S)return new q(p/0);if(!x[0]||!S[0])return S[0]?O:new q(x[0]?c:p*0)}if(v=_n(v),g=_n(g),x=x.slice(),p=v-g){for(p>0?(g=v,f=S):(p=-p,f=x),f.reverse();p--;f.push(0));f.reverse()}for(p=x.length,E=S.length,p-E<0&&(f=S,S=x,x=f,E=p),p=0;E;)p=(x[--E]=x[E]+S[E]+p)/zn|0,x[E]=zn===x[E]?0:x[E]%zn;return p&&(x=[p].concat(x),++g),_e(O,x,g)},n.precision=n.sd=function(O,E){var f,c,p,v=this;if(O!=null&&O!==!!O)return xr(O,1,Zr),E==null?E=h:xr(E,0,8),Te(new q(v),O,E);if(!(f=v.c))return null;if(p=f.length-1,c=p*tt+1,p=f[p]){for(;p%10==0;p/=10,c--);for(p=f[0];p>=10;p/=10,c++);}return O&&v.e+1>c&&(c=v.e+1),c},n.shiftedBy=function(O){return xr(O,-Bv,Bv),this.times("1e"+O)},n.squareRoot=n.sqrt=function(){var O,E,f,c,p,v=this,g=v.c,x=v.s,S=v.e,_=u+4,l=new q("0.5");if(x!==1||!g||!g[0])return new q(!x||x<0&&(!g||g[0])?NaN:g?v:1/0);if(x=Math.sqrt(+be(v)),x==0||x==1/0?(E=bn(g),(E.length+S)%2==0&&(E+="0"),x=Math.sqrt(+E),S=_n((S+1)/2)-(S<0||S%2),x==1/0?E="5e"+S:(E=x.toExponential(),E=E.slice(0,E.indexOf("e")+1)+S),f=new q(E)):f=new q(x+""),f.c[0]){for(S=f.e,x=S+_,x<3&&(x=0);;)if(p=f,f=l.times(p.plus(t(v,p,_,1))),bn(p.c).slice(0,x)===(E=bn(f.c)).slice(0,x))if(f.e<S&&--x,E=E.slice(x-3,x+1),E=="9999"||!c&&E=="4999"){if(!c&&(Te(p,p.e+u+2,0),p.times(p).eq(v))){f=p;break}_+=4,x+=4,c=1}else{(!+E||!+E.slice(1)&&E.charAt(0)=="5")&&(Te(f,f.e+u+2,1),O=!f.times(f).eq(v));break}}return Te(f,f.e+u+1,h,O)},n.toExponential=function(O,E){return O!=null&&(xr(O,0,Zr),O++),ee(this,O,E,1)},n.toFixed=function(O,E){return O!=null&&(xr(O,0,Zr),O=O+this.e+1),ee(this,O,E)},n.toFormat=function(O,E,f){var c,p=this;if(f==null)O!=null&&E&&typeof E=="object"?(f=E,E=null):O&&typeof O=="object"?(f=O,O=E=null):f=L;else if(typeof f!="object")throw Error(Mi+"Argument not an object: "+f);if(c=p.toFixed(O,E),p.c){var v,g=c.split("."),x=+f.groupSize,S=+f.secondaryGroupSize,_=f.groupSeparator||"",l=g[0],m=g[1],A=p.s<0,U=A?l.slice(1):l,j=U.length;if(S&&(v=x,x=S,S=v,j-=v),x>0&&j>0){for(v=j%x||x,l=U.substr(0,v);v<j;v+=x)l+=_+U.substr(v,x);S>0&&(l+=_+U.slice(v)),A&&(l="-"+l)}c=m?l+(f.decimalSeparator||"")+((S=+f.fractionGroupSize)?m.replace(new RegExp("\\d{"+S+"}\\B","g"),"$&"+(f.fractionGroupSeparator||"")):m):l}return(f.prefix||"")+c+(f.suffix||"")},n.toFraction=function(O){var E,f,c,p,v,g,x,S,_,l,m,A,U=this,j=U.c;if(O!=null&&(x=new q(O),!x.isInteger()&&(x.c||x.s!==1)||x.lt(a)))throw Error(Mi+"Argument "+(x.isInteger()?"out of range: ":"not an integer: ")+be(x));if(!j)return new q(U);for(E=new q(a),_=f=new q(a),c=S=new q(a),A=bn(j),v=E.e=A.length-U.e-1,E.c[0]=Mv[(g=v%tt)<0?tt+g:g],O=!O||x.comparedTo(E)>0?v>0?E:_:x,g=I,I=1/0,x=new q(A),S.c[0]=0;l=t(x,E,0,1),p=f.plus(l.times(c)),p.comparedTo(O)!=1;)f=c,c=p,_=S.plus(l.times(p=_)),S=p,E=x.minus(l.times(p=E)),x=p;return p=t(O.minus(f),c,0,1),S=S.plus(p.times(_)),f=f.plus(p.times(c)),S.s=_.s=U.s,v=v*2,m=t(_,c,v,h).minus(U).abs().comparedTo(t(S,f,v,h).minus(U).abs())<1?[_,c]:[S,f],I=g,m},n.toNumber=function(){return+be(this)},n.toPrecision=function(O,E){return O!=null&&xr(O,1,Zr),ee(this,O,E,2)},n.toString=function(O){var E,f=this,c=f.s,p=f.e;return p===null?c?(E="Infinity",c<0&&(E="-"+E)):E="NaN":(O==null?E=p<=b||p>=w?Oh(bn(f.c),p):ra(bn(f.c),p,"0"):O===10&&V?(f=Te(new q(f),u+p+1,h),E=ra(bn(f.c),f.e,"0")):(xr(O,2,X.length,"Base"),E=r(ra(bn(f.c),p,"0"),10,O,c,!0)),c<0&&f.c[0]&&(E="-"+E)),E},n.valueOf=n.toJSON=function(){return be(this)},n._isBigNumber=!0,n[Symbol.toStringTag]="BigNumber",n[Symbol.for("nodejs.util.inspect.custom")]=n.valueOf,e!=null&&q.set(e),q}function _n(e){var t=e|0;return e>0||e===t?t:t-1}function bn(e){for(var t,r,i=1,n=e.length,a=e[0]+"";i<n;){for(t=e[i++]+"",r=tt-t.length;r--;t="0"+t);a+=t}for(n=a.length;a.charCodeAt(--n)===48;);return a.slice(0,n+1||1)}function Vo(e,t){var r,i,n=e.c,a=t.c,u=e.s,h=t.s,b=e.e,w=t.e;if(!u||!h)return null;if(r=n&&!n[0],i=a&&!a[0],r||i)return r?i?0:-h:u;if(u!=h)return u;if(r=u<0,i=b==w,!n||!a)return i?0:!n^r?1:-1;if(!i)return b>w^r?1:-1;for(h=(b=n.length)<(w=a.length)?b:w,u=0;u<h;u++)if(n[u]!=a[u])return n[u]>a[u]^r?1:-1;return b==w?0:b>w^r?1:-1}function xr(e,t,r,i){if(e<t||e>r||e!==xn(e))throw Error(Mi+(i||"Argument")+(typeof e=="number"?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Ah(e){var t=e.c.length-1;return _n(e.e/tt)==t&&e.c[t]%2!=0}function Oh(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function ra(e,t,r){var i,n;if(t<0){for(n=r+".";++t;n+=r);e=n+e}else if(i=e.length,++t>i){for(n=r,t-=i;--t;n+=r);e+=n}else t<i&&(e=e.slice(0,t)+"."+e.slice(t));return e}var DP=Ew(),Lr=DP;var GB=Yr(Aw(),1),$B=Yr(Kv(),1),XB=Yr(Gv(),1),zh=Yr(eg(),1),YB=Yr(TS(),1);var IS=zh.default;var rg="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",ZB=(e,t)=>{let r="1"+"0".repeat(t),i=new Lr(e.toString(10),10);return $f(i.times(r).toString(16))},JB=(e,t)=>{let r="1"+"0".repeat(t),i=new Lr(e.toString(),10);return parseFloat(i.dividedBy(r).toString())},QB=e=>{typeof e=="string"&&(e=new Uint8Array(Buffer.from(e)));let t=[],r=BigInt("0x"+Buffer.from(e).toString("hex"));for(;r>BigInt(0);){let i=Number(r%BigInt(58));t.unshift(rg[i]),r=r/BigInt(58)}for(let i=0;i<e.length&&e[i]===0;i++)t.unshift(rg[0]);return t.join("")},eM=e=>{let t=BigInt(0);for(let n=0;n<e.length;n++)t=t*BigInt(58)+BigInt(rg.indexOf(e[n]));let r=t.toString(16),i=r.length%2===0?r:"0"+r;return new Uint8Array(Buffer.from(i,"hex"))},tM=e=>Buffer.from(e).toString("utf8"),rM=e=>Buffer.from(e,"utf8"),iM=e=>!isNaN(Number(e)),ig=async e=>{await new Promise(t=>setTimeout(t,e))},ng=(e,t)=>JSON.stringify(e)===JSON.stringify(t),nM=e=>{let[t,r]=e.toExponential().split("e").map(n=>parseFloat(n)),i=(t*Math.pow(10,r)).toString();return i=parseFloat(i).toString(),i},al=async e=>await new Promise((t,r)=>{let i;typeof window<"u"?i=new WebSocket(e):i=new zh.default(e),i.onopen=()=>{t(!0),i.close()},i.onerror=n=>{r(new Error(n.message)),i.close()}}),jh={add:(e,t,r=18)=>parseFloat(new Lr(e).plus(new Lr(t)).toFixed(r)),sub:(e,t,r=18)=>parseFloat(new Lr(e).minus(new Lr(t)).toFixed(r)),mul:(e,t,r=18)=>parseFloat(new Lr(e).times(new Lr(t)).toFixed(r)),div:(e,t,r=18)=>parseFloat(new Lr(e).div(new Lr(t)).toFixed(r)),pow:(e,t,r=18)=>parseFloat(new Lr(e).pow(t).toFixed(r)),sqrt:(e,t=18)=>parseFloat(new Lr(e).sqrt().toFixed(t)),abs:(e,t=18)=>parseFloat(new Lr(e).absoluteValue().toFixed(t)),ceil:(e,t=18)=>parseFloat(new Lr(e).integerValue(Lr.ROUND_CEIL).toFixed(t)),floor:(e,t=18)=>parseFloat(new Lr(e).integerValue(Lr.ROUND_FLOOR).toFixed(t)),round:(e,t=18)=>parseFloat(new Lr(e).integerValue(Lr.ROUND_HALF_UP).toFixed(t))},sM=()=>typeof window>"u"?!1:function(e){return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(e.substr(0,4)))}(navigator.userAgent||navigator.vendor||window.opera),aM=()=>{if(typeof window>"u")return!1;let e=window.navigator;if(window.WebViewJavascriptBridge||window.webkit&&window.webkit.messageHandlers||e.userAgent.match(/WebView/i))return!0;let t=e.standalone,r=e.userAgent.toLowerCase(),i=/safari/.test(r);return/iphone|ipod|ipad/.test(r)?!t&&!i:r.includes("wv")};var ag={};Oa(ag,{AssetDirectionEnum:()=>sg,ErrorTypeEnum:()=>ol,TransactionListenerProcessIndex:()=>Wh,TransactionStatusEnum:()=>Kh,TransactionTypeEnum:()=>Vh,WalletPlatformEnum:()=>RS});var sg=(r=>(r.INCOMING="INCOMING",r.OUTGOING="OUTGOING",r))(sg||{}),Vh=(a=>(a.GENERAL="GENERAL",a.CONTRACT="CONTRACT",a.COIN="COIN",a.TOKEN="TOKEN",a.NFT="NFT",a))(Vh||{}),Kh=(i=>(i.FAILED="FAILED",i.PENDING="PENDING",i.CONFIRMED="CONFIRMED",i))(Kh||{}),ol=(c=>(c.RPC_TIMEOUT="RPC_TIMEOUT",c.RPC_REQUEST_ERROR="RPC_REQUEST_ERROR",c.RPC_ACCESS_DENIED="RPC_ACCESS_DENIED",c.WS_URL_NOT_DEFINED="WS_URL_NOT_DEFINED",c.WS_CONNECTION_FAILED="WS_CONNECTION_FAILED",c.UNACCEPTED_CHAIN="UNACCEPTED_CHAIN",c.UNAUTHORIZED_ADDRESS="UNAUTHORIZED_ADDRESS",c.INSUFFICIENT_BALANCE="INSUFFICIENT_BALANCE",c.INVALID_AMOUNT="INVALID_AMOUNT",c.INVALID_ADDRESS="INVALID_ADDRESS",c.INVALID_PRIVATE_KEY="INVALID_PRIVATE_KEY",c.INVALID_PUBLIC_KEY="INVALID_PUBLIC_KEY",c.INVALID_TRANSACTION_ID="INVALID_TRANSACTION_ID",c.PROVIDER_IS_REQUIRED="PROVIDER_IS_REQUIRED",c.PROVIDER_IS_NOT_INITIALIZED="PROVIDER_IS_NOT_INITIALIZED",c.PROVIDER_IS_ALREADY_INITIALIZED="PROVIDER_IS_ALREADY_INITIALIZED",c.WALLET_ALREADY_PROCESSING="WALLET_ALREADY_PROCESSING",c.WALLET_CONNECT_REJECTED="WALLET_CONNECT_REJECTED",c.WALLET_REQUEST_REJECTED="WALLET_REQUEST_REJECTED",c.WALLET_CONNECTION_FAILED="WALLET_CONNECTION_FAILED",c.WALLET_CONNECTION_TIMEOUT="WALLET_CONNECTION_TIMEOUT",c.TRANSACTION_CREATION_FAILED="TRANSACTION_CREATION_FAILED",c.TRANSACTION_NOT_FOUND="TRANSACTION_NOT_FOUND",c.CLOSED_WALLETCONNECT_MODAL="CLOSED_WALLETCONNECT_MODAL",c.PROJECT_ID_IS_REQUIRED="PROJECT_ID_IS_REQUIRED",c.METADATA_IS_REQUIRED="METADATA_IS_REQUIRED",c.CONFIG_IS_REQUIRED="CONFIG_IS_REQUIRED",c))(ol||{}),RS=(n=>(n.BROWSER="BROWSER",n.MOBILE="MOBILE",n.DESKTOP="DESKTOP",n.UNIVERSAL="UNIVERSAL",n))(RS||{});var Wh={GENERAL:"generalProcess",CONTRACT:"contractProcess",COIN:"coinProcess",TOKEN:"tokenProcess",NFT:"nftProcess"};var Vn=class e{network;api;explorer;wsUrl;blockCypherToken;defaultBlockCypherToken="49d43a59a4f24d31a9731eb067ab971c";static _instance;constructor(t){this.update(t)}static get instance(){if(e._instance===void 0)throw new Error("PROVIDER_IS_NOT_INITIALIZED");return e._instance}static initialize(t){if(e._instance!==void 0)throw new Error("PROVIDER_IS_ALREADY_INITIALIZED");e._instance=new e(t)}async checkRpcConnection(t){try{let r=await vn.get(t??this.createEndpoint("blocks/tip/height"));return r.status!==200?new Error(r.statusText+": "+JSON.stringify(r.data)):!0}catch(r){return r}}async checkWsConnection(t){try{let r=await al(t??this.wsUrl);return r instanceof Error?r:!0}catch(r){return r}}update(t){if(this.network=t,e._instance=this,this.blockCypherToken=this.network.blockCypherToken,this.network.testnet){this.api="https://blockstream.info/testnet/api/",this.explorer="https://blockstream.info/testnet/";let r=this.network.blockCypherToken??this.defaultBlockCypherToken;this.wsUrl="wss://socket.blockcypher.com/v1/btc/test3?token="+r}else this.api="https://blockstream.info/api/",this.explorer="https://blockstream.info/",this.network.blockCypherToken!==void 0?this.wsUrl="wss://socket.blockcypher.com/v1/btc/main?token="+this.network.blockCypherToken:this.wsUrl="wss://ws.blockchain.info/inv"}createEndpoint(t){return this.api+t}isTestnet(){return this.network?.testnet??!1}};var hx={};Oa(hx,{Coin:()=>px});var cg={};Oa(cg,{base58Decode:()=>eM,base58Encode:()=>QB,bufferToString:()=>tM,checkWebSocket:()=>al,fromSatoshi:()=>hs,hexToNumber:()=>JB,isMobile:()=>sM,isNumeric:()=>iM,isWebview:()=>aM,math:()=>jh,numberToHex:()=>ZB,objectsEqual:()=>ng,sleep:()=>ig,stringToBuffer:()=>rM,toHex:()=>$f,toReadableString:()=>nM,toSatoshi:()=>og});var hs=e=>jh.div(e,1e8,8),og=e=>jh.mul(e,1e8,8);var xc=Yr(MT(),1);var $l=class{rawData;signedData;provider;constructor(t,r){this.rawData=t,this.provider=r??Vn.instance}async sign(t){return this.rawData.bitcoreLib.sign(t),this.signedData=this.rawData.bitcoreLib.serialize(),this}async send(){try{return(await vn({method:"POST",url:this.provider.createEndpoint("tx"),data:this.signedData})).data}catch(t){throw new Error(JSON.stringify(t.response?.data))}}getRawData(){return this.rawData}getSignedData(){return this.signedData??""}};var px=class{provider;constructor(t){this.provider=t??Vn.instance}getName(){return"Bitcoin"}getSymbol(){return"BTC"}getDecimals(){return 8}async getBalance(t){let r=this.provider.createEndpoint("address/"+t),i=await vn.get(r).then(a=>a.data),n=i.chain_stats.funded_txo_sum-i.chain_stats.spent_txo_sum;return hs(n)}async transfer(t,r,i){if(i<0)throw new Error("INVALID_AMOUNT");if(i>await this.getBalance(t))throw new Error("INSUFFICIENT_BALANCE");if(t===r)throw new Error("INVALID_ADDRESS");let n=[],a=new xc.Transaction,u=new xc.Address(t),h=og(i),b=await vn.get(this.provider.createEndpoint("address/"+t+"/utxo")).then(w=>w.data);for(let w of b)n.push(new xc.Transaction.UnspentOutput({txId:w.txid,satoshis:w.value,address:u,outputIndex:w.vout,script:xc.Script.fromAddress(u)}));return a.from(n),a.change(t),a.to(r,h),new $l({sender:t,receiver:r,amount:h,bitcoreLib:a})}};var dx={};Oa(dx,{CoinTransaction:()=>Xl,Transaction:()=>_c});var CT=0,_c=class{id;provider;data=null;constructor(t,r){this.id=t,this.provider=r??Vn.instance}async getData(){if(this.data!==null)return this.data;try{let t=(await vn.get(this.provider.createEndpoint("tx/"+this.id))).data;return t?.txid!==this.id?this.data=null:this.data=t}catch(t){if(String(t?.response?.data).includes("Transaction not found")){if(CT>5)throw new Error("TRANSACTION_NOT_FOUND");return CT++,await ig(2e3),await this.getData()}throw new Error("RPC_REQUEST_ERROR")}}async wait(t=4e3){return await new Promise((r,i)=>{let n=async()=>{try{let a=await this.getStatus();if(a==="CONFIRMED"){r("CONFIRMED");return}else if(a==="FAILED"){i("FAILED");return}setTimeout(n,t)}catch{i("FAILED")}};n()})}getId(){return this.id}async getType(){return"COIN"}getUrl(){return this.provider.explorer+"tx/"+this.id}async getSigner(){return(await this.getData())?.vin[0].prevout.scriptpubkey_address??""}async getFee(){let t=await this.getData();return hs(t?.fee??0)}async getBlockNumber(){return(await this.getData())?.status?.block_height??0}async getBlockTimestamp(){return(await this.getData())?.status?.block_time??0}async getBlockConfirmationCount(){let t=await this.getData();return t===null?0:(await vn.get(this.provider.createEndpoint("blocks/tip/height"))).data-t?.status?.block_height}async getStatus(){let t=await this.getData();return t===null?"PENDING":t.status?.block_height!==void 0?t.status.confirmed?"CONFIRMED":"FAILED":"PENDING"}};var Xl=class extends _c{async getReceiver(){return(await this.getData())?.vout[0].scriptpubkey_address??""}async getSender(){return await this.getSigner()}async getAmount(){let t=await this.getData();return hs(t?.vout[0].value??0)}async verifyTransfer(t,r,i){if(await this.getStatus()==="PENDING")return"PENDING";if(await this.getAmount()!==i)return"FAILED";if(t==="INCOMING"){if((await this.getReceiver()).toLowerCase()!==r.toLowerCase())return"FAILED"}else if((await this.getSender()).toLowerCase()!==r.toLowerCase())return"FAILED";return"CONFIRMED"}};var vx={};Oa(vx,{TransactionListener:()=>mx,TransactionSigner:()=>$l});var mx=class{type;provider;status=!1;callbacks=[];triggeredTransactions=[];filter;webSocket;dynamicStop=()=>{};constructor(t,r,i){this.type=t,this.filter=r??{},this.provider=i??Vn.instance}stop(){this.status&&(this.status=!1,this.dynamicStop())}start(){this.status||(this.status=!0,this[Wh[this.type]]())}getStatus(){return this.status}async on(t){if(this.webSocket===void 0)try{await al(this.provider.wsUrl),this.webSocket=new IS(this.provider.wsUrl)}catch(r){throw new Error("WebSocket connection is not available"+(r instanceof Error?": "+r.message:""))}return this.start(),this.callbacks.push(t),!0}trigger(t){this.triggeredTransactions.includes(t.id)||(this.triggeredTransactions.push(t.id),this.callbacks.forEach(r=>{r(t)}))}isBlockCypherProcess(){return this.provider.isTestnet()||this.provider.blockCypherToken!==void 0}createMessage(t){let r;if(this.isBlockCypherProcess()){let i={event:"unconfirmed-tx",token:this.provider.blockCypherToken??this.provider.defaultBlockCypherToken};t!==void 0&&(i.address=t),r=JSON.stringify(i)}else r=JSON.stringify({op:"unconfirmed_sub"});return this.dynamicStop=()=>{this.isBlockCypherProcess()||this.webSocket.send(JSON.stringify({op:"unconfirmed_unsub"})),this.webSocket.close()},r}getValues(t){let r={txId:""};return this.isBlockCypherProcess()?(r.txId=t.hash,r.sender=t.inputs[0].addresses[0],r.receiver=t.outputs[0].addresses[0],r.amount=hs(t.outputs[0].value)):(r.txId=t.x.hash,r.receiver=t.x.out[0].addr,r.sender=t.x.inputs[0].prev_out.addr,r.amount=hs(t.x.out[0].value)),r}generalProcess(){let t=this.createMessage();this.webSocket.addEventListener("open",()=>{this.webSocket.send(t)}),this.webSocket.addEventListener("message",async r=>{let i=this.getValues(JSON.parse(r.data));this.filter?.signer!==void 0&&i.sender!==this.filter.signer.toLowerCase()||this.trigger(new _c(i.txId))})}contractProcess(){throw new Error("This method is not implemented for Bitcoin.")}coinProcess(){let t=this.filter;if(t.signer!==void 0&&t.sender!==void 0&&t.signer!==t.sender)throw new Error("Sender and signer must be the same in coin transactions. Or only one of them can be defined.");let r=t.sender??t.signer,i=this.createMessage(t.receiver);this.webSocket.addEventListener("open",()=>{this.webSocket.send(i)}),this.webSocket.addEventListener("message",async n=>{let a=JSON.parse(n.data),u={},h={};if(String(a.event).includes("events limit reached"))throw new Error("BlockCypher events limit reached.");let b=this.getValues(a);if(r!==void 0&&(u.sender=r.toLowerCase(),h.sender=b.sender?.toLowerCase()),t.receiver!==void 0&&(u.receiver=t.receiver.toLowerCase(),h.receiver=b.receiver?.toLowerCase()),!ng(u,h))return;let w=new Xl(b.txId);t.amount!==void 0&&b.amount!==t.amount||this.trigger(w)})}tokenProcess(){throw new Error("This method is not implemented for Bitcoin.")}nftProcess(){throw new Error("This method is not implemented for Bitcoin.")}};0&&(module.exports={Provider,assets,models,services,types,utils});
38
+ `)}`}_compileErrors(){return this.errors.map(Sq)}};var Qn={};ka(Qn,{abiSchemaToJsonSchema:()=>Sd,codePointToInt:()=>g4,ensureIfUint8Array:()=>Ab,ethAbiToJsonSchema:()=>Tb,fetchArrayElement:()=>Ib,hexToNumber:()=>Ed,hexToUint8Array:()=>Td,numberToHex:()=>Rb,padLeft:()=>b4,parseBaseType:()=>Ss,transformJsonDataToAbiFormat:()=>wd,uint8ArrayToHexString:()=>Rl});var d4=["bool","int","uint","bytes","string","address","tuple"];var Sb=e=>typeof e=="object"&&"type"in e&&"name"in e;var m4=e=>typeof e=="string",mr=e=>typeof e=="string"&&/^((-)?0x[0-9a-f]+|(0x))$/i.test(e);var yd=e=>typeof e=="number"||typeof e=="bigint"||typeof e=="string"&&/^((-0x|0x|-)?[0-9a-f]+|(0x))$/i.test(e);var Eq=["hex","number","blockNumber","blockNumberOrTag","filter","bloom"],Ss=e=>{let t=e.replace(/ /,""),r,i=!1,n=[];if(e.includes("[")&&(t=t.slice(0,t.indexOf("[")),n=[...e.matchAll(/(?:\[(\d*)\])/g)].map(a=>parseInt(a[1],10)).map(a=>Number.isNaN(a)?-1:a),i=n.length>0),d4.includes(t))return{baseType:t,isArray:i,baseTypeSize:r,arraySizes:n};if(t.startsWith("int"))r=parseInt(t.substring(3),10),t="int";else if(t.startsWith("uint"))r=parseInt(e.substring(4),10),t="uint";else if(t.startsWith("bytes"))r=parseInt(t.substring(5),10),t="bytes";else return{baseType:void 0,isArray:!1,baseTypeSize:void 0,arraySizes:n};return{baseType:t,isArray:i,baseTypeSize:r,arraySizes:n}},Eb=(e,t={})=>{if(Object.keys(t).includes("type"))throw new da([{keyword:"eth",message:'Either "eth" or "type" can be presented in schema',params:{eth:e},instancePath:"",schemaPath:""}]);let{baseType:i,baseTypeSize:n}=Ss(e);if(!i&&!Eq.includes(e))throw new da([{keyword:"eth",message:`Eth data type "${e}" is not valid`,params:{eth:e},instancePath:"",schemaPath:""}]);if(i){if(i==="tuple")throw new Error('"tuple" type is not implemented directly.');return{format:`${i}${n??""}`,required:!0}}return e?{format:e,required:!0}:{}},Sd=(e,t="/0")=>{let r={type:"array",items:[],maxItems:e.length,minItems:e.length};for(let[i,n]of e.entries()){let a,u,h=[];Sb(n)?(a=n.type,u=n.name,h=n.components):typeof n=="string"?(a=n,u=`${t}/${i}`):Array.isArray(n)&&(n[0]&&typeof n[0]=="string"&&n[0].startsWith("tuple")&&!Array.isArray(n[0])&&n[1]&&Array.isArray(n[1])?(a=n[0],u=`${t}/${i}`,h=n[1]):(a="tuple",u=`${t}/${i}`,h=n));let{baseType:b,isArray:w,arraySizes:T}=Ss(a),I,B=r;for(let M=T.length-1;M>0;M-=1)I={type:"array",items:[],maxItems:T[M],minItems:T[M]},T[M]<0&&(delete I.maxItems,delete I.minItems),Array.isArray(B.items)?B.items.length===0?B.items=I:B.items.push(I):B.items=[B.items,I],B=I;if(b==="tuple"&&!w){let M=Sd(h,u);M.$id=u,B.items.push(M)}else if(b==="tuple"&&w){let M=T[0],P={$id:u,type:"array",items:Sd(h,u),maxItems:M,minItems:M};M<0&&(delete P.maxItems,delete P.minItems),B.items.push(P)}else if(w){let M=T[0],P={type:"array",$id:u,items:Eb(String(b)),minItems:M,maxItems:M};M<0&&(delete P.maxItems,delete P.minItems),B.items.push(P)}else Array.isArray(B.items)?B.items.push(Object.assign({$id:u},Eb(a))):B.items.items.push(Object.assign({$id:u},Eb(a)));B=r}return r},Tb=e=>Sd(e),Ib=(e,t)=>t===1?e:Ib(e[0],t-1),wd=(e,t,r)=>{let i=[];for(let[n,a]of e.entries()){let u,h,b=[];Sb(a)?(u=a.type,h=a.name,b=a.components):typeof a=="string"?u=a:Array.isArray(a)&&(a[1]&&Array.isArray(a[1])?(u=a[0],b=a[1]):(u="tuple",b=a));let{baseType:w,isArray:T,arraySizes:I}=Ss(u),B=Array.isArray(t)?t[n]:t[h];if(w==="tuple"&&!T)i.push(wd(b,B,r));else if(w==="tuple"&&T){let M=[];for(let P of B)if(I.length>1){let L=Ib(P,I.length-1),X=[];for(let V of L)X.push(wd(b,V,r));M.push(X)}else M.push(wd(b,P,r));i.push(M)}else i.push(B)}return r=r??[],r.push(...i),r},g4=e=>{if(e>=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error(`Invalid code point: ${e}`)},Ed=e=>{if(!mr(e))throw new Error("Invalid hex string");let[t,r]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e],i=BigInt(r);return i>Number.MAX_SAFE_INTEGER?t?-i:i:i<Number.MIN_SAFE_INTEGER?i:t?-1*Number(i):Number(i)},Rb=e=>{if((typeof e=="number"||typeof e=="bigint")&&e<0)return`-0x${e.toString(16).slice(1)}`;if((typeof e=="number"||typeof e=="bigint")&&e>=0)return`0x${e.toString(16)}`;if(typeof e=="string"&&mr(e)){let[t,r]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e],i=r.split(/^(-)?0(x|X)/).slice(-1)[0];return`${t?"-":""}0x${i.replace(/^0+/,"").toLowerCase()}`}if(typeof e=="string"&&!mr(e))return Rb(BigInt(e));throw new ll(e)},b4=(e,t,r="0")=>{if(typeof e=="string"&&!mr(e))return e.padStart(t,r);let i=typeof e=="string"&&mr(e)?e:Rb(e),[n,a]=i.startsWith("-")?["-0x",i.slice(3)]:["0x",i.slice(2)];return`${n}${a.padStart(t,r)}`};function Rl(e){let t="0x";for(let r of e){let i=r.toString(16);t+=i.length===1?`0${i}`:i}return t}var ma={zero:48,nine:57,A:65,F:70,a:97,f:102};function v4(e){if(e>=ma.zero&&e<=ma.nine)return e-ma.zero;if(e>=ma.A&&e<=ma.F)return e-(ma.A-10);if(e>=ma.a&&e<=ma.f)return e-(ma.a-10)}function Td(e){let t=0;if(e.startsWith("0")&&(e[1]==="x"||e[1]==="X")&&(t=2),e.length%2!==0)throw new ao(`hex string has odd length: ${e}`);let r=(e.length-t)/2,i=new Uint8Array(r);for(let n=0,a=t;n<r;n+=1){let u=v4(e.charCodeAt(a++)),h=v4(e.charCodeAt(a++));if(u===void 0||h===void 0)throw new ao(`Invalid byte sequence ("${e[a-2]}${e[a-1]}" in "${e}").`);i[n]=u*16+h}return i}function Ab(e){var t;return!(e instanceof Uint8Array)&&((t=e?.constructor)===null||t===void 0?void 0:t.name)==="Uint8Array"?Uint8Array.from(e):e}var Id=e=>{var t;return e instanceof Uint8Array||((t=e?.constructor)===null||t===void 0?void 0:t.name)==="Uint8Array"},Ob=(e,t={abiType:"bytes"})=>{if(typeof e!="string"&&!Array.isArray(e)&&!Id(e)||typeof e=="string"&&mr(e)&&e.startsWith("-")||typeof e=="string"&&!mr(e))return!1;let r;if(typeof e=="string"){if(e.length%2!==0)return!1;r=Td(e)}else if(Array.isArray(e)){if(e.some(i=>i<0||i>255||!Number.isInteger(i)))return!1;r=new Uint8Array(e)}else r=e;if(t?.abiType){let{baseTypeSize:i}=Ss(t.abiType);return i?r.length===i:!0}return t?.size?r.length===t?.size:!0};var x4=e=>{if(!/^(0x)?[0-9a-f]{40}$/i.test(e))return!1;let t=e.slice(2),r=Nu(t.toLowerCase()),i=Rl(fl(Ab(r))).slice(2);for(let n=0;n<40;n+=1)if(parseInt(i[n],16)>7&&t[n].toUpperCase()!==t[n]||parseInt(i[n],16)<=7&&t[n].toLowerCase()!==t[n])return!1;return!0},Es=(e,t=!0)=>{if(typeof e!="string"&&!Id(e))return!1;let r;return Id(e)?r=Rl(e):typeof e=="string"&&!mr(e)?r=e.toLowerCase().startsWith("0x")?e:`0x${e}`:r=e,/^(0x)?[0-9a-f]{40}$/i.test(r)?/^(0x|0X)?[0-9a-f]{40}$/.test(r)||/^(0x|0X)?[0-9A-F]{40}$/.test(r)?!0:t?x4(r):!0:!1};var Al;(function(e){e.NUMBER="NUMBER_NUMBER",e.HEX="NUMBER_HEX",e.STR="NUMBER_STR",e.BIGINT="NUMBER_BIGINT"})(Al||(Al={}));var Ol;(function(e){e.HEX="BYTES_HEX",e.UINT8ARRAY="BYTES_UINT8ARRAY"})(Ol||(Ol={}));var sZ={number:Al.BIGINT,bytes:Ol.HEX},aZ={number:Al.HEX,bytes:Ol.HEX};var kl;(function(e){e.EARLIEST="earliest",e.LATEST="latest",e.PENDING="pending",e.SAFE="safe",e.FINALIZED="finalized"})(kl||(kl={}));var _4;(function(e){e.chainstart="chainstart",e.frontier="frontier",e.homestead="homestead",e.dao="dao",e.tangerineWhistle="tangerineWhistle",e.spuriousDragon="spuriousDragon",e.byzantium="byzantium",e.constantinople="constantinople",e.petersburg="petersburg",e.istanbul="istanbul",e.muirGlacier="muirGlacier",e.berlin="berlin",e.london="london",e.altair="altair",e.arrowGlacier="arrowGlacier",e.grayGlacier="grayGlacier",e.bellatrix="bellatrix",e.merge="merge",e.capella="capella",e.shanghai="shanghai"})(_4||(_4={}));var y4=Object.getPrototypeOf(Uint8Array);var w4=function(e,t,r,i){function n(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function h(T){try{w(i.next(T))}catch(I){u(I)}}function b(T){try{w(i.throw(T))}catch(I){u(I)}}function w(T){T.done?a(T.value):n(T.value).then(h,b)}w((i=i.apply(e,t||[])).next())})},S4=Symbol.for("web3/base-provider"),kb=class e{static isWeb3Provider(t){return t instanceof e||!!(t&&t[S4])}get[S4](){return!0}send(t,r){this.request(t).then(i=>{r(null,i)}).catch(i=>{r(i)})}sendAsync(t){return w4(this,void 0,void 0,function*(){return this.request(t)})}asEIP1193Provider(){let t=Object.create(this),r=t.request;return t.request=function(n){return w4(this,void 0,void 0,function*(){return(yield r(n)).result})},t.asEIP1193Provider=void 0,t}};var Rd=(e,t)=>{let r=e;for(let i=1;i<t;i+=1)r*=e;return r},lo=(e,t={abiType:"uint"})=>{if(!["number","string","bigint"].includes(typeof e)||typeof e=="string"&&e.length===0)return!1;let r;if(t?.abiType){let{baseTypeSize:n}=Ss(t.abiType);n&&(r=n)}else t.bitSize&&(r=t.bitSize);let i=Rd(BigInt(2),BigInt(r??256))-BigInt(1);try{let n=typeof e=="string"&&mr(e)?BigInt(Ed(e)):BigInt(e);return n>=0&&n<=i}catch{return!1}},mc=(e,t={abiType:"int"})=>{if(!["number","string","bigint"].includes(typeof e)||typeof e=="number"&&e>Number.MAX_SAFE_INTEGER)return!1;let r;if(t?.abiType){let{baseTypeSize:a,baseType:u}=Ss(t.abiType);if(u!=="int")return!1;a&&(r=a)}else t.bitSize&&(r=t.bitSize);let i=Rd(BigInt(2),BigInt((r??256)-1)),n=BigInt(-1)*Rd(BigInt(2),BigInt((r??256)-1));try{let a=typeof e=="string"&&mr(e)?BigInt(Ed(e)):BigInt(e);return a>=n&&a<=i}catch{return!1}},E4=e=>!!(mc(e)||typeof e=="string"&&/[0-9.]/.test(e)&&e.indexOf(".")===e.lastIndexOf(".")||typeof e=="number");var Nb=e=>lo(e),Ad=e=>Object.values(kl).includes(e),Nl=e=>Ad(e)||Nb(e);var Od=e=>typeof e!="string"||!/^(0x)?[0-9a-f]{512}$/i.test(e)?!1:!!(/^(0x)?[0-9a-f]{512}$/.test(e)||/^(0x)?[0-9A-F]{512}$/.test(e));var T4=e=>["number","string","boolean"].includes(typeof e)?typeof e=="boolean"?!0:typeof e=="string"&&!mr(e)?e==="1"||e==="0":typeof e=="string"&&mr(e)?e==="0x1"||e==="0x0":e===1||e===0:!1;var zi=e=>e==null;var kd=e=>typeof e!="string"||!/^(0x)?[0-9a-f]{64}$/i.test(e)?!1:!!(/^(0x)?[0-9a-f]{64}$/.test(e)||/^(0x)?[0-9A-F]{64}$/.test(e));var I4=e=>{let t=["fromBlock","toBlock","address","topics","blockHash"];if(zi(e)||typeof e!="object"||!Object.keys(e).every(r=>t.includes(r))||!zi(e.fromBlock)&&!Nl(e.fromBlock)||!zi(e.toBlock)&&!Nl(e.toBlock))return!1;if(!zi(e.address)){if(Array.isArray(e.address)){if(!e.address.every(r=>Es(r)))return!1}else if(!Es(e.address))return!1}return!(!zi(e.topics)&&!e.topics.every(r=>zi(r)?!0:Array.isArray(r)?r.every(i=>kd(i)):!!kd(r)))};var Fu={address:e=>Es(e),bloom:e=>Od(e),blockNumber:e=>Nb(e),blockTag:e=>Ad(e),blockNumberOrTag:e=>Nl(e),bool:e=>T4(e),bytes:e=>Ob(e),filter:e=>I4(e),hex:e=>mr(e),uint:e=>lo(e),int:e=>mc(e),number:e=>E4(e),string:e=>m4(e)};for(let e=8;e<=256;e+=8)Fu[`int${e}`]=t=>mc(t,{bitSize:e}),Fu[`uint${e}`]=t=>lo(t,{bitSize:e});for(let e=1;e<=32;e+=1)Fu[`bytes${e}`]=t=>Ob(t,{size:e});Fu.bytes256=Fu.bytes;var Pb=Fu;var Pl=e=>{if((!e?.type||e?.type==="object")&&e?.properties){let t={};for(let r of Object.keys(e.properties)){let i=Pl(e.properties[r]);i&&(t[r]=i)}return Array.isArray(e.required)?Jn.object(t).partial().required(e.required.reduce((r,i)=>Object.assign(Object.assign({},r),{[i]:!0}),{})):Jn.object(t).partial()}if(e?.type==="array"&&e?.items){if(Array.isArray(e.items)&&e.items.length>0){let t=[];for(let r of e.items){let i=Pl(r);i&&t.push(i)}return Jn.tuple(t)}return Jn.array(Pl(e.items))}if(e.oneOf&&Array.isArray(e.oneOf))return Jn.union(e.oneOf.map(t=>Pl(t)));if(e?.format){if(!Pb[e.format])throw new pd(e.format);return Jn.any().refine(Pb[e.format],t=>({params:{value:t,format:e.format}}))}return e?.type&&e?.type!=="object"&&typeof Jn[String(e.type)]=="function"?Jn[String(e.type)]():Jn.object({data:Jn.any()}).partial()},Nd=class e{static factory(){return e.validatorInstance||(e.validatorInstance=new e),e.validatorInstance}validate(t,r,i){var n,a;let h=Pl(t).safeParse(r);if(!h.success){let b=this.convertErrors((a=(n=h.error)===null||n===void 0?void 0:n.issues)!==null&&a!==void 0?a:[]);if(b){if(i?.silent)return b;throw new da(b)}}}convertErrors(t){if(t&&Array.isArray(t)&&t.length>0)return t.map(r=>{var i;let n,a,u,h;h=r.path.join("/");let b=String(r.path[r.path.length-1]),w=r.path.join("/");if(r.code===le.too_big)a="maxItems",h=`${w}/maxItems`,u={limit:r.maximum},n=`must NOT have more than ${r.maximum} items`;else if(r.code===le.too_small)a="minItems",h=`${w}/minItems`,u={limit:r.minimum},n=`must NOT have fewer than ${r.minimum} items`;else if(r.code===le.custom){let{value:T,format:I}=(i=r.params)!==null&&i!==void 0?i:{};typeof T>"u"?n=`value at "/${h}" is required`:n=`value "${typeof T=="object"?JSON.stringify(T):T}" at "/${h}" must pass "${I}" validation`,u={value:T}}return{keyword:a??b,instancePath:w?`/${w}`:"",schemaPath:h?`#${h}`:"#",params:u??{value:r.message},message:n??r.message}})}};var Pd=class{constructor(){this._validator=Nd.factory()}validateJSONSchema(t,r,i){return this._validator.validate(t,r,i)}validate(t,r,i={silent:!1}){var n,a;let u=Tb(t);if(!(Array.isArray(u.items)&&((n=u.items)===null||n===void 0?void 0:n.length)===0&&r.length===0)){if(Array.isArray(u.items)&&((a=u.items)===null||a===void 0?void 0:a.length)===0&&r.length!==0)throw new da([{instancePath:"/0",schemaPath:"/",keyword:"required",message:"empty schema against data can not be validated",params:r}]);return this._validator.validate(u,r,i)}}};var Bl=new Pd;function Bb(e){var t;return e instanceof Uint8Array||((t=e?.constructor)===null||t===void 0?void 0:t.name)==="Uint8Array"}var WJ={noether:BigInt(0),wei:BigInt(1),kwei:BigInt(1e3),Kwei:BigInt(1e3),babbage:BigInt(1e3),femtoether:BigInt(1e3),mwei:BigInt(1e6),Mwei:BigInt(1e6),lovelace:BigInt(1e6),picoether:BigInt(1e6),gwei:BigInt(1e9),Gwei:BigInt(1e9),shannon:BigInt(1e9),nanoether:BigInt(1e9),nano:BigInt(1e9),szabo:BigInt(1e12),microether:BigInt(1e12),micro:BigInt(1e12),finney:BigInt(1e15),milliether:BigInt(1e15),milli:BigInt(1e15),ether:BigInt("1000000000000000000"),kether:BigInt("1000000000000000000000"),grand:BigInt("1000000000000000000000"),mether:BigInt("1000000000000000000000000"),gether:BigInt("1000000000000000000000000000"),tether:BigInt("1000000000000000000000000000000")},Cb=e=>{if(Bl.validate(["bytes"],[e]),Bb(e))return e;if(Array.isArray(e))return new Uint8Array(e);if(typeof e=="string")return Qn.hexToUint8Array(e);throw new ao(e)},{uint8ArrayToHexString:Aq}=Qn,Ml=e=>Aq(Cb(e));var Hu=(e,t)=>{typeof e!="bigint"&&Bl.validate(["int"],[e]);let r=Qn.numberToHex(e);return t&&(!r.startsWith("-")&&r.length%2===1?r="0x0".concat(r.slice(2)):r.length%2===0&&r.startsWith("-")&&(r="-0x0".concat(r.slice(3)))),r};var Mb=e=>{Bl.validate(["string"],[e]);let t=e.replace(/^(?:\u0000)/,"");return t=t.replace(/(?:\u0000)$/,""),Ml(new TextEncoder().encode(t))};var Cl=(e,t)=>{if(typeof e=="string"&&Es(e))return t?"address":`0x${e.toLowerCase().replace(/^0x/i,"")}`;if(typeof e=="boolean")return t?"bool":e?"0x01":"0x00";if(typeof e=="number")return t?e<0?"int256":"uint256":Hu(e);if(typeof e=="bigint")return t?"bigint":Hu(e);if(typeof e=="object"&&e)return t?"string":Mb(JSON.stringify(e));if(typeof e=="string"){if(e.startsWith("-0x")||e.startsWith("-0X"))return t?"int256":Hu(e);if(mr(e))return t?"bytes":e;if(yd(e)&&!mc(e)&&!lo(e))return t?"bytes":`0x${e}`;if(yd(e)&&!mc(e)&&lo(e))return t?"uint":Hu(e);if(!Number.isFinite(e))return t?"string":Mb(e)}throw new ld(e)};var O4=Ir(A4(),1);var{parseBaseType:RQ}=Qn;var Bq;Bq=Symbol.toStringTag;var Mq=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Db=Math.ceil,On=Math.floor,ji="[BigNumber Error] ",N4=ji+"Number primitive has more than 15 significant digits: ",es=1e14,tt=14,Ub=9007199254740991,qb=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],po=1e7,ri=1e9;function P4(e){var t,r,i,n=q.prototype={constructor:q,toString:null,valueOf:null},a=new q(1),u=20,h=4,b=-7,w=21,T=-1e7,I=1e7,B=!1,M=1,P=0,L={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},X="0123456789abcdefghijklmnopqrstuvwxyz",V=!0;function q(O,E){var f,c,p,v,g,x,S,_,l=this;if(!(l instanceof q))return new q(O,E);if(E==null){if(O&&O._isBigNumber===!0){l.s=O.s,!O.c||O.e>I?l.c=l.e=null:O.e<T?l.c=[l.e=0]:(l.e=O.e,l.c=O.c.slice());return}if((x=typeof O=="number")&&O*0==0){if(l.s=1/O<0?(O=-O,-1):1,O===~~O){for(v=0,g=O;g>=10;g/=10,v++);v>I?l.c=l.e=null:(l.e=v,l.c=[O]);return}_=String(O)}else{if(!Mq.test(_=String(O)))return i(l,_,x);l.s=_.charCodeAt(0)==45?(_=_.slice(1),-1):1}(v=_.indexOf("."))>-1&&(_=_.replace(".","")),(g=_.search(/e/i))>0?(v<0&&(v=g),v+=+_.slice(g+1),_=_.substring(0,g)):v<0&&(v=_.length)}else{if(xr(E,2,X.length,"Base"),E==10&&V)return l=new q(O),Te(l,u+l.e+1,h);if(_=String(O),x=typeof O=="number"){if(O*0!=0)return i(l,_,x,E);if(l.s=1/O<0?(_=_.slice(1),-1):1,q.DEBUG&&_.replace(/^0\.0*|\./,"").length>15)throw Error(N4+O)}else l.s=_.charCodeAt(0)===45?(_=_.slice(1),-1):1;for(f=X.slice(0,E),v=g=0,S=_.length;g<S;g++)if(f.indexOf(c=_.charAt(g))<0){if(c=="."){if(g>v){v=S;continue}}else if(!p&&(_==_.toUpperCase()&&(_=_.toLowerCase())||_==_.toLowerCase()&&(_=_.toUpperCase()))){p=!0,g=-1,v=0;continue}return i(l,String(O),x,E)}x=!1,_=r(_,E,10,l.s),(v=_.indexOf("."))>-1?_=_.replace(".",""):v=_.length}for(g=0;_.charCodeAt(g)===48;g++);for(S=_.length;_.charCodeAt(--S)===48;);if(_=_.slice(g,++S)){if(S-=g,x&&q.DEBUG&&S>15&&(O>Ub||O!==On(O)))throw Error(N4+l.s*O);if((v=v-g-1)>I)l.c=l.e=null;else if(v<T)l.c=[l.e=0];else{if(l.e=v,l.c=[],g=(v+1)%tt,v<0&&(g+=tt),g<S){for(g&&l.c.push(+_.slice(0,g)),S-=tt;g<S;)l.c.push(+_.slice(g,g+=tt));g=tt-(_=_.slice(g)).length}else g-=S;for(;g--;_+="0");l.c.push(+_)}}else l.c=[l.e=0]}q.clone=P4,q.ROUND_UP=0,q.ROUND_DOWN=1,q.ROUND_CEIL=2,q.ROUND_FLOOR=3,q.ROUND_HALF_UP=4,q.ROUND_HALF_DOWN=5,q.ROUND_HALF_EVEN=6,q.ROUND_HALF_CEIL=7,q.ROUND_HALF_FLOOR=8,q.EUCLID=9,q.config=q.set=function(O){var E,f;if(O!=null)if(typeof O=="object"){if(O.hasOwnProperty(E="DECIMAL_PLACES")&&(f=O[E],xr(f,0,ri,E),u=f),O.hasOwnProperty(E="ROUNDING_MODE")&&(f=O[E],xr(f,0,8,E),h=f),O.hasOwnProperty(E="EXPONENTIAL_AT")&&(f=O[E],f&&f.pop?(xr(f[0],-ri,0,E),xr(f[1],0,ri,E),b=f[0],w=f[1]):(xr(f,-ri,ri,E),b=-(w=f<0?-f:f))),O.hasOwnProperty(E="RANGE"))if(f=O[E],f&&f.pop)xr(f[0],-ri,-1,E),xr(f[1],1,ri,E),T=f[0],I=f[1];else if(xr(f,-ri,ri,E),f)T=-(I=f<0?-f:f);else throw Error(ji+E+" cannot be zero: "+f);if(O.hasOwnProperty(E="CRYPTO"))if(f=O[E],f===!!f)if(f)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))B=f;else throw B=!f,Error(ji+"crypto unavailable");else B=f;else throw Error(ji+E+" not true or false: "+f);if(O.hasOwnProperty(E="MODULO_MODE")&&(f=O[E],xr(f,0,9,E),M=f),O.hasOwnProperty(E="POW_PRECISION")&&(f=O[E],xr(f,0,ri,E),P=f),O.hasOwnProperty(E="FORMAT"))if(f=O[E],typeof f=="object")L=f;else throw Error(ji+E+" not an object: "+f);if(O.hasOwnProperty(E="ALPHABET"))if(f=O[E],typeof f=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(f))V=f.slice(0,10)=="0123456789",X=f;else throw Error(ji+E+" invalid: "+f)}else throw Error(ji+"Object expected: "+O);return{DECIMAL_PLACES:u,ROUNDING_MODE:h,EXPONENTIAL_AT:[b,w],RANGE:[T,I],CRYPTO:B,MODULO_MODE:M,POW_PRECISION:P,FORMAT:L,ALPHABET:X}},q.isBigNumber=function(O){if(!O||O._isBigNumber!==!0)return!1;if(!q.DEBUG)return!0;var E,f,c=O.c,p=O.e,v=O.s;e:if({}.toString.call(c)=="[object Array]"){if((v===1||v===-1)&&p>=-ri&&p<=ri&&p===On(p)){if(c[0]===0){if(p===0&&c.length===1)return!0;break e}if(E=(p+1)%tt,E<1&&(E+=tt),String(c[0]).length==E){for(E=0;E<c.length;E++)if(f=c[E],f<0||f>=es||f!==On(f))break e;if(f!==0)return!0}}}else if(c===null&&p===null&&(v===null||v===1||v===-1))return!0;throw Error(ji+"Invalid BigNumber: "+O)},q.maximum=q.max=function(){return fe(arguments,-1)},q.minimum=q.min=function(){return fe(arguments,1)},q.random=function(){var O=9007199254740992,E=Math.random()*O&2097151?function(){return On(Math.random()*O)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(f){var c,p,v,g,x,S=0,_=[],l=new q(a);if(f==null?f=u:xr(f,0,ri),g=Db(f/tt),B)if(crypto.getRandomValues){for(c=crypto.getRandomValues(new Uint32Array(g*=2));S<g;)x=c[S]*131072+(c[S+1]>>>11),x>=9e15?(p=crypto.getRandomValues(new Uint32Array(2)),c[S]=p[0],c[S+1]=p[1]):(_.push(x%1e14),S+=2);S=g/2}else if(crypto.randomBytes){for(c=crypto.randomBytes(g*=7);S<g;)x=(c[S]&31)*281474976710656+c[S+1]*1099511627776+c[S+2]*4294967296+c[S+3]*16777216+(c[S+4]<<16)+(c[S+5]<<8)+c[S+6],x>=9e15?crypto.randomBytes(7).copy(c,S):(_.push(x%1e14),S+=7);S=g/7}else throw B=!1,Error(ji+"crypto unavailable");if(!B)for(;S<g;)x=E(),x<9e15&&(_[S++]=x%1e14);for(g=_[--S],f%=tt,g&&f&&(x=qb[tt-f],_[S]=On(g/x)*x);_[S]===0;_.pop(),S--);if(S<0)_=[v=0];else{for(v=-1;_[0]===0;_.splice(0,1),v-=tt);for(S=1,x=_[0];x>=10;x/=10,S++);S<tt&&(v-=tt-S)}return l.e=v,l.c=_,l}}(),q.sum=function(){for(var O=1,E=arguments,f=new q(E[0]);O<E.length;)f=f.plus(E[O++]);return f},r=function(){var O="0123456789";function E(f,c,p,v){for(var g,x=[0],S,_=0,l=f.length;_<l;){for(S=x.length;S--;x[S]*=c);for(x[0]+=v.indexOf(f.charAt(_++)),g=0;g<x.length;g++)x[g]>p-1&&(x[g+1]==null&&(x[g+1]=0),x[g+1]+=x[g]/p|0,x[g]%=p)}return x.reverse()}return function(f,c,p,v,g){var x,S,_,l,m,A,U,j,Z=f.indexOf("."),se=u,ae=h;for(Z>=0&&(l=P,P=0,f=f.replace(".",""),j=new q(c),A=j.pow(f.length-Z),P=l,j.c=E(va(An(A.c),A.e,"0"),10,p,O),j.e=j.c.length),U=E(f,c,p,g?(x=X,O):(x=O,X)),_=l=U.length;U[--l]==0;U.pop());if(!U[0])return x.charAt(0);if(Z<0?--_:(A.c=U,A.e=_,A.s=v,A=t(A,j,se,ae,p),U=A.c,m=A.r,_=A.e),S=_+se+1,Z=U[S],l=p/2,m=m||S<0||U[S+1]!=null,m=ae<4?(Z!=null||m)&&(ae==0||ae==(A.s<0?3:2)):Z>l||Z==l&&(ae==4||m||ae==6&&U[S-1]&1||ae==(A.s<0?8:7)),S<1||!U[0])f=m?va(x.charAt(1),-se,x.charAt(0)):x.charAt(0);else{if(U.length=S,m)for(--p;++U[--S]>p;)U[S]=0,S||(++_,U=[1].concat(U));for(l=U.length;!U[--l];);for(Z=0,f="";Z<=l;f+=x.charAt(U[Z++]));f=va(f,_,x.charAt(0))}return f}}(),t=function(){function O(c,p,v){var g,x,S,_,l=0,m=c.length,A=p%po,U=p/po|0;for(c=c.slice();m--;)S=c[m]%po,_=c[m]/po|0,g=U*S+_*A,x=A*S+g%po*po+l,l=(x/v|0)+(g/po|0)+U*_,c[m]=x%v;return l&&(c=[l].concat(c)),c}function E(c,p,v,g){var x,S;if(v!=g)S=v>g?1:-1;else for(x=S=0;x<v;x++)if(c[x]!=p[x]){S=c[x]>p[x]?1:-1;break}return S}function f(c,p,v,g){for(var x=0;v--;)c[v]-=x,x=c[v]<p[v]?1:0,c[v]=x*g+c[v]-p[v];for(;!c[0]&&c.length>1;c.splice(0,1));}return function(c,p,v,g,x){var S,_,l,m,A,U,j,Z,se,ae,he,Ee,me,dt,St,Oe,st,rt=c.s==p.s?1:-1,Re=c.c,Ae=p.c;if(!Re||!Re[0]||!Ae||!Ae[0])return new q(!c.s||!p.s||(Re?Ae&&Re[0]==Ae[0]:!Ae)?NaN:Re&&Re[0]==0||!Ae?rt*0:rt/0);for(Z=new q(rt),se=Z.c=[],_=c.e-p.e,rt=v+_+1,x||(x=es,_=kn(c.e/tt)-kn(p.e/tt),rt=rt/tt|0),l=0;Ae[l]==(Re[l]||0);l++);if(Ae[l]>(Re[l]||0)&&_--,rt<0)se.push(1),m=!0;else{for(dt=Re.length,Oe=Ae.length,l=0,rt+=2,A=On(x/(Ae[0]+1)),A>1&&(Ae=O(Ae,A,x),Re=O(Re,A,x),Oe=Ae.length,dt=Re.length),me=Oe,ae=Re.slice(0,Oe),he=ae.length;he<Oe;ae[he++]=0);st=Ae.slice(),st=[0].concat(st),St=Ae[0],Ae[1]>=x/2&&St++;do{if(A=0,S=E(Ae,ae,Oe,he),S<0){if(Ee=ae[0],Oe!=he&&(Ee=Ee*x+(ae[1]||0)),A=On(Ee/St),A>1)for(A>=x&&(A=x-1),U=O(Ae,A,x),j=U.length,he=ae.length;E(U,ae,j,he)==1;)A--,f(U,Oe<j?st:Ae,j,x),j=U.length,S=1;else A==0&&(S=A=1),U=Ae.slice(),j=U.length;if(j<he&&(U=[0].concat(U)),f(ae,U,he,x),he=ae.length,S==-1)for(;E(Ae,ae,Oe,he)<1;)A++,f(ae,Oe<he?st:Ae,he,x),he=ae.length}else S===0&&(A++,ae=[0]);se[l++]=A,ae[0]?ae[he++]=Re[me]||0:(ae=[Re[me]],he=1)}while((me++<dt||ae[0]!=null)&&rt--);m=ae[0]!=null,se[0]||se.splice(0,1)}if(x==es){for(l=1,rt=se[0];rt>=10;rt/=10,l++);Te(Z,v+(Z.e=l+_*tt-1)+1,g,m)}else Z.e=_,Z.r=+m;return Z}}();function ee(O,E,f,c){var p,v,g,x,S;if(f==null?f=h:xr(f,0,8),!O.c)return O.toString();if(p=O.c[0],g=O.e,E==null)S=An(O.c),S=c==1||c==2&&(g<=b||g>=w)?Cd(S,g):va(S,g,"0");else if(O=Te(new q(O),E,f),v=O.e,S=An(O.c),x=S.length,c==1||c==2&&(E<=v||v<=b)){for(;x<E;S+="0",x++);S=Cd(S,v)}else if(E-=g,S=va(S,v,"0"),v+1>x){if(--E>0)for(S+=".";E--;S+="0");}else if(E+=v-x,E>0)for(v+1==x&&(S+=".");E--;S+="0");return O.s<0&&p?"-"+S:S}function fe(O,E){for(var f,c,p=1,v=new q(O[0]);p<O.length;p++)c=new q(O[p]),(!c.s||(f=vc(v,c))===E||f===0&&v.s===E)&&(v=c);return v}function _e(O,E,f){for(var c=1,p=E.length;!E[--p];E.pop());for(p=E[0];p>=10;p/=10,c++);return(f=c+f*tt-1)>I?O.c=O.e=null:f<T?O.c=[O.e=0]:(O.e=f,O.c=E),O}i=function(){var O=/^(-?)0([xbo])(?=\w[\w.]*$)/i,E=/^([^.]+)\.$/,f=/^\.([^.]+)$/,c=/^-?(Infinity|NaN)$/,p=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(v,g,x,S){var _,l=x?g:g.replace(p,"");if(c.test(l))v.s=isNaN(l)?null:l<0?-1:1;else{if(!x&&(l=l.replace(O,function(m,A,U){return _=(U=U.toLowerCase())=="x"?16:U=="b"?2:8,!S||S==_?A:m}),S&&(_=S,l=l.replace(E,"$1").replace(f,"0.$1")),g!=l))return new q(l,_);if(q.DEBUG)throw Error(ji+"Not a"+(S?" base "+S:"")+" number: "+g);v.s=null}v.c=v.e=null}}();function Te(O,E,f,c){var p,v,g,x,S,_,l,m=O.c,A=qb;if(m){e:{for(p=1,x=m[0];x>=10;x/=10,p++);if(v=E-p,v<0)v+=tt,g=E,S=m[_=0],l=On(S/A[p-g-1]%10);else if(_=Db((v+1)/tt),_>=m.length)if(c){for(;m.length<=_;m.push(0));S=l=0,p=1,v%=tt,g=v-tt+1}else break e;else{for(S=x=m[_],p=1;x>=10;x/=10,p++);v%=tt,g=v-tt+p,l=g<0?0:On(S/A[p-g-1]%10)}if(c=c||E<0||m[_+1]!=null||(g<0?S:S%A[p-g-1]),c=f<4?(l||c)&&(f==0||f==(O.s<0?3:2)):l>5||l==5&&(f==4||c||f==6&&(v>0?g>0?S/A[p-g]:0:m[_-1])%10&1||f==(O.s<0?8:7)),E<1||!m[0])return m.length=0,c?(E-=O.e+1,m[0]=A[(tt-E%tt)%tt],O.e=-E||0):m[0]=O.e=0,O;if(v==0?(m.length=_,x=1,_--):(m.length=_+1,x=A[tt-v],m[_]=g>0?On(S/A[p-g]%A[g])*x:0),c)for(;;)if(_==0){for(v=1,g=m[0];g>=10;g/=10,v++);for(g=m[0]+=x,x=1;g>=10;g/=10,x++);v!=x&&(O.e++,m[0]==es&&(m[0]=1));break}else{if(m[_]+=x,m[_]!=es)break;m[_--]=0,x=1}for(v=m.length;m[--v]===0;m.pop());}O.e>I?O.c=O.e=null:O.e<T&&(O.c=[O.e=0])}return O}function be(O){var E,f=O.e;return f===null?O.toString():(E=An(O.c),E=f<=b||f>=w?Cd(E,f):va(E,f,"0"),O.s<0?"-"+E:E)}return n.absoluteValue=n.abs=function(){var O=new q(this);return O.s<0&&(O.s=1),O},n.comparedTo=function(O,E){return vc(this,new q(O,E))},n.decimalPlaces=n.dp=function(O,E){var f,c,p,v=this;if(O!=null)return xr(O,0,ri),E==null?E=h:xr(E,0,8),Te(new q(v),O+v.e+1,E);if(!(f=v.c))return null;if(c=((p=f.length-1)-kn(this.e/tt))*tt,p=f[p])for(;p%10==0;p/=10,c--);return c<0&&(c=0),c},n.dividedBy=n.div=function(O,E){return t(this,new q(O,E),u,h)},n.dividedToIntegerBy=n.idiv=function(O,E){return t(this,new q(O,E),0,1)},n.exponentiatedBy=n.pow=function(O,E){var f,c,p,v,g,x,S,_,l,m=this;if(O=new q(O),O.c&&!O.isInteger())throw Error(ji+"Exponent not an integer: "+be(O));if(E!=null&&(E=new q(E)),x=O.e>14,!m.c||!m.c[0]||m.c[0]==1&&!m.e&&m.c.length==1||!O.c||!O.c[0])return l=new q(Math.pow(+be(m),x?O.s*(2-Md(O)):+be(O))),E?l.mod(E):l;if(S=O.s<0,E){if(E.c?!E.c[0]:!E.s)return new q(NaN);c=!S&&m.isInteger()&&E.isInteger(),c&&(m=m.mod(E))}else{if(O.e>9&&(m.e>0||m.e<-1||(m.e==0?m.c[0]>1||x&&m.c[1]>=24e7:m.c[0]<8e13||x&&m.c[0]<=9999975e7)))return v=m.s<0&&Md(O)?-0:0,m.e>-1&&(v=1/v),new q(S?1/v:v);P&&(v=Db(P/tt+2))}for(x?(f=new q(.5),S&&(O.s=1),_=Md(O)):(p=Math.abs(+be(O)),_=p%2),l=new q(a);;){if(_){if(l=l.times(m),!l.c)break;v?l.c.length>v&&(l.c.length=v):c&&(l=l.mod(E))}if(p){if(p=On(p/2),p===0)break;_=p%2}else if(O=O.times(f),Te(O,O.e+1,1),O.e>14)_=Md(O);else{if(p=+be(O),p===0)break;_=p%2}m=m.times(m),v?m.c&&m.c.length>v&&(m.c.length=v):c&&(m=m.mod(E))}return c?l:(S&&(l=a.div(l)),E?l.mod(E):v?Te(l,P,h,g):l)},n.integerValue=function(O){var E=new q(this);return O==null?O=h:xr(O,0,8),Te(E,E.e+1,O)},n.isEqualTo=n.eq=function(O,E){return vc(this,new q(O,E))===0},n.isFinite=function(){return!!this.c},n.isGreaterThan=n.gt=function(O,E){return vc(this,new q(O,E))>0},n.isGreaterThanOrEqualTo=n.gte=function(O,E){return(E=vc(this,new q(O,E)))===1||E===0},n.isInteger=function(){return!!this.c&&kn(this.e/tt)>this.c.length-2},n.isLessThan=n.lt=function(O,E){return vc(this,new q(O,E))<0},n.isLessThanOrEqualTo=n.lte=function(O,E){return(E=vc(this,new q(O,E)))===-1||E===0},n.isNaN=function(){return!this.s},n.isNegative=function(){return this.s<0},n.isPositive=function(){return this.s>0},n.isZero=function(){return!!this.c&&this.c[0]==0},n.minus=function(O,E){var f,c,p,v,g=this,x=g.s;if(O=new q(O,E),E=O.s,!x||!E)return new q(NaN);if(x!=E)return O.s=-E,g.plus(O);var S=g.e/tt,_=O.e/tt,l=g.c,m=O.c;if(!S||!_){if(!l||!m)return l?(O.s=-E,O):new q(m?g:NaN);if(!l[0]||!m[0])return m[0]?(O.s=-E,O):new q(l[0]?g:h==3?-0:0)}if(S=kn(S),_=kn(_),l=l.slice(),x=S-_){for((v=x<0)?(x=-x,p=l):(_=S,p=m),p.reverse(),E=x;E--;p.push(0));p.reverse()}else for(c=(v=(x=l.length)<(E=m.length))?x:E,x=E=0;E<c;E++)if(l[E]!=m[E]){v=l[E]<m[E];break}if(v&&(p=l,l=m,m=p,O.s=-O.s),E=(c=m.length)-(f=l.length),E>0)for(;E--;l[f++]=0);for(E=es-1;c>x;){if(l[--c]<m[c]){for(f=c;f&&!l[--f];l[f]=E);--l[f],l[c]+=es}l[c]-=m[c]}for(;l[0]==0;l.splice(0,1),--_);return l[0]?_e(O,l,_):(O.s=h==3?-1:1,O.c=[O.e=0],O)},n.modulo=n.mod=function(O,E){var f,c,p=this;return O=new q(O,E),!p.c||!O.s||O.c&&!O.c[0]?new q(NaN):!O.c||p.c&&!p.c[0]?new q(p):(M==9?(c=O.s,O.s=1,f=t(p,O,0,3),O.s=c,f.s*=c):f=t(p,O,0,M),O=p.minus(f.times(O)),!O.c[0]&&M==1&&(O.s=p.s),O)},n.multipliedBy=n.times=function(O,E){var f,c,p,v,g,x,S,_,l,m,A,U,j,Z,se,ae=this,he=ae.c,Ee=(O=new q(O,E)).c;if(!he||!Ee||!he[0]||!Ee[0])return!ae.s||!O.s||he&&!he[0]&&!Ee||Ee&&!Ee[0]&&!he?O.c=O.e=O.s=null:(O.s*=ae.s,!he||!Ee?O.c=O.e=null:(O.c=[0],O.e=0)),O;for(c=kn(ae.e/tt)+kn(O.e/tt),O.s*=ae.s,S=he.length,m=Ee.length,S<m&&(j=he,he=Ee,Ee=j,p=S,S=m,m=p),p=S+m,j=[];p--;j.push(0));for(Z=es,se=po,p=m;--p>=0;){for(f=0,A=Ee[p]%se,U=Ee[p]/se|0,g=S,v=p+g;v>p;)_=he[--g]%se,l=he[g]/se|0,x=U*_+l*A,_=A*_+x%se*se+j[v]+f,f=(_/Z|0)+(x/se|0)+U*l,j[v--]=_%Z;j[v]=f}return f?++c:j.splice(0,1),_e(O,j,c)},n.negated=function(){var O=new q(this);return O.s=-O.s||null,O},n.plus=function(O,E){var f,c=this,p=c.s;if(O=new q(O,E),E=O.s,!p||!E)return new q(NaN);if(p!=E)return O.s=-E,c.minus(O);var v=c.e/tt,g=O.e/tt,x=c.c,S=O.c;if(!v||!g){if(!x||!S)return new q(p/0);if(!x[0]||!S[0])return S[0]?O:new q(x[0]?c:p*0)}if(v=kn(v),g=kn(g),x=x.slice(),p=v-g){for(p>0?(g=v,f=S):(p=-p,f=x),f.reverse();p--;f.push(0));f.reverse()}for(p=x.length,E=S.length,p-E<0&&(f=S,S=x,x=f,E=p),p=0;E;)p=(x[--E]=x[E]+S[E]+p)/es|0,x[E]=es===x[E]?0:x[E]%es;return p&&(x=[p].concat(x),++g),_e(O,x,g)},n.precision=n.sd=function(O,E){var f,c,p,v=this;if(O!=null&&O!==!!O)return xr(O,1,ri),E==null?E=h:xr(E,0,8),Te(new q(v),O,E);if(!(f=v.c))return null;if(p=f.length-1,c=p*tt+1,p=f[p]){for(;p%10==0;p/=10,c--);for(p=f[0];p>=10;p/=10,c++);}return O&&v.e+1>c&&(c=v.e+1),c},n.shiftedBy=function(O){return xr(O,-Ub,Ub),this.times("1e"+O)},n.squareRoot=n.sqrt=function(){var O,E,f,c,p,v=this,g=v.c,x=v.s,S=v.e,_=u+4,l=new q("0.5");if(x!==1||!g||!g[0])return new q(!x||x<0&&(!g||g[0])?NaN:g?v:1/0);if(x=Math.sqrt(+be(v)),x==0||x==1/0?(E=An(g),(E.length+S)%2==0&&(E+="0"),x=Math.sqrt(+E),S=kn((S+1)/2)-(S<0||S%2),x==1/0?E="5e"+S:(E=x.toExponential(),E=E.slice(0,E.indexOf("e")+1)+S),f=new q(E)):f=new q(x+""),f.c[0]){for(S=f.e,x=S+_,x<3&&(x=0);;)if(p=f,f=l.times(p.plus(t(v,p,_,1))),An(p.c).slice(0,x)===(E=An(f.c)).slice(0,x))if(f.e<S&&--x,E=E.slice(x-3,x+1),E=="9999"||!c&&E=="4999"){if(!c&&(Te(p,p.e+u+2,0),p.times(p).eq(v))){f=p;break}_+=4,x+=4,c=1}else{(!+E||!+E.slice(1)&&E.charAt(0)=="5")&&(Te(f,f.e+u+2,1),O=!f.times(f).eq(v));break}}return Te(f,f.e+u+1,h,O)},n.toExponential=function(O,E){return O!=null&&(xr(O,0,ri),O++),ee(this,O,E,1)},n.toFixed=function(O,E){return O!=null&&(xr(O,0,ri),O=O+this.e+1),ee(this,O,E)},n.toFormat=function(O,E,f){var c,p=this;if(f==null)O!=null&&E&&typeof E=="object"?(f=E,E=null):O&&typeof O=="object"?(f=O,O=E=null):f=L;else if(typeof f!="object")throw Error(ji+"Argument not an object: "+f);if(c=p.toFixed(O,E),p.c){var v,g=c.split("."),x=+f.groupSize,S=+f.secondaryGroupSize,_=f.groupSeparator||"",l=g[0],m=g[1],A=p.s<0,U=A?l.slice(1):l,j=U.length;if(S&&(v=x,x=S,S=v,j-=v),x>0&&j>0){for(v=j%x||x,l=U.substr(0,v);v<j;v+=x)l+=_+U.substr(v,x);S>0&&(l+=_+U.slice(v)),A&&(l="-"+l)}c=m?l+(f.decimalSeparator||"")+((S=+f.fractionGroupSize)?m.replace(new RegExp("\\d{"+S+"}\\B","g"),"$&"+(f.fractionGroupSeparator||"")):m):l}return(f.prefix||"")+c+(f.suffix||"")},n.toFraction=function(O){var E,f,c,p,v,g,x,S,_,l,m,A,U=this,j=U.c;if(O!=null&&(x=new q(O),!x.isInteger()&&(x.c||x.s!==1)||x.lt(a)))throw Error(ji+"Argument "+(x.isInteger()?"out of range: ":"not an integer: ")+be(x));if(!j)return new q(U);for(E=new q(a),_=f=new q(a),c=S=new q(a),A=An(j),v=E.e=A.length-U.e-1,E.c[0]=qb[(g=v%tt)<0?tt+g:g],O=!O||x.comparedTo(E)>0?v>0?E:_:x,g=I,I=1/0,x=new q(A),S.c[0]=0;l=t(x,E,0,1),p=f.plus(l.times(c)),p.comparedTo(O)!=1;)f=c,c=p,_=S.plus(l.times(p=_)),S=p,E=x.minus(l.times(p=E)),x=p;return p=t(O.minus(f),c,0,1),S=S.plus(p.times(_)),f=f.plus(p.times(c)),S.s=_.s=U.s,v=v*2,m=t(_,c,v,h).minus(U).abs().comparedTo(t(S,f,v,h).minus(U).abs())<1?[_,c]:[S,f],I=g,m},n.toNumber=function(){return+be(this)},n.toPrecision=function(O,E){return O!=null&&xr(O,1,ri),ee(this,O,E,2)},n.toString=function(O){var E,f=this,c=f.s,p=f.e;return p===null?c?(E="Infinity",c<0&&(E="-"+E)):E="NaN":(O==null?E=p<=b||p>=w?Cd(An(f.c),p):va(An(f.c),p,"0"):O===10&&V?(f=Te(new q(f),u+p+1,h),E=va(An(f.c),f.e,"0")):(xr(O,2,X.length,"Base"),E=r(va(An(f.c),p,"0"),10,O,c,!0)),c<0&&f.c[0]&&(E="-"+E)),E},n.valueOf=n.toJSON=function(){return be(this)},n._isBigNumber=!0,n[Symbol.toStringTag]="BigNumber",n[Symbol.for("nodejs.util.inspect.custom")]=n.valueOf,e!=null&&q.set(e),q}function kn(e){var t=e|0;return e>0||e===t?t:t-1}function An(e){for(var t,r,i=1,n=e.length,a=e[0]+"";i<n;){for(t=e[i++]+"",r=tt-t.length;r--;t="0"+t);a+=t}for(n=a.length;a.charCodeAt(--n)===48;);return a.slice(0,n+1||1)}function vc(e,t){var r,i,n=e.c,a=t.c,u=e.s,h=t.s,b=e.e,w=t.e;if(!u||!h)return null;if(r=n&&!n[0],i=a&&!a[0],r||i)return r?i?0:-h:u;if(u!=h)return u;if(r=u<0,i=b==w,!n||!a)return i?0:!n^r?1:-1;if(!i)return b>w^r?1:-1;for(h=(b=n.length)<(w=a.length)?b:w,u=0;u<h;u++)if(n[u]!=a[u])return n[u]>a[u]^r?1:-1;return b==w?0:b>w^r?1:-1}function xr(e,t,r,i){if(e<t||e>r||e!==On(e))throw Error(ji+(i||"Argument")+(typeof e=="number"?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Md(e){var t=e.c.length-1;return kn(e.e/tt)==t&&e.c[t]%2!=0}function Cd(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function va(e,t,r){var i,n;if(t<0){for(n=r+".";++t;n+=r);e=n+e}else if(i=e.length,++t>i){for(n=r,t-=i;--t;n+=r);e+=n}else t<i&&(e=e.slice(0,t)+"."+e.slice(t));return e}var Cq=P4(),Hr=Cq;var KF=Ir(L4(),1),WF=Ir(Yb(),1),GF=Ir(Jb(),1),$d=Ir(sx(),1),$F=Ir(BT(),1);var MT=$d.default;var ox="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",XF=(e,t)=>{let r="1"+"0".repeat(t),i=new Hr(e.toString(10),10);return Cl(i.times(r).toString(16))},YF=(e,t)=>{let r="1"+"0".repeat(t),i=new Hr(e.toString(),10);return parseFloat(i.dividedBy(r).toString())},ZF=e=>{typeof e=="string"&&(e=new Uint8Array(Buffer.from(e)));let t=[],r=BigInt("0x"+Buffer.from(e).toString("hex"));for(;r>BigInt(0);){let i=Number(r%BigInt(58));t.unshift(ox[i]),r=r/BigInt(58)}for(let i=0;i<e.length&&e[i]===0;i++)t.unshift(ox[0]);return t.join("")},JF=e=>{let t=BigInt(0);for(let n=0;n<e.length;n++)t=t*BigInt(58)+BigInt(ox.indexOf(e[n]));let r=t.toString(16),i=r.length%2===0?r:"0"+r;return new Uint8Array(Buffer.from(i,"hex"))},QF=e=>Buffer.from(e).toString("utf8"),eH=e=>Buffer.from(e,"utf8"),tH=e=>!isNaN(Number(e)),cx=async e=>{await new Promise(t=>setTimeout(t,e))},ux=(e,t)=>JSON.stringify(e)===JSON.stringify(t),rH=e=>{let[t,r]=e.toExponential().split("e").map(n=>parseFloat(n)),i=(t*Math.pow(10,r)).toString();return i=parseFloat(i).toString(),i},Gl=async e=>await new Promise((t,r)=>{let i;typeof window<"u"?i=new WebSocket(e):i=new $d.default(e),i.onopen=()=>{t(!0),i.close()},i.onerror=n=>{r(new Error(n.message)),i.close()}}),Xd={add:(e,t,r=18)=>parseFloat(new Hr(e).plus(new Hr(t)).toFixed(r)),sub:(e,t,r=18)=>parseFloat(new Hr(e).minus(new Hr(t)).toFixed(r)),mul:(e,t,r=18)=>parseFloat(new Hr(e).times(new Hr(t)).toFixed(r)),div:(e,t,r=18)=>parseFloat(new Hr(e).div(new Hr(t)).toFixed(r)),pow:(e,t,r=18)=>parseFloat(new Hr(e).pow(t).toFixed(r)),sqrt:(e,t=18)=>parseFloat(new Hr(e).sqrt().toFixed(t)),abs:(e,t=18)=>parseFloat(new Hr(e).absoluteValue().toFixed(t)),ceil:(e,t=18)=>parseFloat(new Hr(e).integerValue(Hr.ROUND_CEIL).toFixed(t)),floor:(e,t=18)=>parseFloat(new Hr(e).integerValue(Hr.ROUND_FLOOR).toFixed(t)),round:(e,t=18)=>parseFloat(new Hr(e).integerValue(Hr.ROUND_HALF_UP).toFixed(t))},iH=()=>typeof window>"u"?!1:function(e){return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(e.substr(0,4)))}(navigator.userAgent||navigator.vendor||window.opera),nH=()=>{if(typeof window>"u")return!1;let e=window.navigator;if(window.WebViewJavascriptBridge||window.webkit&&window.webkit.messageHandlers||e.userAgent.match(/WebView/i))return!0;let t=e.standalone,r=e.userAgent.toLowerCase(),i=/safari/.test(r);return/iphone|ipod|ipad/.test(r)?!t&&!i:r.includes("wv")};var lx={};ka(lx,{AssetDirectionEnum:()=>fx,ErrorTypeEnum:()=>$l,TransactionListenerProcessIndex:()=>Jd,TransactionStatusEnum:()=>Zd,TransactionTypeEnum:()=>Yd,WalletPlatformEnum:()=>CT});var fx=(r=>(r.INCOMING="INCOMING",r.OUTGOING="OUTGOING",r))(fx||{}),Yd=(a=>(a.GENERAL="GENERAL",a.CONTRACT="CONTRACT",a.COIN="COIN",a.TOKEN="TOKEN",a.NFT="NFT",a))(Yd||{}),Zd=(i=>(i.FAILED="FAILED",i.PENDING="PENDING",i.CONFIRMED="CONFIRMED",i))(Zd||{}),$l=(c=>(c.RPC_TIMEOUT="RPC_TIMEOUT",c.RPC_REQUEST_ERROR="RPC_REQUEST_ERROR",c.RPC_ACCESS_DENIED="RPC_ACCESS_DENIED",c.WS_URL_NOT_DEFINED="WS_URL_NOT_DEFINED",c.WS_CONNECTION_FAILED="WS_CONNECTION_FAILED",c.UNACCEPTED_CHAIN="UNACCEPTED_CHAIN",c.UNAUTHORIZED_ADDRESS="UNAUTHORIZED_ADDRESS",c.INSUFFICIENT_BALANCE="INSUFFICIENT_BALANCE",c.INVALID_AMOUNT="INVALID_AMOUNT",c.INVALID_ADDRESS="INVALID_ADDRESS",c.INVALID_PRIVATE_KEY="INVALID_PRIVATE_KEY",c.INVALID_PUBLIC_KEY="INVALID_PUBLIC_KEY",c.INVALID_TRANSACTION_ID="INVALID_TRANSACTION_ID",c.PROVIDER_IS_REQUIRED="PROVIDER_IS_REQUIRED",c.PROVIDER_IS_NOT_INITIALIZED="PROVIDER_IS_NOT_INITIALIZED",c.PROVIDER_IS_ALREADY_INITIALIZED="PROVIDER_IS_ALREADY_INITIALIZED",c.WALLET_ALREADY_PROCESSING="WALLET_ALREADY_PROCESSING",c.WALLET_CONNECT_REJECTED="WALLET_CONNECT_REJECTED",c.WALLET_REQUEST_REJECTED="WALLET_REQUEST_REJECTED",c.WALLET_CONNECTION_FAILED="WALLET_CONNECTION_FAILED",c.WALLET_CONNECTION_TIMEOUT="WALLET_CONNECTION_TIMEOUT",c.TRANSACTION_CREATION_FAILED="TRANSACTION_CREATION_FAILED",c.TRANSACTION_NOT_FOUND="TRANSACTION_NOT_FOUND",c.CLOSED_WALLETCONNECT_MODAL="CLOSED_WALLETCONNECT_MODAL",c.PROJECT_ID_IS_REQUIRED="PROJECT_ID_IS_REQUIRED",c.METADATA_IS_REQUIRED="METADATA_IS_REQUIRED",c.CONFIG_IS_REQUIRED="CONFIG_IS_REQUIRED",c))($l||{}),CT=(n=>(n.BROWSER="BROWSER",n.MOBILE="MOBILE",n.DESKTOP="DESKTOP",n.UNIVERSAL="UNIVERSAL",n))(CT||{});var Jd={GENERAL:"generalProcess",CONTRACT:"contractProcess",COIN:"coinProcess",TOKEN:"tokenProcess",NFT:"nftProcess"};var rs=class e{network;api;explorer;wsUrl;blockCypherToken;defaultBlockCypherToken="49d43a59a4f24d31a9731eb067ab971c";static _instance;constructor(t){this.update(t)}static get instance(){if(e._instance===void 0)throw new Error("PROVIDER_IS_NOT_INITIALIZED");return e._instance}static initialize(t){if(e._instance!==void 0)throw new Error("PROVIDER_IS_ALREADY_INITIALIZED");e._instance=new e(t)}async checkRpcConnection(t){try{let r=await In.get(t??this.createEndpoint("blocks/tip/height"));return r.status!==200?new Error(r.statusText+": "+JSON.stringify(r.data)):!0}catch(r){return r}}async checkWsConnection(t){try{let r=await Gl(t??this.wsUrl);return r instanceof Error?r:!0}catch(r){return r}}update(t){this.network=t,e._instance=this;let r=this.network.testnet??!1;if(this.blockCypherToken=this.network.blockCypherToken,r){this.api="https://blockstream.info/testnet/api/",this.explorer="https://blockstream.info/testnet/";let i=this.network.blockCypherToken??this.defaultBlockCypherToken;this.wsUrl="wss://socket.blockcypher.com/v1/btc/test3?token="+i}else this.api="https://blockstream.info/api/",this.explorer="https://blockstream.info/",this.network.blockCypherToken!==void 0?this.wsUrl="wss://socket.blockcypher.com/v1/btc/main?token="+this.network.blockCypherToken:this.wsUrl="wss://ws.blockchain.info/inv";this.network.rpcUrl=this.api,this.network.wsUrl=this.wsUrl}createEndpoint(t){return this.api+t}isTestnet(){return this.network?.testnet??!1}};var aH=Ir(zh(),1);var mx={};ka(mx,{Coin:()=>dx});var hx={};ka(hx,{base58Decode:()=>JF,base58Encode:()=>ZF,bufferToString:()=>QF,checkWebSocket:()=>Gl,fromSatoshi:()=>Is,hexToNumber:()=>YF,isMobile:()=>iH,isNumeric:()=>tH,isWebview:()=>nH,math:()=>Xd,numberToHex:()=>XF,objectsEqual:()=>ux,sleep:()=>cx,stringToBuffer:()=>eH,toHex:()=>Cl,toReadableString:()=>rH,toSatoshi:()=>px});var Is=e=>Xd.div(e,1e8,8),px=e=>Xd.mul(e,1e8,8);var _c=Ir(zh(),1);var Xl=class{rawData;signedData;provider;constructor(t,r){this.rawData=t,this.provider=r??rs.instance}async sign(t){return this.rawData.bitcoreLib.sign(t),this.signedData=this.rawData.bitcoreLib.serialize(),this}async send(){try{return(await In({method:"POST",url:this.provider.createEndpoint("tx"),data:this.signedData})).data}catch(t){throw new Error(JSON.stringify(t.response?.data))}}getRawData(){return this.rawData}getSignedData(){return this.signedData??""}};var dx=class{provider;constructor(t){this.provider=t??rs.instance}getName(){return"Bitcoin"}getSymbol(){return"BTC"}getDecimals(){return 8}async getBalance(t){let r=this.provider.createEndpoint("address/"+t),i=await In.get(r).then(a=>a.data),n=i.chain_stats.funded_txo_sum-i.chain_stats.spent_txo_sum;return Is(n)}async transfer(t,r,i){if(i<0)throw new Error("INVALID_AMOUNT");if(i>await this.getBalance(t))throw new Error("INSUFFICIENT_BALANCE");if(t===r)throw new Error("INVALID_ADDRESS");let n=[],a=new _c.Transaction,u=new _c.Address(t),h=px(i),b=await In.get(this.provider.createEndpoint("address/"+t+"/utxo")).then(w=>w.data);for(let w of b)n.push(new _c.Transaction.UnspentOutput({txId:w.txid,satoshis:w.value,address:u,outputIndex:w.vout,script:_c.Script.fromAddress(u)}));return a.from(n),a.change(t),a.to(r,h),new Xl({sender:t,receiver:r,amount:h,bitcoreLib:a})}};var vx={};ka(vx,{CoinTransaction:()=>Yl,Transaction:()=>yc});var LT=0,yc=class{id;provider;data=null;constructor(t,r){this.id=t,this.provider=r??rs.instance}async getData(){if(this.data!==null)return this.data;try{let t=(await In.get(this.provider.createEndpoint("tx/"+this.id))).data;return t?.txid!==this.id?this.data=null:this.data=t}catch(t){if(String(t?.response?.data).includes("Transaction not found")){if(LT>5)throw new Error("TRANSACTION_NOT_FOUND");return LT++,await cx(2e3),await this.getData()}throw new Error("RPC_REQUEST_ERROR")}}async wait(t=4e3){return await new Promise((r,i)=>{let n=async()=>{try{let a=await this.getStatus();if(a==="CONFIRMED"){r("CONFIRMED");return}else if(a==="FAILED"){i("FAILED");return}setTimeout(n,t)}catch{i("FAILED")}};n()})}getId(){return this.id}async getType(){return"COIN"}getUrl(){return this.provider.explorer+"tx/"+this.id}async getSigner(){return(await this.getData())?.vin[0].prevout.scriptpubkey_address??""}async getFee(){let t=await this.getData();return Is(t?.fee??0)}async getBlockNumber(){return(await this.getData())?.status?.block_height??0}async getBlockTimestamp(){return(await this.getData())?.status?.block_time??0}async getBlockConfirmationCount(){let t=await this.getData();return t===null?0:(await In.get(this.provider.createEndpoint("blocks/tip/height"))).data-t?.status?.block_height}async getStatus(){let t=await this.getData();return t===null?"PENDING":t.status?.block_height!==void 0?t.status.confirmed?"CONFIRMED":"FAILED":"PENDING"}};var Yl=class extends yc{async getReceiver(){return(await this.getData())?.vout[0].scriptpubkey_address??""}async getSender(){return await this.getSigner()}async getAmount(){let t=await this.getData();return Is(t?.vout[0].value??0)}async verifyTransfer(t,r,i){if(await this.getStatus()==="PENDING")return"PENDING";if(await this.getAmount()!==i)return"FAILED";if(t==="INCOMING"){if((await this.getReceiver()).toLowerCase()!==r.toLowerCase())return"FAILED"}else if((await this.getSender()).toLowerCase()!==r.toLowerCase())return"FAILED";return"CONFIRMED"}};var bx={};ka(bx,{TransactionListener:()=>gx,TransactionSigner:()=>Xl});var gx=class{type;provider;status=!1;callbacks=[];triggeredTransactions=[];filter;webSocket;dynamicStop=()=>{};constructor(t,r,i){this.type=t,this.filter=r??{},this.provider=i??rs.instance}stop(){this.status&&(this.status=!1,this.dynamicStop())}start(){this.status||(this.status=!0,this[Jd[this.type]]())}getStatus(){return this.status}async on(t){if(this.webSocket===void 0)try{await Gl(this.provider.wsUrl),this.webSocket=new MT(this.provider.wsUrl)}catch(r){throw new Error("WebSocket connection is not available"+(r instanceof Error?": "+r.message:""))}return this.start(),this.callbacks.push(t),!0}trigger(t){this.triggeredTransactions.includes(t.id)||(this.triggeredTransactions.push(t.id),this.callbacks.forEach(r=>{r(t)}))}isBlockCypherProcess(){return this.provider.isTestnet()||this.provider.blockCypherToken!==void 0}createMessage(t){let r;if(this.isBlockCypherProcess()){let i={event:"unconfirmed-tx",token:this.provider.blockCypherToken??this.provider.defaultBlockCypherToken};t!==void 0&&(i.address=t),r=JSON.stringify(i)}else r=JSON.stringify({op:"unconfirmed_sub"});return this.dynamicStop=()=>{this.isBlockCypherProcess()||this.webSocket.send(JSON.stringify({op:"unconfirmed_unsub"})),this.webSocket.close()},r}getValues(t){let r={txId:""};return this.isBlockCypherProcess()?(r.txId=t.hash,r.sender=t.inputs[0].addresses[0],r.receiver=t.outputs[0].addresses[0],r.amount=Is(t.outputs[0].value)):(r.txId=t.x.hash,r.receiver=t.x.out[0].addr,r.sender=t.x.inputs[0].prev_out.addr,r.amount=Is(t.x.out[0].value)),r}generalProcess(){let t=this.createMessage();this.webSocket.addEventListener("open",()=>{this.webSocket.send(t)}),this.webSocket.addEventListener("message",async r=>{let i=this.getValues(JSON.parse(r.data));this.filter?.signer!==void 0&&i.sender!==this.filter.signer.toLowerCase()||this.trigger(new yc(i.txId))})}contractProcess(){throw new Error("This method is not implemented for Bitcoin.")}coinProcess(){let t=this.filter;if(t.signer!==void 0&&t.sender!==void 0&&t.signer!==t.sender)throw new Error("Sender and signer must be the same in coin transactions. Or only one of them can be defined.");let r=t.sender??t.signer,i=this.createMessage(t.receiver);this.webSocket.addEventListener("open",()=>{this.webSocket.send(i)}),this.webSocket.addEventListener("message",async n=>{let a=JSON.parse(n.data),u={},h={};if(String(a.event).includes("events limit reached"))throw new Error("BlockCypher events limit reached.");let b=this.getValues(a);if(r!==void 0&&(u.sender=r.toLowerCase(),h.sender=b.sender?.toLowerCase()),t.receiver!==void 0&&(u.receiver=t.receiver.toLowerCase(),h.receiver=b.receiver?.toLowerCase()),!ux(u,h))return;let w=new Yl(b.txId);t.amount!==void 0&&b.amount!==t.amount||this.trigger(w)})}tokenProcess(){throw new Error("This method is not implemented for Bitcoin.")}nftProcess(){throw new Error("This method is not implemented for Bitcoin.")}};Pn.Address.prototype._classifyArguments=function(e,t,r){if((e instanceof Buffer||e instanceof Uint8Array)&&(e.length===20||e.length===32))return Pn.Address._transformHash(e,t,r);if((e instanceof Buffer||e instanceof Uint8Array)&&e.length>=21)return Pn.Address._transformBuffer(e,t,r);if(e instanceof Pn.PublicKey)return Pn.Address._transformPublicKey(e,t,r);if(e instanceof Pn.Script)return Pn.Address._transformScript(e,t);if(typeof e=="string")return Pn.Address._transformString(e,t,r);if(DT.default.isObject(e))return Pn.Address._transformObject(e);throw new TypeError("First argument is an unrecognized data format.")};0&&(module.exports={Provider,assets,bitcore,models,services,types,utils});
39
39
  /*! Bundled license information:
40
40
 
41
- mime-db/index.js:
42
- (*!
43
- * mime-db
44
- * Copyright(c) 2014 Jonathan Ong
45
- * Copyright(c) 2015-2022 Douglas Christopher Wilson
46
- * MIT Licensed
47
- *)
48
-
49
- mime-types/index.js:
50
- (*!
51
- * mime-types
52
- * Copyright(c) 2014 Jonathan Ong
53
- * Copyright(c) 2015 Douglas Christopher Wilson
54
- * MIT Licensed
55
- *)
56
-
57
41
  lodash/lodash.js:
58
42
  (**
59
43
  * @license
@@ -77,6 +61,22 @@ js-sha256/src/sha256.js:
77
61
  * @license MIT
78
62
  *)
79
63
 
64
+ mime-db/index.js:
65
+ (*!
66
+ * mime-db
67
+ * Copyright(c) 2014 Jonathan Ong
68
+ * Copyright(c) 2015-2022 Douglas Christopher Wilson
69
+ * MIT Licensed
70
+ *)
71
+
72
+ mime-types/index.js:
73
+ (*!
74
+ * mime-types
75
+ * Copyright(c) 2014 Jonathan Ong
76
+ * Copyright(c) 2015 Douglas Christopher Wilson
77
+ * MIT Licensed
78
+ *)
79
+
80
80
  @noble/hashes/esm/utils.js:
81
81
  (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
82
82
  */