figura-cli 0.23.2 → 0.25.0
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 +253 -209
- package/dist/mcp.js +41 -41
- package/package.json +2 -1
- package/skills/fig/SKILL.md +151 -94
- package/skills/skills.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,56 +1,110 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{createRequire as
|
|
3
|
-
`).forEach(function(W){if(Y=W.indexOf(":"),
|
|
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)=>{/*!
|
|
2
|
+
import{createRequire as k_}from"node:module";var v_=Object.create;var{getPrototypeOf:O_,defineProperty:F5,getOwnPropertyNames:F_}=Object;var C_=Object.prototype.hasOwnProperty;function I_($){return this[$]}var P_,T_,W7=($,Q,J)=>{var X=$!=null&&typeof $==="object";if(X){var Y=Q?P_??=new WeakMap:T_??=new WeakMap,G=Y.get($);if(G)return G}J=$!=null?v_(O_($)):{};let W=Q||!$||!$.__esModule?F5(J,"default",{value:$,enumerable:!0}):J;for(let q of F_($))if(!C_.call(W,q))F5(W,q,{get:I_.bind($,q),enumerable:!0});if(X)Y.set($,W);return W};var g=($,Q)=>()=>(Q||$((Q={exports:{}}).exports,Q),Q.exports);var A_=($)=>$;function E_($,Q){this[$]=A_.bind(null,Q)}var qJ=($,Q)=>{for(var J in Q)F5($,J,{get:Q[J],enumerable:!0,configurable:!0,set:E_.bind(Q,J)})};var R=($,Q)=>()=>($&&(Q=$($=0)),Q);var j0=k_(import.meta.url);function IX($,Q){return function(){return $.apply(Q,arguments)}}function KJ($){return $!==null&&!VJ($)&&$.constructor!==null&&!VJ($.constructor)&&H$($.constructor.isBuffer)&&$.constructor.isBuffer($)}function b_($){let Q;if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)Q=ArrayBuffer.isView($);else Q=$&&$.buffer&&HV($.buffer);return Q}function d_(){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 AX($,Q,{allOwnKeys:J=!1}={}){if($===null||typeof $>"u")return;let X,Y;if(typeof $!=="object")$=[$];if(DQ($))for(X=0,Y=$.length;X<Y;X++)Q.call(null,$[X],X,$);else{if(KJ($))return;let G=J?Object.getOwnPropertyNames($):Object.keys($),W=G.length,q;for(X=0;X<W;X++)q=G[X],Q.call(null,$[q],q,$)}}function ZV($,Q){if(KJ($))return null;Q=Q.toLowerCase();let J=Object.keys($),X=J.length,Y;while(X-- >0)if(Y=J[X],Q===Y.toLowerCase())return Y;return null}function C5(...$){let{caseless:Q,skipUndefined:J}=wV(this)&&this||{},X={},Y=(G,W)=>{if(W==="__proto__"||W==="constructor"||W==="prototype")return;let q=Q&&typeof W==="string"&&ZV(X,W)||W,z=z7(X,q)?X[q]:void 0;if(q7(z)&&q7(G))X[q]=C5(z,G);else if(q7(G))X[q]=C5({},G);else if(DQ(G))X[q]=G.slice();else if(!J||!VJ(G))X[q]=G};for(let G=0,W=$.length;G<W;G++){let q=$[G];if(!q||KJ(q))continue;if(AX(q,Y),typeof q!=="object"||DQ(q))continue;let z=Object.getOwnPropertySymbols(q);for(let K=0;K<z.length;K++){let V=z[K];if(xN.call(q,V))Y(q[V],V)}}return X}function jN($){return!!($&&H$($.append)&&$[MV]==="FormData"&&$[TX])}var c_,zJ,TX,MV,z7,PX=($,Q)=>{let J=$,X=[];while(J!=null&&J!==Object.prototype){if(X.indexOf(J)!==-1)return!1;if(X.push(J),z7(J,Q))return!0;J=zJ(J)}return!1},S_=($,Q)=>$!=null&&PX($,Q)?$[Q]:void 0,I5,u$=($)=>{return $=$.toLowerCase(),(Q)=>I5(Q)===$},V7=($)=>(Q)=>typeof Q===$,DQ,VJ,HV,f_,H$,BV,UJ=($)=>$!==null&&typeof $==="object",m_=($)=>$===!0||$===!1,q7=($)=>{if(!UJ($))return!1;let Q=zJ($);return(Q===null||Q===Object.prototype||zJ(Q)===null)&&!PX($,MV)&&!PX($,TX)},y_=($)=>{if(!UJ($)||KJ($))return!1;try{return Object.keys($).length===0&&Object.getPrototypeOf($)===Object.prototype}catch(Q){return!1}},h_,p_,u_=($)=>{return!!($&&typeof $.uri<"u")},g_=($)=>$&&typeof $.getParts<"u",l_,i_,n_=($)=>UJ($)&&H$($.pipe),UV,xV,a_=($)=>{if(!$)return!1;if(xV&&$ instanceof xV)return!0;let Q=zJ($);if(!Q||Q===Object.prototype)return!1;if(!H$($.append))return!1;let J=I5($);return J==="formdata"||J==="object"&&H$($.toString)&&$.toString()==="[object FormData]"},o_,s_,r_,t_,e_,$N=($)=>{return $.trim?$.trim():$.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},RQ,wV=($)=>!VJ($)&&$!==RQ,QN=($,Q,J,{allOwnKeys:X}={})=>{return AX(Q,(Y,G)=>{if(J&&H$(Y))Object.defineProperty($,G,{__proto__:null,value:IX(Y,J),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty($,G,{__proto__:null,value:Y,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:X}),$},JN=($)=>{if($.charCodeAt(0)===65279)$=$.slice(1);return $},XN=($,Q,J,X)=>{$.prototype=Object.create(Q.prototype,X),Object.defineProperty($.prototype,"constructor",{__proto__:null,value:$,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty($,"super",{__proto__:null,value:Q.prototype}),J&&Object.assign($.prototype,J)},YN=($,Q,J,X)=>{let Y,G,W,q={};if(Q=Q||{},$==null)return Q;do{Y=Object.getOwnPropertyNames($),G=Y.length;while(G-- >0)if(W=Y[G],(!X||X(W,$,Q))&&!q[W])Q[W]=$[W],q[W]=!0;$=J!==!1&&zJ($)}while($&&(!J||J($,Q))&&$!==Object.prototype);return Q},GN=($,Q,J)=>{if($=String($),J===void 0||J>$.length)J=$.length;J-=Q.length;let X=$.indexOf(Q,J);return X!==-1&&X===J},WN=($)=>{if(!$)return null;if(DQ($))return $;let Q=$.length;if(!BV(Q))return null;let J=Array(Q);while(Q-- >0)J[Q]=$[Q];return J},qN,zN=($,Q)=>{let X=($&&$[TX]).call($),Y;while((Y=X.next())&&!Y.done){let G=Y.value;Q.call($,G[0],G[1])}},VN=($,Q)=>{let J,X=[];while((J=$.exec(Q))!==null)X.push(J);return X},KN,UN=($)=>{return $.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(J,X,Y){return X.toUpperCase()+Y})},xN,MN,jV=($,Q)=>{let J=Object.getOwnPropertyDescriptors($),X={};AX(J,(Y,G)=>{let W;if((W=Q(Y,G,$))!==!1)X[G]=W||Y}),Object.defineProperties($,X)},HN=($)=>{jV($,(Q,J)=>{if(H$($)&&["arguments","caller","callee"].includes(J))return!1;let X=$[J];if(!H$(X))return;if(Q.enumerable=!1,"writable"in Q){Q.writable=!1;return}if(!Q.set)Q.set=()=>{throw Error("Can not rewrite read-only method '"+J+"'")}})},BN=($,Q)=>{let J={},X=(Y)=>{Y.forEach((G)=>{J[G]=!0})};return DQ($)?X($):X(String($).split(Q)),J},ZN=()=>{},wN=($,Q)=>{return $!=null&&Number.isFinite($=+$)?$:Q},LN=($)=>{let Q=new WeakSet,J=(X)=>{if(UJ(X)){if(Q.has(X))return;if(KJ(X))return X;if(!("toJSON"in X)){Q.add(X);let Y=DQ(X)?[]:{};return AX(X,(G,W)=>{let q=J(G);!VJ(q)&&(Y[W]=q)}),Q.delete(X),Y}}return X};return J($)},RN,DN=($)=>$&&(UJ($)||H$($))&&H$($.then)&&H$($.catch),LV,_N,RV=($)=>$!=null&&H$($[TX]),NN=($)=>$!=null&&PX($,TX)&&RV($),B;var A0=R(()=>{({toString:c_}=Object.prototype),{getPrototypeOf:zJ}=Object,{iterator:TX,toStringTag:MV}=Symbol,z7=(({hasOwnProperty:$})=>(Q,J)=>$.call(Q,J))(Object.prototype),I5=(($)=>(Q)=>{let J=c_.call(Q);return $[J]||($[J]=J.slice(8,-1).toLowerCase())})(Object.create(null)),{isArray:DQ}=Array,VJ=V7("undefined");HV=u$("ArrayBuffer");f_=V7("string"),H$=V7("function"),BV=V7("number"),h_=u$("Date"),p_=u$("File"),l_=u$("Blob"),i_=u$("FileList");UV=d_(),xV=typeof UV.FormData<"u"?UV.FormData:void 0,o_=u$("URLSearchParams"),[s_,r_,t_,e_]=["ReadableStream","Request","Response","Headers"].map(u$);RQ=(()=>{if(typeof globalThis<"u")return globalThis;return typeof self<"u"?self:typeof window<"u"?window:global})();qN=(($)=>{return(Q)=>{return $&&Q instanceof $}})(typeof Uint8Array<"u"&&zJ(Uint8Array)),KN=u$("HTMLFormElement"),{propertyIsEnumerable:xN}=Object.prototype,MN=u$("RegExp");RN=u$("AsyncFunction"),LV=(($,Q)=>{if($)return setImmediate;return Q?((J,X)=>{return RQ.addEventListener("message",({source:Y,data:G})=>{if(Y===RQ&&G===J)X.length&&X.shift()()},!1),(Y)=>{X.push(Y),RQ.postMessage(J,"*")}})(`axios@${Math.random()}`,[]):(J)=>setTimeout(J)})(typeof setImmediate==="function",H$(RQ.postMessage)),_N=typeof queueMicrotask<"u"?queueMicrotask.bind(RQ):typeof process<"u"&&process.nextTick||LV,B={isArray:DQ,isArrayBuffer:HV,isBuffer:KJ,isFormData:a_,isArrayBufferView:b_,isString:f_,isNumber:BV,isBoolean:m_,isObject:UJ,isPlainObject:q7,isEmptyObject:y_,isReadableStream:s_,isRequest:r_,isResponse:t_,isHeaders:e_,isUndefined:VJ,isDate:h_,isFile:p_,isReactNativeBlob:u_,isReactNative:g_,isBlob:l_,isRegExp:MN,isFunction:H$,isStream:n_,isURLSearchParams:o_,isTypedArray:qN,isFileList:i_,forEach:AX,merge:C5,extend:QN,trim:$N,stripBOM:JN,inherits:XN,toFlatObject:YN,kindOf:I5,kindOfTest:u$,endsWith:GN,toArray:WN,forEachEntry:zN,matchAll:VN,isHTMLForm:KN,hasOwnProperty:z7,hasOwnProp:z7,hasOwnInPrototypeChain:PX,getSafeProp:S_,reduceDescriptors:jV,freezeMethods:HN,toObjectSet:BN,toCamelCase:UN,noop:ZN,toFiniteNumber:wN,findKey:ZV,global:RQ,isContextDefined:wV,isSpecCompliantForm:jN,toJSONObject:LN,isAsyncFn:RN,isThenable:DN,setImmediate:LV,asap:_N,isIterable:RV,isSafeIterable:NN}});var vN,DV=($)=>{let Q={},J,X,Y;return $&&$.split(`
|
|
3
|
+
`).forEach(function(W){if(Y=W.indexOf(":"),J=W.substring(0,Y).trim().toLowerCase(),X=W.substring(Y+1).trim(),!J||Q[J]&&vN[J])return;if(J==="set-cookie")if(Q[J])Q[J].push(X);else Q[J]=[X];else Q[J]=Q[J]?Q[J]+", "+X:X}),Q};var _V=R(()=>{A0();vN=B.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 ON($){let Q=0,J=$.length;while(Q<J){let X=$.charCodeAt(Q);if(X!==9&&X!==32)break;Q+=1}while(J>Q){let X=$.charCodeAt(J-1);if(X!==9&&X!==32)break;J-=1}return Q===0&&J===$.length?$:$.slice(Q,J)}function P5($,Q){if(B.isArray($))return $.map((J)=>P5(J,Q));return ON(String($).replace(Q,""))}function xJ($){let Q=Object.create(null);return B.forEach($.toJSON(),(J,X)=>{Q[X]=IN(J)}),Q}var FN,CN,NV=($)=>P5($,FN),IN=($)=>P5($,CN);var EX=R(()=>{A0();FN=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),CN=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g")});function kX($){return $&&String($).trim().toLowerCase()}function K7($){if($===!1||$==null)return $;return B.isArray($)?$.map(K7):NV(String($))}function PN($){let Q=Object.create(null),J=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,X;while(X=J.exec($))Q[X[1]]=X[2];return Q}function T5($,Q,J,X,Y){if(B.isFunction(X))return X.call(this,Q,J);if(Y)Q=J;if(!B.isString(Q))return;if(B.isString(X))return Q.indexOf(X)!==-1;if(B.isRegExp(X))return X.test(Q)}function AN($){return $.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(Q,J,X)=>{return J.toUpperCase()+X})}function EN($,Q){let J=B.toCamelCase(" "+Q);["get","set","has"].forEach((X)=>{Object.defineProperty($,X+J,{__proto__:null,value:function(Y,G,W){return this[X].call(this,Q,Y,G,W)},configurable:!0})})}var vV,TN=($)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test($.trim()),cX,E0;var g$=R(()=>{A0();_V();EX();vV=Symbol("internals");cX=class cX{constructor($){$&&this.set($)}set($,Q,J){let X=this;function Y(W,q,z){let K=kX(q);if(!K)return;let V=B.findKey(X,K);if(!V||X[V]===void 0||z===!0||z===void 0&&X[V]!==!1)X[V||q]=K7(W)}let G=(W,q)=>B.forEach(W,(z,K)=>Y(z,K,q));if(B.isPlainObject($)||$ instanceof this.constructor)G($,Q);else if(B.isString($)&&($=$.trim())&&!TN($))G(DV($),Q);else if(B.isObject($)&&B.isSafeIterable($)){let W=Object.create(null),q,z;for(let K of $){if(!B.isArray(K))throw TypeError("Object iterator must return a key-value pair");if(z=K[0],B.hasOwnProp(W,z))q=W[z],W[z]=B.isArray(q)?[...q,K[1]]:[q,K[1]];else W[z]=K[1]}G(W,Q)}else $!=null&&Y(Q,$,J);return this}get($,Q){if($=kX($),$){let J=B.findKey(this,$);if(J){let X=this[J];if(!Q)return X;if(Q===!0)return PN(X);if(B.isFunction(Q))return Q.call(this,X,J);if(B.isRegExp(Q))return Q.exec(X);throw TypeError("parser must be boolean|regexp|function")}}}has($,Q){if($=kX($),$){let J=B.findKey(this,$);return!!(J&&this[J]!==void 0&&(!Q||T5(this,this[J],J,Q)))}return!1}delete($,Q){let J=this,X=!1;function Y(G){if(G=kX(G),G){let W=B.findKey(J,G);if(W&&(!Q||T5(J,J[W],W,Q)))delete J[W],X=!0}}if(B.isArray($))$.forEach(Y);else Y($);return X}clear($){let Q=Object.keys(this),J=Q.length,X=!1;while(J--){let Y=Q[J];if(!$||T5(this,this[Y],Y,$,!0))delete this[Y],X=!0}return X}normalize($){let Q=this,J={};return B.forEach(this,(X,Y)=>{let G=B.findKey(J,Y);if(G){Q[G]=K7(X),delete Q[Y];return}let W=$?AN(Y):String(Y).trim();if(W!==Y)delete Q[Y];Q[W]=K7(X),J[W]=!0}),this}concat(...$){return this.constructor.concat(this,...$)}toJSON($){let Q=Object.create(null);return B.forEach(this,(J,X)=>{J!=null&&J!==!1&&(Q[X]=$&&B.isArray(J)?J.join(", "):J)}),Q}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([$,Q])=>$+": "+Q).join(`
|
|
4
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from($){return $ instanceof this?$:new this($)}static concat($,...Q){let J=new this($);return Q.forEach((X)=>J.set(X)),J}static accessor($){let J=(this[vV]=this[vV]={accessors:{}}).accessors,X=this.prototype;function Y(G){let W=kX(G);if(!J[W])EN(X,G),J[W]=!0}return B.isArray($)?$.forEach(Y):Y($),this}};cX.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);B.reduceDescriptors(cX.prototype,({value:$},Q)=>{let J=Q[0].toUpperCase()+Q.slice(1);return{get:()=>$,set(X){this[J]=X}}});B.freezeMethods(cX);E0=cX});function cN($){if(B.hasOwnProp($,"toJSON"))return!0;let Q=Object.getPrototypeOf($);while(Q&&Q!==Object.prototype){if(B.hasOwnProp(Q,"toJSON"))return!0;Q=Object.getPrototypeOf(Q)}return!1}function SN($,Q){let J=new Set(Q.map((G)=>String(G).toLowerCase())),X=[],Y=(G)=>{if(G===null||typeof G!=="object")return G;if(B.isBuffer(G))return G;if(X.indexOf(G)!==-1)return;if(G instanceof E0)G=G.toJSON();X.push(G);let W;if(B.isArray(G))W=[],G.forEach((q,z)=>{let K=Y(q);if(!B.isUndefined(K))W[z]=K});else{if(!B.isPlainObject(G)&&cN(G))return X.pop(),G;W=Object.create(null);for(let[q,z]of Object.entries(G)){let K=J.has(q.toLowerCase())?kN:Y(z);if(!B.isUndefined(K))W[q]=K}}return X.pop(),W};return Y($)}var kN="[REDACTED ****]",o0,O;var U$=R(()=>{A0();g$();o0=class o0 extends Error{static from($,Q,J,X,Y,G){let W=new o0($.message,Q||$.code,J,X,Y);if(W.cause=$,W.name=$.name,$.status!=null&&W.status==null)W.status=$.status;return G&&Object.assign(W,G),W}constructor($,Q,J,X,Y){super($);if(Object.defineProperty(this,"message",{__proto__:null,value:$,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,Q&&(this.code=Q),J&&(this.config=J),X&&(this.request=X),Y)this.response=Y,this.status=Y.status}toJSON(){let $=this.config,Q=$&&B.hasOwnProp($,"redact")?$.redact:void 0,J=B.isArray(Q)&&Q.length>0?SN($,Q):B.toJSONObject($);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:J,code:this.code,status:this.status}}};o0.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";o0.ERR_BAD_OPTION="ERR_BAD_OPTION";o0.ECONNABORTED="ECONNABORTED";o0.ETIMEDOUT="ETIMEDOUT";o0.ECONNREFUSED="ECONNREFUSED";o0.ERR_NETWORK="ERR_NETWORK";o0.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";o0.ERR_DEPRECATED="ERR_DEPRECATED";o0.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";o0.ERR_BAD_REQUEST="ERR_BAD_REQUEST";o0.ERR_CANCELED="ERR_CANCELED";o0.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";o0.ERR_INVALID_URL="ERR_INVALID_URL";o0.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";O=o0});var CV=g((Dd,FV)=>{var OV=j0("stream").Stream,bN=j0("util");FV.exports=l$;function l$(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}bN.inherits(l$,OV);l$.create=function($,Q){var J=new this;Q=Q||{};for(var X in Q)J[X]=Q[X];J.source=$;var Y=$.emit;if($.emit=function(){return J._handleEmit(arguments),Y.apply($,arguments)},$.on("error",function(){}),J.pauseStream)$.pause();return J};Object.defineProperty(l$.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});l$.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};l$.prototype.resume=function(){if(!this._released)this.release();this.source.resume()};l$.prototype.pause=function(){this.source.pause()};l$.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function($){this.emit.apply(this,$)}.bind(this)),this._bufferedEvents=[]};l$.prototype.pipe=function(){var $=OV.prototype.pipe.apply(this,arguments);return this.resume(),$};l$.prototype._handleEmit=function($){if(this._released){this.emit.apply(this,$);return}if($[0]==="data")this.dataSize+=$[1].length,this._checkIfMaxDataSizeExceeded();this._bufferedEvents.push($)};l$.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded)return;if(this.dataSize<=this.maxDataSize)return;this._maxDataSizeExceeded=!0;var $="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",Error($))}});var AV=g((_d,TV)=>{var fN=j0("util"),PV=j0("stream").Stream,IV=CV();TV.exports=f0;function f0(){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}fN.inherits(f0,PV);f0.create=function($){var Q=new this;$=$||{};for(var J in $)Q[J]=$[J];return Q};f0.isStreamLike=function($){return typeof $!=="function"&&typeof $!=="string"&&typeof $!=="boolean"&&typeof $!=="number"&&!Buffer.isBuffer($)};f0.prototype.append=function($){var Q=f0.isStreamLike($);if(Q){if(!($ instanceof IV)){var J=IV.create($,{maxDataSize:1/0,pauseStream:this.pauseStreams});$.on("data",this._checkDataSize.bind(this)),$=J}if(this._handleErrors($),this.pauseStreams)$.pause()}return this._streams.push($),this};f0.prototype.pipe=function($,Q){return PV.prototype.pipe.call(this,$,Q),this.resume(),$};f0.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}};f0.prototype._realGetNext=function(){var $=this._streams.shift();if(typeof $>"u"){this.end();return}if(typeof $!=="function"){this._pipeNext($);return}var Q=$;Q(function(J){var X=f0.isStreamLike(J);if(X)J.on("data",this._checkDataSize.bind(this)),this._handleErrors(J);this._pipeNext(J)}.bind(this))};f0.prototype._pipeNext=function($){this._currentStream=$;var Q=f0.isStreamLike($);if(Q){$.on("end",this._getNext.bind(this)),$.pipe(this,{end:!1});return}var J=$;this.write(J),this._getNext()};f0.prototype._handleErrors=function($){var Q=this;$.on("error",function(J){Q._emitError(J)})};f0.prototype.write=function($){this.emit("data",$)};f0.prototype.pause=function(){if(!this.pauseStreams)return;if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};f0.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")};f0.prototype.end=function(){this._reset(),this.emit("end")};f0.prototype.destroy=function(){this._reset(),this.emit("close")};f0.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};f0.prototype._checkDataSize=function(){if(this._updateDataSize(),this.dataSize<=this.maxDataSize)return;var $="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(Error($))};f0.prototype._updateDataSize=function(){this.dataSize=0;var $=this;if(this._streams.forEach(function(Q){if(!Q.dataSize)return;$.dataSize+=Q.dataSize}),this._currentStream&&this._currentStream.dataSize)this.dataSize+=this._currentStream.dataSize};f0.prototype._emitError=function($){this._reset(),this.emit("error",$)}});var EV=g((Nd,mN)=>{mN.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 fV=g((iN)=>{/*!
|
|
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=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(`
|
|
9
|
+
*/var U7=EV(),yN=j0("path").extname,kV=/^\s*([^;\s]*)(?:;|\s|$)/,hN=/^text\//i;iN.charset=cV;iN.charsets={lookup:cV};iN.contentType=pN;iN.extension=uN;iN.extensions=Object.create(null);iN.lookup=gN;iN.types=Object.create(null);lN(iN.extensions,iN.types);function cV($){if(!$||typeof $!=="string")return!1;var Q=kV.exec($),J=Q&&U7[Q[1].toLowerCase()];if(J&&J.charset)return J.charset;if(Q&&hN.test(Q[1]))return"UTF-8";return!1}function pN($){if(!$||typeof $!=="string")return!1;var Q=$.indexOf("/")===-1?iN.lookup($):$;if(!Q)return!1;if(Q.indexOf("charset")===-1){var J=iN.charset(Q);if(J)Q+="; charset="+J.toLowerCase()}return Q}function uN($){if(!$||typeof $!=="string")return!1;var Q=kV.exec($),J=Q&&iN.extensions[Q[1].toLowerCase()];if(!J||!J.length)return!1;return J[0]}function gN($){if(!$||typeof $!=="string")return!1;var Q=yN("x."+$).toLowerCase().substr(1);if(!Q)return!1;return iN.types[Q]||!1}function lN($,Q){var J=["nginx","apache",void 0,"iana"];Object.keys(U7).forEach(function(Y){var G=U7[Y],W=G.extensions;if(!W||!W.length)return;$[Y]=W;for(var q=0;q<W.length;q++){var z=W[q];if(Q[z]){var K=J.indexOf(U7[Q[z]].source),V=J.indexOf(G.source);if(Q[z]!=="application/octet-stream"&&(K>V||K===V&&Q[z].substr(0,12)==="application/"))continue}Q[z]=Y}})}});var yV=g((Od,mV)=>{mV.exports=oN;function oN($){var Q=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(Q)Q($);else setTimeout($,0)}});var k5=g((Fd,pV)=>{var hV=yV();pV.exports=sN;function sN($){var Q=!1;return hV(function(){Q=!0}),function(X,Y){if(Q)$(X,Y);else hV(function(){$(X,Y)})}}});var c5=g((Cd,uV)=>{uV.exports=rN;function rN($){Object.keys($.jobs).forEach(tN.bind($)),$.jobs={}}function tN($){if(typeof this.jobs[$]=="function")this.jobs[$]()}});var S5=g((Id,lV)=>{var gV=k5(),eN=c5();lV.exports=$v;function $v($,Q,J,X){var Y=J.keyedList?J.keyedList[J.index]:J.index;J.jobs[Y]=Qv(Q,Y,$[Y],function(G,W){if(!(Y in J.jobs))return;if(delete J.jobs[Y],G)eN(J);else J.results[Y]=W;X(G,J.results)})}function Qv($,Q,J,X){var Y;if($.length==2)Y=$(J,gV(X));else Y=$(J,Q,gV(X));return Y}});var b5=g((Pd,iV)=>{iV.exports=Jv;function Jv($,Q){var J=!Array.isArray($),X={index:0,keyedList:J||Q?Object.keys($):null,jobs:{},results:J?{}:[],size:J?Object.keys($).length:$.length};if(Q)X.keyedList.sort(J?Q:function(Y,G){return Q($[Y],$[G])});return X}});var f5=g((Td,nV)=>{var Xv=c5(),Yv=k5();nV.exports=Gv;function Gv($){if(!Object.keys(this.jobs).length)return;this.index=this.size,Xv(this),Yv($)(null,this.results)}});var aV=g((Ad,dV)=>{var Wv=S5(),qv=b5(),zv=f5();dV.exports=Vv;function Vv($,Q,J){var X=qv($);while(X.index<(X.keyedList||$).length)Wv($,Q,X,function(Y,G){if(Y){J(Y,G);return}if(Object.keys(X.jobs).length===0){J(null,X.results);return}}),X.index++;return zv.bind(X,J)}});var m5=g((Ed,x7)=>{var oV=S5(),Kv=b5(),Uv=f5();x7.exports=xv;x7.exports.ascending=sV;x7.exports.descending=Mv;function xv($,Q,J,X){var Y=Kv($,J);return oV($,Q,Y,function G(W,q){if(W){X(W,q);return}if(Y.index++,Y.index<(Y.keyedList||$).length){oV($,Q,Y,G);return}X(null,Y.results)}),Uv.bind(Y,X)}function sV($,Q){return $<Q?-1:$>Q?1:0}function Mv($,Q){return-1*sV($,Q)}});var tV=g((kd,rV)=>{var Hv=m5();rV.exports=Bv;function Bv($,Q,J){return Hv($,Q,null,J)}});var $4=g((cd,eV)=>{eV.exports={parallel:aV(),serial:tV(),serialOrdered:m5()}});var y5=g((Sd,Q4)=>{Q4.exports=Object});var X4=g((bd,J4)=>{J4.exports=Error});var G4=g((fd,Y4)=>{Y4.exports=EvalError});var q4=g((md,W4)=>{W4.exports=RangeError});var V4=g((yd,z4)=>{z4.exports=ReferenceError});var U4=g((hd,K4)=>{K4.exports=SyntaxError});var M7=g((pd,x4)=>{x4.exports=TypeError});var H4=g((ud,M4)=>{M4.exports=URIError});var Z4=g((gd,B4)=>{B4.exports=Math.abs});var j4=g((ld,w4)=>{w4.exports=Math.floor});var R4=g((id,L4)=>{L4.exports=Math.max});var _4=g((nd,D4)=>{D4.exports=Math.min});var v4=g((dd,N4)=>{N4.exports=Math.pow});var F4=g((ad,O4)=>{O4.exports=Math.round});var I4=g((od,C4)=>{C4.exports=Number.isNaN||function(Q){return Q!==Q}});var T4=g((sd,P4)=>{var Zv=I4();P4.exports=function(Q){if(Zv(Q)||Q===0)return Q;return Q<0?-1:1}});var E4=g((rd,A4)=>{A4.exports=Object.getOwnPropertyDescriptor});var h5=g((td,k4)=>{var H7=E4();if(H7)try{H7([],"length")}catch($){H7=null}k4.exports=H7});var S4=g((ed,c4)=>{var B7=Object.defineProperty||!1;if(B7)try{B7({},"a",{value:1})}catch($){B7=!1}c4.exports=B7});var p5=g(($a,b4)=>{b4.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var Q={},J=Symbol("test"),X=Object(J);if(typeof J==="string")return!1;if(Object.prototype.toString.call(J)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(X)!=="[object Symbol]")return!1;var Y=42;Q[J]=Y;for(var G in Q)return!1;if(typeof Object.keys==="function"&&Object.keys(Q).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(Q).length!==0)return!1;var W=Object.getOwnPropertySymbols(Q);if(W.length!==1||W[0]!==J)return!1;if(!Object.prototype.propertyIsEnumerable.call(Q,J))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var q=Object.getOwnPropertyDescriptor(Q,J);if(q.value!==Y||q.enumerable!==!0)return!1}return!0}});var y4=g((Qa,m4)=>{var f4=typeof Symbol<"u"&&Symbol,wv=p5();m4.exports=function(){if(typeof f4!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof f4("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return wv()}});var u5=g((Ja,h4)=>{h4.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var g5=g((Xa,p4)=>{var jv=y5();p4.exports=jv.getPrototypeOf||null});var l4=g((Ya,g4)=>{var Lv="Function.prototype.bind called on incompatible ",Rv=Object.prototype.toString,Dv=Math.max,_v="[object Function]",u4=function(Q,J){var X=[];for(var Y=0;Y<Q.length;Y+=1)X[Y]=Q[Y];for(var G=0;G<J.length;G+=1)X[G+Q.length]=J[G];return X},Nv=function(Q,J){var X=[];for(var Y=J||0,G=0;Y<Q.length;Y+=1,G+=1)X[G]=Q[Y];return X},vv=function($,Q){var J="";for(var X=0;X<$.length;X+=1)if(J+=$[X],X+1<$.length)J+=Q;return J};g4.exports=function(Q){var J=this;if(typeof J!=="function"||Rv.apply(J)!==_v)throw TypeError(Lv+J);var X=Nv(arguments,1),Y,G=function(){if(this instanceof Y){var V=J.apply(this,u4(X,arguments));if(Object(V)===V)return V;return this}return J.apply(Q,u4(X,arguments))},W=Dv(0,J.length-X.length),q=[];for(var z=0;z<W;z++)q[z]="$"+z;if(Y=Function("binder","return function ("+vv(q,",")+"){ return binder.apply(this,arguments); }")(G),J.prototype){var K=function(){};K.prototype=J.prototype,Y.prototype=new K,K.prototype=null}return Y}});var SX=g((Ga,i4)=>{var Ov=l4();i4.exports=Function.prototype.bind||Ov});var Z7=g((Wa,n4)=>{n4.exports=Function.prototype.call});var l5=g((qa,d4)=>{d4.exports=Function.prototype.apply});var o4=g((za,a4)=>{a4.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var r4=g((Va,s4)=>{var Fv=SX(),Cv=l5(),Iv=Z7(),Pv=o4();s4.exports=Pv||Fv.call(Iv,Cv)});var e4=g((Ka,t4)=>{var Tv=SX(),Av=M7(),Ev=Z7(),kv=r4();t4.exports=function(Q){if(Q.length<1||typeof Q[0]!=="function")throw new Av("a function is required");return kv(Tv,Ev,Q)}});var G2=g((Ua,Y2)=>{var cv=e4(),$2=h5(),J2;try{J2=[].__proto__===Array.prototype}catch($){if(!$||typeof $!=="object"||!("code"in $)||$.code!=="ERR_PROTO_ACCESS")throw $}var i5=!!J2&&$2&&$2(Object.prototype,"__proto__"),X2=Object,Q2=X2.getPrototypeOf;Y2.exports=i5&&typeof i5.get==="function"?cv([i5.get]):typeof Q2==="function"?function(Q){return Q2(Q==null?Q:X2(Q))}:!1});var K2=g((xa,V2)=>{var W2=u5(),q2=g5(),z2=G2();V2.exports=W2?function(Q){return W2(Q)}:q2?function(Q){if(!Q||typeof Q!=="object"&&typeof Q!=="function")throw TypeError("getProto: not an object");return q2(Q)}:z2?function(Q){return z2(Q)}:null});var w7=g((Ma,U2)=>{var Sv=Function.prototype.call,bv=Object.prototype.hasOwnProperty,fv=SX();U2.exports=fv.call(Sv,bv)});var w2=g((Ha,Z2)=>{var Z0,mv=y5(),yv=X4(),hv=G4(),pv=q4(),uv=V4(),ZJ=U4(),BJ=M7(),gv=H4(),lv=Z4(),iv=j4(),nv=R4(),dv=_4(),av=v4(),ov=F4(),sv=T4(),H2=Function,n5=function($){try{return H2('"use strict"; return ('+$+").constructor;")()}catch(Q){}},bX=h5(),rv=S4(),d5=function(){throw new BJ},tv=bX?function(){try{return arguments.callee,d5}catch($){try{return bX(arguments,"callee").get}catch(Q){return d5}}}():d5,MJ=y4()(),n0=K2(),ev=g5(),$O=u5(),B2=l5(),fX=Z7(),HJ={},QO=typeof Uint8Array>"u"||!n0?Z0:n0(Uint8Array),_Q={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Z0:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Z0:ArrayBuffer,"%ArrayIteratorPrototype%":MJ&&n0?n0([][Symbol.iterator]()):Z0,"%AsyncFromSyncIteratorPrototype%":Z0,"%AsyncFunction%":HJ,"%AsyncGenerator%":HJ,"%AsyncGeneratorFunction%":HJ,"%AsyncIteratorPrototype%":HJ,"%Atomics%":typeof Atomics>"u"?Z0:Atomics,"%BigInt%":typeof BigInt>"u"?Z0:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Z0:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Z0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Z0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":yv,"%eval%":eval,"%EvalError%":hv,"%Float16Array%":typeof Float16Array>"u"?Z0:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Z0:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Z0:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Z0:FinalizationRegistry,"%Function%":H2,"%GeneratorFunction%":HJ,"%Int8Array%":typeof Int8Array>"u"?Z0:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Z0:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Z0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":MJ&&n0?n0(n0([][Symbol.iterator]())):Z0,"%JSON%":typeof JSON==="object"?JSON:Z0,"%Map%":typeof Map>"u"?Z0:Map,"%MapIteratorPrototype%":typeof Map>"u"||!MJ||!n0?Z0:n0(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":mv,"%Object.getOwnPropertyDescriptor%":bX,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Z0:Promise,"%Proxy%":typeof Proxy>"u"?Z0:Proxy,"%RangeError%":pv,"%ReferenceError%":uv,"%Reflect%":typeof Reflect>"u"?Z0:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Z0:Set,"%SetIteratorPrototype%":typeof Set>"u"||!MJ||!n0?Z0:n0(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Z0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":MJ&&n0?n0(""[Symbol.iterator]()):Z0,"%Symbol%":MJ?Symbol:Z0,"%SyntaxError%":ZJ,"%ThrowTypeError%":tv,"%TypedArray%":QO,"%TypeError%":BJ,"%Uint8Array%":typeof Uint8Array>"u"?Z0:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Z0:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Z0:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Z0:Uint32Array,"%URIError%":gv,"%WeakMap%":typeof WeakMap>"u"?Z0:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Z0:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Z0:WeakSet,"%Function.prototype.call%":fX,"%Function.prototype.apply%":B2,"%Object.defineProperty%":rv,"%Object.getPrototypeOf%":ev,"%Math.abs%":lv,"%Math.floor%":iv,"%Math.max%":nv,"%Math.min%":dv,"%Math.pow%":av,"%Math.round%":ov,"%Math.sign%":sv,"%Reflect.getPrototypeOf%":$O};if(n0)try{null.error}catch($){a5=n0(n0($)),_Q["%Error.prototype%"]=a5}var a5,JO=function $(Q){var J;if(Q==="%AsyncFunction%")J=n5("async function () {}");else if(Q==="%GeneratorFunction%")J=n5("function* () {}");else if(Q==="%AsyncGeneratorFunction%")J=n5("async function* () {}");else if(Q==="%AsyncGenerator%"){var X=$("%AsyncGeneratorFunction%");if(X)J=X.prototype}else if(Q==="%AsyncIteratorPrototype%"){var Y=$("%AsyncGenerator%");if(Y&&n0)J=n0(Y.prototype)}return _Q[Q]=J,J},x2={__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"]},mX=SX(),j7=w7(),XO=mX.call(fX,Array.prototype.concat),YO=mX.call(B2,Array.prototype.splice),M2=mX.call(fX,String.prototype.replace),L7=mX.call(fX,String.prototype.slice),GO=mX.call(fX,RegExp.prototype.exec),WO=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,qO=/\\(\\)?/g,zO=function(Q){var J=L7(Q,0,1),X=L7(Q,-1);if(J==="%"&&X!=="%")throw new ZJ("invalid intrinsic syntax, expected closing `%`");else if(X==="%"&&J!=="%")throw new ZJ("invalid intrinsic syntax, expected opening `%`");var Y=[];return M2(Q,WO,function(G,W,q,z){Y[Y.length]=q?M2(z,qO,"$1"):W||G}),Y},VO=function(Q,J){var X=Q,Y;if(j7(x2,X))Y=x2[X],X="%"+Y[0]+"%";if(j7(_Q,X)){var G=_Q[X];if(G===HJ)G=JO(X);if(typeof G>"u"&&!J)throw new BJ("intrinsic "+Q+" exists, but is not available. Please file an issue!");return{alias:Y,name:X,value:G}}throw new ZJ("intrinsic "+Q+" does not exist!")};Z2.exports=function(Q,J){if(typeof Q!=="string"||Q.length===0)throw new BJ("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof J!=="boolean")throw new BJ('"allowMissing" argument must be a boolean');if(GO(/^%?[^%]*%?$/,Q)===null)throw new ZJ("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var X=zO(Q),Y=X.length>0?X[0]:"",G=VO("%"+Y+"%",J),W=G.name,q=G.value,z=!1,K=G.alias;if(K)Y=K[0],YO(X,XO([0,1],K));for(var V=1,U=!0;V<X.length;V+=1){var x=X[V],M=L7(x,0,1),H=L7(x,-1);if((M==='"'||M==="'"||M==="`"||(H==='"'||H==="'"||H==="`"))&&M!==H)throw new ZJ("property names with quotes must have matching quotes");if(x==="constructor"||!U)z=!0;if(Y+="."+x,W="%"+Y+"%",j7(_Q,W))q=_Q[W];else if(q!=null){if(!(x in q)){if(!J)throw new BJ("base intrinsic for "+Q+" exists, but the property is not available.");return}if(bX&&V+1>=X.length){var w=bX(q,x);if(U=!!w,U&&"get"in w&&!("originalValue"in w.get))q=w.get;else q=q[x]}else U=j7(q,x),q=q[x];if(U&&!z)_Q[W]=q}}return q}});var L2=g((Ba,j2)=>{var KO=p5();j2.exports=function(){return KO()&&!!Symbol.toStringTag}});var _2=g((Za,D2)=>{var UO=w2(),R2=UO("%Object.defineProperty%",!0),xO=L2()(),MO=w7(),HO=M7(),R7=xO?Symbol.toStringTag:null;D2.exports=function(Q,J){var X=arguments.length>2&&!!arguments[2]&&arguments[2].force,Y=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof X<"u"&&typeof X!=="boolean"||typeof Y<"u"&&typeof Y!=="boolean")throw new HO("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");if(R7&&(X||!MO(Q,R7)))if(R2)R2(Q,R7,{configurable:!Y,enumerable:!1,value:J,writable:!1});else Q[R7]=J}});var v2=g((wa,N2)=>{N2.exports=function($,Q){return Object.keys(Q).forEach(function(J){$[J]=$[J]||Q[J]}),$}});var C2=g((ja,F2)=>{var t5=AV(),BO=j0("util"),o5=j0("path"),ZO=j0("http"),wO=j0("https"),jO=j0("url").parse,LO=j0("fs"),RO=j0("stream").Stream,DO=j0("crypto"),s5=fV(),_O=$4(),NO=_2(),n8=w7(),r5=v2();function O2($){return String($).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function _0($){if(!(this instanceof _0))return new _0($);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],t5.call(this),$=$||{};for(var Q in $)this[Q]=$[Q]}BO.inherits(_0,t5);_0.LINE_BREAK=`\r
|
|
10
|
+
`;_0.DEFAULT_CONTENT_TYPE="application/octet-stream";_0.prototype.append=function($,Q,J){if(J=J||{},typeof J==="string")J={filename:J};var X=t5.prototype.append.bind(this);if(typeof Q==="number"||Q==null)Q=String(Q);if(Array.isArray(Q)){this._error(Error("Arrays are not supported."));return}var Y=this._multiPartHeader($,Q,J),G=this._multiPartFooter();X(Y),X(Q),X(G),this._trackLength(Y,Q,J)};_0.prototype._trackLength=function($,Q,J){var X=0;if(J.knownLength!=null)X+=Number(J.knownLength);else if(Buffer.isBuffer(Q))X=Q.length;else if(typeof Q==="string")X=Buffer.byteLength(Q);if(this._valueLength+=X,this._overheadLength+=Buffer.byteLength($)+_0.LINE_BREAK.length,!Q||!Q.path&&!(Q.readable&&n8(Q,"httpVersion"))&&!(Q instanceof RO))return;if(!J.knownLength)this._valuesToMeasure.push(Q)};_0.prototype._lengthRetriever=function($,Q){if(n8($,"fd"))if($.end!=null&&$.end!=1/0&&$.start!=null)Q(null,$.end+1-($.start?$.start:0));else LO.stat($.path,function(J,X){if(J){Q(J);return}var Y=X.size-($.start?$.start:0);Q(null,Y)});else if(n8($,"httpVersion"))Q(null,Number($.headers["content-length"]));else if(n8($,"httpModule"))$.on("response",function(J){$.pause(),Q(null,Number(J.headers["content-length"]))}),$.resume();else Q("Unknown stream")};_0.prototype._multiPartHeader=function($,Q,J){if(typeof J.header==="string")return J.header;var X=this._getContentDisposition(Q,J),Y=this._getContentType(Q,J),G="",W={"Content-Disposition":["form-data",'name="'+O2($)+'"'].concat(X||[]),"Content-Type":[].concat(Y||[])};if(typeof J.header==="object")r5(W,J.header);var q;for(var z in W)if(n8(W,z)){if(q=W[z],q==null)continue;if(!Array.isArray(q))q=[q];if(q.length)G+=z+": "+q.join("; ")+_0.LINE_BREAK}return"--"+this.getBoundary()+_0.LINE_BREAK+G+_0.LINE_BREAK};_0.prototype._getContentDisposition=function($,Q){var J;if(typeof Q.filepath==="string")J=o5.normalize(Q.filepath).replace(/\\/g,"/");else if(Q.filename||$&&($.name||$.path))J=o5.basename(Q.filename||$&&($.name||$.path));else if($&&$.readable&&n8($,"httpVersion"))J=o5.basename($.client._httpMessage.path||"");if(J)return'filename="'+O2(J)+'"'};_0.prototype._getContentType=function($,Q){var J=Q.contentType;if(!J&&$&&$.name)J=s5.lookup($.name);if(!J&&$&&$.path)J=s5.lookup($.path);if(!J&&$&&$.readable&&n8($,"httpVersion"))J=$.headers["content-type"];if(!J&&(Q.filepath||Q.filename))J=s5.lookup(Q.filepath||Q.filename);if(!J&&$&&typeof $==="object")J=_0.DEFAULT_CONTENT_TYPE;return J};_0.prototype._multiPartFooter=function(){return function($){var Q=_0.LINE_BREAK,J=this._streams.length===0;if(J)Q+=this._lastBoundary();$(Q)}.bind(this)};_0.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+_0.LINE_BREAK};_0.prototype.getHeaders=function($){var Q,J={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(Q in $)if(n8($,Q))J[Q.toLowerCase()]=$[Q];return J};_0.prototype.setBoundary=function($){if(typeof $!=="string")throw TypeError("FormData boundary must be a string");this._boundary=$};_0.prototype.getBoundary=function(){if(!this._boundary)this._generateBoundary();return this._boundary};_0.prototype.getBuffer=function(){var $=new Buffer.alloc(0),Q=this.getBoundary();for(var J=0,X=this._streams.length;J<X;J++)if(typeof this._streams[J]!=="function"){if(Buffer.isBuffer(this._streams[J]))$=Buffer.concat([$,this._streams[J]]);else $=Buffer.concat([$,Buffer.from(this._streams[J])]);if(typeof this._streams[J]!=="string"||this._streams[J].substring(2,Q.length+2)!==Q)$=Buffer.concat([$,Buffer.from(_0.LINE_BREAK)])}return Buffer.concat([$,Buffer.from(this._lastBoundary())])};_0.prototype._generateBoundary=function(){this._boundary="--------------------------"+DO.randomBytes(12).toString("hex")};_0.prototype.getLengthSync=function(){var $=this._overheadLength+this._valueLength;if(this._streams.length)$+=this._lastBoundary().length;if(!this.hasKnownLength())this._error(Error("Cannot calculate proper length in synchronous way."));return $};_0.prototype.hasKnownLength=function(){var $=!0;if(this._valuesToMeasure.length)$=!1;return $};_0.prototype.getLength=function($){var Q=this._overheadLength+this._valueLength;if(this._streams.length)Q+=this._lastBoundary().length;if(!this._valuesToMeasure.length){process.nextTick($.bind(this,null,Q));return}_O.parallel(this._valuesToMeasure,this._lengthRetriever,function(J,X){if(J){$(J);return}X.forEach(function(Y){Q+=Y}),$(null,Q)})};_0.prototype.submit=function($,Q){var J,X,Y={method:"post"};if(typeof $==="string")$=jO($),X=r5({port:$.port,path:$.pathname,host:$.hostname,protocol:$.protocol},Y);else if(X=r5($,Y),!X.port)X.port=X.protocol==="https:"?443:80;if(X.headers=this.getHeaders($.headers),X.protocol==="https:")J=wO.request(X);else J=ZO.request(X);return this.getLength(function(G,W){if(G&&G!=="Unknown stream"){this._error(G);return}if(W)J.setHeader("Content-Length",W);if(this.pipe(J),Q){var q,z=function(K,V){return J.removeListener("error",z),J.removeListener("response",q),Q.call(this,K,V)};q=z.bind(this,null),J.on("error",z),J.on("response",q)}}.bind(this)),J};_0.prototype._error=function($){if(!this.error)this.error=$,this.pause(),this.emit("error",$)};_0.prototype.toString=function(){return"[object FormData]"};NO(_0.prototype,"FormData");F2.exports=_0});var I2,D7;var e5=R(()=>{I2=W7(C2(),1),D7=I2.default});function QG($){return B.isPlainObject($)||B.isArray($)}function P2($){return B.endsWith($,"[]")?$.slice(0,-2):$}function $G($,Q,J){if(!$)return Q;return $.concat(Q).map(function(Y,G){return Y=P2(Y),!J&&G?"["+Y+"]":Y}).join(J?".":"")}function vO($){return B.isArray($)&&!$.some(QG)}function FO($,Q,J){if(!B.isObject($))throw TypeError("target must be an object");Q=Q||new(D7||FormData),J=B.toFlatObject(J,{metaTokens:!0,dots:!1,indexes:!1},!1,function(L,D){return!B.isUndefined(D[L])});let X=J.metaTokens,Y=J.visitor||H,G=J.dots,W=J.indexes,q=J.Blob||typeof Blob<"u"&&Blob,z=J.maxDepth===void 0?JG:J.maxDepth,K=q&&B.isSpecCompliantForm(Q),V=[];if(!B.isFunction(Y))throw TypeError("visitor must be a function");function U(Z){if(Z===null)return"";if(B.isDate(Z))return Z.toISOString();if(B.isBoolean(Z))return Z.toString();if(!K&&B.isBlob(Z))throw new O("Blob is not supported. Use a Buffer instead.");if(B.isArrayBuffer(Z)||B.isTypedArray(Z))return K&&typeof Blob==="function"?new Blob([Z]):Buffer.from(Z);return Z}function x(Z){if(Z>z)throw new O("Object is too deeply nested ("+Z+" levels). Max depth: "+z,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function M(Z,L){if(z===1/0)return JSON.stringify(Z);let D=[];return JSON.stringify(Z,function(J0,n){if(!B.isObject(n))return n;while(D.length&&D[D.length-1]!==this)D.pop();return D.push(n),x(L+D.length-1),n})}function H(Z,L,D){let F=Z;if(B.isReactNative(Q)&&B.isReactNativeBlob(Z))return Q.append($G(D,L,G),U(Z)),!1;if(Z&&!D&&typeof Z==="object"){if(B.endsWith(L,"{}"))L=X?L:L.slice(0,-2),Z=M(Z,1);else if(B.isArray(Z)&&vO(Z)||(B.isFileList(Z)||B.endsWith(L,"[]"))&&(F=B.toArray(Z)))return L=P2(L),F.forEach(function(n,e){!(B.isUndefined(n)||n===null)&&Q.append(W===!0?$G([L],e,G):W===null?L:L+"[]",U(n))}),!1}if(QG(Z))return!0;return Q.append($G(D,L,G),U(Z)),!1}let w=Object.assign(OO,{defaultVisitor:H,convertValue:U,isVisitable:QG});function j(Z,L,D=0){if(B.isUndefined(Z))return;if(x(D),V.indexOf(Z)!==-1)throw Error("Circular reference detected in "+L.join("."));V.push(Z),B.forEach(Z,function(J0,n){if((!(B.isUndefined(J0)||J0===null)&&Y.call(Q,J0,B.isString(n)?n.trim():n,L,w))===!0)j(J0,L?L.concat(n):[n],D+1)}),V.pop()}if(!B.isObject($))throw TypeError("data must be an object");return j($),Q}var JG=100,OO,d8;var wJ=R(()=>{A0();U$();e5();OO=B.toFlatObject(B,{},null,function(Q){return/^is[A-Z]/.test(Q)});d8=FO});function T2($){let Q={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent($).replace(/[!'()~]|%20/g,function(X){return Q[X]})}function A2($,Q){this._pairs=[],$&&d8($,this,Q)}var E2,k2;var c2=R(()=>{wJ();E2=A2.prototype;E2.append=function(Q,J){this._pairs.push([Q,J])};E2.toString=function(Q){let J=Q?function(X){return Q.call(this,X,T2)}:T2;return this._pairs.map(function(Y){return J(Y[0])+"="+J(Y[1])},"").join("&")};k2=A2});function CO($){return encodeURIComponent($).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function NQ($,Q,J){if(!Q)return $;let X=B.isFunction(J)?{serialize:J}:J,Y=B.getSafeProp(X,"encode")||CO,G=B.getSafeProp(X,"serialize"),W;if(G)W=G(Q,X);else W=B.isURLSearchParams(Q)?Q.toString():new k2(Q,X).toString(Y);if(W){let q=$.indexOf("#");if(q!==-1)$=$.slice(0,q);$+=($.indexOf("?")===-1?"?":"&")+W}return $}var _7=R(()=>{A0();c2()});class S2{constructor(){this.handlers=[]}use($,Q,J){return this.handlers.push({fulfilled:$,rejected:Q,synchronous:J?J.synchronous:!1,runWhen:J?J.runWhen:null}),this.handlers.length-1}eject($){if(this.handlers[$])this.handlers[$]=null}clear(){if(this.handlers)this.handlers=[]}forEach($){B.forEach(this.handlers,function(J){if(J!==null)$(J)})}}var XG;var b2=R(()=>{A0();XG=S2});var a8;var yX=R(()=>{a8={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0}});import IO from"url";var f2;var m2=R(()=>{f2=IO.URLSearchParams});import PO from"crypto";var YG="abcdefghijklmnopqrstuvwxyz",y2="0123456789",h2,TO=($=16,Q=h2.ALPHA_DIGIT)=>{let J="",{length:X}=Q,Y=new Uint32Array($);PO.randomFillSync(Y);for(let G=0;G<$;G++)J+=Q[Y[G]%X];return J},p2;var u2=R(()=>{m2();e5();h2={DIGIT:y2,ALPHA:YG,ALPHA_DIGIT:YG+YG.toUpperCase()+y2},p2={isNode:!0,classes:{URLSearchParams:f2,FormData:D7,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:h2,generateString:TO,protocols:["http","https","file","data"]}});var qG={};qJ(qG,{origin:()=>kO,navigator:()=>GG,hasStandardBrowserWebWorkerEnv:()=>EO,hasStandardBrowserEnv:()=>AO,hasBrowserEnv:()=>WG});var WG,GG,AO,EO,kO;var g2=R(()=>{WG=typeof window<"u"&&typeof document<"u",GG=typeof navigator==="object"&&navigator||void 0,AO=WG&&(!GG||["ReactNative","NativeScript","NS"].indexOf(GG.product)<0),EO=(()=>{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),kO=WG&&window.location.href||"http://localhost"});var O0;var i$=R(()=>{u2();g2();O0={...qG,...p2}});function zG($,Q){return d8($,new O0.classes.URLSearchParams,{visitor:function(J,X,Y,G){if(O0.isNode&&B.isBuffer(J))return this.append(X,J.toString("base64")),!1;return G.defaultVisitor.apply(this,arguments)},...Q})}var l2=R(()=>{A0();wJ();i$()});function n2($){if($>i2)throw new O("FormData field is too deeply nested ("+$+" levels). Max depth: "+i2,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function cO($){let Q=[],J=/\w+|\[(\w*)]/g,X;while((X=J.exec($))!==null)n2(Q.length),Q.push(X[0]==="[]"?"":X[1]||X[0]);return Q}function SO($){let Q={},J=Object.keys($),X,Y=J.length,G;for(X=0;X<Y;X++)G=J[X],Q[G]=$[G];return Q}function bO($){function Q(J,X,Y,G){n2(G);let W=J[G++];if(W==="__proto__")return!0;let q=Number.isFinite(+W),z=G>=J.length;if(W=!W&&B.isArray(Y)?Y.length:W,z){if(B.hasOwnProp(Y,W))Y[W]=B.isArray(Y[W])?Y[W].concat(X):[Y[W],X];else Y[W]=X;return!q}if(!B.hasOwnProp(Y,W)||!B.isObject(Y[W]))Y[W]=[];if(Q(J,X,Y[W],G)&&B.isArray(Y[W]))Y[W]=SO(Y[W]);return!q}if(B.isFormData($)&&B.isFunction($.entries)){let J={};return B.forEachEntry($,(X,Y)=>{Q(cO(X),Y,J,0)}),J}return null}var i2,N7;var VG=R(()=>{A0();U$();wJ();i2=JG;N7=bO});function fO($,Q,J){if(B.isString($))try{return(Q||JSON.parse)($),B.trim($)}catch(X){if(X.name!=="SyntaxError")throw X}return(J||JSON.stringify)($)}var jJ=($,Q)=>$!=null&&B.hasOwnProp($,Q)?$[Q]:void 0,KG,LJ;var v7=R(()=>{A0();U$();yX();wJ();l2();i$();VG();KG={transitional:a8,adapter:["xhr","http","fetch"],transformRequest:[function(Q,J){let X=J.getContentType()||"",Y=X.indexOf("application/json")>-1,G=B.isObject(Q);if(G&&B.isHTMLForm(Q))Q=new FormData(Q);if(B.isFormData(Q))return Y?JSON.stringify(N7(Q)):Q;if(B.isArrayBuffer(Q)||B.isBuffer(Q)||B.isStream(Q)||B.isFile(Q)||B.isBlob(Q)||B.isReadableStream(Q))return Q;if(B.isArrayBufferView(Q))return Q.buffer;if(B.isURLSearchParams(Q))return J.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),Q.toString();let q;if(G){let z=jJ(this,"formSerializer");if(X.indexOf("application/x-www-form-urlencoded")>-1)return zG(Q,z).toString();if((q=B.isFileList(Q))||X.indexOf("multipart/form-data")>-1){let K=jJ(this,"env"),V=K&&K.FormData;return d8(q?{"files[]":Q}:Q,V&&new V,z)}}if(G||Y)return J.setContentType("application/json",!1),fO(Q);return Q}],transformResponse:[function(Q){let J=jJ(this,"transitional")||KG.transitional,X=J&&J.forcedJSONParsing,Y=jJ(this,"responseType"),G=Y==="json";if(B.isResponse(Q)||B.isReadableStream(Q))return Q;if(Q&&B.isString(Q)&&(X&&!Y||G)){let q=!(J&&J.silentJSONParsing)&&G;try{return JSON.parse(Q,jJ(this,"parseReviver"))}catch(z){if(q){if(z.name==="SyntaxError")throw O.from(z,O.ERR_BAD_RESPONSE,this,null,jJ(this,"response"));throw z}}}return Q}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O0.classes.FormData,Blob:O0.classes.Blob},validateStatus:function(Q){return Q>=200&&Q<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch","query"],($)=>{KG.headers[$]={}});LJ=KG});function hX($,Q){let J=this||LJ,X=Q||J,Y=E0.from(X.headers),G=X.data;return B.forEach($,function(q){G=q.call(J,G,Y.normalize(),Q?Q.status:void 0)}),Y.normalize(),G}var d2=R(()=>{A0();v7();g$()});function pX($){return!!($&&$.__CANCEL__)}var a2,D$;var vQ=R(()=>{U$();a2=class a2 extends O{constructor($,Q,J){super($==null?"canceled":$,O.ERR_CANCELED,Q,J);this.name="CanceledError",this.__CANCEL__=!0}};D$=a2});function z8($,Q,J){let X=J.config.validateStatus;if(!J.status||!X||X(J.status))$(J);else Q(new O("Request failed with status code "+J.status,J.status>=400&&J.status<500?O.ERR_BAD_REQUEST:O.ERR_BAD_RESPONSE,J.config,J.request,J))}var O7=R(()=>{U$()});function UG($){if(typeof $!=="string")return!1;return/^([a-z][a-z\d+\-.]*:)?\/\//i.test($)}function xG($,Q){return Q?$.replace(/\/?\/$/,"")+"/"+Q.replace(/^\/+/,""):$}function hO($){let Q=0;while(Q<$.length&&$.charCodeAt(Q)<=32)Q++;return $.slice(Q)}function pO($){return hO($).replace(yO,"")}function o2($,Q){if(typeof $==="string"&&mO.test(pO($)))throw new O('Invalid URL: missing "//" after protocol',O.ERR_INVALID_URL,Q)}function OQ($,Q,J,X){o2(Q,X);let Y=!UG(Q);if($&&(Y||J===!1))return o2($,X),xG($,Q);return Q}var mO,yO;var F7=R(()=>{U$();mO=/^https?:(?!\/\/)/i,yO=/[\t\n\r]/g});function gO($){try{return new URL($)}catch{return null}}function s2($){var Q=(typeof $==="string"?gO($):$)||{},J=Q.protocol,X=Q.host,Y=Q.port;if(typeof X!=="string"||!X||typeof J!=="string")return"";if(J=J.split(":",1)[0],X=X.replace(/:\d*$/,""),Y=parseInt(Y)||uO[J]||0,!lO(X,Y))return"";var G=MG(J+"_proxy")||MG("all_proxy");if(G&&G.indexOf("://")===-1)G=J+"://"+G;return G}function lO($,Q){var J=MG("no_proxy").toLowerCase();if(!J)return!0;if(J==="*")return!1;return J.split(/[,\s]/).every(function(X){if(!X)return!0;var Y=X.match(/^(.+):(\d+)$/),G=Y?Y[1]:X,W=Y?parseInt(Y[2]):0;if(W&&W!==Q)return!0;if(!/^[.*]/.test(G))return $!==G;if(G.charAt(0)==="*")G=G.slice(1);return!$.endsWith(G)})}function MG($){return process.env[$.toLowerCase()]||process.env[$.toUpperCase()]||""}var uO;var r2=R(()=>{uO={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443}});var e2=g((jo,t2)=>{var RJ=1000,DJ=RJ*60,_J=DJ*60,FQ=_J*24,iO=FQ*7,nO=FQ*365.25;t2.exports=function($,Q){Q=Q||{};var J=typeof $;if(J==="string"&&$.length>0)return dO($);else if(J==="number"&&isFinite($))return Q.long?oO($):aO($);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify($))};function dO($){if($=String($),$.length>100)return;var Q=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec($);if(!Q)return;var J=parseFloat(Q[1]),X=(Q[2]||"ms").toLowerCase();switch(X){case"years":case"year":case"yrs":case"yr":case"y":return J*nO;case"weeks":case"week":case"w":return J*iO;case"days":case"day":case"d":return J*FQ;case"hours":case"hour":case"hrs":case"hr":case"h":return J*_J;case"minutes":case"minute":case"mins":case"min":case"m":return J*DJ;case"seconds":case"second":case"secs":case"sec":case"s":return J*RJ;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return J;default:return}}function aO($){var Q=Math.abs($);if(Q>=FQ)return Math.round($/FQ)+"d";if(Q>=_J)return Math.round($/_J)+"h";if(Q>=DJ)return Math.round($/DJ)+"m";if(Q>=RJ)return Math.round($/RJ)+"s";return $+"ms"}function oO($){var Q=Math.abs($);if(Q>=FQ)return C7($,Q,FQ,"day");if(Q>=_J)return C7($,Q,_J,"hour");if(Q>=DJ)return C7($,Q,DJ,"minute");if(Q>=RJ)return C7($,Q,RJ,"second");return $+" ms"}function C7($,Q,J,X){var Y=Q>=J*1.5;return Math.round($/J)+" "+X+(Y?"s":"")}});var HG=g((Lo,$K)=>{function sO($){J.debug=J,J.default=J,J.coerce=z,J.disable=W,J.enable=Y,J.enabled=q,J.humanize=e2(),J.destroy=K,Object.keys($).forEach((V)=>{J[V]=$[V]}),J.names=[],J.skips=[],J.formatters={};function Q(V){let U=0;for(let x=0;x<V.length;x++)U=(U<<5)-U+V.charCodeAt(x),U|=0;return J.colors[Math.abs(U)%J.colors.length]}J.selectColor=Q;function J(V){let U,x=null,M,H;function w(...j){if(!w.enabled)return;let Z=w,L=Number(new Date),D=L-(U||L);if(Z.diff=D,Z.prev=U,Z.curr=L,U=L,j[0]=J.coerce(j[0]),typeof j[0]!=="string")j.unshift("%O");let F=0;j[0]=j[0].replace(/%([a-zA-Z%])/g,(n,e)=>{if(n==="%%")return"%";F++;let y=J.formatters[e];if(typeof y==="function"){let p=j[F];n=y.call(Z,p),j.splice(F,1),F--}return n}),J.formatArgs.call(Z,j),(Z.log||J.log).apply(Z,j)}if(w.namespace=V,w.useColors=J.useColors(),w.color=J.selectColor(V),w.extend=X,w.destroy=J.destroy,Object.defineProperty(w,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(x!==null)return x;if(M!==J.namespaces)M=J.namespaces,H=J.enabled(V);return H},set:(j)=>{x=j}}),typeof J.init==="function")J.init(w);return w}function X(V,U){let x=J(this.namespace+(typeof U>"u"?":":U)+V);return x.log=this.log,x}function Y(V){J.save(V),J.namespaces=V,J.names=[],J.skips=[];let U=(typeof V==="string"?V:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let x of U)if(x[0]==="-")J.skips.push(x.slice(1));else J.names.push(x)}function G(V,U){let x=0,M=0,H=-1,w=0;while(x<V.length)if(M<U.length&&(U[M]===V[x]||U[M]==="*"))if(U[M]==="*")H=M,w=x,M++;else x++,M++;else if(H!==-1)M=H+1,w++,x=w;else return!1;while(M<U.length&&U[M]==="*")M++;return M===U.length}function W(){let V=[...J.names,...J.skips.map((U)=>"-"+U)].join(",");return J.enable(""),V}function q(V){for(let U of J.skips)if(G(V,U))return!1;for(let U of J.names)if(G(V,U))return!0;return!1}function z(V){if(V instanceof Error)return V.stack||V.message;return V}function K(){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 J.enable(J.load()),J}$K.exports=sO});var JK=g((QK,I7)=>{QK.formatArgs=tO;QK.save=eO;QK.load=$F;QK.useColors=rO;QK.storage=QF();QK.destroy=(()=>{let $=!1;return()=>{if(!$)$=!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`.")}})();QK.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 rO(){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 $;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&&($=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt($[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function tO($){if($[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+$[0]+(this.useColors?"%c ":" ")+"+"+I7.exports.humanize(this.diff),!this.useColors)return;let Q="color: "+this.color;$.splice(1,0,Q,"color: inherit");let J=0,X=0;$[0].replace(/%[a-zA-Z%]/g,(Y)=>{if(Y==="%%")return;if(J++,Y==="%c")X=J}),$.splice(X,0,Q)}QK.log=console.debug||console.log||(()=>{});function eO($){try{if($)QK.storage.setItem("debug",$);else QK.storage.removeItem("debug")}catch(Q){}}function $F(){let $;try{$=QK.storage.getItem("debug")||QK.storage.getItem("DEBUG")}catch(Q){}if(!$&&typeof process<"u"&&"env"in process)$=process.env.DEBUG;return $}function QF(){try{return localStorage}catch($){}}I7.exports=HG()(QK);var{formatters:JF}=I7.exports;JF.j=function($){try{return JSON.stringify($)}catch(Q){return"[UnexpectedJSONParseError]: "+Q.message}}});var YK=g((Do,XK)=>{XK.exports=($,Q=process.argv)=>{let J=$.startsWith("-")?"":$.length===1?"-":"--",X=Q.indexOf(J+$),Y=Q.indexOf("--");return X!==-1&&(Y===-1||X<Y)}});var qK=g((_o,WK)=>{var KF=j0("os"),GK=j0("tty"),A$=YK(),{env:d0}=process,o8;if(A$("no-color")||A$("no-colors")||A$("color=false")||A$("color=never"))o8=0;else if(A$("color")||A$("colors")||A$("color=true")||A$("color=always"))o8=1;if("FORCE_COLOR"in d0)if(d0.FORCE_COLOR==="true")o8=1;else if(d0.FORCE_COLOR==="false")o8=0;else o8=d0.FORCE_COLOR.length===0?1:Math.min(parseInt(d0.FORCE_COLOR,10),3);function BG($){if($===0)return!1;return{level:$,hasBasic:!0,has256:$>=2,has16m:$>=3}}function ZG($,Q){if(o8===0)return 0;if(A$("color=16m")||A$("color=full")||A$("color=truecolor"))return 3;if(A$("color=256"))return 2;if($&&!Q&&o8===void 0)return 0;let J=o8||0;if(d0.TERM==="dumb")return J;if(process.platform==="win32"){let X=KF.release().split(".");if(Number(X[0])>=10&&Number(X[2])>=10586)return Number(X[2])>=14931?3:2;return 1}if("CI"in d0){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((X)=>(X in d0))||d0.CI_NAME==="codeship")return 1;return J}if("TEAMCITY_VERSION"in d0)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(d0.TEAMCITY_VERSION)?1:0;if(d0.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in d0){let X=parseInt((d0.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(d0.TERM_PROGRAM){case"iTerm.app":return X>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(d0.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(d0.TERM))return 1;if("COLORTERM"in d0)return 1;return J}function UF($){let Q=ZG($,$&&$.isTTY);return BG(Q)}WK.exports={supportsColor:UF,stdout:BG(ZG(!0,GK.isatty(1))),stderr:BG(ZG(!0,GK.isatty(2)))}});var UK=g((VK,T7)=>{var xF=j0("tty"),P7=j0("util");VK.init=LF;VK.log=ZF;VK.formatArgs=HF;VK.save=wF;VK.load=jF;VK.useColors=MF;VK.destroy=P7.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");VK.colors=[6,2,3,4,5,1];try{let $=qK();if($&&($.stderr||$).level>=2)VK.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($){}VK.inspectOpts=Object.keys(process.env).filter(($)=>{return/^debug_/i.test($)}).reduce(($,Q)=>{let J=Q.substring(6).toLowerCase().replace(/_([a-z])/g,(Y,G)=>{return G.toUpperCase()}),X=process.env[Q];if(/^(yes|on|true|enabled)$/i.test(X))X=!0;else if(/^(no|off|false|disabled)$/i.test(X))X=!1;else if(X==="null")X=null;else X=Number(X);return $[J]=X,$},{});function MF(){return"colors"in VK.inspectOpts?Boolean(VK.inspectOpts.colors):xF.isatty(process.stderr.fd)}function HF($){let{namespace:Q,useColors:J}=this;if(J){let X=this.color,Y="\x1B[3"+(X<8?X:"8;5;"+X),G=` ${Y};1m${Q} \x1B[0m`;$[0]=G+$[0].split(`
|
|
11
11
|
`).join(`
|
|
12
|
-
`+
|
|
13
|
-
`)}function
|
|
14
|
-
`).map((
|
|
15
|
-
`).some((
|
|
12
|
+
`+G),$.push(Y+"m+"+T7.exports.humanize(this.diff)+"\x1B[0m")}else $[0]=BF()+Q+" "+$[0]}function BF(){if(VK.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function ZF(...$){return process.stderr.write(P7.formatWithOptions(VK.inspectOpts,...$)+`
|
|
13
|
+
`)}function wF($){if($)process.env.DEBUG=$;else delete process.env.DEBUG}function jF(){return process.env.DEBUG}function LF($){$.inspectOpts={};let Q=Object.keys(VK.inspectOpts);for(let J=0;J<Q.length;J++)$.inspectOpts[Q[J]]=VK.inspectOpts[Q[J]]}T7.exports=HG()(VK);var{formatters:zK}=T7.exports;zK.o=function($){return this.inspectOpts.colors=this.useColors,P7.inspect($,this.inspectOpts).split(`
|
|
14
|
+
`).map((Q)=>Q.trim()).join(" ")};zK.O=function($){return this.inspectOpts.colors=this.useColors,P7.inspect($,this.inspectOpts)}});var gX=g((vo,wG)=>{if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)wG.exports=JK();else wG.exports=UK()});var MK=g((xK)=>{Object.defineProperty(xK,"__esModule",{value:!0});function CF($){return function(Q,J){return new Promise((X,Y)=>{$.call(this,Q,J,(G,W)=>{if(G)Y(G);else X(W)})})}}xK.default=CF});var ZK=g((LG,BK)=>{var HK=LG&&LG.__importDefault||function($){return $&&$.__esModule?$:{default:$}},PF=j0("events"),TF=HK(gX()),AF=HK(MK()),lX=TF.default("agent-base");function EF($){return Boolean($)&&typeof $.addRequest==="function"}function jG(){let{stack:$}=Error();if(typeof $!=="string")return!1;return $.split(`
|
|
15
|
+
`).some((Q)=>Q.indexOf("(https.js:")!==-1||Q.indexOf("node:https:")!==-1)}function A7($,Q){return new A7.Agent($,Q)}(function($){class Q extends PF.EventEmitter{constructor(J,X){super();let Y=X;if(typeof J==="function")this.callback=J;else if(J)Y=J;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 jG()?443:80}set defaultPort(J){this.explicitDefaultPort=J}get protocol(){if(typeof this.explicitProtocol==="string")return this.explicitProtocol;return jG()?"https:":"http:"}set protocol(J){this.explicitProtocol=J}callback(J,X,Y){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(J,X){let Y=Object.assign({},X);if(typeof Y.secureEndpoint!=="boolean")Y.secureEndpoint=jG();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,J._last=!0,J.shouldKeepAlive=!1;let G=!1,W=null,q=Y.timeout||this.timeout,z=(x)=>{if(J._hadError)return;J.emit("error",x),J._hadError=!0},K=()=>{W=null,G=!0;let x=Error(`A "socket" was not created for HTTP request before ${q}ms`);x.code="ETIMEOUT",z(x)},V=(x)=>{if(G)return;if(W!==null)clearTimeout(W),W=null;z(x)},U=(x)=>{if(G)return;if(W!=null)clearTimeout(W),W=null;if(EF(x)){lX("Callback returned another Agent instance %o",x.constructor.name),x.addRequest(J,Y);return}if(x){x.once("free",()=>{this.freeSocket(x,Y)}),J.onSocket(x);return}let M=Error(`no Duplex stream was returned to agent-base for \`${J.method} ${J.path}\``);z(M)};if(typeof this.callback!=="function"){z(Error("`callback` is not defined"));return}if(!this.promisifiedCallback)if(this.callback.length>=3)lX("Converting legacy callback function to promise"),this.promisifiedCallback=AF.default(this.callback);else this.promisifiedCallback=this.callback;if(typeof q==="number"&&q>0)W=setTimeout(K,q);if("port"in Y&&typeof Y.port!=="number")Y.port=Number(Y.port);try{lX("Resolving socket for %o request: %o",Y.protocol,`${J.method} ${J.path}`),Promise.resolve(this.promisifiedCallback(J,Y)).then(U,V)}catch(x){Promise.reject(x).catch(V)}}freeSocket(J,X){lX("Freeing socket %o %o",J.constructor.name,X),J.destroy()}destroy(){lX("Destroying agent %o",this.constructor.name)}}$.Agent=Q,$.prototype=$.Agent.prototype})(A7||(A7={}));BK.exports=A7});var wK=g((nX)=>{var kF=nX&&nX.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(nX,"__esModule",{value:!0});var cF=kF(gX()),iX=cF.default("https-proxy-agent:parse-proxy-response");function SF($){return new Promise((Q,J)=>{let X=0,Y=[];function G(){let U=$.read();if(U)V(U);else $.once("readable",G)}function W(){$.removeListener("end",z),$.removeListener("error",K),$.removeListener("close",q),$.removeListener("readable",G)}function q(U){iX("onclose had error %o",U)}function z(){iX("onend")}function K(U){W(),iX("onerror %o",U),J(U)}function V(U){Y.push(U),X+=U.length;let x=Buffer.concat(Y,X);if(x.indexOf(`\r
|
|
16
16
|
\r
|
|
17
|
-
`)===-1){
|
|
18
|
-
`)),
|
|
19
|
-
`;if(
|
|
20
|
-
`;let
|
|
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(
|
|
24
|
-
`):" "+
|
|
25
|
-
`);return
|
|
26
|
-
`),W=
|
|
27
|
-
`,
|
|
28
|
-
`+Y}}catch(
|
|
29
|
-
`,{mode:384}),await
|
|
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(
|
|
32
|
-
`)}catch{}}var
|
|
33
|
-
`);let Y=
|
|
17
|
+
`)===-1){iX("have not received end of HTTP headers yet..."),G();return}let H=x.toString("ascii",0,x.indexOf(`\r
|
|
18
|
+
`)),w=+H.split(" ")[1];iX("got proxy server response: %o",H),Q({statusCode:w,buffered:x})}$.on("error",K),$.on("close",q),$.on("end",z),G()})}nX.default=SF});var DK=g((IQ)=>{var bF=IQ&&IQ.__awaiter||function($,Q,J,X){function Y(G){return G instanceof J?G:new J(function(W){W(G)})}return new(J||(J=Promise))(function(G,W){function q(V){try{K(X.next(V))}catch(U){W(U)}}function z(V){try{K(X.throw(V))}catch(U){W(U)}}function K(V){V.done?G(V.value):Y(V.value).then(q,z)}K((X=X.apply($,Q||[])).next())})},NJ=IQ&&IQ.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(IQ,"__esModule",{value:!0});var jK=NJ(j0("net")),LK=NJ(j0("tls")),fF=NJ(j0("url")),mF=NJ(j0("assert")),yF=NJ(gX()),hF=ZK(),pF=NJ(wK()),dX=yF.default("https-proxy-agent:agent");class RK extends hF.Agent{constructor($){let Q;if(typeof $==="string")Q=fF.default.parse($);else Q=$;if(!Q)throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");dX("creating new HttpsProxyAgent instance: %o",Q);super(Q);let J=Object.assign({},Q);if(this.secureProxy=Q.secureProxy||lF(J.protocol),J.host=J.hostname||J.host,typeof J.port==="string")J.port=parseInt(J.port,10);if(!J.port&&J.host)J.port=this.secureProxy?443:80;if(this.secureProxy&&!("ALPNProtocols"in J))J.ALPNProtocols=["http 1.1"];if(J.host&&J.path)delete J.path,delete J.pathname;this.proxy=J}callback($,Q){return bF(this,void 0,void 0,function*(){let{proxy:J,secureProxy:X}=this,Y;if(X)dX("Creating `tls.Socket`: %o",J),Y=LK.default.connect(J);else dX("Creating `net.Socket`: %o",J),Y=jK.default.connect(J);let G=Object.assign({},J.headers),q=`CONNECT ${`${Q.host}:${Q.port}`} HTTP/1.1\r
|
|
19
|
+
`;if(J.auth)G["Proxy-Authorization"]=`Basic ${Buffer.from(J.auth).toString("base64")}`;let{host:z,port:K,secureEndpoint:V}=Q;if(!gF(K,V))z+=`:${K}`;G.Host=z,G.Connection="close";for(let w of Object.keys(G))q+=`${w}: ${G[w]}\r
|
|
20
|
+
`;let U=pF.default(Y);Y.write(`${q}\r
|
|
21
|
+
`);let{statusCode:x,buffered:M}=yield U;if(x===200){if($.once("socket",uF),Q.secureEndpoint){dX("Upgrading socket connection to TLS");let w=Q.servername||Q.host;return LK.default.connect(Object.assign(Object.assign({},iF(Q,"host","hostname","path","port")),{socket:Y,servername:w}))}return Y}Y.destroy();let H=new jK.default.Socket({writable:!1});return H.readable=!0,$.once("socket",(w)=>{dX("replaying proxy buffer for failed request"),mF.default(w.listenerCount("data")>0),w.push(M),w.push(null)}),H})}}IQ.default=RK;function uF($){$.resume()}function gF($,Q){return Boolean(!Q&&$===80||Q&&$===443)}function lF($){return typeof $==="string"?/^https:?$/i.test($):!1}function iF($,...Q){let J={},X;for(X in $)if(!Q.includes(X))J[X]=$[X];return J}});var NK=g((_G,_K)=>{var nF=_G&&_G.__importDefault||function($){return $&&$.__esModule?$:{default:$}},RG=nF(DK());function DG($){return new RG.default($)}(function($){$.HttpsProxyAgent=RG.default,$.prototype=RG.default.prototype})(DG||(DG={}));_K.exports=DG});var OK=g((Io,vK)=>{var aX;vK.exports=function(){if(!aX){try{aX=gX()("follow-redirects")}catch($){}if(typeof aX!=="function")aX=function(){}}aX.apply(null,arguments)}});var TK=g((Po,cG)=>{var sX=j0("url"),oX=sX.URL,dF=j0("http"),aF=j0("https"),CG=j0("stream").Writable,IG=j0("assert"),FK=OK();(function(){var Q=typeof process<"u",J=typeof window<"u"&&typeof document<"u",X=TQ(Error.captureStackTrace);if(!Q&&(J||!X))console.warn("The follow-redirects package should be excluded from browser builds.")})();var PG=!1;try{IG(new oX(""))}catch($){PG=$.code==="ERR_INVALID_URL"}var oF=["Authorization","Proxy-Authorization","Cookie"],sF=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],TG=["abort","aborted","connect","error","socket","timeout"],AG=Object.create(null);TG.forEach(function($){AG[$]=function(Q,J,X){this._redirectable.emit($,Q,J,X)}});var vG=rX("ERR_INVALID_URL","Invalid URL",TypeError),OG=rX("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),rF=rX("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",OG),tF=rX("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),eF=rX("ERR_STREAM_WRITE_AFTER_END","write after end"),$C=CG.prototype.destroy||IK;function B$($,Q){if(CG.call(this),this._sanitizeOptions($),this._options=$,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],Q)this.on("response",Q);var J=this;this._onNativeResponse=function(X){try{J._processResponse(X)}catch(Y){J.emit("error",Y instanceof OG?Y:new OG({cause:Y}))}},this._headerFilter=new RegExp("^(?:"+oF.concat($.sensitiveHeaders).map(WC).join("|")+")$","i"),this._performRequest()}B$.prototype=Object.create(CG.prototype);B$.prototype.abort=function(){kG(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};B$.prototype.destroy=function($){return kG(this._currentRequest,$),$C.call(this,$),this};B$.prototype.write=function($,Q,J){if(this._ending)throw new eF;if(!PQ($)&&!YC($))throw TypeError("data should be a string, Buffer or Uint8Array");if(TQ(Q))J=Q,Q=null;if($.length===0){if(J)J();return}if(this._requestBodyLength+$.length<=this._options.maxBodyLength)this._requestBodyLength+=$.length,this._requestBodyBuffers.push({data:$,encoding:Q}),this._currentRequest.write($,Q,J);else this.emit("error",new tF),this.abort()};B$.prototype.end=function($,Q,J){if(TQ($))J=$,$=Q=null;else if(TQ(Q))J=Q,Q=null;if(!$)this._ended=this._ending=!0,this._currentRequest.end(null,null,J);else{var X=this,Y=this._currentRequest;this.write($,Q,function(){X._ended=!0,Y.end(null,null,J)}),this._ending=!0}};B$.prototype.setHeader=function($,Q){this._options.headers[$]=Q,this._currentRequest.setHeader($,Q)};B$.prototype.removeHeader=function($){delete this._options.headers[$],this._currentRequest.removeHeader($)};B$.prototype.setTimeout=function($,Q){var J=this;function X(W){W.setTimeout($),W.removeListener("timeout",W.destroy),W.addListener("timeout",W.destroy)}function Y(W){if(J._timeout)clearTimeout(J._timeout);J._timeout=setTimeout(function(){J.emit("timeout"),G()},$),X(W)}function G(){if(J._timeout)clearTimeout(J._timeout),J._timeout=null;if(J.removeListener("abort",G),J.removeListener("error",G),J.removeListener("response",G),J.removeListener("close",G),Q)J.removeListener("timeout",Q);if(!J.socket)J._currentRequest.removeListener("socket",Y)}if(Q)this.on("timeout",Q);if(this.socket)Y(this.socket);else this._currentRequest.once("socket",Y);return this.on("socket",X),this.on("abort",G),this.on("error",G),this.on("response",G),this.on("close",G),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function($){B$.prototype[$]=function(Q,J){return this._currentRequest[$](Q,J)}});["aborted","connection","socket"].forEach(function($){Object.defineProperty(B$.prototype,$,{get:function(){return this._currentRequest[$]}})});B$.prototype._sanitizeOptions=function($){if(!$.headers)$.headers={};if(!XC($.sensitiveHeaders))$.sensitiveHeaders=[];if($.host){if(!$.hostname)$.hostname=$.host;delete $.host}if(!$.pathname&&$.path){var Q=$.path.indexOf("?");if(Q<0)$.pathname=$.path;else $.pathname=$.path.substring(0,Q),$.search=$.path.substring(Q)}};B$.prototype._performRequest=function(){var $=this._options.protocol,Q=this._options.nativeProtocols[$];if(!Q)throw TypeError("Unsupported protocol "+$);if(this._options.agents){var J=$.slice(0,-1);this._options.agent=this._options.agents[J]}var X=this._currentRequest=Q.request(this._options,this._onNativeResponse);X._redirectable=this;for(var Y of TG)X.on(Y,AG[Y]);if(this._currentUrl=/^\//.test(this._options.path)?sX.format(this._options):this._options.path,this._isRedirect){var G=0,W=this,q=this._requestBodyBuffers;(function z(K){if(X===W._currentRequest){if(K)W.emit("error",K);else if(G<q.length){var V=q[G++];if(!X.finished)X.write(V.data,V.encoding,z)}else if(W._ended)X.end()}})()}};B$.prototype._processResponse=function($){var Q=$.statusCode;if(this._options.trackRedirects)this._redirects.push({url:this._currentUrl,headers:$.headers,statusCode:Q});var J=$.headers.location;if(!J||this._options.followRedirects===!1||Q<300||Q>=400){$.responseUrl=this._currentUrl,$.redirects=this._redirects,this.emit("response",$),this._requestBodyBuffers=[];return}if(kG(this._currentRequest),$.destroy(),++this._redirectCount>this._options.maxRedirects)throw new rF;var X,Y=this._options.beforeRedirect;if(Y)X=Object.assign({Host:$.req.getHeader("host")},this._options.headers);var G=this._options.method;if((Q===301||Q===302)&&this._options.method==="POST"||Q===303&&!/^(?:GET|HEAD)$/.test(this._options.method))this._options.method="GET",this._requestBodyBuffers=[],NG(/^content-/i,this._options.headers);var W=NG(/^host$/i,this._options.headers),q=EG(this._currentUrl),z=W||q.host,K=/^\w+:/.test(J)?this._currentUrl:sX.format(Object.assign(q,{host:z})),V=QC(J,K);if(FK("redirecting to",V.href),this._isRedirect=!0,FG(V,this._options),V.protocol!==q.protocol&&V.protocol!=="https:"||V.host!==z&&!JC(V.host,z))NG(this._headerFilter,this._options.headers);if(TQ(Y)){var U={headers:$.headers,statusCode:Q},x={url:K,method:G,headers:X};Y(this._options,U,x),this._sanitizeOptions(this._options)}this._performRequest()};function CK($){var Q={maxRedirects:21,maxBodyLength:10485760},J={};return Object.keys($).forEach(function(X){var Y=X+":",G=J[Y]=$[X],W=Q[X]=Object.create(G);function q(K,V,U){if(GC(K))K=FG(K);else if(PQ(K))K=FG(EG(K));else U=V,V=PK(K),K={protocol:Y};if(TQ(V))U=V,V=null;if(V=Object.assign({maxRedirects:Q.maxRedirects,maxBodyLength:Q.maxBodyLength},K,V),V.nativeProtocols=J,!PQ(V.host)&&!PQ(V.hostname))V.hostname="::1";return IG.equal(V.protocol,Y,"protocol mismatch"),FK("options",V),new B$(V,U)}function z(K,V,U){var x=W.request(K,V,U);return x.end(),x}Object.defineProperties(W,{request:{value:q,configurable:!0,enumerable:!0,writable:!0},get:{value:z,configurable:!0,enumerable:!0,writable:!0}})}),Q}function IK(){}function EG($){var Q;if(PG)Q=new oX($);else if(Q=PK(sX.parse($)),!PQ(Q.protocol))throw new vG({input:$});return Q}function QC($,Q){return PG?new oX($,Q):EG(sX.resolve(Q,$))}function PK($){if(/^\[/.test($.hostname)&&!/^\[[:0-9a-f]+\]$/i.test($.hostname))throw new vG({input:$.href||$});if(/^\[/.test($.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test($.host))throw new vG({input:$.href||$});return $}function FG($,Q){var J=Q||{};for(var X of sF)J[X]=$[X];if(J.hostname.startsWith("["))J.hostname=J.hostname.slice(1,-1);if(J.port!=="")J.port=Number(J.port);return J.path=J.search?J.pathname+J.search:J.pathname,J}function NG($,Q){var J;for(var X in Q)if($.test(X))J=Q[X],delete Q[X];return J===null||typeof J>"u"?void 0:String(J).trim()}function rX($,Q,J){function X(Y){if(TQ(Error.captureStackTrace))Error.captureStackTrace(this,this.constructor);Object.assign(this,Y||{}),this.code=$,this.message=this.cause?Q+": "+this.cause.message:Q}return X.prototype=new(J||Error),Object.defineProperties(X.prototype,{constructor:{value:X,enumerable:!1},name:{value:"Error ["+$+"]",enumerable:!1}}),X}function kG($,Q){for(var J of TG)$.removeListener(J,AG[J]);$.on("error",IK),$.destroy(Q)}function JC($,Q){IG(PQ($)&&PQ(Q));var J=$.length-Q.length-1;return J>0&&$[J]==="."&&$.endsWith(Q)}function XC($){return $ instanceof Array}function PQ($){return typeof $==="string"||$ instanceof String}function TQ($){return typeof $==="function"}function YC($){return typeof $==="object"&&"length"in $}function GC($){return oX&&$ instanceof oX}function WC($){return $.replace(/[\]\\/()*+?.$]/g,"\\$&")}cG.exports=CK({http:dF,https:aF});cG.exports.wrap=CK});var L8="1.18.0";function tX($){let Q=/^([-+\w]{1,25}):(?:\/\/)?/.exec($);return Q&&Q[1]||""}function SG($,Q,J){let X=J&&J.Blob||O0.classes.Blob,Y=tX($);if(Q===void 0&&X)Q=!0;if(Y==="data"){$=Y.length?$.slice(Y.length+1):$;let G=qC.exec($);if(!G)throw new O("Invalid URL",O.ERR_INVALID_URL);let W=G[1],q=G[2],z=G[3]?"base64":"utf8",K=G[4],V;if(W)V=q?W+q:W;else if(q)V="text/plain"+q;let U=Buffer.from(decodeURIComponent(K),z);if(Q){if(!X)throw new O("Blob is not supported",O.ERR_NOT_SUPPORT);return new X([U],{type:V})}return U}throw new O("Unsupported protocol "+Y,O.ERR_NOT_SUPPORT)}var qC;var AK=R(()=>{U$();i$();qC=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/});import zC from"stream";var bG,EK,fG;var kK=R(()=>{A0();bG=Symbol("internals");EK=class EK extends zC.Transform{constructor($){$=B.toFlatObject($,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(J,X)=>{return!B.isUndefined(X[J])});super({readableHighWaterMark:$.chunkSize});let Q=this[bG]={timeWindow:$.timeWindow,chunkSize:$.chunkSize,maxRate:$.maxRate,minChunkSize:$.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(J)=>{if(J==="progress"){if(!Q.isCaptured)Q.isCaptured=!0}})}_read($){let Q=this[bG];if(Q.onReadCallback)Q.onReadCallback();return super._read($)}_transform($,Q,J){let X=this[bG],Y=X.maxRate,G=this.readableHighWaterMark,W=X.timeWindow,q=1000/W,z=Y/q,K=X.minChunkSize!==!1?Math.max(X.minChunkSize,z*0.01):0,V=(x,M)=>{let H=Buffer.byteLength(x);if(X.bytesSeen+=H,X.bytes+=H,X.isCaptured&&this.emit("progress",X.bytesSeen),this.push(x))process.nextTick(M);else X.onReadCallback=()=>{X.onReadCallback=null,process.nextTick(M)}},U=(x,M)=>{let H=Buffer.byteLength(x),w=null,j=G,Z,L=0;if(Y){let D=Date.now();if(!X.ts||(L=D-X.ts)>=W)X.ts=D,Z=z-X.bytes,X.bytes=Z<0?-Z:0,L=0;Z=z-X.bytes}if(Y){if(Z<=0)return setTimeout(()=>{M(null,x)},W-L);if(Z<j)j=Z}if(j&&H>j&&H-j>K)w=x.subarray(j),x=x.subarray(0,j);V(x,w?()=>{process.nextTick(M,null,w)}:M)};U($,function x(M,H){if(M)return J(M);if(H)U(H,x);else J(null)})}};fG=EK});var cK,VC=async function*($){if($.stream)yield*$.stream();else if($.arrayBuffer)yield await $.arrayBuffer();else if($[cK])yield*$[cK]();else yield $},E7;var mG=R(()=>{({asyncIterator:cK}=Symbol),E7=VC});import KC from"util";import{Readable as UC}from"stream";class SK{constructor($,Q){let{escapeName:J}=this.constructor,X=B.isString(Q),Y=`Content-Disposition: form-data; name="${J($)}"${!X&&Q.name?`; filename="${J(Q.name)}"`:""}${AQ}`;if(X)Q=eX.encode(String(Q).replace(/\r?\n|\r\n?/g,AQ));else{let G=String(Q.type||"application/octet-stream").replace(/[\r\n]/g,"");Y+=`Content-Type: ${G}${AQ}`}this.headers=eX.encode(Y+AQ),this.contentLength=X?Q.byteLength:Q.size,this.size=this.headers.byteLength+this.contentLength+HC,this.name=$,this.value=Q}async*encode(){yield this.headers;let{value:$}=this;if(B.isTypedArray($))yield $;else yield*E7($);yield MC}static escapeName($){return String($).replace(/[\r\n"]/g,(Q)=>({"\r":"%0D","\n":"%0A",'"':"%22"})[Q])}}var xC,eX,AQ=`\r
|
|
22
|
+
`,MC,HC=2,BC=($,Q,J)=>{let{tag:X="form-data-boundary",size:Y=25,boundary:G=X+"-"+O0.generateString(Y,xC)}=J||{};if(!B.isFormData($))throw TypeError("FormData instance required");if(G.length<1||G.length>70)throw Error("boundary must be 1-70 characters long");let W=eX.encode("--"+G+AQ),q=eX.encode("--"+G+"--"+AQ),z=q.byteLength,K=Array.from($.entries()).map(([U,x])=>{let M=new SK(U,x);return z+=M.size,M});z+=W.byteLength*K.length,z=B.toFiniteNumber(z);let V={"Content-Type":`multipart/form-data; boundary=${G}`};if(Number.isFinite(z))V["Content-Length"]=z;return Q&&Q(V),UC.from(async function*(){for(let U of K)yield W,yield*U.encode();yield q}())},bK;var fK=R(()=>{A0();mG();i$();xC=O0.ALPHABET.ALPHA_DIGIT+"-_",eX=typeof TextEncoder==="function"?new TextEncoder:new KC.TextEncoder,MC=eX.encode(AQ);bK=BC});import ZC from"stream";var mK,yK;var hK=R(()=>{mK=class mK extends ZC.Transform{__transform($,Q,J){this.push($),J()}_transform($,Q,J){if($.length!==0){if(this._transform=this.__transform,$[0]!==120){let X=Buffer.alloc(2);X[0]=120,X[1]=156,this.push(X,Q)}}this.__transform($,Q,J)}};yK=mK});import wC from"http2";import jC from"util";class pK{constructor(){this.sessions=Object.create(null)}getSession($,Q){Q=Object.assign({sessionTimeout:1000},Q);let J=this.sessions[$];if(J){let V=J.length;for(let U=0;U<V;U++){let[x,M]=J[U];if(!x.destroyed&&!x.closed&&jC.isDeepStrictEqual(M,Q))return x}}let X=wC.connect($,Q),Y,G,W=()=>{if(Y)return;if(Y=!0,G)clearTimeout(G),G=null;let V=J,U=V.length,x=U;while(x--)if(V[x][0]===X){if(U===1)delete this.sessions[$];else V.splice(x,1);if(!X.closed)X.close();return}},q=X.request,{sessionTimeout:z}=Q;if(z!=null){let V=0;X.request=function(){let U=q.apply(this,arguments);if(V++,G)clearTimeout(G),G=null;return U.once("close",()=>{if(!--V)G=setTimeout(()=>{G=null,W()},z)}),U}}X.once("close",W);let K=[X,Q];return J?J.push(K):J=this.sessions[$]=[K],X}}var uK;var gK=R(()=>{uK=pK});var LC=($,Q)=>{return B.isAsyncFn($)?function(...J){let X=J.pop();$.apply(this,J).then((Y)=>{try{Q?X(null,...Q(Y)):X(null,Y)}catch(G){X(G)}},X)}:$},lK;var iK=R(()=>{A0();lK=LC});function hG($){let Q;try{Q=new URL($)}catch(G){return!1}let J=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!J)return!1;if(J==="*")return!0;let X=Number.parseInt(Q.port,10)||NC[Q.protocol.split(":",1)[0]]||0,Y=dK(Q.hostname.toLowerCase());return J.split(/[\s,]+/).some((G)=>{if(!G)return!1;let[W,q]=vC(G);if(W=dK(W),!W)return!1;if(q&&q!==X)return!1;if(W.charAt(0)==="*")W=W.slice(1);if(W.charAt(0)===".")return Y.endsWith(W);return Y===W||nK(Y)&&nK(W)})}var RC,aK=($)=>{let Q=$.split(".");if(Q.length!==4)return!1;if(Q[0]!=="127")return!1;return Q.every((J)=>/^\d+$/.test(J)&&Number(J)>=0&&Number(J)<=255)},yG=($)=>/^0{1,4}$/.test($),DC=($)=>{if($==="::")return!0;let Q=$.indexOf("::");if(Q!==-1){if(Q!==$.lastIndexOf("::"))return!1;let X=$.slice(0,Q),Y=$.slice(Q+2),G=X?X.split(":"):[],W=Y?Y.split(":"):[];return G.length+W.length<8&&G.every(yG)&&W.every(yG)}let J=$.split(":");return J.length===8&&J.every(yG)},_C=($)=>{if($==="::1")return!0;let Q=$.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(Q)return aK(Q[1]);let J=$.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(J){let Y=parseInt(J[1],16);return Y>=32512&&Y<=32767}let X=$.split(":");if(X.length===8){for(let Y=0;Y<7;Y++)if(!/^0+$/.test(X[Y]))return!1;return/^0*1$/.test(X[7])}return!1},nK=($)=>{if(!$)return!1;if(RC.has($))return!0;if(aK($))return!0;if(DC($))return!0;return _C($)},NC,vC=($)=>{let Q=$,J=0;if(Q.charAt(0)==="["){let G=Q.indexOf("]");if(G!==-1){let W=Q.slice(1,G),q=Q.slice(G+1);if(q.charAt(0)===":"&&/^\d+$/.test(q.slice(1)))J=Number.parseInt(q.slice(1),10);return[W,J]}}let X=Q.indexOf(":"),Y=Q.lastIndexOf(":");if(X!==-1&&X===Y&&/^\d+$/.test(Q.slice(Y+1)))J=Number.parseInt(Q.slice(Y+1),10),Q=Q.slice(0,Y);return[Q,J]},OC,FC,CC=($)=>{if(typeof $!=="string"||$.indexOf(":")===-1)return $;let Q=$.match(OC);if(Q)return Q[1];let J=$.match(FC);if(J){let X=parseInt(J[1],16),Y=parseInt(J[2],16);return`${X>>8}.${X&255}.${Y>>8}.${Y&255}`}return $},dK=($)=>{if(!$)return $;if($.charAt(0)==="["&&$.charAt($.length-1)==="]")$=$.slice(1,-1);return CC($.replace(/\.+$/,""))};var oK=R(()=>{RC=new Set(["localhost","0.0.0.0"]),NC={http:80,https:443,ws:80,wss:443,ftp:21},OC=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,FC=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i});function IC($,Q){$=$||10;let J=Array($),X=Array($),Y=0,G=0,W;return Q=Q!==void 0?Q:1000,function(z){let K=Date.now(),V=X[G];if(!W)W=K;J[Y]=z,X[Y]=K;let U=G,x=0;while(U!==Y)x+=J[U++],U=U%$;if(Y=(Y+1)%$,Y===G)G=(G+1)%$;if(K-W<Q)return;let M=V&&K-V;return M?Math.round(x*1000/M):void 0}}var sK;var rK=R(()=>{sK=IC});function PC($,Q){let J=0,X=1000/Q,Y,G,W=(K,V=Date.now())=>{if(J=V,Y=null,G)clearTimeout(G),G=null;$(...K)};return[(...K)=>{let V=Date.now(),U=V-J;if(U>=X)W(K,V);else if(Y=K,!G)G=setTimeout(()=>{G=null,W(Y)},X-U)},()=>Y&&W(Y)]}var tK;var eK=R(()=>{tK=PC});var R8=($,Q,J=3)=>{let X=0,Y=sK(50,250);return tK((G)=>{if(!G||typeof G.loaded!=="number")return;let W=G.loaded,q=G.lengthComputable?G.total:void 0,z=q!=null?Math.min(W,q):W,K=Math.max(0,z-X),V=Y(K);X=Math.max(X,z);let U={loaded:z,total:q,progress:q?z/q:void 0,bytes:K,rate:V?V:void 0,estimated:V&&q?(q-z)/V:void 0,event:G,lengthComputable:q!=null,[Q?"download":"upload"]:!0};$(U)},J)},vJ=($,Q)=>{let J=$!=null;return[(X)=>Q[0]({lengthComputable:J,total:$,loaded:X}),Q[1]]},OJ=($)=>(...Q)=>B.asap(()=>$(...Q));var k7=R(()=>{rK();eK();A0()});function $Y($){if(!$||typeof $!=="string")return 0;if(!$.startsWith("data:"))return 0;let Q=$.indexOf(",");if(Q<0)return 0;let J=$.slice(5,Q),X=$.slice(Q+1);if(/;base64/i.test(J)){let{length:W,length:q}=X;for(let M=0;M<q;M++)if(X.charCodeAt(M)===37&&M+2<q){let H=X.charCodeAt(M+1),w=X.charCodeAt(M+2);if(c7(H)&&c7(w))W-=2,M+=2}let z=0,K=q-1,V=(M)=>M>=2&&X.charCodeAt(M-2)===37&&X.charCodeAt(M-1)===51&&(X.charCodeAt(M)===68||X.charCodeAt(M)===100);if(K>=0){if(X.charCodeAt(K)===61)z++,K--;else if(V(K))z++,K-=3}if(z===1&&K>=0){if(X.charCodeAt(K)===61)z++;else if(V(K))z++}let x=Math.floor(W/4)*3-(z||0);return x>0?x:0}let G=0;for(let W=0,q=X.length;W<q;W++){let z=X.charCodeAt(W);if(z===37&&TC(X,W,q))G+=1,W+=2;else if(z<128)G+=1;else if(z<2048)G+=2;else if(z>=55296&&z<=56319&&W+1<q){let K=X.charCodeAt(W+1);if(K>=56320&&K<=57343)G+=4,W++;else G+=3}else G+=3}return G}var c7=($)=>$>=48&&$<=57||$>=65&&$<=70||$>=97&&$<=102,TC=($,Q,J)=>Q+2<J&&c7($.charCodeAt(Q+1))&&c7($.charCodeAt(Q+2));import AC from"http";import EC from"https";import kC from"http2";import cC from"util";import{resolve as $U}from"path";import E$ from"zlib";import n$ from"stream";import{EventEmitter as SC}from"events";function uC($,Q,J){if(J!=="content-only"){$.set(Q);return}Object.entries(Q).forEach(([X,Y])=>{if(pC.includes(X.toLowerCase()))$.set(X,Y)})}function lC($,Q){let J=$.protocol+"//"+$.hostname+":"+($.port||"")+"#"+($.auth||""),X=Q?XU.get(Q)||XU.set(Q,new Map).get(Q):gC,Y=X.get(J);if(Y)return Y;let G=Q&&Q.options?{...Q.options,...$}:$;if(Y=new pG.default(G),Q&&Q.options){let W={...Q.options},q=Y.callback;Y.callback=function(K,V){return q.call(this,K,{...W,...V})}}return Y[MU]=!0,X.set(J,Y),Y}function nC($,Q,J){if($.beforeRedirects.proxy)$.beforeRedirects.proxy($);if($.beforeRedirects.auth)$.beforeRedirects.auth($);if($.beforeRedirects.sensitiveHeaders)$.beforeRedirects.sensitiveHeaders($,J);if($.beforeRedirects.config)$.beforeRedirects.config($,Q,J)}function dC($,Q){if(!$)return;Object.keys($).forEach((J)=>{if(Q.has(J.toLowerCase()))delete $[J]})}function aC($,Q){if(!Q)return!1;try{return new URL(Q.url).origin===new URL($.href).origin}catch(J){return!1}}function HU($,Q,J,X,Y){let G=Q;if(!G&&G!==!1){let W=s2(J);if(W){if(!hG(J))G=new URL(W)}}if(X&&$.headers){for(let W of Object.keys($.headers))if(W.toLowerCase()==="proxy-authorization")delete $.headers[W]}if(X&&$.agent&&$.agent[MU])$.agent=void 0;if(G){let W=G instanceof URL,q=(x)=>W||B.hasOwnProp(G,x)?G[x]:void 0,z=q("username"),K=q("password"),V=B.hasOwnProp(G,"auth")?G.auth:void 0;if(z)V=(z||"")+":"+(K||"");if(V){let x=typeof V==="object",M=x&&B.hasOwnProp(V,"username")?V.username:void 0,H=x&&B.hasOwnProp(V,"password")?V.password:void 0;if(Boolean(M||H))V=(M||"")+":"+(H||"");else if(x)throw new O("Invalid proxy authorization",O.ERR_BAD_OPTION,{proxy:G})}if(xU.test($.protocol)){if(!(Y instanceof pG.default)){let x=q("hostname")||q("host"),M=q("port"),H=q("protocol"),w=H?H.includes(":")?H:`${H}:`:"http:",j=x&&x.includes(":")&&!x.startsWith("[")?`[${x}]`:x,Z=new URL(`${w}//${j}${M?":"+M:""}`),L={protocol:Z.protocol,hostname:Z.hostname.replace(/^\[|\]$/g,""),port:Z.port,auth:V&&typeof V==="string"?V:void 0};if(Z.protocol==="https:")L.ALPNProtocols=["http/1.1"];let D=lC(L,Y);if($.agent=D,$.agents)$.agents.https=D}}else{if(V){let w=Buffer.from(V,"utf8").toString("base64");$.headers["Proxy-Authorization"]="Basic "+w}let x=!1;for(let w of Object.keys($.headers))if(w.toLowerCase()==="host"){x=!0;break}if(!x)$.headers.host=$.hostname+($.port?":"+$.port:"");let M=q("hostname")||q("host");$.hostname=M,$.host=M,$.port=q("port"),$.path=J;let H=q("protocol");if(H)$.protocol=H.includes(":")?H:`${H}:`}}$.beforeRedirects.proxy=function(q){HU(q,Q,q.href,!0,Y)}}var pG,zU,QU,bC,fC,VU,KU,UU,mC,yC,hC,xU,pC,JU,S7,MU,gC,XU,YU,GU=($)=>{if(!B.isString($))return $;try{return decodeURIComponent($)}catch(Q){return $}},WU=($,[Q,J])=>{return $.on("end",J).on("error",J),Q},iC,oC,sC=($)=>{return new Promise((Q,J)=>{let X,Y,G=(z,K)=>{if(Y)return;Y=!0,X&&X(z,K)},W=(z)=>{G(z),Q(z)},q=(z)=>{G(z,!0),J(z)};$(W,q,(z)=>X=z).catch(q)})},rC=({address:$,family:Q})=>{if(!B.isString($))throw TypeError("address must be a string");return{address:$,family:Q||($.indexOf(".")<0?6:4)}},qU=($,Q)=>rC(B.isObject($)?$:{address:$,family:Q}),tC,BU;var ZU=R(()=>{A0();O7();F7();_7();r2();yX();U$();vQ();i$();AK();g$();kK();fK();mG();hK();gK();iK();oK();EX();k7();pG=W7(NK(),1),zU=W7(TK(),1),QU={flush:E$.constants.Z_SYNC_FLUSH,finishFlush:E$.constants.Z_SYNC_FLUSH},bC={flush:E$.constants.BROTLI_OPERATION_FLUSH,finishFlush:E$.constants.BROTLI_OPERATION_FLUSH},fC={flush:E$.constants.ZSTD_e_flush,finishFlush:E$.constants.ZSTD_e_flush},VU=B.isFunction(E$.createBrotliDecompress),KU=B.isFunction(E$.createZstdDecompress),UU="gzip, compress, deflate"+(VU?", br":""),mC=UU+(KU?", zstd":""),{http:yC,https:hC}=zU.default,xU=/https:?/,pC=["content-type","content-length"];JU=Symbol("axios.http.socketListener"),S7=Symbol("axios.http.currentReq"),MU=Symbol("axios.http.installedTunnel"),gC=new Map,XU=new WeakMap;YU=O0.protocols.map(($)=>{return $+":"}),iC=new uK;oC=typeof process<"u"&&B.kindOf(process)==="process",tC={request($,Q){let J=$.protocol+"//"+$.hostname+":"+($.port||($.protocol==="https:"?443:80)),{http2Options:X,headers:Y}=$,G=iC.getSession(J,X),{HTTP2_HEADER_SCHEME:W,HTTP2_HEADER_METHOD:q,HTTP2_HEADER_PATH:z,HTTP2_HEADER_STATUS:K}=kC.constants,V={[W]:$.protocol.replace(":",""),[q]:$.method,[z]:$.path};B.forEach(Y,(x,M)=>{M.charAt(0)!==":"&&(V[M]=x)});let U=G.request(V);return U.once("response",(x)=>{let M=U;x=Object.assign({},x);let H=x[K];delete x[K],M.headers=x,M.statusCode=+H,Q(M)}),U}},BU=oC&&function(Q){return sC(async function(X,Y,G){let W=(P)=>B.getSafeProp(Q,P),q=W("transitional")||a8,z=W("data"),K=W("lookup"),V=W("family"),U=W("httpVersion");if(U===void 0)U=1;let x=W("http2Options"),M=W("responseType"),H=W("responseEncoding"),w=W("httpAgent"),j=W("httpsAgent"),Z=W("method").toUpperCase(),L=W("maxRedirects"),D=W("maxBodyLength"),F=W("maxContentLength"),J0=W("decompress"),n,e=!1,y,p;if(U=+U,Number.isNaN(U))throw TypeError(`Invalid protocol version: '${Q.httpVersion}' is not a number`);if(U!==1&&U!==2)throw TypeError(`Unsupported protocol version '${U}'`);let W0=U===2;if(K){let P=lK(K,(u)=>B.isArray(u)?u:[u]);K=(u,U0,P0)=>{P(u,U0,(B0,p0,b0)=>{if(B0)return P0(B0);let m0=B.isArray(p0)?p0.map((WJ)=>qU(WJ)):[qU(p0,b0)];U0.all?P0(B0,m0):P0(B0,m0[0].address,m0[0].family)})}}let t=new SC;function N(P){try{t.emit("abort",!P||P.type?new D$(null,Q,y):P)}catch(u){}}function c(){if(p)clearTimeout(p),p=null}function _(){let P=W("timeout"),u=P?"timeout of "+P+"ms exceeded":"timeout exceeded",U0=W("timeoutErrorMessage");if(U0)u=U0;return new O(u,q.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,Q,y)}t.once("abort",Y);let C=()=>{if(c(),Q.cancelToken)Q.cancelToken.unsubscribe(N);if(Q.signal)Q.signal.removeEventListener("abort",N);t.removeAllListeners()};if(Q.cancelToken||Q.signal){if(Q.cancelToken&&Q.cancelToken.subscribe(N),Q.signal)Q.signal.aborted?N():Q.signal.addEventListener("abort",N)}G((P,u)=>{if(n=!0,c(),u){e=!0,C();return}let{data:U0}=P;if(U0 instanceof n$.Readable||U0 instanceof n$.Duplex){let P0=n$.finished(U0,()=>{P0(),C()})}else C()});let E=OQ(W("baseURL"),W("url"),W("allowAbsoluteUrls"),Q),T=new URL(E,O0.hasBrowserEnv?O0.origin:void 0),v=T.protocol||YU[0];if(v==="data:"){if(F>-1){let u=String(W("url")||E||"");if($Y(u)>F)return Y(new O("maxContentLength size of "+F+" exceeded",O.ERR_BAD_RESPONSE,Q))}let P;if(Z!=="GET")return z8(X,Y,{status:405,statusText:"method not allowed",headers:{},config:Q});try{P=SG(W("url"),M==="blob",{Blob:Q.env&&Q.env.Blob})}catch(u){throw O.from(u,O.ERR_BAD_REQUEST,Q)}if(M==="text"){if(P=P.toString(H),!H||H==="utf8")P=B.stripBOM(P)}else if(M==="stream")P=n$.Readable.from(P);return z8(X,Y,{data:P,status:200,statusText:"OK",headers:new E0,config:Q})}if(YU.indexOf(v)===-1)return Y(new O("Unsupported protocol "+v,O.ERR_BAD_REQUEST,Q));let k=E0.from(Q.headers).normalize();k.set("User-Agent","axios/"+L8,!1);let{onUploadProgress:f,onDownloadProgress:S}=Q,$0=Q.maxRate,q0=void 0,X0=void 0;if(B.isSpecCompliantForm(z)){let P=k.getContentType(/boundary=([-_\w\d]{10,70})/i);z=bK(z,(u)=>{k.set(u)},{tag:`axios-${L8}-boundary`,boundary:P&&P[1]||void 0})}else if(B.isFormData(z)&&B.isFunction(z.getHeaders)&&z.getHeaders!==Object.prototype.getHeaders){if(uC(k,z.getHeaders(),W("formDataHeaderPolicy")),!k.hasContentLength())try{let P=await cC.promisify(z.getLength).call(z);Number.isFinite(P)&&P>=0&&k.setContentLength(P)}catch(P){}}else if(B.isBlob(z)||B.isFile(z))z.size&&k.setContentType(z.type||"application/octet-stream"),k.setContentLength(z.size||0),z=n$.Readable.from(E7(z));else if(z&&!B.isStream(z)){if(Buffer.isBuffer(z));else if(B.isArrayBuffer(z))z=Buffer.from(new Uint8Array(z));else if(B.isString(z))z=Buffer.from(z,"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,Q));if(k.setContentLength(z.length,!1),D>-1&&z.length>D)return Y(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,Q))}let C0=B.toFiniteNumber(k.getContentLength());if(B.isArray($0))q0=$0[0],X0=$0[1];else q0=X0=$0;if(z&&(f||q0)){if(!B.isStream(z))z=n$.Readable.from(z,{objectMode:!1});z=n$.pipeline([z,new fG({maxRate:B.toFiniteNumber(q0)})],B.noop),f&&z.on("progress",WU(z,vJ(C0,R8(OJ(f),!1,3))))}let o=void 0,v0=W("auth");if(v0){let P=B.getSafeProp(v0,"username")||"",u=B.getSafeProp(v0,"password")||"";o=P+":"+u}if(!o&&(T.username||T.password)){let P=GU(T.username),u=GU(T.password);o=P+":"+u}o&&k.delete("authorization");let D0;try{D0=NQ(T.pathname+T.search,W("params"),W("paramsSerializer")).replace(/^\?/,"")}catch(P){let u=Error(P.message);return u.config=Q,u.url=W("url"),u.exists=!0,Y(u)}k.set("Accept-Encoding",B.hasOwnProp(q,"advertiseZstdAcceptEncoding")&&q.advertiseZstdAcceptEncoding===!0?mC:UU,!1);let M0=Object.assign(Object.create(null),{path:D0,method:Z,headers:xJ(k),agents:{http:w,https:j},auth:o,protocol:v,family:V,beforeRedirect:nC,beforeRedirects:Object.create(null),http2Options:x});!B.isUndefined(K)&&(M0.lookup=K);let j$=W("socketPath");if(j$){if(typeof j$!=="string")return Y(new O("socketPath must be a string",O.ERR_BAD_OPTION_VALUE,Q));let P=W("allowedSocketPaths");if(P!=null){let u=Array.isArray(P)?P:[P],U0=$U(j$);if(!u.some((B0)=>typeof B0==="string"&&$U(B0)===U0))return Y(new O(`socketPath "${j$}" is not permitted by allowedSocketPaths`,O.ERR_BAD_OPTION_VALUE,Q))}M0.socketPath=j$}else M0.hostname=T.hostname.startsWith("[")?T.hostname.slice(1,-1):T.hostname,M0.port=T.port,HU(M0,W("proxy"),v+"//"+T.hostname+(T.port?":"+T.port:"")+M0.path,!1,j);let L$,K$=!1,i8=!1,LQ=xU.test(M0.protocol);if(M0.agent==null)M0.agent=LQ?j:w;if(W0)L$=tC;else{let P=W("transport");if(P)L$=P;else if(L===0)L$=LQ?EC:AC,K$=!0;else{if(i8=!0,M0.sensitiveHeaders=[],L)M0.maxRedirects=L;let u=W("beforeRedirect");if(u)M0.beforeRedirects.config=u;if(o){let P0=T.origin,B0=o;M0.beforeRedirects.auth=function(b0){try{if(new URL(b0.href).origin===P0)b0.auth=B0}catch(m0){}}}let U0=W("sensitiveHeaders");if(U0!=null){if(!B.isArray(U0))return Y(new O("sensitiveHeaders must be an array of strings",O.ERR_BAD_OPTION_VALUE,Q));let P0=new Set;for(let B0 of U0){if(!B.isString(B0))return Y(new O("sensitiveHeaders must be an array of strings",O.ERR_BAD_OPTION_VALUE,Q));P0.add(B0.toLowerCase())}if(P0.size)M0.sensitiveHeaders=Array.from(P0),M0.beforeRedirects.sensitiveHeaders=function(p0,b0){if(!aC(p0,b0))dC(p0.headers,P0)}}L$=LQ?hC:yC}}if(D>-1)M0.maxBodyLength=D;else M0.maxBodyLength=1/0;M0.insecureHTTPParser=Boolean(W("insecureHTTPParser")),y=L$.request(M0,function(u){if(c(),y.destroyed)return;let U0=[u],P0=B.toFiniteNumber(u.headers["content-length"]);if(S||X0){let m0=new fG({maxRate:B.toFiniteNumber(X0)});S&&m0.on("progress",WU(m0,vJ(P0,R8(OJ(S),!0,3)))),U0.push(m0)}let B0=u,p0=u.req||y;if(J0!==!1&&u.headers["content-encoding"]){if(Z==="HEAD"||u.statusCode===204)delete u.headers["content-encoding"];switch((u.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":U0.push(E$.createUnzip(QU)),delete u.headers["content-encoding"];break;case"deflate":U0.push(new yK),U0.push(E$.createUnzip(QU)),delete u.headers["content-encoding"];break;case"br":if(VU)U0.push(E$.createBrotliDecompress(bC)),delete u.headers["content-encoding"];break;case"zstd":if(KU)U0.push(E$.createZstdDecompress(fC)),delete u.headers["content-encoding"];break}}B0=U0.length>1?n$.pipeline(U0,B.noop):U0[0];let b0={status:u.statusCode,statusText:u.statusMessage,headers:new E0(u.headers),config:Q,request:p0};if(M==="stream"){if(F>-1){let m0=F,WJ=B0;async function*CX(){let i0=0;for await(let KV of WJ){if(i0+=KV.length,i0>m0)throw new O("maxContentLength size of "+m0+" exceeded",O.ERR_BAD_RESPONSE,Q,p0);yield KV}}B0=n$.Readable.from(CX(),{objectMode:!1})}b0.data=B0,z8(X,Y,b0)}else{let m0=[],WJ=0;B0.on("data",function(i0){if(m0.push(i0),WJ+=i0.length,F>-1&&WJ>F)e=!0,B0.destroy(),N(new O("maxContentLength size of "+F+" exceeded",O.ERR_BAD_RESPONSE,Q,p0))}),B0.on("aborted",function(){if(e)return;let i0=new O("stream has been aborted",O.ERR_BAD_RESPONSE,Q,p0,b0);B0.destroy(i0),Y(i0)}),B0.on("error",function(i0){if(e)return;Y(O.from(i0,null,Q,p0,b0))}),B0.on("end",function(){try{let i0=m0.length===1?m0[0]:Buffer.concat(m0);if(M!=="arraybuffer"){if(i0=i0.toString(H),!H||H==="utf8")i0=B.stripBOM(i0)}b0.data=i0}catch(i0){return Y(O.from(i0,null,Q,b0.request,b0))}z8(X,Y,b0)})}t.once("abort",(m0)=>{if(!B0.destroyed)B0.emit("error",m0),B0.destroy()})}),t.once("abort",(P)=>{if(y.close)y.close();else y.destroy(P)}),y.on("error",function(u){Y(O.from(u,null,Q,y))});let R$=new Set;if(y.on("socket",function(u){if(u.setKeepAlive(!0,60000),!u[JU])u.on("error",function(P0){let B0=u[S7];if(B0&&!B0.destroyed)B0.destroy(P0)}),u[JU]=!0;u[S7]=y,R$.add(u)}),y.once("close",function(){c();for(let u of R$)if(u[S7]===y)u[S7]=null;R$.clear()}),W("timeout")){let P=parseInt(W("timeout"),10);if(Number.isNaN(P)){N(new O("error trying to parse `config.timeout` to int",O.ERR_BAD_OPTION_VALUE,Q,y));return}let u=function(){if(n)return;N(_())};if(K$&&P>0)p=setTimeout(u,P);y.setTimeout(P,u)}else y.setTimeout(0);if(B.isStream(z)){let P=!1,u=!1;z.on("end",()=>{P=!0}),z.once("error",(P0)=>{u=!0,y.destroy(P0)}),z.on("close",()=>{if(!P&&!u)N(new D$("Request stream has been aborted",Q,y))});let U0=z;if(D>-1&&!i8){let P0=D,B0=0;U0=n$.pipeline([z,new n$.Transform({transform(p0,b0,m0){if(B0+=p0.length,B0>P0)return m0(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,Q,y));m0(null,p0)}})],B.noop),U0.on("error",(p0)=>{if(!y.destroyed)y.destroy(p0)})}U0.pipe(y)}else z&&y.write(z),y.end()})}});var wU;var jU=R(()=>{i$();wU=O0.hasStandardBrowserEnv?(($,Q)=>(J)=>{return J=new URL(J,O0.origin),$.protocol===J.protocol&&$.host===J.host&&(Q||$.port===J.port)})(new URL(O0.origin),O0.navigator&&/(msie|trident)/i.test(O0.navigator.userAgent)):()=>!0});var LU;var RU=R(()=>{A0();i$();LU=O0.hasStandardBrowserEnv?{write($,Q,J,X,Y,G,W){if(typeof document>"u")return;let q=[`${$}=${encodeURIComponent(Q)}`];if(B.isNumber(J))q.push(`expires=${new Date(J).toUTCString()}`);if(B.isString(X))q.push(`path=${X}`);if(B.isString(Y))q.push(`domain=${Y}`);if(G===!0)q.push("secure");if(B.isString(W))q.push(`SameSite=${W}`);document.cookie=q.join("; ")},read($){if(typeof document>"u")return null;let Q=document.cookie.split(";");for(let J=0;J<Q.length;J++){let X=Q[J].replace(/^\s+/,""),Y=X.indexOf("=");if(Y!==-1&&X.slice(0,Y)===$)return decodeURIComponent(X.slice(Y+1))}return null},remove($){this.write($,"",Date.now()-86400000,"/")}}:{write(){},read(){return null},remove(){}}});function d$($,Q){Q=Q||{};let J=Object.create(null);Object.defineProperty(J,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function X(V,U,x,M){if(B.isPlainObject(V)&&B.isPlainObject(U))return B.merge.call({caseless:M},V,U);else if(B.isPlainObject(U))return B.merge({},U);else if(B.isArray(U))return U.slice();return U}function Y(V,U,x,M){if(!B.isUndefined(U))return X(V,U,x,M);else if(!B.isUndefined(V))return X(void 0,V,x,M)}function G(V,U){if(!B.isUndefined(U))return X(void 0,U)}function W(V,U){if(!B.isUndefined(U))return X(void 0,U);else if(!B.isUndefined(V))return X(void 0,V)}function q(V){let U=B.hasOwnProp(Q,"transitional")?Q.transitional:void 0;if(!B.isUndefined(U))if(B.isPlainObject(U)){if(B.hasOwnProp(U,V))return U[V]}else return;let x=B.hasOwnProp($,"transitional")?$.transitional:void 0;if(B.isPlainObject(x)&&B.hasOwnProp(x,V))return x[V];return}function z(V,U,x){if(B.hasOwnProp(Q,x))return X(V,U);else if(B.hasOwnProp($,x))return X(void 0,V)}let K={url:G,method:G,data:G,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:z,headers:(V,U,x)=>Y(DU(V),DU(U),x,!0)};if(B.forEach(Object.keys({...$,...Q}),function(U){if(U==="__proto__"||U==="constructor"||U==="prototype")return;let x=B.hasOwnProp(K,U)?K[U]:Y,M=B.hasOwnProp($,U)?$[U]:void 0,H=B.hasOwnProp(Q,U)?Q[U]:void 0,w=x(M,H,U);B.isUndefined(w)&&x!==z||(J[U]=w)}),B.hasOwnProp(Q,"validateStatus")&&B.isUndefined(Q.validateStatus)&&q("validateStatusUndefinedResolves")===!1)if(B.hasOwnProp($,"validateStatus"))J.validateStatus=X(void 0,$.validateStatus);else delete J.validateStatus;return J}var DU=($)=>$ instanceof E0?{...$}:$;var b7=R(()=>{A0();g$()});function $I($,Q,J){if(J!=="content-only"){$.set(Q);return}Object.entries(Q).forEach(([X,Y])=>{if(eC.includes(X.toLowerCase()))$.set(X,Y)})}function JI($){let Q=d$({},$),J=(x)=>B.hasOwnProp(Q,x)?Q[x]:void 0,X=J("data"),Y=J("withXSRFToken"),G=J("xsrfHeaderName"),W=J("xsrfCookieName"),q=J("headers"),z=J("auth"),K=J("baseURL"),V=J("allowAbsoluteUrls"),U=J("url");if(Q.headers=q=E0.from(q),Q.url=NQ(OQ(K,U,V,Q),J("params"),J("paramsSerializer")),z){let x=B.getSafeProp(z,"username")||"",M=B.getSafeProp(z,"password")||"";q.set("Authorization","Basic "+btoa(x+":"+(M?QI(M):"")))}if(B.isFormData(X)){if(O0.hasStandardBrowserEnv||O0.hasStandardBrowserWebWorkerEnv||B.isReactNative(X))q.setContentType(void 0);else if(B.isFunction(X.getHeaders))$I(q,X.getHeaders(),J("formDataHeaderPolicy"))}if(O0.hasStandardBrowserEnv){if(B.isFunction(Y))Y=Y(Q);if(Y===!0||Y==null&&wU(Q.url)){let M=G&&W&&LU.read(W);if(M)q.set(G,M)}}return Q}var eC,QI=($)=>encodeURIComponent($).replace(/%([0-9A-F]{2})/gi,(Q,J)=>String.fromCharCode(parseInt(J,16))),f7;var uG=R(()=>{i$();A0();jU();RU();F7();b7();g$();_7();eC=["content-type","content-length"];f7=JI});var XI,_U;var NU=R(()=>{A0();O7();yX();U$();vQ();i$();g$();k7();uG();EX();XI=typeof XMLHttpRequest<"u",_U=XI&&function($){return new Promise(function(J,X){let Y=f7($),G=Y.data,W=E0.from(Y.headers).normalize(),{responseType:q,onUploadProgress:z,onDownloadProgress:K}=Y,V,U,x,M,H;function w(){M&&M(),H&&H(),Y.cancelToken&&Y.cancelToken.unsubscribe(V),Y.signal&&Y.signal.removeEventListener("abort",V)}let j=new XMLHttpRequest;j.open(Y.method.toUpperCase(),Y.url,!0),j.timeout=Y.timeout;function Z(){if(!j)return;let D=E0.from("getAllResponseHeaders"in j&&j.getAllResponseHeaders()),J0={data:!q||q==="text"||q==="json"?j.responseText:j.response,status:j.status,statusText:j.statusText,headers:D,config:$,request:j};z8(function(e){J(e),w()},function(e){X(e),w()},J0),j=null}if("onloadend"in j)j.onloadend=Z;else j.onreadystatechange=function(){if(!j||j.readyState!==4)return;if(j.status===0&&!(j.responseURL&&j.responseURL.startsWith("file:")))return;setTimeout(Z)};if(j.onabort=function(){if(!j)return;X(new O("Request aborted",O.ECONNABORTED,$,j)),w(),j=null},j.onerror=function(F){let J0=F&&F.message?F.message:"Network Error",n=new O(J0,O.ERR_NETWORK,$,j);n.event=F||null,X(n),w(),j=null},j.ontimeout=function(){let F=Y.timeout?"timeout of "+Y.timeout+"ms exceeded":"timeout exceeded",J0=Y.transitional||a8;if(Y.timeoutErrorMessage)F=Y.timeoutErrorMessage;X(new O(F,J0.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,$,j)),w(),j=null},G===void 0&&W.setContentType(null),"setRequestHeader"in j)B.forEach(xJ(W),function(F,J0){j.setRequestHeader(J0,F)});if(!B.isUndefined(Y.withCredentials))j.withCredentials=!!Y.withCredentials;if(q&&q!=="json")j.responseType=Y.responseType;if(K)[x,H]=R8(K,!0),j.addEventListener("progress",x);if(z&&j.upload)[U,M]=R8(z),j.upload.addEventListener("progress",U),j.upload.addEventListener("loadend",M);if(Y.cancelToken||Y.signal){if(V=(D)=>{if(!j)return;X(!D||D.type?new D$(null,$,j):D),j.abort(),w(),j=null},Y.cancelToken&&Y.cancelToken.subscribe(V),Y.signal)Y.signal.aborted?V():Y.signal.addEventListener("abort",V)}let L=tX(Y.url);if(L&&!O0.protocols.includes(L)){X(new O("Unsupported protocol "+L+":",O.ERR_BAD_REQUEST,$));return}j.send(G||null)})}});var YI=($,Q)=>{if($=$?$.filter(Boolean):[],!Q&&!$.length)return;let J=new AbortController,X=!1,Y=function(z){if(!X){X=!0,W();let K=z instanceof Error?z:this.reason;J.abort(K instanceof O?K:new D$(K instanceof Error?K.message:K))}},G=Q&&setTimeout(()=>{G=null,Y(new O(`timeout of ${Q}ms exceeded`,O.ETIMEDOUT))},Q),W=()=>{if(!$)return;G&&clearTimeout(G),G=null,$.forEach((z)=>{z.unsubscribe?z.unsubscribe(Y):z.removeEventListener("abort",Y)}),$=null};$.forEach((z)=>z.addEventListener("abort",Y));let{signal:q}=J;return q.unsubscribe=()=>B.asap(W),q},vU;var OU=R(()=>{vQ();U$();A0();vU=YI});var GI=function*($,Q){let J=$.byteLength;if(!Q||J<Q){yield $;return}let X=0,Y;while(X<J)Y=X+Q,yield $.slice(X,Y),X=Y},WI=async function*($,Q){for await(let J of qI($))yield*GI(J,Q)},qI=async function*($){if($[Symbol.asyncIterator]){yield*$;return}let Q=$.getReader();try{for(;;){let{done:J,value:X}=await Q.read();if(J)break;yield X}}finally{await Q.cancel()}},gG=($,Q,J,X)=>{let Y=WI($,Q),G=0,W,q=(z)=>{if(!W)W=!0,X&&X(z)};return new ReadableStream({async pull(z){try{let{done:K,value:V}=await Y.next();if(K){q(),z.close();return}let U=V.byteLength;if(J){let x=G+=U;J(x)}z.enqueue(new Uint8Array(V))}catch(K){throw q(K),K}},cancel(z){return q(z),Y.return()}},{highWaterMark:2})};var FU=65536,m7,zI=($)=>encodeURIComponent($).replace(/%([0-9A-F]{2})/gi,(Q,J)=>String.fromCharCode(parseInt(J,16))),CU=($)=>{if(!B.isString($))return $;try{return decodeURIComponent($)}catch(Q){return $}},IU=($,...Q)=>{try{return!!$(...Q)}catch(J){return!1}},VI=($)=>{let Q=$.indexOf("://"),J=$;if(Q!==-1)J=J.slice(Q+3);return J.includes("@")||J.includes(":")},KI=($)=>{let Q=B.global!==void 0&&B.global!==null?B.global:globalThis,{ReadableStream:J,TextEncoder:X}=Q;$=B.merge.call({skipUndefined:!0},{Request:Q.Request,Response:Q.Response},$);let{fetch:Y,Request:G,Response:W}=$,q=Y?m7(Y):typeof fetch==="function",z=m7(G),K=m7(W);if(!q)return!1;let V=q&&m7(J),U=q&&(typeof X==="function"?((Z)=>(L)=>Z.encode(L))(new X):async(Z)=>new Uint8Array(await new G(Z).arrayBuffer())),x=z&&V&&IU(()=>{let Z=!1,L=new G(O0.origin,{body:new J,method:"POST",get duplex(){return Z=!0,"half"}}),D=L.headers.has("Content-Type");if(L.body!=null)L.body.cancel();return Z&&!D}),M=K&&V&&IU(()=>B.isReadableStream(new W("").body)),H={stream:M&&((Z)=>Z.body)};q&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((Z)=>{!H[Z]&&(H[Z]=(L,D)=>{let F=L&&L[Z];if(F)return F.call(L);throw new O(`Response type '${Z}' is not supported`,O.ERR_NOT_SUPPORT,D)})})})();let w=async(Z)=>{if(Z==null)return 0;if(B.isBlob(Z))return Z.size;if(B.isSpecCompliantForm(Z))return(await new G(O0.origin,{method:"POST",body:Z}).arrayBuffer()).byteLength;if(B.isArrayBufferView(Z)||B.isArrayBuffer(Z))return Z.byteLength;if(B.isURLSearchParams(Z))Z=Z+"";if(B.isString(Z))return(await U(Z)).byteLength},j=async(Z,L)=>{let D=B.toFiniteNumber(Z.getContentLength());return D==null?w(L):D};return async(Z)=>{let{url:L,method:D,data:F,signal:J0,cancelToken:n,timeout:e,onDownloadProgress:y,onUploadProgress:p,responseType:W0,headers:t,withCredentials:N="same-origin",fetchOptions:c,maxContentLength:_,maxBodyLength:C}=f7(Z),E=B.isNumber(_)&&_>-1,T=B.isNumber(C)&&C>-1,v=(o)=>B.hasOwnProp(Z,o)?Z[o]:void 0,k=Y||fetch;W0=W0?(W0+"").toLowerCase():"text";let f=vU([J0,n&&n.toAbortSignal()],e),S=null,$0=f&&f.unsubscribe&&(()=>{f.unsubscribe()}),q0,X0=null,C0=()=>new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,Z,S);try{let o=void 0,v0=v("auth");if(v0){let P=B.getSafeProp(v0,"username")||"",u=B.getSafeProp(v0,"password")||"";o={username:P,password:u}}if(VI(L)){let P=new URL(L,O0.origin);if(!o&&(P.username||P.password)){let u=CU(P.username),U0=CU(P.password);o={username:u,password:U0}}if(P.username||P.password)P.username="",P.password="",L=P.href}if(o)t.delete("authorization"),t.set("Authorization","Basic "+btoa(zI((o.username||"")+":"+(o.password||""))));if(E&&typeof L==="string"&&L.startsWith("data:")){if($Y(L)>_)throw new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,Z,S)}if(T&&D!=="get"&&D!=="head"){let P=await w(F);if(typeof P==="number"&&isFinite(P)){if(q0=P,P>C)throw C0()}}let D0=T&&(B.isReadableStream(F)||B.isStream(F)),M0=(P,u,U0)=>gG(P,FU,(P0)=>{if(T&&P0>C)throw X0=C0();u&&u(P0)},U0);if(x&&D!=="get"&&D!=="head"&&(p||D0)){if(q0=q0==null?await j(t,F):q0,q0!==0||D0){let P=new G(L,{method:"POST",body:F,duplex:"half"}),u;if(B.isFormData(F)&&(u=P.headers.get("content-type")))t.setContentType(u);if(P.body){let[U0,P0]=p&&vJ(q0,R8(OJ(p)))||[];F=M0(P.body,U0,P0)}}}else if(D0&&!z&&V&&D!=="get"&&D!=="head")F=M0(F);else if(D0&&z&&!x&&D!=="get"&&D!=="head")throw new O("Stream request bodies are not supported by the current fetch implementation",O.ERR_NOT_SUPPORT,Z,S);if(!B.isString(N))N=N?"include":"omit";let j$=z&&"credentials"in G.prototype;if(B.isFormData(F)){let P=t.getContentType();if(P&&/^multipart\/form-data/i.test(P)&&!/boundary=/i.test(P))t.delete("content-type")}t.set("User-Agent","axios/"+L8,!1);let L$={...c,signal:f,method:D.toUpperCase(),headers:xJ(t.normalize()),body:F,duplex:"half",credentials:j$?N:void 0};S=z&&new G(L,L$);let K$=await(z?k(S,c):k(L,L$)),i8=E0.from(K$.headers);if(E){let P=B.toFiniteNumber(i8.getContentLength());if(P!=null&&P>_)throw new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,Z,S)}let LQ=M&&(W0==="stream"||W0==="response");if(M&&K$.body&&(y||E||LQ&&$0)){let P={};["status","statusText","headers"].forEach((b0)=>{P[b0]=K$[b0]});let u=B.toFiniteNumber(i8.getContentLength()),[U0,P0]=y&&vJ(u,R8(OJ(y),!0))||[],B0=0,p0=(b0)=>{if(E){if(B0=b0,B0>_)throw new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,Z,S)}U0&&U0(b0)};K$=new W(gG(K$.body,FU,p0,()=>{P0&&P0(),$0&&$0()}),P)}W0=W0||"text";let R$=await H[B.findKey(H,W0)||"text"](K$,Z);if(E&&!M&&!LQ){let P;if(R$!=null){if(typeof R$.byteLength==="number")P=R$.byteLength;else if(typeof R$.size==="number")P=R$.size;else if(typeof R$==="string")P=typeof X==="function"?new X().encode(R$).byteLength:R$.length}if(typeof P==="number"&&P>_)throw new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,Z,S)}return!LQ&&$0&&$0(),await new Promise((P,u)=>{z8(P,u,{data:R$,headers:E0.from(K$.headers),status:K$.status,statusText:K$.statusText,config:Z,request:S})})}catch(o){if($0&&$0(),f&&f.aborted&&f.reason instanceof O){let v0=f.reason;throw v0.config=Z,S&&(v0.request=S),o!==v0&&(v0.cause=o),v0}if(X0)throw S&&!X0.request&&(X0.request=S),X0;if(o instanceof O)throw S&&!o.request&&(o.request=S),o;if(o&&o.name==="TypeError"&&/Load failed|fetch/i.test(o.message))throw Object.assign(new O("Network Error",O.ERR_NETWORK,Z,S,o&&o.response),{cause:o.cause||o});throw O.from(o,o&&o.code,Z,S,o&&o.response)}}},UI,lG=($)=>{let Q=$&&$.env||{},{fetch:J,Request:X,Response:Y}=Q,G=[X,Y,J],W=G.length,q=W,z,K,V=UI;while(q--)z=G[q],K=V.get(z),K===void 0&&V.set(z,K=q?new Map:KI(Q)),V=K;return K},Ar;var PU=R(()=>{i$();A0();U$();OU();g$();k7();uG();O7();EX();({isFunction:m7}=B),UI=new Map,Ar=lG()});function HI($,Q){$=B.isArray($)?$:[$];let{length:J}=$,X,Y,G={};for(let W=0;W<J;W++){X=$[W];let q;if(Y=X,!MI(X)){if(Y=iG[(q=String(X)).toLowerCase()],Y===void 0)throw new O(`Unknown adapter '${q}'`)}if(Y&&(B.isFunction(Y)||(Y=Y.get(Q))))break;G[q||"#"+W]=Y}if(!Y){let W=Object.entries(G).map(([z,K])=>`adapter ${z} `+(K===!1?"is not supported by the environment":"is not available in the build")),q=J?W.length>1?`since :
|
|
23
|
+
`+W.map(TU).join(`
|
|
24
|
+
`):" "+TU(W[0]):"as no adapter specified";throw new O("There is no suitable adapter to dispatch the request "+q,"ERR_NOT_SUPPORT")}return Y}var iG,TU=($)=>`- ${$}`,MI=($)=>B.isFunction($)||$===null||$===!1,y7;var nG=R(()=>{A0();ZU();NU();PU();U$();iG={http:BU,xhr:_U,fetch:{get:lG}};B.forEach(iG,($,Q)=>{if($){try{Object.defineProperty($,"name",{__proto__:null,value:Q})}catch(J){}Object.defineProperty($,"adapterName",{__proto__:null,value:Q})}});y7={getAdapter:HI,adapters:iG}});function dG($){if($.cancelToken)$.cancelToken.throwIfRequested();if($.signal&&$.signal.aborted)throw new D$(null,$)}function h7($){if(dG($),$.headers=E0.from($.headers),$.data=hX.call($,$.transformRequest),["post","put","patch"].indexOf($.method)!==-1)$.headers.setContentType("application/x-www-form-urlencoded",!1);return y7.getAdapter($.adapter||LJ.adapter,$)($).then(function(X){dG($),$.response=X;try{X.data=hX.call($,$.transformResponse,X)}finally{delete $.response}return X.headers=E0.from(X.headers),X},function(X){if(!pX(X)){if(dG($),X&&X.response){$.response=X.response;try{X.response.data=hX.call($,$.transformResponse,X.response)}finally{delete $.response}X.response.headers=E0.from(X.response.headers)}}return Promise.reject(X)})}var AU=R(()=>{d2();v7();vQ();g$();nG()});function BI($,Q,J){if(typeof $!=="object")throw new O("options must be an object",O.ERR_BAD_OPTION_VALUE);let X=Object.keys($),Y=X.length;while(Y-- >0){let G=X[Y],W=Object.prototype.hasOwnProperty.call(Q,G)?Q[G]:void 0;if(W){let q=$[G],z=q===void 0||W(q,G,$);if(z!==!0)throw new O("option "+G+" must be "+z,O.ERR_BAD_OPTION_VALUE);continue}if(J!==!0)throw new O("Unknown option "+G,O.ERR_BAD_OPTION)}}var p7,EU,QY;var kU=R(()=>{U$();p7={};["object","boolean","number","function","string","symbol"].forEach(($,Q)=>{p7[$]=function(X){return typeof X===$||"a"+(Q<1?"n ":" ")+$}});EU={};p7.transitional=function(Q,J,X){function Y(G,W){return"[Axios v"+L8+"] Transitional option '"+G+"'"+W+(X?". "+X:"")}return(G,W,q)=>{if(Q===!1)throw new O(Y(W," has been removed"+(J?" in "+J:"")),O.ERR_DEPRECATED);if(J&&!EU[W])EU[W]=!0,console.warn(Y(W," has been deprecated since v"+J+" and will be removed in the near future"));return Q?Q(G,W,q):!0}};p7.spelling=function(Q){return(J,X)=>{return console.warn(`${X} is likely a misspelling of ${Q}`),!0}};QY={assertOptions:BI,validators:p7}});class JY{constructor($){this.defaults=$||{},this.interceptors={request:new XG,response:new XG}}async request($,Q){try{return await this._request($,Q)}catch(J){if(J instanceof Error){let X={};Error.captureStackTrace?Error.captureStackTrace(X):X=Error();let Y=(()=>{if(!X.stack)return"";let G=X.stack.indexOf(`
|
|
25
|
+
`);return G===-1?"":X.stack.slice(G+1)})();try{if(!J.stack)J.stack=Y;else if(Y){let G=Y.indexOf(`
|
|
26
|
+
`),W=G===-1?-1:Y.indexOf(`
|
|
27
|
+
`,G+1),q=W===-1?"":Y.slice(W+1);if(!String(J.stack).endsWith(q))J.stack+=`
|
|
28
|
+
`+Y}}catch(G){}}throw J}}_request($,Q){if(typeof $==="string")Q=Q||{},Q.url=$;else Q=$||{};Q=d$(this.defaults,Q);let{transitional:J,paramsSerializer:X,headers:Y}=Q;if(J!==void 0)QY.assertOptions(J,{silentJSONParsing:Y$.transitional(Y$.boolean),forcedJSONParsing:Y$.transitional(Y$.boolean),clarifyTimeoutError:Y$.transitional(Y$.boolean),legacyInterceptorReqResOrdering:Y$.transitional(Y$.boolean),advertiseZstdAcceptEncoding:Y$.transitional(Y$.boolean),validateStatusUndefinedResolves:Y$.transitional(Y$.boolean)},!1);if(X!=null)if(B.isFunction(X))Q.paramsSerializer={serialize:X};else QY.assertOptions(X,{encode:Y$.function,serialize:Y$.function},!0);if(Q.allowAbsoluteUrls!==void 0);else if(this.defaults.allowAbsoluteUrls!==void 0)Q.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls;else Q.allowAbsoluteUrls=!0;QY.assertOptions(Q,{baseUrl:Y$.spelling("baseURL"),withXsrfToken:Y$.spelling("withXSRFToken")},!0),Q.method=(Q.method||this.defaults.method||"get").toLowerCase();let G=Y&&B.merge(Y.common,Y[Q.method]);Y&&B.forEach(["delete","get","head","post","put","patch","query","common"],(M)=>{delete Y[M]}),Q.headers=E0.concat(G,Y);let W=[],q=!0;this.interceptors.request.forEach(function(H){if(typeof H.runWhen==="function"&&H.runWhen(Q)===!1)return;q=q&&H.synchronous;let w=Q.transitional||a8;if(w&&w.legacyInterceptorReqResOrdering)W.unshift(H.fulfilled,H.rejected);else W.push(H.fulfilled,H.rejected)});let z=[];this.interceptors.response.forEach(function(H){z.push(H.fulfilled,H.rejected)});let K,V=0,U;if(!q){let M=[h7.bind(this),void 0];M.unshift(...W),M.push(...z),U=M.length,K=Promise.resolve(Q);while(V<U)K=K.then(M[V++],M[V++]);return K}U=W.length;let x=Q;while(V<U){let M=W[V++],H=W[V++];try{x=M(x)}catch(w){H.call(this,w);break}}try{K=h7.call(this,x)}catch(M){return Promise.reject(M)}V=0,U=z.length;while(V<U)K=K.then(z[V++],z[V++]);return K}getUri($){$=d$(this.defaults,$);let Q=OQ($.baseURL,$.url,$.allowAbsoluteUrls,$);return NQ(Q,$.params,$.paramsSerializer)}}var Y$,XY;var cU=R(()=>{A0();_7();b2();AU();b7();F7();kU();g$();yX();Y$=QY.validators;B.forEach(["delete","get","head","options"],function(Q){JY.prototype[Q]=function(J,X){return this.request(d$(X||{},{method:Q,url:J,data:X&&B.hasOwnProp(X,"data")?X.data:void 0}))}});B.forEach(["post","put","patch","query"],function(Q){function J(X){return function(G,W,q){return this.request(d$(q||{},{method:Q,headers:X?{"Content-Type":"multipart/form-data"}:{},url:G,data:W}))}}if(JY.prototype[Q]=J(),Q!=="query")JY.prototype[Q+"Form"]=J(!0)});XY=JY});class aG{constructor($){if(typeof $!=="function")throw TypeError("executor must be a function.");let Q;this.promise=new Promise(function(Y){Q=Y});let J=this;this.promise.then((X)=>{if(!J._listeners)return;let Y=J._listeners.length;while(Y-- >0)J._listeners[Y](X);J._listeners=null}),this.promise.then=(X)=>{let Y,G=new Promise((W)=>{J.subscribe(W),Y=W}).then(X);return G.cancel=function(){J.unsubscribe(Y)},G},$(function(Y,G,W){if(J.reason)return;J.reason=new D$(Y,G,W),Q(J.reason)})}throwIfRequested(){if(this.reason)throw this.reason}subscribe($){if(this.reason){$(this.reason);return}if(this._listeners)this._listeners.push($);else this._listeners=[$]}unsubscribe($){if(!this._listeners)return;let Q=this._listeners.indexOf($);if(Q!==-1)this._listeners.splice(Q,1)}toAbortSignal(){let $=new AbortController,Q=(J)=>{$.abort(J)};return this.subscribe(Q),$.signal.unsubscribe=()=>this.unsubscribe(Q),$.signal}static source(){let $;return{token:new aG(function(X){$=X}),cancel:$}}}var SU;var bU=R(()=>{vQ();SU=aG});function oG($){return function(J){return $.apply(null,J)}}function sG($){return B.isObject($)&&$.isAxiosError===!0}var fU=R(()=>{A0()});var rG,mU;var yU=R(()=>{rG={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(rG).forEach(([$,Q])=>{rG[Q]=$});mU=rG});function hU($){let Q=new XY($),J=IX(XY.prototype.request,Q);return B.extend(J,XY.prototype,Q,{allOwnKeys:!0}),B.extend(J,Q,null,{allOwnKeys:!0}),J.create=function(Y){return hU(d$($,Y))},J}var u0,u7;var pU=R(()=>{A0();cU();b7();v7();VG();vQ();bU();wJ();U$();fU();g$();nG();yU();u0=hU(LJ);u0.Axios=XY;u0.CanceledError=D$;u0.CancelToken=SU;u0.isCancel=pX;u0.VERSION=L8;u0.toFormData=d8;u0.AxiosError=O;u0.Cancel=u0.CanceledError;u0.all=function(Q){return Promise.all(Q)};u0.spread=oG;u0.isAxiosError=sG;u0.mergeConfig=d$;u0.AxiosHeaders=E0;u0.formToJSON=($)=>N7(B.isHTMLForm($)?new FormData($):$);u0.getAdapter=y7.getAdapter;u0.HttpStatusCode=mU;u0.default=u0;u7=u0});var uU=R(()=>{pU()});import{readFileSync as ZI}from"node:fs";function a$(){try{let $=JSON.parse(ZI(new URL("../package.json",import.meta.url),"utf8"));return typeof $.version==="string"?$.version:"0.0.0"}catch{return"0.0.0"}}function D8($,Q){let J=(G)=>{let W=/^\D*(\d+)\.(\d+)\.(\d+)/.exec(G.trim());return W?[Number(W[1]),Number(W[2]),Number(W[3])]:null},X=J($),Y=J(Q);if(!X||!Y)return!1;for(let G=0;G<3;G++){if(X[G]>Y[G])return!0;if(X[G]<Y[G])return!1}return!1}var FJ=()=>{};import{promises as YY}from"node:fs";import{homedir as gU}from"node:os";import{dirname as lU,join as GY}from"node:path";async function tG($){try{let Q=await YY.readFile($,"utf8"),J=JSON.parse(Q);if(J&&typeof J==="object")return J;return{}}catch{return{}}}async function iU(){return tG(_$)}async function eG($=process.cwd()){let Q=gU(),J=$;for(;;){if(J!==Q){let Y=GY(J,EQ);try{return await YY.access(Y),Y}catch{}}let X=lU(J);if(X===J)return null;J=X}}async function nU($,Q){await YY.mkdir(lU($),{recursive:!0,mode:448}),await YY.writeFile($,JSON.stringify(Q,null,2)+`
|
|
29
|
+
`,{mode:384}),await YY.chmod($,384).catch(()=>{})}async function dU($){await nU(_$,$)}async function aU($,Q=process.cwd()){let J=GY(Q,EQ);return await nU(J,$),J}function oU($,Q){if($!=="global")return"ok";if(Q.mutate&&!Q.allowGlobal)return"refuse";return"warn"}var CJ,_$,EQ;var $W=R(()=>{CJ=GY(gU(),".figura"),_$=GY(CJ,"config.json"),EQ=GY(".figura","config.json")});var sU={};qJ(sU,{writeProjectConfig:()=>JW,writeConfig:()=>QW,resolveConfig:()=>s0,readConfig:()=>g7,findProjectConfigPath:()=>eG,PROJECT_CONFIG_REL:()=>EQ,CONFIG_PATH:()=>_$,CONFIG_DIR:()=>CJ});async function g7(){return iU()}async function QW($){await dU($)}async function JW($,Q=process.cwd()){return aU($,Q)}async function s0($={}){let Q=await g7(),J=await eG($.cwd),X=J?await tG(J):{},Y={...Q,...X},G=process.env.FIGURA_TOKEN||$.tokenFlag||Y.token||void 0,W=process.env.FIGURA_TOKEN?"env":$.tokenFlag?"flag":X.token?"project":Q.token?"global":"none",q=process.env.FIGURA_API_URL||$.apiUrlFlag||Y.apiUrl||IJ;return{token:G,apiUrl:q,team:Y.team,config:Y,tokenSource:W,projectConfigPath:J}}var N$=R(()=>{$W();v$()});import{promises as XW}from"node:fs";import{join as wI}from"node:path";function PJ($){try{let Q=new URL($);return`${Q.protocol}//${Q.host}`.toLowerCase()}catch{return $.trim().toLowerCase().replace(/\/+$/,"")}}function rU($,Q){return typeof $==="number"&&Q-$<LI}function WY($,Q,J){let X=$.serverAdvice?.[Q];if(!X)return{};return{min:rU(X.minAt,J)?X.min:void 0,latest:rU(X.latestAt,J)?X.latest:void 0}}async function s8(){try{let $=await XW.readFile(tU,"utf8"),Q=JSON.parse($);return Q&&typeof Q==="object"?Q:{}}catch{return{}}}async function qY($){await XW.mkdir(CJ,{recursive:!0,mode:448}),await XW.writeFile(tU,JSON.stringify($,null,2)+`
|
|
30
|
+
`,{mode:384})}function $x($,Q){return typeof $.checkedAt==="number"&&Q-$.checkedAt<jI}async function YW($){let Q=new AbortController,J=setTimeout(()=>Q.abort(),$);try{let X=await fetch("https://registry.npmjs.org/figura-cli/latest",{signal:Q.signal,headers:{accept:"application/vnd.npm.install-v1+json"}});if(!X.ok)return null;let Y=await X.json();return typeof Y.version==="string"?Y.version:null}catch{return null}finally{clearTimeout(J)}}var tU,jI=86400000,LI=604800000,eU=21600000;var zY=R(()=>{N$();tU=wI(CJ,"update-check.json")});function RI($,Q=[]){for(let J=0;J<$.length;J++){if($[J].startsWith("-"))continue;if(J>0&&Q.includes($[J-1]))continue;return{before:$.slice(0,J),script:$[J],after:$.slice(J+1)}}return{before:$,script:void 0,after:[]}}function GW($,Q,J=[]){return(X)=>{let{before:Y,script:G,after:W}=RI(X,J);if(G===void 0)return[$,Q,...Y];if(W.length>0)return[$,Q,...Y,G,"--",...W];return[$,Q,...Y,G]}}function Xx($){return{agent:[$,0],run:[$,"run",0],install:[$,"i",0],frozen:[$,"i","--frozen-lockfile",0],global:[$,"add","-g",0],add:[$,"add",0],upgrade:[$,"update",0],"upgrade-interactive":[$,"update","-i",0],dedupe:[$,"dedupe",0],execute:[$,"dlx",0],"execute-local":[$,"exec",0],uninstall:[$,"remove",0],global_uninstall:[$,"remove","--global",0]}}function Yx($,Q,J){let X=WW[$][Q];return qW(X,J)}function qW($,Q){if($==null)return null;let J=typeof $==="function"?$(Q):$.flatMap((X)=>{if(typeof X==="number")return Q;return[X]});return{command:J[0],args:J.slice(1)}}var DI,Jx,_I,Qx,NI,vI,OI,FI,CI,WW;var Gx=R(()=>{DI={agent:["npm",0],run:GW("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]},Jx={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":GW("yarn","exec"),uninstall:["yarn","remove",0],global_uninstall:["yarn","global","remove",0]},_I={...Jx,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]};Qx=Xx("pnpm"),NI=Xx("rush-pnpm"),vI={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]},OI={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]},FI={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]},CI={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]},WW={npm:DI,yarn:Jx,"yarn@berry":_I,pnpm:Qx,"pnpm@6":{...Qx,run:GW("pnpm","run",["-F","--filter"])},"pnpm-rush":NI,bun:vI,aube:OI,deno:FI,nub:CI}});var VY,KY,UY,Wx;var zW=R(()=>{VY=["npm","yarn","yarn@berry","pnpm","pnpm@6","pnpm-rush","bun","deno","nub","aube"],KY={"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"},UY={"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"},Wx={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 zx from"node:fs/promises";import _8 from"node:path";import Vx from"node:process";async function l7($,Q){try{let J=await zx.stat($);return Q==="file"?J.isFile():J.isDirectory()}catch{return!1}}function Kx(){let $=Vx.env.npm_config_user_agent;if(!$)return null;let Q=$.split("/")[0];return VY.includes(Q)?Q:null}function*II($=Vx.cwd()){let Q=_8.resolve($),{root:J}=_8.parse(Q);while(Q&&Q!==J)yield Q,Q=_8.dirname(Q)}async function qx($,Q){if(!$||!await l7($,"file"))return null;return await TI($,Q)}async function Ux($={}){let{cwd:Q,strategies:J=["lockfile","packageManager-field","devEngines-field"]}=$,X;if(typeof $.stopDir==="string"){let Y=_8.resolve($.stopDir);X=(G)=>G===Y}else X=$.stopDir;for(let Y of II(Q)){for(let G of J)switch(G){case"lockfile":{if(await l7(_8.join(Y,"rush.json"),"file"))return{name:"pnpm",agent:"pnpm-rush"};for(let W of Object.keys(KY))if(await l7(_8.join(Y,W),"file")){let q=KY[W],z=await qx(_8.join(Y,"package.json"),$);if(z)return z;else return{name:q,agent:q}}break}case"packageManager-field":case"devEngines-field":{let W=await qx(_8.join(Y,"package.json"),$);if(W)return W;break}case"install-metadata":{for(let W of Object.keys(UY)){let q=W.endsWith("/")?"dir":"file";if(await l7(_8.join(Y,W),q)){let z=UY[W],K=z==="yarn"?AI(W)?"yarn":"yarn@berry":z;return{name:z,agent:K}}}break}}if(X?.(Y))break}return null}function PI($){let Q=(J)=>J?.match(/\d+(\.\d+){0,2}/)?.[0]??J;if(typeof $.packageManager==="string"){let[J,X]=$.packageManager.replace(/^\^/,"").split("@");return{name:J,ver:Q(X)}}if(typeof $.devEngines?.packageManager?.name==="string")return{name:$.devEngines.packageManager.name,ver:Q($.devEngines.packageManager.version)};return}async function TI($,Q){try{let J=await zx.readFile($,"utf8"),X=Q.packageJsonParser?await Q.packageJsonParser(J,$):JSON.parse(J),Y,G=PI(X);if(G){let{name:W,ver:q}=G,z=q;if(W==="yarn"&&q&&Number.parseInt(q)>1)return Y="yarn@berry",z="berry",{name:W,agent:Y,version:z};else if(W==="pnpm"&&q&&Number.parseInt(q)<7)return Y="pnpm@6",{name:W,agent:Y,version:z};else if(VY.includes(W))return Y=W,{name:W,agent:Y,version:z};else return Q.onUnknown?.(X.packageManager)??null}}catch{}return null}function AI($){return $.endsWith(".yarn_integrity")}var xx=R(()=>{zW()});var Mx={};qJ(Mx,{resolveCommand:()=>Yx,getUserAgent:()=>Kx,detect:()=>Ux,constructCommand:()=>qW,LOCKS:()=>KY,INSTALL_PAGE:()=>Wx,INSTALL_METADATA:()=>UY,COMMANDS:()=>WW,AGENTS:()=>VY});var Hx=R(()=>{Gx();zW();xx()});import{existsSync as EI}from"node:fs";import{delimiter as kI,join as cI}from"node:path";import{fileURLToPath as SI}from"node:url";function bI($){if(!$.isTTY)return"stdout-not-tty";if($.json)return"json";if($.env.CI)return"ci";if($.env.FIGURA_NO_UPDATE_NOTIFIER==="1"||$.env.NO_UPDATE_NOTIFIER==="1")return"opt-out";return null}function fI($){let Q=$.replace(/\\/g,"/");if(Q.includes("/.bun/"))return"bun";if(Q.includes("/pnpm/")||Q.includes("/.pnpm/"))return"pnpm";if(Q.includes("/.volta/"))return"volta";if(Q.includes("/node_modules/"))return"npm";return null}function mI($=process.env,Q=EI){let J=($.PATH??"").split(kI).filter(Boolean),X=process.platform==="win32"?["npm.cmd","npm.exe","npm"]:["npm"];return J.some((Y)=>X.some((G)=>Q(cI(Y,G))))}async function i7($,Q="latest",J,X,Y=SI(import.meta.url)){let G=await Promise.resolve().then(() => (Hx(),Mx)),W=(V)=>{let U=G.resolveCommand(V,"global",[`${$}@${Q}`]);return U?{command:`${U.command} ${U.args.join(" ")}`,generic:!1}:null},q=J!==void 0?J:G.getUserAgent()??null;if(q){let V=W(q);if(V)return V}let z=fI(Y);if(z==="volta")return{command:`volta install ${$}@${Q}`,generic:!1};if(z){let V=W(z);if(V)return V}let K=X??mI();return{command:`npm i -g ${$}@${Q}`,generic:!K}}function Zx($){return $.generic?`Update with your package manager's global install, e.g. ${$.command}`:`Run: ${$.command}`}function yI($,Q,J){return`⚠ figura ${$} → ${Q} available. ${J}`}function hI($,Q,J){return`⚠ figura ${$} is below the minimum supported ${Q} — `+`some commands may fail. ${J}`}function pI($,Q,J){let X=$.latest,Y=WY($,Q,J).latest;if(X&&Y)return D8(Y,X)?Y:X;return X??Y}function wx($){let Q=$("x-figura-min-cli")?.trim(),J=$("x-figura-latest-cli")?.trim();return{min:Q||void 0,latest:J||void 0}}function uI($,Q,J,X){if(!J.min&&!J.latest)return null;let Y={...$.serverAdvice??{}},G=Y[Q]??{},W={...G},q=!1,z=(K)=>typeof K!=="number"||X-K>=eU;if(J.min&&(G.min!==J.min||z(G.minAt)))W.min=J.min,W.minAt=X,q=!0;if(J.latest&&(G.latest!==J.latest||z(G.latestAt)))W.latest=J.latest,W.latestAt=X,q=!0;if(!q)return null;return Y[Q]=W,{...$,serverAdvice:Y}}async function jx($,Q,J=Date.now()){try{if(!Q.min&&!Q.latest)return;let X=uI(await s8(),$,Q,J);if(X)await qY(X)}catch{}}function gI($){return $.FIGURA_NO_UPDATE_NOTIFIER==="1"||$.NO_UPDATE_NOTIFIER==="1"}function lI($){return $.some((Q)=>Q==="--json"||Q.startsWith("--json="))}async function Lx($,Q,J=Date.now()){try{if(gI(process.env))return;let X=await s8(),Y=a$(),G=PJ(Q),W=WY(X,G,J);if(W.min&&D8(W.min,Y)){let K=Zx(await i7(Bx));process.stderr.write(hI(Y,W.min,K)+`
|
|
31
|
+
`);return}if(bI({isTTY:Boolean(process.stdout.isTTY),json:lI($),env:process.env}))return;let q=pI(X,G,J);if(!q||!D8(q,Y))return;let z=Zx(await i7(Bx));process.stderr.write(yI(Y,q,z)+`
|
|
32
|
+
`)}catch{}}var Bx="figura-cli";var n7=R(()=>{FJ();zY()});function Rx($,Q){if(!Q)return;let J=(X)=>{let Y=Q[X];return typeof Y==="string"?Y:void 0};jx(PJ($),wx(J))}async function z0($,Q={}){let J=(Q.apiUrl||IJ).replace(/\/+$/,""),X=$.startsWith("http")?$:`${J}${$.startsWith("/")?"":"/"}${$}`,Y={Accept:"application/json",...Q.headers??{}};if(Q.token)Y.Authorization=`Bearer ${Q.token}`;if(Q.source)Y["X-Figura-Source"]=Q.source;let G;if(Q.body!==void 0)Y["Content-Type"]="application/json",G=JSON.stringify(Q.body);let W;try{W=await u7.request({url:X,method:Q.method??"GET",headers:Y,data:G,signal:Q.signal,validateStatus:()=>!0,transformRequest:[(K)=>K],transformResponse:[(K)=>K]})}catch(K){let V=K instanceof Error?K.message:String(K);throw new N8(0,`network error: ${V}`)}Rx(J,W.headers);let q=typeof W.data==="string"?W.data:"",z=void 0;if(q)try{z=JSON.parse(q)}catch{z=q}if(W.status<200||W.status>=300){let K=z&&typeof z==="object"&&z!==null&&"error"in z?String(z.error):typeof z==="string"&&z?z:W.statusText||`HTTP ${W.status}`;throw new N8(W.status,K,z)}return z}async function d7($,Q={}){let J=(Q.apiUrl||IJ).replace(/\/+$/,""),X=$.startsWith("http")?$:`${J}${$.startsWith("/")?"":"/"}${$}`,Y={...Q.headers??{}};if(Q.token)Y.Authorization=`Bearer ${Q.token}`;if(Q.source)Y["X-Figura-Source"]=Q.source;let G;try{G=await u7.request({url:X,method:Q.method??"GET",headers:Y,signal:Q.signal,responseType:"text",validateStatus:()=>!0,transformResponse:[(q)=>q]})}catch(q){let z=q instanceof Error?q.message:String(q);throw new N8(0,`network error: ${z}`)}Rx(J,G.headers);let W=typeof G.data==="string"?G.data:String(G.data??"");if(G.status<200||G.status>=300){let q=G.statusText||`HTTP ${G.status}`;try{let z=JSON.parse(W);if(z&&typeof z==="object"&&"error"in z)q=String(z.error)}catch{}throw new N8(G.status,q)}return W}var IJ="https://api.figura.so",N8;var v$=R(()=>{uU();n7();zY();N8=class N8 extends Error{status;payload;constructor($,Q,J){super(Q);this.name="FiguraApiError",this.status=$,this.payload=J}}});import{existsSync as iI}from"node:fs";import{homedir as nI}from"node:os";import{dirname as dI,join as aI,relative as oI}from"node:path";function Q0($){let Q={},J=[];for(let X=0;X<$.length;X++){let Y=$[X];if(Y.startsWith("--")){let G=Y.slice(2),W=G.indexOf("=");if(W>=0)Q[G.slice(0,W)]=G.slice(W+1);else{let q=$[X+1];if(q!==void 0&&!q.startsWith("--"))Q[G]=q,X++;else Q[G]=!0}}else J.push(Y)}return{flags:Q,positionals:J}}function h($,Q){let J=$[Q];return typeof J==="string"?J:void 0}function i($,Q){return $[Q]===!0||$[Q]==="true"}function _x($=process.cwd()){let Q=$;for(;;){if(iI(aI(Q,".git")))return!0;let J=dI(Q);if(J===Q)return!1;Q=J}}function Dx($){let Q=nI();return $.startsWith(Q)?"~"+$.slice(Q.length):$}function sI($,Q=process.cwd()){switch($.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 J=$.projectConfigPath,X=oI(Q,J);return`→ team: ${$.team??"(unset)"} — ${X.startsWith("..")?Dx(J):X}`}case"global":return`→ team: ${$.team??"(unset)"} — ${Dx(_$)} (GLOBAL fallback)`;case"none":return"→ not logged in"}}async function N0($,Q={}){let J=await s0({tokenFlag:h($,"token"),apiUrlFlag:h($,"api-url")});if(!J.token)I("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(!(Q.announce||Q.mutate))return J;process.stderr.write(sI(J)+`
|
|
33
|
+
`);let Y=oU(J.tokenSource,{mutate:Q.mutate,allowGlobal:i($,"allow-global")||process.env.FIGURA_ALLOW_GLOBAL==="1"}),G=J.team?`'${J.team}'`:"the global config team";if(Y==="refuse")I(`this directory isn't linked to a Figura team, so this would land on ${G} — 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 ${
|
|
36
|
-
`),process.exit(1)}function
|
|
37
|
-
`)}import{
|
|
38
|
-
`),{
|
|
39
|
-
`)+(X.length
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
`).map((
|
|
43
|
-
`))z
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
`))z+=`
|
|
47
|
-
|
|
35
|
+
bind it to its own team, or pass --allow-global to use ${G} anyway.`);if(Y==="warn")process.stderr.write(`figura: warning: using the GLOBAL credential (team ${G}) — nothing pins this `+"directory to that team. Run `figura link` to bind it.\n");return J}function I($){process.stderr.write(`figura: ${$}
|
|
36
|
+
`),process.exit(1)}function a($){if($ instanceof N8)return $.status?`${$.message} (HTTP ${$.status})`:$.message;if($ instanceof Error)return $.message;return String($)}function L0($){process.stdout.write(JSON.stringify($,null,2)+`
|
|
37
|
+
`)}var V0="cli";var r0=R(()=>{v$();N$();$W()});var xW={};qJ(xW,{verifySkillPayload:()=>VP,resolveEngineSkillReference:()=>TJ,materializeSkill:()=>KP,hashSkillFiles:()=>Px,hashPayload:()=>Tx,fetchLatestSkill:()=>s7,SkillPathTraversalError:()=>o7,SkillHashMismatchError:()=>UW});import{createHash as $P,randomBytes as QP}from"node:crypto";import{mkdirSync as JP,renameSync as XP,rmSync as Cx,writeFileSync as YP}from"node:fs";import{dirname as GP,isAbsolute as WP,join as qP,relative as zP,resolve as KW,sep as Ix}from"node:path";function Px($){if($.length===0)return null;let Q=[...$].sort((X,Y)=>X.path<Y.path?-1:X.path>Y.path?1:0),J=$P("sha256");for(let X of Q)J.update(X.path),J.update("\x00"),J.update(X.content,"utf8"),J.update("\x00");return J.digest("hex").slice(0,16)}function Tx($){return Px(Object.entries($.files).map(([Q,J])=>({path:Q,content:J})))}async function s7($,Q={}){let J=Q.signal??(Q.timeoutMs?AbortSignal.timeout(Q.timeoutMs):AbortSignal.timeout(4000));try{return await z0(`/v1/skills/${encodeURIComponent($)}/latest`,{apiUrl:Q.apiUrl,token:Q.token,source:"cli",signal:J})}catch{return null}}async function TJ($,Q,J={}){let X=await s7($,J);if(X?.hash)return{reference:{version:X.version,hash:X.hash,canonical:!0},online:!0};return{reference:Q(),online:!1}}function VP($){let Q=Tx($);if(Q!==$.hash)throw new UW($.skill,$.hash,Q);return $}function KP($,Q){let J=KW($,Q.skill),X=Q.skill+"/",Y=[];for(let[W,q]of Object.entries(Q.files)){if(!W.startsWith(X))throw new o7(Q.skill,W);let z=W.slice(X.length),K=KW(J,z.split("/").join(Ix)),V=zP(J,K);if(V===""||V.startsWith("..")||WP(V))throw new o7(Q.skill,W);Y.push({relInSkill:z,content:q})}if(Y.length===0)return Q.skill;let G=KW($,`.${Q.skill}.tmp-${QP(6).toString("hex")}`);try{for(let{relInSkill:W,content:q}of Y){let z=qP(G,W.split("/").join(Ix));JP(GP(z),{recursive:!0}),YP(z,q)}Cx(J,{recursive:!0,force:!0}),XP(G,J)}finally{Cx(G,{recursive:!0,force:!0})}return Q.skill}var UW,o7;var AJ=R(()=>{v$();UW=class UW extends Error{skill;served;computed;constructor($,Q,J){super(`skill '${$}' failed hash verification (served ${Q}, computed ${J??"null"}) — refusing to install`);this.skill=$;this.served=Q;this.computed=J;this.name="SkillHashMismatchError"}};o7=class o7 extends Error{skill;badPath;constructor($,Q){super(`skill '${$}' payload carries an unsafe path '${Q}' — refusing to install`);this.skill=$;this.badPath=Q;this.name="SkillPathTraversalError"}}});function y0($){if(typeof $!=="object"||$===null)return!1;let Q=Object.getPrototypeOf($);return(Q===null||Q===Object.prototype||Object.getPrototypeOf(Q)===null)&&!(Symbol.toStringTag in $)&&!(Symbol.iterator in $)}import{fileURLToPath as UP}from"node:url";var EJ=($,Q)=>{let J=HW(xP($));if(typeof J!=="string")throw TypeError(`${Q} must be a string or a file URL: ${J}.`);return J},xP=($)=>MW($)?$.toString():$,MW=($)=>typeof $!=="string"&&$&&Object.getPrototypeOf($)===String.prototype,HW=($)=>$ instanceof URL?UP($):$;var kJ=()=>{};var r7=($,Q=[],J={})=>{let X=EJ($,"First argument"),[Y,G]=y0(Q)?[[],Q]:[Q,J];if(!Array.isArray(Y))throw TypeError(`Second argument must be either an array of arguments or an options object: ${Y}`);if(Y.some((z)=>typeof z==="object"&&z!==null))throw TypeError(`Second argument must be an array of strings: ${Y}`);let W=Y.map(String),q=W.find((z)=>z.includes("\x00"));if(q!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${q}`);if(!y0(G))throw TypeError(`Last argument must be an options object: ${G}`);return[X,W,G]};var BW=R(()=>{kJ()});import{StringDecoder as MP}from"node:string_decoder";var Ax,Ex=($)=>Ax.call($)==="[object ArrayBuffer]",g0=($)=>Ax.call($)==="[object Uint8Array]",v8=($)=>new Uint8Array($.buffer,$.byteOffset,$.byteLength),HP,kx=($)=>HP.encode($),BP,t7=($)=>BP.decode($),cx=($,Q)=>{return ZP($,Q).join("")},ZP=($,Q)=>{if(Q==="utf8"&&$.every((G)=>typeof G==="string"))return $;let J=new MP(Q),X=$.map((G)=>typeof G==="string"?kx(G):G).map((G)=>J.write(G)),Y=J.end();return Y===""?X:[...X,Y]},xY=($)=>{if($.length===1&&g0($[0]))return $[0];return ZW(wP($))},wP=($)=>$.map((Q)=>typeof Q==="string"?kx(Q):Q),ZW=($)=>{let Q=new Uint8Array(jP($)),J=0;for(let X of $)Q.set(X,J),J+=X.length;return Q},jP=($)=>{let Q=0;for(let J of $)Q+=J.length;return Q};var O$=R(()=>{({toString:Ax}=Object.prototype),HP=new TextEncoder,BP=new TextDecoder});import{ChildProcess as LP}from"node:child_process";var mx=($)=>Array.isArray($)&&Array.isArray($.raw),yx=($,Q)=>{let J=[];for(let[G,W]of $.entries())J=RP({templates:$,expressions:Q,tokens:J,index:G,template:W});if(J.length===0)throw TypeError("Template script must not be empty");let[X,...Y]=J;return[X,Y,{}]},RP=({templates:$,expressions:Q,tokens:J,index:X,template:Y})=>{if(Y===void 0)throw TypeError(`Invalid backslash sequence: ${$.raw[X]}`);let{nextTokens:G,leadingWhitespaces:W,trailingWhitespaces:q}=DP(Y,$.raw[X]),z=bx(J,G,W);if(X===Q.length)return z;let K=Q[X],V=Array.isArray(K)?K.map((U)=>fx(U)):[fx(K)];return bx(z,V,q)},DP=($,Q)=>{if(Q.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let J=[],X=0,Y=Sx.has(Q[0]);for(let W=0,q=0;W<$.length;W+=1,q+=1){let z=Q[q];if(Sx.has(z)){if(X!==W)J.push($.slice(X,W));X=W+1}else if(z==="\\"){let K=Q[q+1];if(K===`
|
|
38
|
+
`)W-=1,q+=1;else if(K==="u"&&Q[q+2]==="{")q=Q.indexOf("}",q+3);else q+=_P[K]??1}}let G=X===$.length;if(!G)J.push($.slice(X));return{nextTokens:J,leadingWhitespaces:Y,trailingWhitespaces:G}},Sx,_P,bx=($,Q,J)=>J||$.length===0||Q.length===0?[...$,...Q]:[...$.slice(0,-1),`${$.at(-1)}${Q[0]}`,...Q.slice(1)],fx=($)=>{let Q=typeof $;if(Q==="string")return $;if(Q==="number")return String($);if(y0($)&&(("stdout"in $)||("isMaxBuffer"in $)))return NP($);if($ instanceof LP||Object.prototype.toString.call($)==="[object Promise]")throw TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw TypeError(`Unexpected "${Q}" in template expression`)},NP=({stdout:$})=>{if(typeof $==="string")return $;if(g0($))return t7($);if($===void 0)throw TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`);throw TypeError(`Unexpected "${typeof $}" stdout in template expression`)};var hx=R(()=>{O$();Sx=new Set([" ","\t","\r",`
|
|
39
|
+
`]),_P={x:3,u:5}});import wW from"node:process";var o$=($)=>e7.includes($),e7,k$,$9=($)=>k$[$]??`stdio[${$}]`;var O8=R(()=>{e7=[wW.stdin,wW.stdout,wW.stderr],k$=["stdin","stdout","stderr"]});import{debuglog as vP}from"node:util";var ux=($)=>{let Q={...$};for(let J of RW)Q[J]=jW($,J);return Q},jW=($,Q)=>{let J=Array.from({length:OP($)+1}),X=FP($[Q],J,Q);return AP(X,Q)},OP=({stdio:$})=>Array.isArray($)?Math.max($.length,k$.length):k$.length,FP=($,Q,J)=>y0($)?CP($,Q,J):Q.fill($),CP=($,Q,J)=>{for(let X of Object.keys($).sort(IP))for(let Y of PP(X,J,Q))Q[Y]=$[X];return Q},IP=($,Q)=>px($)<px(Q)?1:-1,px=($)=>{if($==="stdout"||$==="stderr")return 0;return $==="all"?2:1},PP=($,Q,J)=>{if($==="ipc")return[J.length-1];let X=LW($);if(X===void 0||X===0)throw TypeError(`"${Q}.${$}" is invalid.
|
|
40
|
+
It must be "${Q}.stdout", "${Q}.stderr", "${Q}.all", "${Q}.ipc", or "${Q}.fd3", "${Q}.fd4" (and so on).`);if(X>=J.length)throw TypeError(`"${Q}.${$}" is invalid: that file descriptor does not exist.
|
|
41
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);return X==="all"?[1,2]:[X]},LW=($)=>{if($==="all")return $;if(k$.includes($))return k$.indexOf($);let Q=TP.exec($);if(Q!==null)return Number(Q[1])},TP,AP=($,Q)=>$.map((J)=>J===void 0?kP[Q]:J),EP,kP,RW,F8=($,Q)=>Q==="ipc"?$.at(-1):$[Q];var C8=R(()=>{O8();TP=/^fd(\d+)$/,EP=vP("execa").enabled?"full":"none",kP={lines:!1,buffer:!0,maxBuffer:1e8,verbose:EP,stripFinalNewline:!0},RW=["lines","buffer","maxBuffer","verbose","stripFinalNewline"]});var cJ=({verbose:$},Q)=>DW($,Q)!=="none",SJ=({verbose:$},Q)=>!["none","short"].includes(DW($,Q)),gx=({verbose:$},Q)=>{let J=DW($,Q);return Q9(J)?J:void 0},DW=($,Q)=>Q===void 0?cP($):F8($,Q),cP=($)=>$.find((Q)=>Q9(Q))??J9.findLast((Q)=>$.includes(Q)),Q9=($)=>typeof $==="function",J9;var r8=R(()=>{C8();J9=["none","short","full"]});import{platform as SP}from"node:process";import{stripVTControlCharacters as bP}from"node:util";var lx=($,Q)=>{let J=[$,...Q],X=J.join(" "),Y=J.map((G)=>uP(ix(G))).join(" ");return{command:X,escapedCommand:Y}},MY=($)=>bP($).split(`
|
|
42
|
+
`).map((Q)=>ix(Q)).join(`
|
|
43
|
+
`),ix=($)=>$.replaceAll(yP,(Q)=>fP(Q)),fP=($)=>{let Q=hP[$];if(Q!==void 0)return Q;let J=$.codePointAt(0),X=J.toString(16);return J<=pP?`\\u${X.padStart(4,"0")}`:`\\U${X}`},mP=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},yP,hP,pP=65535,uP=($)=>{if(gP.test($))return $;return SP==="win32"?`"${$.replaceAll('"','""')}"`:`'${$.replaceAll("'","'\\''")}'`},gP;var X9=R(()=>{yP=mP(),hP={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},gP=/^[\w./-]+$/});import nx from"node:process";function _W(){let{env:$}=nx,{TERM:Q,TERM_PROGRAM:J}=$;if(nx.platform!=="win32")return Q!=="linux";return Boolean($.WT_SESSION)||Boolean($.TERMINUS_SUBLIME)||$.ConEmuTask==="{cmd::Cmder}"||J==="Terminus-Sublime"||J==="vscode"||Q==="xterm-256color"||Q==="alacritty"||Q==="rxvt-unicode"||Q==="rxvt-unicode-256color"||$.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var dx=()=>{};var ax,ox,lP,iP,nP,dP,aP,Y9,se;var sx=R(()=>{dx();ax={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ox={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},lP={tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},iP={...ax,...ox},nP={...ax,...lP},dP=_W(),aP=dP?iP:nP,Y9=aP,se=Object.entries(ox)});import oP from"node:tty";var sP,s=($,Q)=>{if(!sP)return(Y)=>Y;let J=`\x1B[${$}m`,X=`\x1B[${Q}m`;return(Y)=>{let G=Y+"",W=G.indexOf(X);if(W===-1)return J+G+X;let q=J,z=0,V=(Q===22?X:"")+J;while(W!==-1)q+=G.slice(z,W)+V,z=W+X.length,W=G.indexOf(X,z);return q+=G.slice(z)+X,q}},ee,rx,$00,Q00,J00,X00,Y00,G00,W00,q00,z00,V00,K00,U00,x00,M00,H00,B00,Z00,w00,j00,G9,L00,R00,D00,_00,N00,v00,O00,F00,C00,tx,I00,ex,P00,T00,A00,E00,k00,c00,S00,b00,f00,m00,y00,h00,p00,u00,g00,l00,i00,n00,d00,a00,o00,s00,r00,t00,e00,$$0,Q$0;var $M=R(()=>{sP=oP?.WriteStream?.prototype?.hasColors?.()??!1,ee=s(0,0),rx=s(1,22),$00=s(2,22),Q00=s(3,23),J00=s(4,24),X00=s("4:2",24),Y00=s("4:3",24),G00=s("4:4",24),W00=s("4:5",24),q00=s(53,55),z00=s(7,27),V00=s(8,28),K00=s(9,29),U00=s(30,39),x00=s(31,39),M00=s(32,39),H00=s(33,39),B00=s(34,39),Z00=s(35,39),w00=s(36,39),j00=s(37,39),G9=s(90,39),L00=s(40,49),R00=s(41,49),D00=s(42,49),_00=s(43,49),N00=s(44,49),v00=s(45,49),O00=s(46,49),F00=s(47,49),C00=s(100,49),tx=s(91,39),I00=s(92,39),ex=s(93,39),P00=s(94,39),T00=s(95,39),A00=s(96,39),E00=s(97,39),k00=s(101,49),c00=s(102,49),S00=s(103,49),b00=s(104,49),f00=s(105,49),m00=s(106,49),y00=s(107,49),h00=s("58;5;0",59),p00=s("58;5;1",59),u00=s("58;5;2",59),g00=s("58;5;3",59),l00=s("58;5;4",59),i00=s("58;5;5",59),n00=s("58;5;6",59),d00=s("58;5;7",59),a00=s("58;5;8",59),o00=s("58;5;9",59),s00=s("58;5;10",59),r00=s("58;5;11",59),t00=s("58;5;12",59),e00=s("58;5;13",59),$$0=s("58;5;14",59),Q$0=s("58;5;15",59)});var QM=R(()=>{$M()});var YM=({type:$,message:Q,timestamp:J,piped:X,commandId:Y,result:{failed:G=!1}={},options:{reject:W=!0}})=>{let q=rP(J),z=tP[$]({failed:G,reject:W,piped:X}),K=eP[$]({reject:W});return`${G9(`[${q}]`)} ${G9(`[${Y}]`)} ${K(z)} ${K(Q)}`},rP=($)=>`${W9($.getHours(),2)}:${W9($.getMinutes(),2)}:${W9($.getSeconds(),2)}.${W9($.getMilliseconds(),3)}`,W9=($,Q)=>String($).padStart(Q,"0"),JM=({failed:$,reject:Q})=>{if(!$)return Y9.tick;return Q?Y9.cross:Y9.warning},tP,XM=($)=>$,eP;var GM=R(()=>{sx();QM();tP={command:({piped:$})=>$?"|":"$",output:()=>" ",ipc:()=>"*",error:JM,duration:JM},eP={command:()=>rx,output:()=>XM,ipc:()=>XM,error:({reject:$})=>$?tx:ex,duration:()=>G9}});var WM=($,Q,J)=>{let X=gx(Q,J);return $.map(({verboseLine:Y,verboseObject:G})=>$T(Y,G,X)).filter((Y)=>Y!==void 0).map((Y)=>QT(Y)).join("")},$T=($,Q,J)=>{if(J===void 0)return $;let X=J($,Q);if(typeof X==="string")return X},QT=($)=>$.endsWith(`
|
|
44
|
+
`)?$:`${$}
|
|
45
|
+
`;var qM=R(()=>{r8()});import{inspect as JT}from"node:util";var V8=({type:$,verboseMessage:Q,fdNumber:J,verboseInfo:X,result:Y})=>{let G=XT({type:$,result:Y,verboseInfo:X}),W=YT(Q,G),q=WM(W,X,J);if(q!=="")console.warn(q.slice(0,-1))},XT=({type:$,result:Q,verboseInfo:{escapedCommand:J,commandId:X,rawOptions:{piped:Y=!1,...G}}})=>({type:$,escapedCommand:J,commandId:`${X}`,timestamp:new Date,piped:Y,result:Q,options:G}),YT=($,Q)=>$.split(`
|
|
46
|
+
`).map((J)=>GT({...Q,message:J})),GT=($)=>{return{verboseLine:YM($),verboseObject:$}},q9=($)=>{let Q=typeof $==="string"?$:JT($);return MY(Q).replaceAll("\t"," ".repeat(WT))},WT=2;var bJ=R(()=>{X9();GM();qM()});var zM=($,Q)=>{if(!cJ(Q))return;V8({type:"command",verboseMessage:$,verboseInfo:Q})};var VM=R(()=>{r8();bJ()});var KM=($,Q,J)=>{VT($);let X=qT($);return{verbose:$,escapedCommand:Q,commandId:X,rawOptions:J}},qT=($)=>cJ({verbose:$})?zT++:void 0,zT=0n,VT=($)=>{for(let Q of $){if(Q===!1)throw TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(Q===!0)throw TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!J9.includes(Q)&&!Q9(Q)){let J=J9.map((X)=>`'${X}'`).join(", ");throw TypeError(`The "verbose" option must not be ${Q}. Allowed values are: ${J} or a function.`)}}};var UM=R(()=>{r8()});import{hrtime as xM}from"node:process";var z9=()=>xM.bigint(),NW=($)=>Number(xM.bigint()-$)/1e6;var V9=()=>{};var K9=($,Q,J)=>{let X=z9(),{command:Y,escapedCommand:G}=lx($,Q),W=jW(J,"verbose"),q=KM(W,G,{...J});return zM(G,q),{command:Y,escapedCommand:G,startTime:X,verboseInfo:q}};var vW=R(()=>{VM();UM();V9();X9();C8()});var wM=g((P$0,ZM)=>{ZM.exports=BM;BM.sync=UT;var MM=j0("fs");function KT($,Q){var J=Q.pathExt!==void 0?Q.pathExt:process.env.PATHEXT;if(!J)return!0;if(J=J.split(";"),J.indexOf("")!==-1)return!0;for(var X=0;X<J.length;X++){var Y=J[X].toLowerCase();if(Y&&$.substr(-Y.length).toLowerCase()===Y)return!0}return!1}function HM($,Q,J){if(!$.isSymbolicLink()&&!$.isFile())return!1;return KT(Q,J)}function BM($,Q,J){MM.stat($,function(X,Y){J(X,X?!1:HM(Y,$,Q))})}function UT($,Q){return HM(MM.statSync($),$,Q)}});var _M=g((T$0,DM)=>{DM.exports=LM;LM.sync=xT;var jM=j0("fs");function LM($,Q,J){jM.stat($,function(X,Y){J(X,X?!1:RM(Y,Q))})}function xT($,Q){return RM(jM.statSync($),Q)}function RM($,Q){return $.isFile()&&MT($,Q)}function MT($,Q){var{mode:J,uid:X,gid:Y}=$,G=Q.uid!==void 0?Q.uid:process.getuid&&process.getuid(),W=Q.gid!==void 0?Q.gid:process.getgid&&process.getgid(),q=parseInt("100",8),z=parseInt("010",8),K=parseInt("001",8),V=q|z,U=J&K||J&z&&Y===W||J&q&&X===G||J&V&&G===0;return U}});var vM=g((E$0,NM)=>{var A$0=j0("fs"),U9;if(process.platform==="win32"||global.TESTING_WINDOWS)U9=wM();else U9=_M();NM.exports=OW;OW.sync=HT;function OW($,Q,J){if(typeof Q==="function")J=Q,Q={};if(!J){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(X,Y){OW($,Q||{},function(G,W){if(G)Y(G);else X(W)})})}U9($,Q||{},function(X,Y){if(X){if(X.code==="EACCES"||Q&&Q.ignoreErrors)X=null,Y=!1}J(X,Y)})}function HT($,Q){try{return U9.sync($,Q||{})}catch(J){if(Q&&Q.ignoreErrors||J.code==="EACCES")return!1;else throw J}}});var AM=g((k$0,TM)=>{var fJ=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",OM=j0("path"),BT=fJ?";":":",FM=vM(),CM=($)=>Object.assign(Error(`not found: ${$}`),{code:"ENOENT"}),IM=($,Q)=>{let J=Q.colon||BT,X=$.match(/\//)||fJ&&$.match(/\\/)?[""]:[...fJ?[process.cwd()]:[],...(Q.path||process.env.PATH||"").split(J)],Y=fJ?Q.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",G=fJ?Y.split(J):[""];if(fJ){if($.indexOf(".")!==-1&&G[0]!=="")G.unshift("")}return{pathEnv:X,pathExt:G,pathExtExe:Y}},PM=($,Q,J)=>{if(typeof Q==="function")J=Q,Q={};if(!Q)Q={};let{pathEnv:X,pathExt:Y,pathExtExe:G}=IM($,Q),W=[],q=(K)=>new Promise((V,U)=>{if(K===X.length)return Q.all&&W.length?V(W):U(CM($));let x=X[K],M=/^".*"$/.test(x)?x.slice(1,-1):x,H=OM.join(M,$),w=!M&&/^\.[\\\/]/.test($)?$.slice(0,2)+H:H;V(z(w,K,0))}),z=(K,V,U)=>new Promise((x,M)=>{if(U===Y.length)return x(q(V+1));let H=Y[U];FM(K+H,{pathExt:G},(w,j)=>{if(!w&&j)if(Q.all)W.push(K+H);else return x(K+H);return x(z(K,V,U+1))})});return J?q(0).then((K)=>J(null,K),J):q(0)},ZT=($,Q)=>{Q=Q||{};let{pathEnv:J,pathExt:X,pathExtExe:Y}=IM($,Q),G=[];for(let W=0;W<J.length;W++){let q=J[W],z=/^".*"$/.test(q)?q.slice(1,-1):q,K=OM.join(z,$),V=!z&&/^\.[\\\/]/.test($)?$.slice(0,2)+K:K;for(let U=0;U<X.length;U++){let x=V+X[U];try{if(FM.sync(x,{pathExt:Y}))if(Q.all)G.push(x);else return x}catch(M){}}}if(Q.all&&G.length)return G;if(Q.nothrow)return null;throw CM($)};TM.exports=PM;PM.sync=ZT});var kM=g((c$0,FW)=>{var EM=($={})=>{let Q=$.env||process.env;if(($.platform||process.platform)!=="win32")return"PATH";return Object.keys(Q).reverse().find((X)=>X.toUpperCase()==="PATH")||"Path"};FW.exports=EM;FW.exports.default=EM});var fM=g((S$0,bM)=>{var cM=j0("path"),wT=AM(),jT=kM();function SM($,Q){let J=$.options.env||process.env,X=process.cwd(),Y=$.options.cwd!=null,G=Y&&process.chdir!==void 0&&!process.chdir.disabled;if(G)try{process.chdir($.options.cwd)}catch(q){}let W;try{W=wT.sync($.command,{path:J[jT({env:J})],pathExt:Q?cM.delimiter:void 0})}catch(q){}finally{if(G)process.chdir(X)}if(W)W=cM.resolve(Y?$.options.cwd:"",W);return W}function LT($){return SM($)||SM($,!0)}bM.exports=LT});var mM=g((_T,IW)=>{var CW=/([()\][%!^"`<>&|;, *?])/g;function RT($){return $=$.replace(CW,"^$1"),$}function DT($,Q){if($=`${$}`,$=$.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),$=$.replace(/(?=(\\+?)?)\1$/,"$1$1"),$=`"${$}"`,$=$.replace(CW,"^$1"),Q)$=$.replace(CW,"^$1");return $}_T.command=RT;_T.argument=DT});var hM=g((b$0,yM)=>{yM.exports=/^#!(.*)/});var uM=g((f$0,pM)=>{var OT=hM();pM.exports=($="")=>{let Q=$.match(OT);if(!Q)return null;let[J,X]=Q[0].replace(/#! ?/,"").split(" "),Y=J.split("/").pop();if(Y==="env")return X;return X?`${Y} ${X}`:Y}});var lM=g((m$0,gM)=>{var PW=j0("fs"),FT=uM();function CT($){let J=Buffer.alloc(150),X;try{X=PW.openSync($,"r"),PW.readSync(X,J,0,150,0),PW.closeSync(X)}catch(Y){}return FT(J.toString())}gM.exports=CT});var aM=g((y$0,dM)=>{var IT=j0("path"),iM=fM(),nM=mM(),PT=lM(),TT=process.platform==="win32",AT=/\.(?:com|exe)$/i,ET=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function kT($){$.file=iM($);let Q=$.file&&PT($.file);if(Q)return $.args.unshift($.file),$.command=Q,iM($);return $.file}function cT($){if(!TT)return $;let Q=kT($),J=!AT.test(Q);if($.options.forceShell||J){let X=ET.test(Q);$.command=IT.normalize($.command),$.command=nM.command($.command),$.args=$.args.map((G)=>nM.argument(G,X));let Y=[$.command].concat($.args).join(" ");$.args=["/d","/s","/c",`"${Y}"`],$.command=process.env.comspec||"cmd.exe",$.options.windowsVerbatimArguments=!0}return $}function ST($,Q,J){if(Q&&!Array.isArray(Q))J=Q,Q=null;Q=Q?Q.slice(0):[],J=Object.assign({},J);let X={command:$,args:Q,options:J,file:void 0,original:{command:$,args:Q}};return J.shell?X:cT(X)}dM.exports=ST});var rM=g((h$0,sM)=>{var TW=process.platform==="win32";function AW($,Q){return Object.assign(Error(`${Q} ${$.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${Q} ${$.command}`,path:$.command,spawnargs:$.args})}function bT($,Q){if(!TW)return;let J=$.emit;$.emit=function(X,Y){if(X==="exit"){let G=oM(Y,Q);if(G)return J.call($,"error",G)}return J.apply($,arguments)}}function oM($,Q){if(TW&&$===1&&!Q.file)return AW(Q.original,"spawn");return null}function fT($,Q){if(TW&&$===1&&!Q.file)return AW(Q.original,"spawnSync");return null}sM.exports={hookChildProcess:bT,verifyENOENT:oM,verifyENOENTSync:fT,notFoundError:AW}});var $H=g((p$0,mJ)=>{var tM=j0("child_process"),EW=aM(),kW=rM();function eM($,Q,J){let X=EW($,Q,J),Y=tM.spawn(X.command,X.args,X.options);return kW.hookChildProcess(Y,X),Y}function mT($,Q,J){let X=EW($,Q,J),Y=tM.spawnSync(X.command,X.args,X.options);return Y.error=Y.error||kW.verifyENOENTSync(Y.status,X),Y}mJ.exports=eM;mJ.exports.spawn=eM;mJ.exports.sync=mT;mJ.exports._parse=EW;mJ.exports._enoent=kW});function x9($={}){let{env:Q=process.env,platform:J=process.platform}=$;if(J!=="win32")return"PATH";return Object.keys(Q).reverse().find((X)=>X.toUpperCase()==="PATH")||"Path"}import{promisify as yT}from"node:util";import{execFile as hT,execFileSync as i$0}from"node:child_process";import QH from"node:path";import{fileURLToPath as pT}from"node:url";function M9($){return $ instanceof URL?pT($):$}function JH($){return{*[Symbol.iterator](){let Q=QH.resolve(M9($)),J;while(J!==Q)yield Q,J=Q,Q=QH.resolve(Q,"..")}}}var a$0;var XH=R(()=>{a$0=yT(hT)});import H9 from"node:process";import cQ from"node:path";var uT=({cwd:$=H9.cwd(),path:Q=H9.env[x9()],preferLocal:J=!0,execPath:X=H9.execPath,addExecPath:Y=!0}={})=>{let G=cQ.resolve(M9($)),W=[],q=Q.split(cQ.delimiter);if(J)gT(W,q,G);if(Y)lT(W,q,X,G);return Q===""||Q===cQ.delimiter?`${W.join(cQ.delimiter)}${Q}`:[...W,Q].join(cQ.delimiter)},gT=($,Q,J)=>{for(let X of JH(J)){let Y=cQ.join(X,"node_modules/.bin");if(!Q.includes(Y))$.push(Y)}},lT=($,Q,J,X)=>{let Y=cQ.resolve(X,M9(J),"..");if(!Q.includes(Y))$.push(Y)},YH=({env:$=H9.env,...Q}={})=>{$={...$};let J=x9({env:$});return Q.path=$[J],$[J]=uT(Q),$};var GH=R(()=>{XH()});var WH=($,Q,J)=>{let X=J?Z9:B9,Y=$ instanceof K8?{}:{cause:$};return new X(Q,Y)},K8,qH=($,Q)=>{Object.defineProperty($.prototype,"name",{value:Q,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,VH,{value:!0,writable:!1,enumerable:!1,configurable:!1})},zH=($)=>w9($)&&(VH in $),VH,w9=($)=>Object.prototype.toString.call($)==="[object Error]",B9,Z9;var SQ=R(()=>{K8=class K8 extends Error{};VH=Symbol("isExecaError");B9=class B9 extends Error{};qH(B9,B9.name);Z9=class Z9 extends Error{};qH(Z9,Z9.name)});var KH=()=>{let $=cW-UH+1;return Array.from({length:$},iT)},iT=($,Q)=>({name:`SIGRT${Q+1}`,number:UH+Q,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),UH=34,cW=64;var xH;var MH=R(()=>{xH=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]});import{constants as nT}from"node:os";var SW=()=>{let $=KH();return[...xH,...$].map(dT)},dT=({name:$,number:Q,description:J,action:X,forced:Y=!1,standard:G})=>{let{signals:{[$]:W}}=nT,q=W!==void 0;return{name:$,number:q?W:Q,description:J,supported:q,action:X,forced:Y,standard:G}};var HH=R(()=>{MH()});import{constants as aT}from"node:os";var oT=()=>{let $=SW();return Object.fromEntries($.map(sT))},sT=({name:$,number:Q,description:J,supported:X,action:Y,forced:G,standard:W})=>[$,{name:$,number:Q,description:J,supported:X,action:Y,forced:G,standard:W}],BH,rT=()=>{let $=SW(),Q=cW+1,J=Array.from({length:Q},(X,Y)=>tT(Y,$));return Object.assign({},...J)},tT=($,Q)=>{let J=eT($,Q);if(J===void 0)return{};let{name:X,description:Y,supported:G,action:W,forced:q,standard:z}=J;return{[$]:{name:X,number:$,description:Y,supported:G,action:W,forced:q,standard:z}}},eT=($,Q)=>{let J=Q.find(({name:X})=>aT.signals[X]===$);if(J!==void 0)return J;return Q.find((X)=>X.number===$)},x80;var ZH=R(()=>{HH();BH=oT(),x80=rT()});import{constants as HY}from"node:os";var jH=($)=>{if($===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return RH($,"option `killSignal`")},LH=($)=>$===0?$:RH($,"`subprocess.kill()`'s argument"),RH=($,Q)=>{if(Number.isInteger($))return $A($,Q);if(typeof $==="string")return JA($,Q);throw TypeError(`Invalid ${Q} ${String($)}: it must be a string or an integer.
|
|
47
|
+
${bW()}`)},$A=($,Q)=>{if(wH.has($))return wH.get($);throw TypeError(`Invalid ${Q} ${$}: this signal integer does not exist.
|
|
48
|
+
${bW()}`)},QA=()=>new Map(Object.entries(HY.signals).reverse().map(([$,Q])=>[Q,$])),wH,JA=($,Q)=>{if($ in HY.signals)return $;if($.toUpperCase()in HY.signals)throw TypeError(`Invalid ${Q} '${$}': please rename it to '${$.toUpperCase()}'.`);throw TypeError(`Invalid ${Q} '${$}': this signal name does not exist.
|
|
49
|
+
${bW()}`)},bW=()=>`Available signal names: ${XA()}.
|
|
50
|
+
Available signal numbers: ${YA()}.`,XA=()=>Object.keys(HY.signals).sort().map(($)=>`'${$}'`).join(", "),YA=()=>[...new Set(Object.values(HY.signals).sort(($,Q)=>$-Q))].join(", "),j9=($)=>BH[$].description;var BY=R(()=>{ZH();wH=QA()});import{setTimeout as GA}from"node:timers/promises";var DH=($)=>{if($===!1)return $;if($===!0)return WA;if(!Number.isFinite($)||$<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${$}\` (${typeof $})`);return $},WA=5000,_H=({kill:$,options:{forceKillAfterDelay:Q,killSignal:J},onInternalError:X,context:Y,controller:G},W,q)=>{let{signal:z,error:K}=qA(W,q,J);zA(K,X);let V=$(z);return VA({kill:$,signal:z,forceKillAfterDelay:Q,killSignal:J,killResult:V,context:Y,controller:G}),V},qA=($,Q,J)=>{let[X=J,Y]=w9($)?[void 0,$]:[$,Q];if(typeof X!=="string"&&!Number.isInteger(X))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(X)}`);if(Y!==void 0&&!w9(Y))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${Y}`);return{signal:LH(X),error:Y}},zA=($,Q)=>{if($!==void 0)Q.reject($)},VA=async({kill:$,signal:Q,forceKillAfterDelay:J,killSignal:X,killResult:Y,context:G,controller:W})=>{if(Q===X&&Y)fW({kill:$,forceKillAfterDelay:J,context:G,controllerSignal:W.signal})},fW=async({kill:$,forceKillAfterDelay:Q,context:J,controllerSignal:X})=>{if(Q===!1)return;try{if(await GA(Q,void 0,{signal:X}),$("SIGKILL"))J.isForcefullyTerminated??=!0}catch{}};var L9=R(()=>{SQ();BY()});import{once as KA}from"node:events";var R9=async($,Q)=>{if(!$.aborted)await KA($,"abort",{signal:Q})};var mW=()=>{};var NH=({cancelSignal:$})=>{if($!==void 0&&Object.prototype.toString.call($)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String($)}`)},vH=({subprocess:$,cancelSignal:Q,gracefulCancel:J,context:X,controller:Y})=>Q===void 0||J?[]:[UA($,Q,X,Y)],UA=async($,Q,J,{signal:X})=>{throw await R9(Q,X),J.terminationReason??="cancel",$.kill(),Q.reason};var yW=R(()=>{mW()});var yJ=({methodName:$,isSubprocess:Q,ipc:J,isConnected:X})=>{xA($,Q,J),hW($,Q,X)},xA=($,Q,J)=>{if(!J)throw Error(`${s$($,Q)} can only be used if the \`ipc\` option is \`true\`.`)},hW=($,Q,J)=>{if(!J)throw Error(`${s$($,Q)} cannot be used: the ${t8(Q)} has already exited or disconnected.`)},OH=($)=>{throw Error(`${s$("getOneMessage",$)} could not complete: the ${t8($)} exited or disconnected.`)},FH=($)=>{throw Error(`${s$("sendMessage",$)} failed: the ${t8($)} is sending a message too, instead of listening to incoming messages.
|
|
51
|
+
This can be fixed by both sending a message and listening to incoming messages at the same time:
|
|
52
|
+
|
|
53
|
+
const [receivedMessage] = await Promise.all([
|
|
54
|
+
${s$("getOneMessage",$)},
|
|
55
|
+
${s$("sendMessage",$,"message, {strict: true}")},
|
|
56
|
+
]);`)},D9=($,Q)=>Error(`${s$("sendMessage",Q)} failed when sending an acknowledgment response to the ${t8(Q)}.`,{cause:$}),CH=($)=>{throw Error(`${s$("sendMessage",$)} failed: the ${t8($)} is not listening to incoming messages.`)},IH=($)=>{throw Error(`${s$("sendMessage",$)} failed: the ${t8($)} exited without listening to incoming messages.`)},PH=()=>Error(`\`cancelSignal\` aborted: the ${t8(!0)} disconnected.`),TH=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},AH=({error:$,methodName:Q,isSubprocess:J})=>{if($.code==="EPIPE")throw Error(`${s$(Q,J)} cannot be used: the ${t8(J)} is disconnecting.`,{cause:$})},EH=({error:$,methodName:Q,isSubprocess:J,message:X})=>{if(MA($))throw Error(`${s$(Q,J)}'s argument type is invalid: the message cannot be serialized: ${String(X)}.`,{cause:$})},MA=({code:$,message:Q})=>HA.has($)||BA.some((J)=>Q.includes(J)),HA,BA,s$=($,Q,J="")=>$==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${ZA(Q)}${$}(${J})`,ZA=($)=>$?"":"subprocess.",t8=($)=>$?"parent process":"subprocess",hJ=($)=>{if($.connected)$.disconnect()};var pJ=R(()=>{HA=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),BA=["could not be cloned","circular structure","call stack size exceeded"]});var U8=()=>{let $={},Q=new Promise((J,X)=>{Object.assign($,{resolve:J,reject:X})});return Object.assign(Q,$)};var N9=($,Q="stdin")=>{let{options:X,fileDescriptors:Y}=x8.get($),G=kH(Y,Q,!0),W=$.stdio[G];if(W===null)throw TypeError(cH(G,Q,X,!0));return W},uJ=($,Q="stdout")=>{let{options:X,fileDescriptors:Y}=x8.get($),G=kH(Y,Q,!1),W=G==="all"?$.all:$.stdio[G];if(W===null||W===void 0)throw TypeError(cH(G,Q,X,!1));return W},x8,kH=($,Q,J)=>{let X=wA(Q,J);return jA(X,Q,J,$),X},wA=($,Q)=>{let J=LW($);if(J!==void 0)return J;let{validOptions:X,defaultValue:Y}=Q?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${ZY(Q)}" must not be "${$}".
|
|
57
|
+
It must be ${X} or "fd3", "fd4" (and so on).
|
|
58
|
+
It is optional and defaults to "${Y}".`)},jA=($,Q,J,X)=>{let Y=X[SH($)];if(Y===void 0)throw TypeError(`"${ZY(J)}" must not be ${Q}. That file descriptor does not exist.
|
|
59
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);if(Y.direction==="input"&&!J)throw TypeError(`"${ZY(J)}" must not be ${Q}. It must be a readable stream, not writable.`);if(Y.direction!=="input"&&J)throw TypeError(`"${ZY(J)}" must not be ${Q}. It must be a writable stream, not readable.`)},cH=($,Q,J,X)=>{if($==="all"&&!J.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:Y,optionValue:G}=LA($,J);return`The "${Y}: ${_9(G)}" option is incompatible with using "${ZY(X)}: ${_9(Q)}".
|
|
60
|
+
Please set this option with "pipe" instead.`},LA=($,{stdin:Q,stdout:J,stderr:X,stdio:Y})=>{let G=SH($);if(G===0&&Q!==void 0)return{optionName:"stdin",optionValue:Q};if(G===1&&J!==void 0)return{optionName:"stdout",optionValue:J};if(G===2&&X!==void 0)return{optionName:"stderr",optionValue:X};return{optionName:`stdio[${G}]`,optionValue:Y[G]}},SH=($)=>$==="all"?1:$,ZY=($)=>$?"to":"from",_9=($)=>{if(typeof $==="string")return`'${$}'`;return typeof $==="number"?`${$}`:"Stream"};var e8=R(()=>{C8();x8=new WeakMap});import{addAbortListener as RA}from"node:events";var bQ=($,Q,J)=>{let X=$.getMaxListeners();if(X===0||X===Number.POSITIVE_INFINITY)return;$.setMaxListeners(X+Q),RA(J,()=>{$.setMaxListeners($.getMaxListeners()-Q)})};var v9=()=>{};var O9=($,Q)=>{if(Q)pW($)},pW=($)=>{$.refCounted()},F9=($,Q)=>{if(Q)uW($)},uW=($)=>{$.unrefCounted()},bH=($,Q)=>{if(Q)uW($),uW($)},fH=($,Q)=>{if(Q)pW($),pW($)};import{once as DA}from"node:events";import{scheduler as _A}from"node:timers/promises";var mH=async({anyProcess:$,channel:Q,isSubprocess:J,ipcEmitter:X},Y)=>{if(uH(Y)||lH(Y))return;if(!C9.has($))C9.set($,[]);let G=C9.get($);if(G.push(Y),G.length>1)return;while(G.length>0){await gH($,X,Y),await _A.yield();let W=await pH({wrappedMessage:G[0],anyProcess:$,channel:Q,isSubprocess:J,ipcEmitter:X});G.shift(),X.emit("message",W),X.emit("message:done")}},yH=async({anyProcess:$,channel:Q,isSubprocess:J,ipcEmitter:X,boundOnMessage:Y})=>{gW();let G=C9.get($);while(G?.length>0)await DA(X,"message:done");$.removeListener("message",Y),fH(Q,J),X.connected=!1,X.emit("disconnect")},C9;var hH=R(()=>{P9();I9();T9();C9=new WeakMap});import{EventEmitter as NA}from"node:events";var $Q=($,Q,J)=>{if(A9.has($))return A9.get($);let X=new NA;return X.connected=!0,A9.set($,X),vA({ipcEmitter:X,anyProcess:$,channel:Q,isSubprocess:J}),X},A9,vA=({ipcEmitter:$,anyProcess:Q,channel:J,isSubprocess:X})=>{let Y=mH.bind(void 0,{anyProcess:Q,channel:J,isSubprocess:X,ipcEmitter:$});Q.on("message",Y),Q.once("disconnect",yH.bind(void 0,{anyProcess:Q,channel:J,isSubprocess:X,ipcEmitter:$,boundOnMessage:Y})),bH(J,X)},E9=($)=>{let Q=A9.get($);return Q===void 0?$.channel!==null:Q.connected};var wY=R(()=>{hH();A9=new WeakMap});import{once as OA}from"node:events";var iH=({anyProcess:$,channel:Q,isSubprocess:J,message:X,strict:Y})=>{if(!Y)return X;let G=$Q($,Q,J),W=S9($,G);return{id:FA++,type:c9,message:X,hasListeners:W}},FA=0n,nH=($,Q)=>{if(Q?.type!==c9||Q.hasListeners)return;for(let{id:J}of $)if(J!==void 0)k9[J].resolve({isDeadlock:!0,hasListeners:!1})},pH=async({wrappedMessage:$,anyProcess:Q,channel:J,isSubprocess:X,ipcEmitter:Y})=>{if($?.type!==c9||!Q.connected)return $;let{id:G,message:W}=$,q={id:G,type:aH,message:S9(Q,Y)};try{await b9({anyProcess:Q,channel:J,isSubprocess:X,ipc:!0},q)}catch(z){Y.emit("strict:error",z)}return W},uH=($)=>{if($?.type!==aH)return!1;let{id:Q,message:J}=$;return k9[Q]?.resolve({isDeadlock:!1,hasListeners:J}),!0},dH=async($,Q,J)=>{if($?.type!==c9)return;let X=U8();k9[$.id]=X;let Y=new AbortController;try{let{isDeadlock:G,hasListeners:W}=await Promise.race([X,CA(Q,J,Y)]);if(G)FH(J);if(!W)CH(J)}finally{Y.abort(),delete k9[$.id]}},k9,CA=async($,Q,{signal:J})=>{bQ($,1,J),await OA($,"disconnect",{signal:J}),IH(Q)},c9="execa:ipc:request",aH="execa:ipc:response";var I9=R(()=>{v9();f9();pJ();wY();P9();k9={}});var oH=($,Q,J)=>{if(!jY.has($))jY.set($,new Set);let X=jY.get($),Y=U8(),G=J?Q.id:void 0,W={onMessageSent:Y,id:G};return X.add(W),{outgoingMessages:X,outgoingMessage:W}},sH=({outgoingMessages:$,outgoingMessage:Q})=>{$.delete(Q),Q.onMessageSent.resolve()},gH=async($,Q,J)=>{while(!S9($,Q)&&jY.get($)?.size>0){let X=[...jY.get($)];nH(X,J),await Promise.all(X.map(({onMessageSent:Y})=>Y))}},jY,S9=($,Q)=>Q.listenerCount("message")>IA($),IA=($)=>x8.has($)&&!F8(x8.get($).options.buffer,"ipc")?1:0;var P9=R(()=>{C8();e8();I9();jY=new WeakMap});import{promisify as PA}from"node:util";var b9=({anyProcess:$,channel:Q,isSubprocess:J,ipc:X},Y,{strict:G=!1}={})=>{return yJ({methodName:"sendMessage",isSubprocess:J,ipc:X,isConnected:$.connected}),TA({anyProcess:$,channel:Q,methodName:"sendMessage",isSubprocess:J,message:Y,strict:G})},TA=async({anyProcess:$,channel:Q,methodName:J,isSubprocess:X,message:Y,strict:G})=>{let W=iH({anyProcess:$,channel:Q,isSubprocess:X,message:Y,strict:G}),q=oH($,W,G);try{await iW({anyProcess:$,methodName:J,isSubprocess:X,wrappedMessage:W,message:Y})}catch(z){throw hJ($),z}finally{sH(q)}},iW=async({anyProcess:$,methodName:Q,isSubprocess:J,wrappedMessage:X,message:Y})=>{let G=AA($);try{await Promise.all([dH(X,$,J),G(X)])}catch(W){throw AH({error:W,methodName:Q,isSubprocess:J}),EH({error:W,methodName:Q,isSubprocess:J,message:Y}),W}},AA=($)=>{if(lW.has($))return lW.get($);let Q=PA($.send.bind($));return lW.set($,Q),Q},lW;var f9=R(()=>{pJ();P9();I9();lW=new WeakMap});import{scheduler as EA}from"node:timers/promises";var tH=($,Q)=>{return hW("cancelSignal",!1,$.connected),iW({anyProcess:$,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:$B,message:Q},message:Q})},eH=async({anyProcess:$,channel:Q,isSubprocess:J,ipc:X})=>{return await kA({anyProcess:$,channel:Q,isSubprocess:J,ipc:X}),nW.signal},kA=async({anyProcess:$,channel:Q,isSubprocess:J,ipc:X})=>{if(rH)return;if(rH=!0,!X){TH();return}if(Q===null){gW();return}$Q($,Q,J),await EA.yield()},rH=!1,lH=($)=>{if($?.type!==$B)return!1;return nW.abort($.message),!0},$B="execa:ipc:cancel",gW=()=>{nW.abort(PH())},nW;var T9=R(()=>{f9();wY();pJ();nW=new AbortController});var QB=({gracefulCancel:$,cancelSignal:Q,ipc:J,serialization:X})=>{if(!$)return;if(Q===void 0)throw Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!J)throw Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(X==="json")throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")},JB=({subprocess:$,cancelSignal:Q,gracefulCancel:J,forceKillAfterDelay:X,context:Y,controller:G})=>J?[cA({subprocess:$,cancelSignal:Q,forceKillAfterDelay:X,context:Y,controller:G})]:[],cA=async({subprocess:$,cancelSignal:Q,forceKillAfterDelay:J,context:X,controller:{signal:Y}})=>{await R9(Q,Y);let G=SA(Q);throw await tH($,G),fW({kill:$.kill,forceKillAfterDelay:J,context:X,controllerSignal:Y}),X.terminationReason??="gracefulCancel",Q.reason},SA=({reason:$})=>{if(!($ instanceof DOMException))return $;let Q=Error($.message);return Object.defineProperty(Q,"stack",{value:$.stack,enumerable:!1,configurable:!0,writable:!0}),Q};var dW=R(()=>{mW();T9();L9()});import{setTimeout as bA}from"node:timers/promises";var XB=({timeout:$})=>{if($!==void 0&&(!Number.isFinite($)||$<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${$}\` (${typeof $})`)},YB=($,Q,J,X)=>Q===0||Q===void 0?[]:[fA($,Q,J,X)],fA=async($,Q,J,{signal:X})=>{throw await bA(Q,void 0,{signal:X}),J.terminationReason??="timeout",$.kill(),new K8};var aW=R(()=>{SQ()});import{execPath as mA,execArgv as yA}from"node:process";import GB from"node:path";var WB=({options:$})=>{if($.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...$,node:!0}}},qB=($,Q,{node:J=!1,nodePath:X=mA,nodeOptions:Y=yA.filter((z)=>!z.startsWith("--inspect")),cwd:G,execPath:W,...q})=>{if(W!==void 0)throw TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let z=EJ(X,'The "nodePath" option'),K=GB.resolve(G,z),V={...q,nodePath:K,node:J,cwd:G};if(!J)return[$,Q,V];if(GB.basename($,".exe")==="node")throw TypeError('When the "node" option is true, the first argument does not need to be "node".');return[K,[...Y,$,...Q],{ipc:!0,...V,shell:!1}]};var oW=R(()=>{kJ()});import{serialize as hA}from"node:v8";var zB=({ipcInput:$,ipc:Q,serialization:J})=>{if($===void 0)return;if(!Q)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");gA[J]($)},pA=($)=>{try{hA($)}catch(Q){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:Q})}},uA=($)=>{try{JSON.stringify($)}catch(Q){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:Q})}},gA,VB=async($,Q)=>{if(Q===void 0)return;await $.sendMessage(Q)};var sW=R(()=>{gA={advanced:pA,json:uA}});var UB=({encoding:$})=>{if(rW.has($))return;let Q=iA($);if(Q!==void 0)throw TypeError(`Invalid option \`encoding: ${m9($)}\`.
|
|
61
|
+
Please rename it to ${m9(Q)}.`);let J=[...rW].map((X)=>m9(X)).join(", ");throw TypeError(`Invalid option \`encoding: ${m9($)}\`.
|
|
62
|
+
Please rename it to one of: ${J}.`)},lA,F$,rW,iA=($)=>{if($===null)return"buffer";if(typeof $!=="string")return;let Q=$.toLowerCase();if(Q in KB)return KB[Q];if(rW.has(Q))return Q},KB,m9=($)=>typeof $==="string"?`"${$}"`:String($);var fQ=R(()=>{lA=new Set(["utf8","utf16le"]),F$=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),rW=new Set([...lA,...F$]),KB={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"}});import{statSync as nA}from"node:fs";import dA from"node:path";import aA from"node:process";var xB=($=MB())=>{let Q=EJ($,'The "cwd" option');return dA.resolve(Q)},MB=()=>{try{return aA.cwd()}catch($){throw $.message=`The current directory does not exist.
|
|
63
|
+
${$.message}`,$}},HB=($,Q)=>{if(Q===MB())return $;let J;try{J=nA(Q)}catch(X){return`The "cwd" option is invalid: ${Q}.
|
|
64
|
+
${X.message}
|
|
65
|
+
${$}`}if(!J.isDirectory())return`The "cwd" option is not a directory: ${Q}.
|
|
66
|
+
${$}`;return $};var tW=R(()=>{kJ()});import oA from"node:path";import BB from"node:process";var ZB,y9=($,Q,J)=>{J.cwd=xB(J.cwd);let[X,Y,G]=qB($,Q,J),{command:W,args:q,options:z}=ZB.default._parse(X,Y,G),K=ux(z),V=sA(K);if(XB(V),UB(V),zB(V),NH(V),QB(V),V.shell=HW(V.shell),V.env=rA(V),V.killSignal=jH(V.killSignal),V.forceKillAfterDelay=DH(V.forceKillAfterDelay),V.lines=V.lines.map((U,x)=>U&&!F$.has(V.encoding)&&V.buffer[x]),BB.platform==="win32"&&oA.basename(W,".exe")==="cmd")q.unshift("/q");return{file:W,commandArguments:q,options:V}},sA=({extendEnv:$=!0,preferLocal:Q=!1,cwd:J,localDir:X=J,encoding:Y="utf8",reject:G=!0,cleanup:W=!0,all:q=!1,windowsHide:z=!0,killSignal:K="SIGTERM",forceKillAfterDelay:V=!0,gracefulCancel:U=!1,ipcInput:x,ipc:M=x!==void 0||U,serialization:H="advanced",...w})=>({...w,extendEnv:$,preferLocal:Q,cwd:J,localDirectory:X,encoding:Y,reject:G,cleanup:W,all:q,windowsHide:z,killSignal:K,forceKillAfterDelay:V,gracefulCancel:U,ipcInput:x,ipc:M,serialization:H}),rA=({env:$,extendEnv:Q,preferLocal:J,node:X,localDirectory:Y,nodePath:G})=>{let W=Q?{...BB.env,...$}:$;if(J||X)return YH({env:W,cwd:Y,execPath:G,preferLocal:J,addExecPath:X});return W};var eW=R(()=>{GH();L9();BY();yW();dW();aW();oW();sW();fQ();tW();kJ();C8();ZB=W7($H(),1)});var h9=($,Q,J)=>J.shell&&Q.length>0?[[$,...Q].join(" "),[],J]:[$,Q,J];function gJ($){if(typeof $==="string")return tA($);if(!(ArrayBuffer.isView($)&&$.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return eA($)}var tA=($)=>$.at(-1)===wB?$.slice(0,$.at(-2)===jB?-2:-1):$,eA=($)=>$.at(-1)===$E?$.subarray(0,$.at(-2)===QE?-2:-1):$,wB=`
|
|
67
|
+
`,$E,jB="\r",QE;var $q=R(()=>{$E=wB.codePointAt(0),QE=jB.codePointAt(0)});function r$($,{checkOpen:Q=!0}={}){return $!==null&&typeof $==="object"&&($.writable||$.readable||!Q||$.writable===void 0&&$.readable===void 0)&&typeof $.pipe==="function"}function Qq($,{checkOpen:Q=!0}={}){return r$($,{checkOpen:Q})&&($.writable||!Q)&&typeof $.write==="function"&&typeof $.end==="function"&&typeof $.writable==="boolean"&&typeof $.writableObjectMode==="boolean"&&typeof $.destroy==="function"&&typeof $.destroyed==="boolean"}function mQ($,{checkOpen:Q=!0}={}){return r$($,{checkOpen:Q})&&($.readable||!Q)&&typeof $.read==="function"&&typeof $.readable==="boolean"&&typeof $.readableObjectMode==="boolean"&&typeof $.destroy==="function"&&typeof $.destroyed==="boolean"}function Jq($,Q){return Qq($,Q)&&mQ($,Q)}class LB{#Q;#J;#$=!1;#X=void 0;constructor($,Q){this.#Q=$,this.#J=Q}next(){let $=()=>this.#G();return this.#X=this.#X?this.#X.then($,$):$(),this.#X}return($){let Q=()=>this.#Y($);return this.#X?this.#X.then(Q,Q):Q()}async#G(){if(this.#$)return{done:!0,value:void 0};let $;try{$=await this.#Q.read()}catch(Q){throw this.#X=void 0,this.#$=!0,this.#Q.releaseLock(),Q}return $.done&&(this.#X=void 0,this.#$=!0,this.#Q.releaseLock()),$}async#Y($){if(this.#$)return{done:!0,value:$};if(this.#$=!0,!this.#J){let Q=this.#Q.cancel($);return this.#Q.releaseLock(),await Q,{done:!0,value:$}}return this.#Q.releaseLock(),{done:!0,value:$}}}function RB(){return this[Xq].next()}function DB($){return this[Xq].return($)}function Yq({preventCancel:$=!1}={}){let Q=this.getReader(),J=new LB(Q,$),X=Object.create(XE);return X[Xq]=J,X}var JE,Xq,XE;var _B=R(()=>{JE=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);Xq=Symbol();Object.defineProperty(RB,"name",{value:"next"});Object.defineProperty(DB,"name",{value:"return"});XE=Object.create(JE,{next:{enumerable:!0,configurable:!0,writable:!0,value:RB},return:{enumerable:!0,configurable:!0,writable:!0,value:DB}})});var NB=()=>{};var vB=R(()=>{_B();NB()});var OB=($)=>{if(mQ($,{checkOpen:!1})&&LY.on!==void 0)return GE($);if(typeof $?.[Symbol.asyncIterator]==="function")return $;if(YE.call($)==="[object ReadableStream]")return Yq.call($);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},YE,GE=async function*($){let Q=new AbortController,J={};WE($,Q,J);try{for await(let[X]of LY.on($,"data",{signal:Q.signal}))yield X}catch(X){if(J.error!==void 0)throw J.error;else if(!Q.signal.aborted)throw X}finally{$.destroy()}},WE=async($,Q,J)=>{try{await LY.finished($,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(X){J.error=X}finally{Q.abort()}},LY;var Gq=R(()=>{vB();({toString:YE}=Object.prototype),LY={}});var lJ=async($,{init:Q,convertChunk:J,getSize:X,truncateChunk:Y,addChunk:G,getFinalChunk:W,finalize:q},{maxBuffer:z=Number.POSITIVE_INFINITY}={})=>{let K=OB($),V=Q();V.length=0;try{for await(let U of K){let x=zE(U),M=J[x](U,V);IB({convertedChunk:M,state:V,getSize:X,truncateChunk:Y,addChunk:G,maxBuffer:z})}return qE({state:V,convertChunk:J,getSize:X,truncateChunk:Y,addChunk:G,getFinalChunk:W,maxBuffer:z}),q(V)}catch(U){let x=typeof U==="object"&&U!==null?U:Error(U);throw x.bufferedData=q(V),x}},qE=({state:$,getSize:Q,truncateChunk:J,addChunk:X,getFinalChunk:Y,maxBuffer:G})=>{let W=Y($);if(W!==void 0)IB({convertedChunk:W,state:$,getSize:Q,truncateChunk:J,addChunk:X,maxBuffer:G})},IB=({convertedChunk:$,state:Q,getSize:J,truncateChunk:X,addChunk:Y,maxBuffer:G})=>{let W=J($),q=Q.length+W;if(q<=G){FB($,Q,Y,q);return}let z=X($,G-Q.length);if(z!==void 0)FB(z,Q,Y,G);throw new I8},FB=($,Q,J,X)=>{Q.contents=J($,Q,X),Q.length=X},zE=($)=>{let Q=typeof $;if(Q==="string")return"string";if(Q!=="object"||$===null)return"others";if(globalThis.Buffer?.isBuffer($))return"buffer";let J=CB.call($);if(J==="[object ArrayBuffer]")return"arrayBuffer";if(J==="[object DataView]")return"dataView";if(Number.isInteger($.byteLength)&&Number.isInteger($.byteOffset)&&CB.call($.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},CB,I8;var RY=R(()=>{Gq();({toString:CB}=Object.prototype);I8=class I8 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var P8=($)=>$,DY=()=>{return},p9=({contents:$})=>$,u9=($)=>{throw Error(`Streams in object mode are not supported: ${String($)}`)},g9=($)=>$.length;async function l9($,Q){return lJ($,xE,Q)}var VE=()=>({contents:[]}),KE=()=>1,UE=($,{contents:Q})=>{return Q.push($),Q},xE;var PB=R(()=>{RY();xE={init:VE,convertChunk:{string:P8,buffer:P8,arrayBuffer:P8,dataView:P8,typedArray:P8,others:P8},getSize:KE,truncateChunk:DY,addChunk:UE,getFinalChunk:DY,finalize:p9}});async function i9($,Q){return lJ($,DE,Q)}var ME=()=>({contents:new ArrayBuffer(0)}),HE=($)=>BE.encode($),BE,TB=($)=>new Uint8Array($),AB=($)=>new Uint8Array($.buffer,$.byteOffset,$.byteLength),ZE=($,Q)=>$.slice(0,Q),wE=($,{contents:Q,length:J},X)=>{let Y=cB()?LE(Q,X):jE(Q,X);return new Uint8Array(Y).set($,J),Y},jE=($,Q)=>{if(Q<=$.byteLength)return $;let J=new ArrayBuffer(kB(Q));return new Uint8Array(J).set(new Uint8Array($),0),J},LE=($,Q)=>{if(Q<=$.maxByteLength)return $.resize(Q),$;let J=new ArrayBuffer(Q,{maxByteLength:kB(Q)});return new Uint8Array(J).set(new Uint8Array($),0),J},kB=($)=>EB**Math.ceil(Math.log($)/Math.log(EB)),EB=2,RE=({contents:$,length:Q})=>cB()?$:$.slice(0,Q),cB=()=>("resize"in ArrayBuffer.prototype),DE;var SB=R(()=>{RY();BE=new TextEncoder,DE={init:ME,convertChunk:{string:HE,buffer:TB,arrayBuffer:TB,dataView:AB,typedArray:AB,others:u9},getSize:g9,truncateChunk:ZE,addChunk:wE,getFinalChunk:DY,finalize:RE}});async function d9($,Q){return lJ($,FE,Q)}var _E=()=>({contents:"",textDecoder:new TextDecoder}),n9=($,{textDecoder:Q})=>Q.decode($,{stream:!0}),NE=($,{contents:Q})=>Q+$,vE=($,Q)=>$.slice(0,Q),OE=({textDecoder:$})=>{let Q=$.decode();return Q===""?void 0:Q},FE;var bB=R(()=>{RY();FE={init:_E,convertChunk:{string:P8,buffer:n9,arrayBuffer:n9,dataView:n9,typedArray:n9,others:u9},getSize:g9,truncateChunk:vE,addChunk:NE,getFinalChunk:OE,finalize:p9}});var fB=R(()=>{PB();SB();bB();RY()});import{on as CE}from"node:events";import{finished as IE}from"node:stream/promises";var a9=R(()=>{Gq();fB();Object.assign(LY,{on:CE,finished:IE})});var mB=({error:$,stream:Q,readableObjectMode:J,lines:X,encoding:Y,fdNumber:G})=>{if(!($ instanceof I8))throw $;if(G==="all")return $;let W=PE(J,X,Y);throw $.maxBufferInfo={fdNumber:G,unit:W},Q.destroy(),$},PE=($,Q,J)=>{if($)return"objects";if(Q)return"lines";if(J==="buffer")return"bytes";return"characters"},yB=($,Q,J)=>{if(Q.length!==J)return;let X=new I8;throw X.maxBufferInfo={fdNumber:"ipc"},X},hB=($,Q)=>{let{streamName:J,threshold:X,unit:Y}=TE($,Q);return`Command's ${J} was larger than ${X} ${Y}`},TE=($,Q)=>{if($?.maxBufferInfo===void 0)return{streamName:"output",threshold:Q[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:J,unit:X}}=$;delete $.maxBufferInfo;let Y=F8(Q,J);if(J==="ipc")return{streamName:"IPC output",threshold:Y,unit:"messages"};return{streamName:$9(J),threshold:Y,unit:X}},pB=($,Q,J)=>$?.code==="ENOBUFS"&&Q!==null&&Q.some((X)=>X!==null&&X.length>o9(J)),uB=($,Q,J)=>{if(!Q)return $;let X=o9(J);return $.length>X?$.slice(0,X):$},o9=([,$])=>$;var yQ=R(()=>{a9();O8();C8()});import{inspect as AE}from"node:util";var lB=({stdio:$,all:Q,ipcOutput:J,originalError:X,signal:Y,signalDescription:G,exitCode:W,escapedCommand:q,timedOut:z,isCanceled:K,isGracefullyCanceled:V,isMaxBuffer:U,isForcefullyTerminated:x,forceKillAfterDelay:M,killSignal:H,maxBuffer:w,timeout:j,cwd:Z})=>{let L=X?.code,D=EE({originalError:X,timedOut:z,timeout:j,isMaxBuffer:U,maxBuffer:w,errorCode:L,signal:Y,signalDescription:G,exitCode:W,isCanceled:K,isGracefullyCanceled:V,isForcefullyTerminated:x,forceKillAfterDelay:M,killSignal:H}),F=cE(X,Z),J0=F===void 0?"":`
|
|
68
|
+
${F}`,n=`${D}: ${q}${J0}`,e=Q===void 0?[$[2],$[1]]:[Q],y=[n,...e,...$.slice(3),J.map((p)=>SE(p)).join(`
|
|
69
|
+
`)].map((p)=>MY(gJ(bE(p)))).filter(Boolean).join(`
|
|
70
|
+
|
|
71
|
+
`);return{originalMessage:F,shortMessage:n,message:y}},EE=({originalError:$,timedOut:Q,timeout:J,isMaxBuffer:X,maxBuffer:Y,errorCode:G,signal:W,signalDescription:q,exitCode:z,isCanceled:K,isGracefullyCanceled:V,isForcefullyTerminated:U,forceKillAfterDelay:x,killSignal:M})=>{let H=kE(U,x);if(Q)return`Command timed out after ${J} milliseconds${H}`;if(V){if(W===void 0)return`Command was gracefully canceled with exit code ${z}`;return U?`Command was gracefully canceled${H}`:`Command was gracefully canceled with ${W} (${q})`}if(K)return`Command was canceled${H}`;if(X)return`${hB($,Y)}${H}`;if(G!==void 0)return`Command failed with ${G}${H}`;if(U)return`Command was killed with ${M} (${j9(M)})${H}`;if(W!==void 0)return`Command was killed with ${W} (${q})`;if(z!==void 0)return`Command failed with exit code ${z}`;return"Command failed"},kE=($,Q)=>$?` and was forcefully terminated after ${Q} milliseconds`:"",cE=($,Q)=>{if($ instanceof K8)return;let J=zH($)?$.originalMessage:String($?.message??$),X=MY(HB(J,Q));return X===""?void 0:X},SE=($)=>typeof $==="string"?$:AE($),bE=($)=>Array.isArray($)?$.map((Q)=>gJ(gB(Q))).filter(Boolean).join(`
|
|
72
|
+
`):gB($),gB=($)=>{if(typeof $==="string")return $;if(g0($))return t7($);return""};var iB=R(()=>{$q();O$();tW();X9();yQ();BY();SQ()});var s9=({command:$,escapedCommand:Q,stdio:J,all:X,ipcOutput:Y,options:{cwd:G},startTime:W})=>nB({command:$,escapedCommand:Q,cwd:G,durationMs:NW(W),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:J[1],stderr:J[2],all:X,stdio:J,ipcOutput:Y,pipedFrom:[]}),iJ=({error:$,command:Q,escapedCommand:J,fileDescriptors:X,options:Y,startTime:G,isSync:W})=>_Y({error:$,command:Q,escapedCommand:J,startTime:G,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:X.length}),ipcOutput:[],options:Y,isSync:W}),_Y=({error:$,command:Q,escapedCommand:J,startTime:X,timedOut:Y,isCanceled:G,isGracefullyCanceled:W,isMaxBuffer:q,isForcefullyTerminated:z,exitCode:K,signal:V,stdio:U,all:x,ipcOutput:M,options:{timeoutDuration:H,timeout:w=H,forceKillAfterDelay:j,killSignal:Z,cwd:L,maxBuffer:D},isSync:F})=>{let{exitCode:J0,signal:n,signalDescription:e}=mE(K,V),{originalMessage:y,shortMessage:p,message:W0}=lB({stdio:U,all:x,ipcOutput:M,originalError:$,signal:n,signalDescription:e,exitCode:J0,escapedCommand:J,timedOut:Y,isCanceled:G,isGracefullyCanceled:W,isMaxBuffer:q,isForcefullyTerminated:z,forceKillAfterDelay:j,killSignal:Z,maxBuffer:D,timeout:w,cwd:L}),t=WH($,W0,F);return Object.assign(t,fE({error:t,command:Q,escapedCommand:J,startTime:X,timedOut:Y,isCanceled:G,isGracefullyCanceled:W,isMaxBuffer:q,isForcefullyTerminated:z,exitCode:J0,signal:n,signalDescription:e,stdio:U,all:x,ipcOutput:M,cwd:L,originalMessage:y,shortMessage:p})),t},fE=({error:$,command:Q,escapedCommand:J,startTime:X,timedOut:Y,isCanceled:G,isGracefullyCanceled:W,isMaxBuffer:q,isForcefullyTerminated:z,exitCode:K,signal:V,signalDescription:U,stdio:x,all:M,ipcOutput:H,cwd:w,originalMessage:j,shortMessage:Z})=>nB({shortMessage:Z,originalMessage:j,command:Q,escapedCommand:J,cwd:w,durationMs:NW(X),failed:!0,timedOut:Y,isCanceled:G,isGracefullyCanceled:W,isTerminated:V!==void 0,isMaxBuffer:q,isForcefullyTerminated:z,exitCode:K,signal:V,signalDescription:U,code:$.cause?.code,stdout:x[1],stderr:x[2],all:M,stdio:x,ipcOutput:H,pipedFrom:[]}),nB=($)=>Object.fromEntries(Object.entries($).filter(([,Q])=>Q!==void 0)),mE=($,Q)=>{let J=$===null?void 0:$,X=Q===null?void 0:Q,Y=X===void 0?void 0:j9(Q);return{exitCode:J,signal:X,signalDescription:Y}};var NY=R(()=>{BY();V9();SQ();iB()});function yE($){return{days:Math.trunc($/86400000),hours:Math.trunc($/3600000%24),minutes:Math.trunc($/60000%60),seconds:Math.trunc($/1000%60),milliseconds:Math.trunc($%1000),microseconds:Math.trunc(dB($*1000)%1000),nanoseconds:Math.trunc(dB($*1e6)%1000)}}function hE($){return{days:$/86400000n,hours:$/3600000n%24n,minutes:$/60000n%60n,seconds:$/1000n%60n,milliseconds:$%1000n,microseconds:0n,nanoseconds:0n}}function Wq($){switch(typeof $){case"number":{if(Number.isFinite($))return yE($);break}case"bigint":return hE($)}throw TypeError("Expected a finite number or bigint")}var dB=($)=>Number.isFinite($)?$:0;function qq($,Q){let J=typeof $==="bigint";if(!J&&!Number.isFinite($))throw TypeError("Expected a finite number or bigint");Q={...Q};let X=$<0?"-":"";if($=$<0?-$:$,Q.colonNotation)Q.compact=!1,Q.formatSubMilliseconds=!1,Q.separateMilliseconds=!1,Q.verbose=!1;if(Q.compact)Q.unitCount=1,Q.secondsDecimalDigits=0,Q.millisecondsDecimalDigits=0;let Y=[],G=(V,U)=>{let x=Math.floor(V*10**U+gE);return(Math.round(x)/10**U).toFixed(U)},W=(V,U,x,M)=>{if((Y.length===0||!Q.colonNotation)&&pE(V)&&!(Q.colonNotation&&x==="m"))return;if(M??=String(V),Q.colonNotation){let H=M.includes(".")?M.split(".")[0].length:M.length,w=Y.length>0?2:1;M="0".repeat(Math.max(0,w-H))+M}else M+=Q.verbose?" "+uE(U,V):x;Y.push(M)},q=Wq($),z=BigInt(q.days);if(Q.hideYearAndDays)W(BigInt(z)*24n+BigInt(q.hours),"hour","h");else{if(Q.hideYear)W(z,"day","d");else W(z/365n,"year","y"),W(z%365n,"day","d");W(Number(q.hours),"hour","h")}if(W(Number(q.minutes),"minute","m"),!Q.hideSeconds)if(Q.separateMilliseconds||Q.formatSubMilliseconds||!Q.colonNotation&&$<1000&&!Q.subSecondsAsDecimals){let V=Number(q.seconds),U=Number(q.milliseconds),x=Number(q.microseconds),M=Number(q.nanoseconds);if(W(V,"second","s"),Q.formatSubMilliseconds)W(U,"millisecond","ms"),W(x,"microsecond","µs"),W(M,"nanosecond","ns");else{let H=U+x/1000+M/1e6,w=typeof Q.millisecondsDecimalDigits==="number"?Q.millisecondsDecimalDigits:0,j=H>=1?Math.round(H):Math.ceil(H),Z=w?H.toFixed(w):j;W(Number.parseFloat(Z),"millisecond","ms",Z)}}else{let V=(J?Number($%lE):$)/1000%60,U=typeof Q.secondsDecimalDigits==="number"?Q.secondsDecimalDigits:1,x=G(V,U),M=Q.keepDecimalsOnWholeSeconds?x:x.replace(/\.0+$/,"");W(Number.parseFloat(M),"second","s",M)}if(Y.length===0)return X+"0"+(Q.verbose?" milliseconds":"ms");let K=Q.colonNotation?":":" ";if(typeof Q.unitCount==="number")Y=Y.slice(0,Math.max(Q.unitCount,1));return X+Y.join(K)}var pE=($)=>$===0||$===0n,uE=($,Q)=>Q===1||Q===1n?$:`${$}s`,gE=0.0000001,lE;var aB=R(()=>{lE=24n*60n*60n*1000n});var oB=($,Q)=>{if($.failed)V8({type:"error",verboseMessage:$.shortMessage,verboseInfo:Q,result:$})};var sB=R(()=>{bJ()});var rB=($,Q)=>{if(!cJ(Q))return;oB($,Q),iE($,Q)},iE=($,Q)=>{let J=`(done in ${qq($.durationMs)})`;V8({type:"duration",verboseMessage:J,verboseInfo:Q,result:$})};var tB=R(()=>{aB();r8();bJ();sB()});var nJ=($,Q,{reject:J})=>{if(rB($,Q),$.failed&&J)throw $;return $};var r9=R(()=>{tB()});var QZ=($,Q)=>{if(hQ($))return"asyncGenerator";if(YZ($))return"generator";if(t9($))return"fileUrl";if(sE($))return"filePath";if(eE($))return"webStream";if(r$($,{checkOpen:!1}))return"native";if(g0($))return"uint8Array";if($k($))return"asyncIterable";if(Qk($))return"iterable";if(Kq($))return JZ({transform:$},Q);if(oE($))return nE($,Q);return"native"},nE=($,Q)=>{if(Jq($.transform,{checkOpen:!1}))return dE($,Q);if(Kq($.transform))return JZ($,Q);return aE($,Q)},dE=($,Q)=>{return XZ($,Q,"Duplex stream"),"duplex"},JZ=($,Q)=>{return XZ($,Q,"web TransformStream"),"webTransform"},XZ=({final:$,binary:Q,objectMode:J},X,Y)=>{eB($,`${X}.final`,Y),eB(Q,`${X}.binary`,Y),zq(J,`${X}.objectMode`)},eB=($,Q,J)=>{if($!==void 0)throw TypeError(`The \`${Q}\` option can only be defined when using a generator, not a ${J}.`)},aE=({transform:$,final:Q,binary:J,objectMode:X},Y)=>{if($!==void 0&&!$Z($))throw TypeError(`The \`${Y}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Jq(Q,{checkOpen:!1}))throw TypeError(`The \`${Y}.final\` option must not be a Duplex stream.`);if(Kq(Q))throw TypeError(`The \`${Y}.final\` option must not be a web TransformStream.`);if(Q!==void 0&&!$Z(Q))throw TypeError(`The \`${Y}.final\` option must be a generator.`);return zq(J,`${Y}.binary`),zq(X,`${Y}.objectMode`),hQ($)||hQ(Q)?"asyncGenerator":"generator"},zq=($,Q)=>{if($!==void 0&&typeof $!=="boolean")throw TypeError(`The \`${Q}\` option must use a boolean.`)},$Z=($)=>hQ($)||YZ($),hQ=($)=>Object.prototype.toString.call($)==="[object AsyncGeneratorFunction]",YZ=($)=>Object.prototype.toString.call($)==="[object GeneratorFunction]",oE=($)=>y0($)&&($.transform!==void 0||$.final!==void 0),t9=($)=>Object.prototype.toString.call($)==="[object URL]",GZ=($)=>t9($)&&$.protocol!=="file:",sE=($)=>y0($)&&Object.keys($).length>0&&Object.keys($).every((Q)=>rE.has(Q))&&Vq($.file),rE,Vq=($)=>typeof $==="string",WZ=($,Q)=>$==="native"&&typeof Q==="string"&&!tE.has(Q),tE,qZ=($)=>Object.prototype.toString.call($)==="[object ReadableStream]",e9=($)=>Object.prototype.toString.call($)==="[object WritableStream]",eE=($)=>qZ($)||e9($),Kq=($)=>qZ($?.readable)&&e9($?.writable),$k=($)=>zZ($)&&typeof $[Symbol.asyncIterator]==="function",Qk=($)=>zZ($)&&typeof $[Symbol.iterator]==="function",zZ=($)=>typeof $==="object"&&$!==null,c$,$6,Uq,VZ,KZ,QQ;var x$=R(()=>{O$();rE=new Set(["file","append"]),tE=new Set(["ipc","ignore","inherit","overlapped","pipe"]),c$=new Set(["generator","asyncGenerator","duplex","webTransform"]),$6=new Set(["fileUrl","filePath","fileNumber"]),Uq=new Set(["fileUrl","filePath"]),VZ=new Set([...Uq,"webStream","nodeStream"]),KZ=new Set(["webTransform","duplex"]),QQ={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"}});var xq=($,Q,J,X)=>X==="output"?Jk($,Q,J):Xk($,Q,J),Jk=($,Q,J)=>{let X=Q!==0&&J[Q-1].value.readableObjectMode;return{writableObjectMode:X,readableObjectMode:$??X}},Xk=($,Q,J)=>{let X=Q===0?$===!0:J[Q-1].value.readableObjectMode,Y=Q!==J.length-1&&($??X);return{writableObjectMode:X,readableObjectMode:Y}},UZ=($,Q)=>{let J=$.findLast(({type:X})=>c$.has(X));if(J===void 0)return!1;return Q==="input"?J.value.writableObjectMode:J.value.readableObjectMode};var Mq=R(()=>{x$()});var xZ=($,Q,J,X)=>[...$.filter(({type:Y})=>!c$.has(Y)),...Yk($,Q,J,X)],Yk=($,Q,J,{encoding:X})=>{let Y=$.filter(({type:W})=>c$.has(W)),G=Array.from({length:Y.length});for(let[W,q]of Object.entries(Y))G[W]=Gk({stdioItem:q,index:Number(W),newTransforms:G,optionName:Q,direction:J,encoding:X});return Vk(G,J)},Gk=({stdioItem:$,stdioItem:{type:Q},index:J,newTransforms:X,optionName:Y,direction:G,encoding:W})=>{if(Q==="duplex")return Wk({stdioItem:$,optionName:Y});if(Q==="webTransform")return qk({stdioItem:$,index:J,newTransforms:X,direction:G});return zk({stdioItem:$,index:J,newTransforms:X,direction:G,encoding:W})},Wk=({stdioItem:$,stdioItem:{value:{transform:Q,transform:{writableObjectMode:J,readableObjectMode:X},objectMode:Y=X}},optionName:G})=>{if(Y&&!X)throw TypeError(`The \`${G}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!Y&&X)throw TypeError(`The \`${G}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...$,value:{transform:Q,writableObjectMode:J,readableObjectMode:X}}},qk=({stdioItem:$,stdioItem:{value:Q},index:J,newTransforms:X,direction:Y})=>{let{transform:G,objectMode:W}=y0(Q)?Q:{transform:Q},{writableObjectMode:q,readableObjectMode:z}=xq(W,J,X,Y);return{...$,value:{transform:G,writableObjectMode:q,readableObjectMode:z}}},zk=({stdioItem:$,stdioItem:{value:Q},index:J,newTransforms:X,direction:Y,encoding:G})=>{let{transform:W,final:q,binary:z=!1,preserveNewlines:K=!1,objectMode:V}=y0(Q)?Q:{transform:Q},U=z||F$.has(G),{writableObjectMode:x,readableObjectMode:M}=xq(V,J,X,Y);return{...$,value:{transform:W,final:q,binary:U,preserveNewlines:K,writableObjectMode:x,readableObjectMode:M}}},Vk=($,Q)=>Q==="input"?$.reverse():$;var MZ=R(()=>{fQ();x$();Mq()});import Hq from"node:process";var HZ=($,Q,J)=>{let X=$.map((Y)=>Kk(Y,Q));if(X.includes("input")&&X.includes("output"))throw TypeError(`The \`${J}\` option must not be an array of both readable and writable values.`);return X.find(Boolean)??Mk},Kk=({type:$,value:Q},J)=>Uk[J]??BZ[$](Q),Uk,dJ=()=>{return},Bq=()=>"input",BZ,xk=($)=>{if([0,Hq.stdin].includes($))return"input";if([1,2,Hq.stdout,Hq.stderr].includes($))return"output"},Mk="output";var ZZ=R(()=>{x$();Uk=["input","output","output"],BZ={generator:dJ,asyncGenerator:dJ,fileUrl:dJ,filePath:dJ,iterable:Bq,asyncIterable:Bq,uint8Array:Bq,webStream:($)=>e9($)?"output":"input",nodeStream($){if(!mQ($,{checkOpen:!1}))return"output";return Qq($,{checkOpen:!1})?void 0:"input"},webTransform:dJ,duplex:dJ,native($){let Q=xk($);if(Q!==void 0)return Q;if(r$($,{checkOpen:!1}))return BZ.nodeStream($)}}});var wZ=($,Q)=>Q&&!$.includes("ipc")?[...$,"ipc"]:$;var jZ=({stdio:$,ipc:Q,buffer:J,...X},Y,G)=>{let W=Hk($,X).map((q,z)=>LZ(q,z));return G?Zk(W,J,Y):wZ(W,Q)},Hk=($,Q)=>{if($===void 0)return k$.map((X)=>Q[X]);if(Bk(Q))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${k$.map((X)=>`\`${X}\``).join(", ")}`);if(typeof $==="string")return[$,$,$];if(!Array.isArray($))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof $}\``);let J=Math.max($.length,k$.length);return Array.from({length:J},(X,Y)=>$[Y])},Bk=($)=>k$.some((Q)=>$[Q]!==void 0),LZ=($,Q)=>{if(Array.isArray($))return $.map((J)=>LZ(J,Q));if($===null||$===void 0)return Q>=k$.length?"ignore":"pipe";return $},Zk=($,Q,J)=>$.map((X,Y)=>!Q[Y]&&Y!==0&&!SJ(J,Y)&&wk(X)?"ignore":X),wk=($)=>$==="pipe"||Array.isArray($)&&$.every((Q)=>Q==="pipe");var RZ=R(()=>{O8();r8()});import{readFileSync as jk}from"node:fs";import Lk from"node:tty";var _Z=({stdioItem:$,stdioItem:{type:Q},isStdioArray:J,fdNumber:X,direction:Y,isSync:G})=>{if(!J||Q!=="native")return $;return G?Rk({stdioItem:$,fdNumber:X,direction:Y}):Nk({stdioItem:$,fdNumber:X})},Rk=({stdioItem:$,stdioItem:{value:Q,optionName:J},fdNumber:X,direction:Y})=>{let G=Dk({value:Q,optionName:J,fdNumber:X,direction:Y});if(G!==void 0)return G;if(r$(Q,{checkOpen:!1}))throw TypeError(`The \`${J}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return $},Dk=({value:$,optionName:Q,fdNumber:J,direction:X})=>{let Y=_k($,J);if(Y===void 0)return;if(X==="output")return{type:"fileNumber",value:Y,optionName:Q};if(Lk.isatty(Y))throw TypeError(`The \`${Q}: ${_9($)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:v8(jk(Y)),optionName:Q}},_k=($,Q)=>{if($==="inherit")return Q;if(typeof $==="number")return $;let J=e7.indexOf($);if(J!==-1)return J},Nk=({stdioItem:$,stdioItem:{value:Q,optionName:J},fdNumber:X})=>{if(Q==="inherit")return{type:"nodeStream",value:DZ(X,Q,J),optionName:J};if(typeof Q==="number")return{type:"nodeStream",value:DZ(Q,Q,J),optionName:J};if(r$(Q,{checkOpen:!1}))return{type:"nodeStream",value:Q,optionName:J};return $},DZ=($,Q,J)=>{let X=e7[$];if(X===void 0)throw TypeError(`The \`${J}: ${Q}\` option is invalid: no such standard stream.`);return X};var NZ=R(()=>{O8();O$();e8()});var vZ=({input:$,inputFile:Q},J)=>J===0?[...vk($),...Fk(Q)]:[],vk=($)=>$===void 0?[]:[{type:Ok($),value:$,optionName:"input"}],Ok=($)=>{if(mQ($,{checkOpen:!1}))return"nodeStream";if(typeof $==="string")return"string";if(g0($))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},Fk=($)=>$===void 0?[]:[{...Ck($),optionName:"inputFile"}],Ck=($)=>{if(t9($))return{type:"fileUrl",value:$};if(Vq($))return{type:"filePath",value:{file:$}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var OZ=R(()=>{O$();x$()});var FZ=($)=>$.filter((Q,J)=>$.every((X,Y)=>Q.value!==X.value||J>=Y||Q.type==="generator"||Q.type==="asyncGenerator")),CZ=({stdioItem:{type:$,value:Q,optionName:J},direction:X,fileDescriptors:Y,isSync:G})=>{let W=Ik(Y,$);if(W.length===0)return;if(G){Pk({otherStdioItems:W,type:$,value:Q,optionName:J,direction:X});return}if(VZ.has($))return IZ({otherStdioItems:W,type:$,value:Q,optionName:J,direction:X});if(KZ.has($))Ak({otherStdioItems:W,type:$,value:Q,optionName:J})},Ik=($,Q)=>$.flatMap(({direction:J,stdioItems:X})=>X.filter((Y)=>Y.type===Q).map((Y)=>({...Y,direction:J}))),Pk=({otherStdioItems:$,type:Q,value:J,optionName:X,direction:Y})=>{if(Uq.has(Q))IZ({otherStdioItems:$,type:Q,value:J,optionName:X,direction:Y})},IZ=({otherStdioItems:$,type:Q,value:J,optionName:X,direction:Y})=>{let G=$.filter((q)=>Tk(q,J));if(G.length===0)return;let W=G.find((q)=>q.direction!==Y);return PZ(W,X,Q),Y==="output"?G[0].stream:void 0},Tk=({type:$,value:Q},J)=>{if($==="filePath")return Q.file===J.file;if($==="fileUrl")return Q.href===J.href;return Q===J},Ak=({otherStdioItems:$,type:Q,value:J,optionName:X})=>{let Y=$.find(({value:{transform:G}})=>G===J.transform);PZ(Y,X,Q)},PZ=($,Q,J)=>{if($!==void 0)throw TypeError(`The \`${$.optionName}\` and \`${Q}\` options must not target ${QQ[J]} that is the same.`)};var TZ=R(()=>{x$()});var Q6=($,Q,J,X)=>{let G=jZ(Q,J,X).map((q,z)=>Ek({stdioOption:q,fdNumber:z,options:Q,isSync:X})),W=hk({initialFileDescriptors:G,addProperties:$,options:Q,isSync:X});return Q.stdio=W.map(({stdioItems:q})=>gk(q)),W},Ek=({stdioOption:$,fdNumber:Q,options:J,isSync:X})=>{let Y=$9(Q),{stdioItems:G,isStdioArray:W}=kk({stdioOption:$,fdNumber:Q,options:J,optionName:Y}),q=HZ(G,Q,Y),z=G.map((U)=>_Z({stdioItem:U,isStdioArray:W,fdNumber:Q,direction:q,isSync:X})),K=xZ(z,Y,q,J),V=UZ(K,q);return yk(K,V),{direction:q,objectMode:V,stdioItems:K}},kk=({stdioOption:$,fdNumber:Q,options:J,optionName:X})=>{let G=[...(Array.isArray($)?$:[$]).map((z)=>ck(z,X)),...vZ(J,Q)],W=FZ(G),q=W.length>1;return Sk(W,q,X),fk(W),{stdioItems:W,isStdioArray:q}},ck=($,Q)=>({type:QZ($,Q),value:$,optionName:Q}),Sk=($,Q,J)=>{if($.length===0)throw TypeError(`The \`${J}\` option must not be an empty array.`);if(!Q)return;for(let{value:X,optionName:Y}of $)if(bk.has(X))throw Error(`The \`${Y}\` option must not include \`${X}\`.`)},bk,fk=($)=>{for(let Q of $)mk(Q)},mk=({type:$,value:Q,optionName:J})=>{if(GZ(Q))throw TypeError(`The \`${J}: URL\` option must use the \`file:\` scheme.
|
|
73
|
+
For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(WZ($,Q))throw TypeError(`The \`${J}: { file: '...' }\` option must be used instead of \`${J}: '...'\`.`)},yk=($,Q)=>{if(!Q)return;let J=$.find(({type:X})=>$6.has(X));if(J!==void 0)throw TypeError(`The \`${J.optionName}\` option cannot use both files and transforms in objectMode.`)},hk=({initialFileDescriptors:$,addProperties:Q,options:J,isSync:X})=>{let Y=[];try{for(let G of $)Y.push(pk({fileDescriptor:G,fileDescriptors:Y,addProperties:Q,options:J,isSync:X}));return Y}catch(G){throw Zq(Y),G}},pk=({fileDescriptor:{direction:$,objectMode:Q,stdioItems:J},fileDescriptors:X,addProperties:Y,options:G,isSync:W})=>{let q=J.map((z)=>uk({stdioItem:z,addProperties:Y,direction:$,options:G,fileDescriptors:X,isSync:W}));return{direction:$,objectMode:Q,stdioItems:q}},uk=({stdioItem:$,addProperties:Q,direction:J,options:X,fileDescriptors:Y,isSync:G})=>{let W=CZ({stdioItem:$,direction:J,fileDescriptors:Y,isSync:G});if(W!==void 0)return{...$,stream:W};return{...$,...Q[J][$.type]($,X)}},Zq=($)=>{for(let{stdioItems:Q}of $)for(let{stream:J}of Q)if(J!==void 0&&!o$(J))J.destroy()},gk=($)=>{if($.length>1)return $.some(({value:X})=>X==="overlapped")?"overlapped":"pipe";let[{type:Q,value:J}]=$;return Q==="native"?J:"pipe"};var J6=R(()=>{O8();MZ();Mq();x$();ZZ();RZ();NZ();OZ();TZ();bk=new Set(["ignore","ipc"])});import{readFileSync as AZ}from"node:fs";var kZ=($,Q)=>Q6(ik,$,Q,!0),M8=({type:$,optionName:Q})=>{cZ(Q,QQ[$])},lk=({optionName:$,value:Q})=>{if(Q==="ipc"||Q==="overlapped")cZ($,`"${Q}"`);return{}},cZ=($,Q)=>{throw TypeError(`The \`${$}\` option cannot be ${Q} with synchronous methods.`)},EZ,ik;var SZ=R(()=>{O$();J6();x$();EZ={generator(){},asyncGenerator:M8,webStream:M8,nodeStream:M8,webTransform:M8,duplex:M8,asyncIterable:M8,native:lk},ik={input:{...EZ,fileUrl:({value:$})=>({contents:[v8(AZ($))]}),filePath:({value:{file:$}})=>({contents:[v8(AZ($))]}),fileNumber:M8,iterable:({value:$})=>({contents:[...$]}),string:({value:$})=>({contents:[$]}),uint8Array:({value:$})=>({contents:[$]})},output:{...EZ,fileUrl:({value:$})=>({path:$}),filePath:({value:{file:$,append:Q}})=>({path:$,append:Q}),fileNumber:({value:$})=>({path:$}),iterable:M8,string:M8,uint8Array:M8}}});var T8=($,{stripFinalNewline:Q},J)=>wq(Q,J)&&$!==void 0&&!Array.isArray($)?gJ($):$,wq=($,Q)=>Q==="all"?$[1]||$[2]:$[Q];var vY=R(()=>{$q()});var X6=($,Q,J,X)=>$||J?void 0:fZ(Q,X),Lq=($,Q,J)=>J?$.flatMap((X)=>bZ(X,Q)):bZ($,Q),bZ=($,Q)=>{let{transform:J,final:X}=fZ(Q,{});return[...J($),...X()]},fZ=($,Q)=>{return Q.previousChunks="",{transform:nk.bind(void 0,Q,$),final:ak.bind(void 0,Q)}},nk=function*($,Q,J){if(typeof J!=="string"){yield J;return}let{previousChunks:X}=$,Y=-1;for(let G=0;G<J.length;G+=1)if(J[G]===`
|
|
74
|
+
`){let W=dk(J,G,Q,$),q=J.slice(Y+1,G+1-W);if(X.length>0)q=jq(X,q),X="";yield q,Y=G}if(Y!==J.length-1)X=jq(X,J.slice(Y+1));$.previousChunks=X},dk=($,Q,J,X)=>{if(J)return 0;return X.isWindowsNewline=Q!==0&&$[Q-1]==="\r",X.isWindowsNewline?2:1},ak=function*({previousChunks:$}){if($.length>0)yield $},mZ=({binary:$,preserveNewlines:Q,readableObjectMode:J,state:X})=>$||Q||J?void 0:{transform:ok.bind(void 0,X)},ok=function*({isWindowsNewline:$=!1},Q){let{unixNewline:J,windowsNewline:X,LF:Y,concatBytes:G}=typeof Q==="string"?sk:tk;if(Q.at(-1)===Y){yield Q;return}yield G(Q,$?X:J)},jq=($,Q)=>`${$}${Q}`,sk,rk=($,Q)=>{let J=new Uint8Array($.length+Q.length);return J.set($,0),J.set(Q,$.length),J},tk;var Y6=R(()=>{sk={windowsNewline:`\r
|
|
75
|
+
`,unixNewline:`
|
|
76
|
+
`,LF:`
|
|
77
|
+
`,concatBytes:jq},tk={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:rk}});import{Buffer as ek}from"node:buffer";var yZ=($,Q)=>$?void 0:$c.bind(void 0,Q),$c=function*($,Q){if(typeof Q!=="string"&&!g0(Q)&&!ek.isBuffer(Q))throw TypeError(`The \`${$}\` option's transform must use "objectMode: true" to receive as input: ${typeof Q}.`);yield Q},hZ=($,Q)=>$?Qc.bind(void 0,Q):Jc.bind(void 0,Q),Qc=function*($,Q){pZ($,Q),yield Q},Jc=function*($,Q){if(pZ($,Q),typeof Q!=="string"&&!g0(Q))throw TypeError(`The \`${$}\` option's function must yield a string or an Uint8Array, not ${typeof Q}.`);yield Q},pZ=($,Q)=>{if(Q===null||Q===void 0)throw TypeError(`The \`${$}\` option's function must not call \`yield ${Q}\`.
|
|
78
|
+
Instead, \`yield\` should either be called with a value, or not be called at all. For example:
|
|
79
|
+
if (condition) { yield value; }`)};var uZ=R(()=>{O$()});import{Buffer as Xc}from"node:buffer";import{StringDecoder as Yc}from"node:string_decoder";var G6=($,Q,J)=>{if(J)return;if($)return{transform:Gc.bind(void 0,new TextEncoder)};let X=new Yc(Q);return{transform:Wc.bind(void 0,X),final:qc.bind(void 0,X)}},Gc=function*($,Q){if(Xc.isBuffer(Q))yield v8(Q);else if(typeof Q==="string")yield $.encode(Q);else yield Q},Wc=function*($,Q){yield g0(Q)?$.write(Q):Q},qc=function*($){let Q=$.end();if(Q!=="")yield Q};var Rq=R(()=>{O$()});import{callbackify as gZ}from"node:util";var Dq,W6=async function*($,Q,J){if(J===Q.length){yield $;return}let{transform:X=Vc}=Q[J];for await(let Y of X($))yield*W6(Y,Q,J+1)},lZ=async function*($){for(let[Q,{final:J}]of Object.entries($))yield*zc(J,Number(Q),$)},zc=async function*($,Q,J){if($===void 0)return;for await(let X of $())yield*W6(X,J,Q+1)},iZ,Vc=function*($){yield $};var nZ=R(()=>{Dq=gZ(async($,Q,J,X)=>{Q.currentIterable=$(...J);try{for await(let Y of Q.currentIterable)X.push(Y)}finally{delete Q.currentIterable}}),iZ=gZ(async({currentIterable:$},Q)=>{if($!==void 0){await(Q?$.throw(Q):$.return());return}if(Q)throw Q})});var _q=($,Q,J,X)=>{try{for(let Y of $(...Q))J.push(Y);X()}catch(Y){X(Y)}},dZ=($,Q)=>[...Q.flatMap((J)=>[...pQ(J,$,0)]),...OY($)],pQ=function*($,Q,J){if(J===Q.length){yield $;return}let{transform:X=Uc}=Q[J];for(let Y of X($))yield*pQ(Y,Q,J+1)},OY=function*($){for(let[Q,{final:J}]of Object.entries($))yield*Kc(J,Number(Q),$)},Kc=function*($,Q,J){if($===void 0)return;for(let X of $())yield*pQ(X,J,Q+1)},Uc=function*($){yield $};import{Transform as xc,getDefaultHighWaterMark as aZ}from"node:stream";var Nq=({value:$,value:{transform:Q,final:J,writableObjectMode:X,readableObjectMode:Y},optionName:G},{encoding:W})=>{let q={},z=oZ($,W,G),K=hQ(Q),V=hQ(J),U=K?Dq.bind(void 0,W6,q):_q.bind(void 0,pQ),x=K||V?Dq.bind(void 0,lZ,q):_q.bind(void 0,OY),M=K||V?iZ.bind(void 0,q):void 0;return{stream:new xc({writableObjectMode:X,writableHighWaterMark:aZ(X),readableObjectMode:Y,readableHighWaterMark:aZ(Y),transform(w,j,Z){U([w,z,0],this,Z)},flush(w){x([z],this,w)},destroy:M})}},q6=($,Q,J,X)=>{let Y=Q.filter(({type:W})=>W==="generator"),G=X?Y.reverse():Y;for(let{value:W,optionName:q}of G){let z=oZ(W,J,q);$=dZ(z,$)}return $},oZ=({transform:$,final:Q,binary:J,writableObjectMode:X,readableObjectMode:Y,preserveNewlines:G},W,q)=>{let z={};return[{transform:yZ(X,q)},G6(J,W,X),X6(J,G,X,z),{transform:$,final:Q},{transform:hZ(Y,q)},mZ({binary:J,preserveNewlines:G,readableObjectMode:Y,state:z})].filter(Boolean)};var z6=R(()=>{x$();Y6();uZ();Rq();nZ()});var sZ=($,Q)=>{for(let J of Mc($))Hc($,J,Q)},Mc=($)=>new Set(Object.entries($).filter(([,{direction:Q}])=>Q==="input").map(([Q])=>Number(Q))),Hc=($,Q,J)=>{let{stdioItems:X}=$[Q],Y=X.filter(({contents:q})=>q!==void 0);if(Y.length===0)return;if(Q!==0){let[{type:q,optionName:z}]=Y;throw TypeError(`Only the \`stdin\` option, not \`${z}\`, can be ${QQ[q]} with synchronous methods.`)}let W=Y.map(({contents:q})=>q).map((q)=>Bc(q,X));J.input=xY(W)},Bc=($,Q)=>{let J=q6($,Q,"utf8",!0);return Zc(J),xY(J)},Zc=($)=>{let Q=$.find((J)=>typeof J!=="string"&&!g0(J));if(Q!==void 0)throw TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${Q}.`)};var rZ=R(()=>{z6();O$();x$()});var V6=({stdioItems:$,encoding:Q,verboseInfo:J,fdNumber:X})=>X!=="all"&&SJ(J,X)&&!F$.has(Q)&&wc(X)&&($.some(({type:Y,value:G})=>Y==="native"&&jc.has(G))||$.every(({type:Y})=>c$.has(Y))),wc=($)=>$===1||$===2,jc,tZ=async($,Q,J,X)=>{for await(let Y of $)if(!Lc(Q))$3(Y,J,X)},eZ=($,Q,J)=>{for(let X of $)$3(X,Q,J)},Lc=($)=>$._readableState.pipes.length>0,$3=($,Q,J)=>{let X=q9($);V8({type:"output",verboseMessage:X,fdNumber:Q,verboseInfo:J})};var vq=R(()=>{fQ();x$();bJ();r8();jc=new Set(["pipe","overlapped"])});import{writeFileSync as Rc,appendFileSync as Dc}from"node:fs";var Q3=({fileDescriptors:$,syncResult:{output:Q},options:J,isMaxBuffer:X,verboseInfo:Y})=>{if(Q===null)return{output:Array.from({length:3})};let G={},W=new Set([]);return{output:Q.map((z,K)=>_c({result:z,fileDescriptors:$,fdNumber:K,state:G,outputFiles:W,isMaxBuffer:X,verboseInfo:Y},J)),...G}},_c=({result:$,fileDescriptors:Q,fdNumber:J,state:X,outputFiles:Y,isMaxBuffer:G,verboseInfo:W},{buffer:q,encoding:z,lines:K,stripFinalNewline:V,maxBuffer:U})=>{if($===null)return;let x=uB($,G,U),M=v8(x),{stdioItems:H,objectMode:w}=Q[J],j=Nc([M],H,z,X),{serializedResult:Z,finalResult:L=Z}=vc({chunks:j,objectMode:w,encoding:z,lines:K,stripFinalNewline:V,fdNumber:J});Oc({serializedResult:Z,fdNumber:J,state:X,verboseInfo:W,encoding:z,stdioItems:H,objectMode:w});let D=q[J]?L:void 0;try{if(X.error===void 0)Fc(Z,H,Y);return D}catch(F){return X.error=F,D}},Nc=($,Q,J,X)=>{try{return q6($,Q,J,!1)}catch(Y){return X.error=Y,$}},vc=({chunks:$,objectMode:Q,encoding:J,lines:X,stripFinalNewline:Y,fdNumber:G})=>{if(Q)return{serializedResult:$};if(J==="buffer")return{serializedResult:xY($)};let W=cx($,J);if(X[G])return{serializedResult:W,finalResult:Lq(W,!Y[G],Q)};return{serializedResult:W}},Oc=({serializedResult:$,fdNumber:Q,state:J,verboseInfo:X,encoding:Y,stdioItems:G,objectMode:W})=>{if(!V6({stdioItems:G,encoding:Y,verboseInfo:X,fdNumber:Q}))return;let q=Lq($,!1,W);try{eZ(q,Q,X)}catch(z){J.error??=z}},Fc=($,Q,J)=>{for(let{path:X,append:Y}of Q.filter(({type:G})=>$6.has(G))){let G=typeof X==="string"?X:X.toString();if(Y||J.has(G))Dc(X,$);else J.add(G),Rc(X,$)}};var J3=R(()=>{vq();z6();Y6();O$();x$();yQ()});var X3=([,$,Q],J)=>{if(!J.all)return;if($===void 0)return Q;if(Q===void 0)return $;if(Array.isArray($))return Array.isArray(Q)?[...$,...Q]:[...$,T8(Q,J,"all")];if(Array.isArray(Q))return[T8($,J,"all"),...Q];if(g0($)&&g0(Q))return ZW([$,Q]);return`${$}${Q}`};var Y3=R(()=>{O$();vY()});import{once as Oq}from"node:events";var G3=async($,Q)=>{let[J,X]=await Cc($);return Q.isForcefullyTerminated??=!1,[J,X]},Cc=async($)=>{let[Q,J]=await Promise.allSettled([Oq($,"spawn"),Oq($,"exit")]);if(Q.status==="rejected")return[];return J.status==="rejected"?W3($):J.value},W3=async($)=>{try{return await Oq($,"exit")}catch{return W3($)}},q3=async($)=>{let[Q,J]=await $;if(!Ic(Q,J)&&Fq(Q,J))throw new K8;return[Q,J]},Ic=($,Q)=>$===void 0&&Q===void 0,Fq=($,Q)=>$!==0||Q!==null;var Cq=R(()=>{SQ()});var z3=({error:$,status:Q,signal:J,output:X},{maxBuffer:Y})=>{let G=Pc($,Q,J),W=G?.code==="ETIMEDOUT",q=pB(G,X,Y);return{resultError:G,exitCode:Q,signal:J,timedOut:W,isMaxBuffer:q}},Pc=($,Q,J)=>{if($!==void 0)return $;return Fq(Q,J)?new K8:void 0};var V3=R(()=>{SQ();yQ();Cq()});import{spawnSync as Tc}from"node:child_process";var K3=($,Q,J)=>{let{file:X,commandArguments:Y,command:G,escapedCommand:W,startTime:q,verboseInfo:z,options:K,fileDescriptors:V}=Ac($,Q,J),U=cc({file:X,commandArguments:Y,options:K,command:G,escapedCommand:W,verboseInfo:z,fileDescriptors:V,startTime:q});return nJ(U,z,K)},Ac=($,Q,J)=>{let{command:X,escapedCommand:Y,startTime:G,verboseInfo:W}=K9($,Q,J),q=Ec(J),{file:z,commandArguments:K,options:V}=y9($,Q,q);kc(V);let U=kZ(V,W);return{file:z,commandArguments:K,command:X,escapedCommand:Y,startTime:G,verboseInfo:W,options:V,fileDescriptors:U}},Ec=($)=>$.node&&!$.ipc?{...$,ipc:!1}:$,kc=({ipc:$,ipcInput:Q,detached:J,cancelSignal:X})=>{if(Q)K6("ipcInput");if($)K6("ipc: true");if(J)K6("detached: true");if(X)K6("cancelSignal")},K6=($)=>{throw TypeError(`The "${$}" option cannot be used with synchronous methods.`)},cc=({file:$,commandArguments:Q,options:J,command:X,escapedCommand:Y,verboseInfo:G,fileDescriptors:W,startTime:q})=>{let z=Sc({file:$,commandArguments:Q,options:J,command:X,escapedCommand:Y,fileDescriptors:W,startTime:q});if(z.failed)return z;let{resultError:K,exitCode:V,signal:U,timedOut:x,isMaxBuffer:M}=z3(z,J),{output:H,error:w=K}=Q3({fileDescriptors:W,syncResult:z,options:J,isMaxBuffer:M,verboseInfo:G}),j=H.map((L,D)=>T8(L,J,D)),Z=T8(X3(H,J),J,"all");return fc({error:w,exitCode:V,signal:U,timedOut:x,isMaxBuffer:M,stdio:j,all:Z,options:J,command:X,escapedCommand:Y,startTime:q})},Sc=({file:$,commandArguments:Q,options:J,command:X,escapedCommand:Y,fileDescriptors:G,startTime:W})=>{try{sZ(G,J);let q=bc(J);return Tc(...h9($,Q,q))}catch(q){return iJ({error:q,command:X,escapedCommand:Y,fileDescriptors:G,options:J,startTime:W,isSync:!0})}},bc=({encoding:$,maxBuffer:Q,...J})=>({...J,encoding:"buffer",maxBuffer:o9(Q)}),fc=({error:$,exitCode:Q,signal:J,timedOut:X,isMaxBuffer:Y,stdio:G,all:W,options:q,command:z,escapedCommand:K,startTime:V})=>$===void 0?s9({command:z,escapedCommand:K,stdio:G,all:W,ipcOutput:[],options:q,startTime:V}):_Y({error:$,command:z,escapedCommand:K,timedOut:X,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:Y,isForcefullyTerminated:!1,exitCode:Q,signal:J,stdio:G,all:W,ipcOutput:[],options:q,startTime:V,isSync:!0});var U3=R(()=>{vW();eW();NY();r9();SZ();vY();rZ();J3();yQ();Y3();V3()});import{once as Iq,on as mc}from"node:events";var x3=({anyProcess:$,channel:Q,isSubprocess:J,ipc:X},{reference:Y=!0,filter:G}={})=>{return yJ({methodName:"getOneMessage",isSubprocess:J,ipc:X,isConnected:E9($)}),yc({anyProcess:$,channel:Q,isSubprocess:J,filter:G,reference:Y})},yc=async({anyProcess:$,channel:Q,isSubprocess:J,filter:X,reference:Y})=>{O9(Q,Y);let G=$Q($,Q,J),W=new AbortController;try{return await Promise.race([hc(G,X,W),pc(G,J,W),uc(G,J,W)])}catch(q){throw hJ($),q}finally{W.abort(),F9(Q,Y)}},hc=async($,Q,{signal:J})=>{if(Q===void 0){let[X]=await Iq($,"message",{signal:J});return X}for await(let[X]of mc($,"message",{signal:J}))if(Q(X))return X},pc=async($,Q,{signal:J})=>{await Iq($,"disconnect",{signal:J}),OH(Q)},uc=async($,Q,{signal:J})=>{let[X]=await Iq($,"strict:error",{signal:J});throw D9(X,Q)};var M3=R(()=>{pJ();wY()});import{once as B3,on as gc}from"node:events";var Z3=({anyProcess:$,channel:Q,isSubprocess:J,ipc:X},{reference:Y=!0}={})=>Pq({anyProcess:$,channel:Q,isSubprocess:J,ipc:X,shouldAwait:!J,reference:Y}),Pq=({anyProcess:$,channel:Q,isSubprocess:J,ipc:X,shouldAwait:Y,reference:G})=>{yJ({methodName:"getEachMessage",isSubprocess:J,ipc:X,isConnected:E9($)}),O9(Q,G);let W=$Q($,Q,J),q=new AbortController,z={};return lc($,W,q),ic({ipcEmitter:W,isSubprocess:J,controller:q,state:z}),nc({anyProcess:$,channel:Q,ipcEmitter:W,isSubprocess:J,shouldAwait:Y,controller:q,state:z,reference:G})},lc=async($,Q,J)=>{try{await B3(Q,"disconnect",{signal:J.signal}),J.abort()}catch{}},ic=async({ipcEmitter:$,isSubprocess:Q,controller:J,state:X})=>{try{let[Y]=await B3($,"strict:error",{signal:J.signal});X.error=D9(Y,Q),J.abort()}catch{}},nc=async function*({anyProcess:$,channel:Q,ipcEmitter:J,isSubprocess:X,shouldAwait:Y,controller:G,state:W,reference:q}){try{for await(let[z]of gc(J,"message",{signal:G.signal}))H3(W),yield z}catch{H3(W)}finally{if(G.abort(),F9(Q,q),!X)hJ($);if(Y)await $}},H3=({error:$})=>{if($)throw $};var Tq=R(()=>{pJ();wY()});import w3 from"node:process";var j3=($,{ipc:Q})=>{Object.assign($,R3($,!1,Q))},L3=()=>{let $=w3,Q=!0,J=w3.channel!==void 0;return{...R3($,!0,J),getCancelSignal:eH.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:!0,ipc:J})}},R3=($,Q,J)=>({sendMessage:b9.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:Q,ipc:J}),getOneMessage:x3.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:Q,ipc:J}),getEachMessage:Z3.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:Q,ipc:J})});var Aq=R(()=>{f9();M3();Tq();T9()});import{ChildProcess as dc}from"node:child_process";import{PassThrough as ac,Readable as oc,Writable as sc,Duplex as rc}from"node:stream";var D3=({error:$,command:Q,escapedCommand:J,fileDescriptors:X,options:Y,startTime:G,verboseInfo:W})=>{Zq(X);let q=new dc;tc(q,X),Object.assign(q,{readable:ec,writable:$S,duplex:QS});let z=iJ({error:$,command:Q,escapedCommand:J,fileDescriptors:X,options:Y,startTime:G,isSync:!1}),K=JS(z,W,Y);return{subprocess:q,promise:K}},tc=($,Q)=>{let J=FY(),X=FY(),Y=FY(),G=Array.from({length:Q.length-3},FY),W=FY(),q=[J,X,Y,...G];Object.assign($,{stdin:J,stdout:X,stderr:Y,all:W,stdio:q})},FY=()=>{let $=new ac;return $.end(),$},ec=()=>new oc({read(){}}),$S=()=>new sc({write(){}}),QS=()=>new rc({read(){},write(){}}),JS=async($,Q,J)=>nJ($,Q,J);var _3=R(()=>{J6();NY();r9()});import{createReadStream as N3,createWriteStream as v3}from"node:fs";import{Buffer as XS}from"node:buffer";import{Readable as CY,Writable as YS,Duplex as GS}from"node:stream";var F3=($,Q)=>Q6(WS,$,Q,!1),IY=({type:$,optionName:Q})=>{throw TypeError(`The \`${Q}\` option cannot be ${QQ[$]}.`)},O3,WS;var C3=R(()=>{z6();J6();x$();O3={fileNumber:IY,generator:Nq,asyncGenerator:Nq,nodeStream:({value:$})=>({stream:$}),webTransform({value:{transform:$,writableObjectMode:Q,readableObjectMode:J}}){let X=Q||J;return{stream:GS.fromWeb($,{objectMode:X})}},duplex:({value:{transform:$}})=>({stream:$}),native(){}},WS={input:{...O3,fileUrl:({value:$})=>({stream:N3($)}),filePath:({value:{file:$}})=>({stream:N3($)}),webStream:({value:$})=>({stream:CY.fromWeb($)}),iterable:({value:$})=>({stream:CY.from($)}),asyncIterable:({value:$})=>({stream:CY.from($)}),string:({value:$})=>({stream:CY.from($)}),uint8Array:({value:$})=>({stream:CY.from(XS.from($))})},output:{...O3,fileUrl:({value:$})=>({stream:v3($)}),filePath:({value:{file:$,append:Q}})=>({stream:v3($,Q?{flags:"a"}:{})}),webStream:({value:$})=>({stream:YS.fromWeb($)}),iterable:IY,asyncIterable:IY,string:IY,uint8Array:IY}}});import{on as qS,once as I3}from"node:events";import{PassThrough as zS,getDefaultHighWaterMark as VS}from"node:stream";import{finished as A3}from"node:stream/promises";function uQ($){if(!Array.isArray($))throw TypeError(`Expected an array, got \`${typeof $}\`.`);for(let Y of $)Eq(Y);let Q=$.some(({readableObjectMode:Y})=>Y),J=KS($,Q),X=new E3({objectMode:Q,writableHighWaterMark:J,readableHighWaterMark:J});for(let Y of $)X.add(Y);return X}var KS=($,Q)=>{if($.length===0)return VS(Q);let J=$.filter(({readableObjectMode:X})=>X===Q).map(({readableHighWaterMark:X})=>X);return Math.max(...J)},E3,US=async($,Q,J)=>{U6($,P3);let X=new AbortController;try{await Promise.race([xS($,X),MS($,Q,J,X)])}finally{X.abort(),U6($,-P3)}},xS=async($,{signal:Q})=>{try{await A3($,{signal:Q,cleanup:!0})}catch(J){throw k3($,J),J}},MS=async($,Q,J,{signal:X})=>{for await(let[Y]of qS($,"unpipe",{signal:X}))if(Q.has(Y))Y.emit(J)},Eq=($)=>{if(typeof $?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof $}\`.`)},HS=async({passThroughStream:$,stream:Q,streams:J,ended:X,aborted:Y,onFinished:G,unpipeEvent:W})=>{U6($,T3);let q=new AbortController;try{await Promise.race([BS(G,Q,q),ZS({passThroughStream:$,stream:Q,streams:J,ended:X,aborted:Y,controller:q}),wS({stream:Q,streams:J,ended:X,aborted:Y,unpipeEvent:W,controller:q})])}finally{q.abort(),U6($,-T3)}if(J.size>0&&J.size===X.size+Y.size)if(X.size===0&&Y.size>0)kq($);else jS($)},BS=async($,Q,{signal:J})=>{try{if(await $,!J.aborted)kq(Q)}catch(X){if(!J.aborted)k3(Q,X)}},ZS=async({passThroughStream:$,stream:Q,streams:J,ended:X,aborted:Y,controller:{signal:G}})=>{try{if(await A3(Q,{signal:G,cleanup:!0,readable:!0,writable:!1}),J.has(Q))X.add(Q)}catch(W){if(G.aborted||!J.has(Q))return;if(c3(W))Y.add(Q);else S3($,W)}},wS=async({stream:$,streams:Q,ended:J,aborted:X,unpipeEvent:Y,controller:{signal:G}})=>{if(await I3($,Y,{signal:G}),!$.readable)return I3(G,"abort",{signal:G});Q.delete($),J.delete($),X.delete($)},jS=($)=>{if($.writable)$.end()},k3=($,Q)=>{if(c3(Q))kq($);else S3($,Q)},c3=($)=>$?.code==="ERR_STREAM_PREMATURE_CLOSE",kq=($)=>{if($.readable||$.writable)$.destroy()},S3=($,Q)=>{if(!$.destroyed)$.once("error",LS),$.destroy(Q)},LS=()=>{},U6=($,Q)=>{let J=$.getMaxListeners();if(J!==0&&J!==Number.POSITIVE_INFINITY)$.setMaxListeners(J+Q)},P3=2,T3=1;var x6=R(()=>{E3=class E3 extends zS{#Q=new Set([]);#J=new Set([]);#$=new Set([]);#X;#G=Symbol("unpipe");#Y=new WeakMap;add($){if(Eq($),this.#Q.has($))return;this.#Q.add($),this.#X??=US(this,this.#Q,this.#G);let Q=HS({passThroughStream:this,stream:$,streams:this.#Q,ended:this.#J,aborted:this.#$,onFinished:this.#X,unpipeEvent:this.#G});this.#Y.set($,Q),$.pipe(this,{end:!1})}async remove($){if(Eq($),!this.#Q.has($))return!1;let Q=this.#Y.get($);if(Q===void 0)return!1;return this.#Y.delete($),$.unpipe(this),await Q,!0}}});import{finished as b3}from"node:stream/promises";var aJ=($,Q)=>{$.pipe(Q),RS($,Q),DS($,Q)},RS=async($,Q)=>{if(o$($)||o$(Q))return;try{await b3($,{cleanup:!0,readable:!0,writable:!1})}catch{}cq(Q)},cq=($)=>{if($.writable)$.end()},DS=async($,Q)=>{if(o$($)||o$(Q))return;try{await b3(Q,{cleanup:!0,readable:!1,writable:!0})}catch{}Sq($)},Sq=($)=>{if($.readable)$.destroy()};var M6=R(()=>{O8()});var f3=($,Q,J)=>{let X=new Map;for(let[Y,{stdioItems:G,direction:W}]of Object.entries(Q)){for(let{stream:q}of G.filter(({type:z})=>c$.has(z)))_S($,q,W,Y);for(let{stream:q}of G.filter(({type:z})=>!c$.has(z)))vS({subprocess:$,stream:q,direction:W,fdNumber:Y,pipeGroups:X,controller:J})}for(let[Y,G]of X.entries()){let W=G.length===1?G[0]:uQ(G);aJ(W,Y)}},_S=($,Q,J,X)=>{if(J==="output")aJ($.stdio[X],Q);else aJ(Q,$.stdio[X]);let Y=NS[X];if(Y!==void 0)$[Y]=Q;$.stdio[X]=Q},NS,vS=({subprocess:$,stream:Q,direction:J,fdNumber:X,pipeGroups:Y,controller:G})=>{if(Q===void 0)return;OS(Q,G);let[W,q]=J==="output"?[Q,$.stdio[X]]:[$.stdio[X],Q],z=Y.get(W)??[];Y.set(W,[...z,q])},OS=($,{signal:Q})=>{if(o$($))bQ($,FS,Q)},FS=2;var m3=R(()=>{x6();O8();v9();x$();M6();NS=["stdin","stdout","stderr"]});var gQ;var y3=R(()=>{gQ=[];gQ.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")gQ.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")gQ.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class h3{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(fq[bq])return fq[bq];CS(fq,bq,{value:this,writable:!1,enumerable:!1,configurable:!1})}on($,Q){this.listeners[$].push(Q)}removeListener($,Q){let J=this.listeners[$],X=J.indexOf(Q);if(X===-1)return;if(X===0&&J.length===1)J.length=0;else J.splice(X,1)}emit($,Q,J){if(this.emitted[$])return!1;this.emitted[$]=!0;let X=!1;for(let Y of this.listeners[$])X=Y(Q,J)===!0||X;if($==="exit")X=this.emit("afterExit",Q,J)||X;return X}}class yq{}var H6=($)=>!!$&&typeof $==="object"&&typeof $.removeListener==="function"&&typeof $.emit==="function"&&typeof $.reallyExit==="function"&&typeof $.listeners==="function"&&typeof $.kill==="function"&&typeof $.pid==="number"&&typeof $.on==="function",bq,fq,CS,IS=($)=>{return{onExit(Q,J){return $.onExit(Q,J)},load(){return $.load()},unload(){return $.unload()}}},p3,u3,mq,g3,o70,s70;var l3=R(()=>{y3();bq=Symbol.for("signal-exit emitter"),fq=globalThis,CS=Object.defineProperty.bind(Object);p3=class p3 extends yq{onExit(){return()=>{}}load(){}unload(){}};u3=class u3 extends yq{#Q=mq.platform==="win32"?"SIGINT":"SIGHUP";#J=new h3;#$;#X;#G;#Y={};#W=!1;constructor($){super();this.#$=$,this.#Y={};for(let Q of gQ)this.#Y[Q]=()=>{let J=this.#$.listeners(Q),{count:X}=this.#J,Y=$;if(typeof Y.__signal_exit_emitter__==="object"&&typeof Y.__signal_exit_emitter__.count==="number")X+=Y.__signal_exit_emitter__.count;if(J.length===X){this.unload();let G=this.#J.emit("exit",null,Q),W=Q==="SIGHUP"?this.#Q:Q;if(!G)$.kill($.pid,W)}};this.#G=$.reallyExit,this.#X=$.emit}onExit($,Q){if(!H6(this.#$))return()=>{};if(this.#W===!1)this.load();let J=Q?.alwaysLast?"afterExit":"exit";return this.#J.on(J,$),()=>{if(this.#J.removeListener(J,$),this.#J.listeners.exit.length===0&&this.#J.listeners.afterExit.length===0)this.unload()}}load(){if(this.#W)return;this.#W=!0,this.#J.count+=1;for(let $ of gQ)try{let Q=this.#Y[$];if(Q)this.#$.on($,Q)}catch(Q){}this.#$.emit=($,...Q)=>{return this.#z($,...Q)},this.#$.reallyExit=($)=>{return this.#q($)}}unload(){if(!this.#W)return;this.#W=!1,gQ.forEach(($)=>{let Q=this.#Y[$];if(!Q)throw Error("Listener not defined for signal: "+$);try{this.#$.removeListener($,Q)}catch(J){}}),this.#$.emit=this.#X,this.#$.reallyExit=this.#G,this.#J.count-=1}#q($){if(!H6(this.#$))return 0;return this.#$.exitCode=$||0,this.#J.emit("exit",this.#$.exitCode,null),this.#G.call(this.#$,this.#$.exitCode)}#z($,...Q){let J=this.#X;if($==="exit"&&H6(this.#$)){if(typeof Q[0]==="number")this.#$.exitCode=Q[0];let X=J.call(this.#$,$,...Q);return this.#J.emit("exit",this.#$.exitCode,null),X}else return J.call(this.#$,$,...Q)}};mq=globalThis.process,{onExit:g3,load:o70,unload:s70}=IS(H6(mq)?new u3(mq):new p3)});import{addAbortListener as PS}from"node:events";var i3=($,{cleanup:Q,detached:J},{signal:X})=>{if(!Q||J)return;let Y=g3(()=>{$.kill()});PS(X,()=>{Y()})};var n3=R(()=>{l3()});var a3=({source:$,sourcePromise:Q,boundOptions:J,createNested:X},...Y)=>{let G=z9(),{destination:W,destinationStream:q,destinationError:z,from:K,unpipeSignal:V}=TS(J,X,Y),{sourceStream:U,sourceError:x}=ES($,K),{options:M,fileDescriptors:H}=x8.get($);return{sourcePromise:Q,sourceStream:U,sourceOptions:M,sourceError:x,destination:W,destinationStream:q,destinationError:z,unpipeSignal:V,fileDescriptors:H,startTime:G}},TS=($,Q,J)=>{try{let{destination:X,pipeOptions:{from:Y,to:G,unpipeSignal:W}={}}=AS($,Q,...J),q=N9(X,G);return{destination:X,destinationStream:q,from:Y,unpipeSignal:W}}catch(X){return{destinationError:X}}},AS=($,Q,J,...X)=>{if(Array.isArray(J))return{destination:Q(d3,$)(J,...X),pipeOptions:$};if(typeof J==="string"||J instanceof URL||MW(J)){if(Object.keys($).length>0)throw TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[Y,G,W]=r7(J,...X);return{destination:Q(d3)(Y,G,W),pipeOptions:W}}if(x8.has(J)){if(Object.keys($).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:J,pipeOptions:X[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${J}`)},d3=({options:$})=>({options:{...$,stdin:"pipe",piped:!0}}),ES=($,Q)=>{try{return{sourceStream:uJ($,Q)}}catch(J){return{sourceError:J}}};var o3=R(()=>{BW();V9();e8();kJ()});var r3=({sourceStream:$,sourceError:Q,destinationStream:J,destinationError:X,fileDescriptors:Y,sourceOptions:G,startTime:W})=>{let q=kS({sourceStream:$,sourceError:Q,destinationStream:J,destinationError:X});if(q!==void 0)throw hq({error:q,fileDescriptors:Y,sourceOptions:G,startTime:W})},kS=({sourceStream:$,sourceError:Q,destinationStream:J,destinationError:X})=>{if(Q!==void 0&&X!==void 0)return X;if(X!==void 0)return Sq($),X;if(Q!==void 0)return cq(J),Q},hq=({error:$,fileDescriptors:Q,sourceOptions:J,startTime:X})=>iJ({error:$,command:s3,escapedCommand:s3,fileDescriptors:Q,options:J,startTime:X,isSync:!1}),s3="source.pipe(destination)";var pq=R(()=>{NY();M6()});var t3=async($)=>{let[{status:Q,reason:J,value:X=J},{status:Y,reason:G,value:W=G}]=await $;if(!W.pipedFrom.includes(X))W.pipedFrom.push(X);if(Y==="rejected")throw W;if(Q==="rejected")throw X;return W};import{finished as cS}from"node:stream/promises";var e3=($,Q,J)=>{let X=B6.has(Q)?bS($,Q):SS($,Q);return bQ($,mS,J.signal),bQ(Q,yS,J.signal),fS(Q),X},SS=($,Q)=>{let J=uQ([$]);return aJ(J,Q),B6.set(Q,J),J},bS=($,Q)=>{let J=B6.get(Q);return J.add($),J},fS=async($)=>{try{await cS($,{cleanup:!0,readable:!1,writable:!0})}catch{}B6.delete($)},B6,mS=2,yS=1;var $w=R(()=>{x6();v9();M6();B6=new WeakMap});import{aborted as hS}from"node:util";var Qw=($,Q)=>$===void 0?[]:[pS($,Q)],pS=async($,{sourceStream:Q,mergedStream:J,fileDescriptors:X,sourceOptions:Y,startTime:G})=>{await hS($,Q),await J.remove(Q);let W=Error("Pipe canceled by `unpipeSignal` option.");throw hq({error:W,fileDescriptors:X,sourceOptions:Y,startTime:G})};var Jw=R(()=>{pq()});var Z6=($,...Q)=>{if(y0(Q[0]))return Z6.bind(void 0,{...$,boundOptions:{...$.boundOptions,...Q[0]}});let{destination:J,...X}=a3($,...Q),Y=uS({...X,destination:J});return Y.pipe=Z6.bind(void 0,{...$,source:J,sourcePromise:Y,boundOptions:{}}),Y},uS=async({sourcePromise:$,sourceStream:Q,sourceOptions:J,sourceError:X,destination:Y,destinationStream:G,destinationError:W,unpipeSignal:q,fileDescriptors:z,startTime:K})=>{let V=gS($,Y);r3({sourceStream:Q,sourceError:X,destinationStream:G,destinationError:W,fileDescriptors:z,sourceOptions:J,startTime:K});let U=new AbortController;try{let x=e3(Q,G,U);return await Promise.race([t3(V),...Qw(q,{sourceStream:Q,mergedStream:x,sourceOptions:J,fileDescriptors:z,startTime:K})])}finally{U.abort()}},gS=($,Q)=>Promise.allSettled([$,Q]);var Xw=R(()=>{o3();pq();$w();Jw()});import{on as lS}from"node:events";import{getDefaultHighWaterMark as iS}from"node:stream";var w6=({subprocessStdout:$,subprocess:Q,binary:J,shouldEncode:X,encoding:Y,preserveNewlines:G})=>{let W=new AbortController;return nS(Q,W),Gw({stream:$,controller:W,binary:J,shouldEncode:!$.readableObjectMode&&X,encoding:Y,shouldSplit:!$.readableObjectMode,preserveNewlines:G})},nS=async($,Q)=>{try{await $}catch{}finally{Q.abort()}},uq=({stream:$,onStreamEnd:Q,lines:J,encoding:X,stripFinalNewline:Y,allMixed:G})=>{let W=new AbortController;dS(Q,W,$);let q=$.readableObjectMode&&!G;return Gw({stream:$,controller:W,binary:X==="buffer",shouldEncode:!q,encoding:X,shouldSplit:!q&&J,preserveNewlines:!Y})},dS=async($,Q,J)=>{try{await $}catch{J.destroy()}finally{Q.abort()}},Gw=({stream:$,controller:Q,binary:J,shouldEncode:X,encoding:Y,shouldSplit:G,preserveNewlines:W})=>{let q=lS($,"data",{signal:Q.signal,highWaterMark:Yw,highWatermark:Yw});return aS({onStdoutChunk:q,controller:Q,binary:J,shouldEncode:X,encoding:Y,shouldSplit:G,preserveNewlines:W})},gq,Yw,aS=async function*({onStdoutChunk:$,controller:Q,binary:J,shouldEncode:X,encoding:Y,shouldSplit:G,preserveNewlines:W}){let q=oS({binary:J,shouldEncode:X,encoding:Y,shouldSplit:G,preserveNewlines:W});try{for await(let[z]of $)yield*pQ(z,q,0)}catch(z){if(!Q.signal.aborted)throw z}finally{yield*OY(q)}},oS=({binary:$,shouldEncode:Q,encoding:J,shouldSplit:X,preserveNewlines:Y})=>[G6($,J,!Q),X6($,Y,!X,{})].filter(Boolean);var j6=R(()=>{Rq();Y6();gq=iS(!0),Yw=gq});import{setImmediate as sS}from"node:timers/promises";var Ww=async({stream:$,onStreamEnd:Q,fdNumber:J,encoding:X,buffer:Y,maxBuffer:G,lines:W,allMixed:q,stripFinalNewline:z,verboseInfo:K,streamInfo:V})=>{let U=rS({stream:$,onStreamEnd:Q,fdNumber:J,encoding:X,allMixed:q,verboseInfo:K,streamInfo:V});if(!Y){await Promise.all([tS($),U]);return}let x=wq(z,J),M=uq({stream:$,onStreamEnd:Q,lines:W,encoding:X,stripFinalNewline:x,allMixed:q}),[H]=await Promise.all([eS({stream:$,iterable:M,fdNumber:J,encoding:X,maxBuffer:G,lines:W}),U]);return H},rS=async({stream:$,onStreamEnd:Q,fdNumber:J,encoding:X,allMixed:Y,verboseInfo:G,streamInfo:{fileDescriptors:W}})=>{if(!V6({stdioItems:W[J]?.stdioItems,encoding:X,verboseInfo:G,fdNumber:J}))return;let q=uq({stream:$,onStreamEnd:Q,lines:!0,encoding:X,stripFinalNewline:!0,allMixed:Y});await tZ(q,$,J,G)},tS=async($)=>{if(await sS(),$.readableFlowing===null)$.resume()},eS=async({stream:$,stream:{readableObjectMode:Q},iterable:J,fdNumber:X,encoding:Y,maxBuffer:G,lines:W})=>{try{if(Q||W)return await l9(J,{maxBuffer:G});if(Y==="buffer")return new Uint8Array(await i9(J,{maxBuffer:G}));return await d9(J,{maxBuffer:G})}catch(q){return qw(mB({error:q,stream:$,readableObjectMode:Q,lines:W,encoding:Y,fdNumber:X}))}},lq=async($)=>{try{return await $}catch(Q){return qw(Q)}},qw=({bufferedData:$})=>Ex($)?new Uint8Array($):$;var iq=R(()=>{a9();O$();vq();j6();yQ();vY()});import{finished as $b}from"node:stream/promises";var PY=async($,Q,J,{isSameDirection:X,stopOnExit:Y=!1}={})=>{let G=Qb($,J),W=new AbortController;try{await Promise.race([...Y?[J.exitPromise]:[],$b($,{cleanup:!0,signal:W.signal})])}catch(q){if(!G.stdinCleanedUp)Yb(q,Q,J,X)}finally{W.abort()}},Qb=($,{originalStreams:[Q],subprocess:J})=>{let X={stdinCleanedUp:!1};if($===Q)Jb($,J,X);return X},Jb=($,Q,J)=>{let{_destroy:X}=$;$._destroy=(...Y)=>{Xb(Q,J),X.call($,...Y)}},Xb=({exitCode:$,signalCode:Q},J)=>{if($!==null||Q!==null)J.stdinCleanedUp=!0},Yb=($,Q,J,X)=>{if(!Gb($,Q,J,X))throw $},Gb=($,Q,J,X=!0)=>{if(J.propagating)return zw($)||L6($);return J.propagating=!0,nq(J,Q)===X?zw($):L6($)},nq=({fileDescriptors:$},Q)=>Q!=="all"&&$[Q].direction==="input",L6=($)=>$?.code==="ERR_STREAM_PREMATURE_CLOSE",zw=($)=>$?.code==="EPIPE";var R6=()=>{};var Vw=({subprocess:$,encoding:Q,buffer:J,maxBuffer:X,lines:Y,stripFinalNewline:G,verboseInfo:W,streamInfo:q})=>$.stdio.map((z,K)=>dq({stream:z,fdNumber:K,encoding:Q,buffer:J[K],maxBuffer:X[K],lines:Y[K],allMixed:!1,stripFinalNewline:G,verboseInfo:W,streamInfo:q})),dq=async({stream:$,fdNumber:Q,encoding:J,buffer:X,maxBuffer:Y,lines:G,allMixed:W,stripFinalNewline:q,verboseInfo:z,streamInfo:K})=>{if(!$)return;let V=PY($,Q,K);if(nq(K,Q)){await V;return}let[U]=await Promise.all([Ww({stream:$,onStreamEnd:V,fdNumber:Q,encoding:J,buffer:X,maxBuffer:Y,lines:G,allMixed:W,stripFinalNewline:q,verboseInfo:z,streamInfo:K}),V]);return U};var aq=R(()=>{iq();R6()});var Kw=({stdout:$,stderr:Q},{all:J})=>J&&($||Q)?uQ([$,Q].filter(Boolean)):void 0,Uw=({subprocess:$,encoding:Q,buffer:J,maxBuffer:X,lines:Y,stripFinalNewline:G,verboseInfo:W,streamInfo:q})=>dq({...Wb($,J),fdNumber:"all",encoding:Q,maxBuffer:X[1]+X[2],lines:Y[1]||Y[2],allMixed:qb($),stripFinalNewline:G,verboseInfo:W,streamInfo:q}),Wb=({stdout:$,stderr:Q,all:J},[,X,Y])=>{let G=X||Y;if(!G)return{stream:J,buffer:G};if(!X)return{stream:Q,buffer:G};if(!Y)return{stream:$,buffer:G};return{stream:J,buffer:G}},qb=({all:$,stdout:Q,stderr:J})=>$&&Q&&J&&Q.readableObjectMode!==J.readableObjectMode;var oq=R(()=>{x6();aq()});var xw=($)=>SJ($,"ipc"),Mw=($,Q)=>{let J=q9($);V8({type:"ipc",verboseMessage:J,fdNumber:"ipc",verboseInfo:Q})};var Hw=R(()=>{bJ();r8()});var Bw=async({subprocess:$,buffer:Q,maxBuffer:J,ipc:X,ipcOutput:Y,verboseInfo:G})=>{if(!X)return Y;let W=xw(G),q=F8(Q,"ipc"),z=F8(J,"ipc");for await(let K of Pq({anyProcess:$,channel:$.channel,isSubprocess:!1,ipc:X,shouldAwait:!1,reference:!0})){if(q)yB($,Y,z),Y.push(K);if(W)Mw(K,G)}return Y},Zw=async($,Q)=>{return await Promise.allSettled([$]),Q};var ww=R(()=>{yQ();Hw();C8();Tq()});import{once as zb}from"node:events";var jw=async({subprocess:$,options:{encoding:Q,buffer:J,maxBuffer:X,lines:Y,timeoutDuration:G,cancelSignal:W,gracefulCancel:q,forceKillAfterDelay:z,stripFinalNewline:K,ipc:V,ipcInput:U},context:x,verboseInfo:M,fileDescriptors:H,originalStreams:w,onInternalError:j,controller:Z})=>{let L=G3($,x),D={originalStreams:w,fileDescriptors:H,subprocess:$,exitPromise:L,propagating:!1},F=Vw({subprocess:$,encoding:Q,buffer:J,maxBuffer:X,lines:Y,stripFinalNewline:K,verboseInfo:M,streamInfo:D}),J0=Uw({subprocess:$,encoding:Q,buffer:J,maxBuffer:X,lines:Y,stripFinalNewline:K,verboseInfo:M,streamInfo:D}),n=[],e=Bw({subprocess:$,buffer:J,maxBuffer:X,ipc:V,ipcOutput:n,verboseInfo:M}),y=Vb(w,$,D),p=Kb(H,D);try{return await Promise.race([Promise.all([{},q3(L),Promise.all(F),J0,e,VB($,U),...y,...p]),j,Ub($,Z),...YB($,G,x,Z),...vH({subprocess:$,cancelSignal:W,gracefulCancel:q,context:x,controller:Z}),...JB({subprocess:$,cancelSignal:W,gracefulCancel:q,forceKillAfterDelay:z,context:x,controller:Z})])}catch(W0){return x.terminationReason??="other",Promise.all([{error:W0},L,Promise.all(F.map((t)=>lq(t))),lq(J0),Zw(e,n),Promise.allSettled(y),Promise.allSettled(p)])}},Vb=($,Q,J)=>$.map((X,Y)=>X===Q.stdio[Y]?void 0:PY(X,Y,J)),Kb=($,Q)=>$.flatMap(({stdioItems:J},X)=>J.filter(({value:Y,stream:G=Y})=>r$(G,{checkOpen:!1})&&!o$(G)).map(({type:Y,value:G,stream:W=G})=>PY(W,X,Q,{isSameDirection:c$.has(Y),stopOnExit:Y==="native"}))),Ub=async($,{signal:Q})=>{let[J]=await zb($,"error",{signal:Q});throw J};var Lw=R(()=>{aW();yW();dW();O8();x$();iq();ww();sW();oq();aq();Cq();R6()});var Rw=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),TY=($,Q,J)=>{let X=$[J];if(!X.has(Q))X.set(Q,[]);let Y=X.get(Q),G=U8();return Y.push(G),{resolve:G.resolve.bind(G),promises:Y}},oJ=async({resolve:$,promises:Q},J)=>{$();let[X]=await Promise.race([Promise.allSettled([!0,J]),Promise.all([!1,...Q])]);return!X};var D6=()=>{};import{finished as Dw}from"node:stream/promises";var sq=async($)=>{if($===void 0)return;try{await rq($)}catch{}},_w=async($)=>{if($===void 0)return;try{await tq($)}catch{}},rq=async($)=>{await Dw($,{cleanup:!0,readable:!1,writable:!0})},tq=async($)=>{await Dw($,{cleanup:!0,readable:!0,writable:!1})},_6=async($,Q)=>{if(await $,Q)throw Q},N6=($,Q,J)=>{if(J&&!L6(J))$.destroy(J);else if(Q)$.destroy()};var eq=R(()=>{R6()});import{Readable as xb}from"node:stream";import{callbackify as Mb}from"node:util";var Nw=({subprocess:$,concurrentStreams:Q,encoding:J},{from:X,binary:Y=!0,preserveNewlines:G=!0}={})=>{let W=Y||F$.has(J),{subprocessStdout:q,waitReadableDestroy:z}=$z($,X,Q),{readableEncoding:K,readableObjectMode:V,readableHighWaterMark:U}=Qz(q,W),{read:x,onStdoutDataDone:M}=Jz({subprocessStdout:q,subprocess:$,binary:W,encoding:J,preserveNewlines:G}),H=new xb({read:x,destroy:Mb(Yz.bind(void 0,{subprocessStdout:q,subprocess:$,waitReadableDestroy:z})),highWaterMark:U,objectMode:V,encoding:K});return Xz({subprocessStdout:q,onStdoutDataDone:M,readable:H,subprocess:$}),H},$z=($,Q,J)=>{let X=uJ($,Q),Y=TY(J,X,"readableDestroy");return{subprocessStdout:X,waitReadableDestroy:Y}},Qz=({readableEncoding:$,readableObjectMode:Q,readableHighWaterMark:J},X)=>X?{readableEncoding:$,readableObjectMode:Q,readableHighWaterMark:J}:{readableEncoding:$,readableObjectMode:!0,readableHighWaterMark:gq},Jz=({subprocessStdout:$,subprocess:Q,binary:J,encoding:X,preserveNewlines:Y})=>{let G=U8(),W=w6({subprocessStdout:$,subprocess:Q,binary:J,shouldEncode:!J,encoding:X,preserveNewlines:Y});return{read(){Hb(this,W,G)},onStdoutDataDone:G}},Hb=async($,Q,J)=>{try{let{value:X,done:Y}=await Q.next();if(Y)J.resolve();else $.push(X)}catch{}},Xz=async({subprocessStdout:$,onStdoutDataDone:Q,readable:J,subprocess:X,subprocessStdin:Y})=>{try{if(await tq($),await X,await sq(Y),await Q,J.readable)J.push(null)}catch(G){await sq(Y),vw(J,G)}},Yz=async({subprocessStdout:$,subprocess:Q,waitReadableDestroy:J},X)=>{if(await oJ(J,Q))vw($,X),await _6(Q,X)},vw=($,Q)=>{N6($,$.readable,Q)};var Gz=R(()=>{fQ();e8();j6();D6();eq()});import{Writable as Bb}from"node:stream";import{callbackify as Ow}from"node:util";var Fw=({subprocess:$,concurrentStreams:Q},{to:J}={})=>{let{subprocessStdin:X,waitWritableFinal:Y,waitWritableDestroy:G}=Wz($,J,Q),W=new Bb({...qz(X,$,Y),destroy:Ow(Vz.bind(void 0,{subprocessStdin:X,subprocess:$,waitWritableFinal:Y,waitWritableDestroy:G})),highWaterMark:X.writableHighWaterMark,objectMode:X.writableObjectMode});return zz(X,W),W},Wz=($,Q,J)=>{let X=N9($,Q),Y=TY(J,X,"writableFinal"),G=TY(J,X,"writableDestroy");return{subprocessStdin:X,waitWritableFinal:Y,waitWritableDestroy:G}},qz=($,Q,J)=>({write:Zb.bind(void 0,$),final:Ow(wb.bind(void 0,$,Q,J))}),Zb=($,Q,J,X)=>{if($.write(Q,J))X();else $.once("drain",X)},wb=async($,Q,J)=>{if(await oJ(J,Q)){if($.writable)$.end();await Q}},zz=async($,Q,J)=>{try{if(await rq($),Q.writable)Q.end()}catch(X){await _w(J),Cw(Q,X)}},Vz=async({subprocessStdin:$,subprocess:Q,waitWritableFinal:J,waitWritableDestroy:X},Y)=>{if(await oJ(J,Q),await oJ(X,Q))Cw($,Y),await _6(Q,Y)},Cw=($,Q)=>{N6($,$.writable,Q)};var Kz=R(()=>{e8();D6();eq()});import{Duplex as jb}from"node:stream";import{callbackify as Lb}from"node:util";var Iw=({subprocess:$,concurrentStreams:Q,encoding:J},{from:X,to:Y,binary:G=!0,preserveNewlines:W=!0}={})=>{let q=G||F$.has(J),{subprocessStdout:z,waitReadableDestroy:K}=$z($,X,Q),{subprocessStdin:V,waitWritableFinal:U,waitWritableDestroy:x}=Wz($,Y,Q),{readableEncoding:M,readableObjectMode:H,readableHighWaterMark:w}=Qz(z,q),{read:j,onStdoutDataDone:Z}=Jz({subprocessStdout:z,subprocess:$,binary:q,encoding:J,preserveNewlines:W}),L=new jb({read:j,...qz(V,$,U),destroy:Lb(Rb.bind(void 0,{subprocessStdout:z,subprocessStdin:V,subprocess:$,waitReadableDestroy:K,waitWritableFinal:U,waitWritableDestroy:x})),readableHighWaterMark:w,writableHighWaterMark:V.writableHighWaterMark,readableObjectMode:H,writableObjectMode:V.writableObjectMode,encoding:M});return Xz({subprocessStdout:z,onStdoutDataDone:Z,readable:L,subprocess:$,subprocessStdin:V}),zz(V,L,z),L},Rb=async({subprocessStdout:$,subprocessStdin:Q,subprocess:J,waitReadableDestroy:X,waitWritableFinal:Y,waitWritableDestroy:G},W)=>{await Promise.all([Yz({subprocessStdout:$,subprocess:J,waitReadableDestroy:X},W),Vz({subprocessStdin:Q,subprocess:J,waitWritableFinal:Y,waitWritableDestroy:G},W)])};var Pw=R(()=>{fQ();Gz();Kz()});var Uz=($,Q,{from:J,binary:X=!1,preserveNewlines:Y=!1}={})=>{let G=X||F$.has(Q),W=uJ($,J),q=w6({subprocessStdout:W,subprocess:$,binary:G,shouldEncode:!0,encoding:Q,preserveNewlines:Y});return Db(q,W,$)},Db=async function*($,Q,J){try{yield*$}finally{if(Q.readable)Q.destroy();await J}};var Tw=R(()=>{fQ();e8();j6()});var Aw=($,{encoding:Q})=>{let J=Rw();$.readable=Nw.bind(void 0,{subprocess:$,concurrentStreams:J,encoding:Q}),$.writable=Fw.bind(void 0,{subprocess:$,concurrentStreams:J}),$.duplex=Iw.bind(void 0,{subprocess:$,concurrentStreams:J,encoding:Q}),$.iterable=Uz.bind(void 0,$,Q),$[Symbol.asyncIterator]=Uz.bind(void 0,$,Q,{})};var Ew=R(()=>{D6();Gz();Kz();Pw();Tw()});var kw=($,Q)=>{for(let[J,X]of Nb){let Y=X.value.bind(Q);Reflect.defineProperty($,J,{...X,value:Y})}},_b,Nb;var cw=R(()=>{_b=(async()=>{})().constructor.prototype,Nb=["then","catch","finally"].map(($)=>[$,Reflect.getOwnPropertyDescriptor(_b,$)])});import{setMaxListeners as vb}from"node:events";import{spawn as Ob}from"node:child_process";var Sw=($,Q,J,X)=>{let{file:Y,commandArguments:G,command:W,escapedCommand:q,startTime:z,verboseInfo:K,options:V,fileDescriptors:U}=Fb($,Q,J),{subprocess:x,promise:M}=Ib({file:Y,commandArguments:G,options:V,startTime:z,verboseInfo:K,command:W,escapedCommand:q,fileDescriptors:U});return x.pipe=Z6.bind(void 0,{source:x,sourcePromise:M,boundOptions:{},createNested:X}),kw(x,M),x8.set(x,{options:V,fileDescriptors:U}),x},Fb=($,Q,J)=>{let{command:X,escapedCommand:Y,startTime:G,verboseInfo:W}=K9($,Q,J),{file:q,commandArguments:z,options:K}=y9($,Q,J),V=Cb(K),U=F3(V,W);return{file:q,commandArguments:z,command:X,escapedCommand:Y,startTime:G,verboseInfo:W,options:V,fileDescriptors:U}},Cb=({timeout:$,signal:Q,...J})=>{if(Q!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...J,timeoutDuration:$}},Ib=({file:$,commandArguments:Q,options:J,startTime:X,verboseInfo:Y,command:G,escapedCommand:W,fileDescriptors:q})=>{let z;try{z=Ob(...h9($,Q,J))}catch(H){return D3({error:H,command:G,escapedCommand:W,fileDescriptors:q,options:J,startTime:X,verboseInfo:Y})}let K=new AbortController;vb(Number.POSITIVE_INFINITY,K.signal);let V=[...z.stdio];f3(z,q,K),i3(z,J,K);let U={},x=U8();z.kill=_H.bind(void 0,{kill:z.kill.bind(z),options:J,onInternalError:x,context:U,controller:K}),z.all=Kw(z,J),Aw(z,J),j3(z,J);let M=Pb({subprocess:z,options:J,startTime:X,verboseInfo:Y,fileDescriptors:q,originalStreams:V,command:G,escapedCommand:W,context:U,onInternalError:x,controller:K});return{subprocess:z,promise:M}},Pb=async({subprocess:$,options:Q,startTime:J,verboseInfo:X,fileDescriptors:Y,originalStreams:G,command:W,escapedCommand:q,context:z,onInternalError:K,controller:V})=>{let[U,[x,M],H,w,j]=await jw({subprocess:$,options:Q,context:z,verboseInfo:X,fileDescriptors:Y,originalStreams:G,onInternalError:K,controller:V});V.abort(),K.resolve();let Z=H.map((F,J0)=>T8(F,Q,J0)),L=T8(w,Q,"all"),D=Tb({errorInfo:U,exitCode:x,signal:M,stdio:Z,all:L,ipcOutput:j,context:z,options:Q,command:W,escapedCommand:q,startTime:J});return nJ(D,X,Q)},Tb=({errorInfo:$,exitCode:Q,signal:J,stdio:X,all:Y,ipcOutput:G,context:W,options:q,command:z,escapedCommand:K,startTime:V})=>("error"in $)?_Y({error:$.error,command:z,escapedCommand:K,timedOut:W.terminationReason==="timeout",isCanceled:W.terminationReason==="cancel"||W.terminationReason==="gracefulCancel",isGracefullyCanceled:W.terminationReason==="gracefulCancel",isMaxBuffer:$.error instanceof I8,isForcefullyTerminated:W.isForcefullyTerminated,exitCode:Q,signal:J,stdio:X,all:Y,ipcOutput:G,options:q,startTime:V,isSync:!1}):s9({command:z,escapedCommand:K,stdio:X,all:Y,ipcOutput:G,options:q,startTime:V});var bw=R(()=>{a9();vW();eW();e8();Aq();NY();r9();_3();C3();vY();m3();L9();n3();Xw();oq();Lw();Ew();cw()});var v6=($,Q)=>{let J=Object.fromEntries(Object.entries(Q).map(([X,Y])=>[X,Ab(X,$[X],Y)]));return{...$,...J}},Ab=($,Q,J)=>{if(Eb.has($)&&y0(Q)&&y0(J))return{...Q,...J};return J},Eb;var fw=R(()=>{C8();Eb=new Set(["env",...RW])});var JQ=($,Q,J,X)=>{let Y=(W,q,z)=>JQ(W,q,J,z),G=(...W)=>kb({mapArguments:$,deepOptions:J,boundOptions:Q,setBoundExeca:X,createNested:Y},...W);if(X!==void 0)X(G,Y,Q);return G},kb=({mapArguments:$,deepOptions:Q={},boundOptions:J={},setBoundExeca:X,createNested:Y},G,...W)=>{if(y0(G))return Y($,v6(J,G),X);let{file:q,commandArguments:z,options:K,isSync:V}=cb({mapArguments:$,firstArgument:G,nextArguments:W,deepOptions:Q,boundOptions:J});return V?K3(q,z,K):Sw(q,z,K,Y)},cb=({mapArguments:$,firstArgument:Q,nextArguments:J,deepOptions:X,boundOptions:Y})=>{let G=mx(Q)?yx(Q,J):[Q,...J],[W,q,z]=r7(...G),K=v6(v6(X,Y),z),{file:V=W,commandArguments:U=q,options:x=K,isSync:M=!1}=$({file:W,commandArguments:q,options:K});return{file:V,commandArguments:U,options:x,isSync:M}};var mw=R(()=>{BW();hx();U3();bw();fw()});var yw=({file:$,commandArguments:Q})=>pw($,Q),hw=({file:$,commandArguments:Q})=>({...pw($,Q),isSync:!0}),pw=($,Q)=>{if(Q.length>0)throw TypeError(`The command and its arguments must be passed as a single string: ${$} ${Q}.`);let[J,...X]=Sb($);return{file:J,commandArguments:X}},Sb=($)=>{if(typeof $!=="string")throw TypeError(`The command must be a string: ${String($)}.`);let Q=$.trim();if(Q==="")return[];let J=[];for(let X of Q.split(bb)){let Y=J.at(-1);if(Y&&Y.endsWith("\\"))J[J.length-1]=`${Y.slice(0,-1)} ${X}`;else J.push(X)}return J},bb;var uw=R(()=>{bb=/ +/g});var gw=($,Q,J)=>{$.sync=Q(fb,J),$.s=$.sync},lw=({options:$})=>iw($),fb=({options:$})=>({...iw($),isSync:!0}),iw=($)=>({options:{...mb($),...$}}),mb=({input:$,inputFile:Q,stdio:J})=>$===void 0&&Q===void 0&&J===void 0?{stdin:"inherit"}:{},nw;var dw=R(()=>{nw={preferLocal:!0}});var aw,y50,h50,p50,u50,g50,l50,i50,n50,d50;var ow=R(()=>{mw();uw();oW();dw();Aq();aw=JQ(()=>({})),y50=JQ(()=>({isSync:!0})),h50=JQ(yw),p50=JQ(hw),u50=JQ(WB),g50=JQ(lw,{},nw,gw),{sendMessage:l50,getOneMessage:i50,getEachMessage:n50,getCancelSignal:d50}=L3()});var ew={};qJ(ew,{skillDiff:()=>ob});import{mkdirSync as yb,mkdtempSync as hb,readdirSync as pb,readFileSync as ub,rmSync as gb,writeFileSync as lb}from"node:fs";import{tmpdir as ib}from"node:os";import{dirname as nb,join as sJ,relative as db,sep as ab}from"node:path";function sw($){let Q={},J=sJ($,t0),X=(Y)=>{for(let G of pb(Y,{withFileTypes:!0})){let W=sJ(Y,G.name);if(G.isDirectory())X(W);else if(G.isFile())Q[db(J,W).split(ab).join("/")]=ub(W,"utf8")}};try{X(J)}catch{}return Q}function rw($,Q,J){for(let[X,Y]of Object.entries(J)){let G=sJ($,Q,X);yb(nb(G),{recursive:!0}),lb(G,Y)}}function tw($,Q){return[...new Set([...Object.keys($),...Object.keys(Q)])].sort().filter((X)=>$[X]!==Q[X]).map((X)=>$[X]===void 0?` only yours: ${X}`:Q[X]===void 0?` only canonical: ${X}`:` differs: ${X}`)}async function ob($,Q={}){let{apiUrl:J,token:X}=await s0({apiUrlFlag:Q.apiUrlFlag,tokenFlag:Q.tokenFlag}).catch(()=>({})),Y=await s7(t0,{apiUrl:J,token:X}),G=Y?Object.fromEntries(Object.entries(Y.files).map(([K,V])=>[K.replace(/^fig\//,""),V])):sw(rJ()),W=Y?`engine registry (v${Y.version})`:`the CLI-bundled copy (v${AY()??"?"}) — the registry was unreachable`,q=sw($);if(process.stdout.write(`canonical: ${W}
|
|
80
|
+
installed: ${sJ($,t0)}
|
|
81
|
+
|
|
82
|
+
`),Object.keys(G).length===0){process.stdout.write(`No canonical /fig skill to compare against.
|
|
83
|
+
`);return}if(Object.keys(q).length===0){process.stdout.write(`No /fig skill installed at ${sJ($,t0)} — run \`figura skill install\`.
|
|
84
|
+
`+`The canonical skill has ${Object.keys(G).length} file(s):
|
|
85
|
+
`+tw(G,q).join(`
|
|
86
|
+
`)+`
|
|
87
|
+
`);return}let z=hb(sJ(ib(),"figura-skill-"));try{rw(z,"canonical",G),rw(z,"yours",q);let K=await aw("git",["diff","--no-index","--src-prefix=","--dst-prefix=","--","canonical","yours"],{cwd:z,stdio:"inherit",reject:!1});if(K.exitCode===0)process.stdout.write(`Your /fig skill matches the canonical one.
|
|
88
|
+
`);else if(K.exitCode!==1){let V=tw(G,q);process.stdout.write(V.length?V.join(`
|
|
89
|
+
`)+`
|
|
90
|
+
`:`Your /fig skill matches the canonical one.
|
|
91
|
+
`)}}finally{gb(z,{recursive:!0,force:!0})}}var $j=R(()=>{ow();N$();AJ();tJ()});import{createHash as sb}from"node:crypto";import{existsSync as XQ,mkdirSync as rb,readdirSync as lQ,readFileSync as C6,writeFileSync as tb,copyFileSync as eb,rmSync as O6}from"node:fs";import{homedir as F6}from"node:os";import{fileURLToPath as Qj}from"node:url";import{dirname as $f,join as T0,relative as Qf,sep as Jf}from"node:path";function Jj($,Q){try{return C6(T0($,Q),"utf8").trim()||null}catch{return null}}function I6($){try{let X=JSON.parse(C6(T0($,xz),"utf8"));if(X&&typeof X==="object"&&!Array.isArray(X))return X}catch{}let Q=Jj($,Mz),J=Jj($,Hz);if(Q==null&&J==null)return null;return{[t0]:{version:Q,hash:J}}}function Yj($,Q){let J={...I6($)??{},...Q};try{tb(T0($,xz),JSON.stringify(J,null,2)+`
|
|
92
|
+
`)}catch{return}for(let X of[Mz,Hz])try{O6(T0($,X),{force:!0})}catch{}}function eJ($){return I6($)?.[t0]?.version??null}function $X($){return I6($)?.[t0]?.hash??null}function EY($){let Q=I6($);if(!Q)return[];let J=[];for(let[X,Y]of Object.entries(Q)){if(!Y?.hash)continue;let G=Bz($,(W)=>W===X);if(G!=null&&G!==Y.hash)J.push(X)}return J.sort()}function Bz($,Q=P6){let J=[],X=(G)=>{for(let W of lQ(G,{withFileTypes:!0})){let q=T0(G,W.name);if(W.isDirectory())X(q);else if(W.isFile())J.push(q)}};try{for(let G of lQ($,{withFileTypes:!0}))if(G.isDirectory()&&Q(G.name))X(T0($,G.name))}catch{return null}if(J.length===0)return null;let Y=sb("sha256");for(let G of J.sort()){let W=Qf($,G).split(Jf).join("/");Y.update(W),Y.update("\x00"),Y.update(C6(G)),Y.update("\x00")}return Y.digest("hex").slice(0,16)}function iQ($){return Bz($,(Q)=>Q===t0)}function Xf(){try{return iQ(rJ())}catch{return null}}function Yf($){try{return JSON.parse(C6(T0($,"skills.json"),"utf8"))}catch{return null}}function AY($=t0){try{return Yf(rJ())?.skills?.[$]?.version??null}catch{return null}}function kY($){let{stamp:Q,stampedHash:J,installedHash:X,referenceHash:Y,referenceIsCanonical:G}=$;if(X==null)return"absent";if(Y!=null&&X===Y)return"pristine";if(J!=null&&X!==J)return"diverged";if(Q==null&&J==null)return"unstamped";if(Y==null||!G)return"unknown";if(J!=null)return"behind";return"diverged"}function Gf($){switch($){case"pristine":return"pristine";case"behind":return"stale";case"diverged":case"unstamped":return"modified";case"absent":return"absent";case"unknown":return}}function A8(){return{version:AY(),hash:Xf(),canonical:!1}}function Wf($=T0(F6(),".claude","skills"),Q=A8()){let J=eJ($),X=iQ($),Y=kY({stamp:J,stampedHash:$X($),installedHash:X,referenceHash:Q.hash,referenceIsCanonical:Q.canonical});return{version:J,hash:X,status:Gf(Y)}}function Gj($=A8()){return{channel:"cli",cliVersion:a$(),skill:Wf(T0(F6(),".claude","skills"),$)}}function Xj($){try{return lQ($,{withFileTypes:!0}).some((Q)=>Q.isDirectory()&&XQ(T0($,Q.name,"SKILL.md")))}catch{return!1}}function rJ(){let $=[new URL("../skills/",import.meta.url),new URL("../../skills/",import.meta.url)].map((J)=>Qj(J));for(let J of $)if(Xj(J))return J;let Q=Qj(new URL("./",import.meta.url));for(let J=0;J<8;J++){let X=T0(Q,".claude","skills");if(Xj(X))return X;let Y=$f(Q);if(Y===Q)break;Q=Y}I(`bundled skills not found — reinstall figura-cli:
|
|
93
|
+
`+" curl -fsSL https://figura.so/install.sh | bash")}function Wj($,Q){rb(Q,{recursive:!0});for(let J of lQ($,{withFileTypes:!0})){let X=T0($,J.name),Y=T0(Q,J.name);if(J.isDirectory())Wj(X,Y);else eb(X,Y)}}function qj($,Q){let J={};for(let{name:X,version:Y}of Q)J[X]={version:Y,hash:Bz($,(G)=>G===X)};return J}function Zz($,Q={}){let J=rJ(),X=new Set(Q.skip??[]),G=lQ(J,{withFileTypes:!0}).filter((W)=>W.isDirectory()&&P6(W.name)&&XQ(T0(J,W.name,"SKILL.md"))).map((W)=>W.name).filter((W)=>!X.has(W)).sort().map((W)=>{let q=T0($,W),z=XQ(T0(q,"SKILL.md"));return Wj(T0(J,W),q),{name:W,existed:z}});if(G.length)Yj($,qj($,G.map(({name:W})=>({name:W,version:AY(W)}))));return{baseDir:$,installed:G}}async function wz($,Q={}){let{fetchLatestSkill:J,verifySkillPayload:X,materializeSkill:Y,SkillHashMismatchError:G}=await Promise.resolve().then(() => (AJ(),xW)),W=rJ(),q=new Set(Q.skip??[]),z=lQ(W,{withFileTypes:!0}).filter((K)=>K.isDirectory()&&P6(K.name)&&XQ(T0(W,K.name,"SKILL.md"))).map((K)=>K.name).filter((K)=>!q.has(K)).sort();try{let K=[];for(let x of z){let M=await J(x,Q);if(!M)throw Error(`engine unreachable for skill '${x}'`);X(M),K.push(M)}let V=K.map((x)=>{let M=XQ(T0($,x.skill,"SKILL.md"));return Y($,x),{name:x.skill,existed:M}}),U=K.find((x)=>x.skill===t0)?.version??K[0]?.version??null;if(V.length)Yj($,qj($,K.map((x)=>({name:x.skill,version:x.version}))));return{baseDir:$,installed:V,source:"engine",version:U}}catch(K){if(K instanceof G)throw K;return{...Zz($,{skip:Q.skip}),source:"bundled",version:AY()}}}function zj($){let Q=[],J=[];try{J=lQ($,{withFileTypes:!0}).filter((X)=>X.isDirectory()&&P6(X.name)).map((X)=>X.name)}catch{return{removed:Q}}for(let X of J.sort()){let Y=T0($,X);if(!XQ(T0(Y,"SKILL.md")))continue;try{O6(Y,{recursive:!0,force:!0}),Q.push(X)}catch{}}if(Q.length)for(let X of[xz,Mz,Hz])try{O6(T0($,X),{force:!0})}catch{}return{removed:Q}}async function Vj($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(i(Q,"help")||i(Q,"h")||!X){process.stdout.write(qf+`
|
|
94
|
+
`);return}if(X!=="install"&&X!=="diff")I(`unknown subcommand 'skill ${X}'. Run \`figura skill --help\`.`);let Y=i(Q,"project"),G=h(Q,"dir")??(Y?T0(process.cwd(),".claude","skills"):T0(F6(),".claude","skills"));if(X==="diff"){let{skillDiff:M}=await Promise.resolve().then(() => ($j(),ew));await M(G,{apiUrlFlag:h(Q,"api-url"),tokenFlag:h(Q,"token")});return}let{resolveConfig:W}=await Promise.resolve().then(() => (N$(),sU)),{apiUrl:q,token:z}=await W({apiUrlFlag:h(Q,"api-url"),tokenFlag:h(Q,"token")}),K,V;try{let M=await wz(G,{apiUrl:q,token:z});K=M.installed,V=M.source}catch(M){let{SkillHashMismatchError:H}=await Promise.resolve().then(() => (AJ(),xW));if(M instanceof H)I(`${M.message}
|
|
95
|
+
`+"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 M}let U=K.map((M)=>M.name),x=K.map(({name:M,existed:H})=>` ${H?"updated":"installed"} ${M}${V==="engine"?"":" (bundled — engine unreachable)"}`);if(U.includes("fig")){let M=new Set([T0(G,"figura-fig"),T0(F6(),".claude","skills","figura-fig")]);for(let w of M)if(XQ(T0(w,"SKILL.md")))O6(w,{recursive:!0,force:!0}),x.push(` removed figura-fig (renamed → fig) — ${w}`);let H=T0(process.cwd(),".claude","skills","figura-fig");if(!M.has(H)&&XQ(T0(H,"SKILL.md")))x.push(` note: found ${H} (the old /figura-fig skill) — run \`figura skill install --project\` to replace it, then commit the removal`)}process.stdout.write(`Figura skills → ${G}
|
|
96
|
+
`+x.join(`
|
|
97
|
+
`)+'\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.
|
|
98
|
+
`:"")+"Re-run `figura skill install` after upgrading figura-cli to update.\n")}var xz=".figura-skills.json",Mz=".figura-version",Hz=".figura-skills-hash",t0="fig",qf=`figura skill — install + inspect Figura's Claude Code skills
|
|
48
99
|
|
|
49
100
|
Usage:
|
|
50
101
|
figura skill install [--project] [--dir <path>]
|
|
102
|
+
figura skill diff [--project] [--dir <path>]
|
|
51
103
|
|
|
52
|
-
Writes the bundled Figura skills (fig, figura-brand) into your Claude
|
|
53
|
-
skills directory. Re-run after upgrading figura-cli to update them.
|
|
104
|
+
install Writes the bundled Figura skills (fig, figura-brand) into your Claude
|
|
105
|
+
Code skills directory. Re-run after upgrading figura-cli to update them.
|
|
106
|
+
diff Shows what your installed /fig skill has that the canonical one does
|
|
107
|
+
not (and the reverse) — read-only, writes nothing.
|
|
54
108
|
|
|
55
109
|
Options:
|
|
56
110
|
--project Install into ./.claude/skills (the current repo) instead of
|
|
@@ -58,44 +112,44 @@ Options:
|
|
|
58
112
|
--dir <path> Install into a custom skills directory
|
|
59
113
|
--help, -h Show this help
|
|
60
114
|
|
|
61
|
-
Default target: ~/.claude/skills
|
|
62
|
-
|
|
63
|
-
`)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
`)
|
|
67
|
-
`)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
`)
|
|
71
|
-
|
|
115
|
+
Default target: ~/.claude/skills/`,P6=($)=>$==="fig"||$.startsWith("figura-");var tJ=R(()=>{r0();FJ()});v$();N$();r0();import{spawn as Pf}from"node:child_process";import{join as Tf}from"node:path";import{promises as Nx}from"node:fs";import{join as rI}from"node:path";var kQ=".mcp.json",a7={command:"figura",args:["mcp"]};function tI($){if(!$||typeof $!=="object")return!1;let Q=$;return Q.command===a7.command&&Array.isArray(Q.args)&&Q.args.length===a7.args.length&&Q.args.every((J,X)=>J===a7.args[X])}async function vx($=process.cwd()){let Q=rI($,kQ),J={},X=!1;try{let q=await Nx.readFile(Q,"utf8");X=!0;let z=JSON.parse(q);if(!z||typeof z!=="object"||Array.isArray(z))return{status:"unparsable",path:Q};J=z}catch(q){if(X)return{status:"unparsable",path:Q};if(q.code!=="ENOENT")return{status:"unparsable",path:Q}}let Y=J.mcpServers&&typeof J.mcpServers==="object"?J.mcpServers:{};if(tI(Y.figura))return{status:"present",path:Q};let G="figura"in Y?"updated":"added",W={...J,mcpServers:{...Y,figura:{...a7}}};return await Nx.writeFile(Q,JSON.stringify(W,null,2)+`
|
|
116
|
+
`),{status:G,path:Q}}import{promises as VW}from"node:fs";import{join as eI}from"node:path";function Ox($){return $.trim().replace(/^\/+/,"").replace(/\/+$/,"")}async function Fx($,Q=process.cwd(),J){let X=eI(Q,".gitignore"),Y=Ox($),G=J==null?[]:Array.isArray(J)?J:[J],W=G.map((V)=>`# ${V}`).join(`
|
|
117
|
+
`)+(G.length?`
|
|
118
|
+
`:"")+$+`
|
|
119
|
+
`,q=null;try{q=await VW.readFile(X,"utf8")}catch{q=null}if(q===null)return await VW.writeFile(X,W),"created";if(q.split(`
|
|
120
|
+
`).map((V)=>V.trim()).filter((V)=>V&&!V.startsWith("#")).some((V)=>Ox(V)===Y))return"present";let K="";if(q!==""){if(!q.endsWith(`
|
|
121
|
+
`))K+=`
|
|
122
|
+
`;if(G.length&&!q.endsWith(`
|
|
123
|
+
|
|
124
|
+
`))K+=`
|
|
125
|
+
`}return await VW.writeFile(X,q+K+W),"added"}r0();tJ();import{homedir as vf}from"node:os";import{join as Dj}from"node:path";r0();import{promises as QX}from"node:fs";import{homedir as jz}from"node:os";import{join as Lz}from"node:path";var S$=Lz(jz(),".claude","settings.json"),T6="figura doctor --session-start",zf=`figura hook install — keep Figura current on every Claude Code launch
|
|
72
126
|
|
|
73
127
|
Usage:
|
|
74
128
|
figura hook install [--uninstall]
|
|
75
129
|
|
|
76
|
-
Adds a SessionStart hook to ${
|
|
77
|
-
\`${
|
|
130
|
+
Adds a SessionStart hook to ${S$} that runs
|
|
131
|
+
\`${T6}\` — it reinstalls drifted skills in place and, when the CLI is
|
|
78
132
|
behind (checked at most once a day), prints a one-line notice to run
|
|
79
133
|
\`figura upgrade\`. It never self-executes an install and never blocks startup.
|
|
80
|
-
Re-running is safe; --uninstall removes it.`;function
|
|
81
|
-
`);return
|
|
82
|
-
`);return
|
|
83
|
-
`);return}let Y=
|
|
84
|
-
Add this SessionStart hook by hand: ${
|
|
85
|
-
`),process.exit(1)}let{settings:W,changed:
|
|
86
|
-
`:`Figura version check already installed in ${
|
|
87
|
-
`);return}await
|
|
88
|
-
`),process.stdout.write(Y?`Removed the Figura version check from ${
|
|
89
|
-
`:`Installed the Figura version check in ${
|
|
134
|
+
Re-running is safe; --uninstall removes it.`;function Rz($){return($.hooks??[]).some((Q)=>typeof Q.command==="string"&&Q.command.includes("figura doctor"))}function Kj($){let Q=$.hooks??{},J=Q.SessionStart??[];if(J.some(Rz))return{settings:$,changed:!1};return{settings:{...$,hooks:{...Q,SessionStart:[...J,{matcher:"",hooks:[{type:"command",command:T6}]}]}},changed:!0}}function Vf($){return($.hooks?.SessionStart??[]).some(Rz)}function Uj($){let Q=$.hooks?.SessionStart;if(!Q)return{settings:$,changed:!1};let J=Q.filter((Y)=>!Rz(Y));if(J.length===Q.length)return{settings:$,changed:!1};let X={...$.hooks};if(J.length)X.SessionStart=J;else delete X.SessionStart;return{settings:{...$,hooks:X},changed:!0}}async function A6($){try{let Q=await QX.readFile($,"utf8"),J=JSON.parse(Q);if(!J||typeof J!=="object"||Array.isArray(J))throw Error(`${$} is not a JSON object`);return J}catch(Q){if(Q.code==="ENOENT")return{};throw Q}}async function xj(){let $=await A6(S$),{settings:Q,changed:J}=Kj($);if(J)await QX.mkdir(Lz(jz(),".claude"),{recursive:!0}),await QX.writeFile(S$,JSON.stringify(Q,null,2)+`
|
|
135
|
+
`);return J}async function Mj(){let $;try{$=await A6(S$)}catch{return!1}let{settings:Q,changed:J}=Uj($);if(J)await QX.writeFile(S$,JSON.stringify(Q,null,2)+`
|
|
136
|
+
`);return J}async function Hj($=S$){try{return Vf(await A6($))}catch{return!1}}async function Bj($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(i(Q,"help")||i(Q,"h")||X&&X!=="install"){process.stdout.write(zf+`
|
|
137
|
+
`);return}let Y=i(Q,"uninstall"),G;try{G=await A6(S$)}catch(z){process.stderr.write(`figura: couldn't read ${S$} (${a(z)}).
|
|
138
|
+
Add this SessionStart hook by hand: ${T6}
|
|
139
|
+
`),process.exit(1)}let{settings:W,changed:q}=Y?Uj(G):Kj(G);if(!q){process.stdout.write(Y?`No Figura SessionStart hook was installed.
|
|
140
|
+
`:`Figura version check already installed in ${S$}.
|
|
141
|
+
`);return}await QX.mkdir(Lz(jz(),".claude"),{recursive:!0}),await QX.writeFile(S$,JSON.stringify(W,null,2)+`
|
|
142
|
+
`),process.stdout.write(Y?`Removed the Figura version check from ${S$}.
|
|
143
|
+
`:`Installed the Figura version check in ${S$} — it runs \`${T6}\`
|
|
90
144
|
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
|
|
145
|
+
`)}r0();FJ();zY();N$();import{spawnSync as Kf}from"node:child_process";import{promises as k8}from"node:fs";import{homedir as k6}from"node:os";import{join as c6}from"node:path";var Zj=3200,E8=c6(k6(),".claude","settings.json"),E6="figura statusline",YQ="\x1B[0m",wj="\x1B[2m",Uf="\x1B[38;2;255;177;58m",xf="\x1B[38;2;62;224;122m",Mf="\x1B[38;2;255;77;61m",Hf="\x1B[38;2;198;199;204m",Bf="\x1B[38;2;60;60;66m",Dz=[[255,77,61],[255,177,58],[62,224,122],[31,182,255],[106,92,255]];function Zf($,Q){let J=Q?[...Dz,Dz[0]]:Dz,Y=(Q?($%1+1)%1:Math.max(0,Math.min(1,$)))*(J.length-1),G=Math.min(J.length-2,Math.floor(Y)),W=Y-G,[q,z]=[J[G],J[G+1]];return[0,1,2].map((K)=>Math.round(q[K]+(z[K]-q[K])*W))}function wf($,Q){let J=[...$],X=J.length-1||1,Y=Q!==void 0;return J.map((G,W)=>{if(G===" ")return G;let[q,z,K]=Zf(W/X+(Q??0),Y);return`\x1B[38;2;${q};${z};${K}m${G}`}).join("")+YQ}function jf($,Q={}){let J=wf("⬡ figura",Q.phase);if(Q.team)J+=` ${Bf}·${YQ} ${Hf}@${Q.team}${YQ}`;if(Q.linked!==void 0)J+=Q.linked?` ${xf}●${YQ}`:` ${Mf}○${YQ} ${wj}login${YQ}`;if(J+=` ${wj}${$}${YQ}`,Q.latest&&D8(Q.latest,$))J+=` ${Uf}↑ ${Q.latest}${YQ}`;return J}function Lf($){return`'${$.replace(/'/g,"'\\''")}'`}function Rf($){let Q=/--wrap\s+'((?:[^']|'\\'')*)'/.exec($);if(!Q)return null;return Q[1].replace(/'\\''/g,"'")}function _z($,Q){let J=$?.command??"",X=J.includes(E6);if(Q){if(!X)return{statusLine:$??null,changed:!1};let Y=Rf(J);return Y?{statusLine:{type:"command",command:Y},changed:!0}:{statusLine:null,changed:!0}}if(X)return{statusLine:$??null,changed:!1};if(!$)return{statusLine:{type:"command",command:E6},changed:!0};return{statusLine:{type:"command",command:`${E6} --wrap ${Lf(J)}`},changed:!0}}async function Df($){let Q="";try{let K=[];for await(let V of process.stdin)K.push(Buffer.from(V));Q=Buffer.concat(K).toString("utf8")}catch{}let J="";if($)try{J=(Kf($,{shell:!0,input:Q,encoding:"utf8"}).stdout??"").replace(/\n+$/,"")}catch{}let X=a$(),Y,G,W;try{Y=(await s8()).latest}catch{}try{let K=await s0({});G=K.team,W=Boolean(K.token)}catch{}let q=Date.now()%Zj/Zj,z=jf(X,{latest:Y,team:G,phase:q,linked:W});process.stdout.write((J?`${J} · ${z}`:z)+`
|
|
146
|
+
`)}async function _f($){let Q={};try{let G=await k8.readFile(E8,"utf8"),W=JSON.parse(G);if(!W||typeof W!=="object"||Array.isArray(W))throw Error("settings.json is not a JSON object");Q=W}catch(G){if(G.code!=="ENOENT")process.stderr.write(`figura: couldn't read ${E8} (${a(G)}). Set statusLine to "${E6}" by hand.
|
|
147
|
+
`),process.exit(1)}let J=Q.statusLine,{statusLine:X,changed:Y}=_z(J,$);if(!Y){process.stdout.write($?`No Figura statusline was installed.
|
|
94
148
|
`:`Figura statusline already installed.
|
|
95
|
-
`);return}if(
|
|
96
|
-
`),process.stdout.write(
|
|
97
|
-
`:`Added the Figura badge to your status bar (${
|
|
98
|
-
`)}var
|
|
149
|
+
`);return}if(X===null)delete Q.statusLine;else Q.statusLine=X;await k8.mkdir(c6(k6(),".claude"),{recursive:!0}),await k8.writeFile(E8,JSON.stringify(Q,null,2)+`
|
|
150
|
+
`),process.stdout.write($?`Removed the Figura badge from ${E8}.
|
|
151
|
+
`:`Added the Figura badge to your status bar (${E8}). `+`It shows ⬡ figura <version>, with ↑ when an update is ready.
|
|
152
|
+
`)}var Nf=`figura statusline — a status-bar badge showing Figura is installed
|
|
99
153
|
|
|
100
154
|
Usage:
|
|
101
155
|
figura statusline [--wrap <cmd>] render the badge (used by the status bar)
|
|
@@ -104,10 +158,10 @@ Usage:
|
|
|
104
158
|
|
|
105
159
|
The badge reads ⬡ figura <version> and adds ↑ when \`figura doctor\` has found a
|
|
106
160
|
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(
|
|
109
|
-
`),!0}async function
|
|
110
|
-
`),!0}var
|
|
161
|
+
a caveman (or any other) badge keeps showing alongside Figura's.`;async function jj($){let{flags:Q,positionals:J}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(Nf+`
|
|
162
|
+
`);return}if(J[0]==="install")return _f(i(Q,"uninstall"));let X=typeof Q.wrap==="string"?Q.wrap:void 0;await Df(X)}async function Lj(){let $={};try{let X=await k8.readFile(E8,"utf8"),Y=JSON.parse(X);if(Y&&typeof Y==="object"&&!Array.isArray(Y))$=Y}catch{return!1}let{statusLine:Q,changed:J}=_z($.statusLine,!0);if(!J)return!1;if(Q===null)delete $.statusLine;else $.statusLine=Q;return await k8.mkdir(c6(k6(),".claude"),{recursive:!0}),await k8.writeFile(E8,JSON.stringify($,null,2)+`
|
|
163
|
+
`),!0}async function Rj(){let $={};try{let X=await k8.readFile(E8,"utf8"),Y=JSON.parse(X);if(Y&&typeof Y==="object"&&!Array.isArray(Y))$=Y}catch{}let{statusLine:Q,changed:J}=_z($.statusLine,!1);if(!J)return!1;return $.statusLine=Q,await k8.mkdir(c6(k6(),".claude"),{recursive:!0}),await k8.writeFile(E8,JSON.stringify($,null,2)+`
|
|
164
|
+
`),!0}function Of($){let Q=A8();return kY({stamp:eJ($),stampedHash:$X($),installedHash:iQ($),referenceHash:Q.hash,referenceIsCanonical:Q.canonical})}var _j={installSkills:Zz,classifySkills:Of,editedSkills:EY,uninstallSkills:zj,ensureHook:xj,disableHook:Mj,ensureStatusline:Rj,removeStatusline:Lj};function Ff(){return Dj(vf(),".claude","skills")}async function Nz($,Q=_j){let J={baseDir:$.skillsBaseDir};if($.skipSkills)J.skipped=!0;else try{let G=Q.classifySkills($.skillsBaseDir);if(G==="diverged"||G==="unstamped")J.preserved=G,J.skipped=!0;else{let W=Q.editedSkills($.skillsBaseDir);if(J.installed=Q.installSkills($.skillsBaseDir,{skip:W}).installed,W.length)J.preservedSkills=W}}catch(G){J.error=a(G)}let X={changed:!1};try{X.changed=await Q.ensureHook()}catch(G){X.error=a(G)}let Y={changed:!1};try{Y.changed=await Q.ensureStatusline()}catch(G){Y.error=a(G)}return{skills:J,hook:X,statusline:Y}}async function Cf($,Q=_j){let J={baseDir:$.skillsBaseDir};try{J.removed=Q.uninstallSkills($.skillsBaseDir).removed}catch(G){J.error=a(G)}let X={changed:!1};try{X.changed=await Q.disableHook()}catch(G){X.error=a(G)}let Y={changed:!1};try{Y.changed=await Q.removeStatusline()}catch(G){Y.error=a(G)}return{skills:J,hook:X,statusline:Y}}var If=`figura install — set up the full Claude Code integration in one command
|
|
111
165
|
|
|
112
166
|
Usage:
|
|
113
167
|
figura install [--project] [--dir <path>] [--uninstall]
|
|
@@ -126,13 +180,13 @@ Options:
|
|
|
126
180
|
the global ~/.claude/skills. The hook + badge are always global.
|
|
127
181
|
--dir <path> Install the skills into a custom directory
|
|
128
182
|
--uninstall Reverse all three
|
|
129
|
-
--help, -h Show this help`;async function
|
|
130
|
-
`);return}let
|
|
183
|
+
--help, -h Show this help`;async function Nj($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(If+`
|
|
184
|
+
`);return}let J=i(Q,"project"),X=h(Q,"dir")??(J?Dj(process.cwd(),".claude","skills"):Ff()),Y=i(Q,"uninstall"),G=Y?await Cf({skillsBaseDir:X}):await Nz({skillsBaseDir:X}),W=[];if(Y)W.push(G.skills.error?`! skills ${G.skills.error} — remove ${X} by hand`:`✓ skills removed ${(G.skills.removed??[]).map((q)=>"/"+q).join(", ")||"(none)"}`);else{let q=(G.skills.installed??[]).map((z)=>"/"+z.name).join(", ");if(W.push(G.skills.error?`! skills ${G.skills.error} — run: figura skill install`:G.skills.preserved?`~ skills kept your /fig skill (${G.skills.preserved} — it has bytes Figura didn't write) — run: figura skill diff, then figura skill install to adopt the canonical one`:`✓ skills ${X} — ${q||"(none bundled)"}`),G.skills.preservedSkills?.length)W.push(`~ skills kept your ${G.skills.preservedSkills.map((z)=>"/"+z).join(", ")} — they have local edits, so they were left untouched`)}W.push(G.hook.error?`! auto-update ${G.hook.error} — run: figura hook install${Y?" --uninstall":""}`:Y?`✓ auto-update ${G.hook.changed?"removed":"was not installed"}`:`✓ auto-update ${G.hook.changed?"installed":"already set"} — checks for updates each Claude Code launch`),W.push(G.statusline.error?`! badge ${G.statusline.error} — run: figura statusline install${Y?" --uninstall":""}`:Y?`✓ badge ${G.statusline.changed?"removed ⬡ figura from your status bar":"was not installed"}`:`✓ badge ${G.statusline.changed?"added ⬡ figura to your status bar":"already in your status bar"}`),process.stdout.write((Y?`Removed the Figura Claude Code integration:
|
|
131
185
|
`:`Set up the Figura Claude Code integration:
|
|
132
|
-
`)+W.map((
|
|
186
|
+
`)+W.map((q)=>" "+q).join(`
|
|
133
187
|
`)+`
|
|
134
188
|
`+(Y?"":`Restart Claude Code to load the skills and badge.
|
|
135
|
-
`))}var
|
|
189
|
+
`))}var Af=`figura login — authenticate and save credentials
|
|
136
190
|
|
|
137
191
|
Usage:
|
|
138
192
|
figura login [--token <fig_...>] [--no-browser] [--api-url <url>] [--project]
|
|
@@ -147,13 +201,13 @@ By default this opens your browser to a short authorize page — approve there a
|
|
|
147
201
|
the CLI picks up the credential automatically (no port, nothing to copy-paste;
|
|
148
202
|
works over SSH too). Use --no-browser to print the URL instead of opening it, or
|
|
149
203
|
--token to pass a token directly (CI / headless). Credentials are written to
|
|
150
|
-
${
|
|
204
|
+
${_$} (mode 0600).
|
|
151
205
|
|
|
152
206
|
--project sets a repo up end-to-end from one command. In the current directory it:
|
|
153
|
-
• writes ${
|
|
207
|
+
• writes ${EQ} (the team token) and pins every figura call in
|
|
154
208
|
this tree to that team — one team per repo;
|
|
155
209
|
• adds .figura/ to .gitignore so the live token is never committed;
|
|
156
|
-
• registers the Figura MCP in ${
|
|
210
|
+
• registers the Figura MCP in ${kQ} so Claude Code wires it up on
|
|
157
211
|
its own — no manual \`claude mcp add\` (--no-mcp to skip);
|
|
158
212
|
• installs the /fig and /figura-brand skills into .claude/skills (--no-skills
|
|
159
213
|
to skip);
|
|
@@ -161,36 +215,36 @@ ${i0} (mode 0600).
|
|
|
161
215
|
date (see \`figura hook install\`);
|
|
162
216
|
• adds a "⬡ figura" badge to the Claude Code status bar (wrapping any existing
|
|
163
217
|
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
|
|
167
|
-
To sign in, open this URL and confirm the code ${
|
|
218
|
+
${kQ} and .claude/skills hold no token, so commit them to share the
|
|
219
|
+
setup — teammates just run \`figura login --project\` for their own credential.`;function Ef($){try{let Q=process.platform==="darwin"?"open":process.platform==="win32"?"cmd":"xdg-open",J=process.platform==="win32"?["/c","start","",$]:[$],X=Pf(Q,J,{stdio:"ignore",detached:!0});X.on("error",()=>{}),X.unref()}catch{}}var kf=($)=>new Promise((Q)=>setTimeout(Q,$));async function cf($,Q){try{if((await z0("/v1/brand",{token:$,apiUrl:Q,source:V0})).isCustom)return null;return`Next: your team has no brand profile yet — figs render with the built-in neutral look.
|
|
220
|
+
`+'In Claude Code, run /figura-brand (or say "introduce this repo to Figura") to set your design system.'}catch{return null}}async function Sf($,Q){let J=await z0("/v1/cli/device",{method:"POST",apiUrl:$,source:V0}),X=J.verification_uri_complete||J.verification_uri;if(process.stdout.write(`
|
|
221
|
+
To sign in, open this URL and confirm the code ${J.user_code}:
|
|
168
222
|
|
|
169
|
-
${
|
|
223
|
+
${X}
|
|
170
224
|
|
|
171
|
-
`)
|
|
172
|
-
`);let Y=Math.max(1,
|
|
173
|
-
`);return}let
|
|
174
|
-
Retry, or pass --token <fig_...> for CI/headless.`)}if(!
|
|
225
|
+
`),Q)Ef(X);process.stdout.write(`Waiting for authorization...
|
|
226
|
+
`);let Y=Math.max(1,J.interval??5)*1000,G=Date.now()+(J.expires_in??600)*1000;while(Date.now()<G){await kf(Y);let W;try{W=await z0("/v1/cli/device/token",{method:"POST",apiUrl:$,source:V0,body:{device_code:J.device_code}})}catch(q){if(q instanceof N8&&q.status===0)continue;throw q}if(W.token)return W.token}throw Error("timed out waiting for authorization")}async function vz($){let{flags:Q}=Q0($);if(Q.help||Q.h){process.stdout.write(Af+`
|
|
227
|
+
`);return}let J=process.env.FIGURA_API_URL||h(Q,"api-url")||IJ,X=process.env.FIGURA_TOKEN||h(Q,"token");if(!X)try{X=await Sf(J,!i(Q,"no-browser"))}catch(q){I(`login failed: ${a(q)}
|
|
228
|
+
Retry, or pass --token <fig_...> for CI/headless.`)}if(!X)I("A token is required.");let Y;try{Y=await z0("/v1/whoami",{token:X,apiUrl:J,source:V0})}catch(q){I(`token validation failed: ${a(q)}`)}let G=Y.team?.name||Y.team?.slug||Y.team?.id||"your team";if(i(Q,"project")){let q=process.cwd();await JW({apiUrl:J,token:X,team:Y.team?.slug||Y.team?.id},q);let z=[`✓ token ${EQ}`];try{let U=await Fx(".figura/",q,"Figura CLI credentials (figura login --project) — holds a live API token; never commit");z.push(`✓ gitignore .figura/ ${U==="present"?"already ignored":"ignored"}`)}catch(U){z.push(`! gitignore couldn't update .gitignore (${a(U)}) — ignore .figura/ by hand`)}if(i(Q,"no-mcp"))z.push("- MCP skipped (--no-mcp)");else try{let U=await vx(q);z.push(U.status==="unparsable"?`! MCP ${kQ} unparsable — add by hand: claude mcp add figura -- figura mcp`:`✓ MCP ${kQ} — restart Claude Code and approve`)}catch(U){z.push(`! MCP couldn't write ${kQ} (${a(U)}) — add by hand: claude mcp add figura -- figura mcp`)}let K=await Nz({skillsBaseDir:Tf(q,".claude","skills"),skipSkills:i(Q,"no-skills")});if(K.skills.preserved)z.push(`~ skills kept your /fig skill (${K.skills.preserved} — it has bytes Figura didn't write) — run: figura skill diff, then figura skill install to adopt the canonical one`);else if(K.skills.skipped)z.push("- skills skipped (--no-skills)");else if(K.skills.error)z.push(`! skills couldn't install skills (${K.skills.error}) — run: figura skill install --project`);else{let U=(K.skills.installed??[]).map((x)=>"/"+x.name).join(", ");z.push(`✓ skills .claude/skills — ${U||"(none bundled)"}`)}if(K.skills.preservedSkills?.length)z.push(`~ skills kept your ${K.skills.preservedSkills.map((U)=>"/"+U).join(", ")} — they have local edits, so they were left untouched`);z.push(K.hook.error?`! auto-update couldn't install the update hook (${K.hook.error}) — run: figura hook install`:`✓ auto-update ${K.hook.changed?"installed":"already set"} — checks for updates each Claude Code launch`),z.push(K.statusline.error?`! badge couldn't add the status-bar badge (${K.statusline.error}) — run: figura statusline install`:`✓ badge ${K.statusline.changed?"added ⬡ figura to your status bar":"already in your status bar"}`),process.stdout.write(`Logged in to ${G}.
|
|
175
229
|
|
|
176
230
|
Set up this repo:
|
|
177
|
-
`+
|
|
231
|
+
`+z.map((U)=>" "+U).join(`
|
|
178
232
|
`)+`
|
|
179
|
-
`);let
|
|
180
|
-
`+
|
|
181
|
-
`);return}let W=await
|
|
182
|
-
`),
|
|
183
|
-
`)}
|
|
233
|
+
`);let V=await cf(X,J);if(V)process.stdout.write(`
|
|
234
|
+
`+V+`
|
|
235
|
+
`);return}let W=await g7();if(await QW({...W,apiUrl:J,token:X,team:Y.team?.slug||Y.team?.id||W.team}),process.stdout.write(`Logged in to ${G}. Credentials saved to ${_$}
|
|
236
|
+
`),_x())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.
|
|
237
|
+
`)}v$();r0();N$();var bf=`figura whoami — show the authenticated identity
|
|
184
238
|
|
|
185
239
|
Also reports the BINDING: which config tier supplied the token (env, --token,
|
|
186
240
|
this repo's .figura/config.json, or the global ~/.figura fallback). A 'global'
|
|
187
241
|
binding means nothing pins this directory to that team — run \`figura link\`.
|
|
188
242
|
|
|
189
243
|
Usage:
|
|
190
|
-
figura whoami [--json]`;async function
|
|
191
|
-
`);return}let
|
|
244
|
+
figura whoami [--json]`;async function vj($){let{flags:Q}=Q0($);if(Q.help||Q.h){process.stdout.write(bf+`
|
|
245
|
+
`);return}let J=await N0(Q),{token:X,apiUrl:Y,tokenSource:G,projectConfigPath:W}=J,q;try{q=await z0("/v1/whoami",{token:X,apiUrl:Y,source:V0})}catch(V){I(a(V))}let z={source:G,configPath:G==="project"?W:G==="global"?_$:null};if(i(Q,"json")){L0({...q,binding:z});return}let K=[];if(q.user){let V=q.user,U=V.name&&V.email?`${V.name} (${V.email})`:V.email??V.name??V.id??"";K.push(`user: ${U}`)}else K.push(`actor: ${q.actor??"token"}`);if(q.team)K.push(`team: ${q.team.name??""} (${q.team.slug??q.team.id??""})`);if(q.token)K.push(`token: ${q.token.name??q.token.prefix??q.token.id??""}`);if(q.scopes?.length)K.push(`scopes: ${q.scopes.join(", ")}`);K.push(`bound: ${z.source}${z.configPath?` (${z.configPath})`:""}`+(z.source==="global"?" — not pinned to this repo; run `figura link`":"")),process.stdout.write(K.join(`
|
|
192
246
|
`)+`
|
|
193
|
-
`)}
|
|
247
|
+
`)}v$();r0();import{readFileSync as S6}from"node:fs";var b6=`figura brand — show or set your team's brand profile (design system)
|
|
194
248
|
|
|
195
249
|
The /fig skill and generator render with these tokens. Falls back to the built-in
|
|
196
250
|
neutral profile until your team sets its own.
|
|
@@ -243,27 +297,27 @@ you by scanning your repo ("introduce my repo to Figura").
|
|
|
243
297
|
|
|
244
298
|
Both forms print WHICH team they're bound to and from where. In a directory that
|
|
245
299
|
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:
|
|
300
|
+
~/.figura fallback — run \`figura link\` first, or pass --allow-global to override.`,Oj=["mobile","web","desktop"];async function Oz(){let $=[];for await(let Q of process.stdin)$.push(Buffer.from(Q));return Buffer.concat($).toString("utf8")}async function Fj($){let Q=$[0]&&!$[0].startsWith("-")?$[0]:void 0;if(Q==="set")return ff($.slice(1));if(Q==="structure")return yf($.slice(1));if(Q==="schema")return mf($.slice(1));let{flags:J}=Q0($);if(i(J,"help")||i(J,"h")){process.stdout.write(b6+`
|
|
301
|
+
`);return}let{token:X,apiUrl:Y}=await N0(J,{announce:!0}),G=h(J,"platform");if(G!==void 0&&!Oj.includes(G))I(`--platform must be one of ${Oj.join(", ")}`);let W=G?`/v1/brand?platform=${encodeURIComponent(G)}`:"/v1/brand",q;try{q=await z0(W,{token:X,apiUrl:Y,source:V0})}catch(V){I(a(V))}if(i(J,"json")){L0(q);return}let z=[],K=q.kind==="starter"||!q.kind&&!q.isCustom?" (starter kit — no brand set; run `figura brand set` to customize)":"";if(z.push(`name: ${q.name??""}${K}`),z.push(`product: ${q.appDescription??""}`),z.push(`tokens: ${(q.tokensBlock??"").length} chars`),z.push(`surfaces: ${(q.surfaces??[]).join(", ")||"(none)"}`),z.push(`forbidden: ${(q.forbidden??"").length} chars`),z.push(`platform: ${q.platformProfile??"(unknown — Studio uses its own defaults)"}`),q.availablePlatforms?.length||q.colors?.length)z.push(`structured: ${(q.colors??[]).length} colors, surfaces for [${(q.availablePlatforms??[]).join(", ")}]${q.platform?` (composed for ${q.platform})`:""}`);process.stdout.write(z.join(`
|
|
248
302
|
`)+`
|
|
249
|
-
`)}async function
|
|
250
|
-
`);return}let{token:
|
|
251
|
-
${(
|
|
252
|
-
`)}async function
|
|
253
|
-
`);return}let{token:
|
|
254
|
-
`);return}let{token:
|
|
303
|
+
`)}async function ff($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(b6+`
|
|
304
|
+
`);return}let{token:J,apiUrl:X}=await N0(Q,{mutate:!0}),Y=h(Q,"name");if(!Y)I("--name is required for `brand set`.");let G={name:Y},W=h(Q,"description");if(W!==void 0)G.appDescription=W;let q=h(Q,"tokens");if(q==="-")G.tokensBlock=await Oz();else if(q&&q.startsWith("@"))try{G.tokensBlock=S6(q.slice(1),"utf8")}catch(x){I(`could not read --tokens file ${q.slice(1)}: ${a(x)}`)}else if(q!==void 0)G.tokensBlock=q;let z=h(Q,"surfaces");if(z!==void 0)G.surfaces=z.split(",").map((x)=>x.trim()).filter((x)=>x.length>0);let K=h(Q,"structured");if(K!==void 0){let x;if(K==="-")x=await Oz();else if(K.startsWith("@"))try{x=S6(K.slice(1),"utf8")}catch(w){return I(`could not read --structured file ${K.slice(1)}: ${a(w)}`)}else x=K;let M;try{M=JSON.parse(x)}catch(w){return I(`--structured must be valid JSON: ${a(w)}`)}if(typeof M!=="object"||M===null||Array.isArray(M))return I('--structured must be a JSON object like { "identity": {…}, "platforms": {…} }');let H=M;if(H.identity===void 0&&H.platforms===void 0)return I('--structured JSON must have an "identity" and/or "platforms" key');if(H.identity!==void 0)G.identity=H.identity;if(H.platforms!==void 0)G.platforms=H.platforms}let V=h(Q,"prose-source");if(V!==void 0)if(V==="-")return I("--prose-source cannot read stdin (- is reserved for --structured); pass @file or literal text.");else if(V.startsWith("@"))try{G.proseSource=S6(V.slice(1),"utf8")}catch(x){return I(`could not read --prose-source file ${V.slice(1)}: ${a(x)}`)}else G.proseSource=V;let U;try{U=await z0("/brand",{method:"PUT",body:G,token:J,apiUrl:X,source:V0})}catch(x){I(a(x))}if(i(Q,"json")){L0(U);return}process.stdout.write(`Brand saved: ${U.name}
|
|
305
|
+
${(U.tokensBlock??"").length} chars of tokens — the /fig generator now renders on-brand.
|
|
306
|
+
`)}async function mf($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(b6+`
|
|
307
|
+
`);return}let{token:J,apiUrl:X}=await N0(Q),Y;try{Y=await z0("/v1/brand/schema",{token:J,apiUrl:X,source:V0})}catch(G){I(a(G))}L0(Y.schema??Y)}async function yf($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(b6+`
|
|
308
|
+
`);return}let{token:J,apiUrl:X}=await N0(Q,{mutate:!0}),Y=h(Q,"prose"),G;if(Y===void 0||Y==="-")G=await Oz();else if(Y.startsWith("@"))try{G=S6(Y.slice(1),"utf8")}catch(q){return I(`could not read --prose file ${Y.slice(1)}: ${a(q)}`)}else G=Y;if(!G.trim())I("no prose to structure — pass --prose @file / - / text or pipe it in.");let W;try{W=await z0("/brand/structure",{method:"POST",body:{prose:G},token:J,apiUrl:X,source:V0})}catch(q){I(a(q))}L0(W)}v$();r0();var hf=`figura teams — list teams accessible to the current credentials
|
|
255
309
|
|
|
256
310
|
Usage:
|
|
257
|
-
figura teams [--json]`;async function
|
|
258
|
-
`);return}let{token:
|
|
259
|
-
`);return}for(let W of
|
|
260
|
-
`)}}
|
|
311
|
+
figura teams [--json]`;async function Cj($){let{flags:Q}=Q0($);if(Q.help||Q.h){process.stdout.write(hf+`
|
|
312
|
+
`);return}let{token:J,apiUrl:X}=await N0(Q),Y;try{Y=await z0("/v1/teams",{token:J,apiUrl:X,source:V0})}catch(W){I(a(W))}let G=Array.isArray(Y)?Y:Y.teams??[];if(i(Q,"json")){L0(G);return}if(!G.length){process.stdout.write(`No teams.
|
|
313
|
+
`);return}for(let W of G){let q=W.role?` [${W.role}]`:"";process.stdout.write(`${W.slug} ${W.name}${q} ${W.id}
|
|
314
|
+
`)}}import{promises as mj}from"node:fs";import{spawn as rf}from"node:child_process";var pf=/<iframe\b[^>]*\bdata-fig-child\s*=\s*"([^"]+)"[^>]*><\/iframe>/gi,uf=new RegExp('<\\w+\\b[^>]*\\bdata-fig-slot="(\\d+)"[^>]*>',"gi"),gf=new RegExp(`${pf.source}|<div\\b[^>]*\\bclass\\s*=\\s*"[^"]*(?<![\\w-])fig-cz(?![\\w-])`,"gi"),Ij=($)=>new RegExp('\\bdata-fig-child="([^"]+)"',"i").exec($)?.[1]??null,Pj=($)=>lf(/\btitle\s*=\s*"([^"]*)"/i.exec($)?.[1]??"");function lf($){return $.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/&/g,"&")}function nf($){return typeof $==="string"&&$.includes("data-fig-child")}function df($){let Q=$??"";if(!nf(Q)&&!Q.includes("data-fig-slot"))return[];let J=new Map;for(let X of Q.matchAll(uf)){let Y=Number(X[1]),G=J.get(Y);if(!G){J.set(Y,{position:Y,figId:Ij(X[0]),title:Pj(X[0])});continue}if(!G.figId)J.set(Y,{...G,figId:Ij(X[0])})}if(J.size)return[...J.values()].sort((X,Y)=>X.position-Y.position);return[...Q.matchAll(gf)].map((X,Y)=>({position:Y,figId:X[1]??null,title:Pj(X[0])}))}function Tj($){return df($).filter((Q)=>Q.figId!==null)}function Aj($,Q){return $.figId===Q||!$.trackLatest&&$.pinnedFigId===Q}function Ej($,Q){let J=(Q??"").trim(),X=$+1;return J&&J!=="Screen"?`screen ${X} (${J})`:`screen ${X}`}var rG0="This fig composes its screens by reference, so it cannot be revised as text: its children are typed references with pinned versions and labels, and a text revise would leave them behind on the old version. Revise it by TYPED SCREENS "+"instead — send `layout` + `screens` (the same shape compose takes) and it "+"re-composes, carrying every pin, label and position forward; a blank screen slot keeps whatever was in it (#875 S5).";var af="data-fig-screen-unavailable";function kj($){return($??"").includes(af)}var tG0="A child fig has no share link of its own: it is a frameless screen another fig frames, and it is reachable through any parent that references it. "+"Publish the PARENT — its children are served with it (#875 S4).";function cj($){return"This fig composes other figs. Its screens are served per request, so the "+"stored document is a set of references, not renderable bytes — printing it "+"would show empty frames. Open the hosted fig instead"+($?`: ${$}`:".")}v$();r0();var of=process.env.FIGURA_APP_URL?.replace(/\/+$/,"")||"https://figura.so";function Sj($){return`'${$.replace(/'/g,"'\\''")}'`}function sf($,Q,J){return`## ${$}
|
|
261
315
|
|
|
262
|
-
[Open the fig →](${
|
|
316
|
+
[Open the fig →](${Q})
|
|
263
317
|
|
|
264
|
-
}var
|
|
318
|
+

|
|
319
|
+
`}function bj($){let Q=($.appOrigin??of).replace(/\/+$/,""),J=$.publicId,X=$.title||"Untitled fig",Y=$.isPublic===!0,G=`${Q}/f/${J}`,W=`${G}/opengraph-image`,q=Y?G:$.viewUrl||G,z=$.channel||"<CHANNEL>",K=`buzz messages send --channel ${z} --content ${Sj(`${X}: ${G}`)}`,V=`buzz canvas set --channel ${z} --content ${Sj(sf(X,G,W))}`,U={figId:$.figId,title:X,published:Y,link:q,externalLink:G,ogImage:W,buzz:{message:K,canvas:V}};if(!Y)U.note="This fig is a draft — the public link + OG preview don't resolve until it's "+`published. Run \`figura fig publish ${$.figId}\` first, then post ${G}.`;return U}function fj($){let Q=[];if(Q.push($.title),Q.push($.published?"(published)":"(draft — not shareable yet)"),Q.push(""),Q.push(`link: ${$.link}`),Q.push(`ogImage: ${$.ogImage}`),$.note)Q.push(""),Q.push(`note: ${$.note}`);return Q.push(""),Q.push("# post the fig to a Buzz channel:"),Q.push($.buzz.message),Q.push(""),Q.push("# …or set a channel canvas (markdown, with the preview):"),Q.push($.buzz.canvas),Q.push(""),Q.join(`
|
|
320
|
+
`)}tJ();AJ();var tf=1500;async function ef($){let{reference:Q}=await TJ(t0,A8,{...$,timeoutMs:tf});return Q}var m6=`figura fig — manage visualizations
|
|
267
321
|
|
|
268
322
|
Usage:
|
|
269
323
|
figura fig create [--file <path> | (reads stdin)] [options]
|
|
@@ -271,7 +325,7 @@ Usage:
|
|
|
271
325
|
figura fig revisions <id> [--json]
|
|
272
326
|
figura fig request-feedback <id> --from <name|email> [--note <text>]
|
|
273
327
|
figura fig update <id> [options]
|
|
274
|
-
figura fig delete <id> [--
|
|
328
|
+
figura fig delete <id> [--json]
|
|
275
329
|
figura fig commit <id> [--json]
|
|
276
330
|
figura fig uncommit <id> [--json]
|
|
277
331
|
figura fig publish <id> [--unpublish] [--json]
|
|
@@ -280,7 +334,7 @@ Usage:
|
|
|
280
334
|
figura fig buzz-payload <id> [--channel <uuid>] [--json]
|
|
281
335
|
figura fig scaffold [--platform <mobile|web>] [--device <id>] [--area <str>] [--mode <str>] [--orientation <str>] [--json]
|
|
282
336
|
figura fig devices [--json]
|
|
283
|
-
figura fig open <id> [--print
|
|
337
|
+
figura fig open <id> [--print]
|
|
284
338
|
figura fig verify <id> [--json]
|
|
285
339
|
|
|
286
340
|
Verify:
|
|
@@ -290,8 +344,10 @@ Verify:
|
|
|
290
344
|
never landed. \`verify\` fetches what a reviewer will open and asserts that
|
|
291
345
|
every frame class the markup uses is actually sized by CSS that shipped with
|
|
292
346
|
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.
|
|
294
|
-
|
|
347
|
+
the served bytes — nothing is laid out and nothing runs locally. A fig that
|
|
348
|
+
composes other figs is checked SCREEN BY SCREEN: each one is fetched and
|
|
349
|
+
checked in its own right, and a screen that no longer resolves fails the run.
|
|
350
|
+
Exits non-zero on any failure, so it can gate a publish. Run it after
|
|
295
351
|
\`fig create\`/\`fig revise\`.
|
|
296
352
|
|
|
297
353
|
Scaffold:
|
|
@@ -324,6 +380,8 @@ Create options:
|
|
|
324
380
|
url) — share link only, does NOT commit (see Commit)
|
|
325
381
|
--commit Commit to the team library on create (default: land as a
|
|
326
382
|
workspace draft; see Commit)
|
|
383
|
+
--child Create as frameless screen CONTENT another fig embeds —
|
|
384
|
+
hidden from the library and the fig listing
|
|
327
385
|
|
|
328
386
|
Revise:
|
|
329
387
|
Creates a NEW linked version of an existing fig (same root chain, version+1)
|
|
@@ -350,9 +408,10 @@ Update:
|
|
|
350
408
|
which also notify the team)
|
|
351
409
|
|
|
352
410
|
Delete:
|
|
353
|
-
Archives the fig
|
|
354
|
-
resolving
|
|
355
|
-
--
|
|
411
|
+
Archives the fig — always. It leaves the library and its public link stops
|
|
412
|
+
resolving, but the fig and its comments are kept; restore by setting
|
|
413
|
+
--status published with fig update. There is no permanent delete here:
|
|
414
|
+
that is a human action in the web app, by the author or a team admin.
|
|
356
415
|
|
|
357
416
|
Commit:
|
|
358
417
|
Machine-created figs land as workspace DRAFTS — visible to you, NOT in the
|
|
@@ -373,11 +432,6 @@ Open:
|
|
|
373
432
|
team-scoped Studio viewer (the actual Figura render: brand chrome, CSP,
|
|
374
433
|
favicon, responsive frame) — not a local reconstruction.
|
|
375
434
|
--print Write the raw HTML to stdout instead of opening a browser
|
|
376
|
-
--local Open a local sandboxed copy of the raw HTML instead
|
|
377
|
-
(offline/degraded fallback, or a deliberately air-gapped
|
|
378
|
-
review) — inline <script> runs isolated in a
|
|
379
|
-
network-gagged iframe, matching the published surface's
|
|
380
|
-
sandboxing.
|
|
381
435
|
|
|
382
436
|
Buzz payload:
|
|
383
437
|
Print the ready-to-post payload for sharing a fig into a Buzz workspace
|
|
@@ -396,56 +450,44 @@ Team binding:
|
|
|
396
450
|
When the cwd isn't linked to a team (no .figura/config.json above it — inside
|
|
397
451
|
a git repo or not, including a bare temp/scratchpad dir), they refuse to fall
|
|
398
452
|
back to the global ~/.figura credential — run \`figura link\` to bind this
|
|
399
|
-
directory, or pass --allow-global (env FIGURA_ALLOW_GLOBAL=1) to override.`;async function
|
|
400
|
-
`)}async function
|
|
401
|
-
`),
|
|
402
|
-
`)}async function
|
|
403
|
-
`);return}for(let
|
|
404
|
-
`)}async function
|
|
405
|
-
`);return}let{token:
|
|
406
|
-
`)}async function
|
|
407
|
-
`);return}let{token:
|
|
453
|
+
directory, or pass --allow-global (env FIGURA_ALLOW_GLOBAL=1) to override.`;async function yj(){let $=[];for await(let Q of process.stdin)$.push(Buffer.from(Q));return Buffer.concat($).toString("utf8")}function Fz($){if(!$)return;let Q=$.split(",").map((J)=>J.trim()).filter(Boolean);return Q.length?Q:void 0}function f6($){if($.status!=="draft")return;process.stderr.write(`→ draft — not in the team library yet · commit with: figura fig commit ${$.id}
|
|
454
|
+
`)}async function $m($){let{flags:Q}=Q0($),{token:J,apiUrl:X}=await N0(Q,{mutate:!0}),Y=h(Q,"file"),G;if(Y)try{G=await mj.readFile(Y,"utf8")}catch(L){I(`could not read --file: ${a(L)}`)}else{if(process.stdin.isTTY)I("No --file given and stdin is a TTY. Pipe HTML or pass --file <path>.");G=await yj()}if(!G.trim())I("HTML content is empty.");let W=h(Q,"issue"),q=W!==void 0?Number(W):void 0;if(q!==void 0&&!Number.isFinite(q))I("--issue must be a number.");let z={html:G},K=h(Q,"title"),V=h(Q,"description"),U=h(Q,"area"),x=Fz(h(Q,"tags")),M=h(Q,"orientation"),H=h(Q,"mode"),w=h(Q,"model"),j=h(Q,"device");if(K!==void 0)z.title=K;if(V!==void 0)z.description=V;if(U!==void 0)z.area=U;if(x!==void 0)z.tags=x;if(M!==void 0)z.orientation=M;if(H!==void 0)z.mode=H;if(w!==void 0)z.model=w;if(j!==void 0)z.device=j;if(q!==void 0)z.issue=q;if(i(Q,"publish"))z.publish=!0;if(i(Q,"commit"))z.status="published";if(i(Q,"child"))z.kind="child";z.toolchain=Gj(await ef({apiUrl:X,token:J}));let Z;try{Z=await z0("/v1/figs",{method:"POST",body:z,token:J,apiUrl:X,source:V0})}catch(L){I(a(L))}if(i(Q,"json")){L0(Z),f6(Z);return}L0({id:Z.id,slug:Z.slug,status:Z.status??null,isPublic:Z.isPublic??!1,url:Z.url??null,viewUrl:Z.viewUrl??null}),f6(Z)}async function Qm($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)I("Usage: figura fig revise <id> [--file <path>]");let{token:Y,apiUrl:G}=await N0(Q,{mutate:!0}),W=h(Q,"file"),q;if(W)try{q=await mj.readFile(W,"utf8")}catch(F){I(`could not read --file: ${a(F)}`)}else{if(process.stdin.isTTY)I("No --file given and stdin is a TTY. Pipe HTML or pass --file <path>.");q=await yj()}if(!q.trim())I("HTML content is empty.");let z=h(Q,"issue"),K=z!==void 0?Number(z):void 0;if(K!==void 0&&!Number.isFinite(K))I("--issue must be a number.");let V={html:q},U=h(Q,"title"),x=h(Q,"description"),M=h(Q,"area"),H=Fz(h(Q,"tags")),w=h(Q,"orientation"),j=h(Q,"mode"),Z=h(Q,"model"),L=h(Q,"device");if(U!==void 0)V.title=U;if(x!==void 0)V.description=x;if(M!==void 0)V.area=M;if(H!==void 0)V.tags=H;if(w!==void 0)V.orientation=w;if(j!==void 0)V.mode=j;if(Z!==void 0)V.model=Z;if(L!==void 0)V.device=L;if(K!==void 0)V.issue=K;if(i(Q,"publish"))V.publish=!0;if(i(Q,"commit"))V.status="published";let D;try{D=await z0(`/v1/figs/${encodeURIComponent(X)}/revise`,{method:"POST",body:V,token:Y,apiUrl:G,source:V0})}catch(F){I(a(F))}if(i(Q,"json")){L0(D),f6(D);return}L0({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}),f6(D)}async function Jm($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)I("Usage: figura fig request-feedback <id> --from <name|email> [--note <text>]");let{token:Y,apiUrl:G}=await N0(Q,{mutate:!0}),W=h(Q,"from");if(!W)I("--from is required (the teammate to ask, by name or email).");let q=h(Q,"note"),z={from:W};if(q!==void 0)z.note=q;let K;try{K=await z0(`/v1/figs/${encodeURIComponent(X)}/request-feedback`,{method:"POST",body:z,token:Y,apiUrl:G,source:V0})}catch(U){I(a(U))}if(i(Q,"json")){L0(K);return}let V=K.request?.to??W;if(process.stdout.write(`Requested ${V}'s feedback.
|
|
455
|
+
`),K.figUrl)process.stdout.write(`${K.figUrl}
|
|
456
|
+
`)}async function Xm($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)I("Usage: figura fig update <id> [options]");let{token:Y,apiUrl:G}=await N0(Q,{mutate:!0}),W={},q=h(Q,"title"),z=h(Q,"description"),K=h(Q,"area"),V=Fz(h(Q,"tags")),U=h(Q,"status");if(q!==void 0)W.title=q;if(z!==void 0)W.description=z;if(K!==void 0)W.area=K;if(V!==void 0)W.tags=V;if(U!==void 0)W.status=U;if(h(Q,"file"))I("`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)I("Nothing to update. Pass at least one of --title/--description/--area/--tags/--status.");let x;try{x=await z0(`/v1/figs/${encodeURIComponent(X)}`,{method:"PATCH",body:W,token:Y,apiUrl:G,source:V0})}catch(M){I(a(M))}if(i(Q,"json")){L0(x);return}L0({id:x.id,slug:x.slug,status:x.status})}async function Ym($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)I("Usage: figura fig delete <id>");let{token:Y,apiUrl:G}=await N0(Q,{mutate:!0}),W;try{W=await z0(`/v1/figs/${encodeURIComponent(X)}`,{method:"DELETE",token:Y,apiUrl:G,source:V0})}catch(q){I(a(q))}L0(W??{ok:!0})}async function Gm($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)I("Usage: figura fig revisions <id>");let{token:Y,apiUrl:G}=await N0(Q),W;try{W=await z0(`/v1/figs/${encodeURIComponent(X)}/revisions`,{token:Y,apiUrl:G,source:V0})}catch(z){I(a(z))}if(i(Q,"json")){L0(W);return}let q=Array.isArray(W)?W:W.revisions??W.items??[];if(!q.length){process.stdout.write(`No revisions.
|
|
457
|
+
`);return}for(let z of q)process.stdout.write(`v${z.version} ${z.id} ${z.title??z.slug}
|
|
458
|
+
`)}async function Wm($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(m6+`
|
|
459
|
+
`);return}let{token:J,apiUrl:X}=await N0(Q),Y=new URLSearchParams;for(let q of["platform","device","area","orientation","mode"]){let z=h(Q,q);if(z!==void 0)Y.set(q,z)}let G=Y.toString(),W;try{W=await z0(`/v1/fig/scaffold${G?`?${G}`:""}`,{token:J,apiUrl:X,source:V0})}catch(q){I(a(q))}if(i(Q,"json")){L0(W);return}process.stdout.write((W.scaffold??"")+`
|
|
460
|
+
`)}async function qm($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(m6+`
|
|
461
|
+
`);return}let{token:J,apiUrl:X}=await N0(Q),Y;try{Y=await z0("/v1/fig/devices",{token:J,apiUrl:X,source:V0})}catch(W){I(a(W))}if(i(Q,"json")){L0(Y);return}let G=Y.devices??[];if(!G.length){process.stdout.write(`No devices.
|
|
408
462
|
`);return}process.stdout.write(`ID LABEL PORTRAIT CUTOUT RADIUS
|
|
409
|
-
`);for(let W of
|
|
410
|
-
`)}}async function
|
|
411
|
-
`);return}for(let
|
|
412
|
-
`)}}async function
|
|
413
|
-
`)}),Y.unref()}async function
|
|
463
|
+
`);for(let W of G){let q=W.id===Y.default?" (default)":"";process.stdout.write(`${W.id}${q} ${W.label} ${W.logical.portrait.w}×${W.logical.portrait.h} ${W.cutout} ${W.cornerRadius}
|
|
464
|
+
`)}}async function zm($){let{flags:Q}=Q0($),{token:J,apiUrl:X}=await N0(Q),Y=new URLSearchParams,G=h(Q,"area"),W=h(Q,"tag"),q=h(Q,"limit");if(G)Y.set("area",G);if(W)Y.set("tag",W);if(q)Y.set("limit",q);let z=Y.toString(),K;try{K=await z0(`/v1/figs${z?`?${z}`:""}`,{token:J,apiUrl:X,source:V0})}catch(U){I(a(U))}let V=Array.isArray(K)?K:K.items??[];if(i(Q,"json")){L0(K);return}if(!V.length){process.stdout.write(`No figs.
|
|
465
|
+
`);return}for(let U of V){let x=U.tags?.length?` #${U.tags.join(" #")}`:"";process.stdout.write(`${U.id} ${U.area??"-"} ${U.title??U.slug}${x}
|
|
466
|
+
`)}}async function Vm($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)I("Usage: figura fig get <id>");let{token:Y,apiUrl:G}=await N0(Q),W;try{W=await z0(`/v1/figs/${encodeURIComponent(X)}`,{token:Y,apiUrl:G,source:V0})}catch(q){I(a(q))}L0(W)}async function Km($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)I("Usage: figura fig buzz-payload <id> [--channel <uuid>] [--json]");let Y=await N0(Q),{token:G,apiUrl:W}=Y,q;try{q=await z0(`/v1/figs/${encodeURIComponent(X)}`,{token:G,apiUrl:W,source:V0})}catch(U){I(a(U))}let z=q.id??X,K=z.replace(/^fig_/,"").trim();if(!K)I("Could not resolve the fig public id from the API response.");let V=bj({figId:z,publicId:K,title:q.title||q.slug||"Untitled fig",isPublic:q.isPublic,viewUrl:typeof q.viewUrl==="string"?q.viewUrl:void 0,channel:h(Q,"channel")});if(i(Q,"json")){L0(V);return}process.stdout.write(fj(V))}async function Um($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)I("Usage: figura fig commit <id>");let{token:Y,apiUrl:G}=await N0(Q,{mutate:!0}),W;try{W=await z0(`/v1/figs/${encodeURIComponent(X)}/commit`,{method:"POST",body:{},token:Y,apiUrl:G,source:V0})}catch(q){I(a(q))}L0(W)}async function xm($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)I("Usage: figura fig uncommit <id>");let{token:Y,apiUrl:G}=await N0(Q,{mutate:!0}),W;try{W=await z0(`/v1/figs/${encodeURIComponent(X)}/uncommit`,{method:"POST",body:{},token:Y,apiUrl:G,source:V0})}catch(q){I(a(q))}L0(W)}async function Mm($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)I("Usage: figura fig publish <id> [--unpublish]");let{token:Y,apiUrl:G}=await N0(Q,{mutate:!0}),W=!i(Q,"unpublish"),q;try{q=await z0(`/v1/figs/${encodeURIComponent(X)}/publish`,{method:"POST",body:{isPublic:W},token:Y,apiUrl:G,source:V0})}catch(z){I(a(z))}L0(q)}function Hm($){let Q=process.platform,J,X;if(Q==="darwin")J="open",X=[$];else if(Q==="win32")J="cmd",X=["/c","start","",$];else J="xdg-open",X=[$];let Y=rf(J,X,{stdio:"ignore",detached:!0});Y.on("error",()=>{process.stderr.write(`figura: could not open browser; open ${$}
|
|
467
|
+
`)}),Y.unref()}var Bm=new Set(["print","token","api-url","allow-global"]);async function Zm($){let{flags:Q,positionals:J}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(m6+`
|
|
468
|
+
`);return}let X=J[0];if(!X)I("Usage: figura fig open <id> [--print]");let Y=Object.keys(Q).find((z)=>!Bm.has(z));if(Y)I(`Unknown flag --${Y} for \`figura fig open\`. See \`figura fig --help\`.`);let{token:G,apiUrl:W}=await N0(Q),q;try{q=await z0(`/v1/figs/${encodeURIComponent(X)}`,{token:G,apiUrl:W,source:V0})}catch(z){I(a(z))}if(i(Q,"print")){if(q.composesByReference)I(cj(q.viewUrl));let z;try{z=await d7(`/v1/figs/${encodeURIComponent(X)}/raw`,{token:G,apiUrl:W,source:V0})}catch(K){I(a(K))}if(process.stdout.write(z),!z.endsWith(`
|
|
414
469
|
`))process.stdout.write(`
|
|
415
|
-
`);return}if(!
|
|
416
|
-
`);return}}let W;try{W=await
|
|
417
|
-
`)
|
|
418
|
-
|
|
419
|
-
figura: ${G.length} check(s) failed on the served fig — it will not render as authored.
|
|
470
|
+
`);return}if(!q.viewUrl)I(`fig ${X} has no viewUrl; use \`figura fig open ${X} --print\` for its bytes`);Hm(q.viewUrl),process.stdout.write(`Opening ${q.viewUrl}
|
|
471
|
+
`)}var wm=[{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 jm($){let Q=$.match(/<script\b[^>]*id=["']fig-manifest["'][^>]*>([\s\S]*?)<\/script>/i)?.[1];if(!Q)return null;try{return JSON.parse(Q)}catch{return null}}function Lm($,Q){return new RegExp(`class\\s*=\\s*["'][^"']*(?<![\\w-])${Q}(?![\\w-])`,"i").test($)}function hj($){let Q=[],J=jm($),X=Array.isArray(J?.components)?J.components:[];Q.push({check:"manifest",ok:!!J,detail:J?"fig manifest present and parseable":"no readable fig manifest in the served HTML"});for(let{marker:G,component:W,sizedBy:q}of wm){if(!Lm($,G))continue;let z=q.test($);if(Q.push({check:`component:${W}`,ok:z,detail:z?`.${G} is used in markup and the served CSS sizes it`:`.${G} is used in markup but NO served CSS gives it dimensions — every one of them renders as an empty box`}),!X.includes(W)&&!z)Q.push({check:`manifest.components:${W}`,ok:!1,detail:`manifest components ${JSON.stringify(X)} omits "${W}" while the markup uses .${G}`})}let Y=J?.checks??{};if(Y.frameKit===!1)Q.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)Q.push({check:"checks.complete",ok:!1,detail:"the document looks truncated (unclosed html/body — the generation was cut off)"});if(Y.doubleFramed===!0)Q.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 Q}function Rm($){let Q=[];for(let J of $){if(!J.url){Q.push({check:`${J.label}:reference`,ok:!1,detail:"no reference backs this frame — it renders as a missing screen"});continue}if(J.body==null){Q.push({check:`${J.label}:fetch`,ok:!1,detail:`the screen could not be fetched: ${J.error??"unknown error"}`});continue}if(kj(J.body)){Q.push({check:`${J.label}:fetch`,ok:!1,detail:'the screen serves the "no longer available" placeholder — the referenced fig is gone'});continue}Q.push(...hj(J.body).map((X)=>({...X,check:`${J.label}:${X.check}`})))}return Q}async function Dm($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)I("Usage: figura fig verify <id> [--json]");let{token:Y,apiUrl:G}=await N0(Q),W;try{W=await d7(`/v1/figs/${encodeURIComponent(X)}/raw`,{token:Y,apiUrl:G,source:V0})}catch(V){I(a(V))}let q=hj(W),z=Tj(W);if(z.length>0){let V=[];try{V=(await z0(`/v1/figs/${encodeURIComponent(X)}/children`,{token:Y,apiUrl:G,source:V0})).children??[]}catch(x){I(a(x))}let U=[];for(let x of z){let M=V.find((w)=>Aj(w,x.figId)),H=Ej(x.position,x.title);if(!M?.url){U.push({label:H,url:null,body:null});continue}try{U.push({label:H,url:M.url,body:await d7(M.url)})}catch(w){U.push({label:H,url:M.url,body:null,error:a(w)})}}q.push(...Rm(U))}let K=q.filter((V)=>!V.ok);if(i(Q,"json")){if(L0({id:X,ok:K.length===0,findings:q}),K.length)process.exit(1);return}for(let V of q)process.stdout.write(`${V.ok?"ok ":"FAIL"} ${V.check} — ${V.detail}
|
|
472
|
+
`);if(K.length)process.stderr.write(`
|
|
473
|
+
figura: ${K.length} check(s) failed on the served fig — it will not render as authored.
|
|
420
474
|
`+`If a frame class is unsized, re-land the fig; the kit is stamped at save time.
|
|
421
475
|
`),process.exit(1);process.stdout.write(`
|
|
422
476
|
The served fig renders as authored.
|
|
423
|
-
`)}
|
|
424
|
-
|
|
425
|
-
<head>
|
|
426
|
-
<meta charset="utf-8">
|
|
427
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
428
|
-
<title>Figura fig</title>
|
|
429
|
-
<style>html,body{margin:0;height:100%;background:#0a0a0a}iframe{border:0;display:block;width:100vw;height:100vh}</style>
|
|
430
|
-
</head>
|
|
431
|
-
<body>
|
|
432
|
-
<iframe title="Figura fig" sandbox="allow-scripts" srcdoc="${lK(c).replace(/&/g,"&").replace(/"/g,""")}"></iframe>
|
|
433
|
-
</body>
|
|
434
|
-
</html>
|
|
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
|
|
477
|
+
`)}async function pj($){let Q=$[0],J=$.slice(1);if(!Q||Q==="--help"||Q==="-h"||Q==="help"){process.stdout.write(m6+`
|
|
478
|
+
`);return}switch(Q){case"create":return $m(J);case"revise":return Qm(J);case"revisions":return Gm(J);case"request-feedback":return Jm(J);case"update":return Xm(J);case"delete":return Ym(J);case"commit":return Um(J);case"uncommit":return xm(J);case"publish":return Mm(J);case"list":return zm(J);case"get":return Vm(J);case"buzz-payload":return Km(J);case"scaffold":return Wm(J);case"devices":return qm(J);case"open":return Zm(J);case"verify":return Dm(J);default:I(`Unknown fig subcommand '${Q}'. See \`figura fig --help\`.`)}}v$();r0();var _m=`figura comment — add a comment to a fig
|
|
437
479
|
|
|
438
480
|
Usage:
|
|
439
|
-
figura comment <fig-id> --body "your comment" [--json]`;async function
|
|
440
|
-
`);return}let J
|
|
441
|
-
`)}
|
|
481
|
+
figura comment <fig-id> --body "your comment" [--json]`;async function uj($){let{flags:Q,positionals:J}=Q0($);if(Q.help||Q.h){process.stdout.write(_m+`
|
|
482
|
+
`);return}let X=J[0];if(!X)I('Usage: figura comment <fig-id> --body "..."');let Y=h(Q,"body");if(!Y)I("--body is required.");let{token:G,apiUrl:W}=await N0(Q,{mutate:!0}),q;try{q=await z0(`/v1/figs/${encodeURIComponent(X)}/comments`,{method:"POST",body:{body:Y},token:G,apiUrl:W,source:V0})}catch(z){I(a(z))}if(i(Q,"json")){L0(q);return}process.stdout.write(`Comment ${q.id} added.
|
|
483
|
+
`)}v$();N$();r0();var Nm=`figura token — inspect API token state
|
|
442
484
|
|
|
443
485
|
Usage:
|
|
444
|
-
figura token current [--json] Show details of the active token`;async function
|
|
445
|
-
`);return}let
|
|
486
|
+
figura token current [--json] Show details of the active token`;async function vm($){let{flags:Q}=Q0($),J=await N0(Q),{token:X,apiUrl:Y,tokenSource:G,projectConfigPath:W}=J,q;try{q=await z0("/v1/whoami",{token:X,apiUrl:Y,source:V0})}catch(V){I(a(V))}let z={source:G,configPath:G==="project"?W:G==="global"?_$:null};if(i(Q,"json")){L0({token:q.token??null,team:q.team??null,scopes:q.scopes??[],binding:z});return}if(q.actor&&q.actor!=="token"){process.stdout.write(`The active credentials are a ${q.actor} session, not an API token.
|
|
487
|
+
`);return}let K=[];if(K.push(`id: ${q.token?.id??"-"}`),K.push(`name: ${q.token?.name??"-"}`),K.push(`prefix: ${q.token?.prefix??"-"}`),q.team)K.push(`team: ${q.team.slug??q.team.id??"-"}`);if(q.scopes?.length)K.push(`scopes: ${q.scopes.join(", ")}`);K.push(`bound: ${z.source}${z.configPath?` (${z.configPath})`:""}`),process.stdout.write(K.join(`
|
|
446
488
|
`)+`
|
|
447
|
-
`)}async function
|
|
448
|
-
`);return}switch(
|
|
489
|
+
`)}async function gj($){let Q=$[0],J=$.slice(1);if(!Q||Q==="--help"||Q==="-h"||Q==="help"){process.stdout.write(Nm+`
|
|
490
|
+
`);return}switch(Q){case"current":return vm(J);default:I(`Unknown token subcommand '${Q}'. See \`figura token --help\`.`)}}v$();r0();var Om=`figura sources — manage the company-brain source spine
|
|
449
491
|
|
|
450
492
|
Usage:
|
|
451
493
|
figura sources connect --kind <git|claude_mem> --ref <owner/repo> [options]
|
|
@@ -460,13 +502,13 @@ Connect options:
|
|
|
460
502
|
--export-path <str> claude_mem export file path (.json/.jsonl)
|
|
461
503
|
|
|
462
504
|
Sync:
|
|
463
|
-
--id <id> Sync one source; omit to sync every connected source`;async function
|
|
464
|
-
`);return}for(let W of
|
|
465
|
-
`)}}async function
|
|
466
|
-
`);return}for(let
|
|
467
|
-
`)}catch(
|
|
468
|
-
`)}}async function
|
|
469
|
-
`);return}switch(
|
|
505
|
+
--id <id> Sync one source; omit to sync every connected source`;async function Fm($){let{flags:Q}=Q0($),{token:J,apiUrl:X}=await N0(Q,{mutate:!0}),Y=h(Q,"kind");if(!Y)I("--kind is required (git | claude_mem).");let G=h(Q,"ref"),W={},q=h(Q,"branch"),z=h(Q,"export-path");if(q!==void 0)W.defaultBranch=q;if(z!==void 0)W.exportPath=z;let K={kind:Y};if(G!==void 0)K.externalRef=G;let V=h(Q,"name");if(V!==void 0)K.displayName=V;if(Object.keys(W).length)K.config=W;let U;try{U=await z0("/v1/sources",{method:"POST",body:K,token:J,apiUrl:X,source:V0})}catch(x){I(a(x))}L0(U.source)}async function Cm($){let{flags:Q}=Q0($),{token:J,apiUrl:X}=await N0(Q),Y;try{Y=await z0("/v1/sources",{token:J,apiUrl:X,source:V0})}catch(W){I(a(W))}if(i(Q,"json")){L0(Y);return}let G=Y.sources??[];if(!G.length){process.stdout.write(`No sources connected.
|
|
506
|
+
`);return}for(let W of G){let q=W.lastSyncedAt?W.lastSyncedAt:"never";process.stdout.write(`${W.id} ${W.kind} ${W.externalRef??"-"} ${W.eventCount??0} events ${W.status??"-"} synced ${q}
|
|
507
|
+
`)}}async function lj($,Q,J){return z0(`/v1/sources/${encodeURIComponent($)}/sync`,{method:"POST",token:Q,apiUrl:J,source:V0})}async function Im($){let{flags:Q}=Q0($),{token:J,apiUrl:X}=await N0(Q,{mutate:!0}),Y=h(Q,"id");if(Y){try{L0({id:Y,...await lj(Y,J,X)})}catch(q){I(a(q))}return}let G;try{G=await z0("/v1/sources",{token:J,apiUrl:X,source:V0})}catch(q){I(a(q))}let W=G.sources??[];if(!W.length){process.stdout.write(`No sources to sync.
|
|
508
|
+
`);return}for(let q of W)try{let z=await lj(q.id,J,X);process.stdout.write(`${q.id} ${q.kind} ${q.externalRef??"-"} ingested ${z.ingested}/${z.fetched}
|
|
509
|
+
`)}catch(z){process.stderr.write(`${q.id} ERROR ${a(z)}
|
|
510
|
+
`)}}async function ij($){let Q=$[0],J=$.slice(1);if(!Q||Q==="--help"||Q==="-h"||Q==="help"){process.stdout.write(Om+`
|
|
511
|
+
`);return}switch(Q){case"connect":return Fm(J);case"list":return Cm(J);case"sync":return Im(J);default:I(`Unknown sources subcommand '${Q}'. See \`figura sources --help\`.`)}}tJ();N$();import{spawn as Pm}from"node:child_process";import{existsSync as Tm}from"node:fs";import{fileURLToPath as Am}from"node:url";var Em=`figura mcp — run the Figura MCP server (stdio) for Claude Code
|
|
470
512
|
|
|
471
513
|
Usage:
|
|
472
514
|
figura mcp
|
|
@@ -477,11 +519,11 @@ Add it to Claude Code with:
|
|
|
477
519
|
Serves the same tools as the standalone figura-mcp package, but ships inside the
|
|
478
520
|
CLI (one install, nothing to fetch) and resolves your team from the nearest
|
|
479
521
|
.figura/config.json — so a per-project login (figura login --project) gives each
|
|
480
|
-
repo its own team automatically.`;function
|
|
522
|
+
repo its own team automatically.`;function km(){let $=[new URL("./mcp.js",import.meta.url),new URL("../../../mcp/src/index.ts",import.meta.url)].map((Q)=>Am(Q));for(let Q of $)if(Tm(Q))return Q;process.stderr.write(`figura: MCP server not found — reinstall figura-cli:
|
|
481
523
|
`+` curl -fsSL https://figura.so/install.sh | bash
|
|
482
|
-
`),process.exit(1)}async function
|
|
483
|
-
`);return}let
|
|
484
|
-
`),process.exit(1)}),Y.on("exit",(
|
|
524
|
+
`),process.exit(1)}async function nj($){if($.includes("--help")||$.includes("-h")){process.stdout.write(Em+`
|
|
525
|
+
`);return}let Q=await s0({}),J={...process.env};if(Q.token&&!J.FIGURA_TOKEN)J.FIGURA_TOKEN=Q.token;if(Q.apiUrl&&!J.FIGURA_API_URL)J.FIGURA_API_URL=Q.apiUrl;let X=km(),Y=Pm(process.execPath,[X],{stdio:"inherit",env:J});Y.on("error",(G)=>{process.stderr.write(`figura: failed to start MCP server: ${G.message}
|
|
526
|
+
`),process.exit(1)}),Y.on("exit",(G,W)=>{if(W)process.kill(process.pid,W);else process.exit(G??0)})}r0();n7();import{fileURLToPath as cm}from"node:url";var y6="figura-cli",Sm=`figura upgrade — print the command to update the Figura CLI
|
|
485
527
|
|
|
486
528
|
Usage:
|
|
487
529
|
figura upgrade [--version <v>]
|
|
@@ -495,18 +537,18 @@ no self-mutation. Copy the printed command and run it yourself.
|
|
|
495
537
|
|
|
496
538
|
Options:
|
|
497
539
|
--version <v> print the command for a specific version instead of latest
|
|
498
|
-
--help, -h show this help`;function
|
|
540
|
+
--help, -h show this help`;function bm($,Q){let J=Q.replace(/\\/g,"/");if(J.includes("/_npx/")||$.npm_command==="exec")return"npx";if(J.includes("/.bun/install/cache/"))return"bunx";return null}function fm($,Q){let J=$.generic?`Update ${y6} (and the bundled MCP server) with your package manager's global install, e.g.:`:`To update ${y6} (and the bundled MCP server), run:`,X=Q?"Your skills refresh automatically the next time Claude Code starts.":`Then finish the Claude Code integration (skills, auto-update, badge):
|
|
499
541
|
|
|
500
|
-
figura install`;return`${
|
|
542
|
+
figura install`;return`${J}
|
|
501
543
|
|
|
502
|
-
${
|
|
544
|
+
${$.command}
|
|
503
545
|
|
|
504
|
-
${
|
|
505
|
-
`}async function
|
|
506
|
-
`);return}let
|
|
546
|
+
${X}
|
|
547
|
+
`}async function dj($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(Sm+`
|
|
548
|
+
`);return}let J=h(Q,"version")||"latest",X=cm(import.meta.url),Y=bm(process.env,X);if(Y){process.stdout.write(`figura is running via ${Y} — there's no installed copy to update. `+`Rerun with @latest to get the newest:
|
|
507
549
|
|
|
508
|
-
${Y} ${
|
|
509
|
-
`);return}let
|
|
550
|
+
${Y} ${y6}@${J}
|
|
551
|
+
`);return}let G=await i7(y6,J),W=await Hj();process.stdout.write(fm(G,W))}r0();FJ();N$();zY();tJ();AJ();import{homedir as mm}from"node:os";import{join as oj}from"node:path";var ym=`figura doctor — check the CLI, MCP, and skills are up to date
|
|
510
552
|
|
|
511
553
|
Usage:
|
|
512
554
|
figura doctor [--session-start]
|
|
@@ -522,24 +564,24 @@ at \`figura upgrade\` / \`figura skill install\` if anything is behind.
|
|
|
522
564
|
(engine \`latest\`, hash-verified; bundled fallback offline) and,
|
|
523
565
|
if the CLI is behind, prints a one-line notice pointing at
|
|
524
566
|
\`figura upgrade\` — never self-executes, never blocks startup,
|
|
525
|
-
never errors out. The registry is checked at most once a day.`,
|
|
526
|
-
`)}async function
|
|
567
|
+
never errors out. The registry is checked at most once a day.`,t$=oj(mm(),".claude","skills"),aj=1500;function sj($){let{stamp:Q,installedFigHash:J,stampedFigHash:X,reference:Y}=$,G=kY({stamp:Q,stampedHash:X,installedHash:J,referenceHash:Y.hash,referenceIsCanonical:Y.canonical});return{status:G,behind:G==="behind",reference:Y.version}}function hm($){let{installed:Q,latest:J,behind:X,status:Y,edited:G}=$;if(J&&D8(J,Q))return`Update available (${Q} → ${J}): run \`figura upgrade\` for the command.`;if(X)return"Your /fig skill is behind: run `figura skill install`.";if(Y==="diverged"||Y==="unstamped")return"Your /fig skill differs from the canonical one: run `figura skill diff` before you reinstall.";if(G.length)return`Locally edited, and kept that way: ${G.join(", ")}. Install won't overwrite them.`;if(J)return"✓ Everything is up to date.";return"Couldn't reach the npm registry to check for a newer CLI — try again later."}var pm=1e4;function um($,Q,J,X){if($)return $;return WY(Q,J,X).latest??null}async function gm(){let $=a$(),Q=Date.now(),J=[];try{let X=eJ(t$),Y=iQ(t$),G=$X(t$),{apiUrl:W,token:q}=await s0({}).catch(()=>({apiUrl:void 0,token:void 0})),{reference:z}=await TJ(t0,A8,{apiUrl:W,token:q,timeoutMs:aj}),K=z.version,{status:V}=sj({stamp:X,installedFigHash:Y,stampedFigHash:G,reference:z});if(Y!=null&&V==="behind"){let U=await wz(t$,{apiUrl:W,token:q,timeoutMs:aj,skip:EY(t$)}).catch(()=>null);if(U)J.push(`skill was behind (${X??"?"} → ${K??"?"}); reinstalled from ${U.source}.`)}else if(V==="diverged"||V==="unstamped")J.push("your /fig skill differs from the canonical one: run `figura skill diff`.")}catch{}try{let X=await s8(),Y=$x(X,Q)?X.latest:void 0;if(!Y){let G=await YW(1500);if(G)Y=G,await qY({...X,latest:G,checkedAt:Q})}if(Y&&D8(Y,$))J.push(`figura-cli ${$} → ${Y}: run \`figura upgrade\` to update.`)}catch{}if(J.length)process.stdout.write("[figura] "+J.join(" ")+`
|
|
568
|
+
`)}async function lm($){let Q=a$(),J=await YW(pm),X=eJ(t$),Y=iQ(t$),G=$X(t$),W={};try{W=await s8()}catch{}let{apiUrl:q}=await s0({apiUrlFlag:h($,"api-url")}).catch(()=>({apiUrl:""})),z=PJ(q),K=um(J,W,z,Date.now());if(J)try{await qY({...W,latest:J,checkedAt:Date.now()})}catch{}let{reference:V,online:U}=await TJ(t0,A8,await s0({}).catch(()=>({}))),x=V.version,{status:M,behind:H}=sj({stamp:X,installedFigHash:Y,stampedFigHash:G,reference:V}),w=U?"":" (offline — vs bundled floor)",j=(()=>{switch(M){case"pristine":return`pristine (v${X??x??"?"})${w}`;case"behind":return`behind (v${X??"?"} → v${x??"?"}) — run \`figura skill install\`${w}`;case"diverged":return`DIVERGED from the canonical /fig skill (same version line, different bytes) — run \`figura skill diff\` to see what differs${w}`;case"unstamped":return`UNSTAMPED (no install stamp) — figura didn't install this copy; run \`figura skill diff\`, then \`figura skill install\` to adopt the canonical one${w}`;case"absent":return"not installed — run `figura skill install`";case"unknown":return V.hash==null?"couldn't reach the skill registry and this build bundles no skill — nothing to compare against":`differs from this CLI's bundled /fig skill, which may be OLDER than yours — reach the registry to tell which way${w}`}})(),Z=[];Z.push(`figura-cli ${Q}${K?` (latest ${K})`:" (latest: unknown)"}`),Z.push("MCP server bundled in the CLI — same version"),Z.push(`skill /fig ${X??"unstamped"}${x?` (canonical ${x})`:""} in ${t$}`),Z.push(` ${j}`);let L=EY(t$).filter((D)=>D!==t0);if(L.length)Z.push(` locally edited: ${L.map((D)=>oj(t$,D)).join(", ")} — kept as-is by install`);Z.push(""),Z.push(hm({installed:Q,latest:K,behind:H,status:M,edited:L})),process.stdout.write(Z.join(`
|
|
527
569
|
`)+`
|
|
528
|
-
`)}async function
|
|
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}:
|
|
570
|
+
`)}async function rj($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(ym+`
|
|
571
|
+
`);return}if(i(Q,"session-start")){await gm().catch(()=>{});return}await lm(Q)}import{readFile as an}from"node:fs/promises";var b={};qJ(b,{void:()=>Iy,util:()=>w0,unknown:()=>Fy,union:()=>Ey,undefined:()=>Ny,tuple:()=>Sy,transformer:()=>iy,symbol:()=>_y,string:()=>WL,strictObject:()=>Ay,setErrorMap:()=>dm,set:()=>my,record:()=>by,quotelessJson:()=>im,promise:()=>ly,preprocess:()=>ay,pipeline:()=>oy,ostring:()=>sy,optional:()=>ny,onumber:()=>ry,oboolean:()=>ty,objectUtil:()=>Cz,object:()=>Ty,number:()=>qL,nullable:()=>dy,null:()=>vy,never:()=>Cy,nativeEnum:()=>gy,nan:()=>Ly,map:()=>fy,makeIssue:()=>cY,literal:()=>py,lazy:()=>hy,late:()=>wy,isValid:()=>GQ,isDirty:()=>p6,isAsync:()=>XX,isAborted:()=>h6,intersection:()=>cy,instanceof:()=>jy,getParsedType:()=>H8,getErrorMap:()=>JX,function:()=>yy,enum:()=>uy,effect:()=>iy,discriminatedUnion:()=>ky,defaultErrorMap:()=>c8,datetimeRegex:()=>XL,date:()=>Dy,custom:()=>GL,coerce:()=>ey,boolean:()=>zL,bigint:()=>Ry,array:()=>Py,any:()=>Oy,addIssueToContext:()=>l,ZodVoid:()=>bY,ZodUnknown:()=>WQ,ZodUnion:()=>VX,ZodUndefined:()=>qX,ZodType:()=>H0,ZodTuple:()=>Z8,ZodTransformer:()=>X8,ZodSymbol:()=>SY,ZodString:()=>e$,ZodSet:()=>oQ,ZodSchema:()=>H0,ZodRecord:()=>fY,ZodReadonly:()=>ZX,ZodPromise:()=>sQ,ZodPipeline:()=>hY,ZodParsedType:()=>m,ZodOptional:()=>Q8,ZodObject:()=>S0,ZodNumber:()=>qQ,ZodNullable:()=>b8,ZodNull:()=>zX,ZodNever:()=>B8,ZodNativeEnum:()=>MX,ZodNaN:()=>yY,ZodMap:()=>mY,ZodLiteral:()=>xX,ZodLazy:()=>UX,ZodIssueCode:()=>A,ZodIntersection:()=>KX,ZodFunction:()=>GX,ZodFirstPartyTypeKind:()=>G0,ZodError:()=>Z$,ZodEnum:()=>VQ,ZodEffects:()=>X8,ZodDiscriminatedUnion:()=>u6,ZodDefault:()=>HX,ZodDate:()=>dQ,ZodCatch:()=>BX,ZodBranded:()=>g6,ZodBoolean:()=>WX,ZodBigInt:()=>zQ,ZodArray:()=>$8,ZodAny:()=>aQ,Schema:()=>H0,ParseStatus:()=>e0,OK:()=>G$,NEVER:()=>$h,INVALID:()=>Y0,EMPTY_PATH:()=>am,DIRTY:()=>nQ,BRAND:()=>Zy});var w0;(function($){$.assertEqual=(Y)=>{};function Q(Y){}$.assertIs=Q;function J(Y){throw Error()}$.assertNever=J,$.arrayToEnum=(Y)=>{let G={};for(let W of Y)G[W]=W;return G},$.getValidEnumValues=(Y)=>{let G=$.objectKeys(Y).filter((q)=>typeof Y[Y[q]]!=="number"),W={};for(let q of G)W[q]=Y[q];return $.objectValues(W)},$.objectValues=(Y)=>{return $.objectKeys(Y).map(function(G){return Y[G]})},$.objectKeys=typeof Object.keys==="function"?(Y)=>Object.keys(Y):(Y)=>{let G=[];for(let W in Y)if(Object.prototype.hasOwnProperty.call(Y,W))G.push(W);return G},$.find=(Y,G)=>{for(let W of Y)if(G(W))return W;return},$.isInteger=typeof Number.isInteger==="function"?(Y)=>Number.isInteger(Y):(Y)=>typeof Y==="number"&&Number.isFinite(Y)&&Math.floor(Y)===Y;function X(Y,G=" | "){return Y.map((W)=>typeof W==="string"?`'${W}'`:W).join(G)}$.joinValues=X,$.jsonStringifyReplacer=(Y,G)=>{if(typeof G==="bigint")return G.toString();return G}})(w0||(w0={}));var Cz;(function($){$.mergeShapes=(Q,J)=>{return{...Q,...J}}})(Cz||(Cz={}));var m=w0.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),H8=($)=>{switch(typeof $){case"undefined":return m.undefined;case"string":return m.string;case"number":return Number.isNaN($)?m.nan:m.number;case"boolean":return m.boolean;case"function":return m.function;case"bigint":return m.bigint;case"symbol":return m.symbol;case"object":if(Array.isArray($))return m.array;if($===null)return m.null;if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return m.promise;if(typeof Map<"u"&&$ instanceof Map)return m.map;if(typeof Set<"u"&&$ instanceof Set)return m.set;if(typeof Date<"u"&&$ instanceof Date)return m.date;return m.object;default:return m.unknown}};var A=w0.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"]),im=($)=>{return JSON.stringify($,null,2).replace(/"([^"]+)":/g,"$1:")};class Z$ extends Error{get errors(){return this.issues}constructor($){super();this.issues=[],this.addIssue=(J)=>{this.issues=[...this.issues,J]},this.addIssues=(J=[])=>{this.issues=[...this.issues,...J]};let Q=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,Q);else this.__proto__=Q;this.name="ZodError",this.issues=$}format($){let Q=$||function(Y){return Y.message},J={_errors:[]},X=(Y)=>{for(let G of Y.issues)if(G.code==="invalid_union")G.unionErrors.map(X);else if(G.code==="invalid_return_type")X(G.returnTypeError);else if(G.code==="invalid_arguments")X(G.argumentsError);else if(G.path.length===0)J._errors.push(Q(G));else{let W=J,q=0;while(q<G.path.length){let z=G.path[q];if(q!==G.path.length-1)W[z]=W[z]||{_errors:[]};else W[z]=W[z]||{_errors:[]},W[z]._errors.push(Q(G));W=W[z],q++}}};return X(this),J}static assert($){if(!($ instanceof Z$))throw Error(`Not a ZodError: ${$}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,w0.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten($=(Q)=>Q.message){let Q={},J=[];for(let X of this.issues)if(X.path.length>0){let Y=X.path[0];Q[Y]=Q[Y]||[],Q[Y].push($(X))}else J.push($(X));return{formErrors:J,fieldErrors:Q}}get formErrors(){return this.flatten()}}Z$.create=($)=>{return new Z$($)};var nm=($,Q)=>{let J;switch($.code){case A.invalid_type:if($.received===m.undefined)J="Required";else J=`Expected ${$.expected}, received ${$.received}`;break;case A.invalid_literal:J=`Invalid literal value, expected ${JSON.stringify($.expected,w0.jsonStringifyReplacer)}`;break;case A.unrecognized_keys:J=`Unrecognized key(s) in object: ${w0.joinValues($.keys,", ")}`;break;case A.invalid_union:J="Invalid input";break;case A.invalid_union_discriminator:J=`Invalid discriminator value. Expected ${w0.joinValues($.options)}`;break;case A.invalid_enum_value:J=`Invalid enum value. Expected ${w0.joinValues($.options)}, received '${$.received}'`;break;case A.invalid_arguments:J="Invalid function arguments";break;case A.invalid_return_type:J="Invalid function return type";break;case A.invalid_date:J="Invalid date";break;case A.invalid_string:if(typeof $.validation==="object")if("includes"in $.validation){if(J=`Invalid input: must include "${$.validation.includes}"`,typeof $.validation.position==="number")J=`${J} at one or more positions greater than or equal to ${$.validation.position}`}else if("startsWith"in $.validation)J=`Invalid input: must start with "${$.validation.startsWith}"`;else if("endsWith"in $.validation)J=`Invalid input: must end with "${$.validation.endsWith}"`;else w0.assertNever($.validation);else if($.validation!=="regex")J=`Invalid ${$.validation}`;else J="Invalid";break;case A.too_small:if($.type==="array")J=`Array must contain ${$.exact?"exactly":$.inclusive?"at least":"more than"} ${$.minimum} element(s)`;else if($.type==="string")J=`String must contain ${$.exact?"exactly":$.inclusive?"at least":"over"} ${$.minimum} character(s)`;else if($.type==="number")J=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="bigint")J=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="date")J=`Date must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${new Date(Number($.minimum))}`;else J="Invalid input";break;case A.too_big:if($.type==="array")J=`Array must contain ${$.exact?"exactly":$.inclusive?"at most":"less than"} ${$.maximum} element(s)`;else if($.type==="string")J=`String must contain ${$.exact?"exactly":$.inclusive?"at most":"under"} ${$.maximum} character(s)`;else if($.type==="number")J=`Number must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="bigint")J=`BigInt must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="date")J=`Date must be ${$.exact?"exactly":$.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number($.maximum))}`;else J="Invalid input";break;case A.custom:J="Invalid input";break;case A.invalid_intersection_types:J="Intersection results could not be merged";break;case A.not_multiple_of:J=`Number must be a multiple of ${$.multipleOf}`;break;case A.not_finite:J="Number must be finite";break;default:J=Q.defaultError,w0.assertNever($)}return{message:J}},c8=nm;var tj=c8;function dm($){tj=$}function JX(){return tj}var cY=($)=>{let{data:Q,path:J,errorMaps:X,issueData:Y}=$,G=[...J,...Y.path||[]],W={...Y,path:G};if(Y.message!==void 0)return{...Y,path:G,message:Y.message};let q="",z=X.filter((K)=>!!K).slice().reverse();for(let K of z)q=K(W,{data:Q,defaultError:q}).message;return{...Y,path:G,message:q}},am=[];function l($,Q){let J=JX(),X=cY({issueData:Q,data:$.data,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,J,J===c8?void 0:c8].filter((Y)=>!!Y)});$.common.issues.push(X)}class e0{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray($,Q){let J=[];for(let X of Q){if(X.status==="aborted")return Y0;if(X.status==="dirty")$.dirty();J.push(X.value)}return{status:$.value,value:J}}static async mergeObjectAsync($,Q){let J=[];for(let X of Q){let Y=await X.key,G=await X.value;J.push({key:Y,value:G})}return e0.mergeObjectSync($,J)}static mergeObjectSync($,Q){let J={};for(let X of Q){let{key:Y,value:G}=X;if(Y.status==="aborted")return Y0;if(G.status==="aborted")return Y0;if(Y.status==="dirty")$.dirty();if(G.status==="dirty")$.dirty();if(Y.value!=="__proto__"&&(typeof G.value<"u"||X.alwaysSet))J[Y.value]=G.value}return{status:$.value,value:J}}}var Y0=Object.freeze({status:"aborted"}),nQ=($)=>({status:"dirty",value:$}),G$=($)=>({status:"valid",value:$}),h6=($)=>$.status==="aborted",p6=($)=>$.status==="dirty",GQ=($)=>$.status==="valid",XX=($)=>typeof Promise<"u"&&$ instanceof Promise;var r;(function($){$.errToObj=(Q)=>typeof Q==="string"?{message:Q}:Q||{},$.toString=(Q)=>typeof Q==="string"?Q:Q?.message})(r||(r={}));class J8{constructor($,Q,J,X){this._cachedPath=[],this.parent=$,this.data=Q,this._path=J,this._key=X}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 ej=($,Q)=>{if(GQ(Q))return{success:!0,data:Q.value};else{if(!$.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let J=new Z$($.common.issues);return this._error=J,this._error}}}};function K0($){if(!$)return{};let{errorMap:Q,invalid_type_error:J,required_error:X,description:Y}=$;if(Q&&(J||X))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(Q)return{errorMap:Q,description:Y};return{errorMap:(W,q)=>{let{message:z}=$;if(W.code==="invalid_enum_value")return{message:z??q.defaultError};if(typeof q.data>"u")return{message:z??X??q.defaultError};if(W.code!=="invalid_type")return{message:q.defaultError};return{message:z??J??q.defaultError}},description:Y}}class H0{get description(){return this._def.description}_getType($){return H8($.data)}_getOrReturnCtx($,Q){return Q||{common:$.parent.common,data:$.data,parsedType:H8($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}_processInputParams($){return{status:new e0,ctx:{common:$.parent.common,data:$.data,parsedType:H8($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}}_parseSync($){let Q=this._parse($);if(XX(Q))throw Error("Synchronous parse encountered promise.");return Q}_parseAsync($){let Q=this._parse($);return Promise.resolve(Q)}parse($,Q){let J=this.safeParse($,Q);if(J.success)return J.data;throw J.error}safeParse($,Q){let J={common:{issues:[],async:Q?.async??!1,contextualErrorMap:Q?.errorMap},path:Q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:H8($)},X=this._parseSync({data:$,path:J.path,parent:J});return ej(J,X)}"~validate"($){let Q={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:H8($)};if(!this["~standard"].async)try{let J=this._parseSync({data:$,path:[],parent:Q});return GQ(J)?{value:J.value}:{issues:Q.common.issues}}catch(J){if(J?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;Q.common={issues:[],async:!0}}return this._parseAsync({data:$,path:[],parent:Q}).then((J)=>GQ(J)?{value:J.value}:{issues:Q.common.issues})}async parseAsync($,Q){let J=await this.safeParseAsync($,Q);if(J.success)return J.data;throw J.error}async safeParseAsync($,Q){let J={common:{issues:[],contextualErrorMap:Q?.errorMap,async:!0},path:Q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:H8($)},X=this._parse({data:$,path:J.path,parent:J}),Y=await(XX(X)?X:Promise.resolve(X));return ej(J,Y)}refine($,Q){let J=(X)=>{if(typeof Q==="string"||typeof Q>"u")return{message:Q};else if(typeof Q==="function")return Q(X);else return Q};return this._refinement((X,Y)=>{let G=$(X),W=()=>Y.addIssue({code:A.custom,...J(X)});if(typeof Promise<"u"&&G instanceof Promise)return G.then((q)=>{if(!q)return W(),!1;else return!0});if(!G)return W(),!1;else return!0})}refinement($,Q){return this._refinement((J,X)=>{if(!$(J))return X.addIssue(typeof Q==="function"?Q(J,X):Q),!1;else return!0})}_refinement($){return new X8({schema:this,typeName:G0.ZodEffects,effect:{type:"refinement",refinement:$}})}superRefine($){return this._refinement($)}constructor($){this.spa=this.safeParseAsync,this._def=$,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:(Q)=>this["~validate"](Q)}}optional(){return Q8.create(this,this._def)}nullable(){return b8.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $8.create(this)}promise(){return sQ.create(this,this._def)}or($){return VX.create([this,$],this._def)}and($){return KX.create(this,$,this._def)}transform($){return new X8({...K0(this._def),schema:this,typeName:G0.ZodEffects,effect:{type:"transform",transform:$}})}default($){let Q=typeof $==="function"?$:()=>$;return new HX({...K0(this._def),innerType:this,defaultValue:Q,typeName:G0.ZodDefault})}brand(){return new g6({typeName:G0.ZodBranded,type:this,...K0(this._def)})}catch($){let Q=typeof $==="function"?$:()=>$;return new BX({...K0(this._def),innerType:this,catchValue:Q,typeName:G0.ZodCatch})}describe($){return new this.constructor({...this._def,description:$})}pipe($){return hY.create(this,$)}readonly(){return ZX.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var om=/^c[^\s-]{8,}$/i,sm=/^[0-9a-z]+$/,rm=/^[0-9A-HJKMNP-TV-Z]{26}$/i,tm=/^[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,em=/^[a-z0-9_-]{21}$/i,$y=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Qy=/^[-+]?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)?)??$/,Jy=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Xy="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Iz,Yy=/^(?:(?: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])$/,Gy=/^(?:(?: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])$/,Wy=/^(([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]))$/,qy=/^(([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])$/,zy=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Vy=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,QL="((\\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])))",Ky=new RegExp(`^${QL}$`);function JL($){let Q="[0-5]\\d";if($.precision)Q=`${Q}\\.\\d{${$.precision}}`;else if($.precision==null)Q=`${Q}(\\.\\d+)?`;let J=$.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${Q})${J}`}function Uy($){return new RegExp(`^${JL($)}$`)}function XL($){let Q=`${QL}T${JL($)}`,J=[];if(J.push($.local?"Z?":"Z"),$.offset)J.push("([+-]\\d{2}:?\\d{2})");return Q=`${Q}(${J.join("|")})`,new RegExp(`^${Q}$`)}function xy($,Q){if((Q==="v4"||!Q)&&Yy.test($))return!0;if((Q==="v6"||!Q)&&Wy.test($))return!0;return!1}function My($,Q){if(!$y.test($))return!1;try{let[J]=$.split(".");if(!J)return!1;let X=J.replace(/-/g,"+").replace(/_/g,"/").padEnd(J.length+(4-J.length%4)%4,"="),Y=JSON.parse(atob(X));if(typeof Y!=="object"||Y===null)return!1;if("typ"in Y&&Y?.typ!=="JWT")return!1;if(!Y.alg)return!1;if(Q&&Y.alg!==Q)return!1;return!0}catch{return!1}}function Hy($,Q){if((Q==="v4"||!Q)&&Gy.test($))return!0;if((Q==="v6"||!Q)&&qy.test($))return!0;return!1}class e$ extends H0{_parse($){if(this._def.coerce)$.data=String($.data);if(this._getType($)!==m.string){let Y=this._getOrReturnCtx($);return l(Y,{code:A.invalid_type,expected:m.string,received:Y.parsedType}),Y0}let J=new e0,X=void 0;for(let Y of this._def.checks)if(Y.kind==="min"){if($.data.length<Y.value)X=this._getOrReturnCtx($,X),l(X,{code:A.too_small,minimum:Y.value,type:"string",inclusive:!0,exact:!1,message:Y.message}),J.dirty()}else if(Y.kind==="max"){if($.data.length>Y.value)X=this._getOrReturnCtx($,X),l(X,{code:A.too_big,maximum:Y.value,type:"string",inclusive:!0,exact:!1,message:Y.message}),J.dirty()}else if(Y.kind==="length"){let G=$.data.length>Y.value,W=$.data.length<Y.value;if(G||W){if(X=this._getOrReturnCtx($,X),G)l(X,{code:A.too_big,maximum:Y.value,type:"string",inclusive:!0,exact:!0,message:Y.message});else if(W)l(X,{code:A.too_small,minimum:Y.value,type:"string",inclusive:!0,exact:!0,message:Y.message});J.dirty()}}else if(Y.kind==="email"){if(!Jy.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"email",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="emoji"){if(!Iz)Iz=new RegExp(Xy,"u");if(!Iz.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"emoji",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="uuid"){if(!tm.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"uuid",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="nanoid"){if(!em.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"nanoid",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="cuid"){if(!om.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"cuid",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="cuid2"){if(!sm.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"cuid2",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="ulid"){if(!rm.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"ulid",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="url")try{new URL($.data)}catch{X=this._getOrReturnCtx($,X),l(X,{validation:"url",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="regex"){if(Y.regex.lastIndex=0,!Y.regex.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"regex",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="trim")$.data=$.data.trim();else if(Y.kind==="includes"){if(!$.data.includes(Y.value,Y.position))X=this._getOrReturnCtx($,X),l(X,{code:A.invalid_string,validation:{includes:Y.value,position:Y.position},message:Y.message}),J.dirty()}else if(Y.kind==="toLowerCase")$.data=$.data.toLowerCase();else if(Y.kind==="toUpperCase")$.data=$.data.toUpperCase();else if(Y.kind==="startsWith"){if(!$.data.startsWith(Y.value))X=this._getOrReturnCtx($,X),l(X,{code:A.invalid_string,validation:{startsWith:Y.value},message:Y.message}),J.dirty()}else if(Y.kind==="endsWith"){if(!$.data.endsWith(Y.value))X=this._getOrReturnCtx($,X),l(X,{code:A.invalid_string,validation:{endsWith:Y.value},message:Y.message}),J.dirty()}else if(Y.kind==="datetime"){if(!XL(Y).test($.data))X=this._getOrReturnCtx($,X),l(X,{code:A.invalid_string,validation:"datetime",message:Y.message}),J.dirty()}else if(Y.kind==="date"){if(!Ky.test($.data))X=this._getOrReturnCtx($,X),l(X,{code:A.invalid_string,validation:"date",message:Y.message}),J.dirty()}else if(Y.kind==="time"){if(!Uy(Y).test($.data))X=this._getOrReturnCtx($,X),l(X,{code:A.invalid_string,validation:"time",message:Y.message}),J.dirty()}else if(Y.kind==="duration"){if(!Qy.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"duration",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="ip"){if(!xy($.data,Y.version))X=this._getOrReturnCtx($,X),l(X,{validation:"ip",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="jwt"){if(!My($.data,Y.alg))X=this._getOrReturnCtx($,X),l(X,{validation:"jwt",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="cidr"){if(!Hy($.data,Y.version))X=this._getOrReturnCtx($,X),l(X,{validation:"cidr",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="base64"){if(!zy.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"base64",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="base64url"){if(!Vy.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"base64url",code:A.invalid_string,message:Y.message}),J.dirty()}else w0.assertNever(Y);return{status:J.value,value:$.data}}_regex($,Q,J){return this.refinement((X)=>$.test(X),{validation:Q,code:A.invalid_string,...r.errToObj(J)})}_addCheck($){return new e$({...this._def,checks:[...this._def.checks,$]})}email($){return this._addCheck({kind:"email",...r.errToObj($)})}url($){return this._addCheck({kind:"url",...r.errToObj($)})}emoji($){return this._addCheck({kind:"emoji",...r.errToObj($)})}uuid($){return this._addCheck({kind:"uuid",...r.errToObj($)})}nanoid($){return this._addCheck({kind:"nanoid",...r.errToObj($)})}cuid($){return this._addCheck({kind:"cuid",...r.errToObj($)})}cuid2($){return this._addCheck({kind:"cuid2",...r.errToObj($)})}ulid($){return this._addCheck({kind:"ulid",...r.errToObj($)})}base64($){return this._addCheck({kind:"base64",...r.errToObj($)})}base64url($){return this._addCheck({kind:"base64url",...r.errToObj($)})}jwt($){return this._addCheck({kind:"jwt",...r.errToObj($)})}ip($){return this._addCheck({kind:"ip",...r.errToObj($)})}cidr($){return this._addCheck({kind:"cidr",...r.errToObj($)})}datetime($){if(typeof $==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:$});return this._addCheck({kind:"datetime",precision:typeof $?.precision>"u"?null:$?.precision,offset:$?.offset??!1,local:$?.local??!1,...r.errToObj($?.message)})}date($){return this._addCheck({kind:"date",message:$})}time($){if(typeof $==="string")return this._addCheck({kind:"time",precision:null,message:$});return this._addCheck({kind:"time",precision:typeof $?.precision>"u"?null:$?.precision,...r.errToObj($?.message)})}duration($){return this._addCheck({kind:"duration",...r.errToObj($)})}regex($,Q){return this._addCheck({kind:"regex",regex:$,...r.errToObj(Q)})}includes($,Q){return this._addCheck({kind:"includes",value:$,position:Q?.position,...r.errToObj(Q?.message)})}startsWith($,Q){return this._addCheck({kind:"startsWith",value:$,...r.errToObj(Q)})}endsWith($,Q){return this._addCheck({kind:"endsWith",value:$,...r.errToObj(Q)})}min($,Q){return this._addCheck({kind:"min",value:$,...r.errToObj(Q)})}max($,Q){return this._addCheck({kind:"max",value:$,...r.errToObj(Q)})}length($,Q){return this._addCheck({kind:"length",value:$,...r.errToObj(Q)})}nonempty($){return this.min(1,r.errToObj($))}trim(){return new e$({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e$({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e$({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(($)=>$.kind==="datetime")}get isDate(){return!!this._def.checks.find(($)=>$.kind==="date")}get isTime(){return!!this._def.checks.find(($)=>$.kind==="time")}get isDuration(){return!!this._def.checks.find(($)=>$.kind==="duration")}get isEmail(){return!!this._def.checks.find(($)=>$.kind==="email")}get isURL(){return!!this._def.checks.find(($)=>$.kind==="url")}get isEmoji(){return!!this._def.checks.find(($)=>$.kind==="emoji")}get isUUID(){return!!this._def.checks.find(($)=>$.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(($)=>$.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(($)=>$.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(($)=>$.kind==="cuid2")}get isULID(){return!!this._def.checks.find(($)=>$.kind==="ulid")}get isIP(){return!!this._def.checks.find(($)=>$.kind==="ip")}get isCIDR(){return!!this._def.checks.find(($)=>$.kind==="cidr")}get isBase64(){return!!this._def.checks.find(($)=>$.kind==="base64")}get isBase64url(){return!!this._def.checks.find(($)=>$.kind==="base64url")}get minLength(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $}get maxLength(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $}}e$.create=($)=>{return new e$({checks:[],typeName:G0.ZodString,coerce:$?.coerce??!1,...K0($)})};function By($,Q){let J=($.toString().split(".")[1]||"").length,X=(Q.toString().split(".")[1]||"").length,Y=J>X?J:X,G=Number.parseInt($.toFixed(Y).replace(".","")),W=Number.parseInt(Q.toFixed(Y).replace(".",""));return G%W/10**Y}class qQ extends H0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse($){if(this._def.coerce)$.data=Number($.data);if(this._getType($)!==m.number){let Y=this._getOrReturnCtx($);return l(Y,{code:A.invalid_type,expected:m.number,received:Y.parsedType}),Y0}let J=void 0,X=new e0;for(let Y of this._def.checks)if(Y.kind==="int"){if(!w0.isInteger($.data))J=this._getOrReturnCtx($,J),l(J,{code:A.invalid_type,expected:"integer",received:"float",message:Y.message}),X.dirty()}else if(Y.kind==="min"){if(Y.inclusive?$.data<Y.value:$.data<=Y.value)J=this._getOrReturnCtx($,J),l(J,{code:A.too_small,minimum:Y.value,type:"number",inclusive:Y.inclusive,exact:!1,message:Y.message}),X.dirty()}else if(Y.kind==="max"){if(Y.inclusive?$.data>Y.value:$.data>=Y.value)J=this._getOrReturnCtx($,J),l(J,{code:A.too_big,maximum:Y.value,type:"number",inclusive:Y.inclusive,exact:!1,message:Y.message}),X.dirty()}else if(Y.kind==="multipleOf"){if(By($.data,Y.value)!==0)J=this._getOrReturnCtx($,J),l(J,{code:A.not_multiple_of,multipleOf:Y.value,message:Y.message}),X.dirty()}else if(Y.kind==="finite"){if(!Number.isFinite($.data))J=this._getOrReturnCtx($,J),l(J,{code:A.not_finite,message:Y.message}),X.dirty()}else w0.assertNever(Y);return{status:X.value,value:$.data}}gte($,Q){return this.setLimit("min",$,!0,r.toString(Q))}gt($,Q){return this.setLimit("min",$,!1,r.toString(Q))}lte($,Q){return this.setLimit("max",$,!0,r.toString(Q))}lt($,Q){return this.setLimit("max",$,!1,r.toString(Q))}setLimit($,Q,J,X){return new qQ({...this._def,checks:[...this._def.checks,{kind:$,value:Q,inclusive:J,message:r.toString(X)}]})}_addCheck($){return new qQ({...this._def,checks:[...this._def.checks,$]})}int($){return this._addCheck({kind:"int",message:r.toString($)})}positive($){return this._addCheck({kind:"min",value:0,inclusive:!1,message:r.toString($)})}negative($){return this._addCheck({kind:"max",value:0,inclusive:!1,message:r.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:0,inclusive:!0,message:r.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:0,inclusive:!0,message:r.toString($)})}multipleOf($,Q){return this._addCheck({kind:"multipleOf",value:$,message:r.toString(Q)})}finite($){return this._addCheck({kind:"finite",message:r.toString($)})}safe($){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:r.toString($)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:r.toString($)})}get minValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $}get maxValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $}get isInt(){return!!this._def.checks.find(($)=>$.kind==="int"||$.kind==="multipleOf"&&w0.isInteger($.value))}get isFinite(){let $=null,Q=null;for(let J of this._def.checks)if(J.kind==="finite"||J.kind==="int"||J.kind==="multipleOf")return!0;else if(J.kind==="min"){if(Q===null||J.value>Q)Q=J.value}else if(J.kind==="max"){if($===null||J.value<$)$=J.value}return Number.isFinite(Q)&&Number.isFinite($)}}qQ.create=($)=>{return new qQ({checks:[],typeName:G0.ZodNumber,coerce:$?.coerce||!1,...K0($)})};class zQ extends H0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse($){if(this._def.coerce)try{$.data=BigInt($.data)}catch{return this._getInvalidInput($)}if(this._getType($)!==m.bigint)return this._getInvalidInput($);let J=void 0,X=new e0;for(let Y of this._def.checks)if(Y.kind==="min"){if(Y.inclusive?$.data<Y.value:$.data<=Y.value)J=this._getOrReturnCtx($,J),l(J,{code:A.too_small,type:"bigint",minimum:Y.value,inclusive:Y.inclusive,message:Y.message}),X.dirty()}else if(Y.kind==="max"){if(Y.inclusive?$.data>Y.value:$.data>=Y.value)J=this._getOrReturnCtx($,J),l(J,{code:A.too_big,type:"bigint",maximum:Y.value,inclusive:Y.inclusive,message:Y.message}),X.dirty()}else if(Y.kind==="multipleOf"){if($.data%Y.value!==BigInt(0))J=this._getOrReturnCtx($,J),l(J,{code:A.not_multiple_of,multipleOf:Y.value,message:Y.message}),X.dirty()}else w0.assertNever(Y);return{status:X.value,value:$.data}}_getInvalidInput($){let Q=this._getOrReturnCtx($);return l(Q,{code:A.invalid_type,expected:m.bigint,received:Q.parsedType}),Y0}gte($,Q){return this.setLimit("min",$,!0,r.toString(Q))}gt($,Q){return this.setLimit("min",$,!1,r.toString(Q))}lte($,Q){return this.setLimit("max",$,!0,r.toString(Q))}lt($,Q){return this.setLimit("max",$,!1,r.toString(Q))}setLimit($,Q,J,X){return new zQ({...this._def,checks:[...this._def.checks,{kind:$,value:Q,inclusive:J,message:r.toString(X)}]})}_addCheck($){return new zQ({...this._def,checks:[...this._def.checks,$]})}positive($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:r.toString($)})}negative($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:r.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:r.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:r.toString($)})}multipleOf($,Q){return this._addCheck({kind:"multipleOf",value:$,message:r.toString(Q)})}get minValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $}get maxValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $}}zQ.create=($)=>{return new zQ({checks:[],typeName:G0.ZodBigInt,coerce:$?.coerce??!1,...K0($)})};class WX extends H0{_parse($){if(this._def.coerce)$.data=Boolean($.data);if(this._getType($)!==m.boolean){let J=this._getOrReturnCtx($);return l(J,{code:A.invalid_type,expected:m.boolean,received:J.parsedType}),Y0}return G$($.data)}}WX.create=($)=>{return new WX({typeName:G0.ZodBoolean,coerce:$?.coerce||!1,...K0($)})};class dQ extends H0{_parse($){if(this._def.coerce)$.data=new Date($.data);if(this._getType($)!==m.date){let Y=this._getOrReturnCtx($);return l(Y,{code:A.invalid_type,expected:m.date,received:Y.parsedType}),Y0}if(Number.isNaN($.data.getTime())){let Y=this._getOrReturnCtx($);return l(Y,{code:A.invalid_date}),Y0}let J=new e0,X=void 0;for(let Y of this._def.checks)if(Y.kind==="min"){if($.data.getTime()<Y.value)X=this._getOrReturnCtx($,X),l(X,{code:A.too_small,message:Y.message,inclusive:!0,exact:!1,minimum:Y.value,type:"date"}),J.dirty()}else if(Y.kind==="max"){if($.data.getTime()>Y.value)X=this._getOrReturnCtx($,X),l(X,{code:A.too_big,message:Y.message,inclusive:!0,exact:!1,maximum:Y.value,type:"date"}),J.dirty()}else w0.assertNever(Y);return{status:J.value,value:new Date($.data.getTime())}}_addCheck($){return new dQ({...this._def,checks:[...this._def.checks,$]})}min($,Q){return this._addCheck({kind:"min",value:$.getTime(),message:r.toString(Q)})}max($,Q){return this._addCheck({kind:"max",value:$.getTime(),message:r.toString(Q)})}get minDate(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $!=null?new Date($):null}get maxDate(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $!=null?new Date($):null}}dQ.create=($)=>{return new dQ({checks:[],coerce:$?.coerce||!1,typeName:G0.ZodDate,...K0($)})};class SY extends H0{_parse($){if(this._getType($)!==m.symbol){let J=this._getOrReturnCtx($);return l(J,{code:A.invalid_type,expected:m.symbol,received:J.parsedType}),Y0}return G$($.data)}}SY.create=($)=>{return new SY({typeName:G0.ZodSymbol,...K0($)})};class qX extends H0{_parse($){if(this._getType($)!==m.undefined){let J=this._getOrReturnCtx($);return l(J,{code:A.invalid_type,expected:m.undefined,received:J.parsedType}),Y0}return G$($.data)}}qX.create=($)=>{return new qX({typeName:G0.ZodUndefined,...K0($)})};class zX extends H0{_parse($){if(this._getType($)!==m.null){let J=this._getOrReturnCtx($);return l(J,{code:A.invalid_type,expected:m.null,received:J.parsedType}),Y0}return G$($.data)}}zX.create=($)=>{return new zX({typeName:G0.ZodNull,...K0($)})};class aQ extends H0{constructor(){super(...arguments);this._any=!0}_parse($){return G$($.data)}}aQ.create=($)=>{return new aQ({typeName:G0.ZodAny,...K0($)})};class WQ extends H0{constructor(){super(...arguments);this._unknown=!0}_parse($){return G$($.data)}}WQ.create=($)=>{return new WQ({typeName:G0.ZodUnknown,...K0($)})};class B8 extends H0{_parse($){let Q=this._getOrReturnCtx($);return l(Q,{code:A.invalid_type,expected:m.never,received:Q.parsedType}),Y0}}B8.create=($)=>{return new B8({typeName:G0.ZodNever,...K0($)})};class bY extends H0{_parse($){if(this._getType($)!==m.undefined){let J=this._getOrReturnCtx($);return l(J,{code:A.invalid_type,expected:m.void,received:J.parsedType}),Y0}return G$($.data)}}bY.create=($)=>{return new bY({typeName:G0.ZodVoid,...K0($)})};class $8 extends H0{_parse($){let{ctx:Q,status:J}=this._processInputParams($),X=this._def;if(Q.parsedType!==m.array)return l(Q,{code:A.invalid_type,expected:m.array,received:Q.parsedType}),Y0;if(X.exactLength!==null){let G=Q.data.length>X.exactLength.value,W=Q.data.length<X.exactLength.value;if(G||W)l(Q,{code:G?A.too_big:A.too_small,minimum:W?X.exactLength.value:void 0,maximum:G?X.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:X.exactLength.message}),J.dirty()}if(X.minLength!==null){if(Q.data.length<X.minLength.value)l(Q,{code:A.too_small,minimum:X.minLength.value,type:"array",inclusive:!0,exact:!1,message:X.minLength.message}),J.dirty()}if(X.maxLength!==null){if(Q.data.length>X.maxLength.value)l(Q,{code:A.too_big,maximum:X.maxLength.value,type:"array",inclusive:!0,exact:!1,message:X.maxLength.message}),J.dirty()}if(Q.common.async)return Promise.all([...Q.data].map((G,W)=>{return X.type._parseAsync(new J8(Q,G,Q.path,W))})).then((G)=>{return e0.mergeArray(J,G)});let Y=[...Q.data].map((G,W)=>{return X.type._parseSync(new J8(Q,G,Q.path,W))});return e0.mergeArray(J,Y)}get element(){return this._def.type}min($,Q){return new $8({...this._def,minLength:{value:$,message:r.toString(Q)}})}max($,Q){return new $8({...this._def,maxLength:{value:$,message:r.toString(Q)}})}length($,Q){return new $8({...this._def,exactLength:{value:$,message:r.toString(Q)}})}nonempty($){return this.min(1,$)}}$8.create=($,Q)=>{return new $8({type:$,minLength:null,maxLength:null,exactLength:null,typeName:G0.ZodArray,...K0(Q)})};function YX($){if($ instanceof S0){let Q={};for(let J in $.shape){let X=$.shape[J];Q[J]=Q8.create(YX(X))}return new S0({...$._def,shape:()=>Q})}else if($ instanceof $8)return new $8({...$._def,type:YX($.element)});else if($ instanceof Q8)return Q8.create(YX($.unwrap()));else if($ instanceof b8)return b8.create(YX($.unwrap()));else if($ instanceof Z8)return Z8.create($.items.map((Q)=>YX(Q)));else return $}class S0 extends H0{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let $=this._def.shape(),Q=w0.objectKeys($);return this._cached={shape:$,keys:Q},this._cached}_parse($){if(this._getType($)!==m.object){let z=this._getOrReturnCtx($);return l(z,{code:A.invalid_type,expected:m.object,received:z.parsedType}),Y0}let{status:J,ctx:X}=this._processInputParams($),{shape:Y,keys:G}=this._getCached(),W=[];if(!(this._def.catchall instanceof B8&&this._def.unknownKeys==="strip")){for(let z in X.data)if(!G.includes(z))W.push(z)}let q=[];for(let z of G){let K=Y[z],V=X.data[z];q.push({key:{status:"valid",value:z},value:K._parse(new J8(X,V,X.path,z)),alwaysSet:z in X.data})}if(this._def.catchall instanceof B8){let z=this._def.unknownKeys;if(z==="passthrough")for(let K of W)q.push({key:{status:"valid",value:K},value:{status:"valid",value:X.data[K]}});else if(z==="strict"){if(W.length>0)l(X,{code:A.unrecognized_keys,keys:W}),J.dirty()}else if(z==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let z=this._def.catchall;for(let K of W){let V=X.data[K];q.push({key:{status:"valid",value:K},value:z._parse(new J8(X,V,X.path,K)),alwaysSet:K in X.data})}}if(X.common.async)return Promise.resolve().then(async()=>{let z=[];for(let K of q){let V=await K.key,U=await K.value;z.push({key:V,value:U,alwaysSet:K.alwaysSet})}return z}).then((z)=>{return e0.mergeObjectSync(J,z)});else return e0.mergeObjectSync(J,q)}get shape(){return this._def.shape()}strict($){return r.errToObj,new S0({...this._def,unknownKeys:"strict",...$!==void 0?{errorMap:(Q,J)=>{let X=this._def.errorMap?.(Q,J).message??J.defaultError;if(Q.code==="unrecognized_keys")return{message:r.errToObj($).message??X};return{message:X}}}:{}})}strip(){return new S0({...this._def,unknownKeys:"strip"})}passthrough(){return new S0({...this._def,unknownKeys:"passthrough"})}extend($){return new S0({...this._def,shape:()=>({...this._def.shape(),...$})})}merge($){return new S0({unknownKeys:$._def.unknownKeys,catchall:$._def.catchall,shape:()=>({...this._def.shape(),...$._def.shape()}),typeName:G0.ZodObject})}setKey($,Q){return this.augment({[$]:Q})}catchall($){return new S0({...this._def,catchall:$})}pick($){let Q={};for(let J of w0.objectKeys($))if($[J]&&this.shape[J])Q[J]=this.shape[J];return new S0({...this._def,shape:()=>Q})}omit($){let Q={};for(let J of w0.objectKeys(this.shape))if(!$[J])Q[J]=this.shape[J];return new S0({...this._def,shape:()=>Q})}deepPartial(){return YX(this)}partial($){let Q={};for(let J of w0.objectKeys(this.shape)){let X=this.shape[J];if($&&!$[J])Q[J]=X;else Q[J]=X.optional()}return new S0({...this._def,shape:()=>Q})}required($){let Q={};for(let J of w0.objectKeys(this.shape))if($&&!$[J])Q[J]=this.shape[J];else{let Y=this.shape[J];while(Y instanceof Q8)Y=Y._def.innerType;Q[J]=Y}return new S0({...this._def,shape:()=>Q})}keyof(){return YL(w0.objectKeys(this.shape))}}S0.create=($,Q)=>{return new S0({shape:()=>$,unknownKeys:"strip",catchall:B8.create(),typeName:G0.ZodObject,...K0(Q)})};S0.strictCreate=($,Q)=>{return new S0({shape:()=>$,unknownKeys:"strict",catchall:B8.create(),typeName:G0.ZodObject,...K0(Q)})};S0.lazycreate=($,Q)=>{return new S0({shape:$,unknownKeys:"strip",catchall:B8.create(),typeName:G0.ZodObject,...K0(Q)})};class VX extends H0{_parse($){let{ctx:Q}=this._processInputParams($),J=this._def.options;function X(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 Q.common.issues.push(...W.ctx.common.issues),W.result;let G=Y.map((W)=>new Z$(W.ctx.common.issues));return l(Q,{code:A.invalid_union,unionErrors:G}),Y0}if(Q.common.async)return Promise.all(J.map(async(Y)=>{let G={...Q,common:{...Q.common,issues:[]},parent:null};return{result:await Y._parseAsync({data:Q.data,path:Q.path,parent:G}),ctx:G}})).then(X);else{let Y=void 0,G=[];for(let q of J){let z={...Q,common:{...Q.common,issues:[]},parent:null},K=q._parseSync({data:Q.data,path:Q.path,parent:z});if(K.status==="valid")return K;else if(K.status==="dirty"&&!Y)Y={result:K,ctx:z};if(z.common.issues.length)G.push(z.common.issues)}if(Y)return Q.common.issues.push(...Y.ctx.common.issues),Y.result;let W=G.map((q)=>new Z$(q));return l(Q,{code:A.invalid_union,unionErrors:W}),Y0}}get options(){return this._def.options}}VX.create=($,Q)=>{return new VX({options:$,typeName:G0.ZodUnion,...K0(Q)})};var S8=($)=>{if($ instanceof UX)return S8($.schema);else if($ instanceof X8)return S8($.innerType());else if($ instanceof xX)return[$.value];else if($ instanceof VQ)return $.options;else if($ instanceof MX)return w0.objectValues($.enum);else if($ instanceof HX)return S8($._def.innerType);else if($ instanceof qX)return[void 0];else if($ instanceof zX)return[null];else if($ instanceof Q8)return[void 0,...S8($.unwrap())];else if($ instanceof b8)return[null,...S8($.unwrap())];else if($ instanceof g6)return S8($.unwrap());else if($ instanceof ZX)return S8($.unwrap());else if($ instanceof BX)return S8($._def.innerType);else return[]};class u6 extends H0{_parse($){let{ctx:Q}=this._processInputParams($);if(Q.parsedType!==m.object)return l(Q,{code:A.invalid_type,expected:m.object,received:Q.parsedType}),Y0;let J=this.discriminator,X=Q.data[J],Y=this.optionsMap.get(X);if(!Y)return l(Q,{code:A.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[J]}),Y0;if(Q.common.async)return Y._parseAsync({data:Q.data,path:Q.path,parent:Q});else return Y._parseSync({data:Q.data,path:Q.path,parent:Q})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create($,Q,J){let X=new Map;for(let Y of Q){let G=S8(Y.shape[$]);if(!G.length)throw Error(`A discriminator value for key \`${$}\` could not be extracted from all schema options`);for(let W of G){if(X.has(W))throw Error(`Discriminator property ${String($)} has duplicate value ${String(W)}`);X.set(W,Y)}}return new u6({typeName:G0.ZodDiscriminatedUnion,discriminator:$,options:Q,optionsMap:X,...K0(J)})}}function Pz($,Q){let J=H8($),X=H8(Q);if($===Q)return{valid:!0,data:$};else if(J===m.object&&X===m.object){let Y=w0.objectKeys(Q),G=w0.objectKeys($).filter((q)=>Y.indexOf(q)!==-1),W={...$,...Q};for(let q of G){let z=Pz($[q],Q[q]);if(!z.valid)return{valid:!1};W[q]=z.data}return{valid:!0,data:W}}else if(J===m.array&&X===m.array){if($.length!==Q.length)return{valid:!1};let Y=[];for(let G=0;G<$.length;G++){let W=$[G],q=Q[G],z=Pz(W,q);if(!z.valid)return{valid:!1};Y.push(z.data)}return{valid:!0,data:Y}}else if(J===m.date&&X===m.date&&+$===+Q)return{valid:!0,data:$};else return{valid:!1}}class KX extends H0{_parse($){let{status:Q,ctx:J}=this._processInputParams($),X=(Y,G)=>{if(h6(Y)||h6(G))return Y0;let W=Pz(Y.value,G.value);if(!W.valid)return l(J,{code:A.invalid_intersection_types}),Y0;if(p6(Y)||p6(G))Q.dirty();return{status:Q.value,value:W.data}};if(J.common.async)return Promise.all([this._def.left._parseAsync({data:J.data,path:J.path,parent:J}),this._def.right._parseAsync({data:J.data,path:J.path,parent:J})]).then(([Y,G])=>X(Y,G));else return X(this._def.left._parseSync({data:J.data,path:J.path,parent:J}),this._def.right._parseSync({data:J.data,path:J.path,parent:J}))}}KX.create=($,Q,J)=>{return new KX({left:$,right:Q,typeName:G0.ZodIntersection,...K0(J)})};class Z8 extends H0{_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==m.array)return l(J,{code:A.invalid_type,expected:m.array,received:J.parsedType}),Y0;if(J.data.length<this._def.items.length)return l(J,{code:A.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Y0;if(!this._def.rest&&J.data.length>this._def.items.length)l(J,{code:A.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Q.dirty();let Y=[...J.data].map((G,W)=>{let q=this._def.items[W]||this._def.rest;if(!q)return null;return q._parse(new J8(J,G,J.path,W))}).filter((G)=>!!G);if(J.common.async)return Promise.all(Y).then((G)=>{return e0.mergeArray(Q,G)});else return e0.mergeArray(Q,Y)}get items(){return this._def.items}rest($){return new Z8({...this._def,rest:$})}}Z8.create=($,Q)=>{if(!Array.isArray($))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new Z8({items:$,typeName:G0.ZodTuple,rest:null,...K0(Q)})};class fY extends H0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==m.object)return l(J,{code:A.invalid_type,expected:m.object,received:J.parsedType}),Y0;let X=[],Y=this._def.keyType,G=this._def.valueType;for(let W in J.data)X.push({key:Y._parse(new J8(J,W,J.path,W)),value:G._parse(new J8(J,J.data[W],J.path,W)),alwaysSet:W in J.data});if(J.common.async)return e0.mergeObjectAsync(Q,X);else return e0.mergeObjectSync(Q,X)}get element(){return this._def.valueType}static create($,Q,J){if(Q instanceof H0)return new fY({keyType:$,valueType:Q,typeName:G0.ZodRecord,...K0(J)});return new fY({keyType:e$.create(),valueType:$,typeName:G0.ZodRecord,...K0(Q)})}}class mY extends H0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==m.map)return l(J,{code:A.invalid_type,expected:m.map,received:J.parsedType}),Y0;let X=this._def.keyType,Y=this._def.valueType,G=[...J.data.entries()].map(([W,q],z)=>{return{key:X._parse(new J8(J,W,J.path,[z,"key"])),value:Y._parse(new J8(J,q,J.path,[z,"value"]))}});if(J.common.async){let W=new Map;return Promise.resolve().then(async()=>{for(let q of G){let z=await q.key,K=await q.value;if(z.status==="aborted"||K.status==="aborted")return Y0;if(z.status==="dirty"||K.status==="dirty")Q.dirty();W.set(z.value,K.value)}return{status:Q.value,value:W}})}else{let W=new Map;for(let q of G){let{key:z,value:K}=q;if(z.status==="aborted"||K.status==="aborted")return Y0;if(z.status==="dirty"||K.status==="dirty")Q.dirty();W.set(z.value,K.value)}return{status:Q.value,value:W}}}}mY.create=($,Q,J)=>{return new mY({valueType:Q,keyType:$,typeName:G0.ZodMap,...K0(J)})};class oQ extends H0{_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==m.set)return l(J,{code:A.invalid_type,expected:m.set,received:J.parsedType}),Y0;let X=this._def;if(X.minSize!==null){if(J.data.size<X.minSize.value)l(J,{code:A.too_small,minimum:X.minSize.value,type:"set",inclusive:!0,exact:!1,message:X.minSize.message}),Q.dirty()}if(X.maxSize!==null){if(J.data.size>X.maxSize.value)l(J,{code:A.too_big,maximum:X.maxSize.value,type:"set",inclusive:!0,exact:!1,message:X.maxSize.message}),Q.dirty()}let Y=this._def.valueType;function G(q){let z=new Set;for(let K of q){if(K.status==="aborted")return Y0;if(K.status==="dirty")Q.dirty();z.add(K.value)}return{status:Q.value,value:z}}let W=[...J.data.values()].map((q,z)=>Y._parse(new J8(J,q,J.path,z)));if(J.common.async)return Promise.all(W).then((q)=>G(q));else return G(W)}min($,Q){return new oQ({...this._def,minSize:{value:$,message:r.toString(Q)}})}max($,Q){return new oQ({...this._def,maxSize:{value:$,message:r.toString(Q)}})}size($,Q){return this.min($,Q).max($,Q)}nonempty($){return this.min(1,$)}}oQ.create=($,Q)=>{return new oQ({valueType:$,minSize:null,maxSize:null,typeName:G0.ZodSet,...K0(Q)})};class GX extends H0{constructor(){super(...arguments);this.validate=this.implement}_parse($){let{ctx:Q}=this._processInputParams($);if(Q.parsedType!==m.function)return l(Q,{code:A.invalid_type,expected:m.function,received:Q.parsedType}),Y0;function J(W,q){return cY({data:W,path:Q.path,errorMaps:[Q.common.contextualErrorMap,Q.schemaErrorMap,JX(),c8].filter((z)=>!!z),issueData:{code:A.invalid_arguments,argumentsError:q}})}function X(W,q){return cY({data:W,path:Q.path,errorMaps:[Q.common.contextualErrorMap,Q.schemaErrorMap,JX(),c8].filter((z)=>!!z),issueData:{code:A.invalid_return_type,returnTypeError:q}})}let Y={errorMap:Q.common.contextualErrorMap},G=Q.data;if(this._def.returns instanceof sQ){let W=this;return G$(async function(...q){let z=new Z$([]),K=await W._def.args.parseAsync(q,Y).catch((x)=>{throw z.addIssue(J(q,x)),z}),V=await Reflect.apply(G,this,K);return await W._def.returns._def.type.parseAsync(V,Y).catch((x)=>{throw z.addIssue(X(V,x)),z})})}else{let W=this;return G$(function(...q){let z=W._def.args.safeParse(q,Y);if(!z.success)throw new Z$([J(q,z.error)]);let K=Reflect.apply(G,this,z.data),V=W._def.returns.safeParse(K,Y);if(!V.success)throw new Z$([X(K,V.error)]);return V.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...$){return new GX({...this._def,args:Z8.create($).rest(WQ.create())})}returns($){return new GX({...this._def,returns:$})}implement($){return this.parse($)}strictImplement($){return this.parse($)}static create($,Q,J){return new GX({args:$?$:Z8.create([]).rest(WQ.create()),returns:Q||WQ.create(),typeName:G0.ZodFunction,...K0(J)})}}class UX extends H0{get schema(){return this._def.getter()}_parse($){let{ctx:Q}=this._processInputParams($);return this._def.getter()._parse({data:Q.data,path:Q.path,parent:Q})}}UX.create=($,Q)=>{return new UX({getter:$,typeName:G0.ZodLazy,...K0(Q)})};class xX extends H0{_parse($){if($.data!==this._def.value){let Q=this._getOrReturnCtx($);return l(Q,{received:Q.data,code:A.invalid_literal,expected:this._def.value}),Y0}return{status:"valid",value:$.data}}get value(){return this._def.value}}xX.create=($,Q)=>{return new xX({value:$,typeName:G0.ZodLiteral,...K0(Q)})};function YL($,Q){return new VQ({values:$,typeName:G0.ZodEnum,...K0(Q)})}class VQ extends H0{_parse($){if(typeof $.data!=="string"){let Q=this._getOrReturnCtx($),J=this._def.values;return l(Q,{expected:w0.joinValues(J),received:Q.parsedType,code:A.invalid_type}),Y0}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has($.data)){let Q=this._getOrReturnCtx($),J=this._def.values;return l(Q,{received:Q.data,code:A.invalid_enum_value,options:J}),Y0}return G$($.data)}get options(){return this._def.values}get enum(){let $={};for(let Q of this._def.values)$[Q]=Q;return $}get Values(){let $={};for(let Q of this._def.values)$[Q]=Q;return $}get Enum(){let $={};for(let Q of this._def.values)$[Q]=Q;return $}extract($,Q=this._def){return VQ.create($,{...this._def,...Q})}exclude($,Q=this._def){return VQ.create(this.options.filter((J)=>!$.includes(J)),{...this._def,...Q})}}VQ.create=YL;class MX extends H0{_parse($){let Q=w0.getValidEnumValues(this._def.values),J=this._getOrReturnCtx($);if(J.parsedType!==m.string&&J.parsedType!==m.number){let X=w0.objectValues(Q);return l(J,{expected:w0.joinValues(X),received:J.parsedType,code:A.invalid_type}),Y0}if(!this._cache)this._cache=new Set(w0.getValidEnumValues(this._def.values));if(!this._cache.has($.data)){let X=w0.objectValues(Q);return l(J,{received:J.data,code:A.invalid_enum_value,options:X}),Y0}return G$($.data)}get enum(){return this._def.values}}MX.create=($,Q)=>{return new MX({values:$,typeName:G0.ZodNativeEnum,...K0(Q)})};class sQ extends H0{unwrap(){return this._def.type}_parse($){let{ctx:Q}=this._processInputParams($);if(Q.parsedType!==m.promise&&Q.common.async===!1)return l(Q,{code:A.invalid_type,expected:m.promise,received:Q.parsedType}),Y0;let J=Q.parsedType===m.promise?Q.data:Promise.resolve(Q.data);return G$(J.then((X)=>{return this._def.type.parseAsync(X,{path:Q.path,errorMap:Q.common.contextualErrorMap})}))}}sQ.create=($,Q)=>{return new sQ({type:$,typeName:G0.ZodPromise,...K0(Q)})};class X8 extends H0{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===G0.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse($){let{status:Q,ctx:J}=this._processInputParams($),X=this._def.effect||null,Y={addIssue:(G)=>{if(l(J,G),G.fatal)Q.abort();else Q.dirty()},get path(){return J.path}};if(Y.addIssue=Y.addIssue.bind(Y),X.type==="preprocess"){let G=X.transform(J.data,Y);if(J.common.async)return Promise.resolve(G).then(async(W)=>{if(Q.value==="aborted")return Y0;let q=await this._def.schema._parseAsync({data:W,path:J.path,parent:J});if(q.status==="aborted")return Y0;if(q.status==="dirty")return nQ(q.value);if(Q.value==="dirty")return nQ(q.value);return q});else{if(Q.value==="aborted")return Y0;let W=this._def.schema._parseSync({data:G,path:J.path,parent:J});if(W.status==="aborted")return Y0;if(W.status==="dirty")return nQ(W.value);if(Q.value==="dirty")return nQ(W.value);return W}}if(X.type==="refinement"){let G=(W)=>{let q=X.refinement(W,Y);if(J.common.async)return Promise.resolve(q);if(q instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return W};if(J.common.async===!1){let W=this._def.schema._parseSync({data:J.data,path:J.path,parent:J});if(W.status==="aborted")return Y0;if(W.status==="dirty")Q.dirty();return G(W.value),{status:Q.value,value:W.value}}else return this._def.schema._parseAsync({data:J.data,path:J.path,parent:J}).then((W)=>{if(W.status==="aborted")return Y0;if(W.status==="dirty")Q.dirty();return G(W.value).then(()=>{return{status:Q.value,value:W.value}})})}if(X.type==="transform")if(J.common.async===!1){let G=this._def.schema._parseSync({data:J.data,path:J.path,parent:J});if(!GQ(G))return Y0;let W=X.transform(G.value,Y);if(W instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:Q.value,value:W}}else return this._def.schema._parseAsync({data:J.data,path:J.path,parent:J}).then((G)=>{if(!GQ(G))return Y0;return Promise.resolve(X.transform(G.value,Y)).then((W)=>({status:Q.value,value:W}))});w0.assertNever(X)}}X8.create=($,Q,J)=>{return new X8({schema:$,typeName:G0.ZodEffects,effect:Q,...K0(J)})};X8.createWithPreprocess=($,Q,J)=>{return new X8({schema:Q,effect:{type:"preprocess",transform:$},typeName:G0.ZodEffects,...K0(J)})};class Q8 extends H0{_parse($){if(this._getType($)===m.undefined)return G$(void 0);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}Q8.create=($,Q)=>{return new Q8({innerType:$,typeName:G0.ZodOptional,...K0(Q)})};class b8 extends H0{_parse($){if(this._getType($)===m.null)return G$(null);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}b8.create=($,Q)=>{return new b8({innerType:$,typeName:G0.ZodNullable,...K0(Q)})};class HX extends H0{_parse($){let{ctx:Q}=this._processInputParams($),J=Q.data;if(Q.parsedType===m.undefined)J=this._def.defaultValue();return this._def.innerType._parse({data:J,path:Q.path,parent:Q})}removeDefault(){return this._def.innerType}}HX.create=($,Q)=>{return new HX({innerType:$,typeName:G0.ZodDefault,defaultValue:typeof Q.default==="function"?Q.default:()=>Q.default,...K0(Q)})};class BX extends H0{_parse($){let{ctx:Q}=this._processInputParams($),J={...Q,common:{...Q.common,issues:[]}},X=this._def.innerType._parse({data:J.data,path:J.path,parent:{...J}});if(XX(X))return X.then((Y)=>{return{status:"valid",value:Y.status==="valid"?Y.value:this._def.catchValue({get error(){return new Z$(J.common.issues)},input:J.data})}});else return{status:"valid",value:X.status==="valid"?X.value:this._def.catchValue({get error(){return new Z$(J.common.issues)},input:J.data})}}removeCatch(){return this._def.innerType}}BX.create=($,Q)=>{return new BX({innerType:$,typeName:G0.ZodCatch,catchValue:typeof Q.catch==="function"?Q.catch:()=>Q.catch,...K0(Q)})};class yY extends H0{_parse($){if(this._getType($)!==m.nan){let J=this._getOrReturnCtx($);return l(J,{code:A.invalid_type,expected:m.nan,received:J.parsedType}),Y0}return{status:"valid",value:$.data}}}yY.create=($)=>{return new yY({typeName:G0.ZodNaN,...K0($)})};var Zy=Symbol("zod_brand");class g6 extends H0{_parse($){let{ctx:Q}=this._processInputParams($),J=Q.data;return this._def.type._parse({data:J,path:Q.path,parent:Q})}unwrap(){return this._def.type}}class hY extends H0{_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.common.async)return(async()=>{let Y=await this._def.in._parseAsync({data:J.data,path:J.path,parent:J});if(Y.status==="aborted")return Y0;if(Y.status==="dirty")return Q.dirty(),nQ(Y.value);else return this._def.out._parseAsync({data:Y.value,path:J.path,parent:J})})();else{let X=this._def.in._parseSync({data:J.data,path:J.path,parent:J});if(X.status==="aborted")return Y0;if(X.status==="dirty")return Q.dirty(),{status:"dirty",value:X.value};else return this._def.out._parseSync({data:X.value,path:J.path,parent:J})}}static create($,Q){return new hY({in:$,out:Q,typeName:G0.ZodPipeline})}}class ZX extends H0{_parse($){let Q=this._def.innerType._parse($),J=(X)=>{if(GQ(X))X.value=Object.freeze(X.value);return X};return XX(Q)?Q.then((X)=>J(X)):J(Q)}unwrap(){return this._def.innerType}}ZX.create=($,Q)=>{return new ZX({innerType:$,typeName:G0.ZodReadonly,...K0(Q)})};function $L($,Q){let J=typeof $==="function"?$(Q):typeof $==="string"?{message:$}:$;return typeof J==="string"?{message:J}:J}function GL($,Q={},J){if($)return aQ.create().superRefine((X,Y)=>{let G=$(X);if(G instanceof Promise)return G.then((W)=>{if(!W){let q=$L(Q,X),z=q.fatal??J??!0;Y.addIssue({code:"custom",...q,fatal:z})}});if(!G){let W=$L(Q,X),q=W.fatal??J??!0;Y.addIssue({code:"custom",...W,fatal:q})}return});return aQ.create()}var wy={object:S0.lazycreate},G0;(function($){$.ZodString="ZodString",$.ZodNumber="ZodNumber",$.ZodNaN="ZodNaN",$.ZodBigInt="ZodBigInt",$.ZodBoolean="ZodBoolean",$.ZodDate="ZodDate",$.ZodSymbol="ZodSymbol",$.ZodUndefined="ZodUndefined",$.ZodNull="ZodNull",$.ZodAny="ZodAny",$.ZodUnknown="ZodUnknown",$.ZodNever="ZodNever",$.ZodVoid="ZodVoid",$.ZodArray="ZodArray",$.ZodObject="ZodObject",$.ZodUnion="ZodUnion",$.ZodDiscriminatedUnion="ZodDiscriminatedUnion",$.ZodIntersection="ZodIntersection",$.ZodTuple="ZodTuple",$.ZodRecord="ZodRecord",$.ZodMap="ZodMap",$.ZodSet="ZodSet",$.ZodFunction="ZodFunction",$.ZodLazy="ZodLazy",$.ZodLiteral="ZodLiteral",$.ZodEnum="ZodEnum",$.ZodEffects="ZodEffects",$.ZodNativeEnum="ZodNativeEnum",$.ZodOptional="ZodOptional",$.ZodNullable="ZodNullable",$.ZodDefault="ZodDefault",$.ZodCatch="ZodCatch",$.ZodPromise="ZodPromise",$.ZodBranded="ZodBranded",$.ZodPipeline="ZodPipeline",$.ZodReadonly="ZodReadonly"})(G0||(G0={}));var jy=($,Q={message:`Input not instance of ${$.name}`})=>GL((J)=>J instanceof $,Q),WL=e$.create,qL=qQ.create,Ly=yY.create,Ry=zQ.create,zL=WX.create,Dy=dQ.create,_y=SY.create,Ny=qX.create,vy=zX.create,Oy=aQ.create,Fy=WQ.create,Cy=B8.create,Iy=bY.create,Py=$8.create,Ty=S0.create,Ay=S0.strictCreate,Ey=VX.create,ky=u6.create,cy=KX.create,Sy=Z8.create,by=fY.create,fy=mY.create,my=oQ.create,yy=GX.create,hy=UX.create,py=xX.create,uy=VQ.create,gy=MX.create,ly=sQ.create,iy=X8.create,ny=Q8.create,dy=b8.create,ay=X8.createWithPreprocess,oy=hY.create,sy=()=>WL().optional(),ry=()=>qL().optional(),ty=()=>zL().optional(),ey={string:($)=>e$.create({...$,coerce:!0}),number:($)=>qQ.create({...$,coerce:!0}),boolean:($)=>WX.create({...$,coerce:!0}),bigint:($)=>zQ.create({...$,coerce:!0}),date:($)=>dQ.create({...$,coerce:!0})};var $h=Y0;var Qh=/^(wss?|https?):\/\//i,Jh=/^nsec1[0-9a-z]+$/i,xL=/^[0-9a-f]{64}$/i,Xh=/^[^/\s]+\/[^/\s]+$/,Yh=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function VL($){try{let Q=new URL($);return Q.protocol==="http:"||Q.protocol==="https:"}catch{return!1}}function Gh($){if(!Qh.test($))return!1;try{return new URL($.replace(/^wss:\/\//i,"https://").replace(/^ws:\/\//i,"http://")).hostname.length>0}catch{return!1}}function KL($){if(!Array.isArray($))return $;return $.map((Q)=>typeof Q==="string"?Q.trim():Q).filter((Q)=>Q!=="")}var Wh=b.object({kind:b.literal("github"),token:b.string({required_error:"tracker.token is required for the github tracker"}).trim().min(1,"tracker.token is required for the github tracker"),repo:b.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(($)=>Xh.test($),{message:"tracker.repo must be owner/repo"})}).strict(),qh=b.object({kind:b.literal("buzz"),ownerHex:b.string({required_error:"tracker.ownerHex must be a 64-char hex pubkey for the buzz tracker"}).trim().regex(xL,"tracker.ownerHex must be a 64-char hex pubkey for the buzz tracker"),repoId:b.string({required_error:"tracker.repoId is required for the buzz tracker"}).trim().min(1,"tracker.repoId is required for the buzz tracker")}).strict(),zh=b.discriminatedUnion("kind",[Wh,qh]),ML=b.object({label:b.string().trim().optional(),relayUrl:b.string({required_error:"relayUrl is required",invalid_type_error:"relayUrl is required"}).trim().min(1,"relayUrl is required").refine(Gh,{message:"relayUrl must be a ws(s):// or https:// URL with a host"}),privateKey:b.string({required_error:"privateKey is required",invalid_type_error:"privateKey is required"}).trim().min(1,"privateKey is required").refine(($)=>Jh.test($)||xL.test($),{message:"privateKey must be an nsec… or 64-char hex key"}),figuraToken:b.string({required_error:"figuraToken is required",invalid_type_error:"figuraToken is required"}).trim().min(1,"figuraToken is required"),channels:b.preprocess(KL,b.array(b.string()).default([]).superRefine(($,Q)=>{for(let J of $)if(!Yh.test(J))Q.addIssue({code:b.ZodIssueCode.custom,message:`channel "${J}" is not a UUID`})})),triggers:b.preprocess(($)=>$===void 0?void 0:KL($),b.array(b.string()).optional().superRefine(($,Q)=>{if($!==void 0&&$.length===0)Q.addIssue({code:b.ZodIssueCode.custom,message:"triggers is present but empty — omit it or give at least one trigger"})})),appOrigin:b.string().trim().refine(VL,{message:"appOrigin must be an http(s) URL"}).optional(),apiUrl:b.string().trim().refine(VL,{message:"apiUrl must be an http(s) URL"}).optional(),device:b.string().trim().min(1,"device must be a non-empty string when present").optional(),platform:b.string().trim().optional().superRefine(($,Q)=>{if($!==void 0&&$!=="mobile"&&$!=="web")Q.addIssue({code:b.ZodIssueCode.custom,message:"platform must be one of: mobile | web"})}),tracker:zh.optional()}).strict();function rQ($){if($.label)return $.label;let Q=$.relayUrl??"";try{return new URL(Q.replace(/^wss:\/\//i,"https://").replace(/^ws:\/\//i,"http://")).host}catch{return Q||"binding"}}function HL($){if($.code===b.ZodIssueCode.unrecognized_keys){let Q=$.keys.join(", ");return $.path.includes("tracker")?`tracker unknown key(s): ${Q}`:`unknown key(s): ${Q} (check spelling of the known fields)`}if($.code===b.ZodIssueCode.invalid_union_discriminator)return'tracker.kind must be "github" or "buzz"';return $.message}function BL($){let Q=ML.safeParse($);return Q.success?[]:Q.error.issues.map(HL)}function UL($){let Q=$??{},J=typeof Q.label==="string"&&Q.label.trim()?Q.label.trim():void 0,X=typeof Q.relayUrl==="string"?Q.relayUrl:"";return rQ({label:J,relayUrl:X})}function Tz($,Q="bindings config"){let J=typeof Q==="string"?{source:Q}:Q,X=J.source??"bindings config",Y;try{Y=JSON.parse($)}catch(K){throw Error(`${X} is not valid JSON: ${K instanceof Error?K.message:String(K)}`)}let G=Array.isArray(Y)?Y:Y&&typeof Y==="object"&&Array.isArray(Y.bindings)?Y.bindings:null;if(!G)throw Error(`${X} must be a JSON array of bindings (or { "bindings": [...] })`);if(G.length===0)throw Error(`${X} has no bindings`);let W=[],q=[];G.forEach((K,V)=>{let U=ML.safeParse(K);if(U.success)q.push(U.data);else W.push(`binding[${V}] (${UL(K)}): ${U.error.issues.map(HL).join("; ")}`)});let z=new Map;for(let K of G){let V=UL(K);z.set(V,(z.get(V)??0)+1)}for(let[K,V]of z)if(V>1)W.push(`duplicate label "${K}" across ${V} bindings — give each a distinct label`);if(W.length)throw Error(`invalid ${X}:
|
|
530
572
|
${W.join(`
|
|
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
|
|
573
|
+
`)}`);if(J.onWarn){let K=new Set;for(let V of q){let U=`${V.relayUrl} ${V.privateKey}`;if(K.has(U))J.onWarn(`two bindings share the same relayUrl + privateKey (${rQ(V)}) — is that intentional?`);K.add(U)}}return q}N$();r0();import{createHash as On,randomUUID as Fn}from"node:crypto";/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function pY($){return $ instanceof Uint8Array||ArrayBuffer.isView($)&&$.constructor.name==="Uint8Array"}function b$($,Q=""){if(!Number.isSafeInteger($)||$<0){let J=Q&&`"${Q}" `;throw Error(`${J}expected integer >= 0, got ${$}`)}}function R0($,Q,J=""){let X=pY($),Y=$?.length,G=Q!==void 0;if(!X||G&&Y!==Q){let W=J&&`"${J}" `,q=G?` of length ${Q}`:"",z=X?`length=${Y}`:`type=${typeof $}`;throw Error(W+"expected Uint8Array"+q+", got "+z)}return $}function tQ($){if(typeof $!=="function"||typeof $.create!=="function")throw Error("Hash must wrapped by utils.createHasher");b$($.outputLen),b$($.blockLen)}function wX($,Q=!0){if($.destroyed)throw Error("Hash instance has been destroyed");if(Q&&$.finished)throw Error("Hash#digest() has already been called")}function wL($,Q){R0($,void 0,"digestInto() output");let J=Q.outputLen;if($.length<J)throw Error('"digestInto() output" expected to be of length >='+J)}function Y8(...$){for(let Q=0;Q<$.length;Q++)$[Q].fill(0)}function l6($){return new DataView($.buffer,$.byteOffset,$.byteLength)}function G8($,Q){return $<<32-Q|$>>>Q}var jL=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),Vh=Array.from({length:256},($,Q)=>Q.toString(16).padStart(2,"0"));function F0($){if(R0($),jL)return $.toHex();let Q="";for(let J=0;J<$.length;J++)Q+=Vh[$[J]];return Q}var f8={_0:48,_9:57,A:65,F:70,a:97,f:102};function ZL($){if($>=f8._0&&$<=f8._9)return $-f8._0;if($>=f8.A&&$<=f8.F)return $-(f8.A-10);if($>=f8.a&&$<=f8.f)return $-(f8.a-10);return}function I0($){if(typeof $!=="string")throw Error("hex string expected, got "+typeof $);if(jL)return Uint8Array.fromHex($);let Q=$.length,J=Q/2;if(Q%2)throw Error("hex string expected, got unpadded hex of length "+Q);let X=new Uint8Array(J);for(let Y=0,G=0;Y<J;Y++,G+=2){let W=ZL($.charCodeAt(G)),q=ZL($.charCodeAt(G+1));if(W===void 0||q===void 0){let z=$[G]+$[G+1];throw Error('hex string expected, got non-hex character "'+z+'" at index '+G)}X[Y]=W*16+q}return X}function h0(...$){let Q=0;for(let X=0;X<$.length;X++){let Y=$[X];R0(Y),Q+=Y.length}let J=new Uint8Array(Q);for(let X=0,Y=0;X<$.length;X++){let G=$[X];J.set(G,Y),Y+=G.length}return J}function LL($,Q={}){let J=(Y,G)=>$(G).update(Y).digest(),X=$(void 0);return J.outputLen=X.outputLen,J.blockLen=X.blockLen,J.create=(Y)=>$(Y),Object.assign(J,Q),Object.freeze(J)}function W8($=32){let Q=typeof globalThis==="object"?globalThis.crypto:null;if(typeof Q?.getRandomValues!=="function")throw Error("crypto.getRandomValues must be defined");return Q.getRandomValues(new Uint8Array($))}var RL=($)=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,$])});function DL($,Q,J){return $&Q^~$&J}function _L($,Q,J){return $&Q^$&J^Q&J}class i6{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor($,Q,J,X){this.blockLen=$,this.outputLen=Q,this.padOffset=J,this.isLE=X,this.buffer=new Uint8Array($),this.view=l6(this.buffer)}update($){wX(this),R0($);let{view:Q,buffer:J,blockLen:X}=this,Y=$.length;for(let G=0;G<Y;){let W=Math.min(X-this.pos,Y-G);if(W===X){let q=l6($);for(;X<=Y-G;G+=X)this.process(q,G);continue}if(J.set($.subarray(G,G+W),this.pos),this.pos+=W,G+=W,this.pos===X)this.process(Q,0),this.pos=0}return this.length+=$.length,this.roundClean(),this}digestInto($){wX(this),wL($,this),this.finished=!0;let{buffer:Q,view:J,blockLen:X,isLE:Y}=this,{pos:G}=this;if(Q[G++]=128,Y8(this.buffer.subarray(G)),this.padOffset>X-G)this.process(J,0),G=0;for(let V=G;V<X;V++)Q[V]=0;J.setBigUint64(X-8,BigInt(this.length*8),Y),this.process(J,0);let W=l6($),q=this.outputLen;if(q%4)throw Error("_sha2: outputLen must be aligned to 32bit");let z=q/4,K=this.get();if(z>K.length)throw Error("_sha2: outputLen bigger than state");for(let V=0;V<z;V++)W.setUint32(4*V,K[V],Y)}digest(){let{buffer:$,outputLen:Q}=this;this.digestInto($);let J=$.slice(0,Q);return this.destroy(),J}_cloneInto($){$||=new this.constructor,$.set(...this.get());let{blockLen:Q,buffer:J,length:X,finished:Y,destroyed:G,pos:W}=this;if($.destroyed=G,$.finished=Y,$.length=X,$.pos=W,X%Q)$.buffer.set(J);return $}clone(){return this._cloneInto()}}var m8=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),y8=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),$$=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),Q$=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);var n6=BigInt(4294967295),NL=BigInt(32);function Kh($,Q=!1){if(Q)return{h:Number($&n6),l:Number($>>NL&n6)};return{h:Number($>>NL&n6)|0,l:Number($&n6)|0}}function vL($,Q=!1){let J=$.length,X=new Uint32Array(J),Y=new Uint32Array(J);for(let G=0;G<J;G++){let{h:W,l:q}=Kh($[G],Q);[X[G],Y[G]]=[W,q]}return[X,Y]}var Az=($,Q,J)=>$>>>J,Ez=($,Q,J)=>$<<32-J|Q>>>J,eQ=($,Q,J)=>$>>>J|Q<<32-J,$J=($,Q,J)=>$<<32-J|Q>>>J,uY=($,Q,J)=>$<<64-J|Q>>>J-32,gY=($,Q,J)=>$>>>J-32|Q<<64-J;function w8($,Q,J,X){let Y=(Q>>>0)+(X>>>0);return{h:$+J+(Y/4294967296|0)|0,l:Y|0}}var OL=($,Q,J)=>($>>>0)+(Q>>>0)+(J>>>0),FL=($,Q,J,X)=>Q+J+X+($/4294967296|0)|0,CL=($,Q,J,X)=>($>>>0)+(Q>>>0)+(J>>>0)+(X>>>0),IL=($,Q,J,X,Y)=>Q+J+X+Y+($/4294967296|0)|0,PL=($,Q,J,X,Y)=>($>>>0)+(Q>>>0)+(J>>>0)+(X>>>0)+(Y>>>0),TL=($,Q,J,X,Y,G)=>Q+J+X+Y+G+($/4294967296|0)|0;var xh=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]),KQ=new Uint32Array(64);class kz extends i6{constructor($){super(64,$,8,!1)}get(){let{A:$,B:Q,C:J,D:X,E:Y,F:G,G:W,H:q}=this;return[$,Q,J,X,Y,G,W,q]}set($,Q,J,X,Y,G,W,q){this.A=$|0,this.B=Q|0,this.C=J|0,this.D=X|0,this.E=Y|0,this.F=G|0,this.G=W|0,this.H=q|0}process($,Q){for(let V=0;V<16;V++,Q+=4)KQ[V]=$.getUint32(Q,!1);for(let V=16;V<64;V++){let U=KQ[V-15],x=KQ[V-2],M=G8(U,7)^G8(U,18)^U>>>3,H=G8(x,17)^G8(x,19)^x>>>10;KQ[V]=H+KQ[V-7]+M+KQ[V-16]|0}let{A:J,B:X,C:Y,D:G,E:W,F:q,G:z,H:K}=this;for(let V=0;V<64;V++){let U=G8(W,6)^G8(W,11)^G8(W,25),x=K+U+DL(W,q,z)+xh[V]+KQ[V]|0,H=(G8(J,2)^G8(J,13)^G8(J,22))+_L(J,X,Y)|0;K=z,z=q,q=W,W=G+x|0,G=Y,Y=X,X=J,J=x+H|0}J=J+this.A|0,X=X+this.B|0,Y=Y+this.C|0,G=G+this.D|0,W=W+this.E|0,q=q+this.F|0,z=z+this.G|0,K=K+this.H|0,this.set(J,X,Y,G,W,q,z,K)}roundClean(){Y8(KQ)}destroy(){this.set(0,0,0,0,0,0,0,0),Y8(this.buffer)}}class AL extends kz{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(32)}}class Mh extends kz{A=y8[0]|0;B=y8[1]|0;C=y8[2]|0;D=y8[3]|0;E=y8[4]|0;F=y8[5]|0;G=y8[6]|0;H=y8[7]|0;constructor(){super(28)}}var EL=(()=>vL(["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(($)=>BigInt($))))(),Hh=(()=>EL[0])(),Bh=(()=>EL[1])(),UQ=new Uint32Array(80),xQ=new Uint32Array(80);class lY extends i6{constructor($){super(128,$,16,!1)}get(){let{Ah:$,Al:Q,Bh:J,Bl:X,Ch:Y,Cl:G,Dh:W,Dl:q,Eh:z,El:K,Fh:V,Fl:U,Gh:x,Gl:M,Hh:H,Hl:w}=this;return[$,Q,J,X,Y,G,W,q,z,K,V,U,x,M,H,w]}set($,Q,J,X,Y,G,W,q,z,K,V,U,x,M,H,w){this.Ah=$|0,this.Al=Q|0,this.Bh=J|0,this.Bl=X|0,this.Ch=Y|0,this.Cl=G|0,this.Dh=W|0,this.Dl=q|0,this.Eh=z|0,this.El=K|0,this.Fh=V|0,this.Fl=U|0,this.Gh=x|0,this.Gl=M|0,this.Hh=H|0,this.Hl=w|0}process($,Q){for(let L=0;L<16;L++,Q+=4)UQ[L]=$.getUint32(Q),xQ[L]=$.getUint32(Q+=4);for(let L=16;L<80;L++){let D=UQ[L-15]|0,F=xQ[L-15]|0,J0=eQ(D,F,1)^eQ(D,F,8)^Az(D,F,7),n=$J(D,F,1)^$J(D,F,8)^Ez(D,F,7),e=UQ[L-2]|0,y=xQ[L-2]|0,p=eQ(e,y,19)^uY(e,y,61)^Az(e,y,6),W0=$J(e,y,19)^gY(e,y,61)^Ez(e,y,6),t=CL(n,W0,xQ[L-7],xQ[L-16]),N=IL(t,J0,p,UQ[L-7],UQ[L-16]);UQ[L]=N|0,xQ[L]=t|0}let{Ah:J,Al:X,Bh:Y,Bl:G,Ch:W,Cl:q,Dh:z,Dl:K,Eh:V,El:U,Fh:x,Fl:M,Gh:H,Gl:w,Hh:j,Hl:Z}=this;for(let L=0;L<80;L++){let D=eQ(V,U,14)^eQ(V,U,18)^uY(V,U,41),F=$J(V,U,14)^$J(V,U,18)^gY(V,U,41),J0=V&x^~V&H,n=U&M^~U&w,e=PL(Z,F,n,Bh[L],xQ[L]),y=TL(e,j,D,J0,Hh[L],UQ[L]),p=e|0,W0=eQ(J,X,28)^uY(J,X,34)^uY(J,X,39),t=$J(J,X,28)^gY(J,X,34)^gY(J,X,39),N=J&Y^J&W^Y&W,c=X&G^X&q^G&q;j=H|0,Z=w|0,H=x|0,w=M|0,x=V|0,M=U|0,{h:V,l:U}=w8(z|0,K|0,y|0,p|0),z=W|0,K=q|0,W=Y|0,q=G|0,Y=J|0,G=X|0;let _=OL(p,t,c);J=FL(_,y,W0,N),X=_|0}({h:J,l:X}=w8(this.Ah|0,this.Al|0,J|0,X|0)),{h:Y,l:G}=w8(this.Bh|0,this.Bl|0,Y|0,G|0),{h:W,l:q}=w8(this.Ch|0,this.Cl|0,W|0,q|0),{h:z,l:K}=w8(this.Dh|0,this.Dl|0,z|0,K|0),{h:V,l:U}=w8(this.Eh|0,this.El|0,V|0,U|0),{h:x,l:M}=w8(this.Fh|0,this.Fl|0,x|0,M|0),{h:H,l:w}=w8(this.Gh|0,this.Gl|0,H|0,w|0),{h:j,l:Z}=w8(this.Hh|0,this.Hl|0,j|0,Z|0),this.set(J,X,Y,G,W,q,z,K,V,U,x,M,H,w,j,Z)}roundClean(){Y8(UQ,xQ)}destroy(){Y8(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class Zh extends lY{Ah=Q$[0]|0;Al=Q$[1]|0;Bh=Q$[2]|0;Bl=Q$[3]|0;Ch=Q$[4]|0;Cl=Q$[5]|0;Dh=Q$[6]|0;Dl=Q$[7]|0;Eh=Q$[8]|0;El=Q$[9]|0;Fh=Q$[10]|0;Fl=Q$[11]|0;Gh=Q$[12]|0;Gl=Q$[13]|0;Hh=Q$[14]|0;Hl=Q$[15]|0;constructor(){super(64)}}class wh extends lY{Ah=$$[0]|0;Al=$$[1]|0;Bh=$$[2]|0;Bl=$$[3]|0;Ch=$$[4]|0;Cl=$$[5]|0;Dh=$$[6]|0;Dl=$$[7]|0;Eh=$$[8]|0;El=$$[9]|0;Fh=$$[10]|0;Fl=$$[11]|0;Gh=$$[12]|0;Gl=$$[13]|0;Hh=$$[14]|0;Hl=$$[15]|0;constructor(){super(48)}}var W$=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),q$=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class jh extends lY{Ah=W$[0]|0;Al=W$[1]|0;Bh=W$[2]|0;Bl=W$[3]|0;Ch=W$[4]|0;Cl=W$[5]|0;Dh=W$[6]|0;Dl=W$[7]|0;Eh=W$[8]|0;El=W$[9]|0;Fh=W$[10]|0;Fl=W$[11]|0;Gh=W$[12]|0;Gl=W$[13]|0;Hh=W$[14]|0;Hl=W$[15]|0;constructor(){super(28)}}class Lh extends lY{Ah=q$[0]|0;Al=q$[1]|0;Bh=q$[2]|0;Bl=q$[3]|0;Ch=q$[4]|0;Cl=q$[5]|0;Dh=q$[6]|0;Dl=q$[7]|0;Eh=q$[8]|0;El=q$[9]|0;Fh=q$[10]|0;Fl=q$[11]|0;Gh=q$[12]|0;Gl=q$[13]|0;Hh=q$[14]|0;Hl=q$[15]|0;constructor(){super(32)}}var z$=LL(()=>new AL,RL(1));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var Sz=BigInt(0),cz=BigInt(1);function iY($,Q=""){if(typeof $!=="boolean"){let J=Q&&`"${Q}" `;throw Error(J+"expected boolean, got type="+typeof $)}return $}function kL($){if(typeof $==="bigint"){if(!d6($))throw Error("positive bigint expected, got "+$)}else b$($);return $}function nY($){let Q=kL($).toString(16);return Q.length&1?"0"+Q:Q}function cL($){if(typeof $!=="string")throw Error("hex string expected, got "+typeof $);return $===""?Sz:BigInt("0x"+$)}function MQ($){return cL(F0($))}function bz($){return cL(F0(Rh(R0($)).reverse()))}function a6($,Q){b$(Q),$=kL($);let J=I0($.toString(16).padStart(Q*2,"0"));if(J.length!==Q)throw Error("number too large");return J}function fz($,Q){return a6($,Q).reverse()}function Rh($){return Uint8Array.from($)}function SL($){return Uint8Array.from($,(Q,J)=>{let X=Q.charCodeAt(0);if(Q.length!==1||X>127)throw Error(`string contains non-ASCII character "${$[J]}" with code ${X} at position ${J}`);return X})}var d6=($)=>typeof $==="bigint"&&Sz<=$;function Dh($,Q,J){return d6($)&&d6(Q)&&d6(J)&&Q<=$&&$<J}function bL($,Q,J,X){if(!Dh(Q,J,X))throw Error("expected valid "+$+": "+J+" <= n < "+X+", got "+Q)}function mz($){let Q;for(Q=0;$>Sz;$>>=cz,Q+=1);return Q}var dY=($)=>(cz<<BigInt($))-cz;function fL($,Q,J){if(b$($,"hashLen"),b$(Q,"qByteLen"),typeof J!=="function")throw Error("hmacFn must be a function");let X=(j)=>new Uint8Array(j),Y=Uint8Array.of(),G=Uint8Array.of(0),W=Uint8Array.of(1),q=1000,z=X($),K=X($),V=0,U=()=>{z.fill(1),K.fill(0),V=0},x=(...j)=>J(K,h0(z,...j)),M=(j=Y)=>{if(K=x(G,j),z=x(),j.length===0)return;K=x(W,j),z=x()},H=()=>{if(V++>=q)throw Error("drbg: tried max amount of iterations");let j=0,Z=[];while(j<Q){z=x();let L=z.slice();Z.push(L),j+=z.length}return h0(...Z)};return(j,Z)=>{U(),M(j);let L=void 0;while(!(L=Z(H())))M();return U(),L}}function aY($,Q={},J={}){if(!$||typeof $!=="object")throw Error("expected valid options object");function X(G,W,q){let z=$[G];if(q&&z===void 0)return;let K=typeof z;if(K!==W||z===null)throw Error(`param "${G}" is invalid: expected ${W}, got ${K}`)}let Y=(G,W)=>Object.entries(G).forEach(([q,z])=>X(q,z,W));Y(Q,!1),Y(J,!0)}function yz($){let Q=new WeakMap;return(J,...X)=>{let Y=Q.get(J);if(Y!==void 0)return Y;let G=$(J,...X);return Q.set(J,G),G}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var M$=BigInt(0),V$=BigInt(1),QJ=BigInt(2),hL=BigInt(3),pL=BigInt(4),uL=BigInt(5),_h=BigInt(7),gL=BigInt(8),Nh=BigInt(9),lL=BigInt(16);function q8($,Q){let J=$%Q;return J>=M$?J:Q+J}function C$($,Q,J){let X=$;while(Q-- >M$)X*=X,X%=J;return X}function mL($,Q){if($===M$)throw Error("invert: expected non-zero number");if(Q<=M$)throw Error("invert: expected positive modulus, got "+Q);let J=q8($,Q),X=Q,Y=M$,G=V$,W=V$,q=M$;while(J!==M$){let K=X/J,V=X%J,U=Y-W*K,x=G-q*K;X=J,J=V,Y=W,G=q,W=U,q=x}if(X!==V$)throw Error("invert: does not exist");return q8(Y,Q)}function hz($,Q,J){if(!$.eql($.sqr(Q),J))throw Error("Cannot find square root")}function iL($,Q){let J=($.ORDER+V$)/pL,X=$.pow(Q,J);return hz($,X,Q),X}function vh($,Q){let J=($.ORDER-uL)/gL,X=$.mul(Q,QJ),Y=$.pow(X,J),G=$.mul(Q,Y),W=$.mul($.mul(G,QJ),Y),q=$.mul(G,$.sub(W,$.ONE));return hz($,q,Q),q}function Oh($){let Q=jX($),J=nL($),X=J(Q,Q.neg(Q.ONE)),Y=J(Q,X),G=J(Q,Q.neg(X)),W=($+_h)/lL;return(q,z)=>{let K=q.pow(z,W),V=q.mul(K,X),U=q.mul(K,Y),x=q.mul(K,G),M=q.eql(q.sqr(V),z),H=q.eql(q.sqr(U),z);K=q.cmov(K,V,M),V=q.cmov(x,U,H);let w=q.eql(q.sqr(V),z),j=q.cmov(K,V,w);return hz(q,j,z),j}}function nL($){if($<hL)throw Error("sqrt is not defined for small field");let Q=$-V$,J=0;while(Q%QJ===M$)Q/=QJ,J++;let X=QJ,Y=jX($);while(yL(Y,X)===1)if(X++>1000)throw Error("Cannot find square root: probably non-prime P");if(J===1)return iL;let G=Y.pow(X,Q),W=(Q+V$)/QJ;return function(z,K){if(z.is0(K))return K;if(yL(z,K)!==1)throw Error("Cannot find square root");let V=J,U=z.mul(z.ONE,G),x=z.pow(K,Q),M=z.pow(K,W);while(!z.eql(x,z.ONE)){if(z.is0(x))return z.ZERO;let H=1,w=z.sqr(x);while(!z.eql(w,z.ONE))if(H++,w=z.sqr(w),H===V)throw Error("Cannot find square root");let j=V$<<BigInt(V-H-1),Z=z.pow(U,j);V=H,U=z.sqr(Z),x=z.mul(x,U),M=z.mul(M,Z)}return M}}function Fh($){if($%pL===hL)return iL;if($%gL===uL)return vh;if($%lL===Nh)return Oh($);return nL($)}var Ch=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function pz($){let Q={ORDER:"bigint",BYTES:"number",BITS:"number"},J=Ch.reduce((X,Y)=>{return X[Y]="function",X},Q);return aY($,J),$}function Ih($,Q,J){if(J<M$)throw Error("invalid exponent, negatives unsupported");if(J===M$)return $.ONE;if(J===V$)return Q;let X=$.ONE,Y=Q;while(J>M$){if(J&V$)X=$.mul(X,Y);Y=$.sqr(Y),J>>=V$}return X}function o6($,Q,J=!1){let X=Array(Q.length).fill(J?$.ZERO:void 0),Y=Q.reduce((W,q,z)=>{if($.is0(q))return W;return X[z]=W,$.mul(W,q)},$.ONE),G=$.inv(Y);return Q.reduceRight((W,q,z)=>{if($.is0(q))return W;return X[z]=$.mul(W,X[z]),$.mul(W,q)},G),X}function yL($,Q){let J=($.ORDER-V$)/QJ,X=$.pow(Q,J),Y=$.eql(X,$.ONE),G=$.eql(X,$.ZERO),W=$.eql(X,$.neg($.ONE));if(!Y&&!G&&!W)throw Error("invalid Legendre symbol result");return Y?1:G?0:-1}function Ph($,Q){if(Q!==void 0)b$(Q);let J=Q!==void 0?Q:$.toString(2).length,X=Math.ceil(J/8);return{nBitLength:J,nByteLength:X}}class dL{ORDER;BITS;BYTES;isLE;ZERO=M$;ONE=V$;_lengths;_sqrt;_mod;constructor($,Q={}){if($<=M$)throw Error("invalid field: expected ORDER > 0, got "+$);let J=void 0;if(this.isLE=!1,Q!=null&&typeof Q==="object"){if(typeof Q.BITS==="number")J=Q.BITS;if(typeof Q.sqrt==="function")this.sqrt=Q.sqrt;if(typeof Q.isLE==="boolean")this.isLE=Q.isLE;if(Q.allowedLengths)this._lengths=Q.allowedLengths?.slice();if(typeof Q.modFromBytes==="boolean")this._mod=Q.modFromBytes}let{nBitLength:X,nByteLength:Y}=Ph($,J);if(Y>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=$,this.BITS=X,this.BYTES=Y,this._sqrt=void 0,Object.preventExtensions(this)}create($){return q8($,this.ORDER)}isValid($){if(typeof $!=="bigint")throw Error("invalid field element: expected bigint, got "+typeof $);return M$<=$&&$<this.ORDER}is0($){return $===M$}isValidNot0($){return!this.is0($)&&this.isValid($)}isOdd($){return($&V$)===V$}neg($){return q8(-$,this.ORDER)}eql($,Q){return $===Q}sqr($){return q8($*$,this.ORDER)}add($,Q){return q8($+Q,this.ORDER)}sub($,Q){return q8($-Q,this.ORDER)}mul($,Q){return q8($*Q,this.ORDER)}pow($,Q){return Ih(this,$,Q)}div($,Q){return q8($*mL(Q,this.ORDER),this.ORDER)}sqrN($){return $*$}addN($,Q){return $+Q}subN($,Q){return $-Q}mulN($,Q){return $*Q}inv($){return mL($,this.ORDER)}sqrt($){if(!this._sqrt)this._sqrt=Fh(this.ORDER);return this._sqrt(this,$)}toBytes($){return this.isLE?fz($,this.BYTES):a6($,this.BYTES)}fromBytes($,Q=!1){R0($);let{_lengths:J,BYTES:X,isLE:Y,ORDER:G,_mod:W}=this;if(J){if(!J.includes($.length)||$.length>X)throw Error("Field.fromBytes: expected "+J+" bytes, got "+$.length);let z=new Uint8Array(X);z.set($,Y?0:z.length-$.length),$=z}if($.length!==X)throw Error("Field.fromBytes: expected "+X+" bytes, got "+$.length);let q=Y?bz($):MQ($);if(W)q=q8(q,G);if(!Q){if(!this.isValid(q))throw Error("invalid field element: outside of range 0..ORDER")}return q}invertBatch($){return o6(this,$)}cmov($,Q,J){return J?Q:$}}function jX($,Q={}){return new dL($,Q)}function aL($){if(typeof $!=="bigint")throw Error("field order must be bigint");let Q=$.toString(2).length;return Math.ceil(Q/8)}function uz($){let Q=aL($);return Q+Math.ceil(Q/2)}function s6($,Q,J=!1){R0($);let X=$.length,Y=aL(Q),G=uz(Q);if(X<16||X<G||X>1024)throw Error("expected "+G+"-1024 bytes of input, got "+X);let W=J?bz($):MQ($),q=q8(W,Q-V$)+V$;return J?fz(q,Y):a6(q,Y)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var LX=BigInt(0),JJ=BigInt(1);function oY($,Q){let J=Q.negate();return $?J:Q}function nz($,Q){let J=o6($.Fp,Q.map((X)=>X.Z));return Q.map((X,Y)=>$.fromAffine(X.toAffine(J[Y])))}function tL($,Q){if(!Number.isSafeInteger($)||$<=0||$>Q)throw Error("invalid window size, expected [1.."+Q+"], got W="+$)}function gz($,Q){tL($,Q);let J=Math.ceil(Q/$)+1,X=2**($-1),Y=2**$,G=dY($),W=BigInt($);return{windows:J,windowSize:X,mask:G,maxNumber:Y,shiftBy:W}}function oL($,Q,J){let{windowSize:X,mask:Y,maxNumber:G,shiftBy:W}=J,q=Number($&Y),z=$>>W;if(q>X)q-=G,z+=JJ;let K=Q*X,V=K+Math.abs(q)-1,U=q===0,x=q<0,M=Q%2!==0;return{nextN:z,offset:V,isZero:U,isNeg:x,isNegF:M,offsetF:K}}var lz=new WeakMap,eL=new WeakMap;function iz($){return eL.get($)||1}function sL($){if($!==LX)throw Error("invalid wNAF")}class dz{BASE;ZERO;Fn;bits;constructor($,Q){this.BASE=$.BASE,this.ZERO=$.ZERO,this.Fn=$.Fn,this.bits=Q}_unsafeLadder($,Q,J=this.ZERO){let X=$;while(Q>LX){if(Q&JJ)J=J.add(X);X=X.double(),Q>>=JJ}return J}precomputeWindow($,Q){let{windows:J,windowSize:X}=gz(Q,this.bits),Y=[],G=$,W=G;for(let q=0;q<J;q++){W=G,Y.push(W);for(let z=1;z<X;z++)W=W.add(G),Y.push(W);G=W.double()}return Y}wNAF($,Q,J){if(!this.Fn.isValid(J))throw Error("invalid scalar");let X=this.ZERO,Y=this.BASE,G=gz($,this.bits);for(let W=0;W<G.windows;W++){let{nextN:q,offset:z,isZero:K,isNeg:V,isNegF:U,offsetF:x}=oL(J,W,G);if(J=q,K)Y=Y.add(oY(U,Q[x]));else X=X.add(oY(V,Q[z]))}return sL(J),{p:X,f:Y}}wNAFUnsafe($,Q,J,X=this.ZERO){let Y=gz($,this.bits);for(let G=0;G<Y.windows;G++){if(J===LX)break;let{nextN:W,offset:q,isZero:z,isNeg:K}=oL(J,G,Y);if(J=W,z)continue;else{let V=Q[q];X=X.add(K?V.negate():V)}}return sL(J),X}getPrecomputes($,Q,J){let X=lz.get(Q);if(!X){if(X=this.precomputeWindow(Q,$),$!==1){if(typeof J==="function")X=J(X);lz.set(Q,X)}}return X}cached($,Q,J){let X=iz($);return this.wNAF(X,this.getPrecomputes(X,$,J),Q)}unsafe($,Q,J,X){let Y=iz($);if(Y===1)return this._unsafeLadder($,Q,X);return this.wNAFUnsafe(Y,this.getPrecomputes(Y,$,J),Q,X)}createCache($,Q){tL(Q,this.bits),eL.set($,Q),lz.delete($)}hasCache($){return iz($)!==1}}function $R($,Q,J,X){let Y=Q,G=$.ZERO,W=$.ZERO;while(J>LX||X>LX){if(J&JJ)G=G.add(Y);if(X&JJ)W=W.add(Y);Y=Y.double(),J>>=JJ,X>>=JJ}return{p1:G,p2:W}}function rL($,Q,J){if(Q){if(Q.ORDER!==$)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return pz(Q),Q}else return jX($,{isLE:J})}function QR($,Q,J={},X){if(X===void 0)X=$==="edwards";if(!Q||typeof Q!=="object")throw Error(`expected valid ${$} CURVE object`);for(let z of["p","n","h"]){let K=Q[z];if(!(typeof K==="bigint"&&K>LX))throw Error(`CURVE.${z} must be positive bigint`)}let Y=rL(Q.p,J.Fp,X),G=rL(Q.n,J.Fn,X),q=["Gx","Gy","a",$==="weierstrass"?"b":"d"];for(let z of q)if(!Y.isValid(Q[z]))throw Error(`CURVE.${z} must be valid field element of CURVE.Fp`);return Q=Object.freeze(Object.assign({},Q)),{CURVE:Q,Fp:Y,Fn:G}}function r6($,Q){return function(X){let Y=$(X);return{secretKey:Y,publicKey:Q(Y)}}}class az{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor($,Q){if(tQ($),R0(Q,void 0,"key"),this.iHash=$.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 J=this.blockLen,X=new Uint8Array(J);X.set(Q.length>J?$.create().update(Q).digest():Q);for(let Y=0;Y<X.length;Y++)X[Y]^=54;this.iHash.update(X),this.oHash=$.create();for(let Y=0;Y<X.length;Y++)X[Y]^=106;this.oHash.update(X),Y8(X)}update($){return wX(this),this.iHash.update($),this}digestInto($){wX(this),R0($,this.outputLen,"output"),this.finished=!0,this.iHash.digestInto($),this.oHash.update($),this.oHash.digestInto($),this.destroy()}digest(){let $=new Uint8Array(this.oHash.outputLen);return this.digestInto($),$}_cloneInto($){$||=Object.create(Object.getPrototypeOf(this),{});let{oHash:Q,iHash:J,finished:X,destroyed:Y,blockLen:G,outputLen:W}=this;return $=$,$.finished=X,$.destroyed=Y,$.blockLen=G,$.outputLen=W,$.oHash=Q._cloneInto($.oHash),$.iHash=J._cloneInto($.iHash),$}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}var HQ=($,Q,J)=>new az($,Q).update(J).digest();HQ.create=($,Q)=>new az($,Q);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var JR=($,Q)=>($+($>=0?Q:-Q)/YR)/Q;function Th($,Q,J){let[[X,Y],[G,W]]=Q,q=JR(W*$,J),z=JR(-Y*$,J),K=$-q*X-z*G,V=-q*Y-z*W,U=K<h8,x=V<h8;if(U)K=-K;if(x)V=-V;let M=dY(Math.ceil(mz(J)/2))+RX;if(K<h8||K>=M||V<h8||V>=M)throw Error("splitScalar (endomorphism): failed, k="+$);return{k1neg:U,k1:K,k2neg:x,k2:V}}function sz($){if(!["compact","recovered","der"].includes($))throw Error('Signature format must be "compact", "recovered", or "der"');return $}function oz($,Q){let J={};for(let X of Object.keys(Q))J[X]=$[X]===void 0?Q[X]:$[X];if(iY(J.lowS,"lowS"),iY(J.prehash,"prehash"),J.format!==void 0)sz(J.format);return J}class XR extends Error{constructor($=""){super($)}}var BQ={Err:XR,_tlv:{encode:($,Q)=>{let{Err:J}=BQ;if($<0||$>256)throw new J("tlv.encode: wrong tag");if(Q.length&1)throw new J("tlv.encode: unpadded data");let X=Q.length/2,Y=nY(X);if(Y.length/2&128)throw new J("tlv.encode: long form length too big");let G=X>127?nY(Y.length/2|128):"";return nY($)+G+Y+Q},decode($,Q){let{Err:J}=BQ,X=0;if($<0||$>256)throw new J("tlv.encode: wrong tag");if(Q.length<2||Q[X++]!==$)throw new J("tlv.decode: wrong tlv");let Y=Q[X++],G=!!(Y&128),W=0;if(!G)W=Y;else{let z=Y&127;if(!z)throw new J("tlv.decode(long): indefinite length not supported");if(z>4)throw new J("tlv.decode(long): byte length is too big");let K=Q.subarray(X,X+z);if(K.length!==z)throw new J("tlv.decode: length bytes not complete");if(K[0]===0)throw new J("tlv.decode(long): zero leftmost byte");for(let V of K)W=W<<8|V;if(X+=z,W<128)throw new J("tlv.decode(long): not minimal encoding")}let q=Q.subarray(X,X+W);if(q.length!==W)throw new J("tlv.decode: wrong value length");return{v:q,l:Q.subarray(X+W)}}},_int:{encode($){let{Err:Q}=BQ;if($<h8)throw new Q("integer: negative integers are not allowed");let J=nY($);if(Number.parseInt(J[0],16)&8)J="00"+J;if(J.length&1)throw new Q("unexpected DER parsing assertion: unpadded hex");return J},decode($){let{Err:Q}=BQ;if($[0]&128)throw new Q("invalid signature integer: negative");if($[0]===0&&!($[1]&128))throw new Q("invalid signature integer: unnecessary leading zero");return MQ($)}},toSig($){let{Err:Q,_int:J,_tlv:X}=BQ,Y=R0($,void 0,"signature"),{v:G,l:W}=X.decode(48,Y);if(W.length)throw new Q("invalid signature: left bytes after parsing");let{v:q,l:z}=X.decode(2,G),{v:K,l:V}=X.decode(2,z);if(V.length)throw new Q("invalid signature: left bytes after parsing");return{r:J.decode(q),s:J.decode(K)}},hexFromSig($){let{_tlv:Q,_int:J}=BQ,X=Q.encode(2,J.encode($.r)),Y=Q.encode(2,J.encode($.s)),G=X+Y;return Q.encode(48,G)}},h8=BigInt(0),RX=BigInt(1),YR=BigInt(2),t6=BigInt(3),Ah=BigInt(4);function GR($,Q={}){let J=QR("weierstrass",$,Q),{Fp:X,Fn:Y}=J,G=J.CURVE,{h:W,n:q}=G;aY(Q,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});let{endo:z}=Q;if(z){if(!X.is0(G.a)||typeof z.beta!=="bigint"||!Array.isArray(z.basises))throw Error('invalid endo: expected "beta": bigint and "basises": array')}let K=qR(X,Y);function V(){if(!X.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}function U(N,c,_){let{x:C,y:E}=c.toAffine(),T=X.toBytes(C);if(iY(_,"isCompressed"),_){V();let v=!X.isOdd(E);return h0(WR(v),T)}else return h0(Uint8Array.of(4),T,X.toBytes(E))}function x(N){R0(N,void 0,"Point");let{publicKey:c,publicKeyUncompressed:_}=K,C=N.length,E=N[0],T=N.subarray(1);if(C===c&&(E===2||E===3)){let v=X.fromBytes(T);if(!X.isValid(v))throw Error("bad point: is not on curve, wrong x");let k=w(v),f;try{f=X.sqrt(k)}catch(q0){let X0=q0 instanceof Error?": "+q0.message:"";throw Error("bad point: is not on curve, sqrt error"+X0)}V();let S=X.isOdd(f);if((E&1)===1!==S)f=X.neg(f);return{x:v,y:f}}else if(C===_&&E===4){let v=X.BYTES,k=X.fromBytes(T.subarray(0,v)),f=X.fromBytes(T.subarray(v,v*2));if(!j(k,f))throw Error("bad point: is not on curve");return{x:k,y:f}}else throw Error(`bad point: got length ${C}, expected compressed=${c} or uncompressed=${_}`)}let M=Q.toBytes||U,H=Q.fromBytes||x;function w(N){let c=X.sqr(N),_=X.mul(c,N);return X.add(X.add(_,X.mul(N,G.a)),G.b)}function j(N,c){let _=X.sqr(c),C=w(N);return X.eql(_,C)}if(!j(G.Gx,G.Gy))throw Error("bad curve params: generator point");let Z=X.mul(X.pow(G.a,t6),Ah),L=X.mul(X.sqr(G.b),BigInt(27));if(X.is0(X.add(Z,L)))throw Error("bad curve params: a or b");function D(N,c,_=!1){if(!X.isValid(c)||_&&X.is0(c))throw Error(`bad point coordinate ${N}`);return c}function F(N){if(!(N instanceof p))throw Error("Weierstrass Point expected")}function J0(N){if(!z||!z.basises)throw Error("no endo");return Th(N,z.basises,Y.ORDER)}let n=yz((N,c)=>{let{X:_,Y:C,Z:E}=N;if(X.eql(E,X.ONE))return{x:_,y:C};let T=N.is0();if(c==null)c=T?X.ONE:X.inv(E);let v=X.mul(_,c),k=X.mul(C,c),f=X.mul(E,c);if(T)return{x:X.ZERO,y:X.ZERO};if(!X.eql(f,X.ONE))throw Error("invZ was invalid");return{x:v,y:k}}),e=yz((N)=>{if(N.is0()){if(Q.allowInfinityPoint&&!X.is0(N.Y))return;throw Error("bad point: ZERO")}let{x:c,y:_}=N.toAffine();if(!X.isValid(c)||!X.isValid(_))throw Error("bad point: x or y not field elements");if(!j(c,_))throw Error("bad point: equation left != right");if(!N.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function y(N,c,_,C,E){return _=new p(X.mul(_.X,N),_.Y,_.Z),c=oY(C,c),_=oY(E,_),c.add(_)}class p{static BASE=new p(G.Gx,G.Gy,X.ONE);static ZERO=new p(X.ZERO,X.ONE,X.ZERO);static Fp=X;static Fn=Y;X;Y;Z;constructor(N,c,_){this.X=D("x",N),this.Y=D("y",c,!0),this.Z=D("z",_),Object.freeze(this)}static CURVE(){return G}static fromAffine(N){let{x:c,y:_}=N||{};if(!N||!X.isValid(c)||!X.isValid(_))throw Error("invalid affine point");if(N instanceof p)throw Error("projective point not allowed");if(X.is0(c)&&X.is0(_))return p.ZERO;return new p(c,_,X.ONE)}static fromBytes(N){let c=p.fromAffine(H(R0(N,void 0,"point")));return c.assertValidity(),c}static fromHex(N){return p.fromBytes(I0(N))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(N=8,c=!0){if(t.createCache(this,N),!c)this.multiply(t6);return this}assertValidity(){e(this)}hasEvenY(){let{y:N}=this.toAffine();if(!X.isOdd)throw Error("Field doesn't support isOdd");return!X.isOdd(N)}equals(N){F(N);let{X:c,Y:_,Z:C}=this,{X:E,Y:T,Z:v}=N,k=X.eql(X.mul(c,v),X.mul(E,C)),f=X.eql(X.mul(_,v),X.mul(T,C));return k&&f}negate(){return new p(this.X,X.neg(this.Y),this.Z)}double(){let{a:N,b:c}=G,_=X.mul(c,t6),{X:C,Y:E,Z:T}=this,v=X.ZERO,k=X.ZERO,f=X.ZERO,S=X.mul(C,C),$0=X.mul(E,E),q0=X.mul(T,T),X0=X.mul(C,E);return X0=X.add(X0,X0),f=X.mul(C,T),f=X.add(f,f),v=X.mul(N,f),k=X.mul(_,q0),k=X.add(v,k),v=X.sub($0,k),k=X.add($0,k),k=X.mul(v,k),v=X.mul(X0,v),f=X.mul(_,f),q0=X.mul(N,q0),X0=X.sub(S,q0),X0=X.mul(N,X0),X0=X.add(X0,f),f=X.add(S,S),S=X.add(f,S),S=X.add(S,q0),S=X.mul(S,X0),k=X.add(k,S),q0=X.mul(E,T),q0=X.add(q0,q0),S=X.mul(q0,X0),v=X.sub(v,S),f=X.mul(q0,$0),f=X.add(f,f),f=X.add(f,f),new p(v,k,f)}add(N){F(N);let{X:c,Y:_,Z:C}=this,{X:E,Y:T,Z:v}=N,k=X.ZERO,f=X.ZERO,S=X.ZERO,$0=G.a,q0=X.mul(G.b,t6),X0=X.mul(c,E),C0=X.mul(_,T),o=X.mul(C,v),v0=X.add(c,_),D0=X.add(E,T);v0=X.mul(v0,D0),D0=X.add(X0,C0),v0=X.sub(v0,D0),D0=X.add(c,C);let M0=X.add(E,v);return D0=X.mul(D0,M0),M0=X.add(X0,o),D0=X.sub(D0,M0),M0=X.add(_,C),k=X.add(T,v),M0=X.mul(M0,k),k=X.add(C0,o),M0=X.sub(M0,k),S=X.mul($0,D0),k=X.mul(q0,o),S=X.add(k,S),k=X.sub(C0,S),S=X.add(C0,S),f=X.mul(k,S),C0=X.add(X0,X0),C0=X.add(C0,X0),o=X.mul($0,o),D0=X.mul(q0,D0),C0=X.add(C0,o),o=X.sub(X0,o),o=X.mul($0,o),D0=X.add(D0,o),X0=X.mul(C0,D0),f=X.add(f,X0),X0=X.mul(M0,D0),k=X.mul(v0,k),k=X.sub(k,X0),X0=X.mul(v0,C0),S=X.mul(M0,S),S=X.add(S,X0),new p(k,f,S)}subtract(N){return this.add(N.negate())}is0(){return this.equals(p.ZERO)}multiply(N){let{endo:c}=Q;if(!Y.isValidNot0(N))throw Error("invalid scalar: out of range");let _,C,E=(T)=>t.cached(this,T,(v)=>nz(p,v));if(c){let{k1neg:T,k1:v,k2neg:k,k2:f}=J0(N),{p:S,f:$0}=E(v),{p:q0,f:X0}=E(f);C=$0.add(X0),_=y(c.beta,S,q0,T,k)}else{let{p:T,f:v}=E(N);_=T,C=v}return nz(p,[_,C])[0]}multiplyUnsafe(N){let{endo:c}=Q,_=this;if(!Y.isValid(N))throw Error("invalid scalar: out of range");if(N===h8||_.is0())return p.ZERO;if(N===RX)return _;if(t.hasCache(this))return this.multiply(N);if(c){let{k1neg:C,k1:E,k2neg:T,k2:v}=J0(N),{p1:k,p2:f}=$R(p,_,E,v);return y(c.beta,k,f,C,T)}else return t.unsafe(_,N)}toAffine(N){return n(this,N)}isTorsionFree(){let{isTorsionFree:N}=Q;if(W===RX)return!0;if(N)return N(p,this);return t.unsafe(this,q).is0()}clearCofactor(){let{clearCofactor:N}=Q;if(W===RX)return this;if(N)return N(p,this);return this.multiplyUnsafe(W)}isSmallOrder(){return this.multiplyUnsafe(W).is0()}toBytes(N=!0){return iY(N,"isCompressed"),this.assertValidity(),M(p,this,N)}toHex(N=!0){return F0(this.toBytes(N))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}let W0=Y.BITS,t=new dz(p,Q.endo?Math.ceil(W0/2):W0);return p.BASE.precompute(8),p}function WR($){return Uint8Array.of($?2:3)}function qR($,Q){return{secretKey:Q.BYTES,publicKey:1+$.BYTES,publicKeyUncompressed:1+2*$.BYTES,publicKeyHasPrefix:!0,signature:2*Q.BYTES}}function Eh($,Q={}){let{Fn:J}=$,X=Q.randomBytes||W8,Y=Object.assign(qR($.Fp,J),{seed:uz(J.ORDER)});function G(M){try{let H=J.fromBytes(M);return J.isValidNot0(H)}catch(H){return!1}}function W(M,H){let{publicKey:w,publicKeyUncompressed:j}=Y;try{let Z=M.length;if(H===!0&&Z!==w)return!1;if(H===!1&&Z!==j)return!1;return!!$.fromBytes(M)}catch(Z){return!1}}function q(M=X(Y.seed)){return s6(R0(M,Y.seed,"seed"),J.ORDER)}function z(M,H=!0){return $.BASE.multiply(J.fromBytes(M)).toBytes(H)}function K(M){let{secretKey:H,publicKey:w,publicKeyUncompressed:j}=Y;if(!pY(M))return;if("_lengths"in J&&J._lengths||H===w)return;let Z=R0(M,void 0,"key").length;return Z===w||Z===j}function V(M,H,w=!0){if(K(M)===!0)throw Error("first arg must be private key");if(K(H)===!1)throw Error("second arg must be public key");let j=J.fromBytes(M);return $.fromBytes(H).multiply(j).toBytes(w)}let U={isValidSecretKey:G,isValidPublicKey:W,randomSecretKey:q},x=r6(q,z);return Object.freeze({getPublicKey:z,getSharedSecret:V,keygen:x,Point:$,utils:U,lengths:Y})}function zR($,Q,J={}){tQ(Q),aY(J,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"}),J=Object.assign({},J);let X=J.randomBytes||W8,Y=J.hmac||((_,C)=>HQ(Q,_,C)),{Fp:G,Fn:W}=$,{ORDER:q,BITS:z}=W,{keygen:K,getPublicKey:V,getSharedSecret:U,utils:x,lengths:M}=Eh($,J),H={prehash:!0,lowS:typeof J.lowS==="boolean"?J.lowS:!0,format:"compact",extraEntropy:!1},w=q*YR<G.ORDER;function j(_){let C=q>>RX;return _>C}function Z(_,C){if(!W.isValidNot0(C))throw Error(`invalid signature ${_}: out of range 1..Point.Fn.ORDER`);return C}function L(){if(w)throw Error('"recovered" sig type is not supported for cofactor >2 curves')}function D(_,C){sz(C);let E=M.signature,T=C==="compact"?E:C==="recovered"?E+1:void 0;return R0(_,T)}class F{r;s;recovery;constructor(_,C,E){if(this.r=Z("r",_),this.s=Z("s",C),E!=null){if(L(),![0,1,2,3].includes(E))throw Error("invalid recovery id");this.recovery=E}Object.freeze(this)}static fromBytes(_,C=H.format){D(_,C);let E;if(C==="der"){let{r:f,s:S}=BQ.toSig(R0(_));return new F(f,S)}if(C==="recovered")E=_[0],C="compact",_=_.subarray(1);let T=M.signature/2,v=_.subarray(0,T),k=_.subarray(T,T*2);return new F(W.fromBytes(v),W.fromBytes(k),E)}static fromHex(_,C){return this.fromBytes(I0(_),C)}assertRecovery(){let{recovery:_}=this;if(_==null)throw Error("invalid recovery id: must be present");return _}addRecoveryBit(_){return new F(this.r,this.s,_)}recoverPublicKey(_){let{r:C,s:E}=this,T=this.assertRecovery(),v=T===2||T===3?C+q:C;if(!G.isValid(v))throw Error("invalid recovery id: sig.r+curve.n != R.x");let k=G.toBytes(v),f=$.fromBytes(h0(WR((T&1)===0),k)),S=W.inv(v),$0=n(R0(_,void 0,"msgHash")),q0=W.create(-$0*S),X0=W.create(E*S),C0=$.BASE.multiplyUnsafe(q0).add(f.multiplyUnsafe(X0));if(C0.is0())throw Error("invalid recovery: point at infinify");return C0.assertValidity(),C0}hasHighS(){return j(this.s)}toBytes(_=H.format){if(sz(_),_==="der")return I0(BQ.hexFromSig(this));let{r:C,s:E}=this,T=W.toBytes(C),v=W.toBytes(E);if(_==="recovered")return L(),h0(Uint8Array.of(this.assertRecovery()),T,v);return h0(T,v)}toHex(_){return F0(this.toBytes(_))}}let J0=J.bits2int||function(C){if(C.length>8192)throw Error("input is too large");let E=MQ(C),T=C.length*8-z;return T>0?E>>BigInt(T):E},n=J.bits2int_modN||function(C){return W.create(J0(C))},e=dY(z);function y(_){return bL("num < 2^"+z,_,h8,e),W.toBytes(_)}function p(_,C){return R0(_,void 0,"message"),C?R0(Q(_),void 0,"prehashed message"):_}function W0(_,C,E){let{lowS:T,prehash:v,extraEntropy:k}=oz(E,H);_=p(_,v);let f=n(_),S=W.fromBytes(C);if(!W.isValidNot0(S))throw Error("invalid private key");let $0=[y(S),y(f)];if(k!=null&&k!==!1){let o=k===!0?X(M.secretKey):k;$0.push(R0(o,void 0,"extraEntropy"))}let q0=h0(...$0),X0=f;function C0(o){let v0=J0(o);if(!W.isValidNot0(v0))return;let D0=W.inv(v0),M0=$.BASE.multiply(v0).toAffine(),j$=W.create(M0.x);if(j$===h8)return;let L$=W.create(D0*W.create(X0+j$*S));if(L$===h8)return;let K$=(M0.x===j$?0:2)|Number(M0.y&RX),i8=L$;if(T&&j(L$))i8=W.neg(L$),K$^=1;return new F(j$,i8,w?void 0:K$)}return{seed:q0,k2sig:C0}}function t(_,C,E={}){let{seed:T,k2sig:v}=W0(_,C,E);return fL(Q.outputLen,W.BYTES,Y)(T,v).toBytes(E.format)}function N(_,C,E,T={}){let{lowS:v,prehash:k,format:f}=oz(T,H);if(E=R0(E,void 0,"publicKey"),C=p(C,k),!pY(_)){let S=_ instanceof F?", use sig.toBytes()":"";throw Error("verify expects Uint8Array signature"+S)}D(_,f);try{let S=F.fromBytes(_,f),$0=$.fromBytes(E);if(v&&S.hasHighS())return!1;let{r:q0,s:X0}=S,C0=n(C),o=W.inv(X0),v0=W.create(C0*o),D0=W.create(q0*o),M0=$.BASE.multiplyUnsafe(v0).add($0.multiplyUnsafe(D0));if(M0.is0())return!1;return W.create(M0.x)===q0}catch(S){return!1}}function c(_,C,E={}){let{prehash:T}=oz(E,H);return C=p(C,T),F.fromBytes(_,"recovered").recoverPublicKey(C).toBytes()}return Object.freeze({keygen:K,getPublicKey:V,getSharedSecret:U,utils:x,lengths:M,Point:$,sign:t,verify:N,recoverPublicKey:c,Signature:F,hash:Q})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var Q5={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},kh={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},ch=BigInt(0),rz=BigInt(2);function Sh($){let Q=Q5.p,J=BigInt(3),X=BigInt(6),Y=BigInt(11),G=BigInt(22),W=BigInt(23),q=BigInt(44),z=BigInt(88),K=$*$*$%Q,V=K*K*$%Q,U=C$(V,J,Q)*V%Q,x=C$(U,J,Q)*V%Q,M=C$(x,rz,Q)*K%Q,H=C$(M,Y,Q)*M%Q,w=C$(H,G,Q)*H%Q,j=C$(w,q,Q)*w%Q,Z=C$(j,z,Q)*j%Q,L=C$(Z,q,Q)*w%Q,D=C$(L,J,Q)*V%Q,F=C$(D,W,Q)*H%Q,J0=C$(F,X,Q)*K%Q,n=C$(J0,rz,Q);if(!e6.eql(e6.sqr(n),$))throw Error("Cannot find square root");return n}var e6=jX(Q5.p,{sqrt:Sh}),XJ=GR(Q5,{Fp:e6,endo:kh}),rY=zR(XJ,z$),VR={};function $5($,...Q){let J=VR[$];if(J===void 0){let X=z$(SL($));J=h0(X,X),VR[$]=J}return z$(h0(J,...Q))}var ez=($)=>$.toBytes(!0).slice(1),$1=($)=>$%rz===ch;function tz($){let{Fn:Q,BASE:J}=XJ,X=Q.fromBytes($),Y=J.multiply(X);return{scalar:$1(Y.y)?X:Q.neg(X),bytes:ez(Y)}}function UR($){let Q=e6;if(!Q.isValidNot0($))throw Error("invalid x: Fail if x ≥ p");let J=Q.create($*$),X=Q.create(J*$+BigInt(7)),Y=Q.sqrt(X);if(!$1(Y))Y=Q.neg(Y);let G=XJ.fromAffine({x:$,y:Y});return G.assertValidity(),G}var sY=MQ;function xR(...$){return XJ.Fn.create(sY($5("BIP0340/challenge",...$)))}function KR($){return tz($).bytes}function bh($,Q,J=W8(32)){let{Fn:X}=XJ,Y=R0($,void 0,"message"),{bytes:G,scalar:W}=tz(Q),q=R0(J,32,"auxRand"),z=X.toBytes(W^sY($5("BIP0340/aux",q))),K=$5("BIP0340/nonce",z,G,Y),{bytes:V,scalar:U}=tz(K),x=xR(V,G,Y),M=new Uint8Array(64);if(M.set(V,0),M.set(X.toBytes(X.create(U+x*W)),32),!MR(M,Y,G))throw Error("sign: Invalid signature produced");return M}function MR($,Q,J){let{Fp:X,Fn:Y,BASE:G}=XJ,W=R0($,64,"signature"),q=R0(Q,void 0,"message"),z=R0(J,32,"publicKey");try{let K=UR(sY(z)),V=sY(W.subarray(0,32));if(!X.isValidNot0(V))return!1;let U=sY(W.subarray(32,64));if(!Y.isValidNot0(U))return!1;let x=xR(Y.toBytes(V),ez(K),q),M=G.multiplyUnsafe(U).add(K.multiplyUnsafe(Y.neg(x))),{x:H,y:w}=M.toAffine();if(M.is0()||!$1(w)||H!==V)return!1;return!0}catch(K){return!1}}var DX=(()=>{let J=(X=W8(48))=>{return s6(X,Q5.n)};return{keygen:r6(J,KR),getPublicKey:KR,sign:bh,verify:MR,Point:XJ,utils:{randomSecretKey:J,taggedHash:$5,lift_x:UR,pointToBytes:ez},lengths:{secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48}}})();/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function W5($){return $ instanceof Uint8Array||ArrayBuffer.isView($)&&$.constructor.name==="Uint8Array"}function X1($){if(!W5($))throw Error("Uint8Array expected")}function jR($,Q){if(!Array.isArray(Q))return!1;if(Q.length===0)return!0;if($)return Q.every((J)=>typeof J==="string");else return Q.every((J)=>Number.isSafeInteger(J))}function LR($){if(typeof $!=="function")throw Error("function expected");return!0}function ZQ($,Q){if(typeof Q!=="string")throw Error(`${$}: string expected`);return!0}function eY($){if(!Number.isSafeInteger($))throw Error(`invalid integer: ${$}`)}function X5($){if(!Array.isArray($))throw Error("array expected")}function Y5($,Q){if(!jR(!0,Q))throw Error(`${$}: array of strings expected`)}function Y1($,Q){if(!jR(!1,Q))throw Error(`${$}: array of numbers expected`)}function I$(...$){let Q=(G)=>G,J=(G,W)=>(q)=>G(W(q)),X=$.map((G)=>G.encode).reduceRight(J,Q),Y=$.map((G)=>G.decode).reduce(J,Q);return{encode:X,decode:Y}}function P$($){let Q=typeof $==="string"?$.split(""):$,J=Q.length;Y5("alphabet",Q);let X=new Map(Q.map((Y,G)=>[Y,G]));return{encode:(Y)=>{return X5(Y),Y.map((G)=>{if(!Number.isSafeInteger(G)||G<0||G>=J)throw Error(`alphabet.encode: digit index outside alphabet "${G}". Allowed: ${$}`);return Q[G]})},decode:(Y)=>{return X5(Y),Y.map((G)=>{ZQ("alphabet.decode",G);let W=X.get(G);if(W===void 0)throw Error(`Unknown letter: "${G}". Allowed: ${$}`);return W})}}}function T$($=""){return ZQ("join",$),{encode:(Q)=>{return Y5("join.decode",Q),Q.join($)},decode:(Q)=>{return ZQ("join.decode",Q),Q.split($)}}}function q5($,Q="="){return eY($),ZQ("padding",Q),{encode(J){Y5("padding.encode",J);while(J.length*$%8)J.push(Q);return J},decode(J){Y5("padding.decode",J);let X=J.length;if(X*$%8)throw Error("padding: invalid, string should have whole number of bytes");for(;X>0&&J[X-1]===Q;X--)if((X-1)*$%8===0)throw Error("padding: invalid, string has too much padding");return J.slice(0,X)}}}function RR($){return LR($),{encode:(Q)=>Q,decode:(Q)=>$(Q)}}function HR($,Q,J){if(Q<2)throw Error(`convertRadix: invalid from=${Q}, base cannot be less than 2`);if(J<2)throw Error(`convertRadix: invalid to=${J}, base cannot be less than 2`);if(X5($),!$.length)return[];let X=0,Y=[],G=Array.from($,(q)=>{if(eY(q),q<0||q>=Q)throw Error(`invalid integer: ${q}`);return q}),W=G.length;while(!0){let q=0,z=!0;for(let K=X;K<W;K++){let V=G[K],U=Q*q,x=U+V;if(!Number.isSafeInteger(x)||U/Q!==q||x-V!==U)throw Error("convertRadix: carry overflow");let M=x/J;q=x%J;let H=Math.floor(M);if(G[K]=H,!Number.isSafeInteger(H)||H*J+q!==x)throw Error("convertRadix: carry overflow");if(!z)continue;else if(!H)X=K;else z=!1}if(Y.push(q),z)break}for(let q=0;q<$.length-1&&$[q]===0;q++)Y.push(0);return Y.reverse()}var DR=($,Q)=>Q===0?$:DR(Q,$%Q),G5=($,Q)=>$+(Q-DR($,Q)),J5=(()=>{let $=[];for(let Q=0;Q<40;Q++)$.push(2**Q);return $})();function Q1($,Q,J,X){if(X5($),Q<=0||Q>32)throw Error(`convertRadix2: wrong from=${Q}`);if(J<=0||J>32)throw Error(`convertRadix2: wrong to=${J}`);if(G5(Q,J)>32)throw Error(`convertRadix2: carry overflow from=${Q} to=${J} carryBits=${G5(Q,J)}`);let Y=0,G=0,W=J5[Q],q=J5[J]-1,z=[];for(let K of $){if(eY(K),K>=W)throw Error(`convertRadix2: invalid data word=${K} from=${Q}`);if(Y=Y<<Q|K,G+Q>32)throw Error(`convertRadix2: carry overflow pos=${G} from=${Q}`);G+=Q;for(;G>=J;G-=J)z.push((Y>>G-J&q)>>>0);let V=J5[G];if(V===void 0)throw Error("invalid carry");Y&=V-1}if(Y=Y<<J-G&q,!X&&G>=Q)throw Error("Excess padding");if(!X&&Y>0)throw Error(`Non-zero padding: ${Y}`);if(X&&G>0)z.push(Y>>>0);return z}function fh($){eY($);let Q=256;return{encode:(J)=>{if(!W5(J))throw Error("radix.encode input should be Uint8Array");return HR(Array.from(J),Q,$)},decode:(J)=>{return Y1("radix.decode",J),Uint8Array.from(HR(J,$,Q))}}}function f$($,Q=!1){if(eY($),$<=0||$>32)throw Error("radix2: bits should be in (0..32]");if(G5(8,$)>32||G5($,8)>32)throw Error("radix2: carry overflow");return{encode:(J)=>{if(!W5(J))throw Error("radix2.encode input should be Uint8Array");return Q1(Array.from(J),8,$,!Q)},decode:(J)=>{return Y1("radix2.decode",J),Uint8Array.from(Q1(J,$,8,Q))}}}function BR($){return LR($),function(...Q){try{return $.apply(null,Q)}catch(J){}}}var gq0=I$(f$(4),P$("0123456789ABCDEF"),T$("")),lq0=I$(f$(5),P$("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),q5(5),T$("")),iq0=I$(f$(5),P$("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),T$("")),nq0=I$(f$(5),P$("0123456789ABCDEFGHIJKLMNOPQRSTUV"),q5(5),T$("")),dq0=I$(f$(5),P$("0123456789ABCDEFGHIJKLMNOPQRSTUV"),T$("")),aq0=I$(f$(5),P$("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),T$(""),RR(($)=>$.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),_R=(()=>typeof Uint8Array.from([]).toBase64==="function"&&typeof Uint8Array.fromBase64==="function")(),NR=($,Q)=>{ZQ("base64",$);let J=Q?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,X=Q?"base64url":"base64";if($.length>0&&!J.test($))throw Error("invalid base64");return Uint8Array.fromBase64($,{alphabet:X,lastChunkHandling:"strict"})},m$=_R?{encode($){return X1($),$.toBase64()},decode($){return NR($,!1)}}:I$(f$(6),P$("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),q5(6),T$("")),oq0=I$(f$(6),P$("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),T$("")),sq0=_R?{encode($){return X1($),$.toBase64({alphabet:"base64url"})},decode($){return NR($,!0)}}:I$(f$(6),P$("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),q5(6),T$("")),rq0=I$(f$(6),P$("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),T$("")),G1=($)=>I$(fh(58),P$($),T$("")),tq0=G1("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),eq0=G1("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),$z0=G1("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");var J1=I$(P$("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),T$("")),ZR=[996825010,642813549,513874426,1027748829,705979059];function tY($){let Q=$>>25,J=($&33554431)<<5;for(let X=0;X<ZR.length;X++)if((Q>>X&1)===1)J^=ZR[X];return J}function wR($,Q,J=1){let X=$.length,Y=1;for(let G=0;G<X;G++){let W=$.charCodeAt(G);if(W<33||W>126)throw Error(`Invalid prefix (${$})`);Y=tY(Y)^W>>5}Y=tY(Y);for(let G=0;G<X;G++)Y=tY(Y)^$.charCodeAt(G)&31;for(let G of Q)Y=tY(Y)^G;for(let G=0;G<6;G++)Y=tY(Y);return Y^=J,J1.encode(Q1([Y%J5[30]],30,5,!1))}function vR($){let Q=$==="bech32"?1:734539939,J=f$(5),X=J.decode,Y=J.encode,G=BR(X);function W(U,x,M=90){if(ZQ("bech32.encode prefix",U),W5(x))x=Array.from(x);Y1("bech32.encode",x);let H=U.length;if(H===0)throw TypeError(`Invalid prefix length ${H}`);let w=H+7+x.length;if(M!==!1&&w>M)throw TypeError(`Length ${w} exceeds limit ${M}`);let j=U.toLowerCase(),Z=wR(j,x,Q);return`${j}1${J1.encode(x)}${Z}`}function q(U,x=90){ZQ("bech32.decode input",U);let M=U.length;if(M<8||x!==!1&&M>x)throw TypeError(`invalid string length: ${M} (${U}). Expected (8..${x})`);let H=U.toLowerCase();if(U!==H&&U!==U.toUpperCase())throw Error("String must be lowercase or uppercase");let w=H.lastIndexOf("1");if(w===0||w===-1)throw Error('Letter "1" must be present between prefix and data only');let j=H.slice(0,w),Z=H.slice(w+1);if(Z.length<6)throw Error("Data must be at least 6 characters long");let L=J1.decode(Z).slice(0,-6),D=wR(j,L,Q);if(!Z.endsWith(D))throw Error(`Invalid checksum in ${U}: expected "${D}"`);return{prefix:j,words:L}}let z=BR(q);function K(U){let{prefix:x,words:M}=q(U,!1);return{prefix:x,words:M,bytes:X(M)}}function V(U,x){return W(U,Y(x))}return{encode:W,decode:q,encodeFromBytes:V,decodeToBytes:K,decodeUnsafe:z,fromWords:X,fromWordsUnsafe:G,toWords:Y}}var wQ=vR("bech32"),Qz0=vR("bech32m");var mh=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),yh={encode($){return X1($),$.toHex()},decode($){return ZQ("hex",$),Uint8Array.fromHex($)}},Jz0=mh?yh:I$(f$(4),P$("0123456789abcdef"),T$(""),RR(($)=>{if(typeof $!=="string"||$.length%2!==0)throw TypeError(`hex.decode: expected string, got ${typeof $} with length ${$.length}`);return $.toLowerCase()}));/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function hh($){return $ instanceof Uint8Array||ArrayBuffer.isView($)&&$.constructor.name==="Uint8Array"}function z5($){if(typeof $!=="boolean")throw Error(`boolean expected, not ${$}`)}function $7($){if(!Number.isSafeInteger($)||$<0)throw Error("positive integer expected, got "+$)}function c0($,Q,J=""){let X=hh($),Y=$?.length,G=Q!==void 0;if(!X||G&&Y!==Q){let W=J&&`"${J}" `,q=G?` of length ${Q}`:"",z=X?`length=${Y}`:`type=${typeof $}`;throw Error(W+"expected Uint8Array"+q+", got "+z)}return $}function W1($,Q=!0){if($.destroyed)throw Error("Hash instance has been destroyed");if(Q&&$.finished)throw Error("Hash#digest() has already been called")}function OR($,Q){c0($,void 0,"output");let J=Q.outputLen;if($.length<J)throw Error("digestInto() expects output buffer of length at least "+J)}function l0($){return new Uint32Array($.buffer,$.byteOffset,Math.floor($.byteLength/4))}function J$(...$){for(let Q=0;Q<$.length;Q++)$[Q].fill(0)}function FR($){return new DataView($.buffer,$.byteOffset,$.byteLength)}var ph=(()=>new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68)();function CR($,Q){return $.buffer===Q.buffer&&$.byteOffset<Q.byteOffset+Q.byteLength&&Q.byteOffset<$.byteOffset+$.byteLength}function q1($,Q){if(CR($,Q)&&$.byteOffset<Q.byteOffset)throw Error("complex overlap of input and output is not supported")}function IR($,Q){if(Q==null||typeof Q!=="object")throw Error("options must be defined");return Object.assign($,Q)}function Q7($,Q){if($.length!==Q.length)return!1;let J=0;for(let X=0;X<$.length;X++)J|=$[X]^Q[X];return J===0}var J7=($,Q)=>{function J(X,...Y){if(c0(X,void 0,"key"),!ph)throw Error("Non little-endian hardware is not yet supported");if($.nonceLength!==void 0){let V=Y[0];c0(V,$.varSizeNonce?void 0:$.nonceLength,"nonce")}let G=$.tagLength;if(G&&Y[1]!==void 0)c0(Y[1],void 0,"AAD");let W=Q(X,...Y),q=(V,U)=>{if(U!==void 0){if(V!==2)throw Error("cipher output not supported");c0(U,void 0,"output")}},z=!1;return{encrypt(V,U){if(z)throw Error("cannot encrypt() twice with same key + nonce");return z=!0,c0(V),q(W.encrypt.length,U),W.encrypt(V,U)},decrypt(V,U){if(c0(V),G&&V.length<G)throw Error('"ciphertext" expected length bigger than tagLength='+G);return q(W.decrypt.length,U),W.decrypt(V,U)}}}return Object.assign(J,$),J};function _X($,Q,J=!0){if(Q===void 0)return new Uint8Array($);if(Q.length!==$)throw Error('"output" expected Uint8Array of length '+$+", got: "+Q.length);if(J&&!YJ(Q))throw Error("invalid output, must be aligned");return Q}function z1($,Q,J){z5(J);let X=new Uint8Array(16),Y=FR(X);return Y.setBigUint64(0,BigInt(Q),J),Y.setBigUint64(8,BigInt($),J),X}function YJ($){return $.byteOffset%4===0}function y$($){return Uint8Array.from($)}var a0=16;var gh=283;function TR($){if(![16,24,32].includes($.length))throw Error('"aes key" expected Uint8Array of length 16/24/32, got length='+$.length)}function M1($){return $<<1^gh&-($>>7)}function NX($,Q){let J=0;for(;Q>0;Q>>=1)J^=$&-(Q&1),$=M1($);return J}var U1=(()=>{let $=new Uint8Array(256);for(let J=0,X=1;J<256;J++,X^=M1(X))$[J]=X;let Q=new Uint8Array(256);Q[0]=99;for(let J=0;J<255;J++){let X=$[255-J];X|=X<<8,Q[$[J]]=(X^X>>4^X>>5^X>>6^X>>7^99)&255}return J$($),Q})(),lh=U1.map(($,Q)=>U1.indexOf(Q)),ih=($)=>$<<24|$>>>8,V1=($)=>$<<8|$>>>24;function AR($,Q){if($.length!==256)throw Error("Wrong sbox length");let J=new Uint32Array(256).map((K,V)=>Q($[V])),X=J.map(V1),Y=X.map(V1),G=Y.map(V1),W=new Uint32Array(65536),q=new Uint32Array(65536),z=new Uint16Array(65536);for(let K=0;K<256;K++)for(let V=0;V<256;V++){let U=K*256+V;W[U]=J[K]^X[V],q[U]=Y[K]^G[V],z[U]=$[K]<<8|$[V]}return{sbox:$,sbox2:z,T0:J,T1:X,T2:Y,T3:G,T01:W,T23:q}}var H1=AR(U1,($)=>NX($,3)<<24|$<<16|$<<8|NX($,2)),ER=AR(lh,($)=>NX($,11)<<24|NX($,13)<<16|NX($,9)<<8|NX($,14)),nh=(()=>{let $=new Uint8Array(16);for(let Q=0,J=1;Q<16;Q++,J=M1(J))$[Q]=J;return $})();function B1($){c0($);let Q=$.length;TR($);let{sbox2:J}=H1,X=[];if(!YJ($))X.push($=y$($));let Y=l0($),G=Y.length,W=(z)=>j8(J,z,z,z,z),q=new Uint32Array(Q+28);q.set(Y);for(let z=G;z<q.length;z++){let K=q[z-1];if(z%G===0)K=W(ih(K))^nh[z/G-1];else if(G>6&&z%G===4)K=W(K);q[z]=q[z-G]^K}return J$(...X),q}function dh($){let Q=B1($),J=Q.slice(),X=Q.length,{sbox2:Y}=H1,{T0:G,T1:W,T2:q,T3:z}=ER;for(let K=0;K<X;K+=4)for(let V=0;V<4;V++)J[K+V]=Q[X-K-4+V];J$(Q);for(let K=4;K<X-4;K++){let V=J[K],U=j8(Y,V,V,V,V);J[K]=G[U&255]^W[U>>>8&255]^q[U>>>16&255]^z[U>>>24]}return J}function jQ($,Q,J,X,Y,G){return $[J<<8&65280|X>>>8&255]^Q[Y>>>8&65280|G>>>24&255]}function j8($,Q,J,X,Y){return $[Q&255|J&65280]|$[X>>>16&255|Y>>>16&65280]<<16}function x1($,Q,J,X,Y){let{sbox2:G,T01:W,T23:q}=H1,z=0;Q^=$[z++],J^=$[z++],X^=$[z++],Y^=$[z++];let K=$.length/4-2;for(let H=0;H<K;H++){let w=$[z++]^jQ(W,q,Q,J,X,Y),j=$[z++]^jQ(W,q,J,X,Y,Q),Z=$[z++]^jQ(W,q,X,Y,Q,J),L=$[z++]^jQ(W,q,Y,Q,J,X);Q=w,J=j,X=Z,Y=L}let V=$[z++]^j8(G,Q,J,X,Y),U=$[z++]^j8(G,J,X,Y,Q),x=$[z++]^j8(G,X,Y,Q,J),M=$[z++]^j8(G,Y,Q,J,X);return{s0:V,s1:U,s2:x,s3:M}}function ah($,Q,J,X,Y){let{sbox2:G,T01:W,T23:q}=ER,z=0;Q^=$[z++],J^=$[z++],X^=$[z++],Y^=$[z++];let K=$.length/4-2;for(let H=0;H<K;H++){let w=$[z++]^jQ(W,q,Q,Y,X,J),j=$[z++]^jQ(W,q,J,Q,Y,X),Z=$[z++]^jQ(W,q,X,J,Q,Y),L=$[z++]^jQ(W,q,Y,X,J,Q);Q=w,J=j,X=Z,Y=L}let V=$[z++]^j8(G,Q,Y,X,J),U=$[z++]^j8(G,J,Q,Y,X),x=$[z++]^j8(G,X,J,Q,Y),M=$[z++]^j8(G,Y,X,J,Q);return{s0:V,s1:U,s2:x,s3:M}}function oh($){if(c0($),$.length%a0!==0)throw Error("aes-(cbc/ecb).decrypt ciphertext should consist of blocks with size "+a0)}function sh($,Q,J){c0($);let X=$.length,Y=X%a0;if(!Q&&Y!==0)throw Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");if(!YJ($))$=y$($);let G=l0($);if(Q){let q=a0-Y;if(!q)q=a0;X=X+q}J=_X(X,J),q1($,J);let W=l0(J);return{b:G,o:W,out:J}}function rh($,Q){if(!Q)return $;let J=$.length;if(!J)throw Error("aes/pcks5: empty ciphertext not allowed");let X=$[J-1];if(X<=0||X>16)throw Error("aes/pcks5: wrong padding");let Y=$.subarray(0,-X);for(let G=0;G<X;G++)if($[J-G-1]!==X)throw Error("aes/pcks5: wrong padding");return Y}function th($){let Q=new Uint8Array(16),J=l0(Q);Q.set($);let X=a0-$.length;for(let Y=a0-X;Y<a0;Y++)Q[Y]=X;return J}var Z1=J7({blockSize:16,nonceLength:16},function(Q,J,X={}){let Y=!X.disablePadding;return{encrypt(G,W){let q=B1(Q),{b:z,o:K,out:V}=sh(G,Y,W),U=J,x=[q];if(!YJ(U))x.push(U=y$(U));let M=l0(U),H=M[0],w=M[1],j=M[2],Z=M[3],L=0;for(;L+4<=z.length;)H^=z[L+0],w^=z[L+1],j^=z[L+2],Z^=z[L+3],{s0:H,s1:w,s2:j,s3:Z}=x1(q,H,w,j,Z),K[L++]=H,K[L++]=w,K[L++]=j,K[L++]=Z;if(Y){let D=th(G.subarray(L*4));H^=D[0],w^=D[1],j^=D[2],Z^=D[3],{s0:H,s1:w,s2:j,s3:Z}=x1(q,H,w,j,Z),K[L++]=H,K[L++]=w,K[L++]=j,K[L++]=Z}return J$(...x),V},decrypt(G,W){oh(G);let q=dh(Q),z=J,K=[q];if(!YJ(z))K.push(z=y$(z));let V=l0(z);if(W=_X(G.length,W),!YJ(G))K.push(G=y$(G));q1(G,W);let U=l0(G),x=l0(W),M=V[0],H=V[1],w=V[2],j=V[3];for(let Z=0;Z+4<=U.length;){let L=M,D=H,F=w,J0=j;M=U[Z+0],H=U[Z+1],w=U[Z+2],j=U[Z+3];let{s0:n,s1:e,s2:y,s3:p}=ah(q,M,H,w,j);x[Z++]=n^L,x[Z++]=e^D,x[Z++]=y^F,x[Z++]=p^J0}return J$(...K),rh(W,Y)}}});function eh($){return $ instanceof Uint32Array||ArrayBuffer.isView($)&&$.constructor.name==="Uint32Array"}function K1($,Q){if(c0(Q,16,"block"),!eh($))throw Error("_encryptBlock accepts result of expandKeyLE");let J=l0(Q),{s0:X,s1:Y,s2:G,s3:W}=x1($,J[0],J[1],J[2],J[3]);return J[0]=X,J[1]=Y,J[2]=G,J[3]=W,Q}function PR($){let Q=0;for(let J=a0-1;J>=0;J--){let X=($[J]&128)>>>7;$[J]=$[J]<<1|Q,Q=X}if(Q)$[a0-1]^=135;return $}function V5($,Q){if($.length!==Q.length)throw Error("xorBlock: blocks must have same length");for(let J=0;J<$.length;J++)$[J]=$[J]^Q[J];return $}class w1{buffer;destroyed;k1;k2;xk;constructor($){c0($),TR($),this.xk=B1($),this.buffer=new Uint8Array(0),this.destroyed=!1;let Q=new Uint8Array(a0);K1(this.xk,Q),this.k1=PR(Q),this.k2=PR(new Uint8Array(this.k1))}update($){let{destroyed:Q,buffer:J}=this;if(Q)throw Error("CMAC instance was destroyed");c0($);let X=new Uint8Array(J.length+$.length);return X.set(J),X.set($,J.length),this.buffer=X,this}digest(){if(this.destroyed)throw Error("CMAC instance was destroyed");let{buffer:$}=this,Q=$.length,J=Math.ceil(Q/a0),X;if(J===0)J=1,X=!1;else X=Q%a0===0;let Y=(J-1)*a0,G=$.subarray(Y),W;if(X)W=V5(new Uint8Array(G),this.k1);else{let z=new Uint8Array(a0);z.set(G),z[G.length]=128,W=V5(z,this.k2)}let q=new Uint8Array(a0);for(let z=0;z<J-1;z++){let K=$.subarray(z*a0,(z+1)*a0);V5(q,K),K1(this.xk,q)}return V5(q,W),K1(this.xk,q),J$(W),q}destroy(){let{buffer:$,destroyed:Q,xk:J,k1:X,k2:Y}=this;if(Q)return;this.destroyed=!0,J$($,J,X,Y)}}var $p=($,Q)=>new w1($).update(Q).digest();$p.create=($)=>new w1($);var cR=($)=>Uint8Array.from($.split(""),(Q)=>Q.charCodeAt(0)),Qp=cR("expand 16-byte k"),Jp=cR("expand 32-byte k"),Xp=l0(Qp),Yp=l0(Jp);function d($,Q){return $<<Q|$>>>32-Q}function j1($){return $.byteOffset%4===0}var K5=64,Gp=16,SR=4294967295,kR=Uint32Array.of();function Wp($,Q,J,X,Y,G,W,q){let z=Y.length,K=new Uint8Array(K5),V=l0(K),U=j1(Y)&&j1(G),x=U?l0(Y):kR,M=U?l0(G):kR;for(let H=0;H<z;W++){if($(Q,J,X,V,W,q),W>=SR)throw Error("arx: counter overflow");let w=Math.min(K5,z-H);if(U&&w===K5){let j=H/4;if(H%4!==0)throw Error("arx: invalid block position");for(let Z=0,L;Z<Gp;Z++)L=j+Z,M[L]=x[L]^V[Z];H+=K5;continue}for(let j=0,Z;j<w;j++)Z=H+j,G[Z]=Y[Z]^K[j];H+=w}}function L1($,Q){let{allowShortKeys:J,extendNonceFn:X,counterLength:Y,counterRight:G,rounds:W}=IR({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},Q);if(typeof $!=="function")throw Error("core must be a function");return $7(Y),$7(W),z5(G),z5(J),(q,z,K,V,U=0)=>{c0(q,void 0,"key"),c0(z,void 0,"nonce"),c0(K,void 0,"data");let x=K.length;if(V===void 0)V=new Uint8Array(x);if(c0(V,void 0,"output"),$7(U),U<0||U>=SR)throw Error("arx: counter overflow");if(V.length<x)throw Error(`arx: output (${V.length}) is shorter than data (${x})`);let M=[],H=q.length,w,j;if(H===32)M.push(w=y$(q)),j=Yp;else if(H===16&&J)w=new Uint8Array(32),w.set(q),w.set(q,16),j=Xp,M.push(w);else throw c0(q,32,"arx key"),Error("invalid key size");if(!j1(z))M.push(z=y$(z));let Z=l0(w);if(X){if(z.length!==24)throw Error("arx: extended nonce must be 24 bytes");X(j,Z,l0(z.subarray(0,16)),Z),z=z.subarray(16)}let L=16-Y;if(L!==z.length)throw Error(`arx: nonce must be ${L} or 16 bytes`);if(L!==12){let F=new Uint8Array(12);F.set(z,G?0:12-z.length),z=F,M.push(z)}let D=l0(z);return Wp($,j,Z,D,K,V,U,W),J$(...M),V}}function X$($,Q){return $[Q++]&255|($[Q++]&255)<<8}class bR{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($){$=y$(c0($,32,"key"));let Q=X$($,0),J=X$($,2),X=X$($,4),Y=X$($,6),G=X$($,8),W=X$($,10),q=X$($,12),z=X$($,14);this.r[0]=Q&8191,this.r[1]=(Q>>>13|J<<3)&8191,this.r[2]=(J>>>10|X<<6)&7939,this.r[3]=(X>>>7|Y<<9)&8191,this.r[4]=(Y>>>4|G<<12)&255,this.r[5]=G>>>1&8190,this.r[6]=(G>>>14|W<<2)&8191,this.r[7]=(W>>>11|q<<5)&8065,this.r[8]=(q>>>8|z<<8)&8191,this.r[9]=z>>>5&127;for(let K=0;K<8;K++)this.pad[K]=X$($,16+2*K)}process($,Q,J=!1){let X=J?0:2048,{h:Y,r:G}=this,W=G[0],q=G[1],z=G[2],K=G[3],V=G[4],U=G[5],x=G[6],M=G[7],H=G[8],w=G[9],j=X$($,Q+0),Z=X$($,Q+2),L=X$($,Q+4),D=X$($,Q+6),F=X$($,Q+8),J0=X$($,Q+10),n=X$($,Q+12),e=X$($,Q+14),y=Y[0]+(j&8191),p=Y[1]+((j>>>13|Z<<3)&8191),W0=Y[2]+((Z>>>10|L<<6)&8191),t=Y[3]+((L>>>7|D<<9)&8191),N=Y[4]+((D>>>4|F<<12)&8191),c=Y[5]+(F>>>1&8191),_=Y[6]+((F>>>14|J0<<2)&8191),C=Y[7]+((J0>>>11|n<<5)&8191),E=Y[8]+((n>>>8|e<<8)&8191),T=Y[9]+(e>>>5|X),v=0,k=v+y*W+p*(5*w)+W0*(5*H)+t*(5*M)+N*(5*x);v=k>>>13,k&=8191,k+=c*(5*U)+_*(5*V)+C*(5*K)+E*(5*z)+T*(5*q),v+=k>>>13,k&=8191;let f=v+y*q+p*W+W0*(5*w)+t*(5*H)+N*(5*M);v=f>>>13,f&=8191,f+=c*(5*x)+_*(5*U)+C*(5*V)+E*(5*K)+T*(5*z),v+=f>>>13,f&=8191;let S=v+y*z+p*q+W0*W+t*(5*w)+N*(5*H);v=S>>>13,S&=8191,S+=c*(5*M)+_*(5*x)+C*(5*U)+E*(5*V)+T*(5*K),v+=S>>>13,S&=8191;let $0=v+y*K+p*z+W0*q+t*W+N*(5*w);v=$0>>>13,$0&=8191,$0+=c*(5*H)+_*(5*M)+C*(5*x)+E*(5*U)+T*(5*V),v+=$0>>>13,$0&=8191;let q0=v+y*V+p*K+W0*z+t*q+N*W;v=q0>>>13,q0&=8191,q0+=c*(5*w)+_*(5*H)+C*(5*M)+E*(5*x)+T*(5*U),v+=q0>>>13,q0&=8191;let X0=v+y*U+p*V+W0*K+t*z+N*q;v=X0>>>13,X0&=8191,X0+=c*W+_*(5*w)+C*(5*H)+E*(5*M)+T*(5*x),v+=X0>>>13,X0&=8191;let C0=v+y*x+p*U+W0*V+t*K+N*z;v=C0>>>13,C0&=8191,C0+=c*q+_*W+C*(5*w)+E*(5*H)+T*(5*M),v+=C0>>>13,C0&=8191;let o=v+y*M+p*x+W0*U+t*V+N*K;v=o>>>13,o&=8191,o+=c*z+_*q+C*W+E*(5*w)+T*(5*H),v+=o>>>13,o&=8191;let v0=v+y*H+p*M+W0*x+t*U+N*V;v=v0>>>13,v0&=8191,v0+=c*K+_*z+C*q+E*W+T*(5*w),v+=v0>>>13,v0&=8191;let D0=v+y*w+p*H+W0*M+t*x+N*U;v=D0>>>13,D0&=8191,D0+=c*V+_*K+C*z+E*q+T*W,v+=D0>>>13,D0&=8191,v=(v<<2)+v|0,v=v+k|0,k=v&8191,v=v>>>13,f+=v,Y[0]=k,Y[1]=f,Y[2]=S,Y[3]=$0,Y[4]=q0,Y[5]=X0,Y[6]=C0,Y[7]=o,Y[8]=v0,Y[9]=D0}finalize(){let{h:$,pad:Q}=this,J=new Uint16Array(10),X=$[1]>>>13;$[1]&=8191;for(let W=2;W<10;W++)$[W]+=X,X=$[W]>>>13,$[W]&=8191;$[0]+=X*5,X=$[0]>>>13,$[0]&=8191,$[1]+=X,X=$[1]>>>13,$[1]&=8191,$[2]+=X,J[0]=$[0]+5,X=J[0]>>>13,J[0]&=8191;for(let W=1;W<10;W++)J[W]=$[W]+X,X=J[W]>>>13,J[W]&=8191;J[9]-=8192;let Y=(X^1)-1;for(let W=0;W<10;W++)J[W]&=Y;Y=~Y;for(let W=0;W<10;W++)$[W]=$[W]&Y|J[W];$[0]=($[0]|$[1]<<13)&65535,$[1]=($[1]>>>3|$[2]<<10)&65535,$[2]=($[2]>>>6|$[3]<<7)&65535,$[3]=($[3]>>>9|$[4]<<4)&65535,$[4]=($[4]>>>12|$[5]<<1|$[6]<<14)&65535,$[5]=($[6]>>>2|$[7]<<11)&65535,$[6]=($[7]>>>5|$[8]<<8)&65535,$[7]=($[8]>>>8|$[9]<<5)&65535;let G=$[0]+Q[0];$[0]=G&65535;for(let W=1;W<8;W++)G=($[W]+Q[W]|0)+(G>>>16)|0,$[W]=G&65535;J$(J)}update($){W1(this),c0($),$=y$($);let{buffer:Q,blockLen:J}=this,X=$.length;for(let Y=0;Y<X;){let G=Math.min(J-this.pos,X-Y);if(G===J){for(;J<=X-Y;Y+=J)this.process($,Y);continue}if(Q.set($.subarray(Y,Y+G),this.pos),this.pos+=G,Y+=G,this.pos===J)this.process(Q,0,!1),this.pos=0}return this}destroy(){J$(this.h,this.r,this.buffer,this.pad)}digestInto($){W1(this),OR($,this),this.finished=!0;let{buffer:Q,h:J}=this,{pos:X}=this;if(X){Q[X++]=1;for(;X<16;X++)Q[X]=0;this.process(Q,0,!0)}this.finalize();let Y=0;for(let G=0;G<8;G++)$[Y++]=J[G]>>>0,$[Y++]=J[G]>>>8;return $}digest(){let{buffer:$,outputLen:Q}=this;this.digestInto($);let J=$.slice(0,Q);return this.destroy(),J}}function qp($){let Q=(X,Y)=>$(Y).update(X).digest(),J=$(new Uint8Array(32));return Q.outputLen=J.outputLen,Q.blockLen=J.blockLen,Q.create=(X)=>$(X),Q}var fR=(()=>qp(($)=>new bR($)))();function hR($,Q,J,X,Y,G=20){let W=$[0],q=$[1],z=$[2],K=$[3],V=Q[0],U=Q[1],x=Q[2],M=Q[3],H=Q[4],w=Q[5],j=Q[6],Z=Q[7],L=Y,D=J[0],F=J[1],J0=J[2],n=W,e=q,y=z,p=K,W0=V,t=U,N=x,c=M,_=H,C=w,E=j,T=Z,v=L,k=D,f=F,S=J0;for(let q0=0;q0<G;q0+=2)n=n+W0|0,v=d(v^n,16),_=_+v|0,W0=d(W0^_,12),n=n+W0|0,v=d(v^n,8),_=_+v|0,W0=d(W0^_,7),e=e+t|0,k=d(k^e,16),C=C+k|0,t=d(t^C,12),e=e+t|0,k=d(k^e,8),C=C+k|0,t=d(t^C,7),y=y+N|0,f=d(f^y,16),E=E+f|0,N=d(N^E,12),y=y+N|0,f=d(f^y,8),E=E+f|0,N=d(N^E,7),p=p+c|0,S=d(S^p,16),T=T+S|0,c=d(c^T,12),p=p+c|0,S=d(S^p,8),T=T+S|0,c=d(c^T,7),n=n+t|0,S=d(S^n,16),E=E+S|0,t=d(t^E,12),n=n+t|0,S=d(S^n,8),E=E+S|0,t=d(t^E,7),e=e+N|0,v=d(v^e,16),T=T+v|0,N=d(N^T,12),e=e+N|0,v=d(v^e,8),T=T+v|0,N=d(N^T,7),y=y+c|0,k=d(k^y,16),_=_+k|0,c=d(c^_,12),y=y+c|0,k=d(k^y,8),_=_+k|0,c=d(c^_,7),p=p+W0|0,f=d(f^p,16),C=C+f|0,W0=d(W0^C,12),p=p+W0|0,f=d(f^p,8),C=C+f|0,W0=d(W0^C,7);let $0=0;X[$0++]=W+n|0,X[$0++]=q+e|0,X[$0++]=z+y|0,X[$0++]=K+p|0,X[$0++]=V+W0|0,X[$0++]=U+t|0,X[$0++]=x+N|0,X[$0++]=M+c|0,X[$0++]=H+_|0,X[$0++]=w+C|0,X[$0++]=j+E|0,X[$0++]=Z+T|0,X[$0++]=L+v|0,X[$0++]=D+k|0,X[$0++]=F+f|0,X[$0++]=J0+S|0}function zp($,Q,J,X){let Y=$[0],G=$[1],W=$[2],q=$[3],z=Q[0],K=Q[1],V=Q[2],U=Q[3],x=Q[4],M=Q[5],H=Q[6],w=Q[7],j=J[0],Z=J[1],L=J[2],D=J[3];for(let J0=0;J0<20;J0+=2)Y=Y+z|0,j=d(j^Y,16),x=x+j|0,z=d(z^x,12),Y=Y+z|0,j=d(j^Y,8),x=x+j|0,z=d(z^x,7),G=G+K|0,Z=d(Z^G,16),M=M+Z|0,K=d(K^M,12),G=G+K|0,Z=d(Z^G,8),M=M+Z|0,K=d(K^M,7),W=W+V|0,L=d(L^W,16),H=H+L|0,V=d(V^H,12),W=W+V|0,L=d(L^W,8),H=H+L|0,V=d(V^H,7),q=q+U|0,D=d(D^q,16),w=w+D|0,U=d(U^w,12),q=q+U|0,D=d(D^q,8),w=w+D|0,U=d(U^w,7),Y=Y+K|0,D=d(D^Y,16),H=H+D|0,K=d(K^H,12),Y=Y+K|0,D=d(D^Y,8),H=H+D|0,K=d(K^H,7),G=G+V|0,j=d(j^G,16),w=w+j|0,V=d(V^w,12),G=G+V|0,j=d(j^G,8),w=w+j|0,V=d(V^w,7),W=W+U|0,Z=d(Z^W,16),x=x+Z|0,U=d(U^x,12),W=W+U|0,Z=d(Z^W,8),x=x+Z|0,U=d(U^x,7),q=q+z|0,L=d(L^q,16),M=M+L|0,z=d(z^M,12),q=q+z|0,L=d(L^q,8),M=M+L|0,z=d(z^M,7);let F=0;X[F++]=Y,X[F++]=G,X[F++]=W,X[F++]=q,X[F++]=j,X[F++]=Z,X[F++]=L,X[F++]=D}var U5=L1(hR,{counterRight:!1,counterLength:4,allowShortKeys:!1}),Vp=L1(hR,{counterRight:!1,counterLength:8,extendNonceFn:zp,allowShortKeys:!1});var Kp=new Uint8Array(16),mR=($,Q)=>{$.update(Q);let J=Q.length%16;if(J)$.update(Kp.subarray(J))},Up=new Uint8Array(32);function yR($,Q,J,X,Y){if(Y!==void 0)c0(Y,void 0,"AAD");let G=$(Q,J,Up),W=z1(X.length,Y?Y.length:0,!0),q=fR.create(G);if(Y)mR(q,Y);mR(q,X),q.update(W);let z=q.digest();return J$(G,W),z}var pR=($)=>(Q,J,X)=>{return{encrypt(G,W){let q=G.length;W=_X(q+16,W,!1),W.set(G);let z=W.subarray(0,-16);$(Q,J,z,z,1);let K=yR($,Q,J,z,X);return W.set(K,q),J$(K),W},decrypt(G,W){W=_X(G.length-16,W,!1);let q=G.subarray(0,-16),z=G.subarray(-16),K=yR($,Q,J,q,X);if(!Q7(z,K))throw Error("invalid tag");return W.set(G.subarray(0,-16)),$(Q,J,W,W,1),J$(K),W}}},Rz0=J7({blockSize:64,nonceLength:12,tagLength:16},pR(U5)),Dz0=J7({blockSize:64,nonceLength:24,tagLength:16},pR(Vp));function gR($,Q,J){if(tQ($),J===void 0)J=new Uint8Array($.outputLen);return HQ($,J,Q)}var R1=Uint8Array.of(0),uR=Uint8Array.of();function lR($,Q,J,X=32){tQ($),b$(X,"length");let Y=$.outputLen;if(X>255*Y)throw Error("Length must be <= 255*HashLen");let G=Math.ceil(X/Y);if(J===void 0)J=uR;else R0(J,void 0,"info");let W=new Uint8Array(G*Y),q=HQ.create($,Q),z=q._cloneInto(),K=new Uint8Array(q.outputLen);for(let V=0;V<G;V++)R1[0]=V+1,z.update(V===0?uR:K).update(J).update(R1).digestInto(K),W.set(K,Y*V),q._cloneInto(z);return q.destroy(),z.destroy(),Y8(K,R1),W.slice(0,X)}var xp=Object.defineProperty,k0=($,Q)=>{for(var J in Q)xp($,J,{get:Q[J],enumerable:!0})},Mp={};k0(Mp,{binarySearch:()=>C1,bytesToHex:()=>F0,hexToBytes:()=>I0,insertEventIntoAscendingList:()=>Bp,insertEventIntoDescendingList:()=>Hp,isHex32:()=>w$,mergeReverseSortedLists:()=>Zp,normalizeURL:()=>sR,utf8Decoder:()=>g8,utf8Encoder:()=>h$});var g8=new TextDecoder("utf-8"),h$=new TextEncoder;function sR($){try{if($.indexOf("://")===-1)$="wss://"+$;let Q=new URL($);if(Q.protocol==="http:")Q.protocol="ws:";else if(Q.protocol==="https:")Q.protocol="wss:";if(Q.pathname=Q.pathname.replace(/\/+/g,"/"),Q.pathname.endsWith("/"))Q.pathname=Q.pathname.slice(0,-1);if(Q.port==="80"&&Q.protocol==="ws:"||Q.port==="443"&&Q.protocol==="wss:")Q.port="";return Q.searchParams.sort(),Q.hash="",Q.toString()}catch(Q){throw Error(`Invalid URL: ${$}`)}}function Hp($,Q){let[J,X]=C1($,(Y)=>{if(Q.id===Y.id)return 0;if(Q.created_at===Y.created_at)return-1;return Y.created_at-Q.created_at});if(!X)$.splice(J,0,Q);return $}function Bp($,Q){let[J,X]=C1($,(Y)=>{if(Q.id===Y.id)return 0;if(Q.created_at===Y.created_at)return-1;return Q.created_at-Y.created_at});if(!X)$.splice(J,0,Q);return $}function C1($,Q){let J=0,X=$.length-1;while(J<=X){let Y=Math.floor((J+X)/2),G=Q($[Y]);if(G===0)return[Y,!0];if(G<0)X=Y-1;else J=Y+1}return[J,!1]}function Zp($,Q){let J=Array($.length+Q.length);J.length=0;let X=0,Y=0,G=[];while(X<$.length&&Y<Q.length){let W;if($[X]?.created_at>Q[Y]?.created_at)W=$[X],X++;else W=Q[Y],Y++;if(J.length>0&&J[J.length-1].created_at===W.created_at){if(G.includes(W.id))continue}else G.length=0;J.push(W),G.push(W.id)}while(X<$.length){let W=$[X];if(X++,J.length>0&&J[J.length-1].created_at===W.created_at){if(G.includes(W.id))continue}else G.length=0;J.push(W),G.push(W.id)}while(Y<Q.length){let W=Q[Y];if(Y++,J.length>0&&J[J.length-1].created_at===W.created_at){if(G.includes(W.id))continue}else G.length=0;J.push(W),G.push(W.id)}return J}function w$($){for(let Q=0;Q<64;Q++){let J=$.charCodeAt(Q);if(isNaN(J)||J<48||J>102||J>57&&J<97)return!1}return!0}var vX=Symbol("verified"),wp=($)=>$ instanceof Object;function I1($){if(!wp($))return!1;if(typeof $.kind!=="number")return!1;if(typeof $.content!=="string")return!1;if(typeof $.created_at!=="number")return!1;if(typeof $.pubkey!=="string")return!1;if(!w$($.pubkey))return!1;if(!Array.isArray($.tags))return!1;for(let Q=0;Q<$.tags.length;Q++){let J=$.tags[Q];if(!Array.isArray(J))return!1;for(let X=0;X<J.length;X++)if(typeof J[X]!=="string")return!1}return!0}var jp=class{generateSecretKey(){return DX.utils.randomSecretKey()}getPublicKey($){return F0(DX.getPublicKey($))}finalizeEvent($,Q){let J=$;return J.pubkey=F0(DX.getPublicKey(Q)),J.id=M5(J),J.sig=F0(DX.sign(I0(M5(J)),Q)),J[vX]=!0,J}verifyEvent($){if(typeof $[vX]==="boolean")return $[vX];try{let Q=M5($);if(Q!==$.id)return $[vX]=!1,!1;let J=DX.verify(I0($.sig),I0(Q),I0($.pubkey));return $[vX]=J,J}catch(Q){return $[vX]=!1,!1}}};function Lp($){if(!I1($))throw Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,$.pubkey,$.created_at,$.kind,$.tags,$.content])}function M5($){let Q=z$(h$.encode(Lp($)));return F0(Q)}var Z5=new jp,Rp=Z5.generateSecretKey,X7=Z5.getPublicKey,p$=Z5.finalizeEvent,Y7=Z5.verifyEvent,Dp={};k0(Dp,{AIEmbeddings:()=>Bu,AppCurationSet:()=>sg,Application:()=>ag,AuthoredPodcasts:()=>Bg,BadgeAward:()=>Pp,BadgeDefinition:()=>bg,Bid:()=>lp,BidConfirmation:()=>ip,BlobsAuth:()=>Cg,BlockedRelaysList:()=>ru,BlossomServerList:()=>Kg,BookmarkList:()=>au,Bookmarksets:()=>Ag,Calendar:()=>Ml,CalendarEventRSVP:()=>Hl,CashuMintAnnouncement:()=>Ol,CashuWalletEvent:()=>Ng,CashuWalletHistory:()=>Cu,CashuWalletTokens:()=>Fu,ChannelCreation:()=>JD,ChannelHideMessage:()=>GD,ChannelMessage:()=>YD,ChannelMetadata:()=>XD,ChannelMuteUser:()=>WD,ChatMessage:()=>Tp,Chess:()=>pp,ClassifiedListing:()=>Jl,ClientAuth:()=>zD,CodeSnippet:()=>$u,CoinjoinPool:()=>ju,Comment:()=>op,CommunitiesList:()=>ou,CommunityDefinition:()=>Dl,CommunityPostApproval:()=>Du,ConferenceEvent:()=>eg,Contacts:()=>Fp,CreateOrUpdateProduct:()=>yg,CreateOrUpdateStall:()=>mg,CuratedVideoSets:()=>kg,Curationsets:()=>Eg,Date:()=>Ul,DecoupledEncryptionKeyDistribution:()=>Ru,DecoupledKeyAnnouncement:()=>qg,DecoupledKeyClientAnnouncement:()=>Lu,DirectMessageRelaysList:()=>zg,DraftClassifiedListing:()=>Xl,DraftEvent:()=>zl,DraftLong:()=>gg,Emojisets:()=>lg,EncryptedDirectMessage:()=>Cp,EventDeletion:()=>Ip,FavoriteFollowSets:()=>Gg,FavoritePodcasts:()=>Vg,FavoriteRelays:()=>$g,FedimintAnnouncement:()=>Fl,Feed:()=>Kl,FileMessage:()=>cp,FileMetadata:()=>dp,FileServerPreference:()=>Ug,Followsets:()=>Ig,ForumThread:()=>Ep,GenericRepost:()=>k1,Genericlists:()=>Pg,GeocacheListing:()=>Nl,GeocacheLog:()=>Iu,GeocacheLogEntry:()=>vl,GeocacheProofOfFind:()=>Pu,GiftWrap:()=>qD,GitPullRequest:()=>Ju,GitPullRequestUpdate:()=>Xu,GoodWikiAuthorList:()=>xg,GoodWikiRelayList:()=>Mg,GroupMetadata:()=>Il,HTTPAuth:()=>c1,Handlerinformation:()=>wl,Handlerrecommendation:()=>Zl,Highlights:()=>lu,InteractiveRoom:()=>tg,InterestsList:()=>Jg,Interestsets:()=>fg,Issue:()=>Yu,JobFeedback:()=>vu,JobRequest:()=>_u,JobResult:()=>Nu,Label:()=>Mu,LegacyNsiteFile:()=>Ll,LightningPubRPC:()=>vg,LinkSet:()=>Vl,LiveChatMessage:()=>ep,LiveEvent:()=>rg,LongFormArticle:()=>ug,MarketplaceUI:()=>hg,MediaFollows:()=>Yg,MediaStarterPacks:()=>cl,MergeRequests:()=>up,Metadata:()=>vp,ModularArticleContent:()=>ng,ModularArticleHeader:()=>ig,MuteSets:()=>cg,Mutelist:()=>iu,NWCWalletInfo:()=>Dg,NWCWalletRequest:()=>VD,NWCWalletResponse:()=>Og,NormalVideo:()=>fp,NostrConnect:()=>Fg,NsiteNamed:()=>_l,NsiteRoot:()=>_g,NutZap:()=>hu,NutZapInfo:()=>Xg,OpenTimestamps:()=>np,Patch:()=>Qu,PeerToPeerOrderEvents:()=>Cl,Photo:()=>bp,Pinlist:()=>nu,PodcastEpisode:()=>hp,PodcastMetadata:()=>Hg,Poll:()=>ap,PollResponse:()=>gp,PrivateDirectMessage:()=>QD,PrivateEventRelayList:()=>Qg,ProblemTracker:()=>Ku,ProductSoldAsAuction:()=>pg,ProfileBadges:()=>Sg,ProxyAnnouncement:()=>Lg,PublicChatsList:()=>su,PublicMessage:()=>yp,Reaction:()=>E1,ReactionToWebsite:()=>Sp,RecommendRelay:()=>Op,Redirects:()=>ql,RelayDiscovery:()=>og,RelayList:()=>du,RelayMonitorAnnouncement:()=>Zg,RelayReview:()=>Bl,RelayReviews:()=>Hu,Relaysets:()=>Tg,ReleaseArtifactSets:()=>dg,Reply:()=>Gu,Report:()=>Uu,Reporting:()=>xu,RepositoryAnnouncement:()=>Yl,RepositoryState:()=>Gl,Repost:()=>A1,ReservedCashuWalletTokens:()=>Ou,RoomPresence:()=>wg,Scroll:()=>rp,Seal:()=>$D,SearchRelaysList:()=>tu,ShortTextNote:()=>eR,ShortVideo:()=>mp,SimpleGroupAdmins:()=>Pl,SimpleGroupCreateGroup:()=>cu,SimpleGroupCreateInvite:()=>bu,SimpleGroupDeleteEvent:()=>ku,SimpleGroupDeleteGroup:()=>Su,SimpleGroupEditMetadata:()=>Eu,SimpleGroupJoinRequest:()=>fu,SimpleGroupLeaveRequest:()=>mu,SimpleGroupList:()=>eu,SimpleGroupLiveKitParticipants:()=>El,SimpleGroupMembers:()=>Tl,SimpleGroupPutUser:()=>Tu,SimpleGroupRemoveUser:()=>Au,SimpleGroupReply:()=>kp,SimpleGroupRoles:()=>Al,SimpleGroupThreadedReply:()=>Ap,SlideSet:()=>Ql,SoftwareApplication:()=>jl,StarterPacks:()=>kl,StatusApplied:()=>qu,StatusClosed:()=>zu,StatusDraft:()=>Vu,StatusOpen:()=>Wu,TidalLogin:()=>pu,Time:()=>xl,Torrent:()=>Zu,TorrentComment:()=>wu,TransportMethodAnnouncement:()=>Rg,UserEmojiList:()=>Wg,UserGraspList:()=>jg,UserStatuses:()=>$l,VideoViewEvent:()=>Rl,Voice:()=>sp,VoiceComment:()=>tp,WebBookmarks:()=>Sl,WikiArticle:()=>Wl,Zap:()=>gu,ZapGoal:()=>yu,ZapRequest:()=>uu,classifyKind:()=>_p,isAddressableKind:()=>T1,isEphemeralKind:()=>tR,isKind:()=>Np,isRegularKind:()=>rR,isReplaceableKind:()=>P1});function rR($){return $<1e4&&$!==0&&$!==3}function P1($){return $===0||$===3||1e4<=$&&$<20000}function tR($){return 20000<=$&&$<30000}function T1($){return 30000<=$&&$<40000}function _p($){if(rR($))return"regular";if(P1($))return"replaceable";if(tR($))return"ephemeral";if(T1($))return"parameterized";return"unknown"}function Np($,Q){let J=Q instanceof Array?Q:[Q];return I1($)&&J.includes($.kind)||!1}var vp=0,eR=1,Op=2,Fp=3,Cp=4,Ip=5,A1=6,E1=7,Pp=8,Tp=9,Ap=10,Ep=11,kp=12,$D=13,QD=14,cp=15,k1=16,Sp=17,bp=20,fp=21,mp=22,yp=24,JD=40,XD=41,YD=42,GD=43,WD=44,hp=54,pp=64,up=818,gp=1018,lp=1021,ip=1022,np=1040,qD=1059,dp=1063,ap=1068,op=1111,sp=1222,rp=1227,tp=1244,ep=1311,$u=1337,Qu=1617,Ju=1618,Xu=1619,Yu=1621,Gu=1622,Wu=1630,qu=1631,zu=1632,Vu=1633,Ku=1971,Uu=1984,xu=1984,Mu=1985,Hu=1986,Bu=1987,Zu=2003,wu=2004,ju=2022,Lu=4454,Ru=4455,Du=4550,_u=5999,Nu=6999,vu=7000,Ou=7374,Fu=7375,Cu=7376,Iu=7516,Pu=7517,Tu=9000,Au=9001,Eu=9002,ku=9005,cu=9007,Su=9008,bu=9009,fu=9021,mu=9022,yu=9041,hu=9321,pu=9467,uu=9734,gu=9735,lu=9802,iu=1e4,nu=10001,du=10002,au=10003,ou=10004,su=10005,ru=10006,tu=10007,eu=10009,$g=10012,Qg=10013,Jg=10015,Xg=10019,Yg=10020,Gg=10021,Wg=10030,qg=10044,zg=10050,Vg=10054,Kg=10063,Ug=10096,xg=10101,Mg=10102,Hg=10154,Bg=10164,Zg=10166,wg=10312,jg=10317,Lg=10377,Rg=11111,Dg=13194,_g=15128,Ng=17375,vg=21000,zD=22242,VD=23194,Og=23195,Fg=24133,Cg=24242,c1=27235,Ig=30000,Pg=30001,Tg=30002,Ag=30003,Eg=30004,kg=30005,cg=30007,Sg=30008,bg=30009,fg=30015,mg=30017,yg=30018,hg=30019,pg=30020,ug=30023,gg=30024,lg=30030,ig=30040,ng=30041,dg=30063,ag=30078,og=30166,sg=30267,rg=30311,tg=30312,eg=30313,$l=30315,Ql=30388,Jl=30402,Xl=30403,Yl=30617,Gl=30618,Wl=30818,ql=30819,zl=31234,Vl=31388,Kl=31890,Ul=31922,xl=31923,Ml=31924,Hl=31925,Bl=31987,Zl=31989,wl=31990,jl=32267,Ll=34128,Rl=34237,Dl=34550,_l=35128,Nl=37515,vl=37516,Ol=38172,Fl=38173,Cl=38383,Il=39000,Pl=39001,Tl=39002,Al=39003,El=39004,kl=39089,cl=39092,Sl=39701;function bl($,Q){if($.ids&&$.ids.indexOf(Q.id)===-1)return!1;if($.kinds&&$.kinds.indexOf(Q.kind)===-1)return!1;if($.authors&&$.authors.indexOf(Q.pubkey)===-1)return!1;for(let J in $)if(J[0]==="#"){let X=J.slice(1),Y=$[`#${X}`];if(Y&&!Q.tags.find(([G,W])=>G===J.slice(1)&&Y.indexOf(W)!==-1))return!1}if($.since&&Q.created_at<$.since)return!1;if($.until&&Q.created_at>$.until)return!1;return!0}function fl($,Q){for(let J=0;J<$.length;J++)if(bl($[J],Q))return!0;return!1}var ml={};k0(ml,{getHex64:()=>w5,getInt:()=>KD,getSubscriptionId:()=>UD,matchEventId:()=>yl,matchEventKind:()=>pl,matchEventPubkey:()=>hl});function w5($,Q){let J=Q.length+3,X=$.indexOf(`"${Q}":`)+J,Y=$.slice(X).indexOf('"')+X+1;return $.slice(Y,Y+64)}function KD($,Q){let J=Q.length,X=$.indexOf(`"${Q}":`)+J+3,Y=$.slice(X),G=Math.min(Y.indexOf(","),Y.indexOf("}"));return parseInt(Y.slice(0,G),10)}function UD($){let Q=$.slice(0,22).indexOf('"EVENT"');if(Q===-1)return null;let J=$.slice(Q+7+1).indexOf('"');if(J===-1)return null;let X=Q+7+1+J,Y=$.slice(X+1,80).indexOf('"');if(Y===-1)return null;let G=X+1+Y;return $.slice(X+1,G)}function yl($,Q){return Q===w5($,"id")}function hl($,Q){return Q===w5($,"pubkey")}function pl($,Q){return Q===KD($,"kind")}var ul={};k0(ul,{makeAuthEvent:()=>xD});function xD($,Q){return{kind:zD,created_at:Math.floor(Date.now()/1000),tags:[["relay",$],["challenge",Q]],content:""}}var F1=class extends Error{constructor($,Q){super(`Tried to send message '${$} on a closed connection to ${Q}.`);this.name="SendingOnClosedConnection"}},gl=class{url;_connected=!1;onclose=null;onnotice=($)=>console.debug(`NOTICE from ${this.url}: ${$}`);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($,Q){if(this.url=sR($),this.verifyEvent=Q.verifyEvent,this._WebSocket=Q.websocketImplementation||WebSocket,this.enablePing=Q.enablePing,this.enableReconnect=Q.enableReconnect||!1,Q.idleTimeout)this.idleTimeout=Q.idleTimeout}static async connect($,Q){let J=new gl($,Q);return await J.connect(Q),J}closeAllSubscriptions($){for(let[Q,J]of this.openSubs)J.close($);this.openSubs.clear();for(let[Q,J]of this.openEventPublishes)J.reject(Error($));this.openEventPublishes.clear();for(let[Q,J]of this.openCountRequests)J.reject(Error($));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 $=this.resubscribeBackoff[Math.min(this.reconnectAttempts,this.resubscribeBackoff.length-1)];this.reconnectAttempts++,this.reconnectTimeoutHandle=setTimeout(async()=>{try{await this.connect()}catch(Q){}},$)}handleHardClose($){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($)}async connect($){let Q;if(this.connectionPromise)return this.connectionPromise;return this.challenge=void 0,this.authPromise=void 0,this.skipReconnection=!1,this.connectionPromise=new Promise((J,X)=>{if($?.timeout)Q=setTimeout(()=>{if(X("connection timed out"),this.connectionPromise=void 0,this.reconnectAttempts===0)this.skipReconnection=!0;this.handleHardClose("relay connection timed out")},$.timeout);if($?.abort)$.abort.onabort=X;try{this.ws=new this._WebSocket(this.url)}catch(Y){clearTimeout(Q),X(Y);return}this.ws.onopen=()=>{if(this.reconnectTimeoutHandle)clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0;clearTimeout(Q),this._connected=!0;let Y=this.reconnectAttempts>0;this.reconnectAttempts=0;for(let G of this.openSubs.values()){if(G.eosed=!1,Y){for(let W=0;W<G.filters.length;W++)if(G.lastEmitted)G.filters[W].since=G.lastEmitted+1}G.fire()}if(this.enablePing)this.pingIntervalHandle=setInterval(()=>this.pingpong(),this.pingFrequency);J()},this.ws.onerror=()=>{if(clearTimeout(Q),X("connection failed"),this.connectionPromise=void 0,this.reconnectAttempts===0)this.skipReconnection=!0;this.handleHardClose("relay connection failed")},this.ws.onclose=(Y)=>{clearTimeout(Q),X(Y.message||"websocket closed"),this.handleHardClose("relay connection closed")},this.ws.onmessage=this._onmessage.bind(this)}),this.connectionPromise}waitForPingPong(){return new Promise(($)=>{this.ws.once("pong",()=>$(!0)),this.ws.ping()})}waitForDummyReq(){return new Promise(($,Q)=>{if(!this.connectionPromise)return Q(Error(`no connection to ${this.url}, can't ping`));try{let J=this.subscribe([{ids:["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"],limit:0}],{label:"<forced-ping>",oneose:()=>{$(!0),J.close()},onclose(){$(!0)},eoseTimeout:this.pingTimeout+1000})}catch(J){Q(J)}})}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((Q)=>setTimeout(()=>Q(!1),this.pingTimeout))])){if(this.ws?.readyState===this._WebSocket.OPEN)this.ws?.close()}}}async send($){if(!this.connectionPromise)throw new F1($,this.url);this.connectionPromise.then(()=>{this.ws?.send($)})}async auth($){let Q=this.challenge;if(!Q)throw Error("can't perform auth, no challenge was received");if(this.authPromise)return this.authPromise;return this.authPromise=new Promise(async(J,X)=>{try{let Y=await $(xD(this.url,Q)),G=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:J,reject:X,timeout:G}),this.send('["AUTH",'+JSON.stringify(Y)+"]")}catch(Y){console.warn("subscribe auth function failed:",Y)}}),this.authPromise}async publish($){this.idleSince=void 0,this.clearIdleTimeout(),this.ongoingOperations++;let Q=new Promise((J,X)=>{let Y=setTimeout(()=>{let G=this.openEventPublishes.get($.id);if(G)G.reject(Error("publish timed out")),this.openEventPublishes.delete($.id)},this.publishTimeout);this.openEventPublishes.set($.id,{resolve:J,reject:X,timeout:Y})});try{await this.send('["EVENT",'+JSON.stringify($)+"]")}catch(J){let X=this.openEventPublishes.get($.id);if(X)X.reject(J),this.openEventPublishes.delete($.id)}if(this.ongoingOperations--,this.ongoingOperations===0)this.idleSince=Date.now(),this.scheduleIdleClose();return Q}async count($,Q){return(await this.countWithHLL($,Q)).count}async countWithHLL($,Q){this.serial++;let J=Q?.id||"count:"+this.serial,X=new Promise((Y,G)=>{this.openCountRequests.set(J,{resolve:Y,reject:G})});try{await this.send('["COUNT","'+J+'",'+JSON.stringify($).substring(1))}catch(Y){let G=this.openCountRequests.get(J);if(G)G.reject(Y),this.openCountRequests.delete(J)}return X}subscribe($,Q){if(Q.label!=="<forced-ping>")this.idleSince=void 0,this.clearIdleTimeout(),this.ongoingOperations++;let J=this.prepareSubscription($,Q);if(J.fire(),Q.abort)Q.abort.onabort=()=>J.close(String(Q.abort.reason||"<aborted>"));return J}prepareSubscription($,Q){this.serial++;let J=Q.id||(Q.label?Q.label+":":"sub:")+this.serial,X=new ll(this,J,$,Q);return this.openSubs.set(J,X),X}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($){let Q=$.data;if(!Q)return;let J=UD(Q);if(J){let X=this.openSubs.get(J);if(!X)return;let Y=w5(Q,"id"),G=X.alreadyHaveEvent?.(Y);if(X.receivedEvent?.(this,Y),G)return}try{let X=JSON.parse(Q);switch(X[0]){case"EVENT":{let Y=this.openSubs.get(X[1]),G=X[2];if(fl(Y.filters,G)&&this.verifyEvent(G,this.url))Y.onevent(G);else Y.oninvalidevent?.(G);if(!Y.lastEmitted||Y.lastEmitted<G.created_at)Y.lastEmitted=G.created_at;return}case"COUNT":{let Y=X[1],G=X[2],W=this.openCountRequests.get(Y);if(W)W.resolve(G),this.openCountRequests.delete(Y);return}case"EOSE":{let Y=this.openSubs.get(X[1]);if(!Y)return;Y.receivedEose();return}case"OK":{let Y=X[1],G=X[2],W=X[3],q=this.openEventPublishes.get(Y);if(q){if(clearTimeout(q.timeout),G)q.resolve(W);else q.reject(Error(W));this.openEventPublishes.delete(Y)}return}case"CLOSED":{let Y=X[1],G=this.openSubs.get(Y);if(!G){let W=this.openCountRequests.get(Y);if(W)W.reject(Error(X[2])),this.openCountRequests.delete(Y);return}G.closed=!0,G.close(X[2]);return}case"NOTICE":{this.onnotice(X[1]);return}case"AUTH":{if(this.challenge=X[1],this.onauth)this.auth(this.onauth).catch((Y)=>{if(!(Y instanceof F1))throw Y});return}default:{this.openSubs.get(X[1])?.oncustom?.(X);return}}}catch(X){try{let[Y,G,W]=JSON.parse(Q);console.warn(`[nostr] relay ${this.url} error processing message:`,X,W)}catch(Y){console.warn(`[nostr] relay ${this.url} error processing message:`,X)}return}}},ll=class{relay;id;lastEmitted;closed=!1;eosed=!1;filters;alreadyHaveEvent;receivedEvent;onevent;oninvalidevent;oneose;onclose;oncustom;eoseTimeout;eoseTimeoutHandle;constructor($,Q,J,X){if(J.length===0)throw Error("subscription can't be created with zero filters");this.relay=$,this.filters=J,this.id=Q,this.alreadyHaveEvent=X.alreadyHaveEvent,this.receivedEvent=X.receivedEvent,this.eoseTimeout=X.eoseTimeout||$.baseEoseTimeout,this.oneose=X.oneose,this.onclose=X.onclose,this.oninvalidevent=X.oninvalidevent,this.onevent=X.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($="closed by caller"){if(!this.closed&&this.relay.connected){try{this.relay.send('["CLOSE",'+JSON.stringify(this.id)+"]")}catch(Q){if(Q instanceof F1);else throw Q}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?.($)}},il;try{il=WebSocket}catch{}var nl=256,Tz0=nl*2;var dl;try{dl=WebSocket}catch{}var j5={};k0(j5,{BECH32_REGEX:()=>MD,Bech32MaxSize:()=>S1,NostrTypeGuard:()=>al,decode:()=>L5,decodeNostrURI:()=>sl,encodeBytes:()=>D5,naddrEncode:()=>Ji,neventEncode:()=>Qi,noteEncode:()=>el,nprofileEncode:()=>$i,npubEncode:()=>tl,nsecEncode:()=>rl});var al={isNProfile:($)=>/^nprofile1[a-z\d]+$/.test($||""),isNEvent:($)=>/^nevent1[a-z\d]+$/.test($||""),isNAddr:($)=>/^naddr1[a-z\d]+$/.test($||""),isNSec:($)=>/^nsec1[a-z\d]{58}$/.test($||""),isNPub:($)=>/^npub1[a-z\d]{58}$/.test($||""),isNote:($)=>/^note1[a-z\d]+$/.test($||""),isNcryptsec:($)=>/^ncryptsec1[a-z\d]+$/.test($||"")},S1=5000,MD=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function ol($){let Q=new Uint8Array(4);return Q[0]=$>>24&255,Q[1]=$>>16&255,Q[2]=$>>8&255,Q[3]=$&255,Q}function sl($){try{if($.startsWith("nostr:"))$=$.substring(6);return L5($)}catch(Q){return{type:"invalid",data:null}}}function L5($){let{prefix:Q,words:J}=wQ.decode($,S1),X=new Uint8Array(wQ.fromWords(J));switch(Q){case"nprofile":{let Y=D1(X);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:F0(Y[0][0]),relays:Y[1]?Y[1].map((G)=>g8.decode(G)):[]}}}case"nevent":{let Y=D1(X);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:F0(Y[0][0]),relays:Y[1]?Y[1].map((G)=>g8.decode(G)):[],author:Y[2]?.[0]?F0(Y[2][0]):void 0,kind:Y[3]?.[0]?parseInt(F0(Y[3][0]),16):void 0}}}case"naddr":{let Y=D1(X);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:g8.decode(Y[0][0]),pubkey:F0(Y[2][0]),kind:parseInt(F0(Y[3][0]),16),relays:Y[1]?Y[1].map((G)=>g8.decode(G)):[]}}}case"nsec":return{type:Q,data:X};case"npub":case"note":return{type:Q,data:F0(X)};default:throw Error(`unknown prefix ${Q}`)}}function D1($){let Q={},J=$;while(J.length>0){if(J.length<2)throw Error("not enough data to read TLV");let X=J[0],Y=J[1],G=J.slice(2,2+Y);if(J=J.slice(2+Y),G.length<Y)throw Error(`not enough data to read on TLV ${X}`);Q[X]=Q[X]||[],Q[X].push(G)}return Q}function rl($){return D5("nsec",$)}function tl($){return D5("npub",I0($))}function el($){return D5("note",I0($))}function R5($,Q){let J=wQ.toWords(Q);return wQ.encode($,J,S1)}function D5($,Q){return R5($,Q)}function $i($){let Q=b1({0:[I0($.pubkey)],1:($.relays||[]).map((J)=>h$.encode(J))});return R5("nprofile",Q)}function Qi($){let Q;if($.kind!==void 0)Q=ol($.kind);let J=b1({0:[I0($.id)],1:($.relays||[]).map((X)=>h$.encode(X)),2:$.author?[I0($.author)]:[],3:Q?[new Uint8Array(Q)]:[]});return R5("nevent",J)}function Ji($){let Q=new ArrayBuffer(4);new DataView(Q).setUint32(0,$.kind,!1);let J=b1({0:[h$.encode($.identifier)],1:($.relays||[]).map((X)=>h$.encode(X)),2:[I0($.pubkey)],3:[new Uint8Array(Q)]});return R5("naddr",J)}function b1($){let Q=[];return Object.entries($).reverse().forEach(([J,X])=>{X.forEach((Y)=>{let G=new Uint8Array(Y.length+2);G.set([parseInt(J)],0),G.set([Y.length],1),G.set(Y,2),Q.push(G)})}),h0(...Q)}var Xi={};k0(Xi,{decrypt:()=>Yi,encrypt:()=>HD});function HD($,Q,J){let X=$ instanceof Uint8Array?$:I0($),Y=rY.getSharedSecret(X,I0("02"+Q)),G=BD(Y),W=Uint8Array.from(W8(16)),q=h$.encode(J),z=Z1(G,W).encrypt(q),K=m$.encode(new Uint8Array(z)),V=m$.encode(new Uint8Array(W.buffer));return`${K}?iv=${V}`}function Yi($,Q,J){let X=$ instanceof Uint8Array?$:I0($),[Y,G]=J.split("?iv="),W=rY.getSharedSecret(X,I0("02"+Q)),q=BD(W),z=m$.decode(G),K=m$.decode(Y),V=Z1(q,z).decrypt(K);return g8.decode(V)}function BD($){return $.slice(1,33)}var Gi={};k0(Gi,{NIP05_REGEX:()=>f1,isNip05:()=>Wi,isValid:()=>Vi,queryProfile:()=>ZD,searchDomain:()=>zi,useFetchImplementation:()=>qi});var f1=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/,Wi=($)=>f1.test($||""),_5;try{_5=fetch}catch($){}function qi($){_5=$}async function zi($,Q=""){try{let J=`https://${$}/.well-known/nostr.json?name=${Q}`,X=await _5(J,{redirect:"manual"});if(X.status!==200)throw Error("Wrong response code");return(await X.json()).names}catch(J){return{}}}async function ZD($){let Q=$.match(f1);if(!Q)return null;let[,J="_",X]=Q;try{let Y=`https://${X}/.well-known/nostr.json?name=${J}`,G=await _5(Y,{redirect:"manual"});if(G.status!==200)throw Error("Wrong response code");let W=await G.json(),q=W.names[J];return q?{pubkey:q,relays:W.relays?.[q]}:null}catch(Y){return null}}async function Vi($,Q){let J=await ZD(Q);return J?J.pubkey===$:!1}var Ki={};k0(Ki,{parse:()=>Ui});function Ui($){let Q={reply:void 0,root:void 0,mentions:[],profiles:[],quotes:[]},J,X;for(let Y=$.tags.length-1;Y>=0;Y--){let G=$.tags[Y];if(G[0]==="e"&&G[1]&&w$(G[1])){let[W,q,z,K,V]=G,U={id:q,relays:z?[z]:[],author:V&&w$(V)?V:void 0};if(K==="root"){Q.root=U;continue}if(K==="reply"){Q.reply=U;continue}if(K==="mention"){Q.mentions.push(U);continue}if(!J)J=U;else X=U;Q.mentions.push(U);continue}if(G[0]==="q"&&G[1]&&w$(G[1])){let[W,q,z]=G;Q.quotes.push({id:q,relays:z?[z]:[]})}if(G[0]==="p"&&G[1]&&w$(G[1])){Q.profiles.push({pubkey:G[1],relays:G[2]?[G[2]]:[]});continue}}if(!Q.root)Q.root=X||J||Q.reply;if(!Q.reply)Q.reply=J||Q.root;return[Q.reply,Q.root].forEach((Y)=>{if(!Y)return;let G=Q.mentions.indexOf(Y);if(G!==-1)Q.mentions.splice(G,1);if(Y.author){let W=Q.profiles.find((q)=>q.pubkey===Y.author);if(W&&W.relays){if(!Y.relays)Y.relays=[];W.relays.forEach((q)=>{if(Y.relays?.indexOf(q)===-1)Y.relays.push(q)}),W.relays=Y.relays}}}),Q.mentions.forEach((Y)=>{if(Y.author){let G=Q.profiles.find((W)=>W.pubkey===Y.author);if(G&&G.relays){if(!Y.relays)Y.relays=[];G.relays.forEach((W)=>{if(Y.relays.indexOf(W)===-1)Y.relays.push(W)}),G.relays=Y.relays}}}),Q}var xi={};k0(xi,{fetchRelayInformation:()=>Hi,useFetchImplementation:()=>Mi});var wD;try{wD=fetch}catch{}function Mi($){wD=$}async function Hi($){return await(await fetch($.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()}var Bi={};k0(Bi,{getPow:()=>Zi,minePow:()=>ji});function Zi($){let Q=0;for(let J=0;J<64;J+=8){let X=parseInt($.substring(J,J+8),16);if(X===0)Q+=32;else{Q+=Math.clz32(X);break}}return Q}function wi($){let Q=0;for(let J=0;J<$.length;J++){let X=$[J];if(X===0)Q+=8;else{Q+=Math.clz32(X)-24;break}}return Q}function ji($,Q){let J=0,X=$,Y=["nonce",J.toString(),Q.toString()];X.tags.push(Y);while(!0){let G=Math.floor(new Date().getTime()/1000);if(G!==X.created_at)J=0,X.created_at=G;Y[1]=(++J).toString();let W=z$(h$.encode(JSON.stringify([0,X.pubkey,X.created_at,X.kind,X.tags,X.content])));if(wi(W)>=Q){X.id=F0(W);break}}return X}var Li={};k0(Li,{unwrapEvent:()=>Ti,unwrapManyEvents:()=>Ai,wrapEvent:()=>TD,wrapManyEvents:()=>Pi});var Ri={};k0(Ri,{createRumor:()=>FD,createSeal:()=>CD,createWrap:()=>ID,unwrapEvent:()=>i1,unwrapManyEvents:()=>PD,wrapEvent:()=>B5,wrapManyEvents:()=>Ci});var Di={};k0(Di,{decrypt:()=>l1,encrypt:()=>g1,getConversationKey:()=>p1,v2:()=>Oi});var m1=1,y1=4294967295,h1=65536;function p1($,Q){let J=rY.getSharedSecret($,I0("02"+Q)).subarray(1,33);return gR(z$,J,h$.encode("nip44-v2"))}function jD($,Q){let J=lR(z$,$,Q,76);return{chacha_key:J.subarray(0,32),chacha_nonce:J.subarray(32,44),hmac_key:J.subarray(44,76)}}function u1($){if(!Number.isSafeInteger($)||$<1)throw Error("expected positive integer");if($<=32)return 32;let Q=2**(Math.floor(Math.log2($-1))+1),J=Q<=256?32:Q/8;return J*(Math.floor(($-1)/J)+1)}function _i($){if(!Number.isSafeInteger($)||$<m1||$>65535)throw Error("invalid plaintext size: must be between 1 and 65535 bytes");let Q=new Uint8Array(2);return new DataView(Q.buffer).setUint16(0,$,!1),Q}function Ni($){if(!Number.isSafeInteger($)||$<h1||$>y1)throw Error("invalid plaintext size: must be between 65536 and 4294967295 bytes");let Q=new Uint8Array(4);return new DataView(Q.buffer).setUint32(0,$,!1),Q}function LD($){let Q=h$.encode($),J=Q.length;if(J<m1||J>y1)throw Error("invalid plaintext size: must be between 1 and 4294967295 bytes");let X=J>=h1?h0(new Uint8Array([0,0]),Ni(J)):_i(J),Y=new Uint8Array(u1(J)-J);return h0(X,Q,Y)}function RD($){let Q=new DataView($.buffer,$.byteOffset,$.byteLength),J=Q.getUint16(0),X,Y;if(J===0){if(X=Q.getUint32(2),X<h1)throw Error("invalid padding");Y=6}else X=J,Y=2;let G=$.subarray(Y,Y+X);if(X<m1||X>y1||G.length!==X||$.length!==Y+u1(X))throw Error("invalid padding");return g8.decode(G)}function DD($,Q,J){if(J.length!==32)throw Error("AAD associated data must be 32 bytes");let X=h0(J,Q);return HQ(z$,$,X)}function vi($){if(typeof $!=="string")throw Error("payload must be a valid string");let Q=$.length;if(Q<132)throw Error("invalid payload length: "+Q);if($[0]==="#")throw Error("unknown encryption version");let J;try{J=m$.decode($)}catch(G){throw Error("invalid base64: "+G.message)}let X=J.length;if(X<99)throw Error("invalid data length: "+X);let Y=J[0];if(Y!==2)throw Error("unknown encryption version "+Y);return{nonce:J.subarray(1,33),ciphertext:J.subarray(33,-32),mac:J.subarray(-32)}}function g1($,Q,J=W8(32)){let{chacha_key:X,chacha_nonce:Y,hmac_key:G}=jD(Q,J),W=LD($),q=U5(X,Y,W),z=DD(G,q,J);return m$.encode(h0(new Uint8Array([2]),J,q,z))}function l1($,Q){let{nonce:J,ciphertext:X,mac:Y}=vi($),{chacha_key:G,chacha_nonce:W,hmac_key:q}=jD(Q,J),z=DD(q,X,J);if(!Q7(z,Y))throw Error("invalid MAC");let K=U5(G,W,X);return RD(K)}var Oi={utils:{getConversationKey:p1,calcPaddedLen:u1,pad:LD,unpad:RD},encrypt:g1,decrypt:l1},Fi=172800,_D=()=>Math.round(Date.now()/1000),ND=()=>Math.round(_D()-Math.random()*Fi),vD=($,Q)=>p1($,Q),OD=($,Q,J)=>g1(JSON.stringify($),vD(Q,J)),iR=($,Q)=>JSON.parse(l1($.content,vD(Q,$.pubkey)));function FD($,Q){let J={created_at:_D(),content:"",tags:[],...$,pubkey:X7(Q)};return J.id=M5(J),J}function CD($,Q,J){return p$({kind:$D,content:OD($,Q,J),created_at:ND(),tags:[]},Q)}function ID($,Q){let J=Rp();return p$({kind:qD,content:OD($,J,Q),created_at:ND(),tags:[["p",Q]]},J)}function B5($,Q,J){let X=FD($,Q),Y=CD(X,Q,J);return ID(Y,J)}function Ci($,Q,J){if(!J||J.length===0)throw Error("At least one recipient is required.");let X=X7(Q),Y=[B5($,Q,X)];return J.forEach((G)=>{Y.push(B5($,Q,G))}),Y}function i1($,Q){let J=iR($,Q);return iR(J,Q)}function PD($,Q){let J=[];return $.forEach((X)=>{J.push(i1(X,Q))}),J.sort((X,Y)=>X.created_at-Y.created_at),J}function Ii($,Q,J,X){let Y={created_at:Math.ceil(Date.now()/1000),kind:QD,tags:[],content:Q};if((Array.isArray($)?$:[$]).forEach(({publicKey:W,relayUrl:q})=>{Y.tags.push(q?["p",W,q]:["p",W])}),X)Y.tags.push(["e",X.eventId,X.relayUrl||"","reply"]);if(J)Y.tags.push(["subject",J]);return Y}function TD($,Q,J,X,Y){let G=Ii(Q,J,X,Y);return B5(G,$,Q.publicKey)}function Pi($,Q,J,X,Y){if(!Q||Q.length===0)throw Error("At least one recipient is required.");return[{publicKey:X7($)},...Q].map((W)=>TD($,W,J,X,Y))}var Ti=i1,Ai=PD,Ei={};k0(Ei,{finishRepostEvent:()=>ki,getRepostedEvent:()=>ci,getRepostedEventPointer:()=>AD});function ki($,Q,J,X){let Y,G=[...$.tags??[],["e",Q.id,J],["p",Q.pubkey]];if(Q.kind===eR)Y=A1;else Y=k1,G.push(["k",String(Q.kind)]);return p$({kind:Y,tags:G,content:$.content===""||Q.tags?.find((W)=>W[0]==="-")?"":JSON.stringify(Q),created_at:$.created_at},X)}function AD($){if(![A1,k1].includes($.kind))return;let Q,J;for(let X=$.tags.length-1;X>=0&&(Q===void 0||J===void 0);X--){let Y=$.tags[X];if(Y.length>=2){if(Y[0]==="e"&&Q===void 0)Q=Y;else if(Y[0]==="p"&&J===void 0)J=Y}}if(Q===void 0)return;return{id:Q[1],relays:[Q[2],J?.[2]].filter((X)=>typeof X==="string"),author:J?.[1]}}function ci($,{skipVerification:Q}={}){let J=AD($);if(J===void 0||$.content==="")return;let X;try{X=JSON.parse($.content)}catch(Y){return}if(X.id!==J.id)return;if(!Q&&!Y7(X))return;return X}var Si={};k0(Si,{NOSTR_URI_REGEX:()=>n1,parse:()=>fi,test:()=>bi});var n1=new RegExp(`nostr:(${MD.source})`);function bi($){return typeof $==="string"&&new RegExp(`^${n1.source}$`).test($)}function fi($){let Q=$.match(new RegExp(`^${n1.source}$`));if(!Q)throw Error(`Invalid Nostr URI: ${$}`);return{uri:Q[0],value:Q[1],decoded:L5(Q[1])}}var mi={};k0(mi,{parse:()=>hi});function nR($){if(!$)return;return/^\d+$/.test($)?parseInt($,10):$}function ED($,Q){let J=$.indexOf(":"),X=$.indexOf(":",J+1);if(J===-1||X===-1)return;let Y=parseInt($.slice(0,J),10);if(Number.isNaN(Y))return;let G=$.slice(J+1,X);if(!w$(G))return;return{kind:Y,pubkey:G,identifier:$.slice(X+1),relays:Q?[Q]:[]}}function dR($){switch($[0]){case"E":case"e":if(!$[1]||!w$($[1]))return;return{id:$[1],relays:$[2]?[$[2]]:[],author:$[3]&&w$($[3])?$[3]:void 0};case"A":case"a":if(!$[1])return;return ED($[1],$[2]);case"I":case"i":if(!$[1])return;return{value:$[1],hint:$[2]}}}function yi($){if(!$[1])return;if($[1].includes(":"))return ED($[1],$[2]);if(!w$($[1]))return;return{id:$[1],relays:$[2]?[$[2]]:[],author:$[3]&&w$($[3])?$[3]:void 0}}function aR($){return $.findLast((Q)=>Q.tagName==="A"||Q.tagName==="a")?.pointer||$.findLast((Q)=>Q.tagName==="I"||Q.tagName==="i")?.pointer||$.findLast((Q)=>Q.tagName==="E"||Q.tagName==="e")?.pointer}function _1($,Q){if(!$||!("id"in $)||!$.author)return;let J=Q.find((X)=>X.pubkey===$.author);if(!J||!J.relays)return;if(!$.relays)$.relays=[];J.relays.forEach((X)=>{if($.relays.indexOf(X)===-1)$.relays.push(X)}),J.relays=$.relays}function hi($){let Q={root:void 0,rootKind:void 0,reply:void 0,replyKind:void 0,mentions:[],quotes:[],profiles:[]},J=[],X=[];for(let Y of $.tags){if((Y[0]==="E"||Y[0]==="A"||Y[0]==="I")&&Y[1]){let G=dR(Y);if(G)J.push({tagName:Y[0],pointer:G});continue}if((Y[0]==="e"||Y[0]==="a"||Y[0]==="i")&&Y[1]){let G=dR(Y);if(G)X.push({tagName:Y[0],pointer:G});continue}if(Y[0]==="K"){Q.rootKind=nR(Y[1]);continue}if(Y[0]==="k"){Q.replyKind=nR(Y[1]);continue}if(Y[0]==="q"){let G=yi(Y);if(G)Q.quotes.push(G);continue}if((Y[0]==="P"||Y[0]==="p")&&Y[1]&&w$(Y[1]))Q.profiles.push({pubkey:Y[1],relays:Y[2]?[Y[2]]:[]})}return Q.root=aR(J),Q.reply=aR(X),_1(Q.root,Q.profiles),_1(Q.reply,Q.profiles),Q.quotes.forEach((Y)=>_1(Y,Q.profiles)),Q}var pi={};k0(pi,{finishReactionEvent:()=>ui,getReactedEventPointer:()=>gi});function ui($,Q,J){let X=Q.tags.filter((Y)=>Y.length>=2&&(Y[0]==="e"||Y[0]==="p"));return p$({...$,kind:E1,tags:[...$.tags??[],...X,["e",Q.id],["p",Q.pubkey]],content:$.content??"+"},J)}function gi($){if($.kind!==E1)return;let Q,J;for(let X=$.tags.length-1;X>=0&&(Q===void 0||J===void 0);X--){let Y=$.tags[X];if(Y.length>=2){if(Y[0]==="e"&&Q===void 0)Q=Y;else if(Y[0]==="p"&&J===void 0)J=Y}}if(Q===void 0||J===void 0)return;return{id:Q[1],relays:[Q[2],J[2]].filter((X)=>X!==void 0),author:J[1]}}var li={};k0(li,{parse:()=>ni});var N1=/\W/m,oR=/[^\w\/] |[^\w\/]$|$|,| /m,ii=42;function*ni($){let Q=[];if(typeof $!=="string"){for(let G=0;G<$.tags.length;G++){let W=$.tags[G];if(W[0]==="emoji"&&W.length>=3)Q.push({type:"emoji",shortcode:W[1],url:W[2]})}$=$.content}let J=$.length,X=0,Y=0;$:while(Y<J){let G=$.indexOf(":",Y),W=$.indexOf("#",Y);if(G===-1&&W===-1)break $;if(G===-1||W>=0&&W<G){if(W===0||$[W-1].match(N1)){let q=$.slice(W+1,W+ii).match(N1),z=q?W+1+q.index:J;yield{type:"text",text:$.slice(X,W)},yield{type:"hashtag",value:$.slice(W+1,z)},Y=z,X=Y;continue $}Y=W+1;continue $}if($.slice(G-5,G)==="nostr"){let q=$.slice(G+60).match(N1),z=q?G+60+q.index:J;try{let K,{data:V,type:U}=L5($.slice(G+1,z));switch(U){case"npub":K={pubkey:V};break;case"note":K={id:V};break;case"nsec":Y=z+1;continue;default:K=V}if(X!==G-5)yield{type:"text",text:$.slice(X,G-5)};yield{type:"reference",pointer:K},Y=z,X=Y;continue $}catch(K){Y=G+1;continue $}}else if($.slice(G-5,G)==="https"||$.slice(G-4,G)==="http"){let q=$.slice(G+4).match(oR),z=q?G+4+q.index:J,K=$[G-1]==="s"?5:4;try{let V=new URL($.slice(G-K,z));if(V.hostname.indexOf(".")===-1)throw Error("invalid url");if(X!==G-K)yield{type:"text",text:$.slice(X,G-K)};if(/\.(png|jpe?g|gif|webp|heic|svg)$/i.test(V.pathname)){yield{type:"image",url:V.toString()},Y=z,X=Y;continue $}if(/\.(mp4|avi|webm|mkv|mov)$/i.test(V.pathname)){yield{type:"video",url:V.toString()},Y=z,X=Y;continue $}if(/\.(mp3|aac|ogg|opus|wav|flac)$/i.test(V.pathname)){yield{type:"audio",url:V.toString()},Y=z,X=Y;continue $}yield{type:"url",url:V.toString()},Y=z,X=Y;continue $}catch(V){Y=z+1;continue $}}else if($.slice(G-3,G)==="wss"||$.slice(G-2,G)==="ws"){let q=$.slice(G+4).match(oR),z=q?G+4+q.index:J,K=$[G-1]==="s"?3:2;try{let V=new URL($.slice(G-K,z));if(V.hostname.indexOf(".")===-1)throw Error("invalid ws url");if(X!==G-K)yield{type:"text",text:$.slice(X,G-K)};yield{type:"relay",url:V.toString()},Y=z,X=Y;continue $}catch(V){Y=z+1;continue $}}else{for(let q=0;q<Q.length;q++){let z=Q[q];if($[G+z.shortcode.length+1]===":"&&$.slice(G+1,G+z.shortcode.length+1)===z.shortcode){if(X!==G)yield{type:"text",text:$.slice(X,G)};yield z,Y=G+z.shortcode.length+2,X=Y;continue $}}Y=G+1;continue $}}if(X!==J)yield{type:"text",text:$.slice(X)}}var di={};k0(di,{channelCreateEvent:()=>ai,channelHideMessageEvent:()=>ri,channelMessageEvent:()=>si,channelMetadataEvent:()=>oi,channelMuteUserEvent:()=>ti});var ai=($,Q)=>{let J;if(typeof $.content==="object")J=JSON.stringify($.content);else if(typeof $.content==="string")J=$.content;else return;return p$({kind:JD,tags:[...$.tags??[]],content:J,created_at:$.created_at},Q)},oi=($,Q)=>{let J;if(typeof $.content==="object")J=JSON.stringify($.content);else if(typeof $.content==="string")J=$.content;else return;return p$({kind:XD,tags:[["e",$.channel_create_event_id],...$.tags??[]],content:J,created_at:$.created_at},Q)},si=($,Q)=>{let J=[["e",$.channel_create_event_id,$.relay_url,"root"]];if($.reply_to_channel_message_event_id)J.push(["e",$.reply_to_channel_message_event_id,$.relay_url,"reply"]);return p$({kind:YD,tags:[...J,...$.tags??[]],content:$.content,created_at:$.created_at},Q)},ri=($,Q)=>{let J;if(typeof $.content==="object")J=JSON.stringify($.content);else if(typeof $.content==="string")J=$.content;else return;return p$({kind:GD,tags:[["e",$.channel_message_event_id],...$.tags??[]],content:J,created_at:$.created_at},Q)},ti=($,Q)=>{let J;if(typeof $.content==="object")J=JSON.stringify($.content);else if(typeof $.content==="string")J=$.content;else return;return p$({kind:WD,tags:[["p",$.pubkey_to_mute],...$.tags??[]],content:J,created_at:$.created_at},Q)},ei={};k0(ei,{EMOJI_SHORTCODE_REGEX:()=>kD,matchAll:()=>$n,regex:()=>d1,replaceAll:()=>Qn});var kD=/:(\w+):/,d1=()=>new RegExp(`\\B${kD.source}\\B`,"g");function*$n($){let Q=$.matchAll(d1());for(let J of Q)try{let[X,Y]=J;yield{shortcode:X,name:Y,start:J.index,end:J.index+X.length}}catch(X){}}function Qn($,Q){return $.replaceAll(d1(),(J,X)=>{return Q({shortcode:J,name:X})})}var Jn={};k0(Jn,{useFetchImplementation:()=>Xn,validateGithub:()=>Yn});var a1;try{a1=fetch}catch{}function Xn($){a1=$}async function Yn($,Q,J){try{return await(await a1(`https://gist.github.com/${Q}/${J}/raw`)).text()===`Verifying that I control the following Nostr public key: ${$}`}catch(X){return!1}}var Gn={};k0(Gn,{makeNwcRequestEvent:()=>qn,parseConnectionString:()=>Wn});function Wn($){let{host:Q,pathname:J,searchParams:X}=new URL($),Y=J||Q,G=X.getAll("relay"),W=X.get("secret");if(!Y||G.length===0||!W)throw Error("invalid connection string");return{pubkey:Y,relay:G[0],relays:G,secret:W}}async function qn($,Q,J){let Y=HD(Q,$,JSON.stringify({method:"pay_invoice",params:{invoice:J}})),G={kind:VD,created_at:Math.round(Date.now()/1000),content:Y,tags:[["p",$]]};return p$(G,Q)}var zn={};k0(zn,{normalizeIdentifier:()=>Vn});function Vn($){return $=$.trim().toLowerCase(),$=$.normalize("NFKC"),Array.from($).map((Q)=>{if(/\p{Letter}/u.test(Q)||/\p{Number}/u.test(Q))return Q;return"-"}).join("")}var Kn={};k0(Kn,{getSatoshisAmountFromBolt11:()=>Zn,getZapEndpoint:()=>xn,makeZapReceipt:()=>Bn,makeZapRequest:()=>Mn,useFetchImplementation:()=>Un,validateZapRequest:()=>Hn});var o1;try{o1=fetch}catch{}function Un($){o1=$}async function xn($){try{let Q="",{lud06:J,lud16:X}=JSON.parse($.content);if(X){let[W,q]=X.split("@");Q=new URL(`/.well-known/lnurlp/${W}`,`https://${q}`).toString()}else if(J){let{words:W}=wQ.decode(J,1000),q=wQ.fromWords(W);Q=g8.decode(q)}else return null;let G=await(await o1(Q)).json();if(G.allowsNostr&&G.nostrPubkey)return G.callback}catch(Q){}return null}function Mn($){let Q={kind:9734,created_at:Math.round(Date.now()/1000),content:$.comment||"",tags:[["p","pubkey"in $?$.pubkey:$.event.pubkey],["amount",$.amount.toString()],["relays",...$.relays]]};if("event"in $){if(Q.tags.push(["e",$.event.id]),P1($.event.kind)){let J=["a",`${$.event.kind}:${$.event.pubkey}:`];Q.tags.push(J)}else if(T1($.event.kind)){let J=$.event.tags.find(([Y,G])=>Y==="d"&&G);if(!J)throw Error("d tag not found or is empty");let X=["a",`${$.event.kind}:${$.event.pubkey}:${J[1]}`];Q.tags.push(X)}Q.tags.push(["k",$.event.kind.toString()])}return Q}function Hn($){let Q;try{Q=JSON.parse($)}catch(G){return"Invalid zap request JSON."}if(!I1(Q))return"Zap request is not a valid Nostr event.";if(!Y7(Q))return"Invalid signature on zap request.";let J=Q.tags.find(([G,W])=>G==="p"&&W);if(!J)return"Zap request doesn't have a 'p' tag.";if(!w$(J[1]))return"Zap request 'p' tag is not valid hex.";let X=Q.tags.find(([G,W])=>G==="e"&&W);if(X&&!w$(X[1]))return"Zap request 'e' tag is not valid hex.";if(!Q.tags.find(([G,W])=>G==="relays"&&W))return"Zap request doesn't have a 'relays' tag.";return null}function Bn({zapRequest:$,preimage:Q,bolt11:J,paidAt:X}){let Y=JSON.parse($),G=Y.tags.filter(([q])=>q==="e"||q==="p"||q==="a"),W={kind:9735,created_at:Math.round(X.getTime()/1000),content:"",tags:[...G,["P",Y.pubkey],["bolt11",J],["description",$]]};if(Q)W.tags.push(["preimage",Q]);return W}function Zn($){if($.length<50)return 0;$=$.substring(0,50);let Q=$.lastIndexOf("1");if(Q===-1)return 0;let J=$.substring(0,Q);if(!J.startsWith("lnbc"))return 0;let X=J.substring(4);if(X.length<1)return 0;let Y=X[X.length-1],G=Y.charCodeAt(0)-48,W=G>=0&&G<=9,q=X.length-1;if(W)q++;if(q<1)return 0;let z=parseInt(X.substring(0,q));switch(Y){case"m":return z*1e5;case"u":return z*100;case"n":return z/10;case"p":return z/1e4;default:return z*1e8}}var wn={};k0(wn,{Negentropy:()=>SD,NegentropyStorageVector:()=>Rn,NegentropySync:()=>Dn});var v1=97,OX=32,cD=16,GJ={Skip:0,Fingerprint:1,IdList:2},u8=class{_raw;length;constructor($){if(typeof $==="number")this._raw=new Uint8Array($),this.length=0;else if($ instanceof Uint8Array)this._raw=new Uint8Array($),this.length=$.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($){if($ instanceof u8)$=$.unwrap();if(typeof $.length!=="number")throw Error("bad length");let Q=$.length+this.length;if(this.capacity<Q){let J=this._raw,X=Math.max(this.capacity*2,Q);this._raw=new Uint8Array(X),this._raw.set(J)}this._raw.set($,this.length),this.length+=$.length}shift(){let $=this._raw[0];return this._raw=this._raw.subarray(1),this.length--,$}shiftN($=1){let Q=this._raw.subarray(0,$);return this._raw=this._raw.subarray($),this.length-=$,Q}};function x5($){let Q=0;while(!0){if($.length===0)throw Error("parse ends prematurely");let J=$.shift();if(Q=Q<<7|J&127,(J&128)===0)break}return Q}function p8($){if($===0)return new u8(new Uint8Array([0]));let Q=[];while($!==0)Q.push($&127),$>>>=7;Q.reverse();for(let J=0;J<Q.length-1;J++)Q[J]|=128;return new u8(new Uint8Array(Q))}function jn($){return H5($,1)[0]}function H5($,Q){if($.length<Q)throw Error("parse ends prematurely");return $.shiftN(Q)}var Ln=class{buf;constructor(){this.setToZero()}setToZero(){this.buf=new Uint8Array(OX)}add($){let Q=0,J=0,X=new DataView(this.buf.buffer),Y=new DataView($.buffer);for(let G=0;G<8;G++){let W=G*4,q=X.getUint32(W,!0),z=Y.getUint32(W,!0),K=q;if(K+=Q,K+=z,K>4294967295)J=1;X.setUint32(W,K&4294967295,!0),Q=J,J=0}}negate(){let $=new DataView(this.buf.buffer);for(let J=0;J<8;J++){let X=J*4;$.setUint32(X,~$.getUint32(X,!0))}let Q=new Uint8Array(OX);Q[0]=1,this.add(Q)}getFingerprint($){let Q=new u8;return Q.extend(this.buf),Q.extend(p8($)),z$(Q.unwrap()).subarray(0,cD)}},Rn=class{items;sealed;constructor(){this.items=[],this.sealed=!1}insert($,Q){if(this.sealed)throw Error("already sealed");let J=I0(Q);if(J.byteLength!==OX)throw Error("bad id size for added item");this.items.push({timestamp:$,id:J})}seal(){if(this.sealed)throw Error("already sealed");this.sealed=!0,this.items.sort(O1);for(let $=1;$<this.items.length;$++)if(O1(this.items[$-1],this.items[$])===0)throw Error("duplicate item inserted")}unseal(){this.sealed=!1}size(){return this._checkSealed(),this.items.length}getItem($){if(this._checkSealed(),$>=this.items.length)throw Error("out of range");return this.items[$]}iterate($,Q,J){this._checkSealed(),this._checkBounds($,Q);for(let X=$;X<Q;++X)if(!J(this.items[X],X))break}findLowerBound($,Q,J){return this._checkSealed(),this._checkBounds($,Q),this._binarySearch(this.items,$,Q,(X)=>O1(X,J)<0)}fingerprint($,Q){let J=new Ln;return J.setToZero(),this.iterate($,Q,(X)=>{return J.add(X.id),!0}),J.getFingerprint(Q-$)}_checkSealed(){if(!this.sealed)throw Error("not sealed")}_checkBounds($,Q){if($>Q||Q>this.items.length)throw Error("bad range")}_binarySearch($,Q,J,X){let Y=J-Q;while(Y>0){let G=Q,W=Math.floor(Y/2);if(G+=W,X($[G]))Q=++G,Y-=W+1;else Y=W}return Q}},SD=class{storage;frameSizeLimit;lastTimestampIn;lastTimestampOut;constructor($,Q=60000){if(Q<4096)throw Error("frameSizeLimit too small");this.storage=$,this.frameSizeLimit=Q,this.lastTimestampIn=0,this.lastTimestampOut=0}_bound($,Q){return{timestamp:$,id:Q||new Uint8Array(0)}}initiate(){let $=new u8;return $.extend(new Uint8Array([v1])),this.splitRange(0,this.storage.size(),this._bound(Number.MAX_VALUE),$),F0($.unwrap())}reconcile($,Q,J){let X=new u8(I0($));this.lastTimestampIn=this.lastTimestampOut=0;let Y=new u8;Y.extend(new Uint8Array([v1]));let G=jn(X);if(G<96||G>111)throw Error("invalid negentropy protocol version byte");if(G!==v1)throw Error("unsupported negentropy protocol version requested: "+(G-96));let W=this.storage.size(),q=this._bound(0),z=0,K=!1;while(X.length!==0){let V=new u8,U=()=>{if(K)K=!1,V.extend(this.encodeBound(q)),V.extend(p8(GJ.Skip))},x=this.decodeBound(X),M=x5(X),H=z,w=this.storage.findLowerBound(z,W,x);if(M===GJ.Skip)K=!0;else if(M===GJ.Fingerprint){let j=H5(X,cD),Z=this.storage.fingerprint(H,w);if(bD(j,Z)!==0)U(),this.splitRange(H,w,x,V);else K=!0}else if(M===GJ.IdList){let j=x5(X),Z={};for(let L=0;L<j;L++){let D=H5(X,OX);Z[F0(D)]=D}if(K=!0,this.storage.iterate(H,w,(L)=>{let D=L.id,F=F0(D);if(!Z[F])Q?.(F);else delete Z[F0(D)];return!0}),J)for(let L of Object.values(Z))J(F0(L))}else throw Error("unexpected mode");if(this.exceededFrameSizeLimit(Y.length+V.length)){let j=this.storage.fingerprint(w,W);Y.extend(this.encodeBound(this._bound(Number.MAX_VALUE))),Y.extend(p8(GJ.Fingerprint)),Y.extend(j);break}else Y.extend(V);z=w,q=x}return Y.length===1?null:F0(Y.unwrap())}splitRange($,Q,J,X){let Y=Q-$,G=16;if(Y<G*2)X.extend(this.encodeBound(J)),X.extend(p8(GJ.IdList)),X.extend(p8(Y)),this.storage.iterate($,Q,(W)=>{return X.extend(W.id),!0});else{let W=Math.floor(Y/G),q=Y%G,z=$;for(let K=0;K<G;K++){let V=W+(K<q?1:0),U=this.storage.fingerprint(z,z+V);z+=V;let x;if(z===Q)x=J;else{let M,H;this.storage.iterate(z-1,z+1,(w,j)=>{if(j===z-1)M=w;else H=w;return!0}),x=this.getMinimalBound(M,H)}X.extend(this.encodeBound(x)),X.extend(p8(GJ.Fingerprint)),X.extend(U)}}}exceededFrameSizeLimit($){return $>this.frameSizeLimit-200}decodeTimestampIn($){let Q=x5($);if(Q=Q===0?Number.MAX_VALUE:Q-1,this.lastTimestampIn===Number.MAX_VALUE||Q===Number.MAX_VALUE)return this.lastTimestampIn=Number.MAX_VALUE,Number.MAX_VALUE;return Q+=this.lastTimestampIn,this.lastTimestampIn=Q,Q}decodeBound($){let Q=this.decodeTimestampIn($),J=x5($);if(J>OX)throw Error("bound key too long");let X=H5($,J);return{timestamp:Q,id:X}}encodeTimestampOut($){if($===Number.MAX_VALUE)return this.lastTimestampOut=Number.MAX_VALUE,p8(0);let Q=$;return $-=this.lastTimestampOut,this.lastTimestampOut=Q,p8($+1)}encodeBound($){let Q=new u8;return Q.extend(this.encodeTimestampOut($.timestamp)),Q.extend(p8($.id.length)),Q.extend($.id),Q}getMinimalBound($,Q){if(Q.timestamp!==$.timestamp)return this._bound(Q.timestamp);else{let J=0,X=Q.id,Y=$.id;for(let G=0;G<OX;G++){if(X[G]!==Y[G])break;J++}return this._bound(Q.timestamp,Q.id.subarray(0,J+1))}}};function bD($,Q){for(let J=0;J<$.byteLength;J++){if($[J]<Q[J])return-1;if($[J]>Q[J])return 1}if($.byteLength>Q.byteLength)return 1;if($.byteLength<Q.byteLength)return-1;return 0}function O1($,Q){if($.timestamp===Q.timestamp)return bD($.id,Q.id);return $.timestamp-Q.timestamp}var Dn=class{relay;storage;neg;filter;subscription;onhave;onneed;constructor($,Q,J,X={}){this.relay=$,this.storage=Q,this.neg=new SD(Q),this.onhave=X.onhave,this.onneed=X.onneed,this.filter=J,this.subscription=this.relay.prepareSubscription([{}],{label:X.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 G=this.neg.reconcile(Y[2],this.onhave,this.onneed);if(G)this.relay.send(`["NEG-MSG", "${this.subscription.id}", "${G}"]`);else this.close(),X.onclose?.()}catch(G){console.error("negentropy reconcile error:",G),X?.onclose?.(`reconcile error: ${G}`)}break}case"NEG-CLOSE":{let G=Y[2];console.warn("negentropy error:",G),X.onclose?.(G);break}case"NEG-ERR":X.onclose?.()}}}async start(){let $=this.neg.initiate();this.relay.send(`["NEG-OPEN","${this.subscription.id}",${JSON.stringify(this.filter)},"${$}"]`)}close(){this.relay.send(`["NEG-CLOSE","${this.subscription.id}"]`),this.subscription.close()}},_n={};k0(_n,{getToken:()=>Nn,hashPayload:()=>s1,unpackEventFromToken:()=>mD,validateEvent:()=>lD,validateEventKind:()=>hD,validateEventMethodTag:()=>uD,validateEventPayloadTag:()=>gD,validateEventTimestamp:()=>yD,validateEventUrlTag:()=>pD,validateToken:()=>vn});var fD="Nostr ";async function Nn($,Q,J,X=!1,Y){let G={kind:c1,tags:[["u",$],["method",Q]],created_at:Math.round(new Date().getTime()/1000),content:""};if(Y)G.tags.push(["payload",s1(Y)]);let W=await J(G);return(X?fD:"")+m$.encode(h$.encode(JSON.stringify(W)))}async function vn($,Q,J){let X=await mD($).catch((G)=>{throw G});return await lD(X,Q,J).catch((G)=>{throw G})}async function mD($){if(!$)throw Error("Missing token");$=$.replace(fD,"");let Q=g8.decode(m$.decode($));if(!Q||Q.length===0||!Q.startsWith("{"))throw Error("Invalid token");return JSON.parse(Q)}function yD($){if(!$.created_at)return!1;return Math.round(new Date().getTime()/1000)-$.created_at<60}function hD($){return $.kind===c1}function pD($,Q){let J=$.tags.find((X)=>X[0]==="u");if(!J)return!1;return J.length>0&&J[1]===Q}function uD($,Q){let J=$.tags.find((X)=>X[0]==="method");if(!J)return!1;return J.length>0&&J[1].toLowerCase()===Q.toLowerCase()}function s1($){let Q=z$(h$.encode(JSON.stringify($)));return F0(Q)}function gD($,Q){let J=$.tags.find((Y)=>Y[0]==="payload");if(!J)return!1;let X=s1(Q);return J.length>0&&J[1]===X}async function lD($,Q,J,X){if(!Y7($))throw Error("Invalid nostr event, signature invalid");if(!hD($))throw Error("Invalid nostr event, kind invalid");if(!yD($))throw Error("Invalid nostr event, created_at timestamp invalid");if(!pD($,Q))throw Error("Invalid nostr event, url tag invalid");if(!uD($,J))throw Error("Invalid nostr event, method tag invalid");if(Boolean(X)&&typeof X==="object"&&Object.keys(X).length>0){if(!gD($,X))throw Error("Invalid nostr event, payload tag does not match request body hash")}return!0}function Cn($){let Q=$.trim().toLowerCase().replace(/^0x/,"");if(!/^[0-9a-f]{64}$/.test(Q))throw Error("expected 64-char hex private key");let J=new Uint8Array(32);for(let X=0;X<32;X++)J[X]=parseInt(Q.slice(X*2,X*2+2),16);return J}function G7($){let Q=($??"").trim();if(!Q)throw Error("BUZZ_PRIVATE_KEY is empty");let J;if(Q.startsWith("nsec")){let Y=j5.decode(Q);if(Y.type!=="nsec")throw Error("BUZZ_PRIVATE_KEY is not an nsec");J=Y.data}else J=Cn(Q);let X=X7(J);return{secretKey:J,pubkeyHex:X,npub:j5.npubEncode(X)}}function l8($,Q){return p$($,Q.secretKey)}function iD($){return On("sha256").update($).digest("hex")}function nD(){return Fn()}var In=["/fig","@figura"];function dD($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function aD($){return $.replace(/^[\s:,\-—]+/,"").trim()}function oD($,Q={}){let J=($??"").trim();if(!J)return null;let X=Q.triggers??In,Y=null;for(let G of X){let q=new RegExp(`(?:^|\\s)${dD(G)}\\b`,"i").exec(J);if(q){let z=q.index+q[0].length-G.length;if(!Y||z<Y.index)Y={index:z,end:q.index+q[0].length,via:"trigger"}}}if(Q.agentNpub){let W=new RegExp(`(?:nostr:)?${dD(Q.agentNpub)}`,"i").exec(J);if(W&&(!Y||W.index<Y.index))Y={index:W.index,end:W.index+W[0].length,via:"npub"}}if(Y){let G=aD(J.slice(Y.end));if(G)return{brief:G,via:Y.via};return null}if(Q.mentioned){let G=aD(J);if(G)return{brief:G,via:"mention"}}return null}function Pn($){return $.replace(/^fig\s+/i,"").trim()}function sD($){let Q=($??"").trim();if(!Q)return null;let J=/^(?:fig\s+this\s+and\s+file\s+it|file\s+(?:it|this)\s+and\s+fig(?:\s+it)?)\s*:?\s*(.+)$/is.exec(Q);if(J){let G=J[1].trim();if(G)return{kind:"fig-and-file",description:G}}let X=/^file\s+(?:an?\s+)?issue\s*:?\s*(.+)$/is.exec(Q);if(X){let G=X[1].trim();if(G)return{kind:"file-issue",title:G}}let Y=/^(?:fig\s+)?issue\s+#?(\d+)\b/i.exec(Q);if(Y)return{kind:"fig-issue",issue:Number(Y[1])};return{kind:"fig",brief:Pn(Q)||Q}}var rD=typeof process<"u"&&process.env?.FIGURA_APP_URL?.replace(/\/+$/,"")||"https://figura.so";function tD($,Q=rD){return`${(Q||rD).replace(/\/+$/,"")}/f/${$}`}function N5($){let J=[$.title?`Here's your fig: **${$.title}**`:"Here's your fig"];if($.note)J.push($.note);return J.push(""),J.push($.link),J.join(`
|
|
574
|
+
`)}function FX($){return`Sorry — I couldn't make that fig. ${$}`}function v5($){return`Filed ${typeof $.number==="number"?`issue #${$.number}`:"the issue"}: **${$.title}**
|
|
533
575
|
|
|
534
|
-
${
|
|
576
|
+
${$.url}`}function r1($){return`Figura mock for this issue: ${$}`}function eD($,Q){return`From issue #${$}: ${Q}`}function $_($){let Q=[`Design a screen for this issue: ${$.title}`],J=($.body??"").trim();if(J)Q.push(J.length>2000?`${J.slice(0,2000)}…`:J);if($.labels&&$.labels.length)Q.push(`Labels: ${$.labels.join(", ")}`);return Q.join(`
|
|
535
577
|
|
|
536
|
-
`)}class
|
|
578
|
+
`)}class t1 extends Error{input;constructor($,Q){super($);this.input=Q}}function Tn($){return $.tags.find((Q)=>Q[0]==="h")?.[1]??null}function An($,Q){return $.tags.some((J)=>J[0]==="p"&&(J[1]??"").toLowerCase()===Q)}async function Q_($,Q){let J=Q.log??(()=>{});if($.pubkey.toLowerCase()===Q.identity.pubkeyHex.toLowerCase())return{action:"skip",reason:"self"};let X=Tn($),Y=async(V)=>{let U={channelId:X??"",content:V,replyTo:$.id,mentions:[$.pubkey]},x=X?await Q.postReply(U):{ok:!1};if(!x||x.ok!==!0)throw new t1("the relay did not accept the reply",U)},G=Q.pendingReplies.get($.id);if(G){let V=await Q.postReply(G.input);if(V&&V.ok===!0)return Q.pendingReplies.delete($.id),J("delivered cached reply on redelivery (no re-run)"),G.outcome;return{action:"delivery-failed",reason:"the relay did not accept the reply"}}if(Q.seen.has($.id))return{action:"skip",reason:"duplicate"};let W=oD($.content,{triggers:Q.triggers,agentNpub:Q.identity.npub,mentioned:An($,Q.identity.pubkeyHex)});if(!W)return{action:"skip",reason:"no-trigger"};if(!X)return{action:"skip",reason:"no-channel"};let q=sD(W.brief);if(!q)return{action:"skip",reason:"empty-brief"};Q.seen.add($.id),J(`request in ${X} via ${W.via}: ${q.kind}`);let z=!1,K=async(V,U)=>{try{return await Y(V),U}catch(x){if(!(x instanceof t1))throw x;if(z)Q.pendingReplies.set($.id,{input:x.input,outcome:U}),J("reply delivery failed — cached for independent retry (no re-run)");else Q.seen.delete($.id),J("reply delivery failed before any side effect — un-claimed for reprocess");return{action:"delivery-failed",reason:x.message}}};try{switch(q.kind){case"fig":{let V=await Q.generate(q.brief);return z=!0,await K(N5({link:V.url??"(link unavailable)",title:V.title,note:q.brief}),{action:"replied",via:W.via,kind:q.kind,link:V.url})}case"fig-issue":{if(!Q.tracker||!Q.tracker.supportsNumericFetch)return await K(FX("no numeric issue tracker is configured — set FIGURA_ISSUE_TRACKER=github with GITHUB_REPO/GITHUB_TOKEN."),{action:"error-replied",reason:"no-numeric-tracker"});let V=await Q.tracker.fetchIssue(q.issue),U=await Q.generate($_(V),{issue:q.issue});if(z=!0,U.url)await Q.tracker.commentIssue({number:q.issue,url:V.url},r1(U.url)).catch((x)=>J(`issue back-link failed: ${String(x)}`));return await K(N5({link:U.url??"(link unavailable)",title:U.title,note:eD(q.issue,V.title)}),{action:"replied",via:W.via,kind:q.kind,link:U.url})}case"file-issue":{if(!Q.tracker)return await K(FX("no issue tracker is configured (FIGURA_ISSUE_TRACKER)."),{action:"error-replied",reason:"no-tracker"});let V=await Q.tracker.createIssue({title:q.title,body:q.title});return z=!0,await K(v5({url:V.url,title:q.title,number:V.number}),{action:"filed",issue:V.url})}case"fig-and-file":{if(!Q.tracker)return await K(FX("no issue tracker is configured (FIGURA_ISSUE_TRACKER)."),{action:"error-replied",reason:"no-tracker"});let V=await Q.tracker.createIssue({title:q.description,body:q.description});z=!0;let U;try{U=await Q.generate(q.description,{issue:V.number})}catch(M){let H=M instanceof Error?M.message:String(M);return J(`fig-and-file generation failed after filing ${V.url}: ${H}`),await K(`${v5({url:V.url,title:q.description,number:V.number})}
|
|
537
579
|
|
|
538
|
-
${
|
|
580
|
+
${FX(H)}`,{action:"error-replied",reason:H})}if(U.url)await Q.tracker.commentIssue(V,r1(U.url)).catch((M)=>J(`issue back-link failed: ${String(M)}`));let x=`${v5({url:V.url,title:q.description,number:V.number})}
|
|
539
581
|
|
|
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(
|
|
542
|
-
`))}get startedCount(){return this.running.length}start(){this.log(`[supervisor] starting ${this.bindings.length} binding(s)`);for(let
|
|
582
|
+
${N5({link:U.url??"(link unavailable)",title:U.title})}`;return await K(x,{action:"replied",via:W.via,kind:q.kind,link:U.url})}}}catch(V){let U=V instanceof Error?V.message:String(V);return J(`request failed: ${U}`),await K(FX(U),{action:"error-replied",reason:U})}}class e1{pending;opts;max;base;schedule;cancel;attempts=new Map;timers=new Map;active=new Set;constructor($,Q){this.pending=$;this.opts=Q;this.max=Q.maxAttempts??6,this.base=Q.baseDelayMs??1000,this.schedule=Q.schedule??((J,X)=>setTimeout(J,X)),this.cancel=Q.cancel??((J)=>clearTimeout(J))}log($){this.opts.log?.($)}get inFlight(){return this.active.size}start($){if(this.active.has($))return;if(!this.pending.has($))return;this.active.add($),this.arm($)}arm($){let Q=this.attempts.get($)??0,J=this.base*2**Q,X=this.schedule(()=>{this.timers.delete($),this.tick($)},J);this.timers.set($,X)}finish($){this.active.delete($),this.attempts.delete($);let Q=this.timers.get($);if(Q!==void 0)this.cancel(Q),this.timers.delete($)}async tick($){let Q=this.pending.get($);if(!Q){this.finish($);return}let J=(this.attempts.get($)??0)+1;this.attempts.set($,J);let X=!1;try{X=(await this.opts.postReply(Q.input))?.ok===!0}catch{X=!1}if(X){this.pending.delete($),this.finish($),this.log(`delivered pending reply for ${$} on retry ${J}`);return}if(J>=this.max){this.pending.delete($),this.finish($),this.log(`giving up on pending reply for ${$} after ${J} attempts`);return}this.arm($)}stop(){for(let $ of this.timers.values())this.cancel($);this.timers.clear(),this.attempts.clear(),this.active.clear()}}function J_($){let Q=[["h",$.channelId]];if($.replyTo)Q.push(["e",$.replyTo,"","reply"]);let J=new Set;for(let X of $.mentions??[]){let Y=X.toLowerCase();if(J.has(Y))continue;J.add(Y),Q.push(["p",Y])}return{kind:9,content:$.content,tags:Q,created_at:$.createdAt??Math.floor(Date.now()/1000)}}function X_($){let Q=[["u",$.url],["method",$.method],["nonce",$.nonce]];if($.payloadSha256)Q.push(["payload",$.payloadSha256]);return{kind:27235,content:"",tags:Q,created_at:$.createdAt??Math.floor(Date.now()/1000)}}function Y_($){let Q=[["relay",$.relayUrl],["challenge",$.challenge]];if($.authTag)Q.push($.authTag);return{kind:22242,content:"",tags:Q,created_at:$.createdAt??Math.floor(Date.now()/1000)}}var G_=/^[0-9a-f]{64}$/i,En=/^[0-9a-f]{128}$/i,kn=b.object({id:b.string().regex(G_,"id must be 64-char hex"),pubkey:b.string().regex(G_,"pubkey must be 64-char hex"),sig:b.string().regex(En,"sig must be 128-char hex"),kind:b.number().int(),created_at:b.number().int(),tags:b.array(b.array(b.string())),content:b.string()});function W_($){let Q=kn.safeParse($);return Q.success?Q.data:null}function $V($){return $.replace(/^https:\/\//,"wss://").replace(/^http:\/\//,"ws://")}function cn($){return $.replace(/^wss:\/\//,"https://").replace(/^ws:\/\//,"http://")}function q_($){return cn($).replace(/\/+$/,"")}var Sn=($)=>{try{return Y7($)}catch{return!1}};async function bn(){let $=globalThis;if($.WebSocket)return $.WebSocket;return(await import("ws")).default}var z_="figura-buzz-agent",fn=60,mn=1e4;class QV{opts;socket=null;closed=!1;since;reconnectAttempt=0;reconnectTimer=null;stabilityTimer=null;authEventId=null;authed=!1;verify;channelSet;constructor($){this.opts=$;this.since=$.since??Math.floor(Date.now()/1000),this.verify=$.verifyEvent??Sn,this.channelSet=new Set($.channels)}channelAllowed($){if(this.channelSet.size===0)return!0;let Q=$.tags.filter((J)=>J[0]==="h").map((J)=>J[1]);if(Q.length!==1||!this.channelSet.has(Q[0]))return this.status(`dropped event referencing a non-allowlisted channel (h=${JSON.stringify(Q)})`),!1;return!0}get cursor(){return this.since}ingest($){this.handleMessage($)}start(){this.connect().catch(($)=>this.status(`connect failed: ${String($)}`))}close(){if(this.closed=!0,this.reconnectTimer)clearTimeout(this.reconnectTimer);this.clearStability();try{this.socket?.close()}catch{}}get backoffAttempt(){return this.reconnectAttempt}status($){this.opts.onStatus?.($)}async connect(){if(this.closed)return;let $=$V(this.opts.relayUrl),Q;try{Q=await bn()}catch(X){this.status(`no WebSocket implementation: ${String(X)}`);return}this.authed=!1,this.authEventId=null;let J;try{J=new Q($)}catch(X){this.status(`failed to open ${$}: ${String(X)}`),this.scheduleReconnect();return}this.socket=J,J.onopen=()=>{this.status(`connected to ${$}`),this.armStability(),this.sendReq()},J.onmessage=(X)=>this.handleMessage(this.decode(X.data)),J.onerror=(X)=>this.status(`socket error: ${String(X)}`),J.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()},mn)}clearStability(){if(this.stabilityTimer)clearTimeout(this.stabilityTimer),this.stabilityTimer=null}decode($){if(typeof $==="string")return $;if($ instanceof Uint8Array)return new TextDecoder().decode($);return String($)}send($){try{this.socket?.send(JSON.stringify($))}catch(Q){this.status(`send failed: ${String(Q)}`)}}sendReq(){let $={kinds:[9],since:this.since};if(this.opts.channels.length>0)$["#h"]=this.opts.channels;this.send(["REQ",z_,$])}handleMessage($){let Q;try{Q=JSON.parse($)}catch{return}if(!Array.isArray(Q)||typeof Q[0]!=="string")return;switch(Q[0]){case"AUTH":if(typeof Q[1]==="string")this.respondToAuth(Q[1]);break;case"OK":if(Q[1]===this.authEventId&&Q[2]===!0&&!this.authed)this.authed=!0,this.status("authenticated (NIP-42)"),this.markUsable(),this.sendReq();break;case"EOSE":if(Q[1]===z_)this.markUsable();break;case"EVENT":{let X=W_(Q[2]);if(!X){this.status("dropped malformed event");break}if(!this.verify(X)){this.status(`dropped event with invalid signature (pubkey ${X.pubkey.slice(0,12)}…)`);break}if(X.kind===9&&this.channelAllowed(X)){if(X.created_at<this.since){this.status("dropped replayed event at/below the resume cursor");break}let Y=Math.floor(Date.now()/1000)+fn;if(X.created_at<=Y)this.since=X.created_at;this.opts.onEvent(X)}break}case"CLOSED":this.status(`subscription closed: ${String(Q[2]??"")}`);break;case"NOTICE":this.status(`relay notice: ${String(Q[1]??"")}`);break;default:break}}respondToAuth($){let Q=Y_({challenge:$,relayUrl:$V(this.opts.relayUrl)}),J=l8(Q,this.opts.identity);this.authEventId=J.id,this.send(["AUTH",J])}scheduleReconnect(){if(this.closed)return;if(this.reconnectTimer)clearTimeout(this.reconnectTimer);this.reconnectAttempt+=1;let $=Math.min(30000,500*2**(this.reconnectAttempt-1)),Q=Math.floor(Math.random()*250);this.reconnectTimer=setTimeout(()=>void this.connect(),$+Q)}}function yn($){let Q=globalThis;if(Q.Buffer)return Q.Buffer.from($).toString("base64");let J="";for(let X of $)J+=String.fromCharCode(X);return btoa(J)}function V_($){return`Nostr ${yn(new TextEncoder().encode($))}`}function hn($,Q,J,X){let Y=X_({method:Q,url:J,nonce:nD(),payloadSha256:X?iD(X):void 0}),G=l8(Y,$);return V_(JSON.stringify(G))}async function O5($,Q,J,X={}){let Y=X.fetchImpl??fetch,G=`${q_($)}/events`,W=JSON.stringify(J),q={ok:!1,status:0,body:""};for(let z=0;z<2;z++){let K=hn(Q,"POST",G,W),V;try{V=await Y(G,{method:"POST",headers:{Authorization:K,"Content-Type":"application/json"},body:W})}catch(x){q={ok:!1,status:0,body:x instanceof Error?x.message:String(x)};continue}let U=await V.text().catch(()=>"");if(q={ok:V.ok,status:V.status,body:U},V.ok)return q;if(V.status!==429&&V.status<500)return q}return q}v$();var pn=b.object({id:b.string(),publicId:b.string().nullish(),url:b.string().nullish(),title:b.string().optional(),slug:b.string().optional(),isPublic:b.boolean().optional()});async function K_($){let Q={prompt:$.prompt,publish:!0};if($.device)Q.device=$.device;if($.platform)Q.platform=$.platform;if(typeof $.issue==="number")Q.issue=$.issue;let J=await z0("/v1/figs/generate",{method:"POST",body:Q,token:$.token,apiUrl:$.apiUrl,source:"buzz-agent"}),X=pn.safeParse(J);if(!X.success)throw Error("unexpected response from the Figura engine (fig generation).");let Y=X.data,G=Y.publicId??null,W=Y.url??(G?tD(G,$.appOrigin):null);return{id:Y.id,publicId:G,url:W,title:Y.title||Y.slug||"Untitled fig"}}var un=b.object({number:b.number().int(),title:b.string().default(""),body:b.string().nullish(),html_url:b.string().optional(),state:b.string().optional(),labels:b.array(b.union([b.string(),b.object({name:b.string().optional()})])).optional()}),gn=b.object({number:b.number().int(),html_url:b.string().optional()}),JV="https://api.github.com";function XV($){return{Authorization:`Bearer ${$}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28","User-Agent":"figura-buzz-agent"}}function YV($,Q){return`https://github.com/${$}/issues/${Q}`}function U_($,Q,J){return{method:"GET",url:`${JV}/repos/${$}/issues/${Q}`,headers:XV(J)}}function x_($,Q,J){let X={title:J.title};if(J.body)X.body=J.body;if(J.labels&&J.labels.length)X.labels=J.labels;return{method:"POST",url:`${JV}/repos/${$}/issues`,headers:{...XV(Q),"Content-Type":"application/json"},body:JSON.stringify(X)}}function M_($,Q,J,X){return{method:"POST",url:`${JV}/repos/${$}/issues/${Q}/comments`,headers:{...XV(J),"Content-Type":"application/json"},body:JSON.stringify({body:X})}}function H_($){let Q=un.safeParse($);if(!Q.success)throw Error(`unexpected GitHub issue response: ${Q.error.issues.map((Y)=>`${Y.path.join(".")||"(root)"} ${Y.message}`).join("; ")}`);let J=Q.data,X=(J.labels??[]).map((Y)=>typeof Y==="string"?Y:Y.name??"").filter((Y)=>Boolean(Y));return{number:J.number,title:J.title,body:J.body??"",labels:X,url:J.html_url??YV("",J.number),state:J.state}}function B_($){let Q=gn.safeParse($);if(!Q.success)throw Error(`unexpected GitHub create response: ${Q.error.issues.map((J)=>`${J.path.join(".")||"(root)"} ${J.message}`).join("; ")}`);return Q.data}function Z_($){return/^[^/\s]+\/[^/\s]+$/.test($)}function w_($,Q){return`30617:${$}:${Q}`}function j_($){let Q=$.subject.trim();if(!Q)throw Error("issue subject must not be empty");let J=[["a",w_($.ownerHex,$.repoId)],["p",$.ownerHex]];for(let X of $.recipients??[])J.push(["p",X]);J.push(["subject",Q]);for(let X of $.labels??[])J.push(["t",X]);return{kind:1621,content:$.content,tags:J,created_at:$.createdAt??Math.floor(Date.now()/1000)}}function L_($){return{kind:1622,content:$.content,tags:[["a",w_($.ownerHex,$.repoId)],["e",$.issueId,"","root"],["p",$.ownerHex]],created_at:$.createdAt??Math.floor(Date.now()/1000)}}async function GV($,Q){let J=await Q($.url,{method:$.method,headers:$.headers,body:$.body}),X=await J.text().catch(()=>"");if(!J.ok){let Y=J.headers.get("x-ratelimit-remaining");if((J.status===403||J.status===429)&&Y==="0"){let G=J.headers.get("x-ratelimit-reset"),W=G?` (resets at ${new Date(Number(G)*1000).toISOString()})`:"";throw Error(`GitHub rate limit hit${W} — try again shortly.`)}throw Error(`GitHub ${$.method} → ${J.status}: ${X.slice(0,200)}`)}try{return X?JSON.parse(X):{}}catch{throw Error(`GitHub returned a non-JSON ${J.status} body: ${X.slice(0,120)}`)}}class WV{cfg;kind="github";supportsNumericFetch=!0;fetchImpl;constructor($){this.cfg=$;if(!$.token)throw Error("GITHUB_TOKEN is required for the github issue tracker");if(!Z_($.repo))throw Error(`GITHUB_REPO must be owner/repo (got: ${$.repo})`);this.fetchImpl=$.fetchImpl??fetch}async fetchIssue($){let Q=await GV(U_(this.cfg.repo,$,this.cfg.token),this.fetchImpl);return H_(Q)}async createIssue($){let Q=B_(await GV(x_(this.cfg.repo,this.cfg.token,$),this.fetchImpl));return{number:Q.number,url:Q.html_url??YV(this.cfg.repo,Q.number),title:$.title}}async commentIssue($,Q){if(typeof $.number!=="number")return;await GV(M_(this.cfg.repo,$.number,this.cfg.token,Q),this.fetchImpl)}}class qV{cfg;kind="buzz";supportsNumericFetch=!1;submit;constructor($){this.cfg=$;if(!/^[0-9a-f]{64}$/i.test($.ownerHex))throw Error("BUZZ_REPO_OWNER must be a 64-char hex pubkey");if(!$.repoId)throw Error("BUZZ_REPO_ID is required for the buzz issue tracker");this.submit=$.submit??O5}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($){let Q=j_({ownerHex:this.cfg.ownerHex,repoId:this.cfg.repoId,subject:$.title,content:$.body??"",labels:$.labels}),J=l8(Q,this.cfg.identity),X=await this.submit(this.cfg.relayUrl,this.cfg.identity,J);if(!X.ok)throw Error(`relay rejected issue event: ${X.status} ${X.body.slice(0,200)}`);return{eventId:J.id,url:`nostr:${J.id}`,title:$.title}}async commentIssue($,Q){if(!$.eventId)return;let J=L_({ownerHex:this.cfg.ownerHex,repoId:this.cfg.repoId,issueId:$.eventId,content:Q}),X=l8(J,this.cfg.identity),Y=await this.submit(this.cfg.relayUrl,this.cfg.identity,X);if(!Y.ok)throw Error(`relay rejected issue comment: ${Y.status} ${Y.body.slice(0,200)}`)}}var ln=b.object({label:b.string().optional(),relayUrl:b.string(),privateKey:b.string(),figuraToken:b.string(),apiUrl:b.string().optional(),channels:b.array(b.string()),triggers:b.array(b.string()).optional(),device:b.string().optional(),platform:b.string().optional(),appOrigin:b.string().optional(),issueTracker:b.enum(["github","buzz"]).optional(),github:b.object({token:b.string(),repo:b.string()}).optional(),buzzRepo:b.object({ownerHex:b.string(),repoId:b.string()}).optional()});function nn($,Q){if($.issueTracker==="github"&&$.github)return new WV({token:$.github.token,repo:$.github.repo});if($.issueTracker==="buzz"&&$.buzzRepo)return new qV({relayUrl:$.relayUrl,identity:Q,ownerHex:$.buzzRepo.ownerHex,repoId:$.buzzRepo.repoId});return null}class zV{identity;tracker;seen=new Set;pendingReplies=new Map;deliveryQueue;watcher=null;queue=Promise.resolve();config;constructor($){this.config=ln.parse($),this.identity=G7(this.config.privateKey),this.tracker=nn(this.config,this.identity),this.deliveryQueue=new e1(this.pendingReplies,{postReply:(Q)=>this.postReply(Q),log:(Q)=>this.log(Q)})}get npub(){return this.identity.npub}log($){process.stderr.write(`[${this.config.label??"buzz-agent"}] ${$}
|
|
583
|
+
`)}postReply($){let Q=J_({channelId:$.channelId,content:$.content,replyTo:$.replyTo,mentions:$.mentions}),J=l8(Q,this.identity);return O5(this.config.relayUrl,this.identity,J)}deps(){return{identity:{pubkeyHex:this.identity.pubkeyHex,npub:this.identity.npub},triggers:this.config.triggers,tracker:this.tracker,generate:($,Q)=>K_({token:this.config.figuraToken,apiUrl:this.config.apiUrl,prompt:$,device:this.config.device,platform:this.config.platform,appOrigin:this.config.appOrigin,issue:Q?.issue}),postReply:($)=>this.postReply($),seen:this.seen,pendingReplies:this.pendingReplies,log:($)=>this.log($)}}start(){let $=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 QV({relayUrl:this.config.relayUrl,identity:this.identity,channels:this.config.channels,onStatus:(Q)=>this.log(Q),onEvent:(Q)=>{this.queue=this.queue.then(()=>Q_(Q,$)).then((J)=>{if(J.action==="delivery-failed"&&this.pendingReplies.has(Q.id))this.deliveryQueue.start(Q.id)}).catch((J)=>this.log(`handler error: ${String(J)}`))}}),this.watcher.start()}stop(){this.deliveryQueue.stop(),this.watcher?.close()}}function dn($){let Q={label:rQ($),relayUrl:$.relayUrl,privateKey:$.privateKey,figuraToken:$.figuraToken,apiUrl:$.apiUrl,channels:$.channels,appOrigin:$.appOrigin,device:$.device,platform:$.platform,issueTracker:$.tracker?.kind};if($.triggers&&$.triggers.length)Q.triggers=$.triggers;if($.tracker?.kind==="github")Q.github={token:$.tracker.token??"",repo:$.tracker.repo??""};if($.tracker?.kind==="buzz")Q.buzzRepo={ownerHex:$.tracker.ownerHex??"",repoId:$.tracker.repoId??""};return Q}class VV{bindings;agentFactory;log;running=[];constructor($,Q={}){this.bindings=$;this.agentFactory=Q.agentFactory??((J)=>new zV(dn(J))),this.log=Q.log??((J)=>process.stderr.write(`${J}
|
|
584
|
+
`))}get startedCount(){return this.running.length}start(){this.log(`[supervisor] starting ${this.bindings.length} binding(s)`);for(let $ of this.bindings){let Q=rQ($);try{let J=this.agentFactory($);J.start(),this.running.push({label:Q,agent:J})}catch(J){this.log(`[${Q}] failed to start: ${J instanceof Error?J.message:String(J)}`)}}this.log(`[supervisor] ${this.running.length}/${this.bindings.length} binding(s) running`)}stop(){for(let{label:$,agent:Q}of this.running)try{Q.stop()}catch(J){this.log(`[${$}] error on stop: ${J instanceof Error?J.message:String(J)}`)}this.running.length=0}}var on=`figura buzz — run a Figura agent inside one or more Buzz communities
|
|
543
585
|
|
|
544
586
|
Usage:
|
|
545
587
|
figura buzz agent [options] Connect + watch channels, fig on request
|
|
@@ -582,14 +624,14 @@ Trigger grammar (in a watched channel):
|
|
|
582
624
|
@figura file issue: <title> File a new tracker issue.
|
|
583
625
|
@figura fig this and file it: <desc>
|
|
584
626
|
File an issue AND fig it, cross-linked.
|
|
585
|
-
`;function
|
|
627
|
+
`;function R_($,Q){let J=[];for(let X=0;X<$.length;X++)if($[X]===`--${Q}`&&$[X+1])J.push($[X+1]);return J}function D_($){return($??"").split(",").map((Q)=>Q.trim()).filter(Boolean)}async function __($){let{flags:Q}=Q0($),J=h(Q,"config"),X=process.env.BUZZ_AGENTS_JSON;if(J&&X)I("both --config and BUZZ_AGENTS_JSON are set — pass exactly one bindings source.");if(J){let Y;try{Y=await an(J,"utf8")}catch(G){I(`could not read --config ${J}: ${G instanceof Error?G.message:String(G)}`)}return{raw:Y,source:`--config ${J}`}}if(X)return{raw:X,source:"BUZZ_AGENTS_JSON"};return null}function sn($){let{flags:Q}=Q0($);return Boolean(process.env.BUZZ_RELAY_URL||process.env.BUZZ_PRIVATE_KEY||process.env.BUZZ_CHANNELS||h(Q,"relay")||h(Q,"key"))}async function rn($){let{flags:Q}=Q0($),J=h(Q,"relay")||process.env.BUZZ_RELAY_URL||"";if(!J)I("BUZZ_RELAY_URL (or --relay) is required.");let X=h(Q,"key")||process.env.BUZZ_PRIVATE_KEY||"";if(!X)I("BUZZ_PRIVATE_KEY (or --key) is required.");let Y=await s0({tokenFlag:h(Q,"token"),apiUrlFlag:h(Q,"api-url")}),G=Y.token;if(!G)I("FIGURA_TOKEN (or --token / `figura login`) is required — it binds figs to the team brand.");let W=[...R_($,"channel"),...D_(process.env.BUZZ_CHANNELS)],q=R_($,"trigger"),z=q.length?q:D_(process.env.BUZZ_TRIGGERS),K=(process.env.FIGURA_ISSUE_TRACKER||"").trim().toLowerCase();if(K&&K!=="github"&&K!=="buzz")I(`FIGURA_ISSUE_TRACKER must be "github" or "buzz" (got: ${process.env.FIGURA_ISSUE_TRACKER}).`);let V=process.env.GITHUB_REPO,U=process.env.GITHUB_TOKEN,x=process.env.BUZZ_REPO_OWNER,M=process.env.BUZZ_REPO_ID,H,w=K==="github"||K==="buzz"?K:V?"github":x&&M?"buzz":void 0;if(w==="github")H={kind:"github",token:U??"",repo:V??""};else if(w==="buzz")H={kind:"buzz",ownerHex:x??"",repoId:M??""};let j={relayUrl:J,privateKey:X,figuraToken:G,channels:W};if(z.length)j.triggers=z;if(Y.apiUrl)j.apiUrl=Y.apiUrl;if(process.env.FIGURA_APP_URL)j.appOrigin=process.env.FIGURA_APP_URL;let Z=h(Q,"device")||process.env.BUZZ_FIG_DEVICE;if(Z)j.device=Z;let L=h(Q,"platform")||process.env.BUZZ_FIG_PLATFORM;if(L)j.platform=L;if(H)j.tracker=H;let D=BL(j);if(D.length)I(`invalid configuration (check the BUZZ_*/FIGURA_*/GITHUB_* env + flags):
|
|
586
628
|
${D.join(`
|
|
587
|
-
`)}`);return
|
|
588
|
-
`)})}return[await
|
|
629
|
+
`)}`);return j}async function tn($){let Q=await __($);if(Q){if(sn($))I(`a bindings config (${Q.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 Tz(Q.raw,{source:Q.source,onWarn:(J)=>process.stderr.write(`[supervisor] warning: ${J}
|
|
630
|
+
`)})}return[await rn($)]}async function en($){let Q=await tn($),J=new VV(Q);J.start();let X=()=>{process.stderr.write(`
|
|
589
631
|
[supervisor] shutting down
|
|
590
|
-
`),
|
|
591
|
-
`)}return}let
|
|
592
|
-
`)}async function
|
|
632
|
+
`),J.stop(),process.exit(0)};process.on("SIGINT",X),process.on("SIGTERM",X),await new Promise(()=>{})}async function $d($){let Q=await __($);if(Q){let X=Tz(Q.raw,Q.source);for(let Y of X){let G=G7(Y.privateKey);process.stdout.write(`${rQ(Y)} ${G.npub}
|
|
633
|
+
`)}return}let J=process.env.BUZZ_PRIVATE_KEY;if(!J)I("BUZZ_PRIVATE_KEY is required to derive the agent npub.");process.stdout.write(`${G7(J).npub}
|
|
634
|
+
`)}async function N_($){let Q=$[0],J=$.slice(1);if(!Q||Q==="--help"||Q==="-h"||Q==="help"){process.stdout.write(on);return}switch(Q){case"agent":return en(J);case"whoami":return $d(J);default:I(`unknown buzz subcommand '${Q}'. Run \`figura buzz --help\`.`)}}n7();N$();r0();FJ();var Qd=a$(),Jd=new Set(["upgrade","update","doctor","hook","mcp"]),Xd=`figura — command-line client for the Figura visualization SaaS
|
|
593
635
|
|
|
594
636
|
Usage:
|
|
595
637
|
figura <command> [options]
|
|
@@ -614,6 +656,8 @@ Commands:
|
|
|
614
656
|
install Set up the full Claude Code integration in one command
|
|
615
657
|
(skill + update hook + status badge; --uninstall reverses)
|
|
616
658
|
skill install Install the /fig skill into Claude Code (~/.claude/skills)
|
|
659
|
+
skill diff Show what your installed /fig skill has that the canonical
|
|
660
|
+
one does not (read-only)
|
|
617
661
|
mcp Run the Figura MCP server (claude mcp add figura -- figura mcp)
|
|
618
662
|
buzz agent Run a Figura agent in a Buzz community (figs on request)
|
|
619
663
|
doctor Check the CLI, MCP, and skills are up to date
|
|
@@ -627,8 +671,8 @@ Global options:
|
|
|
627
671
|
--help, -h Show help
|
|
628
672
|
--version, -v Show version
|
|
629
673
|
|
|
630
|
-
Run \`figura <command> --help\` for command-specific help.`;async function
|
|
631
|
-
`);return}if(
|
|
632
|
-
`);return}if(!
|
|
633
|
-
`),process.exit(1)}}
|
|
674
|
+
Run \`figura <command> --help\` for command-specific help.`;async function Yd(){let $=process.argv.slice(2),Q=$[0],J=$.slice(1);if(!Q||Q==="help"||Q==="--help"||Q==="-h"){process.stdout.write(Xd+`
|
|
675
|
+
`);return}if(Q==="--version"||Q==="-v"||Q==="version"){process.stdout.write(Qd+`
|
|
676
|
+
`);return}if(!Jd.has(Q)){let{apiUrl:X}=await s0({apiUrlFlag:h(Q0(J).flags,"api-url")});await Lx($,X)}switch(Q){case"login":return vz(J);case"link":return vz([...J,"--project"]);case"whoami":return vj(J);case"brand":return Fj(J);case"teams":return Cj(J);case"fig":return pj(J);case"comment":return uj(J);case"token":return gj(J);case"sources":return ij(J);case"install":return Nj(J);case"skill":return Vj(J);case"mcp":return nj(J);case"buzz":return N_(J);case"doctor":return rj(J);case"hook":return Bj(J);case"statusline":return jj(J);case"upgrade":case"update":return dj(J);default:process.stderr.write(`figura: unknown command '${Q}'. Run \`figura --help\`.
|
|
677
|
+
`),process.exit(1)}}Yd().catch(($)=>{process.stderr.write(`figura: ${a($)}
|
|
634
678
|
`),process.exit(1)});
|