figura-cli 0.23.0 → 0.23.2
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.js +150 -148
- package/dist/mcp.js +31 -31
- package/package.json +1 -1
- package/skills/fig/SKILL.md +96 -28
- package/skills/skills.json +8 -2
package/dist/index.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{createRequire as
|
|
3
|
-
`).forEach(function(W){if(Y=W.indexOf(":"),Q=W.substring(0,Y).trim().toLowerCase(),J=W.substring(Y+1).trim(),!Q||$[Q]&&
|
|
4
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(c){return c instanceof this?c:new this(c)}static concat(c,...$){let Q=new this(c);return $.forEach((J)=>Q.set(J)),Q}static accessor(c){let Q=(this[BG]=this[BG]={accessors:{}}).accessors,J=this.prototype;function Y(X){let W=HQ(X);if(!Q[W])yw(J,X),Q[W]=!0}return V.isArray(c)?c.forEach(Y):Y(c),this}};OQ.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);V.reduceDescriptors(OQ.prototype,({value:c},$)=>{let Q=$[0].toUpperCase()+$.slice(1);return{get:()=>c,set(J){this[Q]=J}}});V.freezeMethods(OQ);_c=OQ});function gw(c){if(V.hasOwnProp(c,"toJSON"))return!0;let $=Object.getPrototypeOf(c);while($&&$!==Object.prototype){if(V.hasOwnProp($,"toJSON"))return!0;$=Object.getPrototypeOf($)}return!1}function dw(c,$){let Q=new Set($.map((X)=>String(X).toLowerCase())),J=[],Y=(X)=>{if(X===null||typeof X!=="object")return X;if(V.isBuffer(X))return X;if(J.indexOf(X)!==-1)return;if(X instanceof _c)X=X.toJSON();J.push(X);let W;if(V.isArray(X))W=[],X.forEach((m,G)=>{let z=Y(m);if(!V.isUndefined(z))W[G]=z});else{if(!V.isPlainObject(X)&&gw(X))return J.pop(),X;W=Object.create(null);for(let[m,G]of Object.entries(X)){let z=Q.has(m.toLowerCase())?ow:Y(G);if(!V.isUndefined(z))W[m]=z}}return J.pop(),W};return Y(c)}var ow="[REDACTED ****]",yc,O;var X0=d(()=>{Lc();P0();yc=class yc extends Error{static from(c,$,Q,J,Y,X){let W=new yc(c.message,$||c.code,Q,J,Y);if(W.cause=c,W.name=c.name,c.status!=null&&W.status==null)W.status=c.status;return X&&Object.assign(W,X),W}constructor(c,$,Q,J,Y){super(c);if(Object.defineProperty(this,"message",{__proto__:null,value:c,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,$&&(this.code=$),Q&&(this.config=Q),J&&(this.request=J),Y)this.response=Y,this.status=Y.status}toJSON(){let c=this.config,$=c&&V.hasOwnProp(c,"redact")?c.redact:void 0,Q=V.isArray($)&&$.length>0?dw(c,$):V.toJSONObject(c);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:Q,code:this.code,status:this.status}}};yc.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";yc.ERR_BAD_OPTION="ERR_BAD_OPTION";yc.ECONNABORTED="ECONNABORTED";yc.ETIMEDOUT="ETIMEDOUT";yc.ECONNREFUSED="ECONNREFUSED";yc.ERR_NETWORK="ERR_NETWORK";yc.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";yc.ERR_DEPRECATED="ERR_DEPRECATED";yc.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";yc.ERR_BAD_REQUEST="ERR_BAD_REQUEST";yc.ERR_CANCELED="ERR_CANCELED";yc.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";yc.ERR_INVALID_URL="ERR_INVALID_URL";yc.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";O=yc});var RG=l((fZ,OG)=>{var HG=Zc("stream").Stream,sw=Zc("util");OG.exports=E0;function E0(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}sw.inherits(E0,HG);E0.create=function(c,$){var Q=new this;$=$||{};for(var J in $)Q[J]=$[J];Q.source=c;var Y=c.emit;if(c.emit=function(){return Q._handleEmit(arguments),Y.apply(c,arguments)},c.on("error",function(){}),Q.pauseStream)c.pause();return Q};Object.defineProperty(E0.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});E0.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};E0.prototype.resume=function(){if(!this._released)this.release();this.source.resume()};E0.prototype.pause=function(){this.source.pause()};E0.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(c){this.emit.apply(this,c)}.bind(this)),this._bufferedEvents=[]};E0.prototype.pipe=function(){var c=HG.prototype.pipe.apply(this,arguments);return this.resume(),c};E0.prototype._handleEmit=function(c){if(this._released){this.emit.apply(this,c);return}if(c[0]==="data")this.dataSize+=c[1].length,this._checkIfMaxDataSizeExceeded();this._bufferedEvents.push(c)};E0.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded)return;if(this.dataSize<=this.maxDataSize)return;this._maxDataSizeExceeded=!0;var c="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",Error(c))}});var LG=l((nZ,ZG)=>{var rw=Zc("util"),IG=Zc("stream").Stream,pG=RG();ZG.exports=Ec;function Ec(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}rw.inherits(Ec,IG);Ec.create=function(c){var $=new this;c=c||{};for(var Q in c)$[Q]=c[Q];return $};Ec.isStreamLike=function(c){return typeof c!=="function"&&typeof c!=="string"&&typeof c!=="boolean"&&typeof c!=="number"&&!Buffer.isBuffer(c)};Ec.prototype.append=function(c){var $=Ec.isStreamLike(c);if($){if(!(c instanceof pG)){var Q=pG.create(c,{maxDataSize:1/0,pauseStream:this.pauseStreams});c.on("data",this._checkDataSize.bind(this)),c=Q}if(this._handleErrors(c),this.pauseStreams)c.pause()}return this._streams.push(c),this};Ec.prototype.pipe=function(c,$){return IG.prototype.pipe.call(this,c,$),this.resume(),c};Ec.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}};Ec.prototype._realGetNext=function(){var c=this._streams.shift();if(typeof c>"u"){this.end();return}if(typeof c!=="function"){this._pipeNext(c);return}var $=c;$(function(Q){var J=Ec.isStreamLike(Q);if(J)Q.on("data",this._checkDataSize.bind(this)),this._handleErrors(Q);this._pipeNext(Q)}.bind(this))};Ec.prototype._pipeNext=function(c){this._currentStream=c;var $=Ec.isStreamLike(c);if($){c.on("end",this._getNext.bind(this)),c.pipe(this,{end:!1});return}var Q=c;this.write(Q),this._getNext()};Ec.prototype._handleErrors=function(c){var $=this;c.on("error",function(Q){$._emitError(Q)})};Ec.prototype.write=function(c){this.emit("data",c)};Ec.prototype.pause=function(){if(!this.pauseStreams)return;if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};Ec.prototype.resume=function(){if(!this._released)this._released=!0,this.writable=!0,this._getNext();if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};Ec.prototype.end=function(){this._reset(),this.emit("end")};Ec.prototype.destroy=function(){this._reset(),this.emit("close")};Ec.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};Ec.prototype._checkDataSize=function(){if(this._updateDataSize(),this.dataSize<=this.maxDataSize)return;var c="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(Error(c))};Ec.prototype._updateDataSize=function(){this.dataSize=0;var c=this;if(this._streams.forEach(function($){if(!$.dataSize)return;c.dataSize+=$.dataSize}),this._currentStream&&this._currentStream.dataSize)this.dataSize+=this._currentStream.dataSize};Ec.prototype._emitError=function(c){this._reset(),this.emit("error",c)}});var _G=l((uZ,tw)=>{tw.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 EG=l((Xi)=>{/*!
|
|
2
|
+
import{createRequire as tV}from"node:module";var aV=Object.create;var{getPrototypeOf:lV,defineProperty:DX,getOwnPropertyNames:hV}=Object;var yV=Object.prototype.hasOwnProperty;function oV(c){return this[c]}var gV,dV,BX=(c,$,Q)=>{var J=c!=null&&typeof c==="object";if(J){var Y=$?gV??=new WeakMap:dV??=new WeakMap,X=Y.get(c);if(X)return X}Q=c!=null?aV(lV(c)):{};let W=$||!c||!c.__esModule?DX(Q,"default",{value:c,enumerable:!0}):Q;for(let m of hV(c))if(!yV.call(W,m))DX(W,m,{get:oV.bind(c,m),enumerable:!0});if(J)Y.set(c,W);return W};var l=(c,$)=>()=>($||c(($={exports:{}}).exports,$),$.exports);var sV=(c)=>c;function rV(c,$){this[c]=sV.bind(null,$)}var vQ=(c,$)=>{for(var Q in $)DX(c,Q,{get:$[Q],enumerable:!0,configurable:!0,set:rV.bind($,Q)})};var g=(c,$)=>()=>(c&&($=c(c=0)),$);var Ic=tV(import.meta.url);function UQ(c,$){return function(){return c.apply($,arguments)}}function D$(c){return c!==null&&!K$(c)&&c.constructor!==null&&!K$(c.constructor)&&G0(c.constructor.isBuffer)&&c.constructor.isBuffer(c)}function $w(c){let $;if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)$=ArrayBuffer.isView(c);else $=c&&c.buffer&&V7(c.buffer);return $}function Mw(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;return{}}function DQ(c,$,{allOwnKeys:Q=!1}={}){if(c===null||typeof c>"u")return;let J,Y;if(typeof c!=="object")c=[c];if(k8(c))for(J=0,Y=c.length;J<Y;J++)$.call(null,c[J],J,c);else{if(D$(c))return;let X=Q?Object.getOwnPropertyNames(c):Object.keys(c),W=X.length,m;for(J=0;J<W;J++)m=X[J],$.call(null,c[m],m,c)}}function i7(c,$){if(D$(c))return null;$=$.toLowerCase();let Q=Object.keys(c),J=Q.length,Y;while(J-- >0)if(Y=Q[J],$===Y.toLowerCase())return Y;return null}function HX(...c){let{caseless:$,skipUndefined:Q}=v7(this)&&this||{},J={},Y=(X,W)=>{if(W==="__proto__"||W==="constructor"||W==="prototype")return;let m=$&&typeof W==="string"&&i7(J,W)||W,G=IJ(J,m)?J[m]:void 0;if(ZJ(G)&&ZJ(X))J[m]=HX(G,X);else if(ZJ(X))J[m]=HX({},X);else if(k8(X))J[m]=X.slice();else if(!Q||!K$(X))J[m]=X};for(let X=0,W=c.length;X<W;X++){let m=c[X];if(!m||D$(m))continue;if(DQ(m,Y),typeof m!=="object"||k8(m))continue;let G=Object.getOwnPropertySymbols(m);for(let z=0;z<G.length;z++){let x=G[z];if(Sw.call(m,x))Y(m[x],x)}}return J}function Fw(c){return!!(c&&G0(c.append)&&c[N7]==="FormData"&&c[KQ])}var eV,j$,KQ,N7,IJ,jQ=(c,$)=>{let Q=c,J=[];while(Q!=null&&Q!==Object.prototype){if(J.indexOf(Q)!==-1)return!1;if(J.push(Q),IJ(Q,$))return!0;Q=j$(Q)}return!1},cw=(c,$)=>c!=null&&jQ(c,$)?c[$]:void 0,OX,C0=(c)=>{return c=c.toLowerCase(),($)=>OX($)===c},LJ=(c)=>($)=>typeof $===c,k8,K$,V7,Qw,G0,w7,B$=(c)=>c!==null&&typeof c==="object",Jw=(c)=>c===!0||c===!1,ZJ=(c)=>{if(!B$(c))return!1;let $=j$(c);return($===null||$===Object.prototype||j$($)===null)&&!jQ(c,N7)&&!jQ(c,KQ)},Yw=(c)=>{if(!B$(c)||D$(c))return!1;try{return Object.keys(c).length===0&&Object.getPrototypeOf(c)===Object.prototype}catch($){return!1}},Xw,Ww,mw=(c)=>{return!!(c&&typeof c.uri<"u")},Gw=(c)=>c&&typeof c.getParts<"u",zw,xw,qw=(c)=>B$(c)&&G0(c.pipe),q7,M7,Nw=(c)=>{if(!c)return!1;if(M7&&c instanceof M7)return!0;let $=j$(c);if(!$||$===Object.prototype)return!1;if(!G0(c.append))return!1;let Q=OX(c);return Q==="formdata"||Q==="object"&&G0(c.toString)&&c.toString()==="[object FormData]"},Vw,ww,iw,vw,Uw,jw=(c)=>{return c.trim?c.trim():c.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},u8,v7=(c)=>!K$(c)&&c!==u8,Kw=(c,$,Q,{allOwnKeys:J}={})=>{return DQ($,(Y,X)=>{if(Q&&G0(Y))Object.defineProperty(c,X,{__proto__:null,value:UQ(Y,Q),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty(c,X,{__proto__:null,value:Y,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:J}),c},Dw=(c)=>{if(c.charCodeAt(0)===65279)c=c.slice(1);return c},Bw=(c,$,Q,J)=>{c.prototype=Object.create($.prototype,J),Object.defineProperty(c.prototype,"constructor",{__proto__:null,value:c,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(c,"super",{__proto__:null,value:$.prototype}),Q&&Object.assign(c.prototype,Q)},Hw=(c,$,Q,J)=>{let Y,X,W,m={};if($=$||{},c==null)return $;do{Y=Object.getOwnPropertyNames(c),X=Y.length;while(X-- >0)if(W=Y[X],(!J||J(W,c,$))&&!m[W])$[W]=c[W],m[W]=!0;c=Q!==!1&&j$(c)}while(c&&(!Q||Q(c,$))&&c!==Object.prototype);return $},Ow=(c,$,Q)=>{if(c=String(c),Q===void 0||Q>c.length)Q=c.length;Q-=$.length;let J=c.indexOf($,Q);return J!==-1&&J===Q},Rw=(c)=>{if(!c)return null;if(k8(c))return c;let $=c.length;if(!w7($))return null;let Q=Array($);while($-- >0)Q[$]=c[$];return Q},pw,Zw=(c,$)=>{let J=(c&&c[KQ]).call(c),Y;while((Y=J.next())&&!Y.done){let X=Y.value;$.call(c,X[0],X[1])}},Iw=(c,$)=>{let Q,J=[];while((Q=c.exec($))!==null)J.push(Q);return J},Lw,_w=(c)=>{return c.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(Q,J,Y){return J.toUpperCase()+Y})},Sw,Aw,U7=(c,$)=>{let Q=Object.getOwnPropertyDescriptors(c),J={};DQ(Q,(Y,X)=>{let W;if((W=$(Y,X,c))!==!1)J[X]=W||Y}),Object.defineProperties(c,J)},Cw=(c)=>{U7(c,($,Q)=>{if(G0(c)&&["arguments","caller","callee"].includes(Q))return!1;let J=c[Q];if(!G0(J))return;if($.enumerable=!1,"writable"in $){$.writable=!1;return}if(!$.set)$.set=()=>{throw Error("Can not rewrite read-only method '"+Q+"'")}})},Pw=(c,$)=>{let Q={},J=(Y)=>{Y.forEach((X)=>{Q[X]=!0})};return k8(c)?J(c):J(String(c).split($)),Q},Ew=()=>{},bw=(c,$)=>{return c!=null&&Number.isFinite(c=+c)?c:$},Tw=(c)=>{let $=new WeakSet,Q=(J)=>{if(B$(J)){if($.has(J))return;if(D$(J))return J;if(!("toJSON"in J)){$.add(J);let Y=k8(J)?[]:{};return DQ(J,(X,W)=>{let m=Q(X);!K$(m)&&(Y[W]=m)}),$.delete(J),Y}}return J};return Q(c)},fw,nw=(c)=>c&&(B$(c)||G0(c))&&G0(c.then)&&G0(c.catch),j7,uw,K7=(c)=>c!=null&&G0(c[KQ]),kw=(c)=>c!=null&&jQ(c,KQ)&&K7(c),V;var Lc=g(()=>{({toString:eV}=Object.prototype),{getPrototypeOf:j$}=Object,{iterator:KQ,toStringTag:N7}=Symbol,IJ=(({hasOwnProperty:c})=>($,Q)=>c.call($,Q))(Object.prototype),OX=((c)=>($)=>{let Q=eV.call($);return c[Q]||(c[Q]=Q.slice(8,-1).toLowerCase())})(Object.create(null)),{isArray:k8}=Array,K$=LJ("undefined");V7=C0("ArrayBuffer");Qw=LJ("string"),G0=LJ("function"),w7=LJ("number"),Xw=C0("Date"),Ww=C0("File"),zw=C0("Blob"),xw=C0("FileList");q7=Mw(),M7=typeof q7.FormData<"u"?q7.FormData:void 0,Vw=C0("URLSearchParams"),[ww,iw,vw,Uw]=["ReadableStream","Request","Response","Headers"].map(C0);u8=(()=>{if(typeof globalThis<"u")return globalThis;return typeof self<"u"?self:typeof window<"u"?window:global})();pw=((c)=>{return($)=>{return c&&$ instanceof c}})(typeof Uint8Array<"u"&&j$(Uint8Array)),Lw=C0("HTMLFormElement"),{propertyIsEnumerable:Sw}=Object.prototype,Aw=C0("RegExp");fw=C0("AsyncFunction"),j7=((c,$)=>{if(c)return setImmediate;return $?((Q,J)=>{return u8.addEventListener("message",({source:Y,data:X})=>{if(Y===u8&&X===Q)J.length&&J.shift()()},!1),(Y)=>{J.push(Y),u8.postMessage(Q,"*")}})(`axios@${Math.random()}`,[]):(Q)=>setTimeout(Q)})(typeof setImmediate==="function",G0(u8.postMessage)),uw=typeof queueMicrotask<"u"?queueMicrotask.bind(u8):typeof process<"u"&&process.nextTick||j7,V={isArray:k8,isArrayBuffer:V7,isBuffer:D$,isFormData:Nw,isArrayBufferView:$w,isString:Qw,isNumber:w7,isBoolean:Jw,isObject:B$,isPlainObject:ZJ,isEmptyObject:Yw,isReadableStream:ww,isRequest:iw,isResponse:vw,isHeaders:Uw,isUndefined:K$,isDate:Xw,isFile:Ww,isReactNativeBlob:mw,isReactNative:Gw,isBlob:zw,isRegExp:Aw,isFunction:G0,isStream:qw,isURLSearchParams:Vw,isTypedArray:pw,isFileList:xw,forEach:DQ,merge:HX,extend:Kw,trim:jw,stripBOM:Dw,inherits:Bw,toFlatObject:Hw,kindOf:OX,kindOfTest:C0,endsWith:Ow,toArray:Rw,forEachEntry:Zw,matchAll:Iw,isHTMLForm:Lw,hasOwnProperty:IJ,hasOwnProp:IJ,hasOwnInPrototypeChain:jQ,getSafeProp:cw,reduceDescriptors:U7,freezeMethods:Cw,toObjectSet:Pw,toCamelCase:_w,noop:Ew,toFiniteNumber:bw,findKey:i7,global:u8,isContextDefined:v7,isSpecCompliantForm:Fw,toJSONObject:Tw,isAsyncFn:fw,isThenable:nw,setImmediate:j7,asap:uw,isIterable:K7,isSafeIterable:kw}});var aw,D7=(c)=>{let $={},Q,J,Y;return c&&c.split(`
|
|
3
|
+
`).forEach(function(W){if(Y=W.indexOf(":"),Q=W.substring(0,Y).trim().toLowerCase(),J=W.substring(Y+1).trim(),!Q||$[Q]&&aw[Q])return;if(Q==="set-cookie")if($[Q])$[Q].push(J);else $[Q]=[J];else $[Q]=$[Q]?$[Q]+", "+J:J}),$};var B7=g(()=>{Lc();aw=V.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"])});function lw(c){let $=0,Q=c.length;while($<Q){let J=c.charCodeAt($);if(J!==9&&J!==32)break;$+=1}while(Q>$){let J=c.charCodeAt(Q-1);if(J!==9&&J!==32)break;Q-=1}return $===0&&Q===c.length?c:c.slice($,Q)}function RX(c,$){if(V.isArray(c))return c.map((Q)=>RX(Q,$));return lw(String(c).replace($,""))}function H$(c){let $=Object.create(null);return V.forEach(c.toJSON(),(Q,J)=>{$[J]=ow(Q)}),$}var hw,yw,H7=(c)=>RX(c,hw),ow=(c)=>RX(c,yw);var BQ=g(()=>{Lc();hw=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),yw=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g")});function HQ(c){return c&&String(c).trim().toLowerCase()}function _J(c){if(c===!1||c==null)return c;return V.isArray(c)?c.map(_J):H7(String(c))}function gw(c){let $=Object.create(null),Q=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,J;while(J=Q.exec(c))$[J[1]]=J[2];return $}function pX(c,$,Q,J,Y){if(V.isFunction(J))return J.call(this,$,Q);if(Y)$=Q;if(!V.isString($))return;if(V.isString(J))return $.indexOf(J)!==-1;if(V.isRegExp(J))return J.test($)}function sw(c){return c.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,($,Q,J)=>{return Q.toUpperCase()+J})}function rw(c,$){let Q=V.toCamelCase(" "+$);["get","set","has"].forEach((J)=>{Object.defineProperty(c,J+Q,{__proto__:null,value:function(Y,X,W){return this[J].call(this,$,Y,X,W)},configurable:!0})})}var O7,dw=(c)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(c.trim()),OQ,_c;var P0=g(()=>{Lc();B7();BQ();O7=Symbol("internals");OQ=class OQ{constructor(c){c&&this.set(c)}set(c,$,Q){let J=this;function Y(W,m,G){let z=HQ(m);if(!z)return;let x=V.findKey(J,z);if(!x||J[x]===void 0||G===!0||G===void 0&&J[x]!==!1)J[x||m]=_J(W)}let X=(W,m)=>V.forEach(W,(G,z)=>Y(G,z,m));if(V.isPlainObject(c)||c instanceof this.constructor)X(c,$);else if(V.isString(c)&&(c=c.trim())&&!dw(c))X(D7(c),$);else if(V.isObject(c)&&V.isSafeIterable(c)){let W=Object.create(null),m,G;for(let z of c){if(!V.isArray(z))throw TypeError("Object iterator must return a key-value pair");if(G=z[0],V.hasOwnProp(W,G))m=W[G],W[G]=V.isArray(m)?[...m,z[1]]:[m,z[1]];else W[G]=z[1]}X(W,$)}else c!=null&&Y($,c,Q);return this}get(c,$){if(c=HQ(c),c){let Q=V.findKey(this,c);if(Q){let J=this[Q];if(!$)return J;if($===!0)return gw(J);if(V.isFunction($))return $.call(this,J,Q);if(V.isRegExp($))return $.exec(J);throw TypeError("parser must be boolean|regexp|function")}}}has(c,$){if(c=HQ(c),c){let Q=V.findKey(this,c);return!!(Q&&this[Q]!==void 0&&(!$||pX(this,this[Q],Q,$)))}return!1}delete(c,$){let Q=this,J=!1;function Y(X){if(X=HQ(X),X){let W=V.findKey(Q,X);if(W&&(!$||pX(Q,Q[W],W,$)))delete Q[W],J=!0}}if(V.isArray(c))c.forEach(Y);else Y(c);return J}clear(c){let $=Object.keys(this),Q=$.length,J=!1;while(Q--){let Y=$[Q];if(!c||pX(this,this[Y],Y,c,!0))delete this[Y],J=!0}return J}normalize(c){let $=this,Q={};return V.forEach(this,(J,Y)=>{let X=V.findKey(Q,Y);if(X){$[X]=_J(J),delete $[Y];return}let W=c?sw(Y):String(Y).trim();if(W!==Y)delete $[Y];$[W]=_J(J),Q[W]=!0}),this}concat(...c){return this.constructor.concat(this,...c)}toJSON(c){let $=Object.create(null);return V.forEach(this,(Q,J)=>{Q!=null&&Q!==!1&&($[J]=c&&V.isArray(Q)?Q.join(", "):Q)}),$}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([c,$])=>c+": "+$).join(`
|
|
4
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(c){return c instanceof this?c:new this(c)}static concat(c,...$){let Q=new this(c);return $.forEach((J)=>Q.set(J)),Q}static accessor(c){let Q=(this[O7]=this[O7]={accessors:{}}).accessors,J=this.prototype;function Y(X){let W=HQ(X);if(!Q[W])rw(J,X),Q[W]=!0}return V.isArray(c)?c.forEach(Y):Y(c),this}};OQ.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);V.reduceDescriptors(OQ.prototype,({value:c},$)=>{let Q=$[0].toUpperCase()+$.slice(1);return{get:()=>c,set(J){this[Q]=J}}});V.freezeMethods(OQ);_c=OQ});function ew(c){if(V.hasOwnProp(c,"toJSON"))return!0;let $=Object.getPrototypeOf(c);while($&&$!==Object.prototype){if(V.hasOwnProp($,"toJSON"))return!0;$=Object.getPrototypeOf($)}return!1}function ci(c,$){let Q=new Set($.map((X)=>String(X).toLowerCase())),J=[],Y=(X)=>{if(X===null||typeof X!=="object")return X;if(V.isBuffer(X))return X;if(J.indexOf(X)!==-1)return;if(X instanceof _c)X=X.toJSON();J.push(X);let W;if(V.isArray(X))W=[],X.forEach((m,G)=>{let z=Y(m);if(!V.isUndefined(z))W[G]=z});else{if(!V.isPlainObject(X)&&ew(X))return J.pop(),X;W=Object.create(null);for(let[m,G]of Object.entries(X)){let z=Q.has(m.toLowerCase())?tw:Y(G);if(!V.isUndefined(z))W[m]=z}}return J.pop(),W};return Y(c)}var tw="[REDACTED ****]",yc,O;var X0=g(()=>{Lc();P0();yc=class yc extends Error{static from(c,$,Q,J,Y,X){let W=new yc(c.message,$||c.code,Q,J,Y);if(W.cause=c,W.name=c.name,c.status!=null&&W.status==null)W.status=c.status;return X&&Object.assign(W,X),W}constructor(c,$,Q,J,Y){super(c);if(Object.defineProperty(this,"message",{__proto__:null,value:c,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,$&&(this.code=$),Q&&(this.config=Q),J&&(this.request=J),Y)this.response=Y,this.status=Y.status}toJSON(){let c=this.config,$=c&&V.hasOwnProp(c,"redact")?c.redact:void 0,Q=V.isArray($)&&$.length>0?ci(c,$):V.toJSONObject(c);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:Q,code:this.code,status:this.status}}};yc.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";yc.ERR_BAD_OPTION="ERR_BAD_OPTION";yc.ECONNABORTED="ECONNABORTED";yc.ETIMEDOUT="ETIMEDOUT";yc.ECONNREFUSED="ECONNREFUSED";yc.ERR_NETWORK="ERR_NETWORK";yc.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";yc.ERR_DEPRECATED="ERR_DEPRECATED";yc.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";yc.ERR_BAD_REQUEST="ERR_BAD_REQUEST";yc.ERR_CANCELED="ERR_CANCELED";yc.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";yc.ERR_INVALID_URL="ERR_INVALID_URL";yc.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";O=yc});var Z7=l((hI,p7)=>{var R7=Ic("stream").Stream,$i=Ic("util");p7.exports=E0;function E0(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}$i.inherits(E0,R7);E0.create=function(c,$){var Q=new this;$=$||{};for(var J in $)Q[J]=$[J];Q.source=c;var Y=c.emit;if(c.emit=function(){return Q._handleEmit(arguments),Y.apply(c,arguments)},c.on("error",function(){}),Q.pauseStream)c.pause();return Q};Object.defineProperty(E0.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});E0.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};E0.prototype.resume=function(){if(!this._released)this.release();this.source.resume()};E0.prototype.pause=function(){this.source.pause()};E0.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(c){this.emit.apply(this,c)}.bind(this)),this._bufferedEvents=[]};E0.prototype.pipe=function(){var c=R7.prototype.pipe.apply(this,arguments);return this.resume(),c};E0.prototype._handleEmit=function(c){if(this._released){this.emit.apply(this,c);return}if(c[0]==="data")this.dataSize+=c[1].length,this._checkIfMaxDataSizeExceeded();this._bufferedEvents.push(c)};E0.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded)return;if(this.dataSize<=this.maxDataSize)return;this._maxDataSizeExceeded=!0;var c="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",Error(c))}});var S7=l((yI,_7)=>{var Qi=Ic("util"),L7=Ic("stream").Stream,I7=Z7();_7.exports=Ec;function Ec(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}Qi.inherits(Ec,L7);Ec.create=function(c){var $=new this;c=c||{};for(var Q in c)$[Q]=c[Q];return $};Ec.isStreamLike=function(c){return typeof c!=="function"&&typeof c!=="string"&&typeof c!=="boolean"&&typeof c!=="number"&&!Buffer.isBuffer(c)};Ec.prototype.append=function(c){var $=Ec.isStreamLike(c);if($){if(!(c instanceof I7)){var Q=I7.create(c,{maxDataSize:1/0,pauseStream:this.pauseStreams});c.on("data",this._checkDataSize.bind(this)),c=Q}if(this._handleErrors(c),this.pauseStreams)c.pause()}return this._streams.push(c),this};Ec.prototype.pipe=function(c,$){return L7.prototype.pipe.call(this,c,$),this.resume(),c};Ec.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}};Ec.prototype._realGetNext=function(){var c=this._streams.shift();if(typeof c>"u"){this.end();return}if(typeof c!=="function"){this._pipeNext(c);return}var $=c;$(function(Q){var J=Ec.isStreamLike(Q);if(J)Q.on("data",this._checkDataSize.bind(this)),this._handleErrors(Q);this._pipeNext(Q)}.bind(this))};Ec.prototype._pipeNext=function(c){this._currentStream=c;var $=Ec.isStreamLike(c);if($){c.on("end",this._getNext.bind(this)),c.pipe(this,{end:!1});return}var Q=c;this.write(Q),this._getNext()};Ec.prototype._handleErrors=function(c){var $=this;c.on("error",function(Q){$._emitError(Q)})};Ec.prototype.write=function(c){this.emit("data",c)};Ec.prototype.pause=function(){if(!this.pauseStreams)return;if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};Ec.prototype.resume=function(){if(!this._released)this._released=!0,this.writable=!0,this._getNext();if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};Ec.prototype.end=function(){this._reset(),this.emit("end")};Ec.prototype.destroy=function(){this._reset(),this.emit("close")};Ec.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};Ec.prototype._checkDataSize=function(){if(this._updateDataSize(),this.dataSize<=this.maxDataSize)return;var c="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(Error(c))};Ec.prototype._updateDataSize=function(){this.dataSize=0;var c=this;if(this._streams.forEach(function($){if(!$.dataSize)return;c.dataSize+=$.dataSize}),this._currentStream&&this._currentStream.dataSize)this.dataSize+=this._currentStream.dataSize};Ec.prototype._emitError=function(c){this._reset(),this.emit("error",c)}});var A7=l((oI,Ji)=>{Ji.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 F7=l((xi)=>{/*!
|
|
5
5
|
* mime-types
|
|
6
6
|
* Copyright(c) 2014 Jonathan Ong
|
|
7
7
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
8
8
|
* MIT Licensed
|
|
9
|
-
*/var SJ=_G(),ew=Zc("path").extname,SG=/^\s*([^;\s]*)(?:;|\s|$)/,ci=/^text\//i;Xi.charset=AG;Xi.charsets={lookup:AG};Xi.contentType=$i;Xi.extension=Qi;Xi.extensions=Object.create(null);Xi.lookup=Ji;Xi.types=Object.create(null);Yi(Xi.extensions,Xi.types);function AG(c){if(!c||typeof c!=="string")return!1;var $=SG.exec(c),Q=$&&SJ[$[1].toLowerCase()];if(Q&&Q.charset)return Q.charset;if($&&ci.test($[1]))return"UTF-8";return!1}function $i(c){if(!c||typeof c!=="string")return!1;var $=c.indexOf("/")===-1?Xi.lookup(c):c;if(!$)return!1;if($.indexOf("charset")===-1){var Q=Xi.charset($);if(Q)$+="; charset="+Q.toLowerCase()}return $}function Qi(c){if(!c||typeof c!=="string")return!1;var $=SG.exec(c),Q=$&&Xi.extensions[$[1].toLowerCase()];if(!Q||!Q.length)return!1;return Q[0]}function Ji(c){if(!c||typeof c!=="string")return!1;var $=ew("x."+c).toLowerCase().substr(1);if(!$)return!1;return Xi.types[$]||!1}function Yi(c,$){var Q=["nginx","apache",void 0,"iana"];Object.keys(SJ).forEach(function(Y){var X=SJ[Y],W=X.extensions;if(!W||!W.length)return;c[Y]=W;for(var m=0;m<W.length;m++){var G=W[m];if($[G]){var z=Q.indexOf(SJ[$[G]].source),x=Q.indexOf(X.source);if($[G]!=="application/octet-stream"&&(z>x||z===x&&$[G].substr(0,12)==="application/"))continue}$[G]=Y}})}});var FG=l((aZ,bG)=>{bG.exports=zi;function zi(c){var $=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if($)$(c);else setTimeout(c,0)}});var ZX=l((lZ,fG)=>{var TG=FG();fG.exports=xi;function xi(c){var $=!1;return TG(function(){$=!0}),function(J,Y){if($)c(J,Y);else TG(function(){c(J,Y)})}}});var LX=l((hZ,nG)=>{nG.exports=qi;function qi(c){Object.keys(c.jobs).forEach(Mi.bind(c)),c.jobs={}}function Mi(c){if(typeof this.jobs[c]=="function")this.jobs[c]()}});var _X=l((yZ,kG)=>{var uG=ZX(),Ni=LX();kG.exports=Vi;function Vi(c,$,Q,J){var Y=Q.keyedList?Q.keyedList[Q.index]:Q.index;Q.jobs[Y]=wi($,Y,c[Y],function(X,W){if(!(Y in Q.jobs))return;if(delete Q.jobs[Y],X)Ni(Q);else Q.results[Y]=W;J(X,Q.results)})}function wi(c,$,Q,J){var Y;if(c.length==2)Y=c(Q,uG(J));else Y=c(Q,$,uG(J));return Y}});var SX=l((oZ,aG)=>{aG.exports=ii;function ii(c,$){var Q=!Array.isArray(c),J={index:0,keyedList:Q||$?Object.keys(c):null,jobs:{},results:Q?{}:[],size:Q?Object.keys(c).length:c.length};if($)J.keyedList.sort(Q?$:function(Y,X){return $(c[Y],c[X])});return J}});var AX=l((gZ,lG)=>{var vi=LX(),Ui=ZX();lG.exports=ji;function ji(c){if(!Object.keys(this.jobs).length)return;this.index=this.size,vi(this),Ui(c)(null,this.results)}});var yG=l((dZ,hG)=>{var Ki=_X(),Di=SX(),Bi=AX();hG.exports=Hi;function Hi(c,$,Q){var J=Di(c);while(J.index<(J.keyedList||c).length)Ki(c,$,J,function(Y,X){if(Y){Q(Y,X);return}if(Object.keys(J.jobs).length===0){Q(null,J.results);return}}),J.index++;return Bi.bind(J,Q)}});var CX=l((sZ,AJ)=>{var oG=_X(),Oi=SX(),Ri=AX();AJ.exports=pi;AJ.exports.ascending=gG;AJ.exports.descending=Ii;function pi(c,$,Q,J){var Y=Oi(c,Q);return oG(c,$,Y,function X(W,m){if(W){J(W,m);return}if(Y.index++,Y.index<(Y.keyedList||c).length){oG(c,$,Y,X);return}J(null,Y.results)}),Ri.bind(Y,J)}function gG(c,$){return c<$?-1:c>$?1:0}function Ii(c,$){return-1*gG(c,$)}});var sG=l((rZ,dG)=>{var Zi=CX();dG.exports=Li;function Li(c,$,Q){return Zi(c,$,null,Q)}});var tG=l((tZ,rG)=>{rG.exports={parallel:yG(),serial:sG(),serialOrdered:CX()}});var PX=l((eZ,eG)=>{eG.exports=Object});var $7=l((cL,c7)=>{c7.exports=Error});var J7=l(($L,Q7)=>{Q7.exports=EvalError});var X7=l((QL,Y7)=>{Y7.exports=RangeError});var m7=l((JL,W7)=>{W7.exports=ReferenceError});var z7=l((YL,G7)=>{G7.exports=SyntaxError});var CJ=l((XL,x7)=>{x7.exports=TypeError});var M7=l((WL,q7)=>{q7.exports=URIError});var V7=l((mL,N7)=>{N7.exports=Math.abs});var i7=l((GL,w7)=>{w7.exports=Math.floor});var U7=l((zL,v7)=>{v7.exports=Math.max});var K7=l((xL,j7)=>{j7.exports=Math.min});var B7=l((qL,D7)=>{D7.exports=Math.pow});var O7=l((ML,H7)=>{H7.exports=Math.round});var p7=l((NL,R7)=>{R7.exports=Number.isNaN||function($){return $!==$}});var Z7=l((VL,I7)=>{var _i=p7();I7.exports=function($){if(_i($)||$===0)return $;return $<0?-1:1}});var _7=l((wL,L7)=>{L7.exports=Object.getOwnPropertyDescriptor});var EX=l((iL,S7)=>{var PJ=_7();if(PJ)try{PJ([],"length")}catch(c){PJ=null}S7.exports=PJ});var C7=l((vL,A7)=>{var EJ=Object.defineProperty||!1;if(EJ)try{EJ({},"a",{value:1})}catch(c){EJ=!1}A7.exports=EJ});var bX=l((UL,P7)=>{P7.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var $={},Q=Symbol("test"),J=Object(Q);if(typeof Q==="string")return!1;if(Object.prototype.toString.call(Q)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(J)!=="[object Symbol]")return!1;var Y=42;$[Q]=Y;for(var X in $)return!1;if(typeof Object.keys==="function"&&Object.keys($).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames($).length!==0)return!1;var W=Object.getOwnPropertySymbols($);if(W.length!==1||W[0]!==Q)return!1;if(!Object.prototype.propertyIsEnumerable.call($,Q))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var m=Object.getOwnPropertyDescriptor($,Q);if(m.value!==Y||m.enumerable!==!0)return!1}return!0}});var F7=l((jL,b7)=>{var E7=typeof Symbol<"u"&&Symbol,Si=bX();b7.exports=function(){if(typeof E7!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof E7("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return Si()}});var FX=l((KL,T7)=>{T7.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var TX=l((DL,f7)=>{var Ai=PX();f7.exports=Ai.getPrototypeOf||null});var k7=l((BL,u7)=>{var Ci="Function.prototype.bind called on incompatible ",Pi=Object.prototype.toString,Ei=Math.max,bi="[object Function]",n7=function($,Q){var J=[];for(var Y=0;Y<$.length;Y+=1)J[Y]=$[Y];for(var X=0;X<Q.length;X+=1)J[X+$.length]=Q[X];return J},Fi=function($,Q){var J=[];for(var Y=Q||0,X=0;Y<$.length;Y+=1,X+=1)J[X]=$[Y];return J},Ti=function(c,$){var Q="";for(var J=0;J<c.length;J+=1)if(Q+=c[J],J+1<c.length)Q+=$;return Q};u7.exports=function($){var Q=this;if(typeof Q!=="function"||Pi.apply(Q)!==bi)throw TypeError(Ci+Q);var J=Fi(arguments,1),Y,X=function(){if(this instanceof Y){var x=Q.apply(this,n7(J,arguments));if(Object(x)===x)return x;return this}return Q.apply($,n7(J,arguments))},W=Ei(0,Q.length-J.length),m=[];for(var G=0;G<W;G++)m[G]="$"+G;if(Y=Function("binder","return function ("+Ti(m,",")+"){ return binder.apply(this,arguments); }")(X),Q.prototype){var z=function(){};z.prototype=Q.prototype,Y.prototype=new z,z.prototype=null}return Y}});var RQ=l((HL,a7)=>{var fi=k7();a7.exports=Function.prototype.bind||fi});var bJ=l((OL,l7)=>{l7.exports=Function.prototype.call});var fX=l((RL,h7)=>{h7.exports=Function.prototype.apply});var o7=l((pL,y7)=>{y7.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var d7=l((IL,g7)=>{var ni=RQ(),ui=fX(),ki=bJ(),ai=o7();g7.exports=ai||ni.call(ki,ui)});var r7=l((ZL,s7)=>{var li=RQ(),hi=CJ(),yi=bJ(),oi=d7();s7.exports=function($){if($.length<1||typeof $[0]!=="function")throw new hi("a function is required");return oi(li,yi,$)}});var Jz=l((LL,Qz)=>{var gi=r7(),t7=EX(),cz;try{cz=[].__proto__===Array.prototype}catch(c){if(!c||typeof c!=="object"||!("code"in c)||c.code!=="ERR_PROTO_ACCESS")throw c}var nX=!!cz&&t7&&t7(Object.prototype,"__proto__"),$z=Object,e7=$z.getPrototypeOf;Qz.exports=nX&&typeof nX.get==="function"?gi([nX.get]):typeof e7==="function"?function($){return e7($==null?$:$z($))}:!1});var Gz=l((_L,mz)=>{var Yz=FX(),Xz=TX(),Wz=Jz();mz.exports=Yz?function($){return Yz($)}:Xz?function($){if(!$||typeof $!=="object"&&typeof $!=="function")throw TypeError("getProto: not an object");return Xz($)}:Wz?function($){return Wz($)}:null});var FJ=l((SL,zz)=>{var di=Function.prototype.call,si=Object.prototype.hasOwnProperty,ri=RQ();zz.exports=ri.call(di,si)});var wz=l((AL,Vz)=>{var Vc,ti=PX(),ei=$7(),c1=J7(),$1=X7(),Q1=m7(),p$=z7(),R$=CJ(),J1=M7(),Y1=V7(),X1=i7(),W1=U7(),m1=K7(),G1=B7(),z1=O7(),x1=Z7(),Mz=Function,uX=function(c){try{return Mz('"use strict"; return ('+c+").constructor;")()}catch($){}},pQ=EX(),q1=C7(),kX=function(){throw new R$},M1=pQ?function(){try{return arguments.callee,kX}catch(c){try{return pQ(arguments,"callee").get}catch($){return kX}}}():kX,H$=F7()(),kc=Gz(),N1=TX(),V1=FX(),Nz=fX(),IQ=bJ(),O$={},w1=typeof Uint8Array>"u"||!kc?Vc:kc(Uint8Array),a8={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Vc:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Vc:ArrayBuffer,"%ArrayIteratorPrototype%":H$&&kc?kc([][Symbol.iterator]()):Vc,"%AsyncFromSyncIteratorPrototype%":Vc,"%AsyncFunction%":O$,"%AsyncGenerator%":O$,"%AsyncGeneratorFunction%":O$,"%AsyncIteratorPrototype%":O$,"%Atomics%":typeof Atomics>"u"?Vc:Atomics,"%BigInt%":typeof BigInt>"u"?Vc:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Vc:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Vc:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Vc:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":ei,"%eval%":eval,"%EvalError%":c1,"%Float16Array%":typeof Float16Array>"u"?Vc:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Vc:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Vc:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Vc:FinalizationRegistry,"%Function%":Mz,"%GeneratorFunction%":O$,"%Int8Array%":typeof Int8Array>"u"?Vc:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Vc:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Vc:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":H$&&kc?kc(kc([][Symbol.iterator]())):Vc,"%JSON%":typeof JSON==="object"?JSON:Vc,"%Map%":typeof Map>"u"?Vc:Map,"%MapIteratorPrototype%":typeof Map>"u"||!H$||!kc?Vc:kc(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":ti,"%Object.getOwnPropertyDescriptor%":pQ,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Vc:Promise,"%Proxy%":typeof Proxy>"u"?Vc:Proxy,"%RangeError%":$1,"%ReferenceError%":Q1,"%Reflect%":typeof Reflect>"u"?Vc:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Vc:Set,"%SetIteratorPrototype%":typeof Set>"u"||!H$||!kc?Vc:kc(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Vc:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":H$&&kc?kc(""[Symbol.iterator]()):Vc,"%Symbol%":H$?Symbol:Vc,"%SyntaxError%":p$,"%ThrowTypeError%":M1,"%TypedArray%":w1,"%TypeError%":R$,"%Uint8Array%":typeof Uint8Array>"u"?Vc:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Vc:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Vc:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Vc:Uint32Array,"%URIError%":J1,"%WeakMap%":typeof WeakMap>"u"?Vc:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Vc:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Vc:WeakSet,"%Function.prototype.call%":IQ,"%Function.prototype.apply%":Nz,"%Object.defineProperty%":q1,"%Object.getPrototypeOf%":N1,"%Math.abs%":Y1,"%Math.floor%":X1,"%Math.max%":W1,"%Math.min%":m1,"%Math.pow%":G1,"%Math.round%":z1,"%Math.sign%":x1,"%Reflect.getPrototypeOf%":V1};if(kc)try{null.error}catch(c){aX=kc(kc(c)),a8["%Error.prototype%"]=aX}var aX,i1=function c($){var Q;if($==="%AsyncFunction%")Q=uX("async function () {}");else if($==="%GeneratorFunction%")Q=uX("function* () {}");else if($==="%AsyncGeneratorFunction%")Q=uX("async function* () {}");else if($==="%AsyncGenerator%"){var J=c("%AsyncGeneratorFunction%");if(J)Q=J.prototype}else if($==="%AsyncIteratorPrototype%"){var Y=c("%AsyncGenerator%");if(Y&&kc)Q=kc(Y.prototype)}return a8[$]=Q,Q},xz={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ZQ=RQ(),TJ=FJ(),v1=ZQ.call(IQ,Array.prototype.concat),U1=ZQ.call(Nz,Array.prototype.splice),qz=ZQ.call(IQ,String.prototype.replace),fJ=ZQ.call(IQ,String.prototype.slice),j1=ZQ.call(IQ,RegExp.prototype.exec),K1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D1=/\\(\\)?/g,B1=function($){var Q=fJ($,0,1),J=fJ($,-1);if(Q==="%"&&J!=="%")throw new p$("invalid intrinsic syntax, expected closing `%`");else if(J==="%"&&Q!=="%")throw new p$("invalid intrinsic syntax, expected opening `%`");var Y=[];return qz($,K1,function(X,W,m,G){Y[Y.length]=m?qz(G,D1,"$1"):W||X}),Y},H1=function($,Q){var J=$,Y;if(TJ(xz,J))Y=xz[J],J="%"+Y[0]+"%";if(TJ(a8,J)){var X=a8[J];if(X===O$)X=i1(J);if(typeof X>"u"&&!Q)throw new R$("intrinsic "+$+" exists, but is not available. Please file an issue!");return{alias:Y,name:J,value:X}}throw new p$("intrinsic "+$+" does not exist!")};Vz.exports=function($,Q){if(typeof $!=="string"||$.length===0)throw new R$("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Q!=="boolean")throw new R$('"allowMissing" argument must be a boolean');if(j1(/^%?[^%]*%?$/,$)===null)throw new p$("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var J=B1($),Y=J.length>0?J[0]:"",X=H1("%"+Y+"%",Q),W=X.name,m=X.value,G=!1,z=X.alias;if(z)Y=z[0],U1(J,v1([0,1],z));for(var x=1,q=!0;x<J.length;x+=1){var M=J[x],N=fJ(M,0,1),w=fJ(M,-1);if((N==='"'||N==="'"||N==="`"||(w==='"'||w==="'"||w==="`"))&&N!==w)throw new p$("property names with quotes must have matching quotes");if(M==="constructor"||!q)G=!0;if(Y+="."+M,W="%"+Y+"%",TJ(a8,W))m=a8[W];else if(m!=null){if(!(M in m)){if(!Q)throw new R$("base intrinsic for "+$+" exists, but the property is not available.");return}if(pQ&&x+1>=J.length){var U=pQ(m,M);if(q=!!U,q&&"get"in U&&!("originalValue"in U.get))m=U.get;else m=m[M]}else q=TJ(m,M),m=m[M];if(q&&!G)a8[W]=m}}return m}});var vz=l((CL,iz)=>{var O1=bX();iz.exports=function(){return O1()&&!!Symbol.toStringTag}});var Kz=l((PL,jz)=>{var R1=wz(),Uz=R1("%Object.defineProperty%",!0),p1=vz()(),I1=FJ(),Z1=CJ(),nJ=p1?Symbol.toStringTag:null;jz.exports=function($,Q){var J=arguments.length>2&&!!arguments[2]&&arguments[2].force,Y=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof J<"u"&&typeof J!=="boolean"||typeof Y<"u"&&typeof Y!=="boolean")throw new Z1("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");if(nJ&&(J||!I1($,nJ)))if(Uz)Uz($,nJ,{configurable:!Y,enumerable:!1,value:Q,writable:!1});else $[nJ]=Q}});var Bz=l((EL,Dz)=>{Dz.exports=function(c,$){return Object.keys($).forEach(function(Q){c[Q]=c[Q]||$[Q]}),c}});var Rz=l((bL,Oz)=>{var oX=LG(),L1=Zc("util"),lX=Zc("path"),_1=Zc("http"),S1=Zc("https"),A1=Zc("url").parse,C1=Zc("fs"),P1=Zc("stream").Stream,E1=Zc("crypto"),hX=EG(),b1=tG(),F1=Kz(),j8=FJ(),yX=Bz();function Hz(c){return String(c).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function jc(c){if(!(this instanceof jc))return new jc(c);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],oX.call(this),c=c||{};for(var $ in c)this[$]=c[$]}L1.inherits(jc,oX);jc.LINE_BREAK=`\r
|
|
10
|
-
`;jc.DEFAULT_CONTENT_TYPE="application/octet-stream";jc.prototype.append=function(c,$,Q){if(Q=Q||{},typeof Q==="string")Q={filename:Q};var J=oX.prototype.append.bind(this);if(typeof $==="number"||$==null)$=String($);if(Array.isArray($)){this._error(Error("Arrays are not supported."));return}var Y=this._multiPartHeader(c,$,Q),X=this._multiPartFooter();J(Y),J($),J(X),this._trackLength(Y,$,Q)};jc.prototype._trackLength=function(c,$,Q){var J=0;if(Q.knownLength!=null)J+=Number(Q.knownLength);else if(Buffer.isBuffer($))J=$.length;else if(typeof $==="string")J=Buffer.byteLength($);if(this._valueLength+=J,this._overheadLength+=Buffer.byteLength(c)+jc.LINE_BREAK.length,!$||!$.path&&!($.readable&&j8($,"httpVersion"))&&!($ instanceof P1))return;if(!Q.knownLength)this._valuesToMeasure.push($)};jc.prototype._lengthRetriever=function(c,$){if(j8(c,"fd"))if(c.end!=null&&c.end!=1/0&&c.start!=null)$(null,c.end+1-(c.start?c.start:0));else C1.stat(c.path,function(Q,J){if(Q){$(Q);return}var Y=J.size-(c.start?c.start:0);$(null,Y)});else if(j8(c,"httpVersion"))$(null,Number(c.headers["content-length"]));else if(j8(c,"httpModule"))c.on("response",function(Q){c.pause(),$(null,Number(Q.headers["content-length"]))}),c.resume();else $("Unknown stream")};jc.prototype._multiPartHeader=function(c,$,Q){if(typeof Q.header==="string")return Q.header;var J=this._getContentDisposition($,Q),Y=this._getContentType($,Q),X="",W={"Content-Disposition":["form-data",'name="'+Hz(c)+'"'].concat(J||[]),"Content-Type":[].concat(Y||[])};if(typeof Q.header==="object")yX(W,Q.header);var m;for(var G in W)if(j8(W,G)){if(m=W[G],m==null)continue;if(!Array.isArray(m))m=[m];if(m.length)X+=G+": "+m.join("; ")+jc.LINE_BREAK}return"--"+this.getBoundary()+jc.LINE_BREAK+X+jc.LINE_BREAK};jc.prototype._getContentDisposition=function(c,$){var Q;if(typeof $.filepath==="string")Q=lX.normalize($.filepath).replace(/\\/g,"/");else if($.filename||c&&(c.name||c.path))Q=lX.basename($.filename||c&&(c.name||c.path));else if(c&&c.readable&&j8(c,"httpVersion"))Q=lX.basename(c.client._httpMessage.path||"");if(Q)return'filename="'+Hz(Q)+'"'};jc.prototype._getContentType=function(c,$){var Q=$.contentType;if(!Q&&c&&c.name)Q=hX.lookup(c.name);if(!Q&&c&&c.path)Q=hX.lookup(c.path);if(!Q&&c&&c.readable&&j8(c,"httpVersion"))Q=c.headers["content-type"];if(!Q&&($.filepath||$.filename))Q=hX.lookup($.filepath||$.filename);if(!Q&&c&&typeof c==="object")Q=jc.DEFAULT_CONTENT_TYPE;return Q};jc.prototype._multiPartFooter=function(){return function(c){var $=jc.LINE_BREAK,Q=this._streams.length===0;if(Q)$+=this._lastBoundary();c($)}.bind(this)};jc.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+jc.LINE_BREAK};jc.prototype.getHeaders=function(c){var $,Q={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for($ in c)if(j8(c,$))Q[$.toLowerCase()]=c[$];return Q};jc.prototype.setBoundary=function(c){if(typeof c!=="string")throw TypeError("FormData boundary must be a string");this._boundary=c};jc.prototype.getBoundary=function(){if(!this._boundary)this._generateBoundary();return this._boundary};jc.prototype.getBuffer=function(){var c=new Buffer.alloc(0),$=this.getBoundary();for(var Q=0,J=this._streams.length;Q<J;Q++)if(typeof this._streams[Q]!=="function"){if(Buffer.isBuffer(this._streams[Q]))c=Buffer.concat([c,this._streams[Q]]);else c=Buffer.concat([c,Buffer.from(this._streams[Q])]);if(typeof this._streams[Q]!=="string"||this._streams[Q].substring(2,$.length+2)!==$)c=Buffer.concat([c,Buffer.from(jc.LINE_BREAK)])}return Buffer.concat([c,Buffer.from(this._lastBoundary())])};jc.prototype._generateBoundary=function(){this._boundary="--------------------------"+E1.randomBytes(12).toString("hex")};jc.prototype.getLengthSync=function(){var c=this._overheadLength+this._valueLength;if(this._streams.length)c+=this._lastBoundary().length;if(!this.hasKnownLength())this._error(Error("Cannot calculate proper length in synchronous way."));return c};jc.prototype.hasKnownLength=function(){var c=!0;if(this._valuesToMeasure.length)c=!1;return c};jc.prototype.getLength=function(c){var $=this._overheadLength+this._valueLength;if(this._streams.length)$+=this._lastBoundary().length;if(!this._valuesToMeasure.length){process.nextTick(c.bind(this,null,$));return}b1.parallel(this._valuesToMeasure,this._lengthRetriever,function(Q,J){if(Q){c(Q);return}J.forEach(function(Y){$+=Y}),c(null,$)})};jc.prototype.submit=function(c,$){var Q,J,Y={method:"post"};if(typeof c==="string")c=A1(c),J=yX({port:c.port,path:c.pathname,host:c.hostname,protocol:c.protocol},Y);else if(J=yX(c,Y),!J.port)J.port=J.protocol==="https:"?443:80;if(J.headers=this.getHeaders(c.headers),J.protocol==="https:")Q=S1.request(J);else Q=_1.request(J);return this.getLength(function(X,W){if(X&&X!=="Unknown stream"){this._error(X);return}if(W)Q.setHeader("Content-Length",W);if(this.pipe(Q),$){var m,G=function(z,x){return Q.removeListener("error",G),Q.removeListener("response",m),$.call(this,z,x)};m=G.bind(this,null),Q.on("error",G),Q.on("response",m)}}.bind(this)),Q};jc.prototype._error=function(c){if(!this.error)this.error=c,this.pause(),this.emit("error",c)};jc.prototype.toString=function(){return"[object FormData]"};F1(jc.prototype,"FormData");Oz.exports=jc});var pz,uJ;var gX=d(()=>{pz=DX(Rz(),1),uJ=pz.default});function sX(c){return V.isPlainObject(c)||V.isArray(c)}function Iz(c){return V.endsWith(c,"[]")?c.slice(0,-2):c}function dX(c,$,Q){if(!c)return $;return c.concat($).map(function(Y,X){return Y=Iz(Y),!Q&&X?"["+Y+"]":Y}).join(Q?".":"")}function T1(c){return V.isArray(c)&&!c.some(sX)}function n1(c,$,Q){if(!V.isObject(c))throw TypeError("target must be an object");$=$||new(uJ||FormData),Q=V.toFlatObject(Q,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,D){return!V.isUndefined(D[j])});let J=Q.metaTokens,Y=Q.visitor||w,X=Q.dots,W=Q.indexes,m=Q.Blob||typeof Blob<"u"&&Blob,G=Q.maxDepth===void 0?rX:Q.maxDepth,z=m&&V.isSpecCompliantForm($),x=[];if(!V.isFunction(Y))throw TypeError("visitor must be a function");function q(i){if(i===null)return"";if(V.isDate(i))return i.toISOString();if(V.isBoolean(i))return i.toString();if(!z&&V.isBlob(i))throw new O("Blob is not supported. Use a Buffer instead.");if(V.isArrayBuffer(i)||V.isTypedArray(i))return z&&typeof Blob==="function"?new Blob([i]):Buffer.from(i);return i}function M(i){if(i>G)throw new O("Object is too deeply nested ("+i+" levels). Max depth: "+G,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function N(i,j){if(G===1/0)return JSON.stringify(i);let D=[];return JSON.stringify(i,function(mc,g){if(!V.isObject(g))return g;while(D.length&&D[D.length-1]!==this)D.pop();return D.push(g),M(j+D.length-1),g})}function w(i,j,D){let _=i;if(V.isReactNative($)&&V.isReactNativeBlob(i))return $.append(dX(D,j,X),q(i)),!1;if(i&&!D&&typeof i==="object"){if(V.endsWith(j,"{}"))j=J?j:j.slice(0,-2),i=N(i,1);else if(V.isArray(i)&&T1(i)||(V.isFileList(i)||V.endsWith(j,"[]"))&&(_=V.toArray(i)))return j=Iz(j),_.forEach(function(g,Jc){!(V.isUndefined(g)||g===null)&&$.append(W===!0?dX([j],Jc,X):W===null?j:j+"[]",q(g))}),!1}if(sX(i))return!0;return $.append(dX(D,j,X),q(i)),!1}let U=Object.assign(f1,{defaultVisitor:w,convertValue:q,isVisitable:sX});function v(i,j,D=0){if(V.isUndefined(i))return;if(M(D),x.indexOf(i)!==-1)throw Error("Circular reference detected in "+j.join("."));x.push(i),V.forEach(i,function(mc,g){if((!(V.isUndefined(mc)||mc===null)&&Y.call($,mc,V.isString(g)?g.trim():g,j,U))===!0)v(mc,j?j.concat(g):[g],D+1)}),x.pop()}if(!V.isObject(c))throw TypeError("data must be an object");return v(c),$}var rX=100,f1,K8;var I$=d(()=>{Lc();X0();gX();f1=V.toFlatObject(V,{},null,function($){return/^is[A-Z]/.test($)});K8=n1});function Zz(c){let $={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(c).replace(/[!'()~]|%20/g,function(J){return $[J]})}function Lz(c,$){this._pairs=[],c&&K8(c,this,$)}var _z,Sz;var Az=d(()=>{I$();_z=Lz.prototype;_z.append=function($,Q){this._pairs.push([$,Q])};_z.toString=function($){let Q=$?function(J){return $.call(this,J,Zz)}:Zz;return this._pairs.map(function(Y){return Q(Y[0])+"="+Q(Y[1])},"").join("&")};Sz=Lz});function u1(c){return encodeURIComponent(c).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function l8(c,$,Q){if(!$)return c;let J=V.isFunction(Q)?{serialize:Q}:Q,Y=V.getSafeProp(J,"encode")||u1,X=V.getSafeProp(J,"serialize"),W;if(X)W=X($,J);else W=V.isURLSearchParams($)?$.toString():new Sz($,J).toString(Y);if(W){let m=c.indexOf("#");if(m!==-1)c=c.slice(0,m);c+=(c.indexOf("?")===-1?"?":"&")+W}return c}var kJ=d(()=>{Lc();Az()});class Cz{constructor(){this.handlers=[]}use(c,$,Q){return this.handlers.push({fulfilled:c,rejected:$,synchronous:Q?Q.synchronous:!1,runWhen:Q?Q.runWhen:null}),this.handlers.length-1}eject(c){if(this.handlers[c])this.handlers[c]=null}clear(){if(this.handlers)this.handlers=[]}forEach(c){V.forEach(this.handlers,function(Q){if(Q!==null)c(Q)})}}var tX;var Pz=d(()=>{Lc();tX=Cz});var D8;var LQ=d(()=>{D8={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0}});import k1 from"url";var Ez;var bz=d(()=>{Ez=k1.URLSearchParams});import a1 from"crypto";var eX="abcdefghijklmnopqrstuvwxyz",Fz="0123456789",Tz,l1=(c=16,$=Tz.ALPHA_DIGIT)=>{let Q="",{length:J}=$,Y=new Uint32Array(c);a1.randomFillSync(Y);for(let X=0;X<c;X++)Q+=$[Y[X]%J];return Q},fz;var nz=d(()=>{bz();gX();Tz={DIGIT:Fz,ALPHA:eX,ALPHA_DIGIT:eX+eX.toUpperCase()+Fz},fz={isNode:!0,classes:{URLSearchParams:Ez,FormData:uJ,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Tz,generateString:l1,protocols:["http","https","file","data"]}});var Q9={};vQ(Q9,{origin:()=>o1,navigator:()=>c9,hasStandardBrowserWebWorkerEnv:()=>y1,hasStandardBrowserEnv:()=>h1,hasBrowserEnv:()=>$9});var $9,c9,h1,y1,o1;var uz=d(()=>{$9=typeof window<"u"&&typeof document<"u",c9=typeof navigator==="object"&&navigator||void 0,h1=$9&&(!c9||["ReactNative","NativeScript","NS"].indexOf(c9.product)<0),y1=(()=>{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),o1=$9&&window.location.href||"http://localhost"});var Bc;var b0=d(()=>{nz();uz();Bc={...Q9,...fz}});function J9(c,$){return K8(c,new Bc.classes.URLSearchParams,{visitor:function(Q,J,Y,X){if(Bc.isNode&&V.isBuffer(Q))return this.append(J,Q.toString("base64")),!1;return X.defaultVisitor.apply(this,arguments)},...$})}var kz=d(()=>{Lc();I$();b0()});function lz(c){if(c>az)throw new O("FormData field is too deeply nested ("+c+" levels). Max depth: "+az,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function g1(c){let $=[],Q=/\w+|\[(\w*)]/g,J;while((J=Q.exec(c))!==null)lz($.length),$.push(J[0]==="[]"?"":J[1]||J[0]);return $}function d1(c){let $={},Q=Object.keys(c),J,Y=Q.length,X;for(J=0;J<Y;J++)X=Q[J],$[X]=c[X];return $}function s1(c){function $(Q,J,Y,X){lz(X);let W=Q[X++];if(W==="__proto__")return!0;let m=Number.isFinite(+W),G=X>=Q.length;if(W=!W&&V.isArray(Y)?Y.length:W,G){if(V.hasOwnProp(Y,W))Y[W]=V.isArray(Y[W])?Y[W].concat(J):[Y[W],J];else Y[W]=J;return!m}if(!V.hasOwnProp(Y,W)||!V.isObject(Y[W]))Y[W]=[];if($(Q,J,Y[W],X)&&V.isArray(Y[W]))Y[W]=d1(Y[W]);return!m}if(V.isFormData(c)&&V.isFunction(c.entries)){let Q={};return V.forEachEntry(c,(J,Y)=>{$(g1(J),Y,Q,0)}),Q}return null}var az,aJ;var Y9=d(()=>{Lc();X0();I$();az=rX;aJ=s1});function r1(c,$,Q){if(V.isString(c))try{return($||JSON.parse)(c),V.trim(c)}catch(J){if(J.name!=="SyntaxError")throw J}return(Q||JSON.stringify)(c)}var Z$=(c,$)=>c!=null&&V.hasOwnProp(c,$)?c[$]:void 0,X9,L$;var lJ=d(()=>{Lc();X0();LQ();I$();kz();b0();Y9();X9={transitional:D8,adapter:["xhr","http","fetch"],transformRequest:[function($,Q){let J=Q.getContentType()||"",Y=J.indexOf("application/json")>-1,X=V.isObject($);if(X&&V.isHTMLForm($))$=new FormData($);if(V.isFormData($))return Y?JSON.stringify(aJ($)):$;if(V.isArrayBuffer($)||V.isBuffer($)||V.isStream($)||V.isFile($)||V.isBlob($)||V.isReadableStream($))return $;if(V.isArrayBufferView($))return $.buffer;if(V.isURLSearchParams($))return Q.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),$.toString();let m;if(X){let G=Z$(this,"formSerializer");if(J.indexOf("application/x-www-form-urlencoded")>-1)return J9($,G).toString();if((m=V.isFileList($))||J.indexOf("multipart/form-data")>-1){let z=Z$(this,"env"),x=z&&z.FormData;return K8(m?{"files[]":$}:$,x&&new x,G)}}if(X||Y)return Q.setContentType("application/json",!1),r1($);return $}],transformResponse:[function($){let Q=Z$(this,"transitional")||X9.transitional,J=Q&&Q.forcedJSONParsing,Y=Z$(this,"responseType"),X=Y==="json";if(V.isResponse($)||V.isReadableStream($))return $;if($&&V.isString($)&&(J&&!Y||X)){let m=!(Q&&Q.silentJSONParsing)&&X;try{return JSON.parse($,Z$(this,"parseReviver"))}catch(G){if(m){if(G.name==="SyntaxError")throw O.from(G,O.ERR_BAD_RESPONSE,this,null,Z$(this,"response"));throw G}}}return $}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Bc.classes.FormData,Blob:Bc.classes.Blob},validateStatus:function($){return $>=200&&$<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch","query"],(c)=>{X9.headers[c]={}});L$=X9});function _Q(c,$){let Q=this||L$,J=$||Q,Y=_c.from(J.headers),X=J.data;return V.forEach(c,function(m){X=m.call(Q,X,Y.normalize(),$?$.status:void 0)}),Y.normalize(),X}var hz=d(()=>{Lc();lJ();P0()});function SQ(c){return!!(c&&c.__CANCEL__)}var yz,w0;var h8=d(()=>{X0();yz=class yz extends O{constructor(c,$,Q){super(c==null?"canceled":c,O.ERR_CANCELED,$,Q);this.name="CanceledError",this.__CANCEL__=!0}};w0=yz});function d0(c,$,Q){let J=Q.config.validateStatus;if(!Q.status||!J||J(Q.status))c(Q);else $(new O("Request failed with status code "+Q.status,Q.status>=400&&Q.status<500?O.ERR_BAD_REQUEST:O.ERR_BAD_RESPONSE,Q.config,Q.request,Q))}var hJ=d(()=>{X0()});function W9(c){if(typeof c!=="string")return!1;return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(c)}function m9(c,$){return $?c.replace(/\/?\/$/,"")+"/"+$.replace(/^\/+/,""):c}function cv(c){let $=0;while($<c.length&&c.charCodeAt($)<=32)$++;return c.slice($)}function $v(c){return cv(c).replace(e1,"")}function oz(c,$){if(typeof c==="string"&&t1.test($v(c)))throw new O('Invalid URL: missing "//" after protocol',O.ERR_INVALID_URL,$)}function y8(c,$,Q,J){oz($,J);let Y=!W9($);if(c&&(Y||Q===!1))return oz(c,J),m9(c,$);return $}var t1,e1;var yJ=d(()=>{X0();t1=/^https?:(?!\/\/)/i,e1=/[\t\n\r]/g});function Jv(c){try{return new URL(c)}catch{return null}}function gz(c){var $=(typeof c==="string"?Jv(c):c)||{},Q=$.protocol,J=$.host,Y=$.port;if(typeof J!=="string"||!J||typeof Q!=="string")return"";if(Q=Q.split(":",1)[0],J=J.replace(/:\d*$/,""),Y=parseInt(Y)||Qv[Q]||0,!Yv(J,Y))return"";var X=G9(Q+"_proxy")||G9("all_proxy");if(X&&X.indexOf("://")===-1)X=Q+"://"+X;return X}function Yv(c,$){var Q=G9("no_proxy").toLowerCase();if(!Q)return!0;if(Q==="*")return!1;return Q.split(/[,\s]/).every(function(J){if(!J)return!0;var Y=J.match(/^(.+):(\d+)$/),X=Y?Y[1]:J,W=Y?parseInt(Y[2]):0;if(W&&W!==$)return!0;if(!/^[.*]/.test(X))return c!==X;if(X.charAt(0)==="*")X=X.slice(1);return!c.endsWith(X)})}function G9(c){return process.env[c.toLowerCase()]||process.env[c.toUpperCase()]||""}var Qv;var dz=d(()=>{Qv={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443}});var rz=l((b3,sz)=>{var _$=1000,S$=_$*60,A$=S$*60,o8=A$*24,Xv=o8*7,Wv=o8*365.25;sz.exports=function(c,$){$=$||{};var Q=typeof c;if(Q==="string"&&c.length>0)return mv(c);else if(Q==="number"&&isFinite(c))return $.long?zv(c):Gv(c);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))};function mv(c){if(c=String(c),c.length>100)return;var $=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(!$)return;var Q=parseFloat($[1]),J=($[2]||"ms").toLowerCase();switch(J){case"years":case"year":case"yrs":case"yr":case"y":return Q*Wv;case"weeks":case"week":case"w":return Q*Xv;case"days":case"day":case"d":return Q*o8;case"hours":case"hour":case"hrs":case"hr":case"h":return Q*A$;case"minutes":case"minute":case"mins":case"min":case"m":return Q*S$;case"seconds":case"second":case"secs":case"sec":case"s":return Q*_$;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return Q;default:return}}function Gv(c){var $=Math.abs(c);if($>=o8)return Math.round(c/o8)+"d";if($>=A$)return Math.round(c/A$)+"h";if($>=S$)return Math.round(c/S$)+"m";if($>=_$)return Math.round(c/_$)+"s";return c+"ms"}function zv(c){var $=Math.abs(c);if($>=o8)return oJ(c,$,o8,"day");if($>=A$)return oJ(c,$,A$,"hour");if($>=S$)return oJ(c,$,S$,"minute");if($>=_$)return oJ(c,$,_$,"second");return c+" ms"}function oJ(c,$,Q,J){var Y=$>=Q*1.5;return Math.round(c/Q)+" "+J+(Y?"s":"")}});var z9=l((F3,tz)=>{function xv(c){Q.debug=Q,Q.default=Q,Q.coerce=G,Q.disable=W,Q.enable=Y,Q.enabled=m,Q.humanize=rz(),Q.destroy=z,Object.keys(c).forEach((x)=>{Q[x]=c[x]}),Q.names=[],Q.skips=[],Q.formatters={};function $(x){let q=0;for(let M=0;M<x.length;M++)q=(q<<5)-q+x.charCodeAt(M),q|=0;return Q.colors[Math.abs(q)%Q.colors.length]}Q.selectColor=$;function Q(x){let q,M=null,N,w;function U(...v){if(!U.enabled)return;let i=U,j=Number(new Date),D=j-(q||j);if(i.diff=D,i.prev=q,i.curr=j,q=j,v[0]=Q.coerce(v[0]),typeof v[0]!=="string")v.unshift("%O");let _=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(g,Jc)=>{if(g==="%%")return"%";_++;let u=Q.formatters[Jc];if(typeof u==="function"){let a=v[_];g=u.call(i,a),v.splice(_,1),_--}return g}),Q.formatArgs.call(i,v),(i.log||Q.log).apply(i,v)}if(U.namespace=x,U.useColors=Q.useColors(),U.color=Q.selectColor(x),U.extend=J,U.destroy=Q.destroy,Object.defineProperty(U,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(M!==null)return M;if(N!==Q.namespaces)N=Q.namespaces,w=Q.enabled(x);return w},set:(v)=>{M=v}}),typeof Q.init==="function")Q.init(U);return U}function J(x,q){let M=Q(this.namespace+(typeof q>"u"?":":q)+x);return M.log=this.log,M}function Y(x){Q.save(x),Q.namespaces=x,Q.names=[],Q.skips=[];let q=(typeof x==="string"?x:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let M of q)if(M[0]==="-")Q.skips.push(M.slice(1));else Q.names.push(M)}function X(x,q){let M=0,N=0,w=-1,U=0;while(M<x.length)if(N<q.length&&(q[N]===x[M]||q[N]==="*"))if(q[N]==="*")w=N,U=M,N++;else M++,N++;else if(w!==-1)N=w+1,U++,M=U;else return!1;while(N<q.length&&q[N]==="*")N++;return N===q.length}function W(){let x=[...Q.names,...Q.skips.map((q)=>"-"+q)].join(",");return Q.enable(""),x}function m(x){for(let q of Q.skips)if(X(x,q))return!1;for(let q of Q.names)if(X(x,q))return!0;return!1}function G(x){if(x instanceof Error)return x.stack||x.message;return x}function z(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return Q.enable(Q.load()),Q}tz.exports=xv});var c5=l((ez,gJ)=>{ez.formatArgs=Mv;ez.save=Nv;ez.load=Vv;ez.useColors=qv;ez.storage=wv();ez.destroy=(()=>{let c=!1;return()=>{if(!c)c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();ez.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function qv(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Mv(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+gJ.exports.humanize(this.diff),!this.useColors)return;let $="color: "+this.color;c.splice(1,0,$,"color: inherit");let Q=0,J=0;c[0].replace(/%[a-zA-Z%]/g,(Y)=>{if(Y==="%%")return;if(Q++,Y==="%c")J=Q}),c.splice(J,0,$)}ez.log=console.debug||console.log||(()=>{});function Nv(c){try{if(c)ez.storage.setItem("debug",c);else ez.storage.removeItem("debug")}catch($){}}function Vv(){let c;try{c=ez.storage.getItem("debug")||ez.storage.getItem("DEBUG")}catch($){}if(!c&&typeof process<"u"&&"env"in process)c=process.env.DEBUG;return c}function wv(){try{return localStorage}catch(c){}}gJ.exports=z9()(ez);var{formatters:iv}=gJ.exports;iv.j=function(c){try{return JSON.stringify(c)}catch($){return"[UnexpectedJSONParseError]: "+$.message}}});var Q5=l((f3,$5)=>{$5.exports=(c,$=process.argv)=>{let Q=c.startsWith("-")?"":c.length===1?"-":"--",J=$.indexOf(Q+c),Y=$.indexOf("--");return J!==-1&&(Y===-1||J<Y)}});var X5=l((n3,Y5)=>{var Ov=Zc("os"),J5=Zc("tty"),B0=Q5(),{env:ac}=process,B8;if(B0("no-color")||B0("no-colors")||B0("color=false")||B0("color=never"))B8=0;else if(B0("color")||B0("colors")||B0("color=true")||B0("color=always"))B8=1;if("FORCE_COLOR"in ac)if(ac.FORCE_COLOR==="true")B8=1;else if(ac.FORCE_COLOR==="false")B8=0;else B8=ac.FORCE_COLOR.length===0?1:Math.min(parseInt(ac.FORCE_COLOR,10),3);function x9(c){if(c===0)return!1;return{level:c,hasBasic:!0,has256:c>=2,has16m:c>=3}}function q9(c,$){if(B8===0)return 0;if(B0("color=16m")||B0("color=full")||B0("color=truecolor"))return 3;if(B0("color=256"))return 2;if(c&&!$&&B8===void 0)return 0;let Q=B8||0;if(ac.TERM==="dumb")return Q;if(process.platform==="win32"){let J=Ov.release().split(".");if(Number(J[0])>=10&&Number(J[2])>=10586)return Number(J[2])>=14931?3:2;return 1}if("CI"in ac){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((J)=>(J in ac))||ac.CI_NAME==="codeship")return 1;return Q}if("TEAMCITY_VERSION"in ac)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ac.TEAMCITY_VERSION)?1:0;if(ac.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ac){let J=parseInt((ac.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ac.TERM_PROGRAM){case"iTerm.app":return J>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(ac.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ac.TERM))return 1;if("COLORTERM"in ac)return 1;return Q}function Rv(c){let $=q9(c,c&&c.isTTY);return x9($)}Y5.exports={supportsColor:Rv,stdout:x9(q9(!0,J5.isatty(1))),stderr:x9(q9(!0,J5.isatty(2)))}});var z5=l((m5,sJ)=>{var pv=Zc("tty"),dJ=Zc("util");m5.init=Cv;m5.log=_v;m5.formatArgs=Zv;m5.save=Sv;m5.load=Av;m5.useColors=Iv;m5.destroy=dJ.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");m5.colors=[6,2,3,4,5,1];try{let c=X5();if(c&&(c.stderr||c).level>=2)m5.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(c){}m5.inspectOpts=Object.keys(process.env).filter((c)=>{return/^debug_/i.test(c)}).reduce((c,$)=>{let Q=$.substring(6).toLowerCase().replace(/_([a-z])/g,(Y,X)=>{return X.toUpperCase()}),J=process.env[$];if(/^(yes|on|true|enabled)$/i.test(J))J=!0;else if(/^(no|off|false|disabled)$/i.test(J))J=!1;else if(J==="null")J=null;else J=Number(J);return c[Q]=J,c},{});function Iv(){return"colors"in m5.inspectOpts?Boolean(m5.inspectOpts.colors):pv.isatty(process.stderr.fd)}function Zv(c){let{namespace:$,useColors:Q}=this;if(Q){let J=this.color,Y="\x1B[3"+(J<8?J:"8;5;"+J),X=` ${Y};1m${$} \x1B[0m`;c[0]=X+c[0].split(`
|
|
9
|
+
*/var SJ=A7(),Yi=Ic("path").extname,C7=/^\s*([^;\s]*)(?:;|\s|$)/,Xi=/^text\//i;xi.charset=P7;xi.charsets={lookup:P7};xi.contentType=Wi;xi.extension=mi;xi.extensions=Object.create(null);xi.lookup=Gi;xi.types=Object.create(null);zi(xi.extensions,xi.types);function P7(c){if(!c||typeof c!=="string")return!1;var $=C7.exec(c),Q=$&&SJ[$[1].toLowerCase()];if(Q&&Q.charset)return Q.charset;if($&&Xi.test($[1]))return"UTF-8";return!1}function Wi(c){if(!c||typeof c!=="string")return!1;var $=c.indexOf("/")===-1?xi.lookup(c):c;if(!$)return!1;if($.indexOf("charset")===-1){var Q=xi.charset($);if(Q)$+="; charset="+Q.toLowerCase()}return $}function mi(c){if(!c||typeof c!=="string")return!1;var $=C7.exec(c),Q=$&&xi.extensions[$[1].toLowerCase()];if(!Q||!Q.length)return!1;return Q[0]}function Gi(c){if(!c||typeof c!=="string")return!1;var $=Yi("x."+c).toLowerCase().substr(1);if(!$)return!1;return xi.types[$]||!1}function zi(c,$){var Q=["nginx","apache",void 0,"iana"];Object.keys(SJ).forEach(function(Y){var X=SJ[Y],W=X.extensions;if(!W||!W.length)return;c[Y]=W;for(var m=0;m<W.length;m++){var G=W[m];if($[G]){var z=Q.indexOf(SJ[$[G]].source),x=Q.indexOf(X.source);if($[G]!=="application/octet-stream"&&(z>x||z===x&&$[G].substr(0,12)==="application/"))continue}$[G]=Y}})}});var f7=l((dI,T7)=>{T7.exports=Vi;function Vi(c){var $=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if($)$(c);else setTimeout(c,0)}});var LX=l((sI,u7)=>{var n7=f7();u7.exports=wi;function wi(c){var $=!1;return n7(function(){$=!0}),function(J,Y){if($)c(J,Y);else n7(function(){c(J,Y)})}}});var _X=l((rI,k7)=>{k7.exports=ii;function ii(c){Object.keys(c.jobs).forEach(vi.bind(c)),c.jobs={}}function vi(c){if(typeof this.jobs[c]=="function")this.jobs[c]()}});var SX=l((tI,l7)=>{var a7=LX(),Ui=_X();l7.exports=ji;function ji(c,$,Q,J){var Y=Q.keyedList?Q.keyedList[Q.index]:Q.index;Q.jobs[Y]=Ki($,Y,c[Y],function(X,W){if(!(Y in Q.jobs))return;if(delete Q.jobs[Y],X)Ui(Q);else Q.results[Y]=W;J(X,Q.results)})}function Ki(c,$,Q,J){var Y;if(c.length==2)Y=c(Q,a7(J));else Y=c(Q,$,a7(J));return Y}});var AX=l((eI,h7)=>{h7.exports=Di;function Di(c,$){var Q=!Array.isArray(c),J={index:0,keyedList:Q||$?Object.keys(c):null,jobs:{},results:Q?{}:[],size:Q?Object.keys(c).length:c.length};if($)J.keyedList.sort(Q?$:function(Y,X){return $(c[Y],c[X])});return J}});var CX=l((cL,y7)=>{var Bi=_X(),Hi=LX();y7.exports=Oi;function Oi(c){if(!Object.keys(this.jobs).length)return;this.index=this.size,Bi(this),Hi(c)(null,this.results)}});var g7=l(($L,o7)=>{var Ri=SX(),pi=AX(),Zi=CX();o7.exports=Ii;function Ii(c,$,Q){var J=pi(c);while(J.index<(J.keyedList||c).length)Ri(c,$,J,function(Y,X){if(Y){Q(Y,X);return}if(Object.keys(J.jobs).length===0){Q(null,J.results);return}}),J.index++;return Zi.bind(J,Q)}});var PX=l((QL,AJ)=>{var d7=SX(),Li=AX(),_i=CX();AJ.exports=Si;AJ.exports.ascending=s7;AJ.exports.descending=Ai;function Si(c,$,Q,J){var Y=Li(c,Q);return d7(c,$,Y,function X(W,m){if(W){J(W,m);return}if(Y.index++,Y.index<(Y.keyedList||c).length){d7(c,$,Y,X);return}J(null,Y.results)}),_i.bind(Y,J)}function s7(c,$){return c<$?-1:c>$?1:0}function Ai(c,$){return-1*s7(c,$)}});var t7=l((JL,r7)=>{var Ci=PX();r7.exports=Pi;function Pi(c,$,Q){return Ci(c,$,null,Q)}});var cG=l((YL,e7)=>{e7.exports={parallel:g7(),serial:t7(),serialOrdered:PX()}});var EX=l((XL,$G)=>{$G.exports=Object});var JG=l((WL,QG)=>{QG.exports=Error});var XG=l((mL,YG)=>{YG.exports=EvalError});var mG=l((GL,WG)=>{WG.exports=RangeError});var zG=l((zL,GG)=>{GG.exports=ReferenceError});var qG=l((xL,xG)=>{xG.exports=SyntaxError});var CJ=l((qL,MG)=>{MG.exports=TypeError});var VG=l((ML,NG)=>{NG.exports=URIError});var iG=l((NL,wG)=>{wG.exports=Math.abs});var UG=l((VL,vG)=>{vG.exports=Math.floor});var KG=l((wL,jG)=>{jG.exports=Math.max});var BG=l((iL,DG)=>{DG.exports=Math.min});var OG=l((vL,HG)=>{HG.exports=Math.pow});var pG=l((UL,RG)=>{RG.exports=Math.round});var IG=l((jL,ZG)=>{ZG.exports=Number.isNaN||function($){return $!==$}});var _G=l((KL,LG)=>{var Ei=IG();LG.exports=function($){if(Ei($)||$===0)return $;return $<0?-1:1}});var AG=l((DL,SG)=>{SG.exports=Object.getOwnPropertyDescriptor});var bX=l((BL,CG)=>{var PJ=AG();if(PJ)try{PJ([],"length")}catch(c){PJ=null}CG.exports=PJ});var EG=l((HL,PG)=>{var EJ=Object.defineProperty||!1;if(EJ)try{EJ({},"a",{value:1})}catch(c){EJ=!1}PG.exports=EJ});var FX=l((OL,bG)=>{bG.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var $={},Q=Symbol("test"),J=Object(Q);if(typeof Q==="string")return!1;if(Object.prototype.toString.call(Q)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(J)!=="[object Symbol]")return!1;var Y=42;$[Q]=Y;for(var X in $)return!1;if(typeof Object.keys==="function"&&Object.keys($).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames($).length!==0)return!1;var W=Object.getOwnPropertySymbols($);if(W.length!==1||W[0]!==Q)return!1;if(!Object.prototype.propertyIsEnumerable.call($,Q))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var m=Object.getOwnPropertyDescriptor($,Q);if(m.value!==Y||m.enumerable!==!0)return!1}return!0}});var fG=l((RL,TG)=>{var FG=typeof Symbol<"u"&&Symbol,bi=FX();TG.exports=function(){if(typeof FG!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof FG("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return bi()}});var TX=l((pL,nG)=>{nG.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var fX=l((ZL,uG)=>{var Fi=EX();uG.exports=Fi.getPrototypeOf||null});var lG=l((IL,aG)=>{var Ti="Function.prototype.bind called on incompatible ",fi=Object.prototype.toString,ni=Math.max,ui="[object Function]",kG=function($,Q){var J=[];for(var Y=0;Y<$.length;Y+=1)J[Y]=$[Y];for(var X=0;X<Q.length;X+=1)J[X+$.length]=Q[X];return J},ki=function($,Q){var J=[];for(var Y=Q||0,X=0;Y<$.length;Y+=1,X+=1)J[X]=$[Y];return J},ai=function(c,$){var Q="";for(var J=0;J<c.length;J+=1)if(Q+=c[J],J+1<c.length)Q+=$;return Q};aG.exports=function($){var Q=this;if(typeof Q!=="function"||fi.apply(Q)!==ui)throw TypeError(Ti+Q);var J=ki(arguments,1),Y,X=function(){if(this instanceof Y){var x=Q.apply(this,kG(J,arguments));if(Object(x)===x)return x;return this}return Q.apply($,kG(J,arguments))},W=ni(0,Q.length-J.length),m=[];for(var G=0;G<W;G++)m[G]="$"+G;if(Y=Function("binder","return function ("+ai(m,",")+"){ return binder.apply(this,arguments); }")(X),Q.prototype){var z=function(){};z.prototype=Q.prototype,Y.prototype=new z,z.prototype=null}return Y}});var RQ=l((LL,hG)=>{var li=lG();hG.exports=Function.prototype.bind||li});var bJ=l((_L,yG)=>{yG.exports=Function.prototype.call});var nX=l((SL,oG)=>{oG.exports=Function.prototype.apply});var dG=l((AL,gG)=>{gG.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var rG=l((CL,sG)=>{var hi=RQ(),yi=nX(),oi=bJ(),gi=dG();sG.exports=gi||hi.call(oi,yi)});var eG=l((PL,tG)=>{var di=RQ(),si=CJ(),ri=bJ(),ti=rG();tG.exports=function($){if($.length<1||typeof $[0]!=="function")throw new si("a function is required");return ti(di,ri,$)}});var Xz=l((EL,Yz)=>{var ei=eG(),cz=bX(),Qz;try{Qz=[].__proto__===Array.prototype}catch(c){if(!c||typeof c!=="object"||!("code"in c)||c.code!=="ERR_PROTO_ACCESS")throw c}var uX=!!Qz&&cz&&cz(Object.prototype,"__proto__"),Jz=Object,$z=Jz.getPrototypeOf;Yz.exports=uX&&typeof uX.get==="function"?ei([uX.get]):typeof $z==="function"?function($){return $z($==null?$:Jz($))}:!1});var xz=l((bL,zz)=>{var Wz=TX(),mz=fX(),Gz=Xz();zz.exports=Wz?function($){return Wz($)}:mz?function($){if(!$||typeof $!=="object"&&typeof $!=="function")throw TypeError("getProto: not an object");return mz($)}:Gz?function($){return Gz($)}:null});var FJ=l((FL,qz)=>{var c1=Function.prototype.call,$1=Object.prototype.hasOwnProperty,Q1=RQ();qz.exports=Q1.call(c1,$1)});var vz=l((TL,iz)=>{var Vc,J1=EX(),Y1=JG(),X1=XG(),W1=mG(),m1=zG(),Z$=qG(),p$=CJ(),G1=VG(),z1=iG(),x1=UG(),q1=KG(),M1=BG(),N1=OG(),V1=pG(),w1=_G(),Vz=Function,kX=function(c){try{return Vz('"use strict"; return ('+c+").constructor;")()}catch($){}},pQ=bX(),i1=EG(),aX=function(){throw new p$},v1=pQ?function(){try{return arguments.callee,aX}catch(c){try{return pQ(arguments,"callee").get}catch($){return aX}}}():aX,O$=fG()(),kc=xz(),U1=fX(),j1=TX(),wz=nX(),ZQ=bJ(),R$={},K1=typeof Uint8Array>"u"||!kc?Vc:kc(Uint8Array),a8={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Vc:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Vc:ArrayBuffer,"%ArrayIteratorPrototype%":O$&&kc?kc([][Symbol.iterator]()):Vc,"%AsyncFromSyncIteratorPrototype%":Vc,"%AsyncFunction%":R$,"%AsyncGenerator%":R$,"%AsyncGeneratorFunction%":R$,"%AsyncIteratorPrototype%":R$,"%Atomics%":typeof Atomics>"u"?Vc:Atomics,"%BigInt%":typeof BigInt>"u"?Vc:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Vc:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Vc:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Vc:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Y1,"%eval%":eval,"%EvalError%":X1,"%Float16Array%":typeof Float16Array>"u"?Vc:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Vc:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Vc:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Vc:FinalizationRegistry,"%Function%":Vz,"%GeneratorFunction%":R$,"%Int8Array%":typeof Int8Array>"u"?Vc:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Vc:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Vc:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":O$&&kc?kc(kc([][Symbol.iterator]())):Vc,"%JSON%":typeof JSON==="object"?JSON:Vc,"%Map%":typeof Map>"u"?Vc:Map,"%MapIteratorPrototype%":typeof Map>"u"||!O$||!kc?Vc:kc(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":J1,"%Object.getOwnPropertyDescriptor%":pQ,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Vc:Promise,"%Proxy%":typeof Proxy>"u"?Vc:Proxy,"%RangeError%":W1,"%ReferenceError%":m1,"%Reflect%":typeof Reflect>"u"?Vc:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Vc:Set,"%SetIteratorPrototype%":typeof Set>"u"||!O$||!kc?Vc:kc(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Vc:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":O$&&kc?kc(""[Symbol.iterator]()):Vc,"%Symbol%":O$?Symbol:Vc,"%SyntaxError%":Z$,"%ThrowTypeError%":v1,"%TypedArray%":K1,"%TypeError%":p$,"%Uint8Array%":typeof Uint8Array>"u"?Vc:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Vc:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Vc:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Vc:Uint32Array,"%URIError%":G1,"%WeakMap%":typeof WeakMap>"u"?Vc:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Vc:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Vc:WeakSet,"%Function.prototype.call%":ZQ,"%Function.prototype.apply%":wz,"%Object.defineProperty%":i1,"%Object.getPrototypeOf%":U1,"%Math.abs%":z1,"%Math.floor%":x1,"%Math.max%":q1,"%Math.min%":M1,"%Math.pow%":N1,"%Math.round%":V1,"%Math.sign%":w1,"%Reflect.getPrototypeOf%":j1};if(kc)try{null.error}catch(c){lX=kc(kc(c)),a8["%Error.prototype%"]=lX}var lX,D1=function c($){var Q;if($==="%AsyncFunction%")Q=kX("async function () {}");else if($==="%GeneratorFunction%")Q=kX("function* () {}");else if($==="%AsyncGeneratorFunction%")Q=kX("async function* () {}");else if($==="%AsyncGenerator%"){var J=c("%AsyncGeneratorFunction%");if(J)Q=J.prototype}else if($==="%AsyncIteratorPrototype%"){var Y=c("%AsyncGenerator%");if(Y&&kc)Q=kc(Y.prototype)}return a8[$]=Q,Q},Mz={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},IQ=RQ(),TJ=FJ(),B1=IQ.call(ZQ,Array.prototype.concat),H1=IQ.call(wz,Array.prototype.splice),Nz=IQ.call(ZQ,String.prototype.replace),fJ=IQ.call(ZQ,String.prototype.slice),O1=IQ.call(ZQ,RegExp.prototype.exec),R1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,p1=/\\(\\)?/g,Z1=function($){var Q=fJ($,0,1),J=fJ($,-1);if(Q==="%"&&J!=="%")throw new Z$("invalid intrinsic syntax, expected closing `%`");else if(J==="%"&&Q!=="%")throw new Z$("invalid intrinsic syntax, expected opening `%`");var Y=[];return Nz($,R1,function(X,W,m,G){Y[Y.length]=m?Nz(G,p1,"$1"):W||X}),Y},I1=function($,Q){var J=$,Y;if(TJ(Mz,J))Y=Mz[J],J="%"+Y[0]+"%";if(TJ(a8,J)){var X=a8[J];if(X===R$)X=D1(J);if(typeof X>"u"&&!Q)throw new p$("intrinsic "+$+" exists, but is not available. Please file an issue!");return{alias:Y,name:J,value:X}}throw new Z$("intrinsic "+$+" does not exist!")};iz.exports=function($,Q){if(typeof $!=="string"||$.length===0)throw new p$("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Q!=="boolean")throw new p$('"allowMissing" argument must be a boolean');if(O1(/^%?[^%]*%?$/,$)===null)throw new Z$("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var J=Z1($),Y=J.length>0?J[0]:"",X=I1("%"+Y+"%",Q),W=X.name,m=X.value,G=!1,z=X.alias;if(z)Y=z[0],H1(J,B1([0,1],z));for(var x=1,q=!0;x<J.length;x+=1){var M=J[x],N=fJ(M,0,1),w=fJ(M,-1);if((N==='"'||N==="'"||N==="`"||(w==='"'||w==="'"||w==="`"))&&N!==w)throw new Z$("property names with quotes must have matching quotes");if(M==="constructor"||!q)G=!0;if(Y+="."+M,W="%"+Y+"%",TJ(a8,W))m=a8[W];else if(m!=null){if(!(M in m)){if(!Q)throw new p$("base intrinsic for "+$+" exists, but the property is not available.");return}if(pQ&&x+1>=J.length){var U=pQ(m,M);if(q=!!U,q&&"get"in U&&!("originalValue"in U.get))m=U.get;else m=m[M]}else q=TJ(m,M),m=m[M];if(q&&!G)a8[W]=m}}return m}});var jz=l((fL,Uz)=>{var L1=FX();Uz.exports=function(){return L1()&&!!Symbol.toStringTag}});var Bz=l((nL,Dz)=>{var _1=vz(),Kz=_1("%Object.defineProperty%",!0),S1=jz()(),A1=FJ(),C1=CJ(),nJ=S1?Symbol.toStringTag:null;Dz.exports=function($,Q){var J=arguments.length>2&&!!arguments[2]&&arguments[2].force,Y=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof J<"u"&&typeof J!=="boolean"||typeof Y<"u"&&typeof Y!=="boolean")throw new C1("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");if(nJ&&(J||!A1($,nJ)))if(Kz)Kz($,nJ,{configurable:!Y,enumerable:!1,value:Q,writable:!1});else $[nJ]=Q}});var Oz=l((uL,Hz)=>{Hz.exports=function(c,$){return Object.keys($).forEach(function(Q){c[Q]=c[Q]||$[Q]}),c}});var Zz=l((kL,pz)=>{var gX=S7(),P1=Ic("util"),hX=Ic("path"),E1=Ic("http"),b1=Ic("https"),F1=Ic("url").parse,T1=Ic("fs"),f1=Ic("stream").Stream,n1=Ic("crypto"),yX=F7(),u1=cG(),k1=Bz(),j8=FJ(),oX=Oz();function Rz(c){return String(c).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function jc(c){if(!(this instanceof jc))return new jc(c);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],gX.call(this),c=c||{};for(var $ in c)this[$]=c[$]}P1.inherits(jc,gX);jc.LINE_BREAK=`\r
|
|
10
|
+
`;jc.DEFAULT_CONTENT_TYPE="application/octet-stream";jc.prototype.append=function(c,$,Q){if(Q=Q||{},typeof Q==="string")Q={filename:Q};var J=gX.prototype.append.bind(this);if(typeof $==="number"||$==null)$=String($);if(Array.isArray($)){this._error(Error("Arrays are not supported."));return}var Y=this._multiPartHeader(c,$,Q),X=this._multiPartFooter();J(Y),J($),J(X),this._trackLength(Y,$,Q)};jc.prototype._trackLength=function(c,$,Q){var J=0;if(Q.knownLength!=null)J+=Number(Q.knownLength);else if(Buffer.isBuffer($))J=$.length;else if(typeof $==="string")J=Buffer.byteLength($);if(this._valueLength+=J,this._overheadLength+=Buffer.byteLength(c)+jc.LINE_BREAK.length,!$||!$.path&&!($.readable&&j8($,"httpVersion"))&&!($ instanceof f1))return;if(!Q.knownLength)this._valuesToMeasure.push($)};jc.prototype._lengthRetriever=function(c,$){if(j8(c,"fd"))if(c.end!=null&&c.end!=1/0&&c.start!=null)$(null,c.end+1-(c.start?c.start:0));else T1.stat(c.path,function(Q,J){if(Q){$(Q);return}var Y=J.size-(c.start?c.start:0);$(null,Y)});else if(j8(c,"httpVersion"))$(null,Number(c.headers["content-length"]));else if(j8(c,"httpModule"))c.on("response",function(Q){c.pause(),$(null,Number(Q.headers["content-length"]))}),c.resume();else $("Unknown stream")};jc.prototype._multiPartHeader=function(c,$,Q){if(typeof Q.header==="string")return Q.header;var J=this._getContentDisposition($,Q),Y=this._getContentType($,Q),X="",W={"Content-Disposition":["form-data",'name="'+Rz(c)+'"'].concat(J||[]),"Content-Type":[].concat(Y||[])};if(typeof Q.header==="object")oX(W,Q.header);var m;for(var G in W)if(j8(W,G)){if(m=W[G],m==null)continue;if(!Array.isArray(m))m=[m];if(m.length)X+=G+": "+m.join("; ")+jc.LINE_BREAK}return"--"+this.getBoundary()+jc.LINE_BREAK+X+jc.LINE_BREAK};jc.prototype._getContentDisposition=function(c,$){var Q;if(typeof $.filepath==="string")Q=hX.normalize($.filepath).replace(/\\/g,"/");else if($.filename||c&&(c.name||c.path))Q=hX.basename($.filename||c&&(c.name||c.path));else if(c&&c.readable&&j8(c,"httpVersion"))Q=hX.basename(c.client._httpMessage.path||"");if(Q)return'filename="'+Rz(Q)+'"'};jc.prototype._getContentType=function(c,$){var Q=$.contentType;if(!Q&&c&&c.name)Q=yX.lookup(c.name);if(!Q&&c&&c.path)Q=yX.lookup(c.path);if(!Q&&c&&c.readable&&j8(c,"httpVersion"))Q=c.headers["content-type"];if(!Q&&($.filepath||$.filename))Q=yX.lookup($.filepath||$.filename);if(!Q&&c&&typeof c==="object")Q=jc.DEFAULT_CONTENT_TYPE;return Q};jc.prototype._multiPartFooter=function(){return function(c){var $=jc.LINE_BREAK,Q=this._streams.length===0;if(Q)$+=this._lastBoundary();c($)}.bind(this)};jc.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+jc.LINE_BREAK};jc.prototype.getHeaders=function(c){var $,Q={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for($ in c)if(j8(c,$))Q[$.toLowerCase()]=c[$];return Q};jc.prototype.setBoundary=function(c){if(typeof c!=="string")throw TypeError("FormData boundary must be a string");this._boundary=c};jc.prototype.getBoundary=function(){if(!this._boundary)this._generateBoundary();return this._boundary};jc.prototype.getBuffer=function(){var c=new Buffer.alloc(0),$=this.getBoundary();for(var Q=0,J=this._streams.length;Q<J;Q++)if(typeof this._streams[Q]!=="function"){if(Buffer.isBuffer(this._streams[Q]))c=Buffer.concat([c,this._streams[Q]]);else c=Buffer.concat([c,Buffer.from(this._streams[Q])]);if(typeof this._streams[Q]!=="string"||this._streams[Q].substring(2,$.length+2)!==$)c=Buffer.concat([c,Buffer.from(jc.LINE_BREAK)])}return Buffer.concat([c,Buffer.from(this._lastBoundary())])};jc.prototype._generateBoundary=function(){this._boundary="--------------------------"+n1.randomBytes(12).toString("hex")};jc.prototype.getLengthSync=function(){var c=this._overheadLength+this._valueLength;if(this._streams.length)c+=this._lastBoundary().length;if(!this.hasKnownLength())this._error(Error("Cannot calculate proper length in synchronous way."));return c};jc.prototype.hasKnownLength=function(){var c=!0;if(this._valuesToMeasure.length)c=!1;return c};jc.prototype.getLength=function(c){var $=this._overheadLength+this._valueLength;if(this._streams.length)$+=this._lastBoundary().length;if(!this._valuesToMeasure.length){process.nextTick(c.bind(this,null,$));return}u1.parallel(this._valuesToMeasure,this._lengthRetriever,function(Q,J){if(Q){c(Q);return}J.forEach(function(Y){$+=Y}),c(null,$)})};jc.prototype.submit=function(c,$){var Q,J,Y={method:"post"};if(typeof c==="string")c=F1(c),J=oX({port:c.port,path:c.pathname,host:c.hostname,protocol:c.protocol},Y);else if(J=oX(c,Y),!J.port)J.port=J.protocol==="https:"?443:80;if(J.headers=this.getHeaders(c.headers),J.protocol==="https:")Q=b1.request(J);else Q=E1.request(J);return this.getLength(function(X,W){if(X&&X!=="Unknown stream"){this._error(X);return}if(W)Q.setHeader("Content-Length",W);if(this.pipe(Q),$){var m,G=function(z,x){return Q.removeListener("error",G),Q.removeListener("response",m),$.call(this,z,x)};m=G.bind(this,null),Q.on("error",G),Q.on("response",m)}}.bind(this)),Q};jc.prototype._error=function(c){if(!this.error)this.error=c,this.pause(),this.emit("error",c)};jc.prototype.toString=function(){return"[object FormData]"};k1(jc.prototype,"FormData");pz.exports=jc});var Iz,uJ;var dX=g(()=>{Iz=BX(Zz(),1),uJ=Iz.default});function rX(c){return V.isPlainObject(c)||V.isArray(c)}function Lz(c){return V.endsWith(c,"[]")?c.slice(0,-2):c}function sX(c,$,Q){if(!c)return $;return c.concat($).map(function(Y,X){return Y=Lz(Y),!Q&&X?"["+Y+"]":Y}).join(Q?".":"")}function a1(c){return V.isArray(c)&&!c.some(rX)}function h1(c,$,Q){if(!V.isObject(c))throw TypeError("target must be an object");$=$||new(uJ||FormData),Q=V.toFlatObject(Q,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,D){return!V.isUndefined(D[j])});let J=Q.metaTokens,Y=Q.visitor||w,X=Q.dots,W=Q.indexes,m=Q.Blob||typeof Blob<"u"&&Blob,G=Q.maxDepth===void 0?tX:Q.maxDepth,z=m&&V.isSpecCompliantForm($),x=[];if(!V.isFunction(Y))throw TypeError("visitor must be a function");function q(i){if(i===null)return"";if(V.isDate(i))return i.toISOString();if(V.isBoolean(i))return i.toString();if(!z&&V.isBlob(i))throw new O("Blob is not supported. Use a Buffer instead.");if(V.isArrayBuffer(i)||V.isTypedArray(i))return z&&typeof Blob==="function"?new Blob([i]):Buffer.from(i);return i}function M(i){if(i>G)throw new O("Object is too deeply nested ("+i+" levels). Max depth: "+G,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function N(i,j){if(G===1/0)return JSON.stringify(i);let D=[];return JSON.stringify(i,function(mc,d){if(!V.isObject(d))return d;while(D.length&&D[D.length-1]!==this)D.pop();return D.push(d),M(j+D.length-1),d})}function w(i,j,D){let _=i;if(V.isReactNative($)&&V.isReactNativeBlob(i))return $.append(sX(D,j,X),q(i)),!1;if(i&&!D&&typeof i==="object"){if(V.endsWith(j,"{}"))j=J?j:j.slice(0,-2),i=N(i,1);else if(V.isArray(i)&&a1(i)||(V.isFileList(i)||V.endsWith(j,"[]"))&&(_=V.toArray(i)))return j=Lz(j),_.forEach(function(d,Jc){!(V.isUndefined(d)||d===null)&&$.append(W===!0?sX([j],Jc,X):W===null?j:j+"[]",q(d))}),!1}if(rX(i))return!0;return $.append(sX(D,j,X),q(i)),!1}let U=Object.assign(l1,{defaultVisitor:w,convertValue:q,isVisitable:rX});function v(i,j,D=0){if(V.isUndefined(i))return;if(M(D),x.indexOf(i)!==-1)throw Error("Circular reference detected in "+j.join("."));x.push(i),V.forEach(i,function(mc,d){if((!(V.isUndefined(mc)||mc===null)&&Y.call($,mc,V.isString(d)?d.trim():d,j,U))===!0)v(mc,j?j.concat(d):[d],D+1)}),x.pop()}if(!V.isObject(c))throw TypeError("data must be an object");return v(c),$}var tX=100,l1,K8;var I$=g(()=>{Lc();X0();dX();l1=V.toFlatObject(V,{},null,function($){return/^is[A-Z]/.test($)});K8=h1});function _z(c){let $={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(c).replace(/[!'()~]|%20/g,function(J){return $[J]})}function Sz(c,$){this._pairs=[],c&&K8(c,this,$)}var Az,Cz;var Pz=g(()=>{I$();Az=Sz.prototype;Az.append=function($,Q){this._pairs.push([$,Q])};Az.toString=function($){let Q=$?function(J){return $.call(this,J,_z)}:_z;return this._pairs.map(function(Y){return Q(Y[0])+"="+Q(Y[1])},"").join("&")};Cz=Sz});function y1(c){return encodeURIComponent(c).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function l8(c,$,Q){if(!$)return c;let J=V.isFunction(Q)?{serialize:Q}:Q,Y=V.getSafeProp(J,"encode")||y1,X=V.getSafeProp(J,"serialize"),W;if(X)W=X($,J);else W=V.isURLSearchParams($)?$.toString():new Cz($,J).toString(Y);if(W){let m=c.indexOf("#");if(m!==-1)c=c.slice(0,m);c+=(c.indexOf("?")===-1?"?":"&")+W}return c}var kJ=g(()=>{Lc();Pz()});class Ez{constructor(){this.handlers=[]}use(c,$,Q){return this.handlers.push({fulfilled:c,rejected:$,synchronous:Q?Q.synchronous:!1,runWhen:Q?Q.runWhen:null}),this.handlers.length-1}eject(c){if(this.handlers[c])this.handlers[c]=null}clear(){if(this.handlers)this.handlers=[]}forEach(c){V.forEach(this.handlers,function(Q){if(Q!==null)c(Q)})}}var eX;var bz=g(()=>{Lc();eX=Ez});var D8;var LQ=g(()=>{D8={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0}});import o1 from"url";var Fz;var Tz=g(()=>{Fz=o1.URLSearchParams});import g1 from"crypto";var c9="abcdefghijklmnopqrstuvwxyz",fz="0123456789",nz,d1=(c=16,$=nz.ALPHA_DIGIT)=>{let Q="",{length:J}=$,Y=new Uint32Array(c);g1.randomFillSync(Y);for(let X=0;X<c;X++)Q+=$[Y[X]%J];return Q},uz;var kz=g(()=>{Tz();dX();nz={DIGIT:fz,ALPHA:c9,ALPHA_DIGIT:c9+c9.toUpperCase()+fz},uz={isNode:!0,classes:{URLSearchParams:Fz,FormData:uJ,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:nz,generateString:d1,protocols:["http","https","file","data"]}});var J9={};vQ(J9,{origin:()=>t1,navigator:()=>$9,hasStandardBrowserWebWorkerEnv:()=>r1,hasStandardBrowserEnv:()=>s1,hasBrowserEnv:()=>Q9});var Q9,$9,s1,r1,t1;var az=g(()=>{Q9=typeof window<"u"&&typeof document<"u",$9=typeof navigator==="object"&&navigator||void 0,s1=Q9&&(!$9||["ReactNative","NativeScript","NS"].indexOf($9.product)<0),r1=(()=>{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),t1=Q9&&window.location.href||"http://localhost"});var Bc;var b0=g(()=>{kz();az();Bc={...J9,...uz}});function Y9(c,$){return K8(c,new Bc.classes.URLSearchParams,{visitor:function(Q,J,Y,X){if(Bc.isNode&&V.isBuffer(Q))return this.append(J,Q.toString("base64")),!1;return X.defaultVisitor.apply(this,arguments)},...$})}var lz=g(()=>{Lc();I$();b0()});function yz(c){if(c>hz)throw new O("FormData field is too deeply nested ("+c+" levels). Max depth: "+hz,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function e1(c){let $=[],Q=/\w+|\[(\w*)]/g,J;while((J=Q.exec(c))!==null)yz($.length),$.push(J[0]==="[]"?"":J[1]||J[0]);return $}function cv(c){let $={},Q=Object.keys(c),J,Y=Q.length,X;for(J=0;J<Y;J++)X=Q[J],$[X]=c[X];return $}function $v(c){function $(Q,J,Y,X){yz(X);let W=Q[X++];if(W==="__proto__")return!0;let m=Number.isFinite(+W),G=X>=Q.length;if(W=!W&&V.isArray(Y)?Y.length:W,G){if(V.hasOwnProp(Y,W))Y[W]=V.isArray(Y[W])?Y[W].concat(J):[Y[W],J];else Y[W]=J;return!m}if(!V.hasOwnProp(Y,W)||!V.isObject(Y[W]))Y[W]=[];if($(Q,J,Y[W],X)&&V.isArray(Y[W]))Y[W]=cv(Y[W]);return!m}if(V.isFormData(c)&&V.isFunction(c.entries)){let Q={};return V.forEachEntry(c,(J,Y)=>{$(e1(J),Y,Q,0)}),Q}return null}var hz,aJ;var X9=g(()=>{Lc();X0();I$();hz=tX;aJ=$v});function Qv(c,$,Q){if(V.isString(c))try{return($||JSON.parse)(c),V.trim(c)}catch(J){if(J.name!=="SyntaxError")throw J}return(Q||JSON.stringify)(c)}var L$=(c,$)=>c!=null&&V.hasOwnProp(c,$)?c[$]:void 0,W9,_$;var lJ=g(()=>{Lc();X0();LQ();I$();lz();b0();X9();W9={transitional:D8,adapter:["xhr","http","fetch"],transformRequest:[function($,Q){let J=Q.getContentType()||"",Y=J.indexOf("application/json")>-1,X=V.isObject($);if(X&&V.isHTMLForm($))$=new FormData($);if(V.isFormData($))return Y?JSON.stringify(aJ($)):$;if(V.isArrayBuffer($)||V.isBuffer($)||V.isStream($)||V.isFile($)||V.isBlob($)||V.isReadableStream($))return $;if(V.isArrayBufferView($))return $.buffer;if(V.isURLSearchParams($))return Q.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),$.toString();let m;if(X){let G=L$(this,"formSerializer");if(J.indexOf("application/x-www-form-urlencoded")>-1)return Y9($,G).toString();if((m=V.isFileList($))||J.indexOf("multipart/form-data")>-1){let z=L$(this,"env"),x=z&&z.FormData;return K8(m?{"files[]":$}:$,x&&new x,G)}}if(X||Y)return Q.setContentType("application/json",!1),Qv($);return $}],transformResponse:[function($){let Q=L$(this,"transitional")||W9.transitional,J=Q&&Q.forcedJSONParsing,Y=L$(this,"responseType"),X=Y==="json";if(V.isResponse($)||V.isReadableStream($))return $;if($&&V.isString($)&&(J&&!Y||X)){let m=!(Q&&Q.silentJSONParsing)&&X;try{return JSON.parse($,L$(this,"parseReviver"))}catch(G){if(m){if(G.name==="SyntaxError")throw O.from(G,O.ERR_BAD_RESPONSE,this,null,L$(this,"response"));throw G}}}return $}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Bc.classes.FormData,Blob:Bc.classes.Blob},validateStatus:function($){return $>=200&&$<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch","query"],(c)=>{W9.headers[c]={}});_$=W9});function _Q(c,$){let Q=this||_$,J=$||Q,Y=_c.from(J.headers),X=J.data;return V.forEach(c,function(m){X=m.call(Q,X,Y.normalize(),$?$.status:void 0)}),Y.normalize(),X}var oz=g(()=>{Lc();lJ();P0()});function SQ(c){return!!(c&&c.__CANCEL__)}var gz,w0;var h8=g(()=>{X0();gz=class gz extends O{constructor(c,$,Q){super(c==null?"canceled":c,O.ERR_CANCELED,$,Q);this.name="CanceledError",this.__CANCEL__=!0}};w0=gz});function d0(c,$,Q){let J=Q.config.validateStatus;if(!Q.status||!J||J(Q.status))c(Q);else $(new O("Request failed with status code "+Q.status,Q.status>=400&&Q.status<500?O.ERR_BAD_REQUEST:O.ERR_BAD_RESPONSE,Q.config,Q.request,Q))}var hJ=g(()=>{X0()});function m9(c){if(typeof c!=="string")return!1;return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(c)}function G9(c,$){return $?c.replace(/\/?\/$/,"")+"/"+$.replace(/^\/+/,""):c}function Xv(c){let $=0;while($<c.length&&c.charCodeAt($)<=32)$++;return c.slice($)}function Wv(c){return Xv(c).replace(Yv,"")}function dz(c,$){if(typeof c==="string"&&Jv.test(Wv(c)))throw new O('Invalid URL: missing "//" after protocol',O.ERR_INVALID_URL,$)}function y8(c,$,Q,J){dz($,J);let Y=!m9($);if(c&&(Y||Q===!1))return dz(c,J),G9(c,$);return $}var Jv,Yv;var yJ=g(()=>{X0();Jv=/^https?:(?!\/\/)/i,Yv=/[\t\n\r]/g});function Gv(c){try{return new URL(c)}catch{return null}}function sz(c){var $=(typeof c==="string"?Gv(c):c)||{},Q=$.protocol,J=$.host,Y=$.port;if(typeof J!=="string"||!J||typeof Q!=="string")return"";if(Q=Q.split(":",1)[0],J=J.replace(/:\d*$/,""),Y=parseInt(Y)||mv[Q]||0,!zv(J,Y))return"";var X=z9(Q+"_proxy")||z9("all_proxy");if(X&&X.indexOf("://")===-1)X=Q+"://"+X;return X}function zv(c,$){var Q=z9("no_proxy").toLowerCase();if(!Q)return!0;if(Q==="*")return!1;return Q.split(/[,\s]/).every(function(J){if(!J)return!0;var Y=J.match(/^(.+):(\d+)$/),X=Y?Y[1]:J,W=Y?parseInt(Y[2]):0;if(W&&W!==$)return!0;if(!/^[.*]/.test(X))return c!==X;if(X.charAt(0)==="*")X=X.slice(1);return!c.endsWith(X)})}function z9(c){return process.env[c.toLowerCase()]||process.env[c.toUpperCase()]||""}var mv;var rz=g(()=>{mv={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443}});var ez=l((k3,tz)=>{var S$=1000,A$=S$*60,C$=A$*60,o8=C$*24,xv=o8*7,qv=o8*365.25;tz.exports=function(c,$){$=$||{};var Q=typeof c;if(Q==="string"&&c.length>0)return Mv(c);else if(Q==="number"&&isFinite(c))return $.long?Vv(c):Nv(c);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))};function Mv(c){if(c=String(c),c.length>100)return;var $=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(!$)return;var Q=parseFloat($[1]),J=($[2]||"ms").toLowerCase();switch(J){case"years":case"year":case"yrs":case"yr":case"y":return Q*qv;case"weeks":case"week":case"w":return Q*xv;case"days":case"day":case"d":return Q*o8;case"hours":case"hour":case"hrs":case"hr":case"h":return Q*C$;case"minutes":case"minute":case"mins":case"min":case"m":return Q*A$;case"seconds":case"second":case"secs":case"sec":case"s":return Q*S$;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return Q;default:return}}function Nv(c){var $=Math.abs(c);if($>=o8)return Math.round(c/o8)+"d";if($>=C$)return Math.round(c/C$)+"h";if($>=A$)return Math.round(c/A$)+"m";if($>=S$)return Math.round(c/S$)+"s";return c+"ms"}function Vv(c){var $=Math.abs(c);if($>=o8)return oJ(c,$,o8,"day");if($>=C$)return oJ(c,$,C$,"hour");if($>=A$)return oJ(c,$,A$,"minute");if($>=S$)return oJ(c,$,S$,"second");return c+" ms"}function oJ(c,$,Q,J){var Y=$>=Q*1.5;return Math.round(c/Q)+" "+J+(Y?"s":"")}});var x9=l((a3,c5)=>{function wv(c){Q.debug=Q,Q.default=Q,Q.coerce=G,Q.disable=W,Q.enable=Y,Q.enabled=m,Q.humanize=ez(),Q.destroy=z,Object.keys(c).forEach((x)=>{Q[x]=c[x]}),Q.names=[],Q.skips=[],Q.formatters={};function $(x){let q=0;for(let M=0;M<x.length;M++)q=(q<<5)-q+x.charCodeAt(M),q|=0;return Q.colors[Math.abs(q)%Q.colors.length]}Q.selectColor=$;function Q(x){let q,M=null,N,w;function U(...v){if(!U.enabled)return;let i=U,j=Number(new Date),D=j-(q||j);if(i.diff=D,i.prev=q,i.curr=j,q=j,v[0]=Q.coerce(v[0]),typeof v[0]!=="string")v.unshift("%O");let _=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(d,Jc)=>{if(d==="%%")return"%";_++;let u=Q.formatters[Jc];if(typeof u==="function"){let a=v[_];d=u.call(i,a),v.splice(_,1),_--}return d}),Q.formatArgs.call(i,v),(i.log||Q.log).apply(i,v)}if(U.namespace=x,U.useColors=Q.useColors(),U.color=Q.selectColor(x),U.extend=J,U.destroy=Q.destroy,Object.defineProperty(U,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(M!==null)return M;if(N!==Q.namespaces)N=Q.namespaces,w=Q.enabled(x);return w},set:(v)=>{M=v}}),typeof Q.init==="function")Q.init(U);return U}function J(x,q){let M=Q(this.namespace+(typeof q>"u"?":":q)+x);return M.log=this.log,M}function Y(x){Q.save(x),Q.namespaces=x,Q.names=[],Q.skips=[];let q=(typeof x==="string"?x:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let M of q)if(M[0]==="-")Q.skips.push(M.slice(1));else Q.names.push(M)}function X(x,q){let M=0,N=0,w=-1,U=0;while(M<x.length)if(N<q.length&&(q[N]===x[M]||q[N]==="*"))if(q[N]==="*")w=N,U=M,N++;else M++,N++;else if(w!==-1)N=w+1,U++,M=U;else return!1;while(N<q.length&&q[N]==="*")N++;return N===q.length}function W(){let x=[...Q.names,...Q.skips.map((q)=>"-"+q)].join(",");return Q.enable(""),x}function m(x){for(let q of Q.skips)if(X(x,q))return!1;for(let q of Q.names)if(X(x,q))return!0;return!1}function G(x){if(x instanceof Error)return x.stack||x.message;return x}function z(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return Q.enable(Q.load()),Q}c5.exports=wv});var Q5=l(($5,gJ)=>{$5.formatArgs=vv;$5.save=Uv;$5.load=jv;$5.useColors=iv;$5.storage=Kv();$5.destroy=(()=>{let c=!1;return()=>{if(!c)c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();$5.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function iv(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function vv(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+gJ.exports.humanize(this.diff),!this.useColors)return;let $="color: "+this.color;c.splice(1,0,$,"color: inherit");let Q=0,J=0;c[0].replace(/%[a-zA-Z%]/g,(Y)=>{if(Y==="%%")return;if(Q++,Y==="%c")J=Q}),c.splice(J,0,$)}$5.log=console.debug||console.log||(()=>{});function Uv(c){try{if(c)$5.storage.setItem("debug",c);else $5.storage.removeItem("debug")}catch($){}}function jv(){let c;try{c=$5.storage.getItem("debug")||$5.storage.getItem("DEBUG")}catch($){}if(!c&&typeof process<"u"&&"env"in process)c=process.env.DEBUG;return c}function Kv(){try{return localStorage}catch(c){}}gJ.exports=x9()($5);var{formatters:Dv}=gJ.exports;Dv.j=function(c){try{return JSON.stringify(c)}catch($){return"[UnexpectedJSONParseError]: "+$.message}}});var Y5=l((h3,J5)=>{J5.exports=(c,$=process.argv)=>{let Q=c.startsWith("-")?"":c.length===1?"-":"--",J=$.indexOf(Q+c),Y=$.indexOf("--");return J!==-1&&(Y===-1||J<Y)}});var m5=l((y3,W5)=>{var Lv=Ic("os"),X5=Ic("tty"),H0=Y5(),{env:ac}=process,B8;if(H0("no-color")||H0("no-colors")||H0("color=false")||H0("color=never"))B8=0;else if(H0("color")||H0("colors")||H0("color=true")||H0("color=always"))B8=1;if("FORCE_COLOR"in ac)if(ac.FORCE_COLOR==="true")B8=1;else if(ac.FORCE_COLOR==="false")B8=0;else B8=ac.FORCE_COLOR.length===0?1:Math.min(parseInt(ac.FORCE_COLOR,10),3);function q9(c){if(c===0)return!1;return{level:c,hasBasic:!0,has256:c>=2,has16m:c>=3}}function M9(c,$){if(B8===0)return 0;if(H0("color=16m")||H0("color=full")||H0("color=truecolor"))return 3;if(H0("color=256"))return 2;if(c&&!$&&B8===void 0)return 0;let Q=B8||0;if(ac.TERM==="dumb")return Q;if(process.platform==="win32"){let J=Lv.release().split(".");if(Number(J[0])>=10&&Number(J[2])>=10586)return Number(J[2])>=14931?3:2;return 1}if("CI"in ac){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((J)=>(J in ac))||ac.CI_NAME==="codeship")return 1;return Q}if("TEAMCITY_VERSION"in ac)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ac.TEAMCITY_VERSION)?1:0;if(ac.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ac){let J=parseInt((ac.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ac.TERM_PROGRAM){case"iTerm.app":return J>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(ac.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ac.TERM))return 1;if("COLORTERM"in ac)return 1;return Q}function _v(c){let $=M9(c,c&&c.isTTY);return q9($)}W5.exports={supportsColor:_v,stdout:q9(M9(!0,X5.isatty(1))),stderr:q9(M9(!0,X5.isatty(2)))}});var q5=l((z5,sJ)=>{var Sv=Ic("tty"),dJ=Ic("util");z5.init=Tv;z5.log=Ev;z5.formatArgs=Cv;z5.save=bv;z5.load=Fv;z5.useColors=Av;z5.destroy=dJ.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");z5.colors=[6,2,3,4,5,1];try{let c=m5();if(c&&(c.stderr||c).level>=2)z5.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(c){}z5.inspectOpts=Object.keys(process.env).filter((c)=>{return/^debug_/i.test(c)}).reduce((c,$)=>{let Q=$.substring(6).toLowerCase().replace(/_([a-z])/g,(Y,X)=>{return X.toUpperCase()}),J=process.env[$];if(/^(yes|on|true|enabled)$/i.test(J))J=!0;else if(/^(no|off|false|disabled)$/i.test(J))J=!1;else if(J==="null")J=null;else J=Number(J);return c[Q]=J,c},{});function Av(){return"colors"in z5.inspectOpts?Boolean(z5.inspectOpts.colors):Sv.isatty(process.stderr.fd)}function Cv(c){let{namespace:$,useColors:Q}=this;if(Q){let J=this.color,Y="\x1B[3"+(J<8?J:"8;5;"+J),X=` ${Y};1m${$} \x1B[0m`;c[0]=X+c[0].split(`
|
|
11
11
|
`).join(`
|
|
12
|
-
`+X),c.push(Y+"m+"+sJ.exports.humanize(this.diff)+"\x1B[0m")}else c[0]=
|
|
13
|
-
`)}function
|
|
14
|
-
`).map(($)=>$.trim()).join(" ")};
|
|
15
|
-
`).some(($)=>$.indexOf("(https.js:")!==-1||$.indexOf("node:https:")!==-1)}function rJ(c,$){return new rJ.Agent(c,$)}(function(c){class $ extends
|
|
12
|
+
`+X),c.push(Y+"m+"+sJ.exports.humanize(this.diff)+"\x1B[0m")}else c[0]=Pv()+$+" "+c[0]}function Pv(){if(z5.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function Ev(...c){return process.stderr.write(dJ.formatWithOptions(z5.inspectOpts,...c)+`
|
|
13
|
+
`)}function bv(c){if(c)process.env.DEBUG=c;else delete process.env.DEBUG}function Fv(){return process.env.DEBUG}function Tv(c){c.inspectOpts={};let $=Object.keys(z5.inspectOpts);for(let Q=0;Q<$.length;Q++)c.inspectOpts[$[Q]]=z5.inspectOpts[$[Q]]}sJ.exports=x9()(z5);var{formatters:G5}=sJ.exports;G5.o=function(c){return this.inspectOpts.colors=this.useColors,dJ.inspect(c,this.inspectOpts).split(`
|
|
14
|
+
`).map(($)=>$.trim()).join(" ")};G5.O=function(c){return this.inspectOpts.colors=this.useColors,dJ.inspect(c,this.inspectOpts)}});var CQ=l((g3,N9)=>{if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)N9.exports=Q5();else N9.exports=q5()});var N5=l((M5)=>{Object.defineProperty(M5,"__esModule",{value:!0});function yv(c){return function($,Q){return new Promise((J,Y)=>{c.call(this,$,Q,(X,W)=>{if(X)Y(X);else J(W)})})}}M5.default=yv});var i5=l((w9,w5)=>{var V5=w9&&w9.__importDefault||function(c){return c&&c.__esModule?c:{default:c}},gv=Ic("events"),dv=V5(CQ()),sv=V5(N5()),PQ=dv.default("agent-base");function rv(c){return Boolean(c)&&typeof c.addRequest==="function"}function V9(){let{stack:c}=Error();if(typeof c!=="string")return!1;return c.split(`
|
|
15
|
+
`).some(($)=>$.indexOf("(https.js:")!==-1||$.indexOf("node:https:")!==-1)}function rJ(c,$){return new rJ.Agent(c,$)}(function(c){class $ extends gv.EventEmitter{constructor(Q,J){super();let Y=J;if(typeof Q==="function")this.callback=Q;else if(Q)Y=Q;if(this.timeout=null,Y&&typeof Y.timeout==="number")this.timeout=Y.timeout;this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){if(typeof this.explicitDefaultPort==="number")return this.explicitDefaultPort;return V9()?443:80}set defaultPort(Q){this.explicitDefaultPort=Q}get protocol(){if(typeof this.explicitProtocol==="string")return this.explicitProtocol;return V9()?"https:":"http:"}set protocol(Q){this.explicitProtocol=Q}callback(Q,J,Y){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(Q,J){let Y=Object.assign({},J);if(typeof Y.secureEndpoint!=="boolean")Y.secureEndpoint=V9();if(Y.host==null)Y.host="localhost";if(Y.port==null)Y.port=Y.secureEndpoint?443:80;if(Y.protocol==null)Y.protocol=Y.secureEndpoint?"https:":"http:";if(Y.host&&Y.path)delete Y.path;delete Y.agent,delete Y.hostname,delete Y._defaultAgent,delete Y.defaultPort,delete Y.createConnection,Q._last=!0,Q.shouldKeepAlive=!1;let X=!1,W=null,m=Y.timeout||this.timeout,G=(M)=>{if(Q._hadError)return;Q.emit("error",M),Q._hadError=!0},z=()=>{W=null,X=!0;let M=Error(`A "socket" was not created for HTTP request before ${m}ms`);M.code="ETIMEOUT",G(M)},x=(M)=>{if(X)return;if(W!==null)clearTimeout(W),W=null;G(M)},q=(M)=>{if(X)return;if(W!=null)clearTimeout(W),W=null;if(rv(M)){PQ("Callback returned another Agent instance %o",M.constructor.name),M.addRequest(Q,Y);return}if(M){M.once("free",()=>{this.freeSocket(M,Y)}),Q.onSocket(M);return}let N=Error(`no Duplex stream was returned to agent-base for \`${Q.method} ${Q.path}\``);G(N)};if(typeof this.callback!=="function"){G(Error("`callback` is not defined"));return}if(!this.promisifiedCallback)if(this.callback.length>=3)PQ("Converting legacy callback function to promise"),this.promisifiedCallback=sv.default(this.callback);else this.promisifiedCallback=this.callback;if(typeof m==="number"&&m>0)W=setTimeout(z,m);if("port"in Y&&typeof Y.port!=="number")Y.port=Number(Y.port);try{PQ("Resolving socket for %o request: %o",Y.protocol,`${Q.method} ${Q.path}`),Promise.resolve(this.promisifiedCallback(Q,Y)).then(q,x)}catch(M){Promise.reject(M).catch(x)}}freeSocket(Q,J){PQ("Freeing socket %o %o",Q.constructor.name,J),Q.destroy()}destroy(){PQ("Destroying agent %o",this.constructor.name)}}c.Agent=$,c.prototype=c.Agent.prototype})(rJ||(rJ={}));w5.exports=rJ});var v5=l((bQ)=>{var tv=bQ&&bQ.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(bQ,"__esModule",{value:!0});var ev=tv(CQ()),EQ=ev.default("https-proxy-agent:parse-proxy-response");function cU(c){return new Promise(($,Q)=>{let J=0,Y=[];function X(){let q=c.read();if(q)x(q);else c.once("readable",X)}function W(){c.removeListener("end",G),c.removeListener("error",z),c.removeListener("close",m),c.removeListener("readable",X)}function m(q){EQ("onclose had error %o",q)}function G(){EQ("onend")}function z(q){W(),EQ("onerror %o",q),Q(q)}function x(q){Y.push(q),J+=q.length;let M=Buffer.concat(Y,J);if(M.indexOf(`\r
|
|
16
16
|
\r
|
|
17
17
|
`)===-1){EQ("have not received end of HTTP headers yet..."),X();return}let w=M.toString("ascii",0,M.indexOf(`\r
|
|
18
|
-
`)),U=+w.split(" ")[1];EQ("got proxy server response: %o",w),$({statusCode:U,buffered:M})}c.on("error",z),c.on("close",m),c.on("end",G),X()})}bQ.default=
|
|
19
|
-
`;if(Q.auth)X["Proxy-Authorization"]=`Basic ${Buffer.from(Q.auth).toString("base64")}`;let{host:G,port:z,secureEndpoint:x}=$;if(!
|
|
20
|
-
`;let q
|
|
21
|
-
`);let{statusCode:M,buffered:N}=yield q;if(M===200){if(c.once("socket",QU),$.secureEndpoint){FQ("Upgrading socket connection to TLS");let U=$.servername||$.host;return v5.default.connect(Object.assign(Object.assign({},XU($,"host","hostname","path","port")),{socket:Y,servername:U}))}return Y}Y.destroy();let w=new i5.default.Socket({writable:!1});return w.readable=!0,c.once("socket",(U)=>{FQ("replaying proxy buffer for failed request"),tv.default(U.listenerCount("data")>0),U.push(N),U.push(null)}),w})}}d8.default=U5;function QU(c){c.resume()}function JU(c,$){return Boolean(!$&&c===80||$&&c===443)}function YU(c){return typeof c==="string"?/^https:?$/i.test(c):!1}function XU(c,...$){let Q={},J;for(J in c)if(!$.includes(J))Q[J]=c[J];return Q}});var D5=l((v9,K5)=>{var WU=v9&&v9.__importDefault||function(c){return c&&c.__esModule?c:{default:c}},w9=WU(j5());function i9(c){return new w9.default(c)}(function(c){c.HttpsProxyAgent=w9.default,c.prototype=w9.default.prototype})(i9||(i9={}));K5.exports=i9});var H5=l((y3,B5)=>{var TQ;B5.exports=function(){if(!TQ){try{TQ=CQ()("follow-redirects")}catch(c){}if(typeof TQ!=="function")TQ=function(){}}TQ.apply(null,arguments)}});var Z5=l((o3,L9)=>{var nQ=Zc("url"),fQ=nQ.URL,mU=Zc("http"),GU=Zc("https"),B9=Zc("stream").Writable,H9=Zc("assert"),O5=H5();(function(){var $=typeof process<"u",Q=typeof window<"u"&&typeof document<"u",J=r8(Error.captureStackTrace);if(!$&&(Q||!J))console.warn("The follow-redirects package should be excluded from browser builds.")})();var O9=!1;try{H9(new fQ(""))}catch(c){O9=c.code==="ERR_INVALID_URL"}var zU=["Authorization","Proxy-Authorization","Cookie"],xU=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],R9=["abort","aborted","connect","error","socket","timeout"],p9=Object.create(null);R9.forEach(function(c){p9[c]=function($,Q,J){this._redirectable.emit(c,$,Q,J)}});var j9=uQ("ERR_INVALID_URL","Invalid URL",TypeError),K9=uQ("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),qU=uQ("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",K9),MU=uQ("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),NU=uQ("ERR_STREAM_WRITE_AFTER_END","write after end"),VU=B9.prototype.destroy||p5;function z0(c,$){if(B9.call(this),this._sanitizeOptions(c),this._options=c,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],$)this.on("response",$);var Q=this;this._onNativeResponse=function(J){try{Q._processResponse(J)}catch(Y){Q.emit("error",Y instanceof K9?Y:new K9({cause:Y}))}},this._headerFilter=new RegExp("^(?:"+zU.concat(c.sensitiveHeaders).map(KU).join("|")+")$","i"),this._performRequest()}z0.prototype=Object.create(B9.prototype);z0.prototype.abort=function(){Z9(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};z0.prototype.destroy=function(c){return Z9(this._currentRequest,c),VU.call(this,c),this};z0.prototype.write=function(c,$,Q){if(this._ending)throw new NU;if(!s8(c)&&!UU(c))throw TypeError("data should be a string, Buffer or Uint8Array");if(r8($))Q=$,$=null;if(c.length===0){if(Q)Q();return}if(this._requestBodyLength+c.length<=this._options.maxBodyLength)this._requestBodyLength+=c.length,this._requestBodyBuffers.push({data:c,encoding:$}),this._currentRequest.write(c,$,Q);else this.emit("error",new MU),this.abort()};z0.prototype.end=function(c,$,Q){if(r8(c))Q=c,c=$=null;else if(r8($))Q=$,$=null;if(!c)this._ended=this._ending=!0,this._currentRequest.end(null,null,Q);else{var J=this,Y=this._currentRequest;this.write(c,$,function(){J._ended=!0,Y.end(null,null,Q)}),this._ending=!0}};z0.prototype.setHeader=function(c,$){this._options.headers[c]=$,this._currentRequest.setHeader(c,$)};z0.prototype.removeHeader=function(c){delete this._options.headers[c],this._currentRequest.removeHeader(c)};z0.prototype.setTimeout=function(c,$){var Q=this;function J(W){W.setTimeout(c),W.removeListener("timeout",W.destroy),W.addListener("timeout",W.destroy)}function Y(W){if(Q._timeout)clearTimeout(Q._timeout);Q._timeout=setTimeout(function(){Q.emit("timeout"),X()},c),J(W)}function X(){if(Q._timeout)clearTimeout(Q._timeout),Q._timeout=null;if(Q.removeListener("abort",X),Q.removeListener("error",X),Q.removeListener("response",X),Q.removeListener("close",X),$)Q.removeListener("timeout",$);if(!Q.socket)Q._currentRequest.removeListener("socket",Y)}if($)this.on("timeout",$);if(this.socket)Y(this.socket);else this._currentRequest.once("socket",Y);return this.on("socket",J),this.on("abort",X),this.on("error",X),this.on("response",X),this.on("close",X),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(c){z0.prototype[c]=function($,Q){return this._currentRequest[c]($,Q)}});["aborted","connection","socket"].forEach(function(c){Object.defineProperty(z0.prototype,c,{get:function(){return this._currentRequest[c]}})});z0.prototype._sanitizeOptions=function(c){if(!c.headers)c.headers={};if(!vU(c.sensitiveHeaders))c.sensitiveHeaders=[];if(c.host){if(!c.hostname)c.hostname=c.host;delete c.host}if(!c.pathname&&c.path){var $=c.path.indexOf("?");if($<0)c.pathname=c.path;else c.pathname=c.path.substring(0,$),c.search=c.path.substring($)}};z0.prototype._performRequest=function(){var c=this._options.protocol,$=this._options.nativeProtocols[c];if(!$)throw TypeError("Unsupported protocol "+c);if(this._options.agents){var Q=c.slice(0,-1);this._options.agent=this._options.agents[Q]}var J=this._currentRequest=$.request(this._options,this._onNativeResponse);J._redirectable=this;for(var Y of R9)J.on(Y,p9[Y]);if(this._currentUrl=/^\//.test(this._options.path)?nQ.format(this._options):this._options.path,this._isRedirect){var X=0,W=this,m=this._requestBodyBuffers;(function G(z){if(J===W._currentRequest){if(z)W.emit("error",z);else if(X<m.length){var x=m[X++];if(!J.finished)J.write(x.data,x.encoding,G)}else if(W._ended)J.end()}})()}};z0.prototype._processResponse=function(c){var $=c.statusCode;if(this._options.trackRedirects)this._redirects.push({url:this._currentUrl,headers:c.headers,statusCode:$});var Q=c.headers.location;if(!Q||this._options.followRedirects===!1||$<300||$>=400){c.responseUrl=this._currentUrl,c.redirects=this._redirects,this.emit("response",c),this._requestBodyBuffers=[];return}if(Z9(this._currentRequest),c.destroy(),++this._redirectCount>this._options.maxRedirects)throw new qU;var J,Y=this._options.beforeRedirect;if(Y)J=Object.assign({Host:c.req.getHeader("host")},this._options.headers);var X=this._options.method;if(($===301||$===302)&&this._options.method==="POST"||$===303&&!/^(?:GET|HEAD)$/.test(this._options.method))this._options.method="GET",this._requestBodyBuffers=[],U9(/^content-/i,this._options.headers);var W=U9(/^host$/i,this._options.headers),m=I9(this._currentUrl),G=W||m.host,z=/^\w+:/.test(Q)?this._currentUrl:nQ.format(Object.assign(m,{host:G})),x=wU(Q,z);if(O5("redirecting to",x.href),this._isRedirect=!0,D9(x,this._options),x.protocol!==m.protocol&&x.protocol!=="https:"||x.host!==G&&!iU(x.host,G))U9(this._headerFilter,this._options.headers);if(r8(Y)){var q={headers:c.headers,statusCode:$},M={url:z,method:X,headers:J};Y(this._options,q,M),this._sanitizeOptions(this._options)}this._performRequest()};function R5(c){var $={maxRedirects:21,maxBodyLength:10485760},Q={};return Object.keys(c).forEach(function(J){var Y=J+":",X=Q[Y]=c[J],W=$[J]=Object.create(X);function m(z,x,q){if(jU(z))z=D9(z);else if(s8(z))z=D9(I9(z));else q=x,x=I5(z),z={protocol:Y};if(r8(x))q=x,x=null;if(x=Object.assign({maxRedirects:$.maxRedirects,maxBodyLength:$.maxBodyLength},z,x),x.nativeProtocols=Q,!s8(x.host)&&!s8(x.hostname))x.hostname="::1";return H9.equal(x.protocol,Y,"protocol mismatch"),O5("options",x),new z0(x,q)}function G(z,x,q){var M=W.request(z,x,q);return M.end(),M}Object.defineProperties(W,{request:{value:m,configurable:!0,enumerable:!0,writable:!0},get:{value:G,configurable:!0,enumerable:!0,writable:!0}})}),$}function p5(){}function I9(c){var $;if(O9)$=new fQ(c);else if($=I5(nQ.parse(c)),!s8($.protocol))throw new j9({input:c});return $}function wU(c,$){return O9?new fQ(c,$):I9(nQ.resolve($,c))}function I5(c){if(/^\[/.test(c.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(c.hostname))throw new j9({input:c.href||c});if(/^\[/.test(c.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(c.host))throw new j9({input:c.href||c});return c}function D9(c,$){var Q=$||{};for(var J of xU)Q[J]=c[J];if(Q.hostname.startsWith("["))Q.hostname=Q.hostname.slice(1,-1);if(Q.port!=="")Q.port=Number(Q.port);return Q.path=Q.search?Q.pathname+Q.search:Q.pathname,Q}function U9(c,$){var Q;for(var J in $)if(c.test(J))Q=$[J],delete $[J];return Q===null||typeof Q>"u"?void 0:String(Q).trim()}function uQ(c,$,Q){function J(Y){if(r8(Error.captureStackTrace))Error.captureStackTrace(this,this.constructor);Object.assign(this,Y||{}),this.code=c,this.message=this.cause?$+": "+this.cause.message:$}return J.prototype=new(Q||Error),Object.defineProperties(J.prototype,{constructor:{value:J,enumerable:!1},name:{value:"Error ["+c+"]",enumerable:!1}}),J}function Z9(c,$){for(var Q of R9)c.removeListener(Q,p9[Q]);c.on("error",p5),c.destroy($)}function iU(c,$){H9(s8(c)&&s8($));var Q=c.length-$.length-1;return Q>0&&c[Q]==="."&&c.endsWith($)}function vU(c){return c instanceof Array}function s8(c){return typeof c==="string"||c instanceof String}function r8(c){return typeof c==="function"}function UU(c){return typeof c==="object"&&"length"in c}function jU(c){return fQ&&c instanceof fQ}function KU(c){return c.replace(/[\]\\/()*+?.$]/g,"\\$&")}L9.exports=R5({http:mU,https:GU});L9.exports.wrap=R5});var $8="1.18.0";function kQ(c){let $=/^([-+\w]{1,25}):(?:\/\/)?/.exec(c);return $&&$[1]||""}function _9(c,$,Q){let J=Q&&Q.Blob||Bc.classes.Blob,Y=kQ(c);if($===void 0&&J)$=!0;if(Y==="data"){c=Y.length?c.slice(Y.length+1):c;let X=DU.exec(c);if(!X)throw new O("Invalid URL",O.ERR_INVALID_URL);let W=X[1],m=X[2],G=X[3]?"base64":"utf8",z=X[4],x;if(W)x=m?W+m:W;else if(m)x="text/plain"+m;let q=Buffer.from(decodeURIComponent(z),G);if($){if(!J)throw new O("Blob is not supported",O.ERR_NOT_SUPPORT);return new J([q],{type:x})}return q}throw new O("Unsupported protocol "+Y,O.ERR_NOT_SUPPORT)}var DU;var L5=d(()=>{X0();b0();DU=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/});import BU from"stream";var S9,_5,A9;var S5=d(()=>{Lc();S9=Symbol("internals");_5=class _5 extends BU.Transform{constructor(c){c=V.toFlatObject(c,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(Q,J)=>{return!V.isUndefined(J[Q])});super({readableHighWaterMark:c.chunkSize});let $=this[S9]={timeWindow:c.timeWindow,chunkSize:c.chunkSize,maxRate:c.maxRate,minChunkSize:c.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(Q)=>{if(Q==="progress"){if(!$.isCaptured)$.isCaptured=!0}})}_read(c){let $=this[S9];if($.onReadCallback)$.onReadCallback();return super._read(c)}_transform(c,$,Q){let J=this[S9],Y=J.maxRate,X=this.readableHighWaterMark,W=J.timeWindow,m=1000/W,G=Y/m,z=J.minChunkSize!==!1?Math.max(J.minChunkSize,G*0.01):0,x=(M,N)=>{let w=Buffer.byteLength(M);if(J.bytesSeen+=w,J.bytes+=w,J.isCaptured&&this.emit("progress",J.bytesSeen),this.push(M))process.nextTick(N);else J.onReadCallback=()=>{J.onReadCallback=null,process.nextTick(N)}},q=(M,N)=>{let w=Buffer.byteLength(M),U=null,v=X,i,j=0;if(Y){let D=Date.now();if(!J.ts||(j=D-J.ts)>=W)J.ts=D,i=G-J.bytes,J.bytes=i<0?-i:0,j=0;i=G-J.bytes}if(Y){if(i<=0)return setTimeout(()=>{N(null,M)},W-j);if(i<v)v=i}if(v&&w>v&&w-v>z)U=M.subarray(v),M=M.subarray(0,v);x(M,U?()=>{process.nextTick(N,null,U)}:N)};q(c,function M(N,w){if(N)return Q(N);if(w)q(w,M);else Q(null)})}};A9=_5});var A5,HU=async function*(c){if(c.stream)yield*c.stream();else if(c.arrayBuffer)yield await c.arrayBuffer();else if(c[A5])yield*c[A5]();else yield c},tJ;var C9=d(()=>{({asyncIterator:A5}=Symbol),tJ=HU});import OU from"util";import{Readable as RU}from"stream";class C5{constructor(c,$){let{escapeName:Q}=this.constructor,J=V.isString($),Y=`Content-Disposition: form-data; name="${Q(c)}"${!J&&$.name?`; filename="${Q($.name)}"`:""}${t8}`;if(J)$=aQ.encode(String($).replace(/\r?\n|\r\n?/g,t8));else{let X=String($.type||"application/octet-stream").replace(/[\r\n]/g,"");Y+=`Content-Type: ${X}${t8}`}this.headers=aQ.encode(Y+t8),this.contentLength=J?$.byteLength:$.size,this.size=this.headers.byteLength+this.contentLength+ZU,this.name=c,this.value=$}async*encode(){yield this.headers;let{value:c}=this;if(V.isTypedArray(c))yield c;else yield*tJ(c);yield IU}static escapeName(c){return String(c).replace(/[\r\n"]/g,($)=>({"\r":"%0D","\n":"%0A",'"':"%22"})[$])}}var pU,aQ,t8=`\r
|
|
22
|
-
`,IU,ZU=2,LU=(c,$,Q)=>{let{tag:J="form-data-boundary",size:Y=25,boundary:X=J+"-"+Bc.generateString(Y,pU)}=Q||{};if(!V.isFormData(c))throw TypeError("FormData instance required");if(X.length<1||X.length>70)throw Error("boundary must be 1-70 characters long");let W=aQ.encode("--"+X+t8),m=aQ.encode("--"+X+"--"+t8),G=m.byteLength,z=Array.from(c.entries()).map(([q,M])=>{let N=new C5(q,M);return G+=N.size,N});G+=W.byteLength*z.length,G=V.toFiniteNumber(G);let x={"Content-Type":`multipart/form-data; boundary=${X}`};if(Number.isFinite(G))x["Content-Length"]=G;return $&&$(x),RU.from(async function*(){for(let q of z)yield W,yield*q.encode();yield m}())},P5;var E5=d(()=>{Lc();C9();b0();pU=Bc.ALPHABET.ALPHA_DIGIT+"-_",aQ=typeof TextEncoder==="function"?new TextEncoder:new OU.TextEncoder,IU=aQ.encode(t8);P5=LU});import _U from"stream";var b5,F5;var T5=d(()=>{b5=class b5 extends _U.Transform{__transform(c,$,Q){this.push(c),Q()}_transform(c,$,Q){if(c.length!==0){if(this._transform=this.__transform,c[0]!==120){let J=Buffer.alloc(2);J[0]=120,J[1]=156,this.push(J,$)}}this.__transform(c,$,Q)}};F5=b5});import SU from"http2";import AU from"util";class f5{constructor(){this.sessions=Object.create(null)}getSession(c,$){$=Object.assign({sessionTimeout:1000},$);let Q=this.sessions[c];if(Q){let x=Q.length;for(let q=0;q<x;q++){let[M,N]=Q[q];if(!M.destroyed&&!M.closed&&AU.isDeepStrictEqual(N,$))return M}}let J=SU.connect(c,$),Y,X,W=()=>{if(Y)return;if(Y=!0,X)clearTimeout(X),X=null;let x=Q,q=x.length,M=q;while(M--)if(x[M][0]===J){if(q===1)delete this.sessions[c];else x.splice(M,1);if(!J.closed)J.close();return}},m=J.request,{sessionTimeout:G}=$;if(G!=null){let x=0;J.request=function(){let q=m.apply(this,arguments);if(x++,X)clearTimeout(X),X=null;return q.once("close",()=>{if(!--x)X=setTimeout(()=>{X=null,W()},G)}),q}}J.once("close",W);let z=[J,$];return Q?Q.push(z):Q=this.sessions[c]=[z],J}}var n5;var u5=d(()=>{n5=f5});var CU=(c,$)=>{return V.isAsyncFn(c)?function(...Q){let J=Q.pop();c.apply(this,Q).then((Y)=>{try{$?J(null,...$(Y)):J(null,Y)}catch(X){J(X)}},J)}:c},k5;var a5=d(()=>{Lc();k5=CU});function E9(c){let $;try{$=new URL(c)}catch(X){return!1}let Q=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!Q)return!1;if(Q==="*")return!0;let J=Number.parseInt($.port,10)||FU[$.protocol.split(":",1)[0]]||0,Y=h5($.hostname.toLowerCase());return Q.split(/[\s,]+/).some((X)=>{if(!X)return!1;let[W,m]=TU(X);if(W=h5(W),!W)return!1;if(m&&m!==J)return!1;if(W.charAt(0)==="*")W=W.slice(1);if(W.charAt(0)===".")return Y.endsWith(W);return Y===W||l5(Y)&&l5(W)})}var PU,y5=(c)=>{let $=c.split(".");if($.length!==4)return!1;if($[0]!=="127")return!1;return $.every((Q)=>/^\d+$/.test(Q)&&Number(Q)>=0&&Number(Q)<=255)},P9=(c)=>/^0{1,4}$/.test(c),EU=(c)=>{if(c==="::")return!0;let $=c.indexOf("::");if($!==-1){if($!==c.lastIndexOf("::"))return!1;let J=c.slice(0,$),Y=c.slice($+2),X=J?J.split(":"):[],W=Y?Y.split(":"):[];return X.length+W.length<8&&X.every(P9)&&W.every(P9)}let Q=c.split(":");return Q.length===8&&Q.every(P9)},bU=(c)=>{if(c==="::1")return!0;let $=c.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if($)return y5($[1]);let Q=c.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(Q){let Y=parseInt(Q[1],16);return Y>=32512&&Y<=32767}let J=c.split(":");if(J.length===8){for(let Y=0;Y<7;Y++)if(!/^0+$/.test(J[Y]))return!1;return/^0*1$/.test(J[7])}return!1},l5=(c)=>{if(!c)return!1;if(PU.has(c))return!0;if(y5(c))return!0;if(EU(c))return!0;return bU(c)},FU,TU=(c)=>{let $=c,Q=0;if($.charAt(0)==="["){let X=$.indexOf("]");if(X!==-1){let W=$.slice(1,X),m=$.slice(X+1);if(m.charAt(0)===":"&&/^\d+$/.test(m.slice(1)))Q=Number.parseInt(m.slice(1),10);return[W,Q]}}let J=$.indexOf(":"),Y=$.lastIndexOf(":");if(J!==-1&&J===Y&&/^\d+$/.test($.slice(Y+1)))Q=Number.parseInt($.slice(Y+1),10),$=$.slice(0,Y);return[$,Q]},fU,nU,uU=(c)=>{if(typeof c!=="string"||c.indexOf(":")===-1)return c;let $=c.match(fU);if($)return $[1];let Q=c.match(nU);if(Q){let J=parseInt(Q[1],16),Y=parseInt(Q[2],16);return`${J>>8}.${J&255}.${Y>>8}.${Y&255}`}return c},h5=(c)=>{if(!c)return c;if(c.charAt(0)==="["&&c.charAt(c.length-1)==="]")c=c.slice(1,-1);return uU(c.replace(/\.+$/,""))};var o5=d(()=>{PU=new Set(["localhost","0.0.0.0"]),FU={http:80,https:443,ws:80,wss:443,ftp:21},fU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,nU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i});function kU(c,$){c=c||10;let Q=Array(c),J=Array(c),Y=0,X=0,W;return $=$!==void 0?$:1000,function(G){let z=Date.now(),x=J[X];if(!W)W=z;Q[Y]=G,J[Y]=z;let q=X,M=0;while(q!==Y)M+=Q[q++],q=q%c;if(Y=(Y+1)%c,Y===X)X=(X+1)%c;if(z-W<$)return;let N=x&&z-x;return N?Math.round(M*1000/N):void 0}}var g5;var d5=d(()=>{g5=kU});function aU(c,$){let Q=0,J=1000/$,Y,X,W=(z,x=Date.now())=>{if(Q=x,Y=null,X)clearTimeout(X),X=null;c(...z)};return[(...z)=>{let x=Date.now(),q=x-Q;if(q>=J)W(z,x);else if(Y=z,!X)X=setTimeout(()=>{X=null,W(Y)},J-q)},()=>Y&&W(Y)]}var s5;var r5=d(()=>{s5=aU});var Q8=(c,$,Q=3)=>{let J=0,Y=g5(50,250);return s5((X)=>{if(!X||typeof X.loaded!=="number")return;let W=X.loaded,m=X.lengthComputable?X.total:void 0,G=m!=null?Math.min(W,m):W,z=Math.max(0,G-J),x=Y(z);J=Math.max(J,G);let q={loaded:G,total:m,progress:m?G/m:void 0,bytes:z,rate:x?x:void 0,estimated:x&&m?(m-G)/x:void 0,event:X,lengthComputable:m!=null,[$?"download":"upload"]:!0};c(q)},Q)},P$=(c,$)=>{let Q=c!=null;return[(J)=>$[0]({lengthComputable:Q,total:c,loaded:J}),$[1]]},E$=(c)=>(...$)=>V.asap(()=>c(...$));var eJ=d(()=>{d5();r5();Lc()});function lQ(c){if(!c||typeof c!=="string")return 0;if(!c.startsWith("data:"))return 0;let $=c.indexOf(",");if($<0)return 0;let Q=c.slice(5,$),J=c.slice($+1);if(/;base64/i.test(Q)){let{length:W,length:m}=J;for(let N=0;N<m;N++)if(J.charCodeAt(N)===37&&N+2<m){let w=J.charCodeAt(N+1),U=J.charCodeAt(N+2);if(cY(w)&&cY(U))W-=2,N+=2}let G=0,z=m-1,x=(N)=>N>=2&&J.charCodeAt(N-2)===37&&J.charCodeAt(N-1)===51&&(J.charCodeAt(N)===68||J.charCodeAt(N)===100);if(z>=0){if(J.charCodeAt(z)===61)G++,z--;else if(x(z))G++,z-=3}if(G===1&&z>=0){if(J.charCodeAt(z)===61)G++;else if(x(z))G++}let M=Math.floor(W/4)*3-(G||0);return M>0?M:0}let X=0;for(let W=0,m=J.length;W<m;W++){let G=J.charCodeAt(W);if(G===37&&lU(J,W,m))X+=1,W+=2;else if(G<128)X+=1;else if(G<2048)X+=2;else if(G>=55296&&G<=56319&&W+1<m){let z=J.charCodeAt(W+1);if(z>=56320&&z<=57343)X+=4,W++;else X+=3}else X+=3}return X}var cY=(c)=>c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102,lU=(c,$,Q)=>$+2<Q&&cY(c.charCodeAt($+1))&&cY(c.charCodeAt($+2));import hU from"http";import yU from"https";import oU from"http2";import gU from"util";import{resolve as t5}from"path";import H0 from"zlib";import F0 from"stream";import{EventEmitter as dU}from"events";function Q4(c,$,Q){if(Q!=="content-only"){c.set($);return}Object.entries($).forEach(([J,Y])=>{if($4.includes(J.toLowerCase()))c.set(J,Y)})}function Y4(c,$){let Q=c.protocol+"//"+c.hostname+":"+(c.port||"")+"#"+(c.auth||""),J=$?$x.get($)||$x.set($,new Map).get($):J4,Y=J.get(Q);if(Y)return Y;let X=$&&$.options?{...$.options,...c}:c;if(Y=new b9.default(X),$&&$.options){let W={...$.options},m=Y.callback;Y.callback=function(z,x){return m.call(this,z,{...W,...x})}}return Y[qx]=!0,J.set(Q,Y),Y}function W4(c,$,Q){if(c.beforeRedirects.proxy)c.beforeRedirects.proxy(c);if(c.beforeRedirects.auth)c.beforeRedirects.auth(c);if(c.beforeRedirects.sensitiveHeaders)c.beforeRedirects.sensitiveHeaders(c,Q);if(c.beforeRedirects.config)c.beforeRedirects.config(c,$,Q)}function m4(c,$){if(!c)return;Object.keys(c).forEach((Q)=>{if($.has(Q.toLowerCase()))delete c[Q]})}function G4(c,$){if(!$)return!1;try{return new URL($.url).origin===new URL(c.href).origin}catch(Q){return!1}}function Mx(c,$,Q,J,Y){let X=$;if(!X&&X!==!1){let W=gz(Q);if(W){if(!E9(Q))X=new URL(W)}}if(J&&c.headers){for(let W of Object.keys(c.headers))if(W.toLowerCase()==="proxy-authorization")delete c.headers[W]}if(J&&c.agent&&c.agent[qx])c.agent=void 0;if(X){let W=X instanceof URL,m=(M)=>W||V.hasOwnProp(X,M)?X[M]:void 0,G=m("username"),z=m("password"),x=V.hasOwnProp(X,"auth")?X.auth:void 0;if(G)x=(G||"")+":"+(z||"");if(x){let M=typeof x==="object",N=M&&V.hasOwnProp(x,"username")?x.username:void 0,w=M&&V.hasOwnProp(x,"password")?x.password:void 0;if(Boolean(N||w))x=(N||"")+":"+(w||"");else if(M)throw new O("Invalid proxy authorization",O.ERR_BAD_OPTION,{proxy:X})}if(xx.test(c.protocol)){if(!(Y instanceof b9.default)){let M=m("hostname")||m("host"),N=m("port"),w=m("protocol"),U=w?w.includes(":")?w:`${w}:`:"http:",v=M&&M.includes(":")&&!M.startsWith("[")?`[${M}]`:M,i=new URL(`${U}//${v}${N?":"+N:""}`),j={protocol:i.protocol,hostname:i.hostname.replace(/^\[|\]$/g,""),port:i.port,auth:x&&typeof x==="string"?x:void 0};if(i.protocol==="https:")j.ALPNProtocols=["http/1.1"];let D=Y4(j,Y);if(c.agent=D,c.agents)c.agents.https=D}}else{if(x){let U=Buffer.from(x,"utf8").toString("base64");c.headers["Proxy-Authorization"]="Basic "+U}let M=!1;for(let U of Object.keys(c.headers))if(U.toLowerCase()==="host"){M=!0;break}if(!M)c.headers.host=c.hostname+(c.port?":"+c.port:"");let N=m("hostname")||m("host");c.hostname=N,c.host=N,c.port=m("port"),c.path=Q;let w=m("protocol");if(w)c.protocol=w.includes(":")?w:`${w}:`}}c.beforeRedirects.proxy=function(m){Mx(m,$,m.href,!0,Y)}}var b9,Wx,e5,sU,rU,mx,Gx,zx,tU,eU,c4,xx,$4,cx,$Y,qx,J4,$x,Qx,Jx=(c)=>{if(!V.isString(c))return c;try{return decodeURIComponent(c)}catch($){return c}},Yx=(c,[$,Q])=>{return c.on("end",Q).on("error",Q),$},X4,z4,x4=(c)=>{return new Promise(($,Q)=>{let J,Y,X=(G,z)=>{if(Y)return;Y=!0,J&&J(G,z)},W=(G)=>{X(G),$(G)},m=(G)=>{X(G,!0),Q(G)};c(W,m,(G)=>J=G).catch(m)})},q4=({address:c,family:$})=>{if(!V.isString(c))throw TypeError("address must be a string");return{address:c,family:$||(c.indexOf(".")<0?6:4)}},Xx=(c,$)=>q4(V.isObject(c)?c:{address:c,family:$}),M4,Nx;var Vx=d(()=>{Lc();hJ();yJ();kJ();dz();LQ();X0();h8();b0();L5();P0();S5();E5();C9();T5();u5();a5();o5();BQ();eJ();b9=DX(D5(),1),Wx=DX(Z5(),1),e5={flush:H0.constants.Z_SYNC_FLUSH,finishFlush:H0.constants.Z_SYNC_FLUSH},sU={flush:H0.constants.BROTLI_OPERATION_FLUSH,finishFlush:H0.constants.BROTLI_OPERATION_FLUSH},rU={flush:H0.constants.ZSTD_e_flush,finishFlush:H0.constants.ZSTD_e_flush},mx=V.isFunction(H0.createBrotliDecompress),Gx=V.isFunction(H0.createZstdDecompress),zx="gzip, compress, deflate"+(mx?", br":""),tU=zx+(Gx?", zstd":""),{http:eU,https:c4}=Wx.default,xx=/https:?/,$4=["content-type","content-length"];cx=Symbol("axios.http.socketListener"),$Y=Symbol("axios.http.currentReq"),qx=Symbol("axios.http.installedTunnel"),J4=new Map,$x=new WeakMap;Qx=Bc.protocols.map((c)=>{return c+":"}),X4=new n5;z4=typeof process<"u"&&V.kindOf(process)==="process",M4={request(c,$){let Q=c.protocol+"//"+c.hostname+":"+(c.port||(c.protocol==="https:"?443:80)),{http2Options:J,headers:Y}=c,X=X4.getSession(Q,J),{HTTP2_HEADER_SCHEME:W,HTTP2_HEADER_METHOD:m,HTTP2_HEADER_PATH:G,HTTP2_HEADER_STATUS:z}=oU.constants,x={[W]:c.protocol.replace(":",""),[m]:c.method,[G]:c.path};V.forEach(Y,(M,N)=>{N.charAt(0)!==":"&&(x[N]=M)});let q=X.request(x);return q.once("response",(M)=>{let N=q;M=Object.assign({},M);let w=M[z];delete M[z],N.headers=M,N.statusCode=+w,$(N)}),q}},Nx=z4&&function($){return x4(async function(J,Y,X){let W=(p)=>V.getSafeProp($,p),m=W("transitional")||D8,G=W("data"),z=W("lookup"),x=W("family"),q=W("httpVersion");if(q===void 0)q=1;let M=W("http2Options"),N=W("responseType"),w=W("responseEncoding"),U=W("httpAgent"),v=W("httpsAgent"),i=W("method").toUpperCase(),j=W("maxRedirects"),D=W("maxBodyLength"),_=W("maxContentLength"),mc=W("decompress"),g,Jc=!1,u,a;if(q=+q,Number.isNaN(q))throw TypeError(`Invalid protocol version: '${$.httpVersion}' is not a number`);if(q!==1&&q!==2)throw TypeError(`Unsupported protocol version '${q}'`);let Xc=q===2;if(z){let p=k5(z,(T)=>V.isArray(T)?T:[T]);z=(T,xc,pc)=>{p(T,xc,(Nc,Tc,Pc)=>{if(Nc)return pc(Nc);let bc=V.isArray(Tc)?Tc.map((v$)=>Xx(v$)):[Xx(Tc,Pc)];xc.all?pc(Nc,bc):pc(Nc,bc[0].address,bc[0].family)})}}let e=new dU;function B(p){try{e.emit("abort",!p||p.type?new w0(null,$,u):p)}catch(T){}}function C(){if(a)clearTimeout(a),a=null}function K(){let p=W("timeout"),T=p?"timeout of "+p+"ms exceeded":"timeout exceeded",xc=W("timeoutErrorMessage");if(xc)T=xc;return new O(T,m.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,$,u)}e.once("abort",Y);let R=()=>{if(C(),$.cancelToken)$.cancelToken.unsubscribe(B);if($.signal)$.signal.removeEventListener("abort",B);e.removeAllListeners()};if($.cancelToken||$.signal){if($.cancelToken&&$.cancelToken.subscribe(B),$.signal)$.signal.aborted?B():$.signal.addEventListener("abort",B)}X((p,T)=>{if(g=!0,C(),T){Jc=!0,R();return}let{data:xc}=p;if(xc instanceof F0.Readable||xc instanceof F0.Duplex){let pc=F0.finished(xc,()=>{pc(),R()})}else R()});let S=y8(W("baseURL"),W("url"),W("allowAbsoluteUrls"),$),Z=new URL(S,Bc.hasBrowserEnv?Bc.origin:void 0),H=Z.protocol||Qx[0];if(H==="data:"){if(_>-1){let T=String(W("url")||S||"");if(lQ(T)>_)return Y(new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,$))}let p;if(i!=="GET")return d0(J,Y,{status:405,statusText:"method not allowed",headers:{},config:$});try{p=_9(W("url"),N==="blob",{Blob:$.env&&$.env.Blob})}catch(T){throw O.from(T,O.ERR_BAD_REQUEST,$)}if(N==="text"){if(p=p.toString(w),!w||w==="utf8")p=V.stripBOM(p)}else if(N==="stream")p=F0.Readable.from(p);return d0(J,Y,{data:p,status:200,statusText:"OK",headers:new _c,config:$})}if(Qx.indexOf(H)===-1)return Y(new O("Unsupported protocol "+H,O.ERR_BAD_REQUEST,$));let A=_c.from($.headers).normalize();A.set("User-Agent","axios/"+$8,!1);let{onUploadProgress:b,onDownloadProgress:P}=$,r=$.maxRate,Yc=void 0,cc=void 0;if(V.isSpecCompliantForm(G)){let p=A.getContentType(/boundary=([-_\w\d]{10,70})/i);G=P5(G,(T)=>{A.set(T)},{tag:`axios-${$8}-boundary`,boundary:p&&p[1]||void 0})}else if(V.isFormData(G)&&V.isFunction(G.getHeaders)&&G.getHeaders!==Object.prototype.getHeaders){if(Q4(A,G.getHeaders(),W("formDataHeaderPolicy")),!A.hasContentLength())try{let p=await gU.promisify(G.getLength).call(G);Number.isFinite(p)&&p>=0&&A.setContentLength(p)}catch(p){}}else if(V.isBlob(G)||V.isFile(G))G.size&&A.setContentType(G.type||"application/octet-stream"),A.setContentLength(G.size||0),G=F0.Readable.from(tJ(G));else if(G&&!V.isStream(G)){if(Buffer.isBuffer(G));else if(V.isArrayBuffer(G))G=Buffer.from(new Uint8Array(G));else if(V.isString(G))G=Buffer.from(G,"utf-8");else return Y(new O("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",O.ERR_BAD_REQUEST,$));if(A.setContentLength(G.length,!1),D>-1&&G.length>D)return Y(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,$))}let Oc=V.toFiniteNumber(A.getContentLength());if(V.isArray(r))Yc=r[0],cc=r[1];else Yc=cc=r;if(G&&(b||Yc)){if(!V.isStream(G))G=F0.Readable.from(G,{objectMode:!1});G=F0.pipeline([G,new A9({maxRate:V.toFiniteNumber(Yc)})],V.noop),b&&G.on("progress",Yx(G,P$(Oc,Q8(E$(b),!1,3))))}let o=void 0,Dc=W("auth");if(Dc){let p=V.getSafeProp(Dc,"username")||"",T=V.getSafeProp(Dc,"password")||"";o=p+":"+T}if(!o&&(Z.username||Z.password)){let p=Jx(Z.username),T=Jx(Z.password);o=p+":"+T}o&&A.delete("authorization");let Uc;try{Uc=l8(Z.pathname+Z.search,W("params"),W("paramsSerializer")).replace(/^\?/,"")}catch(p){let T=Error(p.message);return T.config=$,T.url=W("url"),T.exists=!0,Y(T)}A.set("Accept-Encoding",V.hasOwnProp(m,"advertiseZstdAcceptEncoding")&&m.advertiseZstdAcceptEncoding===!0?tU:zx,!1);let qc=Object.assign(Object.create(null),{path:Uc,method:i,headers:B$(A),agents:{http:U,https:v},auth:o,protocol:H,family:x,beforeRedirect:W4,beforeRedirects:Object.create(null),http2Options:M});!V.isUndefined(z)&&(qc.lookup=z);let M0=W("socketPath");if(M0){if(typeof M0!=="string")return Y(new O("socketPath must be a string",O.ERR_BAD_OPTION_VALUE,$));let p=W("allowedSocketPaths");if(p!=null){let T=Array.isArray(p)?p:[p],xc=t5(M0);if(!T.some((Nc)=>typeof Nc==="string"&&t5(Nc)===xc))return Y(new O(`socketPath "${M0}" is not permitted by allowedSocketPaths`,O.ERR_BAD_OPTION_VALUE,$))}qc.socketPath=M0}else qc.hostname=Z.hostname.startsWith("[")?Z.hostname.slice(1,-1):Z.hostname,qc.port=Z.port,Mx(qc,W("proxy"),H+"//"+Z.hostname+(Z.port?":"+Z.port:"")+qc.path,!1,v);let N0,Y0=!1,U8=!1,n8=xx.test(qc.protocol);if(qc.agent==null)qc.agent=n8?v:U;if(Xc)N0=M4;else{let p=W("transport");if(p)N0=p;else if(j===0)N0=n8?yU:hU,Y0=!0;else{if(U8=!0,qc.sensitiveHeaders=[],j)qc.maxRedirects=j;let T=W("beforeRedirect");if(T)qc.beforeRedirects.config=T;if(o){let pc=Z.origin,Nc=o;qc.beforeRedirects.auth=function(Pc){try{if(new URL(Pc.href).origin===pc)Pc.auth=Nc}catch(bc){}}}let xc=W("sensitiveHeaders");if(xc!=null){if(!V.isArray(xc))return Y(new O("sensitiveHeaders must be an array of strings",O.ERR_BAD_OPTION_VALUE,$));let pc=new Set;for(let Nc of xc){if(!V.isString(Nc))return Y(new O("sensitiveHeaders must be an array of strings",O.ERR_BAD_OPTION_VALUE,$));pc.add(Nc.toLowerCase())}if(pc.size)qc.sensitiveHeaders=Array.from(pc),qc.beforeRedirects.sensitiveHeaders=function(Tc,Pc){if(!G4(Tc,Pc))m4(Tc.headers,pc)}}N0=n8?c4:eU}}if(D>-1)qc.maxBodyLength=D;else qc.maxBodyLength=1/0;qc.insecureHTTPParser=Boolean(W("insecureHTTPParser")),u=N0.request(qc,function(T){if(C(),u.destroyed)return;let xc=[T],pc=V.toFiniteNumber(T.headers["content-length"]);if(P||cc){let bc=new A9({maxRate:V.toFiniteNumber(cc)});P&&bc.on("progress",Yx(bc,P$(pc,Q8(E$(P),!0,3)))),xc.push(bc)}let Nc=T,Tc=T.req||u;if(mc!==!1&&T.headers["content-encoding"]){if(i==="HEAD"||T.statusCode===204)delete T.headers["content-encoding"];switch((T.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":xc.push(H0.createUnzip(e5)),delete T.headers["content-encoding"];break;case"deflate":xc.push(new F5),xc.push(H0.createUnzip(e5)),delete T.headers["content-encoding"];break;case"br":if(mx)xc.push(H0.createBrotliDecompress(sU)),delete T.headers["content-encoding"];break;case"zstd":if(Gx)xc.push(H0.createZstdDecompress(rU)),delete T.headers["content-encoding"];break}}Nc=xc.length>1?F0.pipeline(xc,V.noop):xc[0];let Pc={status:T.statusCode,statusText:T.statusMessage,headers:new _c(T.headers),config:$,request:Tc};if(N==="stream"){if(_>-1){let bc=_,v$=Nc;async function*iQ(){let uc=0;for await(let GG of v$){if(uc+=GG.length,uc>bc)throw new O("maxContentLength size of "+bc+" exceeded",O.ERR_BAD_RESPONSE,$,Tc);yield GG}}Nc=F0.Readable.from(iQ(),{objectMode:!1})}Pc.data=Nc,d0(J,Y,Pc)}else{let bc=[],v$=0;Nc.on("data",function(uc){if(bc.push(uc),v$+=uc.length,_>-1&&v$>_)Jc=!0,Nc.destroy(),B(new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,$,Tc))}),Nc.on("aborted",function(){if(Jc)return;let uc=new O("stream has been aborted",O.ERR_BAD_RESPONSE,$,Tc,Pc);Nc.destroy(uc),Y(uc)}),Nc.on("error",function(uc){if(Jc)return;Y(O.from(uc,null,$,Tc,Pc))}),Nc.on("end",function(){try{let uc=bc.length===1?bc[0]:Buffer.concat(bc);if(N!=="arraybuffer"){if(uc=uc.toString(w),!w||w==="utf8")uc=V.stripBOM(uc)}Pc.data=uc}catch(uc){return Y(O.from(uc,null,$,Pc.request,Pc))}d0(J,Y,Pc)})}e.once("abort",(bc)=>{if(!Nc.destroyed)Nc.emit("error",bc),Nc.destroy()})}),e.once("abort",(p)=>{if(u.close)u.close();else u.destroy(p)}),u.on("error",function(T){Y(O.from(T,null,$,u))});let V0=new Set;if(u.on("socket",function(T){if(T.setKeepAlive(!0,60000),!T[cx])T.on("error",function(pc){let Nc=T[$Y];if(Nc&&!Nc.destroyed)Nc.destroy(pc)}),T[cx]=!0;T[$Y]=u,V0.add(T)}),u.once("close",function(){C();for(let T of V0)if(T[$Y]===u)T[$Y]=null;V0.clear()}),W("timeout")){let p=parseInt(W("timeout"),10);if(Number.isNaN(p)){B(new O("error trying to parse `config.timeout` to int",O.ERR_BAD_OPTION_VALUE,$,u));return}let T=function(){if(g)return;B(K())};if(Y0&&p>0)a=setTimeout(T,p);u.setTimeout(p,T)}else u.setTimeout(0);if(V.isStream(G)){let p=!1,T=!1;G.on("end",()=>{p=!0}),G.once("error",(pc)=>{T=!0,u.destroy(pc)}),G.on("close",()=>{if(!p&&!T)B(new w0("Request stream has been aborted",$,u))});let xc=G;if(D>-1&&!U8){let pc=D,Nc=0;xc=F0.pipeline([G,new F0.Transform({transform(Tc,Pc,bc){if(Nc+=Tc.length,Nc>pc)return bc(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,$,u));bc(null,Tc)}})],V.noop),xc.on("error",(Tc)=>{if(!u.destroyed)u.destroy(Tc)})}xc.pipe(u)}else G&&u.write(G),u.end()})}});var wx;var ix=d(()=>{b0();wx=Bc.hasStandardBrowserEnv?((c,$)=>(Q)=>{return Q=new URL(Q,Bc.origin),c.protocol===Q.protocol&&c.host===Q.host&&($||c.port===Q.port)})(new URL(Bc.origin),Bc.navigator&&/(msie|trident)/i.test(Bc.navigator.userAgent)):()=>!0});var vx;var Ux=d(()=>{Lc();b0();vx=Bc.hasStandardBrowserEnv?{write(c,$,Q,J,Y,X,W){if(typeof document>"u")return;let m=[`${c}=${encodeURIComponent($)}`];if(V.isNumber(Q))m.push(`expires=${new Date(Q).toUTCString()}`);if(V.isString(J))m.push(`path=${J}`);if(V.isString(Y))m.push(`domain=${Y}`);if(X===!0)m.push("secure");if(V.isString(W))m.push(`SameSite=${W}`);document.cookie=m.join("; ")},read(c){if(typeof document>"u")return null;let $=document.cookie.split(";");for(let Q=0;Q<$.length;Q++){let J=$[Q].replace(/^\s+/,""),Y=J.indexOf("=");if(Y!==-1&&J.slice(0,Y)===c)return decodeURIComponent(J.slice(Y+1))}return null},remove(c){this.write(c,"",Date.now()-86400000,"/")}}:{write(){},read(){return null},remove(){}}});function T0(c,$){$=$||{};let Q=Object.create(null);Object.defineProperty(Q,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function J(x,q,M,N){if(V.isPlainObject(x)&&V.isPlainObject(q))return V.merge.call({caseless:N},x,q);else if(V.isPlainObject(q))return V.merge({},q);else if(V.isArray(q))return q.slice();return q}function Y(x,q,M,N){if(!V.isUndefined(q))return J(x,q,M,N);else if(!V.isUndefined(x))return J(void 0,x,M,N)}function X(x,q){if(!V.isUndefined(q))return J(void 0,q)}function W(x,q){if(!V.isUndefined(q))return J(void 0,q);else if(!V.isUndefined(x))return J(void 0,x)}function m(x){let q=V.hasOwnProp($,"transitional")?$.transitional:void 0;if(!V.isUndefined(q))if(V.isPlainObject(q)){if(V.hasOwnProp(q,x))return q[x]}else return;let M=V.hasOwnProp(c,"transitional")?c.transitional:void 0;if(V.isPlainObject(M)&&V.hasOwnProp(M,x))return M[x];return}function G(x,q,M){if(V.hasOwnProp($,M))return J(x,q);else if(V.hasOwnProp(c,M))return J(void 0,x)}let z={url:X,method:X,data:X,baseURL:W,transformRequest:W,transformResponse:W,paramsSerializer:W,timeout:W,timeoutMessage:W,withCredentials:W,withXSRFToken:W,adapter:W,responseType:W,xsrfCookieName:W,xsrfHeaderName:W,onUploadProgress:W,onDownloadProgress:W,decompress:W,maxContentLength:W,maxBodyLength:W,beforeRedirect:W,transport:W,httpAgent:W,httpsAgent:W,cancelToken:W,socketPath:W,allowedSocketPaths:W,responseEncoding:W,validateStatus:G,headers:(x,q,M)=>Y(jx(x),jx(q),M,!0)};if(V.forEach(Object.keys({...c,...$}),function(q){if(q==="__proto__"||q==="constructor"||q==="prototype")return;let M=V.hasOwnProp(z,q)?z[q]:Y,N=V.hasOwnProp(c,q)?c[q]:void 0,w=V.hasOwnProp($,q)?$[q]:void 0,U=M(N,w,q);V.isUndefined(U)&&M!==G||(Q[q]=U)}),V.hasOwnProp($,"validateStatus")&&V.isUndefined($.validateStatus)&&m("validateStatusUndefinedResolves")===!1)if(V.hasOwnProp(c,"validateStatus"))Q.validateStatus=J(void 0,c.validateStatus);else delete Q.validateStatus;return Q}var jx=(c)=>c instanceof _c?{...c}:c;var QY=d(()=>{Lc();P0()});function V4(c,$,Q){if(Q!=="content-only"){c.set($);return}Object.entries($).forEach(([J,Y])=>{if(N4.includes(J.toLowerCase()))c.set(J,Y)})}function i4(c){let $=T0({},c),Q=(M)=>V.hasOwnProp($,M)?$[M]:void 0,J=Q("data"),Y=Q("withXSRFToken"),X=Q("xsrfHeaderName"),W=Q("xsrfCookieName"),m=Q("headers"),G=Q("auth"),z=Q("baseURL"),x=Q("allowAbsoluteUrls"),q=Q("url");if($.headers=m=_c.from(m),$.url=l8(y8(z,q,x,$),Q("params"),Q("paramsSerializer")),G){let M=V.getSafeProp(G,"username")||"",N=V.getSafeProp(G,"password")||"";m.set("Authorization","Basic "+btoa(M+":"+(N?w4(N):"")))}if(V.isFormData(J)){if(Bc.hasStandardBrowserEnv||Bc.hasStandardBrowserWebWorkerEnv||V.isReactNative(J))m.setContentType(void 0);else if(V.isFunction(J.getHeaders))V4(m,J.getHeaders(),Q("formDataHeaderPolicy"))}if(Bc.hasStandardBrowserEnv){if(V.isFunction(Y))Y=Y($);if(Y===!0||Y==null&&wx($.url)){let N=X&&W&&vx.read(W);if(N)m.set(X,N)}}return $}var N4,w4=(c)=>encodeURIComponent(c).replace(/%([0-9A-F]{2})/gi,($,Q)=>String.fromCharCode(parseInt(Q,16))),JY;var F9=d(()=>{b0();Lc();ix();Ux();yJ();QY();P0();kJ();N4=["content-type","content-length"];JY=i4});var v4,Kx;var Dx=d(()=>{Lc();hJ();LQ();X0();h8();b0();P0();eJ();F9();BQ();v4=typeof XMLHttpRequest<"u",Kx=v4&&function(c){return new Promise(function(Q,J){let Y=JY(c),X=Y.data,W=_c.from(Y.headers).normalize(),{responseType:m,onUploadProgress:G,onDownloadProgress:z}=Y,x,q,M,N,w;function U(){N&&N(),w&&w(),Y.cancelToken&&Y.cancelToken.unsubscribe(x),Y.signal&&Y.signal.removeEventListener("abort",x)}let v=new XMLHttpRequest;v.open(Y.method.toUpperCase(),Y.url,!0),v.timeout=Y.timeout;function i(){if(!v)return;let D=_c.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),mc={data:!m||m==="text"||m==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:D,config:c,request:v};d0(function(Jc){Q(Jc),U()},function(Jc){J(Jc),U()},mc),v=null}if("onloadend"in v)v.onloadend=i;else v.onreadystatechange=function(){if(!v||v.readyState!==4)return;if(v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:")))return;setTimeout(i)};if(v.onabort=function(){if(!v)return;J(new O("Request aborted",O.ECONNABORTED,c,v)),U(),v=null},v.onerror=function(_){let mc=_&&_.message?_.message:"Network Error",g=new O(mc,O.ERR_NETWORK,c,v);g.event=_||null,J(g),U(),v=null},v.ontimeout=function(){let _=Y.timeout?"timeout of "+Y.timeout+"ms exceeded":"timeout exceeded",mc=Y.transitional||D8;if(Y.timeoutErrorMessage)_=Y.timeoutErrorMessage;J(new O(_,mc.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,c,v)),U(),v=null},X===void 0&&W.setContentType(null),"setRequestHeader"in v)V.forEach(B$(W),function(_,mc){v.setRequestHeader(mc,_)});if(!V.isUndefined(Y.withCredentials))v.withCredentials=!!Y.withCredentials;if(m&&m!=="json")v.responseType=Y.responseType;if(z)[M,w]=Q8(z,!0),v.addEventListener("progress",M);if(G&&v.upload)[q,N]=Q8(G),v.upload.addEventListener("progress",q),v.upload.addEventListener("loadend",N);if(Y.cancelToken||Y.signal){if(x=(D)=>{if(!v)return;J(!D||D.type?new w0(null,c,v):D),v.abort(),U(),v=null},Y.cancelToken&&Y.cancelToken.subscribe(x),Y.signal)Y.signal.aborted?x():Y.signal.addEventListener("abort",x)}let j=kQ(Y.url);if(j&&!Bc.protocols.includes(j)){J(new O("Unsupported protocol "+j+":",O.ERR_BAD_REQUEST,c));return}v.send(X||null)})}});var U4=(c,$)=>{if(c=c?c.filter(Boolean):[],!$&&!c.length)return;let Q=new AbortController,J=!1,Y=function(G){if(!J){J=!0,W();let z=G instanceof Error?G:this.reason;Q.abort(z instanceof O?z:new w0(z instanceof Error?z.message:z))}},X=$&&setTimeout(()=>{X=null,Y(new O(`timeout of ${$}ms exceeded`,O.ETIMEDOUT))},$),W=()=>{if(!c)return;X&&clearTimeout(X),X=null,c.forEach((G)=>{G.unsubscribe?G.unsubscribe(Y):G.removeEventListener("abort",Y)}),c=null};c.forEach((G)=>G.addEventListener("abort",Y));let{signal:m}=Q;return m.unsubscribe=()=>V.asap(W),m},Bx;var Hx=d(()=>{h8();X0();Lc();Bx=U4});var j4=function*(c,$){let Q=c.byteLength;if(!$||Q<$){yield c;return}let J=0,Y;while(J<Q)Y=J+$,yield c.slice(J,Y),J=Y},K4=async function*(c,$){for await(let Q of D4(c))yield*j4(Q,$)},D4=async function*(c){if(c[Symbol.asyncIterator]){yield*c;return}let $=c.getReader();try{for(;;){let{done:Q,value:J}=await $.read();if(Q)break;yield J}}finally{await $.cancel()}},T9=(c,$,Q,J)=>{let Y=K4(c,$),X=0,W,m=(G)=>{if(!W)W=!0,J&&J(G)};return new ReadableStream({async pull(G){try{let{done:z,value:x}=await Y.next();if(z){m(),G.close();return}let q=x.byteLength;if(Q){let M=X+=q;Q(M)}G.enqueue(new Uint8Array(x))}catch(z){throw m(z),z}},cancel(G){return m(G),Y.return()}},{highWaterMark:2})};var Ox=65536,YY,B4=(c)=>encodeURIComponent(c).replace(/%([0-9A-F]{2})/gi,($,Q)=>String.fromCharCode(parseInt(Q,16))),Rx=(c)=>{if(!V.isString(c))return c;try{return decodeURIComponent(c)}catch($){return c}},px=(c,...$)=>{try{return!!c(...$)}catch(Q){return!1}},H4=(c)=>{let $=c.indexOf("://"),Q=c;if($!==-1)Q=Q.slice($+3);return Q.includes("@")||Q.includes(":")},O4=(c)=>{let $=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:Q,TextEncoder:J}=$;c=V.merge.call({skipUndefined:!0},{Request:$.Request,Response:$.Response},c);let{fetch:Y,Request:X,Response:W}=c,m=Y?YY(Y):typeof fetch==="function",G=YY(X),z=YY(W);if(!m)return!1;let x=m&&YY(Q),q=m&&(typeof J==="function"?((i)=>(j)=>i.encode(j))(new J):async(i)=>new Uint8Array(await new X(i).arrayBuffer())),M=G&&x&&px(()=>{let i=!1,j=new X(Bc.origin,{body:new Q,method:"POST",get duplex(){return i=!0,"half"}}),D=j.headers.has("Content-Type");if(j.body!=null)j.body.cancel();return i&&!D}),N=z&&x&&px(()=>V.isReadableStream(new W("").body)),w={stream:N&&((i)=>i.body)};m&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((i)=>{!w[i]&&(w[i]=(j,D)=>{let _=j&&j[i];if(_)return _.call(j);throw new O(`Response type '${i}' is not supported`,O.ERR_NOT_SUPPORT,D)})})})();let U=async(i)=>{if(i==null)return 0;if(V.isBlob(i))return i.size;if(V.isSpecCompliantForm(i))return(await new X(Bc.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(V.isArrayBufferView(i)||V.isArrayBuffer(i))return i.byteLength;if(V.isURLSearchParams(i))i=i+"";if(V.isString(i))return(await q(i)).byteLength},v=async(i,j)=>{let D=V.toFiniteNumber(i.getContentLength());return D==null?U(j):D};return async(i)=>{let{url:j,method:D,data:_,signal:mc,cancelToken:g,timeout:Jc,onDownloadProgress:u,onUploadProgress:a,responseType:Xc,headers:e,withCredentials:B="same-origin",fetchOptions:C,maxContentLength:K,maxBodyLength:R}=JY(i),S=V.isNumber(K)&&K>-1,Z=V.isNumber(R)&&R>-1,H=(o)=>V.hasOwnProp(i,o)?i[o]:void 0,A=Y||fetch;Xc=Xc?(Xc+"").toLowerCase():"text";let b=Bx([mc,g&&g.toAbortSignal()],Jc),P=null,r=b&&b.unsubscribe&&(()=>{b.unsubscribe()}),Yc,cc=null,Oc=()=>new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,i,P);try{let o=void 0,Dc=H("auth");if(Dc){let p=V.getSafeProp(Dc,"username")||"",T=V.getSafeProp(Dc,"password")||"";o={username:p,password:T}}if(H4(j)){let p=new URL(j,Bc.origin);if(!o&&(p.username||p.password)){let T=Rx(p.username),xc=Rx(p.password);o={username:T,password:xc}}if(p.username||p.password)p.username="",p.password="",j=p.href}if(o)e.delete("authorization"),e.set("Authorization","Basic "+btoa(B4((o.username||"")+":"+(o.password||""))));if(S&&typeof j==="string"&&j.startsWith("data:")){if(lQ(j)>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}if(Z&&D!=="get"&&D!=="head"){let p=await U(_);if(typeof p==="number"&&isFinite(p)){if(Yc=p,p>R)throw Oc()}}let Uc=Z&&(V.isReadableStream(_)||V.isStream(_)),qc=(p,T,xc)=>T9(p,Ox,(pc)=>{if(Z&&pc>R)throw cc=Oc();T&&T(pc)},xc);if(M&&D!=="get"&&D!=="head"&&(a||Uc)){if(Yc=Yc==null?await v(e,_):Yc,Yc!==0||Uc){let p=new X(j,{method:"POST",body:_,duplex:"half"}),T;if(V.isFormData(_)&&(T=p.headers.get("content-type")))e.setContentType(T);if(p.body){let[xc,pc]=a&&P$(Yc,Q8(E$(a)))||[];_=qc(p.body,xc,pc)}}}else if(Uc&&!G&&x&&D!=="get"&&D!=="head")_=qc(_);else if(Uc&&G&&!M&&D!=="get"&&D!=="head")throw new O("Stream request bodies are not supported by the current fetch implementation",O.ERR_NOT_SUPPORT,i,P);if(!V.isString(B))B=B?"include":"omit";let M0=G&&"credentials"in X.prototype;if(V.isFormData(_)){let p=e.getContentType();if(p&&/^multipart\/form-data/i.test(p)&&!/boundary=/i.test(p))e.delete("content-type")}e.set("User-Agent","axios/"+$8,!1);let N0={...C,signal:b,method:D.toUpperCase(),headers:B$(e.normalize()),body:_,duplex:"half",credentials:M0?B:void 0};P=G&&new X(j,N0);let Y0=await(G?A(P,C):A(j,N0)),U8=_c.from(Y0.headers);if(S){let p=V.toFiniteNumber(U8.getContentLength());if(p!=null&&p>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}let n8=N&&(Xc==="stream"||Xc==="response");if(N&&Y0.body&&(u||S||n8&&r)){let p={};["status","statusText","headers"].forEach((Pc)=>{p[Pc]=Y0[Pc]});let T=V.toFiniteNumber(U8.getContentLength()),[xc,pc]=u&&P$(T,Q8(E$(u),!0))||[],Nc=0,Tc=(Pc)=>{if(S){if(Nc=Pc,Nc>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}xc&&xc(Pc)};Y0=new W(T9(Y0.body,Ox,Tc,()=>{pc&&pc(),r&&r()}),p)}Xc=Xc||"text";let V0=await w[V.findKey(w,Xc)||"text"](Y0,i);if(S&&!N&&!n8){let p;if(V0!=null){if(typeof V0.byteLength==="number")p=V0.byteLength;else if(typeof V0.size==="number")p=V0.size;else if(typeof V0==="string")p=typeof J==="function"?new J().encode(V0).byteLength:V0.length}if(typeof p==="number"&&p>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}return!n8&&r&&r(),await new Promise((p,T)=>{d0(p,T,{data:V0,headers:_c.from(Y0.headers),status:Y0.status,statusText:Y0.statusText,config:i,request:P})})}catch(o){if(r&&r(),b&&b.aborted&&b.reason instanceof O){let Dc=b.reason;throw Dc.config=i,P&&(Dc.request=P),o!==Dc&&(Dc.cause=o),Dc}if(cc)throw P&&!cc.request&&(cc.request=P),cc;if(o instanceof O)throw P&&!o.request&&(o.request=P),o;if(o&&o.name==="TypeError"&&/Load failed|fetch/i.test(o.message))throw Object.assign(new O("Network Error",O.ERR_NETWORK,i,P,o&&o.response),{cause:o.cause||o});throw O.from(o,o&&o.code,i,P,o&&o.response)}}},R4,f9=(c)=>{let $=c&&c.env||{},{fetch:Q,Request:J,Response:Y}=$,X=[J,Y,Q],W=X.length,m=W,G,z,x=R4;while(m--)G=X[m],z=x.get(G),z===void 0&&x.set(G,z=m?new Map:O4($)),x=z;return z},gS;var Ix=d(()=>{b0();Lc();X0();Hx();P0();eJ();F9();hJ();BQ();({isFunction:YY}=V),R4=new Map,gS=f9()});function Z4(c,$){c=V.isArray(c)?c:[c];let{length:Q}=c,J,Y,X={};for(let W=0;W<Q;W++){J=c[W];let m;if(Y=J,!I4(J)){if(Y=n9[(m=String(J)).toLowerCase()],Y===void 0)throw new O(`Unknown adapter '${m}'`)}if(Y&&(V.isFunction(Y)||(Y=Y.get($))))break;X[m||"#"+W]=Y}if(!Y){let W=Object.entries(X).map(([G,z])=>`adapter ${G} `+(z===!1?"is not supported by the environment":"is not available in the build")),m=Q?W.length>1?`since :
|
|
23
|
-
`+W.map(
|
|
24
|
-
`):" "+
|
|
18
|
+
`)),U=+w.split(" ")[1];EQ("got proxy server response: %o",w),$({statusCode:U,buffered:M})}c.on("error",z),c.on("close",m),c.on("end",G),X()})}bQ.default=cU});var D5=l((d8)=>{var $U=d8&&d8.__awaiter||function(c,$,Q,J){function Y(X){return X instanceof Q?X:new Q(function(W){W(X)})}return new(Q||(Q=Promise))(function(X,W){function m(x){try{z(J.next(x))}catch(q){W(q)}}function G(x){try{z(J.throw(x))}catch(q){W(q)}}function z(x){x.done?X(x.value):Y(x.value).then(m,G)}z((J=J.apply(c,$||[])).next())})},P$=d8&&d8.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(d8,"__esModule",{value:!0});var U5=P$(Ic("net")),j5=P$(Ic("tls")),QU=P$(Ic("url")),JU=P$(Ic("assert")),YU=P$(CQ()),XU=i5(),WU=P$(v5()),FQ=YU.default("https-proxy-agent:agent");class K5 extends XU.Agent{constructor(c){let $;if(typeof c==="string")$=QU.default.parse(c);else $=c;if(!$)throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");FQ("creating new HttpsProxyAgent instance: %o",$);super($);let Q=Object.assign({},$);if(this.secureProxy=$.secureProxy||zU(Q.protocol),Q.host=Q.hostname||Q.host,typeof Q.port==="string")Q.port=parseInt(Q.port,10);if(!Q.port&&Q.host)Q.port=this.secureProxy?443:80;if(this.secureProxy&&!("ALPNProtocols"in Q))Q.ALPNProtocols=["http 1.1"];if(Q.host&&Q.path)delete Q.path,delete Q.pathname;this.proxy=Q}callback(c,$){return $U(this,void 0,void 0,function*(){let{proxy:Q,secureProxy:J}=this,Y;if(J)FQ("Creating `tls.Socket`: %o",Q),Y=j5.default.connect(Q);else FQ("Creating `net.Socket`: %o",Q),Y=U5.default.connect(Q);let X=Object.assign({},Q.headers),m=`CONNECT ${`${$.host}:${$.port}`} HTTP/1.1\r
|
|
19
|
+
`;if(Q.auth)X["Proxy-Authorization"]=`Basic ${Buffer.from(Q.auth).toString("base64")}`;let{host:G,port:z,secureEndpoint:x}=$;if(!GU(z,x))G+=`:${z}`;X.Host=G,X.Connection="close";for(let U of Object.keys(X))m+=`${U}: ${X[U]}\r
|
|
20
|
+
`;let q=WU.default(Y);Y.write(`${m}\r
|
|
21
|
+
`);let{statusCode:M,buffered:N}=yield q;if(M===200){if(c.once("socket",mU),$.secureEndpoint){FQ("Upgrading socket connection to TLS");let U=$.servername||$.host;return j5.default.connect(Object.assign(Object.assign({},xU($,"host","hostname","path","port")),{socket:Y,servername:U}))}return Y}Y.destroy();let w=new U5.default.Socket({writable:!1});return w.readable=!0,c.once("socket",(U)=>{FQ("replaying proxy buffer for failed request"),JU.default(U.listenerCount("data")>0),U.push(N),U.push(null)}),w})}}d8.default=K5;function mU(c){c.resume()}function GU(c,$){return Boolean(!$&&c===80||$&&c===443)}function zU(c){return typeof c==="string"?/^https:?$/i.test(c):!1}function xU(c,...$){let Q={},J;for(J in c)if(!$.includes(J))Q[J]=c[J];return Q}});var H5=l((U9,B5)=>{var qU=U9&&U9.__importDefault||function(c){return c&&c.__esModule?c:{default:c}},i9=qU(D5());function v9(c){return new i9.default(c)}(function(c){c.HttpsProxyAgent=i9.default,c.prototype=i9.default.prototype})(v9||(v9={}));B5.exports=v9});var R5=l((t3,O5)=>{var TQ;O5.exports=function(){if(!TQ){try{TQ=CQ()("follow-redirects")}catch(c){}if(typeof TQ!=="function")TQ=function(){}}TQ.apply(null,arguments)}});var _5=l((e3,_9)=>{var nQ=Ic("url"),fQ=nQ.URL,MU=Ic("http"),NU=Ic("https"),H9=Ic("stream").Writable,O9=Ic("assert"),p5=R5();(function(){var $=typeof process<"u",Q=typeof window<"u"&&typeof document<"u",J=r8(Error.captureStackTrace);if(!$&&(Q||!J))console.warn("The follow-redirects package should be excluded from browser builds.")})();var R9=!1;try{O9(new fQ(""))}catch(c){R9=c.code==="ERR_INVALID_URL"}var VU=["Authorization","Proxy-Authorization","Cookie"],wU=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],p9=["abort","aborted","connect","error","socket","timeout"],Z9=Object.create(null);p9.forEach(function(c){Z9[c]=function($,Q,J){this._redirectable.emit(c,$,Q,J)}});var K9=uQ("ERR_INVALID_URL","Invalid URL",TypeError),D9=uQ("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),iU=uQ("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",D9),vU=uQ("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),UU=uQ("ERR_STREAM_WRITE_AFTER_END","write after end"),jU=H9.prototype.destroy||I5;function z0(c,$){if(H9.call(this),this._sanitizeOptions(c),this._options=c,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],$)this.on("response",$);var Q=this;this._onNativeResponse=function(J){try{Q._processResponse(J)}catch(Y){Q.emit("error",Y instanceof D9?Y:new D9({cause:Y}))}},this._headerFilter=new RegExp("^(?:"+VU.concat(c.sensitiveHeaders).map(RU).join("|")+")$","i"),this._performRequest()}z0.prototype=Object.create(H9.prototype);z0.prototype.abort=function(){L9(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};z0.prototype.destroy=function(c){return L9(this._currentRequest,c),jU.call(this,c),this};z0.prototype.write=function(c,$,Q){if(this._ending)throw new UU;if(!s8(c)&&!HU(c))throw TypeError("data should be a string, Buffer or Uint8Array");if(r8($))Q=$,$=null;if(c.length===0){if(Q)Q();return}if(this._requestBodyLength+c.length<=this._options.maxBodyLength)this._requestBodyLength+=c.length,this._requestBodyBuffers.push({data:c,encoding:$}),this._currentRequest.write(c,$,Q);else this.emit("error",new vU),this.abort()};z0.prototype.end=function(c,$,Q){if(r8(c))Q=c,c=$=null;else if(r8($))Q=$,$=null;if(!c)this._ended=this._ending=!0,this._currentRequest.end(null,null,Q);else{var J=this,Y=this._currentRequest;this.write(c,$,function(){J._ended=!0,Y.end(null,null,Q)}),this._ending=!0}};z0.prototype.setHeader=function(c,$){this._options.headers[c]=$,this._currentRequest.setHeader(c,$)};z0.prototype.removeHeader=function(c){delete this._options.headers[c],this._currentRequest.removeHeader(c)};z0.prototype.setTimeout=function(c,$){var Q=this;function J(W){W.setTimeout(c),W.removeListener("timeout",W.destroy),W.addListener("timeout",W.destroy)}function Y(W){if(Q._timeout)clearTimeout(Q._timeout);Q._timeout=setTimeout(function(){Q.emit("timeout"),X()},c),J(W)}function X(){if(Q._timeout)clearTimeout(Q._timeout),Q._timeout=null;if(Q.removeListener("abort",X),Q.removeListener("error",X),Q.removeListener("response",X),Q.removeListener("close",X),$)Q.removeListener("timeout",$);if(!Q.socket)Q._currentRequest.removeListener("socket",Y)}if($)this.on("timeout",$);if(this.socket)Y(this.socket);else this._currentRequest.once("socket",Y);return this.on("socket",J),this.on("abort",X),this.on("error",X),this.on("response",X),this.on("close",X),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(c){z0.prototype[c]=function($,Q){return this._currentRequest[c]($,Q)}});["aborted","connection","socket"].forEach(function(c){Object.defineProperty(z0.prototype,c,{get:function(){return this._currentRequest[c]}})});z0.prototype._sanitizeOptions=function(c){if(!c.headers)c.headers={};if(!BU(c.sensitiveHeaders))c.sensitiveHeaders=[];if(c.host){if(!c.hostname)c.hostname=c.host;delete c.host}if(!c.pathname&&c.path){var $=c.path.indexOf("?");if($<0)c.pathname=c.path;else c.pathname=c.path.substring(0,$),c.search=c.path.substring($)}};z0.prototype._performRequest=function(){var c=this._options.protocol,$=this._options.nativeProtocols[c];if(!$)throw TypeError("Unsupported protocol "+c);if(this._options.agents){var Q=c.slice(0,-1);this._options.agent=this._options.agents[Q]}var J=this._currentRequest=$.request(this._options,this._onNativeResponse);J._redirectable=this;for(var Y of p9)J.on(Y,Z9[Y]);if(this._currentUrl=/^\//.test(this._options.path)?nQ.format(this._options):this._options.path,this._isRedirect){var X=0,W=this,m=this._requestBodyBuffers;(function G(z){if(J===W._currentRequest){if(z)W.emit("error",z);else if(X<m.length){var x=m[X++];if(!J.finished)J.write(x.data,x.encoding,G)}else if(W._ended)J.end()}})()}};z0.prototype._processResponse=function(c){var $=c.statusCode;if(this._options.trackRedirects)this._redirects.push({url:this._currentUrl,headers:c.headers,statusCode:$});var Q=c.headers.location;if(!Q||this._options.followRedirects===!1||$<300||$>=400){c.responseUrl=this._currentUrl,c.redirects=this._redirects,this.emit("response",c),this._requestBodyBuffers=[];return}if(L9(this._currentRequest),c.destroy(),++this._redirectCount>this._options.maxRedirects)throw new iU;var J,Y=this._options.beforeRedirect;if(Y)J=Object.assign({Host:c.req.getHeader("host")},this._options.headers);var X=this._options.method;if(($===301||$===302)&&this._options.method==="POST"||$===303&&!/^(?:GET|HEAD)$/.test(this._options.method))this._options.method="GET",this._requestBodyBuffers=[],j9(/^content-/i,this._options.headers);var W=j9(/^host$/i,this._options.headers),m=I9(this._currentUrl),G=W||m.host,z=/^\w+:/.test(Q)?this._currentUrl:nQ.format(Object.assign(m,{host:G})),x=KU(Q,z);if(p5("redirecting to",x.href),this._isRedirect=!0,B9(x,this._options),x.protocol!==m.protocol&&x.protocol!=="https:"||x.host!==G&&!DU(x.host,G))j9(this._headerFilter,this._options.headers);if(r8(Y)){var q={headers:c.headers,statusCode:$},M={url:z,method:X,headers:J};Y(this._options,q,M),this._sanitizeOptions(this._options)}this._performRequest()};function Z5(c){var $={maxRedirects:21,maxBodyLength:10485760},Q={};return Object.keys(c).forEach(function(J){var Y=J+":",X=Q[Y]=c[J],W=$[J]=Object.create(X);function m(z,x,q){if(OU(z))z=B9(z);else if(s8(z))z=B9(I9(z));else q=x,x=L5(z),z={protocol:Y};if(r8(x))q=x,x=null;if(x=Object.assign({maxRedirects:$.maxRedirects,maxBodyLength:$.maxBodyLength},z,x),x.nativeProtocols=Q,!s8(x.host)&&!s8(x.hostname))x.hostname="::1";return O9.equal(x.protocol,Y,"protocol mismatch"),p5("options",x),new z0(x,q)}function G(z,x,q){var M=W.request(z,x,q);return M.end(),M}Object.defineProperties(W,{request:{value:m,configurable:!0,enumerable:!0,writable:!0},get:{value:G,configurable:!0,enumerable:!0,writable:!0}})}),$}function I5(){}function I9(c){var $;if(R9)$=new fQ(c);else if($=L5(nQ.parse(c)),!s8($.protocol))throw new K9({input:c});return $}function KU(c,$){return R9?new fQ(c,$):I9(nQ.resolve($,c))}function L5(c){if(/^\[/.test(c.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(c.hostname))throw new K9({input:c.href||c});if(/^\[/.test(c.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(c.host))throw new K9({input:c.href||c});return c}function B9(c,$){var Q=$||{};for(var J of wU)Q[J]=c[J];if(Q.hostname.startsWith("["))Q.hostname=Q.hostname.slice(1,-1);if(Q.port!=="")Q.port=Number(Q.port);return Q.path=Q.search?Q.pathname+Q.search:Q.pathname,Q}function j9(c,$){var Q;for(var J in $)if(c.test(J))Q=$[J],delete $[J];return Q===null||typeof Q>"u"?void 0:String(Q).trim()}function uQ(c,$,Q){function J(Y){if(r8(Error.captureStackTrace))Error.captureStackTrace(this,this.constructor);Object.assign(this,Y||{}),this.code=c,this.message=this.cause?$+": "+this.cause.message:$}return J.prototype=new(Q||Error),Object.defineProperties(J.prototype,{constructor:{value:J,enumerable:!1},name:{value:"Error ["+c+"]",enumerable:!1}}),J}function L9(c,$){for(var Q of p9)c.removeListener(Q,Z9[Q]);c.on("error",I5),c.destroy($)}function DU(c,$){O9(s8(c)&&s8($));var Q=c.length-$.length-1;return Q>0&&c[Q]==="."&&c.endsWith($)}function BU(c){return c instanceof Array}function s8(c){return typeof c==="string"||c instanceof String}function r8(c){return typeof c==="function"}function HU(c){return typeof c==="object"&&"length"in c}function OU(c){return fQ&&c instanceof fQ}function RU(c){return c.replace(/[\]\\/()*+?.$]/g,"\\$&")}_9.exports=Z5({http:MU,https:NU});_9.exports.wrap=Z5});var $8="1.18.0";function kQ(c){let $=/^([-+\w]{1,25}):(?:\/\/)?/.exec(c);return $&&$[1]||""}function S9(c,$,Q){let J=Q&&Q.Blob||Bc.classes.Blob,Y=kQ(c);if($===void 0&&J)$=!0;if(Y==="data"){c=Y.length?c.slice(Y.length+1):c;let X=pU.exec(c);if(!X)throw new O("Invalid URL",O.ERR_INVALID_URL);let W=X[1],m=X[2],G=X[3]?"base64":"utf8",z=X[4],x;if(W)x=m?W+m:W;else if(m)x="text/plain"+m;let q=Buffer.from(decodeURIComponent(z),G);if($){if(!J)throw new O("Blob is not supported",O.ERR_NOT_SUPPORT);return new J([q],{type:x})}return q}throw new O("Unsupported protocol "+Y,O.ERR_NOT_SUPPORT)}var pU;var S5=g(()=>{X0();b0();pU=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/});import ZU from"stream";var A9,A5,C9;var C5=g(()=>{Lc();A9=Symbol("internals");A5=class A5 extends ZU.Transform{constructor(c){c=V.toFlatObject(c,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(Q,J)=>{return!V.isUndefined(J[Q])});super({readableHighWaterMark:c.chunkSize});let $=this[A9]={timeWindow:c.timeWindow,chunkSize:c.chunkSize,maxRate:c.maxRate,minChunkSize:c.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(Q)=>{if(Q==="progress"){if(!$.isCaptured)$.isCaptured=!0}})}_read(c){let $=this[A9];if($.onReadCallback)$.onReadCallback();return super._read(c)}_transform(c,$,Q){let J=this[A9],Y=J.maxRate,X=this.readableHighWaterMark,W=J.timeWindow,m=1000/W,G=Y/m,z=J.minChunkSize!==!1?Math.max(J.minChunkSize,G*0.01):0,x=(M,N)=>{let w=Buffer.byteLength(M);if(J.bytesSeen+=w,J.bytes+=w,J.isCaptured&&this.emit("progress",J.bytesSeen),this.push(M))process.nextTick(N);else J.onReadCallback=()=>{J.onReadCallback=null,process.nextTick(N)}},q=(M,N)=>{let w=Buffer.byteLength(M),U=null,v=X,i,j=0;if(Y){let D=Date.now();if(!J.ts||(j=D-J.ts)>=W)J.ts=D,i=G-J.bytes,J.bytes=i<0?-i:0,j=0;i=G-J.bytes}if(Y){if(i<=0)return setTimeout(()=>{N(null,M)},W-j);if(i<v)v=i}if(v&&w>v&&w-v>z)U=M.subarray(v),M=M.subarray(0,v);x(M,U?()=>{process.nextTick(N,null,U)}:N)};q(c,function M(N,w){if(N)return Q(N);if(w)q(w,M);else Q(null)})}};C9=A5});var P5,IU=async function*(c){if(c.stream)yield*c.stream();else if(c.arrayBuffer)yield await c.arrayBuffer();else if(c[P5])yield*c[P5]();else yield c},tJ;var P9=g(()=>{({asyncIterator:P5}=Symbol),tJ=IU});import LU from"util";import{Readable as _U}from"stream";class E5{constructor(c,$){let{escapeName:Q}=this.constructor,J=V.isString($),Y=`Content-Disposition: form-data; name="${Q(c)}"${!J&&$.name?`; filename="${Q($.name)}"`:""}${t8}`;if(J)$=aQ.encode(String($).replace(/\r?\n|\r\n?/g,t8));else{let X=String($.type||"application/octet-stream").replace(/[\r\n]/g,"");Y+=`Content-Type: ${X}${t8}`}this.headers=aQ.encode(Y+t8),this.contentLength=J?$.byteLength:$.size,this.size=this.headers.byteLength+this.contentLength+CU,this.name=c,this.value=$}async*encode(){yield this.headers;let{value:c}=this;if(V.isTypedArray(c))yield c;else yield*tJ(c);yield AU}static escapeName(c){return String(c).replace(/[\r\n"]/g,($)=>({"\r":"%0D","\n":"%0A",'"':"%22"})[$])}}var SU,aQ,t8=`\r
|
|
22
|
+
`,AU,CU=2,PU=(c,$,Q)=>{let{tag:J="form-data-boundary",size:Y=25,boundary:X=J+"-"+Bc.generateString(Y,SU)}=Q||{};if(!V.isFormData(c))throw TypeError("FormData instance required");if(X.length<1||X.length>70)throw Error("boundary must be 1-70 characters long");let W=aQ.encode("--"+X+t8),m=aQ.encode("--"+X+"--"+t8),G=m.byteLength,z=Array.from(c.entries()).map(([q,M])=>{let N=new E5(q,M);return G+=N.size,N});G+=W.byteLength*z.length,G=V.toFiniteNumber(G);let x={"Content-Type":`multipart/form-data; boundary=${X}`};if(Number.isFinite(G))x["Content-Length"]=G;return $&&$(x),_U.from(async function*(){for(let q of z)yield W,yield*q.encode();yield m}())},b5;var F5=g(()=>{Lc();P9();b0();SU=Bc.ALPHABET.ALPHA_DIGIT+"-_",aQ=typeof TextEncoder==="function"?new TextEncoder:new LU.TextEncoder,AU=aQ.encode(t8);b5=PU});import EU from"stream";var T5,f5;var n5=g(()=>{T5=class T5 extends EU.Transform{__transform(c,$,Q){this.push(c),Q()}_transform(c,$,Q){if(c.length!==0){if(this._transform=this.__transform,c[0]!==120){let J=Buffer.alloc(2);J[0]=120,J[1]=156,this.push(J,$)}}this.__transform(c,$,Q)}};f5=T5});import bU from"http2";import FU from"util";class u5{constructor(){this.sessions=Object.create(null)}getSession(c,$){$=Object.assign({sessionTimeout:1000},$);let Q=this.sessions[c];if(Q){let x=Q.length;for(let q=0;q<x;q++){let[M,N]=Q[q];if(!M.destroyed&&!M.closed&&FU.isDeepStrictEqual(N,$))return M}}let J=bU.connect(c,$),Y,X,W=()=>{if(Y)return;if(Y=!0,X)clearTimeout(X),X=null;let x=Q,q=x.length,M=q;while(M--)if(x[M][0]===J){if(q===1)delete this.sessions[c];else x.splice(M,1);if(!J.closed)J.close();return}},m=J.request,{sessionTimeout:G}=$;if(G!=null){let x=0;J.request=function(){let q=m.apply(this,arguments);if(x++,X)clearTimeout(X),X=null;return q.once("close",()=>{if(!--x)X=setTimeout(()=>{X=null,W()},G)}),q}}J.once("close",W);let z=[J,$];return Q?Q.push(z):Q=this.sessions[c]=[z],J}}var k5;var a5=g(()=>{k5=u5});var TU=(c,$)=>{return V.isAsyncFn(c)?function(...Q){let J=Q.pop();c.apply(this,Q).then((Y)=>{try{$?J(null,...$(Y)):J(null,Y)}catch(X){J(X)}},J)}:c},l5;var h5=g(()=>{Lc();l5=TU});function b9(c){let $;try{$=new URL(c)}catch(X){return!1}let Q=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!Q)return!1;if(Q==="*")return!0;let J=Number.parseInt($.port,10)||kU[$.protocol.split(":",1)[0]]||0,Y=o5($.hostname.toLowerCase());return Q.split(/[\s,]+/).some((X)=>{if(!X)return!1;let[W,m]=aU(X);if(W=o5(W),!W)return!1;if(m&&m!==J)return!1;if(W.charAt(0)==="*")W=W.slice(1);if(W.charAt(0)===".")return Y.endsWith(W);return Y===W||y5(Y)&&y5(W)})}var fU,g5=(c)=>{let $=c.split(".");if($.length!==4)return!1;if($[0]!=="127")return!1;return $.every((Q)=>/^\d+$/.test(Q)&&Number(Q)>=0&&Number(Q)<=255)},E9=(c)=>/^0{1,4}$/.test(c),nU=(c)=>{if(c==="::")return!0;let $=c.indexOf("::");if($!==-1){if($!==c.lastIndexOf("::"))return!1;let J=c.slice(0,$),Y=c.slice($+2),X=J?J.split(":"):[],W=Y?Y.split(":"):[];return X.length+W.length<8&&X.every(E9)&&W.every(E9)}let Q=c.split(":");return Q.length===8&&Q.every(E9)},uU=(c)=>{if(c==="::1")return!0;let $=c.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if($)return g5($[1]);let Q=c.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(Q){let Y=parseInt(Q[1],16);return Y>=32512&&Y<=32767}let J=c.split(":");if(J.length===8){for(let Y=0;Y<7;Y++)if(!/^0+$/.test(J[Y]))return!1;return/^0*1$/.test(J[7])}return!1},y5=(c)=>{if(!c)return!1;if(fU.has(c))return!0;if(g5(c))return!0;if(nU(c))return!0;return uU(c)},kU,aU=(c)=>{let $=c,Q=0;if($.charAt(0)==="["){let X=$.indexOf("]");if(X!==-1){let W=$.slice(1,X),m=$.slice(X+1);if(m.charAt(0)===":"&&/^\d+$/.test(m.slice(1)))Q=Number.parseInt(m.slice(1),10);return[W,Q]}}let J=$.indexOf(":"),Y=$.lastIndexOf(":");if(J!==-1&&J===Y&&/^\d+$/.test($.slice(Y+1)))Q=Number.parseInt($.slice(Y+1),10),$=$.slice(0,Y);return[$,Q]},lU,hU,yU=(c)=>{if(typeof c!=="string"||c.indexOf(":")===-1)return c;let $=c.match(lU);if($)return $[1];let Q=c.match(hU);if(Q){let J=parseInt(Q[1],16),Y=parseInt(Q[2],16);return`${J>>8}.${J&255}.${Y>>8}.${Y&255}`}return c},o5=(c)=>{if(!c)return c;if(c.charAt(0)==="["&&c.charAt(c.length-1)==="]")c=c.slice(1,-1);return yU(c.replace(/\.+$/,""))};var d5=g(()=>{fU=new Set(["localhost","0.0.0.0"]),kU={http:80,https:443,ws:80,wss:443,ftp:21},lU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,hU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i});function oU(c,$){c=c||10;let Q=Array(c),J=Array(c),Y=0,X=0,W;return $=$!==void 0?$:1000,function(G){let z=Date.now(),x=J[X];if(!W)W=z;Q[Y]=G,J[Y]=z;let q=X,M=0;while(q!==Y)M+=Q[q++],q=q%c;if(Y=(Y+1)%c,Y===X)X=(X+1)%c;if(z-W<$)return;let N=x&&z-x;return N?Math.round(M*1000/N):void 0}}var s5;var r5=g(()=>{s5=oU});function gU(c,$){let Q=0,J=1000/$,Y,X,W=(z,x=Date.now())=>{if(Q=x,Y=null,X)clearTimeout(X),X=null;c(...z)};return[(...z)=>{let x=Date.now(),q=x-Q;if(q>=J)W(z,x);else if(Y=z,!X)X=setTimeout(()=>{X=null,W(Y)},J-q)},()=>Y&&W(Y)]}var t5;var e5=g(()=>{t5=gU});var Q8=(c,$,Q=3)=>{let J=0,Y=s5(50,250);return t5((X)=>{if(!X||typeof X.loaded!=="number")return;let W=X.loaded,m=X.lengthComputable?X.total:void 0,G=m!=null?Math.min(W,m):W,z=Math.max(0,G-J),x=Y(z);J=Math.max(J,G);let q={loaded:G,total:m,progress:m?G/m:void 0,bytes:z,rate:x?x:void 0,estimated:x&&m?(m-G)/x:void 0,event:X,lengthComputable:m!=null,[$?"download":"upload"]:!0};c(q)},Q)},E$=(c,$)=>{let Q=c!=null;return[(J)=>$[0]({lengthComputable:Q,total:c,loaded:J}),$[1]]},b$=(c)=>(...$)=>V.asap(()=>c(...$));var eJ=g(()=>{r5();e5();Lc()});function lQ(c){if(!c||typeof c!=="string")return 0;if(!c.startsWith("data:"))return 0;let $=c.indexOf(",");if($<0)return 0;let Q=c.slice(5,$),J=c.slice($+1);if(/;base64/i.test(Q)){let{length:W,length:m}=J;for(let N=0;N<m;N++)if(J.charCodeAt(N)===37&&N+2<m){let w=J.charCodeAt(N+1),U=J.charCodeAt(N+2);if(cY(w)&&cY(U))W-=2,N+=2}let G=0,z=m-1,x=(N)=>N>=2&&J.charCodeAt(N-2)===37&&J.charCodeAt(N-1)===51&&(J.charCodeAt(N)===68||J.charCodeAt(N)===100);if(z>=0){if(J.charCodeAt(z)===61)G++,z--;else if(x(z))G++,z-=3}if(G===1&&z>=0){if(J.charCodeAt(z)===61)G++;else if(x(z))G++}let M=Math.floor(W/4)*3-(G||0);return M>0?M:0}let X=0;for(let W=0,m=J.length;W<m;W++){let G=J.charCodeAt(W);if(G===37&&dU(J,W,m))X+=1,W+=2;else if(G<128)X+=1;else if(G<2048)X+=2;else if(G>=55296&&G<=56319&&W+1<m){let z=J.charCodeAt(W+1);if(z>=56320&&z<=57343)X+=4,W++;else X+=3}else X+=3}return X}var cY=(c)=>c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102,dU=(c,$,Q)=>$+2<Q&&cY(c.charCodeAt($+1))&&cY(c.charCodeAt($+2));import sU from"http";import rU from"https";import tU from"http2";import eU from"util";import{resolve as cx}from"path";import O0 from"zlib";import F0 from"stream";import{EventEmitter as c4}from"events";function m4(c,$,Q){if(Q!=="content-only"){c.set($);return}Object.entries($).forEach(([J,Y])=>{if(W4.includes(J.toLowerCase()))c.set(J,Y)})}function z4(c,$){let Q=c.protocol+"//"+c.hostname+":"+(c.port||"")+"#"+(c.auth||""),J=$?Jx.get($)||Jx.set($,new Map).get($):G4,Y=J.get(Q);if(Y)return Y;let X=$&&$.options?{...$.options,...c}:c;if(Y=new F9.default(X),$&&$.options){let W={...$.options},m=Y.callback;Y.callback=function(z,x){return m.call(this,z,{...W,...x})}}return Y[Nx]=!0,J.set(Q,Y),Y}function q4(c,$,Q){if(c.beforeRedirects.proxy)c.beforeRedirects.proxy(c);if(c.beforeRedirects.auth)c.beforeRedirects.auth(c);if(c.beforeRedirects.sensitiveHeaders)c.beforeRedirects.sensitiveHeaders(c,Q);if(c.beforeRedirects.config)c.beforeRedirects.config(c,$,Q)}function M4(c,$){if(!c)return;Object.keys(c).forEach((Q)=>{if($.has(Q.toLowerCase()))delete c[Q]})}function N4(c,$){if(!$)return!1;try{return new URL($.url).origin===new URL(c.href).origin}catch(Q){return!1}}function Vx(c,$,Q,J,Y){let X=$;if(!X&&X!==!1){let W=sz(Q);if(W){if(!b9(Q))X=new URL(W)}}if(J&&c.headers){for(let W of Object.keys(c.headers))if(W.toLowerCase()==="proxy-authorization")delete c.headers[W]}if(J&&c.agent&&c.agent[Nx])c.agent=void 0;if(X){let W=X instanceof URL,m=(M)=>W||V.hasOwnProp(X,M)?X[M]:void 0,G=m("username"),z=m("password"),x=V.hasOwnProp(X,"auth")?X.auth:void 0;if(G)x=(G||"")+":"+(z||"");if(x){let M=typeof x==="object",N=M&&V.hasOwnProp(x,"username")?x.username:void 0,w=M&&V.hasOwnProp(x,"password")?x.password:void 0;if(Boolean(N||w))x=(N||"")+":"+(w||"");else if(M)throw new O("Invalid proxy authorization",O.ERR_BAD_OPTION,{proxy:X})}if(Mx.test(c.protocol)){if(!(Y instanceof F9.default)){let M=m("hostname")||m("host"),N=m("port"),w=m("protocol"),U=w?w.includes(":")?w:`${w}:`:"http:",v=M&&M.includes(":")&&!M.startsWith("[")?`[${M}]`:M,i=new URL(`${U}//${v}${N?":"+N:""}`),j={protocol:i.protocol,hostname:i.hostname.replace(/^\[|\]$/g,""),port:i.port,auth:x&&typeof x==="string"?x:void 0};if(i.protocol==="https:")j.ALPNProtocols=["http/1.1"];let D=z4(j,Y);if(c.agent=D,c.agents)c.agents.https=D}}else{if(x){let U=Buffer.from(x,"utf8").toString("base64");c.headers["Proxy-Authorization"]="Basic "+U}let M=!1;for(let U of Object.keys(c.headers))if(U.toLowerCase()==="host"){M=!0;break}if(!M)c.headers.host=c.hostname+(c.port?":"+c.port:"");let N=m("hostname")||m("host");c.hostname=N,c.host=N,c.port=m("port"),c.path=Q;let w=m("protocol");if(w)c.protocol=w.includes(":")?w:`${w}:`}}c.beforeRedirects.proxy=function(m){Vx(m,$,m.href,!0,Y)}}var F9,Gx,$x,$4,Q4,zx,xx,qx,J4,Y4,X4,Mx,W4,Qx,$Y,Nx,G4,Jx,Yx,Xx=(c)=>{if(!V.isString(c))return c;try{return decodeURIComponent(c)}catch($){return c}},Wx=(c,[$,Q])=>{return c.on("end",Q).on("error",Q),$},x4,V4,w4=(c)=>{return new Promise(($,Q)=>{let J,Y,X=(G,z)=>{if(Y)return;Y=!0,J&&J(G,z)},W=(G)=>{X(G),$(G)},m=(G)=>{X(G,!0),Q(G)};c(W,m,(G)=>J=G).catch(m)})},i4=({address:c,family:$})=>{if(!V.isString(c))throw TypeError("address must be a string");return{address:c,family:$||(c.indexOf(".")<0?6:4)}},mx=(c,$)=>i4(V.isObject(c)?c:{address:c,family:$}),v4,wx;var ix=g(()=>{Lc();hJ();yJ();kJ();rz();LQ();X0();h8();b0();S5();P0();C5();F5();P9();n5();a5();h5();d5();BQ();eJ();F9=BX(H5(),1),Gx=BX(_5(),1),$x={flush:O0.constants.Z_SYNC_FLUSH,finishFlush:O0.constants.Z_SYNC_FLUSH},$4={flush:O0.constants.BROTLI_OPERATION_FLUSH,finishFlush:O0.constants.BROTLI_OPERATION_FLUSH},Q4={flush:O0.constants.ZSTD_e_flush,finishFlush:O0.constants.ZSTD_e_flush},zx=V.isFunction(O0.createBrotliDecompress),xx=V.isFunction(O0.createZstdDecompress),qx="gzip, compress, deflate"+(zx?", br":""),J4=qx+(xx?", zstd":""),{http:Y4,https:X4}=Gx.default,Mx=/https:?/,W4=["content-type","content-length"];Qx=Symbol("axios.http.socketListener"),$Y=Symbol("axios.http.currentReq"),Nx=Symbol("axios.http.installedTunnel"),G4=new Map,Jx=new WeakMap;Yx=Bc.protocols.map((c)=>{return c+":"}),x4=new k5;V4=typeof process<"u"&&V.kindOf(process)==="process",v4={request(c,$){let Q=c.protocol+"//"+c.hostname+":"+(c.port||(c.protocol==="https:"?443:80)),{http2Options:J,headers:Y}=c,X=x4.getSession(Q,J),{HTTP2_HEADER_SCHEME:W,HTTP2_HEADER_METHOD:m,HTTP2_HEADER_PATH:G,HTTP2_HEADER_STATUS:z}=tU.constants,x={[W]:c.protocol.replace(":",""),[m]:c.method,[G]:c.path};V.forEach(Y,(M,N)=>{N.charAt(0)!==":"&&(x[N]=M)});let q=X.request(x);return q.once("response",(M)=>{let N=q;M=Object.assign({},M);let w=M[z];delete M[z],N.headers=M,N.statusCode=+w,$(N)}),q}},wx=V4&&function($){return w4(async function(J,Y,X){let W=(p)=>V.getSafeProp($,p),m=W("transitional")||D8,G=W("data"),z=W("lookup"),x=W("family"),q=W("httpVersion");if(q===void 0)q=1;let M=W("http2Options"),N=W("responseType"),w=W("responseEncoding"),U=W("httpAgent"),v=W("httpsAgent"),i=W("method").toUpperCase(),j=W("maxRedirects"),D=W("maxBodyLength"),_=W("maxContentLength"),mc=W("decompress"),d,Jc=!1,u,a;if(q=+q,Number.isNaN(q))throw TypeError(`Invalid protocol version: '${$.httpVersion}' is not a number`);if(q!==1&&q!==2)throw TypeError(`Unsupported protocol version '${q}'`);let Xc=q===2;if(z){let p=l5(z,(T)=>V.isArray(T)?T:[T]);z=(T,xc,pc)=>{p(T,xc,(Nc,Tc,Pc)=>{if(Nc)return pc(Nc);let bc=V.isArray(Tc)?Tc.map((U$)=>mx(U$)):[mx(Tc,Pc)];xc.all?pc(Nc,bc):pc(Nc,bc[0].address,bc[0].family)})}}let e=new c4;function B(p){try{e.emit("abort",!p||p.type?new w0(null,$,u):p)}catch(T){}}function C(){if(a)clearTimeout(a),a=null}function K(){let p=W("timeout"),T=p?"timeout of "+p+"ms exceeded":"timeout exceeded",xc=W("timeoutErrorMessage");if(xc)T=xc;return new O(T,m.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,$,u)}e.once("abort",Y);let R=()=>{if(C(),$.cancelToken)$.cancelToken.unsubscribe(B);if($.signal)$.signal.removeEventListener("abort",B);e.removeAllListeners()};if($.cancelToken||$.signal){if($.cancelToken&&$.cancelToken.subscribe(B),$.signal)$.signal.aborted?B():$.signal.addEventListener("abort",B)}X((p,T)=>{if(d=!0,C(),T){Jc=!0,R();return}let{data:xc}=p;if(xc instanceof F0.Readable||xc instanceof F0.Duplex){let pc=F0.finished(xc,()=>{pc(),R()})}else R()});let S=y8(W("baseURL"),W("url"),W("allowAbsoluteUrls"),$),I=new URL(S,Bc.hasBrowserEnv?Bc.origin:void 0),H=I.protocol||Yx[0];if(H==="data:"){if(_>-1){let T=String(W("url")||S||"");if(lQ(T)>_)return Y(new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,$))}let p;if(i!=="GET")return d0(J,Y,{status:405,statusText:"method not allowed",headers:{},config:$});try{p=S9(W("url"),N==="blob",{Blob:$.env&&$.env.Blob})}catch(T){throw O.from(T,O.ERR_BAD_REQUEST,$)}if(N==="text"){if(p=p.toString(w),!w||w==="utf8")p=V.stripBOM(p)}else if(N==="stream")p=F0.Readable.from(p);return d0(J,Y,{data:p,status:200,statusText:"OK",headers:new _c,config:$})}if(Yx.indexOf(H)===-1)return Y(new O("Unsupported protocol "+H,O.ERR_BAD_REQUEST,$));let A=_c.from($.headers).normalize();A.set("User-Agent","axios/"+$8,!1);let{onUploadProgress:b,onDownloadProgress:P}=$,r=$.maxRate,Yc=void 0,cc=void 0;if(V.isSpecCompliantForm(G)){let p=A.getContentType(/boundary=([-_\w\d]{10,70})/i);G=b5(G,(T)=>{A.set(T)},{tag:`axios-${$8}-boundary`,boundary:p&&p[1]||void 0})}else if(V.isFormData(G)&&V.isFunction(G.getHeaders)&&G.getHeaders!==Object.prototype.getHeaders){if(m4(A,G.getHeaders(),W("formDataHeaderPolicy")),!A.hasContentLength())try{let p=await eU.promisify(G.getLength).call(G);Number.isFinite(p)&&p>=0&&A.setContentLength(p)}catch(p){}}else if(V.isBlob(G)||V.isFile(G))G.size&&A.setContentType(G.type||"application/octet-stream"),A.setContentLength(G.size||0),G=F0.Readable.from(tJ(G));else if(G&&!V.isStream(G)){if(Buffer.isBuffer(G));else if(V.isArrayBuffer(G))G=Buffer.from(new Uint8Array(G));else if(V.isString(G))G=Buffer.from(G,"utf-8");else return Y(new O("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",O.ERR_BAD_REQUEST,$));if(A.setContentLength(G.length,!1),D>-1&&G.length>D)return Y(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,$))}let Oc=V.toFiniteNumber(A.getContentLength());if(V.isArray(r))Yc=r[0],cc=r[1];else Yc=cc=r;if(G&&(b||Yc)){if(!V.isStream(G))G=F0.Readable.from(G,{objectMode:!1});G=F0.pipeline([G,new C9({maxRate:V.toFiniteNumber(Yc)})],V.noop),b&&G.on("progress",Wx(G,E$(Oc,Q8(b$(b),!1,3))))}let o=void 0,Dc=W("auth");if(Dc){let p=V.getSafeProp(Dc,"username")||"",T=V.getSafeProp(Dc,"password")||"";o=p+":"+T}if(!o&&(I.username||I.password)){let p=Xx(I.username),T=Xx(I.password);o=p+":"+T}o&&A.delete("authorization");let Uc;try{Uc=l8(I.pathname+I.search,W("params"),W("paramsSerializer")).replace(/^\?/,"")}catch(p){let T=Error(p.message);return T.config=$,T.url=W("url"),T.exists=!0,Y(T)}A.set("Accept-Encoding",V.hasOwnProp(m,"advertiseZstdAcceptEncoding")&&m.advertiseZstdAcceptEncoding===!0?J4:qx,!1);let qc=Object.assign(Object.create(null),{path:Uc,method:i,headers:H$(A),agents:{http:U,https:v},auth:o,protocol:H,family:x,beforeRedirect:q4,beforeRedirects:Object.create(null),http2Options:M});!V.isUndefined(z)&&(qc.lookup=z);let M0=W("socketPath");if(M0){if(typeof M0!=="string")return Y(new O("socketPath must be a string",O.ERR_BAD_OPTION_VALUE,$));let p=W("allowedSocketPaths");if(p!=null){let T=Array.isArray(p)?p:[p],xc=cx(M0);if(!T.some((Nc)=>typeof Nc==="string"&&cx(Nc)===xc))return Y(new O(`socketPath "${M0}" is not permitted by allowedSocketPaths`,O.ERR_BAD_OPTION_VALUE,$))}qc.socketPath=M0}else qc.hostname=I.hostname.startsWith("[")?I.hostname.slice(1,-1):I.hostname,qc.port=I.port,Vx(qc,W("proxy"),H+"//"+I.hostname+(I.port?":"+I.port:"")+qc.path,!1,v);let N0,Y0=!1,U8=!1,n8=Mx.test(qc.protocol);if(qc.agent==null)qc.agent=n8?v:U;if(Xc)N0=v4;else{let p=W("transport");if(p)N0=p;else if(j===0)N0=n8?rU:sU,Y0=!0;else{if(U8=!0,qc.sensitiveHeaders=[],j)qc.maxRedirects=j;let T=W("beforeRedirect");if(T)qc.beforeRedirects.config=T;if(o){let pc=I.origin,Nc=o;qc.beforeRedirects.auth=function(Pc){try{if(new URL(Pc.href).origin===pc)Pc.auth=Nc}catch(bc){}}}let xc=W("sensitiveHeaders");if(xc!=null){if(!V.isArray(xc))return Y(new O("sensitiveHeaders must be an array of strings",O.ERR_BAD_OPTION_VALUE,$));let pc=new Set;for(let Nc of xc){if(!V.isString(Nc))return Y(new O("sensitiveHeaders must be an array of strings",O.ERR_BAD_OPTION_VALUE,$));pc.add(Nc.toLowerCase())}if(pc.size)qc.sensitiveHeaders=Array.from(pc),qc.beforeRedirects.sensitiveHeaders=function(Tc,Pc){if(!N4(Tc,Pc))M4(Tc.headers,pc)}}N0=n8?X4:Y4}}if(D>-1)qc.maxBodyLength=D;else qc.maxBodyLength=1/0;qc.insecureHTTPParser=Boolean(W("insecureHTTPParser")),u=N0.request(qc,function(T){if(C(),u.destroyed)return;let xc=[T],pc=V.toFiniteNumber(T.headers["content-length"]);if(P||cc){let bc=new C9({maxRate:V.toFiniteNumber(cc)});P&&bc.on("progress",Wx(bc,E$(pc,Q8(b$(P),!0,3)))),xc.push(bc)}let Nc=T,Tc=T.req||u;if(mc!==!1&&T.headers["content-encoding"]){if(i==="HEAD"||T.statusCode===204)delete T.headers["content-encoding"];switch((T.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":xc.push(O0.createUnzip($x)),delete T.headers["content-encoding"];break;case"deflate":xc.push(new f5),xc.push(O0.createUnzip($x)),delete T.headers["content-encoding"];break;case"br":if(zx)xc.push(O0.createBrotliDecompress($4)),delete T.headers["content-encoding"];break;case"zstd":if(xx)xc.push(O0.createZstdDecompress(Q4)),delete T.headers["content-encoding"];break}}Nc=xc.length>1?F0.pipeline(xc,V.noop):xc[0];let Pc={status:T.statusCode,statusText:T.statusMessage,headers:new _c(T.headers),config:$,request:Tc};if(N==="stream"){if(_>-1){let bc=_,U$=Nc;async function*iQ(){let uc=0;for await(let x7 of U$){if(uc+=x7.length,uc>bc)throw new O("maxContentLength size of "+bc+" exceeded",O.ERR_BAD_RESPONSE,$,Tc);yield x7}}Nc=F0.Readable.from(iQ(),{objectMode:!1})}Pc.data=Nc,d0(J,Y,Pc)}else{let bc=[],U$=0;Nc.on("data",function(uc){if(bc.push(uc),U$+=uc.length,_>-1&&U$>_)Jc=!0,Nc.destroy(),B(new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,$,Tc))}),Nc.on("aborted",function(){if(Jc)return;let uc=new O("stream has been aborted",O.ERR_BAD_RESPONSE,$,Tc,Pc);Nc.destroy(uc),Y(uc)}),Nc.on("error",function(uc){if(Jc)return;Y(O.from(uc,null,$,Tc,Pc))}),Nc.on("end",function(){try{let uc=bc.length===1?bc[0]:Buffer.concat(bc);if(N!=="arraybuffer"){if(uc=uc.toString(w),!w||w==="utf8")uc=V.stripBOM(uc)}Pc.data=uc}catch(uc){return Y(O.from(uc,null,$,Pc.request,Pc))}d0(J,Y,Pc)})}e.once("abort",(bc)=>{if(!Nc.destroyed)Nc.emit("error",bc),Nc.destroy()})}),e.once("abort",(p)=>{if(u.close)u.close();else u.destroy(p)}),u.on("error",function(T){Y(O.from(T,null,$,u))});let V0=new Set;if(u.on("socket",function(T){if(T.setKeepAlive(!0,60000),!T[Qx])T.on("error",function(pc){let Nc=T[$Y];if(Nc&&!Nc.destroyed)Nc.destroy(pc)}),T[Qx]=!0;T[$Y]=u,V0.add(T)}),u.once("close",function(){C();for(let T of V0)if(T[$Y]===u)T[$Y]=null;V0.clear()}),W("timeout")){let p=parseInt(W("timeout"),10);if(Number.isNaN(p)){B(new O("error trying to parse `config.timeout` to int",O.ERR_BAD_OPTION_VALUE,$,u));return}let T=function(){if(d)return;B(K())};if(Y0&&p>0)a=setTimeout(T,p);u.setTimeout(p,T)}else u.setTimeout(0);if(V.isStream(G)){let p=!1,T=!1;G.on("end",()=>{p=!0}),G.once("error",(pc)=>{T=!0,u.destroy(pc)}),G.on("close",()=>{if(!p&&!T)B(new w0("Request stream has been aborted",$,u))});let xc=G;if(D>-1&&!U8){let pc=D,Nc=0;xc=F0.pipeline([G,new F0.Transform({transform(Tc,Pc,bc){if(Nc+=Tc.length,Nc>pc)return bc(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,$,u));bc(null,Tc)}})],V.noop),xc.on("error",(Tc)=>{if(!u.destroyed)u.destroy(Tc)})}xc.pipe(u)}else G&&u.write(G),u.end()})}});var vx;var Ux=g(()=>{b0();vx=Bc.hasStandardBrowserEnv?((c,$)=>(Q)=>{return Q=new URL(Q,Bc.origin),c.protocol===Q.protocol&&c.host===Q.host&&($||c.port===Q.port)})(new URL(Bc.origin),Bc.navigator&&/(msie|trident)/i.test(Bc.navigator.userAgent)):()=>!0});var jx;var Kx=g(()=>{Lc();b0();jx=Bc.hasStandardBrowserEnv?{write(c,$,Q,J,Y,X,W){if(typeof document>"u")return;let m=[`${c}=${encodeURIComponent($)}`];if(V.isNumber(Q))m.push(`expires=${new Date(Q).toUTCString()}`);if(V.isString(J))m.push(`path=${J}`);if(V.isString(Y))m.push(`domain=${Y}`);if(X===!0)m.push("secure");if(V.isString(W))m.push(`SameSite=${W}`);document.cookie=m.join("; ")},read(c){if(typeof document>"u")return null;let $=document.cookie.split(";");for(let Q=0;Q<$.length;Q++){let J=$[Q].replace(/^\s+/,""),Y=J.indexOf("=");if(Y!==-1&&J.slice(0,Y)===c)return decodeURIComponent(J.slice(Y+1))}return null},remove(c){this.write(c,"",Date.now()-86400000,"/")}}:{write(){},read(){return null},remove(){}}});function T0(c,$){$=$||{};let Q=Object.create(null);Object.defineProperty(Q,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function J(x,q,M,N){if(V.isPlainObject(x)&&V.isPlainObject(q))return V.merge.call({caseless:N},x,q);else if(V.isPlainObject(q))return V.merge({},q);else if(V.isArray(q))return q.slice();return q}function Y(x,q,M,N){if(!V.isUndefined(q))return J(x,q,M,N);else if(!V.isUndefined(x))return J(void 0,x,M,N)}function X(x,q){if(!V.isUndefined(q))return J(void 0,q)}function W(x,q){if(!V.isUndefined(q))return J(void 0,q);else if(!V.isUndefined(x))return J(void 0,x)}function m(x){let q=V.hasOwnProp($,"transitional")?$.transitional:void 0;if(!V.isUndefined(q))if(V.isPlainObject(q)){if(V.hasOwnProp(q,x))return q[x]}else return;let M=V.hasOwnProp(c,"transitional")?c.transitional:void 0;if(V.isPlainObject(M)&&V.hasOwnProp(M,x))return M[x];return}function G(x,q,M){if(V.hasOwnProp($,M))return J(x,q);else if(V.hasOwnProp(c,M))return J(void 0,x)}let z={url:X,method:X,data:X,baseURL:W,transformRequest:W,transformResponse:W,paramsSerializer:W,timeout:W,timeoutMessage:W,withCredentials:W,withXSRFToken:W,adapter:W,responseType:W,xsrfCookieName:W,xsrfHeaderName:W,onUploadProgress:W,onDownloadProgress:W,decompress:W,maxContentLength:W,maxBodyLength:W,beforeRedirect:W,transport:W,httpAgent:W,httpsAgent:W,cancelToken:W,socketPath:W,allowedSocketPaths:W,responseEncoding:W,validateStatus:G,headers:(x,q,M)=>Y(Dx(x),Dx(q),M,!0)};if(V.forEach(Object.keys({...c,...$}),function(q){if(q==="__proto__"||q==="constructor"||q==="prototype")return;let M=V.hasOwnProp(z,q)?z[q]:Y,N=V.hasOwnProp(c,q)?c[q]:void 0,w=V.hasOwnProp($,q)?$[q]:void 0,U=M(N,w,q);V.isUndefined(U)&&M!==G||(Q[q]=U)}),V.hasOwnProp($,"validateStatus")&&V.isUndefined($.validateStatus)&&m("validateStatusUndefinedResolves")===!1)if(V.hasOwnProp(c,"validateStatus"))Q.validateStatus=J(void 0,c.validateStatus);else delete Q.validateStatus;return Q}var Dx=(c)=>c instanceof _c?{...c}:c;var QY=g(()=>{Lc();P0()});function j4(c,$,Q){if(Q!=="content-only"){c.set($);return}Object.entries($).forEach(([J,Y])=>{if(U4.includes(J.toLowerCase()))c.set(J,Y)})}function D4(c){let $=T0({},c),Q=(M)=>V.hasOwnProp($,M)?$[M]:void 0,J=Q("data"),Y=Q("withXSRFToken"),X=Q("xsrfHeaderName"),W=Q("xsrfCookieName"),m=Q("headers"),G=Q("auth"),z=Q("baseURL"),x=Q("allowAbsoluteUrls"),q=Q("url");if($.headers=m=_c.from(m),$.url=l8(y8(z,q,x,$),Q("params"),Q("paramsSerializer")),G){let M=V.getSafeProp(G,"username")||"",N=V.getSafeProp(G,"password")||"";m.set("Authorization","Basic "+btoa(M+":"+(N?K4(N):"")))}if(V.isFormData(J)){if(Bc.hasStandardBrowserEnv||Bc.hasStandardBrowserWebWorkerEnv||V.isReactNative(J))m.setContentType(void 0);else if(V.isFunction(J.getHeaders))j4(m,J.getHeaders(),Q("formDataHeaderPolicy"))}if(Bc.hasStandardBrowserEnv){if(V.isFunction(Y))Y=Y($);if(Y===!0||Y==null&&vx($.url)){let N=X&&W&&jx.read(W);if(N)m.set(X,N)}}return $}var U4,K4=(c)=>encodeURIComponent(c).replace(/%([0-9A-F]{2})/gi,($,Q)=>String.fromCharCode(parseInt(Q,16))),JY;var T9=g(()=>{b0();Lc();Ux();Kx();yJ();QY();P0();kJ();U4=["content-type","content-length"];JY=D4});var B4,Bx;var Hx=g(()=>{Lc();hJ();LQ();X0();h8();b0();P0();eJ();T9();BQ();B4=typeof XMLHttpRequest<"u",Bx=B4&&function(c){return new Promise(function(Q,J){let Y=JY(c),X=Y.data,W=_c.from(Y.headers).normalize(),{responseType:m,onUploadProgress:G,onDownloadProgress:z}=Y,x,q,M,N,w;function U(){N&&N(),w&&w(),Y.cancelToken&&Y.cancelToken.unsubscribe(x),Y.signal&&Y.signal.removeEventListener("abort",x)}let v=new XMLHttpRequest;v.open(Y.method.toUpperCase(),Y.url,!0),v.timeout=Y.timeout;function i(){if(!v)return;let D=_c.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),mc={data:!m||m==="text"||m==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:D,config:c,request:v};d0(function(Jc){Q(Jc),U()},function(Jc){J(Jc),U()},mc),v=null}if("onloadend"in v)v.onloadend=i;else v.onreadystatechange=function(){if(!v||v.readyState!==4)return;if(v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:")))return;setTimeout(i)};if(v.onabort=function(){if(!v)return;J(new O("Request aborted",O.ECONNABORTED,c,v)),U(),v=null},v.onerror=function(_){let mc=_&&_.message?_.message:"Network Error",d=new O(mc,O.ERR_NETWORK,c,v);d.event=_||null,J(d),U(),v=null},v.ontimeout=function(){let _=Y.timeout?"timeout of "+Y.timeout+"ms exceeded":"timeout exceeded",mc=Y.transitional||D8;if(Y.timeoutErrorMessage)_=Y.timeoutErrorMessage;J(new O(_,mc.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,c,v)),U(),v=null},X===void 0&&W.setContentType(null),"setRequestHeader"in v)V.forEach(H$(W),function(_,mc){v.setRequestHeader(mc,_)});if(!V.isUndefined(Y.withCredentials))v.withCredentials=!!Y.withCredentials;if(m&&m!=="json")v.responseType=Y.responseType;if(z)[M,w]=Q8(z,!0),v.addEventListener("progress",M);if(G&&v.upload)[q,N]=Q8(G),v.upload.addEventListener("progress",q),v.upload.addEventListener("loadend",N);if(Y.cancelToken||Y.signal){if(x=(D)=>{if(!v)return;J(!D||D.type?new w0(null,c,v):D),v.abort(),U(),v=null},Y.cancelToken&&Y.cancelToken.subscribe(x),Y.signal)Y.signal.aborted?x():Y.signal.addEventListener("abort",x)}let j=kQ(Y.url);if(j&&!Bc.protocols.includes(j)){J(new O("Unsupported protocol "+j+":",O.ERR_BAD_REQUEST,c));return}v.send(X||null)})}});var H4=(c,$)=>{if(c=c?c.filter(Boolean):[],!$&&!c.length)return;let Q=new AbortController,J=!1,Y=function(G){if(!J){J=!0,W();let z=G instanceof Error?G:this.reason;Q.abort(z instanceof O?z:new w0(z instanceof Error?z.message:z))}},X=$&&setTimeout(()=>{X=null,Y(new O(`timeout of ${$}ms exceeded`,O.ETIMEDOUT))},$),W=()=>{if(!c)return;X&&clearTimeout(X),X=null,c.forEach((G)=>{G.unsubscribe?G.unsubscribe(Y):G.removeEventListener("abort",Y)}),c=null};c.forEach((G)=>G.addEventListener("abort",Y));let{signal:m}=Q;return m.unsubscribe=()=>V.asap(W),m},Ox;var Rx=g(()=>{h8();X0();Lc();Ox=H4});var O4=function*(c,$){let Q=c.byteLength;if(!$||Q<$){yield c;return}let J=0,Y;while(J<Q)Y=J+$,yield c.slice(J,Y),J=Y},R4=async function*(c,$){for await(let Q of p4(c))yield*O4(Q,$)},p4=async function*(c){if(c[Symbol.asyncIterator]){yield*c;return}let $=c.getReader();try{for(;;){let{done:Q,value:J}=await $.read();if(Q)break;yield J}}finally{await $.cancel()}},f9=(c,$,Q,J)=>{let Y=R4(c,$),X=0,W,m=(G)=>{if(!W)W=!0,J&&J(G)};return new ReadableStream({async pull(G){try{let{done:z,value:x}=await Y.next();if(z){m(),G.close();return}let q=x.byteLength;if(Q){let M=X+=q;Q(M)}G.enqueue(new Uint8Array(x))}catch(z){throw m(z),z}},cancel(G){return m(G),Y.return()}},{highWaterMark:2})};var px=65536,YY,Z4=(c)=>encodeURIComponent(c).replace(/%([0-9A-F]{2})/gi,($,Q)=>String.fromCharCode(parseInt(Q,16))),Zx=(c)=>{if(!V.isString(c))return c;try{return decodeURIComponent(c)}catch($){return c}},Ix=(c,...$)=>{try{return!!c(...$)}catch(Q){return!1}},I4=(c)=>{let $=c.indexOf("://"),Q=c;if($!==-1)Q=Q.slice($+3);return Q.includes("@")||Q.includes(":")},L4=(c)=>{let $=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:Q,TextEncoder:J}=$;c=V.merge.call({skipUndefined:!0},{Request:$.Request,Response:$.Response},c);let{fetch:Y,Request:X,Response:W}=c,m=Y?YY(Y):typeof fetch==="function",G=YY(X),z=YY(W);if(!m)return!1;let x=m&&YY(Q),q=m&&(typeof J==="function"?((i)=>(j)=>i.encode(j))(new J):async(i)=>new Uint8Array(await new X(i).arrayBuffer())),M=G&&x&&Ix(()=>{let i=!1,j=new X(Bc.origin,{body:new Q,method:"POST",get duplex(){return i=!0,"half"}}),D=j.headers.has("Content-Type");if(j.body!=null)j.body.cancel();return i&&!D}),N=z&&x&&Ix(()=>V.isReadableStream(new W("").body)),w={stream:N&&((i)=>i.body)};m&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((i)=>{!w[i]&&(w[i]=(j,D)=>{let _=j&&j[i];if(_)return _.call(j);throw new O(`Response type '${i}' is not supported`,O.ERR_NOT_SUPPORT,D)})})})();let U=async(i)=>{if(i==null)return 0;if(V.isBlob(i))return i.size;if(V.isSpecCompliantForm(i))return(await new X(Bc.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(V.isArrayBufferView(i)||V.isArrayBuffer(i))return i.byteLength;if(V.isURLSearchParams(i))i=i+"";if(V.isString(i))return(await q(i)).byteLength},v=async(i,j)=>{let D=V.toFiniteNumber(i.getContentLength());return D==null?U(j):D};return async(i)=>{let{url:j,method:D,data:_,signal:mc,cancelToken:d,timeout:Jc,onDownloadProgress:u,onUploadProgress:a,responseType:Xc,headers:e,withCredentials:B="same-origin",fetchOptions:C,maxContentLength:K,maxBodyLength:R}=JY(i),S=V.isNumber(K)&&K>-1,I=V.isNumber(R)&&R>-1,H=(o)=>V.hasOwnProp(i,o)?i[o]:void 0,A=Y||fetch;Xc=Xc?(Xc+"").toLowerCase():"text";let b=Ox([mc,d&&d.toAbortSignal()],Jc),P=null,r=b&&b.unsubscribe&&(()=>{b.unsubscribe()}),Yc,cc=null,Oc=()=>new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,i,P);try{let o=void 0,Dc=H("auth");if(Dc){let p=V.getSafeProp(Dc,"username")||"",T=V.getSafeProp(Dc,"password")||"";o={username:p,password:T}}if(I4(j)){let p=new URL(j,Bc.origin);if(!o&&(p.username||p.password)){let T=Zx(p.username),xc=Zx(p.password);o={username:T,password:xc}}if(p.username||p.password)p.username="",p.password="",j=p.href}if(o)e.delete("authorization"),e.set("Authorization","Basic "+btoa(Z4((o.username||"")+":"+(o.password||""))));if(S&&typeof j==="string"&&j.startsWith("data:")){if(lQ(j)>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}if(I&&D!=="get"&&D!=="head"){let p=await U(_);if(typeof p==="number"&&isFinite(p)){if(Yc=p,p>R)throw Oc()}}let Uc=I&&(V.isReadableStream(_)||V.isStream(_)),qc=(p,T,xc)=>f9(p,px,(pc)=>{if(I&&pc>R)throw cc=Oc();T&&T(pc)},xc);if(M&&D!=="get"&&D!=="head"&&(a||Uc)){if(Yc=Yc==null?await v(e,_):Yc,Yc!==0||Uc){let p=new X(j,{method:"POST",body:_,duplex:"half"}),T;if(V.isFormData(_)&&(T=p.headers.get("content-type")))e.setContentType(T);if(p.body){let[xc,pc]=a&&E$(Yc,Q8(b$(a)))||[];_=qc(p.body,xc,pc)}}}else if(Uc&&!G&&x&&D!=="get"&&D!=="head")_=qc(_);else if(Uc&&G&&!M&&D!=="get"&&D!=="head")throw new O("Stream request bodies are not supported by the current fetch implementation",O.ERR_NOT_SUPPORT,i,P);if(!V.isString(B))B=B?"include":"omit";let M0=G&&"credentials"in X.prototype;if(V.isFormData(_)){let p=e.getContentType();if(p&&/^multipart\/form-data/i.test(p)&&!/boundary=/i.test(p))e.delete("content-type")}e.set("User-Agent","axios/"+$8,!1);let N0={...C,signal:b,method:D.toUpperCase(),headers:H$(e.normalize()),body:_,duplex:"half",credentials:M0?B:void 0};P=G&&new X(j,N0);let Y0=await(G?A(P,C):A(j,N0)),U8=_c.from(Y0.headers);if(S){let p=V.toFiniteNumber(U8.getContentLength());if(p!=null&&p>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}let n8=N&&(Xc==="stream"||Xc==="response");if(N&&Y0.body&&(u||S||n8&&r)){let p={};["status","statusText","headers"].forEach((Pc)=>{p[Pc]=Y0[Pc]});let T=V.toFiniteNumber(U8.getContentLength()),[xc,pc]=u&&E$(T,Q8(b$(u),!0))||[],Nc=0,Tc=(Pc)=>{if(S){if(Nc=Pc,Nc>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}xc&&xc(Pc)};Y0=new W(f9(Y0.body,px,Tc,()=>{pc&&pc(),r&&r()}),p)}Xc=Xc||"text";let V0=await w[V.findKey(w,Xc)||"text"](Y0,i);if(S&&!N&&!n8){let p;if(V0!=null){if(typeof V0.byteLength==="number")p=V0.byteLength;else if(typeof V0.size==="number")p=V0.size;else if(typeof V0==="string")p=typeof J==="function"?new J().encode(V0).byteLength:V0.length}if(typeof p==="number"&&p>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}return!n8&&r&&r(),await new Promise((p,T)=>{d0(p,T,{data:V0,headers:_c.from(Y0.headers),status:Y0.status,statusText:Y0.statusText,config:i,request:P})})}catch(o){if(r&&r(),b&&b.aborted&&b.reason instanceof O){let Dc=b.reason;throw Dc.config=i,P&&(Dc.request=P),o!==Dc&&(Dc.cause=o),Dc}if(cc)throw P&&!cc.request&&(cc.request=P),cc;if(o instanceof O)throw P&&!o.request&&(o.request=P),o;if(o&&o.name==="TypeError"&&/Load failed|fetch/i.test(o.message))throw Object.assign(new O("Network Error",O.ERR_NETWORK,i,P,o&&o.response),{cause:o.cause||o});throw O.from(o,o&&o.code,i,P,o&&o.response)}}},_4,n9=(c)=>{let $=c&&c.env||{},{fetch:Q,Request:J,Response:Y}=$,X=[J,Y,Q],W=X.length,m=W,G,z,x=_4;while(m--)G=X[m],z=x.get(G),z===void 0&&x.set(G,z=m?new Map:L4($)),x=z;return z},cA;var Lx=g(()=>{b0();Lc();X0();Rx();P0();eJ();T9();hJ();BQ();({isFunction:YY}=V),_4=new Map,cA=n9()});function C4(c,$){c=V.isArray(c)?c:[c];let{length:Q}=c,J,Y,X={};for(let W=0;W<Q;W++){J=c[W];let m;if(Y=J,!A4(J)){if(Y=u9[(m=String(J)).toLowerCase()],Y===void 0)throw new O(`Unknown adapter '${m}'`)}if(Y&&(V.isFunction(Y)||(Y=Y.get($))))break;X[m||"#"+W]=Y}if(!Y){let W=Object.entries(X).map(([G,z])=>`adapter ${G} `+(z===!1?"is not supported by the environment":"is not available in the build")),m=Q?W.length>1?`since :
|
|
23
|
+
`+W.map(_x).join(`
|
|
24
|
+
`):" "+_x(W[0]):"as no adapter specified";throw new O("There is no suitable adapter to dispatch the request "+m,"ERR_NOT_SUPPORT")}return Y}var u9,_x=(c)=>`- ${c}`,A4=(c)=>V.isFunction(c)||c===null||c===!1,XY;var k9=g(()=>{Lc();ix();Hx();Lx();X0();u9={http:wx,xhr:Bx,fetch:{get:n9}};V.forEach(u9,(c,$)=>{if(c){try{Object.defineProperty(c,"name",{__proto__:null,value:$})}catch(Q){}Object.defineProperty(c,"adapterName",{__proto__:null,value:$})}});XY={getAdapter:C4,adapters:u9}});function a9(c){if(c.cancelToken)c.cancelToken.throwIfRequested();if(c.signal&&c.signal.aborted)throw new w0(null,c)}function WY(c){if(a9(c),c.headers=_c.from(c.headers),c.data=_Q.call(c,c.transformRequest),["post","put","patch"].indexOf(c.method)!==-1)c.headers.setContentType("application/x-www-form-urlencoded",!1);return XY.getAdapter(c.adapter||_$.adapter,c)(c).then(function(J){a9(c),c.response=J;try{J.data=_Q.call(c,c.transformResponse,J)}finally{delete c.response}return J.headers=_c.from(J.headers),J},function(J){if(!SQ(J)){if(a9(c),J&&J.response){c.response=J.response;try{J.response.data=_Q.call(c,c.transformResponse,J.response)}finally{delete c.response}J.response.headers=_c.from(J.response.headers)}}return Promise.reject(J)})}var Sx=g(()=>{oz();lJ();h8();P0();k9()});function P4(c,$,Q){if(typeof c!=="object")throw new O("options must be an object",O.ERR_BAD_OPTION_VALUE);let J=Object.keys(c),Y=J.length;while(Y-- >0){let X=J[Y],W=Object.prototype.hasOwnProperty.call($,X)?$[X]:void 0;if(W){let m=c[X],G=m===void 0||W(m,X,c);if(G!==!0)throw new O("option "+X+" must be "+G,O.ERR_BAD_OPTION_VALUE);continue}if(Q!==!0)throw new O("Unknown option "+X,O.ERR_BAD_OPTION)}}var mY,Ax,hQ;var Cx=g(()=>{X0();mY={};["object","boolean","number","function","string","symbol"].forEach((c,$)=>{mY[c]=function(J){return typeof J===c||"a"+($<1?"n ":" ")+c}});Ax={};mY.transitional=function($,Q,J){function Y(X,W){return"[Axios v"+$8+"] Transitional option '"+X+"'"+W+(J?". "+J:"")}return(X,W,m)=>{if($===!1)throw new O(Y(W," has been removed"+(Q?" in "+Q:"")),O.ERR_DEPRECATED);if(Q&&!Ax[W])Ax[W]=!0,console.warn(Y(W," has been deprecated since v"+Q+" and will be removed in the near future"));return $?$(X,W,m):!0}};mY.spelling=function($){return(Q,J)=>{return console.warn(`${J} is likely a misspelling of ${$}`),!0}};hQ={assertOptions:P4,validators:mY}});class yQ{constructor(c){this.defaults=c||{},this.interceptors={request:new eX,response:new eX}}async request(c,$){try{return await this._request(c,$)}catch(Q){if(Q instanceof Error){let J={};Error.captureStackTrace?Error.captureStackTrace(J):J=Error();let Y=(()=>{if(!J.stack)return"";let X=J.stack.indexOf(`
|
|
25
25
|
`);return X===-1?"":J.stack.slice(X+1)})();try{if(!Q.stack)Q.stack=Y;else if(Y){let X=Y.indexOf(`
|
|
26
26
|
`),W=X===-1?-1:Y.indexOf(`
|
|
27
27
|
`,X+1),m=W===-1?"":Y.slice(W+1);if(!String(Q.stack).endsWith(m))Q.stack+=`
|
|
28
|
-
`+Y}}catch(X){}}throw Q}}_request(c,$){if(typeof c==="string")$=$||{},$.url=c;else $=c||{};$=T0(this.defaults,$);let{transitional:Q,paramsSerializer:J,headers:Y}=$;if(Q!==void 0)hQ.assertOptions(Q,{silentJSONParsing:tc.transitional(tc.boolean),forcedJSONParsing:tc.transitional(tc.boolean),clarifyTimeoutError:tc.transitional(tc.boolean),legacyInterceptorReqResOrdering:tc.transitional(tc.boolean),advertiseZstdAcceptEncoding:tc.transitional(tc.boolean),validateStatusUndefinedResolves:tc.transitional(tc.boolean)},!1);if(J!=null)if(V.isFunction(J))$.paramsSerializer={serialize:J};else hQ.assertOptions(J,{encode:tc.function,serialize:tc.function},!0);if($.allowAbsoluteUrls!==void 0);else if(this.defaults.allowAbsoluteUrls!==void 0)$.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls;else $.allowAbsoluteUrls=!0;hQ.assertOptions($,{baseUrl:tc.spelling("baseURL"),withXsrfToken:tc.spelling("withXSRFToken")},!0),$.method=($.method||this.defaults.method||"get").toLowerCase();let X=Y&&V.merge(Y.common,Y[$.method]);Y&&V.forEach(["delete","get","head","post","put","patch","query","common"],(N)=>{delete Y[N]}),$.headers=_c.concat(X,Y);let W=[],m=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen==="function"&&w.runWhen($)===!1)return;m=m&&w.synchronous;let U=$.transitional||D8;if(U&&U.legacyInterceptorReqResOrdering)W.unshift(w.fulfilled,w.rejected);else W.push(w.fulfilled,w.rejected)});let G=[];this.interceptors.response.forEach(function(w){G.push(w.fulfilled,w.rejected)});let z,x=0,q;if(!m){let N=[WY.bind(this),void 0];N.unshift(...W),N.push(...G),q=N.length,z=Promise.resolve($);while(x<q)z=z.then(N[x++],N[x++]);return z}q=W.length;let M=$;while(x<q){let N=W[x++],w=W[x++];try{M=N(M)}catch(U){w.call(this,U);break}}try{z=WY.call(this,M)}catch(N){return Promise.reject(N)}x=0,q=G.length;while(x<q)z=z.then(G[x++],G[x++]);return z}getUri(c){c=T0(this.defaults,c);let $=y8(c.baseURL,c.url,c.allowAbsoluteUrls,c);return l8($,c.params,c.paramsSerializer)}}var tc,oQ;var
|
|
29
|
-
`,{mode:384}),await gQ.chmod(c,384).catch(()=>{})}async function
|
|
30
|
-
`,{mode:384})}function dx(c,$){return typeof c.checkedAt==="number"&&$-c.checkedAt<A4}async function e9(c){let $=new AbortController,Q=setTimeout(()=>$.abort(),c);try{let J=await fetch("https://registry.npmjs.org/figura-cli/latest",{signal:$.signal,headers:{accept:"application/vnd.npm.install-v1+json"}});if(!J.ok)return null;let Y=await J.json();return typeof Y.version==="string"?Y.version:null}catch{return null}finally{clearTimeout(Q)}}var ox,A4=86400000,C4=604800000,gx=21600000;var rQ=d(()=>{i0();ox=S4(F$,"update-check.json")});function P4(c,$=[]){for(let Q=0;Q<c.length;Q++){if(c[Q].startsWith("-"))continue;if(Q>0&&$.includes(c[Q-1]))continue;return{before:c.slice(0,Q),script:c[Q],after:c.slice(Q+1)}}return{before:c,script:void 0,after:[]}}function cW(c,$,Q=[]){return(J)=>{let{before:Y,script:X,after:W}=P4(J,Q);if(X===void 0)return[c,$,...Y];if(W.length>0)return[c,$,...Y,X,"--",...W];return[c,$,...Y,X]}}function tx(c){return{agent:[c,0],run:[c,"run",0],install:[c,"i",0],frozen:[c,"i","--frozen-lockfile",0],global:[c,"add","-g",0],add:[c,"add",0],upgrade:[c,"update",0],"upgrade-interactive":[c,"update","-i",0],dedupe:[c,"dedupe",0],execute:[c,"dlx",0],"execute-local":[c,"exec",0],uninstall:[c,"remove",0],global_uninstall:[c,"remove","--global",0]}}function ex(c,$,Q){let J=$W[c][$];return QW(J,Q)}function QW(c,$){if(c==null)return null;let Q=typeof c==="function"?c($):c.flatMap((J)=>{if(typeof J==="number")return $;return[J]});return{command:Q[0],args:Q.slice(1)}}var E4,rx,b4,sx,F4,T4,f4,n4,u4,$W;var c6=d(()=>{E4={agent:["npm",0],run:cW("npm","run",["-w","--workspace"]),install:["npm","i",0],frozen:["npm","ci",0],global:["npm","i","-g",0],add:["npm","i",0],upgrade:["npm","update",0],"upgrade-interactive":null,dedupe:["npm","dedupe",0],execute:["npx",0],"execute-local":["npx",0],uninstall:["npm","uninstall",0],global_uninstall:["npm","uninstall","-g",0]},rx={agent:["yarn",0],run:["yarn","run",0],install:["yarn","install",0],frozen:["yarn","install","--frozen-lockfile",0],global:["yarn","global","add",0],add:["yarn","add",0],upgrade:["yarn","upgrade",0],"upgrade-interactive":["yarn","upgrade-interactive",0],dedupe:null,execute:["npx",0],"execute-local":cW("yarn","exec"),uninstall:["yarn","remove",0],global_uninstall:["yarn","global","remove",0]},b4={...rx,frozen:["yarn","install","--immutable",0],upgrade:["yarn","up",0],"upgrade-interactive":["yarn","up","-i",0],dedupe:["yarn","dedupe",0],execute:["yarn","dlx",0],"execute-local":["yarn","exec",0],global:["npm","i","-g",0],global_uninstall:["npm","uninstall","-g",0]};sx=tx("pnpm"),F4=tx("rush-pnpm"),T4={agent:["bun",0],run:["bun","run",0],install:["bun","install",0],frozen:["bun","install","--frozen-lockfile",0],global:["bun","add","-g",0],add:["bun","add",0],upgrade:["bun","update",0],"upgrade-interactive":["bun","update","-i",0],dedupe:null,execute:["bun","x",0],"execute-local":["bun","x",0],uninstall:["bun","remove",0],global_uninstall:["bun","remove","-g",0]},f4={agent:["aube",0],run:["aube","run",0],install:["aube","install",0],frozen:["aube","install","--frozen-lockfile",0],global:["aube","add","-g",0],add:["aube","add",0],upgrade:["aube","update",0],"upgrade-interactive":["aube","update","-i",0],dedupe:["aube","dedupe",0],execute:["aube","dlx",0],"execute-local":["aube","exec",0],uninstall:["aube","remove",0],global_uninstall:["aube","remove","-g",0]},n4={agent:["deno",0],run:["deno","task",0],install:["deno","install",0],frozen:["deno","install","--frozen",0],global:["deno","install","-g",0],add:["deno","add",0],upgrade:["deno","outdated","--update",0],"upgrade-interactive":["deno","outdated","--update",0],dedupe:null,execute:["deno","x",0],"execute-local":["deno","task","--eval",0],uninstall:["deno","remove",0],global_uninstall:["deno","uninstall","-g",0]},u4={agent:["nub",0],run:["nub","run",0],install:["nub","install",0],frozen:["nub","install","--frozen-lockfile",0],global:["nub","add","-g",0],add:["nub","add",0],upgrade:["nub","update",0],"upgrade-interactive":["nub","update","-i",0],dedupe:["nub","dedupe",0],execute:["nubx",0],"execute-local":["nub","exec",0],uninstall:["nub","remove",0],global_uninstall:["nub","remove","-g",0]},$W={npm:E4,yarn:rx,"yarn@berry":b4,pnpm:sx,"pnpm@6":{...sx,run:cW("pnpm","run",["-F","--filter"])},"pnpm-rush":F4,bun:T4,aube:f4,deno:n4,nub:u4}});var tQ,eQ,cJ,$6;var JW=d(()=>{tQ=["npm","yarn","yarn@berry","pnpm","pnpm@6","pnpm-rush","bun","deno","nub","aube"],eQ={"aube-lock.yaml":"aube","aube-workspace.yaml":"aube","bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","nub.lock":"nub","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},cJ={"node_modules/.aube/":"aube","node_modules/.deno/":"deno","node_modules/.pnpm/":"pnpm","node_modules/.yarn-state.yml":"yarn","node_modules/.yarn_integrity":"yarn","node_modules/.package-lock.json":"npm",".pnp.cjs":"yarn",".pnp.js":"yarn","bun.lock":"bun","bun.lockb":"bun"},$6={aube:"https://aube.en.dev/installation",bun:"https://bun.sh",deno:"https://deno.com",pnpm:"https://pnpm.io/installation","pnpm@6":"https://pnpm.io/6.x/installation","pnpm-rush":"https://rushjs.io/pages/intro/get_started/",yarn:"https://classic.yarnpkg.com/en/docs/install","yarn@berry":"https://yarnpkg.com/getting-started/install",npm:"https://docs.npmjs.com/cli/configuring-npm/install",nub:"https://nubjs.com/docs/install"}});import J6 from"node:fs/promises";import J8 from"node:path";import Y6 from"node:process";async function xY(c,$){try{let Q=await J6.stat(c);return $==="file"?Q.isFile():Q.isDirectory()}catch{return!1}}function X6(){let c=Y6.env.npm_config_user_agent;if(!c)return null;let $=c.split("/")[0];return tQ.includes($)?$:null}function*k4(c=Y6.cwd()){let $=J8.resolve(c),{root:Q}=J8.parse($);while($&&$!==Q)yield $,$=J8.dirname($)}async function Q6(c,$){if(!c||!await xY(c,"file"))return null;return await l4(c,$)}async function W6(c={}){let{cwd:$,strategies:Q=["lockfile","packageManager-field","devEngines-field"]}=c,J;if(typeof c.stopDir==="string"){let Y=J8.resolve(c.stopDir);J=(X)=>X===Y}else J=c.stopDir;for(let Y of k4($)){for(let X of Q)switch(X){case"lockfile":{if(await xY(J8.join(Y,"rush.json"),"file"))return{name:"pnpm",agent:"pnpm-rush"};for(let W of Object.keys(eQ))if(await xY(J8.join(Y,W),"file")){let m=eQ[W],G=await Q6(J8.join(Y,"package.json"),c);if(G)return G;else return{name:m,agent:m}}break}case"packageManager-field":case"devEngines-field":{let W=await Q6(J8.join(Y,"package.json"),c);if(W)return W;break}case"install-metadata":{for(let W of Object.keys(cJ)){let m=W.endsWith("/")?"dir":"file";if(await xY(J8.join(Y,W),m)){let G=cJ[W],z=G==="yarn"?h4(W)?"yarn":"yarn@berry":G;return{name:G,agent:z}}}break}}if(J?.(Y))break}return null}function a4(c){let $=(Q)=>Q?.match(/\d+(\.\d+){0,2}/)?.[0]??Q;if(typeof c.packageManager==="string"){let[Q,J]=c.packageManager.replace(/^\^/,"").split("@");return{name:Q,ver:$(J)}}if(typeof c.devEngines?.packageManager?.name==="string")return{name:c.devEngines.packageManager.name,ver:$(c.devEngines.packageManager.version)};return}async function l4(c,$){try{let Q=await J6.readFile(c,"utf8"),J=$.packageJsonParser?await $.packageJsonParser(Q,c):JSON.parse(Q),Y,X=a4(J);if(X){let{name:W,ver:m}=X,G=m;if(W==="yarn"&&m&&Number.parseInt(m)>1)return Y="yarn@berry",G="berry",{name:W,agent:Y,version:G};else if(W==="pnpm"&&m&&Number.parseInt(m)<7)return Y="pnpm@6",{name:W,agent:Y,version:G};else if(tQ.includes(W))return Y=W,{name:W,agent:Y,version:G};else return $.onUnknown?.(J.packageManager)??null}}catch{}return null}function h4(c){return c.endsWith(".yarn_integrity")}var m6=d(()=>{JW()});var G6={};vQ(G6,{resolveCommand:()=>ex,getUserAgent:()=>X6,detect:()=>W6,constructCommand:()=>QW,LOCKS:()=>eQ,INSTALL_PAGE:()=>$6,INSTALL_METADATA:()=>cJ,COMMANDS:()=>$W,AGENTS:()=>tQ});var z6=d(()=>{c6();JW();m6()});import{existsSync as y4}from"node:fs";import{delimiter as o4,join as g4}from"node:path";import{fileURLToPath as d4}from"node:url";function s4(c){if(!c.isTTY)return"stdout-not-tty";if(c.json)return"json";if(c.env.CI)return"ci";if(c.env.FIGURA_NO_UPDATE_NOTIFIER==="1"||c.env.NO_UPDATE_NOTIFIER==="1")return"opt-out";return null}function r4(c){let $=c.replace(/\\/g,"/");if($.includes("/.bun/"))return"bun";if($.includes("/pnpm/")||$.includes("/.pnpm/"))return"pnpm";if($.includes("/.volta/"))return"volta";if($.includes("/node_modules/"))return"npm";return null}function t4(c=process.env,$=y4){let Q=(c.PATH??"").split(o4).filter(Boolean),J=process.platform==="win32"?["npm.cmd","npm.exe","npm"]:["npm"];return Q.some((Y)=>J.some((X)=>$(g4(Y,X))))}async function qY(c,$="latest",Q,J,Y=d4(import.meta.url)){let X=await Promise.resolve().then(() => (z6(),G6)),W=(x)=>{let q=X.resolveCommand(x,"global",[`${c}@${$}`]);return q?{command:`${q.command} ${q.args.join(" ")}`,generic:!1}:null},m=Q!==void 0?Q:X.getUserAgent()??null;if(m){let x=W(m);if(x)return x}let G=r4(Y);if(G==="volta")return{command:`volta install ${c}@${$}`,generic:!1};if(G){let x=W(G);if(x)return x}let z=J??t4();return{command:`npm i -g ${c}@${$}`,generic:!z}}function q6(c){return c.generic?`Update with your package manager's global install, e.g. ${c.command}`:`Run: ${c.command}`}function e4(c,$,Q){return`⚠ figura ${c} → ${$} available. ${Q}`}function cj(c,$,Q){return`⚠ figura ${c} is below the minimum supported ${$} — `+`some commands may fail. ${Q}`}function $j(c,$,Q){let J=c.latest,Y=dQ(c,$,Q).latest;if(J&&Y)return O0(Y,J)?Y:J;return J??Y}function M6(c){let $=c("x-figura-min-cli")?.trim(),Q=c("x-figura-latest-cli")?.trim();return{min:$||void 0,latest:Q||void 0}}function Qj(c,$,Q,J){if(!Q.min&&!Q.latest)return null;let Y={...c.serverAdvice??{}},X=Y[$]??{},W={...X},m=!1,G=(z)=>typeof z!=="number"||J-z>=gx;if(Q.min&&(X.min!==Q.min||G(X.minAt)))W.min=Q.min,W.minAt=J,m=!0;if(Q.latest&&(X.latest!==Q.latest||G(X.latestAt)))W.latest=Q.latest,W.latestAt=J,m=!0;if(!m)return null;return Y[$]=W,{...c,serverAdvice:Y}}async function N6(c,$,Q=Date.now()){try{if(!$.min&&!$.latest)return;let J=Qj(await H8(),c,$,Q);if(J)await sQ(J)}catch{}}function Jj(c){return c.FIGURA_NO_UPDATE_NOTIFIER==="1"||c.NO_UPDATE_NOTIFIER==="1"}function Yj(c){return c.some(($)=>$==="--json"||$.startsWith("--json="))}async function V6(c,$,Q=Date.now()){try{if(Jj(process.env))return;let J=await H8(),Y=f0(),X=n$($),W=dQ(J,X,Q);if(W.min&&O0(W.min,Y)){let z=q6(await qY(x6));process.stderr.write(cj(Y,W.min,z)+`
|
|
31
|
-
`);return}if(
|
|
32
|
-
`)}catch{}}var
|
|
33
|
-
`);let Y=
|
|
28
|
+
`+Y}}catch(X){}}throw Q}}_request(c,$){if(typeof c==="string")$=$||{},$.url=c;else $=c||{};$=T0(this.defaults,$);let{transitional:Q,paramsSerializer:J,headers:Y}=$;if(Q!==void 0)hQ.assertOptions(Q,{silentJSONParsing:tc.transitional(tc.boolean),forcedJSONParsing:tc.transitional(tc.boolean),clarifyTimeoutError:tc.transitional(tc.boolean),legacyInterceptorReqResOrdering:tc.transitional(tc.boolean),advertiseZstdAcceptEncoding:tc.transitional(tc.boolean),validateStatusUndefinedResolves:tc.transitional(tc.boolean)},!1);if(J!=null)if(V.isFunction(J))$.paramsSerializer={serialize:J};else hQ.assertOptions(J,{encode:tc.function,serialize:tc.function},!0);if($.allowAbsoluteUrls!==void 0);else if(this.defaults.allowAbsoluteUrls!==void 0)$.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls;else $.allowAbsoluteUrls=!0;hQ.assertOptions($,{baseUrl:tc.spelling("baseURL"),withXsrfToken:tc.spelling("withXSRFToken")},!0),$.method=($.method||this.defaults.method||"get").toLowerCase();let X=Y&&V.merge(Y.common,Y[$.method]);Y&&V.forEach(["delete","get","head","post","put","patch","query","common"],(N)=>{delete Y[N]}),$.headers=_c.concat(X,Y);let W=[],m=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen==="function"&&w.runWhen($)===!1)return;m=m&&w.synchronous;let U=$.transitional||D8;if(U&&U.legacyInterceptorReqResOrdering)W.unshift(w.fulfilled,w.rejected);else W.push(w.fulfilled,w.rejected)});let G=[];this.interceptors.response.forEach(function(w){G.push(w.fulfilled,w.rejected)});let z,x=0,q;if(!m){let N=[WY.bind(this),void 0];N.unshift(...W),N.push(...G),q=N.length,z=Promise.resolve($);while(x<q)z=z.then(N[x++],N[x++]);return z}q=W.length;let M=$;while(x<q){let N=W[x++],w=W[x++];try{M=N(M)}catch(U){w.call(this,U);break}}try{z=WY.call(this,M)}catch(N){return Promise.reject(N)}x=0,q=G.length;while(x<q)z=z.then(G[x++],G[x++]);return z}getUri(c){c=T0(this.defaults,c);let $=y8(c.baseURL,c.url,c.allowAbsoluteUrls,c);return l8($,c.params,c.paramsSerializer)}}var tc,oQ;var Px=g(()=>{Lc();kJ();bz();Sx();QY();yJ();Cx();P0();LQ();tc=hQ.validators;V.forEach(["delete","get","head","options"],function($){yQ.prototype[$]=function(Q,J){return this.request(T0(J||{},{method:$,url:Q,data:J&&V.hasOwnProp(J,"data")?J.data:void 0}))}});V.forEach(["post","put","patch","query"],function($){function Q(J){return function(X,W,m){return this.request(T0(m||{},{method:$,headers:J?{"Content-Type":"multipart/form-data"}:{},url:X,data:W}))}}if(yQ.prototype[$]=Q(),$!=="query")yQ.prototype[$+"Form"]=Q(!0)});oQ=yQ});class l9{constructor(c){if(typeof c!=="function")throw TypeError("executor must be a function.");let $;this.promise=new Promise(function(Y){$=Y});let Q=this;this.promise.then((J)=>{if(!Q._listeners)return;let Y=Q._listeners.length;while(Y-- >0)Q._listeners[Y](J);Q._listeners=null}),this.promise.then=(J)=>{let Y,X=new Promise((W)=>{Q.subscribe(W),Y=W}).then(J);return X.cancel=function(){Q.unsubscribe(Y)},X},c(function(Y,X,W){if(Q.reason)return;Q.reason=new w0(Y,X,W),$(Q.reason)})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(c){if(this.reason){c(this.reason);return}if(this._listeners)this._listeners.push(c);else this._listeners=[c]}unsubscribe(c){if(!this._listeners)return;let $=this._listeners.indexOf(c);if($!==-1)this._listeners.splice($,1)}toAbortSignal(){let c=new AbortController,$=(Q)=>{c.abort(Q)};return this.subscribe($),c.signal.unsubscribe=()=>this.unsubscribe($),c.signal}static source(){let c;return{token:new l9(function(J){c=J}),cancel:c}}}var Ex;var bx=g(()=>{h8();Ex=l9});function h9(c){return function(Q){return c.apply(null,Q)}}function y9(c){return V.isObject(c)&&c.isAxiosError===!0}var Fx=g(()=>{Lc()});var o9,Tx;var fx=g(()=>{o9={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(o9).forEach(([c,$])=>{o9[$]=c});Tx=o9});function nx(c){let $=new oQ(c),Q=UQ(oQ.prototype.request,$);return V.extend(Q,oQ.prototype,$,{allOwnKeys:!0}),V.extend(Q,$,null,{allOwnKeys:!0}),Q.create=function(Y){return nx(T0(c,Y))},Q}var fc,GY;var ux=g(()=>{Lc();Px();QY();lJ();X9();h8();bx();I$();X0();Fx();P0();k9();fx();fc=nx(_$);fc.Axios=oQ;fc.CanceledError=w0;fc.CancelToken=Ex;fc.isCancel=SQ;fc.VERSION=$8;fc.toFormData=K8;fc.AxiosError=O;fc.Cancel=fc.CanceledError;fc.all=function($){return Promise.all($)};fc.spread=h9;fc.isAxiosError=y9;fc.mergeConfig=T0;fc.AxiosHeaders=_c;fc.formToJSON=(c)=>aJ(V.isHTMLForm(c)?new FormData(c):c);fc.getAdapter=XY.getAdapter;fc.HttpStatusCode=Tx;fc.default=fc;GY=fc});var kx=g(()=>{ux()});import{readFileSync as E4}from"node:fs";function f0(){try{let c=JSON.parse(E4(new URL("../package.json",import.meta.url),"utf8"));return typeof c.version==="string"?c.version:"0.0.0"}catch{return"0.0.0"}}function R0(c,$){let Q=(X)=>{let W=/^\D*(\d+)\.(\d+)\.(\d+)/.exec(X.trim());return W?[Number(W[1]),Number(W[2]),Number(W[3])]:null},J=Q(c),Y=Q($);if(!J||!Y)return!1;for(let X=0;X<3;X++){if(J[X]>Y[X])return!0;if(J[X]<Y[X])return!1}return!1}var F$=()=>{};import{promises as gQ}from"node:fs";import{homedir as ax}from"node:os";import{dirname as lx,join as T$}from"node:path";async function d9(c){try{let $=await gQ.readFile(c,"utf8"),Q=JSON.parse($);if(Q&&typeof Q==="object")return Q;return{}}catch{return{}}}async function hx(){return d9(i0)}async function zY(c=process.cwd()){let $=ax(),Q=c;for(;;){if(Q!==$){let Y=T$(Q,c$);try{return await gQ.access(Y),Y}catch{}}let J=lx(Q);if(J===Q)return null;Q=J}}async function yx(c,$){await gQ.mkdir(lx(c),{recursive:!0,mode:448}),await gQ.writeFile(c,JSON.stringify($,null,2)+`
|
|
29
|
+
`,{mode:384}),await gQ.chmod(c,384).catch(()=>{})}async function ox(c){await yx(i0,c)}async function gx(c,$=process.cwd()){let Q=T$($,c$);return await yx(Q,c),Q}function dx(c,$){if(c!=="global")return"ok";if($.mutate&&!$.allowGlobal)return"refuse";return"warn"}var e8,i0,g9,c$;var s9=g(()=>{e8=T$(ax(),".figura"),i0=T$(e8,"config.json"),g9=T$(e8,"figs"),c$=T$(".figura","config.json")});var sx={};vQ(sx,{writeProjectConfig:()=>e9,writeConfig:()=>t9,resolveFigsDir:()=>r9,resolveConfig:()=>W0,readConfig:()=>xY,findProjectConfigPath:()=>zY,PROJECT_CONFIG_REL:()=>c$,FIGS_DIR:()=>g9,CONFIG_PATH:()=>i0,CONFIG_DIR:()=>e8});import{dirname as b4,join as F4}from"node:path";async function xY(){return hx()}async function r9(c=process.cwd()){let $=await zY(c);if($)return F4(b4($),"figs");return g9}async function t9(c){await ox(c)}async function e9(c,$=process.cwd()){return gx(c,$)}async function W0(c={}){let $=await xY(),Q=await zY(c.cwd),J=Q?await d9(Q):{},Y={...$,...J},X=process.env.FIGURA_TOKEN||c.tokenFlag||Y.token||void 0,W=process.env.FIGURA_TOKEN?"env":c.tokenFlag?"flag":J.token?"project":$.token?"global":"none",m=process.env.FIGURA_API_URL||c.apiUrlFlag||Y.apiUrl||f$;return{token:X,apiUrl:m,team:Y.team,config:Y,tokenSource:W,projectConfigPath:Q}}var v0=g(()=>{s9();U0()});import{promises as cW}from"node:fs";import{join as T4}from"node:path";function n$(c){try{let $=new URL(c);return`${$.protocol}//${$.host}`.toLowerCase()}catch{return c.trim().toLowerCase().replace(/\/+$/,"")}}function rx(c,$){return typeof c==="number"&&$-c<n4}function dQ(c,$,Q){let J=c.serverAdvice?.[$];if(!J)return{};return{min:rx(J.minAt,Q)?J.min:void 0,latest:rx(J.latestAt,Q)?J.latest:void 0}}async function H8(){try{let c=await cW.readFile(tx,"utf8"),$=JSON.parse(c);return $&&typeof $==="object"?$:{}}catch{return{}}}async function sQ(c){await cW.mkdir(e8,{recursive:!0,mode:448}),await cW.writeFile(tx,JSON.stringify(c,null,2)+`
|
|
30
|
+
`,{mode:384})}function c6(c,$){return typeof c.checkedAt==="number"&&$-c.checkedAt<f4}async function $W(c){let $=new AbortController,Q=setTimeout(()=>$.abort(),c);try{let J=await fetch("https://registry.npmjs.org/figura-cli/latest",{signal:$.signal,headers:{accept:"application/vnd.npm.install-v1+json"}});if(!J.ok)return null;let Y=await J.json();return typeof Y.version==="string"?Y.version:null}catch{return null}finally{clearTimeout(Q)}}var tx,f4=86400000,n4=604800000,ex=21600000;var rQ=g(()=>{v0();tx=T4(e8,"update-check.json")});function u4(c,$=[]){for(let Q=0;Q<c.length;Q++){if(c[Q].startsWith("-"))continue;if(Q>0&&$.includes(c[Q-1]))continue;return{before:c.slice(0,Q),script:c[Q],after:c.slice(Q+1)}}return{before:c,script:void 0,after:[]}}function QW(c,$,Q=[]){return(J)=>{let{before:Y,script:X,after:W}=u4(J,Q);if(X===void 0)return[c,$,...Y];if(W.length>0)return[c,$,...Y,X,"--",...W];return[c,$,...Y,X]}}function J6(c){return{agent:[c,0],run:[c,"run",0],install:[c,"i",0],frozen:[c,"i","--frozen-lockfile",0],global:[c,"add","-g",0],add:[c,"add",0],upgrade:[c,"update",0],"upgrade-interactive":[c,"update","-i",0],dedupe:[c,"dedupe",0],execute:[c,"dlx",0],"execute-local":[c,"exec",0],uninstall:[c,"remove",0],global_uninstall:[c,"remove","--global",0]}}function Y6(c,$,Q){let J=JW[c][$];return YW(J,Q)}function YW(c,$){if(c==null)return null;let Q=typeof c==="function"?c($):c.flatMap((J)=>{if(typeof J==="number")return $;return[J]});return{command:Q[0],args:Q.slice(1)}}var k4,Q6,a4,$6,l4,h4,y4,o4,g4,JW;var X6=g(()=>{k4={agent:["npm",0],run:QW("npm","run",["-w","--workspace"]),install:["npm","i",0],frozen:["npm","ci",0],global:["npm","i","-g",0],add:["npm","i",0],upgrade:["npm","update",0],"upgrade-interactive":null,dedupe:["npm","dedupe",0],execute:["npx",0],"execute-local":["npx",0],uninstall:["npm","uninstall",0],global_uninstall:["npm","uninstall","-g",0]},Q6={agent:["yarn",0],run:["yarn","run",0],install:["yarn","install",0],frozen:["yarn","install","--frozen-lockfile",0],global:["yarn","global","add",0],add:["yarn","add",0],upgrade:["yarn","upgrade",0],"upgrade-interactive":["yarn","upgrade-interactive",0],dedupe:null,execute:["npx",0],"execute-local":QW("yarn","exec"),uninstall:["yarn","remove",0],global_uninstall:["yarn","global","remove",0]},a4={...Q6,frozen:["yarn","install","--immutable",0],upgrade:["yarn","up",0],"upgrade-interactive":["yarn","up","-i",0],dedupe:["yarn","dedupe",0],execute:["yarn","dlx",0],"execute-local":["yarn","exec",0],global:["npm","i","-g",0],global_uninstall:["npm","uninstall","-g",0]};$6=J6("pnpm"),l4=J6("rush-pnpm"),h4={agent:["bun",0],run:["bun","run",0],install:["bun","install",0],frozen:["bun","install","--frozen-lockfile",0],global:["bun","add","-g",0],add:["bun","add",0],upgrade:["bun","update",0],"upgrade-interactive":["bun","update","-i",0],dedupe:null,execute:["bun","x",0],"execute-local":["bun","x",0],uninstall:["bun","remove",0],global_uninstall:["bun","remove","-g",0]},y4={agent:["aube",0],run:["aube","run",0],install:["aube","install",0],frozen:["aube","install","--frozen-lockfile",0],global:["aube","add","-g",0],add:["aube","add",0],upgrade:["aube","update",0],"upgrade-interactive":["aube","update","-i",0],dedupe:["aube","dedupe",0],execute:["aube","dlx",0],"execute-local":["aube","exec",0],uninstall:["aube","remove",0],global_uninstall:["aube","remove","-g",0]},o4={agent:["deno",0],run:["deno","task",0],install:["deno","install",0],frozen:["deno","install","--frozen",0],global:["deno","install","-g",0],add:["deno","add",0],upgrade:["deno","outdated","--update",0],"upgrade-interactive":["deno","outdated","--update",0],dedupe:null,execute:["deno","x",0],"execute-local":["deno","task","--eval",0],uninstall:["deno","remove",0],global_uninstall:["deno","uninstall","-g",0]},g4={agent:["nub",0],run:["nub","run",0],install:["nub","install",0],frozen:["nub","install","--frozen-lockfile",0],global:["nub","add","-g",0],add:["nub","add",0],upgrade:["nub","update",0],"upgrade-interactive":["nub","update","-i",0],dedupe:["nub","dedupe",0],execute:["nubx",0],"execute-local":["nub","exec",0],uninstall:["nub","remove",0],global_uninstall:["nub","remove","-g",0]},JW={npm:k4,yarn:Q6,"yarn@berry":a4,pnpm:$6,"pnpm@6":{...$6,run:QW("pnpm","run",["-F","--filter"])},"pnpm-rush":l4,bun:h4,aube:y4,deno:o4,nub:g4}});var tQ,eQ,cJ,W6;var XW=g(()=>{tQ=["npm","yarn","yarn@berry","pnpm","pnpm@6","pnpm-rush","bun","deno","nub","aube"],eQ={"aube-lock.yaml":"aube","aube-workspace.yaml":"aube","bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","nub.lock":"nub","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},cJ={"node_modules/.aube/":"aube","node_modules/.deno/":"deno","node_modules/.pnpm/":"pnpm","node_modules/.yarn-state.yml":"yarn","node_modules/.yarn_integrity":"yarn","node_modules/.package-lock.json":"npm",".pnp.cjs":"yarn",".pnp.js":"yarn","bun.lock":"bun","bun.lockb":"bun"},W6={aube:"https://aube.en.dev/installation",bun:"https://bun.sh",deno:"https://deno.com",pnpm:"https://pnpm.io/installation","pnpm@6":"https://pnpm.io/6.x/installation","pnpm-rush":"https://rushjs.io/pages/intro/get_started/",yarn:"https://classic.yarnpkg.com/en/docs/install","yarn@berry":"https://yarnpkg.com/getting-started/install",npm:"https://docs.npmjs.com/cli/configuring-npm/install",nub:"https://nubjs.com/docs/install"}});import G6 from"node:fs/promises";import J8 from"node:path";import z6 from"node:process";async function qY(c,$){try{let Q=await G6.stat(c);return $==="file"?Q.isFile():Q.isDirectory()}catch{return!1}}function x6(){let c=z6.env.npm_config_user_agent;if(!c)return null;let $=c.split("/")[0];return tQ.includes($)?$:null}function*d4(c=z6.cwd()){let $=J8.resolve(c),{root:Q}=J8.parse($);while($&&$!==Q)yield $,$=J8.dirname($)}async function m6(c,$){if(!c||!await qY(c,"file"))return null;return await r4(c,$)}async function q6(c={}){let{cwd:$,strategies:Q=["lockfile","packageManager-field","devEngines-field"]}=c,J;if(typeof c.stopDir==="string"){let Y=J8.resolve(c.stopDir);J=(X)=>X===Y}else J=c.stopDir;for(let Y of d4($)){for(let X of Q)switch(X){case"lockfile":{if(await qY(J8.join(Y,"rush.json"),"file"))return{name:"pnpm",agent:"pnpm-rush"};for(let W of Object.keys(eQ))if(await qY(J8.join(Y,W),"file")){let m=eQ[W],G=await m6(J8.join(Y,"package.json"),c);if(G)return G;else return{name:m,agent:m}}break}case"packageManager-field":case"devEngines-field":{let W=await m6(J8.join(Y,"package.json"),c);if(W)return W;break}case"install-metadata":{for(let W of Object.keys(cJ)){let m=W.endsWith("/")?"dir":"file";if(await qY(J8.join(Y,W),m)){let G=cJ[W],z=G==="yarn"?t4(W)?"yarn":"yarn@berry":G;return{name:G,agent:z}}}break}}if(J?.(Y))break}return null}function s4(c){let $=(Q)=>Q?.match(/\d+(\.\d+){0,2}/)?.[0]??Q;if(typeof c.packageManager==="string"){let[Q,J]=c.packageManager.replace(/^\^/,"").split("@");return{name:Q,ver:$(J)}}if(typeof c.devEngines?.packageManager?.name==="string")return{name:c.devEngines.packageManager.name,ver:$(c.devEngines.packageManager.version)};return}async function r4(c,$){try{let Q=await G6.readFile(c,"utf8"),J=$.packageJsonParser?await $.packageJsonParser(Q,c):JSON.parse(Q),Y,X=s4(J);if(X){let{name:W,ver:m}=X,G=m;if(W==="yarn"&&m&&Number.parseInt(m)>1)return Y="yarn@berry",G="berry",{name:W,agent:Y,version:G};else if(W==="pnpm"&&m&&Number.parseInt(m)<7)return Y="pnpm@6",{name:W,agent:Y,version:G};else if(tQ.includes(W))return Y=W,{name:W,agent:Y,version:G};else return $.onUnknown?.(J.packageManager)??null}}catch{}return null}function t4(c){return c.endsWith(".yarn_integrity")}var M6=g(()=>{XW()});var N6={};vQ(N6,{resolveCommand:()=>Y6,getUserAgent:()=>x6,detect:()=>q6,constructCommand:()=>YW,LOCKS:()=>eQ,INSTALL_PAGE:()=>W6,INSTALL_METADATA:()=>cJ,COMMANDS:()=>JW,AGENTS:()=>tQ});var V6=g(()=>{X6();XW();M6()});import{existsSync as e4}from"node:fs";import{delimiter as cj,join as $j}from"node:path";import{fileURLToPath as Qj}from"node:url";function Jj(c){if(!c.isTTY)return"stdout-not-tty";if(c.json)return"json";if(c.env.CI)return"ci";if(c.env.FIGURA_NO_UPDATE_NOTIFIER==="1"||c.env.NO_UPDATE_NOTIFIER==="1")return"opt-out";return null}function Yj(c){let $=c.replace(/\\/g,"/");if($.includes("/.bun/"))return"bun";if($.includes("/pnpm/")||$.includes("/.pnpm/"))return"pnpm";if($.includes("/.volta/"))return"volta";if($.includes("/node_modules/"))return"npm";return null}function Xj(c=process.env,$=e4){let Q=(c.PATH??"").split(cj).filter(Boolean),J=process.platform==="win32"?["npm.cmd","npm.exe","npm"]:["npm"];return Q.some((Y)=>J.some((X)=>$($j(Y,X))))}async function MY(c,$="latest",Q,J,Y=Qj(import.meta.url)){let X=await Promise.resolve().then(() => (V6(),N6)),W=(x)=>{let q=X.resolveCommand(x,"global",[`${c}@${$}`]);return q?{command:`${q.command} ${q.args.join(" ")}`,generic:!1}:null},m=Q!==void 0?Q:X.getUserAgent()??null;if(m){let x=W(m);if(x)return x}let G=Yj(Y);if(G==="volta")return{command:`volta install ${c}@${$}`,generic:!1};if(G){let x=W(G);if(x)return x}let z=J??Xj();return{command:`npm i -g ${c}@${$}`,generic:!z}}function i6(c){return c.generic?`Update with your package manager's global install, e.g. ${c.command}`:`Run: ${c.command}`}function Wj(c,$,Q){return`⚠ figura ${c} → ${$} available. ${Q}`}function mj(c,$,Q){return`⚠ figura ${c} is below the minimum supported ${$} — `+`some commands may fail. ${Q}`}function Gj(c,$,Q){let J=c.latest,Y=dQ(c,$,Q).latest;if(J&&Y)return R0(Y,J)?Y:J;return J??Y}function v6(c){let $=c("x-figura-min-cli")?.trim(),Q=c("x-figura-latest-cli")?.trim();return{min:$||void 0,latest:Q||void 0}}function zj(c,$,Q,J){if(!Q.min&&!Q.latest)return null;let Y={...c.serverAdvice??{}},X=Y[$]??{},W={...X},m=!1,G=(z)=>typeof z!=="number"||J-z>=ex;if(Q.min&&(X.min!==Q.min||G(X.minAt)))W.min=Q.min,W.minAt=J,m=!0;if(Q.latest&&(X.latest!==Q.latest||G(X.latestAt)))W.latest=Q.latest,W.latestAt=J,m=!0;if(!m)return null;return Y[$]=W,{...c,serverAdvice:Y}}async function U6(c,$,Q=Date.now()){try{if(!$.min&&!$.latest)return;let J=zj(await H8(),c,$,Q);if(J)await sQ(J)}catch{}}function xj(c){return c.FIGURA_NO_UPDATE_NOTIFIER==="1"||c.NO_UPDATE_NOTIFIER==="1"}function qj(c){return c.some(($)=>$==="--json"||$.startsWith("--json="))}async function j6(c,$,Q=Date.now()){try{if(xj(process.env))return;let J=await H8(),Y=f0(),X=n$($),W=dQ(J,X,Q);if(W.min&&R0(W.min,Y)){let z=i6(await MY(w6));process.stderr.write(mj(Y,W.min,z)+`
|
|
31
|
+
`);return}if(Jj({isTTY:Boolean(process.stdout.isTTY),json:qj(c),env:process.env}))return;let m=Gj(J,X,Q);if(!m||!R0(m,Y))return;let G=i6(await MY(w6));process.stderr.write(Wj(Y,m,G)+`
|
|
32
|
+
`)}catch{}}var w6="figura-cli";var NY=g(()=>{F$();rQ()});function K6(c,$){if(!$)return;let Q=(J)=>{let Y=$[J];return typeof Y==="string"?Y:void 0};U6(n$(c),v6(Q))}async function Wc(c,$={}){let Q=($.apiUrl||f$).replace(/\/+$/,""),J=c.startsWith("http")?c:`${Q}${c.startsWith("/")?"":"/"}${c}`,Y={Accept:"application/json",...$.headers??{}};if($.token)Y.Authorization=`Bearer ${$.token}`;if($.source)Y["X-Figura-Source"]=$.source;let X;if($.body!==void 0)Y["Content-Type"]="application/json",X=JSON.stringify($.body);let W;try{W=await GY.request({url:J,method:$.method??"GET",headers:Y,data:X,signal:$.signal,validateStatus:()=>!0,transformRequest:[(z)=>z],transformResponse:[(z)=>z]})}catch(z){let x=z instanceof Error?z.message:String(z);throw new Y8(0,`network error: ${x}`)}K6(Q,W.headers);let m=typeof W.data==="string"?W.data:"",G=void 0;if(m)try{G=JSON.parse(m)}catch{G=m}if(W.status<200||W.status>=300){let z=G&&typeof G==="object"&&G!==null&&"error"in G?String(G.error):typeof G==="string"&&G?G:W.statusText||`HTTP ${W.status}`;throw new Y8(W.status,z,G)}return G}async function VY(c,$={}){let Q=($.apiUrl||f$).replace(/\/+$/,""),J=c.startsWith("http")?c:`${Q}${c.startsWith("/")?"":"/"}${c}`,Y={...$.headers??{}};if($.token)Y.Authorization=`Bearer ${$.token}`;if($.source)Y["X-Figura-Source"]=$.source;let X;try{X=await GY.request({url:J,method:$.method??"GET",headers:Y,signal:$.signal,responseType:"text",validateStatus:()=>!0,transformResponse:[(m)=>m]})}catch(m){let G=m instanceof Error?m.message:String(m);throw new Y8(0,`network error: ${G}`)}K6(Q,X.headers);let W=typeof X.data==="string"?X.data:String(X.data??"");if(X.status<200||X.status>=300){let m=X.statusText||`HTTP ${X.status}`;try{let G=JSON.parse(W);if(G&&typeof G==="object"&&"error"in G)m=String(G.error)}catch{}throw new Y8(X.status,m)}return W}var f$="https://api.figura.so",Y8;var U0=g(()=>{kx();NY();rQ();Y8=class Y8 extends Error{status;payload;constructor(c,$,Q){super($);this.name="FiguraApiError",this.status=c,this.payload=Q}}});var zW={};vQ(zW,{verifySkillPayload:()=>_j,materializeSkill:()=>Sj,hashSkillFiles:()=>L6,hashPayload:()=>_6,fetchLatestSkill:()=>vY,SkillPathTraversalError:()=>iY,SkillHashMismatchError:()=>GW});import{createHash as Dj,randomBytes as Bj}from"node:crypto";import{mkdirSync as Hj,renameSync as Oj,rmSync as Z6,writeFileSync as Rj}from"node:fs";import{dirname as pj,isAbsolute as Zj,join as Ij,relative as Lj,resolve as mW,sep as I6}from"node:path";function L6(c){if(c.length===0)return null;let $=[...c].sort((J,Y)=>J.path<Y.path?-1:J.path>Y.path?1:0),Q=Dj("sha256");for(let J of $)Q.update(J.path),Q.update("\x00"),Q.update(J.content,"utf8"),Q.update("\x00");return Q.digest("hex").slice(0,16)}function _6(c){return L6(Object.entries(c.files).map(([$,Q])=>({path:$,content:Q})))}async function vY(c,$={}){let Q=$.signal??($.timeoutMs?AbortSignal.timeout($.timeoutMs):AbortSignal.timeout(4000));try{return await Wc(`/v1/skills/${encodeURIComponent(c)}/latest`,{apiUrl:$.apiUrl,token:$.token,source:"cli",signal:Q})}catch{return null}}function _j(c){let $=_6(c);if($!==c.hash)throw new GW(c.skill,c.hash,$);return c}function Sj(c,$){let Q=mW(c,$.skill),J=$.skill+"/",Y=[];for(let[W,m]of Object.entries($.files)){if(!W.startsWith(J))throw new iY($.skill,W);let G=W.slice(J.length),z=mW(Q,G.split("/").join(I6)),x=Lj(Q,z);if(x===""||x.startsWith("..")||Zj(x))throw new iY($.skill,W);Y.push({relInSkill:G,content:m})}if(Y.length===0)return $.skill;let X=mW(c,`.${$.skill}.tmp-${Bj(6).toString("hex")}`);try{for(let{relInSkill:W,content:m}of Y){let G=Ij(X,W.split("/").join(I6));Hj(pj(G),{recursive:!0}),Rj(G,m)}Z6(Q,{recursive:!0,force:!0}),Oj(X,Q)}finally{Z6(X,{recursive:!0,force:!0})}return $.skill}var GW,iY;var UY=g(()=>{U0();GW=class GW extends Error{skill;served;computed;constructor(c,$,Q){super(`skill '${c}' failed hash verification (served ${$}, computed ${Q??"null"}) — refusing to install`);this.skill=c;this.served=$;this.computed=Q;this.name="SkillHashMismatchError"}};iY=class iY extends Error{skill;badPath;constructor(c,$){super(`skill '${c}' payload carries an unsafe path '${$}' — refusing to install`);this.skill=c;this.badPath=$;this.name="SkillPathTraversalError"}}});U0();v0();import{spawn as GK}from"node:child_process";import{join as zK}from"node:path";U0();v0();s9();import{existsSync as Mj}from"node:fs";import{homedir as Nj}from"node:os";import{dirname as Vj,join as wj,relative as ij}from"node:path";var Gc="cli";function t(c){let $={},Q=[];for(let J=0;J<c.length;J++){let Y=c[J];if(Y.startsWith("--")){let X=Y.slice(2),W=X.indexOf("=");if(W>=0)$[X.slice(0,W)]=X.slice(W+1);else{let m=c[J+1];if(m!==void 0&&!m.startsWith("--"))$[X]=m,J++;else $[X]=!0}}else Q.push(Y)}return{flags:$,positionals:Q}}function f(c,$){let Q=c[$];return typeof Q==="string"?Q:void 0}function k(c,$){return c[$]===!0||c[$]==="true"}function B6(c=process.cwd()){let $=c;for(;;){if(Mj(wj($,".git")))return!0;let Q=Vj($);if(Q===$)return!1;$=Q}}function D6(c){let $=Nj();return c.startsWith($)?"~"+c.slice($.length):c}function vj(c,$=process.cwd()){switch(c.tokenSource){case"env":return"→ auth: env FIGURA_TOKEN (team comes from the token)";case"flag":return"→ auth: --token flag (team comes from the token)";case"project":{let Q=c.projectConfigPath,J=ij($,Q);return`→ team: ${c.team??"(unset)"} — ${J.startsWith("..")?D6(Q):J}`}case"global":return`→ team: ${c.team??"(unset)"} — ${D6(i0)} (GLOBAL fallback)`;case"none":return"→ not logged in"}}async function Kc(c,$={}){let Q=await W0({tokenFlag:f(c,"token"),apiUrlFlag:f(c,"api-url")});if(!Q.token)Z("You're not logged in. Run `figura login` to sign in via your browser.\n For CI or headless use: set FIGURA_TOKEN, or pass --token fig_...");if(!($.announce||$.mutate))return Q;process.stderr.write(vj(Q)+`
|
|
33
|
+
`);let Y=dx(Q.tokenSource,{mutate:$.mutate,allowGlobal:k(c,"allow-global")||process.env.FIGURA_ALLOW_GLOBAL==="1"}),X=Q.team?`'${Q.team}'`:"the global config team";if(Y==="refuse")Z(`this directory isn't linked to a Figura team, so this would land on ${X} — the
|
|
34
34
|
`+` global credential's team, not necessarily this project's. Run \`figura link\` to
|
|
35
|
-
bind it to its own team, or pass --allow-global to use ${X} anyway.`);if(Y==="warn")process.stderr.write(`figura: warning: using the GLOBAL credential (team ${X}) — nothing pins this `+"directory to that team. Run `figura link` to bind it.\n");return Q}function
|
|
35
|
+
bind it to its own team, or pass --allow-global to use ${X} anyway.`);if(Y==="warn")process.stderr.write(`figura: warning: using the GLOBAL credential (team ${X}) — nothing pins this `+"directory to that team. Run `figura link` to bind it.\n");return Q}function Z(c){process.stderr.write(`figura: ${c}
|
|
36
36
|
`),process.exit(1)}function y(c){if(c instanceof Y8)return c.status?`${c.message} (HTTP ${c.status})`:c.message;if(c instanceof Error)return c.message;return String(c)}function ic(c){process.stdout.write(JSON.stringify(c,null,2)+`
|
|
37
|
-
`)}import{promises as
|
|
38
|
-
`),{status:X,path:$}}import{promises as
|
|
37
|
+
`)}import{promises as H6}from"node:fs";import{join as Uj}from"node:path";var $$=".mcp.json",wY={command:"figura",args:["mcp"]};function jj(c){if(!c||typeof c!=="object")return!1;let $=c;return $.command===wY.command&&Array.isArray($.args)&&$.args.length===wY.args.length&&$.args.every((Q,J)=>Q===wY.args[J])}async function O6(c=process.cwd()){let $=Uj(c,$$),Q={},J=!1;try{let m=await H6.readFile($,"utf8");J=!0;let G=JSON.parse(m);if(!G||typeof G!=="object"||Array.isArray(G))return{status:"unparsable",path:$};Q=G}catch(m){if(J)return{status:"unparsable",path:$};if(m.code!=="ENOENT")return{status:"unparsable",path:$}}let Y=Q.mcpServers&&typeof Q.mcpServers==="object"?Q.mcpServers:{};if(jj(Y.figura))return{status:"present",path:$};let X="figura"in Y?"updated":"added",W={...Q,mcpServers:{...Y,figura:{...wY}}};return await H6.writeFile($,JSON.stringify(W,null,2)+`
|
|
38
|
+
`),{status:X,path:$}}import{promises as WW}from"node:fs";import{join as Kj}from"node:path";function R6(c){return c.trim().replace(/^\/+/,"").replace(/\/+$/,"")}async function p6(c,$=process.cwd(),Q){let J=Kj($,".gitignore"),Y=R6(c),X=Q==null?[]:Array.isArray(Q)?Q:[Q],W=X.map((x)=>`# ${x}`).join(`
|
|
39
39
|
`)+(X.length?`
|
|
40
40
|
`:"")+c+`
|
|
41
|
-
`,m=null;try{m=await
|
|
42
|
-
`).map((x)=>x.trim()).filter((x)=>x&&!x.startsWith("#")).some((x)=>
|
|
41
|
+
`,m=null;try{m=await WW.readFile(J,"utf8")}catch{m=null}if(m===null)return await WW.writeFile(J,W),"created";if(m.split(`
|
|
42
|
+
`).map((x)=>x.trim()).filter((x)=>x&&!x.startsWith("#")).some((x)=>R6(x)===Y))return"present";let z="";if(m!==""){if(!m.endsWith(`
|
|
43
43
|
`))z+=`
|
|
44
44
|
`;if(X.length&&!m.endsWith(`
|
|
45
45
|
|
|
46
46
|
`))z+=`
|
|
47
|
-
`}return await
|
|
47
|
+
`}return await WW.writeFile(J,m+z+W),"added"}import{homedir as YK}from"node:os";import{join as g6}from"node:path";import{createHash as Aj}from"node:crypto";import{existsSync as O8,mkdirSync as Cj,readdirSync as Q$,readFileSync as MW,writeFileSync as jY,copyFileSync as Pj,rmSync as xW}from"node:fs";import{homedir as qW}from"node:os";import{fileURLToPath as S6}from"node:url";import{dirname as Ej,join as Zc,relative as bj,sep as Fj}from"node:path";F$();var KY=".figura-version",NW=".figura-skills-hash";function DY(c){try{return MW(Zc(c,KY),"utf8").trim()||null}catch{return null}}function Tj(c,$=OY){let Q=[],J=(X)=>{for(let W of Q$(X,{withFileTypes:!0})){let m=Zc(X,W.name);if(W.isDirectory())J(m);else if(W.isFile())Q.push(m)}};try{for(let X of Q$(c,{withFileTypes:!0}))if(X.isDirectory()&&$(X.name))J(Zc(c,X.name))}catch{return null}if(Q.length===0)return null;let Y=Aj("sha256");for(let X of Q.sort()){let W=bj(c,X).split(Fj).join("/");Y.update(W),Y.update("\x00"),Y.update(MW(X)),Y.update("\x00")}return Y.digest("hex").slice(0,16)}var u$="fig";function J$(c){return Tj(c,($)=>$===u$)}function BY(){try{return J$(HY())}catch{return null}}function fj(c){try{return JSON.parse(MW(Zc(c,"skills.json"),"utf8"))}catch{return null}}function k$(c=u$){try{return fj(HY())?.skills?.[c]?.version??null}catch{return null}}function VW(c){let{stamp:$,installedHash:Q,bundledHash:J,referenceVersion:Y}=c;if(Q==null)return"absent";if(J!=null&&Q===J&&$===Y)return"pristine";if($!=null&&Y!=null&&R0(Y,$))return"stale";return"modified"}function nj(c=Zc(qW(),".claude","skills")){let $=DY(c),Q=J$(c),J=BY(),Y=VW({stamp:$,installedHash:Q,bundledHash:J,referenceVersion:k$()});return{version:$,hash:Q,status:Y}}function C6(){return{channel:"cli",cliVersion:f0(),skill:nj()}}var uj=`figura skill — install Figura's Claude Code skills
|
|
48
48
|
|
|
49
49
|
Usage:
|
|
50
50
|
figura skill install [--project] [--dir <path>]
|
|
@@ -58,44 +58,44 @@ Options:
|
|
|
58
58
|
--dir <path> Install into a custom skills directory
|
|
59
59
|
--help, -h Show this help
|
|
60
60
|
|
|
61
|
-
Default target: ~/.claude/skills/`;function
|
|
62
|
-
`+" curl -fsSL https://figura.so/install.sh | bash")}function
|
|
63
|
-
`)}catch{}try{let Y=
|
|
64
|
-
`)}catch{}}return{baseDir:c,installed:J}}async function
|
|
65
|
-
`)}catch{}try{let q=
|
|
66
|
-
`)}catch{}}return{baseDir:c,installed:z,source:"engine",version:x}}catch(G){if(G instanceof X)throw G;return{...
|
|
67
|
-
`);return}if(J!=="install")
|
|
68
|
-
`+"The engine served a skill whose content did not match its hash — your "+"existing skill was left untouched. Retry later; if it persists, report it.");throw N}let q=z.map((N)=>N.name),M=z.map(({name:N,existed:w})=>` ${w?"updated":"installed"} ${N}${x==="engine"?"":" (bundled — engine unreachable)"}`);if(q.includes("fig")){let N=new Set([
|
|
61
|
+
Default target: ~/.claude/skills/`;function A6(c){try{return Q$(c,{withFileTypes:!0}).some(($)=>$.isDirectory()&&O8(Zc(c,$.name,"SKILL.md")))}catch{return!1}}function HY(){let c=[new URL("../skills/",import.meta.url),new URL("../../skills/",import.meta.url)].map((Q)=>S6(Q));for(let Q of c)if(A6(Q))return Q;let $=S6(new URL("./",import.meta.url));for(let Q=0;Q<8;Q++){let J=Zc($,".claude","skills");if(A6(J))return J;let Y=Ej($);if(Y===$)break;$=Y}Z(`bundled skills not found — reinstall figura-cli:
|
|
62
|
+
`+" curl -fsSL https://figura.so/install.sh | bash")}function P6(c,$){Cj($,{recursive:!0});for(let Q of Q$(c,{withFileTypes:!0})){let J=Zc(c,Q.name),Y=Zc($,Q.name);if(Q.isDirectory())P6(J,Y);else Pj(J,Y)}}var OY=(c)=>c==="fig"||c.startsWith("figura-");function wW(c){let $=HY(),J=Q$($,{withFileTypes:!0}).filter((Y)=>Y.isDirectory()&&OY(Y.name)&&O8(Zc($,Y.name,"SKILL.md"))).map((Y)=>Y.name).sort().map((Y)=>{let X=Zc(c,Y),W=O8(Zc(X,"SKILL.md"));return P6(Zc($,Y),X),{name:Y,existed:W}});if(J.length){try{let Y=k$();if(Y)jY(Zc(c,KY),Y+`
|
|
63
|
+
`)}catch{}try{let Y=J$($);if(Y)jY(Zc(c,NW),Y+`
|
|
64
|
+
`)}catch{}}return{baseDir:c,installed:J}}async function iW(c,$={}){let{fetchLatestSkill:Q,verifySkillPayload:J,materializeSkill:Y,SkillHashMismatchError:X}=await Promise.resolve().then(() => (UY(),zW)),W=HY(),m=Q$(W,{withFileTypes:!0}).filter((G)=>G.isDirectory()&&OY(G.name)&&O8(Zc(W,G.name,"SKILL.md"))).map((G)=>G.name).sort();try{let G=[];for(let q of m){let M=await Q(q,$);if(!M)throw Error(`engine unreachable for skill '${q}'`);J(M),G.push(M)}let z=G.map((q)=>{let M=O8(Zc(c,q.skill,"SKILL.md"));return Y(c,q),{name:q.skill,existed:M}}),x=G.find((q)=>q.skill===u$)?.version??G[0]?.version??null;if(z.length&&x){try{jY(Zc(c,KY),x+`
|
|
65
|
+
`)}catch{}try{let q=J$(c);if(q)jY(Zc(c,NW),q+`
|
|
66
|
+
`)}catch{}}return{baseDir:c,installed:z,source:"engine",version:x}}catch(G){if(G instanceof X)throw G;return{...wW(c),source:"bundled",version:k$()}}}function E6(c){let $=[],Q=[];try{Q=Q$(c,{withFileTypes:!0}).filter((J)=>J.isDirectory()&&OY(J.name)).map((J)=>J.name)}catch{return{removed:$}}for(let J of Q.sort()){let Y=Zc(c,J);if(!O8(Zc(Y,"SKILL.md")))continue;try{xW(Y,{recursive:!0,force:!0}),$.push(J)}catch{}}if($.length)for(let J of[KY,NW])try{xW(Zc(c,J),{force:!0})}catch{}return{removed:$}}async function b6(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(k($,"help")||k($,"h")||!J){process.stdout.write(uj+`
|
|
67
|
+
`);return}if(J!=="install")Z(`unknown subcommand 'skill ${J}'. Run \`figura skill --help\`.`);let Y=k($,"project"),X=f($,"dir")??(Y?Zc(process.cwd(),".claude","skills"):Zc(qW(),".claude","skills")),{resolveConfig:W}=await Promise.resolve().then(() => (v0(),sx)),{apiUrl:m,token:G}=await W({apiUrlFlag:f($,"api-url"),tokenFlag:f($,"token")}),z,x;try{let N=await iW(X,{apiUrl:m,token:G});z=N.installed,x=N.source}catch(N){let{SkillHashMismatchError:w}=await Promise.resolve().then(() => (UY(),zW));if(N instanceof w)Z(`${N.message}
|
|
68
|
+
`+"The engine served a skill whose content did not match its hash — your "+"existing skill was left untouched. Retry later; if it persists, report it.");throw N}let q=z.map((N)=>N.name),M=z.map(({name:N,existed:w})=>` ${w?"updated":"installed"} ${N}${x==="engine"?"":" (bundled — engine unreachable)"}`);if(q.includes("fig")){let N=new Set([Zc(X,"figura-fig"),Zc(qW(),".claude","skills","figura-fig")]);for(let U of N)if(O8(Zc(U,"SKILL.md")))xW(U,{recursive:!0,force:!0}),M.push(` removed figura-fig (renamed → fig) — ${U}`);let w=Zc(process.cwd(),".claude","skills","figura-fig");if(!N.has(w)&&O8(Zc(w,"SKILL.md")))M.push(` note: found ${w} (the old /figura-fig skill) — run \`figura skill install --project\` to replace it, then commit the removal`)}process.stdout.write(`Figura skills → ${X}
|
|
69
69
|
`+M.join(`
|
|
70
70
|
`)+'\nClaude Code loads them automatically. Try `/fig <a screen>`, or ask it to "introduce this repo to Figura".\n'+(Y?`Commit .claude/skills/ to share them with your team.
|
|
71
|
-
`:"")+"Re-run `figura skill install` after upgrading figura-cli to update.\n")}import{promises as a$}from"node:fs";import{homedir as
|
|
71
|
+
`:"")+"Re-run `figura skill install` after upgrading figura-cli to update.\n")}import{promises as a$}from"node:fs";import{homedir as vW}from"node:os";import{join as UW}from"node:path";var p0=UW(vW(),".claude","settings.json"),RY="figura doctor --session-start",kj=`figura hook install — keep Figura current on every Claude Code launch
|
|
72
72
|
|
|
73
73
|
Usage:
|
|
74
74
|
figura hook install [--uninstall]
|
|
75
75
|
|
|
76
76
|
Adds a SessionStart hook to ${p0} that runs
|
|
77
|
-
\`${
|
|
77
|
+
\`${RY}\` — it reinstalls drifted skills in place and, when the CLI is
|
|
78
78
|
behind (checked at most once a day), prints a one-line notice to run
|
|
79
79
|
\`figura upgrade\`. It never self-executes an install and never blocks startup.
|
|
80
|
-
Re-running is safe; --uninstall removes it.`;function
|
|
81
|
-
`);return Q}async function
|
|
82
|
-
`);return Q}async function
|
|
83
|
-
`);return}let Y=k($,"uninstall"),X;try{X=await
|
|
84
|
-
Add this SessionStart hook by hand: ${
|
|
85
|
-
`),process.exit(1)}let{settings:W,changed:m}=Y?
|
|
80
|
+
Re-running is safe; --uninstall removes it.`;function jW(c){return(c.hooks??[]).some(($)=>typeof $.command==="string"&&$.command.includes("figura doctor"))}function F6(c){let $=c.hooks??{},Q=$.SessionStart??[];if(Q.some(jW))return{settings:c,changed:!1};return{settings:{...c,hooks:{...$,SessionStart:[...Q,{matcher:"",hooks:[{type:"command",command:RY}]}]}},changed:!0}}function aj(c){return(c.hooks?.SessionStart??[]).some(jW)}function T6(c){let $=c.hooks?.SessionStart;if(!$)return{settings:c,changed:!1};let Q=$.filter((Y)=>!jW(Y));if(Q.length===$.length)return{settings:c,changed:!1};let J={...c.hooks};if(Q.length)J.SessionStart=Q;else delete J.SessionStart;return{settings:{...c,hooks:J},changed:!0}}async function pY(c){try{let $=await a$.readFile(c,"utf8"),Q=JSON.parse($);if(!Q||typeof Q!=="object"||Array.isArray(Q))throw Error(`${c} is not a JSON object`);return Q}catch($){if($.code==="ENOENT")return{};throw $}}async function f6(){let c=await pY(p0),{settings:$,changed:Q}=F6(c);if(Q)await a$.mkdir(UW(vW(),".claude"),{recursive:!0}),await a$.writeFile(p0,JSON.stringify($,null,2)+`
|
|
81
|
+
`);return Q}async function n6(){let c;try{c=await pY(p0)}catch{return!1}let{settings:$,changed:Q}=T6(c);if(Q)await a$.writeFile(p0,JSON.stringify($,null,2)+`
|
|
82
|
+
`);return Q}async function u6(c=p0){try{return aj(await pY(c))}catch{return!1}}async function k6(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(k($,"help")||k($,"h")||J&&J!=="install"){process.stdout.write(kj+`
|
|
83
|
+
`);return}let Y=k($,"uninstall"),X;try{X=await pY(p0)}catch(G){process.stderr.write(`figura: couldn't read ${p0} (${y(G)}).
|
|
84
|
+
Add this SessionStart hook by hand: ${RY}
|
|
85
|
+
`),process.exit(1)}let{settings:W,changed:m}=Y?T6(X):F6(X);if(!m){process.stdout.write(Y?`No Figura SessionStart hook was installed.
|
|
86
86
|
`:`Figura version check already installed in ${p0}.
|
|
87
|
-
`);return}await a$.mkdir(
|
|
87
|
+
`);return}await a$.mkdir(UW(vW(),".claude"),{recursive:!0}),await a$.writeFile(p0,JSON.stringify(W,null,2)+`
|
|
88
88
|
`),process.stdout.write(Y?`Removed the Figura version check from ${p0}.
|
|
89
|
-
`:`Installed the Figura version check in ${p0} — it runs \`${
|
|
89
|
+
`:`Installed the Figura version check in ${p0} — it runs \`${RY}\`
|
|
90
90
|
on each Claude Code launch and keeps the CLI, MCP, and skills current.
|
|
91
|
-
`)}import{spawnSync as
|
|
92
|
-
`)}async function
|
|
93
|
-
`),process.exit(1)}let Q=$.statusLine,{statusLine:J,changed:Y}=
|
|
91
|
+
`)}import{spawnSync as lj}from"node:child_process";import{promises as W8}from"node:fs";import{homedir as IY}from"node:os";import{join as LY}from"node:path";F$();rQ();v0();var a6=3200,X8=LY(IY(),".claude","settings.json"),ZY="figura statusline",R8="\x1B[0m",l6="\x1B[2m",hj="\x1B[38;2;255;177;58m",yj="\x1B[38;2;62;224;122m",oj="\x1B[38;2;255;77;61m",gj="\x1B[38;2;198;199;204m",dj="\x1B[38;2;60;60;66m",KW=[[255,77,61],[255,177,58],[62,224,122],[31,182,255],[106,92,255]];function sj(c,$){let Q=$?[...KW,KW[0]]:KW,Y=($?(c%1+1)%1:Math.max(0,Math.min(1,c)))*(Q.length-1),X=Math.min(Q.length-2,Math.floor(Y)),W=Y-X,[m,G]=[Q[X],Q[X+1]];return[0,1,2].map((z)=>Math.round(m[z]+(G[z]-m[z])*W))}function rj(c,$){let Q=[...c],J=Q.length-1||1,Y=$!==void 0;return Q.map((X,W)=>{if(X===" ")return X;let[m,G,z]=sj(W/J+($??0),Y);return`\x1B[38;2;${m};${G};${z}m${X}`}).join("")+R8}function tj(c,$={}){let Q=rj("⬡ figura",$.phase);if($.team)Q+=` ${dj}·${R8} ${gj}@${$.team}${R8}`;if($.linked!==void 0)Q+=$.linked?` ${yj}●${R8}`:` ${oj}○${R8} ${l6}login${R8}`;if(Q+=` ${l6}${c}${R8}`,$.latest&&R0($.latest,c))Q+=` ${hj}↑ ${$.latest}${R8}`;return Q}function ej(c){return`'${c.replace(/'/g,"'\\''")}'`}function cK(c){let $=/--wrap\s+'((?:[^']|'\\'')*)'/.exec(c);if(!$)return null;return $[1].replace(/'\\''/g,"'")}function DW(c,$){let Q=c?.command??"",J=Q.includes(ZY);if($){if(!J)return{statusLine:c??null,changed:!1};let Y=cK(Q);return Y?{statusLine:{type:"command",command:Y},changed:!0}:{statusLine:null,changed:!0}}if(J)return{statusLine:c??null,changed:!1};if(!c)return{statusLine:{type:"command",command:ZY},changed:!0};return{statusLine:{type:"command",command:`${ZY} --wrap ${ej(Q)}`},changed:!0}}async function $K(c){let $="";try{let z=[];for await(let x of process.stdin)z.push(Buffer.from(x));$=Buffer.concat(z).toString("utf8")}catch{}let Q="";if(c)try{Q=(lj(c,{shell:!0,input:$,encoding:"utf8"}).stdout??"").replace(/\n+$/,"")}catch{}let J=f0(),Y,X,W;try{Y=(await H8()).latest}catch{}try{let z=await W0({});X=z.team,W=Boolean(z.token)}catch{}let m=Date.now()%a6/a6,G=tj(J,{latest:Y,team:X,phase:m,linked:W});process.stdout.write((Q?`${Q} · ${G}`:G)+`
|
|
92
|
+
`)}async function QK(c){let $={};try{let X=await W8.readFile(X8,"utf8"),W=JSON.parse(X);if(!W||typeof W!=="object"||Array.isArray(W))throw Error("settings.json is not a JSON object");$=W}catch(X){if(X.code!=="ENOENT")process.stderr.write(`figura: couldn't read ${X8} (${y(X)}). Set statusLine to "${ZY}" by hand.
|
|
93
|
+
`),process.exit(1)}let Q=$.statusLine,{statusLine:J,changed:Y}=DW(Q,c);if(!Y){process.stdout.write(c?`No Figura statusline was installed.
|
|
94
94
|
`:`Figura statusline already installed.
|
|
95
|
-
`);return}if(J===null)delete $.statusLine;else $.statusLine=J;await W8.mkdir(
|
|
95
|
+
`);return}if(J===null)delete $.statusLine;else $.statusLine=J;await W8.mkdir(LY(IY(),".claude"),{recursive:!0}),await W8.writeFile(X8,JSON.stringify($,null,2)+`
|
|
96
96
|
`),process.stdout.write(c?`Removed the Figura badge from ${X8}.
|
|
97
97
|
`:`Added the Figura badge to your status bar (${X8}). `+`It shows ⬡ figura <version>, with ↑ when an update is ready.
|
|
98
|
-
`)}var
|
|
98
|
+
`)}var JK=`figura statusline — a status-bar badge showing Figura is installed
|
|
99
99
|
|
|
100
100
|
Usage:
|
|
101
101
|
figura statusline [--wrap <cmd>] render the badge (used by the status bar)
|
|
@@ -104,10 +104,10 @@ Usage:
|
|
|
104
104
|
|
|
105
105
|
The badge reads ⬡ figura <version> and adds ↑ when \`figura doctor\` has found a
|
|
106
106
|
newer release. \`install\` never replaces an existing statusline — it wraps it, so
|
|
107
|
-
a caveman (or any other) badge keeps showing alongside Figura's.`;async function
|
|
108
|
-
`);return}if(Q[0]==="install")return
|
|
109
|
-
`),!0}async function
|
|
110
|
-
`),!0}var
|
|
107
|
+
a caveman (or any other) badge keeps showing alongside Figura's.`;async function h6(c){let{flags:$,positionals:Q}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(JK+`
|
|
108
|
+
`);return}if(Q[0]==="install")return QK(k($,"uninstall"));let J=typeof $.wrap==="string"?$.wrap:void 0;await $K(J)}async function y6(){let c={};try{let J=await W8.readFile(X8,"utf8"),Y=JSON.parse(J);if(Y&&typeof Y==="object"&&!Array.isArray(Y))c=Y}catch{return!1}let{statusLine:$,changed:Q}=DW(c.statusLine,!0);if(!Q)return!1;if($===null)delete c.statusLine;else c.statusLine=$;return await W8.mkdir(LY(IY(),".claude"),{recursive:!0}),await W8.writeFile(X8,JSON.stringify(c,null,2)+`
|
|
109
|
+
`),!0}async function o6(){let c={};try{let J=await W8.readFile(X8,"utf8"),Y=JSON.parse(J);if(Y&&typeof Y==="object"&&!Array.isArray(Y))c=Y}catch{}let{statusLine:$,changed:Q}=DW(c.statusLine,!1);if(!Q)return!1;return c.statusLine=$,await W8.mkdir(LY(IY(),".claude"),{recursive:!0}),await W8.writeFile(X8,JSON.stringify(c,null,2)+`
|
|
110
|
+
`),!0}var d6={installSkills:wW,uninstallSkills:E6,ensureHook:f6,disableHook:n6,ensureStatusline:o6,removeStatusline:y6};function XK(){return g6(YK(),".claude","skills")}async function BW(c,$=d6){let Q={baseDir:c.skillsBaseDir};if(c.skipSkills)Q.skipped=!0;else try{Q.installed=$.installSkills(c.skillsBaseDir).installed}catch(X){Q.error=y(X)}let J={changed:!1};try{J.changed=await $.ensureHook()}catch(X){J.error=y(X)}let Y={changed:!1};try{Y.changed=await $.ensureStatusline()}catch(X){Y.error=y(X)}return{skills:Q,hook:J,statusline:Y}}async function WK(c,$=d6){let Q={baseDir:c.skillsBaseDir};try{Q.removed=$.uninstallSkills(c.skillsBaseDir).removed}catch(X){Q.error=y(X)}let J={changed:!1};try{J.changed=await $.disableHook()}catch(X){J.error=y(X)}let Y={changed:!1};try{Y.changed=await $.removeStatusline()}catch(X){Y.error=y(X)}return{skills:Q,hook:J,statusline:Y}}var mK=`figura install — set up the full Claude Code integration in one command
|
|
111
111
|
|
|
112
112
|
Usage:
|
|
113
113
|
figura install [--project] [--dir <path>] [--uninstall]
|
|
@@ -126,13 +126,13 @@ Options:
|
|
|
126
126
|
the global ~/.claude/skills. The hook + badge are always global.
|
|
127
127
|
--dir <path> Install the skills into a custom directory
|
|
128
128
|
--uninstall Reverse all three
|
|
129
|
-
--help, -h Show this help`;async function
|
|
130
|
-
`);return}let Q=k($,"project"),J=f($,"dir")??(Q?
|
|
129
|
+
--help, -h Show this help`;async function s6(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(mK+`
|
|
130
|
+
`);return}let Q=k($,"project"),J=f($,"dir")??(Q?g6(process.cwd(),".claude","skills"):XK()),Y=k($,"uninstall"),X=Y?await WK({skillsBaseDir:J}):await BW({skillsBaseDir:J}),W=[];if(Y)W.push(X.skills.error?`! skills ${X.skills.error} — remove ${J} by hand`:`✓ skills removed ${(X.skills.removed??[]).map((m)=>"/"+m).join(", ")||"(none)"}`);else{let m=(X.skills.installed??[]).map((G)=>"/"+G.name).join(", ");W.push(X.skills.error?`! skills ${X.skills.error} — run: figura skill install`:`✓ skills ${J} — ${m||"(none bundled)"}`)}W.push(X.hook.error?`! auto-update ${X.hook.error} — run: figura hook install${Y?" --uninstall":""}`:Y?`✓ auto-update ${X.hook.changed?"removed":"was not installed"}`:`✓ auto-update ${X.hook.changed?"installed":"already set"} — checks for updates each Claude Code launch`),W.push(X.statusline.error?`! badge ${X.statusline.error} — run: figura statusline install${Y?" --uninstall":""}`:Y?`✓ badge ${X.statusline.changed?"removed ⬡ figura from your status bar":"was not installed"}`:`✓ badge ${X.statusline.changed?"added ⬡ figura to your status bar":"already in your status bar"}`),process.stdout.write((Y?`Removed the Figura Claude Code integration:
|
|
131
131
|
`:`Set up the Figura Claude Code integration:
|
|
132
132
|
`)+W.map((m)=>" "+m).join(`
|
|
133
133
|
`)+`
|
|
134
134
|
`+(Y?"":`Restart Claude Code to load the skills and badge.
|
|
135
|
-
`))}var
|
|
135
|
+
`))}var xK=`figura login — authenticate and save credentials
|
|
136
136
|
|
|
137
137
|
Usage:
|
|
138
138
|
figura login [--token <fig_...>] [--no-browser] [--api-url <url>] [--project]
|
|
@@ -147,13 +147,13 @@ By default this opens your browser to a short authorize page — approve there a
|
|
|
147
147
|
the CLI picks up the credential automatically (no port, nothing to copy-paste;
|
|
148
148
|
works over SSH too). Use --no-browser to print the URL instead of opening it, or
|
|
149
149
|
--token to pass a token directly (CI / headless). Credentials are written to
|
|
150
|
-
${
|
|
150
|
+
${i0} (mode 0600).
|
|
151
151
|
|
|
152
152
|
--project sets a repo up end-to-end from one command. In the current directory it:
|
|
153
|
-
• writes ${
|
|
153
|
+
• writes ${c$} (the team token) and pins every figura call in
|
|
154
154
|
this tree to that team — one team per repo;
|
|
155
155
|
• adds .figura/ to .gitignore so the live token is never committed;
|
|
156
|
-
• registers the Figura MCP in ${
|
|
156
|
+
• registers the Figura MCP in ${$$} so Claude Code wires it up on
|
|
157
157
|
its own — no manual \`claude mcp add\` (--no-mcp to skip);
|
|
158
158
|
• installs the /fig and /figura-brand skills into .claude/skills (--no-skills
|
|
159
159
|
to skip);
|
|
@@ -161,36 +161,36 @@ ${R0} (mode 0600).
|
|
|
161
161
|
date (see \`figura hook install\`);
|
|
162
162
|
• adds a "⬡ figura" badge to the Claude Code status bar (wrapping any existing
|
|
163
163
|
statusline, so nothing else disappears; see \`figura statusline install\`).
|
|
164
|
-
${
|
|
165
|
-
setup — teammates just run \`figura login --project\` for their own credential.`;function
|
|
166
|
-
`+'In Claude Code, run /figura-brand (or say "introduce this repo to Figura") to set your design system.'}catch{return null}}async function
|
|
164
|
+
${$$} and .claude/skills hold no token, so commit them to share the
|
|
165
|
+
setup — teammates just run \`figura login --project\` for their own credential.`;function qK(c){try{let $=process.platform==="darwin"?"open":process.platform==="win32"?"cmd":"xdg-open",Q=process.platform==="win32"?["/c","start","",c]:[c],J=GK($,Q,{stdio:"ignore",detached:!0});J.on("error",()=>{}),J.unref()}catch{}}var MK=(c)=>new Promise(($)=>setTimeout($,c));async function NK(c,$){try{if((await Wc("/v1/brand",{token:c,apiUrl:$,source:Gc})).isCustom)return null;return`Next: your team has no brand profile yet — figs render with the built-in neutral look.
|
|
166
|
+
`+'In Claude Code, run /figura-brand (or say "introduce this repo to Figura") to set your design system.'}catch{return null}}async function VK(c,$){let Q=await Wc("/v1/cli/device",{method:"POST",apiUrl:c,source:Gc}),J=Q.verification_uri_complete||Q.verification_uri;if(process.stdout.write(`
|
|
167
167
|
To sign in, open this URL and confirm the code ${Q.user_code}:
|
|
168
168
|
|
|
169
169
|
${J}
|
|
170
170
|
|
|
171
|
-
`),$)
|
|
172
|
-
`);let Y=Math.max(1,Q.interval??5)*1000,X=Date.now()+(Q.expires_in??600)*1000;while(Date.now()<X){await
|
|
173
|
-
`);return}let Q=process.env.FIGURA_API_URL||f($,"api-url")||f$,J=process.env.FIGURA_TOKEN||f($,"token");if(!J)try{J=await
|
|
174
|
-
Retry, or pass --token <fig_...> for CI/headless.`)}if(!J)
|
|
171
|
+
`),$)qK(J);process.stdout.write(`Waiting for authorization...
|
|
172
|
+
`);let Y=Math.max(1,Q.interval??5)*1000,X=Date.now()+(Q.expires_in??600)*1000;while(Date.now()<X){await MK(Y);let W;try{W=await Wc("/v1/cli/device/token",{method:"POST",apiUrl:c,source:Gc,body:{device_code:Q.device_code}})}catch(m){if(m instanceof Y8&&m.status===0)continue;throw m}if(W.token)return W.token}throw Error("timed out waiting for authorization")}async function HW(c){let{flags:$}=t(c);if($.help||$.h){process.stdout.write(xK+`
|
|
173
|
+
`);return}let Q=process.env.FIGURA_API_URL||f($,"api-url")||f$,J=process.env.FIGURA_TOKEN||f($,"token");if(!J)try{J=await VK(Q,!k($,"no-browser"))}catch(m){Z(`login failed: ${y(m)}
|
|
174
|
+
Retry, or pass --token <fig_...> for CI/headless.`)}if(!J)Z("A token is required.");let Y;try{Y=await Wc("/v1/whoami",{token:J,apiUrl:Q,source:Gc})}catch(m){Z(`token validation failed: ${y(m)}`)}let X=Y.team?.name||Y.team?.slug||Y.team?.id||"your team";if(k($,"project")){let m=process.cwd();await e9({apiUrl:Q,token:J,team:Y.team?.slug||Y.team?.id},m);let G=[`✓ token ${c$}`];try{let q=await p6(".figura/",m,"Figura CLI credentials (figura login --project) — holds a live API token; never commit");G.push(`✓ gitignore .figura/ ${q==="present"?"already ignored":"ignored"}`)}catch(q){G.push(`! gitignore couldn't update .gitignore (${y(q)}) — ignore .figura/ by hand`)}if(k($,"no-mcp"))G.push("- MCP skipped (--no-mcp)");else try{let q=await O6(m);G.push(q.status==="unparsable"?`! MCP ${$$} unparsable — add by hand: claude mcp add figura -- figura mcp`:`✓ MCP ${$$} — restart Claude Code and approve`)}catch(q){G.push(`! MCP couldn't write ${$$} (${y(q)}) — add by hand: claude mcp add figura -- figura mcp`)}let z=await BW({skillsBaseDir:zK(m,".claude","skills"),skipSkills:k($,"no-skills")});if(z.skills.skipped)G.push("- skills skipped (--no-skills)");else if(z.skills.error)G.push(`! skills couldn't install skills (${z.skills.error}) — run: figura skill install --project`);else{let q=(z.skills.installed??[]).map((M)=>"/"+M.name).join(", ");G.push(`✓ skills .claude/skills — ${q||"(none bundled)"}`)}G.push(z.hook.error?`! auto-update couldn't install the update hook (${z.hook.error}) — run: figura hook install`:`✓ auto-update ${z.hook.changed?"installed":"already set"} — checks for updates each Claude Code launch`),G.push(z.statusline.error?`! badge couldn't add the status-bar badge (${z.statusline.error}) — run: figura statusline install`:`✓ badge ${z.statusline.changed?"added ⬡ figura to your status bar":"already in your status bar"}`),process.stdout.write(`Logged in to ${X}.
|
|
175
175
|
|
|
176
176
|
Set up this repo:
|
|
177
177
|
`+G.map((q)=>" "+q).join(`
|
|
178
178
|
`)+`
|
|
179
|
-
`);let x=await
|
|
179
|
+
`);let x=await NK(J,Q);if(x)process.stdout.write(`
|
|
180
180
|
`+x+`
|
|
181
|
-
`);return}let W=await
|
|
182
|
-
`),
|
|
183
|
-
`)}
|
|
181
|
+
`);return}let W=await xY();if(await t9({...W,apiUrl:Q,token:J,team:Y.team?.slug||Y.team?.id||W.team}),process.stdout.write(`Logged in to ${X}. Credentials saved to ${i0}
|
|
182
|
+
`),B6())process.stdout.write("\nYou're inside a git repo — run `figura link` to pin this repo to a\n"+`team and wire up the MCP, skills, and status badge in one step.
|
|
183
|
+
`)}U0();v0();var wK=`figura whoami — show the authenticated identity
|
|
184
184
|
|
|
185
185
|
Also reports the BINDING: which config tier supplied the token (env, --token,
|
|
186
186
|
this repo's .figura/config.json, or the global ~/.figura fallback). A 'global'
|
|
187
187
|
binding means nothing pins this directory to that team — run \`figura link\`.
|
|
188
188
|
|
|
189
189
|
Usage:
|
|
190
|
-
figura whoami [--json]`;async function
|
|
191
|
-
`);return}let Q=await Kc($),{token:J,apiUrl:Y,tokenSource:X,projectConfigPath:W}=Q,m;try{m=await Wc("/v1/whoami",{token:J,apiUrl:Y,source:Gc})}catch(x){
|
|
190
|
+
figura whoami [--json]`;async function r6(c){let{flags:$}=t(c);if($.help||$.h){process.stdout.write(wK+`
|
|
191
|
+
`);return}let Q=await Kc($),{token:J,apiUrl:Y,tokenSource:X,projectConfigPath:W}=Q,m;try{m=await Wc("/v1/whoami",{token:J,apiUrl:Y,source:Gc})}catch(x){Z(y(x))}let G={source:X,configPath:X==="project"?W:X==="global"?i0:null};if(k($,"json")){ic({...m,binding:G});return}let z=[];if(m.user){let x=m.user,q=x.name&&x.email?`${x.name} (${x.email})`:x.email??x.name??x.id??"";z.push(`user: ${q}`)}else z.push(`actor: ${m.actor??"token"}`);if(m.team)z.push(`team: ${m.team.name??""} (${m.team.slug??m.team.id??""})`);if(m.token)z.push(`token: ${m.token.name??m.token.prefix??m.token.id??""}`);if(m.scopes?.length)z.push(`scopes: ${m.scopes.join(", ")}`);z.push(`bound: ${G.source}${G.configPath?` (${G.configPath})`:""}`+(G.source==="global"?" — not pinned to this repo; run `figura link`":"")),process.stdout.write(z.join(`
|
|
192
192
|
`)+`
|
|
193
|
-
`)}
|
|
193
|
+
`)}U0();import{readFileSync as _Y}from"node:fs";var SY=`figura brand — show or set your team's brand profile (design system)
|
|
194
194
|
|
|
195
195
|
The /fig skill and generator render with these tokens. Falls back to the built-in
|
|
196
196
|
neutral profile until your team sets its own.
|
|
@@ -243,27 +243,27 @@ you by scanning your repo ("introduce my repo to Figura").
|
|
|
243
243
|
|
|
244
244
|
Both forms print WHICH team they're bound to and from where. In a directory that
|
|
245
245
|
isn't linked to a team — a repo or not — \`brand set\` refuses the global
|
|
246
|
-
~/.figura fallback — run \`figura link\` first, or pass --allow-global to override.`,
|
|
247
|
-
`);return}let{token:J,apiUrl:Y}=await Kc(Q,{announce:!0}),X=f(Q,"platform");if(X!==void 0&&!
|
|
246
|
+
~/.figura fallback — run \`figura link\` first, or pass --allow-global to override.`,t6=["mobile","web","desktop"];async function OW(){let c=[];for await(let $ of process.stdin)c.push(Buffer.from($));return Buffer.concat(c).toString("utf8")}async function e6(c){let $=c[0]&&!c[0].startsWith("-")?c[0]:void 0;if($==="set")return iK(c.slice(1));if($==="structure")return UK(c.slice(1));if($==="schema")return vK(c.slice(1));let{flags:Q}=t(c);if(k(Q,"help")||k(Q,"h")){process.stdout.write(SY+`
|
|
247
|
+
`);return}let{token:J,apiUrl:Y}=await Kc(Q,{announce:!0}),X=f(Q,"platform");if(X!==void 0&&!t6.includes(X))Z(`--platform must be one of ${t6.join(", ")}`);let W=X?`/v1/brand?platform=${encodeURIComponent(X)}`:"/v1/brand",m;try{m=await Wc(W,{token:J,apiUrl:Y,source:Gc})}catch(x){Z(y(x))}if(k(Q,"json")){ic(m);return}let G=[],z=m.kind==="starter"||!m.kind&&!m.isCustom?" (starter kit — no brand set; run `figura brand set` to customize)":"";if(G.push(`name: ${m.name??""}${z}`),G.push(`product: ${m.appDescription??""}`),G.push(`tokens: ${(m.tokensBlock??"").length} chars`),G.push(`surfaces: ${(m.surfaces??[]).join(", ")||"(none)"}`),G.push(`forbidden: ${(m.forbidden??"").length} chars`),G.push(`platform: ${m.platformProfile??"(unknown — Studio uses its own defaults)"}`),m.availablePlatforms?.length||m.colors?.length)G.push(`structured: ${(m.colors??[]).length} colors, surfaces for [${(m.availablePlatforms??[]).join(", ")}]${m.platform?` (composed for ${m.platform})`:""}`);process.stdout.write(G.join(`
|
|
248
248
|
`)+`
|
|
249
|
-
`)}async function
|
|
250
|
-
`);return}let{token:Q,apiUrl:J}=await Kc($,{mutate:!0}),Y=f($,"name");if(!Y)
|
|
249
|
+
`)}async function iK(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(SY+`
|
|
250
|
+
`);return}let{token:Q,apiUrl:J}=await Kc($,{mutate:!0}),Y=f($,"name");if(!Y)Z("--name is required for `brand set`.");let X={name:Y},W=f($,"description");if(W!==void 0)X.appDescription=W;let m=f($,"tokens");if(m==="-")X.tokensBlock=await OW();else if(m&&m.startsWith("@"))try{X.tokensBlock=_Y(m.slice(1),"utf8")}catch(M){Z(`could not read --tokens file ${m.slice(1)}: ${y(M)}`)}else if(m!==void 0)X.tokensBlock=m;let G=f($,"surfaces");if(G!==void 0)X.surfaces=G.split(",").map((M)=>M.trim()).filter((M)=>M.length>0);let z=f($,"structured");if(z!==void 0){let M;if(z==="-")M=await OW();else if(z.startsWith("@"))try{M=_Y(z.slice(1),"utf8")}catch(U){return Z(`could not read --structured file ${z.slice(1)}: ${y(U)}`)}else M=z;let N;try{N=JSON.parse(M)}catch(U){return Z(`--structured must be valid JSON: ${y(U)}`)}if(typeof N!=="object"||N===null||Array.isArray(N))return Z('--structured must be a JSON object like { "identity": {…}, "platforms": {…} }');let w=N;if(w.identity===void 0&&w.platforms===void 0)return Z('--structured JSON must have an "identity" and/or "platforms" key');if(w.identity!==void 0)X.identity=w.identity;if(w.platforms!==void 0)X.platforms=w.platforms}let x=f($,"prose-source");if(x!==void 0)if(x==="-")return Z("--prose-source cannot read stdin (- is reserved for --structured); pass @file or literal text.");else if(x.startsWith("@"))try{X.proseSource=_Y(x.slice(1),"utf8")}catch(M){return Z(`could not read --prose-source file ${x.slice(1)}: ${y(M)}`)}else X.proseSource=x;let q;try{q=await Wc("/brand",{method:"PUT",body:X,token:Q,apiUrl:J,source:Gc})}catch(M){Z(y(M))}if(k($,"json")){ic(q);return}process.stdout.write(`Brand saved: ${q.name}
|
|
251
251
|
${(q.tokensBlock??"").length} chars of tokens — the /fig generator now renders on-brand.
|
|
252
|
-
`)}async function
|
|
253
|
-
`);return}let{token:Q,apiUrl:J}=await Kc($),Y;try{Y=await Wc("/v1/brand/schema",{token:Q,apiUrl:J,source:Gc})}catch(X){
|
|
254
|
-
`);return}let{token:Q,apiUrl:J}=await Kc($,{mutate:!0}),Y=f($,"prose"),X;if(Y===void 0||Y==="-")X=await
|
|
252
|
+
`)}async function vK(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(SY+`
|
|
253
|
+
`);return}let{token:Q,apiUrl:J}=await Kc($),Y;try{Y=await Wc("/v1/brand/schema",{token:Q,apiUrl:J,source:Gc})}catch(X){Z(y(X))}ic(Y.schema??Y)}async function UK(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(SY+`
|
|
254
|
+
`);return}let{token:Q,apiUrl:J}=await Kc($,{mutate:!0}),Y=f($,"prose"),X;if(Y===void 0||Y==="-")X=await OW();else if(Y.startsWith("@"))try{X=_Y(Y.slice(1),"utf8")}catch(m){return Z(`could not read --prose file ${Y.slice(1)}: ${y(m)}`)}else X=Y;if(!X.trim())Z("no prose to structure — pass --prose @file / - / text or pipe it in.");let W;try{W=await Wc("/brand/structure",{method:"POST",body:{prose:X},token:Q,apiUrl:J,source:Gc})}catch(m){Z(y(m))}ic(W)}U0();var jK=`figura teams — list teams accessible to the current credentials
|
|
255
255
|
|
|
256
256
|
Usage:
|
|
257
|
-
figura teams [--json]`;async function
|
|
258
|
-
`);return}let{token:Q,apiUrl:J}=await Kc($),Y;try{Y=await Wc("/v1/teams",{token:Q,apiUrl:J,source:Gc})}catch(W){
|
|
257
|
+
figura teams [--json]`;async function cq(c){let{flags:$}=t(c);if($.help||$.h){process.stdout.write(jK+`
|
|
258
|
+
`);return}let{token:Q,apiUrl:J}=await Kc($),Y;try{Y=await Wc("/v1/teams",{token:Q,apiUrl:J,source:Gc})}catch(W){Z(y(W))}let X=Array.isArray(Y)?Y:Y.teams??[];if(k($,"json")){ic(X);return}if(!X.length){process.stdout.write(`No teams.
|
|
259
259
|
`);return}for(let W of X){let m=W.role?` [${W.role}]`:"";process.stdout.write(`${W.slug} ${W.name}${m} ${W.id}
|
|
260
|
-
`)}}
|
|
260
|
+
`)}}U0();import{promises as AY}from"node:fs";import{join as BK}from"node:path";import{spawn as HK}from"node:child_process";v0();var KK=process.env.FIGURA_APP_URL?.replace(/\/+$/,"")||"https://figura.so";function $q(c){return`'${c.replace(/'/g,"'\\''")}'`}function DK(c,$,Q){return`## ${c}
|
|
261
261
|
|
|
262
262
|
[Open the fig →](${$})
|
|
263
263
|
|
|
264
264
|

|
|
265
|
-
`}function
|
|
266
|
-
`)}var
|
|
265
|
+
`}function Qq(c){let $=(c.appOrigin??KK).replace(/\/+$/,""),Q=c.publicId,J=c.title||"Untitled fig",Y=c.isPublic===!0,X=`${$}/f/${Q}`,W=`${X}/opengraph-image`,m=Y?X:c.viewUrl||X,G=c.channel||"<CHANNEL>",z=`buzz messages send --channel ${G} --content ${$q(`${J}: ${X}`)}`,x=`buzz canvas set --channel ${G} --content ${$q(DK(J,X,W))}`,q={figId:c.figId,title:J,published:Y,link:m,externalLink:X,ogImage:W,buzz:{message:z,canvas:x}};if(!Y)q.note="This fig is a draft — the public link + OG preview don't resolve until it's "+`published. Run \`figura fig publish ${c.figId}\` first, then post ${X}.`;return q}function Jq(c){let $=[];if($.push(c.title),$.push(c.published?"(published)":"(draft — not shareable yet)"),$.push(""),$.push(`link: ${c.link}`),$.push(`ogImage: ${c.ogImage}`),c.note)$.push(""),$.push(`note: ${c.note}`);return $.push(""),$.push("# post the fig to a Buzz channel:"),$.push(c.buzz.message),$.push(""),$.push("# …or set a channel canvas (markdown, with the preview):"),$.push(c.buzz.canvas),$.push(""),$.join(`
|
|
266
|
+
`)}var RW=`figura fig — manage visualizations
|
|
267
267
|
|
|
268
268
|
Usage:
|
|
269
269
|
figura fig create [--file <path> | (reads stdin)] [options]
|
|
@@ -289,8 +289,10 @@ Verify:
|
|
|
289
289
|
unstyled: rendering it headless cannot tell a healthy fig from one whose kit
|
|
290
290
|
never landed. \`verify\` fetches what a reviewer will open and asserts that
|
|
291
291
|
every frame class the markup uses is actually sized by CSS that shipped with
|
|
292
|
-
it, then reports the fig's own manifest checks.
|
|
293
|
-
|
|
292
|
+
it, then reports the fig's own manifest checks. These are static checks over
|
|
293
|
+
the served bytes — nothing is laid out and nothing runs locally. Exits
|
|
294
|
+
non-zero on any failure, so it can gate a publish. Run it after
|
|
295
|
+
\`fig create\`/\`fig revise\`.
|
|
294
296
|
|
|
295
297
|
Scaffold:
|
|
296
298
|
Print the canonical fig authoring scaffold — the exact system prompt Figura
|
|
@@ -394,31 +396,31 @@ Team binding:
|
|
|
394
396
|
When the cwd isn't linked to a team (no .figura/config.json above it — inside
|
|
395
397
|
a git repo or not, including a bare temp/scratchpad dir), they refuse to fall
|
|
396
398
|
back to the global ~/.figura credential — run \`figura link\` to bind this
|
|
397
|
-
directory, or pass --allow-global (env FIGURA_ALLOW_GLOBAL=1) to override.`;async function
|
|
398
|
-
`)}async function
|
|
399
|
+
directory, or pass --allow-global (env FIGURA_ALLOW_GLOBAL=1) to override.`;async function Wq(){let c=[];for await(let $ of process.stdin)c.push(Buffer.from($));return Buffer.concat(c).toString("utf8")}function pW(c){if(!c)return;let $=c.split(",").map((Q)=>Q.trim()).filter(Boolean);return $.length?$:void 0}function CY(c){if(c.status!=="draft")return;process.stderr.write(`→ draft — not in the team library yet · commit with: figura fig commit ${c.id}
|
|
400
|
+
`)}async function OK(c){let{flags:$}=t(c),{token:Q,apiUrl:J}=await Kc($,{mutate:!0}),Y=f($,"file"),X;if(Y)try{X=await AY.readFile(Y,"utf8")}catch(j){Z(`could not read --file: ${y(j)}`)}else{if(process.stdin.isTTY)Z("No --file given and stdin is a TTY. Pipe HTML or pass --file <path>.");X=await Wq()}if(!X.trim())Z("HTML content is empty.");let W=f($,"issue"),m=W!==void 0?Number(W):void 0;if(m!==void 0&&!Number.isFinite(m))Z("--issue must be a number.");let G={html:X},z=f($,"title"),x=f($,"description"),q=f($,"area"),M=pW(f($,"tags")),N=f($,"orientation"),w=f($,"mode"),U=f($,"model"),v=f($,"device");if(z!==void 0)G.title=z;if(x!==void 0)G.description=x;if(q!==void 0)G.area=q;if(M!==void 0)G.tags=M;if(N!==void 0)G.orientation=N;if(w!==void 0)G.mode=w;if(U!==void 0)G.model=U;if(v!==void 0)G.device=v;if(m!==void 0)G.issue=m;if(k($,"publish"))G.publish=!0;if(k($,"commit"))G.status="published";G.toolchain=C6();let i;try{i=await Wc("/v1/figs",{method:"POST",body:G,token:Q,apiUrl:J,source:Gc})}catch(j){Z(y(j))}if(k($,"json")){ic(i),CY(i);return}ic({id:i.id,slug:i.slug,status:i.status??null,isPublic:i.isPublic??!1,url:i.url??null,viewUrl:i.viewUrl??null}),CY(i)}async function RK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)Z("Usage: figura fig revise <id> [--file <path>]");let{token:Y,apiUrl:X}=await Kc($,{mutate:!0}),W=f($,"file"),m;if(W)try{m=await AY.readFile(W,"utf8")}catch(_){Z(`could not read --file: ${y(_)}`)}else{if(process.stdin.isTTY)Z("No --file given and stdin is a TTY. Pipe HTML or pass --file <path>.");m=await Wq()}if(!m.trim())Z("HTML content is empty.");let G=f($,"issue"),z=G!==void 0?Number(G):void 0;if(z!==void 0&&!Number.isFinite(z))Z("--issue must be a number.");let x={html:m},q=f($,"title"),M=f($,"description"),N=f($,"area"),w=pW(f($,"tags")),U=f($,"orientation"),v=f($,"mode"),i=f($,"model"),j=f($,"device");if(q!==void 0)x.title=q;if(M!==void 0)x.description=M;if(N!==void 0)x.area=N;if(w!==void 0)x.tags=w;if(U!==void 0)x.orientation=U;if(v!==void 0)x.mode=v;if(i!==void 0)x.model=i;if(j!==void 0)x.device=j;if(z!==void 0)x.issue=z;if(k($,"publish"))x.publish=!0;if(k($,"commit"))x.status="published";let D;try{D=await Wc(`/v1/figs/${encodeURIComponent(J)}/revise`,{method:"POST",body:x,token:Y,apiUrl:X,source:Gc})}catch(_){Z(y(_))}if(k($,"json")){ic(D),CY(D);return}ic({id:D.id,slug:D.slug,version:D.version,rootFigId:D.rootFigId,status:D.status??null,isPublic:D.isPublic??!1,url:D.url??null,viewUrl:D.viewUrl??null}),CY(D)}async function pK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)Z("Usage: figura fig request-feedback <id> --from <name|email> [--note <text>]");let{token:Y,apiUrl:X}=await Kc($,{mutate:!0}),W=f($,"from");if(!W)Z("--from is required (the teammate to ask, by name or email).");let m=f($,"note"),G={from:W};if(m!==void 0)G.note=m;let z;try{z=await Wc(`/v1/figs/${encodeURIComponent(J)}/request-feedback`,{method:"POST",body:G,token:Y,apiUrl:X,source:Gc})}catch(q){Z(y(q))}if(k($,"json")){ic(z);return}let x=z.request?.to??W;if(process.stdout.write(`Requested ${x}'s feedback.
|
|
399
401
|
`),z.figUrl)process.stdout.write(`${z.figUrl}
|
|
400
|
-
`)}async function
|
|
402
|
+
`)}async function ZK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)Z("Usage: figura fig update <id> [options]");let{token:Y,apiUrl:X}=await Kc($,{mutate:!0}),W={},m=f($,"title"),G=f($,"description"),z=f($,"area"),x=pW(f($,"tags")),q=f($,"status");if(m!==void 0)W.title=m;if(G!==void 0)W.description=G;if(z!==void 0)W.area=z;if(x!==void 0)W.tags=x;if(q!==void 0)W.status=q;if(f($,"file"))Z("`fig update` changes metadata only — it can't replace the HTML. Use `fig revise <id> --file <html>` to save a new version (the old one is kept).");if(Object.keys(W).length===0)Z("Nothing to update. Pass at least one of --title/--description/--area/--tags/--status.");let M;try{M=await Wc(`/v1/figs/${encodeURIComponent(J)}`,{method:"PATCH",body:W,token:Y,apiUrl:X,source:Gc})}catch(N){Z(y(N))}if(k($,"json")){ic(M);return}ic({id:M.id,slug:M.slug,status:M.status})}async function IK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)Z("Usage: figura fig delete <id> [--hard]");let{token:Y,apiUrl:X}=await Kc($,{mutate:!0}),W=k($,"hard"),m;try{m=await Wc(`/v1/figs/${encodeURIComponent(J)}${W?"?hard=true":""}`,{method:"DELETE",token:Y,apiUrl:X,source:Gc})}catch(G){Z(y(G))}ic(m??{ok:!0})}async function LK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)Z("Usage: figura fig revisions <id>");let{token:Y,apiUrl:X}=await Kc($),W;try{W=await Wc(`/v1/figs/${encodeURIComponent(J)}/revisions`,{token:Y,apiUrl:X,source:Gc})}catch(G){Z(y(G))}if(k($,"json")){ic(W);return}let m=Array.isArray(W)?W:W.revisions??W.items??[];if(!m.length){process.stdout.write(`No revisions.
|
|
401
403
|
`);return}for(let G of m)process.stdout.write(`v${G.version} ${G.id} ${G.title??G.slug}
|
|
402
|
-
`)}async function
|
|
403
|
-
`);return}let{token:Q,apiUrl:J}=await Kc($),Y=new URLSearchParams;for(let m of["platform","device","area","orientation","mode"]){let G=f($,m);if(G!==void 0)Y.set(m,G)}let X=Y.toString(),W;try{W=await Wc(`/v1/fig/scaffold${X?`?${X}`:""}`,{token:Q,apiUrl:J,source:Gc})}catch(m){
|
|
404
|
-
`)}async function
|
|
405
|
-
`);return}let{token:Q,apiUrl:J}=await Kc($),Y;try{Y=await Wc("/v1/fig/devices",{token:Q,apiUrl:J,source:Gc})}catch(W){
|
|
404
|
+
`)}async function _K(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(RW+`
|
|
405
|
+
`);return}let{token:Q,apiUrl:J}=await Kc($),Y=new URLSearchParams;for(let m of["platform","device","area","orientation","mode"]){let G=f($,m);if(G!==void 0)Y.set(m,G)}let X=Y.toString(),W;try{W=await Wc(`/v1/fig/scaffold${X?`?${X}`:""}`,{token:Q,apiUrl:J,source:Gc})}catch(m){Z(y(m))}if(k($,"json")){ic(W);return}process.stdout.write((W.scaffold??"")+`
|
|
406
|
+
`)}async function SK(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(RW+`
|
|
407
|
+
`);return}let{token:Q,apiUrl:J}=await Kc($),Y;try{Y=await Wc("/v1/fig/devices",{token:Q,apiUrl:J,source:Gc})}catch(W){Z(y(W))}if(k($,"json")){ic(Y);return}let X=Y.devices??[];if(!X.length){process.stdout.write(`No devices.
|
|
406
408
|
`);return}process.stdout.write(`ID LABEL PORTRAIT CUTOUT RADIUS
|
|
407
409
|
`);for(let W of X){let m=W.id===Y.default?" (default)":"";process.stdout.write(`${W.id}${m} ${W.label} ${W.logical.portrait.w}×${W.logical.portrait.h} ${W.cutout} ${W.cornerRadius}
|
|
408
|
-
`)}}async function
|
|
410
|
+
`)}}async function AK(c){let{flags:$}=t(c),{token:Q,apiUrl:J}=await Kc($),Y=new URLSearchParams,X=f($,"area"),W=f($,"tag"),m=f($,"limit");if(X)Y.set("area",X);if(W)Y.set("tag",W);if(m)Y.set("limit",m);let G=Y.toString(),z;try{z=await Wc(`/v1/figs${G?`?${G}`:""}`,{token:Q,apiUrl:J,source:Gc})}catch(q){Z(y(q))}let x=Array.isArray(z)?z:z.items??[];if(k($,"json")){ic(z);return}if(!x.length){process.stdout.write(`No figs.
|
|
409
411
|
`);return}for(let q of x){let M=q.tags?.length?` #${q.tags.join(" #")}`:"";process.stdout.write(`${q.id} ${q.area??"-"} ${q.title??q.slug}${M}
|
|
410
|
-
`)}}async function
|
|
411
|
-
`)}),Y.unref()}async function
|
|
412
|
+
`)}}async function CK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)Z("Usage: figura fig get <id>");let{token:Y,apiUrl:X}=await Kc($),W;try{W=await Wc(`/v1/figs/${encodeURIComponent(J)}`,{token:Y,apiUrl:X,source:Gc})}catch(m){Z(y(m))}ic(W)}async function PK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)Z("Usage: figura fig buzz-payload <id> [--channel <uuid>] [--json]");let Y=await Kc($),{token:X,apiUrl:W}=Y,m;try{m=await Wc(`/v1/figs/${encodeURIComponent(J)}`,{token:X,apiUrl:W,source:Gc})}catch(q){Z(y(q))}let G=m.id??J,z=G.replace(/^fig_/,"").trim();if(!z)Z("Could not resolve the fig public id from the API response.");let x=Qq({figId:G,publicId:z,title:m.title||m.slug||"Untitled fig",isPublic:m.isPublic,viewUrl:typeof m.viewUrl==="string"?m.viewUrl:void 0,channel:f($,"channel")});if(k($,"json")){ic(x);return}process.stdout.write(Jq(x))}async function EK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)Z("Usage: figura fig commit <id>");let{token:Y,apiUrl:X}=await Kc($,{mutate:!0}),W;try{W=await Wc(`/v1/figs/${encodeURIComponent(J)}/commit`,{method:"POST",body:{},token:Y,apiUrl:X,source:Gc})}catch(m){Z(y(m))}ic(W)}async function bK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)Z("Usage: figura fig uncommit <id>");let{token:Y,apiUrl:X}=await Kc($,{mutate:!0}),W;try{W=await Wc(`/v1/figs/${encodeURIComponent(J)}/uncommit`,{method:"POST",body:{},token:Y,apiUrl:X,source:Gc})}catch(m){Z(y(m))}ic(W)}async function FK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)Z("Usage: figura fig publish <id> [--unpublish]");let{token:Y,apiUrl:X}=await Kc($,{mutate:!0}),W=!k($,"unpublish"),m;try{m=await Wc(`/v1/figs/${encodeURIComponent(J)}/publish`,{method:"POST",body:{isPublic:W},token:Y,apiUrl:X,source:Gc})}catch(G){Z(y(G))}ic(m)}function Yq(c){let $=process.platform,Q,J;if($==="darwin")Q="open",J=[c];else if($==="win32")Q="cmd",J=["/c","start","",c];else Q="xdg-open",J=[c];let Y=HK(Q,J,{stdio:"ignore",detached:!0});Y.on("error",()=>{process.stderr.write(`figura: could not open browser; file is at ${c}
|
|
413
|
+
`)}),Y.unref()}async function TK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)Z("Usage: figura fig open <id> [--print] [--local]");let{token:Y,apiUrl:X}=await Kc($);if(k($,"print")){let z;try{z=await VY(`/v1/figs/${encodeURIComponent(J)}/raw`,{token:Y,apiUrl:X,source:Gc})}catch(x){Z(y(x))}if(process.stdout.write(z),!z.endsWith(`
|
|
412
414
|
`))process.stdout.write(`
|
|
413
|
-
`);return}if(!k($,"local")){let z;try{z=await Wc(`/v1/figs/${encodeURIComponent(J)}`,{token:Y,apiUrl:X,source:Gc})}catch(x){
|
|
414
|
-
`);return}}let W;try{W=await
|
|
415
|
-
`)}var
|
|
415
|
+
`);return}if(!k($,"local")){let z;try{z=await Wc(`/v1/figs/${encodeURIComponent(J)}`,{token:Y,apiUrl:X,source:Gc})}catch(x){Z(y(x))}if(z.viewUrl){Yq(z.viewUrl),process.stdout.write(`Opening ${z.viewUrl}
|
|
416
|
+
`);return}}let W;try{W=await VY(`/v1/figs/${encodeURIComponent(J)}/raw`,{token:Y,apiUrl:X,source:Gc})}catch(z){Z(y(z))}let m=await r9(),G=BK(m,`figura-fig-${J.replace(/[^a-zA-Z0-9_-]/g,"")}.html`);await AY.mkdir(m,{recursive:!0}),await AY.writeFile(G,hK(W),"utf8"),Yq(G),process.stdout.write(`Opening ${G}
|
|
417
|
+
`)}var fK=[{marker:"fig-device",component:"device-frame",sizedBy:/\.fig-device\.portrait\s*\{[^}]*width\s*:/i},{marker:"frame-web",component:"browser-chrome",sizedBy:/\.frame-web\s*\{[^}]*width\s*:/i},{marker:"fig-statusbar",component:"status-bar",sizedBy:/\.fig-statusbar\s*\{[^}]*height\s*:/i},{marker:"fig-controls",component:"control-bar",sizedBy:/\.fig-controls\s*\{[^}]*display\s*:/i}];function nK(c){let $=c.match(/<script\b[^>]*id=["']fig-manifest["'][^>]*>([\s\S]*?)<\/script>/i)?.[1];if(!$)return null;try{return JSON.parse($)}catch{return null}}function uK(c,$){return new RegExp(`class\\s*=\\s*["'][^"']*(?<![\\w-])${$}(?![\\w-])`,"i").test(c)}function kK(c){let $=[],Q=nK(c),J=Array.isArray(Q?.components)?Q.components:[];$.push({check:"manifest",ok:!!Q,detail:Q?"fig manifest present and parseable":"no readable fig manifest in the served HTML"});for(let{marker:X,component:W,sizedBy:m}of fK){if(!uK(c,X))continue;let G=m.test(c);if($.push({check:`component:${W}`,ok:G,detail:G?`.${X} is used in markup and the served CSS sizes it`:`.${X} is used in markup but NO served CSS gives it dimensions — every one of them renders as an empty box`}),!J.includes(W)&&!G)$.push({check:`manifest.components:${W}`,ok:!1,detail:`manifest components ${JSON.stringify(J)} omits "${W}" while the markup uses .${X}`})}let Y=Q?.checks??{};if(Y.frameKit===!1)$.push({check:"checks.frameKit",ok:!1,detail:"the fig records its own frame-kit contradiction — it draws a .fig-device but no frame geometry was stamped, so every phone renders with no dimensions"});if(Y.complete===!1)$.push({check:"checks.complete",ok:!1,detail:"the document looks truncated (unclosed html/body — the generation was cut off)"});if(Y.doubleFramed===!0)$.push({check:"checks.doubleFramed",ok:!1,detail:"declares a whole-fig figura:artboard meta AND draws an in-fig .fig-device — it renders framed twice"});return $}async function aK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)Z("Usage: figura fig verify <id> [--json]");let{token:Y,apiUrl:X}=await Kc($),W;try{W=await VY(`/v1/figs/${encodeURIComponent(J)}/raw`,{token:Y,apiUrl:X,source:Gc})}catch(z){Z(y(z))}let m=kK(W),G=m.filter((z)=>!z.ok);if(k($,"json")){if(ic({id:J,ok:G.length===0,findings:m}),G.length)process.exit(1);return}for(let z of m)process.stdout.write(`${z.ok?"ok ":"FAIL"} ${z.check} — ${z.detail}
|
|
416
418
|
`);if(G.length)process.stderr.write(`
|
|
417
419
|
figura: ${G.length} check(s) failed on the served fig — it will not render as authored.
|
|
418
420
|
`+`If a frame class is unsized, re-land the fig; the kit is stamped at save time.
|
|
419
421
|
`),process.exit(1);process.stdout.write(`
|
|
420
422
|
The served fig renders as authored.
|
|
421
|
-
`)}var
|
|
423
|
+
`)}var Xq=`<meta http-equiv="Content-Security-Policy" content="connect-src 'none'; base-uri 'none'; form-action 'none';">`;function lK(c){let $=c.match(/<head[^>]*>/i);if($){let Q=$.index+$[0].length;return c.slice(0,Q)+Xq+c.slice(Q)}return Xq+c}function hK(c){return`<!DOCTYPE html>
|
|
422
424
|
<html lang="en">
|
|
423
425
|
<head>
|
|
424
426
|
<meta charset="utf-8">
|
|
@@ -427,23 +429,23 @@ The served fig renders as authored.
|
|
|
427
429
|
<style>html,body{margin:0;height:100%;background:#0a0a0a}iframe{border:0;display:block;width:100vw;height:100vh}</style>
|
|
428
430
|
</head>
|
|
429
431
|
<body>
|
|
430
|
-
<iframe title="Figura fig" sandbox="allow-scripts" srcdoc="${
|
|
432
|
+
<iframe title="Figura fig" sandbox="allow-scripts" srcdoc="${lK(c).replace(/&/g,"&").replace(/"/g,""")}"></iframe>
|
|
431
433
|
</body>
|
|
432
434
|
</html>
|
|
433
|
-
`}async function
|
|
434
|
-
`);return}switch($){case"create":return
|
|
435
|
+
`}async function mq(c){let $=c[0],Q=c.slice(1);if(!$||$==="--help"||$==="-h"||$==="help"){process.stdout.write(RW+`
|
|
436
|
+
`);return}switch($){case"create":return OK(Q);case"revise":return RK(Q);case"revisions":return LK(Q);case"request-feedback":return pK(Q);case"update":return ZK(Q);case"delete":return IK(Q);case"commit":return EK(Q);case"uncommit":return bK(Q);case"publish":return FK(Q);case"list":return AK(Q);case"get":return CK(Q);case"buzz-payload":return PK(Q);case"scaffold":return _K(Q);case"devices":return SK(Q);case"open":return TK(Q);case"verify":return aK(Q);default:Z(`Unknown fig subcommand '${$}'. See \`figura fig --help\`.`)}}U0();var yK=`figura comment — add a comment to a fig
|
|
435
437
|
|
|
436
438
|
Usage:
|
|
437
|
-
figura comment <fig-id> --body "your comment" [--json]`;async function
|
|
438
|
-
`);return}let J=Q[0];if(!J)
|
|
439
|
-
`)}
|
|
439
|
+
figura comment <fig-id> --body "your comment" [--json]`;async function Gq(c){let{flags:$,positionals:Q}=t(c);if($.help||$.h){process.stdout.write(yK+`
|
|
440
|
+
`);return}let J=Q[0];if(!J)Z('Usage: figura comment <fig-id> --body "..."');let Y=f($,"body");if(!Y)Z("--body is required.");let{token:X,apiUrl:W}=await Kc($,{mutate:!0}),m;try{m=await Wc(`/v1/figs/${encodeURIComponent(J)}/comments`,{method:"POST",body:{body:Y},token:X,apiUrl:W,source:Gc})}catch(G){Z(y(G))}if(k($,"json")){ic(m);return}process.stdout.write(`Comment ${m.id} added.
|
|
441
|
+
`)}U0();v0();var oK=`figura token — inspect API token state
|
|
440
442
|
|
|
441
443
|
Usage:
|
|
442
|
-
figura token current [--json] Show details of the active token`;async function
|
|
444
|
+
figura token current [--json] Show details of the active token`;async function gK(c){let{flags:$}=t(c),Q=await Kc($),{token:J,apiUrl:Y,tokenSource:X,projectConfigPath:W}=Q,m;try{m=await Wc("/v1/whoami",{token:J,apiUrl:Y,source:Gc})}catch(x){Z(y(x))}let G={source:X,configPath:X==="project"?W:X==="global"?i0:null};if(k($,"json")){ic({token:m.token??null,team:m.team??null,scopes:m.scopes??[],binding:G});return}if(m.actor&&m.actor!=="token"){process.stdout.write(`The active credentials are a ${m.actor} session, not an API token.
|
|
443
445
|
`);return}let z=[];if(z.push(`id: ${m.token?.id??"-"}`),z.push(`name: ${m.token?.name??"-"}`),z.push(`prefix: ${m.token?.prefix??"-"}`),m.team)z.push(`team: ${m.team.slug??m.team.id??"-"}`);if(m.scopes?.length)z.push(`scopes: ${m.scopes.join(", ")}`);z.push(`bound: ${G.source}${G.configPath?` (${G.configPath})`:""}`),process.stdout.write(z.join(`
|
|
444
446
|
`)+`
|
|
445
|
-
`)}async function
|
|
446
|
-
`);return}switch($){case"current":return
|
|
447
|
+
`)}async function zq(c){let $=c[0],Q=c.slice(1);if(!$||$==="--help"||$==="-h"||$==="help"){process.stdout.write(oK+`
|
|
448
|
+
`);return}switch($){case"current":return gK(Q);default:Z(`Unknown token subcommand '${$}'. See \`figura token --help\`.`)}}U0();var dK=`figura sources — manage the company-brain source spine
|
|
447
449
|
|
|
448
450
|
Usage:
|
|
449
451
|
figura sources connect --kind <git|claude_mem> --ref <owner/repo> [options]
|
|
@@ -458,13 +460,13 @@ Connect options:
|
|
|
458
460
|
--export-path <str> claude_mem export file path (.json/.jsonl)
|
|
459
461
|
|
|
460
462
|
Sync:
|
|
461
|
-
--id <id> Sync one source; omit to sync every connected source`;async function
|
|
463
|
+
--id <id> Sync one source; omit to sync every connected source`;async function sK(c){let{flags:$}=t(c),{token:Q,apiUrl:J}=await Kc($,{mutate:!0}),Y=f($,"kind");if(!Y)Z("--kind is required (git | claude_mem).");let X=f($,"ref"),W={},m=f($,"branch"),G=f($,"export-path");if(m!==void 0)W.defaultBranch=m;if(G!==void 0)W.exportPath=G;let z={kind:Y};if(X!==void 0)z.externalRef=X;let x=f($,"name");if(x!==void 0)z.displayName=x;if(Object.keys(W).length)z.config=W;let q;try{q=await Wc("/v1/sources",{method:"POST",body:z,token:Q,apiUrl:J,source:Gc})}catch(M){Z(y(M))}ic(q.source)}async function rK(c){let{flags:$}=t(c),{token:Q,apiUrl:J}=await Kc($),Y;try{Y=await Wc("/v1/sources",{token:Q,apiUrl:J,source:Gc})}catch(W){Z(y(W))}if(k($,"json")){ic(Y);return}let X=Y.sources??[];if(!X.length){process.stdout.write(`No sources connected.
|
|
462
464
|
`);return}for(let W of X){let m=W.lastSyncedAt?W.lastSyncedAt:"never";process.stdout.write(`${W.id} ${W.kind} ${W.externalRef??"-"} ${W.eventCount??0} events ${W.status??"-"} synced ${m}
|
|
463
|
-
`)}}async function
|
|
464
|
-
`);return}for(let m of W)try{let G=await
|
|
465
|
+
`)}}async function xq(c,$,Q){return Wc(`/v1/sources/${encodeURIComponent(c)}/sync`,{method:"POST",token:$,apiUrl:Q,source:Gc})}async function tK(c){let{flags:$}=t(c),{token:Q,apiUrl:J}=await Kc($,{mutate:!0}),Y=f($,"id");if(Y){try{ic({id:Y,...await xq(Y,Q,J)})}catch(m){Z(y(m))}return}let X;try{X=await Wc("/v1/sources",{token:Q,apiUrl:J,source:Gc})}catch(m){Z(y(m))}let W=X.sources??[];if(!W.length){process.stdout.write(`No sources to sync.
|
|
466
|
+
`);return}for(let m of W)try{let G=await xq(m.id,Q,J);process.stdout.write(`${m.id} ${m.kind} ${m.externalRef??"-"} ingested ${G.ingested}/${G.fetched}
|
|
465
467
|
`)}catch(G){process.stderr.write(`${m.id} ERROR ${y(G)}
|
|
466
|
-
`)}}async function
|
|
467
|
-
`);return}switch($){case"connect":return
|
|
468
|
+
`)}}async function qq(c){let $=c[0],Q=c.slice(1);if(!$||$==="--help"||$==="-h"||$==="help"){process.stdout.write(dK+`
|
|
469
|
+
`);return}switch($){case"connect":return sK(Q);case"list":return rK(Q);case"sync":return tK(Q);default:Z(`Unknown sources subcommand '${$}'. See \`figura sources --help\`.`)}}v0();import{spawn as eK}from"node:child_process";import{existsSync as c2}from"node:fs";import{fileURLToPath as $2}from"node:url";var Q2=`figura mcp — run the Figura MCP server (stdio) for Claude Code
|
|
468
470
|
|
|
469
471
|
Usage:
|
|
470
472
|
figura mcp
|
|
@@ -475,11 +477,11 @@ Add it to Claude Code with:
|
|
|
475
477
|
Serves the same tools as the standalone figura-mcp package, but ships inside the
|
|
476
478
|
CLI (one install, nothing to fetch) and resolves your team from the nearest
|
|
477
479
|
.figura/config.json — so a per-project login (figura login --project) gives each
|
|
478
|
-
repo its own team automatically.`;function
|
|
480
|
+
repo its own team automatically.`;function J2(){let c=[new URL("./mcp.js",import.meta.url),new URL("../../../mcp/src/index.ts",import.meta.url)].map(($)=>$2($));for(let $ of c)if(c2($))return $;process.stderr.write(`figura: MCP server not found — reinstall figura-cli:
|
|
479
481
|
`+` curl -fsSL https://figura.so/install.sh | bash
|
|
480
|
-
`),process.exit(1)}async function
|
|
481
|
-
`);return}let $=await W0({}),Q={...process.env};if($.token&&!Q.FIGURA_TOKEN)Q.FIGURA_TOKEN=$.token;if($.apiUrl&&!Q.FIGURA_API_URL)Q.FIGURA_API_URL=$.apiUrl;let J=
|
|
482
|
-
`),process.exit(1)}),Y.on("exit",(X,W)=>{if(W)process.kill(process.pid,W);else process.exit(X??0)})}import{fileURLToPath as
|
|
482
|
+
`),process.exit(1)}async function Mq(c){if(c.includes("--help")||c.includes("-h")){process.stdout.write(Q2+`
|
|
483
|
+
`);return}let $=await W0({}),Q={...process.env};if($.token&&!Q.FIGURA_TOKEN)Q.FIGURA_TOKEN=$.token;if($.apiUrl&&!Q.FIGURA_API_URL)Q.FIGURA_API_URL=$.apiUrl;let J=J2(),Y=eK(process.execPath,[J],{stdio:"inherit",env:Q});Y.on("error",(X)=>{process.stderr.write(`figura: failed to start MCP server: ${X.message}
|
|
484
|
+
`),process.exit(1)}),Y.on("exit",(X,W)=>{if(W)process.kill(process.pid,W);else process.exit(X??0)})}import{fileURLToPath as Y2}from"node:url";NY();var PY="figura-cli",X2=`figura upgrade — print the command to update the Figura CLI
|
|
483
485
|
|
|
484
486
|
Usage:
|
|
485
487
|
figura upgrade [--version <v>]
|
|
@@ -493,18 +495,18 @@ no self-mutation. Copy the printed command and run it yourself.
|
|
|
493
495
|
|
|
494
496
|
Options:
|
|
495
497
|
--version <v> print the command for a specific version instead of latest
|
|
496
|
-
--help, -h show this help`;function
|
|
498
|
+
--help, -h show this help`;function W2(c,$){let Q=$.replace(/\\/g,"/");if(Q.includes("/_npx/")||c.npm_command==="exec")return"npx";if(Q.includes("/.bun/install/cache/"))return"bunx";return null}function m2(c,$){let Q=c.generic?`Update ${PY} (and the bundled MCP server) with your package manager's global install, e.g.:`:`To update ${PY} (and the bundled MCP server), run:`,J=$?"Your skills refresh automatically the next time Claude Code starts.":`Then finish the Claude Code integration (skills, auto-update, badge):
|
|
497
499
|
|
|
498
500
|
figura install`;return`${Q}
|
|
499
501
|
|
|
500
502
|
${c.command}
|
|
501
503
|
|
|
502
504
|
${J}
|
|
503
|
-
`}async function
|
|
504
|
-
`);return}let Q=f($,"version")||"latest",J=
|
|
505
|
+
`}async function Nq(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(X2+`
|
|
506
|
+
`);return}let Q=f($,"version")||"latest",J=Y2(import.meta.url),Y=W2(process.env,J);if(Y){process.stdout.write(`figura is running via ${Y} — there's no installed copy to update. `+`Rerun with @latest to get the newest:
|
|
505
507
|
|
|
506
|
-
${Y} ${
|
|
507
|
-
`);return}let X=await
|
|
508
|
+
${Y} ${PY}@${Q}
|
|
509
|
+
`);return}let X=await MY(PY,Q),W=await u6();process.stdout.write(m2(X,W))}import{homedir as G2}from"node:os";import{join as z2}from"node:path";F$();v0();rQ();UY();var x2=`figura doctor — check the CLI, MCP, and skills are up to date
|
|
508
510
|
|
|
509
511
|
Usage:
|
|
510
512
|
figura doctor [--session-start]
|
|
@@ -520,24 +522,24 @@ at \`figura upgrade\` / \`figura skill install\` if anything is behind.
|
|
|
520
522
|
(engine \`latest\`, hash-verified; bundled fallback offline) and,
|
|
521
523
|
if the CLI is behind, prints a one-line notice pointing at
|
|
522
524
|
\`figura upgrade\` — never self-executes, never blocks startup,
|
|
523
|
-
never errors out. The registry is checked at most once a day.`,l$=
|
|
524
|
-
`)}async function
|
|
525
|
+
never errors out. The registry is checked at most once a day.`,l$=z2(G2(),".claude","skills"),Vq=1500;async function q2(c=4000){try{let{apiUrl:$,token:Q}=await W0({});return await vY(u$,{apiUrl:$,token:Q,timeoutMs:c})}catch{return null}}function wq(c){let{stamp:$,installedFigHash:Q,referenceVersion:J,referenceHash:Y}=c,X=VW({stamp:$,installedHash:Q,bundledHash:Y,referenceVersion:J}),W=$!=null&&J!=null&&R0(J,$);return{status:X,behind:W,reference:J}}var M2=1e4;function N2(c,$,Q,J){if(c)return c;return dQ($,Q,J).latest??null}async function V2(){let c=f0(),$=Date.now(),Q=[];try{let J=DY(l$),Y=J$(l$),{apiUrl:X,token:W}=await W0({}).catch(()=>({apiUrl:void 0,token:void 0})),m=await vY(u$,{apiUrl:X,token:W,timeoutMs:Vq}),G=m?.version??k$(),z=m?.hash??BY(),{status:x,behind:q}=wq({stamp:J,installedFigHash:Y,referenceVersion:G,referenceHash:z});if(Y!=null&&(q||x==="modified"||x==="stale")){let M=await iW(l$,{apiUrl:X,token:W,timeoutMs:Vq}).catch(()=>null);if(M){let N=q?`${J??"?"} → ${G??"?"}`:"content changed";Q.push(`skill was behind (${N}); reinstalled from ${M.source}.`)}}}catch{}try{let J=await H8(),Y=c6(J,$)?J.latest:void 0;if(!Y){let X=await $W(1500);if(X)Y=X,await sQ({...J,latest:X,checkedAt:$})}if(Y&&R0(Y,c))Q.push(`figura-cli ${c} → ${Y}: run \`figura upgrade\` to update.`)}catch{}if(Q.length)process.stdout.write("[figura] "+Q.join(" ")+`
|
|
526
|
+
`)}async function w2(c){let $=f0(),Q=await $W(M2),J=DY(l$),Y=J$(l$),X={};try{X=await H8()}catch{}let{apiUrl:W}=await W0({apiUrlFlag:f(c,"api-url")}).catch(()=>({apiUrl:""})),m=n$(W),G=N2(Q,X,m,Date.now());if(Q)try{await sQ({...X,latest:Q,checkedAt:Date.now()})}catch{}let z=await q2(),x=z?.version??k$(),q=z?.hash??BY(),{status:M,behind:N}=wq({stamp:J,installedFigHash:Y,referenceVersion:x,referenceHash:q}),w=z?"":" (offline — vs bundled floor)",U=(()=>{switch(M){case"pristine":return`pristine (v${J??x??"?"})${w}`;case"stale":return`behind (v${J??"?"} → v${x??"?"}) — run \`figura skill install\`${w}`;case"modified":return`MODIFIED (differs from the canonical /fig skill) — run \`figura skill install\` to restore it${w}`;case"absent":return"not installed — run `figura skill install`"}})(),v=[];v.push(`figura-cli ${$}${G?` (latest ${G})`:" (latest: unknown)"}`),v.push("MCP server bundled in the CLI — same version"),v.push(`skill /fig ${J??"unstamped"}${x?` (canonical ${x})`:""} in ${l$}`),v.push(` ${U}`);let i=G&&R0(G,$);v.push(""),v.push(i?`Update available (${$} → ${G}): run \`figura upgrade\` for the command.`:N||M==="modified"?"Your /fig skill is behind or modified: run `figura skill install`.":G?"✓ Everything is up to date.":"Couldn't reach the npm registry to check for a newer CLI — try again later."),process.stdout.write(v.join(`
|
|
525
527
|
`)+`
|
|
526
|
-
`)}async function
|
|
527
|
-
`);return}if(k($,"session-start")){await G2().catch(()=>{});return}await z2($)}import{readFile as MZ}from"node:fs/promises";var E={};vQ(E,{void:()=>o2,util:()=>wc,unknown:()=>h2,union:()=>r2,undefined:()=>k2,tuple:()=>cD,transformer:()=>xD,symbol:()=>u2,string:()=>Kq,strictObject:()=>s2,setErrorMap:()=>M2,set:()=>JD,record:()=>$D,quotelessJson:()=>x2,promise:()=>zD,preprocess:()=>ND,pipeline:()=>VD,ostring:()=>wD,optional:()=>qD,onumber:()=>iD,oboolean:()=>vD,objectUtil:()=>RW,object:()=>d2,number:()=>Dq,nullable:()=>MD,null:()=>a2,never:()=>y2,nativeEnum:()=>GD,nan:()=>T2,map:()=>QD,makeIssue:()=>$J,literal:()=>WD,lazy:()=>XD,late:()=>b2,isValid:()=>p8,isDirty:()=>EY,isAsync:()=>y$,isAborted:()=>PY,intersection:()=>e2,instanceof:()=>F2,getParsedType:()=>s0,getErrorMap:()=>h$,function:()=>YD,enum:()=>mD,effect:()=>xD,discriminatedUnion:()=>t2,defaultErrorMap:()=>m8,datetimeRegex:()=>vq,date:()=>n2,custom:()=>jq,coerce:()=>UD,boolean:()=>Bq,bigint:()=>f2,array:()=>g2,any:()=>l2,addIssueToContext:()=>n,ZodVoid:()=>JJ,ZodUnknown:()=>I8,ZodUnion:()=>t$,ZodUndefined:()=>s$,ZodType:()=>Mc,ZodTuple:()=>t0,ZodTransformer:()=>l0,ZodSymbol:()=>QJ,ZodString:()=>n0,ZodSet:()=>W$,ZodSchema:()=>Mc,ZodRecord:()=>YJ,ZodReadonly:()=>XQ,ZodPromise:()=>m$,ZodPipeline:()=>mJ,ZodParsedType:()=>F,ZodOptional:()=>k0,ZodObject:()=>Cc,ZodNumber:()=>Z8,ZodNullable:()=>z8,ZodNull:()=>r$,ZodNever:()=>r0,ZodNativeEnum:()=>QQ,ZodNaN:()=>WJ,ZodMap:()=>XJ,ZodLiteral:()=>$Q,ZodLazy:()=>cQ,ZodIssueCode:()=>L,ZodIntersection:()=>e$,ZodFunction:()=>g$,ZodFirstPartyTypeKind:()=>Qc,ZodError:()=>x0,ZodEnum:()=>_8,ZodEffects:()=>l0,ZodDiscriminatedUnion:()=>bY,ZodDefault:()=>JQ,ZodDate:()=>Y$,ZodCatch:()=>YQ,ZodBranded:()=>FY,ZodBoolean:()=>d$,ZodBigInt:()=>L8,ZodArray:()=>u0,ZodAny:()=>X$,Schema:()=>Mc,ParseStatus:()=>oc,OK:()=>ec,NEVER:()=>jD,INVALID:()=>$c,EMPTY_PATH:()=>N2,DIRTY:()=>J$,BRAND:()=>E2});var wc;(function(c){c.assertEqual=(Y)=>{};function $(Y){}c.assertIs=$;function Q(Y){throw Error()}c.assertNever=Q,c.arrayToEnum=(Y)=>{let X={};for(let W of Y)X[W]=W;return X},c.getValidEnumValues=(Y)=>{let X=c.objectKeys(Y).filter((m)=>typeof Y[Y[m]]!=="number"),W={};for(let m of X)W[m]=Y[m];return c.objectValues(W)},c.objectValues=(Y)=>{return c.objectKeys(Y).map(function(X){return Y[X]})},c.objectKeys=typeof Object.keys==="function"?(Y)=>Object.keys(Y):(Y)=>{let X=[];for(let W in Y)if(Object.prototype.hasOwnProperty.call(Y,W))X.push(W);return X},c.find=(Y,X)=>{for(let W of Y)if(X(W))return W;return},c.isInteger=typeof Number.isInteger==="function"?(Y)=>Number.isInteger(Y):(Y)=>typeof Y==="number"&&Number.isFinite(Y)&&Math.floor(Y)===Y;function J(Y,X=" | "){return Y.map((W)=>typeof W==="string"?`'${W}'`:W).join(X)}c.joinValues=J,c.jsonStringifyReplacer=(Y,X)=>{if(typeof X==="bigint")return X.toString();return X}})(wc||(wc={}));var RW;(function(c){c.mergeShapes=($,Q)=>{return{...$,...Q}}})(RW||(RW={}));var F=wc.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),s0=(c)=>{switch(typeof c){case"undefined":return F.undefined;case"string":return F.string;case"number":return Number.isNaN(c)?F.nan:F.number;case"boolean":return F.boolean;case"function":return F.function;case"bigint":return F.bigint;case"symbol":return F.symbol;case"object":if(Array.isArray(c))return F.array;if(c===null)return F.null;if(c.then&&typeof c.then==="function"&&c.catch&&typeof c.catch==="function")return F.promise;if(typeof Map<"u"&&c instanceof Map)return F.map;if(typeof Set<"u"&&c instanceof Set)return F.set;if(typeof Date<"u"&&c instanceof Date)return F.date;return F.object;default:return F.unknown}};var L=wc.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"]),x2=(c)=>{return JSON.stringify(c,null,2).replace(/"([^"]+)":/g,"$1:")};class x0 extends Error{get errors(){return this.issues}constructor(c){super();this.issues=[],this.addIssue=(Q)=>{this.issues=[...this.issues,Q]},this.addIssues=(Q=[])=>{this.issues=[...this.issues,...Q]};let $=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,$);else this.__proto__=$;this.name="ZodError",this.issues=c}format(c){let $=c||function(Y){return Y.message},Q={_errors:[]},J=(Y)=>{for(let X of Y.issues)if(X.code==="invalid_union")X.unionErrors.map(J);else if(X.code==="invalid_return_type")J(X.returnTypeError);else if(X.code==="invalid_arguments")J(X.argumentsError);else if(X.path.length===0)Q._errors.push($(X));else{let W=Q,m=0;while(m<X.path.length){let G=X.path[m];if(m!==X.path.length-1)W[G]=W[G]||{_errors:[]};else W[G]=W[G]||{_errors:[]},W[G]._errors.push($(X));W=W[G],m++}}};return J(this),Q}static assert(c){if(!(c instanceof x0))throw Error(`Not a ZodError: ${c}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,wc.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(c=($)=>$.message){let $={},Q=[];for(let J of this.issues)if(J.path.length>0){let Y=J.path[0];$[Y]=$[Y]||[],$[Y].push(c(J))}else Q.push(c(J));return{formErrors:Q,fieldErrors:$}}get formErrors(){return this.flatten()}}x0.create=(c)=>{return new x0(c)};var q2=(c,$)=>{let Q;switch(c.code){case L.invalid_type:if(c.received===F.undefined)Q="Required";else Q=`Expected ${c.expected}, received ${c.received}`;break;case L.invalid_literal:Q=`Invalid literal value, expected ${JSON.stringify(c.expected,wc.jsonStringifyReplacer)}`;break;case L.unrecognized_keys:Q=`Unrecognized key(s) in object: ${wc.joinValues(c.keys,", ")}`;break;case L.invalid_union:Q="Invalid input";break;case L.invalid_union_discriminator:Q=`Invalid discriminator value. Expected ${wc.joinValues(c.options)}`;break;case L.invalid_enum_value:Q=`Invalid enum value. Expected ${wc.joinValues(c.options)}, received '${c.received}'`;break;case L.invalid_arguments:Q="Invalid function arguments";break;case L.invalid_return_type:Q="Invalid function return type";break;case L.invalid_date:Q="Invalid date";break;case L.invalid_string:if(typeof c.validation==="object")if("includes"in c.validation){if(Q=`Invalid input: must include "${c.validation.includes}"`,typeof c.validation.position==="number")Q=`${Q} at one or more positions greater than or equal to ${c.validation.position}`}else if("startsWith"in c.validation)Q=`Invalid input: must start with "${c.validation.startsWith}"`;else if("endsWith"in c.validation)Q=`Invalid input: must end with "${c.validation.endsWith}"`;else wc.assertNever(c.validation);else if(c.validation!=="regex")Q=`Invalid ${c.validation}`;else Q="Invalid";break;case L.too_small:if(c.type==="array")Q=`Array must contain ${c.exact?"exactly":c.inclusive?"at least":"more than"} ${c.minimum} element(s)`;else if(c.type==="string")Q=`String must contain ${c.exact?"exactly":c.inclusive?"at least":"over"} ${c.minimum} character(s)`;else if(c.type==="number")Q=`Number must be ${c.exact?"exactly equal to ":c.inclusive?"greater than or equal to ":"greater than "}${c.minimum}`;else if(c.type==="bigint")Q=`Number must be ${c.exact?"exactly equal to ":c.inclusive?"greater than or equal to ":"greater than "}${c.minimum}`;else if(c.type==="date")Q=`Date must be ${c.exact?"exactly equal to ":c.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(c.minimum))}`;else Q="Invalid input";break;case L.too_big:if(c.type==="array")Q=`Array must contain ${c.exact?"exactly":c.inclusive?"at most":"less than"} ${c.maximum} element(s)`;else if(c.type==="string")Q=`String must contain ${c.exact?"exactly":c.inclusive?"at most":"under"} ${c.maximum} character(s)`;else if(c.type==="number")Q=`Number must be ${c.exact?"exactly":c.inclusive?"less than or equal to":"less than"} ${c.maximum}`;else if(c.type==="bigint")Q=`BigInt must be ${c.exact?"exactly":c.inclusive?"less than or equal to":"less than"} ${c.maximum}`;else if(c.type==="date")Q=`Date must be ${c.exact?"exactly":c.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(c.maximum))}`;else Q="Invalid input";break;case L.custom:Q="Invalid input";break;case L.invalid_intersection_types:Q="Intersection results could not be merged";break;case L.not_multiple_of:Q=`Number must be a multiple of ${c.multipleOf}`;break;case L.not_finite:Q="Number must be finite";break;default:Q=$.defaultError,wc.assertNever(c)}return{message:Q}},m8=q2;var Mq=m8;function M2(c){Mq=c}function h$(){return Mq}var $J=(c)=>{let{data:$,path:Q,errorMaps:J,issueData:Y}=c,X=[...Q,...Y.path||[]],W={...Y,path:X};if(Y.message!==void 0)return{...Y,path:X,message:Y.message};let m="",G=J.filter((z)=>!!z).slice().reverse();for(let z of G)m=z(W,{data:$,defaultError:m}).message;return{...Y,path:X,message:m}},N2=[];function n(c,$){let Q=h$(),J=$J({issueData:$,data:c.data,path:c.path,errorMaps:[c.common.contextualErrorMap,c.schemaErrorMap,Q,Q===m8?void 0:m8].filter((Y)=>!!Y)});c.common.issues.push(J)}class oc{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(c,$){let Q=[];for(let J of $){if(J.status==="aborted")return $c;if(J.status==="dirty")c.dirty();Q.push(J.value)}return{status:c.value,value:Q}}static async mergeObjectAsync(c,$){let Q=[];for(let J of $){let Y=await J.key,X=await J.value;Q.push({key:Y,value:X})}return oc.mergeObjectSync(c,Q)}static mergeObjectSync(c,$){let Q={};for(let J of $){let{key:Y,value:X}=J;if(Y.status==="aborted")return $c;if(X.status==="aborted")return $c;if(Y.status==="dirty")c.dirty();if(X.status==="dirty")c.dirty();if(Y.value!=="__proto__"&&(typeof X.value<"u"||J.alwaysSet))Q[Y.value]=X.value}return{status:c.value,value:Q}}}var $c=Object.freeze({status:"aborted"}),J$=(c)=>({status:"dirty",value:c}),ec=(c)=>({status:"valid",value:c}),PY=(c)=>c.status==="aborted",EY=(c)=>c.status==="dirty",p8=(c)=>c.status==="valid",y$=(c)=>typeof Promise<"u"&&c instanceof Promise;var s;(function(c){c.errToObj=($)=>typeof $==="string"?{message:$}:$||{},c.toString=($)=>typeof $==="string"?$:$?.message})(s||(s={}));class a0{constructor(c,$,Q,J){this._cachedPath=[],this.parent=c,this.data=$,this._path=Q,this._key=J}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var Nq=(c,$)=>{if(p8($))return{success:!0,data:$.value};else{if(!c.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let Q=new x0(c.common.issues);return this._error=Q,this._error}}}};function zc(c){if(!c)return{};let{errorMap:$,invalid_type_error:Q,required_error:J,description:Y}=c;if($&&(Q||J))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if($)return{errorMap:$,description:Y};return{errorMap:(W,m)=>{let{message:G}=c;if(W.code==="invalid_enum_value")return{message:G??m.defaultError};if(typeof m.data>"u")return{message:G??J??m.defaultError};if(W.code!=="invalid_type")return{message:m.defaultError};return{message:G??Q??m.defaultError}},description:Y}}class Mc{get description(){return this._def.description}_getType(c){return s0(c.data)}_getOrReturnCtx(c,$){return $||{common:c.parent.common,data:c.data,parsedType:s0(c.data),schemaErrorMap:this._def.errorMap,path:c.path,parent:c.parent}}_processInputParams(c){return{status:new oc,ctx:{common:c.parent.common,data:c.data,parsedType:s0(c.data),schemaErrorMap:this._def.errorMap,path:c.path,parent:c.parent}}}_parseSync(c){let $=this._parse(c);if(y$($))throw Error("Synchronous parse encountered promise.");return $}_parseAsync(c){let $=this._parse(c);return Promise.resolve($)}parse(c,$){let Q=this.safeParse(c,$);if(Q.success)return Q.data;throw Q.error}safeParse(c,$){let Q={common:{issues:[],async:$?.async??!1,contextualErrorMap:$?.errorMap},path:$?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:c,parsedType:s0(c)},J=this._parseSync({data:c,path:Q.path,parent:Q});return Nq(Q,J)}"~validate"(c){let $={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:c,parsedType:s0(c)};if(!this["~standard"].async)try{let Q=this._parseSync({data:c,path:[],parent:$});return p8(Q)?{value:Q.value}:{issues:$.common.issues}}catch(Q){if(Q?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;$.common={issues:[],async:!0}}return this._parseAsync({data:c,path:[],parent:$}).then((Q)=>p8(Q)?{value:Q.value}:{issues:$.common.issues})}async parseAsync(c,$){let Q=await this.safeParseAsync(c,$);if(Q.success)return Q.data;throw Q.error}async safeParseAsync(c,$){let Q={common:{issues:[],contextualErrorMap:$?.errorMap,async:!0},path:$?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:c,parsedType:s0(c)},J=this._parse({data:c,path:Q.path,parent:Q}),Y=await(y$(J)?J:Promise.resolve(J));return Nq(Q,Y)}refine(c,$){let Q=(J)=>{if(typeof $==="string"||typeof $>"u")return{message:$};else if(typeof $==="function")return $(J);else return $};return this._refinement((J,Y)=>{let X=c(J),W=()=>Y.addIssue({code:L.custom,...Q(J)});if(typeof Promise<"u"&&X instanceof Promise)return X.then((m)=>{if(!m)return W(),!1;else return!0});if(!X)return W(),!1;else return!0})}refinement(c,$){return this._refinement((Q,J)=>{if(!c(Q))return J.addIssue(typeof $==="function"?$(Q,J):$),!1;else return!0})}_refinement(c){return new l0({schema:this,typeName:Qc.ZodEffects,effect:{type:"refinement",refinement:c}})}superRefine(c){return this._refinement(c)}constructor(c){this.spa=this.safeParseAsync,this._def=c,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),this["~standard"]={version:1,vendor:"zod",validate:($)=>this["~validate"]($)}}optional(){return k0.create(this,this._def)}nullable(){return z8.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return u0.create(this)}promise(){return m$.create(this,this._def)}or(c){return t$.create([this,c],this._def)}and(c){return e$.create(this,c,this._def)}transform(c){return new l0({...zc(this._def),schema:this,typeName:Qc.ZodEffects,effect:{type:"transform",transform:c}})}default(c){let $=typeof c==="function"?c:()=>c;return new JQ({...zc(this._def),innerType:this,defaultValue:$,typeName:Qc.ZodDefault})}brand(){return new FY({typeName:Qc.ZodBranded,type:this,...zc(this._def)})}catch(c){let $=typeof c==="function"?c:()=>c;return new YQ({...zc(this._def),innerType:this,catchValue:$,typeName:Qc.ZodCatch})}describe(c){return new this.constructor({...this._def,description:c})}pipe(c){return mJ.create(this,c)}readonly(){return XQ.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var V2=/^c[^\s-]{8,}$/i,w2=/^[0-9a-z]+$/,i2=/^[0-9A-HJKMNP-TV-Z]{26}$/i,v2=/^[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,U2=/^[a-z0-9_-]{21}$/i,j2=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,K2=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,D2=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,B2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",pW,H2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,O2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,R2=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,p2=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,I2=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Z2=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,wq="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",L2=new RegExp(`^${wq}$`);function iq(c){let $="[0-5]\\d";if(c.precision)$=`${$}\\.\\d{${c.precision}}`;else if(c.precision==null)$=`${$}(\\.\\d+)?`;let Q=c.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${$})${Q}`}function _2(c){return new RegExp(`^${iq(c)}$`)}function vq(c){let $=`${wq}T${iq(c)}`,Q=[];if(Q.push(c.local?"Z?":"Z"),c.offset)Q.push("([+-]\\d{2}:?\\d{2})");return $=`${$}(${Q.join("|")})`,new RegExp(`^${$}$`)}function S2(c,$){if(($==="v4"||!$)&&H2.test(c))return!0;if(($==="v6"||!$)&&R2.test(c))return!0;return!1}function A2(c,$){if(!j2.test(c))return!1;try{let[Q]=c.split(".");if(!Q)return!1;let J=Q.replace(/-/g,"+").replace(/_/g,"/").padEnd(Q.length+(4-Q.length%4)%4,"="),Y=JSON.parse(atob(J));if(typeof Y!=="object"||Y===null)return!1;if("typ"in Y&&Y?.typ!=="JWT")return!1;if(!Y.alg)return!1;if($&&Y.alg!==$)return!1;return!0}catch{return!1}}function C2(c,$){if(($==="v4"||!$)&&O2.test(c))return!0;if(($==="v6"||!$)&&p2.test(c))return!0;return!1}class n0 extends Mc{_parse(c){if(this._def.coerce)c.data=String(c.data);if(this._getType(c)!==F.string){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_type,expected:F.string,received:Y.parsedType}),$c}let Q=new oc,J=void 0;for(let Y of this._def.checks)if(Y.kind==="min"){if(c.data.length<Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_small,minimum:Y.value,type:"string",inclusive:!0,exact:!1,message:Y.message}),Q.dirty()}else if(Y.kind==="max"){if(c.data.length>Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_big,maximum:Y.value,type:"string",inclusive:!0,exact:!1,message:Y.message}),Q.dirty()}else if(Y.kind==="length"){let X=c.data.length>Y.value,W=c.data.length<Y.value;if(X||W){if(J=this._getOrReturnCtx(c,J),X)n(J,{code:L.too_big,maximum:Y.value,type:"string",inclusive:!0,exact:!0,message:Y.message});else if(W)n(J,{code:L.too_small,minimum:Y.value,type:"string",inclusive:!0,exact:!0,message:Y.message});Q.dirty()}}else if(Y.kind==="email"){if(!D2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"email",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="emoji"){if(!pW)pW=new RegExp(B2,"u");if(!pW.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"emoji",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="uuid"){if(!v2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"uuid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="nanoid"){if(!U2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"nanoid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="cuid"){if(!V2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"cuid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="cuid2"){if(!w2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"cuid2",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="ulid"){if(!i2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"ulid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="url")try{new URL(c.data)}catch{J=this._getOrReturnCtx(c,J),n(J,{validation:"url",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="regex"){if(Y.regex.lastIndex=0,!Y.regex.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"regex",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="trim")c.data=c.data.trim();else if(Y.kind==="includes"){if(!c.data.includes(Y.value,Y.position))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:{includes:Y.value,position:Y.position},message:Y.message}),Q.dirty()}else if(Y.kind==="toLowerCase")c.data=c.data.toLowerCase();else if(Y.kind==="toUpperCase")c.data=c.data.toUpperCase();else if(Y.kind==="startsWith"){if(!c.data.startsWith(Y.value))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:{startsWith:Y.value},message:Y.message}),Q.dirty()}else if(Y.kind==="endsWith"){if(!c.data.endsWith(Y.value))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:{endsWith:Y.value},message:Y.message}),Q.dirty()}else if(Y.kind==="datetime"){if(!vq(Y).test(c.data))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:"datetime",message:Y.message}),Q.dirty()}else if(Y.kind==="date"){if(!L2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:"date",message:Y.message}),Q.dirty()}else if(Y.kind==="time"){if(!_2(Y).test(c.data))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:"time",message:Y.message}),Q.dirty()}else if(Y.kind==="duration"){if(!K2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"duration",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="ip"){if(!S2(c.data,Y.version))J=this._getOrReturnCtx(c,J),n(J,{validation:"ip",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="jwt"){if(!A2(c.data,Y.alg))J=this._getOrReturnCtx(c,J),n(J,{validation:"jwt",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="cidr"){if(!C2(c.data,Y.version))J=this._getOrReturnCtx(c,J),n(J,{validation:"cidr",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="base64"){if(!I2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"base64",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="base64url"){if(!Z2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"base64url",code:L.invalid_string,message:Y.message}),Q.dirty()}else wc.assertNever(Y);return{status:Q.value,value:c.data}}_regex(c,$,Q){return this.refinement((J)=>c.test(J),{validation:$,code:L.invalid_string,...s.errToObj(Q)})}_addCheck(c){return new n0({...this._def,checks:[...this._def.checks,c]})}email(c){return this._addCheck({kind:"email",...s.errToObj(c)})}url(c){return this._addCheck({kind:"url",...s.errToObj(c)})}emoji(c){return this._addCheck({kind:"emoji",...s.errToObj(c)})}uuid(c){return this._addCheck({kind:"uuid",...s.errToObj(c)})}nanoid(c){return this._addCheck({kind:"nanoid",...s.errToObj(c)})}cuid(c){return this._addCheck({kind:"cuid",...s.errToObj(c)})}cuid2(c){return this._addCheck({kind:"cuid2",...s.errToObj(c)})}ulid(c){return this._addCheck({kind:"ulid",...s.errToObj(c)})}base64(c){return this._addCheck({kind:"base64",...s.errToObj(c)})}base64url(c){return this._addCheck({kind:"base64url",...s.errToObj(c)})}jwt(c){return this._addCheck({kind:"jwt",...s.errToObj(c)})}ip(c){return this._addCheck({kind:"ip",...s.errToObj(c)})}cidr(c){return this._addCheck({kind:"cidr",...s.errToObj(c)})}datetime(c){if(typeof c==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:c});return this._addCheck({kind:"datetime",precision:typeof c?.precision>"u"?null:c?.precision,offset:c?.offset??!1,local:c?.local??!1,...s.errToObj(c?.message)})}date(c){return this._addCheck({kind:"date",message:c})}time(c){if(typeof c==="string")return this._addCheck({kind:"time",precision:null,message:c});return this._addCheck({kind:"time",precision:typeof c?.precision>"u"?null:c?.precision,...s.errToObj(c?.message)})}duration(c){return this._addCheck({kind:"duration",...s.errToObj(c)})}regex(c,$){return this._addCheck({kind:"regex",regex:c,...s.errToObj($)})}includes(c,$){return this._addCheck({kind:"includes",value:c,position:$?.position,...s.errToObj($?.message)})}startsWith(c,$){return this._addCheck({kind:"startsWith",value:c,...s.errToObj($)})}endsWith(c,$){return this._addCheck({kind:"endsWith",value:c,...s.errToObj($)})}min(c,$){return this._addCheck({kind:"min",value:c,...s.errToObj($)})}max(c,$){return this._addCheck({kind:"max",value:c,...s.errToObj($)})}length(c,$){return this._addCheck({kind:"length",value:c,...s.errToObj($)})}nonempty(c){return this.min(1,s.errToObj(c))}trim(){return new n0({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new n0({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new n0({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((c)=>c.kind==="datetime")}get isDate(){return!!this._def.checks.find((c)=>c.kind==="date")}get isTime(){return!!this._def.checks.find((c)=>c.kind==="time")}get isDuration(){return!!this._def.checks.find((c)=>c.kind==="duration")}get isEmail(){return!!this._def.checks.find((c)=>c.kind==="email")}get isURL(){return!!this._def.checks.find((c)=>c.kind==="url")}get isEmoji(){return!!this._def.checks.find((c)=>c.kind==="emoji")}get isUUID(){return!!this._def.checks.find((c)=>c.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((c)=>c.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((c)=>c.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((c)=>c.kind==="cuid2")}get isULID(){return!!this._def.checks.find((c)=>c.kind==="ulid")}get isIP(){return!!this._def.checks.find((c)=>c.kind==="ip")}get isCIDR(){return!!this._def.checks.find((c)=>c.kind==="cidr")}get isBase64(){return!!this._def.checks.find((c)=>c.kind==="base64")}get isBase64url(){return!!this._def.checks.find((c)=>c.kind==="base64url")}get minLength(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c}get maxLength(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c}}n0.create=(c)=>{return new n0({checks:[],typeName:Qc.ZodString,coerce:c?.coerce??!1,...zc(c)})};function P2(c,$){let Q=(c.toString().split(".")[1]||"").length,J=($.toString().split(".")[1]||"").length,Y=Q>J?Q:J,X=Number.parseInt(c.toFixed(Y).replace(".","")),W=Number.parseInt($.toFixed(Y).replace(".",""));return X%W/10**Y}class Z8 extends Mc{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(c){if(this._def.coerce)c.data=Number(c.data);if(this._getType(c)!==F.number){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_type,expected:F.number,received:Y.parsedType}),$c}let Q=void 0,J=new oc;for(let Y of this._def.checks)if(Y.kind==="int"){if(!wc.isInteger(c.data))Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.invalid_type,expected:"integer",received:"float",message:Y.message}),J.dirty()}else if(Y.kind==="min"){if(Y.inclusive?c.data<Y.value:c.data<=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_small,minimum:Y.value,type:"number",inclusive:Y.inclusive,exact:!1,message:Y.message}),J.dirty()}else if(Y.kind==="max"){if(Y.inclusive?c.data>Y.value:c.data>=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_big,maximum:Y.value,type:"number",inclusive:Y.inclusive,exact:!1,message:Y.message}),J.dirty()}else if(Y.kind==="multipleOf"){if(P2(c.data,Y.value)!==0)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.not_multiple_of,multipleOf:Y.value,message:Y.message}),J.dirty()}else if(Y.kind==="finite"){if(!Number.isFinite(c.data))Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.not_finite,message:Y.message}),J.dirty()}else wc.assertNever(Y);return{status:J.value,value:c.data}}gte(c,$){return this.setLimit("min",c,!0,s.toString($))}gt(c,$){return this.setLimit("min",c,!1,s.toString($))}lte(c,$){return this.setLimit("max",c,!0,s.toString($))}lt(c,$){return this.setLimit("max",c,!1,s.toString($))}setLimit(c,$,Q,J){return new Z8({...this._def,checks:[...this._def.checks,{kind:c,value:$,inclusive:Q,message:s.toString(J)}]})}_addCheck(c){return new Z8({...this._def,checks:[...this._def.checks,c]})}int(c){return this._addCheck({kind:"int",message:s.toString(c)})}positive(c){return this._addCheck({kind:"min",value:0,inclusive:!1,message:s.toString(c)})}negative(c){return this._addCheck({kind:"max",value:0,inclusive:!1,message:s.toString(c)})}nonpositive(c){return this._addCheck({kind:"max",value:0,inclusive:!0,message:s.toString(c)})}nonnegative(c){return this._addCheck({kind:"min",value:0,inclusive:!0,message:s.toString(c)})}multipleOf(c,$){return this._addCheck({kind:"multipleOf",value:c,message:s.toString($)})}finite(c){return this._addCheck({kind:"finite",message:s.toString(c)})}safe(c){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:s.toString(c)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:s.toString(c)})}get minValue(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c}get maxValue(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c}get isInt(){return!!this._def.checks.find((c)=>c.kind==="int"||c.kind==="multipleOf"&&wc.isInteger(c.value))}get isFinite(){let c=null,$=null;for(let Q of this._def.checks)if(Q.kind==="finite"||Q.kind==="int"||Q.kind==="multipleOf")return!0;else if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}else if(Q.kind==="max"){if(c===null||Q.value<c)c=Q.value}return Number.isFinite($)&&Number.isFinite(c)}}Z8.create=(c)=>{return new Z8({checks:[],typeName:Qc.ZodNumber,coerce:c?.coerce||!1,...zc(c)})};class L8 extends Mc{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(c){if(this._def.coerce)try{c.data=BigInt(c.data)}catch{return this._getInvalidInput(c)}if(this._getType(c)!==F.bigint)return this._getInvalidInput(c);let Q=void 0,J=new oc;for(let Y of this._def.checks)if(Y.kind==="min"){if(Y.inclusive?c.data<Y.value:c.data<=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_small,type:"bigint",minimum:Y.value,inclusive:Y.inclusive,message:Y.message}),J.dirty()}else if(Y.kind==="max"){if(Y.inclusive?c.data>Y.value:c.data>=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_big,type:"bigint",maximum:Y.value,inclusive:Y.inclusive,message:Y.message}),J.dirty()}else if(Y.kind==="multipleOf"){if(c.data%Y.value!==BigInt(0))Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.not_multiple_of,multipleOf:Y.value,message:Y.message}),J.dirty()}else wc.assertNever(Y);return{status:J.value,value:c.data}}_getInvalidInput(c){let $=this._getOrReturnCtx(c);return n($,{code:L.invalid_type,expected:F.bigint,received:$.parsedType}),$c}gte(c,$){return this.setLimit("min",c,!0,s.toString($))}gt(c,$){return this.setLimit("min",c,!1,s.toString($))}lte(c,$){return this.setLimit("max",c,!0,s.toString($))}lt(c,$){return this.setLimit("max",c,!1,s.toString($))}setLimit(c,$,Q,J){return new L8({...this._def,checks:[...this._def.checks,{kind:c,value:$,inclusive:Q,message:s.toString(J)}]})}_addCheck(c){return new L8({...this._def,checks:[...this._def.checks,c]})}positive(c){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:s.toString(c)})}negative(c){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:s.toString(c)})}nonpositive(c){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:s.toString(c)})}nonnegative(c){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:s.toString(c)})}multipleOf(c,$){return this._addCheck({kind:"multipleOf",value:c,message:s.toString($)})}get minValue(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c}get maxValue(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c}}L8.create=(c)=>{return new L8({checks:[],typeName:Qc.ZodBigInt,coerce:c?.coerce??!1,...zc(c)})};class d$ extends Mc{_parse(c){if(this._def.coerce)c.data=Boolean(c.data);if(this._getType(c)!==F.boolean){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.boolean,received:Q.parsedType}),$c}return ec(c.data)}}d$.create=(c)=>{return new d$({typeName:Qc.ZodBoolean,coerce:c?.coerce||!1,...zc(c)})};class Y$ extends Mc{_parse(c){if(this._def.coerce)c.data=new Date(c.data);if(this._getType(c)!==F.date){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_type,expected:F.date,received:Y.parsedType}),$c}if(Number.isNaN(c.data.getTime())){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_date}),$c}let Q=new oc,J=void 0;for(let Y of this._def.checks)if(Y.kind==="min"){if(c.data.getTime()<Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_small,message:Y.message,inclusive:!0,exact:!1,minimum:Y.value,type:"date"}),Q.dirty()}else if(Y.kind==="max"){if(c.data.getTime()>Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_big,message:Y.message,inclusive:!0,exact:!1,maximum:Y.value,type:"date"}),Q.dirty()}else wc.assertNever(Y);return{status:Q.value,value:new Date(c.data.getTime())}}_addCheck(c){return new Y$({...this._def,checks:[...this._def.checks,c]})}min(c,$){return this._addCheck({kind:"min",value:c.getTime(),message:s.toString($)})}max(c,$){return this._addCheck({kind:"max",value:c.getTime(),message:s.toString($)})}get minDate(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c!=null?new Date(c):null}get maxDate(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c!=null?new Date(c):null}}Y$.create=(c)=>{return new Y$({checks:[],coerce:c?.coerce||!1,typeName:Qc.ZodDate,...zc(c)})};class QJ extends Mc{_parse(c){if(this._getType(c)!==F.symbol){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.symbol,received:Q.parsedType}),$c}return ec(c.data)}}QJ.create=(c)=>{return new QJ({typeName:Qc.ZodSymbol,...zc(c)})};class s$ extends Mc{_parse(c){if(this._getType(c)!==F.undefined){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.undefined,received:Q.parsedType}),$c}return ec(c.data)}}s$.create=(c)=>{return new s$({typeName:Qc.ZodUndefined,...zc(c)})};class r$ extends Mc{_parse(c){if(this._getType(c)!==F.null){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.null,received:Q.parsedType}),$c}return ec(c.data)}}r$.create=(c)=>{return new r$({typeName:Qc.ZodNull,...zc(c)})};class X$ extends Mc{constructor(){super(...arguments);this._any=!0}_parse(c){return ec(c.data)}}X$.create=(c)=>{return new X$({typeName:Qc.ZodAny,...zc(c)})};class I8 extends Mc{constructor(){super(...arguments);this._unknown=!0}_parse(c){return ec(c.data)}}I8.create=(c)=>{return new I8({typeName:Qc.ZodUnknown,...zc(c)})};class r0 extends Mc{_parse(c){let $=this._getOrReturnCtx(c);return n($,{code:L.invalid_type,expected:F.never,received:$.parsedType}),$c}}r0.create=(c)=>{return new r0({typeName:Qc.ZodNever,...zc(c)})};class JJ extends Mc{_parse(c){if(this._getType(c)!==F.undefined){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.void,received:Q.parsedType}),$c}return ec(c.data)}}JJ.create=(c)=>{return new JJ({typeName:Qc.ZodVoid,...zc(c)})};class u0 extends Mc{_parse(c){let{ctx:$,status:Q}=this._processInputParams(c),J=this._def;if($.parsedType!==F.array)return n($,{code:L.invalid_type,expected:F.array,received:$.parsedType}),$c;if(J.exactLength!==null){let X=$.data.length>J.exactLength.value,W=$.data.length<J.exactLength.value;if(X||W)n($,{code:X?L.too_big:L.too_small,minimum:W?J.exactLength.value:void 0,maximum:X?J.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:J.exactLength.message}),Q.dirty()}if(J.minLength!==null){if($.data.length<J.minLength.value)n($,{code:L.too_small,minimum:J.minLength.value,type:"array",inclusive:!0,exact:!1,message:J.minLength.message}),Q.dirty()}if(J.maxLength!==null){if($.data.length>J.maxLength.value)n($,{code:L.too_big,maximum:J.maxLength.value,type:"array",inclusive:!0,exact:!1,message:J.maxLength.message}),Q.dirty()}if($.common.async)return Promise.all([...$.data].map((X,W)=>{return J.type._parseAsync(new a0($,X,$.path,W))})).then((X)=>{return oc.mergeArray(Q,X)});let Y=[...$.data].map((X,W)=>{return J.type._parseSync(new a0($,X,$.path,W))});return oc.mergeArray(Q,Y)}get element(){return this._def.type}min(c,$){return new u0({...this._def,minLength:{value:c,message:s.toString($)}})}max(c,$){return new u0({...this._def,maxLength:{value:c,message:s.toString($)}})}length(c,$){return new u0({...this._def,exactLength:{value:c,message:s.toString($)}})}nonempty(c){return this.min(1,c)}}u0.create=(c,$)=>{return new u0({type:c,minLength:null,maxLength:null,exactLength:null,typeName:Qc.ZodArray,...zc($)})};function o$(c){if(c instanceof Cc){let $={};for(let Q in c.shape){let J=c.shape[Q];$[Q]=k0.create(o$(J))}return new Cc({...c._def,shape:()=>$})}else if(c instanceof u0)return new u0({...c._def,type:o$(c.element)});else if(c instanceof k0)return k0.create(o$(c.unwrap()));else if(c instanceof z8)return z8.create(o$(c.unwrap()));else if(c instanceof t0)return t0.create(c.items.map(($)=>o$($)));else return c}class Cc extends Mc{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let c=this._def.shape(),$=wc.objectKeys(c);return this._cached={shape:c,keys:$},this._cached}_parse(c){if(this._getType(c)!==F.object){let G=this._getOrReturnCtx(c);return n(G,{code:L.invalid_type,expected:F.object,received:G.parsedType}),$c}let{status:Q,ctx:J}=this._processInputParams(c),{shape:Y,keys:X}=this._getCached(),W=[];if(!(this._def.catchall instanceof r0&&this._def.unknownKeys==="strip")){for(let G in J.data)if(!X.includes(G))W.push(G)}let m=[];for(let G of X){let z=Y[G],x=J.data[G];m.push({key:{status:"valid",value:G},value:z._parse(new a0(J,x,J.path,G)),alwaysSet:G in J.data})}if(this._def.catchall instanceof r0){let G=this._def.unknownKeys;if(G==="passthrough")for(let z of W)m.push({key:{status:"valid",value:z},value:{status:"valid",value:J.data[z]}});else if(G==="strict"){if(W.length>0)n(J,{code:L.unrecognized_keys,keys:W}),Q.dirty()}else if(G==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let G=this._def.catchall;for(let z of W){let x=J.data[z];m.push({key:{status:"valid",value:z},value:G._parse(new a0(J,x,J.path,z)),alwaysSet:z in J.data})}}if(J.common.async)return Promise.resolve().then(async()=>{let G=[];for(let z of m){let x=await z.key,q=await z.value;G.push({key:x,value:q,alwaysSet:z.alwaysSet})}return G}).then((G)=>{return oc.mergeObjectSync(Q,G)});else return oc.mergeObjectSync(Q,m)}get shape(){return this._def.shape()}strict(c){return s.errToObj,new Cc({...this._def,unknownKeys:"strict",...c!==void 0?{errorMap:($,Q)=>{let J=this._def.errorMap?.($,Q).message??Q.defaultError;if($.code==="unrecognized_keys")return{message:s.errToObj(c).message??J};return{message:J}}}:{}})}strip(){return new Cc({...this._def,unknownKeys:"strip"})}passthrough(){return new Cc({...this._def,unknownKeys:"passthrough"})}extend(c){return new Cc({...this._def,shape:()=>({...this._def.shape(),...c})})}merge(c){return new Cc({unknownKeys:c._def.unknownKeys,catchall:c._def.catchall,shape:()=>({...this._def.shape(),...c._def.shape()}),typeName:Qc.ZodObject})}setKey(c,$){return this.augment({[c]:$})}catchall(c){return new Cc({...this._def,catchall:c})}pick(c){let $={};for(let Q of wc.objectKeys(c))if(c[Q]&&this.shape[Q])$[Q]=this.shape[Q];return new Cc({...this._def,shape:()=>$})}omit(c){let $={};for(let Q of wc.objectKeys(this.shape))if(!c[Q])$[Q]=this.shape[Q];return new Cc({...this._def,shape:()=>$})}deepPartial(){return o$(this)}partial(c){let $={};for(let Q of wc.objectKeys(this.shape)){let J=this.shape[Q];if(c&&!c[Q])$[Q]=J;else $[Q]=J.optional()}return new Cc({...this._def,shape:()=>$})}required(c){let $={};for(let Q of wc.objectKeys(this.shape))if(c&&!c[Q])$[Q]=this.shape[Q];else{let Y=this.shape[Q];while(Y instanceof k0)Y=Y._def.innerType;$[Q]=Y}return new Cc({...this._def,shape:()=>$})}keyof(){return Uq(wc.objectKeys(this.shape))}}Cc.create=(c,$)=>{return new Cc({shape:()=>c,unknownKeys:"strip",catchall:r0.create(),typeName:Qc.ZodObject,...zc($)})};Cc.strictCreate=(c,$)=>{return new Cc({shape:()=>c,unknownKeys:"strict",catchall:r0.create(),typeName:Qc.ZodObject,...zc($)})};Cc.lazycreate=(c,$)=>{return new Cc({shape:c,unknownKeys:"strip",catchall:r0.create(),typeName:Qc.ZodObject,...zc($)})};class t$ extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q=this._def.options;function J(Y){for(let W of Y)if(W.result.status==="valid")return W.result;for(let W of Y)if(W.result.status==="dirty")return $.common.issues.push(...W.ctx.common.issues),W.result;let X=Y.map((W)=>new x0(W.ctx.common.issues));return n($,{code:L.invalid_union,unionErrors:X}),$c}if($.common.async)return Promise.all(Q.map(async(Y)=>{let X={...$,common:{...$.common,issues:[]},parent:null};return{result:await Y._parseAsync({data:$.data,path:$.path,parent:X}),ctx:X}})).then(J);else{let Y=void 0,X=[];for(let m of Q){let G={...$,common:{...$.common,issues:[]},parent:null},z=m._parseSync({data:$.data,path:$.path,parent:G});if(z.status==="valid")return z;else if(z.status==="dirty"&&!Y)Y={result:z,ctx:G};if(G.common.issues.length)X.push(G.common.issues)}if(Y)return $.common.issues.push(...Y.ctx.common.issues),Y.result;let W=X.map((m)=>new x0(m));return n($,{code:L.invalid_union,unionErrors:W}),$c}}get options(){return this._def.options}}t$.create=(c,$)=>{return new t$({options:c,typeName:Qc.ZodUnion,...zc($)})};var G8=(c)=>{if(c instanceof cQ)return G8(c.schema);else if(c instanceof l0)return G8(c.innerType());else if(c instanceof $Q)return[c.value];else if(c instanceof _8)return c.options;else if(c instanceof QQ)return wc.objectValues(c.enum);else if(c instanceof JQ)return G8(c._def.innerType);else if(c instanceof s$)return[void 0];else if(c instanceof r$)return[null];else if(c instanceof k0)return[void 0,...G8(c.unwrap())];else if(c instanceof z8)return[null,...G8(c.unwrap())];else if(c instanceof FY)return G8(c.unwrap());else if(c instanceof XQ)return G8(c.unwrap());else if(c instanceof YQ)return G8(c._def.innerType);else return[]};class bY extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c);if($.parsedType!==F.object)return n($,{code:L.invalid_type,expected:F.object,received:$.parsedType}),$c;let Q=this.discriminator,J=$.data[Q],Y=this.optionsMap.get(J);if(!Y)return n($,{code:L.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[Q]}),$c;if($.common.async)return Y._parseAsync({data:$.data,path:$.path,parent:$});else return Y._parseSync({data:$.data,path:$.path,parent:$})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(c,$,Q){let J=new Map;for(let Y of $){let X=G8(Y.shape[c]);if(!X.length)throw Error(`A discriminator value for key \`${c}\` could not be extracted from all schema options`);for(let W of X){if(J.has(W))throw Error(`Discriminator property ${String(c)} has duplicate value ${String(W)}`);J.set(W,Y)}}return new bY({typeName:Qc.ZodDiscriminatedUnion,discriminator:c,options:$,optionsMap:J,...zc(Q)})}}function IW(c,$){let Q=s0(c),J=s0($);if(c===$)return{valid:!0,data:c};else if(Q===F.object&&J===F.object){let Y=wc.objectKeys($),X=wc.objectKeys(c).filter((m)=>Y.indexOf(m)!==-1),W={...c,...$};for(let m of X){let G=IW(c[m],$[m]);if(!G.valid)return{valid:!1};W[m]=G.data}return{valid:!0,data:W}}else if(Q===F.array&&J===F.array){if(c.length!==$.length)return{valid:!1};let Y=[];for(let X=0;X<c.length;X++){let W=c[X],m=$[X],G=IW(W,m);if(!G.valid)return{valid:!1};Y.push(G.data)}return{valid:!0,data:Y}}else if(Q===F.date&&J===F.date&&+c===+$)return{valid:!0,data:c};else return{valid:!1}}class e$ extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c),J=(Y,X)=>{if(PY(Y)||PY(X))return $c;let W=IW(Y.value,X.value);if(!W.valid)return n(Q,{code:L.invalid_intersection_types}),$c;if(EY(Y)||EY(X))$.dirty();return{status:$.value,value:W.data}};if(Q.common.async)return Promise.all([this._def.left._parseAsync({data:Q.data,path:Q.path,parent:Q}),this._def.right._parseAsync({data:Q.data,path:Q.path,parent:Q})]).then(([Y,X])=>J(Y,X));else return J(this._def.left._parseSync({data:Q.data,path:Q.path,parent:Q}),this._def.right._parseSync({data:Q.data,path:Q.path,parent:Q}))}}e$.create=(c,$,Q)=>{return new e$({left:c,right:$,typeName:Qc.ZodIntersection,...zc(Q)})};class t0 extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.array)return n(Q,{code:L.invalid_type,expected:F.array,received:Q.parsedType}),$c;if(Q.data.length<this._def.items.length)return n(Q,{code:L.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$c;if(!this._def.rest&&Q.data.length>this._def.items.length)n(Q,{code:L.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$.dirty();let Y=[...Q.data].map((X,W)=>{let m=this._def.items[W]||this._def.rest;if(!m)return null;return m._parse(new a0(Q,X,Q.path,W))}).filter((X)=>!!X);if(Q.common.async)return Promise.all(Y).then((X)=>{return oc.mergeArray($,X)});else return oc.mergeArray($,Y)}get items(){return this._def.items}rest(c){return new t0({...this._def,rest:c})}}t0.create=(c,$)=>{if(!Array.isArray(c))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new t0({items:c,typeName:Qc.ZodTuple,rest:null,...zc($)})};class YJ extends Mc{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.object)return n(Q,{code:L.invalid_type,expected:F.object,received:Q.parsedType}),$c;let J=[],Y=this._def.keyType,X=this._def.valueType;for(let W in Q.data)J.push({key:Y._parse(new a0(Q,W,Q.path,W)),value:X._parse(new a0(Q,Q.data[W],Q.path,W)),alwaysSet:W in Q.data});if(Q.common.async)return oc.mergeObjectAsync($,J);else return oc.mergeObjectSync($,J)}get element(){return this._def.valueType}static create(c,$,Q){if($ instanceof Mc)return new YJ({keyType:c,valueType:$,typeName:Qc.ZodRecord,...zc(Q)});return new YJ({keyType:n0.create(),valueType:c,typeName:Qc.ZodRecord,...zc($)})}}class XJ extends Mc{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.map)return n(Q,{code:L.invalid_type,expected:F.map,received:Q.parsedType}),$c;let J=this._def.keyType,Y=this._def.valueType,X=[...Q.data.entries()].map(([W,m],G)=>{return{key:J._parse(new a0(Q,W,Q.path,[G,"key"])),value:Y._parse(new a0(Q,m,Q.path,[G,"value"]))}});if(Q.common.async){let W=new Map;return Promise.resolve().then(async()=>{for(let m of X){let G=await m.key,z=await m.value;if(G.status==="aborted"||z.status==="aborted")return $c;if(G.status==="dirty"||z.status==="dirty")$.dirty();W.set(G.value,z.value)}return{status:$.value,value:W}})}else{let W=new Map;for(let m of X){let{key:G,value:z}=m;if(G.status==="aborted"||z.status==="aborted")return $c;if(G.status==="dirty"||z.status==="dirty")$.dirty();W.set(G.value,z.value)}return{status:$.value,value:W}}}}XJ.create=(c,$,Q)=>{return new XJ({valueType:$,keyType:c,typeName:Qc.ZodMap,...zc(Q)})};class W$ extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.set)return n(Q,{code:L.invalid_type,expected:F.set,received:Q.parsedType}),$c;let J=this._def;if(J.minSize!==null){if(Q.data.size<J.minSize.value)n(Q,{code:L.too_small,minimum:J.minSize.value,type:"set",inclusive:!0,exact:!1,message:J.minSize.message}),$.dirty()}if(J.maxSize!==null){if(Q.data.size>J.maxSize.value)n(Q,{code:L.too_big,maximum:J.maxSize.value,type:"set",inclusive:!0,exact:!1,message:J.maxSize.message}),$.dirty()}let Y=this._def.valueType;function X(m){let G=new Set;for(let z of m){if(z.status==="aborted")return $c;if(z.status==="dirty")$.dirty();G.add(z.value)}return{status:$.value,value:G}}let W=[...Q.data.values()].map((m,G)=>Y._parse(new a0(Q,m,Q.path,G)));if(Q.common.async)return Promise.all(W).then((m)=>X(m));else return X(W)}min(c,$){return new W$({...this._def,minSize:{value:c,message:s.toString($)}})}max(c,$){return new W$({...this._def,maxSize:{value:c,message:s.toString($)}})}size(c,$){return this.min(c,$).max(c,$)}nonempty(c){return this.min(1,c)}}W$.create=(c,$)=>{return new W$({valueType:c,minSize:null,maxSize:null,typeName:Qc.ZodSet,...zc($)})};class g$ extends Mc{constructor(){super(...arguments);this.validate=this.implement}_parse(c){let{ctx:$}=this._processInputParams(c);if($.parsedType!==F.function)return n($,{code:L.invalid_type,expected:F.function,received:$.parsedType}),$c;function Q(W,m){return $J({data:W,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,h$(),m8].filter((G)=>!!G),issueData:{code:L.invalid_arguments,argumentsError:m}})}function J(W,m){return $J({data:W,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,h$(),m8].filter((G)=>!!G),issueData:{code:L.invalid_return_type,returnTypeError:m}})}let Y={errorMap:$.common.contextualErrorMap},X=$.data;if(this._def.returns instanceof m$){let W=this;return ec(async function(...m){let G=new x0([]),z=await W._def.args.parseAsync(m,Y).catch((M)=>{throw G.addIssue(Q(m,M)),G}),x=await Reflect.apply(X,this,z);return await W._def.returns._def.type.parseAsync(x,Y).catch((M)=>{throw G.addIssue(J(x,M)),G})})}else{let W=this;return ec(function(...m){let G=W._def.args.safeParse(m,Y);if(!G.success)throw new x0([Q(m,G.error)]);let z=Reflect.apply(X,this,G.data),x=W._def.returns.safeParse(z,Y);if(!x.success)throw new x0([J(z,x.error)]);return x.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...c){return new g$({...this._def,args:t0.create(c).rest(I8.create())})}returns(c){return new g$({...this._def,returns:c})}implement(c){return this.parse(c)}strictImplement(c){return this.parse(c)}static create(c,$,Q){return new g$({args:c?c:t0.create([]).rest(I8.create()),returns:$||I8.create(),typeName:Qc.ZodFunction,...zc(Q)})}}class cQ extends Mc{get schema(){return this._def.getter()}_parse(c){let{ctx:$}=this._processInputParams(c);return this._def.getter()._parse({data:$.data,path:$.path,parent:$})}}cQ.create=(c,$)=>{return new cQ({getter:c,typeName:Qc.ZodLazy,...zc($)})};class $Q extends Mc{_parse(c){if(c.data!==this._def.value){let $=this._getOrReturnCtx(c);return n($,{received:$.data,code:L.invalid_literal,expected:this._def.value}),$c}return{status:"valid",value:c.data}}get value(){return this._def.value}}$Q.create=(c,$)=>{return new $Q({value:c,typeName:Qc.ZodLiteral,...zc($)})};function Uq(c,$){return new _8({values:c,typeName:Qc.ZodEnum,...zc($)})}class _8 extends Mc{_parse(c){if(typeof c.data!=="string"){let $=this._getOrReturnCtx(c),Q=this._def.values;return n($,{expected:wc.joinValues(Q),received:$.parsedType,code:L.invalid_type}),$c}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(c.data)){let $=this._getOrReturnCtx(c),Q=this._def.values;return n($,{received:$.data,code:L.invalid_enum_value,options:Q}),$c}return ec(c.data)}get options(){return this._def.values}get enum(){let c={};for(let $ of this._def.values)c[$]=$;return c}get Values(){let c={};for(let $ of this._def.values)c[$]=$;return c}get Enum(){let c={};for(let $ of this._def.values)c[$]=$;return c}extract(c,$=this._def){return _8.create(c,{...this._def,...$})}exclude(c,$=this._def){return _8.create(this.options.filter((Q)=>!c.includes(Q)),{...this._def,...$})}}_8.create=Uq;class QQ extends Mc{_parse(c){let $=wc.getValidEnumValues(this._def.values),Q=this._getOrReturnCtx(c);if(Q.parsedType!==F.string&&Q.parsedType!==F.number){let J=wc.objectValues($);return n(Q,{expected:wc.joinValues(J),received:Q.parsedType,code:L.invalid_type}),$c}if(!this._cache)this._cache=new Set(wc.getValidEnumValues(this._def.values));if(!this._cache.has(c.data)){let J=wc.objectValues($);return n(Q,{received:Q.data,code:L.invalid_enum_value,options:J}),$c}return ec(c.data)}get enum(){return this._def.values}}QQ.create=(c,$)=>{return new QQ({values:c,typeName:Qc.ZodNativeEnum,...zc($)})};class m$ extends Mc{unwrap(){return this._def.type}_parse(c){let{ctx:$}=this._processInputParams(c);if($.parsedType!==F.promise&&$.common.async===!1)return n($,{code:L.invalid_type,expected:F.promise,received:$.parsedType}),$c;let Q=$.parsedType===F.promise?$.data:Promise.resolve($.data);return ec(Q.then((J)=>{return this._def.type.parseAsync(J,{path:$.path,errorMap:$.common.contextualErrorMap})}))}}m$.create=(c,$)=>{return new m$({type:c,typeName:Qc.ZodPromise,...zc($)})};class l0 extends Mc{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Qc.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(c){let{status:$,ctx:Q}=this._processInputParams(c),J=this._def.effect||null,Y={addIssue:(X)=>{if(n(Q,X),X.fatal)$.abort();else $.dirty()},get path(){return Q.path}};if(Y.addIssue=Y.addIssue.bind(Y),J.type==="preprocess"){let X=J.transform(Q.data,Y);if(Q.common.async)return Promise.resolve(X).then(async(W)=>{if($.value==="aborted")return $c;let m=await this._def.schema._parseAsync({data:W,path:Q.path,parent:Q});if(m.status==="aborted")return $c;if(m.status==="dirty")return J$(m.value);if($.value==="dirty")return J$(m.value);return m});else{if($.value==="aborted")return $c;let W=this._def.schema._parseSync({data:X,path:Q.path,parent:Q});if(W.status==="aborted")return $c;if(W.status==="dirty")return J$(W.value);if($.value==="dirty")return J$(W.value);return W}}if(J.type==="refinement"){let X=(W)=>{let m=J.refinement(W,Y);if(Q.common.async)return Promise.resolve(m);if(m instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return W};if(Q.common.async===!1){let W=this._def.schema._parseSync({data:Q.data,path:Q.path,parent:Q});if(W.status==="aborted")return $c;if(W.status==="dirty")$.dirty();return X(W.value),{status:$.value,value:W.value}}else return this._def.schema._parseAsync({data:Q.data,path:Q.path,parent:Q}).then((W)=>{if(W.status==="aborted")return $c;if(W.status==="dirty")$.dirty();return X(W.value).then(()=>{return{status:$.value,value:W.value}})})}if(J.type==="transform")if(Q.common.async===!1){let X=this._def.schema._parseSync({data:Q.data,path:Q.path,parent:Q});if(!p8(X))return $c;let W=J.transform(X.value,Y);if(W instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:$.value,value:W}}else return this._def.schema._parseAsync({data:Q.data,path:Q.path,parent:Q}).then((X)=>{if(!p8(X))return $c;return Promise.resolve(J.transform(X.value,Y)).then((W)=>({status:$.value,value:W}))});wc.assertNever(J)}}l0.create=(c,$,Q)=>{return new l0({schema:c,typeName:Qc.ZodEffects,effect:$,...zc(Q)})};l0.createWithPreprocess=(c,$,Q)=>{return new l0({schema:$,effect:{type:"preprocess",transform:c},typeName:Qc.ZodEffects,...zc(Q)})};class k0 extends Mc{_parse(c){if(this._getType(c)===F.undefined)return ec(void 0);return this._def.innerType._parse(c)}unwrap(){return this._def.innerType}}k0.create=(c,$)=>{return new k0({innerType:c,typeName:Qc.ZodOptional,...zc($)})};class z8 extends Mc{_parse(c){if(this._getType(c)===F.null)return ec(null);return this._def.innerType._parse(c)}unwrap(){return this._def.innerType}}z8.create=(c,$)=>{return new z8({innerType:c,typeName:Qc.ZodNullable,...zc($)})};class JQ extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q=$.data;if($.parsedType===F.undefined)Q=this._def.defaultValue();return this._def.innerType._parse({data:Q,path:$.path,parent:$})}removeDefault(){return this._def.innerType}}JQ.create=(c,$)=>{return new JQ({innerType:c,typeName:Qc.ZodDefault,defaultValue:typeof $.default==="function"?$.default:()=>$.default,...zc($)})};class YQ extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q={...$,common:{...$.common,issues:[]}},J=this._def.innerType._parse({data:Q.data,path:Q.path,parent:{...Q}});if(y$(J))return J.then((Y)=>{return{status:"valid",value:Y.status==="valid"?Y.value:this._def.catchValue({get error(){return new x0(Q.common.issues)},input:Q.data})}});else return{status:"valid",value:J.status==="valid"?J.value:this._def.catchValue({get error(){return new x0(Q.common.issues)},input:Q.data})}}removeCatch(){return this._def.innerType}}YQ.create=(c,$)=>{return new YQ({innerType:c,typeName:Qc.ZodCatch,catchValue:typeof $.catch==="function"?$.catch:()=>$.catch,...zc($)})};class WJ extends Mc{_parse(c){if(this._getType(c)!==F.nan){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.nan,received:Q.parsedType}),$c}return{status:"valid",value:c.data}}}WJ.create=(c)=>{return new WJ({typeName:Qc.ZodNaN,...zc(c)})};var E2=Symbol("zod_brand");class FY extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q=$.data;return this._def.type._parse({data:Q,path:$.path,parent:$})}unwrap(){return this._def.type}}class mJ extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.common.async)return(async()=>{let Y=await this._def.in._parseAsync({data:Q.data,path:Q.path,parent:Q});if(Y.status==="aborted")return $c;if(Y.status==="dirty")return $.dirty(),J$(Y.value);else return this._def.out._parseAsync({data:Y.value,path:Q.path,parent:Q})})();else{let J=this._def.in._parseSync({data:Q.data,path:Q.path,parent:Q});if(J.status==="aborted")return $c;if(J.status==="dirty")return $.dirty(),{status:"dirty",value:J.value};else return this._def.out._parseSync({data:J.value,path:Q.path,parent:Q})}}static create(c,$){return new mJ({in:c,out:$,typeName:Qc.ZodPipeline})}}class XQ extends Mc{_parse(c){let $=this._def.innerType._parse(c),Q=(J)=>{if(p8(J))J.value=Object.freeze(J.value);return J};return y$($)?$.then((J)=>Q(J)):Q($)}unwrap(){return this._def.innerType}}XQ.create=(c,$)=>{return new XQ({innerType:c,typeName:Qc.ZodReadonly,...zc($)})};function Vq(c,$){let Q=typeof c==="function"?c($):typeof c==="string"?{message:c}:c;return typeof Q==="string"?{message:Q}:Q}function jq(c,$={},Q){if(c)return X$.create().superRefine((J,Y)=>{let X=c(J);if(X instanceof Promise)return X.then((W)=>{if(!W){let m=Vq($,J),G=m.fatal??Q??!0;Y.addIssue({code:"custom",...m,fatal:G})}});if(!X){let W=Vq($,J),m=W.fatal??Q??!0;Y.addIssue({code:"custom",...W,fatal:m})}return});return X$.create()}var b2={object:Cc.lazycreate},Qc;(function(c){c.ZodString="ZodString",c.ZodNumber="ZodNumber",c.ZodNaN="ZodNaN",c.ZodBigInt="ZodBigInt",c.ZodBoolean="ZodBoolean",c.ZodDate="ZodDate",c.ZodSymbol="ZodSymbol",c.ZodUndefined="ZodUndefined",c.ZodNull="ZodNull",c.ZodAny="ZodAny",c.ZodUnknown="ZodUnknown",c.ZodNever="ZodNever",c.ZodVoid="ZodVoid",c.ZodArray="ZodArray",c.ZodObject="ZodObject",c.ZodUnion="ZodUnion",c.ZodDiscriminatedUnion="ZodDiscriminatedUnion",c.ZodIntersection="ZodIntersection",c.ZodTuple="ZodTuple",c.ZodRecord="ZodRecord",c.ZodMap="ZodMap",c.ZodSet="ZodSet",c.ZodFunction="ZodFunction",c.ZodLazy="ZodLazy",c.ZodLiteral="ZodLiteral",c.ZodEnum="ZodEnum",c.ZodEffects="ZodEffects",c.ZodNativeEnum="ZodNativeEnum",c.ZodOptional="ZodOptional",c.ZodNullable="ZodNullable",c.ZodDefault="ZodDefault",c.ZodCatch="ZodCatch",c.ZodPromise="ZodPromise",c.ZodBranded="ZodBranded",c.ZodPipeline="ZodPipeline",c.ZodReadonly="ZodReadonly"})(Qc||(Qc={}));var F2=(c,$={message:`Input not instance of ${c.name}`})=>jq((Q)=>Q instanceof c,$),Kq=n0.create,Dq=Z8.create,T2=WJ.create,f2=L8.create,Bq=d$.create,n2=Y$.create,u2=QJ.create,k2=s$.create,a2=r$.create,l2=X$.create,h2=I8.create,y2=r0.create,o2=JJ.create,g2=u0.create,d2=Cc.create,s2=Cc.strictCreate,r2=t$.create,t2=bY.create,e2=e$.create,cD=t0.create,$D=YJ.create,QD=XJ.create,JD=W$.create,YD=g$.create,XD=cQ.create,WD=$Q.create,mD=_8.create,GD=QQ.create,zD=m$.create,xD=l0.create,qD=k0.create,MD=z8.create,ND=l0.createWithPreprocess,VD=mJ.create,wD=()=>Kq().optional(),iD=()=>Dq().optional(),vD=()=>Bq().optional(),UD={string:(c)=>n0.create({...c,coerce:!0}),number:(c)=>Z8.create({...c,coerce:!0}),boolean:(c)=>d$.create({...c,coerce:!0}),bigint:(c)=>L8.create({...c,coerce:!0}),date:(c)=>Y$.create({...c,coerce:!0})};var jD=$c;var KD=/^(wss?|https?):\/\//i,DD=/^nsec1[0-9a-z]+$/i,pq=/^[0-9a-f]{64}$/i,BD=/^[^/\s]+\/[^/\s]+$/,HD=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Hq(c){try{let $=new URL(c);return $.protocol==="http:"||$.protocol==="https:"}catch{return!1}}function OD(c){if(!KD.test(c))return!1;try{return new URL(c.replace(/^wss:\/\//i,"https://").replace(/^ws:\/\//i,"http://")).hostname.length>0}catch{return!1}}function Oq(c){if(!Array.isArray(c))return c;return c.map(($)=>typeof $==="string"?$.trim():$).filter(($)=>$!=="")}var RD=E.object({kind:E.literal("github"),token:E.string({required_error:"tracker.token is required for the github tracker"}).trim().min(1,"tracker.token is required for the github tracker"),repo:E.string({required_error:"tracker.repo (owner/repo) is required for the github tracker"}).trim().min(1,"tracker.repo (owner/repo) is required for the github tracker").refine((c)=>BD.test(c),{message:"tracker.repo must be owner/repo"})}).strict(),pD=E.object({kind:E.literal("buzz"),ownerHex:E.string({required_error:"tracker.ownerHex must be a 64-char hex pubkey for the buzz tracker"}).trim().regex(pq,"tracker.ownerHex must be a 64-char hex pubkey for the buzz tracker"),repoId:E.string({required_error:"tracker.repoId is required for the buzz tracker"}).trim().min(1,"tracker.repoId is required for the buzz tracker")}).strict(),ID=E.discriminatedUnion("kind",[RD,pD]),Iq=E.object({label:E.string().trim().optional(),relayUrl:E.string({required_error:"relayUrl is required",invalid_type_error:"relayUrl is required"}).trim().min(1,"relayUrl is required").refine(OD,{message:"relayUrl must be a ws(s):// or https:// URL with a host"}),privateKey:E.string({required_error:"privateKey is required",invalid_type_error:"privateKey is required"}).trim().min(1,"privateKey is required").refine((c)=>DD.test(c)||pq.test(c),{message:"privateKey must be an nsec… or 64-char hex key"}),figuraToken:E.string({required_error:"figuraToken is required",invalid_type_error:"figuraToken is required"}).trim().min(1,"figuraToken is required"),channels:E.preprocess(Oq,E.array(E.string()).default([]).superRefine((c,$)=>{for(let Q of c)if(!HD.test(Q))$.addIssue({code:E.ZodIssueCode.custom,message:`channel "${Q}" is not a UUID`})})),triggers:E.preprocess((c)=>c===void 0?void 0:Oq(c),E.array(E.string()).optional().superRefine((c,$)=>{if(c!==void 0&&c.length===0)$.addIssue({code:E.ZodIssueCode.custom,message:"triggers is present but empty — omit it or give at least one trigger"})})),appOrigin:E.string().trim().refine(Hq,{message:"appOrigin must be an http(s) URL"}).optional(),apiUrl:E.string().trim().refine(Hq,{message:"apiUrl must be an http(s) URL"}).optional(),device:E.string().trim().min(1,"device must be a non-empty string when present").optional(),platform:E.string().trim().optional().superRefine((c,$)=>{if(c!==void 0&&c!=="mobile"&&c!=="web")$.addIssue({code:E.ZodIssueCode.custom,message:"platform must be one of: mobile | web"})}),tracker:ID.optional()}).strict();function G$(c){if(c.label)return c.label;let $=c.relayUrl??"";try{return new URL($.replace(/^wss:\/\//i,"https://").replace(/^ws:\/\//i,"http://")).host}catch{return $||"binding"}}function Zq(c){if(c.code===E.ZodIssueCode.unrecognized_keys){let $=c.keys.join(", ");return c.path.includes("tracker")?`tracker unknown key(s): ${$}`:`unknown key(s): ${$} (check spelling of the known fields)`}if(c.code===E.ZodIssueCode.invalid_union_discriminator)return'tracker.kind must be "github" or "buzz"';return c.message}function Lq(c){let $=Iq.safeParse(c);return $.success?[]:$.error.issues.map(Zq)}function Rq(c){let $=c??{},Q=typeof $.label==="string"&&$.label.trim()?$.label.trim():void 0,J=typeof $.relayUrl==="string"?$.relayUrl:"";return G$({label:Q,relayUrl:J})}function ZW(c,$="bindings config"){let Q=typeof $==="string"?{source:$}:$,J=Q.source??"bindings config",Y;try{Y=JSON.parse(c)}catch(z){throw Error(`${J} is not valid JSON: ${z instanceof Error?z.message:String(z)}`)}let X=Array.isArray(Y)?Y:Y&&typeof Y==="object"&&Array.isArray(Y.bindings)?Y.bindings:null;if(!X)throw Error(`${J} must be a JSON array of bindings (or { "bindings": [...] })`);if(X.length===0)throw Error(`${J} has no bindings`);let W=[],m=[];X.forEach((z,x)=>{let q=Iq.safeParse(z);if(q.success)m.push(q.data);else W.push(`binding[${x}] (${Rq(z)}): ${q.error.issues.map(Zq).join("; ")}`)});let G=new Map;for(let z of X){let x=Rq(z);G.set(x,(G.get(x)??0)+1)}for(let[z,x]of G)if(x>1)W.push(`duplicate label "${z}" across ${x} bindings — give each a distinct label`);if(W.length)throw Error(`invalid ${J}:
|
|
528
|
+
`)}async function iq(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(x2+`
|
|
529
|
+
`);return}if(k($,"session-start")){await V2().catch(()=>{});return}await w2($)}import{readFile as UI}from"node:fs/promises";var E={};vQ(E,{void:()=>e2,util:()=>wc,unknown:()=>r2,union:()=>JD,undefined:()=>g2,tuple:()=>WD,transformer:()=>iD,symbol:()=>o2,string:()=>Rq,strictObject:()=>QD,setErrorMap:()=>U2,set:()=>zD,record:()=>mD,quotelessJson:()=>i2,promise:()=>wD,preprocess:()=>jD,pipeline:()=>KD,ostring:()=>DD,optional:()=>vD,onumber:()=>BD,oboolean:()=>HD,objectUtil:()=>ZW,object:()=>$D,number:()=>pq,nullable:()=>UD,null:()=>d2,never:()=>t2,nativeEnum:()=>VD,nan:()=>l2,map:()=>GD,makeIssue:()=>$J,literal:()=>MD,lazy:()=>qD,late:()=>k2,isValid:()=>p8,isDirty:()=>bY,isAsync:()=>y$,isAborted:()=>EY,intersection:()=>XD,instanceof:()=>a2,getParsedType:()=>s0,getErrorMap:()=>h$,function:()=>xD,enum:()=>ND,effect:()=>iD,discriminatedUnion:()=>YD,defaultErrorMap:()=>m8,datetimeRegex:()=>Bq,date:()=>y2,custom:()=>Oq,coerce:()=>OD,boolean:()=>Zq,bigint:()=>h2,array:()=>cD,any:()=>s2,addIssueToContext:()=>n,ZodVoid:()=>JJ,ZodUnknown:()=>Z8,ZodUnion:()=>t$,ZodUndefined:()=>s$,ZodType:()=>Mc,ZodTuple:()=>t0,ZodTransformer:()=>l0,ZodSymbol:()=>QJ,ZodString:()=>n0,ZodSet:()=>m$,ZodSchema:()=>Mc,ZodRecord:()=>YJ,ZodReadonly:()=>XQ,ZodPromise:()=>G$,ZodPipeline:()=>mJ,ZodParsedType:()=>F,ZodOptional:()=>k0,ZodObject:()=>Cc,ZodNumber:()=>I8,ZodNullable:()=>z8,ZodNull:()=>r$,ZodNever:()=>r0,ZodNativeEnum:()=>QQ,ZodNaN:()=>WJ,ZodMap:()=>XJ,ZodLiteral:()=>$Q,ZodLazy:()=>cQ,ZodIssueCode:()=>L,ZodIntersection:()=>e$,ZodFunction:()=>g$,ZodFirstPartyTypeKind:()=>Qc,ZodError:()=>x0,ZodEnum:()=>_8,ZodEffects:()=>l0,ZodDiscriminatedUnion:()=>FY,ZodDefault:()=>JQ,ZodDate:()=>X$,ZodCatch:()=>YQ,ZodBranded:()=>TY,ZodBoolean:()=>d$,ZodBigInt:()=>L8,ZodArray:()=>u0,ZodAny:()=>W$,Schema:()=>Mc,ParseStatus:()=>oc,OK:()=>ec,NEVER:()=>RD,INVALID:()=>$c,EMPTY_PATH:()=>j2,DIRTY:()=>Y$,BRAND:()=>u2});var wc;(function(c){c.assertEqual=(Y)=>{};function $(Y){}c.assertIs=$;function Q(Y){throw Error()}c.assertNever=Q,c.arrayToEnum=(Y)=>{let X={};for(let W of Y)X[W]=W;return X},c.getValidEnumValues=(Y)=>{let X=c.objectKeys(Y).filter((m)=>typeof Y[Y[m]]!=="number"),W={};for(let m of X)W[m]=Y[m];return c.objectValues(W)},c.objectValues=(Y)=>{return c.objectKeys(Y).map(function(X){return Y[X]})},c.objectKeys=typeof Object.keys==="function"?(Y)=>Object.keys(Y):(Y)=>{let X=[];for(let W in Y)if(Object.prototype.hasOwnProperty.call(Y,W))X.push(W);return X},c.find=(Y,X)=>{for(let W of Y)if(X(W))return W;return},c.isInteger=typeof Number.isInteger==="function"?(Y)=>Number.isInteger(Y):(Y)=>typeof Y==="number"&&Number.isFinite(Y)&&Math.floor(Y)===Y;function J(Y,X=" | "){return Y.map((W)=>typeof W==="string"?`'${W}'`:W).join(X)}c.joinValues=J,c.jsonStringifyReplacer=(Y,X)=>{if(typeof X==="bigint")return X.toString();return X}})(wc||(wc={}));var ZW;(function(c){c.mergeShapes=($,Q)=>{return{...$,...Q}}})(ZW||(ZW={}));var F=wc.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),s0=(c)=>{switch(typeof c){case"undefined":return F.undefined;case"string":return F.string;case"number":return Number.isNaN(c)?F.nan:F.number;case"boolean":return F.boolean;case"function":return F.function;case"bigint":return F.bigint;case"symbol":return F.symbol;case"object":if(Array.isArray(c))return F.array;if(c===null)return F.null;if(c.then&&typeof c.then==="function"&&c.catch&&typeof c.catch==="function")return F.promise;if(typeof Map<"u"&&c instanceof Map)return F.map;if(typeof Set<"u"&&c instanceof Set)return F.set;if(typeof Date<"u"&&c instanceof Date)return F.date;return F.object;default:return F.unknown}};var L=wc.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"]),i2=(c)=>{return JSON.stringify(c,null,2).replace(/"([^"]+)":/g,"$1:")};class x0 extends Error{get errors(){return this.issues}constructor(c){super();this.issues=[],this.addIssue=(Q)=>{this.issues=[...this.issues,Q]},this.addIssues=(Q=[])=>{this.issues=[...this.issues,...Q]};let $=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,$);else this.__proto__=$;this.name="ZodError",this.issues=c}format(c){let $=c||function(Y){return Y.message},Q={_errors:[]},J=(Y)=>{for(let X of Y.issues)if(X.code==="invalid_union")X.unionErrors.map(J);else if(X.code==="invalid_return_type")J(X.returnTypeError);else if(X.code==="invalid_arguments")J(X.argumentsError);else if(X.path.length===0)Q._errors.push($(X));else{let W=Q,m=0;while(m<X.path.length){let G=X.path[m];if(m!==X.path.length-1)W[G]=W[G]||{_errors:[]};else W[G]=W[G]||{_errors:[]},W[G]._errors.push($(X));W=W[G],m++}}};return J(this),Q}static assert(c){if(!(c instanceof x0))throw Error(`Not a ZodError: ${c}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,wc.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(c=($)=>$.message){let $={},Q=[];for(let J of this.issues)if(J.path.length>0){let Y=J.path[0];$[Y]=$[Y]||[],$[Y].push(c(J))}else Q.push(c(J));return{formErrors:Q,fieldErrors:$}}get formErrors(){return this.flatten()}}x0.create=(c)=>{return new x0(c)};var v2=(c,$)=>{let Q;switch(c.code){case L.invalid_type:if(c.received===F.undefined)Q="Required";else Q=`Expected ${c.expected}, received ${c.received}`;break;case L.invalid_literal:Q=`Invalid literal value, expected ${JSON.stringify(c.expected,wc.jsonStringifyReplacer)}`;break;case L.unrecognized_keys:Q=`Unrecognized key(s) in object: ${wc.joinValues(c.keys,", ")}`;break;case L.invalid_union:Q="Invalid input";break;case L.invalid_union_discriminator:Q=`Invalid discriminator value. Expected ${wc.joinValues(c.options)}`;break;case L.invalid_enum_value:Q=`Invalid enum value. Expected ${wc.joinValues(c.options)}, received '${c.received}'`;break;case L.invalid_arguments:Q="Invalid function arguments";break;case L.invalid_return_type:Q="Invalid function return type";break;case L.invalid_date:Q="Invalid date";break;case L.invalid_string:if(typeof c.validation==="object")if("includes"in c.validation){if(Q=`Invalid input: must include "${c.validation.includes}"`,typeof c.validation.position==="number")Q=`${Q} at one or more positions greater than or equal to ${c.validation.position}`}else if("startsWith"in c.validation)Q=`Invalid input: must start with "${c.validation.startsWith}"`;else if("endsWith"in c.validation)Q=`Invalid input: must end with "${c.validation.endsWith}"`;else wc.assertNever(c.validation);else if(c.validation!=="regex")Q=`Invalid ${c.validation}`;else Q="Invalid";break;case L.too_small:if(c.type==="array")Q=`Array must contain ${c.exact?"exactly":c.inclusive?"at least":"more than"} ${c.minimum} element(s)`;else if(c.type==="string")Q=`String must contain ${c.exact?"exactly":c.inclusive?"at least":"over"} ${c.minimum} character(s)`;else if(c.type==="number")Q=`Number must be ${c.exact?"exactly equal to ":c.inclusive?"greater than or equal to ":"greater than "}${c.minimum}`;else if(c.type==="bigint")Q=`Number must be ${c.exact?"exactly equal to ":c.inclusive?"greater than or equal to ":"greater than "}${c.minimum}`;else if(c.type==="date")Q=`Date must be ${c.exact?"exactly equal to ":c.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(c.minimum))}`;else Q="Invalid input";break;case L.too_big:if(c.type==="array")Q=`Array must contain ${c.exact?"exactly":c.inclusive?"at most":"less than"} ${c.maximum} element(s)`;else if(c.type==="string")Q=`String must contain ${c.exact?"exactly":c.inclusive?"at most":"under"} ${c.maximum} character(s)`;else if(c.type==="number")Q=`Number must be ${c.exact?"exactly":c.inclusive?"less than or equal to":"less than"} ${c.maximum}`;else if(c.type==="bigint")Q=`BigInt must be ${c.exact?"exactly":c.inclusive?"less than or equal to":"less than"} ${c.maximum}`;else if(c.type==="date")Q=`Date must be ${c.exact?"exactly":c.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(c.maximum))}`;else Q="Invalid input";break;case L.custom:Q="Invalid input";break;case L.invalid_intersection_types:Q="Intersection results could not be merged";break;case L.not_multiple_of:Q=`Number must be a multiple of ${c.multipleOf}`;break;case L.not_finite:Q="Number must be finite";break;default:Q=$.defaultError,wc.assertNever(c)}return{message:Q}},m8=v2;var vq=m8;function U2(c){vq=c}function h$(){return vq}var $J=(c)=>{let{data:$,path:Q,errorMaps:J,issueData:Y}=c,X=[...Q,...Y.path||[]],W={...Y,path:X};if(Y.message!==void 0)return{...Y,path:X,message:Y.message};let m="",G=J.filter((z)=>!!z).slice().reverse();for(let z of G)m=z(W,{data:$,defaultError:m}).message;return{...Y,path:X,message:m}},j2=[];function n(c,$){let Q=h$(),J=$J({issueData:$,data:c.data,path:c.path,errorMaps:[c.common.contextualErrorMap,c.schemaErrorMap,Q,Q===m8?void 0:m8].filter((Y)=>!!Y)});c.common.issues.push(J)}class oc{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(c,$){let Q=[];for(let J of $){if(J.status==="aborted")return $c;if(J.status==="dirty")c.dirty();Q.push(J.value)}return{status:c.value,value:Q}}static async mergeObjectAsync(c,$){let Q=[];for(let J of $){let Y=await J.key,X=await J.value;Q.push({key:Y,value:X})}return oc.mergeObjectSync(c,Q)}static mergeObjectSync(c,$){let Q={};for(let J of $){let{key:Y,value:X}=J;if(Y.status==="aborted")return $c;if(X.status==="aborted")return $c;if(Y.status==="dirty")c.dirty();if(X.status==="dirty")c.dirty();if(Y.value!=="__proto__"&&(typeof X.value<"u"||J.alwaysSet))Q[Y.value]=X.value}return{status:c.value,value:Q}}}var $c=Object.freeze({status:"aborted"}),Y$=(c)=>({status:"dirty",value:c}),ec=(c)=>({status:"valid",value:c}),EY=(c)=>c.status==="aborted",bY=(c)=>c.status==="dirty",p8=(c)=>c.status==="valid",y$=(c)=>typeof Promise<"u"&&c instanceof Promise;var s;(function(c){c.errToObj=($)=>typeof $==="string"?{message:$}:$||{},c.toString=($)=>typeof $==="string"?$:$?.message})(s||(s={}));class a0{constructor(c,$,Q,J){this._cachedPath=[],this.parent=c,this.data=$,this._path=Q,this._key=J}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var Uq=(c,$)=>{if(p8($))return{success:!0,data:$.value};else{if(!c.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let Q=new x0(c.common.issues);return this._error=Q,this._error}}}};function zc(c){if(!c)return{};let{errorMap:$,invalid_type_error:Q,required_error:J,description:Y}=c;if($&&(Q||J))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if($)return{errorMap:$,description:Y};return{errorMap:(W,m)=>{let{message:G}=c;if(W.code==="invalid_enum_value")return{message:G??m.defaultError};if(typeof m.data>"u")return{message:G??J??m.defaultError};if(W.code!=="invalid_type")return{message:m.defaultError};return{message:G??Q??m.defaultError}},description:Y}}class Mc{get description(){return this._def.description}_getType(c){return s0(c.data)}_getOrReturnCtx(c,$){return $||{common:c.parent.common,data:c.data,parsedType:s0(c.data),schemaErrorMap:this._def.errorMap,path:c.path,parent:c.parent}}_processInputParams(c){return{status:new oc,ctx:{common:c.parent.common,data:c.data,parsedType:s0(c.data),schemaErrorMap:this._def.errorMap,path:c.path,parent:c.parent}}}_parseSync(c){let $=this._parse(c);if(y$($))throw Error("Synchronous parse encountered promise.");return $}_parseAsync(c){let $=this._parse(c);return Promise.resolve($)}parse(c,$){let Q=this.safeParse(c,$);if(Q.success)return Q.data;throw Q.error}safeParse(c,$){let Q={common:{issues:[],async:$?.async??!1,contextualErrorMap:$?.errorMap},path:$?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:c,parsedType:s0(c)},J=this._parseSync({data:c,path:Q.path,parent:Q});return Uq(Q,J)}"~validate"(c){let $={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:c,parsedType:s0(c)};if(!this["~standard"].async)try{let Q=this._parseSync({data:c,path:[],parent:$});return p8(Q)?{value:Q.value}:{issues:$.common.issues}}catch(Q){if(Q?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;$.common={issues:[],async:!0}}return this._parseAsync({data:c,path:[],parent:$}).then((Q)=>p8(Q)?{value:Q.value}:{issues:$.common.issues})}async parseAsync(c,$){let Q=await this.safeParseAsync(c,$);if(Q.success)return Q.data;throw Q.error}async safeParseAsync(c,$){let Q={common:{issues:[],contextualErrorMap:$?.errorMap,async:!0},path:$?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:c,parsedType:s0(c)},J=this._parse({data:c,path:Q.path,parent:Q}),Y=await(y$(J)?J:Promise.resolve(J));return Uq(Q,Y)}refine(c,$){let Q=(J)=>{if(typeof $==="string"||typeof $>"u")return{message:$};else if(typeof $==="function")return $(J);else return $};return this._refinement((J,Y)=>{let X=c(J),W=()=>Y.addIssue({code:L.custom,...Q(J)});if(typeof Promise<"u"&&X instanceof Promise)return X.then((m)=>{if(!m)return W(),!1;else return!0});if(!X)return W(),!1;else return!0})}refinement(c,$){return this._refinement((Q,J)=>{if(!c(Q))return J.addIssue(typeof $==="function"?$(Q,J):$),!1;else return!0})}_refinement(c){return new l0({schema:this,typeName:Qc.ZodEffects,effect:{type:"refinement",refinement:c}})}superRefine(c){return this._refinement(c)}constructor(c){this.spa=this.safeParseAsync,this._def=c,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),this["~standard"]={version:1,vendor:"zod",validate:($)=>this["~validate"]($)}}optional(){return k0.create(this,this._def)}nullable(){return z8.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return u0.create(this)}promise(){return G$.create(this,this._def)}or(c){return t$.create([this,c],this._def)}and(c){return e$.create(this,c,this._def)}transform(c){return new l0({...zc(this._def),schema:this,typeName:Qc.ZodEffects,effect:{type:"transform",transform:c}})}default(c){let $=typeof c==="function"?c:()=>c;return new JQ({...zc(this._def),innerType:this,defaultValue:$,typeName:Qc.ZodDefault})}brand(){return new TY({typeName:Qc.ZodBranded,type:this,...zc(this._def)})}catch(c){let $=typeof c==="function"?c:()=>c;return new YQ({...zc(this._def),innerType:this,catchValue:$,typeName:Qc.ZodCatch})}describe(c){return new this.constructor({...this._def,description:c})}pipe(c){return mJ.create(this,c)}readonly(){return XQ.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var K2=/^c[^\s-]{8,}$/i,D2=/^[0-9a-z]+$/,B2=/^[0-9A-HJKMNP-TV-Z]{26}$/i,H2=/^[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,O2=/^[a-z0-9_-]{21}$/i,R2=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,p2=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Z2=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,I2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",IW,L2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,S2=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,A2=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,C2=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,P2=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Kq="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",E2=new RegExp(`^${Kq}$`);function Dq(c){let $="[0-5]\\d";if(c.precision)$=`${$}\\.\\d{${c.precision}}`;else if(c.precision==null)$=`${$}(\\.\\d+)?`;let Q=c.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${$})${Q}`}function b2(c){return new RegExp(`^${Dq(c)}$`)}function Bq(c){let $=`${Kq}T${Dq(c)}`,Q=[];if(Q.push(c.local?"Z?":"Z"),c.offset)Q.push("([+-]\\d{2}:?\\d{2})");return $=`${$}(${Q.join("|")})`,new RegExp(`^${$}$`)}function F2(c,$){if(($==="v4"||!$)&&L2.test(c))return!0;if(($==="v6"||!$)&&S2.test(c))return!0;return!1}function T2(c,$){if(!R2.test(c))return!1;try{let[Q]=c.split(".");if(!Q)return!1;let J=Q.replace(/-/g,"+").replace(/_/g,"/").padEnd(Q.length+(4-Q.length%4)%4,"="),Y=JSON.parse(atob(J));if(typeof Y!=="object"||Y===null)return!1;if("typ"in Y&&Y?.typ!=="JWT")return!1;if(!Y.alg)return!1;if($&&Y.alg!==$)return!1;return!0}catch{return!1}}function f2(c,$){if(($==="v4"||!$)&&_2.test(c))return!0;if(($==="v6"||!$)&&A2.test(c))return!0;return!1}class n0 extends Mc{_parse(c){if(this._def.coerce)c.data=String(c.data);if(this._getType(c)!==F.string){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_type,expected:F.string,received:Y.parsedType}),$c}let Q=new oc,J=void 0;for(let Y of this._def.checks)if(Y.kind==="min"){if(c.data.length<Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_small,minimum:Y.value,type:"string",inclusive:!0,exact:!1,message:Y.message}),Q.dirty()}else if(Y.kind==="max"){if(c.data.length>Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_big,maximum:Y.value,type:"string",inclusive:!0,exact:!1,message:Y.message}),Q.dirty()}else if(Y.kind==="length"){let X=c.data.length>Y.value,W=c.data.length<Y.value;if(X||W){if(J=this._getOrReturnCtx(c,J),X)n(J,{code:L.too_big,maximum:Y.value,type:"string",inclusive:!0,exact:!0,message:Y.message});else if(W)n(J,{code:L.too_small,minimum:Y.value,type:"string",inclusive:!0,exact:!0,message:Y.message});Q.dirty()}}else if(Y.kind==="email"){if(!Z2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"email",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="emoji"){if(!IW)IW=new RegExp(I2,"u");if(!IW.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"emoji",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="uuid"){if(!H2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"uuid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="nanoid"){if(!O2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"nanoid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="cuid"){if(!K2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"cuid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="cuid2"){if(!D2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"cuid2",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="ulid"){if(!B2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"ulid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="url")try{new URL(c.data)}catch{J=this._getOrReturnCtx(c,J),n(J,{validation:"url",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="regex"){if(Y.regex.lastIndex=0,!Y.regex.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"regex",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="trim")c.data=c.data.trim();else if(Y.kind==="includes"){if(!c.data.includes(Y.value,Y.position))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:{includes:Y.value,position:Y.position},message:Y.message}),Q.dirty()}else if(Y.kind==="toLowerCase")c.data=c.data.toLowerCase();else if(Y.kind==="toUpperCase")c.data=c.data.toUpperCase();else if(Y.kind==="startsWith"){if(!c.data.startsWith(Y.value))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:{startsWith:Y.value},message:Y.message}),Q.dirty()}else if(Y.kind==="endsWith"){if(!c.data.endsWith(Y.value))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:{endsWith:Y.value},message:Y.message}),Q.dirty()}else if(Y.kind==="datetime"){if(!Bq(Y).test(c.data))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:"datetime",message:Y.message}),Q.dirty()}else if(Y.kind==="date"){if(!E2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:"date",message:Y.message}),Q.dirty()}else if(Y.kind==="time"){if(!b2(Y).test(c.data))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:"time",message:Y.message}),Q.dirty()}else if(Y.kind==="duration"){if(!p2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"duration",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="ip"){if(!F2(c.data,Y.version))J=this._getOrReturnCtx(c,J),n(J,{validation:"ip",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="jwt"){if(!T2(c.data,Y.alg))J=this._getOrReturnCtx(c,J),n(J,{validation:"jwt",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="cidr"){if(!f2(c.data,Y.version))J=this._getOrReturnCtx(c,J),n(J,{validation:"cidr",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="base64"){if(!C2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"base64",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="base64url"){if(!P2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"base64url",code:L.invalid_string,message:Y.message}),Q.dirty()}else wc.assertNever(Y);return{status:Q.value,value:c.data}}_regex(c,$,Q){return this.refinement((J)=>c.test(J),{validation:$,code:L.invalid_string,...s.errToObj(Q)})}_addCheck(c){return new n0({...this._def,checks:[...this._def.checks,c]})}email(c){return this._addCheck({kind:"email",...s.errToObj(c)})}url(c){return this._addCheck({kind:"url",...s.errToObj(c)})}emoji(c){return this._addCheck({kind:"emoji",...s.errToObj(c)})}uuid(c){return this._addCheck({kind:"uuid",...s.errToObj(c)})}nanoid(c){return this._addCheck({kind:"nanoid",...s.errToObj(c)})}cuid(c){return this._addCheck({kind:"cuid",...s.errToObj(c)})}cuid2(c){return this._addCheck({kind:"cuid2",...s.errToObj(c)})}ulid(c){return this._addCheck({kind:"ulid",...s.errToObj(c)})}base64(c){return this._addCheck({kind:"base64",...s.errToObj(c)})}base64url(c){return this._addCheck({kind:"base64url",...s.errToObj(c)})}jwt(c){return this._addCheck({kind:"jwt",...s.errToObj(c)})}ip(c){return this._addCheck({kind:"ip",...s.errToObj(c)})}cidr(c){return this._addCheck({kind:"cidr",...s.errToObj(c)})}datetime(c){if(typeof c==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:c});return this._addCheck({kind:"datetime",precision:typeof c?.precision>"u"?null:c?.precision,offset:c?.offset??!1,local:c?.local??!1,...s.errToObj(c?.message)})}date(c){return this._addCheck({kind:"date",message:c})}time(c){if(typeof c==="string")return this._addCheck({kind:"time",precision:null,message:c});return this._addCheck({kind:"time",precision:typeof c?.precision>"u"?null:c?.precision,...s.errToObj(c?.message)})}duration(c){return this._addCheck({kind:"duration",...s.errToObj(c)})}regex(c,$){return this._addCheck({kind:"regex",regex:c,...s.errToObj($)})}includes(c,$){return this._addCheck({kind:"includes",value:c,position:$?.position,...s.errToObj($?.message)})}startsWith(c,$){return this._addCheck({kind:"startsWith",value:c,...s.errToObj($)})}endsWith(c,$){return this._addCheck({kind:"endsWith",value:c,...s.errToObj($)})}min(c,$){return this._addCheck({kind:"min",value:c,...s.errToObj($)})}max(c,$){return this._addCheck({kind:"max",value:c,...s.errToObj($)})}length(c,$){return this._addCheck({kind:"length",value:c,...s.errToObj($)})}nonempty(c){return this.min(1,s.errToObj(c))}trim(){return new n0({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new n0({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new n0({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((c)=>c.kind==="datetime")}get isDate(){return!!this._def.checks.find((c)=>c.kind==="date")}get isTime(){return!!this._def.checks.find((c)=>c.kind==="time")}get isDuration(){return!!this._def.checks.find((c)=>c.kind==="duration")}get isEmail(){return!!this._def.checks.find((c)=>c.kind==="email")}get isURL(){return!!this._def.checks.find((c)=>c.kind==="url")}get isEmoji(){return!!this._def.checks.find((c)=>c.kind==="emoji")}get isUUID(){return!!this._def.checks.find((c)=>c.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((c)=>c.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((c)=>c.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((c)=>c.kind==="cuid2")}get isULID(){return!!this._def.checks.find((c)=>c.kind==="ulid")}get isIP(){return!!this._def.checks.find((c)=>c.kind==="ip")}get isCIDR(){return!!this._def.checks.find((c)=>c.kind==="cidr")}get isBase64(){return!!this._def.checks.find((c)=>c.kind==="base64")}get isBase64url(){return!!this._def.checks.find((c)=>c.kind==="base64url")}get minLength(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c}get maxLength(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c}}n0.create=(c)=>{return new n0({checks:[],typeName:Qc.ZodString,coerce:c?.coerce??!1,...zc(c)})};function n2(c,$){let Q=(c.toString().split(".")[1]||"").length,J=($.toString().split(".")[1]||"").length,Y=Q>J?Q:J,X=Number.parseInt(c.toFixed(Y).replace(".","")),W=Number.parseInt($.toFixed(Y).replace(".",""));return X%W/10**Y}class I8 extends Mc{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(c){if(this._def.coerce)c.data=Number(c.data);if(this._getType(c)!==F.number){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_type,expected:F.number,received:Y.parsedType}),$c}let Q=void 0,J=new oc;for(let Y of this._def.checks)if(Y.kind==="int"){if(!wc.isInteger(c.data))Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.invalid_type,expected:"integer",received:"float",message:Y.message}),J.dirty()}else if(Y.kind==="min"){if(Y.inclusive?c.data<Y.value:c.data<=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_small,minimum:Y.value,type:"number",inclusive:Y.inclusive,exact:!1,message:Y.message}),J.dirty()}else if(Y.kind==="max"){if(Y.inclusive?c.data>Y.value:c.data>=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_big,maximum:Y.value,type:"number",inclusive:Y.inclusive,exact:!1,message:Y.message}),J.dirty()}else if(Y.kind==="multipleOf"){if(n2(c.data,Y.value)!==0)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.not_multiple_of,multipleOf:Y.value,message:Y.message}),J.dirty()}else if(Y.kind==="finite"){if(!Number.isFinite(c.data))Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.not_finite,message:Y.message}),J.dirty()}else wc.assertNever(Y);return{status:J.value,value:c.data}}gte(c,$){return this.setLimit("min",c,!0,s.toString($))}gt(c,$){return this.setLimit("min",c,!1,s.toString($))}lte(c,$){return this.setLimit("max",c,!0,s.toString($))}lt(c,$){return this.setLimit("max",c,!1,s.toString($))}setLimit(c,$,Q,J){return new I8({...this._def,checks:[...this._def.checks,{kind:c,value:$,inclusive:Q,message:s.toString(J)}]})}_addCheck(c){return new I8({...this._def,checks:[...this._def.checks,c]})}int(c){return this._addCheck({kind:"int",message:s.toString(c)})}positive(c){return this._addCheck({kind:"min",value:0,inclusive:!1,message:s.toString(c)})}negative(c){return this._addCheck({kind:"max",value:0,inclusive:!1,message:s.toString(c)})}nonpositive(c){return this._addCheck({kind:"max",value:0,inclusive:!0,message:s.toString(c)})}nonnegative(c){return this._addCheck({kind:"min",value:0,inclusive:!0,message:s.toString(c)})}multipleOf(c,$){return this._addCheck({kind:"multipleOf",value:c,message:s.toString($)})}finite(c){return this._addCheck({kind:"finite",message:s.toString(c)})}safe(c){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:s.toString(c)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:s.toString(c)})}get minValue(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c}get maxValue(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c}get isInt(){return!!this._def.checks.find((c)=>c.kind==="int"||c.kind==="multipleOf"&&wc.isInteger(c.value))}get isFinite(){let c=null,$=null;for(let Q of this._def.checks)if(Q.kind==="finite"||Q.kind==="int"||Q.kind==="multipleOf")return!0;else if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}else if(Q.kind==="max"){if(c===null||Q.value<c)c=Q.value}return Number.isFinite($)&&Number.isFinite(c)}}I8.create=(c)=>{return new I8({checks:[],typeName:Qc.ZodNumber,coerce:c?.coerce||!1,...zc(c)})};class L8 extends Mc{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(c){if(this._def.coerce)try{c.data=BigInt(c.data)}catch{return this._getInvalidInput(c)}if(this._getType(c)!==F.bigint)return this._getInvalidInput(c);let Q=void 0,J=new oc;for(let Y of this._def.checks)if(Y.kind==="min"){if(Y.inclusive?c.data<Y.value:c.data<=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_small,type:"bigint",minimum:Y.value,inclusive:Y.inclusive,message:Y.message}),J.dirty()}else if(Y.kind==="max"){if(Y.inclusive?c.data>Y.value:c.data>=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_big,type:"bigint",maximum:Y.value,inclusive:Y.inclusive,message:Y.message}),J.dirty()}else if(Y.kind==="multipleOf"){if(c.data%Y.value!==BigInt(0))Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.not_multiple_of,multipleOf:Y.value,message:Y.message}),J.dirty()}else wc.assertNever(Y);return{status:J.value,value:c.data}}_getInvalidInput(c){let $=this._getOrReturnCtx(c);return n($,{code:L.invalid_type,expected:F.bigint,received:$.parsedType}),$c}gte(c,$){return this.setLimit("min",c,!0,s.toString($))}gt(c,$){return this.setLimit("min",c,!1,s.toString($))}lte(c,$){return this.setLimit("max",c,!0,s.toString($))}lt(c,$){return this.setLimit("max",c,!1,s.toString($))}setLimit(c,$,Q,J){return new L8({...this._def,checks:[...this._def.checks,{kind:c,value:$,inclusive:Q,message:s.toString(J)}]})}_addCheck(c){return new L8({...this._def,checks:[...this._def.checks,c]})}positive(c){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:s.toString(c)})}negative(c){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:s.toString(c)})}nonpositive(c){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:s.toString(c)})}nonnegative(c){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:s.toString(c)})}multipleOf(c,$){return this._addCheck({kind:"multipleOf",value:c,message:s.toString($)})}get minValue(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c}get maxValue(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c}}L8.create=(c)=>{return new L8({checks:[],typeName:Qc.ZodBigInt,coerce:c?.coerce??!1,...zc(c)})};class d$ extends Mc{_parse(c){if(this._def.coerce)c.data=Boolean(c.data);if(this._getType(c)!==F.boolean){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.boolean,received:Q.parsedType}),$c}return ec(c.data)}}d$.create=(c)=>{return new d$({typeName:Qc.ZodBoolean,coerce:c?.coerce||!1,...zc(c)})};class X$ extends Mc{_parse(c){if(this._def.coerce)c.data=new Date(c.data);if(this._getType(c)!==F.date){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_type,expected:F.date,received:Y.parsedType}),$c}if(Number.isNaN(c.data.getTime())){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_date}),$c}let Q=new oc,J=void 0;for(let Y of this._def.checks)if(Y.kind==="min"){if(c.data.getTime()<Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_small,message:Y.message,inclusive:!0,exact:!1,minimum:Y.value,type:"date"}),Q.dirty()}else if(Y.kind==="max"){if(c.data.getTime()>Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_big,message:Y.message,inclusive:!0,exact:!1,maximum:Y.value,type:"date"}),Q.dirty()}else wc.assertNever(Y);return{status:Q.value,value:new Date(c.data.getTime())}}_addCheck(c){return new X$({...this._def,checks:[...this._def.checks,c]})}min(c,$){return this._addCheck({kind:"min",value:c.getTime(),message:s.toString($)})}max(c,$){return this._addCheck({kind:"max",value:c.getTime(),message:s.toString($)})}get minDate(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c!=null?new Date(c):null}get maxDate(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c!=null?new Date(c):null}}X$.create=(c)=>{return new X$({checks:[],coerce:c?.coerce||!1,typeName:Qc.ZodDate,...zc(c)})};class QJ extends Mc{_parse(c){if(this._getType(c)!==F.symbol){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.symbol,received:Q.parsedType}),$c}return ec(c.data)}}QJ.create=(c)=>{return new QJ({typeName:Qc.ZodSymbol,...zc(c)})};class s$ extends Mc{_parse(c){if(this._getType(c)!==F.undefined){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.undefined,received:Q.parsedType}),$c}return ec(c.data)}}s$.create=(c)=>{return new s$({typeName:Qc.ZodUndefined,...zc(c)})};class r$ extends Mc{_parse(c){if(this._getType(c)!==F.null){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.null,received:Q.parsedType}),$c}return ec(c.data)}}r$.create=(c)=>{return new r$({typeName:Qc.ZodNull,...zc(c)})};class W$ extends Mc{constructor(){super(...arguments);this._any=!0}_parse(c){return ec(c.data)}}W$.create=(c)=>{return new W$({typeName:Qc.ZodAny,...zc(c)})};class Z8 extends Mc{constructor(){super(...arguments);this._unknown=!0}_parse(c){return ec(c.data)}}Z8.create=(c)=>{return new Z8({typeName:Qc.ZodUnknown,...zc(c)})};class r0 extends Mc{_parse(c){let $=this._getOrReturnCtx(c);return n($,{code:L.invalid_type,expected:F.never,received:$.parsedType}),$c}}r0.create=(c)=>{return new r0({typeName:Qc.ZodNever,...zc(c)})};class JJ extends Mc{_parse(c){if(this._getType(c)!==F.undefined){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.void,received:Q.parsedType}),$c}return ec(c.data)}}JJ.create=(c)=>{return new JJ({typeName:Qc.ZodVoid,...zc(c)})};class u0 extends Mc{_parse(c){let{ctx:$,status:Q}=this._processInputParams(c),J=this._def;if($.parsedType!==F.array)return n($,{code:L.invalid_type,expected:F.array,received:$.parsedType}),$c;if(J.exactLength!==null){let X=$.data.length>J.exactLength.value,W=$.data.length<J.exactLength.value;if(X||W)n($,{code:X?L.too_big:L.too_small,minimum:W?J.exactLength.value:void 0,maximum:X?J.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:J.exactLength.message}),Q.dirty()}if(J.minLength!==null){if($.data.length<J.minLength.value)n($,{code:L.too_small,minimum:J.minLength.value,type:"array",inclusive:!0,exact:!1,message:J.minLength.message}),Q.dirty()}if(J.maxLength!==null){if($.data.length>J.maxLength.value)n($,{code:L.too_big,maximum:J.maxLength.value,type:"array",inclusive:!0,exact:!1,message:J.maxLength.message}),Q.dirty()}if($.common.async)return Promise.all([...$.data].map((X,W)=>{return J.type._parseAsync(new a0($,X,$.path,W))})).then((X)=>{return oc.mergeArray(Q,X)});let Y=[...$.data].map((X,W)=>{return J.type._parseSync(new a0($,X,$.path,W))});return oc.mergeArray(Q,Y)}get element(){return this._def.type}min(c,$){return new u0({...this._def,minLength:{value:c,message:s.toString($)}})}max(c,$){return new u0({...this._def,maxLength:{value:c,message:s.toString($)}})}length(c,$){return new u0({...this._def,exactLength:{value:c,message:s.toString($)}})}nonempty(c){return this.min(1,c)}}u0.create=(c,$)=>{return new u0({type:c,minLength:null,maxLength:null,exactLength:null,typeName:Qc.ZodArray,...zc($)})};function o$(c){if(c instanceof Cc){let $={};for(let Q in c.shape){let J=c.shape[Q];$[Q]=k0.create(o$(J))}return new Cc({...c._def,shape:()=>$})}else if(c instanceof u0)return new u0({...c._def,type:o$(c.element)});else if(c instanceof k0)return k0.create(o$(c.unwrap()));else if(c instanceof z8)return z8.create(o$(c.unwrap()));else if(c instanceof t0)return t0.create(c.items.map(($)=>o$($)));else return c}class Cc extends Mc{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let c=this._def.shape(),$=wc.objectKeys(c);return this._cached={shape:c,keys:$},this._cached}_parse(c){if(this._getType(c)!==F.object){let G=this._getOrReturnCtx(c);return n(G,{code:L.invalid_type,expected:F.object,received:G.parsedType}),$c}let{status:Q,ctx:J}=this._processInputParams(c),{shape:Y,keys:X}=this._getCached(),W=[];if(!(this._def.catchall instanceof r0&&this._def.unknownKeys==="strip")){for(let G in J.data)if(!X.includes(G))W.push(G)}let m=[];for(let G of X){let z=Y[G],x=J.data[G];m.push({key:{status:"valid",value:G},value:z._parse(new a0(J,x,J.path,G)),alwaysSet:G in J.data})}if(this._def.catchall instanceof r0){let G=this._def.unknownKeys;if(G==="passthrough")for(let z of W)m.push({key:{status:"valid",value:z},value:{status:"valid",value:J.data[z]}});else if(G==="strict"){if(W.length>0)n(J,{code:L.unrecognized_keys,keys:W}),Q.dirty()}else if(G==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let G=this._def.catchall;for(let z of W){let x=J.data[z];m.push({key:{status:"valid",value:z},value:G._parse(new a0(J,x,J.path,z)),alwaysSet:z in J.data})}}if(J.common.async)return Promise.resolve().then(async()=>{let G=[];for(let z of m){let x=await z.key,q=await z.value;G.push({key:x,value:q,alwaysSet:z.alwaysSet})}return G}).then((G)=>{return oc.mergeObjectSync(Q,G)});else return oc.mergeObjectSync(Q,m)}get shape(){return this._def.shape()}strict(c){return s.errToObj,new Cc({...this._def,unknownKeys:"strict",...c!==void 0?{errorMap:($,Q)=>{let J=this._def.errorMap?.($,Q).message??Q.defaultError;if($.code==="unrecognized_keys")return{message:s.errToObj(c).message??J};return{message:J}}}:{}})}strip(){return new Cc({...this._def,unknownKeys:"strip"})}passthrough(){return new Cc({...this._def,unknownKeys:"passthrough"})}extend(c){return new Cc({...this._def,shape:()=>({...this._def.shape(),...c})})}merge(c){return new Cc({unknownKeys:c._def.unknownKeys,catchall:c._def.catchall,shape:()=>({...this._def.shape(),...c._def.shape()}),typeName:Qc.ZodObject})}setKey(c,$){return this.augment({[c]:$})}catchall(c){return new Cc({...this._def,catchall:c})}pick(c){let $={};for(let Q of wc.objectKeys(c))if(c[Q]&&this.shape[Q])$[Q]=this.shape[Q];return new Cc({...this._def,shape:()=>$})}omit(c){let $={};for(let Q of wc.objectKeys(this.shape))if(!c[Q])$[Q]=this.shape[Q];return new Cc({...this._def,shape:()=>$})}deepPartial(){return o$(this)}partial(c){let $={};for(let Q of wc.objectKeys(this.shape)){let J=this.shape[Q];if(c&&!c[Q])$[Q]=J;else $[Q]=J.optional()}return new Cc({...this._def,shape:()=>$})}required(c){let $={};for(let Q of wc.objectKeys(this.shape))if(c&&!c[Q])$[Q]=this.shape[Q];else{let Y=this.shape[Q];while(Y instanceof k0)Y=Y._def.innerType;$[Q]=Y}return new Cc({...this._def,shape:()=>$})}keyof(){return Hq(wc.objectKeys(this.shape))}}Cc.create=(c,$)=>{return new Cc({shape:()=>c,unknownKeys:"strip",catchall:r0.create(),typeName:Qc.ZodObject,...zc($)})};Cc.strictCreate=(c,$)=>{return new Cc({shape:()=>c,unknownKeys:"strict",catchall:r0.create(),typeName:Qc.ZodObject,...zc($)})};Cc.lazycreate=(c,$)=>{return new Cc({shape:c,unknownKeys:"strip",catchall:r0.create(),typeName:Qc.ZodObject,...zc($)})};class t$ extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q=this._def.options;function J(Y){for(let W of Y)if(W.result.status==="valid")return W.result;for(let W of Y)if(W.result.status==="dirty")return $.common.issues.push(...W.ctx.common.issues),W.result;let X=Y.map((W)=>new x0(W.ctx.common.issues));return n($,{code:L.invalid_union,unionErrors:X}),$c}if($.common.async)return Promise.all(Q.map(async(Y)=>{let X={...$,common:{...$.common,issues:[]},parent:null};return{result:await Y._parseAsync({data:$.data,path:$.path,parent:X}),ctx:X}})).then(J);else{let Y=void 0,X=[];for(let m of Q){let G={...$,common:{...$.common,issues:[]},parent:null},z=m._parseSync({data:$.data,path:$.path,parent:G});if(z.status==="valid")return z;else if(z.status==="dirty"&&!Y)Y={result:z,ctx:G};if(G.common.issues.length)X.push(G.common.issues)}if(Y)return $.common.issues.push(...Y.ctx.common.issues),Y.result;let W=X.map((m)=>new x0(m));return n($,{code:L.invalid_union,unionErrors:W}),$c}}get options(){return this._def.options}}t$.create=(c,$)=>{return new t$({options:c,typeName:Qc.ZodUnion,...zc($)})};var G8=(c)=>{if(c instanceof cQ)return G8(c.schema);else if(c instanceof l0)return G8(c.innerType());else if(c instanceof $Q)return[c.value];else if(c instanceof _8)return c.options;else if(c instanceof QQ)return wc.objectValues(c.enum);else if(c instanceof JQ)return G8(c._def.innerType);else if(c instanceof s$)return[void 0];else if(c instanceof r$)return[null];else if(c instanceof k0)return[void 0,...G8(c.unwrap())];else if(c instanceof z8)return[null,...G8(c.unwrap())];else if(c instanceof TY)return G8(c.unwrap());else if(c instanceof XQ)return G8(c.unwrap());else if(c instanceof YQ)return G8(c._def.innerType);else return[]};class FY extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c);if($.parsedType!==F.object)return n($,{code:L.invalid_type,expected:F.object,received:$.parsedType}),$c;let Q=this.discriminator,J=$.data[Q],Y=this.optionsMap.get(J);if(!Y)return n($,{code:L.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[Q]}),$c;if($.common.async)return Y._parseAsync({data:$.data,path:$.path,parent:$});else return Y._parseSync({data:$.data,path:$.path,parent:$})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(c,$,Q){let J=new Map;for(let Y of $){let X=G8(Y.shape[c]);if(!X.length)throw Error(`A discriminator value for key \`${c}\` could not be extracted from all schema options`);for(let W of X){if(J.has(W))throw Error(`Discriminator property ${String(c)} has duplicate value ${String(W)}`);J.set(W,Y)}}return new FY({typeName:Qc.ZodDiscriminatedUnion,discriminator:c,options:$,optionsMap:J,...zc(Q)})}}function LW(c,$){let Q=s0(c),J=s0($);if(c===$)return{valid:!0,data:c};else if(Q===F.object&&J===F.object){let Y=wc.objectKeys($),X=wc.objectKeys(c).filter((m)=>Y.indexOf(m)!==-1),W={...c,...$};for(let m of X){let G=LW(c[m],$[m]);if(!G.valid)return{valid:!1};W[m]=G.data}return{valid:!0,data:W}}else if(Q===F.array&&J===F.array){if(c.length!==$.length)return{valid:!1};let Y=[];for(let X=0;X<c.length;X++){let W=c[X],m=$[X],G=LW(W,m);if(!G.valid)return{valid:!1};Y.push(G.data)}return{valid:!0,data:Y}}else if(Q===F.date&&J===F.date&&+c===+$)return{valid:!0,data:c};else return{valid:!1}}class e$ extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c),J=(Y,X)=>{if(EY(Y)||EY(X))return $c;let W=LW(Y.value,X.value);if(!W.valid)return n(Q,{code:L.invalid_intersection_types}),$c;if(bY(Y)||bY(X))$.dirty();return{status:$.value,value:W.data}};if(Q.common.async)return Promise.all([this._def.left._parseAsync({data:Q.data,path:Q.path,parent:Q}),this._def.right._parseAsync({data:Q.data,path:Q.path,parent:Q})]).then(([Y,X])=>J(Y,X));else return J(this._def.left._parseSync({data:Q.data,path:Q.path,parent:Q}),this._def.right._parseSync({data:Q.data,path:Q.path,parent:Q}))}}e$.create=(c,$,Q)=>{return new e$({left:c,right:$,typeName:Qc.ZodIntersection,...zc(Q)})};class t0 extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.array)return n(Q,{code:L.invalid_type,expected:F.array,received:Q.parsedType}),$c;if(Q.data.length<this._def.items.length)return n(Q,{code:L.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$c;if(!this._def.rest&&Q.data.length>this._def.items.length)n(Q,{code:L.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$.dirty();let Y=[...Q.data].map((X,W)=>{let m=this._def.items[W]||this._def.rest;if(!m)return null;return m._parse(new a0(Q,X,Q.path,W))}).filter((X)=>!!X);if(Q.common.async)return Promise.all(Y).then((X)=>{return oc.mergeArray($,X)});else return oc.mergeArray($,Y)}get items(){return this._def.items}rest(c){return new t0({...this._def,rest:c})}}t0.create=(c,$)=>{if(!Array.isArray(c))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new t0({items:c,typeName:Qc.ZodTuple,rest:null,...zc($)})};class YJ extends Mc{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.object)return n(Q,{code:L.invalid_type,expected:F.object,received:Q.parsedType}),$c;let J=[],Y=this._def.keyType,X=this._def.valueType;for(let W in Q.data)J.push({key:Y._parse(new a0(Q,W,Q.path,W)),value:X._parse(new a0(Q,Q.data[W],Q.path,W)),alwaysSet:W in Q.data});if(Q.common.async)return oc.mergeObjectAsync($,J);else return oc.mergeObjectSync($,J)}get element(){return this._def.valueType}static create(c,$,Q){if($ instanceof Mc)return new YJ({keyType:c,valueType:$,typeName:Qc.ZodRecord,...zc(Q)});return new YJ({keyType:n0.create(),valueType:c,typeName:Qc.ZodRecord,...zc($)})}}class XJ extends Mc{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.map)return n(Q,{code:L.invalid_type,expected:F.map,received:Q.parsedType}),$c;let J=this._def.keyType,Y=this._def.valueType,X=[...Q.data.entries()].map(([W,m],G)=>{return{key:J._parse(new a0(Q,W,Q.path,[G,"key"])),value:Y._parse(new a0(Q,m,Q.path,[G,"value"]))}});if(Q.common.async){let W=new Map;return Promise.resolve().then(async()=>{for(let m of X){let G=await m.key,z=await m.value;if(G.status==="aborted"||z.status==="aborted")return $c;if(G.status==="dirty"||z.status==="dirty")$.dirty();W.set(G.value,z.value)}return{status:$.value,value:W}})}else{let W=new Map;for(let m of X){let{key:G,value:z}=m;if(G.status==="aborted"||z.status==="aborted")return $c;if(G.status==="dirty"||z.status==="dirty")$.dirty();W.set(G.value,z.value)}return{status:$.value,value:W}}}}XJ.create=(c,$,Q)=>{return new XJ({valueType:$,keyType:c,typeName:Qc.ZodMap,...zc(Q)})};class m$ extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.set)return n(Q,{code:L.invalid_type,expected:F.set,received:Q.parsedType}),$c;let J=this._def;if(J.minSize!==null){if(Q.data.size<J.minSize.value)n(Q,{code:L.too_small,minimum:J.minSize.value,type:"set",inclusive:!0,exact:!1,message:J.minSize.message}),$.dirty()}if(J.maxSize!==null){if(Q.data.size>J.maxSize.value)n(Q,{code:L.too_big,maximum:J.maxSize.value,type:"set",inclusive:!0,exact:!1,message:J.maxSize.message}),$.dirty()}let Y=this._def.valueType;function X(m){let G=new Set;for(let z of m){if(z.status==="aborted")return $c;if(z.status==="dirty")$.dirty();G.add(z.value)}return{status:$.value,value:G}}let W=[...Q.data.values()].map((m,G)=>Y._parse(new a0(Q,m,Q.path,G)));if(Q.common.async)return Promise.all(W).then((m)=>X(m));else return X(W)}min(c,$){return new m$({...this._def,minSize:{value:c,message:s.toString($)}})}max(c,$){return new m$({...this._def,maxSize:{value:c,message:s.toString($)}})}size(c,$){return this.min(c,$).max(c,$)}nonempty(c){return this.min(1,c)}}m$.create=(c,$)=>{return new m$({valueType:c,minSize:null,maxSize:null,typeName:Qc.ZodSet,...zc($)})};class g$ extends Mc{constructor(){super(...arguments);this.validate=this.implement}_parse(c){let{ctx:$}=this._processInputParams(c);if($.parsedType!==F.function)return n($,{code:L.invalid_type,expected:F.function,received:$.parsedType}),$c;function Q(W,m){return $J({data:W,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,h$(),m8].filter((G)=>!!G),issueData:{code:L.invalid_arguments,argumentsError:m}})}function J(W,m){return $J({data:W,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,h$(),m8].filter((G)=>!!G),issueData:{code:L.invalid_return_type,returnTypeError:m}})}let Y={errorMap:$.common.contextualErrorMap},X=$.data;if(this._def.returns instanceof G$){let W=this;return ec(async function(...m){let G=new x0([]),z=await W._def.args.parseAsync(m,Y).catch((M)=>{throw G.addIssue(Q(m,M)),G}),x=await Reflect.apply(X,this,z);return await W._def.returns._def.type.parseAsync(x,Y).catch((M)=>{throw G.addIssue(J(x,M)),G})})}else{let W=this;return ec(function(...m){let G=W._def.args.safeParse(m,Y);if(!G.success)throw new x0([Q(m,G.error)]);let z=Reflect.apply(X,this,G.data),x=W._def.returns.safeParse(z,Y);if(!x.success)throw new x0([J(z,x.error)]);return x.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...c){return new g$({...this._def,args:t0.create(c).rest(Z8.create())})}returns(c){return new g$({...this._def,returns:c})}implement(c){return this.parse(c)}strictImplement(c){return this.parse(c)}static create(c,$,Q){return new g$({args:c?c:t0.create([]).rest(Z8.create()),returns:$||Z8.create(),typeName:Qc.ZodFunction,...zc(Q)})}}class cQ extends Mc{get schema(){return this._def.getter()}_parse(c){let{ctx:$}=this._processInputParams(c);return this._def.getter()._parse({data:$.data,path:$.path,parent:$})}}cQ.create=(c,$)=>{return new cQ({getter:c,typeName:Qc.ZodLazy,...zc($)})};class $Q extends Mc{_parse(c){if(c.data!==this._def.value){let $=this._getOrReturnCtx(c);return n($,{received:$.data,code:L.invalid_literal,expected:this._def.value}),$c}return{status:"valid",value:c.data}}get value(){return this._def.value}}$Q.create=(c,$)=>{return new $Q({value:c,typeName:Qc.ZodLiteral,...zc($)})};function Hq(c,$){return new _8({values:c,typeName:Qc.ZodEnum,...zc($)})}class _8 extends Mc{_parse(c){if(typeof c.data!=="string"){let $=this._getOrReturnCtx(c),Q=this._def.values;return n($,{expected:wc.joinValues(Q),received:$.parsedType,code:L.invalid_type}),$c}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(c.data)){let $=this._getOrReturnCtx(c),Q=this._def.values;return n($,{received:$.data,code:L.invalid_enum_value,options:Q}),$c}return ec(c.data)}get options(){return this._def.values}get enum(){let c={};for(let $ of this._def.values)c[$]=$;return c}get Values(){let c={};for(let $ of this._def.values)c[$]=$;return c}get Enum(){let c={};for(let $ of this._def.values)c[$]=$;return c}extract(c,$=this._def){return _8.create(c,{...this._def,...$})}exclude(c,$=this._def){return _8.create(this.options.filter((Q)=>!c.includes(Q)),{...this._def,...$})}}_8.create=Hq;class QQ extends Mc{_parse(c){let $=wc.getValidEnumValues(this._def.values),Q=this._getOrReturnCtx(c);if(Q.parsedType!==F.string&&Q.parsedType!==F.number){let J=wc.objectValues($);return n(Q,{expected:wc.joinValues(J),received:Q.parsedType,code:L.invalid_type}),$c}if(!this._cache)this._cache=new Set(wc.getValidEnumValues(this._def.values));if(!this._cache.has(c.data)){let J=wc.objectValues($);return n(Q,{received:Q.data,code:L.invalid_enum_value,options:J}),$c}return ec(c.data)}get enum(){return this._def.values}}QQ.create=(c,$)=>{return new QQ({values:c,typeName:Qc.ZodNativeEnum,...zc($)})};class G$ extends Mc{unwrap(){return this._def.type}_parse(c){let{ctx:$}=this._processInputParams(c);if($.parsedType!==F.promise&&$.common.async===!1)return n($,{code:L.invalid_type,expected:F.promise,received:$.parsedType}),$c;let Q=$.parsedType===F.promise?$.data:Promise.resolve($.data);return ec(Q.then((J)=>{return this._def.type.parseAsync(J,{path:$.path,errorMap:$.common.contextualErrorMap})}))}}G$.create=(c,$)=>{return new G$({type:c,typeName:Qc.ZodPromise,...zc($)})};class l0 extends Mc{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Qc.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(c){let{status:$,ctx:Q}=this._processInputParams(c),J=this._def.effect||null,Y={addIssue:(X)=>{if(n(Q,X),X.fatal)$.abort();else $.dirty()},get path(){return Q.path}};if(Y.addIssue=Y.addIssue.bind(Y),J.type==="preprocess"){let X=J.transform(Q.data,Y);if(Q.common.async)return Promise.resolve(X).then(async(W)=>{if($.value==="aborted")return $c;let m=await this._def.schema._parseAsync({data:W,path:Q.path,parent:Q});if(m.status==="aborted")return $c;if(m.status==="dirty")return Y$(m.value);if($.value==="dirty")return Y$(m.value);return m});else{if($.value==="aborted")return $c;let W=this._def.schema._parseSync({data:X,path:Q.path,parent:Q});if(W.status==="aborted")return $c;if(W.status==="dirty")return Y$(W.value);if($.value==="dirty")return Y$(W.value);return W}}if(J.type==="refinement"){let X=(W)=>{let m=J.refinement(W,Y);if(Q.common.async)return Promise.resolve(m);if(m instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return W};if(Q.common.async===!1){let W=this._def.schema._parseSync({data:Q.data,path:Q.path,parent:Q});if(W.status==="aborted")return $c;if(W.status==="dirty")$.dirty();return X(W.value),{status:$.value,value:W.value}}else return this._def.schema._parseAsync({data:Q.data,path:Q.path,parent:Q}).then((W)=>{if(W.status==="aborted")return $c;if(W.status==="dirty")$.dirty();return X(W.value).then(()=>{return{status:$.value,value:W.value}})})}if(J.type==="transform")if(Q.common.async===!1){let X=this._def.schema._parseSync({data:Q.data,path:Q.path,parent:Q});if(!p8(X))return $c;let W=J.transform(X.value,Y);if(W instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:$.value,value:W}}else return this._def.schema._parseAsync({data:Q.data,path:Q.path,parent:Q}).then((X)=>{if(!p8(X))return $c;return Promise.resolve(J.transform(X.value,Y)).then((W)=>({status:$.value,value:W}))});wc.assertNever(J)}}l0.create=(c,$,Q)=>{return new l0({schema:c,typeName:Qc.ZodEffects,effect:$,...zc(Q)})};l0.createWithPreprocess=(c,$,Q)=>{return new l0({schema:$,effect:{type:"preprocess",transform:c},typeName:Qc.ZodEffects,...zc(Q)})};class k0 extends Mc{_parse(c){if(this._getType(c)===F.undefined)return ec(void 0);return this._def.innerType._parse(c)}unwrap(){return this._def.innerType}}k0.create=(c,$)=>{return new k0({innerType:c,typeName:Qc.ZodOptional,...zc($)})};class z8 extends Mc{_parse(c){if(this._getType(c)===F.null)return ec(null);return this._def.innerType._parse(c)}unwrap(){return this._def.innerType}}z8.create=(c,$)=>{return new z8({innerType:c,typeName:Qc.ZodNullable,...zc($)})};class JQ extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q=$.data;if($.parsedType===F.undefined)Q=this._def.defaultValue();return this._def.innerType._parse({data:Q,path:$.path,parent:$})}removeDefault(){return this._def.innerType}}JQ.create=(c,$)=>{return new JQ({innerType:c,typeName:Qc.ZodDefault,defaultValue:typeof $.default==="function"?$.default:()=>$.default,...zc($)})};class YQ extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q={...$,common:{...$.common,issues:[]}},J=this._def.innerType._parse({data:Q.data,path:Q.path,parent:{...Q}});if(y$(J))return J.then((Y)=>{return{status:"valid",value:Y.status==="valid"?Y.value:this._def.catchValue({get error(){return new x0(Q.common.issues)},input:Q.data})}});else return{status:"valid",value:J.status==="valid"?J.value:this._def.catchValue({get error(){return new x0(Q.common.issues)},input:Q.data})}}removeCatch(){return this._def.innerType}}YQ.create=(c,$)=>{return new YQ({innerType:c,typeName:Qc.ZodCatch,catchValue:typeof $.catch==="function"?$.catch:()=>$.catch,...zc($)})};class WJ extends Mc{_parse(c){if(this._getType(c)!==F.nan){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.nan,received:Q.parsedType}),$c}return{status:"valid",value:c.data}}}WJ.create=(c)=>{return new WJ({typeName:Qc.ZodNaN,...zc(c)})};var u2=Symbol("zod_brand");class TY extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q=$.data;return this._def.type._parse({data:Q,path:$.path,parent:$})}unwrap(){return this._def.type}}class mJ extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.common.async)return(async()=>{let Y=await this._def.in._parseAsync({data:Q.data,path:Q.path,parent:Q});if(Y.status==="aborted")return $c;if(Y.status==="dirty")return $.dirty(),Y$(Y.value);else return this._def.out._parseAsync({data:Y.value,path:Q.path,parent:Q})})();else{let J=this._def.in._parseSync({data:Q.data,path:Q.path,parent:Q});if(J.status==="aborted")return $c;if(J.status==="dirty")return $.dirty(),{status:"dirty",value:J.value};else return this._def.out._parseSync({data:J.value,path:Q.path,parent:Q})}}static create(c,$){return new mJ({in:c,out:$,typeName:Qc.ZodPipeline})}}class XQ extends Mc{_parse(c){let $=this._def.innerType._parse(c),Q=(J)=>{if(p8(J))J.value=Object.freeze(J.value);return J};return y$($)?$.then((J)=>Q(J)):Q($)}unwrap(){return this._def.innerType}}XQ.create=(c,$)=>{return new XQ({innerType:c,typeName:Qc.ZodReadonly,...zc($)})};function jq(c,$){let Q=typeof c==="function"?c($):typeof c==="string"?{message:c}:c;return typeof Q==="string"?{message:Q}:Q}function Oq(c,$={},Q){if(c)return W$.create().superRefine((J,Y)=>{let X=c(J);if(X instanceof Promise)return X.then((W)=>{if(!W){let m=jq($,J),G=m.fatal??Q??!0;Y.addIssue({code:"custom",...m,fatal:G})}});if(!X){let W=jq($,J),m=W.fatal??Q??!0;Y.addIssue({code:"custom",...W,fatal:m})}return});return W$.create()}var k2={object:Cc.lazycreate},Qc;(function(c){c.ZodString="ZodString",c.ZodNumber="ZodNumber",c.ZodNaN="ZodNaN",c.ZodBigInt="ZodBigInt",c.ZodBoolean="ZodBoolean",c.ZodDate="ZodDate",c.ZodSymbol="ZodSymbol",c.ZodUndefined="ZodUndefined",c.ZodNull="ZodNull",c.ZodAny="ZodAny",c.ZodUnknown="ZodUnknown",c.ZodNever="ZodNever",c.ZodVoid="ZodVoid",c.ZodArray="ZodArray",c.ZodObject="ZodObject",c.ZodUnion="ZodUnion",c.ZodDiscriminatedUnion="ZodDiscriminatedUnion",c.ZodIntersection="ZodIntersection",c.ZodTuple="ZodTuple",c.ZodRecord="ZodRecord",c.ZodMap="ZodMap",c.ZodSet="ZodSet",c.ZodFunction="ZodFunction",c.ZodLazy="ZodLazy",c.ZodLiteral="ZodLiteral",c.ZodEnum="ZodEnum",c.ZodEffects="ZodEffects",c.ZodNativeEnum="ZodNativeEnum",c.ZodOptional="ZodOptional",c.ZodNullable="ZodNullable",c.ZodDefault="ZodDefault",c.ZodCatch="ZodCatch",c.ZodPromise="ZodPromise",c.ZodBranded="ZodBranded",c.ZodPipeline="ZodPipeline",c.ZodReadonly="ZodReadonly"})(Qc||(Qc={}));var a2=(c,$={message:`Input not instance of ${c.name}`})=>Oq((Q)=>Q instanceof c,$),Rq=n0.create,pq=I8.create,l2=WJ.create,h2=L8.create,Zq=d$.create,y2=X$.create,o2=QJ.create,g2=s$.create,d2=r$.create,s2=W$.create,r2=Z8.create,t2=r0.create,e2=JJ.create,cD=u0.create,$D=Cc.create,QD=Cc.strictCreate,JD=t$.create,YD=FY.create,XD=e$.create,WD=t0.create,mD=YJ.create,GD=XJ.create,zD=m$.create,xD=g$.create,qD=cQ.create,MD=$Q.create,ND=_8.create,VD=QQ.create,wD=G$.create,iD=l0.create,vD=k0.create,UD=z8.create,jD=l0.createWithPreprocess,KD=mJ.create,DD=()=>Rq().optional(),BD=()=>pq().optional(),HD=()=>Zq().optional(),OD={string:(c)=>n0.create({...c,coerce:!0}),number:(c)=>I8.create({...c,coerce:!0}),boolean:(c)=>d$.create({...c,coerce:!0}),bigint:(c)=>L8.create({...c,coerce:!0}),date:(c)=>X$.create({...c,coerce:!0})};var RD=$c;var pD=/^(wss?|https?):\/\//i,ZD=/^nsec1[0-9a-z]+$/i,Sq=/^[0-9a-f]{64}$/i,ID=/^[^/\s]+\/[^/\s]+$/,LD=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Iq(c){try{let $=new URL(c);return $.protocol==="http:"||$.protocol==="https:"}catch{return!1}}function _D(c){if(!pD.test(c))return!1;try{return new URL(c.replace(/^wss:\/\//i,"https://").replace(/^ws:\/\//i,"http://")).hostname.length>0}catch{return!1}}function Lq(c){if(!Array.isArray(c))return c;return c.map(($)=>typeof $==="string"?$.trim():$).filter(($)=>$!=="")}var SD=E.object({kind:E.literal("github"),token:E.string({required_error:"tracker.token is required for the github tracker"}).trim().min(1,"tracker.token is required for the github tracker"),repo:E.string({required_error:"tracker.repo (owner/repo) is required for the github tracker"}).trim().min(1,"tracker.repo (owner/repo) is required for the github tracker").refine((c)=>ID.test(c),{message:"tracker.repo must be owner/repo"})}).strict(),AD=E.object({kind:E.literal("buzz"),ownerHex:E.string({required_error:"tracker.ownerHex must be a 64-char hex pubkey for the buzz tracker"}).trim().regex(Sq,"tracker.ownerHex must be a 64-char hex pubkey for the buzz tracker"),repoId:E.string({required_error:"tracker.repoId is required for the buzz tracker"}).trim().min(1,"tracker.repoId is required for the buzz tracker")}).strict(),CD=E.discriminatedUnion("kind",[SD,AD]),Aq=E.object({label:E.string().trim().optional(),relayUrl:E.string({required_error:"relayUrl is required",invalid_type_error:"relayUrl is required"}).trim().min(1,"relayUrl is required").refine(_D,{message:"relayUrl must be a ws(s):// or https:// URL with a host"}),privateKey:E.string({required_error:"privateKey is required",invalid_type_error:"privateKey is required"}).trim().min(1,"privateKey is required").refine((c)=>ZD.test(c)||Sq.test(c),{message:"privateKey must be an nsec… or 64-char hex key"}),figuraToken:E.string({required_error:"figuraToken is required",invalid_type_error:"figuraToken is required"}).trim().min(1,"figuraToken is required"),channels:E.preprocess(Lq,E.array(E.string()).default([]).superRefine((c,$)=>{for(let Q of c)if(!LD.test(Q))$.addIssue({code:E.ZodIssueCode.custom,message:`channel "${Q}" is not a UUID`})})),triggers:E.preprocess((c)=>c===void 0?void 0:Lq(c),E.array(E.string()).optional().superRefine((c,$)=>{if(c!==void 0&&c.length===0)$.addIssue({code:E.ZodIssueCode.custom,message:"triggers is present but empty — omit it or give at least one trigger"})})),appOrigin:E.string().trim().refine(Iq,{message:"appOrigin must be an http(s) URL"}).optional(),apiUrl:E.string().trim().refine(Iq,{message:"apiUrl must be an http(s) URL"}).optional(),device:E.string().trim().min(1,"device must be a non-empty string when present").optional(),platform:E.string().trim().optional().superRefine((c,$)=>{if(c!==void 0&&c!=="mobile"&&c!=="web")$.addIssue({code:E.ZodIssueCode.custom,message:"platform must be one of: mobile | web"})}),tracker:CD.optional()}).strict();function z$(c){if(c.label)return c.label;let $=c.relayUrl??"";try{return new URL($.replace(/^wss:\/\//i,"https://").replace(/^ws:\/\//i,"http://")).host}catch{return $||"binding"}}function Cq(c){if(c.code===E.ZodIssueCode.unrecognized_keys){let $=c.keys.join(", ");return c.path.includes("tracker")?`tracker unknown key(s): ${$}`:`unknown key(s): ${$} (check spelling of the known fields)`}if(c.code===E.ZodIssueCode.invalid_union_discriminator)return'tracker.kind must be "github" or "buzz"';return c.message}function Pq(c){let $=Aq.safeParse(c);return $.success?[]:$.error.issues.map(Cq)}function _q(c){let $=c??{},Q=typeof $.label==="string"&&$.label.trim()?$.label.trim():void 0,J=typeof $.relayUrl==="string"?$.relayUrl:"";return z$({label:Q,relayUrl:J})}function _W(c,$="bindings config"){let Q=typeof $==="string"?{source:$}:$,J=Q.source??"bindings config",Y;try{Y=JSON.parse(c)}catch(z){throw Error(`${J} is not valid JSON: ${z instanceof Error?z.message:String(z)}`)}let X=Array.isArray(Y)?Y:Y&&typeof Y==="object"&&Array.isArray(Y.bindings)?Y.bindings:null;if(!X)throw Error(`${J} must be a JSON array of bindings (or { "bindings": [...] })`);if(X.length===0)throw Error(`${J} has no bindings`);let W=[],m=[];X.forEach((z,x)=>{let q=Aq.safeParse(z);if(q.success)m.push(q.data);else W.push(`binding[${x}] (${_q(z)}): ${q.error.issues.map(Cq).join("; ")}`)});let G=new Map;for(let z of X){let x=_q(z);G.set(x,(G.get(x)??0)+1)}for(let[z,x]of G)if(x>1)W.push(`duplicate label "${z}" across ${x} bindings — give each a distinct label`);if(W.length)throw Error(`invalid ${J}:
|
|
528
530
|
${W.join(`
|
|
529
|
-
`)}`);if(Q.onWarn){let z=new Set;for(let x of m){let q=`${x.relayUrl} ${x.privateKey}`;if(z.has(q))Q.onWarn(`two bindings share the same relayUrl + privateKey (${G$(x)}) — is that intentional?`);z.add(q)}}return m}i0();import{createHash as lI,randomUUID as hI}from"node:crypto";/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function GJ(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function I0(c,$=""){if(!Number.isSafeInteger(c)||c<0){let Q=$&&`"${$}" `;throw Error(`${Q}expected integer >= 0, got ${c}`)}}function vc(c,$,Q=""){let J=GJ(c),Y=c?.length,X=$!==void 0;if(!J||X&&Y!==$){let W=Q&&`"${Q}" `,m=X?` of length ${$}`:"",G=J?`length=${Y}`:`type=${typeof c}`;throw Error(W+"expected Uint8Array"+m+", got "+G)}return c}function z$(c){if(typeof c!=="function"||typeof c.create!=="function")throw Error("Hash must wrapped by utils.createHasher");I0(c.outputLen),I0(c.blockLen)}function WQ(c,$=!0){if(c.destroyed)throw Error("Hash instance has been destroyed");if($&&c.finished)throw Error("Hash#digest() has already been called")}function Sq(c,$){vc(c,void 0,"digestInto() output");let Q=$.outputLen;if(c.length<Q)throw Error('"digestInto() output" expected to be of length >='+Q)}function h0(...c){for(let $=0;$<c.length;$++)c[$].fill(0)}function TY(c){return new DataView(c.buffer,c.byteOffset,c.byteLength)}function y0(c,$){return c<<32-$|c>>>$}var Aq=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),ZD=Array.from({length:256},(c,$)=>$.toString(16).padStart(2,"0"));function Hc(c){if(vc(c),Aq)return c.toHex();let $="";for(let Q=0;Q<c.length;Q++)$+=ZD[c[Q]];return $}var x8={_0:48,_9:57,A:65,F:70,a:97,f:102};function _q(c){if(c>=x8._0&&c<=x8._9)return c-x8._0;if(c>=x8.A&&c<=x8.F)return c-(x8.A-10);if(c>=x8.a&&c<=x8.f)return c-(x8.a-10);return}function Rc(c){if(typeof c!=="string")throw Error("hex string expected, got "+typeof c);if(Aq)return Uint8Array.fromHex(c);let $=c.length,Q=$/2;if($%2)throw Error("hex string expected, got unpadded hex of length "+$);let J=new Uint8Array(Q);for(let Y=0,X=0;Y<Q;Y++,X+=2){let W=_q(c.charCodeAt(X)),m=_q(c.charCodeAt(X+1));if(W===void 0||m===void 0){let G=c[X]+c[X+1];throw Error('hex string expected, got non-hex character "'+G+'" at index '+X)}J[Y]=W*16+m}return J}function Fc(...c){let $=0;for(let J=0;J<c.length;J++){let Y=c[J];vc(Y),$+=Y.length}let Q=new Uint8Array($);for(let J=0,Y=0;J<c.length;J++){let X=c[J];Q.set(X,Y),Y+=X.length}return Q}function Cq(c,$={}){let Q=(Y,X)=>c(X).update(Y).digest(),J=c(void 0);return Q.outputLen=J.outputLen,Q.blockLen=J.blockLen,Q.create=(Y)=>c(Y),Object.assign(Q,$),Object.freeze(Q)}function o0(c=32){let $=typeof globalThis==="object"?globalThis.crypto:null;if(typeof $?.getRandomValues!=="function")throw Error("crypto.getRandomValues must be defined");return $.getRandomValues(new Uint8Array(c))}var Pq=(c)=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,c])});function Eq(c,$,Q){return c&$^~c&Q}function bq(c,$,Q){return c&$^c&Q^$&Q}class fY{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(c,$,Q,J){this.blockLen=c,this.outputLen=$,this.padOffset=Q,this.isLE=J,this.buffer=new Uint8Array(c),this.view=TY(this.buffer)}update(c){WQ(this),vc(c);let{view:$,buffer:Q,blockLen:J}=this,Y=c.length;for(let X=0;X<Y;){let W=Math.min(J-this.pos,Y-X);if(W===J){let m=TY(c);for(;J<=Y-X;X+=J)this.process(m,X);continue}if(Q.set(c.subarray(X,X+W),this.pos),this.pos+=W,X+=W,this.pos===J)this.process($,0),this.pos=0}return this.length+=c.length,this.roundClean(),this}digestInto(c){WQ(this),Sq(c,this),this.finished=!0;let{buffer:$,view:Q,blockLen:J,isLE:Y}=this,{pos:X}=this;if($[X++]=128,h0(this.buffer.subarray(X)),this.padOffset>J-X)this.process(Q,0),X=0;for(let x=X;x<J;x++)$[x]=0;Q.setBigUint64(J-8,BigInt(this.length*8),Y),this.process(Q,0);let W=TY(c),m=this.outputLen;if(m%4)throw Error("_sha2: outputLen must be aligned to 32bit");let G=m/4,z=this.get();if(G>z.length)throw Error("_sha2: outputLen bigger than state");for(let x=0;x<G;x++)W.setUint32(4*x,z[x],Y)}digest(){let{buffer:c,outputLen:$}=this;this.digestInto(c);let Q=c.slice(0,$);return this.destroy(),Q}_cloneInto(c){c||=new this.constructor,c.set(...this.get());let{blockLen:$,buffer:Q,length:J,finished:Y,destroyed:X,pos:W}=this;if(c.destroyed=X,c.finished=Y,c.length=J,c.pos=W,J%$)c.buffer.set(Q);return c}clone(){return this._cloneInto()}}var q8=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),M8=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),gc=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),dc=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);var nY=BigInt(4294967295),Fq=BigInt(32);function LD(c,$=!1){if($)return{h:Number(c&nY),l:Number(c>>Fq&nY)};return{h:Number(c>>Fq&nY)|0,l:Number(c&nY)|0}}function Tq(c,$=!1){let Q=c.length,J=new Uint32Array(Q),Y=new Uint32Array(Q);for(let X=0;X<Q;X++){let{h:W,l:m}=LD(c[X],$);[J[X],Y[X]]=[W,m]}return[J,Y]}var LW=(c,$,Q)=>c>>>Q,_W=(c,$,Q)=>c<<32-Q|$>>>Q,x$=(c,$,Q)=>c>>>Q|$<<32-Q,q$=(c,$,Q)=>c<<32-Q|$>>>Q,zJ=(c,$,Q)=>c<<64-Q|$>>>Q-32,xJ=(c,$,Q)=>c>>>Q-32|$<<64-Q;function e0(c,$,Q,J){let Y=($>>>0)+(J>>>0);return{h:c+Q+(Y/4294967296|0)|0,l:Y|0}}var fq=(c,$,Q)=>(c>>>0)+($>>>0)+(Q>>>0),nq=(c,$,Q,J)=>$+Q+J+(c/4294967296|0)|0,uq=(c,$,Q,J)=>(c>>>0)+($>>>0)+(Q>>>0)+(J>>>0),kq=(c,$,Q,J,Y)=>$+Q+J+Y+(c/4294967296|0)|0,aq=(c,$,Q,J,Y)=>(c>>>0)+($>>>0)+(Q>>>0)+(J>>>0)+(Y>>>0),lq=(c,$,Q,J,Y,X)=>$+Q+J+Y+X+(c/4294967296|0)|0;var SD=Uint32Array.from([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]),S8=new Uint32Array(64);class SW extends fY{constructor(c){super(64,c,8,!1)}get(){let{A:c,B:$,C:Q,D:J,E:Y,F:X,G:W,H:m}=this;return[c,$,Q,J,Y,X,W,m]}set(c,$,Q,J,Y,X,W,m){this.A=c|0,this.B=$|0,this.C=Q|0,this.D=J|0,this.E=Y|0,this.F=X|0,this.G=W|0,this.H=m|0}process(c,$){for(let x=0;x<16;x++,$+=4)S8[x]=c.getUint32($,!1);for(let x=16;x<64;x++){let q=S8[x-15],M=S8[x-2],N=y0(q,7)^y0(q,18)^q>>>3,w=y0(M,17)^y0(M,19)^M>>>10;S8[x]=w+S8[x-7]+N+S8[x-16]|0}let{A:Q,B:J,C:Y,D:X,E:W,F:m,G,H:z}=this;for(let x=0;x<64;x++){let q=y0(W,6)^y0(W,11)^y0(W,25),M=z+q+Eq(W,m,G)+SD[x]+S8[x]|0,w=(y0(Q,2)^y0(Q,13)^y0(Q,22))+bq(Q,J,Y)|0;z=G,G=m,m=W,W=X+M|0,X=Y,Y=J,J=Q,Q=M+w|0}Q=Q+this.A|0,J=J+this.B|0,Y=Y+this.C|0,X=X+this.D|0,W=W+this.E|0,m=m+this.F|0,G=G+this.G|0,z=z+this.H|0,this.set(Q,J,Y,X,W,m,G,z)}roundClean(){h0(S8)}destroy(){this.set(0,0,0,0,0,0,0,0),h0(this.buffer)}}class hq extends SW{A=q8[0]|0;B=q8[1]|0;C=q8[2]|0;D=q8[3]|0;E=q8[4]|0;F=q8[5]|0;G=q8[6]|0;H=q8[7]|0;constructor(){super(32)}}class AD extends SW{A=M8[0]|0;B=M8[1]|0;C=M8[2]|0;D=M8[3]|0;E=M8[4]|0;F=M8[5]|0;G=M8[6]|0;H=M8[7]|0;constructor(){super(28)}}var yq=(()=>Tq(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((c)=>BigInt(c))))(),CD=(()=>yq[0])(),PD=(()=>yq[1])(),A8=new Uint32Array(80),C8=new Uint32Array(80);class qJ extends fY{constructor(c){super(128,c,16,!1)}get(){let{Ah:c,Al:$,Bh:Q,Bl:J,Ch:Y,Cl:X,Dh:W,Dl:m,Eh:G,El:z,Fh:x,Fl:q,Gh:M,Gl:N,Hh:w,Hl:U}=this;return[c,$,Q,J,Y,X,W,m,G,z,x,q,M,N,w,U]}set(c,$,Q,J,Y,X,W,m,G,z,x,q,M,N,w,U){this.Ah=c|0,this.Al=$|0,this.Bh=Q|0,this.Bl=J|0,this.Ch=Y|0,this.Cl=X|0,this.Dh=W|0,this.Dl=m|0,this.Eh=G|0,this.El=z|0,this.Fh=x|0,this.Fl=q|0,this.Gh=M|0,this.Gl=N|0,this.Hh=w|0,this.Hl=U|0}process(c,$){for(let j=0;j<16;j++,$+=4)A8[j]=c.getUint32($),C8[j]=c.getUint32($+=4);for(let j=16;j<80;j++){let D=A8[j-15]|0,_=C8[j-15]|0,mc=x$(D,_,1)^x$(D,_,8)^LW(D,_,7),g=q$(D,_,1)^q$(D,_,8)^_W(D,_,7),Jc=A8[j-2]|0,u=C8[j-2]|0,a=x$(Jc,u,19)^zJ(Jc,u,61)^LW(Jc,u,6),Xc=q$(Jc,u,19)^xJ(Jc,u,61)^_W(Jc,u,6),e=uq(g,Xc,C8[j-7],C8[j-16]),B=kq(e,mc,a,A8[j-7],A8[j-16]);A8[j]=B|0,C8[j]=e|0}let{Ah:Q,Al:J,Bh:Y,Bl:X,Ch:W,Cl:m,Dh:G,Dl:z,Eh:x,El:q,Fh:M,Fl:N,Gh:w,Gl:U,Hh:v,Hl:i}=this;for(let j=0;j<80;j++){let D=x$(x,q,14)^x$(x,q,18)^zJ(x,q,41),_=q$(x,q,14)^q$(x,q,18)^xJ(x,q,41),mc=x&M^~x&w,g=q&N^~q&U,Jc=aq(i,_,g,PD[j],C8[j]),u=lq(Jc,v,D,mc,CD[j],A8[j]),a=Jc|0,Xc=x$(Q,J,28)^zJ(Q,J,34)^zJ(Q,J,39),e=q$(Q,J,28)^xJ(Q,J,34)^xJ(Q,J,39),B=Q&Y^Q&W^Y&W,C=J&X^J&m^X&m;v=w|0,i=U|0,w=M|0,U=N|0,M=x|0,N=q|0,{h:x,l:q}=e0(G|0,z|0,u|0,a|0),G=W|0,z=m|0,W=Y|0,m=X|0,Y=Q|0,X=J|0;let K=fq(a,e,C);Q=nq(K,u,Xc,B),J=K|0}({h:Q,l:J}=e0(this.Ah|0,this.Al|0,Q|0,J|0)),{h:Y,l:X}=e0(this.Bh|0,this.Bl|0,Y|0,X|0),{h:W,l:m}=e0(this.Ch|0,this.Cl|0,W|0,m|0),{h:G,l:z}=e0(this.Dh|0,this.Dl|0,G|0,z|0),{h:x,l:q}=e0(this.Eh|0,this.El|0,x|0,q|0),{h:M,l:N}=e0(this.Fh|0,this.Fl|0,M|0,N|0),{h:w,l:U}=e0(this.Gh|0,this.Gl|0,w|0,U|0),{h:v,l:i}=e0(this.Hh|0,this.Hl|0,v|0,i|0),this.set(Q,J,Y,X,W,m,G,z,x,q,M,N,w,U,v,i)}roundClean(){h0(A8,C8)}destroy(){h0(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class ED extends qJ{Ah=dc[0]|0;Al=dc[1]|0;Bh=dc[2]|0;Bl=dc[3]|0;Ch=dc[4]|0;Cl=dc[5]|0;Dh=dc[6]|0;Dl=dc[7]|0;Eh=dc[8]|0;El=dc[9]|0;Fh=dc[10]|0;Fl=dc[11]|0;Gh=dc[12]|0;Gl=dc[13]|0;Hh=dc[14]|0;Hl=dc[15]|0;constructor(){super(64)}}class bD extends qJ{Ah=gc[0]|0;Al=gc[1]|0;Bh=gc[2]|0;Bl=gc[3]|0;Ch=gc[4]|0;Cl=gc[5]|0;Dh=gc[6]|0;Dl=gc[7]|0;Eh=gc[8]|0;El=gc[9]|0;Fh=gc[10]|0;Fl=gc[11]|0;Gh=gc[12]|0;Gl=gc[13]|0;Hh=gc[14]|0;Hl=gc[15]|0;constructor(){super(48)}}var c0=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),$0=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class FD extends qJ{Ah=c0[0]|0;Al=c0[1]|0;Bh=c0[2]|0;Bl=c0[3]|0;Ch=c0[4]|0;Cl=c0[5]|0;Dh=c0[6]|0;Dl=c0[7]|0;Eh=c0[8]|0;El=c0[9]|0;Fh=c0[10]|0;Fl=c0[11]|0;Gh=c0[12]|0;Gl=c0[13]|0;Hh=c0[14]|0;Hl=c0[15]|0;constructor(){super(28)}}class TD extends qJ{Ah=$0[0]|0;Al=$0[1]|0;Bh=$0[2]|0;Bl=$0[3]|0;Ch=$0[4]|0;Cl=$0[5]|0;Dh=$0[6]|0;Dl=$0[7]|0;Eh=$0[8]|0;El=$0[9]|0;Fh=$0[10]|0;Fl=$0[11]|0;Gh=$0[12]|0;Gl=$0[13]|0;Hh=$0[14]|0;Hl=$0[15]|0;constructor(){super(32)}}var Q0=Cq(()=>new hq,Pq(1));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var CW=BigInt(0),AW=BigInt(1);function MJ(c,$=""){if(typeof c!=="boolean"){let Q=$&&`"${$}" `;throw Error(Q+"expected boolean, got type="+typeof c)}return c}function oq(c){if(typeof c==="bigint"){if(!uY(c))throw Error("positive bigint expected, got "+c)}else I0(c);return c}function NJ(c){let $=oq(c).toString(16);return $.length&1?"0"+$:$}function gq(c){if(typeof c!=="string")throw Error("hex string expected, got "+typeof c);return c===""?CW:BigInt("0x"+c)}function P8(c){return gq(Hc(c))}function PW(c){return gq(Hc(fD(vc(c)).reverse()))}function kY(c,$){I0($),c=oq(c);let Q=Rc(c.toString(16).padStart($*2,"0"));if(Q.length!==$)throw Error("number too large");return Q}function EW(c,$){return kY(c,$).reverse()}function fD(c){return Uint8Array.from(c)}function dq(c){return Uint8Array.from(c,($,Q)=>{let J=$.charCodeAt(0);if($.length!==1||J>127)throw Error(`string contains non-ASCII character "${c[Q]}" with code ${J} at position ${Q}`);return J})}var uY=(c)=>typeof c==="bigint"&&CW<=c;function nD(c,$,Q){return uY(c)&&uY($)&&uY(Q)&&$<=c&&c<Q}function sq(c,$,Q,J){if(!nD($,Q,J))throw Error("expected valid "+c+": "+Q+" <= n < "+J+", got "+$)}function bW(c){let $;for($=0;c>CW;c>>=AW,$+=1);return $}var VJ=(c)=>(AW<<BigInt(c))-AW;function rq(c,$,Q){if(I0(c,"hashLen"),I0($,"qByteLen"),typeof Q!=="function")throw Error("hmacFn must be a function");let J=(v)=>new Uint8Array(v),Y=Uint8Array.of(),X=Uint8Array.of(0),W=Uint8Array.of(1),m=1000,G=J(c),z=J(c),x=0,q=()=>{G.fill(1),z.fill(0),x=0},M=(...v)=>Q(z,Fc(G,...v)),N=(v=Y)=>{if(z=M(X,v),G=M(),v.length===0)return;z=M(W,v),G=M()},w=()=>{if(x++>=m)throw Error("drbg: tried max amount of iterations");let v=0,i=[];while(v<$){G=M();let j=G.slice();i.push(j),v+=G.length}return Fc(...i)};return(v,i)=>{q(),N(v);let j=void 0;while(!(j=i(w())))N();return q(),j}}function wJ(c,$={},Q={}){if(!c||typeof c!=="object")throw Error("expected valid options object");function J(X,W,m){let G=c[X];if(m&&G===void 0)return;let z=typeof G;if(z!==W||G===null)throw Error(`param "${X}" is invalid: expected ${W}, got ${z}`)}let Y=(X,W)=>Object.entries(X).forEach(([m,G])=>J(m,G,W));Y($,!1),Y(Q,!0)}function FW(c){let $=new WeakMap;return(Q,...J)=>{let Y=$.get(Q);if(Y!==void 0)return Y;let X=c(Q,...J);return $.set(Q,X),X}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var m0=BigInt(0),J0=BigInt(1),M$=BigInt(2),cM=BigInt(3),$M=BigInt(4),QM=BigInt(5),uD=BigInt(7),JM=BigInt(8),kD=BigInt(9),YM=BigInt(16);function g0(c,$){let Q=c%$;return Q>=m0?Q:$+Q}function U0(c,$,Q){let J=c;while($-- >m0)J*=J,J%=Q;return J}function tq(c,$){if(c===m0)throw Error("invert: expected non-zero number");if($<=m0)throw Error("invert: expected positive modulus, got "+$);let Q=g0(c,$),J=$,Y=m0,X=J0,W=J0,m=m0;while(Q!==m0){let z=J/Q,x=J%Q,q=Y-W*z,M=X-m*z;J=Q,Q=x,Y=W,X=m,W=q,m=M}if(J!==J0)throw Error("invert: does not exist");return g0(Y,$)}function TW(c,$,Q){if(!c.eql(c.sqr($),Q))throw Error("Cannot find square root")}function XM(c,$){let Q=(c.ORDER+J0)/$M,J=c.pow($,Q);return TW(c,J,$),J}function aD(c,$){let Q=(c.ORDER-QM)/JM,J=c.mul($,M$),Y=c.pow(J,Q),X=c.mul($,Y),W=c.mul(c.mul(X,M$),Y),m=c.mul(X,c.sub(W,c.ONE));return TW(c,m,$),m}function lD(c){let $=mQ(c),Q=WM(c),J=Q($,$.neg($.ONE)),Y=Q($,J),X=Q($,$.neg(J)),W=(c+uD)/YM;return(m,G)=>{let z=m.pow(G,W),x=m.mul(z,J),q=m.mul(z,Y),M=m.mul(z,X),N=m.eql(m.sqr(x),G),w=m.eql(m.sqr(q),G);z=m.cmov(z,x,N),x=m.cmov(M,q,w);let U=m.eql(m.sqr(x),G),v=m.cmov(z,x,U);return TW(m,v,G),v}}function WM(c){if(c<cM)throw Error("sqrt is not defined for small field");let $=c-J0,Q=0;while($%M$===m0)$/=M$,Q++;let J=M$,Y=mQ(c);while(eq(Y,J)===1)if(J++>1000)throw Error("Cannot find square root: probably non-prime P");if(Q===1)return XM;let X=Y.pow(J,$),W=($+J0)/M$;return function(G,z){if(G.is0(z))return z;if(eq(G,z)!==1)throw Error("Cannot find square root");let x=Q,q=G.mul(G.ONE,X),M=G.pow(z,$),N=G.pow(z,W);while(!G.eql(M,G.ONE)){if(G.is0(M))return G.ZERO;let w=1,U=G.sqr(M);while(!G.eql(U,G.ONE))if(w++,U=G.sqr(U),w===x)throw Error("Cannot find square root");let v=J0<<BigInt(x-w-1),i=G.pow(q,v);x=w,q=G.sqr(i),M=G.mul(M,q),N=G.mul(N,i)}return N}}function hD(c){if(c%$M===cM)return XM;if(c%JM===QM)return aD;if(c%YM===kD)return lD(c);return WM(c)}var yD=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function fW(c){let $={ORDER:"bigint",BYTES:"number",BITS:"number"},Q=yD.reduce((J,Y)=>{return J[Y]="function",J},$);return wJ(c,Q),c}function oD(c,$,Q){if(Q<m0)throw Error("invalid exponent, negatives unsupported");if(Q===m0)return c.ONE;if(Q===J0)return $;let J=c.ONE,Y=$;while(Q>m0){if(Q&J0)J=c.mul(J,Y);Y=c.sqr(Y),Q>>=J0}return J}function aY(c,$,Q=!1){let J=Array($.length).fill(Q?c.ZERO:void 0),Y=$.reduce((W,m,G)=>{if(c.is0(m))return W;return J[G]=W,c.mul(W,m)},c.ONE),X=c.inv(Y);return $.reduceRight((W,m,G)=>{if(c.is0(m))return W;return J[G]=c.mul(W,J[G]),c.mul(W,m)},X),J}function eq(c,$){let Q=(c.ORDER-J0)/M$,J=c.pow($,Q),Y=c.eql(J,c.ONE),X=c.eql(J,c.ZERO),W=c.eql(J,c.neg(c.ONE));if(!Y&&!X&&!W)throw Error("invalid Legendre symbol result");return Y?1:X?0:-1}function gD(c,$){if($!==void 0)I0($);let Q=$!==void 0?$:c.toString(2).length,J=Math.ceil(Q/8);return{nBitLength:Q,nByteLength:J}}class mM{ORDER;BITS;BYTES;isLE;ZERO=m0;ONE=J0;_lengths;_sqrt;_mod;constructor(c,$={}){if(c<=m0)throw Error("invalid field: expected ORDER > 0, got "+c);let Q=void 0;if(this.isLE=!1,$!=null&&typeof $==="object"){if(typeof $.BITS==="number")Q=$.BITS;if(typeof $.sqrt==="function")this.sqrt=$.sqrt;if(typeof $.isLE==="boolean")this.isLE=$.isLE;if($.allowedLengths)this._lengths=$.allowedLengths?.slice();if(typeof $.modFromBytes==="boolean")this._mod=$.modFromBytes}let{nBitLength:J,nByteLength:Y}=gD(c,Q);if(Y>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=c,this.BITS=J,this.BYTES=Y,this._sqrt=void 0,Object.preventExtensions(this)}create(c){return g0(c,this.ORDER)}isValid(c){if(typeof c!=="bigint")throw Error("invalid field element: expected bigint, got "+typeof c);return m0<=c&&c<this.ORDER}is0(c){return c===m0}isValidNot0(c){return!this.is0(c)&&this.isValid(c)}isOdd(c){return(c&J0)===J0}neg(c){return g0(-c,this.ORDER)}eql(c,$){return c===$}sqr(c){return g0(c*c,this.ORDER)}add(c,$){return g0(c+$,this.ORDER)}sub(c,$){return g0(c-$,this.ORDER)}mul(c,$){return g0(c*$,this.ORDER)}pow(c,$){return oD(this,c,$)}div(c,$){return g0(c*tq($,this.ORDER),this.ORDER)}sqrN(c){return c*c}addN(c,$){return c+$}subN(c,$){return c-$}mulN(c,$){return c*$}inv(c){return tq(c,this.ORDER)}sqrt(c){if(!this._sqrt)this._sqrt=hD(this.ORDER);return this._sqrt(this,c)}toBytes(c){return this.isLE?EW(c,this.BYTES):kY(c,this.BYTES)}fromBytes(c,$=!1){vc(c);let{_lengths:Q,BYTES:J,isLE:Y,ORDER:X,_mod:W}=this;if(Q){if(!Q.includes(c.length)||c.length>J)throw Error("Field.fromBytes: expected "+Q+" bytes, got "+c.length);let G=new Uint8Array(J);G.set(c,Y?0:G.length-c.length),c=G}if(c.length!==J)throw Error("Field.fromBytes: expected "+J+" bytes, got "+c.length);let m=Y?PW(c):P8(c);if(W)m=g0(m,X);if(!$){if(!this.isValid(m))throw Error("invalid field element: outside of range 0..ORDER")}return m}invertBatch(c){return aY(this,c)}cmov(c,$,Q){return Q?$:c}}function mQ(c,$={}){return new mM(c,$)}function GM(c){if(typeof c!=="bigint")throw Error("field order must be bigint");let $=c.toString(2).length;return Math.ceil($/8)}function nW(c){let $=GM(c);return $+Math.ceil($/2)}function lY(c,$,Q=!1){vc(c);let J=c.length,Y=GM($),X=nW($);if(J<16||J<X||J>1024)throw Error("expected "+X+"-1024 bytes of input, got "+J);let W=Q?PW(c):P8(c),m=g0(W,$-J0)+J0;return Q?EW(m,Y):kY(m,Y)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var GQ=BigInt(0),N$=BigInt(1);function iJ(c,$){let Q=$.negate();return c?Q:$}function lW(c,$){let Q=aY(c.Fp,$.map((J)=>J.Z));return $.map((J,Y)=>c.fromAffine(J.toAffine(Q[Y])))}function MM(c,$){if(!Number.isSafeInteger(c)||c<=0||c>$)throw Error("invalid window size, expected [1.."+$+"], got W="+c)}function uW(c,$){MM(c,$);let Q=Math.ceil($/c)+1,J=2**(c-1),Y=2**c,X=VJ(c),W=BigInt(c);return{windows:Q,windowSize:J,mask:X,maxNumber:Y,shiftBy:W}}function zM(c,$,Q){let{windowSize:J,mask:Y,maxNumber:X,shiftBy:W}=Q,m=Number(c&Y),G=c>>W;if(m>J)m-=X,G+=N$;let z=$*J,x=z+Math.abs(m)-1,q=m===0,M=m<0,N=$%2!==0;return{nextN:G,offset:x,isZero:q,isNeg:M,isNegF:N,offsetF:z}}var kW=new WeakMap,NM=new WeakMap;function aW(c){return NM.get(c)||1}function xM(c){if(c!==GQ)throw Error("invalid wNAF")}class hW{BASE;ZERO;Fn;bits;constructor(c,$){this.BASE=c.BASE,this.ZERO=c.ZERO,this.Fn=c.Fn,this.bits=$}_unsafeLadder(c,$,Q=this.ZERO){let J=c;while($>GQ){if($&N$)Q=Q.add(J);J=J.double(),$>>=N$}return Q}precomputeWindow(c,$){let{windows:Q,windowSize:J}=uW($,this.bits),Y=[],X=c,W=X;for(let m=0;m<Q;m++){W=X,Y.push(W);for(let G=1;G<J;G++)W=W.add(X),Y.push(W);X=W.double()}return Y}wNAF(c,$,Q){if(!this.Fn.isValid(Q))throw Error("invalid scalar");let J=this.ZERO,Y=this.BASE,X=uW(c,this.bits);for(let W=0;W<X.windows;W++){let{nextN:m,offset:G,isZero:z,isNeg:x,isNegF:q,offsetF:M}=zM(Q,W,X);if(Q=m,z)Y=Y.add(iJ(q,$[M]));else J=J.add(iJ(x,$[G]))}return xM(Q),{p:J,f:Y}}wNAFUnsafe(c,$,Q,J=this.ZERO){let Y=uW(c,this.bits);for(let X=0;X<Y.windows;X++){if(Q===GQ)break;let{nextN:W,offset:m,isZero:G,isNeg:z}=zM(Q,X,Y);if(Q=W,G)continue;else{let x=$[m];J=J.add(z?x.negate():x)}}return xM(Q),J}getPrecomputes(c,$,Q){let J=kW.get($);if(!J){if(J=this.precomputeWindow($,c),c!==1){if(typeof Q==="function")J=Q(J);kW.set($,J)}}return J}cached(c,$,Q){let J=aW(c);return this.wNAF(J,this.getPrecomputes(J,c,Q),$)}unsafe(c,$,Q,J){let Y=aW(c);if(Y===1)return this._unsafeLadder(c,$,J);return this.wNAFUnsafe(Y,this.getPrecomputes(Y,c,Q),$,J)}createCache(c,$){MM($,this.bits),NM.set(c,$),kW.delete(c)}hasCache(c){return aW(c)!==1}}function VM(c,$,Q,J){let Y=$,X=c.ZERO,W=c.ZERO;while(Q>GQ||J>GQ){if(Q&N$)X=X.add(Y);if(J&N$)W=W.add(Y);Y=Y.double(),Q>>=N$,J>>=N$}return{p1:X,p2:W}}function qM(c,$,Q){if($){if($.ORDER!==c)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return fW($),$}else return mQ(c,{isLE:Q})}function wM(c,$,Q={},J){if(J===void 0)J=c==="edwards";if(!$||typeof $!=="object")throw Error(`expected valid ${c} CURVE object`);for(let G of["p","n","h"]){let z=$[G];if(!(typeof z==="bigint"&&z>GQ))throw Error(`CURVE.${G} must be positive bigint`)}let Y=qM($.p,Q.Fp,J),X=qM($.n,Q.Fn,J),m=["Gx","Gy","a",c==="weierstrass"?"b":"d"];for(let G of m)if(!Y.isValid($[G]))throw Error(`CURVE.${G} must be valid field element of CURVE.Fp`);return $=Object.freeze(Object.assign({},$)),{CURVE:$,Fp:Y,Fn:X}}function hY(c,$){return function(J){let Y=c(J);return{secretKey:Y,publicKey:$(Y)}}}class yW{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(c,$){if(z$(c),vc($,void 0,"key"),this.iHash=c.create(),typeof this.iHash.update!=="function")throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let Q=this.blockLen,J=new Uint8Array(Q);J.set($.length>Q?c.create().update($).digest():$);for(let Y=0;Y<J.length;Y++)J[Y]^=54;this.iHash.update(J),this.oHash=c.create();for(let Y=0;Y<J.length;Y++)J[Y]^=106;this.oHash.update(J),h0(J)}update(c){return WQ(this),this.iHash.update(c),this}digestInto(c){WQ(this),vc(c,this.outputLen,"output"),this.finished=!0,this.iHash.digestInto(c),this.oHash.update(c),this.oHash.digestInto(c),this.destroy()}digest(){let c=new Uint8Array(this.oHash.outputLen);return this.digestInto(c),c}_cloneInto(c){c||=Object.create(Object.getPrototypeOf(this),{});let{oHash:$,iHash:Q,finished:J,destroyed:Y,blockLen:X,outputLen:W}=this;return c=c,c.finished=J,c.destroyed=Y,c.blockLen=X,c.outputLen=W,c.oHash=$._cloneInto(c.oHash),c.iHash=Q._cloneInto(c.iHash),c}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}var E8=(c,$,Q)=>new yW(c,$).update(Q).digest();E8.create=(c,$)=>new yW(c,$);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var iM=(c,$)=>(c+(c>=0?$:-$)/UM)/$;function dD(c,$,Q){let[[J,Y],[X,W]]=$,m=iM(W*c,Q),G=iM(-Y*c,Q),z=c-m*J-G*X,x=-m*Y-G*W,q=z<N8,M=x<N8;if(q)z=-z;if(M)x=-x;let N=VJ(Math.ceil(bW(Q)/2))+zQ;if(z<N8||z>=N||x<N8||x>=N)throw Error("splitScalar (endomorphism): failed, k="+c);return{k1neg:q,k1:z,k2neg:M,k2:x}}function gW(c){if(!["compact","recovered","der"].includes(c))throw Error('Signature format must be "compact", "recovered", or "der"');return c}function oW(c,$){let Q={};for(let J of Object.keys($))Q[J]=c[J]===void 0?$[J]:c[J];if(MJ(Q.lowS,"lowS"),MJ(Q.prehash,"prehash"),Q.format!==void 0)gW(Q.format);return Q}class vM extends Error{constructor(c=""){super(c)}}var b8={Err:vM,_tlv:{encode:(c,$)=>{let{Err:Q}=b8;if(c<0||c>256)throw new Q("tlv.encode: wrong tag");if($.length&1)throw new Q("tlv.encode: unpadded data");let J=$.length/2,Y=NJ(J);if(Y.length/2&128)throw new Q("tlv.encode: long form length too big");let X=J>127?NJ(Y.length/2|128):"";return NJ(c)+X+Y+$},decode(c,$){let{Err:Q}=b8,J=0;if(c<0||c>256)throw new Q("tlv.encode: wrong tag");if($.length<2||$[J++]!==c)throw new Q("tlv.decode: wrong tlv");let Y=$[J++],X=!!(Y&128),W=0;if(!X)W=Y;else{let G=Y&127;if(!G)throw new Q("tlv.decode(long): indefinite length not supported");if(G>4)throw new Q("tlv.decode(long): byte length is too big");let z=$.subarray(J,J+G);if(z.length!==G)throw new Q("tlv.decode: length bytes not complete");if(z[0]===0)throw new Q("tlv.decode(long): zero leftmost byte");for(let x of z)W=W<<8|x;if(J+=G,W<128)throw new Q("tlv.decode(long): not minimal encoding")}let m=$.subarray(J,J+W);if(m.length!==W)throw new Q("tlv.decode: wrong value length");return{v:m,l:$.subarray(J+W)}}},_int:{encode(c){let{Err:$}=b8;if(c<N8)throw new $("integer: negative integers are not allowed");let Q=NJ(c);if(Number.parseInt(Q[0],16)&8)Q="00"+Q;if(Q.length&1)throw new $("unexpected DER parsing assertion: unpadded hex");return Q},decode(c){let{Err:$}=b8;if(c[0]&128)throw new $("invalid signature integer: negative");if(c[0]===0&&!(c[1]&128))throw new $("invalid signature integer: unnecessary leading zero");return P8(c)}},toSig(c){let{Err:$,_int:Q,_tlv:J}=b8,Y=vc(c,void 0,"signature"),{v:X,l:W}=J.decode(48,Y);if(W.length)throw new $("invalid signature: left bytes after parsing");let{v:m,l:G}=J.decode(2,X),{v:z,l:x}=J.decode(2,G);if(x.length)throw new $("invalid signature: left bytes after parsing");return{r:Q.decode(m),s:Q.decode(z)}},hexFromSig(c){let{_tlv:$,_int:Q}=b8,J=$.encode(2,Q.encode(c.r)),Y=$.encode(2,Q.encode(c.s)),X=J+Y;return $.encode(48,X)}},N8=BigInt(0),zQ=BigInt(1),UM=BigInt(2),yY=BigInt(3),sD=BigInt(4);function jM(c,$={}){let Q=wM("weierstrass",c,$),{Fp:J,Fn:Y}=Q,X=Q.CURVE,{h:W,n:m}=X;wJ($,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});let{endo:G}=$;if(G){if(!J.is0(X.a)||typeof G.beta!=="bigint"||!Array.isArray(G.basises))throw Error('invalid endo: expected "beta": bigint and "basises": array')}let z=DM(J,Y);function x(){if(!J.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}function q(B,C,K){let{x:R,y:S}=C.toAffine(),Z=J.toBytes(R);if(MJ(K,"isCompressed"),K){x();let H=!J.isOdd(S);return Fc(KM(H),Z)}else return Fc(Uint8Array.of(4),Z,J.toBytes(S))}function M(B){vc(B,void 0,"Point");let{publicKey:C,publicKeyUncompressed:K}=z,R=B.length,S=B[0],Z=B.subarray(1);if(R===C&&(S===2||S===3)){let H=J.fromBytes(Z);if(!J.isValid(H))throw Error("bad point: is not on curve, wrong x");let A=U(H),b;try{b=J.sqrt(A)}catch(Yc){let cc=Yc instanceof Error?": "+Yc.message:"";throw Error("bad point: is not on curve, sqrt error"+cc)}x();let P=J.isOdd(b);if((S&1)===1!==P)b=J.neg(b);return{x:H,y:b}}else if(R===K&&S===4){let H=J.BYTES,A=J.fromBytes(Z.subarray(0,H)),b=J.fromBytes(Z.subarray(H,H*2));if(!v(A,b))throw Error("bad point: is not on curve");return{x:A,y:b}}else throw Error(`bad point: got length ${R}, expected compressed=${C} or uncompressed=${K}`)}let N=$.toBytes||q,w=$.fromBytes||M;function U(B){let C=J.sqr(B),K=J.mul(C,B);return J.add(J.add(K,J.mul(B,X.a)),X.b)}function v(B,C){let K=J.sqr(C),R=U(B);return J.eql(K,R)}if(!v(X.Gx,X.Gy))throw Error("bad curve params: generator point");let i=J.mul(J.pow(X.a,yY),sD),j=J.mul(J.sqr(X.b),BigInt(27));if(J.is0(J.add(i,j)))throw Error("bad curve params: a or b");function D(B,C,K=!1){if(!J.isValid(C)||K&&J.is0(C))throw Error(`bad point coordinate ${B}`);return C}function _(B){if(!(B instanceof a))throw Error("Weierstrass Point expected")}function mc(B){if(!G||!G.basises)throw Error("no endo");return dD(B,G.basises,Y.ORDER)}let g=FW((B,C)=>{let{X:K,Y:R,Z:S}=B;if(J.eql(S,J.ONE))return{x:K,y:R};let Z=B.is0();if(C==null)C=Z?J.ONE:J.inv(S);let H=J.mul(K,C),A=J.mul(R,C),b=J.mul(S,C);if(Z)return{x:J.ZERO,y:J.ZERO};if(!J.eql(b,J.ONE))throw Error("invZ was invalid");return{x:H,y:A}}),Jc=FW((B)=>{if(B.is0()){if($.allowInfinityPoint&&!J.is0(B.Y))return;throw Error("bad point: ZERO")}let{x:C,y:K}=B.toAffine();if(!J.isValid(C)||!J.isValid(K))throw Error("bad point: x or y not field elements");if(!v(C,K))throw Error("bad point: equation left != right");if(!B.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function u(B,C,K,R,S){return K=new a(J.mul(K.X,B),K.Y,K.Z),C=iJ(R,C),K=iJ(S,K),C.add(K)}class a{static BASE=new a(X.Gx,X.Gy,J.ONE);static ZERO=new a(J.ZERO,J.ONE,J.ZERO);static Fp=J;static Fn=Y;X;Y;Z;constructor(B,C,K){this.X=D("x",B),this.Y=D("y",C,!0),this.Z=D("z",K),Object.freeze(this)}static CURVE(){return X}static fromAffine(B){let{x:C,y:K}=B||{};if(!B||!J.isValid(C)||!J.isValid(K))throw Error("invalid affine point");if(B instanceof a)throw Error("projective point not allowed");if(J.is0(C)&&J.is0(K))return a.ZERO;return new a(C,K,J.ONE)}static fromBytes(B){let C=a.fromAffine(w(vc(B,void 0,"point")));return C.assertValidity(),C}static fromHex(B){return a.fromBytes(Rc(B))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(B=8,C=!0){if(e.createCache(this,B),!C)this.multiply(yY);return this}assertValidity(){Jc(this)}hasEvenY(){let{y:B}=this.toAffine();if(!J.isOdd)throw Error("Field doesn't support isOdd");return!J.isOdd(B)}equals(B){_(B);let{X:C,Y:K,Z:R}=this,{X:S,Y:Z,Z:H}=B,A=J.eql(J.mul(C,H),J.mul(S,R)),b=J.eql(J.mul(K,H),J.mul(Z,R));return A&&b}negate(){return new a(this.X,J.neg(this.Y),this.Z)}double(){let{a:B,b:C}=X,K=J.mul(C,yY),{X:R,Y:S,Z}=this,H=J.ZERO,A=J.ZERO,b=J.ZERO,P=J.mul(R,R),r=J.mul(S,S),Yc=J.mul(Z,Z),cc=J.mul(R,S);return cc=J.add(cc,cc),b=J.mul(R,Z),b=J.add(b,b),H=J.mul(B,b),A=J.mul(K,Yc),A=J.add(H,A),H=J.sub(r,A),A=J.add(r,A),A=J.mul(H,A),H=J.mul(cc,H),b=J.mul(K,b),Yc=J.mul(B,Yc),cc=J.sub(P,Yc),cc=J.mul(B,cc),cc=J.add(cc,b),b=J.add(P,P),P=J.add(b,P),P=J.add(P,Yc),P=J.mul(P,cc),A=J.add(A,P),Yc=J.mul(S,Z),Yc=J.add(Yc,Yc),P=J.mul(Yc,cc),H=J.sub(H,P),b=J.mul(Yc,r),b=J.add(b,b),b=J.add(b,b),new a(H,A,b)}add(B){_(B);let{X:C,Y:K,Z:R}=this,{X:S,Y:Z,Z:H}=B,A=J.ZERO,b=J.ZERO,P=J.ZERO,r=X.a,Yc=J.mul(X.b,yY),cc=J.mul(C,S),Oc=J.mul(K,Z),o=J.mul(R,H),Dc=J.add(C,K),Uc=J.add(S,Z);Dc=J.mul(Dc,Uc),Uc=J.add(cc,Oc),Dc=J.sub(Dc,Uc),Uc=J.add(C,R);let qc=J.add(S,H);return Uc=J.mul(Uc,qc),qc=J.add(cc,o),Uc=J.sub(Uc,qc),qc=J.add(K,R),A=J.add(Z,H),qc=J.mul(qc,A),A=J.add(Oc,o),qc=J.sub(qc,A),P=J.mul(r,Uc),A=J.mul(Yc,o),P=J.add(A,P),A=J.sub(Oc,P),P=J.add(Oc,P),b=J.mul(A,P),Oc=J.add(cc,cc),Oc=J.add(Oc,cc),o=J.mul(r,o),Uc=J.mul(Yc,Uc),Oc=J.add(Oc,o),o=J.sub(cc,o),o=J.mul(r,o),Uc=J.add(Uc,o),cc=J.mul(Oc,Uc),b=J.add(b,cc),cc=J.mul(qc,Uc),A=J.mul(Dc,A),A=J.sub(A,cc),cc=J.mul(Dc,Oc),P=J.mul(qc,P),P=J.add(P,cc),new a(A,b,P)}subtract(B){return this.add(B.negate())}is0(){return this.equals(a.ZERO)}multiply(B){let{endo:C}=$;if(!Y.isValidNot0(B))throw Error("invalid scalar: out of range");let K,R,S=(Z)=>e.cached(this,Z,(H)=>lW(a,H));if(C){let{k1neg:Z,k1:H,k2neg:A,k2:b}=mc(B),{p:P,f:r}=S(H),{p:Yc,f:cc}=S(b);R=r.add(cc),K=u(C.beta,P,Yc,Z,A)}else{let{p:Z,f:H}=S(B);K=Z,R=H}return lW(a,[K,R])[0]}multiplyUnsafe(B){let{endo:C}=$,K=this;if(!Y.isValid(B))throw Error("invalid scalar: out of range");if(B===N8||K.is0())return a.ZERO;if(B===zQ)return K;if(e.hasCache(this))return this.multiply(B);if(C){let{k1neg:R,k1:S,k2neg:Z,k2:H}=mc(B),{p1:A,p2:b}=VM(a,K,S,H);return u(C.beta,A,b,R,Z)}else return e.unsafe(K,B)}toAffine(B){return g(this,B)}isTorsionFree(){let{isTorsionFree:B}=$;if(W===zQ)return!0;if(B)return B(a,this);return e.unsafe(this,m).is0()}clearCofactor(){let{clearCofactor:B}=$;if(W===zQ)return this;if(B)return B(a,this);return this.multiplyUnsafe(W)}isSmallOrder(){return this.multiplyUnsafe(W).is0()}toBytes(B=!0){return MJ(B,"isCompressed"),this.assertValidity(),N(a,this,B)}toHex(B=!0){return Hc(this.toBytes(B))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}let Xc=Y.BITS,e=new hW(a,$.endo?Math.ceil(Xc/2):Xc);return a.BASE.precompute(8),a}function KM(c){return Uint8Array.of(c?2:3)}function DM(c,$){return{secretKey:$.BYTES,publicKey:1+c.BYTES,publicKeyUncompressed:1+2*c.BYTES,publicKeyHasPrefix:!0,signature:2*$.BYTES}}function rD(c,$={}){let{Fn:Q}=c,J=$.randomBytes||o0,Y=Object.assign(DM(c.Fp,Q),{seed:nW(Q.ORDER)});function X(N){try{let w=Q.fromBytes(N);return Q.isValidNot0(w)}catch(w){return!1}}function W(N,w){let{publicKey:U,publicKeyUncompressed:v}=Y;try{let i=N.length;if(w===!0&&i!==U)return!1;if(w===!1&&i!==v)return!1;return!!c.fromBytes(N)}catch(i){return!1}}function m(N=J(Y.seed)){return lY(vc(N,Y.seed,"seed"),Q.ORDER)}function G(N,w=!0){return c.BASE.multiply(Q.fromBytes(N)).toBytes(w)}function z(N){let{secretKey:w,publicKey:U,publicKeyUncompressed:v}=Y;if(!GJ(N))return;if("_lengths"in Q&&Q._lengths||w===U)return;let i=vc(N,void 0,"key").length;return i===U||i===v}function x(N,w,U=!0){if(z(N)===!0)throw Error("first arg must be private key");if(z(w)===!1)throw Error("second arg must be public key");let v=Q.fromBytes(N);return c.fromBytes(w).multiply(v).toBytes(U)}let q={isValidSecretKey:X,isValidPublicKey:W,randomSecretKey:m},M=hY(m,G);return Object.freeze({getPublicKey:G,getSharedSecret:x,keygen:M,Point:c,utils:q,lengths:Y})}function BM(c,$,Q={}){z$($),wJ(Q,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"}),Q=Object.assign({},Q);let J=Q.randomBytes||o0,Y=Q.hmac||((K,R)=>E8($,K,R)),{Fp:X,Fn:W}=c,{ORDER:m,BITS:G}=W,{keygen:z,getPublicKey:x,getSharedSecret:q,utils:M,lengths:N}=rD(c,Q),w={prehash:!0,lowS:typeof Q.lowS==="boolean"?Q.lowS:!0,format:"compact",extraEntropy:!1},U=m*UM<X.ORDER;function v(K){let R=m>>zQ;return K>R}function i(K,R){if(!W.isValidNot0(R))throw Error(`invalid signature ${K}: out of range 1..Point.Fn.ORDER`);return R}function j(){if(U)throw Error('"recovered" sig type is not supported for cofactor >2 curves')}function D(K,R){gW(R);let S=N.signature,Z=R==="compact"?S:R==="recovered"?S+1:void 0;return vc(K,Z)}class _{r;s;recovery;constructor(K,R,S){if(this.r=i("r",K),this.s=i("s",R),S!=null){if(j(),![0,1,2,3].includes(S))throw Error("invalid recovery id");this.recovery=S}Object.freeze(this)}static fromBytes(K,R=w.format){D(K,R);let S;if(R==="der"){let{r:b,s:P}=b8.toSig(vc(K));return new _(b,P)}if(R==="recovered")S=K[0],R="compact",K=K.subarray(1);let Z=N.signature/2,H=K.subarray(0,Z),A=K.subarray(Z,Z*2);return new _(W.fromBytes(H),W.fromBytes(A),S)}static fromHex(K,R){return this.fromBytes(Rc(K),R)}assertRecovery(){let{recovery:K}=this;if(K==null)throw Error("invalid recovery id: must be present");return K}addRecoveryBit(K){return new _(this.r,this.s,K)}recoverPublicKey(K){let{r:R,s:S}=this,Z=this.assertRecovery(),H=Z===2||Z===3?R+m:R;if(!X.isValid(H))throw Error("invalid recovery id: sig.r+curve.n != R.x");let A=X.toBytes(H),b=c.fromBytes(Fc(KM((Z&1)===0),A)),P=W.inv(H),r=g(vc(K,void 0,"msgHash")),Yc=W.create(-r*P),cc=W.create(S*P),Oc=c.BASE.multiplyUnsafe(Yc).add(b.multiplyUnsafe(cc));if(Oc.is0())throw Error("invalid recovery: point at infinify");return Oc.assertValidity(),Oc}hasHighS(){return v(this.s)}toBytes(K=w.format){if(gW(K),K==="der")return Rc(b8.hexFromSig(this));let{r:R,s:S}=this,Z=W.toBytes(R),H=W.toBytes(S);if(K==="recovered")return j(),Fc(Uint8Array.of(this.assertRecovery()),Z,H);return Fc(Z,H)}toHex(K){return Hc(this.toBytes(K))}}let mc=Q.bits2int||function(R){if(R.length>8192)throw Error("input is too large");let S=P8(R),Z=R.length*8-G;return Z>0?S>>BigInt(Z):S},g=Q.bits2int_modN||function(R){return W.create(mc(R))},Jc=VJ(G);function u(K){return sq("num < 2^"+G,K,N8,Jc),W.toBytes(K)}function a(K,R){return vc(K,void 0,"message"),R?vc($(K),void 0,"prehashed message"):K}function Xc(K,R,S){let{lowS:Z,prehash:H,extraEntropy:A}=oW(S,w);K=a(K,H);let b=g(K),P=W.fromBytes(R);if(!W.isValidNot0(P))throw Error("invalid private key");let r=[u(P),u(b)];if(A!=null&&A!==!1){let o=A===!0?J(N.secretKey):A;r.push(vc(o,void 0,"extraEntropy"))}let Yc=Fc(...r),cc=b;function Oc(o){let Dc=mc(o);if(!W.isValidNot0(Dc))return;let Uc=W.inv(Dc),qc=c.BASE.multiply(Dc).toAffine(),M0=W.create(qc.x);if(M0===N8)return;let N0=W.create(Uc*W.create(cc+M0*P));if(N0===N8)return;let Y0=(qc.x===M0?0:2)|Number(qc.y&zQ),U8=N0;if(Z&&v(N0))U8=W.neg(N0),Y0^=1;return new _(M0,U8,U?void 0:Y0)}return{seed:Yc,k2sig:Oc}}function e(K,R,S={}){let{seed:Z,k2sig:H}=Xc(K,R,S);return rq($.outputLen,W.BYTES,Y)(Z,H).toBytes(S.format)}function B(K,R,S,Z={}){let{lowS:H,prehash:A,format:b}=oW(Z,w);if(S=vc(S,void 0,"publicKey"),R=a(R,A),!GJ(K)){let P=K instanceof _?", use sig.toBytes()":"";throw Error("verify expects Uint8Array signature"+P)}D(K,b);try{let P=_.fromBytes(K,b),r=c.fromBytes(S);if(H&&P.hasHighS())return!1;let{r:Yc,s:cc}=P,Oc=g(R),o=W.inv(cc),Dc=W.create(Oc*o),Uc=W.create(Yc*o),qc=c.BASE.multiplyUnsafe(Dc).add(r.multiplyUnsafe(Uc));if(qc.is0())return!1;return W.create(qc.x)===Yc}catch(P){return!1}}function C(K,R,S={}){let{prehash:Z}=oW(S,w);return R=a(R,Z),_.fromBytes(K,"recovered").recoverPublicKey(R).toBytes()}return Object.freeze({keygen:z,getPublicKey:x,getSharedSecret:q,utils:M,lengths:N,Point:c,sign:e,verify:B,recoverPublicKey:C,Signature:_,hash:$})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var dY={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},tD={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},eD=BigInt(0),dW=BigInt(2);function cB(c){let $=dY.p,Q=BigInt(3),J=BigInt(6),Y=BigInt(11),X=BigInt(22),W=BigInt(23),m=BigInt(44),G=BigInt(88),z=c*c*c%$,x=z*z*c%$,q=U0(x,Q,$)*x%$,M=U0(q,Q,$)*x%$,N=U0(M,dW,$)*z%$,w=U0(N,Y,$)*N%$,U=U0(w,X,$)*w%$,v=U0(U,m,$)*U%$,i=U0(v,G,$)*v%$,j=U0(i,m,$)*U%$,D=U0(j,Q,$)*x%$,_=U0(D,W,$)*w%$,mc=U0(_,J,$)*z%$,g=U0(mc,dW,$);if(!oY.eql(oY.sqr(g),c))throw Error("Cannot find square root");return g}var oY=mQ(dY.p,{sqrt:cB}),V$=jM(dY,{Fp:oY,endo:tD}),UJ=BM(V$,Q0),HM={};function gY(c,...$){let Q=HM[c];if(Q===void 0){let J=Q0(dq(c));Q=Fc(J,J),HM[c]=Q}return Q0(Fc(Q,...$))}var rW=(c)=>c.toBytes(!0).slice(1),tW=(c)=>c%dW===eD;function sW(c){let{Fn:$,BASE:Q}=V$,J=$.fromBytes(c),Y=Q.multiply(J);return{scalar:tW(Y.y)?J:$.neg(J),bytes:rW(Y)}}function RM(c){let $=oY;if(!$.isValidNot0(c))throw Error("invalid x: Fail if x ≥ p");let Q=$.create(c*c),J=$.create(Q*c+BigInt(7)),Y=$.sqrt(J);if(!tW(Y))Y=$.neg(Y);let X=V$.fromAffine({x:c,y:Y});return X.assertValidity(),X}var vJ=P8;function pM(...c){return V$.Fn.create(vJ(gY("BIP0340/challenge",...c)))}function OM(c){return sW(c).bytes}function $B(c,$,Q=o0(32)){let{Fn:J}=V$,Y=vc(c,void 0,"message"),{bytes:X,scalar:W}=sW($),m=vc(Q,32,"auxRand"),G=J.toBytes(W^vJ(gY("BIP0340/aux",m))),z=gY("BIP0340/nonce",G,X,Y),{bytes:x,scalar:q}=sW(z),M=pM(x,X,Y),N=new Uint8Array(64);if(N.set(x,0),N.set(J.toBytes(J.create(q+M*W)),32),!IM(N,Y,X))throw Error("sign: Invalid signature produced");return N}function IM(c,$,Q){let{Fp:J,Fn:Y,BASE:X}=V$,W=vc(c,64,"signature"),m=vc($,void 0,"message"),G=vc(Q,32,"publicKey");try{let z=RM(vJ(G)),x=vJ(W.subarray(0,32));if(!J.isValidNot0(x))return!1;let q=vJ(W.subarray(32,64));if(!Y.isValidNot0(q))return!1;let M=pM(Y.toBytes(x),rW(z),m),N=X.multiplyUnsafe(q).add(z.multiplyUnsafe(Y.neg(M))),{x:w,y:U}=N.toAffine();if(N.is0()||!tW(U)||w!==x)return!1;return!0}catch(z){return!1}}var xQ=(()=>{let Q=(J=o0(48))=>{return lY(J,dY.n)};return{keygen:hY(Q,OM),getPublicKey:OM,sign:$B,verify:IM,Point:V$,utils:{randomSecretKey:Q,taggedHash:gY,lift_x:RM,pointToBytes:rW},lengths:{secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48}}})();/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function cX(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function $m(c){if(!cX(c))throw Error("Uint8Array expected")}function AM(c,$){if(!Array.isArray($))return!1;if($.length===0)return!0;if(c)return $.every((Q)=>typeof Q==="string");else return $.every((Q)=>Number.isSafeInteger(Q))}function CM(c){if(typeof c!=="function")throw Error("function expected");return!0}function F8(c,$){if(typeof $!=="string")throw Error(`${c}: string expected`);return!0}function KJ(c){if(!Number.isSafeInteger(c))throw Error(`invalid integer: ${c}`)}function rY(c){if(!Array.isArray(c))throw Error("array expected")}function tY(c,$){if(!AM(!0,$))throw Error(`${c}: array of strings expected`)}function Qm(c,$){if(!AM(!1,$))throw Error(`${c}: array of numbers expected`)}function j0(...c){let $=(X)=>X,Q=(X,W)=>(m)=>X(W(m)),J=c.map((X)=>X.encode).reduceRight(Q,$),Y=c.map((X)=>X.decode).reduce(Q,$);return{encode:J,decode:Y}}function K0(c){let $=typeof c==="string"?c.split(""):c,Q=$.length;tY("alphabet",$);let J=new Map($.map((Y,X)=>[Y,X]));return{encode:(Y)=>{return rY(Y),Y.map((X)=>{if(!Number.isSafeInteger(X)||X<0||X>=Q)throw Error(`alphabet.encode: digit index outside alphabet "${X}". Allowed: ${c}`);return $[X]})},decode:(Y)=>{return rY(Y),Y.map((X)=>{F8("alphabet.decode",X);let W=J.get(X);if(W===void 0)throw Error(`Unknown letter: "${X}". Allowed: ${c}`);return W})}}}function D0(c=""){return F8("join",c),{encode:($)=>{return tY("join.decode",$),$.join(c)},decode:($)=>{return F8("join.decode",$),$.split(c)}}}function $X(c,$="="){return KJ(c),F8("padding",$),{encode(Q){tY("padding.encode",Q);while(Q.length*c%8)Q.push($);return Q},decode(Q){tY("padding.decode",Q);let J=Q.length;if(J*c%8)throw Error("padding: invalid, string should have whole number of bytes");for(;J>0&&Q[J-1]===$;J--)if((J-1)*c%8===0)throw Error("padding: invalid, string has too much padding");return Q.slice(0,J)}}}function PM(c){return CM(c),{encode:($)=>$,decode:($)=>c($)}}function ZM(c,$,Q){if($<2)throw Error(`convertRadix: invalid from=${$}, base cannot be less than 2`);if(Q<2)throw Error(`convertRadix: invalid to=${Q}, base cannot be less than 2`);if(rY(c),!c.length)return[];let J=0,Y=[],X=Array.from(c,(m)=>{if(KJ(m),m<0||m>=$)throw Error(`invalid integer: ${m}`);return m}),W=X.length;while(!0){let m=0,G=!0;for(let z=J;z<W;z++){let x=X[z],q=$*m,M=q+x;if(!Number.isSafeInteger(M)||q/$!==m||M-x!==q)throw Error("convertRadix: carry overflow");let N=M/Q;m=M%Q;let w=Math.floor(N);if(X[z]=w,!Number.isSafeInteger(w)||w*Q+m!==M)throw Error("convertRadix: carry overflow");if(!G)continue;else if(!w)J=z;else G=!1}if(Y.push(m),G)break}for(let m=0;m<c.length-1&&c[m]===0;m++)Y.push(0);return Y.reverse()}var EM=(c,$)=>$===0?c:EM($,c%$),eY=(c,$)=>c+($-EM(c,$)),sY=(()=>{let c=[];for(let $=0;$<40;$++)c.push(2**$);return c})();function eW(c,$,Q,J){if(rY(c),$<=0||$>32)throw Error(`convertRadix2: wrong from=${$}`);if(Q<=0||Q>32)throw Error(`convertRadix2: wrong to=${Q}`);if(eY($,Q)>32)throw Error(`convertRadix2: carry overflow from=${$} to=${Q} carryBits=${eY($,Q)}`);let Y=0,X=0,W=sY[$],m=sY[Q]-1,G=[];for(let z of c){if(KJ(z),z>=W)throw Error(`convertRadix2: invalid data word=${z} from=${$}`);if(Y=Y<<$|z,X+$>32)throw Error(`convertRadix2: carry overflow pos=${X} from=${$}`);X+=$;for(;X>=Q;X-=Q)G.push((Y>>X-Q&m)>>>0);let x=sY[X];if(x===void 0)throw Error("invalid carry");Y&=x-1}if(Y=Y<<Q-X&m,!J&&X>=$)throw Error("Excess padding");if(!J&&Y>0)throw Error(`Non-zero padding: ${Y}`);if(J&&X>0)G.push(Y>>>0);return G}function QB(c){KJ(c);let $=256;return{encode:(Q)=>{if(!cX(Q))throw Error("radix.encode input should be Uint8Array");return ZM(Array.from(Q),$,c)},decode:(Q)=>{return Qm("radix.decode",Q),Uint8Array.from(ZM(Q,c,$))}}}function Z0(c,$=!1){if(KJ(c),c<=0||c>32)throw Error("radix2: bits should be in (0..32]");if(eY(8,c)>32||eY(c,8)>32)throw Error("radix2: carry overflow");return{encode:(Q)=>{if(!cX(Q))throw Error("radix2.encode input should be Uint8Array");return eW(Array.from(Q),8,c,!$)},decode:(Q)=>{return Qm("radix2.decode",Q),Uint8Array.from(eW(Q,c,8,$))}}}function LM(c){return CM(c),function(...$){try{return c.apply(null,$)}catch(Q){}}}var Bb=j0(Z0(4),K0("0123456789ABCDEF"),D0("")),Hb=j0(Z0(5),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),$X(5),D0("")),Ob=j0(Z0(5),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),D0("")),Rb=j0(Z0(5),K0("0123456789ABCDEFGHIJKLMNOPQRSTUV"),$X(5),D0("")),pb=j0(Z0(5),K0("0123456789ABCDEFGHIJKLMNOPQRSTUV"),D0("")),Ib=j0(Z0(5),K0("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),D0(""),PM((c)=>c.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),bM=(()=>typeof Uint8Array.from([]).toBase64==="function"&&typeof Uint8Array.fromBase64==="function")(),FM=(c,$)=>{F8("base64",c);let Q=$?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,J=$?"base64url":"base64";if(c.length>0&&!Q.test(c))throw Error("invalid base64");return Uint8Array.fromBase64(c,{alphabet:J,lastChunkHandling:"strict"})},L0=bM?{encode(c){return $m(c),c.toBase64()},decode(c){return FM(c,!1)}}:j0(Z0(6),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),$X(6),D0("")),Zb=j0(Z0(6),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),D0("")),Lb=bM?{encode(c){return $m(c),c.toBase64({alphabet:"base64url"})},decode(c){return FM(c,!0)}}:j0(Z0(6),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),$X(6),D0("")),_b=j0(Z0(6),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),D0("")),Jm=(c)=>j0(QB(58),K0(c),D0("")),Sb=Jm("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),Ab=Jm("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),Cb=Jm("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");var cm=j0(K0("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),D0("")),_M=[996825010,642813549,513874426,1027748829,705979059];function jJ(c){let $=c>>25,Q=(c&33554431)<<5;for(let J=0;J<_M.length;J++)if(($>>J&1)===1)Q^=_M[J];return Q}function SM(c,$,Q=1){let J=c.length,Y=1;for(let X=0;X<J;X++){let W=c.charCodeAt(X);if(W<33||W>126)throw Error(`Invalid prefix (${c})`);Y=jJ(Y)^W>>5}Y=jJ(Y);for(let X=0;X<J;X++)Y=jJ(Y)^c.charCodeAt(X)&31;for(let X of $)Y=jJ(Y)^X;for(let X=0;X<6;X++)Y=jJ(Y);return Y^=Q,cm.encode(eW([Y%sY[30]],30,5,!1))}function TM(c){let $=c==="bech32"?1:734539939,Q=Z0(5),J=Q.decode,Y=Q.encode,X=LM(J);function W(q,M,N=90){if(F8("bech32.encode prefix",q),cX(M))M=Array.from(M);Qm("bech32.encode",M);let w=q.length;if(w===0)throw TypeError(`Invalid prefix length ${w}`);let U=w+7+M.length;if(N!==!1&&U>N)throw TypeError(`Length ${U} exceeds limit ${N}`);let v=q.toLowerCase(),i=SM(v,M,$);return`${v}1${cm.encode(M)}${i}`}function m(q,M=90){F8("bech32.decode input",q);let N=q.length;if(N<8||M!==!1&&N>M)throw TypeError(`invalid string length: ${N} (${q}). Expected (8..${M})`);let w=q.toLowerCase();if(q!==w&&q!==q.toUpperCase())throw Error("String must be lowercase or uppercase");let U=w.lastIndexOf("1");if(U===0||U===-1)throw Error('Letter "1" must be present between prefix and data only');let v=w.slice(0,U),i=w.slice(U+1);if(i.length<6)throw Error("Data must be at least 6 characters long");let j=cm.decode(i).slice(0,-6),D=SM(v,j,$);if(!i.endsWith(D))throw Error(`Invalid checksum in ${q}: expected "${D}"`);return{prefix:v,words:j}}let G=LM(m);function z(q){let{prefix:M,words:N}=m(q,!1);return{prefix:M,words:N,bytes:J(N)}}function x(q,M){return W(q,Y(M))}return{encode:W,decode:m,encodeFromBytes:x,decodeToBytes:z,decodeUnsafe:G,fromWords:J,fromWordsUnsafe:X,toWords:Y}}var T8=TM("bech32"),Pb=TM("bech32m");var JB=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),YB={encode(c){return $m(c),c.toHex()},decode(c){return F8("hex",c),Uint8Array.fromHex(c)}},Eb=JB?YB:j0(Z0(4),K0("0123456789abcdef"),D0(""),PM((c)=>{if(typeof c!=="string"||c.length%2!==0)throw TypeError(`hex.decode: expected string, got ${typeof c} with length ${c.length}`);return c.toLowerCase()}));/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function XB(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function QX(c){if(typeof c!=="boolean")throw Error(`boolean expected, not ${c}`)}function DJ(c){if(!Number.isSafeInteger(c)||c<0)throw Error("positive integer expected, got "+c)}function Ac(c,$,Q=""){let J=XB(c),Y=c?.length,X=$!==void 0;if(!J||X&&Y!==$){let W=Q&&`"${Q}" `,m=X?` of length ${$}`:"",G=J?`length=${Y}`:`type=${typeof c}`;throw Error(W+"expected Uint8Array"+m+", got "+G)}return c}function Ym(c,$=!0){if(c.destroyed)throw Error("Hash instance has been destroyed");if($&&c.finished)throw Error("Hash#digest() has already been called")}function fM(c,$){Ac(c,void 0,"output");let Q=$.outputLen;if(c.length<Q)throw Error("digestInto() expects output buffer of length at least "+Q)}function nc(c){return new Uint32Array(c.buffer,c.byteOffset,Math.floor(c.byteLength/4))}function sc(...c){for(let $=0;$<c.length;$++)c[$].fill(0)}function nM(c){return new DataView(c.buffer,c.byteOffset,c.byteLength)}var WB=(()=>new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68)();function uM(c,$){return c.buffer===$.buffer&&c.byteOffset<$.byteOffset+$.byteLength&&$.byteOffset<c.byteOffset+c.byteLength}function Xm(c,$){if(uM(c,$)&&c.byteOffset<$.byteOffset)throw Error("complex overlap of input and output is not supported")}function kM(c,$){if($==null||typeof $!=="object")throw Error("options must be defined");return Object.assign(c,$)}function BJ(c,$){if(c.length!==$.length)return!1;let Q=0;for(let J=0;J<c.length;J++)Q|=c[J]^$[J];return Q===0}var HJ=(c,$)=>{function Q(J,...Y){if(Ac(J,void 0,"key"),!WB)throw Error("Non little-endian hardware is not yet supported");if(c.nonceLength!==void 0){let x=Y[0];Ac(x,c.varSizeNonce?void 0:c.nonceLength,"nonce")}let X=c.tagLength;if(X&&Y[1]!==void 0)Ac(Y[1],void 0,"AAD");let W=$(J,...Y),m=(x,q)=>{if(q!==void 0){if(x!==2)throw Error("cipher output not supported");Ac(q,void 0,"output")}},G=!1;return{encrypt(x,q){if(G)throw Error("cannot encrypt() twice with same key + nonce");return G=!0,Ac(x),m(W.encrypt.length,q),W.encrypt(x,q)},decrypt(x,q){if(Ac(x),X&&x.length<X)throw Error('"ciphertext" expected length bigger than tagLength='+X);return m(W.decrypt.length,q),W.decrypt(x,q)}}}return Object.assign(Q,c),Q};function qQ(c,$,Q=!0){if($===void 0)return new Uint8Array(c);if($.length!==c)throw Error('"output" expected Uint8Array of length '+c+", got: "+$.length);if(Q&&!w$($))throw Error("invalid output, must be aligned");return $}function Wm(c,$,Q){QX(Q);let J=new Uint8Array(16),Y=nM(J);return Y.setBigUint64(0,BigInt($),Q),Y.setBigUint64(8,BigInt(c),Q),J}function w$(c){return c.byteOffset%4===0}function _0(c){return Uint8Array.from(c)}var lc=16;var GB=283;function lM(c){if(![16,24,32].includes(c.length))throw Error('"aes key" expected Uint8Array of length 16/24/32, got length='+c.length)}function qm(c){return c<<1^GB&-(c>>7)}function MQ(c,$){let Q=0;for(;$>0;$>>=1)Q^=c&-($&1),c=qm(c);return Q}var zm=(()=>{let c=new Uint8Array(256);for(let Q=0,J=1;Q<256;Q++,J^=qm(J))c[Q]=J;let $=new Uint8Array(256);$[0]=99;for(let Q=0;Q<255;Q++){let J=c[255-Q];J|=J<<8,$[c[Q]]=(J^J>>4^J>>5^J>>6^J>>7^99)&255}return sc(c),$})(),zB=zm.map((c,$)=>zm.indexOf($)),xB=(c)=>c<<24|c>>>8,mm=(c)=>c<<8|c>>>24;function hM(c,$){if(c.length!==256)throw Error("Wrong sbox length");let Q=new Uint32Array(256).map((z,x)=>$(c[x])),J=Q.map(mm),Y=J.map(mm),X=Y.map(mm),W=new Uint32Array(65536),m=new Uint32Array(65536),G=new Uint16Array(65536);for(let z=0;z<256;z++)for(let x=0;x<256;x++){let q=z*256+x;W[q]=Q[z]^J[x],m[q]=Y[z]^X[x],G[q]=c[z]<<8|c[x]}return{sbox:c,sbox2:G,T0:Q,T1:J,T2:Y,T3:X,T01:W,T23:m}}var Mm=hM(zm,(c)=>MQ(c,3)<<24|c<<16|c<<8|MQ(c,2)),yM=hM(zB,(c)=>MQ(c,11)<<24|MQ(c,13)<<16|MQ(c,9)<<8|MQ(c,14)),qB=(()=>{let c=new Uint8Array(16);for(let $=0,Q=1;$<16;$++,Q=qm(Q))c[$]=Q;return c})();function Nm(c){Ac(c);let $=c.length;lM(c);let{sbox2:Q}=Mm,J=[];if(!w$(c))J.push(c=_0(c));let Y=nc(c),X=Y.length,W=(G)=>c8(Q,G,G,G,G),m=new Uint32Array($+28);m.set(Y);for(let G=X;G<m.length;G++){let z=m[G-1];if(G%X===0)z=W(xB(z))^qB[G/X-1];else if(X>6&&G%X===4)z=W(z);m[G]=m[G-X]^z}return sc(...J),m}function MB(c){let $=Nm(c),Q=$.slice(),J=$.length,{sbox2:Y}=Mm,{T0:X,T1:W,T2:m,T3:G}=yM;for(let z=0;z<J;z+=4)for(let x=0;x<4;x++)Q[z+x]=$[J-z-4+x];sc($);for(let z=4;z<J-4;z++){let x=Q[z],q=c8(Y,x,x,x,x);Q[z]=X[q&255]^W[q>>>8&255]^m[q>>>16&255]^G[q>>>24]}return Q}function f8(c,$,Q,J,Y,X){return c[Q<<8&65280|J>>>8&255]^$[Y>>>8&65280|X>>>24&255]}function c8(c,$,Q,J,Y){return c[$&255|Q&65280]|c[J>>>16&255|Y>>>16&65280]<<16}function xm(c,$,Q,J,Y){let{sbox2:X,T01:W,T23:m}=Mm,G=0;$^=c[G++],Q^=c[G++],J^=c[G++],Y^=c[G++];let z=c.length/4-2;for(let w=0;w<z;w++){let U=c[G++]^f8(W,m,$,Q,J,Y),v=c[G++]^f8(W,m,Q,J,Y,$),i=c[G++]^f8(W,m,J,Y,$,Q),j=c[G++]^f8(W,m,Y,$,Q,J);$=U,Q=v,J=i,Y=j}let x=c[G++]^c8(X,$,Q,J,Y),q=c[G++]^c8(X,Q,J,Y,$),M=c[G++]^c8(X,J,Y,$,Q),N=c[G++]^c8(X,Y,$,Q,J);return{s0:x,s1:q,s2:M,s3:N}}function NB(c,$,Q,J,Y){let{sbox2:X,T01:W,T23:m}=yM,G=0;$^=c[G++],Q^=c[G++],J^=c[G++],Y^=c[G++];let z=c.length/4-2;for(let w=0;w<z;w++){let U=c[G++]^f8(W,m,$,Y,J,Q),v=c[G++]^f8(W,m,Q,$,Y,J),i=c[G++]^f8(W,m,J,Q,$,Y),j=c[G++]^f8(W,m,Y,J,Q,$);$=U,Q=v,J=i,Y=j}let x=c[G++]^c8(X,$,Y,J,Q),q=c[G++]^c8(X,Q,$,Y,J),M=c[G++]^c8(X,J,Q,$,Y),N=c[G++]^c8(X,Y,J,Q,$);return{s0:x,s1:q,s2:M,s3:N}}function VB(c){if(Ac(c),c.length%lc!==0)throw Error("aes-(cbc/ecb).decrypt ciphertext should consist of blocks with size "+lc)}function wB(c,$,Q){Ac(c);let J=c.length,Y=J%lc;if(!$&&Y!==0)throw Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");if(!w$(c))c=_0(c);let X=nc(c);if($){let m=lc-Y;if(!m)m=lc;J=J+m}Q=qQ(J,Q),Xm(c,Q);let W=nc(Q);return{b:X,o:W,out:Q}}function iB(c,$){if(!$)return c;let Q=c.length;if(!Q)throw Error("aes/pcks5: empty ciphertext not allowed");let J=c[Q-1];if(J<=0||J>16)throw Error("aes/pcks5: wrong padding");let Y=c.subarray(0,-J);for(let X=0;X<J;X++)if(c[Q-X-1]!==J)throw Error("aes/pcks5: wrong padding");return Y}function vB(c){let $=new Uint8Array(16),Q=nc($);$.set(c);let J=lc-c.length;for(let Y=lc-J;Y<lc;Y++)$[Y]=J;return Q}var Vm=HJ({blockSize:16,nonceLength:16},function($,Q,J={}){let Y=!J.disablePadding;return{encrypt(X,W){let m=Nm($),{b:G,o:z,out:x}=wB(X,Y,W),q=Q,M=[m];if(!w$(q))M.push(q=_0(q));let N=nc(q),w=N[0],U=N[1],v=N[2],i=N[3],j=0;for(;j+4<=G.length;)w^=G[j+0],U^=G[j+1],v^=G[j+2],i^=G[j+3],{s0:w,s1:U,s2:v,s3:i}=xm(m,w,U,v,i),z[j++]=w,z[j++]=U,z[j++]=v,z[j++]=i;if(Y){let D=vB(X.subarray(j*4));w^=D[0],U^=D[1],v^=D[2],i^=D[3],{s0:w,s1:U,s2:v,s3:i}=xm(m,w,U,v,i),z[j++]=w,z[j++]=U,z[j++]=v,z[j++]=i}return sc(...M),x},decrypt(X,W){VB(X);let m=MB($),G=Q,z=[m];if(!w$(G))z.push(G=_0(G));let x=nc(G);if(W=qQ(X.length,W),!w$(X))z.push(X=_0(X));Xm(X,W);let q=nc(X),M=nc(W),N=x[0],w=x[1],U=x[2],v=x[3];for(let i=0;i+4<=q.length;){let j=N,D=w,_=U,mc=v;N=q[i+0],w=q[i+1],U=q[i+2],v=q[i+3];let{s0:g,s1:Jc,s2:u,s3:a}=NB(m,N,w,U,v);M[i++]=g^j,M[i++]=Jc^D,M[i++]=u^_,M[i++]=a^mc}return sc(...z),iB(W,Y)}}});function UB(c){return c instanceof Uint32Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint32Array"}function Gm(c,$){if(Ac($,16,"block"),!UB(c))throw Error("_encryptBlock accepts result of expandKeyLE");let Q=nc($),{s0:J,s1:Y,s2:X,s3:W}=xm(c,Q[0],Q[1],Q[2],Q[3]);return Q[0]=J,Q[1]=Y,Q[2]=X,Q[3]=W,$}function aM(c){let $=0;for(let Q=lc-1;Q>=0;Q--){let J=(c[Q]&128)>>>7;c[Q]=c[Q]<<1|$,$=J}if($)c[lc-1]^=135;return c}function JX(c,$){if(c.length!==$.length)throw Error("xorBlock: blocks must have same length");for(let Q=0;Q<c.length;Q++)c[Q]=c[Q]^$[Q];return c}class wm{buffer;destroyed;k1;k2;xk;constructor(c){Ac(c),lM(c),this.xk=Nm(c),this.buffer=new Uint8Array(0),this.destroyed=!1;let $=new Uint8Array(lc);Gm(this.xk,$),this.k1=aM($),this.k2=aM(new Uint8Array(this.k1))}update(c){let{destroyed:$,buffer:Q}=this;if($)throw Error("CMAC instance was destroyed");Ac(c);let J=new Uint8Array(Q.length+c.length);return J.set(Q),J.set(c,Q.length),this.buffer=J,this}digest(){if(this.destroyed)throw Error("CMAC instance was destroyed");let{buffer:c}=this,$=c.length,Q=Math.ceil($/lc),J;if(Q===0)Q=1,J=!1;else J=$%lc===0;let Y=(Q-1)*lc,X=c.subarray(Y),W;if(J)W=JX(new Uint8Array(X),this.k1);else{let G=new Uint8Array(lc);G.set(X),G[X.length]=128,W=JX(G,this.k2)}let m=new Uint8Array(lc);for(let G=0;G<Q-1;G++){let z=c.subarray(G*lc,(G+1)*lc);JX(m,z),Gm(this.xk,m)}return JX(m,W),Gm(this.xk,m),sc(W),m}destroy(){let{buffer:c,destroyed:$,xk:Q,k1:J,k2:Y}=this;if($)return;this.destroyed=!0,sc(c,Q,J,Y)}}var jB=(c,$)=>new wm(c).update($).digest();jB.create=(c)=>new wm(c);var gM=(c)=>Uint8Array.from(c.split(""),($)=>$.charCodeAt(0)),KB=gM("expand 16-byte k"),DB=gM("expand 32-byte k"),BB=nc(KB),HB=nc(DB);function h(c,$){return c<<$|c>>>32-$}function im(c){return c.byteOffset%4===0}var YX=64,OB=16,dM=4294967295,oM=Uint32Array.of();function RB(c,$,Q,J,Y,X,W,m){let G=Y.length,z=new Uint8Array(YX),x=nc(z),q=im(Y)&&im(X),M=q?nc(Y):oM,N=q?nc(X):oM;for(let w=0;w<G;W++){if(c($,Q,J,x,W,m),W>=dM)throw Error("arx: counter overflow");let U=Math.min(YX,G-w);if(q&&U===YX){let v=w/4;if(w%4!==0)throw Error("arx: invalid block position");for(let i=0,j;i<OB;i++)j=v+i,N[j]=M[j]^x[i];w+=YX;continue}for(let v=0,i;v<U;v++)i=w+v,X[i]=Y[i]^z[v];w+=U}}function vm(c,$){let{allowShortKeys:Q,extendNonceFn:J,counterLength:Y,counterRight:X,rounds:W}=kM({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},$);if(typeof c!=="function")throw Error("core must be a function");return DJ(Y),DJ(W),QX(X),QX(Q),(m,G,z,x,q=0)=>{Ac(m,void 0,"key"),Ac(G,void 0,"nonce"),Ac(z,void 0,"data");let M=z.length;if(x===void 0)x=new Uint8Array(M);if(Ac(x,void 0,"output"),DJ(q),q<0||q>=dM)throw Error("arx: counter overflow");if(x.length<M)throw Error(`arx: output (${x.length}) is shorter than data (${M})`);let N=[],w=m.length,U,v;if(w===32)N.push(U=_0(m)),v=HB;else if(w===16&&Q)U=new Uint8Array(32),U.set(m),U.set(m,16),v=BB,N.push(U);else throw Ac(m,32,"arx key"),Error("invalid key size");if(!im(G))N.push(G=_0(G));let i=nc(U);if(J){if(G.length!==24)throw Error("arx: extended nonce must be 24 bytes");J(v,i,nc(G.subarray(0,16)),i),G=G.subarray(16)}let j=16-Y;if(j!==G.length)throw Error(`arx: nonce must be ${j} or 16 bytes`);if(j!==12){let _=new Uint8Array(12);_.set(G,X?0:12-G.length),G=_,N.push(G)}let D=nc(G);return RB(c,v,i,D,z,x,q,W),sc(...N),x}}function rc(c,$){return c[$++]&255|(c[$++]&255)<<8}class sM{blockLen=16;outputLen=16;buffer=new Uint8Array(16);r=new Uint16Array(10);h=new Uint16Array(10);pad=new Uint16Array(8);pos=0;finished=!1;constructor(c){c=_0(Ac(c,32,"key"));let $=rc(c,0),Q=rc(c,2),J=rc(c,4),Y=rc(c,6),X=rc(c,8),W=rc(c,10),m=rc(c,12),G=rc(c,14);this.r[0]=$&8191,this.r[1]=($>>>13|Q<<3)&8191,this.r[2]=(Q>>>10|J<<6)&7939,this.r[3]=(J>>>7|Y<<9)&8191,this.r[4]=(Y>>>4|X<<12)&255,this.r[5]=X>>>1&8190,this.r[6]=(X>>>14|W<<2)&8191,this.r[7]=(W>>>11|m<<5)&8065,this.r[8]=(m>>>8|G<<8)&8191,this.r[9]=G>>>5&127;for(let z=0;z<8;z++)this.pad[z]=rc(c,16+2*z)}process(c,$,Q=!1){let J=Q?0:2048,{h:Y,r:X}=this,W=X[0],m=X[1],G=X[2],z=X[3],x=X[4],q=X[5],M=X[6],N=X[7],w=X[8],U=X[9],v=rc(c,$+0),i=rc(c,$+2),j=rc(c,$+4),D=rc(c,$+6),_=rc(c,$+8),mc=rc(c,$+10),g=rc(c,$+12),Jc=rc(c,$+14),u=Y[0]+(v&8191),a=Y[1]+((v>>>13|i<<3)&8191),Xc=Y[2]+((i>>>10|j<<6)&8191),e=Y[3]+((j>>>7|D<<9)&8191),B=Y[4]+((D>>>4|_<<12)&8191),C=Y[5]+(_>>>1&8191),K=Y[6]+((_>>>14|mc<<2)&8191),R=Y[7]+((mc>>>11|g<<5)&8191),S=Y[8]+((g>>>8|Jc<<8)&8191),Z=Y[9]+(Jc>>>5|J),H=0,A=H+u*W+a*(5*U)+Xc*(5*w)+e*(5*N)+B*(5*M);H=A>>>13,A&=8191,A+=C*(5*q)+K*(5*x)+R*(5*z)+S*(5*G)+Z*(5*m),H+=A>>>13,A&=8191;let b=H+u*m+a*W+Xc*(5*U)+e*(5*w)+B*(5*N);H=b>>>13,b&=8191,b+=C*(5*M)+K*(5*q)+R*(5*x)+S*(5*z)+Z*(5*G),H+=b>>>13,b&=8191;let P=H+u*G+a*m+Xc*W+e*(5*U)+B*(5*w);H=P>>>13,P&=8191,P+=C*(5*N)+K*(5*M)+R*(5*q)+S*(5*x)+Z*(5*z),H+=P>>>13,P&=8191;let r=H+u*z+a*G+Xc*m+e*W+B*(5*U);H=r>>>13,r&=8191,r+=C*(5*w)+K*(5*N)+R*(5*M)+S*(5*q)+Z*(5*x),H+=r>>>13,r&=8191;let Yc=H+u*x+a*z+Xc*G+e*m+B*W;H=Yc>>>13,Yc&=8191,Yc+=C*(5*U)+K*(5*w)+R*(5*N)+S*(5*M)+Z*(5*q),H+=Yc>>>13,Yc&=8191;let cc=H+u*q+a*x+Xc*z+e*G+B*m;H=cc>>>13,cc&=8191,cc+=C*W+K*(5*U)+R*(5*w)+S*(5*N)+Z*(5*M),H+=cc>>>13,cc&=8191;let Oc=H+u*M+a*q+Xc*x+e*z+B*G;H=Oc>>>13,Oc&=8191,Oc+=C*m+K*W+R*(5*U)+S*(5*w)+Z*(5*N),H+=Oc>>>13,Oc&=8191;let o=H+u*N+a*M+Xc*q+e*x+B*z;H=o>>>13,o&=8191,o+=C*G+K*m+R*W+S*(5*U)+Z*(5*w),H+=o>>>13,o&=8191;let Dc=H+u*w+a*N+Xc*M+e*q+B*x;H=Dc>>>13,Dc&=8191,Dc+=C*z+K*G+R*m+S*W+Z*(5*U),H+=Dc>>>13,Dc&=8191;let Uc=H+u*U+a*w+Xc*N+e*M+B*q;H=Uc>>>13,Uc&=8191,Uc+=C*x+K*z+R*G+S*m+Z*W,H+=Uc>>>13,Uc&=8191,H=(H<<2)+H|0,H=H+A|0,A=H&8191,H=H>>>13,b+=H,Y[0]=A,Y[1]=b,Y[2]=P,Y[3]=r,Y[4]=Yc,Y[5]=cc,Y[6]=Oc,Y[7]=o,Y[8]=Dc,Y[9]=Uc}finalize(){let{h:c,pad:$}=this,Q=new Uint16Array(10),J=c[1]>>>13;c[1]&=8191;for(let W=2;W<10;W++)c[W]+=J,J=c[W]>>>13,c[W]&=8191;c[0]+=J*5,J=c[0]>>>13,c[0]&=8191,c[1]+=J,J=c[1]>>>13,c[1]&=8191,c[2]+=J,Q[0]=c[0]+5,J=Q[0]>>>13,Q[0]&=8191;for(let W=1;W<10;W++)Q[W]=c[W]+J,J=Q[W]>>>13,Q[W]&=8191;Q[9]-=8192;let Y=(J^1)-1;for(let W=0;W<10;W++)Q[W]&=Y;Y=~Y;for(let W=0;W<10;W++)c[W]=c[W]&Y|Q[W];c[0]=(c[0]|c[1]<<13)&65535,c[1]=(c[1]>>>3|c[2]<<10)&65535,c[2]=(c[2]>>>6|c[3]<<7)&65535,c[3]=(c[3]>>>9|c[4]<<4)&65535,c[4]=(c[4]>>>12|c[5]<<1|c[6]<<14)&65535,c[5]=(c[6]>>>2|c[7]<<11)&65535,c[6]=(c[7]>>>5|c[8]<<8)&65535,c[7]=(c[8]>>>8|c[9]<<5)&65535;let X=c[0]+$[0];c[0]=X&65535;for(let W=1;W<8;W++)X=(c[W]+$[W]|0)+(X>>>16)|0,c[W]=X&65535;sc(Q)}update(c){Ym(this),Ac(c),c=_0(c);let{buffer:$,blockLen:Q}=this,J=c.length;for(let Y=0;Y<J;){let X=Math.min(Q-this.pos,J-Y);if(X===Q){for(;Q<=J-Y;Y+=Q)this.process(c,Y);continue}if($.set(c.subarray(Y,Y+X),this.pos),this.pos+=X,Y+=X,this.pos===Q)this.process($,0,!1),this.pos=0}return this}destroy(){sc(this.h,this.r,this.buffer,this.pad)}digestInto(c){Ym(this),fM(c,this),this.finished=!0;let{buffer:$,h:Q}=this,{pos:J}=this;if(J){$[J++]=1;for(;J<16;J++)$[J]=0;this.process($,0,!0)}this.finalize();let Y=0;for(let X=0;X<8;X++)c[Y++]=Q[X]>>>0,c[Y++]=Q[X]>>>8;return c}digest(){let{buffer:c,outputLen:$}=this;this.digestInto(c);let Q=c.slice(0,$);return this.destroy(),Q}}function pB(c){let $=(J,Y)=>c(Y).update(J).digest(),Q=c(new Uint8Array(32));return $.outputLen=Q.outputLen,$.blockLen=Q.blockLen,$.create=(J)=>c(J),$}var rM=(()=>pB((c)=>new sM(c)))();function cN(c,$,Q,J,Y,X=20){let W=c[0],m=c[1],G=c[2],z=c[3],x=$[0],q=$[1],M=$[2],N=$[3],w=$[4],U=$[5],v=$[6],i=$[7],j=Y,D=Q[0],_=Q[1],mc=Q[2],g=W,Jc=m,u=G,a=z,Xc=x,e=q,B=M,C=N,K=w,R=U,S=v,Z=i,H=j,A=D,b=_,P=mc;for(let Yc=0;Yc<X;Yc+=2)g=g+Xc|0,H=h(H^g,16),K=K+H|0,Xc=h(Xc^K,12),g=g+Xc|0,H=h(H^g,8),K=K+H|0,Xc=h(Xc^K,7),Jc=Jc+e|0,A=h(A^Jc,16),R=R+A|0,e=h(e^R,12),Jc=Jc+e|0,A=h(A^Jc,8),R=R+A|0,e=h(e^R,7),u=u+B|0,b=h(b^u,16),S=S+b|0,B=h(B^S,12),u=u+B|0,b=h(b^u,8),S=S+b|0,B=h(B^S,7),a=a+C|0,P=h(P^a,16),Z=Z+P|0,C=h(C^Z,12),a=a+C|0,P=h(P^a,8),Z=Z+P|0,C=h(C^Z,7),g=g+e|0,P=h(P^g,16),S=S+P|0,e=h(e^S,12),g=g+e|0,P=h(P^g,8),S=S+P|0,e=h(e^S,7),Jc=Jc+B|0,H=h(H^Jc,16),Z=Z+H|0,B=h(B^Z,12),Jc=Jc+B|0,H=h(H^Jc,8),Z=Z+H|0,B=h(B^Z,7),u=u+C|0,A=h(A^u,16),K=K+A|0,C=h(C^K,12),u=u+C|0,A=h(A^u,8),K=K+A|0,C=h(C^K,7),a=a+Xc|0,b=h(b^a,16),R=R+b|0,Xc=h(Xc^R,12),a=a+Xc|0,b=h(b^a,8),R=R+b|0,Xc=h(Xc^R,7);let r=0;J[r++]=W+g|0,J[r++]=m+Jc|0,J[r++]=G+u|0,J[r++]=z+a|0,J[r++]=x+Xc|0,J[r++]=q+e|0,J[r++]=M+B|0,J[r++]=N+C|0,J[r++]=w+K|0,J[r++]=U+R|0,J[r++]=v+S|0,J[r++]=i+Z|0,J[r++]=j+H|0,J[r++]=D+A|0,J[r++]=_+b|0,J[r++]=mc+P|0}function IB(c,$,Q,J){let Y=c[0],X=c[1],W=c[2],m=c[3],G=$[0],z=$[1],x=$[2],q=$[3],M=$[4],N=$[5],w=$[6],U=$[7],v=Q[0],i=Q[1],j=Q[2],D=Q[3];for(let mc=0;mc<20;mc+=2)Y=Y+G|0,v=h(v^Y,16),M=M+v|0,G=h(G^M,12),Y=Y+G|0,v=h(v^Y,8),M=M+v|0,G=h(G^M,7),X=X+z|0,i=h(i^X,16),N=N+i|0,z=h(z^N,12),X=X+z|0,i=h(i^X,8),N=N+i|0,z=h(z^N,7),W=W+x|0,j=h(j^W,16),w=w+j|0,x=h(x^w,12),W=W+x|0,j=h(j^W,8),w=w+j|0,x=h(x^w,7),m=m+q|0,D=h(D^m,16),U=U+D|0,q=h(q^U,12),m=m+q|0,D=h(D^m,8),U=U+D|0,q=h(q^U,7),Y=Y+z|0,D=h(D^Y,16),w=w+D|0,z=h(z^w,12),Y=Y+z|0,D=h(D^Y,8),w=w+D|0,z=h(z^w,7),X=X+x|0,v=h(v^X,16),U=U+v|0,x=h(x^U,12),X=X+x|0,v=h(v^X,8),U=U+v|0,x=h(x^U,7),W=W+q|0,i=h(i^W,16),M=M+i|0,q=h(q^M,12),W=W+q|0,i=h(i^W,8),M=M+i|0,q=h(q^M,7),m=m+G|0,j=h(j^m,16),N=N+j|0,G=h(G^N,12),m=m+G|0,j=h(j^m,8),N=N+j|0,G=h(G^N,7);let _=0;J[_++]=Y,J[_++]=X,J[_++]=W,J[_++]=m,J[_++]=v,J[_++]=i,J[_++]=j,J[_++]=D}var XX=vm(cN,{counterRight:!1,counterLength:4,allowShortKeys:!1}),ZB=vm(cN,{counterRight:!1,counterLength:8,extendNonceFn:IB,allowShortKeys:!1});var LB=new Uint8Array(16),tM=(c,$)=>{c.update($);let Q=$.length%16;if(Q)c.update(LB.subarray(Q))},_B=new Uint8Array(32);function eM(c,$,Q,J,Y){if(Y!==void 0)Ac(Y,void 0,"AAD");let X=c($,Q,_B),W=Wm(J.length,Y?Y.length:0,!0),m=rM.create(X);if(Y)tM(m,Y);tM(m,J),m.update(W);let G=m.digest();return sc(X,W),G}var $N=(c)=>($,Q,J)=>{return{encrypt(X,W){let m=X.length;W=qQ(m+16,W,!1),W.set(X);let G=W.subarray(0,-16);c($,Q,G,G,1);let z=eM(c,$,Q,G,J);return W.set(z,m),sc(z),W},decrypt(X,W){W=qQ(X.length-16,W,!1);let m=X.subarray(0,-16),G=X.subarray(-16),z=eM(c,$,Q,m,J);if(!BJ(G,z))throw Error("invalid tag");return W.set(X.subarray(0,-16)),c($,Q,W,W,1),sc(z),W}}},eb=HJ({blockSize:64,nonceLength:12,tagLength:16},$N(XX)),cF=HJ({blockSize:64,nonceLength:24,tagLength:16},$N(ZB));function JN(c,$,Q){if(z$(c),Q===void 0)Q=new Uint8Array(c.outputLen);return E8(c,Q,$)}var Um=Uint8Array.of(0),QN=Uint8Array.of();function YN(c,$,Q,J=32){z$(c),I0(J,"length");let Y=c.outputLen;if(J>255*Y)throw Error("Length must be <= 255*HashLen");let X=Math.ceil(J/Y);if(Q===void 0)Q=QN;else vc(Q,void 0,"info");let W=new Uint8Array(X*Y),m=E8.create(c,$),G=m._cloneInto(),z=new Uint8Array(m.outputLen);for(let x=0;x<X;x++)Um[0]=x+1,G.update(x===0?QN:z).update(Q).update(Um).digestInto(z),W.set(z,Y*x),m._cloneInto(G);return m.destroy(),G.destroy(),h0(z,Um),W.slice(0,J)}var SB=Object.defineProperty,Sc=(c,$)=>{for(var Q in $)SB(c,Q,{get:$[Q],enumerable:!0})},AB={};Sc(AB,{binarySearch:()=>Rm,bytesToHex:()=>Hc,hexToBytes:()=>Rc,insertEventIntoAscendingList:()=>PB,insertEventIntoDescendingList:()=>CB,isHex32:()=>q0,mergeReverseSortedLists:()=>EB,normalizeURL:()=>xN,utf8Decoder:()=>i8,utf8Encoder:()=>S0});var i8=new TextDecoder("utf-8"),S0=new TextEncoder;function xN(c){try{if(c.indexOf("://")===-1)c="wss://"+c;let $=new URL(c);if($.protocol==="http:")$.protocol="ws:";else if($.protocol==="https:")$.protocol="wss:";if($.pathname=$.pathname.replace(/\/+/g,"/"),$.pathname.endsWith("/"))$.pathname=$.pathname.slice(0,-1);if($.port==="80"&&$.protocol==="ws:"||$.port==="443"&&$.protocol==="wss:")$.port="";return $.searchParams.sort(),$.hash="",$.toString()}catch($){throw Error(`Invalid URL: ${c}`)}}function CB(c,$){let[Q,J]=Rm(c,(Y)=>{if($.id===Y.id)return 0;if($.created_at===Y.created_at)return-1;return Y.created_at-$.created_at});if(!J)c.splice(Q,0,$);return c}function PB(c,$){let[Q,J]=Rm(c,(Y)=>{if($.id===Y.id)return 0;if($.created_at===Y.created_at)return-1;return $.created_at-Y.created_at});if(!J)c.splice(Q,0,$);return c}function Rm(c,$){let Q=0,J=c.length-1;while(Q<=J){let Y=Math.floor((Q+J)/2),X=$(c[Y]);if(X===0)return[Y,!0];if(X<0)J=Y-1;else Q=Y+1}return[Q,!1]}function EB(c,$){let Q=Array(c.length+$.length);Q.length=0;let J=0,Y=0,X=[];while(J<c.length&&Y<$.length){let W;if(c[J]?.created_at>$[Y]?.created_at)W=c[J],J++;else W=$[Y],Y++;if(Q.length>0&&Q[Q.length-1].created_at===W.created_at){if(X.includes(W.id))continue}else X.length=0;Q.push(W),X.push(W.id)}while(J<c.length){let W=c[J];if(J++,Q.length>0&&Q[Q.length-1].created_at===W.created_at){if(X.includes(W.id))continue}else X.length=0;Q.push(W),X.push(W.id)}while(Y<$.length){let W=$[Y];if(Y++,Q.length>0&&Q[Q.length-1].created_at===W.created_at){if(X.includes(W.id))continue}else X.length=0;Q.push(W),X.push(W.id)}return Q}function q0(c){for(let $=0;$<64;$++){let Q=c.charCodeAt($);if(isNaN(Q)||Q<48||Q>102||Q>57&&Q<97)return!1}return!0}var NQ=Symbol("verified"),bB=(c)=>c instanceof Object;function pm(c){if(!bB(c))return!1;if(typeof c.kind!=="number")return!1;if(typeof c.content!=="string")return!1;if(typeof c.created_at!=="number")return!1;if(typeof c.pubkey!=="string")return!1;if(!q0(c.pubkey))return!1;if(!Array.isArray(c.tags))return!1;for(let $=0;$<c.tags.length;$++){let Q=c.tags[$];if(!Array.isArray(Q))return!1;for(let J=0;J<Q.length;J++)if(typeof Q[J]!=="string")return!1}return!0}var FB=class{generateSecretKey(){return xQ.utils.randomSecretKey()}getPublicKey(c){return Hc(xQ.getPublicKey(c))}finalizeEvent(c,$){let Q=c;return Q.pubkey=Hc(xQ.getPublicKey($)),Q.id=mX(Q),Q.sig=Hc(xQ.sign(Rc(mX(Q)),$)),Q[NQ]=!0,Q}verifyEvent(c){if(typeof c[NQ]==="boolean")return c[NQ];try{let $=mX(c);if($!==c.id)return c[NQ]=!1,!1;let Q=xQ.verify(Rc(c.sig),Rc($),Rc(c.pubkey));return c[NQ]=Q,Q}catch($){return c[NQ]=!1,!1}}};function TB(c){if(!pm(c))throw Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,c.pubkey,c.created_at,c.kind,c.tags,c.content])}function mX(c){let $=Q0(S0.encode(TB(c)));return Hc($)}var xX=new FB,fB=xX.generateSecretKey,OJ=xX.getPublicKey,A0=xX.finalizeEvent,RJ=xX.verifyEvent,nB={};Sc(nB,{AIEmbeddings:()=>PH,AppCurationSet:()=>wR,Application:()=>NR,AuthoredPodcasts:()=>PO,BadgeAward:()=>gB,BadgeDefinition:()=>$R,Bid:()=>zH,BidConfirmation:()=>xH,BlobsAuth:()=>yO,BlockedRelaysList:()=>iO,BlossomServerList:()=>LO,BookmarkList:()=>NO,Bookmarksets:()=>sO,Calendar:()=>AR,CalendarEventRSVP:()=>CR,CashuMintAnnouncement:()=>lR,CashuWalletEvent:()=>kO,CashuWalletHistory:()=>yH,CashuWalletTokens:()=>hH,ChannelCreation:()=>iN,ChannelHideMessage:()=>jN,ChannelMessage:()=>UN,ChannelMetadata:()=>vN,ChannelMuteUser:()=>KN,ChatMessage:()=>dB,Chess:()=>WH,ClassifiedListing:()=>DR,ClientAuth:()=>BN,CodeSnippet:()=>jH,CoinjoinPool:()=>FH,Comment:()=>VH,CommunitiesList:()=>VO,CommunityDefinition:()=>nR,CommunityPostApproval:()=>nH,ConferenceEvent:()=>UR,Contacts:()=>hB,CreateOrUpdateProduct:()=>YR,CreateOrUpdateStall:()=>JR,CuratedVideoSets:()=>tO,Curationsets:()=>rO,Date:()=>_R,DecoupledEncryptionKeyDistribution:()=>fH,DecoupledKeyAnnouncement:()=>pO,DecoupledKeyClientAnnouncement:()=>TH,DirectMessageRelaysList:()=>IO,DraftClassifiedListing:()=>BR,DraftEvent:()=>IR,DraftLong:()=>GR,Emojisets:()=>zR,EncryptedDirectMessage:()=>yB,EventDeletion:()=>oB,FavoriteFollowSets:()=>OO,FavoritePodcasts:()=>ZO,FavoriteRelays:()=>jO,FedimintAnnouncement:()=>hR,Feed:()=>LR,FileMessage:()=>eB,FileMetadata:()=>MH,FileServerPreference:()=>_O,Followsets:()=>oO,ForumThread:()=>rB,GenericRepost:()=>Sm,Genericlists:()=>gO,GeocacheListing:()=>kR,GeocacheLog:()=>oH,GeocacheLogEntry:()=>aR,GeocacheProofOfFind:()=>gH,GiftWrap:()=>DN,GitPullRequest:()=>DH,GitPullRequestUpdate:()=>BH,GoodWikiAuthorList:()=>SO,GoodWikiRelayList:()=>AO,GroupMetadata:()=>oR,HTTPAuth:()=>Am,Handlerinformation:()=>bR,Handlerrecommendation:()=>ER,Highlights:()=>zO,InteractiveRoom:()=>vR,InterestsList:()=>DO,Interestsets:()=>QR,Issue:()=>HH,JobFeedback:()=>aH,JobRequest:()=>uH,JobResult:()=>kH,Label:()=>AH,LegacyNsiteFile:()=>TR,LightningPubRPC:()=>aO,LinkSet:()=>ZR,LiveChatMessage:()=>UH,LiveEvent:()=>iR,LongFormArticle:()=>mR,MarketplaceUI:()=>XR,MediaFollows:()=>HO,MediaStarterPacks:()=>eR,MergeRequests:()=>mH,Metadata:()=>aB,ModularArticleContent:()=>qR,ModularArticleHeader:()=>xR,MuteSets:()=>eO,Mutelist:()=>xO,NWCWalletInfo:()=>nO,NWCWalletRequest:()=>HN,NWCWalletResponse:()=>lO,NormalVideo:()=>QH,NostrConnect:()=>hO,NsiteNamed:()=>uR,NsiteRoot:()=>uO,NutZap:()=>XO,NutZapInfo:()=>BO,OpenTimestamps:()=>qH,Patch:()=>KH,PeerToPeerOrderEvents:()=>yR,Photo:()=>$H,Pinlist:()=>qO,PodcastEpisode:()=>XH,PodcastMetadata:()=>CO,Poll:()=>NH,PollResponse:()=>GH,PrivateDirectMessage:()=>wN,PrivateEventRelayList:()=>KO,ProblemTracker:()=>LH,ProductSoldAsAuction:()=>WR,ProfileBadges:()=>cR,ProxyAnnouncement:()=>TO,PublicChatsList:()=>wO,PublicMessage:()=>YH,Reaction:()=>_m,ReactionToWebsite:()=>cH,RecommendRelay:()=>lB,Redirects:()=>pR,RelayDiscovery:()=>VR,RelayList:()=>MO,RelayMonitorAnnouncement:()=>EO,RelayReview:()=>PR,RelayReviews:()=>CH,Relaysets:()=>dO,ReleaseArtifactSets:()=>MR,Reply:()=>OH,Report:()=>_H,Reporting:()=>SH,RepositoryAnnouncement:()=>HR,RepositoryState:()=>OR,Repost:()=>Lm,ReservedCashuWalletTokens:()=>lH,RoomPresence:()=>bO,Scroll:()=>iH,Seal:()=>VN,SearchRelaysList:()=>vO,ShortTextNote:()=>NN,ShortVideo:()=>JH,SimpleGroupAdmins:()=>gR,SimpleGroupCreateGroup:()=>eH,SimpleGroupCreateInvite:()=>$O,SimpleGroupDeleteEvent:()=>tH,SimpleGroupDeleteGroup:()=>cO,SimpleGroupEditMetadata:()=>rH,SimpleGroupJoinRequest:()=>QO,SimpleGroupLeaveRequest:()=>JO,SimpleGroupList:()=>UO,SimpleGroupLiveKitParticipants:()=>rR,SimpleGroupMembers:()=>dR,SimpleGroupPutUser:()=>dH,SimpleGroupRemoveUser:()=>sH,SimpleGroupReply:()=>tB,SimpleGroupRoles:()=>sR,SimpleGroupThreadedReply:()=>sB,SlideSet:()=>KR,SoftwareApplication:()=>FR,StarterPacks:()=>tR,StatusApplied:()=>pH,StatusClosed:()=>IH,StatusDraft:()=>ZH,StatusOpen:()=>RH,TidalLogin:()=>WO,Time:()=>SR,Torrent:()=>EH,TorrentComment:()=>bH,TransportMethodAnnouncement:()=>fO,UserEmojiList:()=>RO,UserGraspList:()=>FO,UserStatuses:()=>jR,VideoViewEvent:()=>fR,Voice:()=>wH,VoiceComment:()=>vH,WebBookmarks:()=>cp,WikiArticle:()=>RR,Zap:()=>GO,ZapGoal:()=>YO,ZapRequest:()=>mO,classifyKind:()=>uB,isAddressableKind:()=>Zm,isEphemeralKind:()=>MN,isKind:()=>kB,isRegularKind:()=>qN,isReplaceableKind:()=>Im});function qN(c){return c<1e4&&c!==0&&c!==3}function Im(c){return c===0||c===3||1e4<=c&&c<20000}function MN(c){return 20000<=c&&c<30000}function Zm(c){return 30000<=c&&c<40000}function uB(c){if(qN(c))return"regular";if(Im(c))return"replaceable";if(MN(c))return"ephemeral";if(Zm(c))return"parameterized";return"unknown"}function kB(c,$){let Q=$ instanceof Array?$:[$];return pm(c)&&Q.includes(c.kind)||!1}var aB=0,NN=1,lB=2,hB=3,yB=4,oB=5,Lm=6,_m=7,gB=8,dB=9,sB=10,rB=11,tB=12,VN=13,wN=14,eB=15,Sm=16,cH=17,$H=20,QH=21,JH=22,YH=24,iN=40,vN=41,UN=42,jN=43,KN=44,XH=54,WH=64,mH=818,GH=1018,zH=1021,xH=1022,qH=1040,DN=1059,MH=1063,NH=1068,VH=1111,wH=1222,iH=1227,vH=1244,UH=1311,jH=1337,KH=1617,DH=1618,BH=1619,HH=1621,OH=1622,RH=1630,pH=1631,IH=1632,ZH=1633,LH=1971,_H=1984,SH=1984,AH=1985,CH=1986,PH=1987,EH=2003,bH=2004,FH=2022,TH=4454,fH=4455,nH=4550,uH=5999,kH=6999,aH=7000,lH=7374,hH=7375,yH=7376,oH=7516,gH=7517,dH=9000,sH=9001,rH=9002,tH=9005,eH=9007,cO=9008,$O=9009,QO=9021,JO=9022,YO=9041,XO=9321,WO=9467,mO=9734,GO=9735,zO=9802,xO=1e4,qO=10001,MO=10002,NO=10003,VO=10004,wO=10005,iO=10006,vO=10007,UO=10009,jO=10012,KO=10013,DO=10015,BO=10019,HO=10020,OO=10021,RO=10030,pO=10044,IO=10050,ZO=10054,LO=10063,_O=10096,SO=10101,AO=10102,CO=10154,PO=10164,EO=10166,bO=10312,FO=10317,TO=10377,fO=11111,nO=13194,uO=15128,kO=17375,aO=21000,BN=22242,HN=23194,lO=23195,hO=24133,yO=24242,Am=27235,oO=30000,gO=30001,dO=30002,sO=30003,rO=30004,tO=30005,eO=30007,cR=30008,$R=30009,QR=30015,JR=30017,YR=30018,XR=30019,WR=30020,mR=30023,GR=30024,zR=30030,xR=30040,qR=30041,MR=30063,NR=30078,VR=30166,wR=30267,iR=30311,vR=30312,UR=30313,jR=30315,KR=30388,DR=30402,BR=30403,HR=30617,OR=30618,RR=30818,pR=30819,IR=31234,ZR=31388,LR=31890,_R=31922,SR=31923,AR=31924,CR=31925,PR=31987,ER=31989,bR=31990,FR=32267,TR=34128,fR=34237,nR=34550,uR=35128,kR=37515,aR=37516,lR=38172,hR=38173,yR=38383,oR=39000,gR=39001,dR=39002,sR=39003,rR=39004,tR=39089,eR=39092,cp=39701;function $p(c,$){if(c.ids&&c.ids.indexOf($.id)===-1)return!1;if(c.kinds&&c.kinds.indexOf($.kind)===-1)return!1;if(c.authors&&c.authors.indexOf($.pubkey)===-1)return!1;for(let Q in c)if(Q[0]==="#"){let J=Q.slice(1),Y=c[`#${J}`];if(Y&&!$.tags.find(([X,W])=>X===Q.slice(1)&&Y.indexOf(W)!==-1))return!1}if(c.since&&$.created_at<c.since)return!1;if(c.until&&$.created_at>c.until)return!1;return!0}function Qp(c,$){for(let Q=0;Q<c.length;Q++)if($p(c[Q],$))return!0;return!1}var Jp={};Sc(Jp,{getHex64:()=>qX,getInt:()=>ON,getSubscriptionId:()=>RN,matchEventId:()=>Yp,matchEventKind:()=>Wp,matchEventPubkey:()=>Xp});function qX(c,$){let Q=$.length+3,J=c.indexOf(`"${$}":`)+Q,Y=c.slice(J).indexOf('"')+J+1;return c.slice(Y,Y+64)}function ON(c,$){let Q=$.length,J=c.indexOf(`"${$}":`)+Q+3,Y=c.slice(J),X=Math.min(Y.indexOf(","),Y.indexOf("}"));return parseInt(Y.slice(0,X),10)}function RN(c){let $=c.slice(0,22).indexOf('"EVENT"');if($===-1)return null;let Q=c.slice($+7+1).indexOf('"');if(Q===-1)return null;let J=$+7+1+Q,Y=c.slice(J+1,80).indexOf('"');if(Y===-1)return null;let X=J+1+Y;return c.slice(J+1,X)}function Yp(c,$){return $===qX(c,"id")}function Xp(c,$){return $===qX(c,"pubkey")}function Wp(c,$){return $===ON(c,"kind")}var mp={};Sc(mp,{makeAuthEvent:()=>pN});function pN(c,$){return{kind:BN,created_at:Math.floor(Date.now()/1000),tags:[["relay",c],["challenge",$]],content:""}}var Om=class extends Error{constructor(c,$){super(`Tried to send message '${c} on a closed connection to ${$}.`);this.name="SendingOnClosedConnection"}},Gp=class{url;_connected=!1;onclose=null;onnotice=(c)=>console.debug(`NOTICE from ${this.url}: ${c}`);onauth;baseEoseTimeout=4400;publishTimeout=4400;pingFrequency=29000;pingTimeout=20000;resubscribeBackoff=[1e4,1e4,1e4,20000,20000,30000,60000];openSubs=new Map;enablePing;enableReconnect;idleTimeout=0;idleSince=Date.now();ongoingOperations=0;reconnectTimeoutHandle;pingIntervalHandle;reconnectAttempts=0;skipReconnection=!1;idleTimeoutHandle;connectionPromise;openCountRequests=new Map;openEventPublishes=new Map;ws;challenge;authPromise;serial=0;verifyEvent;_WebSocket;constructor(c,$){if(this.url=xN(c),this.verifyEvent=$.verifyEvent,this._WebSocket=$.websocketImplementation||WebSocket,this.enablePing=$.enablePing,this.enableReconnect=$.enableReconnect||!1,$.idleTimeout)this.idleTimeout=$.idleTimeout}static async connect(c,$){let Q=new Gp(c,$);return await Q.connect($),Q}closeAllSubscriptions(c){for(let[$,Q]of this.openSubs)Q.close(c);this.openSubs.clear();for(let[$,Q]of this.openEventPublishes)Q.reject(Error(c));this.openEventPublishes.clear();for(let[$,Q]of this.openCountRequests)Q.reject(Error(c));this.openCountRequests.clear()}get connected(){return this._connected}clearIdleTimeout(){if(this.idleTimeoutHandle)clearTimeout(this.idleTimeoutHandle),this.idleTimeoutHandle=void 0}scheduleIdleClose(){if(this.clearIdleTimeout(),this.idleTimeout>0)this.idleTimeoutHandle=setTimeout(()=>{if(this.ongoingOperations===0&&this.idleSince)this.close()},this.idleTimeout)}async reconnect(){let c=this.resubscribeBackoff[Math.min(this.reconnectAttempts,this.resubscribeBackoff.length-1)];this.reconnectAttempts++,this.reconnectTimeoutHandle=setTimeout(async()=>{try{await this.connect()}catch($){}},c)}handleHardClose(c){if(this.ws)this.ws.onopen=null,this.ws.onerror=null,this.ws.onclose=null;if(this.pingIntervalHandle)clearInterval(this.pingIntervalHandle),this.pingIntervalHandle=void 0;if(this._connected=!1,this.connectionPromise=void 0,this.idleSince=void 0,this.clearIdleTimeout(),this.enableReconnect&&!this.skipReconnection)this.reconnect();else this.onclose?.(),this.closeAllSubscriptions(c)}async connect(c){let $;if(this.connectionPromise)return this.connectionPromise;return this.challenge=void 0,this.authPromise=void 0,this.skipReconnection=!1,this.connectionPromise=new Promise((Q,J)=>{if(c?.timeout)$=setTimeout(()=>{if(J("connection timed out"),this.connectionPromise=void 0,this.reconnectAttempts===0)this.skipReconnection=!0;this.handleHardClose("relay connection timed out")},c.timeout);if(c?.abort)c.abort.onabort=J;try{this.ws=new this._WebSocket(this.url)}catch(Y){clearTimeout($),J(Y);return}this.ws.onopen=()=>{if(this.reconnectTimeoutHandle)clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0;clearTimeout($),this._connected=!0;let Y=this.reconnectAttempts>0;this.reconnectAttempts=0;for(let X of this.openSubs.values()){if(X.eosed=!1,Y){for(let W=0;W<X.filters.length;W++)if(X.lastEmitted)X.filters[W].since=X.lastEmitted+1}X.fire()}if(this.enablePing)this.pingIntervalHandle=setInterval(()=>this.pingpong(),this.pingFrequency);Q()},this.ws.onerror=()=>{if(clearTimeout($),J("connection failed"),this.connectionPromise=void 0,this.reconnectAttempts===0)this.skipReconnection=!0;this.handleHardClose("relay connection failed")},this.ws.onclose=(Y)=>{clearTimeout($),J(Y.message||"websocket closed"),this.handleHardClose("relay connection closed")},this.ws.onmessage=this._onmessage.bind(this)}),this.connectionPromise}waitForPingPong(){return new Promise((c)=>{this.ws.once("pong",()=>c(!0)),this.ws.ping()})}waitForDummyReq(){return new Promise((c,$)=>{if(!this.connectionPromise)return $(Error(`no connection to ${this.url}, can't ping`));try{let Q=this.subscribe([{ids:["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"],limit:0}],{label:"<forced-ping>",oneose:()=>{c(!0),Q.close()},onclose(){c(!0)},eoseTimeout:this.pingTimeout+1000})}catch(Q){$(Q)}})}async pingpong(){if(this.ws?.readyState===1){if(!await Promise.any([this.ws&&this.ws.ping&&this.ws.once?this.waitForPingPong():this.waitForDummyReq(),new Promise(($)=>setTimeout(()=>$(!1),this.pingTimeout))])){if(this.ws?.readyState===this._WebSocket.OPEN)this.ws?.close()}}}async send(c){if(!this.connectionPromise)throw new Om(c,this.url);this.connectionPromise.then(()=>{this.ws?.send(c)})}async auth(c){let $=this.challenge;if(!$)throw Error("can't perform auth, no challenge was received");if(this.authPromise)return this.authPromise;return this.authPromise=new Promise(async(Q,J)=>{try{let Y=await c(pN(this.url,$)),X=setTimeout(()=>{let W=this.openEventPublishes.get(Y.id);if(W)W.reject(Error("auth timed out")),this.openEventPublishes.delete(Y.id)},this.publishTimeout);this.openEventPublishes.set(Y.id,{resolve:Q,reject:J,timeout:X}),this.send('["AUTH",'+JSON.stringify(Y)+"]")}catch(Y){console.warn("subscribe auth function failed:",Y)}}),this.authPromise}async publish(c){this.idleSince=void 0,this.clearIdleTimeout(),this.ongoingOperations++;let $=new Promise((Q,J)=>{let Y=setTimeout(()=>{let X=this.openEventPublishes.get(c.id);if(X)X.reject(Error("publish timed out")),this.openEventPublishes.delete(c.id)},this.publishTimeout);this.openEventPublishes.set(c.id,{resolve:Q,reject:J,timeout:Y})});try{await this.send('["EVENT",'+JSON.stringify(c)+"]")}catch(Q){let J=this.openEventPublishes.get(c.id);if(J)J.reject(Q),this.openEventPublishes.delete(c.id)}if(this.ongoingOperations--,this.ongoingOperations===0)this.idleSince=Date.now(),this.scheduleIdleClose();return $}async count(c,$){return(await this.countWithHLL(c,$)).count}async countWithHLL(c,$){this.serial++;let Q=$?.id||"count:"+this.serial,J=new Promise((Y,X)=>{this.openCountRequests.set(Q,{resolve:Y,reject:X})});try{await this.send('["COUNT","'+Q+'",'+JSON.stringify(c).substring(1))}catch(Y){let X=this.openCountRequests.get(Q);if(X)X.reject(Y),this.openCountRequests.delete(Q)}return J}subscribe(c,$){if($.label!=="<forced-ping>")this.idleSince=void 0,this.clearIdleTimeout(),this.ongoingOperations++;let Q=this.prepareSubscription(c,$);if(Q.fire(),$.abort)$.abort.onabort=()=>Q.close(String($.abort.reason||"<aborted>"));return Q}prepareSubscription(c,$){this.serial++;let Q=$.id||($.label?$.label+":":"sub:")+this.serial,J=new zp(this,Q,c,$);return this.openSubs.set(Q,J),J}close(){if(this.skipReconnection=!0,this.reconnectTimeoutHandle)clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0;if(this.pingIntervalHandle)clearInterval(this.pingIntervalHandle),this.pingIntervalHandle=void 0;if(this.closeAllSubscriptions("relay connection closed by us"),this._connected=!1,this.connectionPromise=void 0,this.idleSince=void 0,this.clearIdleTimeout(),this.onclose?.(),this.ws){if(this.ws.onopen=null,this.ws.onerror=null,this.ws.onclose=null,this.ws.readyState!==this._WebSocket.CLOSING&&this.ws.readyState!==this._WebSocket.CLOSED)this.ws.close()}}_onmessage(c){let $=c.data;if(!$)return;let Q=RN($);if(Q){let J=this.openSubs.get(Q);if(!J)return;let Y=qX($,"id"),X=J.alreadyHaveEvent?.(Y);if(J.receivedEvent?.(this,Y),X)return}try{let J=JSON.parse($);switch(J[0]){case"EVENT":{let Y=this.openSubs.get(J[1]),X=J[2];if(Qp(Y.filters,X)&&this.verifyEvent(X,this.url))Y.onevent(X);else Y.oninvalidevent?.(X);if(!Y.lastEmitted||Y.lastEmitted<X.created_at)Y.lastEmitted=X.created_at;return}case"COUNT":{let Y=J[1],X=J[2],W=this.openCountRequests.get(Y);if(W)W.resolve(X),this.openCountRequests.delete(Y);return}case"EOSE":{let Y=this.openSubs.get(J[1]);if(!Y)return;Y.receivedEose();return}case"OK":{let Y=J[1],X=J[2],W=J[3],m=this.openEventPublishes.get(Y);if(m){if(clearTimeout(m.timeout),X)m.resolve(W);else m.reject(Error(W));this.openEventPublishes.delete(Y)}return}case"CLOSED":{let Y=J[1],X=this.openSubs.get(Y);if(!X){let W=this.openCountRequests.get(Y);if(W)W.reject(Error(J[2])),this.openCountRequests.delete(Y);return}X.closed=!0,X.close(J[2]);return}case"NOTICE":{this.onnotice(J[1]);return}case"AUTH":{if(this.challenge=J[1],this.onauth)this.auth(this.onauth).catch((Y)=>{if(!(Y instanceof Om))throw Y});return}default:{this.openSubs.get(J[1])?.oncustom?.(J);return}}}catch(J){try{let[Y,X,W]=JSON.parse($);console.warn(`[nostr] relay ${this.url} error processing message:`,J,W)}catch(Y){console.warn(`[nostr] relay ${this.url} error processing message:`,J)}return}}},zp=class{relay;id;lastEmitted;closed=!1;eosed=!1;filters;alreadyHaveEvent;receivedEvent;onevent;oninvalidevent;oneose;onclose;oncustom;eoseTimeout;eoseTimeoutHandle;constructor(c,$,Q,J){if(Q.length===0)throw Error("subscription can't be created with zero filters");this.relay=c,this.filters=Q,this.id=$,this.alreadyHaveEvent=J.alreadyHaveEvent,this.receivedEvent=J.receivedEvent,this.eoseTimeout=J.eoseTimeout||c.baseEoseTimeout,this.oneose=J.oneose,this.onclose=J.onclose,this.oninvalidevent=J.oninvalidevent,this.onevent=J.onevent||((Y)=>{console.warn(`onevent() callback not defined for subscription '${this.id}' in relay ${this.relay.url}. event received:`,Y)})}fire(){this.relay.send('["REQ","'+this.id+'",'+JSON.stringify(this.filters).substring(1)),this.eoseTimeoutHandle=setTimeout(this.receivedEose.bind(this),this.eoseTimeout)}receivedEose(){if(this.eosed)return;clearTimeout(this.eoseTimeoutHandle),this.eosed=!0,this.oneose?.()}close(c="closed by caller"){if(!this.closed&&this.relay.connected){try{this.relay.send('["CLOSE",'+JSON.stringify(this.id)+"]")}catch($){if($ instanceof Om);else throw $}this.closed=!0}if(this.relay.openSubs.delete(this.id),this.relay.ongoingOperations--,this.relay.ongoingOperations===0)this.relay.idleSince=Date.now(),this.relay.scheduleIdleClose();this.onclose?.(c)}},xp;try{xp=WebSocket}catch{}var qp=256,zF=qp*2;var Mp;try{Mp=WebSocket}catch{}var MX={};Sc(MX,{BECH32_REGEX:()=>IN,Bech32MaxSize:()=>Cm,NostrTypeGuard:()=>Np,decode:()=>NX,decodeNostrURI:()=>wp,encodeBytes:()=>wX,naddrEncode:()=>Dp,neventEncode:()=>Kp,noteEncode:()=>Up,nprofileEncode:()=>jp,npubEncode:()=>vp,nsecEncode:()=>ip});var Np={isNProfile:(c)=>/^nprofile1[a-z\d]+$/.test(c||""),isNEvent:(c)=>/^nevent1[a-z\d]+$/.test(c||""),isNAddr:(c)=>/^naddr1[a-z\d]+$/.test(c||""),isNSec:(c)=>/^nsec1[a-z\d]{58}$/.test(c||""),isNPub:(c)=>/^npub1[a-z\d]{58}$/.test(c||""),isNote:(c)=>/^note1[a-z\d]+$/.test(c||""),isNcryptsec:(c)=>/^ncryptsec1[a-z\d]+$/.test(c||"")},Cm=5000,IN=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function Vp(c){let $=new Uint8Array(4);return $[0]=c>>24&255,$[1]=c>>16&255,$[2]=c>>8&255,$[3]=c&255,$}function wp(c){try{if(c.startsWith("nostr:"))c=c.substring(6);return NX(c)}catch($){return{type:"invalid",data:null}}}function NX(c){let{prefix:$,words:Q}=T8.decode(c,Cm),J=new Uint8Array(T8.fromWords(Q));switch($){case"nprofile":{let Y=jm(J);if(!Y[0]?.[0])throw Error("missing TLV 0 for nprofile");if(Y[0][0].length!==32)throw Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:Hc(Y[0][0]),relays:Y[1]?Y[1].map((X)=>i8.decode(X)):[]}}}case"nevent":{let Y=jm(J);if(!Y[0]?.[0])throw Error("missing TLV 0 for nevent");if(Y[0][0].length!==32)throw Error("TLV 0 should be 32 bytes");if(Y[2]&&Y[2][0].length!==32)throw Error("TLV 2 should be 32 bytes");if(Y[3]&&Y[3][0].length!==4)throw Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:Hc(Y[0][0]),relays:Y[1]?Y[1].map((X)=>i8.decode(X)):[],author:Y[2]?.[0]?Hc(Y[2][0]):void 0,kind:Y[3]?.[0]?parseInt(Hc(Y[3][0]),16):void 0}}}case"naddr":{let Y=jm(J);if(!Y[0]?.[0])throw Error("missing TLV 0 for naddr");if(!Y[2]?.[0])throw Error("missing TLV 2 for naddr");if(Y[2][0].length!==32)throw Error("TLV 2 should be 32 bytes");if(!Y[3]?.[0])throw Error("missing TLV 3 for naddr");if(Y[3][0].length!==4)throw Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:i8.decode(Y[0][0]),pubkey:Hc(Y[2][0]),kind:parseInt(Hc(Y[3][0]),16),relays:Y[1]?Y[1].map((X)=>i8.decode(X)):[]}}}case"nsec":return{type:$,data:J};case"npub":case"note":return{type:$,data:Hc(J)};default:throw Error(`unknown prefix ${$}`)}}function jm(c){let $={},Q=c;while(Q.length>0){if(Q.length<2)throw Error("not enough data to read TLV");let J=Q[0],Y=Q[1],X=Q.slice(2,2+Y);if(Q=Q.slice(2+Y),X.length<Y)throw Error(`not enough data to read on TLV ${J}`);$[J]=$[J]||[],$[J].push(X)}return $}function ip(c){return wX("nsec",c)}function vp(c){return wX("npub",Rc(c))}function Up(c){return wX("note",Rc(c))}function VX(c,$){let Q=T8.toWords($);return T8.encode(c,Q,Cm)}function wX(c,$){return VX(c,$)}function jp(c){let $=Pm({0:[Rc(c.pubkey)],1:(c.relays||[]).map((Q)=>S0.encode(Q))});return VX("nprofile",$)}function Kp(c){let $;if(c.kind!==void 0)$=Vp(c.kind);let Q=Pm({0:[Rc(c.id)],1:(c.relays||[]).map((J)=>S0.encode(J)),2:c.author?[Rc(c.author)]:[],3:$?[new Uint8Array($)]:[]});return VX("nevent",Q)}function Dp(c){let $=new ArrayBuffer(4);new DataView($).setUint32(0,c.kind,!1);let Q=Pm({0:[S0.encode(c.identifier)],1:(c.relays||[]).map((J)=>S0.encode(J)),2:[Rc(c.pubkey)],3:[new Uint8Array($)]});return VX("naddr",Q)}function Pm(c){let $=[];return Object.entries(c).reverse().forEach(([Q,J])=>{J.forEach((Y)=>{let X=new Uint8Array(Y.length+2);X.set([parseInt(Q)],0),X.set([Y.length],1),X.set(Y,2),$.push(X)})}),Fc(...$)}var Bp={};Sc(Bp,{decrypt:()=>Hp,encrypt:()=>ZN});function ZN(c,$,Q){let J=c instanceof Uint8Array?c:Rc(c),Y=UJ.getSharedSecret(J,Rc("02"+$)),X=LN(Y),W=Uint8Array.from(o0(16)),m=S0.encode(Q),G=Vm(X,W).encrypt(m),z=L0.encode(new Uint8Array(G)),x=L0.encode(new Uint8Array(W.buffer));return`${z}?iv=${x}`}function Hp(c,$,Q){let J=c instanceof Uint8Array?c:Rc(c),[Y,X]=Q.split("?iv="),W=UJ.getSharedSecret(J,Rc("02"+$)),m=LN(W),G=L0.decode(X),z=L0.decode(Y),x=Vm(m,G).decrypt(z);return i8.decode(x)}function LN(c){return c.slice(1,33)}var Op={};Sc(Op,{NIP05_REGEX:()=>Em,isNip05:()=>Rp,isValid:()=>Zp,queryProfile:()=>_N,searchDomain:()=>Ip,useFetchImplementation:()=>pp});var Em=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/,Rp=(c)=>Em.test(c||""),iX;try{iX=fetch}catch(c){}function pp(c){iX=c}async function Ip(c,$=""){try{let Q=`https://${c}/.well-known/nostr.json?name=${$}`,J=await iX(Q,{redirect:"manual"});if(J.status!==200)throw Error("Wrong response code");return(await J.json()).names}catch(Q){return{}}}async function _N(c){let $=c.match(Em);if(!$)return null;let[,Q="_",J]=$;try{let Y=`https://${J}/.well-known/nostr.json?name=${Q}`,X=await iX(Y,{redirect:"manual"});if(X.status!==200)throw Error("Wrong response code");let W=await X.json(),m=W.names[Q];return m?{pubkey:m,relays:W.relays?.[m]}:null}catch(Y){return null}}async function Zp(c,$){let Q=await _N($);return Q?Q.pubkey===c:!1}var Lp={};Sc(Lp,{parse:()=>_p});function _p(c){let $={reply:void 0,root:void 0,mentions:[],profiles:[],quotes:[]},Q,J;for(let Y=c.tags.length-1;Y>=0;Y--){let X=c.tags[Y];if(X[0]==="e"&&X[1]&&q0(X[1])){let[W,m,G,z,x]=X,q={id:m,relays:G?[G]:[],author:x&&q0(x)?x:void 0};if(z==="root"){$.root=q;continue}if(z==="reply"){$.reply=q;continue}if(z==="mention"){$.mentions.push(q);continue}if(!Q)Q=q;else J=q;$.mentions.push(q);continue}if(X[0]==="q"&&X[1]&&q0(X[1])){let[W,m,G]=X;$.quotes.push({id:m,relays:G?[G]:[]})}if(X[0]==="p"&&X[1]&&q0(X[1])){$.profiles.push({pubkey:X[1],relays:X[2]?[X[2]]:[]});continue}}if(!$.root)$.root=J||Q||$.reply;if(!$.reply)$.reply=Q||$.root;return[$.reply,$.root].forEach((Y)=>{if(!Y)return;let X=$.mentions.indexOf(Y);if(X!==-1)$.mentions.splice(X,1);if(Y.author){let W=$.profiles.find((m)=>m.pubkey===Y.author);if(W&&W.relays){if(!Y.relays)Y.relays=[];W.relays.forEach((m)=>{if(Y.relays?.indexOf(m)===-1)Y.relays.push(m)}),W.relays=Y.relays}}}),$.mentions.forEach((Y)=>{if(Y.author){let X=$.profiles.find((W)=>W.pubkey===Y.author);if(X&&X.relays){if(!Y.relays)Y.relays=[];X.relays.forEach((W)=>{if(Y.relays.indexOf(W)===-1)Y.relays.push(W)}),X.relays=Y.relays}}}),$}var Sp={};Sc(Sp,{fetchRelayInformation:()=>Cp,useFetchImplementation:()=>Ap});var SN;try{SN=fetch}catch{}function Ap(c){SN=c}async function Cp(c){return await(await fetch(c.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()}var Pp={};Sc(Pp,{getPow:()=>Ep,minePow:()=>Fp});function Ep(c){let $=0;for(let Q=0;Q<64;Q+=8){let J=parseInt(c.substring(Q,Q+8),16);if(J===0)$+=32;else{$+=Math.clz32(J);break}}return $}function bp(c){let $=0;for(let Q=0;Q<c.length;Q++){let J=c[Q];if(J===0)$+=8;else{$+=Math.clz32(J)-24;break}}return $}function Fp(c,$){let Q=0,J=c,Y=["nonce",Q.toString(),$.toString()];J.tags.push(Y);while(!0){let X=Math.floor(new Date().getTime()/1000);if(X!==J.created_at)Q=0,J.created_at=X;Y[1]=(++Q).toString();let W=Q0(S0.encode(JSON.stringify([0,J.pubkey,J.created_at,J.kind,J.tags,J.content])));if(bp(W)>=$){J.id=Hc(W);break}}return J}var Tp={};Sc(Tp,{unwrapEvent:()=>dp,unwrapManyEvents:()=>sp,wrapEvent:()=>lN,wrapManyEvents:()=>gp});var fp={};Sc(fp,{createRumor:()=>nN,createSeal:()=>uN,createWrap:()=>kN,unwrapEvent:()=>am,unwrapManyEvents:()=>aN,wrapEvent:()=>zX,wrapManyEvents:()=>yp});var np={};Sc(np,{decrypt:()=>km,encrypt:()=>um,getConversationKey:()=>fm,v2:()=>lp});var bm=1,Fm=4294967295,Tm=65536;function fm(c,$){let Q=UJ.getSharedSecret(c,Rc("02"+$)).subarray(1,33);return JN(Q0,Q,S0.encode("nip44-v2"))}function AN(c,$){let Q=YN(Q0,c,$,76);return{chacha_key:Q.subarray(0,32),chacha_nonce:Q.subarray(32,44),hmac_key:Q.subarray(44,76)}}function nm(c){if(!Number.isSafeInteger(c)||c<1)throw Error("expected positive integer");if(c<=32)return 32;let $=2**(Math.floor(Math.log2(c-1))+1),Q=$<=256?32:$/8;return Q*(Math.floor((c-1)/Q)+1)}function up(c){if(!Number.isSafeInteger(c)||c<bm||c>65535)throw Error("invalid plaintext size: must be between 1 and 65535 bytes");let $=new Uint8Array(2);return new DataView($.buffer).setUint16(0,c,!1),$}function kp(c){if(!Number.isSafeInteger(c)||c<Tm||c>Fm)throw Error("invalid plaintext size: must be between 65536 and 4294967295 bytes");let $=new Uint8Array(4);return new DataView($.buffer).setUint32(0,c,!1),$}function CN(c){let $=S0.encode(c),Q=$.length;if(Q<bm||Q>Fm)throw Error("invalid plaintext size: must be between 1 and 4294967295 bytes");let J=Q>=Tm?Fc(new Uint8Array([0,0]),kp(Q)):up(Q),Y=new Uint8Array(nm(Q)-Q);return Fc(J,$,Y)}function PN(c){let $=new DataView(c.buffer,c.byteOffset,c.byteLength),Q=$.getUint16(0),J,Y;if(Q===0){if(J=$.getUint32(2),J<Tm)throw Error("invalid padding");Y=6}else J=Q,Y=2;let X=c.subarray(Y,Y+J);if(J<bm||J>Fm||X.length!==J||c.length!==Y+nm(J))throw Error("invalid padding");return i8.decode(X)}function EN(c,$,Q){if(Q.length!==32)throw Error("AAD associated data must be 32 bytes");let J=Fc(Q,$);return E8(Q0,c,J)}function ap(c){if(typeof c!=="string")throw Error("payload must be a valid string");let $=c.length;if($<132)throw Error("invalid payload length: "+$);if(c[0]==="#")throw Error("unknown encryption version");let Q;try{Q=L0.decode(c)}catch(X){throw Error("invalid base64: "+X.message)}let J=Q.length;if(J<99)throw Error("invalid data length: "+J);let Y=Q[0];if(Y!==2)throw Error("unknown encryption version "+Y);return{nonce:Q.subarray(1,33),ciphertext:Q.subarray(33,-32),mac:Q.subarray(-32)}}function um(c,$,Q=o0(32)){let{chacha_key:J,chacha_nonce:Y,hmac_key:X}=AN($,Q),W=CN(c),m=XX(J,Y,W),G=EN(X,m,Q);return L0.encode(Fc(new Uint8Array([2]),Q,m,G))}function km(c,$){let{nonce:Q,ciphertext:J,mac:Y}=ap(c),{chacha_key:X,chacha_nonce:W,hmac_key:m}=AN($,Q),G=EN(m,J,Q);if(!BJ(G,Y))throw Error("invalid MAC");let z=XX(X,W,J);return PN(z)}var lp={utils:{getConversationKey:fm,calcPaddedLen:nm,pad:CN,unpad:PN},encrypt:um,decrypt:km},hp=172800,bN=()=>Math.round(Date.now()/1000),FN=()=>Math.round(bN()-Math.random()*hp),TN=(c,$)=>fm(c,$),fN=(c,$,Q)=>um(JSON.stringify(c),TN($,Q)),XN=(c,$)=>JSON.parse(km(c.content,TN($,c.pubkey)));function nN(c,$){let Q={created_at:bN(),content:"",tags:[],...c,pubkey:OJ($)};return Q.id=mX(Q),Q}function uN(c,$,Q){return A0({kind:VN,content:fN(c,$,Q),created_at:FN(),tags:[]},$)}function kN(c,$){let Q=fB();return A0({kind:DN,content:fN(c,Q,$),created_at:FN(),tags:[["p",$]]},Q)}function zX(c,$,Q){let J=nN(c,$),Y=uN(J,$,Q);return kN(Y,Q)}function yp(c,$,Q){if(!Q||Q.length===0)throw Error("At least one recipient is required.");let J=OJ($),Y=[zX(c,$,J)];return Q.forEach((X)=>{Y.push(zX(c,$,X))}),Y}function am(c,$){let Q=XN(c,$);return XN(Q,$)}function aN(c,$){let Q=[];return c.forEach((J)=>{Q.push(am(J,$))}),Q.sort((J,Y)=>J.created_at-Y.created_at),Q}function op(c,$,Q,J){let Y={created_at:Math.ceil(Date.now()/1000),kind:wN,tags:[],content:$};if((Array.isArray(c)?c:[c]).forEach(({publicKey:W,relayUrl:m})=>{Y.tags.push(m?["p",W,m]:["p",W])}),J)Y.tags.push(["e",J.eventId,J.relayUrl||"","reply"]);if(Q)Y.tags.push(["subject",Q]);return Y}function lN(c,$,Q,J,Y){let X=op($,Q,J,Y);return zX(X,c,$.publicKey)}function gp(c,$,Q,J,Y){if(!$||$.length===0)throw Error("At least one recipient is required.");return[{publicKey:OJ(c)},...$].map((W)=>lN(c,W,Q,J,Y))}var dp=am,sp=aN,rp={};Sc(rp,{finishRepostEvent:()=>tp,getRepostedEvent:()=>ep,getRepostedEventPointer:()=>hN});function tp(c,$,Q,J){let Y,X=[...c.tags??[],["e",$.id,Q],["p",$.pubkey]];if($.kind===NN)Y=Lm;else Y=Sm,X.push(["k",String($.kind)]);return A0({kind:Y,tags:X,content:c.content===""||$.tags?.find((W)=>W[0]==="-")?"":JSON.stringify($),created_at:c.created_at},J)}function hN(c){if(![Lm,Sm].includes(c.kind))return;let $,Q;for(let J=c.tags.length-1;J>=0&&($===void 0||Q===void 0);J--){let Y=c.tags[J];if(Y.length>=2){if(Y[0]==="e"&&$===void 0)$=Y;else if(Y[0]==="p"&&Q===void 0)Q=Y}}if($===void 0)return;return{id:$[1],relays:[$[2],Q?.[2]].filter((J)=>typeof J==="string"),author:Q?.[1]}}function ep(c,{skipVerification:$}={}){let Q=hN(c);if(Q===void 0||c.content==="")return;let J;try{J=JSON.parse(c.content)}catch(Y){return}if(J.id!==Q.id)return;if(!$&&!RJ(J))return;return J}var cI={};Sc(cI,{NOSTR_URI_REGEX:()=>lm,parse:()=>QI,test:()=>$I});var lm=new RegExp(`nostr:(${IN.source})`);function $I(c){return typeof c==="string"&&new RegExp(`^${lm.source}$`).test(c)}function QI(c){let $=c.match(new RegExp(`^${lm.source}$`));if(!$)throw Error(`Invalid Nostr URI: ${c}`);return{uri:$[0],value:$[1],decoded:NX($[1])}}var JI={};Sc(JI,{parse:()=>XI});function WN(c){if(!c)return;return/^\d+$/.test(c)?parseInt(c,10):c}function yN(c,$){let Q=c.indexOf(":"),J=c.indexOf(":",Q+1);if(Q===-1||J===-1)return;let Y=parseInt(c.slice(0,Q),10);if(Number.isNaN(Y))return;let X=c.slice(Q+1,J);if(!q0(X))return;return{kind:Y,pubkey:X,identifier:c.slice(J+1),relays:$?[$]:[]}}function mN(c){switch(c[0]){case"E":case"e":if(!c[1]||!q0(c[1]))return;return{id:c[1],relays:c[2]?[c[2]]:[],author:c[3]&&q0(c[3])?c[3]:void 0};case"A":case"a":if(!c[1])return;return yN(c[1],c[2]);case"I":case"i":if(!c[1])return;return{value:c[1],hint:c[2]}}}function YI(c){if(!c[1])return;if(c[1].includes(":"))return yN(c[1],c[2]);if(!q0(c[1]))return;return{id:c[1],relays:c[2]?[c[2]]:[],author:c[3]&&q0(c[3])?c[3]:void 0}}function GN(c){return c.findLast(($)=>$.tagName==="A"||$.tagName==="a")?.pointer||c.findLast(($)=>$.tagName==="I"||$.tagName==="i")?.pointer||c.findLast(($)=>$.tagName==="E"||$.tagName==="e")?.pointer}function Km(c,$){if(!c||!("id"in c)||!c.author)return;let Q=$.find((J)=>J.pubkey===c.author);if(!Q||!Q.relays)return;if(!c.relays)c.relays=[];Q.relays.forEach((J)=>{if(c.relays.indexOf(J)===-1)c.relays.push(J)}),Q.relays=c.relays}function XI(c){let $={root:void 0,rootKind:void 0,reply:void 0,replyKind:void 0,mentions:[],quotes:[],profiles:[]},Q=[],J=[];for(let Y of c.tags){if((Y[0]==="E"||Y[0]==="A"||Y[0]==="I")&&Y[1]){let X=mN(Y);if(X)Q.push({tagName:Y[0],pointer:X});continue}if((Y[0]==="e"||Y[0]==="a"||Y[0]==="i")&&Y[1]){let X=mN(Y);if(X)J.push({tagName:Y[0],pointer:X});continue}if(Y[0]==="K"){$.rootKind=WN(Y[1]);continue}if(Y[0]==="k"){$.replyKind=WN(Y[1]);continue}if(Y[0]==="q"){let X=YI(Y);if(X)$.quotes.push(X);continue}if((Y[0]==="P"||Y[0]==="p")&&Y[1]&&q0(Y[1]))$.profiles.push({pubkey:Y[1],relays:Y[2]?[Y[2]]:[]})}return $.root=GN(Q),$.reply=GN(J),Km($.root,$.profiles),Km($.reply,$.profiles),$.quotes.forEach((Y)=>Km(Y,$.profiles)),$}var WI={};Sc(WI,{finishReactionEvent:()=>mI,getReactedEventPointer:()=>GI});function mI(c,$,Q){let J=$.tags.filter((Y)=>Y.length>=2&&(Y[0]==="e"||Y[0]==="p"));return A0({...c,kind:_m,tags:[...c.tags??[],...J,["e",$.id],["p",$.pubkey]],content:c.content??"+"},Q)}function GI(c){if(c.kind!==_m)return;let $,Q;for(let J=c.tags.length-1;J>=0&&($===void 0||Q===void 0);J--){let Y=c.tags[J];if(Y.length>=2){if(Y[0]==="e"&&$===void 0)$=Y;else if(Y[0]==="p"&&Q===void 0)Q=Y}}if($===void 0||Q===void 0)return;return{id:$[1],relays:[$[2],Q[2]].filter((J)=>J!==void 0),author:Q[1]}}var zI={};Sc(zI,{parse:()=>qI});var Dm=/\W/m,zN=/[^\w\/] |[^\w\/]$|$|,| /m,xI=42;function*qI(c){let $=[];if(typeof c!=="string"){for(let X=0;X<c.tags.length;X++){let W=c.tags[X];if(W[0]==="emoji"&&W.length>=3)$.push({type:"emoji",shortcode:W[1],url:W[2]})}c=c.content}let Q=c.length,J=0,Y=0;c:while(Y<Q){let X=c.indexOf(":",Y),W=c.indexOf("#",Y);if(X===-1&&W===-1)break c;if(X===-1||W>=0&&W<X){if(W===0||c[W-1].match(Dm)){let m=c.slice(W+1,W+xI).match(Dm),G=m?W+1+m.index:Q;yield{type:"text",text:c.slice(J,W)},yield{type:"hashtag",value:c.slice(W+1,G)},Y=G,J=Y;continue c}Y=W+1;continue c}if(c.slice(X-5,X)==="nostr"){let m=c.slice(X+60).match(Dm),G=m?X+60+m.index:Q;try{let z,{data:x,type:q}=NX(c.slice(X+1,G));switch(q){case"npub":z={pubkey:x};break;case"note":z={id:x};break;case"nsec":Y=G+1;continue;default:z=x}if(J!==X-5)yield{type:"text",text:c.slice(J,X-5)};yield{type:"reference",pointer:z},Y=G,J=Y;continue c}catch(z){Y=X+1;continue c}}else if(c.slice(X-5,X)==="https"||c.slice(X-4,X)==="http"){let m=c.slice(X+4).match(zN),G=m?X+4+m.index:Q,z=c[X-1]==="s"?5:4;try{let x=new URL(c.slice(X-z,G));if(x.hostname.indexOf(".")===-1)throw Error("invalid url");if(J!==X-z)yield{type:"text",text:c.slice(J,X-z)};if(/\.(png|jpe?g|gif|webp|heic|svg)$/i.test(x.pathname)){yield{type:"image",url:x.toString()},Y=G,J=Y;continue c}if(/\.(mp4|avi|webm|mkv|mov)$/i.test(x.pathname)){yield{type:"video",url:x.toString()},Y=G,J=Y;continue c}if(/\.(mp3|aac|ogg|opus|wav|flac)$/i.test(x.pathname)){yield{type:"audio",url:x.toString()},Y=G,J=Y;continue c}yield{type:"url",url:x.toString()},Y=G,J=Y;continue c}catch(x){Y=G+1;continue c}}else if(c.slice(X-3,X)==="wss"||c.slice(X-2,X)==="ws"){let m=c.slice(X+4).match(zN),G=m?X+4+m.index:Q,z=c[X-1]==="s"?3:2;try{let x=new URL(c.slice(X-z,G));if(x.hostname.indexOf(".")===-1)throw Error("invalid ws url");if(J!==X-z)yield{type:"text",text:c.slice(J,X-z)};yield{type:"relay",url:x.toString()},Y=G,J=Y;continue c}catch(x){Y=G+1;continue c}}else{for(let m=0;m<$.length;m++){let G=$[m];if(c[X+G.shortcode.length+1]===":"&&c.slice(X+1,X+G.shortcode.length+1)===G.shortcode){if(J!==X)yield{type:"text",text:c.slice(J,X)};yield G,Y=X+G.shortcode.length+2,J=Y;continue c}}Y=X+1;continue c}}if(J!==Q)yield{type:"text",text:c.slice(J)}}var MI={};Sc(MI,{channelCreateEvent:()=>NI,channelHideMessageEvent:()=>iI,channelMessageEvent:()=>wI,channelMetadataEvent:()=>VI,channelMuteUserEvent:()=>vI});var NI=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:iN,tags:[...c.tags??[]],content:Q,created_at:c.created_at},$)},VI=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:vN,tags:[["e",c.channel_create_event_id],...c.tags??[]],content:Q,created_at:c.created_at},$)},wI=(c,$)=>{let Q=[["e",c.channel_create_event_id,c.relay_url,"root"]];if(c.reply_to_channel_message_event_id)Q.push(["e",c.reply_to_channel_message_event_id,c.relay_url,"reply"]);return A0({kind:UN,tags:[...Q,...c.tags??[]],content:c.content,created_at:c.created_at},$)},iI=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:jN,tags:[["e",c.channel_message_event_id],...c.tags??[]],content:Q,created_at:c.created_at},$)},vI=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:KN,tags:[["p",c.pubkey_to_mute],...c.tags??[]],content:Q,created_at:c.created_at},$)},UI={};Sc(UI,{EMOJI_SHORTCODE_REGEX:()=>oN,matchAll:()=>jI,regex:()=>hm,replaceAll:()=>KI});var oN=/:(\w+):/,hm=()=>new RegExp(`\\B${oN.source}\\B`,"g");function*jI(c){let $=c.matchAll(hm());for(let Q of $)try{let[J,Y]=Q;yield{shortcode:J,name:Y,start:Q.index,end:Q.index+J.length}}catch(J){}}function KI(c,$){return c.replaceAll(hm(),(Q,J)=>{return $({shortcode:Q,name:J})})}var DI={};Sc(DI,{useFetchImplementation:()=>BI,validateGithub:()=>HI});var ym;try{ym=fetch}catch{}function BI(c){ym=c}async function HI(c,$,Q){try{return await(await ym(`https://gist.github.com/${$}/${Q}/raw`)).text()===`Verifying that I control the following Nostr public key: ${c}`}catch(J){return!1}}var OI={};Sc(OI,{makeNwcRequestEvent:()=>pI,parseConnectionString:()=>RI});function RI(c){let{host:$,pathname:Q,searchParams:J}=new URL(c),Y=Q||$,X=J.getAll("relay"),W=J.get("secret");if(!Y||X.length===0||!W)throw Error("invalid connection string");return{pubkey:Y,relay:X[0],relays:X,secret:W}}async function pI(c,$,Q){let Y=ZN($,c,JSON.stringify({method:"pay_invoice",params:{invoice:Q}})),X={kind:HN,created_at:Math.round(Date.now()/1000),content:Y,tags:[["p",c]]};return A0(X,$)}var II={};Sc(II,{normalizeIdentifier:()=>ZI});function ZI(c){return c=c.trim().toLowerCase(),c=c.normalize("NFKC"),Array.from(c).map(($)=>{if(/\p{Letter}/u.test($)||/\p{Number}/u.test($))return $;return"-"}).join("")}var LI={};Sc(LI,{getSatoshisAmountFromBolt11:()=>EI,getZapEndpoint:()=>SI,makeZapReceipt:()=>PI,makeZapRequest:()=>AI,useFetchImplementation:()=>_I,validateZapRequest:()=>CI});var om;try{om=fetch}catch{}function _I(c){om=c}async function SI(c){try{let $="",{lud06:Q,lud16:J}=JSON.parse(c.content);if(J){let[W,m]=J.split("@");$=new URL(`/.well-known/lnurlp/${W}`,`https://${m}`).toString()}else if(Q){let{words:W}=T8.decode(Q,1000),m=T8.fromWords(W);$=i8.decode(m)}else return null;let X=await(await om($)).json();if(X.allowsNostr&&X.nostrPubkey)return X.callback}catch($){}return null}function AI(c){let $={kind:9734,created_at:Math.round(Date.now()/1000),content:c.comment||"",tags:[["p","pubkey"in c?c.pubkey:c.event.pubkey],["amount",c.amount.toString()],["relays",...c.relays]]};if("event"in c){if($.tags.push(["e",c.event.id]),Im(c.event.kind)){let Q=["a",`${c.event.kind}:${c.event.pubkey}:`];$.tags.push(Q)}else if(Zm(c.event.kind)){let Q=c.event.tags.find(([Y,X])=>Y==="d"&&X);if(!Q)throw Error("d tag not found or is empty");let J=["a",`${c.event.kind}:${c.event.pubkey}:${Q[1]}`];$.tags.push(J)}$.tags.push(["k",c.event.kind.toString()])}return $}function CI(c){let $;try{$=JSON.parse(c)}catch(X){return"Invalid zap request JSON."}if(!pm($))return"Zap request is not a valid Nostr event.";if(!RJ($))return"Invalid signature on zap request.";let Q=$.tags.find(([X,W])=>X==="p"&&W);if(!Q)return"Zap request doesn't have a 'p' tag.";if(!q0(Q[1]))return"Zap request 'p' tag is not valid hex.";let J=$.tags.find(([X,W])=>X==="e"&&W);if(J&&!q0(J[1]))return"Zap request 'e' tag is not valid hex.";if(!$.tags.find(([X,W])=>X==="relays"&&W))return"Zap request doesn't have a 'relays' tag.";return null}function PI({zapRequest:c,preimage:$,bolt11:Q,paidAt:J}){let Y=JSON.parse(c),X=Y.tags.filter(([m])=>m==="e"||m==="p"||m==="a"),W={kind:9735,created_at:Math.round(J.getTime()/1000),content:"",tags:[...X,["P",Y.pubkey],["bolt11",Q],["description",c]]};if($)W.tags.push(["preimage",$]);return W}function EI(c){if(c.length<50)return 0;c=c.substring(0,50);let $=c.lastIndexOf("1");if($===-1)return 0;let Q=c.substring(0,$);if(!Q.startsWith("lnbc"))return 0;let J=Q.substring(4);if(J.length<1)return 0;let Y=J[J.length-1],X=Y.charCodeAt(0)-48,W=X>=0&&X<=9,m=J.length-1;if(W)m++;if(m<1)return 0;let G=parseInt(J.substring(0,m));switch(Y){case"m":return G*1e5;case"u":return G*100;case"n":return G/10;case"p":return G/1e4;default:return G*1e8}}var bI={};Sc(bI,{Negentropy:()=>dN,NegentropyStorageVector:()=>fI,NegentropySync:()=>nI});var Bm=97,VQ=32,gN=16,i$={Skip:0,Fingerprint:1,IdList:2},w8=class{_raw;length;constructor(c){if(typeof c==="number")this._raw=new Uint8Array(c),this.length=0;else if(c instanceof Uint8Array)this._raw=new Uint8Array(c),this.length=c.length;else this._raw=new Uint8Array(512),this.length=0}unwrap(){return this._raw.subarray(0,this.length)}get capacity(){return this._raw.byteLength}extend(c){if(c instanceof w8)c=c.unwrap();if(typeof c.length!=="number")throw Error("bad length");let $=c.length+this.length;if(this.capacity<$){let Q=this._raw,J=Math.max(this.capacity*2,$);this._raw=new Uint8Array(J),this._raw.set(Q)}this._raw.set(c,this.length),this.length+=c.length}shift(){let c=this._raw[0];return this._raw=this._raw.subarray(1),this.length--,c}shiftN(c=1){let $=this._raw.subarray(0,c);return this._raw=this._raw.subarray(c),this.length-=c,$}};function WX(c){let $=0;while(!0){if(c.length===0)throw Error("parse ends prematurely");let Q=c.shift();if($=$<<7|Q&127,(Q&128)===0)break}return $}function V8(c){if(c===0)return new w8(new Uint8Array([0]));let $=[];while(c!==0)$.push(c&127),c>>>=7;$.reverse();for(let Q=0;Q<$.length-1;Q++)$[Q]|=128;return new w8(new Uint8Array($))}function FI(c){return GX(c,1)[0]}function GX(c,$){if(c.length<$)throw Error("parse ends prematurely");return c.shiftN($)}var TI=class{buf;constructor(){this.setToZero()}setToZero(){this.buf=new Uint8Array(VQ)}add(c){let $=0,Q=0,J=new DataView(this.buf.buffer),Y=new DataView(c.buffer);for(let X=0;X<8;X++){let W=X*4,m=J.getUint32(W,!0),G=Y.getUint32(W,!0),z=m;if(z+=$,z+=G,z>4294967295)Q=1;J.setUint32(W,z&4294967295,!0),$=Q,Q=0}}negate(){let c=new DataView(this.buf.buffer);for(let Q=0;Q<8;Q++){let J=Q*4;c.setUint32(J,~c.getUint32(J,!0))}let $=new Uint8Array(VQ);$[0]=1,this.add($)}getFingerprint(c){let $=new w8;return $.extend(this.buf),$.extend(V8(c)),Q0($.unwrap()).subarray(0,gN)}},fI=class{items;sealed;constructor(){this.items=[],this.sealed=!1}insert(c,$){if(this.sealed)throw Error("already sealed");let Q=Rc($);if(Q.byteLength!==VQ)throw Error("bad id size for added item");this.items.push({timestamp:c,id:Q})}seal(){if(this.sealed)throw Error("already sealed");this.sealed=!0,this.items.sort(Hm);for(let c=1;c<this.items.length;c++)if(Hm(this.items[c-1],this.items[c])===0)throw Error("duplicate item inserted")}unseal(){this.sealed=!1}size(){return this._checkSealed(),this.items.length}getItem(c){if(this._checkSealed(),c>=this.items.length)throw Error("out of range");return this.items[c]}iterate(c,$,Q){this._checkSealed(),this._checkBounds(c,$);for(let J=c;J<$;++J)if(!Q(this.items[J],J))break}findLowerBound(c,$,Q){return this._checkSealed(),this._checkBounds(c,$),this._binarySearch(this.items,c,$,(J)=>Hm(J,Q)<0)}fingerprint(c,$){let Q=new TI;return Q.setToZero(),this.iterate(c,$,(J)=>{return Q.add(J.id),!0}),Q.getFingerprint($-c)}_checkSealed(){if(!this.sealed)throw Error("not sealed")}_checkBounds(c,$){if(c>$||$>this.items.length)throw Error("bad range")}_binarySearch(c,$,Q,J){let Y=Q-$;while(Y>0){let X=$,W=Math.floor(Y/2);if(X+=W,J(c[X]))$=++X,Y-=W+1;else Y=W}return $}},dN=class{storage;frameSizeLimit;lastTimestampIn;lastTimestampOut;constructor(c,$=60000){if($<4096)throw Error("frameSizeLimit too small");this.storage=c,this.frameSizeLimit=$,this.lastTimestampIn=0,this.lastTimestampOut=0}_bound(c,$){return{timestamp:c,id:$||new Uint8Array(0)}}initiate(){let c=new w8;return c.extend(new Uint8Array([Bm])),this.splitRange(0,this.storage.size(),this._bound(Number.MAX_VALUE),c),Hc(c.unwrap())}reconcile(c,$,Q){let J=new w8(Rc(c));this.lastTimestampIn=this.lastTimestampOut=0;let Y=new w8;Y.extend(new Uint8Array([Bm]));let X=FI(J);if(X<96||X>111)throw Error("invalid negentropy protocol version byte");if(X!==Bm)throw Error("unsupported negentropy protocol version requested: "+(X-96));let W=this.storage.size(),m=this._bound(0),G=0,z=!1;while(J.length!==0){let x=new w8,q=()=>{if(z)z=!1,x.extend(this.encodeBound(m)),x.extend(V8(i$.Skip))},M=this.decodeBound(J),N=WX(J),w=G,U=this.storage.findLowerBound(G,W,M);if(N===i$.Skip)z=!0;else if(N===i$.Fingerprint){let v=GX(J,gN),i=this.storage.fingerprint(w,U);if(sN(v,i)!==0)q(),this.splitRange(w,U,M,x);else z=!0}else if(N===i$.IdList){let v=WX(J),i={};for(let j=0;j<v;j++){let D=GX(J,VQ);i[Hc(D)]=D}if(z=!0,this.storage.iterate(w,U,(j)=>{let D=j.id,_=Hc(D);if(!i[_])$?.(_);else delete i[Hc(D)];return!0}),Q)for(let j of Object.values(i))Q(Hc(j))}else throw Error("unexpected mode");if(this.exceededFrameSizeLimit(Y.length+x.length)){let v=this.storage.fingerprint(U,W);Y.extend(this.encodeBound(this._bound(Number.MAX_VALUE))),Y.extend(V8(i$.Fingerprint)),Y.extend(v);break}else Y.extend(x);G=U,m=M}return Y.length===1?null:Hc(Y.unwrap())}splitRange(c,$,Q,J){let Y=$-c,X=16;if(Y<X*2)J.extend(this.encodeBound(Q)),J.extend(V8(i$.IdList)),J.extend(V8(Y)),this.storage.iterate(c,$,(W)=>{return J.extend(W.id),!0});else{let W=Math.floor(Y/X),m=Y%X,G=c;for(let z=0;z<X;z++){let x=W+(z<m?1:0),q=this.storage.fingerprint(G,G+x);G+=x;let M;if(G===$)M=Q;else{let N,w;this.storage.iterate(G-1,G+1,(U,v)=>{if(v===G-1)N=U;else w=U;return!0}),M=this.getMinimalBound(N,w)}J.extend(this.encodeBound(M)),J.extend(V8(i$.Fingerprint)),J.extend(q)}}}exceededFrameSizeLimit(c){return c>this.frameSizeLimit-200}decodeTimestampIn(c){let $=WX(c);if($=$===0?Number.MAX_VALUE:$-1,this.lastTimestampIn===Number.MAX_VALUE||$===Number.MAX_VALUE)return this.lastTimestampIn=Number.MAX_VALUE,Number.MAX_VALUE;return $+=this.lastTimestampIn,this.lastTimestampIn=$,$}decodeBound(c){let $=this.decodeTimestampIn(c),Q=WX(c);if(Q>VQ)throw Error("bound key too long");let J=GX(c,Q);return{timestamp:$,id:J}}encodeTimestampOut(c){if(c===Number.MAX_VALUE)return this.lastTimestampOut=Number.MAX_VALUE,V8(0);let $=c;return c-=this.lastTimestampOut,this.lastTimestampOut=$,V8(c+1)}encodeBound(c){let $=new w8;return $.extend(this.encodeTimestampOut(c.timestamp)),$.extend(V8(c.id.length)),$.extend(c.id),$}getMinimalBound(c,$){if($.timestamp!==c.timestamp)return this._bound($.timestamp);else{let Q=0,J=$.id,Y=c.id;for(let X=0;X<VQ;X++){if(J[X]!==Y[X])break;Q++}return this._bound($.timestamp,$.id.subarray(0,Q+1))}}};function sN(c,$){for(let Q=0;Q<c.byteLength;Q++){if(c[Q]<$[Q])return-1;if(c[Q]>$[Q])return 1}if(c.byteLength>$.byteLength)return 1;if(c.byteLength<$.byteLength)return-1;return 0}function Hm(c,$){if(c.timestamp===$.timestamp)return sN(c.id,$.id);return c.timestamp-$.timestamp}var nI=class{relay;storage;neg;filter;subscription;onhave;onneed;constructor(c,$,Q,J={}){this.relay=c,this.storage=$,this.neg=new dN($),this.onhave=J.onhave,this.onneed=J.onneed,this.filter=Q,this.subscription=this.relay.prepareSubscription([{}],{label:J.label||"negentropy"}),this.subscription.oncustom=(Y)=>{switch(Y[0]){case"NEG-MSG":{if(Y.length<3)console.warn(`got invalid NEG-MSG from ${this.relay.url}: ${Y}`);try{let X=this.neg.reconcile(Y[2],this.onhave,this.onneed);if(X)this.relay.send(`["NEG-MSG", "${this.subscription.id}", "${X}"]`);else this.close(),J.onclose?.()}catch(X){console.error("negentropy reconcile error:",X),J?.onclose?.(`reconcile error: ${X}`)}break}case"NEG-CLOSE":{let X=Y[2];console.warn("negentropy error:",X),J.onclose?.(X);break}case"NEG-ERR":J.onclose?.()}}}async start(){let c=this.neg.initiate();this.relay.send(`["NEG-OPEN","${this.subscription.id}",${JSON.stringify(this.filter)},"${c}"]`)}close(){this.relay.send(`["NEG-CLOSE","${this.subscription.id}"]`),this.subscription.close()}},uI={};Sc(uI,{getToken:()=>kI,hashPayload:()=>gm,unpackEventFromToken:()=>tN,validateEvent:()=>YV,validateEventKind:()=>cV,validateEventMethodTag:()=>QV,validateEventPayloadTag:()=>JV,validateEventTimestamp:()=>eN,validateEventUrlTag:()=>$V,validateToken:()=>aI});var rN="Nostr ";async function kI(c,$,Q,J=!1,Y){let X={kind:Am,tags:[["u",c],["method",$]],created_at:Math.round(new Date().getTime()/1000),content:""};if(Y)X.tags.push(["payload",gm(Y)]);let W=await Q(X);return(J?rN:"")+L0.encode(S0.encode(JSON.stringify(W)))}async function aI(c,$,Q){let J=await tN(c).catch((X)=>{throw X});return await YV(J,$,Q).catch((X)=>{throw X})}async function tN(c){if(!c)throw Error("Missing token");c=c.replace(rN,"");let $=i8.decode(L0.decode(c));if(!$||$.length===0||!$.startsWith("{"))throw Error("Invalid token");return JSON.parse($)}function eN(c){if(!c.created_at)return!1;return Math.round(new Date().getTime()/1000)-c.created_at<60}function cV(c){return c.kind===Am}function $V(c,$){let Q=c.tags.find((J)=>J[0]==="u");if(!Q)return!1;return Q.length>0&&Q[1]===$}function QV(c,$){let Q=c.tags.find((J)=>J[0]==="method");if(!Q)return!1;return Q.length>0&&Q[1].toLowerCase()===$.toLowerCase()}function gm(c){let $=Q0(S0.encode(JSON.stringify(c)));return Hc($)}function JV(c,$){let Q=c.tags.find((Y)=>Y[0]==="payload");if(!Q)return!1;let J=gm($);return Q.length>0&&Q[1]===J}async function YV(c,$,Q,J){if(!RJ(c))throw Error("Invalid nostr event, signature invalid");if(!cV(c))throw Error("Invalid nostr event, kind invalid");if(!eN(c))throw Error("Invalid nostr event, created_at timestamp invalid");if(!$V(c,$))throw Error("Invalid nostr event, url tag invalid");if(!QV(c,Q))throw Error("Invalid nostr event, method tag invalid");if(Boolean(J)&&typeof J==="object"&&Object.keys(J).length>0){if(!JV(c,J))throw Error("Invalid nostr event, payload tag does not match request body hash")}return!0}function yI(c){let $=c.trim().toLowerCase().replace(/^0x/,"");if(!/^[0-9a-f]{64}$/.test($))throw Error("expected 64-char hex private key");let Q=new Uint8Array(32);for(let J=0;J<32;J++)Q[J]=parseInt($.slice(J*2,J*2+2),16);return Q}function pJ(c){let $=(c??"").trim();if(!$)throw Error("BUZZ_PRIVATE_KEY is empty");let Q;if($.startsWith("nsec")){let Y=MX.decode($);if(Y.type!=="nsec")throw Error("BUZZ_PRIVATE_KEY is not an nsec");Q=Y.data}else Q=yI($);let J=OJ(Q);return{secretKey:Q,pubkeyHex:J,npub:MX.npubEncode(J)}}function v8(c,$){return A0(c,$.secretKey)}function XV(c){return lI("sha256").update(c).digest("hex")}function WV(){return hI()}var oI=["/fig","@figura"];function mV(c){return c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function GV(c){return c.replace(/^[\s:,\-—]+/,"").trim()}function zV(c,$={}){let Q=(c??"").trim();if(!Q)return null;let J=$.triggers??oI,Y=null;for(let X of J){let m=new RegExp(`(?:^|\\s)${mV(X)}\\b`,"i").exec(Q);if(m){let G=m.index+m[0].length-X.length;if(!Y||G<Y.index)Y={index:G,end:m.index+m[0].length,via:"trigger"}}}if($.agentNpub){let W=new RegExp(`(?:nostr:)?${mV($.agentNpub)}`,"i").exec(Q);if(W&&(!Y||W.index<Y.index))Y={index:W.index,end:W.index+W[0].length,via:"npub"}}if(Y){let X=GV(Q.slice(Y.end));if(X)return{brief:X,via:Y.via};return null}if($.mentioned){let X=GV(Q);if(X)return{brief:X,via:"mention"}}return null}function gI(c){return c.replace(/^fig\s+/i,"").trim()}function xV(c){let $=(c??"").trim();if(!$)return null;let Q=/^(?:fig\s+this\s+and\s+file\s+it|file\s+(?:it|this)\s+and\s+fig(?:\s+it)?)\s*:?\s*(.+)$/is.exec($);if(Q){let X=Q[1].trim();if(X)return{kind:"fig-and-file",description:X}}let J=/^file\s+(?:an?\s+)?issue\s*:?\s*(.+)$/is.exec($);if(J){let X=J[1].trim();if(X)return{kind:"file-issue",title:X}}let Y=/^(?:fig\s+)?issue\s+#?(\d+)\b/i.exec($);if(Y)return{kind:"fig-issue",issue:Number(Y[1])};return{kind:"fig",brief:gI($)||$}}var qV=typeof process<"u"&&process.env?.FIGURA_APP_URL?.replace(/\/+$/,"")||"https://figura.so";function MV(c,$=qV){return`${($||qV).replace(/\/+$/,"")}/f/${c}`}function vX(c){let Q=[c.title?`Here's your fig: **${c.title}**`:"Here's your fig"];if(c.note)Q.push(c.note);return Q.push(""),Q.push(c.link),Q.join(`
|
|
530
|
-
`)}function wQ(c){return`Sorry — I couldn't make that fig. ${c}`}function
|
|
531
|
+
`)}`);if(Q.onWarn){let z=new Set;for(let x of m){let q=`${x.relayUrl} ${x.privateKey}`;if(z.has(q))Q.onWarn(`two bindings share the same relayUrl + privateKey (${z$(x)}) — is that intentional?`);z.add(q)}}return m}v0();import{createHash as sZ,randomUUID as rZ}from"node:crypto";/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function GJ(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function Z0(c,$=""){if(!Number.isSafeInteger(c)||c<0){let Q=$&&`"${$}" `;throw Error(`${Q}expected integer >= 0, got ${c}`)}}function vc(c,$,Q=""){let J=GJ(c),Y=c?.length,X=$!==void 0;if(!J||X&&Y!==$){let W=Q&&`"${Q}" `,m=X?` of length ${$}`:"",G=J?`length=${Y}`:`type=${typeof c}`;throw Error(W+"expected Uint8Array"+m+", got "+G)}return c}function x$(c){if(typeof c!=="function"||typeof c.create!=="function")throw Error("Hash must wrapped by utils.createHasher");Z0(c.outputLen),Z0(c.blockLen)}function WQ(c,$=!0){if(c.destroyed)throw Error("Hash instance has been destroyed");if($&&c.finished)throw Error("Hash#digest() has already been called")}function bq(c,$){vc(c,void 0,"digestInto() output");let Q=$.outputLen;if(c.length<Q)throw Error('"digestInto() output" expected to be of length >='+Q)}function h0(...c){for(let $=0;$<c.length;$++)c[$].fill(0)}function fY(c){return new DataView(c.buffer,c.byteOffset,c.byteLength)}function y0(c,$){return c<<32-$|c>>>$}var Fq=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),PD=Array.from({length:256},(c,$)=>$.toString(16).padStart(2,"0"));function Hc(c){if(vc(c),Fq)return c.toHex();let $="";for(let Q=0;Q<c.length;Q++)$+=PD[c[Q]];return $}var x8={_0:48,_9:57,A:65,F:70,a:97,f:102};function Eq(c){if(c>=x8._0&&c<=x8._9)return c-x8._0;if(c>=x8.A&&c<=x8.F)return c-(x8.A-10);if(c>=x8.a&&c<=x8.f)return c-(x8.a-10);return}function Rc(c){if(typeof c!=="string")throw Error("hex string expected, got "+typeof c);if(Fq)return Uint8Array.fromHex(c);let $=c.length,Q=$/2;if($%2)throw Error("hex string expected, got unpadded hex of length "+$);let J=new Uint8Array(Q);for(let Y=0,X=0;Y<Q;Y++,X+=2){let W=Eq(c.charCodeAt(X)),m=Eq(c.charCodeAt(X+1));if(W===void 0||m===void 0){let G=c[X]+c[X+1];throw Error('hex string expected, got non-hex character "'+G+'" at index '+X)}J[Y]=W*16+m}return J}function Fc(...c){let $=0;for(let J=0;J<c.length;J++){let Y=c[J];vc(Y),$+=Y.length}let Q=new Uint8Array($);for(let J=0,Y=0;J<c.length;J++){let X=c[J];Q.set(X,Y),Y+=X.length}return Q}function Tq(c,$={}){let Q=(Y,X)=>c(X).update(Y).digest(),J=c(void 0);return Q.outputLen=J.outputLen,Q.blockLen=J.blockLen,Q.create=(Y)=>c(Y),Object.assign(Q,$),Object.freeze(Q)}function o0(c=32){let $=typeof globalThis==="object"?globalThis.crypto:null;if(typeof $?.getRandomValues!=="function")throw Error("crypto.getRandomValues must be defined");return $.getRandomValues(new Uint8Array(c))}var fq=(c)=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,c])});function nq(c,$,Q){return c&$^~c&Q}function uq(c,$,Q){return c&$^c&Q^$&Q}class nY{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(c,$,Q,J){this.blockLen=c,this.outputLen=$,this.padOffset=Q,this.isLE=J,this.buffer=new Uint8Array(c),this.view=fY(this.buffer)}update(c){WQ(this),vc(c);let{view:$,buffer:Q,blockLen:J}=this,Y=c.length;for(let X=0;X<Y;){let W=Math.min(J-this.pos,Y-X);if(W===J){let m=fY(c);for(;J<=Y-X;X+=J)this.process(m,X);continue}if(Q.set(c.subarray(X,X+W),this.pos),this.pos+=W,X+=W,this.pos===J)this.process($,0),this.pos=0}return this.length+=c.length,this.roundClean(),this}digestInto(c){WQ(this),bq(c,this),this.finished=!0;let{buffer:$,view:Q,blockLen:J,isLE:Y}=this,{pos:X}=this;if($[X++]=128,h0(this.buffer.subarray(X)),this.padOffset>J-X)this.process(Q,0),X=0;for(let x=X;x<J;x++)$[x]=0;Q.setBigUint64(J-8,BigInt(this.length*8),Y),this.process(Q,0);let W=fY(c),m=this.outputLen;if(m%4)throw Error("_sha2: outputLen must be aligned to 32bit");let G=m/4,z=this.get();if(G>z.length)throw Error("_sha2: outputLen bigger than state");for(let x=0;x<G;x++)W.setUint32(4*x,z[x],Y)}digest(){let{buffer:c,outputLen:$}=this;this.digestInto(c);let Q=c.slice(0,$);return this.destroy(),Q}_cloneInto(c){c||=new this.constructor,c.set(...this.get());let{blockLen:$,buffer:Q,length:J,finished:Y,destroyed:X,pos:W}=this;if(c.destroyed=X,c.finished=Y,c.length=J,c.pos=W,J%$)c.buffer.set(Q);return c}clone(){return this._cloneInto()}}var q8=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),M8=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),gc=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),dc=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);var uY=BigInt(4294967295),kq=BigInt(32);function ED(c,$=!1){if($)return{h:Number(c&uY),l:Number(c>>kq&uY)};return{h:Number(c>>kq&uY)|0,l:Number(c&uY)|0}}function aq(c,$=!1){let Q=c.length,J=new Uint32Array(Q),Y=new Uint32Array(Q);for(let X=0;X<Q;X++){let{h:W,l:m}=ED(c[X],$);[J[X],Y[X]]=[W,m]}return[J,Y]}var SW=(c,$,Q)=>c>>>Q,AW=(c,$,Q)=>c<<32-Q|$>>>Q,q$=(c,$,Q)=>c>>>Q|$<<32-Q,M$=(c,$,Q)=>c<<32-Q|$>>>Q,zJ=(c,$,Q)=>c<<64-Q|$>>>Q-32,xJ=(c,$,Q)=>c>>>Q-32|$<<64-Q;function e0(c,$,Q,J){let Y=($>>>0)+(J>>>0);return{h:c+Q+(Y/4294967296|0)|0,l:Y|0}}var lq=(c,$,Q)=>(c>>>0)+($>>>0)+(Q>>>0),hq=(c,$,Q,J)=>$+Q+J+(c/4294967296|0)|0,yq=(c,$,Q,J)=>(c>>>0)+($>>>0)+(Q>>>0)+(J>>>0),oq=(c,$,Q,J,Y)=>$+Q+J+Y+(c/4294967296|0)|0,gq=(c,$,Q,J,Y)=>(c>>>0)+($>>>0)+(Q>>>0)+(J>>>0)+(Y>>>0),dq=(c,$,Q,J,Y,X)=>$+Q+J+Y+X+(c/4294967296|0)|0;var FD=Uint32Array.from([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]),S8=new Uint32Array(64);class CW extends nY{constructor(c){super(64,c,8,!1)}get(){let{A:c,B:$,C:Q,D:J,E:Y,F:X,G:W,H:m}=this;return[c,$,Q,J,Y,X,W,m]}set(c,$,Q,J,Y,X,W,m){this.A=c|0,this.B=$|0,this.C=Q|0,this.D=J|0,this.E=Y|0,this.F=X|0,this.G=W|0,this.H=m|0}process(c,$){for(let x=0;x<16;x++,$+=4)S8[x]=c.getUint32($,!1);for(let x=16;x<64;x++){let q=S8[x-15],M=S8[x-2],N=y0(q,7)^y0(q,18)^q>>>3,w=y0(M,17)^y0(M,19)^M>>>10;S8[x]=w+S8[x-7]+N+S8[x-16]|0}let{A:Q,B:J,C:Y,D:X,E:W,F:m,G,H:z}=this;for(let x=0;x<64;x++){let q=y0(W,6)^y0(W,11)^y0(W,25),M=z+q+nq(W,m,G)+FD[x]+S8[x]|0,w=(y0(Q,2)^y0(Q,13)^y0(Q,22))+uq(Q,J,Y)|0;z=G,G=m,m=W,W=X+M|0,X=Y,Y=J,J=Q,Q=M+w|0}Q=Q+this.A|0,J=J+this.B|0,Y=Y+this.C|0,X=X+this.D|0,W=W+this.E|0,m=m+this.F|0,G=G+this.G|0,z=z+this.H|0,this.set(Q,J,Y,X,W,m,G,z)}roundClean(){h0(S8)}destroy(){this.set(0,0,0,0,0,0,0,0),h0(this.buffer)}}class sq extends CW{A=q8[0]|0;B=q8[1]|0;C=q8[2]|0;D=q8[3]|0;E=q8[4]|0;F=q8[5]|0;G=q8[6]|0;H=q8[7]|0;constructor(){super(32)}}class TD extends CW{A=M8[0]|0;B=M8[1]|0;C=M8[2]|0;D=M8[3]|0;E=M8[4]|0;F=M8[5]|0;G=M8[6]|0;H=M8[7]|0;constructor(){super(28)}}var rq=(()=>aq(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((c)=>BigInt(c))))(),fD=(()=>rq[0])(),nD=(()=>rq[1])(),A8=new Uint32Array(80),C8=new Uint32Array(80);class qJ extends nY{constructor(c){super(128,c,16,!1)}get(){let{Ah:c,Al:$,Bh:Q,Bl:J,Ch:Y,Cl:X,Dh:W,Dl:m,Eh:G,El:z,Fh:x,Fl:q,Gh:M,Gl:N,Hh:w,Hl:U}=this;return[c,$,Q,J,Y,X,W,m,G,z,x,q,M,N,w,U]}set(c,$,Q,J,Y,X,W,m,G,z,x,q,M,N,w,U){this.Ah=c|0,this.Al=$|0,this.Bh=Q|0,this.Bl=J|0,this.Ch=Y|0,this.Cl=X|0,this.Dh=W|0,this.Dl=m|0,this.Eh=G|0,this.El=z|0,this.Fh=x|0,this.Fl=q|0,this.Gh=M|0,this.Gl=N|0,this.Hh=w|0,this.Hl=U|0}process(c,$){for(let j=0;j<16;j++,$+=4)A8[j]=c.getUint32($),C8[j]=c.getUint32($+=4);for(let j=16;j<80;j++){let D=A8[j-15]|0,_=C8[j-15]|0,mc=q$(D,_,1)^q$(D,_,8)^SW(D,_,7),d=M$(D,_,1)^M$(D,_,8)^AW(D,_,7),Jc=A8[j-2]|0,u=C8[j-2]|0,a=q$(Jc,u,19)^zJ(Jc,u,61)^SW(Jc,u,6),Xc=M$(Jc,u,19)^xJ(Jc,u,61)^AW(Jc,u,6),e=yq(d,Xc,C8[j-7],C8[j-16]),B=oq(e,mc,a,A8[j-7],A8[j-16]);A8[j]=B|0,C8[j]=e|0}let{Ah:Q,Al:J,Bh:Y,Bl:X,Ch:W,Cl:m,Dh:G,Dl:z,Eh:x,El:q,Fh:M,Fl:N,Gh:w,Gl:U,Hh:v,Hl:i}=this;for(let j=0;j<80;j++){let D=q$(x,q,14)^q$(x,q,18)^zJ(x,q,41),_=M$(x,q,14)^M$(x,q,18)^xJ(x,q,41),mc=x&M^~x&w,d=q&N^~q&U,Jc=gq(i,_,d,nD[j],C8[j]),u=dq(Jc,v,D,mc,fD[j],A8[j]),a=Jc|0,Xc=q$(Q,J,28)^zJ(Q,J,34)^zJ(Q,J,39),e=M$(Q,J,28)^xJ(Q,J,34)^xJ(Q,J,39),B=Q&Y^Q&W^Y&W,C=J&X^J&m^X&m;v=w|0,i=U|0,w=M|0,U=N|0,M=x|0,N=q|0,{h:x,l:q}=e0(G|0,z|0,u|0,a|0),G=W|0,z=m|0,W=Y|0,m=X|0,Y=Q|0,X=J|0;let K=lq(a,e,C);Q=hq(K,u,Xc,B),J=K|0}({h:Q,l:J}=e0(this.Ah|0,this.Al|0,Q|0,J|0)),{h:Y,l:X}=e0(this.Bh|0,this.Bl|0,Y|0,X|0),{h:W,l:m}=e0(this.Ch|0,this.Cl|0,W|0,m|0),{h:G,l:z}=e0(this.Dh|0,this.Dl|0,G|0,z|0),{h:x,l:q}=e0(this.Eh|0,this.El|0,x|0,q|0),{h:M,l:N}=e0(this.Fh|0,this.Fl|0,M|0,N|0),{h:w,l:U}=e0(this.Gh|0,this.Gl|0,w|0,U|0),{h:v,l:i}=e0(this.Hh|0,this.Hl|0,v|0,i|0),this.set(Q,J,Y,X,W,m,G,z,x,q,M,N,w,U,v,i)}roundClean(){h0(A8,C8)}destroy(){h0(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class uD extends qJ{Ah=dc[0]|0;Al=dc[1]|0;Bh=dc[2]|0;Bl=dc[3]|0;Ch=dc[4]|0;Cl=dc[5]|0;Dh=dc[6]|0;Dl=dc[7]|0;Eh=dc[8]|0;El=dc[9]|0;Fh=dc[10]|0;Fl=dc[11]|0;Gh=dc[12]|0;Gl=dc[13]|0;Hh=dc[14]|0;Hl=dc[15]|0;constructor(){super(64)}}class kD extends qJ{Ah=gc[0]|0;Al=gc[1]|0;Bh=gc[2]|0;Bl=gc[3]|0;Ch=gc[4]|0;Cl=gc[5]|0;Dh=gc[6]|0;Dl=gc[7]|0;Eh=gc[8]|0;El=gc[9]|0;Fh=gc[10]|0;Fl=gc[11]|0;Gh=gc[12]|0;Gl=gc[13]|0;Hh=gc[14]|0;Hl=gc[15]|0;constructor(){super(48)}}var c0=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),$0=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class aD extends qJ{Ah=c0[0]|0;Al=c0[1]|0;Bh=c0[2]|0;Bl=c0[3]|0;Ch=c0[4]|0;Cl=c0[5]|0;Dh=c0[6]|0;Dl=c0[7]|0;Eh=c0[8]|0;El=c0[9]|0;Fh=c0[10]|0;Fl=c0[11]|0;Gh=c0[12]|0;Gl=c0[13]|0;Hh=c0[14]|0;Hl=c0[15]|0;constructor(){super(28)}}class lD extends qJ{Ah=$0[0]|0;Al=$0[1]|0;Bh=$0[2]|0;Bl=$0[3]|0;Ch=$0[4]|0;Cl=$0[5]|0;Dh=$0[6]|0;Dl=$0[7]|0;Eh=$0[8]|0;El=$0[9]|0;Fh=$0[10]|0;Fl=$0[11]|0;Gh=$0[12]|0;Gl=$0[13]|0;Hh=$0[14]|0;Hl=$0[15]|0;constructor(){super(32)}}var Q0=Tq(()=>new sq,fq(1));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var EW=BigInt(0),PW=BigInt(1);function MJ(c,$=""){if(typeof c!=="boolean"){let Q=$&&`"${$}" `;throw Error(Q+"expected boolean, got type="+typeof c)}return c}function tq(c){if(typeof c==="bigint"){if(!kY(c))throw Error("positive bigint expected, got "+c)}else Z0(c);return c}function NJ(c){let $=tq(c).toString(16);return $.length&1?"0"+$:$}function eq(c){if(typeof c!=="string")throw Error("hex string expected, got "+typeof c);return c===""?EW:BigInt("0x"+c)}function P8(c){return eq(Hc(c))}function bW(c){return eq(Hc(hD(vc(c)).reverse()))}function aY(c,$){Z0($),c=tq(c);let Q=Rc(c.toString(16).padStart($*2,"0"));if(Q.length!==$)throw Error("number too large");return Q}function FW(c,$){return aY(c,$).reverse()}function hD(c){return Uint8Array.from(c)}function cM(c){return Uint8Array.from(c,($,Q)=>{let J=$.charCodeAt(0);if($.length!==1||J>127)throw Error(`string contains non-ASCII character "${c[Q]}" with code ${J} at position ${Q}`);return J})}var kY=(c)=>typeof c==="bigint"&&EW<=c;function yD(c,$,Q){return kY(c)&&kY($)&&kY(Q)&&$<=c&&c<Q}function $M(c,$,Q,J){if(!yD($,Q,J))throw Error("expected valid "+c+": "+Q+" <= n < "+J+", got "+$)}function TW(c){let $;for($=0;c>EW;c>>=PW,$+=1);return $}var VJ=(c)=>(PW<<BigInt(c))-PW;function QM(c,$,Q){if(Z0(c,"hashLen"),Z0($,"qByteLen"),typeof Q!=="function")throw Error("hmacFn must be a function");let J=(v)=>new Uint8Array(v),Y=Uint8Array.of(),X=Uint8Array.of(0),W=Uint8Array.of(1),m=1000,G=J(c),z=J(c),x=0,q=()=>{G.fill(1),z.fill(0),x=0},M=(...v)=>Q(z,Fc(G,...v)),N=(v=Y)=>{if(z=M(X,v),G=M(),v.length===0)return;z=M(W,v),G=M()},w=()=>{if(x++>=m)throw Error("drbg: tried max amount of iterations");let v=0,i=[];while(v<$){G=M();let j=G.slice();i.push(j),v+=G.length}return Fc(...i)};return(v,i)=>{q(),N(v);let j=void 0;while(!(j=i(w())))N();return q(),j}}function wJ(c,$={},Q={}){if(!c||typeof c!=="object")throw Error("expected valid options object");function J(X,W,m){let G=c[X];if(m&&G===void 0)return;let z=typeof G;if(z!==W||G===null)throw Error(`param "${X}" is invalid: expected ${W}, got ${z}`)}let Y=(X,W)=>Object.entries(X).forEach(([m,G])=>J(m,G,W));Y($,!1),Y(Q,!0)}function fW(c){let $=new WeakMap;return(Q,...J)=>{let Y=$.get(Q);if(Y!==void 0)return Y;let X=c(Q,...J);return $.set(Q,X),X}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var m0=BigInt(0),J0=BigInt(1),N$=BigInt(2),XM=BigInt(3),WM=BigInt(4),mM=BigInt(5),oD=BigInt(7),GM=BigInt(8),gD=BigInt(9),zM=BigInt(16);function g0(c,$){let Q=c%$;return Q>=m0?Q:$+Q}function j0(c,$,Q){let J=c;while($-- >m0)J*=J,J%=Q;return J}function JM(c,$){if(c===m0)throw Error("invert: expected non-zero number");if($<=m0)throw Error("invert: expected positive modulus, got "+$);let Q=g0(c,$),J=$,Y=m0,X=J0,W=J0,m=m0;while(Q!==m0){let z=J/Q,x=J%Q,q=Y-W*z,M=X-m*z;J=Q,Q=x,Y=W,X=m,W=q,m=M}if(J!==J0)throw Error("invert: does not exist");return g0(Y,$)}function nW(c,$,Q){if(!c.eql(c.sqr($),Q))throw Error("Cannot find square root")}function xM(c,$){let Q=(c.ORDER+J0)/WM,J=c.pow($,Q);return nW(c,J,$),J}function dD(c,$){let Q=(c.ORDER-mM)/GM,J=c.mul($,N$),Y=c.pow(J,Q),X=c.mul($,Y),W=c.mul(c.mul(X,N$),Y),m=c.mul(X,c.sub(W,c.ONE));return nW(c,m,$),m}function sD(c){let $=mQ(c),Q=qM(c),J=Q($,$.neg($.ONE)),Y=Q($,J),X=Q($,$.neg(J)),W=(c+oD)/zM;return(m,G)=>{let z=m.pow(G,W),x=m.mul(z,J),q=m.mul(z,Y),M=m.mul(z,X),N=m.eql(m.sqr(x),G),w=m.eql(m.sqr(q),G);z=m.cmov(z,x,N),x=m.cmov(M,q,w);let U=m.eql(m.sqr(x),G),v=m.cmov(z,x,U);return nW(m,v,G),v}}function qM(c){if(c<XM)throw Error("sqrt is not defined for small field");let $=c-J0,Q=0;while($%N$===m0)$/=N$,Q++;let J=N$,Y=mQ(c);while(YM(Y,J)===1)if(J++>1000)throw Error("Cannot find square root: probably non-prime P");if(Q===1)return xM;let X=Y.pow(J,$),W=($+J0)/N$;return function(G,z){if(G.is0(z))return z;if(YM(G,z)!==1)throw Error("Cannot find square root");let x=Q,q=G.mul(G.ONE,X),M=G.pow(z,$),N=G.pow(z,W);while(!G.eql(M,G.ONE)){if(G.is0(M))return G.ZERO;let w=1,U=G.sqr(M);while(!G.eql(U,G.ONE))if(w++,U=G.sqr(U),w===x)throw Error("Cannot find square root");let v=J0<<BigInt(x-w-1),i=G.pow(q,v);x=w,q=G.sqr(i),M=G.mul(M,q),N=G.mul(N,i)}return N}}function rD(c){if(c%WM===XM)return xM;if(c%GM===mM)return dD;if(c%zM===gD)return sD(c);return qM(c)}var tD=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function uW(c){let $={ORDER:"bigint",BYTES:"number",BITS:"number"},Q=tD.reduce((J,Y)=>{return J[Y]="function",J},$);return wJ(c,Q),c}function eD(c,$,Q){if(Q<m0)throw Error("invalid exponent, negatives unsupported");if(Q===m0)return c.ONE;if(Q===J0)return $;let J=c.ONE,Y=$;while(Q>m0){if(Q&J0)J=c.mul(J,Y);Y=c.sqr(Y),Q>>=J0}return J}function lY(c,$,Q=!1){let J=Array($.length).fill(Q?c.ZERO:void 0),Y=$.reduce((W,m,G)=>{if(c.is0(m))return W;return J[G]=W,c.mul(W,m)},c.ONE),X=c.inv(Y);return $.reduceRight((W,m,G)=>{if(c.is0(m))return W;return J[G]=c.mul(W,J[G]),c.mul(W,m)},X),J}function YM(c,$){let Q=(c.ORDER-J0)/N$,J=c.pow($,Q),Y=c.eql(J,c.ONE),X=c.eql(J,c.ZERO),W=c.eql(J,c.neg(c.ONE));if(!Y&&!X&&!W)throw Error("invalid Legendre symbol result");return Y?1:X?0:-1}function cB(c,$){if($!==void 0)Z0($);let Q=$!==void 0?$:c.toString(2).length,J=Math.ceil(Q/8);return{nBitLength:Q,nByteLength:J}}class MM{ORDER;BITS;BYTES;isLE;ZERO=m0;ONE=J0;_lengths;_sqrt;_mod;constructor(c,$={}){if(c<=m0)throw Error("invalid field: expected ORDER > 0, got "+c);let Q=void 0;if(this.isLE=!1,$!=null&&typeof $==="object"){if(typeof $.BITS==="number")Q=$.BITS;if(typeof $.sqrt==="function")this.sqrt=$.sqrt;if(typeof $.isLE==="boolean")this.isLE=$.isLE;if($.allowedLengths)this._lengths=$.allowedLengths?.slice();if(typeof $.modFromBytes==="boolean")this._mod=$.modFromBytes}let{nBitLength:J,nByteLength:Y}=cB(c,Q);if(Y>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=c,this.BITS=J,this.BYTES=Y,this._sqrt=void 0,Object.preventExtensions(this)}create(c){return g0(c,this.ORDER)}isValid(c){if(typeof c!=="bigint")throw Error("invalid field element: expected bigint, got "+typeof c);return m0<=c&&c<this.ORDER}is0(c){return c===m0}isValidNot0(c){return!this.is0(c)&&this.isValid(c)}isOdd(c){return(c&J0)===J0}neg(c){return g0(-c,this.ORDER)}eql(c,$){return c===$}sqr(c){return g0(c*c,this.ORDER)}add(c,$){return g0(c+$,this.ORDER)}sub(c,$){return g0(c-$,this.ORDER)}mul(c,$){return g0(c*$,this.ORDER)}pow(c,$){return eD(this,c,$)}div(c,$){return g0(c*JM($,this.ORDER),this.ORDER)}sqrN(c){return c*c}addN(c,$){return c+$}subN(c,$){return c-$}mulN(c,$){return c*$}inv(c){return JM(c,this.ORDER)}sqrt(c){if(!this._sqrt)this._sqrt=rD(this.ORDER);return this._sqrt(this,c)}toBytes(c){return this.isLE?FW(c,this.BYTES):aY(c,this.BYTES)}fromBytes(c,$=!1){vc(c);let{_lengths:Q,BYTES:J,isLE:Y,ORDER:X,_mod:W}=this;if(Q){if(!Q.includes(c.length)||c.length>J)throw Error("Field.fromBytes: expected "+Q+" bytes, got "+c.length);let G=new Uint8Array(J);G.set(c,Y?0:G.length-c.length),c=G}if(c.length!==J)throw Error("Field.fromBytes: expected "+J+" bytes, got "+c.length);let m=Y?bW(c):P8(c);if(W)m=g0(m,X);if(!$){if(!this.isValid(m))throw Error("invalid field element: outside of range 0..ORDER")}return m}invertBatch(c){return lY(this,c)}cmov(c,$,Q){return Q?$:c}}function mQ(c,$={}){return new MM(c,$)}function NM(c){if(typeof c!=="bigint")throw Error("field order must be bigint");let $=c.toString(2).length;return Math.ceil($/8)}function kW(c){let $=NM(c);return $+Math.ceil($/2)}function hY(c,$,Q=!1){vc(c);let J=c.length,Y=NM($),X=kW($);if(J<16||J<X||J>1024)throw Error("expected "+X+"-1024 bytes of input, got "+J);let W=Q?bW(c):P8(c),m=g0(W,$-J0)+J0;return Q?FW(m,Y):aY(m,Y)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var GQ=BigInt(0),V$=BigInt(1);function iJ(c,$){let Q=$.negate();return c?Q:$}function yW(c,$){let Q=lY(c.Fp,$.map((J)=>J.Z));return $.map((J,Y)=>c.fromAffine(J.toAffine(Q[Y])))}function vM(c,$){if(!Number.isSafeInteger(c)||c<=0||c>$)throw Error("invalid window size, expected [1.."+$+"], got W="+c)}function aW(c,$){vM(c,$);let Q=Math.ceil($/c)+1,J=2**(c-1),Y=2**c,X=VJ(c),W=BigInt(c);return{windows:Q,windowSize:J,mask:X,maxNumber:Y,shiftBy:W}}function VM(c,$,Q){let{windowSize:J,mask:Y,maxNumber:X,shiftBy:W}=Q,m=Number(c&Y),G=c>>W;if(m>J)m-=X,G+=V$;let z=$*J,x=z+Math.abs(m)-1,q=m===0,M=m<0,N=$%2!==0;return{nextN:G,offset:x,isZero:q,isNeg:M,isNegF:N,offsetF:z}}var lW=new WeakMap,UM=new WeakMap;function hW(c){return UM.get(c)||1}function wM(c){if(c!==GQ)throw Error("invalid wNAF")}class oW{BASE;ZERO;Fn;bits;constructor(c,$){this.BASE=c.BASE,this.ZERO=c.ZERO,this.Fn=c.Fn,this.bits=$}_unsafeLadder(c,$,Q=this.ZERO){let J=c;while($>GQ){if($&V$)Q=Q.add(J);J=J.double(),$>>=V$}return Q}precomputeWindow(c,$){let{windows:Q,windowSize:J}=aW($,this.bits),Y=[],X=c,W=X;for(let m=0;m<Q;m++){W=X,Y.push(W);for(let G=1;G<J;G++)W=W.add(X),Y.push(W);X=W.double()}return Y}wNAF(c,$,Q){if(!this.Fn.isValid(Q))throw Error("invalid scalar");let J=this.ZERO,Y=this.BASE,X=aW(c,this.bits);for(let W=0;W<X.windows;W++){let{nextN:m,offset:G,isZero:z,isNeg:x,isNegF:q,offsetF:M}=VM(Q,W,X);if(Q=m,z)Y=Y.add(iJ(q,$[M]));else J=J.add(iJ(x,$[G]))}return wM(Q),{p:J,f:Y}}wNAFUnsafe(c,$,Q,J=this.ZERO){let Y=aW(c,this.bits);for(let X=0;X<Y.windows;X++){if(Q===GQ)break;let{nextN:W,offset:m,isZero:G,isNeg:z}=VM(Q,X,Y);if(Q=W,G)continue;else{let x=$[m];J=J.add(z?x.negate():x)}}return wM(Q),J}getPrecomputes(c,$,Q){let J=lW.get($);if(!J){if(J=this.precomputeWindow($,c),c!==1){if(typeof Q==="function")J=Q(J);lW.set($,J)}}return J}cached(c,$,Q){let J=hW(c);return this.wNAF(J,this.getPrecomputes(J,c,Q),$)}unsafe(c,$,Q,J){let Y=hW(c);if(Y===1)return this._unsafeLadder(c,$,J);return this.wNAFUnsafe(Y,this.getPrecomputes(Y,c,Q),$,J)}createCache(c,$){vM($,this.bits),UM.set(c,$),lW.delete(c)}hasCache(c){return hW(c)!==1}}function jM(c,$,Q,J){let Y=$,X=c.ZERO,W=c.ZERO;while(Q>GQ||J>GQ){if(Q&V$)X=X.add(Y);if(J&V$)W=W.add(Y);Y=Y.double(),Q>>=V$,J>>=V$}return{p1:X,p2:W}}function iM(c,$,Q){if($){if($.ORDER!==c)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return uW($),$}else return mQ(c,{isLE:Q})}function KM(c,$,Q={},J){if(J===void 0)J=c==="edwards";if(!$||typeof $!=="object")throw Error(`expected valid ${c} CURVE object`);for(let G of["p","n","h"]){let z=$[G];if(!(typeof z==="bigint"&&z>GQ))throw Error(`CURVE.${G} must be positive bigint`)}let Y=iM($.p,Q.Fp,J),X=iM($.n,Q.Fn,J),m=["Gx","Gy","a",c==="weierstrass"?"b":"d"];for(let G of m)if(!Y.isValid($[G]))throw Error(`CURVE.${G} must be valid field element of CURVE.Fp`);return $=Object.freeze(Object.assign({},$)),{CURVE:$,Fp:Y,Fn:X}}function yY(c,$){return function(J){let Y=c(J);return{secretKey:Y,publicKey:$(Y)}}}class gW{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(c,$){if(x$(c),vc($,void 0,"key"),this.iHash=c.create(),typeof this.iHash.update!=="function")throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let Q=this.blockLen,J=new Uint8Array(Q);J.set($.length>Q?c.create().update($).digest():$);for(let Y=0;Y<J.length;Y++)J[Y]^=54;this.iHash.update(J),this.oHash=c.create();for(let Y=0;Y<J.length;Y++)J[Y]^=106;this.oHash.update(J),h0(J)}update(c){return WQ(this),this.iHash.update(c),this}digestInto(c){WQ(this),vc(c,this.outputLen,"output"),this.finished=!0,this.iHash.digestInto(c),this.oHash.update(c),this.oHash.digestInto(c),this.destroy()}digest(){let c=new Uint8Array(this.oHash.outputLen);return this.digestInto(c),c}_cloneInto(c){c||=Object.create(Object.getPrototypeOf(this),{});let{oHash:$,iHash:Q,finished:J,destroyed:Y,blockLen:X,outputLen:W}=this;return c=c,c.finished=J,c.destroyed=Y,c.blockLen=X,c.outputLen=W,c.oHash=$._cloneInto(c.oHash),c.iHash=Q._cloneInto(c.iHash),c}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}var E8=(c,$,Q)=>new gW(c,$).update(Q).digest();E8.create=(c,$)=>new gW(c,$);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var DM=(c,$)=>(c+(c>=0?$:-$)/HM)/$;function $B(c,$,Q){let[[J,Y],[X,W]]=$,m=DM(W*c,Q),G=DM(-Y*c,Q),z=c-m*J-G*X,x=-m*Y-G*W,q=z<N8,M=x<N8;if(q)z=-z;if(M)x=-x;let N=VJ(Math.ceil(TW(Q)/2))+zQ;if(z<N8||z>=N||x<N8||x>=N)throw Error("splitScalar (endomorphism): failed, k="+c);return{k1neg:q,k1:z,k2neg:M,k2:x}}function sW(c){if(!["compact","recovered","der"].includes(c))throw Error('Signature format must be "compact", "recovered", or "der"');return c}function dW(c,$){let Q={};for(let J of Object.keys($))Q[J]=c[J]===void 0?$[J]:c[J];if(MJ(Q.lowS,"lowS"),MJ(Q.prehash,"prehash"),Q.format!==void 0)sW(Q.format);return Q}class BM extends Error{constructor(c=""){super(c)}}var b8={Err:BM,_tlv:{encode:(c,$)=>{let{Err:Q}=b8;if(c<0||c>256)throw new Q("tlv.encode: wrong tag");if($.length&1)throw new Q("tlv.encode: unpadded data");let J=$.length/2,Y=NJ(J);if(Y.length/2&128)throw new Q("tlv.encode: long form length too big");let X=J>127?NJ(Y.length/2|128):"";return NJ(c)+X+Y+$},decode(c,$){let{Err:Q}=b8,J=0;if(c<0||c>256)throw new Q("tlv.encode: wrong tag");if($.length<2||$[J++]!==c)throw new Q("tlv.decode: wrong tlv");let Y=$[J++],X=!!(Y&128),W=0;if(!X)W=Y;else{let G=Y&127;if(!G)throw new Q("tlv.decode(long): indefinite length not supported");if(G>4)throw new Q("tlv.decode(long): byte length is too big");let z=$.subarray(J,J+G);if(z.length!==G)throw new Q("tlv.decode: length bytes not complete");if(z[0]===0)throw new Q("tlv.decode(long): zero leftmost byte");for(let x of z)W=W<<8|x;if(J+=G,W<128)throw new Q("tlv.decode(long): not minimal encoding")}let m=$.subarray(J,J+W);if(m.length!==W)throw new Q("tlv.decode: wrong value length");return{v:m,l:$.subarray(J+W)}}},_int:{encode(c){let{Err:$}=b8;if(c<N8)throw new $("integer: negative integers are not allowed");let Q=NJ(c);if(Number.parseInt(Q[0],16)&8)Q="00"+Q;if(Q.length&1)throw new $("unexpected DER parsing assertion: unpadded hex");return Q},decode(c){let{Err:$}=b8;if(c[0]&128)throw new $("invalid signature integer: negative");if(c[0]===0&&!(c[1]&128))throw new $("invalid signature integer: unnecessary leading zero");return P8(c)}},toSig(c){let{Err:$,_int:Q,_tlv:J}=b8,Y=vc(c,void 0,"signature"),{v:X,l:W}=J.decode(48,Y);if(W.length)throw new $("invalid signature: left bytes after parsing");let{v:m,l:G}=J.decode(2,X),{v:z,l:x}=J.decode(2,G);if(x.length)throw new $("invalid signature: left bytes after parsing");return{r:Q.decode(m),s:Q.decode(z)}},hexFromSig(c){let{_tlv:$,_int:Q}=b8,J=$.encode(2,Q.encode(c.r)),Y=$.encode(2,Q.encode(c.s)),X=J+Y;return $.encode(48,X)}},N8=BigInt(0),zQ=BigInt(1),HM=BigInt(2),oY=BigInt(3),QB=BigInt(4);function OM(c,$={}){let Q=KM("weierstrass",c,$),{Fp:J,Fn:Y}=Q,X=Q.CURVE,{h:W,n:m}=X;wJ($,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});let{endo:G}=$;if(G){if(!J.is0(X.a)||typeof G.beta!=="bigint"||!Array.isArray(G.basises))throw Error('invalid endo: expected "beta": bigint and "basises": array')}let z=pM(J,Y);function x(){if(!J.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}function q(B,C,K){let{x:R,y:S}=C.toAffine(),I=J.toBytes(R);if(MJ(K,"isCompressed"),K){x();let H=!J.isOdd(S);return Fc(RM(H),I)}else return Fc(Uint8Array.of(4),I,J.toBytes(S))}function M(B){vc(B,void 0,"Point");let{publicKey:C,publicKeyUncompressed:K}=z,R=B.length,S=B[0],I=B.subarray(1);if(R===C&&(S===2||S===3)){let H=J.fromBytes(I);if(!J.isValid(H))throw Error("bad point: is not on curve, wrong x");let A=U(H),b;try{b=J.sqrt(A)}catch(Yc){let cc=Yc instanceof Error?": "+Yc.message:"";throw Error("bad point: is not on curve, sqrt error"+cc)}x();let P=J.isOdd(b);if((S&1)===1!==P)b=J.neg(b);return{x:H,y:b}}else if(R===K&&S===4){let H=J.BYTES,A=J.fromBytes(I.subarray(0,H)),b=J.fromBytes(I.subarray(H,H*2));if(!v(A,b))throw Error("bad point: is not on curve");return{x:A,y:b}}else throw Error(`bad point: got length ${R}, expected compressed=${C} or uncompressed=${K}`)}let N=$.toBytes||q,w=$.fromBytes||M;function U(B){let C=J.sqr(B),K=J.mul(C,B);return J.add(J.add(K,J.mul(B,X.a)),X.b)}function v(B,C){let K=J.sqr(C),R=U(B);return J.eql(K,R)}if(!v(X.Gx,X.Gy))throw Error("bad curve params: generator point");let i=J.mul(J.pow(X.a,oY),QB),j=J.mul(J.sqr(X.b),BigInt(27));if(J.is0(J.add(i,j)))throw Error("bad curve params: a or b");function D(B,C,K=!1){if(!J.isValid(C)||K&&J.is0(C))throw Error(`bad point coordinate ${B}`);return C}function _(B){if(!(B instanceof a))throw Error("Weierstrass Point expected")}function mc(B){if(!G||!G.basises)throw Error("no endo");return $B(B,G.basises,Y.ORDER)}let d=fW((B,C)=>{let{X:K,Y:R,Z:S}=B;if(J.eql(S,J.ONE))return{x:K,y:R};let I=B.is0();if(C==null)C=I?J.ONE:J.inv(S);let H=J.mul(K,C),A=J.mul(R,C),b=J.mul(S,C);if(I)return{x:J.ZERO,y:J.ZERO};if(!J.eql(b,J.ONE))throw Error("invZ was invalid");return{x:H,y:A}}),Jc=fW((B)=>{if(B.is0()){if($.allowInfinityPoint&&!J.is0(B.Y))return;throw Error("bad point: ZERO")}let{x:C,y:K}=B.toAffine();if(!J.isValid(C)||!J.isValid(K))throw Error("bad point: x or y not field elements");if(!v(C,K))throw Error("bad point: equation left != right");if(!B.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function u(B,C,K,R,S){return K=new a(J.mul(K.X,B),K.Y,K.Z),C=iJ(R,C),K=iJ(S,K),C.add(K)}class a{static BASE=new a(X.Gx,X.Gy,J.ONE);static ZERO=new a(J.ZERO,J.ONE,J.ZERO);static Fp=J;static Fn=Y;X;Y;Z;constructor(B,C,K){this.X=D("x",B),this.Y=D("y",C,!0),this.Z=D("z",K),Object.freeze(this)}static CURVE(){return X}static fromAffine(B){let{x:C,y:K}=B||{};if(!B||!J.isValid(C)||!J.isValid(K))throw Error("invalid affine point");if(B instanceof a)throw Error("projective point not allowed");if(J.is0(C)&&J.is0(K))return a.ZERO;return new a(C,K,J.ONE)}static fromBytes(B){let C=a.fromAffine(w(vc(B,void 0,"point")));return C.assertValidity(),C}static fromHex(B){return a.fromBytes(Rc(B))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(B=8,C=!0){if(e.createCache(this,B),!C)this.multiply(oY);return this}assertValidity(){Jc(this)}hasEvenY(){let{y:B}=this.toAffine();if(!J.isOdd)throw Error("Field doesn't support isOdd");return!J.isOdd(B)}equals(B){_(B);let{X:C,Y:K,Z:R}=this,{X:S,Y:I,Z:H}=B,A=J.eql(J.mul(C,H),J.mul(S,R)),b=J.eql(J.mul(K,H),J.mul(I,R));return A&&b}negate(){return new a(this.X,J.neg(this.Y),this.Z)}double(){let{a:B,b:C}=X,K=J.mul(C,oY),{X:R,Y:S,Z:I}=this,H=J.ZERO,A=J.ZERO,b=J.ZERO,P=J.mul(R,R),r=J.mul(S,S),Yc=J.mul(I,I),cc=J.mul(R,S);return cc=J.add(cc,cc),b=J.mul(R,I),b=J.add(b,b),H=J.mul(B,b),A=J.mul(K,Yc),A=J.add(H,A),H=J.sub(r,A),A=J.add(r,A),A=J.mul(H,A),H=J.mul(cc,H),b=J.mul(K,b),Yc=J.mul(B,Yc),cc=J.sub(P,Yc),cc=J.mul(B,cc),cc=J.add(cc,b),b=J.add(P,P),P=J.add(b,P),P=J.add(P,Yc),P=J.mul(P,cc),A=J.add(A,P),Yc=J.mul(S,I),Yc=J.add(Yc,Yc),P=J.mul(Yc,cc),H=J.sub(H,P),b=J.mul(Yc,r),b=J.add(b,b),b=J.add(b,b),new a(H,A,b)}add(B){_(B);let{X:C,Y:K,Z:R}=this,{X:S,Y:I,Z:H}=B,A=J.ZERO,b=J.ZERO,P=J.ZERO,r=X.a,Yc=J.mul(X.b,oY),cc=J.mul(C,S),Oc=J.mul(K,I),o=J.mul(R,H),Dc=J.add(C,K),Uc=J.add(S,I);Dc=J.mul(Dc,Uc),Uc=J.add(cc,Oc),Dc=J.sub(Dc,Uc),Uc=J.add(C,R);let qc=J.add(S,H);return Uc=J.mul(Uc,qc),qc=J.add(cc,o),Uc=J.sub(Uc,qc),qc=J.add(K,R),A=J.add(I,H),qc=J.mul(qc,A),A=J.add(Oc,o),qc=J.sub(qc,A),P=J.mul(r,Uc),A=J.mul(Yc,o),P=J.add(A,P),A=J.sub(Oc,P),P=J.add(Oc,P),b=J.mul(A,P),Oc=J.add(cc,cc),Oc=J.add(Oc,cc),o=J.mul(r,o),Uc=J.mul(Yc,Uc),Oc=J.add(Oc,o),o=J.sub(cc,o),o=J.mul(r,o),Uc=J.add(Uc,o),cc=J.mul(Oc,Uc),b=J.add(b,cc),cc=J.mul(qc,Uc),A=J.mul(Dc,A),A=J.sub(A,cc),cc=J.mul(Dc,Oc),P=J.mul(qc,P),P=J.add(P,cc),new a(A,b,P)}subtract(B){return this.add(B.negate())}is0(){return this.equals(a.ZERO)}multiply(B){let{endo:C}=$;if(!Y.isValidNot0(B))throw Error("invalid scalar: out of range");let K,R,S=(I)=>e.cached(this,I,(H)=>yW(a,H));if(C){let{k1neg:I,k1:H,k2neg:A,k2:b}=mc(B),{p:P,f:r}=S(H),{p:Yc,f:cc}=S(b);R=r.add(cc),K=u(C.beta,P,Yc,I,A)}else{let{p:I,f:H}=S(B);K=I,R=H}return yW(a,[K,R])[0]}multiplyUnsafe(B){let{endo:C}=$,K=this;if(!Y.isValid(B))throw Error("invalid scalar: out of range");if(B===N8||K.is0())return a.ZERO;if(B===zQ)return K;if(e.hasCache(this))return this.multiply(B);if(C){let{k1neg:R,k1:S,k2neg:I,k2:H}=mc(B),{p1:A,p2:b}=jM(a,K,S,H);return u(C.beta,A,b,R,I)}else return e.unsafe(K,B)}toAffine(B){return d(this,B)}isTorsionFree(){let{isTorsionFree:B}=$;if(W===zQ)return!0;if(B)return B(a,this);return e.unsafe(this,m).is0()}clearCofactor(){let{clearCofactor:B}=$;if(W===zQ)return this;if(B)return B(a,this);return this.multiplyUnsafe(W)}isSmallOrder(){return this.multiplyUnsafe(W).is0()}toBytes(B=!0){return MJ(B,"isCompressed"),this.assertValidity(),N(a,this,B)}toHex(B=!0){return Hc(this.toBytes(B))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}let Xc=Y.BITS,e=new oW(a,$.endo?Math.ceil(Xc/2):Xc);return a.BASE.precompute(8),a}function RM(c){return Uint8Array.of(c?2:3)}function pM(c,$){return{secretKey:$.BYTES,publicKey:1+c.BYTES,publicKeyUncompressed:1+2*c.BYTES,publicKeyHasPrefix:!0,signature:2*$.BYTES}}function JB(c,$={}){let{Fn:Q}=c,J=$.randomBytes||o0,Y=Object.assign(pM(c.Fp,Q),{seed:kW(Q.ORDER)});function X(N){try{let w=Q.fromBytes(N);return Q.isValidNot0(w)}catch(w){return!1}}function W(N,w){let{publicKey:U,publicKeyUncompressed:v}=Y;try{let i=N.length;if(w===!0&&i!==U)return!1;if(w===!1&&i!==v)return!1;return!!c.fromBytes(N)}catch(i){return!1}}function m(N=J(Y.seed)){return hY(vc(N,Y.seed,"seed"),Q.ORDER)}function G(N,w=!0){return c.BASE.multiply(Q.fromBytes(N)).toBytes(w)}function z(N){let{secretKey:w,publicKey:U,publicKeyUncompressed:v}=Y;if(!GJ(N))return;if("_lengths"in Q&&Q._lengths||w===U)return;let i=vc(N,void 0,"key").length;return i===U||i===v}function x(N,w,U=!0){if(z(N)===!0)throw Error("first arg must be private key");if(z(w)===!1)throw Error("second arg must be public key");let v=Q.fromBytes(N);return c.fromBytes(w).multiply(v).toBytes(U)}let q={isValidSecretKey:X,isValidPublicKey:W,randomSecretKey:m},M=yY(m,G);return Object.freeze({getPublicKey:G,getSharedSecret:x,keygen:M,Point:c,utils:q,lengths:Y})}function ZM(c,$,Q={}){x$($),wJ(Q,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"}),Q=Object.assign({},Q);let J=Q.randomBytes||o0,Y=Q.hmac||((K,R)=>E8($,K,R)),{Fp:X,Fn:W}=c,{ORDER:m,BITS:G}=W,{keygen:z,getPublicKey:x,getSharedSecret:q,utils:M,lengths:N}=JB(c,Q),w={prehash:!0,lowS:typeof Q.lowS==="boolean"?Q.lowS:!0,format:"compact",extraEntropy:!1},U=m*HM<X.ORDER;function v(K){let R=m>>zQ;return K>R}function i(K,R){if(!W.isValidNot0(R))throw Error(`invalid signature ${K}: out of range 1..Point.Fn.ORDER`);return R}function j(){if(U)throw Error('"recovered" sig type is not supported for cofactor >2 curves')}function D(K,R){sW(R);let S=N.signature,I=R==="compact"?S:R==="recovered"?S+1:void 0;return vc(K,I)}class _{r;s;recovery;constructor(K,R,S){if(this.r=i("r",K),this.s=i("s",R),S!=null){if(j(),![0,1,2,3].includes(S))throw Error("invalid recovery id");this.recovery=S}Object.freeze(this)}static fromBytes(K,R=w.format){D(K,R);let S;if(R==="der"){let{r:b,s:P}=b8.toSig(vc(K));return new _(b,P)}if(R==="recovered")S=K[0],R="compact",K=K.subarray(1);let I=N.signature/2,H=K.subarray(0,I),A=K.subarray(I,I*2);return new _(W.fromBytes(H),W.fromBytes(A),S)}static fromHex(K,R){return this.fromBytes(Rc(K),R)}assertRecovery(){let{recovery:K}=this;if(K==null)throw Error("invalid recovery id: must be present");return K}addRecoveryBit(K){return new _(this.r,this.s,K)}recoverPublicKey(K){let{r:R,s:S}=this,I=this.assertRecovery(),H=I===2||I===3?R+m:R;if(!X.isValid(H))throw Error("invalid recovery id: sig.r+curve.n != R.x");let A=X.toBytes(H),b=c.fromBytes(Fc(RM((I&1)===0),A)),P=W.inv(H),r=d(vc(K,void 0,"msgHash")),Yc=W.create(-r*P),cc=W.create(S*P),Oc=c.BASE.multiplyUnsafe(Yc).add(b.multiplyUnsafe(cc));if(Oc.is0())throw Error("invalid recovery: point at infinify");return Oc.assertValidity(),Oc}hasHighS(){return v(this.s)}toBytes(K=w.format){if(sW(K),K==="der")return Rc(b8.hexFromSig(this));let{r:R,s:S}=this,I=W.toBytes(R),H=W.toBytes(S);if(K==="recovered")return j(),Fc(Uint8Array.of(this.assertRecovery()),I,H);return Fc(I,H)}toHex(K){return Hc(this.toBytes(K))}}let mc=Q.bits2int||function(R){if(R.length>8192)throw Error("input is too large");let S=P8(R),I=R.length*8-G;return I>0?S>>BigInt(I):S},d=Q.bits2int_modN||function(R){return W.create(mc(R))},Jc=VJ(G);function u(K){return $M("num < 2^"+G,K,N8,Jc),W.toBytes(K)}function a(K,R){return vc(K,void 0,"message"),R?vc($(K),void 0,"prehashed message"):K}function Xc(K,R,S){let{lowS:I,prehash:H,extraEntropy:A}=dW(S,w);K=a(K,H);let b=d(K),P=W.fromBytes(R);if(!W.isValidNot0(P))throw Error("invalid private key");let r=[u(P),u(b)];if(A!=null&&A!==!1){let o=A===!0?J(N.secretKey):A;r.push(vc(o,void 0,"extraEntropy"))}let Yc=Fc(...r),cc=b;function Oc(o){let Dc=mc(o);if(!W.isValidNot0(Dc))return;let Uc=W.inv(Dc),qc=c.BASE.multiply(Dc).toAffine(),M0=W.create(qc.x);if(M0===N8)return;let N0=W.create(Uc*W.create(cc+M0*P));if(N0===N8)return;let Y0=(qc.x===M0?0:2)|Number(qc.y&zQ),U8=N0;if(I&&v(N0))U8=W.neg(N0),Y0^=1;return new _(M0,U8,U?void 0:Y0)}return{seed:Yc,k2sig:Oc}}function e(K,R,S={}){let{seed:I,k2sig:H}=Xc(K,R,S);return QM($.outputLen,W.BYTES,Y)(I,H).toBytes(S.format)}function B(K,R,S,I={}){let{lowS:H,prehash:A,format:b}=dW(I,w);if(S=vc(S,void 0,"publicKey"),R=a(R,A),!GJ(K)){let P=K instanceof _?", use sig.toBytes()":"";throw Error("verify expects Uint8Array signature"+P)}D(K,b);try{let P=_.fromBytes(K,b),r=c.fromBytes(S);if(H&&P.hasHighS())return!1;let{r:Yc,s:cc}=P,Oc=d(R),o=W.inv(cc),Dc=W.create(Oc*o),Uc=W.create(Yc*o),qc=c.BASE.multiplyUnsafe(Dc).add(r.multiplyUnsafe(Uc));if(qc.is0())return!1;return W.create(qc.x)===Yc}catch(P){return!1}}function C(K,R,S={}){let{prehash:I}=dW(S,w);return R=a(R,I),_.fromBytes(K,"recovered").recoverPublicKey(R).toBytes()}return Object.freeze({keygen:z,getPublicKey:x,getSharedSecret:q,utils:M,lengths:N,Point:c,sign:e,verify:B,recoverPublicKey:C,Signature:_,hash:$})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var sY={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},YB={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},XB=BigInt(0),rW=BigInt(2);function WB(c){let $=sY.p,Q=BigInt(3),J=BigInt(6),Y=BigInt(11),X=BigInt(22),W=BigInt(23),m=BigInt(44),G=BigInt(88),z=c*c*c%$,x=z*z*c%$,q=j0(x,Q,$)*x%$,M=j0(q,Q,$)*x%$,N=j0(M,rW,$)*z%$,w=j0(N,Y,$)*N%$,U=j0(w,X,$)*w%$,v=j0(U,m,$)*U%$,i=j0(v,G,$)*v%$,j=j0(i,m,$)*U%$,D=j0(j,Q,$)*x%$,_=j0(D,W,$)*w%$,mc=j0(_,J,$)*z%$,d=j0(mc,rW,$);if(!gY.eql(gY.sqr(d),c))throw Error("Cannot find square root");return d}var gY=mQ(sY.p,{sqrt:WB}),w$=OM(sY,{Fp:gY,endo:YB}),UJ=ZM(w$,Q0),IM={};function dY(c,...$){let Q=IM[c];if(Q===void 0){let J=Q0(cM(c));Q=Fc(J,J),IM[c]=Q}return Q0(Fc(Q,...$))}var eW=(c)=>c.toBytes(!0).slice(1),cm=(c)=>c%rW===XB;function tW(c){let{Fn:$,BASE:Q}=w$,J=$.fromBytes(c),Y=Q.multiply(J);return{scalar:cm(Y.y)?J:$.neg(J),bytes:eW(Y)}}function _M(c){let $=gY;if(!$.isValidNot0(c))throw Error("invalid x: Fail if x ≥ p");let Q=$.create(c*c),J=$.create(Q*c+BigInt(7)),Y=$.sqrt(J);if(!cm(Y))Y=$.neg(Y);let X=w$.fromAffine({x:c,y:Y});return X.assertValidity(),X}var vJ=P8;function SM(...c){return w$.Fn.create(vJ(dY("BIP0340/challenge",...c)))}function LM(c){return tW(c).bytes}function mB(c,$,Q=o0(32)){let{Fn:J}=w$,Y=vc(c,void 0,"message"),{bytes:X,scalar:W}=tW($),m=vc(Q,32,"auxRand"),G=J.toBytes(W^vJ(dY("BIP0340/aux",m))),z=dY("BIP0340/nonce",G,X,Y),{bytes:x,scalar:q}=tW(z),M=SM(x,X,Y),N=new Uint8Array(64);if(N.set(x,0),N.set(J.toBytes(J.create(q+M*W)),32),!AM(N,Y,X))throw Error("sign: Invalid signature produced");return N}function AM(c,$,Q){let{Fp:J,Fn:Y,BASE:X}=w$,W=vc(c,64,"signature"),m=vc($,void 0,"message"),G=vc(Q,32,"publicKey");try{let z=_M(vJ(G)),x=vJ(W.subarray(0,32));if(!J.isValidNot0(x))return!1;let q=vJ(W.subarray(32,64));if(!Y.isValidNot0(q))return!1;let M=SM(Y.toBytes(x),eW(z),m),N=X.multiplyUnsafe(q).add(z.multiplyUnsafe(Y.neg(M))),{x:w,y:U}=N.toAffine();if(N.is0()||!cm(U)||w!==x)return!1;return!0}catch(z){return!1}}var xQ=(()=>{let Q=(J=o0(48))=>{return hY(J,sY.n)};return{keygen:yY(Q,LM),getPublicKey:LM,sign:mB,verify:AM,Point:w$,utils:{randomSecretKey:Q,taggedHash:dY,lift_x:_M,pointToBytes:eW},lengths:{secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48}}})();/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function $X(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function Jm(c){if(!$X(c))throw Error("Uint8Array expected")}function FM(c,$){if(!Array.isArray($))return!1;if($.length===0)return!0;if(c)return $.every((Q)=>typeof Q==="string");else return $.every((Q)=>Number.isSafeInteger(Q))}function TM(c){if(typeof c!=="function")throw Error("function expected");return!0}function F8(c,$){if(typeof $!=="string")throw Error(`${c}: string expected`);return!0}function KJ(c){if(!Number.isSafeInteger(c))throw Error(`invalid integer: ${c}`)}function tY(c){if(!Array.isArray(c))throw Error("array expected")}function eY(c,$){if(!FM(!0,$))throw Error(`${c}: array of strings expected`)}function Ym(c,$){if(!FM(!1,$))throw Error(`${c}: array of numbers expected`)}function K0(...c){let $=(X)=>X,Q=(X,W)=>(m)=>X(W(m)),J=c.map((X)=>X.encode).reduceRight(Q,$),Y=c.map((X)=>X.decode).reduce(Q,$);return{encode:J,decode:Y}}function D0(c){let $=typeof c==="string"?c.split(""):c,Q=$.length;eY("alphabet",$);let J=new Map($.map((Y,X)=>[Y,X]));return{encode:(Y)=>{return tY(Y),Y.map((X)=>{if(!Number.isSafeInteger(X)||X<0||X>=Q)throw Error(`alphabet.encode: digit index outside alphabet "${X}". Allowed: ${c}`);return $[X]})},decode:(Y)=>{return tY(Y),Y.map((X)=>{F8("alphabet.decode",X);let W=J.get(X);if(W===void 0)throw Error(`Unknown letter: "${X}". Allowed: ${c}`);return W})}}}function B0(c=""){return F8("join",c),{encode:($)=>{return eY("join.decode",$),$.join(c)},decode:($)=>{return F8("join.decode",$),$.split(c)}}}function QX(c,$="="){return KJ(c),F8("padding",$),{encode(Q){eY("padding.encode",Q);while(Q.length*c%8)Q.push($);return Q},decode(Q){eY("padding.decode",Q);let J=Q.length;if(J*c%8)throw Error("padding: invalid, string should have whole number of bytes");for(;J>0&&Q[J-1]===$;J--)if((J-1)*c%8===0)throw Error("padding: invalid, string has too much padding");return Q.slice(0,J)}}}function fM(c){return TM(c),{encode:($)=>$,decode:($)=>c($)}}function CM(c,$,Q){if($<2)throw Error(`convertRadix: invalid from=${$}, base cannot be less than 2`);if(Q<2)throw Error(`convertRadix: invalid to=${Q}, base cannot be less than 2`);if(tY(c),!c.length)return[];let J=0,Y=[],X=Array.from(c,(m)=>{if(KJ(m),m<0||m>=$)throw Error(`invalid integer: ${m}`);return m}),W=X.length;while(!0){let m=0,G=!0;for(let z=J;z<W;z++){let x=X[z],q=$*m,M=q+x;if(!Number.isSafeInteger(M)||q/$!==m||M-x!==q)throw Error("convertRadix: carry overflow");let N=M/Q;m=M%Q;let w=Math.floor(N);if(X[z]=w,!Number.isSafeInteger(w)||w*Q+m!==M)throw Error("convertRadix: carry overflow");if(!G)continue;else if(!w)J=z;else G=!1}if(Y.push(m),G)break}for(let m=0;m<c.length-1&&c[m]===0;m++)Y.push(0);return Y.reverse()}var nM=(c,$)=>$===0?c:nM($,c%$),cX=(c,$)=>c+($-nM(c,$)),rY=(()=>{let c=[];for(let $=0;$<40;$++)c.push(2**$);return c})();function $m(c,$,Q,J){if(tY(c),$<=0||$>32)throw Error(`convertRadix2: wrong from=${$}`);if(Q<=0||Q>32)throw Error(`convertRadix2: wrong to=${Q}`);if(cX($,Q)>32)throw Error(`convertRadix2: carry overflow from=${$} to=${Q} carryBits=${cX($,Q)}`);let Y=0,X=0,W=rY[$],m=rY[Q]-1,G=[];for(let z of c){if(KJ(z),z>=W)throw Error(`convertRadix2: invalid data word=${z} from=${$}`);if(Y=Y<<$|z,X+$>32)throw Error(`convertRadix2: carry overflow pos=${X} from=${$}`);X+=$;for(;X>=Q;X-=Q)G.push((Y>>X-Q&m)>>>0);let x=rY[X];if(x===void 0)throw Error("invalid carry");Y&=x-1}if(Y=Y<<Q-X&m,!J&&X>=$)throw Error("Excess padding");if(!J&&Y>0)throw Error(`Non-zero padding: ${Y}`);if(J&&X>0)G.push(Y>>>0);return G}function GB(c){KJ(c);let $=256;return{encode:(Q)=>{if(!$X(Q))throw Error("radix.encode input should be Uint8Array");return CM(Array.from(Q),$,c)},decode:(Q)=>{return Ym("radix.decode",Q),Uint8Array.from(CM(Q,c,$))}}}function I0(c,$=!1){if(KJ(c),c<=0||c>32)throw Error("radix2: bits should be in (0..32]");if(cX(8,c)>32||cX(c,8)>32)throw Error("radix2: carry overflow");return{encode:(Q)=>{if(!$X(Q))throw Error("radix2.encode input should be Uint8Array");return $m(Array.from(Q),8,c,!$)},decode:(Q)=>{return Ym("radix2.decode",Q),Uint8Array.from($m(Q,c,8,$))}}}function PM(c){return TM(c),function(...$){try{return c.apply(null,$)}catch(Q){}}}var Ab=K0(I0(4),D0("0123456789ABCDEF"),B0("")),Cb=K0(I0(5),D0("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),QX(5),B0("")),Pb=K0(I0(5),D0("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),B0("")),Eb=K0(I0(5),D0("0123456789ABCDEFGHIJKLMNOPQRSTUV"),QX(5),B0("")),bb=K0(I0(5),D0("0123456789ABCDEFGHIJKLMNOPQRSTUV"),B0("")),Fb=K0(I0(5),D0("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),B0(""),fM((c)=>c.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),uM=(()=>typeof Uint8Array.from([]).toBase64==="function"&&typeof Uint8Array.fromBase64==="function")(),kM=(c,$)=>{F8("base64",c);let Q=$?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,J=$?"base64url":"base64";if(c.length>0&&!Q.test(c))throw Error("invalid base64");return Uint8Array.fromBase64(c,{alphabet:J,lastChunkHandling:"strict"})},L0=uM?{encode(c){return Jm(c),c.toBase64()},decode(c){return kM(c,!1)}}:K0(I0(6),D0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),QX(6),B0("")),Tb=K0(I0(6),D0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),B0("")),fb=uM?{encode(c){return Jm(c),c.toBase64({alphabet:"base64url"})},decode(c){return kM(c,!0)}}:K0(I0(6),D0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),QX(6),B0("")),nb=K0(I0(6),D0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),B0("")),Xm=(c)=>K0(GB(58),D0(c),B0("")),ub=Xm("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),kb=Xm("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),ab=Xm("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");var Qm=K0(D0("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),B0("")),EM=[996825010,642813549,513874426,1027748829,705979059];function jJ(c){let $=c>>25,Q=(c&33554431)<<5;for(let J=0;J<EM.length;J++)if(($>>J&1)===1)Q^=EM[J];return Q}function bM(c,$,Q=1){let J=c.length,Y=1;for(let X=0;X<J;X++){let W=c.charCodeAt(X);if(W<33||W>126)throw Error(`Invalid prefix (${c})`);Y=jJ(Y)^W>>5}Y=jJ(Y);for(let X=0;X<J;X++)Y=jJ(Y)^c.charCodeAt(X)&31;for(let X of $)Y=jJ(Y)^X;for(let X=0;X<6;X++)Y=jJ(Y);return Y^=Q,Qm.encode($m([Y%rY[30]],30,5,!1))}function aM(c){let $=c==="bech32"?1:734539939,Q=I0(5),J=Q.decode,Y=Q.encode,X=PM(J);function W(q,M,N=90){if(F8("bech32.encode prefix",q),$X(M))M=Array.from(M);Ym("bech32.encode",M);let w=q.length;if(w===0)throw TypeError(`Invalid prefix length ${w}`);let U=w+7+M.length;if(N!==!1&&U>N)throw TypeError(`Length ${U} exceeds limit ${N}`);let v=q.toLowerCase(),i=bM(v,M,$);return`${v}1${Qm.encode(M)}${i}`}function m(q,M=90){F8("bech32.decode input",q);let N=q.length;if(N<8||M!==!1&&N>M)throw TypeError(`invalid string length: ${N} (${q}). Expected (8..${M})`);let w=q.toLowerCase();if(q!==w&&q!==q.toUpperCase())throw Error("String must be lowercase or uppercase");let U=w.lastIndexOf("1");if(U===0||U===-1)throw Error('Letter "1" must be present between prefix and data only');let v=w.slice(0,U),i=w.slice(U+1);if(i.length<6)throw Error("Data must be at least 6 characters long");let j=Qm.decode(i).slice(0,-6),D=bM(v,j,$);if(!i.endsWith(D))throw Error(`Invalid checksum in ${q}: expected "${D}"`);return{prefix:v,words:j}}let G=PM(m);function z(q){let{prefix:M,words:N}=m(q,!1);return{prefix:M,words:N,bytes:J(N)}}function x(q,M){return W(q,Y(M))}return{encode:W,decode:m,encodeFromBytes:x,decodeToBytes:z,decodeUnsafe:G,fromWords:J,fromWordsUnsafe:X,toWords:Y}}var T8=aM("bech32"),lb=aM("bech32m");var zB=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),xB={encode(c){return Jm(c),c.toHex()},decode(c){return F8("hex",c),Uint8Array.fromHex(c)}},hb=zB?xB:K0(I0(4),D0("0123456789abcdef"),B0(""),fM((c)=>{if(typeof c!=="string"||c.length%2!==0)throw TypeError(`hex.decode: expected string, got ${typeof c} with length ${c.length}`);return c.toLowerCase()}));/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function qB(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function JX(c){if(typeof c!=="boolean")throw Error(`boolean expected, not ${c}`)}function DJ(c){if(!Number.isSafeInteger(c)||c<0)throw Error("positive integer expected, got "+c)}function Ac(c,$,Q=""){let J=qB(c),Y=c?.length,X=$!==void 0;if(!J||X&&Y!==$){let W=Q&&`"${Q}" `,m=X?` of length ${$}`:"",G=J?`length=${Y}`:`type=${typeof c}`;throw Error(W+"expected Uint8Array"+m+", got "+G)}return c}function Wm(c,$=!0){if(c.destroyed)throw Error("Hash instance has been destroyed");if($&&c.finished)throw Error("Hash#digest() has already been called")}function lM(c,$){Ac(c,void 0,"output");let Q=$.outputLen;if(c.length<Q)throw Error("digestInto() expects output buffer of length at least "+Q)}function nc(c){return new Uint32Array(c.buffer,c.byteOffset,Math.floor(c.byteLength/4))}function sc(...c){for(let $=0;$<c.length;$++)c[$].fill(0)}function hM(c){return new DataView(c.buffer,c.byteOffset,c.byteLength)}var MB=(()=>new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68)();function yM(c,$){return c.buffer===$.buffer&&c.byteOffset<$.byteOffset+$.byteLength&&$.byteOffset<c.byteOffset+c.byteLength}function mm(c,$){if(yM(c,$)&&c.byteOffset<$.byteOffset)throw Error("complex overlap of input and output is not supported")}function oM(c,$){if($==null||typeof $!=="object")throw Error("options must be defined");return Object.assign(c,$)}function BJ(c,$){if(c.length!==$.length)return!1;let Q=0;for(let J=0;J<c.length;J++)Q|=c[J]^$[J];return Q===0}var HJ=(c,$)=>{function Q(J,...Y){if(Ac(J,void 0,"key"),!MB)throw Error("Non little-endian hardware is not yet supported");if(c.nonceLength!==void 0){let x=Y[0];Ac(x,c.varSizeNonce?void 0:c.nonceLength,"nonce")}let X=c.tagLength;if(X&&Y[1]!==void 0)Ac(Y[1],void 0,"AAD");let W=$(J,...Y),m=(x,q)=>{if(q!==void 0){if(x!==2)throw Error("cipher output not supported");Ac(q,void 0,"output")}},G=!1;return{encrypt(x,q){if(G)throw Error("cannot encrypt() twice with same key + nonce");return G=!0,Ac(x),m(W.encrypt.length,q),W.encrypt(x,q)},decrypt(x,q){if(Ac(x),X&&x.length<X)throw Error('"ciphertext" expected length bigger than tagLength='+X);return m(W.decrypt.length,q),W.decrypt(x,q)}}}return Object.assign(Q,c),Q};function qQ(c,$,Q=!0){if($===void 0)return new Uint8Array(c);if($.length!==c)throw Error('"output" expected Uint8Array of length '+c+", got: "+$.length);if(Q&&!i$($))throw Error("invalid output, must be aligned");return $}function Gm(c,$,Q){JX(Q);let J=new Uint8Array(16),Y=hM(J);return Y.setBigUint64(0,BigInt($),Q),Y.setBigUint64(8,BigInt(c),Q),J}function i$(c){return c.byteOffset%4===0}function _0(c){return Uint8Array.from(c)}var lc=16;var VB=283;function dM(c){if(![16,24,32].includes(c.length))throw Error('"aes key" expected Uint8Array of length 16/24/32, got length='+c.length)}function Nm(c){return c<<1^VB&-(c>>7)}function MQ(c,$){let Q=0;for(;$>0;$>>=1)Q^=c&-($&1),c=Nm(c);return Q}var qm=(()=>{let c=new Uint8Array(256);for(let Q=0,J=1;Q<256;Q++,J^=Nm(J))c[Q]=J;let $=new Uint8Array(256);$[0]=99;for(let Q=0;Q<255;Q++){let J=c[255-Q];J|=J<<8,$[c[Q]]=(J^J>>4^J>>5^J>>6^J>>7^99)&255}return sc(c),$})(),wB=qm.map((c,$)=>qm.indexOf($)),iB=(c)=>c<<24|c>>>8,zm=(c)=>c<<8|c>>>24;function sM(c,$){if(c.length!==256)throw Error("Wrong sbox length");let Q=new Uint32Array(256).map((z,x)=>$(c[x])),J=Q.map(zm),Y=J.map(zm),X=Y.map(zm),W=new Uint32Array(65536),m=new Uint32Array(65536),G=new Uint16Array(65536);for(let z=0;z<256;z++)for(let x=0;x<256;x++){let q=z*256+x;W[q]=Q[z]^J[x],m[q]=Y[z]^X[x],G[q]=c[z]<<8|c[x]}return{sbox:c,sbox2:G,T0:Q,T1:J,T2:Y,T3:X,T01:W,T23:m}}var Vm=sM(qm,(c)=>MQ(c,3)<<24|c<<16|c<<8|MQ(c,2)),rM=sM(wB,(c)=>MQ(c,11)<<24|MQ(c,13)<<16|MQ(c,9)<<8|MQ(c,14)),vB=(()=>{let c=new Uint8Array(16);for(let $=0,Q=1;$<16;$++,Q=Nm(Q))c[$]=Q;return c})();function wm(c){Ac(c);let $=c.length;dM(c);let{sbox2:Q}=Vm,J=[];if(!i$(c))J.push(c=_0(c));let Y=nc(c),X=Y.length,W=(G)=>c8(Q,G,G,G,G),m=new Uint32Array($+28);m.set(Y);for(let G=X;G<m.length;G++){let z=m[G-1];if(G%X===0)z=W(iB(z))^vB[G/X-1];else if(X>6&&G%X===4)z=W(z);m[G]=m[G-X]^z}return sc(...J),m}function UB(c){let $=wm(c),Q=$.slice(),J=$.length,{sbox2:Y}=Vm,{T0:X,T1:W,T2:m,T3:G}=rM;for(let z=0;z<J;z+=4)for(let x=0;x<4;x++)Q[z+x]=$[J-z-4+x];sc($);for(let z=4;z<J-4;z++){let x=Q[z],q=c8(Y,x,x,x,x);Q[z]=X[q&255]^W[q>>>8&255]^m[q>>>16&255]^G[q>>>24]}return Q}function f8(c,$,Q,J,Y,X){return c[Q<<8&65280|J>>>8&255]^$[Y>>>8&65280|X>>>24&255]}function c8(c,$,Q,J,Y){return c[$&255|Q&65280]|c[J>>>16&255|Y>>>16&65280]<<16}function Mm(c,$,Q,J,Y){let{sbox2:X,T01:W,T23:m}=Vm,G=0;$^=c[G++],Q^=c[G++],J^=c[G++],Y^=c[G++];let z=c.length/4-2;for(let w=0;w<z;w++){let U=c[G++]^f8(W,m,$,Q,J,Y),v=c[G++]^f8(W,m,Q,J,Y,$),i=c[G++]^f8(W,m,J,Y,$,Q),j=c[G++]^f8(W,m,Y,$,Q,J);$=U,Q=v,J=i,Y=j}let x=c[G++]^c8(X,$,Q,J,Y),q=c[G++]^c8(X,Q,J,Y,$),M=c[G++]^c8(X,J,Y,$,Q),N=c[G++]^c8(X,Y,$,Q,J);return{s0:x,s1:q,s2:M,s3:N}}function jB(c,$,Q,J,Y){let{sbox2:X,T01:W,T23:m}=rM,G=0;$^=c[G++],Q^=c[G++],J^=c[G++],Y^=c[G++];let z=c.length/4-2;for(let w=0;w<z;w++){let U=c[G++]^f8(W,m,$,Y,J,Q),v=c[G++]^f8(W,m,Q,$,Y,J),i=c[G++]^f8(W,m,J,Q,$,Y),j=c[G++]^f8(W,m,Y,J,Q,$);$=U,Q=v,J=i,Y=j}let x=c[G++]^c8(X,$,Y,J,Q),q=c[G++]^c8(X,Q,$,Y,J),M=c[G++]^c8(X,J,Q,$,Y),N=c[G++]^c8(X,Y,J,Q,$);return{s0:x,s1:q,s2:M,s3:N}}function KB(c){if(Ac(c),c.length%lc!==0)throw Error("aes-(cbc/ecb).decrypt ciphertext should consist of blocks with size "+lc)}function DB(c,$,Q){Ac(c);let J=c.length,Y=J%lc;if(!$&&Y!==0)throw Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");if(!i$(c))c=_0(c);let X=nc(c);if($){let m=lc-Y;if(!m)m=lc;J=J+m}Q=qQ(J,Q),mm(c,Q);let W=nc(Q);return{b:X,o:W,out:Q}}function BB(c,$){if(!$)return c;let Q=c.length;if(!Q)throw Error("aes/pcks5: empty ciphertext not allowed");let J=c[Q-1];if(J<=0||J>16)throw Error("aes/pcks5: wrong padding");let Y=c.subarray(0,-J);for(let X=0;X<J;X++)if(c[Q-X-1]!==J)throw Error("aes/pcks5: wrong padding");return Y}function HB(c){let $=new Uint8Array(16),Q=nc($);$.set(c);let J=lc-c.length;for(let Y=lc-J;Y<lc;Y++)$[Y]=J;return Q}var im=HJ({blockSize:16,nonceLength:16},function($,Q,J={}){let Y=!J.disablePadding;return{encrypt(X,W){let m=wm($),{b:G,o:z,out:x}=DB(X,Y,W),q=Q,M=[m];if(!i$(q))M.push(q=_0(q));let N=nc(q),w=N[0],U=N[1],v=N[2],i=N[3],j=0;for(;j+4<=G.length;)w^=G[j+0],U^=G[j+1],v^=G[j+2],i^=G[j+3],{s0:w,s1:U,s2:v,s3:i}=Mm(m,w,U,v,i),z[j++]=w,z[j++]=U,z[j++]=v,z[j++]=i;if(Y){let D=HB(X.subarray(j*4));w^=D[0],U^=D[1],v^=D[2],i^=D[3],{s0:w,s1:U,s2:v,s3:i}=Mm(m,w,U,v,i),z[j++]=w,z[j++]=U,z[j++]=v,z[j++]=i}return sc(...M),x},decrypt(X,W){KB(X);let m=UB($),G=Q,z=[m];if(!i$(G))z.push(G=_0(G));let x=nc(G);if(W=qQ(X.length,W),!i$(X))z.push(X=_0(X));mm(X,W);let q=nc(X),M=nc(W),N=x[0],w=x[1],U=x[2],v=x[3];for(let i=0;i+4<=q.length;){let j=N,D=w,_=U,mc=v;N=q[i+0],w=q[i+1],U=q[i+2],v=q[i+3];let{s0:d,s1:Jc,s2:u,s3:a}=jB(m,N,w,U,v);M[i++]=d^j,M[i++]=Jc^D,M[i++]=u^_,M[i++]=a^mc}return sc(...z),BB(W,Y)}}});function OB(c){return c instanceof Uint32Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint32Array"}function xm(c,$){if(Ac($,16,"block"),!OB(c))throw Error("_encryptBlock accepts result of expandKeyLE");let Q=nc($),{s0:J,s1:Y,s2:X,s3:W}=Mm(c,Q[0],Q[1],Q[2],Q[3]);return Q[0]=J,Q[1]=Y,Q[2]=X,Q[3]=W,$}function gM(c){let $=0;for(let Q=lc-1;Q>=0;Q--){let J=(c[Q]&128)>>>7;c[Q]=c[Q]<<1|$,$=J}if($)c[lc-1]^=135;return c}function YX(c,$){if(c.length!==$.length)throw Error("xorBlock: blocks must have same length");for(let Q=0;Q<c.length;Q++)c[Q]=c[Q]^$[Q];return c}class vm{buffer;destroyed;k1;k2;xk;constructor(c){Ac(c),dM(c),this.xk=wm(c),this.buffer=new Uint8Array(0),this.destroyed=!1;let $=new Uint8Array(lc);xm(this.xk,$),this.k1=gM($),this.k2=gM(new Uint8Array(this.k1))}update(c){let{destroyed:$,buffer:Q}=this;if($)throw Error("CMAC instance was destroyed");Ac(c);let J=new Uint8Array(Q.length+c.length);return J.set(Q),J.set(c,Q.length),this.buffer=J,this}digest(){if(this.destroyed)throw Error("CMAC instance was destroyed");let{buffer:c}=this,$=c.length,Q=Math.ceil($/lc),J;if(Q===0)Q=1,J=!1;else J=$%lc===0;let Y=(Q-1)*lc,X=c.subarray(Y),W;if(J)W=YX(new Uint8Array(X),this.k1);else{let G=new Uint8Array(lc);G.set(X),G[X.length]=128,W=YX(G,this.k2)}let m=new Uint8Array(lc);for(let G=0;G<Q-1;G++){let z=c.subarray(G*lc,(G+1)*lc);YX(m,z),xm(this.xk,m)}return YX(m,W),xm(this.xk,m),sc(W),m}destroy(){let{buffer:c,destroyed:$,xk:Q,k1:J,k2:Y}=this;if($)return;this.destroyed=!0,sc(c,Q,J,Y)}}var RB=(c,$)=>new vm(c).update($).digest();RB.create=(c)=>new vm(c);var eM=(c)=>Uint8Array.from(c.split(""),($)=>$.charCodeAt(0)),pB=eM("expand 16-byte k"),ZB=eM("expand 32-byte k"),IB=nc(pB),LB=nc(ZB);function h(c,$){return c<<$|c>>>32-$}function Um(c){return c.byteOffset%4===0}var XX=64,_B=16,cN=4294967295,tM=Uint32Array.of();function SB(c,$,Q,J,Y,X,W,m){let G=Y.length,z=new Uint8Array(XX),x=nc(z),q=Um(Y)&&Um(X),M=q?nc(Y):tM,N=q?nc(X):tM;for(let w=0;w<G;W++){if(c($,Q,J,x,W,m),W>=cN)throw Error("arx: counter overflow");let U=Math.min(XX,G-w);if(q&&U===XX){let v=w/4;if(w%4!==0)throw Error("arx: invalid block position");for(let i=0,j;i<_B;i++)j=v+i,N[j]=M[j]^x[i];w+=XX;continue}for(let v=0,i;v<U;v++)i=w+v,X[i]=Y[i]^z[v];w+=U}}function jm(c,$){let{allowShortKeys:Q,extendNonceFn:J,counterLength:Y,counterRight:X,rounds:W}=oM({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},$);if(typeof c!=="function")throw Error("core must be a function");return DJ(Y),DJ(W),JX(X),JX(Q),(m,G,z,x,q=0)=>{Ac(m,void 0,"key"),Ac(G,void 0,"nonce"),Ac(z,void 0,"data");let M=z.length;if(x===void 0)x=new Uint8Array(M);if(Ac(x,void 0,"output"),DJ(q),q<0||q>=cN)throw Error("arx: counter overflow");if(x.length<M)throw Error(`arx: output (${x.length}) is shorter than data (${M})`);let N=[],w=m.length,U,v;if(w===32)N.push(U=_0(m)),v=LB;else if(w===16&&Q)U=new Uint8Array(32),U.set(m),U.set(m,16),v=IB,N.push(U);else throw Ac(m,32,"arx key"),Error("invalid key size");if(!Um(G))N.push(G=_0(G));let i=nc(U);if(J){if(G.length!==24)throw Error("arx: extended nonce must be 24 bytes");J(v,i,nc(G.subarray(0,16)),i),G=G.subarray(16)}let j=16-Y;if(j!==G.length)throw Error(`arx: nonce must be ${j} or 16 bytes`);if(j!==12){let _=new Uint8Array(12);_.set(G,X?0:12-G.length),G=_,N.push(G)}let D=nc(G);return SB(c,v,i,D,z,x,q,W),sc(...N),x}}function rc(c,$){return c[$++]&255|(c[$++]&255)<<8}class $N{blockLen=16;outputLen=16;buffer=new Uint8Array(16);r=new Uint16Array(10);h=new Uint16Array(10);pad=new Uint16Array(8);pos=0;finished=!1;constructor(c){c=_0(Ac(c,32,"key"));let $=rc(c,0),Q=rc(c,2),J=rc(c,4),Y=rc(c,6),X=rc(c,8),W=rc(c,10),m=rc(c,12),G=rc(c,14);this.r[0]=$&8191,this.r[1]=($>>>13|Q<<3)&8191,this.r[2]=(Q>>>10|J<<6)&7939,this.r[3]=(J>>>7|Y<<9)&8191,this.r[4]=(Y>>>4|X<<12)&255,this.r[5]=X>>>1&8190,this.r[6]=(X>>>14|W<<2)&8191,this.r[7]=(W>>>11|m<<5)&8065,this.r[8]=(m>>>8|G<<8)&8191,this.r[9]=G>>>5&127;for(let z=0;z<8;z++)this.pad[z]=rc(c,16+2*z)}process(c,$,Q=!1){let J=Q?0:2048,{h:Y,r:X}=this,W=X[0],m=X[1],G=X[2],z=X[3],x=X[4],q=X[5],M=X[6],N=X[7],w=X[8],U=X[9],v=rc(c,$+0),i=rc(c,$+2),j=rc(c,$+4),D=rc(c,$+6),_=rc(c,$+8),mc=rc(c,$+10),d=rc(c,$+12),Jc=rc(c,$+14),u=Y[0]+(v&8191),a=Y[1]+((v>>>13|i<<3)&8191),Xc=Y[2]+((i>>>10|j<<6)&8191),e=Y[3]+((j>>>7|D<<9)&8191),B=Y[4]+((D>>>4|_<<12)&8191),C=Y[5]+(_>>>1&8191),K=Y[6]+((_>>>14|mc<<2)&8191),R=Y[7]+((mc>>>11|d<<5)&8191),S=Y[8]+((d>>>8|Jc<<8)&8191),I=Y[9]+(Jc>>>5|J),H=0,A=H+u*W+a*(5*U)+Xc*(5*w)+e*(5*N)+B*(5*M);H=A>>>13,A&=8191,A+=C*(5*q)+K*(5*x)+R*(5*z)+S*(5*G)+I*(5*m),H+=A>>>13,A&=8191;let b=H+u*m+a*W+Xc*(5*U)+e*(5*w)+B*(5*N);H=b>>>13,b&=8191,b+=C*(5*M)+K*(5*q)+R*(5*x)+S*(5*z)+I*(5*G),H+=b>>>13,b&=8191;let P=H+u*G+a*m+Xc*W+e*(5*U)+B*(5*w);H=P>>>13,P&=8191,P+=C*(5*N)+K*(5*M)+R*(5*q)+S*(5*x)+I*(5*z),H+=P>>>13,P&=8191;let r=H+u*z+a*G+Xc*m+e*W+B*(5*U);H=r>>>13,r&=8191,r+=C*(5*w)+K*(5*N)+R*(5*M)+S*(5*q)+I*(5*x),H+=r>>>13,r&=8191;let Yc=H+u*x+a*z+Xc*G+e*m+B*W;H=Yc>>>13,Yc&=8191,Yc+=C*(5*U)+K*(5*w)+R*(5*N)+S*(5*M)+I*(5*q),H+=Yc>>>13,Yc&=8191;let cc=H+u*q+a*x+Xc*z+e*G+B*m;H=cc>>>13,cc&=8191,cc+=C*W+K*(5*U)+R*(5*w)+S*(5*N)+I*(5*M),H+=cc>>>13,cc&=8191;let Oc=H+u*M+a*q+Xc*x+e*z+B*G;H=Oc>>>13,Oc&=8191,Oc+=C*m+K*W+R*(5*U)+S*(5*w)+I*(5*N),H+=Oc>>>13,Oc&=8191;let o=H+u*N+a*M+Xc*q+e*x+B*z;H=o>>>13,o&=8191,o+=C*G+K*m+R*W+S*(5*U)+I*(5*w),H+=o>>>13,o&=8191;let Dc=H+u*w+a*N+Xc*M+e*q+B*x;H=Dc>>>13,Dc&=8191,Dc+=C*z+K*G+R*m+S*W+I*(5*U),H+=Dc>>>13,Dc&=8191;let Uc=H+u*U+a*w+Xc*N+e*M+B*q;H=Uc>>>13,Uc&=8191,Uc+=C*x+K*z+R*G+S*m+I*W,H+=Uc>>>13,Uc&=8191,H=(H<<2)+H|0,H=H+A|0,A=H&8191,H=H>>>13,b+=H,Y[0]=A,Y[1]=b,Y[2]=P,Y[3]=r,Y[4]=Yc,Y[5]=cc,Y[6]=Oc,Y[7]=o,Y[8]=Dc,Y[9]=Uc}finalize(){let{h:c,pad:$}=this,Q=new Uint16Array(10),J=c[1]>>>13;c[1]&=8191;for(let W=2;W<10;W++)c[W]+=J,J=c[W]>>>13,c[W]&=8191;c[0]+=J*5,J=c[0]>>>13,c[0]&=8191,c[1]+=J,J=c[1]>>>13,c[1]&=8191,c[2]+=J,Q[0]=c[0]+5,J=Q[0]>>>13,Q[0]&=8191;for(let W=1;W<10;W++)Q[W]=c[W]+J,J=Q[W]>>>13,Q[W]&=8191;Q[9]-=8192;let Y=(J^1)-1;for(let W=0;W<10;W++)Q[W]&=Y;Y=~Y;for(let W=0;W<10;W++)c[W]=c[W]&Y|Q[W];c[0]=(c[0]|c[1]<<13)&65535,c[1]=(c[1]>>>3|c[2]<<10)&65535,c[2]=(c[2]>>>6|c[3]<<7)&65535,c[3]=(c[3]>>>9|c[4]<<4)&65535,c[4]=(c[4]>>>12|c[5]<<1|c[6]<<14)&65535,c[5]=(c[6]>>>2|c[7]<<11)&65535,c[6]=(c[7]>>>5|c[8]<<8)&65535,c[7]=(c[8]>>>8|c[9]<<5)&65535;let X=c[0]+$[0];c[0]=X&65535;for(let W=1;W<8;W++)X=(c[W]+$[W]|0)+(X>>>16)|0,c[W]=X&65535;sc(Q)}update(c){Wm(this),Ac(c),c=_0(c);let{buffer:$,blockLen:Q}=this,J=c.length;for(let Y=0;Y<J;){let X=Math.min(Q-this.pos,J-Y);if(X===Q){for(;Q<=J-Y;Y+=Q)this.process(c,Y);continue}if($.set(c.subarray(Y,Y+X),this.pos),this.pos+=X,Y+=X,this.pos===Q)this.process($,0,!1),this.pos=0}return this}destroy(){sc(this.h,this.r,this.buffer,this.pad)}digestInto(c){Wm(this),lM(c,this),this.finished=!0;let{buffer:$,h:Q}=this,{pos:J}=this;if(J){$[J++]=1;for(;J<16;J++)$[J]=0;this.process($,0,!0)}this.finalize();let Y=0;for(let X=0;X<8;X++)c[Y++]=Q[X]>>>0,c[Y++]=Q[X]>>>8;return c}digest(){let{buffer:c,outputLen:$}=this;this.digestInto(c);let Q=c.slice(0,$);return this.destroy(),Q}}function AB(c){let $=(J,Y)=>c(Y).update(J).digest(),Q=c(new Uint8Array(32));return $.outputLen=Q.outputLen,$.blockLen=Q.blockLen,$.create=(J)=>c(J),$}var QN=(()=>AB((c)=>new $N(c)))();function XN(c,$,Q,J,Y,X=20){let W=c[0],m=c[1],G=c[2],z=c[3],x=$[0],q=$[1],M=$[2],N=$[3],w=$[4],U=$[5],v=$[6],i=$[7],j=Y,D=Q[0],_=Q[1],mc=Q[2],d=W,Jc=m,u=G,a=z,Xc=x,e=q,B=M,C=N,K=w,R=U,S=v,I=i,H=j,A=D,b=_,P=mc;for(let Yc=0;Yc<X;Yc+=2)d=d+Xc|0,H=h(H^d,16),K=K+H|0,Xc=h(Xc^K,12),d=d+Xc|0,H=h(H^d,8),K=K+H|0,Xc=h(Xc^K,7),Jc=Jc+e|0,A=h(A^Jc,16),R=R+A|0,e=h(e^R,12),Jc=Jc+e|0,A=h(A^Jc,8),R=R+A|0,e=h(e^R,7),u=u+B|0,b=h(b^u,16),S=S+b|0,B=h(B^S,12),u=u+B|0,b=h(b^u,8),S=S+b|0,B=h(B^S,7),a=a+C|0,P=h(P^a,16),I=I+P|0,C=h(C^I,12),a=a+C|0,P=h(P^a,8),I=I+P|0,C=h(C^I,7),d=d+e|0,P=h(P^d,16),S=S+P|0,e=h(e^S,12),d=d+e|0,P=h(P^d,8),S=S+P|0,e=h(e^S,7),Jc=Jc+B|0,H=h(H^Jc,16),I=I+H|0,B=h(B^I,12),Jc=Jc+B|0,H=h(H^Jc,8),I=I+H|0,B=h(B^I,7),u=u+C|0,A=h(A^u,16),K=K+A|0,C=h(C^K,12),u=u+C|0,A=h(A^u,8),K=K+A|0,C=h(C^K,7),a=a+Xc|0,b=h(b^a,16),R=R+b|0,Xc=h(Xc^R,12),a=a+Xc|0,b=h(b^a,8),R=R+b|0,Xc=h(Xc^R,7);let r=0;J[r++]=W+d|0,J[r++]=m+Jc|0,J[r++]=G+u|0,J[r++]=z+a|0,J[r++]=x+Xc|0,J[r++]=q+e|0,J[r++]=M+B|0,J[r++]=N+C|0,J[r++]=w+K|0,J[r++]=U+R|0,J[r++]=v+S|0,J[r++]=i+I|0,J[r++]=j+H|0,J[r++]=D+A|0,J[r++]=_+b|0,J[r++]=mc+P|0}function CB(c,$,Q,J){let Y=c[0],X=c[1],W=c[2],m=c[3],G=$[0],z=$[1],x=$[2],q=$[3],M=$[4],N=$[5],w=$[6],U=$[7],v=Q[0],i=Q[1],j=Q[2],D=Q[3];for(let mc=0;mc<20;mc+=2)Y=Y+G|0,v=h(v^Y,16),M=M+v|0,G=h(G^M,12),Y=Y+G|0,v=h(v^Y,8),M=M+v|0,G=h(G^M,7),X=X+z|0,i=h(i^X,16),N=N+i|0,z=h(z^N,12),X=X+z|0,i=h(i^X,8),N=N+i|0,z=h(z^N,7),W=W+x|0,j=h(j^W,16),w=w+j|0,x=h(x^w,12),W=W+x|0,j=h(j^W,8),w=w+j|0,x=h(x^w,7),m=m+q|0,D=h(D^m,16),U=U+D|0,q=h(q^U,12),m=m+q|0,D=h(D^m,8),U=U+D|0,q=h(q^U,7),Y=Y+z|0,D=h(D^Y,16),w=w+D|0,z=h(z^w,12),Y=Y+z|0,D=h(D^Y,8),w=w+D|0,z=h(z^w,7),X=X+x|0,v=h(v^X,16),U=U+v|0,x=h(x^U,12),X=X+x|0,v=h(v^X,8),U=U+v|0,x=h(x^U,7),W=W+q|0,i=h(i^W,16),M=M+i|0,q=h(q^M,12),W=W+q|0,i=h(i^W,8),M=M+i|0,q=h(q^M,7),m=m+G|0,j=h(j^m,16),N=N+j|0,G=h(G^N,12),m=m+G|0,j=h(j^m,8),N=N+j|0,G=h(G^N,7);let _=0;J[_++]=Y,J[_++]=X,J[_++]=W,J[_++]=m,J[_++]=v,J[_++]=i,J[_++]=j,J[_++]=D}var WX=jm(XN,{counterRight:!1,counterLength:4,allowShortKeys:!1}),PB=jm(XN,{counterRight:!1,counterLength:8,extendNonceFn:CB,allowShortKeys:!1});var EB=new Uint8Array(16),JN=(c,$)=>{c.update($);let Q=$.length%16;if(Q)c.update(EB.subarray(Q))},bB=new Uint8Array(32);function YN(c,$,Q,J,Y){if(Y!==void 0)Ac(Y,void 0,"AAD");let X=c($,Q,bB),W=Gm(J.length,Y?Y.length:0,!0),m=QN.create(X);if(Y)JN(m,Y);JN(m,J),m.update(W);let G=m.digest();return sc(X,W),G}var WN=(c)=>($,Q,J)=>{return{encrypt(X,W){let m=X.length;W=qQ(m+16,W,!1),W.set(X);let G=W.subarray(0,-16);c($,Q,G,G,1);let z=YN(c,$,Q,G,J);return W.set(z,m),sc(z),W},decrypt(X,W){W=qQ(X.length-16,W,!1);let m=X.subarray(0,-16),G=X.subarray(-16),z=YN(c,$,Q,m,J);if(!BJ(G,z))throw Error("invalid tag");return W.set(X.subarray(0,-16)),c($,Q,W,W,1),sc(z),W}}},zF=HJ({blockSize:64,nonceLength:12,tagLength:16},WN(WX)),xF=HJ({blockSize:64,nonceLength:24,tagLength:16},WN(PB));function GN(c,$,Q){if(x$(c),Q===void 0)Q=new Uint8Array(c.outputLen);return E8(c,Q,$)}var Km=Uint8Array.of(0),mN=Uint8Array.of();function zN(c,$,Q,J=32){x$(c),Z0(J,"length");let Y=c.outputLen;if(J>255*Y)throw Error("Length must be <= 255*HashLen");let X=Math.ceil(J/Y);if(Q===void 0)Q=mN;else vc(Q,void 0,"info");let W=new Uint8Array(X*Y),m=E8.create(c,$),G=m._cloneInto(),z=new Uint8Array(m.outputLen);for(let x=0;x<X;x++)Km[0]=x+1,G.update(x===0?mN:z).update(Q).update(Km).digestInto(z),W.set(z,Y*x),m._cloneInto(G);return m.destroy(),G.destroy(),h0(z,Km),W.slice(0,J)}var FB=Object.defineProperty,Sc=(c,$)=>{for(var Q in $)FB(c,Q,{get:$[Q],enumerable:!0})},TB={};Sc(TB,{binarySearch:()=>Zm,bytesToHex:()=>Hc,hexToBytes:()=>Rc,insertEventIntoAscendingList:()=>nB,insertEventIntoDescendingList:()=>fB,isHex32:()=>q0,mergeReverseSortedLists:()=>uB,normalizeURL:()=>wN,utf8Decoder:()=>i8,utf8Encoder:()=>S0});var i8=new TextDecoder("utf-8"),S0=new TextEncoder;function wN(c){try{if(c.indexOf("://")===-1)c="wss://"+c;let $=new URL(c);if($.protocol==="http:")$.protocol="ws:";else if($.protocol==="https:")$.protocol="wss:";if($.pathname=$.pathname.replace(/\/+/g,"/"),$.pathname.endsWith("/"))$.pathname=$.pathname.slice(0,-1);if($.port==="80"&&$.protocol==="ws:"||$.port==="443"&&$.protocol==="wss:")$.port="";return $.searchParams.sort(),$.hash="",$.toString()}catch($){throw Error(`Invalid URL: ${c}`)}}function fB(c,$){let[Q,J]=Zm(c,(Y)=>{if($.id===Y.id)return 0;if($.created_at===Y.created_at)return-1;return Y.created_at-$.created_at});if(!J)c.splice(Q,0,$);return c}function nB(c,$){let[Q,J]=Zm(c,(Y)=>{if($.id===Y.id)return 0;if($.created_at===Y.created_at)return-1;return $.created_at-Y.created_at});if(!J)c.splice(Q,0,$);return c}function Zm(c,$){let Q=0,J=c.length-1;while(Q<=J){let Y=Math.floor((Q+J)/2),X=$(c[Y]);if(X===0)return[Y,!0];if(X<0)J=Y-1;else Q=Y+1}return[Q,!1]}function uB(c,$){let Q=Array(c.length+$.length);Q.length=0;let J=0,Y=0,X=[];while(J<c.length&&Y<$.length){let W;if(c[J]?.created_at>$[Y]?.created_at)W=c[J],J++;else W=$[Y],Y++;if(Q.length>0&&Q[Q.length-1].created_at===W.created_at){if(X.includes(W.id))continue}else X.length=0;Q.push(W),X.push(W.id)}while(J<c.length){let W=c[J];if(J++,Q.length>0&&Q[Q.length-1].created_at===W.created_at){if(X.includes(W.id))continue}else X.length=0;Q.push(W),X.push(W.id)}while(Y<$.length){let W=$[Y];if(Y++,Q.length>0&&Q[Q.length-1].created_at===W.created_at){if(X.includes(W.id))continue}else X.length=0;Q.push(W),X.push(W.id)}return Q}function q0(c){for(let $=0;$<64;$++){let Q=c.charCodeAt($);if(isNaN(Q)||Q<48||Q>102||Q>57&&Q<97)return!1}return!0}var NQ=Symbol("verified"),kB=(c)=>c instanceof Object;function Im(c){if(!kB(c))return!1;if(typeof c.kind!=="number")return!1;if(typeof c.content!=="string")return!1;if(typeof c.created_at!=="number")return!1;if(typeof c.pubkey!=="string")return!1;if(!q0(c.pubkey))return!1;if(!Array.isArray(c.tags))return!1;for(let $=0;$<c.tags.length;$++){let Q=c.tags[$];if(!Array.isArray(Q))return!1;for(let J=0;J<Q.length;J++)if(typeof Q[J]!=="string")return!1}return!0}var aB=class{generateSecretKey(){return xQ.utils.randomSecretKey()}getPublicKey(c){return Hc(xQ.getPublicKey(c))}finalizeEvent(c,$){let Q=c;return Q.pubkey=Hc(xQ.getPublicKey($)),Q.id=GX(Q),Q.sig=Hc(xQ.sign(Rc(GX(Q)),$)),Q[NQ]=!0,Q}verifyEvent(c){if(typeof c[NQ]==="boolean")return c[NQ];try{let $=GX(c);if($!==c.id)return c[NQ]=!1,!1;let Q=xQ.verify(Rc(c.sig),Rc($),Rc(c.pubkey));return c[NQ]=Q,Q}catch($){return c[NQ]=!1,!1}}};function lB(c){if(!Im(c))throw Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,c.pubkey,c.created_at,c.kind,c.tags,c.content])}function GX(c){let $=Q0(S0.encode(lB(c)));return Hc($)}var qX=new aB,hB=qX.generateSecretKey,OJ=qX.getPublicKey,A0=qX.finalizeEvent,RJ=qX.verifyEvent,yB={};Sc(yB,{AIEmbeddings:()=>nH,AppCurationSet:()=>DR,Application:()=>jR,AuthoredPodcasts:()=>nO,BadgeAward:()=>cH,BadgeDefinition:()=>mR,Bid:()=>wH,BidConfirmation:()=>iH,BlobsAuth:()=>tO,BlockedRelaysList:()=>BO,BlossomServerList:()=>EO,BookmarkList:()=>jO,Bookmarksets:()=>QR,Calendar:()=>TR,CalendarEventRSVP:()=>fR,CashuMintAnnouncement:()=>sR,CashuWalletEvent:()=>gO,CashuWalletHistory:()=>tH,CashuWalletTokens:()=>rH,ChannelCreation:()=>DN,ChannelHideMessage:()=>ON,ChannelMessage:()=>HN,ChannelMetadata:()=>BN,ChannelMuteUser:()=>RN,ChatMessage:()=>$H,Chess:()=>MH,ClassifiedListing:()=>ZR,ClientAuth:()=>ZN,CodeSnippet:()=>RH,CoinjoinPool:()=>aH,Comment:()=>KH,CommunitiesList:()=>KO,CommunityDefinition:()=>yR,CommunityPostApproval:()=>yH,ConferenceEvent:()=>OR,Contacts:()=>rB,CreateOrUpdateProduct:()=>xR,CreateOrUpdateStall:()=>zR,CuratedVideoSets:()=>YR,Curationsets:()=>JR,Date:()=>bR,DecoupledEncryptionKeyDistribution:()=>hH,DecoupledKeyAnnouncement:()=>AO,DecoupledKeyClientAnnouncement:()=>lH,DirectMessageRelaysList:()=>CO,DraftClassifiedListing:()=>IR,DraftEvent:()=>CR,DraftLong:()=>VR,Emojisets:()=>wR,EncryptedDirectMessage:()=>tB,EventDeletion:()=>eB,FavoriteFollowSets:()=>_O,FavoritePodcasts:()=>PO,FavoriteRelays:()=>RO,FedimintAnnouncement:()=>rR,Feed:()=>ER,FileMessage:()=>XH,FileMetadata:()=>UH,FileServerPreference:()=>bO,Followsets:()=>eO,ForumThread:()=>JH,GenericRepost:()=>Cm,Genericlists:()=>cR,GeocacheListing:()=>gR,GeocacheLog:()=>eH,GeocacheLogEntry:()=>dR,GeocacheProofOfFind:()=>cO,GiftWrap:()=>pN,GitPullRequest:()=>ZH,GitPullRequestUpdate:()=>IH,GoodWikiAuthorList:()=>FO,GoodWikiRelayList:()=>TO,GroupMetadata:()=>eR,HTTPAuth:()=>Pm,Handlerinformation:()=>kR,Handlerrecommendation:()=>uR,Highlights:()=>wO,InteractiveRoom:()=>HR,InterestsList:()=>ZO,Interestsets:()=>GR,Issue:()=>LH,JobFeedback:()=>dH,JobRequest:()=>oH,JobResult:()=>gH,Label:()=>TH,LegacyNsiteFile:()=>lR,LightningPubRPC:()=>dO,LinkSet:()=>PR,LiveChatMessage:()=>OH,LiveEvent:()=>BR,LongFormArticle:()=>NR,MarketplaceUI:()=>qR,MediaFollows:()=>LO,MediaStarterPacks:()=>Xp,MergeRequests:()=>NH,Metadata:()=>dB,ModularArticleContent:()=>vR,ModularArticleHeader:()=>iR,MuteSets:()=>XR,Mutelist:()=>iO,NWCWalletInfo:()=>yO,NWCWalletRequest:()=>IN,NWCWalletResponse:()=>sO,NormalVideo:()=>GH,NostrConnect:()=>rO,NsiteNamed:()=>oR,NsiteRoot:()=>oO,NutZap:()=>qO,NutZapInfo:()=>IO,OpenTimestamps:()=>vH,Patch:()=>pH,PeerToPeerOrderEvents:()=>tR,Photo:()=>mH,Pinlist:()=>vO,PodcastEpisode:()=>qH,PodcastMetadata:()=>fO,Poll:()=>jH,PollResponse:()=>VH,PrivateDirectMessage:()=>KN,PrivateEventRelayList:()=>pO,ProblemTracker:()=>EH,ProductSoldAsAuction:()=>MR,ProfileBadges:()=>WR,ProxyAnnouncement:()=>lO,PublicChatsList:()=>DO,PublicMessage:()=>xH,Reaction:()=>Am,ReactionToWebsite:()=>WH,RecommendRelay:()=>sB,Redirects:()=>AR,RelayDiscovery:()=>KR,RelayList:()=>UO,RelayMonitorAnnouncement:()=>uO,RelayReview:()=>nR,RelayReviews:()=>fH,Relaysets:()=>$R,ReleaseArtifactSets:()=>UR,Reply:()=>_H,Report:()=>bH,Reporting:()=>FH,RepositoryAnnouncement:()=>LR,RepositoryState:()=>_R,Repost:()=>Sm,ReservedCashuWalletTokens:()=>sH,RoomPresence:()=>kO,Scroll:()=>BH,Seal:()=>jN,SearchRelaysList:()=>HO,ShortTextNote:()=>UN,ShortVideo:()=>zH,SimpleGroupAdmins:()=>cp,SimpleGroupCreateGroup:()=>XO,SimpleGroupCreateInvite:()=>mO,SimpleGroupDeleteEvent:()=>YO,SimpleGroupDeleteGroup:()=>WO,SimpleGroupEditMetadata:()=>JO,SimpleGroupJoinRequest:()=>GO,SimpleGroupLeaveRequest:()=>zO,SimpleGroupList:()=>OO,SimpleGroupLiveKitParticipants:()=>Jp,SimpleGroupMembers:()=>$p,SimpleGroupPutUser:()=>$O,SimpleGroupRemoveUser:()=>QO,SimpleGroupReply:()=>YH,SimpleGroupRoles:()=>Qp,SimpleGroupThreadedReply:()=>QH,SlideSet:()=>pR,SoftwareApplication:()=>aR,StarterPacks:()=>Yp,StatusApplied:()=>AH,StatusClosed:()=>CH,StatusDraft:()=>PH,StatusOpen:()=>SH,TidalLogin:()=>MO,Time:()=>FR,Torrent:()=>uH,TorrentComment:()=>kH,TransportMethodAnnouncement:()=>hO,UserEmojiList:()=>SO,UserGraspList:()=>aO,UserStatuses:()=>RR,VideoViewEvent:()=>hR,Voice:()=>DH,VoiceComment:()=>HH,WebBookmarks:()=>Wp,WikiArticle:()=>SR,Zap:()=>VO,ZapGoal:()=>xO,ZapRequest:()=>NO,classifyKind:()=>oB,isAddressableKind:()=>_m,isEphemeralKind:()=>vN,isKind:()=>gB,isRegularKind:()=>iN,isReplaceableKind:()=>Lm});function iN(c){return c<1e4&&c!==0&&c!==3}function Lm(c){return c===0||c===3||1e4<=c&&c<20000}function vN(c){return 20000<=c&&c<30000}function _m(c){return 30000<=c&&c<40000}function oB(c){if(iN(c))return"regular";if(Lm(c))return"replaceable";if(vN(c))return"ephemeral";if(_m(c))return"parameterized";return"unknown"}function gB(c,$){let Q=$ instanceof Array?$:[$];return Im(c)&&Q.includes(c.kind)||!1}var dB=0,UN=1,sB=2,rB=3,tB=4,eB=5,Sm=6,Am=7,cH=8,$H=9,QH=10,JH=11,YH=12,jN=13,KN=14,XH=15,Cm=16,WH=17,mH=20,GH=21,zH=22,xH=24,DN=40,BN=41,HN=42,ON=43,RN=44,qH=54,MH=64,NH=818,VH=1018,wH=1021,iH=1022,vH=1040,pN=1059,UH=1063,jH=1068,KH=1111,DH=1222,BH=1227,HH=1244,OH=1311,RH=1337,pH=1617,ZH=1618,IH=1619,LH=1621,_H=1622,SH=1630,AH=1631,CH=1632,PH=1633,EH=1971,bH=1984,FH=1984,TH=1985,fH=1986,nH=1987,uH=2003,kH=2004,aH=2022,lH=4454,hH=4455,yH=4550,oH=5999,gH=6999,dH=7000,sH=7374,rH=7375,tH=7376,eH=7516,cO=7517,$O=9000,QO=9001,JO=9002,YO=9005,XO=9007,WO=9008,mO=9009,GO=9021,zO=9022,xO=9041,qO=9321,MO=9467,NO=9734,VO=9735,wO=9802,iO=1e4,vO=10001,UO=10002,jO=10003,KO=10004,DO=10005,BO=10006,HO=10007,OO=10009,RO=10012,pO=10013,ZO=10015,IO=10019,LO=10020,_O=10021,SO=10030,AO=10044,CO=10050,PO=10054,EO=10063,bO=10096,FO=10101,TO=10102,fO=10154,nO=10164,uO=10166,kO=10312,aO=10317,lO=10377,hO=11111,yO=13194,oO=15128,gO=17375,dO=21000,ZN=22242,IN=23194,sO=23195,rO=24133,tO=24242,Pm=27235,eO=30000,cR=30001,$R=30002,QR=30003,JR=30004,YR=30005,XR=30007,WR=30008,mR=30009,GR=30015,zR=30017,xR=30018,qR=30019,MR=30020,NR=30023,VR=30024,wR=30030,iR=30040,vR=30041,UR=30063,jR=30078,KR=30166,DR=30267,BR=30311,HR=30312,OR=30313,RR=30315,pR=30388,ZR=30402,IR=30403,LR=30617,_R=30618,SR=30818,AR=30819,CR=31234,PR=31388,ER=31890,bR=31922,FR=31923,TR=31924,fR=31925,nR=31987,uR=31989,kR=31990,aR=32267,lR=34128,hR=34237,yR=34550,oR=35128,gR=37515,dR=37516,sR=38172,rR=38173,tR=38383,eR=39000,cp=39001,$p=39002,Qp=39003,Jp=39004,Yp=39089,Xp=39092,Wp=39701;function mp(c,$){if(c.ids&&c.ids.indexOf($.id)===-1)return!1;if(c.kinds&&c.kinds.indexOf($.kind)===-1)return!1;if(c.authors&&c.authors.indexOf($.pubkey)===-1)return!1;for(let Q in c)if(Q[0]==="#"){let J=Q.slice(1),Y=c[`#${J}`];if(Y&&!$.tags.find(([X,W])=>X===Q.slice(1)&&Y.indexOf(W)!==-1))return!1}if(c.since&&$.created_at<c.since)return!1;if(c.until&&$.created_at>c.until)return!1;return!0}function Gp(c,$){for(let Q=0;Q<c.length;Q++)if(mp(c[Q],$))return!0;return!1}var zp={};Sc(zp,{getHex64:()=>MX,getInt:()=>LN,getSubscriptionId:()=>_N,matchEventId:()=>xp,matchEventKind:()=>Mp,matchEventPubkey:()=>qp});function MX(c,$){let Q=$.length+3,J=c.indexOf(`"${$}":`)+Q,Y=c.slice(J).indexOf('"')+J+1;return c.slice(Y,Y+64)}function LN(c,$){let Q=$.length,J=c.indexOf(`"${$}":`)+Q+3,Y=c.slice(J),X=Math.min(Y.indexOf(","),Y.indexOf("}"));return parseInt(Y.slice(0,X),10)}function _N(c){let $=c.slice(0,22).indexOf('"EVENT"');if($===-1)return null;let Q=c.slice($+7+1).indexOf('"');if(Q===-1)return null;let J=$+7+1+Q,Y=c.slice(J+1,80).indexOf('"');if(Y===-1)return null;let X=J+1+Y;return c.slice(J+1,X)}function xp(c,$){return $===MX(c,"id")}function qp(c,$){return $===MX(c,"pubkey")}function Mp(c,$){return $===LN(c,"kind")}var Np={};Sc(Np,{makeAuthEvent:()=>SN});function SN(c,$){return{kind:ZN,created_at:Math.floor(Date.now()/1000),tags:[["relay",c],["challenge",$]],content:""}}var pm=class extends Error{constructor(c,$){super(`Tried to send message '${c} on a closed connection to ${$}.`);this.name="SendingOnClosedConnection"}},Vp=class{url;_connected=!1;onclose=null;onnotice=(c)=>console.debug(`NOTICE from ${this.url}: ${c}`);onauth;baseEoseTimeout=4400;publishTimeout=4400;pingFrequency=29000;pingTimeout=20000;resubscribeBackoff=[1e4,1e4,1e4,20000,20000,30000,60000];openSubs=new Map;enablePing;enableReconnect;idleTimeout=0;idleSince=Date.now();ongoingOperations=0;reconnectTimeoutHandle;pingIntervalHandle;reconnectAttempts=0;skipReconnection=!1;idleTimeoutHandle;connectionPromise;openCountRequests=new Map;openEventPublishes=new Map;ws;challenge;authPromise;serial=0;verifyEvent;_WebSocket;constructor(c,$){if(this.url=wN(c),this.verifyEvent=$.verifyEvent,this._WebSocket=$.websocketImplementation||WebSocket,this.enablePing=$.enablePing,this.enableReconnect=$.enableReconnect||!1,$.idleTimeout)this.idleTimeout=$.idleTimeout}static async connect(c,$){let Q=new Vp(c,$);return await Q.connect($),Q}closeAllSubscriptions(c){for(let[$,Q]of this.openSubs)Q.close(c);this.openSubs.clear();for(let[$,Q]of this.openEventPublishes)Q.reject(Error(c));this.openEventPublishes.clear();for(let[$,Q]of this.openCountRequests)Q.reject(Error(c));this.openCountRequests.clear()}get connected(){return this._connected}clearIdleTimeout(){if(this.idleTimeoutHandle)clearTimeout(this.idleTimeoutHandle),this.idleTimeoutHandle=void 0}scheduleIdleClose(){if(this.clearIdleTimeout(),this.idleTimeout>0)this.idleTimeoutHandle=setTimeout(()=>{if(this.ongoingOperations===0&&this.idleSince)this.close()},this.idleTimeout)}async reconnect(){let c=this.resubscribeBackoff[Math.min(this.reconnectAttempts,this.resubscribeBackoff.length-1)];this.reconnectAttempts++,this.reconnectTimeoutHandle=setTimeout(async()=>{try{await this.connect()}catch($){}},c)}handleHardClose(c){if(this.ws)this.ws.onopen=null,this.ws.onerror=null,this.ws.onclose=null;if(this.pingIntervalHandle)clearInterval(this.pingIntervalHandle),this.pingIntervalHandle=void 0;if(this._connected=!1,this.connectionPromise=void 0,this.idleSince=void 0,this.clearIdleTimeout(),this.enableReconnect&&!this.skipReconnection)this.reconnect();else this.onclose?.(),this.closeAllSubscriptions(c)}async connect(c){let $;if(this.connectionPromise)return this.connectionPromise;return this.challenge=void 0,this.authPromise=void 0,this.skipReconnection=!1,this.connectionPromise=new Promise((Q,J)=>{if(c?.timeout)$=setTimeout(()=>{if(J("connection timed out"),this.connectionPromise=void 0,this.reconnectAttempts===0)this.skipReconnection=!0;this.handleHardClose("relay connection timed out")},c.timeout);if(c?.abort)c.abort.onabort=J;try{this.ws=new this._WebSocket(this.url)}catch(Y){clearTimeout($),J(Y);return}this.ws.onopen=()=>{if(this.reconnectTimeoutHandle)clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0;clearTimeout($),this._connected=!0;let Y=this.reconnectAttempts>0;this.reconnectAttempts=0;for(let X of this.openSubs.values()){if(X.eosed=!1,Y){for(let W=0;W<X.filters.length;W++)if(X.lastEmitted)X.filters[W].since=X.lastEmitted+1}X.fire()}if(this.enablePing)this.pingIntervalHandle=setInterval(()=>this.pingpong(),this.pingFrequency);Q()},this.ws.onerror=()=>{if(clearTimeout($),J("connection failed"),this.connectionPromise=void 0,this.reconnectAttempts===0)this.skipReconnection=!0;this.handleHardClose("relay connection failed")},this.ws.onclose=(Y)=>{clearTimeout($),J(Y.message||"websocket closed"),this.handleHardClose("relay connection closed")},this.ws.onmessage=this._onmessage.bind(this)}),this.connectionPromise}waitForPingPong(){return new Promise((c)=>{this.ws.once("pong",()=>c(!0)),this.ws.ping()})}waitForDummyReq(){return new Promise((c,$)=>{if(!this.connectionPromise)return $(Error(`no connection to ${this.url}, can't ping`));try{let Q=this.subscribe([{ids:["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"],limit:0}],{label:"<forced-ping>",oneose:()=>{c(!0),Q.close()},onclose(){c(!0)},eoseTimeout:this.pingTimeout+1000})}catch(Q){$(Q)}})}async pingpong(){if(this.ws?.readyState===1){if(!await Promise.any([this.ws&&this.ws.ping&&this.ws.once?this.waitForPingPong():this.waitForDummyReq(),new Promise(($)=>setTimeout(()=>$(!1),this.pingTimeout))])){if(this.ws?.readyState===this._WebSocket.OPEN)this.ws?.close()}}}async send(c){if(!this.connectionPromise)throw new pm(c,this.url);this.connectionPromise.then(()=>{this.ws?.send(c)})}async auth(c){let $=this.challenge;if(!$)throw Error("can't perform auth, no challenge was received");if(this.authPromise)return this.authPromise;return this.authPromise=new Promise(async(Q,J)=>{try{let Y=await c(SN(this.url,$)),X=setTimeout(()=>{let W=this.openEventPublishes.get(Y.id);if(W)W.reject(Error("auth timed out")),this.openEventPublishes.delete(Y.id)},this.publishTimeout);this.openEventPublishes.set(Y.id,{resolve:Q,reject:J,timeout:X}),this.send('["AUTH",'+JSON.stringify(Y)+"]")}catch(Y){console.warn("subscribe auth function failed:",Y)}}),this.authPromise}async publish(c){this.idleSince=void 0,this.clearIdleTimeout(),this.ongoingOperations++;let $=new Promise((Q,J)=>{let Y=setTimeout(()=>{let X=this.openEventPublishes.get(c.id);if(X)X.reject(Error("publish timed out")),this.openEventPublishes.delete(c.id)},this.publishTimeout);this.openEventPublishes.set(c.id,{resolve:Q,reject:J,timeout:Y})});try{await this.send('["EVENT",'+JSON.stringify(c)+"]")}catch(Q){let J=this.openEventPublishes.get(c.id);if(J)J.reject(Q),this.openEventPublishes.delete(c.id)}if(this.ongoingOperations--,this.ongoingOperations===0)this.idleSince=Date.now(),this.scheduleIdleClose();return $}async count(c,$){return(await this.countWithHLL(c,$)).count}async countWithHLL(c,$){this.serial++;let Q=$?.id||"count:"+this.serial,J=new Promise((Y,X)=>{this.openCountRequests.set(Q,{resolve:Y,reject:X})});try{await this.send('["COUNT","'+Q+'",'+JSON.stringify(c).substring(1))}catch(Y){let X=this.openCountRequests.get(Q);if(X)X.reject(Y),this.openCountRequests.delete(Q)}return J}subscribe(c,$){if($.label!=="<forced-ping>")this.idleSince=void 0,this.clearIdleTimeout(),this.ongoingOperations++;let Q=this.prepareSubscription(c,$);if(Q.fire(),$.abort)$.abort.onabort=()=>Q.close(String($.abort.reason||"<aborted>"));return Q}prepareSubscription(c,$){this.serial++;let Q=$.id||($.label?$.label+":":"sub:")+this.serial,J=new wp(this,Q,c,$);return this.openSubs.set(Q,J),J}close(){if(this.skipReconnection=!0,this.reconnectTimeoutHandle)clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0;if(this.pingIntervalHandle)clearInterval(this.pingIntervalHandle),this.pingIntervalHandle=void 0;if(this.closeAllSubscriptions("relay connection closed by us"),this._connected=!1,this.connectionPromise=void 0,this.idleSince=void 0,this.clearIdleTimeout(),this.onclose?.(),this.ws){if(this.ws.onopen=null,this.ws.onerror=null,this.ws.onclose=null,this.ws.readyState!==this._WebSocket.CLOSING&&this.ws.readyState!==this._WebSocket.CLOSED)this.ws.close()}}_onmessage(c){let $=c.data;if(!$)return;let Q=_N($);if(Q){let J=this.openSubs.get(Q);if(!J)return;let Y=MX($,"id"),X=J.alreadyHaveEvent?.(Y);if(J.receivedEvent?.(this,Y),X)return}try{let J=JSON.parse($);switch(J[0]){case"EVENT":{let Y=this.openSubs.get(J[1]),X=J[2];if(Gp(Y.filters,X)&&this.verifyEvent(X,this.url))Y.onevent(X);else Y.oninvalidevent?.(X);if(!Y.lastEmitted||Y.lastEmitted<X.created_at)Y.lastEmitted=X.created_at;return}case"COUNT":{let Y=J[1],X=J[2],W=this.openCountRequests.get(Y);if(W)W.resolve(X),this.openCountRequests.delete(Y);return}case"EOSE":{let Y=this.openSubs.get(J[1]);if(!Y)return;Y.receivedEose();return}case"OK":{let Y=J[1],X=J[2],W=J[3],m=this.openEventPublishes.get(Y);if(m){if(clearTimeout(m.timeout),X)m.resolve(W);else m.reject(Error(W));this.openEventPublishes.delete(Y)}return}case"CLOSED":{let Y=J[1],X=this.openSubs.get(Y);if(!X){let W=this.openCountRequests.get(Y);if(W)W.reject(Error(J[2])),this.openCountRequests.delete(Y);return}X.closed=!0,X.close(J[2]);return}case"NOTICE":{this.onnotice(J[1]);return}case"AUTH":{if(this.challenge=J[1],this.onauth)this.auth(this.onauth).catch((Y)=>{if(!(Y instanceof pm))throw Y});return}default:{this.openSubs.get(J[1])?.oncustom?.(J);return}}}catch(J){try{let[Y,X,W]=JSON.parse($);console.warn(`[nostr] relay ${this.url} error processing message:`,J,W)}catch(Y){console.warn(`[nostr] relay ${this.url} error processing message:`,J)}return}}},wp=class{relay;id;lastEmitted;closed=!1;eosed=!1;filters;alreadyHaveEvent;receivedEvent;onevent;oninvalidevent;oneose;onclose;oncustom;eoseTimeout;eoseTimeoutHandle;constructor(c,$,Q,J){if(Q.length===0)throw Error("subscription can't be created with zero filters");this.relay=c,this.filters=Q,this.id=$,this.alreadyHaveEvent=J.alreadyHaveEvent,this.receivedEvent=J.receivedEvent,this.eoseTimeout=J.eoseTimeout||c.baseEoseTimeout,this.oneose=J.oneose,this.onclose=J.onclose,this.oninvalidevent=J.oninvalidevent,this.onevent=J.onevent||((Y)=>{console.warn(`onevent() callback not defined for subscription '${this.id}' in relay ${this.relay.url}. event received:`,Y)})}fire(){this.relay.send('["REQ","'+this.id+'",'+JSON.stringify(this.filters).substring(1)),this.eoseTimeoutHandle=setTimeout(this.receivedEose.bind(this),this.eoseTimeout)}receivedEose(){if(this.eosed)return;clearTimeout(this.eoseTimeoutHandle),this.eosed=!0,this.oneose?.()}close(c="closed by caller"){if(!this.closed&&this.relay.connected){try{this.relay.send('["CLOSE",'+JSON.stringify(this.id)+"]")}catch($){if($ instanceof pm);else throw $}this.closed=!0}if(this.relay.openSubs.delete(this.id),this.relay.ongoingOperations--,this.relay.ongoingOperations===0)this.relay.idleSince=Date.now(),this.relay.scheduleIdleClose();this.onclose?.(c)}},ip;try{ip=WebSocket}catch{}var vp=256,jF=vp*2;var Up;try{Up=WebSocket}catch{}var NX={};Sc(NX,{BECH32_REGEX:()=>AN,Bech32MaxSize:()=>Em,NostrTypeGuard:()=>jp,decode:()=>VX,decodeNostrURI:()=>Dp,encodeBytes:()=>iX,naddrEncode:()=>Zp,neventEncode:()=>pp,noteEncode:()=>Op,nprofileEncode:()=>Rp,npubEncode:()=>Hp,nsecEncode:()=>Bp});var jp={isNProfile:(c)=>/^nprofile1[a-z\d]+$/.test(c||""),isNEvent:(c)=>/^nevent1[a-z\d]+$/.test(c||""),isNAddr:(c)=>/^naddr1[a-z\d]+$/.test(c||""),isNSec:(c)=>/^nsec1[a-z\d]{58}$/.test(c||""),isNPub:(c)=>/^npub1[a-z\d]{58}$/.test(c||""),isNote:(c)=>/^note1[a-z\d]+$/.test(c||""),isNcryptsec:(c)=>/^ncryptsec1[a-z\d]+$/.test(c||"")},Em=5000,AN=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function Kp(c){let $=new Uint8Array(4);return $[0]=c>>24&255,$[1]=c>>16&255,$[2]=c>>8&255,$[3]=c&255,$}function Dp(c){try{if(c.startsWith("nostr:"))c=c.substring(6);return VX(c)}catch($){return{type:"invalid",data:null}}}function VX(c){let{prefix:$,words:Q}=T8.decode(c,Em),J=new Uint8Array(T8.fromWords(Q));switch($){case"nprofile":{let Y=Dm(J);if(!Y[0]?.[0])throw Error("missing TLV 0 for nprofile");if(Y[0][0].length!==32)throw Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:Hc(Y[0][0]),relays:Y[1]?Y[1].map((X)=>i8.decode(X)):[]}}}case"nevent":{let Y=Dm(J);if(!Y[0]?.[0])throw Error("missing TLV 0 for nevent");if(Y[0][0].length!==32)throw Error("TLV 0 should be 32 bytes");if(Y[2]&&Y[2][0].length!==32)throw Error("TLV 2 should be 32 bytes");if(Y[3]&&Y[3][0].length!==4)throw Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:Hc(Y[0][0]),relays:Y[1]?Y[1].map((X)=>i8.decode(X)):[],author:Y[2]?.[0]?Hc(Y[2][0]):void 0,kind:Y[3]?.[0]?parseInt(Hc(Y[3][0]),16):void 0}}}case"naddr":{let Y=Dm(J);if(!Y[0]?.[0])throw Error("missing TLV 0 for naddr");if(!Y[2]?.[0])throw Error("missing TLV 2 for naddr");if(Y[2][0].length!==32)throw Error("TLV 2 should be 32 bytes");if(!Y[3]?.[0])throw Error("missing TLV 3 for naddr");if(Y[3][0].length!==4)throw Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:i8.decode(Y[0][0]),pubkey:Hc(Y[2][0]),kind:parseInt(Hc(Y[3][0]),16),relays:Y[1]?Y[1].map((X)=>i8.decode(X)):[]}}}case"nsec":return{type:$,data:J};case"npub":case"note":return{type:$,data:Hc(J)};default:throw Error(`unknown prefix ${$}`)}}function Dm(c){let $={},Q=c;while(Q.length>0){if(Q.length<2)throw Error("not enough data to read TLV");let J=Q[0],Y=Q[1],X=Q.slice(2,2+Y);if(Q=Q.slice(2+Y),X.length<Y)throw Error(`not enough data to read on TLV ${J}`);$[J]=$[J]||[],$[J].push(X)}return $}function Bp(c){return iX("nsec",c)}function Hp(c){return iX("npub",Rc(c))}function Op(c){return iX("note",Rc(c))}function wX(c,$){let Q=T8.toWords($);return T8.encode(c,Q,Em)}function iX(c,$){return wX(c,$)}function Rp(c){let $=bm({0:[Rc(c.pubkey)],1:(c.relays||[]).map((Q)=>S0.encode(Q))});return wX("nprofile",$)}function pp(c){let $;if(c.kind!==void 0)$=Kp(c.kind);let Q=bm({0:[Rc(c.id)],1:(c.relays||[]).map((J)=>S0.encode(J)),2:c.author?[Rc(c.author)]:[],3:$?[new Uint8Array($)]:[]});return wX("nevent",Q)}function Zp(c){let $=new ArrayBuffer(4);new DataView($).setUint32(0,c.kind,!1);let Q=bm({0:[S0.encode(c.identifier)],1:(c.relays||[]).map((J)=>S0.encode(J)),2:[Rc(c.pubkey)],3:[new Uint8Array($)]});return wX("naddr",Q)}function bm(c){let $=[];return Object.entries(c).reverse().forEach(([Q,J])=>{J.forEach((Y)=>{let X=new Uint8Array(Y.length+2);X.set([parseInt(Q)],0),X.set([Y.length],1),X.set(Y,2),$.push(X)})}),Fc(...$)}var Ip={};Sc(Ip,{decrypt:()=>Lp,encrypt:()=>CN});function CN(c,$,Q){let J=c instanceof Uint8Array?c:Rc(c),Y=UJ.getSharedSecret(J,Rc("02"+$)),X=PN(Y),W=Uint8Array.from(o0(16)),m=S0.encode(Q),G=im(X,W).encrypt(m),z=L0.encode(new Uint8Array(G)),x=L0.encode(new Uint8Array(W.buffer));return`${z}?iv=${x}`}function Lp(c,$,Q){let J=c instanceof Uint8Array?c:Rc(c),[Y,X]=Q.split("?iv="),W=UJ.getSharedSecret(J,Rc("02"+$)),m=PN(W),G=L0.decode(X),z=L0.decode(Y),x=im(m,G).decrypt(z);return i8.decode(x)}function PN(c){return c.slice(1,33)}var _p={};Sc(_p,{NIP05_REGEX:()=>Fm,isNip05:()=>Sp,isValid:()=>Pp,queryProfile:()=>EN,searchDomain:()=>Cp,useFetchImplementation:()=>Ap});var Fm=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/,Sp=(c)=>Fm.test(c||""),vX;try{vX=fetch}catch(c){}function Ap(c){vX=c}async function Cp(c,$=""){try{let Q=`https://${c}/.well-known/nostr.json?name=${$}`,J=await vX(Q,{redirect:"manual"});if(J.status!==200)throw Error("Wrong response code");return(await J.json()).names}catch(Q){return{}}}async function EN(c){let $=c.match(Fm);if(!$)return null;let[,Q="_",J]=$;try{let Y=`https://${J}/.well-known/nostr.json?name=${Q}`,X=await vX(Y,{redirect:"manual"});if(X.status!==200)throw Error("Wrong response code");let W=await X.json(),m=W.names[Q];return m?{pubkey:m,relays:W.relays?.[m]}:null}catch(Y){return null}}async function Pp(c,$){let Q=await EN($);return Q?Q.pubkey===c:!1}var Ep={};Sc(Ep,{parse:()=>bp});function bp(c){let $={reply:void 0,root:void 0,mentions:[],profiles:[],quotes:[]},Q,J;for(let Y=c.tags.length-1;Y>=0;Y--){let X=c.tags[Y];if(X[0]==="e"&&X[1]&&q0(X[1])){let[W,m,G,z,x]=X,q={id:m,relays:G?[G]:[],author:x&&q0(x)?x:void 0};if(z==="root"){$.root=q;continue}if(z==="reply"){$.reply=q;continue}if(z==="mention"){$.mentions.push(q);continue}if(!Q)Q=q;else J=q;$.mentions.push(q);continue}if(X[0]==="q"&&X[1]&&q0(X[1])){let[W,m,G]=X;$.quotes.push({id:m,relays:G?[G]:[]})}if(X[0]==="p"&&X[1]&&q0(X[1])){$.profiles.push({pubkey:X[1],relays:X[2]?[X[2]]:[]});continue}}if(!$.root)$.root=J||Q||$.reply;if(!$.reply)$.reply=Q||$.root;return[$.reply,$.root].forEach((Y)=>{if(!Y)return;let X=$.mentions.indexOf(Y);if(X!==-1)$.mentions.splice(X,1);if(Y.author){let W=$.profiles.find((m)=>m.pubkey===Y.author);if(W&&W.relays){if(!Y.relays)Y.relays=[];W.relays.forEach((m)=>{if(Y.relays?.indexOf(m)===-1)Y.relays.push(m)}),W.relays=Y.relays}}}),$.mentions.forEach((Y)=>{if(Y.author){let X=$.profiles.find((W)=>W.pubkey===Y.author);if(X&&X.relays){if(!Y.relays)Y.relays=[];X.relays.forEach((W)=>{if(Y.relays.indexOf(W)===-1)Y.relays.push(W)}),X.relays=Y.relays}}}),$}var Fp={};Sc(Fp,{fetchRelayInformation:()=>fp,useFetchImplementation:()=>Tp});var bN;try{bN=fetch}catch{}function Tp(c){bN=c}async function fp(c){return await(await fetch(c.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()}var np={};Sc(np,{getPow:()=>up,minePow:()=>ap});function up(c){let $=0;for(let Q=0;Q<64;Q+=8){let J=parseInt(c.substring(Q,Q+8),16);if(J===0)$+=32;else{$+=Math.clz32(J);break}}return $}function kp(c){let $=0;for(let Q=0;Q<c.length;Q++){let J=c[Q];if(J===0)$+=8;else{$+=Math.clz32(J)-24;break}}return $}function ap(c,$){let Q=0,J=c,Y=["nonce",Q.toString(),$.toString()];J.tags.push(Y);while(!0){let X=Math.floor(new Date().getTime()/1000);if(X!==J.created_at)Q=0,J.created_at=X;Y[1]=(++Q).toString();let W=Q0(S0.encode(JSON.stringify([0,J.pubkey,J.created_at,J.kind,J.tags,J.content])));if(kp(W)>=$){J.id=Hc(W);break}}return J}var lp={};Sc(lp,{unwrapEvent:()=>$Z,unwrapManyEvents:()=>QZ,wrapEvent:()=>dN,wrapManyEvents:()=>cZ});var hp={};Sc(hp,{createRumor:()=>hN,createSeal:()=>yN,createWrap:()=>oN,unwrapEvent:()=>hm,unwrapManyEvents:()=>gN,wrapEvent:()=>xX,wrapManyEvents:()=>tp});var yp={};Sc(yp,{decrypt:()=>lm,encrypt:()=>am,getConversationKey:()=>um,v2:()=>sp});var Tm=1,fm=4294967295,nm=65536;function um(c,$){let Q=UJ.getSharedSecret(c,Rc("02"+$)).subarray(1,33);return GN(Q0,Q,S0.encode("nip44-v2"))}function FN(c,$){let Q=zN(Q0,c,$,76);return{chacha_key:Q.subarray(0,32),chacha_nonce:Q.subarray(32,44),hmac_key:Q.subarray(44,76)}}function km(c){if(!Number.isSafeInteger(c)||c<1)throw Error("expected positive integer");if(c<=32)return 32;let $=2**(Math.floor(Math.log2(c-1))+1),Q=$<=256?32:$/8;return Q*(Math.floor((c-1)/Q)+1)}function op(c){if(!Number.isSafeInteger(c)||c<Tm||c>65535)throw Error("invalid plaintext size: must be between 1 and 65535 bytes");let $=new Uint8Array(2);return new DataView($.buffer).setUint16(0,c,!1),$}function gp(c){if(!Number.isSafeInteger(c)||c<nm||c>fm)throw Error("invalid plaintext size: must be between 65536 and 4294967295 bytes");let $=new Uint8Array(4);return new DataView($.buffer).setUint32(0,c,!1),$}function TN(c){let $=S0.encode(c),Q=$.length;if(Q<Tm||Q>fm)throw Error("invalid plaintext size: must be between 1 and 4294967295 bytes");let J=Q>=nm?Fc(new Uint8Array([0,0]),gp(Q)):op(Q),Y=new Uint8Array(km(Q)-Q);return Fc(J,$,Y)}function fN(c){let $=new DataView(c.buffer,c.byteOffset,c.byteLength),Q=$.getUint16(0),J,Y;if(Q===0){if(J=$.getUint32(2),J<nm)throw Error("invalid padding");Y=6}else J=Q,Y=2;let X=c.subarray(Y,Y+J);if(J<Tm||J>fm||X.length!==J||c.length!==Y+km(J))throw Error("invalid padding");return i8.decode(X)}function nN(c,$,Q){if(Q.length!==32)throw Error("AAD associated data must be 32 bytes");let J=Fc(Q,$);return E8(Q0,c,J)}function dp(c){if(typeof c!=="string")throw Error("payload must be a valid string");let $=c.length;if($<132)throw Error("invalid payload length: "+$);if(c[0]==="#")throw Error("unknown encryption version");let Q;try{Q=L0.decode(c)}catch(X){throw Error("invalid base64: "+X.message)}let J=Q.length;if(J<99)throw Error("invalid data length: "+J);let Y=Q[0];if(Y!==2)throw Error("unknown encryption version "+Y);return{nonce:Q.subarray(1,33),ciphertext:Q.subarray(33,-32),mac:Q.subarray(-32)}}function am(c,$,Q=o0(32)){let{chacha_key:J,chacha_nonce:Y,hmac_key:X}=FN($,Q),W=TN(c),m=WX(J,Y,W),G=nN(X,m,Q);return L0.encode(Fc(new Uint8Array([2]),Q,m,G))}function lm(c,$){let{nonce:Q,ciphertext:J,mac:Y}=dp(c),{chacha_key:X,chacha_nonce:W,hmac_key:m}=FN($,Q),G=nN(m,J,Q);if(!BJ(G,Y))throw Error("invalid MAC");let z=WX(X,W,J);return fN(z)}var sp={utils:{getConversationKey:um,calcPaddedLen:km,pad:TN,unpad:fN},encrypt:am,decrypt:lm},rp=172800,uN=()=>Math.round(Date.now()/1000),kN=()=>Math.round(uN()-Math.random()*rp),aN=(c,$)=>um(c,$),lN=(c,$,Q)=>am(JSON.stringify(c),aN($,Q)),xN=(c,$)=>JSON.parse(lm(c.content,aN($,c.pubkey)));function hN(c,$){let Q={created_at:uN(),content:"",tags:[],...c,pubkey:OJ($)};return Q.id=GX(Q),Q}function yN(c,$,Q){return A0({kind:jN,content:lN(c,$,Q),created_at:kN(),tags:[]},$)}function oN(c,$){let Q=hB();return A0({kind:pN,content:lN(c,Q,$),created_at:kN(),tags:[["p",$]]},Q)}function xX(c,$,Q){let J=hN(c,$),Y=yN(J,$,Q);return oN(Y,Q)}function tp(c,$,Q){if(!Q||Q.length===0)throw Error("At least one recipient is required.");let J=OJ($),Y=[xX(c,$,J)];return Q.forEach((X)=>{Y.push(xX(c,$,X))}),Y}function hm(c,$){let Q=xN(c,$);return xN(Q,$)}function gN(c,$){let Q=[];return c.forEach((J)=>{Q.push(hm(J,$))}),Q.sort((J,Y)=>J.created_at-Y.created_at),Q}function ep(c,$,Q,J){let Y={created_at:Math.ceil(Date.now()/1000),kind:KN,tags:[],content:$};if((Array.isArray(c)?c:[c]).forEach(({publicKey:W,relayUrl:m})=>{Y.tags.push(m?["p",W,m]:["p",W])}),J)Y.tags.push(["e",J.eventId,J.relayUrl||"","reply"]);if(Q)Y.tags.push(["subject",Q]);return Y}function dN(c,$,Q,J,Y){let X=ep($,Q,J,Y);return xX(X,c,$.publicKey)}function cZ(c,$,Q,J,Y){if(!$||$.length===0)throw Error("At least one recipient is required.");return[{publicKey:OJ(c)},...$].map((W)=>dN(c,W,Q,J,Y))}var $Z=hm,QZ=gN,JZ={};Sc(JZ,{finishRepostEvent:()=>YZ,getRepostedEvent:()=>XZ,getRepostedEventPointer:()=>sN});function YZ(c,$,Q,J){let Y,X=[...c.tags??[],["e",$.id,Q],["p",$.pubkey]];if($.kind===UN)Y=Sm;else Y=Cm,X.push(["k",String($.kind)]);return A0({kind:Y,tags:X,content:c.content===""||$.tags?.find((W)=>W[0]==="-")?"":JSON.stringify($),created_at:c.created_at},J)}function sN(c){if(![Sm,Cm].includes(c.kind))return;let $,Q;for(let J=c.tags.length-1;J>=0&&($===void 0||Q===void 0);J--){let Y=c.tags[J];if(Y.length>=2){if(Y[0]==="e"&&$===void 0)$=Y;else if(Y[0]==="p"&&Q===void 0)Q=Y}}if($===void 0)return;return{id:$[1],relays:[$[2],Q?.[2]].filter((J)=>typeof J==="string"),author:Q?.[1]}}function XZ(c,{skipVerification:$}={}){let Q=sN(c);if(Q===void 0||c.content==="")return;let J;try{J=JSON.parse(c.content)}catch(Y){return}if(J.id!==Q.id)return;if(!$&&!RJ(J))return;return J}var WZ={};Sc(WZ,{NOSTR_URI_REGEX:()=>ym,parse:()=>GZ,test:()=>mZ});var ym=new RegExp(`nostr:(${AN.source})`);function mZ(c){return typeof c==="string"&&new RegExp(`^${ym.source}$`).test(c)}function GZ(c){let $=c.match(new RegExp(`^${ym.source}$`));if(!$)throw Error(`Invalid Nostr URI: ${c}`);return{uri:$[0],value:$[1],decoded:VX($[1])}}var zZ={};Sc(zZ,{parse:()=>qZ});function qN(c){if(!c)return;return/^\d+$/.test(c)?parseInt(c,10):c}function rN(c,$){let Q=c.indexOf(":"),J=c.indexOf(":",Q+1);if(Q===-1||J===-1)return;let Y=parseInt(c.slice(0,Q),10);if(Number.isNaN(Y))return;let X=c.slice(Q+1,J);if(!q0(X))return;return{kind:Y,pubkey:X,identifier:c.slice(J+1),relays:$?[$]:[]}}function MN(c){switch(c[0]){case"E":case"e":if(!c[1]||!q0(c[1]))return;return{id:c[1],relays:c[2]?[c[2]]:[],author:c[3]&&q0(c[3])?c[3]:void 0};case"A":case"a":if(!c[1])return;return rN(c[1],c[2]);case"I":case"i":if(!c[1])return;return{value:c[1],hint:c[2]}}}function xZ(c){if(!c[1])return;if(c[1].includes(":"))return rN(c[1],c[2]);if(!q0(c[1]))return;return{id:c[1],relays:c[2]?[c[2]]:[],author:c[3]&&q0(c[3])?c[3]:void 0}}function NN(c){return c.findLast(($)=>$.tagName==="A"||$.tagName==="a")?.pointer||c.findLast(($)=>$.tagName==="I"||$.tagName==="i")?.pointer||c.findLast(($)=>$.tagName==="E"||$.tagName==="e")?.pointer}function Bm(c,$){if(!c||!("id"in c)||!c.author)return;let Q=$.find((J)=>J.pubkey===c.author);if(!Q||!Q.relays)return;if(!c.relays)c.relays=[];Q.relays.forEach((J)=>{if(c.relays.indexOf(J)===-1)c.relays.push(J)}),Q.relays=c.relays}function qZ(c){let $={root:void 0,rootKind:void 0,reply:void 0,replyKind:void 0,mentions:[],quotes:[],profiles:[]},Q=[],J=[];for(let Y of c.tags){if((Y[0]==="E"||Y[0]==="A"||Y[0]==="I")&&Y[1]){let X=MN(Y);if(X)Q.push({tagName:Y[0],pointer:X});continue}if((Y[0]==="e"||Y[0]==="a"||Y[0]==="i")&&Y[1]){let X=MN(Y);if(X)J.push({tagName:Y[0],pointer:X});continue}if(Y[0]==="K"){$.rootKind=qN(Y[1]);continue}if(Y[0]==="k"){$.replyKind=qN(Y[1]);continue}if(Y[0]==="q"){let X=xZ(Y);if(X)$.quotes.push(X);continue}if((Y[0]==="P"||Y[0]==="p")&&Y[1]&&q0(Y[1]))$.profiles.push({pubkey:Y[1],relays:Y[2]?[Y[2]]:[]})}return $.root=NN(Q),$.reply=NN(J),Bm($.root,$.profiles),Bm($.reply,$.profiles),$.quotes.forEach((Y)=>Bm(Y,$.profiles)),$}var MZ={};Sc(MZ,{finishReactionEvent:()=>NZ,getReactedEventPointer:()=>VZ});function NZ(c,$,Q){let J=$.tags.filter((Y)=>Y.length>=2&&(Y[0]==="e"||Y[0]==="p"));return A0({...c,kind:Am,tags:[...c.tags??[],...J,["e",$.id],["p",$.pubkey]],content:c.content??"+"},Q)}function VZ(c){if(c.kind!==Am)return;let $,Q;for(let J=c.tags.length-1;J>=0&&($===void 0||Q===void 0);J--){let Y=c.tags[J];if(Y.length>=2){if(Y[0]==="e"&&$===void 0)$=Y;else if(Y[0]==="p"&&Q===void 0)Q=Y}}if($===void 0||Q===void 0)return;return{id:$[1],relays:[$[2],Q[2]].filter((J)=>J!==void 0),author:Q[1]}}var wZ={};Sc(wZ,{parse:()=>vZ});var Hm=/\W/m,VN=/[^\w\/] |[^\w\/]$|$|,| /m,iZ=42;function*vZ(c){let $=[];if(typeof c!=="string"){for(let X=0;X<c.tags.length;X++){let W=c.tags[X];if(W[0]==="emoji"&&W.length>=3)$.push({type:"emoji",shortcode:W[1],url:W[2]})}c=c.content}let Q=c.length,J=0,Y=0;c:while(Y<Q){let X=c.indexOf(":",Y),W=c.indexOf("#",Y);if(X===-1&&W===-1)break c;if(X===-1||W>=0&&W<X){if(W===0||c[W-1].match(Hm)){let m=c.slice(W+1,W+iZ).match(Hm),G=m?W+1+m.index:Q;yield{type:"text",text:c.slice(J,W)},yield{type:"hashtag",value:c.slice(W+1,G)},Y=G,J=Y;continue c}Y=W+1;continue c}if(c.slice(X-5,X)==="nostr"){let m=c.slice(X+60).match(Hm),G=m?X+60+m.index:Q;try{let z,{data:x,type:q}=VX(c.slice(X+1,G));switch(q){case"npub":z={pubkey:x};break;case"note":z={id:x};break;case"nsec":Y=G+1;continue;default:z=x}if(J!==X-5)yield{type:"text",text:c.slice(J,X-5)};yield{type:"reference",pointer:z},Y=G,J=Y;continue c}catch(z){Y=X+1;continue c}}else if(c.slice(X-5,X)==="https"||c.slice(X-4,X)==="http"){let m=c.slice(X+4).match(VN),G=m?X+4+m.index:Q,z=c[X-1]==="s"?5:4;try{let x=new URL(c.slice(X-z,G));if(x.hostname.indexOf(".")===-1)throw Error("invalid url");if(J!==X-z)yield{type:"text",text:c.slice(J,X-z)};if(/\.(png|jpe?g|gif|webp|heic|svg)$/i.test(x.pathname)){yield{type:"image",url:x.toString()},Y=G,J=Y;continue c}if(/\.(mp4|avi|webm|mkv|mov)$/i.test(x.pathname)){yield{type:"video",url:x.toString()},Y=G,J=Y;continue c}if(/\.(mp3|aac|ogg|opus|wav|flac)$/i.test(x.pathname)){yield{type:"audio",url:x.toString()},Y=G,J=Y;continue c}yield{type:"url",url:x.toString()},Y=G,J=Y;continue c}catch(x){Y=G+1;continue c}}else if(c.slice(X-3,X)==="wss"||c.slice(X-2,X)==="ws"){let m=c.slice(X+4).match(VN),G=m?X+4+m.index:Q,z=c[X-1]==="s"?3:2;try{let x=new URL(c.slice(X-z,G));if(x.hostname.indexOf(".")===-1)throw Error("invalid ws url");if(J!==X-z)yield{type:"text",text:c.slice(J,X-z)};yield{type:"relay",url:x.toString()},Y=G,J=Y;continue c}catch(x){Y=G+1;continue c}}else{for(let m=0;m<$.length;m++){let G=$[m];if(c[X+G.shortcode.length+1]===":"&&c.slice(X+1,X+G.shortcode.length+1)===G.shortcode){if(J!==X)yield{type:"text",text:c.slice(J,X)};yield G,Y=X+G.shortcode.length+2,J=Y;continue c}}Y=X+1;continue c}}if(J!==Q)yield{type:"text",text:c.slice(J)}}var UZ={};Sc(UZ,{channelCreateEvent:()=>jZ,channelHideMessageEvent:()=>BZ,channelMessageEvent:()=>DZ,channelMetadataEvent:()=>KZ,channelMuteUserEvent:()=>HZ});var jZ=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:DN,tags:[...c.tags??[]],content:Q,created_at:c.created_at},$)},KZ=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:BN,tags:[["e",c.channel_create_event_id],...c.tags??[]],content:Q,created_at:c.created_at},$)},DZ=(c,$)=>{let Q=[["e",c.channel_create_event_id,c.relay_url,"root"]];if(c.reply_to_channel_message_event_id)Q.push(["e",c.reply_to_channel_message_event_id,c.relay_url,"reply"]);return A0({kind:HN,tags:[...Q,...c.tags??[]],content:c.content,created_at:c.created_at},$)},BZ=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:ON,tags:[["e",c.channel_message_event_id],...c.tags??[]],content:Q,created_at:c.created_at},$)},HZ=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:RN,tags:[["p",c.pubkey_to_mute],...c.tags??[]],content:Q,created_at:c.created_at},$)},OZ={};Sc(OZ,{EMOJI_SHORTCODE_REGEX:()=>tN,matchAll:()=>RZ,regex:()=>om,replaceAll:()=>pZ});var tN=/:(\w+):/,om=()=>new RegExp(`\\B${tN.source}\\B`,"g");function*RZ(c){let $=c.matchAll(om());for(let Q of $)try{let[J,Y]=Q;yield{shortcode:J,name:Y,start:Q.index,end:Q.index+J.length}}catch(J){}}function pZ(c,$){return c.replaceAll(om(),(Q,J)=>{return $({shortcode:Q,name:J})})}var ZZ={};Sc(ZZ,{useFetchImplementation:()=>IZ,validateGithub:()=>LZ});var gm;try{gm=fetch}catch{}function IZ(c){gm=c}async function LZ(c,$,Q){try{return await(await gm(`https://gist.github.com/${$}/${Q}/raw`)).text()===`Verifying that I control the following Nostr public key: ${c}`}catch(J){return!1}}var _Z={};Sc(_Z,{makeNwcRequestEvent:()=>AZ,parseConnectionString:()=>SZ});function SZ(c){let{host:$,pathname:Q,searchParams:J}=new URL(c),Y=Q||$,X=J.getAll("relay"),W=J.get("secret");if(!Y||X.length===0||!W)throw Error("invalid connection string");return{pubkey:Y,relay:X[0],relays:X,secret:W}}async function AZ(c,$,Q){let Y=CN($,c,JSON.stringify({method:"pay_invoice",params:{invoice:Q}})),X={kind:IN,created_at:Math.round(Date.now()/1000),content:Y,tags:[["p",c]]};return A0(X,$)}var CZ={};Sc(CZ,{normalizeIdentifier:()=>PZ});function PZ(c){return c=c.trim().toLowerCase(),c=c.normalize("NFKC"),Array.from(c).map(($)=>{if(/\p{Letter}/u.test($)||/\p{Number}/u.test($))return $;return"-"}).join("")}var EZ={};Sc(EZ,{getSatoshisAmountFromBolt11:()=>uZ,getZapEndpoint:()=>FZ,makeZapReceipt:()=>nZ,makeZapRequest:()=>TZ,useFetchImplementation:()=>bZ,validateZapRequest:()=>fZ});var dm;try{dm=fetch}catch{}function bZ(c){dm=c}async function FZ(c){try{let $="",{lud06:Q,lud16:J}=JSON.parse(c.content);if(J){let[W,m]=J.split("@");$=new URL(`/.well-known/lnurlp/${W}`,`https://${m}`).toString()}else if(Q){let{words:W}=T8.decode(Q,1000),m=T8.fromWords(W);$=i8.decode(m)}else return null;let X=await(await dm($)).json();if(X.allowsNostr&&X.nostrPubkey)return X.callback}catch($){}return null}function TZ(c){let $={kind:9734,created_at:Math.round(Date.now()/1000),content:c.comment||"",tags:[["p","pubkey"in c?c.pubkey:c.event.pubkey],["amount",c.amount.toString()],["relays",...c.relays]]};if("event"in c){if($.tags.push(["e",c.event.id]),Lm(c.event.kind)){let Q=["a",`${c.event.kind}:${c.event.pubkey}:`];$.tags.push(Q)}else if(_m(c.event.kind)){let Q=c.event.tags.find(([Y,X])=>Y==="d"&&X);if(!Q)throw Error("d tag not found or is empty");let J=["a",`${c.event.kind}:${c.event.pubkey}:${Q[1]}`];$.tags.push(J)}$.tags.push(["k",c.event.kind.toString()])}return $}function fZ(c){let $;try{$=JSON.parse(c)}catch(X){return"Invalid zap request JSON."}if(!Im($))return"Zap request is not a valid Nostr event.";if(!RJ($))return"Invalid signature on zap request.";let Q=$.tags.find(([X,W])=>X==="p"&&W);if(!Q)return"Zap request doesn't have a 'p' tag.";if(!q0(Q[1]))return"Zap request 'p' tag is not valid hex.";let J=$.tags.find(([X,W])=>X==="e"&&W);if(J&&!q0(J[1]))return"Zap request 'e' tag is not valid hex.";if(!$.tags.find(([X,W])=>X==="relays"&&W))return"Zap request doesn't have a 'relays' tag.";return null}function nZ({zapRequest:c,preimage:$,bolt11:Q,paidAt:J}){let Y=JSON.parse(c),X=Y.tags.filter(([m])=>m==="e"||m==="p"||m==="a"),W={kind:9735,created_at:Math.round(J.getTime()/1000),content:"",tags:[...X,["P",Y.pubkey],["bolt11",Q],["description",c]]};if($)W.tags.push(["preimage",$]);return W}function uZ(c){if(c.length<50)return 0;c=c.substring(0,50);let $=c.lastIndexOf("1");if($===-1)return 0;let Q=c.substring(0,$);if(!Q.startsWith("lnbc"))return 0;let J=Q.substring(4);if(J.length<1)return 0;let Y=J[J.length-1],X=Y.charCodeAt(0)-48,W=X>=0&&X<=9,m=J.length-1;if(W)m++;if(m<1)return 0;let G=parseInt(J.substring(0,m));switch(Y){case"m":return G*1e5;case"u":return G*100;case"n":return G/10;case"p":return G/1e4;default:return G*1e8}}var kZ={};Sc(kZ,{Negentropy:()=>cV,NegentropyStorageVector:()=>hZ,NegentropySync:()=>yZ});var Om=97,VQ=32,eN=16,v$={Skip:0,Fingerprint:1,IdList:2},w8=class{_raw;length;constructor(c){if(typeof c==="number")this._raw=new Uint8Array(c),this.length=0;else if(c instanceof Uint8Array)this._raw=new Uint8Array(c),this.length=c.length;else this._raw=new Uint8Array(512),this.length=0}unwrap(){return this._raw.subarray(0,this.length)}get capacity(){return this._raw.byteLength}extend(c){if(c instanceof w8)c=c.unwrap();if(typeof c.length!=="number")throw Error("bad length");let $=c.length+this.length;if(this.capacity<$){let Q=this._raw,J=Math.max(this.capacity*2,$);this._raw=new Uint8Array(J),this._raw.set(Q)}this._raw.set(c,this.length),this.length+=c.length}shift(){let c=this._raw[0];return this._raw=this._raw.subarray(1),this.length--,c}shiftN(c=1){let $=this._raw.subarray(0,c);return this._raw=this._raw.subarray(c),this.length-=c,$}};function mX(c){let $=0;while(!0){if(c.length===0)throw Error("parse ends prematurely");let Q=c.shift();if($=$<<7|Q&127,(Q&128)===0)break}return $}function V8(c){if(c===0)return new w8(new Uint8Array([0]));let $=[];while(c!==0)$.push(c&127),c>>>=7;$.reverse();for(let Q=0;Q<$.length-1;Q++)$[Q]|=128;return new w8(new Uint8Array($))}function aZ(c){return zX(c,1)[0]}function zX(c,$){if(c.length<$)throw Error("parse ends prematurely");return c.shiftN($)}var lZ=class{buf;constructor(){this.setToZero()}setToZero(){this.buf=new Uint8Array(VQ)}add(c){let $=0,Q=0,J=new DataView(this.buf.buffer),Y=new DataView(c.buffer);for(let X=0;X<8;X++){let W=X*4,m=J.getUint32(W,!0),G=Y.getUint32(W,!0),z=m;if(z+=$,z+=G,z>4294967295)Q=1;J.setUint32(W,z&4294967295,!0),$=Q,Q=0}}negate(){let c=new DataView(this.buf.buffer);for(let Q=0;Q<8;Q++){let J=Q*4;c.setUint32(J,~c.getUint32(J,!0))}let $=new Uint8Array(VQ);$[0]=1,this.add($)}getFingerprint(c){let $=new w8;return $.extend(this.buf),$.extend(V8(c)),Q0($.unwrap()).subarray(0,eN)}},hZ=class{items;sealed;constructor(){this.items=[],this.sealed=!1}insert(c,$){if(this.sealed)throw Error("already sealed");let Q=Rc($);if(Q.byteLength!==VQ)throw Error("bad id size for added item");this.items.push({timestamp:c,id:Q})}seal(){if(this.sealed)throw Error("already sealed");this.sealed=!0,this.items.sort(Rm);for(let c=1;c<this.items.length;c++)if(Rm(this.items[c-1],this.items[c])===0)throw Error("duplicate item inserted")}unseal(){this.sealed=!1}size(){return this._checkSealed(),this.items.length}getItem(c){if(this._checkSealed(),c>=this.items.length)throw Error("out of range");return this.items[c]}iterate(c,$,Q){this._checkSealed(),this._checkBounds(c,$);for(let J=c;J<$;++J)if(!Q(this.items[J],J))break}findLowerBound(c,$,Q){return this._checkSealed(),this._checkBounds(c,$),this._binarySearch(this.items,c,$,(J)=>Rm(J,Q)<0)}fingerprint(c,$){let Q=new lZ;return Q.setToZero(),this.iterate(c,$,(J)=>{return Q.add(J.id),!0}),Q.getFingerprint($-c)}_checkSealed(){if(!this.sealed)throw Error("not sealed")}_checkBounds(c,$){if(c>$||$>this.items.length)throw Error("bad range")}_binarySearch(c,$,Q,J){let Y=Q-$;while(Y>0){let X=$,W=Math.floor(Y/2);if(X+=W,J(c[X]))$=++X,Y-=W+1;else Y=W}return $}},cV=class{storage;frameSizeLimit;lastTimestampIn;lastTimestampOut;constructor(c,$=60000){if($<4096)throw Error("frameSizeLimit too small");this.storage=c,this.frameSizeLimit=$,this.lastTimestampIn=0,this.lastTimestampOut=0}_bound(c,$){return{timestamp:c,id:$||new Uint8Array(0)}}initiate(){let c=new w8;return c.extend(new Uint8Array([Om])),this.splitRange(0,this.storage.size(),this._bound(Number.MAX_VALUE),c),Hc(c.unwrap())}reconcile(c,$,Q){let J=new w8(Rc(c));this.lastTimestampIn=this.lastTimestampOut=0;let Y=new w8;Y.extend(new Uint8Array([Om]));let X=aZ(J);if(X<96||X>111)throw Error("invalid negentropy protocol version byte");if(X!==Om)throw Error("unsupported negentropy protocol version requested: "+(X-96));let W=this.storage.size(),m=this._bound(0),G=0,z=!1;while(J.length!==0){let x=new w8,q=()=>{if(z)z=!1,x.extend(this.encodeBound(m)),x.extend(V8(v$.Skip))},M=this.decodeBound(J),N=mX(J),w=G,U=this.storage.findLowerBound(G,W,M);if(N===v$.Skip)z=!0;else if(N===v$.Fingerprint){let v=zX(J,eN),i=this.storage.fingerprint(w,U);if($V(v,i)!==0)q(),this.splitRange(w,U,M,x);else z=!0}else if(N===v$.IdList){let v=mX(J),i={};for(let j=0;j<v;j++){let D=zX(J,VQ);i[Hc(D)]=D}if(z=!0,this.storage.iterate(w,U,(j)=>{let D=j.id,_=Hc(D);if(!i[_])$?.(_);else delete i[Hc(D)];return!0}),Q)for(let j of Object.values(i))Q(Hc(j))}else throw Error("unexpected mode");if(this.exceededFrameSizeLimit(Y.length+x.length)){let v=this.storage.fingerprint(U,W);Y.extend(this.encodeBound(this._bound(Number.MAX_VALUE))),Y.extend(V8(v$.Fingerprint)),Y.extend(v);break}else Y.extend(x);G=U,m=M}return Y.length===1?null:Hc(Y.unwrap())}splitRange(c,$,Q,J){let Y=$-c,X=16;if(Y<X*2)J.extend(this.encodeBound(Q)),J.extend(V8(v$.IdList)),J.extend(V8(Y)),this.storage.iterate(c,$,(W)=>{return J.extend(W.id),!0});else{let W=Math.floor(Y/X),m=Y%X,G=c;for(let z=0;z<X;z++){let x=W+(z<m?1:0),q=this.storage.fingerprint(G,G+x);G+=x;let M;if(G===$)M=Q;else{let N,w;this.storage.iterate(G-1,G+1,(U,v)=>{if(v===G-1)N=U;else w=U;return!0}),M=this.getMinimalBound(N,w)}J.extend(this.encodeBound(M)),J.extend(V8(v$.Fingerprint)),J.extend(q)}}}exceededFrameSizeLimit(c){return c>this.frameSizeLimit-200}decodeTimestampIn(c){let $=mX(c);if($=$===0?Number.MAX_VALUE:$-1,this.lastTimestampIn===Number.MAX_VALUE||$===Number.MAX_VALUE)return this.lastTimestampIn=Number.MAX_VALUE,Number.MAX_VALUE;return $+=this.lastTimestampIn,this.lastTimestampIn=$,$}decodeBound(c){let $=this.decodeTimestampIn(c),Q=mX(c);if(Q>VQ)throw Error("bound key too long");let J=zX(c,Q);return{timestamp:$,id:J}}encodeTimestampOut(c){if(c===Number.MAX_VALUE)return this.lastTimestampOut=Number.MAX_VALUE,V8(0);let $=c;return c-=this.lastTimestampOut,this.lastTimestampOut=$,V8(c+1)}encodeBound(c){let $=new w8;return $.extend(this.encodeTimestampOut(c.timestamp)),$.extend(V8(c.id.length)),$.extend(c.id),$}getMinimalBound(c,$){if($.timestamp!==c.timestamp)return this._bound($.timestamp);else{let Q=0,J=$.id,Y=c.id;for(let X=0;X<VQ;X++){if(J[X]!==Y[X])break;Q++}return this._bound($.timestamp,$.id.subarray(0,Q+1))}}};function $V(c,$){for(let Q=0;Q<c.byteLength;Q++){if(c[Q]<$[Q])return-1;if(c[Q]>$[Q])return 1}if(c.byteLength>$.byteLength)return 1;if(c.byteLength<$.byteLength)return-1;return 0}function Rm(c,$){if(c.timestamp===$.timestamp)return $V(c.id,$.id);return c.timestamp-$.timestamp}var yZ=class{relay;storage;neg;filter;subscription;onhave;onneed;constructor(c,$,Q,J={}){this.relay=c,this.storage=$,this.neg=new cV($),this.onhave=J.onhave,this.onneed=J.onneed,this.filter=Q,this.subscription=this.relay.prepareSubscription([{}],{label:J.label||"negentropy"}),this.subscription.oncustom=(Y)=>{switch(Y[0]){case"NEG-MSG":{if(Y.length<3)console.warn(`got invalid NEG-MSG from ${this.relay.url}: ${Y}`);try{let X=this.neg.reconcile(Y[2],this.onhave,this.onneed);if(X)this.relay.send(`["NEG-MSG", "${this.subscription.id}", "${X}"]`);else this.close(),J.onclose?.()}catch(X){console.error("negentropy reconcile error:",X),J?.onclose?.(`reconcile error: ${X}`)}break}case"NEG-CLOSE":{let X=Y[2];console.warn("negentropy error:",X),J.onclose?.(X);break}case"NEG-ERR":J.onclose?.()}}}async start(){let c=this.neg.initiate();this.relay.send(`["NEG-OPEN","${this.subscription.id}",${JSON.stringify(this.filter)},"${c}"]`)}close(){this.relay.send(`["NEG-CLOSE","${this.subscription.id}"]`),this.subscription.close()}},oZ={};Sc(oZ,{getToken:()=>gZ,hashPayload:()=>sm,unpackEventFromToken:()=>JV,validateEvent:()=>zV,validateEventKind:()=>XV,validateEventMethodTag:()=>mV,validateEventPayloadTag:()=>GV,validateEventTimestamp:()=>YV,validateEventUrlTag:()=>WV,validateToken:()=>dZ});var QV="Nostr ";async function gZ(c,$,Q,J=!1,Y){let X={kind:Pm,tags:[["u",c],["method",$]],created_at:Math.round(new Date().getTime()/1000),content:""};if(Y)X.tags.push(["payload",sm(Y)]);let W=await Q(X);return(J?QV:"")+L0.encode(S0.encode(JSON.stringify(W)))}async function dZ(c,$,Q){let J=await JV(c).catch((X)=>{throw X});return await zV(J,$,Q).catch((X)=>{throw X})}async function JV(c){if(!c)throw Error("Missing token");c=c.replace(QV,"");let $=i8.decode(L0.decode(c));if(!$||$.length===0||!$.startsWith("{"))throw Error("Invalid token");return JSON.parse($)}function YV(c){if(!c.created_at)return!1;return Math.round(new Date().getTime()/1000)-c.created_at<60}function XV(c){return c.kind===Pm}function WV(c,$){let Q=c.tags.find((J)=>J[0]==="u");if(!Q)return!1;return Q.length>0&&Q[1]===$}function mV(c,$){let Q=c.tags.find((J)=>J[0]==="method");if(!Q)return!1;return Q.length>0&&Q[1].toLowerCase()===$.toLowerCase()}function sm(c){let $=Q0(S0.encode(JSON.stringify(c)));return Hc($)}function GV(c,$){let Q=c.tags.find((Y)=>Y[0]==="payload");if(!Q)return!1;let J=sm($);return Q.length>0&&Q[1]===J}async function zV(c,$,Q,J){if(!RJ(c))throw Error("Invalid nostr event, signature invalid");if(!XV(c))throw Error("Invalid nostr event, kind invalid");if(!YV(c))throw Error("Invalid nostr event, created_at timestamp invalid");if(!WV(c,$))throw Error("Invalid nostr event, url tag invalid");if(!mV(c,Q))throw Error("Invalid nostr event, method tag invalid");if(Boolean(J)&&typeof J==="object"&&Object.keys(J).length>0){if(!GV(c,J))throw Error("Invalid nostr event, payload tag does not match request body hash")}return!0}function tZ(c){let $=c.trim().toLowerCase().replace(/^0x/,"");if(!/^[0-9a-f]{64}$/.test($))throw Error("expected 64-char hex private key");let Q=new Uint8Array(32);for(let J=0;J<32;J++)Q[J]=parseInt($.slice(J*2,J*2+2),16);return Q}function pJ(c){let $=(c??"").trim();if(!$)throw Error("BUZZ_PRIVATE_KEY is empty");let Q;if($.startsWith("nsec")){let Y=NX.decode($);if(Y.type!=="nsec")throw Error("BUZZ_PRIVATE_KEY is not an nsec");Q=Y.data}else Q=tZ($);let J=OJ(Q);return{secretKey:Q,pubkeyHex:J,npub:NX.npubEncode(J)}}function v8(c,$){return A0(c,$.secretKey)}function xV(c){return sZ("sha256").update(c).digest("hex")}function qV(){return rZ()}var eZ=["/fig","@figura"];function MV(c){return c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function NV(c){return c.replace(/^[\s:,\-—]+/,"").trim()}function VV(c,$={}){let Q=(c??"").trim();if(!Q)return null;let J=$.triggers??eZ,Y=null;for(let X of J){let m=new RegExp(`(?:^|\\s)${MV(X)}\\b`,"i").exec(Q);if(m){let G=m.index+m[0].length-X.length;if(!Y||G<Y.index)Y={index:G,end:m.index+m[0].length,via:"trigger"}}}if($.agentNpub){let W=new RegExp(`(?:nostr:)?${MV($.agentNpub)}`,"i").exec(Q);if(W&&(!Y||W.index<Y.index))Y={index:W.index,end:W.index+W[0].length,via:"npub"}}if(Y){let X=NV(Q.slice(Y.end));if(X)return{brief:X,via:Y.via};return null}if($.mentioned){let X=NV(Q);if(X)return{brief:X,via:"mention"}}return null}function cI(c){return c.replace(/^fig\s+/i,"").trim()}function wV(c){let $=(c??"").trim();if(!$)return null;let Q=/^(?:fig\s+this\s+and\s+file\s+it|file\s+(?:it|this)\s+and\s+fig(?:\s+it)?)\s*:?\s*(.+)$/is.exec($);if(Q){let X=Q[1].trim();if(X)return{kind:"fig-and-file",description:X}}let J=/^file\s+(?:an?\s+)?issue\s*:?\s*(.+)$/is.exec($);if(J){let X=J[1].trim();if(X)return{kind:"file-issue",title:X}}let Y=/^(?:fig\s+)?issue\s+#?(\d+)\b/i.exec($);if(Y)return{kind:"fig-issue",issue:Number(Y[1])};return{kind:"fig",brief:cI($)||$}}var iV=typeof process<"u"&&process.env?.FIGURA_APP_URL?.replace(/\/+$/,"")||"https://figura.so";function vV(c,$=iV){return`${($||iV).replace(/\/+$/,"")}/f/${c}`}function UX(c){let Q=[c.title?`Here's your fig: **${c.title}**`:"Here's your fig"];if(c.note)Q.push(c.note);return Q.push(""),Q.push(c.link),Q.join(`
|
|
532
|
+
`)}function wQ(c){return`Sorry — I couldn't make that fig. ${c}`}function jX(c){return`Filed ${typeof c.number==="number"?`issue #${c.number}`:"the issue"}: **${c.title}**
|
|
531
533
|
|
|
532
|
-
${c.url}`}function
|
|
534
|
+
${c.url}`}function rm(c){return`Figura mock for this issue: ${c}`}function UV(c,$){return`From issue #${c}: ${$}`}function jV(c){let $=[`Design a screen for this issue: ${c.title}`],Q=(c.body??"").trim();if(Q)$.push(Q.length>2000?`${Q.slice(0,2000)}…`:Q);if(c.labels&&c.labels.length)$.push(`Labels: ${c.labels.join(", ")}`);return $.join(`
|
|
533
535
|
|
|
534
|
-
`)}class
|
|
536
|
+
`)}class tm extends Error{input;constructor(c,$){super(c);this.input=$}}function $I(c){return c.tags.find(($)=>$[0]==="h")?.[1]??null}function QI(c,$){return c.tags.some((Q)=>Q[0]==="p"&&(Q[1]??"").toLowerCase()===$)}async function KV(c,$){let Q=$.log??(()=>{});if(c.pubkey.toLowerCase()===$.identity.pubkeyHex.toLowerCase())return{action:"skip",reason:"self"};let J=$I(c),Y=async(x)=>{let q={channelId:J??"",content:x,replyTo:c.id,mentions:[c.pubkey]},M=J?await $.postReply(q):{ok:!1};if(!M||M.ok!==!0)throw new tm("the relay did not accept the reply",q)},X=$.pendingReplies.get(c.id);if(X){let x=await $.postReply(X.input);if(x&&x.ok===!0)return $.pendingReplies.delete(c.id),Q("delivered cached reply on redelivery (no re-run)"),X.outcome;return{action:"delivery-failed",reason:"the relay did not accept the reply"}}if($.seen.has(c.id))return{action:"skip",reason:"duplicate"};let W=VV(c.content,{triggers:$.triggers,agentNpub:$.identity.npub,mentioned:QI(c,$.identity.pubkeyHex)});if(!W)return{action:"skip",reason:"no-trigger"};if(!J)return{action:"skip",reason:"no-channel"};let m=wV(W.brief);if(!m)return{action:"skip",reason:"empty-brief"};$.seen.add(c.id),Q(`request in ${J} via ${W.via}: ${m.kind}`);let G=!1,z=async(x,q)=>{try{return await Y(x),q}catch(M){if(!(M instanceof tm))throw M;if(G)$.pendingReplies.set(c.id,{input:M.input,outcome:q}),Q("reply delivery failed — cached for independent retry (no re-run)");else $.seen.delete(c.id),Q("reply delivery failed before any side effect — un-claimed for reprocess");return{action:"delivery-failed",reason:M.message}}};try{switch(m.kind){case"fig":{let x=await $.generate(m.brief);return G=!0,await z(UX({link:x.url??"(link unavailable)",title:x.title,note:m.brief}),{action:"replied",via:W.via,kind:m.kind,link:x.url})}case"fig-issue":{if(!$.tracker||!$.tracker.supportsNumericFetch)return await z(wQ("no numeric issue tracker is configured — set FIGURA_ISSUE_TRACKER=github with GITHUB_REPO/GITHUB_TOKEN."),{action:"error-replied",reason:"no-numeric-tracker"});let x=await $.tracker.fetchIssue(m.issue),q=await $.generate(jV(x),{issue:m.issue});if(G=!0,q.url)await $.tracker.commentIssue({number:m.issue,url:x.url},rm(q.url)).catch((M)=>Q(`issue back-link failed: ${String(M)}`));return await z(UX({link:q.url??"(link unavailable)",title:q.title,note:UV(m.issue,x.title)}),{action:"replied",via:W.via,kind:m.kind,link:q.url})}case"file-issue":{if(!$.tracker)return await z(wQ("no issue tracker is configured (FIGURA_ISSUE_TRACKER)."),{action:"error-replied",reason:"no-tracker"});let x=await $.tracker.createIssue({title:m.title,body:m.title});return G=!0,await z(jX({url:x.url,title:m.title,number:x.number}),{action:"filed",issue:x.url})}case"fig-and-file":{if(!$.tracker)return await z(wQ("no issue tracker is configured (FIGURA_ISSUE_TRACKER)."),{action:"error-replied",reason:"no-tracker"});let x=await $.tracker.createIssue({title:m.description,body:m.description});G=!0;let q;try{q=await $.generate(m.description,{issue:x.number})}catch(N){let w=N instanceof Error?N.message:String(N);return Q(`fig-and-file generation failed after filing ${x.url}: ${w}`),await z(`${jX({url:x.url,title:m.description,number:x.number})}
|
|
535
537
|
|
|
536
|
-
${wQ(w)}`,{action:"error-replied",reason:w})}if(q.url)await $.tracker.commentIssue(x,
|
|
538
|
+
${wQ(w)}`,{action:"error-replied",reason:w})}if(q.url)await $.tracker.commentIssue(x,rm(q.url)).catch((N)=>Q(`issue back-link failed: ${String(N)}`));let M=`${jX({url:x.url,title:m.description,number:x.number})}
|
|
537
539
|
|
|
538
|
-
${vX({link:q.url??"(link unavailable)",title:q.title})}`;return await z(M,{action:"replied",via:W.via,kind:m.kind,link:q.url})}}}catch(x){let q=x instanceof Error?x.message:String(x);return Q(`request failed: ${q}`),await z(wQ(q),{action:"error-replied",reason:q})}}class rm{pending;opts;max;base;schedule;cancel;attempts=new Map;timers=new Map;active=new Set;constructor(c,$){this.pending=c;this.opts=$;this.max=$.maxAttempts??6,this.base=$.baseDelayMs??1000,this.schedule=$.schedule??((Q,J)=>setTimeout(Q,J)),this.cancel=$.cancel??((Q)=>clearTimeout(Q))}log(c){this.opts.log?.(c)}get inFlight(){return this.active.size}start(c){if(this.active.has(c))return;if(!this.pending.has(c))return;this.active.add(c),this.arm(c)}arm(c){let $=this.attempts.get(c)??0,Q=this.base*2**$,J=this.schedule(()=>{this.timers.delete(c),this.tick(c)},Q);this.timers.set(c,J)}finish(c){this.active.delete(c),this.attempts.delete(c);let $=this.timers.get(c);if($!==void 0)this.cancel($),this.timers.delete(c)}async tick(c){let $=this.pending.get(c);if(!$){this.finish(c);return}let Q=(this.attempts.get(c)??0)+1;this.attempts.set(c,Q);let J=!1;try{J=(await this.opts.postReply($.input))?.ok===!0}catch{J=!1}if(J){this.pending.delete(c),this.finish(c),this.log(`delivered pending reply for ${c} on retry ${Q}`);return}if(Q>=this.max){this.pending.delete(c),this.finish(c),this.log(`giving up on pending reply for ${c} after ${Q} attempts`);return}this.arm(c)}stop(){for(let c of this.timers.values())this.cancel(c);this.timers.clear(),this.attempts.clear(),this.active.clear()}}function iV(c){let $=[["h",c.channelId]];if(c.replyTo)$.push(["e",c.replyTo,"","reply"]);let Q=new Set;for(let J of c.mentions??[]){let Y=J.toLowerCase();if(Q.has(Y))continue;Q.add(Y),$.push(["p",Y])}return{kind:9,content:c.content,tags:$,created_at:c.createdAt??Math.floor(Date.now()/1000)}}function vV(c){let $=[["u",c.url],["method",c.method],["nonce",c.nonce]];if(c.payloadSha256)$.push(["payload",c.payloadSha256]);return{kind:27235,content:"",tags:$,created_at:c.createdAt??Math.floor(Date.now()/1000)}}function UV(c){let $=[["relay",c.relayUrl],["challenge",c.challenge]];if(c.authTag)$.push(c.authTag);return{kind:22242,content:"",tags:$,created_at:c.createdAt??Math.floor(Date.now()/1000)}}var jV=/^[0-9a-f]{64}$/i,rI=/^[0-9a-f]{128}$/i,tI=E.object({id:E.string().regex(jV,"id must be 64-char hex"),pubkey:E.string().regex(jV,"pubkey must be 64-char hex"),sig:E.string().regex(rI,"sig must be 128-char hex"),kind:E.number().int(),created_at:E.number().int(),tags:E.array(E.array(E.string())),content:E.string()});function KV(c){let $=tI.safeParse(c);return $.success?$.data:null}function tm(c){return c.replace(/^https:\/\//,"wss://").replace(/^http:\/\//,"ws://")}function eI(c){return c.replace(/^wss:\/\//,"https://").replace(/^ws:\/\//,"http://")}function DV(c){return eI(c).replace(/\/+$/,"")}var cZ=(c)=>{try{return RJ(c)}catch{return!1}};async function $Z(){let c=globalThis;if(c.WebSocket)return c.WebSocket;return(await import("ws")).default}var BV="figura-buzz-agent",QZ=60,JZ=1e4;class em{opts;socket=null;closed=!1;since;reconnectAttempt=0;reconnectTimer=null;stabilityTimer=null;authEventId=null;authed=!1;verify;channelSet;constructor(c){this.opts=c;this.since=c.since??Math.floor(Date.now()/1000),this.verify=c.verifyEvent??cZ,this.channelSet=new Set(c.channels)}channelAllowed(c){if(this.channelSet.size===0)return!0;let $=c.tags.filter((Q)=>Q[0]==="h").map((Q)=>Q[1]);if($.length!==1||!this.channelSet.has($[0]))return this.status(`dropped event referencing a non-allowlisted channel (h=${JSON.stringify($)})`),!1;return!0}get cursor(){return this.since}ingest(c){this.handleMessage(c)}start(){this.connect().catch((c)=>this.status(`connect failed: ${String(c)}`))}close(){if(this.closed=!0,this.reconnectTimer)clearTimeout(this.reconnectTimer);this.clearStability();try{this.socket?.close()}catch{}}get backoffAttempt(){return this.reconnectAttempt}status(c){this.opts.onStatus?.(c)}async connect(){if(this.closed)return;let c=tm(this.opts.relayUrl),$;try{$=await $Z()}catch(J){this.status(`no WebSocket implementation: ${String(J)}`);return}this.authed=!1,this.authEventId=null;let Q;try{Q=new $(c)}catch(J){this.status(`failed to open ${c}: ${String(J)}`),this.scheduleReconnect();return}this.socket=Q,Q.onopen=()=>{this.status(`connected to ${c}`),this.armStability(),this.sendReq()},Q.onmessage=(J)=>this.handleMessage(this.decode(J.data)),Q.onerror=(J)=>this.status(`socket error: ${String(J)}`),Q.onclose=()=>{if(this.clearStability(),this.closed)return;this.status("socket closed — reconnecting"),this.scheduleReconnect()}}markUsable(){if(this.reconnectAttempt!==0)this.status("connection stable — backoff reset");this.reconnectAttempt=0}armStability(){this.clearStability(),this.stabilityTimer=setTimeout(()=>{this.stabilityTimer=null,this.markUsable()},JZ)}clearStability(){if(this.stabilityTimer)clearTimeout(this.stabilityTimer),this.stabilityTimer=null}decode(c){if(typeof c==="string")return c;if(c instanceof Uint8Array)return new TextDecoder().decode(c);return String(c)}send(c){try{this.socket?.send(JSON.stringify(c))}catch($){this.status(`send failed: ${String($)}`)}}sendReq(){let c={kinds:[9],since:this.since};if(this.opts.channels.length>0)c["#h"]=this.opts.channels;this.send(["REQ",BV,c])}handleMessage(c){let $;try{$=JSON.parse(c)}catch{return}if(!Array.isArray($)||typeof $[0]!=="string")return;switch($[0]){case"AUTH":if(typeof $[1]==="string")this.respondToAuth($[1]);break;case"OK":if($[1]===this.authEventId&&$[2]===!0&&!this.authed)this.authed=!0,this.status("authenticated (NIP-42)"),this.markUsable(),this.sendReq();break;case"EOSE":if($[1]===BV)this.markUsable();break;case"EVENT":{let J=KV($[2]);if(!J){this.status("dropped malformed event");break}if(!this.verify(J)){this.status(`dropped event with invalid signature (pubkey ${J.pubkey.slice(0,12)}…)`);break}if(J.kind===9&&this.channelAllowed(J)){if(J.created_at<this.since){this.status("dropped replayed event at/below the resume cursor");break}let Y=Math.floor(Date.now()/1000)+QZ;if(J.created_at<=Y)this.since=J.created_at;this.opts.onEvent(J)}break}case"CLOSED":this.status(`subscription closed: ${String($[2]??"")}`);break;case"NOTICE":this.status(`relay notice: ${String($[1]??"")}`);break;default:break}}respondToAuth(c){let $=UV({challenge:c,relayUrl:tm(this.opts.relayUrl)}),Q=v8($,this.opts.identity);this.authEventId=Q.id,this.send(["AUTH",Q])}scheduleReconnect(){if(this.closed)return;if(this.reconnectTimer)clearTimeout(this.reconnectTimer);this.reconnectAttempt+=1;let c=Math.min(30000,500*2**(this.reconnectAttempt-1)),$=Math.floor(Math.random()*250);this.reconnectTimer=setTimeout(()=>void this.connect(),c+$)}}function YZ(c){let $=globalThis;if($.Buffer)return $.Buffer.from(c).toString("base64");let Q="";for(let J of c)Q+=String.fromCharCode(J);return btoa(Q)}function HV(c){return`Nostr ${YZ(new TextEncoder().encode(c))}`}function XZ(c,$,Q,J){let Y=vV({method:$,url:Q,nonce:WV(),payloadSha256:J?XV(J):void 0}),X=v8(Y,c);return HV(JSON.stringify(X))}async function jX(c,$,Q,J={}){let Y=J.fetchImpl??fetch,X=`${DV(c)}/events`,W=JSON.stringify(Q),m={ok:!1,status:0,body:""};for(let G=0;G<2;G++){let z=XZ($,"POST",X,W),x;try{x=await Y(X,{method:"POST",headers:{Authorization:z,"Content-Type":"application/json"},body:W})}catch(M){m={ok:!1,status:0,body:M instanceof Error?M.message:String(M)};continue}let q=await x.text().catch(()=>"");if(m={ok:x.ok,status:x.status,body:q},x.ok)return m;if(x.status!==429&&x.status<500)return m}return m}v0();var WZ=E.object({id:E.string(),publicId:E.string().nullish(),url:E.string().nullish(),title:E.string().optional(),slug:E.string().optional(),isPublic:E.boolean().optional()});async function OV(c){let $={prompt:c.prompt,publish:!0};if(c.device)$.device=c.device;if(c.platform)$.platform=c.platform;if(typeof c.issue==="number")$.issue=c.issue;let Q=await Wc("/v1/figs/generate",{method:"POST",body:$,token:c.token,apiUrl:c.apiUrl,source:"buzz-agent"}),J=WZ.safeParse(Q);if(!J.success)throw Error("unexpected response from the Figura engine (fig generation).");let Y=J.data,X=Y.publicId??null,W=Y.url??(X?MV(X,c.appOrigin):null);return{id:Y.id,publicId:X,url:W,title:Y.title||Y.slug||"Untitled fig"}}var mZ=E.object({number:E.number().int(),title:E.string().default(""),body:E.string().nullish(),html_url:E.string().optional(),state:E.string().optional(),labels:E.array(E.union([E.string(),E.object({name:E.string().optional()})])).optional()}),GZ=E.object({number:E.number().int(),html_url:E.string().optional()}),cG="https://api.github.com";function $G(c){return{Authorization:`Bearer ${c}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28","User-Agent":"figura-buzz-agent"}}function QG(c,$){return`https://github.com/${c}/issues/${$}`}function RV(c,$,Q){return{method:"GET",url:`${cG}/repos/${c}/issues/${$}`,headers:$G(Q)}}function pV(c,$,Q){let J={title:Q.title};if(Q.body)J.body=Q.body;if(Q.labels&&Q.labels.length)J.labels=Q.labels;return{method:"POST",url:`${cG}/repos/${c}/issues`,headers:{...$G($),"Content-Type":"application/json"},body:JSON.stringify(J)}}function IV(c,$,Q,J){return{method:"POST",url:`${cG}/repos/${c}/issues/${$}/comments`,headers:{...$G(Q),"Content-Type":"application/json"},body:JSON.stringify({body:J})}}function ZV(c){let $=mZ.safeParse(c);if(!$.success)throw Error(`unexpected GitHub issue response: ${$.error.issues.map((Y)=>`${Y.path.join(".")||"(root)"} ${Y.message}`).join("; ")}`);let Q=$.data,J=(Q.labels??[]).map((Y)=>typeof Y==="string"?Y:Y.name??"").filter((Y)=>Boolean(Y));return{number:Q.number,title:Q.title,body:Q.body??"",labels:J,url:Q.html_url??QG("",Q.number),state:Q.state}}function LV(c){let $=GZ.safeParse(c);if(!$.success)throw Error(`unexpected GitHub create response: ${$.error.issues.map((Q)=>`${Q.path.join(".")||"(root)"} ${Q.message}`).join("; ")}`);return $.data}function _V(c){return/^[^/\s]+\/[^/\s]+$/.test(c)}function SV(c,$){return`30617:${c}:${$}`}function AV(c){let $=c.subject.trim();if(!$)throw Error("issue subject must not be empty");let Q=[["a",SV(c.ownerHex,c.repoId)],["p",c.ownerHex]];for(let J of c.recipients??[])Q.push(["p",J]);Q.push(["subject",$]);for(let J of c.labels??[])Q.push(["t",J]);return{kind:1621,content:c.content,tags:Q,created_at:c.createdAt??Math.floor(Date.now()/1000)}}function CV(c){return{kind:1622,content:c.content,tags:[["a",SV(c.ownerHex,c.repoId)],["e",c.issueId,"","root"],["p",c.ownerHex]],created_at:c.createdAt??Math.floor(Date.now()/1000)}}async function JG(c,$){let Q=await $(c.url,{method:c.method,headers:c.headers,body:c.body}),J=await Q.text().catch(()=>"");if(!Q.ok){let Y=Q.headers.get("x-ratelimit-remaining");if((Q.status===403||Q.status===429)&&Y==="0"){let X=Q.headers.get("x-ratelimit-reset"),W=X?` (resets at ${new Date(Number(X)*1000).toISOString()})`:"";throw Error(`GitHub rate limit hit${W} — try again shortly.`)}throw Error(`GitHub ${c.method} → ${Q.status}: ${J.slice(0,200)}`)}try{return J?JSON.parse(J):{}}catch{throw Error(`GitHub returned a non-JSON ${Q.status} body: ${J.slice(0,120)}`)}}class YG{cfg;kind="github";supportsNumericFetch=!0;fetchImpl;constructor(c){this.cfg=c;if(!c.token)throw Error("GITHUB_TOKEN is required for the github issue tracker");if(!_V(c.repo))throw Error(`GITHUB_REPO must be owner/repo (got: ${c.repo})`);this.fetchImpl=c.fetchImpl??fetch}async fetchIssue(c){let $=await JG(RV(this.cfg.repo,c,this.cfg.token),this.fetchImpl);return ZV($)}async createIssue(c){let $=LV(await JG(pV(this.cfg.repo,this.cfg.token,c),this.fetchImpl));return{number:$.number,url:$.html_url??QG(this.cfg.repo,$.number),title:c.title}}async commentIssue(c,$){if(typeof c.number!=="number")return;await JG(IV(this.cfg.repo,c.number,this.cfg.token,$),this.fetchImpl)}}class XG{cfg;kind="buzz";supportsNumericFetch=!1;submit;constructor(c){this.cfg=c;if(!/^[0-9a-f]{64}$/i.test(c.ownerHex))throw Error("BUZZ_REPO_OWNER must be a 64-char hex pubkey");if(!c.repoId)throw Error("BUZZ_REPO_ID is required for the buzz issue tracker");this.submit=c.submit??jX}fetchIssue(){return Promise.reject(Error("the buzz issue tracker addresses issues by event id, not number — `fig issue <N>` needs the github tracker"))}async createIssue(c){let $=AV({ownerHex:this.cfg.ownerHex,repoId:this.cfg.repoId,subject:c.title,content:c.body??"",labels:c.labels}),Q=v8($,this.cfg.identity),J=await this.submit(this.cfg.relayUrl,this.cfg.identity,Q);if(!J.ok)throw Error(`relay rejected issue event: ${J.status} ${J.body.slice(0,200)}`);return{eventId:Q.id,url:`nostr:${Q.id}`,title:c.title}}async commentIssue(c,$){if(!c.eventId)return;let Q=CV({ownerHex:this.cfg.ownerHex,repoId:this.cfg.repoId,issueId:c.eventId,content:$}),J=v8(Q,this.cfg.identity),Y=await this.submit(this.cfg.relayUrl,this.cfg.identity,J);if(!Y.ok)throw Error(`relay rejected issue comment: ${Y.status} ${Y.body.slice(0,200)}`)}}var zZ=E.object({label:E.string().optional(),relayUrl:E.string(),privateKey:E.string(),figuraToken:E.string(),apiUrl:E.string().optional(),channels:E.array(E.string()),triggers:E.array(E.string()).optional(),device:E.string().optional(),platform:E.string().optional(),appOrigin:E.string().optional(),issueTracker:E.enum(["github","buzz"]).optional(),github:E.object({token:E.string(),repo:E.string()}).optional(),buzzRepo:E.object({ownerHex:E.string(),repoId:E.string()}).optional()});function xZ(c,$){if(c.issueTracker==="github"&&c.github)return new YG({token:c.github.token,repo:c.github.repo});if(c.issueTracker==="buzz"&&c.buzzRepo)return new XG({relayUrl:c.relayUrl,identity:$,ownerHex:c.buzzRepo.ownerHex,repoId:c.buzzRepo.repoId});return null}class WG{identity;tracker;seen=new Set;pendingReplies=new Map;deliveryQueue;watcher=null;queue=Promise.resolve();config;constructor(c){this.config=zZ.parse(c),this.identity=pJ(this.config.privateKey),this.tracker=xZ(this.config,this.identity),this.deliveryQueue=new rm(this.pendingReplies,{postReply:($)=>this.postReply($),log:($)=>this.log($)})}get npub(){return this.identity.npub}log(c){process.stderr.write(`[${this.config.label??"buzz-agent"}] ${c}
|
|
539
|
-
`)}postReply(c){let $=
|
|
540
|
-
`))}get startedCount(){return this.running.length}start(){this.log(`[supervisor] starting ${this.bindings.length} binding(s)`);for(let c of this.bindings){let $=
|
|
540
|
+
${UX({link:q.url??"(link unavailable)",title:q.title})}`;return await z(M,{action:"replied",via:W.via,kind:m.kind,link:q.url})}}}catch(x){let q=x instanceof Error?x.message:String(x);return Q(`request failed: ${q}`),await z(wQ(q),{action:"error-replied",reason:q})}}class em{pending;opts;max;base;schedule;cancel;attempts=new Map;timers=new Map;active=new Set;constructor(c,$){this.pending=c;this.opts=$;this.max=$.maxAttempts??6,this.base=$.baseDelayMs??1000,this.schedule=$.schedule??((Q,J)=>setTimeout(Q,J)),this.cancel=$.cancel??((Q)=>clearTimeout(Q))}log(c){this.opts.log?.(c)}get inFlight(){return this.active.size}start(c){if(this.active.has(c))return;if(!this.pending.has(c))return;this.active.add(c),this.arm(c)}arm(c){let $=this.attempts.get(c)??0,Q=this.base*2**$,J=this.schedule(()=>{this.timers.delete(c),this.tick(c)},Q);this.timers.set(c,J)}finish(c){this.active.delete(c),this.attempts.delete(c);let $=this.timers.get(c);if($!==void 0)this.cancel($),this.timers.delete(c)}async tick(c){let $=this.pending.get(c);if(!$){this.finish(c);return}let Q=(this.attempts.get(c)??0)+1;this.attempts.set(c,Q);let J=!1;try{J=(await this.opts.postReply($.input))?.ok===!0}catch{J=!1}if(J){this.pending.delete(c),this.finish(c),this.log(`delivered pending reply for ${c} on retry ${Q}`);return}if(Q>=this.max){this.pending.delete(c),this.finish(c),this.log(`giving up on pending reply for ${c} after ${Q} attempts`);return}this.arm(c)}stop(){for(let c of this.timers.values())this.cancel(c);this.timers.clear(),this.attempts.clear(),this.active.clear()}}function DV(c){let $=[["h",c.channelId]];if(c.replyTo)$.push(["e",c.replyTo,"","reply"]);let Q=new Set;for(let J of c.mentions??[]){let Y=J.toLowerCase();if(Q.has(Y))continue;Q.add(Y),$.push(["p",Y])}return{kind:9,content:c.content,tags:$,created_at:c.createdAt??Math.floor(Date.now()/1000)}}function BV(c){let $=[["u",c.url],["method",c.method],["nonce",c.nonce]];if(c.payloadSha256)$.push(["payload",c.payloadSha256]);return{kind:27235,content:"",tags:$,created_at:c.createdAt??Math.floor(Date.now()/1000)}}function HV(c){let $=[["relay",c.relayUrl],["challenge",c.challenge]];if(c.authTag)$.push(c.authTag);return{kind:22242,content:"",tags:$,created_at:c.createdAt??Math.floor(Date.now()/1000)}}var OV=/^[0-9a-f]{64}$/i,JI=/^[0-9a-f]{128}$/i,YI=E.object({id:E.string().regex(OV,"id must be 64-char hex"),pubkey:E.string().regex(OV,"pubkey must be 64-char hex"),sig:E.string().regex(JI,"sig must be 128-char hex"),kind:E.number().int(),created_at:E.number().int(),tags:E.array(E.array(E.string())),content:E.string()});function RV(c){let $=YI.safeParse(c);return $.success?$.data:null}function c7(c){return c.replace(/^https:\/\//,"wss://").replace(/^http:\/\//,"ws://")}function XI(c){return c.replace(/^wss:\/\//,"https://").replace(/^ws:\/\//,"http://")}function pV(c){return XI(c).replace(/\/+$/,"")}var WI=(c)=>{try{return RJ(c)}catch{return!1}};async function mI(){let c=globalThis;if(c.WebSocket)return c.WebSocket;return(await import("ws")).default}var ZV="figura-buzz-agent",GI=60,zI=1e4;class $7{opts;socket=null;closed=!1;since;reconnectAttempt=0;reconnectTimer=null;stabilityTimer=null;authEventId=null;authed=!1;verify;channelSet;constructor(c){this.opts=c;this.since=c.since??Math.floor(Date.now()/1000),this.verify=c.verifyEvent??WI,this.channelSet=new Set(c.channels)}channelAllowed(c){if(this.channelSet.size===0)return!0;let $=c.tags.filter((Q)=>Q[0]==="h").map((Q)=>Q[1]);if($.length!==1||!this.channelSet.has($[0]))return this.status(`dropped event referencing a non-allowlisted channel (h=${JSON.stringify($)})`),!1;return!0}get cursor(){return this.since}ingest(c){this.handleMessage(c)}start(){this.connect().catch((c)=>this.status(`connect failed: ${String(c)}`))}close(){if(this.closed=!0,this.reconnectTimer)clearTimeout(this.reconnectTimer);this.clearStability();try{this.socket?.close()}catch{}}get backoffAttempt(){return this.reconnectAttempt}status(c){this.opts.onStatus?.(c)}async connect(){if(this.closed)return;let c=c7(this.opts.relayUrl),$;try{$=await mI()}catch(J){this.status(`no WebSocket implementation: ${String(J)}`);return}this.authed=!1,this.authEventId=null;let Q;try{Q=new $(c)}catch(J){this.status(`failed to open ${c}: ${String(J)}`),this.scheduleReconnect();return}this.socket=Q,Q.onopen=()=>{this.status(`connected to ${c}`),this.armStability(),this.sendReq()},Q.onmessage=(J)=>this.handleMessage(this.decode(J.data)),Q.onerror=(J)=>this.status(`socket error: ${String(J)}`),Q.onclose=()=>{if(this.clearStability(),this.closed)return;this.status("socket closed — reconnecting"),this.scheduleReconnect()}}markUsable(){if(this.reconnectAttempt!==0)this.status("connection stable — backoff reset");this.reconnectAttempt=0}armStability(){this.clearStability(),this.stabilityTimer=setTimeout(()=>{this.stabilityTimer=null,this.markUsable()},zI)}clearStability(){if(this.stabilityTimer)clearTimeout(this.stabilityTimer),this.stabilityTimer=null}decode(c){if(typeof c==="string")return c;if(c instanceof Uint8Array)return new TextDecoder().decode(c);return String(c)}send(c){try{this.socket?.send(JSON.stringify(c))}catch($){this.status(`send failed: ${String($)}`)}}sendReq(){let c={kinds:[9],since:this.since};if(this.opts.channels.length>0)c["#h"]=this.opts.channels;this.send(["REQ",ZV,c])}handleMessage(c){let $;try{$=JSON.parse(c)}catch{return}if(!Array.isArray($)||typeof $[0]!=="string")return;switch($[0]){case"AUTH":if(typeof $[1]==="string")this.respondToAuth($[1]);break;case"OK":if($[1]===this.authEventId&&$[2]===!0&&!this.authed)this.authed=!0,this.status("authenticated (NIP-42)"),this.markUsable(),this.sendReq();break;case"EOSE":if($[1]===ZV)this.markUsable();break;case"EVENT":{let J=RV($[2]);if(!J){this.status("dropped malformed event");break}if(!this.verify(J)){this.status(`dropped event with invalid signature (pubkey ${J.pubkey.slice(0,12)}…)`);break}if(J.kind===9&&this.channelAllowed(J)){if(J.created_at<this.since){this.status("dropped replayed event at/below the resume cursor");break}let Y=Math.floor(Date.now()/1000)+GI;if(J.created_at<=Y)this.since=J.created_at;this.opts.onEvent(J)}break}case"CLOSED":this.status(`subscription closed: ${String($[2]??"")}`);break;case"NOTICE":this.status(`relay notice: ${String($[1]??"")}`);break;default:break}}respondToAuth(c){let $=HV({challenge:c,relayUrl:c7(this.opts.relayUrl)}),Q=v8($,this.opts.identity);this.authEventId=Q.id,this.send(["AUTH",Q])}scheduleReconnect(){if(this.closed)return;if(this.reconnectTimer)clearTimeout(this.reconnectTimer);this.reconnectAttempt+=1;let c=Math.min(30000,500*2**(this.reconnectAttempt-1)),$=Math.floor(Math.random()*250);this.reconnectTimer=setTimeout(()=>void this.connect(),c+$)}}function xI(c){let $=globalThis;if($.Buffer)return $.Buffer.from(c).toString("base64");let Q="";for(let J of c)Q+=String.fromCharCode(J);return btoa(Q)}function IV(c){return`Nostr ${xI(new TextEncoder().encode(c))}`}function qI(c,$,Q,J){let Y=BV({method:$,url:Q,nonce:qV(),payloadSha256:J?xV(J):void 0}),X=v8(Y,c);return IV(JSON.stringify(X))}async function KX(c,$,Q,J={}){let Y=J.fetchImpl??fetch,X=`${pV(c)}/events`,W=JSON.stringify(Q),m={ok:!1,status:0,body:""};for(let G=0;G<2;G++){let z=qI($,"POST",X,W),x;try{x=await Y(X,{method:"POST",headers:{Authorization:z,"Content-Type":"application/json"},body:W})}catch(M){m={ok:!1,status:0,body:M instanceof Error?M.message:String(M)};continue}let q=await x.text().catch(()=>"");if(m={ok:x.ok,status:x.status,body:q},x.ok)return m;if(x.status!==429&&x.status<500)return m}return m}U0();var MI=E.object({id:E.string(),publicId:E.string().nullish(),url:E.string().nullish(),title:E.string().optional(),slug:E.string().optional(),isPublic:E.boolean().optional()});async function LV(c){let $={prompt:c.prompt,publish:!0};if(c.device)$.device=c.device;if(c.platform)$.platform=c.platform;if(typeof c.issue==="number")$.issue=c.issue;let Q=await Wc("/v1/figs/generate",{method:"POST",body:$,token:c.token,apiUrl:c.apiUrl,source:"buzz-agent"}),J=MI.safeParse(Q);if(!J.success)throw Error("unexpected response from the Figura engine (fig generation).");let Y=J.data,X=Y.publicId??null,W=Y.url??(X?vV(X,c.appOrigin):null);return{id:Y.id,publicId:X,url:W,title:Y.title||Y.slug||"Untitled fig"}}var NI=E.object({number:E.number().int(),title:E.string().default(""),body:E.string().nullish(),html_url:E.string().optional(),state:E.string().optional(),labels:E.array(E.union([E.string(),E.object({name:E.string().optional()})])).optional()}),VI=E.object({number:E.number().int(),html_url:E.string().optional()}),Q7="https://api.github.com";function J7(c){return{Authorization:`Bearer ${c}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28","User-Agent":"figura-buzz-agent"}}function Y7(c,$){return`https://github.com/${c}/issues/${$}`}function _V(c,$,Q){return{method:"GET",url:`${Q7}/repos/${c}/issues/${$}`,headers:J7(Q)}}function SV(c,$,Q){let J={title:Q.title};if(Q.body)J.body=Q.body;if(Q.labels&&Q.labels.length)J.labels=Q.labels;return{method:"POST",url:`${Q7}/repos/${c}/issues`,headers:{...J7($),"Content-Type":"application/json"},body:JSON.stringify(J)}}function AV(c,$,Q,J){return{method:"POST",url:`${Q7}/repos/${c}/issues/${$}/comments`,headers:{...J7(Q),"Content-Type":"application/json"},body:JSON.stringify({body:J})}}function CV(c){let $=NI.safeParse(c);if(!$.success)throw Error(`unexpected GitHub issue response: ${$.error.issues.map((Y)=>`${Y.path.join(".")||"(root)"} ${Y.message}`).join("; ")}`);let Q=$.data,J=(Q.labels??[]).map((Y)=>typeof Y==="string"?Y:Y.name??"").filter((Y)=>Boolean(Y));return{number:Q.number,title:Q.title,body:Q.body??"",labels:J,url:Q.html_url??Y7("",Q.number),state:Q.state}}function PV(c){let $=VI.safeParse(c);if(!$.success)throw Error(`unexpected GitHub create response: ${$.error.issues.map((Q)=>`${Q.path.join(".")||"(root)"} ${Q.message}`).join("; ")}`);return $.data}function EV(c){return/^[^/\s]+\/[^/\s]+$/.test(c)}function bV(c,$){return`30617:${c}:${$}`}function FV(c){let $=c.subject.trim();if(!$)throw Error("issue subject must not be empty");let Q=[["a",bV(c.ownerHex,c.repoId)],["p",c.ownerHex]];for(let J of c.recipients??[])Q.push(["p",J]);Q.push(["subject",$]);for(let J of c.labels??[])Q.push(["t",J]);return{kind:1621,content:c.content,tags:Q,created_at:c.createdAt??Math.floor(Date.now()/1000)}}function TV(c){return{kind:1622,content:c.content,tags:[["a",bV(c.ownerHex,c.repoId)],["e",c.issueId,"","root"],["p",c.ownerHex]],created_at:c.createdAt??Math.floor(Date.now()/1000)}}async function X7(c,$){let Q=await $(c.url,{method:c.method,headers:c.headers,body:c.body}),J=await Q.text().catch(()=>"");if(!Q.ok){let Y=Q.headers.get("x-ratelimit-remaining");if((Q.status===403||Q.status===429)&&Y==="0"){let X=Q.headers.get("x-ratelimit-reset"),W=X?` (resets at ${new Date(Number(X)*1000).toISOString()})`:"";throw Error(`GitHub rate limit hit${W} — try again shortly.`)}throw Error(`GitHub ${c.method} → ${Q.status}: ${J.slice(0,200)}`)}try{return J?JSON.parse(J):{}}catch{throw Error(`GitHub returned a non-JSON ${Q.status} body: ${J.slice(0,120)}`)}}class W7{cfg;kind="github";supportsNumericFetch=!0;fetchImpl;constructor(c){this.cfg=c;if(!c.token)throw Error("GITHUB_TOKEN is required for the github issue tracker");if(!EV(c.repo))throw Error(`GITHUB_REPO must be owner/repo (got: ${c.repo})`);this.fetchImpl=c.fetchImpl??fetch}async fetchIssue(c){let $=await X7(_V(this.cfg.repo,c,this.cfg.token),this.fetchImpl);return CV($)}async createIssue(c){let $=PV(await X7(SV(this.cfg.repo,this.cfg.token,c),this.fetchImpl));return{number:$.number,url:$.html_url??Y7(this.cfg.repo,$.number),title:c.title}}async commentIssue(c,$){if(typeof c.number!=="number")return;await X7(AV(this.cfg.repo,c.number,this.cfg.token,$),this.fetchImpl)}}class m7{cfg;kind="buzz";supportsNumericFetch=!1;submit;constructor(c){this.cfg=c;if(!/^[0-9a-f]{64}$/i.test(c.ownerHex))throw Error("BUZZ_REPO_OWNER must be a 64-char hex pubkey");if(!c.repoId)throw Error("BUZZ_REPO_ID is required for the buzz issue tracker");this.submit=c.submit??KX}fetchIssue(){return Promise.reject(Error("the buzz issue tracker addresses issues by event id, not number — `fig issue <N>` needs the github tracker"))}async createIssue(c){let $=FV({ownerHex:this.cfg.ownerHex,repoId:this.cfg.repoId,subject:c.title,content:c.body??"",labels:c.labels}),Q=v8($,this.cfg.identity),J=await this.submit(this.cfg.relayUrl,this.cfg.identity,Q);if(!J.ok)throw Error(`relay rejected issue event: ${J.status} ${J.body.slice(0,200)}`);return{eventId:Q.id,url:`nostr:${Q.id}`,title:c.title}}async commentIssue(c,$){if(!c.eventId)return;let Q=TV({ownerHex:this.cfg.ownerHex,repoId:this.cfg.repoId,issueId:c.eventId,content:$}),J=v8(Q,this.cfg.identity),Y=await this.submit(this.cfg.relayUrl,this.cfg.identity,J);if(!Y.ok)throw Error(`relay rejected issue comment: ${Y.status} ${Y.body.slice(0,200)}`)}}var wI=E.object({label:E.string().optional(),relayUrl:E.string(),privateKey:E.string(),figuraToken:E.string(),apiUrl:E.string().optional(),channels:E.array(E.string()),triggers:E.array(E.string()).optional(),device:E.string().optional(),platform:E.string().optional(),appOrigin:E.string().optional(),issueTracker:E.enum(["github","buzz"]).optional(),github:E.object({token:E.string(),repo:E.string()}).optional(),buzzRepo:E.object({ownerHex:E.string(),repoId:E.string()}).optional()});function iI(c,$){if(c.issueTracker==="github"&&c.github)return new W7({token:c.github.token,repo:c.github.repo});if(c.issueTracker==="buzz"&&c.buzzRepo)return new m7({relayUrl:c.relayUrl,identity:$,ownerHex:c.buzzRepo.ownerHex,repoId:c.buzzRepo.repoId});return null}class G7{identity;tracker;seen=new Set;pendingReplies=new Map;deliveryQueue;watcher=null;queue=Promise.resolve();config;constructor(c){this.config=wI.parse(c),this.identity=pJ(this.config.privateKey),this.tracker=iI(this.config,this.identity),this.deliveryQueue=new em(this.pendingReplies,{postReply:($)=>this.postReply($),log:($)=>this.log($)})}get npub(){return this.identity.npub}log(c){process.stderr.write(`[${this.config.label??"buzz-agent"}] ${c}
|
|
541
|
+
`)}postReply(c){let $=DV({channelId:c.channelId,content:c.content,replyTo:c.replyTo,mentions:c.mentions}),Q=v8($,this.identity);return KX(this.config.relayUrl,this.identity,Q)}deps(){return{identity:{pubkeyHex:this.identity.pubkeyHex,npub:this.identity.npub},triggers:this.config.triggers,tracker:this.tracker,generate:(c,$)=>LV({token:this.config.figuraToken,apiUrl:this.config.apiUrl,prompt:c,device:this.config.device,platform:this.config.platform,appOrigin:this.config.appOrigin,issue:$?.issue}),postReply:(c)=>this.postReply(c),seen:this.seen,pendingReplies:this.pendingReplies,log:(c)=>this.log(c)}}start(){let c=this.deps();if(this.log(`agent npub: ${this.identity.npub}`),this.log(`watching ${this.config.channels.length||"(all subscribed)"} channel(s) on ${this.config.relayUrl}`),this.tracker)this.log(`issue tracker: ${this.tracker.kind}`);this.watcher=new $7({relayUrl:this.config.relayUrl,identity:this.identity,channels:this.config.channels,onStatus:($)=>this.log($),onEvent:($)=>{this.queue=this.queue.then(()=>KV($,c)).then((Q)=>{if(Q.action==="delivery-failed"&&this.pendingReplies.has($.id))this.deliveryQueue.start($.id)}).catch((Q)=>this.log(`handler error: ${String(Q)}`))}}),this.watcher.start()}stop(){this.deliveryQueue.stop(),this.watcher?.close()}}function vI(c){let $={label:z$(c),relayUrl:c.relayUrl,privateKey:c.privateKey,figuraToken:c.figuraToken,apiUrl:c.apiUrl,channels:c.channels,appOrigin:c.appOrigin,device:c.device,platform:c.platform,issueTracker:c.tracker?.kind};if(c.triggers&&c.triggers.length)$.triggers=c.triggers;if(c.tracker?.kind==="github")$.github={token:c.tracker.token??"",repo:c.tracker.repo??""};if(c.tracker?.kind==="buzz")$.buzzRepo={ownerHex:c.tracker.ownerHex??"",repoId:c.tracker.repoId??""};return $}class z7{bindings;agentFactory;log;running=[];constructor(c,$={}){this.bindings=c;this.agentFactory=$.agentFactory??((Q)=>new G7(vI(Q))),this.log=$.log??((Q)=>process.stderr.write(`${Q}
|
|
542
|
+
`))}get startedCount(){return this.running.length}start(){this.log(`[supervisor] starting ${this.bindings.length} binding(s)`);for(let c of this.bindings){let $=z$(c);try{let Q=this.agentFactory(c);Q.start(),this.running.push({label:$,agent:Q})}catch(Q){this.log(`[${$}] failed to start: ${Q instanceof Error?Q.message:String(Q)}`)}}this.log(`[supervisor] ${this.running.length}/${this.bindings.length} binding(s) running`)}stop(){for(let{label:c,agent:$}of this.running)try{$.stop()}catch(Q){this.log(`[${c}] error on stop: ${Q instanceof Error?Q.message:String(Q)}`)}this.running.length=0}}var jI=`figura buzz — run a Figura agent inside one or more Buzz communities
|
|
541
543
|
|
|
542
544
|
Usage:
|
|
543
545
|
figura buzz agent [options] Connect + watch channels, fig on request
|
|
@@ -580,14 +582,14 @@ Trigger grammar (in a watched channel):
|
|
|
580
582
|
@figura file issue: <title> File a new tracker issue.
|
|
581
583
|
@figura fig this and file it: <desc>
|
|
582
584
|
File an issue AND fig it, cross-linked.
|
|
583
|
-
`;function
|
|
585
|
+
`;function fV(c,$){let Q=[];for(let J=0;J<c.length;J++)if(c[J]===`--${$}`&&c[J+1])Q.push(c[J+1]);return Q}function nV(c){return(c??"").split(",").map(($)=>$.trim()).filter(Boolean)}async function uV(c){let{flags:$}=t(c),Q=f($,"config"),J=process.env.BUZZ_AGENTS_JSON;if(Q&&J)Z("both --config and BUZZ_AGENTS_JSON are set — pass exactly one bindings source.");if(Q){let Y;try{Y=await UI(Q,"utf8")}catch(X){Z(`could not read --config ${Q}: ${X instanceof Error?X.message:String(X)}`)}return{raw:Y,source:`--config ${Q}`}}if(J)return{raw:J,source:"BUZZ_AGENTS_JSON"};return null}function KI(c){let{flags:$}=t(c);return Boolean(process.env.BUZZ_RELAY_URL||process.env.BUZZ_PRIVATE_KEY||process.env.BUZZ_CHANNELS||f($,"relay")||f($,"key"))}async function DI(c){let{flags:$}=t(c),Q=f($,"relay")||process.env.BUZZ_RELAY_URL||"";if(!Q)Z("BUZZ_RELAY_URL (or --relay) is required.");let J=f($,"key")||process.env.BUZZ_PRIVATE_KEY||"";if(!J)Z("BUZZ_PRIVATE_KEY (or --key) is required.");let Y=await W0({tokenFlag:f($,"token"),apiUrlFlag:f($,"api-url")}),X=Y.token;if(!X)Z("FIGURA_TOKEN (or --token / `figura login`) is required — it binds figs to the team brand.");let W=[...fV(c,"channel"),...nV(process.env.BUZZ_CHANNELS)],m=fV(c,"trigger"),G=m.length?m:nV(process.env.BUZZ_TRIGGERS),z=(process.env.FIGURA_ISSUE_TRACKER||"").trim().toLowerCase();if(z&&z!=="github"&&z!=="buzz")Z(`FIGURA_ISSUE_TRACKER must be "github" or "buzz" (got: ${process.env.FIGURA_ISSUE_TRACKER}).`);let x=process.env.GITHUB_REPO,q=process.env.GITHUB_TOKEN,M=process.env.BUZZ_REPO_OWNER,N=process.env.BUZZ_REPO_ID,w,U=z==="github"||z==="buzz"?z:x?"github":M&&N?"buzz":void 0;if(U==="github")w={kind:"github",token:q??"",repo:x??""};else if(U==="buzz")w={kind:"buzz",ownerHex:M??"",repoId:N??""};let v={relayUrl:Q,privateKey:J,figuraToken:X,channels:W};if(G.length)v.triggers=G;if(Y.apiUrl)v.apiUrl=Y.apiUrl;if(process.env.FIGURA_APP_URL)v.appOrigin=process.env.FIGURA_APP_URL;let i=f($,"device")||process.env.BUZZ_FIG_DEVICE;if(i)v.device=i;let j=f($,"platform")||process.env.BUZZ_FIG_PLATFORM;if(j)v.platform=j;if(w)v.tracker=w;let D=Pq(v);if(D.length)Z(`invalid configuration (check the BUZZ_*/FIGURA_*/GITHUB_* env + flags):
|
|
584
586
|
${D.join(`
|
|
585
|
-
`)}`);return v}async function
|
|
586
|
-
`)})}return[await
|
|
587
|
+
`)}`);return v}async function BI(c){let $=await uV(c);if($){if(KI(c))Z(`a bindings config (${$.source}) and flat BUZZ_RELAY_URL/BUZZ_PRIVATE_KEY are both set — `+"use one or the other (the config is not merged with the flat env).");return _W($.raw,{source:$.source,onWarn:(Q)=>process.stderr.write(`[supervisor] warning: ${Q}
|
|
588
|
+
`)})}return[await DI(c)]}async function HI(c){let $=await BI(c),Q=new z7($);Q.start();let J=()=>{process.stderr.write(`
|
|
587
589
|
[supervisor] shutting down
|
|
588
|
-
`),Q.stop(),process.exit(0)};process.on("SIGINT",J),process.on("SIGTERM",J),await new Promise(()=>{})}async function
|
|
589
|
-
`)}return}let Q=process.env.BUZZ_PRIVATE_KEY;if(!Q)
|
|
590
|
-
`)}async function
|
|
590
|
+
`),Q.stop(),process.exit(0)};process.on("SIGINT",J),process.on("SIGTERM",J),await new Promise(()=>{})}async function OI(c){let $=await uV(c);if($){let J=_W($.raw,$.source);for(let Y of J){let X=pJ(Y.privateKey);process.stdout.write(`${z$(Y)} ${X.npub}
|
|
591
|
+
`)}return}let Q=process.env.BUZZ_PRIVATE_KEY;if(!Q)Z("BUZZ_PRIVATE_KEY is required to derive the agent npub.");process.stdout.write(`${pJ(Q).npub}
|
|
592
|
+
`)}async function kV(c){let $=c[0],Q=c.slice(1);if(!$||$==="--help"||$==="-h"||$==="help"){process.stdout.write(jI);return}switch($){case"agent":return HI(Q);case"whoami":return OI(Q);default:Z(`unknown buzz subcommand '${$}'. Run \`figura buzz --help\`.`)}}NY();v0();F$();var RI=f0(),pI=new Set(["upgrade","update","doctor","hook","mcp"]),ZI=`figura — command-line client for the Figura visualization SaaS
|
|
591
593
|
|
|
592
594
|
Usage:
|
|
593
595
|
figura <command> [options]
|
|
@@ -625,8 +627,8 @@ Global options:
|
|
|
625
627
|
--help, -h Show help
|
|
626
628
|
--version, -v Show version
|
|
627
629
|
|
|
628
|
-
Run \`figura <command> --help\` for command-specific help.`;async function
|
|
629
|
-
`);return}if($==="--version"||$==="-v"||$==="version"){process.stdout.write(
|
|
630
|
-
`);return}if(!
|
|
631
|
-
`),process.exit(1)}}
|
|
630
|
+
Run \`figura <command> --help\` for command-specific help.`;async function II(){let c=process.argv.slice(2),$=c[0],Q=c.slice(1);if(!$||$==="help"||$==="--help"||$==="-h"){process.stdout.write(ZI+`
|
|
631
|
+
`);return}if($==="--version"||$==="-v"||$==="version"){process.stdout.write(RI+`
|
|
632
|
+
`);return}if(!pI.has($)){let{apiUrl:J}=await W0({apiUrlFlag:f(t(Q).flags,"api-url")});await j6(c,J)}switch($){case"login":return HW(Q);case"link":return HW([...Q,"--project"]);case"whoami":return r6(Q);case"brand":return e6(Q);case"teams":return cq(Q);case"fig":return mq(Q);case"comment":return Gq(Q);case"token":return zq(Q);case"sources":return qq(Q);case"install":return s6(Q);case"skill":return b6(Q);case"mcp":return Mq(Q);case"buzz":return kV(Q);case"doctor":return iq(Q);case"hook":return k6(Q);case"statusline":return h6(Q);case"upgrade":case"update":return Nq(Q);default:process.stderr.write(`figura: unknown command '${$}'. Run \`figura --help\`.
|
|
633
|
+
`),process.exit(1)}}II().catch((c)=>{process.stderr.write(`figura: ${y(c)}
|
|
632
634
|
`),process.exit(1)});
|