@volter/twin-sentry 0.1.17 → 0.1.19

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.
@@ -243,7 +243,7 @@ You might need to use a local HTTP server (instead of file://): https://react.de
243
243
  `)}}),Yn=$$(($)=>{var I=$;I.der=oN(),I.pem=Gn()}),oJ=$$(($)=>{var I=$;I.bignum=su(),I.define=eu().define,I.base=cJ(),I.constants=dN(),I.decoders=Xn(),I.encoders=Yn()}),Jn=$$(($,I)=>{var G=oJ(),Z=G.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),_=G.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),J=G.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),Y=G.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(J),this.key("subjectPublicKey").bitstr())}),W=G.define("RelativeDistinguishedName",function(){this.setof(_)}),R=G.define("RDNSequence",function(){this.seqof(W)}),M=G.define("Name",function(){this.choice({rdnSequence:this.use(R)})}),E=G.define("Validity",function(){this.seq().obj(this.key("notBefore").use(Z),this.key("notAfter").use(Z))}),T=G.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),S=G.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(J),this.key("issuer").use(M),this.key("validity").use(E),this.key("subject").use(M),this.key("subjectPublicKeyInfo").use(Y),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(T).optional())}),N=G.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(S),this.key("signatureAlgorithm").use(J),this.key("signatureValue").bitstr())});I.exports=N}),Qn=$$(($)=>{var I=oJ();$.certificate=Jn();var G=I.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});$.RSAPrivateKey=G;var Z=I.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});$.RSAPublicKey=Z;var _=I.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),J=I.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(_),this.key("subjectPublicKey").bitstr())});$.PublicKey=J;var Y=I.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(_),this.key("subjectPrivateKey").octstr())});$.PrivateKey=Y;var W=I.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});$.EncryptedPrivateKey=W;var R=I.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});$.DSAPrivateKey=R,$.DSAparam=I.define("DSAparam",function(){this.int()});var M=I.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),E=I.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(M),this.key("publicKey").optional().explicit(1).bitstr())});$.ECPrivateKey=E,$.signature=I.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})}),zn=$$(($,I)=>{I.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}}),Zn=$$(($,I)=>{var G=oU().Buffer,Z=w4().Transform,_=B6();function J(M){Z.call(this),this._block=G.allocUnsafe(M),this._blockSize=M,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}_(J,Z),J.prototype._transform=function(M,E,T){var S=null;try{this.update(M,E)}catch(N){S=N}T(S)},J.prototype._flush=function(M){var E=null;try{this.push(this.digest())}catch(T){E=T}M(E)};var Y=typeof Uint8Array<"u",W=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(G.prototype instanceof Uint8Array||G.TYPED_ARRAY_SUPPORT);function R(M,E){if(M instanceof G)return M;if(typeof M==="string")return G.from(M,E);if(W&&ArrayBuffer.isView(M)){if(M.byteLength===0)return G.alloc(0);var T=G.from(M.buffer,M.byteOffset,M.byteLength);if(T.byteLength===M.byteLength)return T}if(Y&&M instanceof Uint8Array)return G.from(M);if(G.isBuffer(M)&&M.constructor&&typeof M.constructor.isBuffer==="function"&&M.constructor.isBuffer(M))return G.from(M);throw TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}J.prototype.update=function(M,E){if(this._finalized)throw Error("Digest already called");M=R(M,E);var T=this._block,S=0;while(this._blockOffset+M.length-S>=this._blockSize){for(var N=this._blockOffset;N<this._blockSize;)T[N++]=M[S++];this._update(),this._blockOffset=0}while(S<M.length)T[this._blockOffset++]=M[S++];for(var B=0,x=M.length*8;x>0;++B)if(this._length[B]+=x,x=this._length[B]/4294967296|0,x>0)this._length[B]-=4294967296*x;return this},J.prototype._update=function(){throw Error("_update is not implemented")},J.prototype.digest=function(M){if(this._finalized)throw Error("Digest already called");this._finalized=!0;var E=this._digest();if(M!==void 0)E=E.toString(M);this._block.fill(0),this._blockOffset=0;for(var T=0;T<4;++T)this._length[T]=0;return E},J.prototype._digest=function(){throw Error("_digest is not implemented")},I.exports=J}),On=$$(($,I)=>{var G=B6(),Z=Zn(),_=oU().Buffer,J=Array(16);function Y(){Z.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}G(Y,Z),Y.prototype._update=function(){var S=J;for(var N=0;N<16;++N)S[N]=this._block.readInt32LE(N*4);var B=this._a,x=this._b,w=this._c,y=this._d;B=R(B,x,w,y,S[0],3614090360,7),y=R(y,B,x,w,S[1],3905402710,12),w=R(w,y,B,x,S[2],606105819,17),x=R(x,w,y,B,S[3],3250441966,22),B=R(B,x,w,y,S[4],4118548399,7),y=R(y,B,x,w,S[5],1200080426,12),w=R(w,y,B,x,S[6],2821735955,17),x=R(x,w,y,B,S[7],4249261313,22),B=R(B,x,w,y,S[8],1770035416,7),y=R(y,B,x,w,S[9],2336552879,12),w=R(w,y,B,x,S[10],4294925233,17),x=R(x,w,y,B,S[11],2304563134,22),B=R(B,x,w,y,S[12],1804603682,7),y=R(y,B,x,w,S[13],4254626195,12),w=R(w,y,B,x,S[14],2792965006,17),x=R(x,w,y,B,S[15],1236535329,22),B=M(B,x,w,y,S[1],4129170786,5),y=M(y,B,x,w,S[6],3225465664,9),w=M(w,y,B,x,S[11],643717713,14),x=M(x,w,y,B,S[0],3921069994,20),B=M(B,x,w,y,S[5],3593408605,5),y=M(y,B,x,w,S[10],38016083,9),w=M(w,y,B,x,S[15],3634488961,14),x=M(x,w,y,B,S[4],3889429448,20),B=M(B,x,w,y,S[9],568446438,5),y=M(y,B,x,w,S[14],3275163606,9),w=M(w,y,B,x,S[3],4107603335,14),x=M(x,w,y,B,S[8],1163531501,20),B=M(B,x,w,y,S[13],2850285829,5),y=M(y,B,x,w,S[2],4243563512,9),w=M(w,y,B,x,S[7],1735328473,14),x=M(x,w,y,B,S[12],2368359562,20),B=E(B,x,w,y,S[5],4294588738,4),y=E(y,B,x,w,S[8],2272392833,11),w=E(w,y,B,x,S[11],1839030562,16),x=E(x,w,y,B,S[14],4259657740,23),B=E(B,x,w,y,S[1],2763975236,4),y=E(y,B,x,w,S[4],1272893353,11),w=E(w,y,B,x,S[7],4139469664,16),x=E(x,w,y,B,S[10],3200236656,23),B=E(B,x,w,y,S[13],681279174,4),y=E(y,B,x,w,S[0],3936430074,11),w=E(w,y,B,x,S[3],3572445317,16),x=E(x,w,y,B,S[6],76029189,23),B=E(B,x,w,y,S[9],3654602809,4),y=E(y,B,x,w,S[12],3873151461,11),w=E(w,y,B,x,S[15],530742520,16),x=E(x,w,y,B,S[2],3299628645,23),B=T(B,x,w,y,S[0],4096336452,6),y=T(y,B,x,w,S[7],1126891415,10),w=T(w,y,B,x,S[14],2878612391,15),x=T(x,w,y,B,S[5],4237533241,21),B=T(B,x,w,y,S[12],1700485571,6),y=T(y,B,x,w,S[3],2399980690,10),w=T(w,y,B,x,S[10],4293915773,15),x=T(x,w,y,B,S[1],2240044497,21),B=T(B,x,w,y,S[8],1873313359,6),y=T(y,B,x,w,S[15],4264355552,10),w=T(w,y,B,x,S[6],2734768916,15),x=T(x,w,y,B,S[13],1309151649,21),B=T(B,x,w,y,S[4],4149444226,6),y=T(y,B,x,w,S[11],3174756917,10),w=T(w,y,B,x,S[2],718787259,15),x=T(x,w,y,B,S[9],3951481745,21),this._a=this._a+B|0,this._b=this._b+x|0,this._c=this._c+w|0,this._d=this._d+y|0},Y.prototype._digest=function(){if(this._block[this._blockOffset++]=128,this._blockOffset>56)this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0;this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var S=_.allocUnsafe(16);return S.writeInt32LE(this._a,0),S.writeInt32LE(this._b,4),S.writeInt32LE(this._c,8),S.writeInt32LE(this._d,12),S};function W(S,N){return S<<N|S>>>32-N}function R(S,N,B,x,w,y,g){return W(S+(N&B|~N&x)+w+y|0,g)+N|0}function M(S,N,B,x,w,y,g){return W(S+(N&x|B&~x)+w+y|0,g)+N|0}function E(S,N,B,x,w,y,g){return W(S+(N^B^x)+w+y|0,g)+N|0}function T(S,N,B,x,w,y,g){return W(S+(B^(N|~x))+w+y|0,g)+N|0}I.exports=Y}),Ln=$$(($,I)=>{var G=oU().Buffer,Z=On();function _(J,Y,W,R){if(!G.isBuffer(J))J=G.from(J,"binary");if(Y){if(!G.isBuffer(Y))Y=G.from(Y,"binary");if(Y.length!==8)throw RangeError("salt should be Buffer with 8 byte length")}var M=W/8,E=G.alloc(M),T=G.alloc(R||0),S=G.alloc(0);while(M>0||R>0){var N=new Z;if(N.update(S),N.update(J),Y)N.update(Y);S=N.digest();var B=0;if(M>0){var x=E.length-M;B=Math.min(M,S.length),S.copy(E,x,0,B),M-=B}if(B<S.length&&R>0){var w=T.length-R,y=Math.min(R,S.length-B);S.copy(T,w,B,B+y),R-=y}}return S.fill(0),{key:E,iv:T}}I.exports=_}),tN=$$(($)=>{var I=(d1(),V$(k6));$.createCipher=$.Cipher=I.createCipher,$.createCipheriv=$.Cipheriv=I.createCipheriv,$.createDecipher=$.Decipher=I.createDecipher,$.createDecipheriv=$.Decipheriv=I.createDecipheriv,$.listCiphers=$.getCiphers=I.getCiphers}),Dn=$$(($,I)=>{var G=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,Z=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,_=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,J=Ln(),Y=tN(),W=oU().Buffer;I.exports=function(R,M){var E=R.toString(),T=E.match(G),S;if(!T){var N=E.match(_);S=W.from(N[2].replace(/[\r\n]/g,""),"base64")}else{var B="aes"+T[1],x=W.from(T[2],"hex"),w=W.from(T[3].replace(/[\r\n]/g,""),"base64"),y=J(M,x.slice(0,8),parseInt(T[1],10)).key,g=[],b=Y.createDecipheriv(B,y,x);g.push(b.update(w)),g.push(b.final()),S=W.concat(g)}var l=E.match(Z)[1];return{tag:l,data:S}}}),rN=$$(($,I)=>{var G=Qn(),Z=zn(),_=Dn(),J=tN(),Y=hN().pbkdf2Sync,W=oU().Buffer;function R(E,T){var S=E.algorithm.decrypt.kde.kdeparams.salt,N=parseInt(E.algorithm.decrypt.kde.kdeparams.iters.toString(),10),B=Z[E.algorithm.decrypt.cipher.algo.join(".")],x=E.algorithm.decrypt.cipher.iv,w=E.subjectPrivateKey,y=parseInt(B.split("-")[1],10)/8,g=Y(T,S,N,y,"sha1"),b=J.createDecipheriv(B,g,x),l=[];return l.push(b.update(w)),l.push(b.final()),W.concat(l)}function M(E){var T;if(typeof E==="object"&&!W.isBuffer(E))T=E.passphrase,E=E.key;if(typeof E==="string")E=W.from(E);var S=_(E,T),N=S.tag,B=S.data,x,w;switch(N){case"CERTIFICATE":w=G.certificate.decode(B,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":if(!w)w=G.PublicKey.decode(B,"der");switch(x=w.algorithm.algorithm.join("."),x){case"1.2.840.113549.1.1.1":return G.RSAPublicKey.decode(w.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return w.subjectPrivateKey=w.subjectPublicKey,{type:"ec",data:w};case"1.2.840.10040.4.1":return w.algorithm.params.pub_key=G.DSAparam.decode(w.subjectPublicKey.data,"der"),{type:"dsa",data:w.algorithm.params};default:throw Error("unknown key id "+x)}case"ENCRYPTED PRIVATE KEY":B=G.EncryptedPrivateKey.decode(B,"der"),B=R(B,T);case"PRIVATE KEY":switch(w=G.PrivateKey.decode(B,"der"),x=w.algorithm.algorithm.join("."),x){case"1.2.840.113549.1.1.1":return G.RSAPrivateKey.decode(w.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:w.algorithm.curve,privateKey:G.ECPrivateKey.decode(w.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return w.algorithm.params.priv_key=G.DSAparam.decode(w.subjectPrivateKey,"der"),{type:"dsa",params:w.algorithm.params};default:throw Error("unknown key id "+x)}case"RSA PUBLIC KEY":return G.RSAPublicKey.decode(B,"der");case"RSA PRIVATE KEY":return G.RSAPrivateKey.decode(B,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:G.DSAPrivateKey.decode(B,"der")};case"EC PRIVATE KEY":return B=G.ECPrivateKey.decode(B,"der"),{curve:B.parameters.value,privateKey:B.privateKey};default:throw Error("unknown key type "+N)}}M.signature=G.signature,I.exports=M}),aN=$$(($,I)=>{var G=xZ(),Z=oU().Buffer;I.exports=function(J,Y){var W=Z.alloc(0),R=0,M;while(W.length<Y)M=_(R++),W=Z.concat([W,G("sha1").update(J).update(M).digest()]);return W.slice(0,Y)};function _(J){var Y=Z.allocUnsafe(4);return Y.writeUInt32BE(J,0),Y}}),sN=$$(($,I)=>{I.exports=function(G,Z){var _=G.length,J=-1;while(++J<_)G[J]^=Z[J];return G}}),ZW=$$(($,I)=>{(function(G,Z){function _(Q,D){if(!Q)throw Error(D||"Assertion failed")}function J(Q,D){Q.super_=D;var F=function(){};F.prototype=D.prototype,Q.prototype=new F,Q.prototype.constructor=Q}function Y(Q,D,F){if(Y.isBN(Q))return Q;if(this.negative=0,this.words=null,this.length=0,this.red=null,Q!==null){if(D==="le"||D==="be")F=D,D=10;this._init(Q||0,D||10,F||"be")}}if(typeof G==="object")G.exports=Y;else Z.BN=Y;Y.BN=Y,Y.wordSize=26;var W;try{if(typeof window<"u"&&typeof window.Buffer<"u")W=window.Buffer;else W=(u1(),V$(h1)).Buffer}catch(Q){}Y.isBN=function(Q){if(Q instanceof Y)return!0;return Q!==null&&typeof Q==="object"&&Q.constructor.wordSize===Y.wordSize&&Array.isArray(Q.words)},Y.max=function(Q,D){if(Q.cmp(D)>0)return Q;return D},Y.min=function(Q,D){if(Q.cmp(D)<0)return Q;return D},Y.prototype._init=function(Q,D,F){if(typeof Q==="number")return this._initNumber(Q,D,F);if(typeof Q==="object")return this._initArray(Q,D,F);if(D==="hex")D=16;_(D===(D|0)&&D>=2&&D<=36),Q=Q.toString().replace(/\s+/g,"");var L=0;if(Q[0]==="-")L++,this.negative=1;if(L<Q.length){if(D===16)this._parseHex(Q,L,F);else if(this._parseBase(Q,D,L),F==="le")this._initArray(this.toArray(),D,F)}},Y.prototype._initNumber=function(Q,D,F){if(Q<0)this.negative=1,Q=-Q;if(Q<67108864)this.words=[Q&67108863],this.length=1;else if(Q<4503599627370496)this.words=[Q&67108863,Q/67108864&67108863],this.length=2;else _(Q<9007199254740992),this.words=[Q&67108863,Q/67108864&67108863,1],this.length=3;if(F!=="le")return;this._initArray(this.toArray(),D,F)},Y.prototype._initArray=function(Q,D,F){if(_(typeof Q.length==="number"),Q.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Q.length/3),this.words=Array(this.length);for(var L=0;L<this.length;L++)this.words[L]=0;var H,v,q=0;if(F==="be"){for(L=Q.length-1,H=0;L>=0;L-=3)if(v=Q[L]|Q[L-1]<<8|Q[L-2]<<16,this.words[H]|=v<<q&67108863,this.words[H+1]=v>>>26-q&67108863,q+=24,q>=26)q-=26,H++}else if(F==="le"){for(L=0,H=0;L<Q.length;L+=3)if(v=Q[L]|Q[L+1]<<8|Q[L+2]<<16,this.words[H]|=v<<q&67108863,this.words[H+1]=v>>>26-q&67108863,q+=24,q>=26)q-=26,H++}return this.strip()};function R(Q,D){var F=Q.charCodeAt(D);if(F>=65&&F<=70)return F-55;else if(F>=97&&F<=102)return F-87;else return F-48&15}function M(Q,D,F){var L=R(Q,F);if(F-1>=D)L|=R(Q,F-1)<<4;return L}Y.prototype._parseHex=function(Q,D,F){this.length=Math.ceil((Q.length-D)/6),this.words=Array(this.length);for(var L=0;L<this.length;L++)this.words[L]=0;var H=0,v=0,q;if(F==="be")for(L=Q.length-1;L>=D;L-=2)if(q=M(Q,D,L)<<H,this.words[v]|=q&67108863,H>=18)H-=18,v+=1,this.words[v]|=q>>>26;else H+=8;else{var P=Q.length-D;for(L=P%2===0?D+1:D;L<Q.length;L+=2)if(q=M(Q,D,L)<<H,this.words[v]|=q&67108863,H>=18)H-=18,v+=1,this.words[v]|=q>>>26;else H+=8}this.strip()};function E(Q,D,F,L){var H=0,v=Math.min(Q.length,F);for(var q=D;q<v;q++){var P=Q.charCodeAt(q)-48;if(H*=L,P>=49)H+=P-49+10;else if(P>=17)H+=P-17+10;else H+=P}return H}Y.prototype._parseBase=function(Q,D,F){this.words=[0],this.length=1;for(var L=0,H=1;H<=67108863;H*=D)L++;L--,H=H/D|0;var v=Q.length-F,q=v%L,P=Math.min(v,v-q)+F,O=0;for(var A=F;A<P;A+=L)if(O=E(Q,A,A+L,D),this.imuln(H),this.words[0]+O<67108864)this.words[0]+=O;else this._iaddn(O);if(q!==0){var k=1;O=E(Q,A,Q.length,D);for(A=0;A<q;A++)k*=D;if(this.imuln(k),this.words[0]+O<67108864)this.words[0]+=O;else this._iaddn(O)}this.strip()},Y.prototype.copy=function(Q){Q.words=Array(this.length);for(var D=0;D<this.length;D++)Q.words[D]=this.words[D];Q.length=this.length,Q.negative=this.negative,Q.red=this.red},Y.prototype.clone=function(){var Q=new Y(null);return this.copy(Q),Q},Y.prototype._expand=function(Q){while(this.length<Q)this.words[this.length++]=0;return this},Y.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},Y.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},Y.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var T=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],S=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],N=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(Y.prototype.toString=function(Q,D){Q=Q||10,D=D|0||1;var F;if(Q===16||Q==="hex"){F="";var L=0,H=0;for(var v=0;v<this.length;v++){var q=this.words[v],P=((q<<L|H)&16777215).toString(16);if(H=q>>>24-L&16777215,L+=2,L>=26)L-=26,v--;if(H!==0||v!==this.length-1)F=T[6-P.length]+P+F;else F=P+F}if(H!==0)F=H.toString(16)+F;while(F.length%D!==0)F="0"+F;if(this.negative!==0)F="-"+F;return F}if(Q===(Q|0)&&Q>=2&&Q<=36){var O=S[Q],A=N[Q];F="";var k=this.clone();k.negative=0;while(!k.isZero()){var j=k.modn(A).toString(Q);if(k=k.idivn(A),!k.isZero())F=T[O-j.length]+j+F;else F=j+F}if(this.isZero())F="0"+F;while(F.length%D!==0)F="0"+F;if(this.negative!==0)F="-"+F;return F}_(!1,"Base should be between 2 and 36")},Y.prototype.toNumber=function(){var Q=this.words[0];if(this.length===2)Q+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)Q+=4503599627370496+this.words[1]*67108864;else if(this.length>2)_(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-Q:Q},Y.prototype.toJSON=function(){return this.toString(16)},Y.prototype.toBuffer=function(Q,D){return _(typeof W<"u"),this.toArrayLike(W,Q,D)},Y.prototype.toArray=function(Q,D){return this.toArrayLike(Array,Q,D)},Y.prototype.toArrayLike=function(Q,D,F){var L=this.byteLength(),H=F||Math.max(1,L);_(L<=H,"byte array longer than desired length"),_(H>0,"Requested array length <= 0"),this.strip();var v=D==="le",q=new Q(H),P,O,A=this.clone();if(!v){for(O=0;O<H-L;O++)q[O]=0;for(O=0;!A.isZero();O++)P=A.andln(255),A.iushrn(8),q[H-O-1]=P}else{for(O=0;!A.isZero();O++)P=A.andln(255),A.iushrn(8),q[O]=P;for(;O<H;O++)q[O]=0}return q},Math.clz32)Y.prototype._countBits=function(Q){return 32-Math.clz32(Q)};else Y.prototype._countBits=function(Q){var D=Q,F=0;if(D>=4096)F+=13,D>>>=13;if(D>=64)F+=7,D>>>=7;if(D>=8)F+=4,D>>>=4;if(D>=2)F+=2,D>>>=2;return F+D};Y.prototype._zeroBits=function(Q){if(Q===0)return 26;var D=Q,F=0;if((D&8191)===0)F+=13,D>>>=13;if((D&127)===0)F+=7,D>>>=7;if((D&15)===0)F+=4,D>>>=4;if((D&3)===0)F+=2,D>>>=2;if((D&1)===0)F++;return F},Y.prototype.bitLength=function(){var Q=this.words[this.length-1],D=this._countBits(Q);return(this.length-1)*26+D};function B(Q){var D=Array(Q.bitLength());for(var F=0;F<D.length;F++){var L=F/26|0,H=F%26;D[F]=(Q.words[L]&1<<H)>>>H}return D}Y.prototype.zeroBits=function(){if(this.isZero())return 0;var Q=0;for(var D=0;D<this.length;D++){var F=this._zeroBits(this.words[D]);if(Q+=F,F!==26)break}return Q},Y.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},Y.prototype.toTwos=function(Q){if(this.negative!==0)return this.abs().inotn(Q).iaddn(1);return this.clone()},Y.prototype.fromTwos=function(Q){if(this.testn(Q-1))return this.notn(Q).iaddn(1).ineg();return this.clone()},Y.prototype.isNeg=function(){return this.negative!==0},Y.prototype.neg=function(){return this.clone().ineg()},Y.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},Y.prototype.iuor=function(Q){while(this.length<Q.length)this.words[this.length++]=0;for(var D=0;D<Q.length;D++)this.words[D]=this.words[D]|Q.words[D];return this.strip()},Y.prototype.ior=function(Q){return _((this.negative|Q.negative)===0),this.iuor(Q)},Y.prototype.or=function(Q){if(this.length>Q.length)return this.clone().ior(Q);return Q.clone().ior(this)},Y.prototype.uor=function(Q){if(this.length>Q.length)return this.clone().iuor(Q);return Q.clone().iuor(this)},Y.prototype.iuand=function(Q){var D;if(this.length>Q.length)D=Q;else D=this;for(var F=0;F<D.length;F++)this.words[F]=this.words[F]&Q.words[F];return this.length=D.length,this.strip()},Y.prototype.iand=function(Q){return _((this.negative|Q.negative)===0),this.iuand(Q)},Y.prototype.and=function(Q){if(this.length>Q.length)return this.clone().iand(Q);return Q.clone().iand(this)},Y.prototype.uand=function(Q){if(this.length>Q.length)return this.clone().iuand(Q);return Q.clone().iuand(this)},Y.prototype.iuxor=function(Q){var D,F;if(this.length>Q.length)D=this,F=Q;else D=Q,F=this;for(var L=0;L<F.length;L++)this.words[L]=D.words[L]^F.words[L];if(this!==D)for(;L<D.length;L++)this.words[L]=D.words[L];return this.length=D.length,this.strip()},Y.prototype.ixor=function(Q){return _((this.negative|Q.negative)===0),this.iuxor(Q)},Y.prototype.xor=function(Q){if(this.length>Q.length)return this.clone().ixor(Q);return Q.clone().ixor(this)},Y.prototype.uxor=function(Q){if(this.length>Q.length)return this.clone().iuxor(Q);return Q.clone().iuxor(this)},Y.prototype.inotn=function(Q){_(typeof Q==="number"&&Q>=0);var D=Math.ceil(Q/26)|0,F=Q%26;if(this._expand(D),F>0)D--;for(var L=0;L<D;L++)this.words[L]=~this.words[L]&67108863;if(F>0)this.words[L]=~this.words[L]&67108863>>26-F;return this.strip()},Y.prototype.notn=function(Q){return this.clone().inotn(Q)},Y.prototype.setn=function(Q,D){_(typeof Q==="number"&&Q>=0);var F=Q/26|0,L=Q%26;if(this._expand(F+1),D)this.words[F]=this.words[F]|1<<L;else this.words[F]=this.words[F]&~(1<<L);return this.strip()},Y.prototype.iadd=function(Q){var D;if(this.negative!==0&&Q.negative===0)return this.negative=0,D=this.isub(Q),this.negative^=1,this._normSign();else if(this.negative===0&&Q.negative!==0)return Q.negative=0,D=this.isub(Q),Q.negative=1,D._normSign();var F,L;if(this.length>Q.length)F=this,L=Q;else F=Q,L=this;var H=0;for(var v=0;v<L.length;v++)D=(F.words[v]|0)+(L.words[v]|0)+H,this.words[v]=D&67108863,H=D>>>26;for(;H!==0&&v<F.length;v++)D=(F.words[v]|0)+H,this.words[v]=D&67108863,H=D>>>26;if(this.length=F.length,H!==0)this.words[this.length]=H,this.length++;else if(F!==this)for(;v<F.length;v++)this.words[v]=F.words[v];return this},Y.prototype.add=function(Q){var D;if(Q.negative!==0&&this.negative===0)return Q.negative=0,D=this.sub(Q),Q.negative^=1,D;else if(Q.negative===0&&this.negative!==0)return this.negative=0,D=Q.sub(this),this.negative=1,D;if(this.length>Q.length)return this.clone().iadd(Q);return Q.clone().iadd(this)},Y.prototype.isub=function(Q){if(Q.negative!==0){Q.negative=0;var D=this.iadd(Q);return Q.negative=1,D._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Q),this.negative=1,this._normSign();var F=this.cmp(Q);if(F===0)return this.negative=0,this.length=1,this.words[0]=0,this;var L,H;if(F>0)L=this,H=Q;else L=Q,H=this;var v=0;for(var q=0;q<H.length;q++)D=(L.words[q]|0)-(H.words[q]|0)+v,v=D>>26,this.words[q]=D&67108863;for(;v!==0&&q<L.length;q++)D=(L.words[q]|0)+v,v=D>>26,this.words[q]=D&67108863;if(v===0&&q<L.length&&L!==this)for(;q<L.length;q++)this.words[q]=L.words[q];if(this.length=Math.max(this.length,q),L!==this)this.negative=1;return this.strip()},Y.prototype.sub=function(Q){return this.clone().isub(Q)};function x(Q,D,F){F.negative=D.negative^Q.negative;var L=Q.length+D.length|0;F.length=L,L=L-1|0;var H=Q.words[0]|0,v=D.words[0]|0,q=H*v,P=q&67108863,O=q/67108864|0;F.words[0]=P;for(var A=1;A<L;A++){var k=O>>>26,j=O&67108863,h=Math.min(A,D.length-1);for(var a=Math.max(0,A-Q.length+1);a<=h;a++){var J0=A-a|0;H=Q.words[J0]|0,v=D.words[a]|0,q=H*v+j,k+=q/67108864|0,j=q&67108863}F.words[A]=j|0,O=k|0}if(O!==0)F.words[A]=O|0;else F.length--;return F.strip()}var w=function(Q,D,F){var L=Q.words,H=D.words,v=F.words,q=0,P,O,A,k=L[0]|0,j=k&8191,h=k>>>13,a=L[1]|0,J0=a&8191,K0=a>>>13,O0=L[2]|0,d=O0&8191,m=O0>>>13,r=L[3]|0,Y0=r&8191,W0=r>>>13,I0=L[4]|0,c=I0&8191,s=I0>>>13,S0=L[5]|0,M0=S0&8191,z0=S0>>>13,c0=L[6]|0,F0=c0&8191,q0=c0>>>13,s0=L[7]|0,k0=s0&8191,n0=s0>>>13,M$=L[8]|0,T0=M$&8191,V0=M$>>>13,X$=L[9]|0,p0=X$&8191,l0=X$>>>13,L0=H[0]|0,N0=L0&8191,B0=L0>>>13,Y$=H[1]|0,u=Y$&8191,_0=Y$>>>13,o=H[2]|0,R0=o&8191,x0=o>>>13,p=H[3]|0,A0=p&8191,v0=p>>>13,X0=H[4]|0,H0=X0&8191,C0=X0>>>13,H$=H[5]|0,d0=H$&8191,e=H$>>>13,E0=H[6]|0,b0=E0&8191,f0=E0>>>13,z$=H[7]|0,a0=z$&8191,U$=z$>>>13,c$=H[8]|0,D$=c$&8191,L$=c$>>>13,B$=H[9]|0,Z$=B$&8191,I$=B$>>>13;F.negative=Q.negative^D.negative,F.length=19,P=Math.imul(j,N0),O=Math.imul(j,B0),O=O+Math.imul(h,N0)|0,A=Math.imul(h,B0);var I1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(I1>>>26)|0,I1&=67108863,P=Math.imul(J0,N0),O=Math.imul(J0,B0),O=O+Math.imul(K0,N0)|0,A=Math.imul(K0,B0),P=P+Math.imul(j,u)|0,O=O+Math.imul(j,_0)|0,O=O+Math.imul(h,u)|0,A=A+Math.imul(h,_0)|0;var C$=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(C$>>>26)|0,C$&=67108863,P=Math.imul(d,N0),O=Math.imul(d,B0),O=O+Math.imul(m,N0)|0,A=Math.imul(m,B0),P=P+Math.imul(J0,u)|0,O=O+Math.imul(J0,_0)|0,O=O+Math.imul(K0,u)|0,A=A+Math.imul(K0,_0)|0,P=P+Math.imul(j,R0)|0,O=O+Math.imul(j,x0)|0,O=O+Math.imul(h,R0)|0,A=A+Math.imul(h,x0)|0;var g$=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(g$>>>26)|0,g$&=67108863,P=Math.imul(Y0,N0),O=Math.imul(Y0,B0),O=O+Math.imul(W0,N0)|0,A=Math.imul(W0,B0),P=P+Math.imul(d,u)|0,O=O+Math.imul(d,_0)|0,O=O+Math.imul(m,u)|0,A=A+Math.imul(m,_0)|0,P=P+Math.imul(J0,R0)|0,O=O+Math.imul(J0,x0)|0,O=O+Math.imul(K0,R0)|0,A=A+Math.imul(K0,x0)|0,P=P+Math.imul(j,A0)|0,O=O+Math.imul(j,v0)|0,O=O+Math.imul(h,A0)|0,A=A+Math.imul(h,v0)|0;var z1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(z1>>>26)|0,z1&=67108863,P=Math.imul(c,N0),O=Math.imul(c,B0),O=O+Math.imul(s,N0)|0,A=Math.imul(s,B0),P=P+Math.imul(Y0,u)|0,O=O+Math.imul(Y0,_0)|0,O=O+Math.imul(W0,u)|0,A=A+Math.imul(W0,_0)|0,P=P+Math.imul(d,R0)|0,O=O+Math.imul(d,x0)|0,O=O+Math.imul(m,R0)|0,A=A+Math.imul(m,x0)|0,P=P+Math.imul(J0,A0)|0,O=O+Math.imul(J0,v0)|0,O=O+Math.imul(K0,A0)|0,A=A+Math.imul(K0,v0)|0,P=P+Math.imul(j,H0)|0,O=O+Math.imul(j,C0)|0,O=O+Math.imul(h,H0)|0,A=A+Math.imul(h,C0)|0;var U1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(U1>>>26)|0,U1&=67108863,P=Math.imul(M0,N0),O=Math.imul(M0,B0),O=O+Math.imul(z0,N0)|0,A=Math.imul(z0,B0),P=P+Math.imul(c,u)|0,O=O+Math.imul(c,_0)|0,O=O+Math.imul(s,u)|0,A=A+Math.imul(s,_0)|0,P=P+Math.imul(Y0,R0)|0,O=O+Math.imul(Y0,x0)|0,O=O+Math.imul(W0,R0)|0,A=A+Math.imul(W0,x0)|0,P=P+Math.imul(d,A0)|0,O=O+Math.imul(d,v0)|0,O=O+Math.imul(m,A0)|0,A=A+Math.imul(m,v0)|0,P=P+Math.imul(J0,H0)|0,O=O+Math.imul(J0,C0)|0,O=O+Math.imul(K0,H0)|0,A=A+Math.imul(K0,C0)|0,P=P+Math.imul(j,d0)|0,O=O+Math.imul(j,e)|0,O=O+Math.imul(h,d0)|0,A=A+Math.imul(h,e)|0;var o1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(o1>>>26)|0,o1&=67108863,P=Math.imul(F0,N0),O=Math.imul(F0,B0),O=O+Math.imul(q0,N0)|0,A=Math.imul(q0,B0),P=P+Math.imul(M0,u)|0,O=O+Math.imul(M0,_0)|0,O=O+Math.imul(z0,u)|0,A=A+Math.imul(z0,_0)|0,P=P+Math.imul(c,R0)|0,O=O+Math.imul(c,x0)|0,O=O+Math.imul(s,R0)|0,A=A+Math.imul(s,x0)|0,P=P+Math.imul(Y0,A0)|0,O=O+Math.imul(Y0,v0)|0,O=O+Math.imul(W0,A0)|0,A=A+Math.imul(W0,v0)|0,P=P+Math.imul(d,H0)|0,O=O+Math.imul(d,C0)|0,O=O+Math.imul(m,H0)|0,A=A+Math.imul(m,C0)|0,P=P+Math.imul(J0,d0)|0,O=O+Math.imul(J0,e)|0,O=O+Math.imul(K0,d0)|0,A=A+Math.imul(K0,e)|0,P=P+Math.imul(j,b0)|0,O=O+Math.imul(j,f0)|0,O=O+Math.imul(h,b0)|0,A=A+Math.imul(h,f0)|0;var t1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(t1>>>26)|0,t1&=67108863,P=Math.imul(k0,N0),O=Math.imul(k0,B0),O=O+Math.imul(n0,N0)|0,A=Math.imul(n0,B0),P=P+Math.imul(F0,u)|0,O=O+Math.imul(F0,_0)|0,O=O+Math.imul(q0,u)|0,A=A+Math.imul(q0,_0)|0,P=P+Math.imul(M0,R0)|0,O=O+Math.imul(M0,x0)|0,O=O+Math.imul(z0,R0)|0,A=A+Math.imul(z0,x0)|0,P=P+Math.imul(c,A0)|0,O=O+Math.imul(c,v0)|0,O=O+Math.imul(s,A0)|0,A=A+Math.imul(s,v0)|0,P=P+Math.imul(Y0,H0)|0,O=O+Math.imul(Y0,C0)|0,O=O+Math.imul(W0,H0)|0,A=A+Math.imul(W0,C0)|0,P=P+Math.imul(d,d0)|0,O=O+Math.imul(d,e)|0,O=O+Math.imul(m,d0)|0,A=A+Math.imul(m,e)|0,P=P+Math.imul(J0,b0)|0,O=O+Math.imul(J0,f0)|0,O=O+Math.imul(K0,b0)|0,A=A+Math.imul(K0,f0)|0,P=P+Math.imul(j,a0)|0,O=O+Math.imul(j,U$)|0,O=O+Math.imul(h,a0)|0,A=A+Math.imul(h,U$)|0;var r1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(r1>>>26)|0,r1&=67108863,P=Math.imul(T0,N0),O=Math.imul(T0,B0),O=O+Math.imul(V0,N0)|0,A=Math.imul(V0,B0),P=P+Math.imul(k0,u)|0,O=O+Math.imul(k0,_0)|0,O=O+Math.imul(n0,u)|0,A=A+Math.imul(n0,_0)|0,P=P+Math.imul(F0,R0)|0,O=O+Math.imul(F0,x0)|0,O=O+Math.imul(q0,R0)|0,A=A+Math.imul(q0,x0)|0,P=P+Math.imul(M0,A0)|0,O=O+Math.imul(M0,v0)|0,O=O+Math.imul(z0,A0)|0,A=A+Math.imul(z0,v0)|0,P=P+Math.imul(c,H0)|0,O=O+Math.imul(c,C0)|0,O=O+Math.imul(s,H0)|0,A=A+Math.imul(s,C0)|0,P=P+Math.imul(Y0,d0)|0,O=O+Math.imul(Y0,e)|0,O=O+Math.imul(W0,d0)|0,A=A+Math.imul(W0,e)|0,P=P+Math.imul(d,b0)|0,O=O+Math.imul(d,f0)|0,O=O+Math.imul(m,b0)|0,A=A+Math.imul(m,f0)|0,P=P+Math.imul(J0,a0)|0,O=O+Math.imul(J0,U$)|0,O=O+Math.imul(K0,a0)|0,A=A+Math.imul(K0,U$)|0,P=P+Math.imul(j,D$)|0,O=O+Math.imul(j,L$)|0,O=O+Math.imul(h,D$)|0,A=A+Math.imul(h,L$)|0;var a1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(a1>>>26)|0,a1&=67108863,P=Math.imul(p0,N0),O=Math.imul(p0,B0),O=O+Math.imul(l0,N0)|0,A=Math.imul(l0,B0),P=P+Math.imul(T0,u)|0,O=O+Math.imul(T0,_0)|0,O=O+Math.imul(V0,u)|0,A=A+Math.imul(V0,_0)|0,P=P+Math.imul(k0,R0)|0,O=O+Math.imul(k0,x0)|0,O=O+Math.imul(n0,R0)|0,A=A+Math.imul(n0,x0)|0,P=P+Math.imul(F0,A0)|0,O=O+Math.imul(F0,v0)|0,O=O+Math.imul(q0,A0)|0,A=A+Math.imul(q0,v0)|0,P=P+Math.imul(M0,H0)|0,O=O+Math.imul(M0,C0)|0,O=O+Math.imul(z0,H0)|0,A=A+Math.imul(z0,C0)|0,P=P+Math.imul(c,d0)|0,O=O+Math.imul(c,e)|0,O=O+Math.imul(s,d0)|0,A=A+Math.imul(s,e)|0,P=P+Math.imul(Y0,b0)|0,O=O+Math.imul(Y0,f0)|0,O=O+Math.imul(W0,b0)|0,A=A+Math.imul(W0,f0)|0,P=P+Math.imul(d,a0)|0,O=O+Math.imul(d,U$)|0,O=O+Math.imul(m,a0)|0,A=A+Math.imul(m,U$)|0,P=P+Math.imul(J0,D$)|0,O=O+Math.imul(J0,L$)|0,O=O+Math.imul(K0,D$)|0,A=A+Math.imul(K0,L$)|0,P=P+Math.imul(j,Z$)|0,O=O+Math.imul(j,I$)|0,O=O+Math.imul(h,Z$)|0,A=A+Math.imul(h,I$)|0;var s1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(s1>>>26)|0,s1&=67108863,P=Math.imul(p0,u),O=Math.imul(p0,_0),O=O+Math.imul(l0,u)|0,A=Math.imul(l0,_0),P=P+Math.imul(T0,R0)|0,O=O+Math.imul(T0,x0)|0,O=O+Math.imul(V0,R0)|0,A=A+Math.imul(V0,x0)|0,P=P+Math.imul(k0,A0)|0,O=O+Math.imul(k0,v0)|0,O=O+Math.imul(n0,A0)|0,A=A+Math.imul(n0,v0)|0,P=P+Math.imul(F0,H0)|0,O=O+Math.imul(F0,C0)|0,O=O+Math.imul(q0,H0)|0,A=A+Math.imul(q0,C0)|0,P=P+Math.imul(M0,d0)|0,O=O+Math.imul(M0,e)|0,O=O+Math.imul(z0,d0)|0,A=A+Math.imul(z0,e)|0,P=P+Math.imul(c,b0)|0,O=O+Math.imul(c,f0)|0,O=O+Math.imul(s,b0)|0,A=A+Math.imul(s,f0)|0,P=P+Math.imul(Y0,a0)|0,O=O+Math.imul(Y0,U$)|0,O=O+Math.imul(W0,a0)|0,A=A+Math.imul(W0,U$)|0,P=P+Math.imul(d,D$)|0,O=O+Math.imul(d,L$)|0,O=O+Math.imul(m,D$)|0,A=A+Math.imul(m,L$)|0,P=P+Math.imul(J0,Z$)|0,O=O+Math.imul(J0,I$)|0,O=O+Math.imul(K0,Z$)|0,A=A+Math.imul(K0,I$)|0;var Y1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(Y1>>>26)|0,Y1&=67108863,P=Math.imul(p0,R0),O=Math.imul(p0,x0),O=O+Math.imul(l0,R0)|0,A=Math.imul(l0,x0),P=P+Math.imul(T0,A0)|0,O=O+Math.imul(T0,v0)|0,O=O+Math.imul(V0,A0)|0,A=A+Math.imul(V0,v0)|0,P=P+Math.imul(k0,H0)|0,O=O+Math.imul(k0,C0)|0,O=O+Math.imul(n0,H0)|0,A=A+Math.imul(n0,C0)|0,P=P+Math.imul(F0,d0)|0,O=O+Math.imul(F0,e)|0,O=O+Math.imul(q0,d0)|0,A=A+Math.imul(q0,e)|0,P=P+Math.imul(M0,b0)|0,O=O+Math.imul(M0,f0)|0,O=O+Math.imul(z0,b0)|0,A=A+Math.imul(z0,f0)|0,P=P+Math.imul(c,a0)|0,O=O+Math.imul(c,U$)|0,O=O+Math.imul(s,a0)|0,A=A+Math.imul(s,U$)|0,P=P+Math.imul(Y0,D$)|0,O=O+Math.imul(Y0,L$)|0,O=O+Math.imul(W0,D$)|0,A=A+Math.imul(W0,L$)|0,P=P+Math.imul(d,Z$)|0,O=O+Math.imul(d,I$)|0,O=O+Math.imul(m,Z$)|0,A=A+Math.imul(m,I$)|0;var S1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(S1>>>26)|0,S1&=67108863,P=Math.imul(p0,A0),O=Math.imul(p0,v0),O=O+Math.imul(l0,A0)|0,A=Math.imul(l0,v0),P=P+Math.imul(T0,H0)|0,O=O+Math.imul(T0,C0)|0,O=O+Math.imul(V0,H0)|0,A=A+Math.imul(V0,C0)|0,P=P+Math.imul(k0,d0)|0,O=O+Math.imul(k0,e)|0,O=O+Math.imul(n0,d0)|0,A=A+Math.imul(n0,e)|0,P=P+Math.imul(F0,b0)|0,O=O+Math.imul(F0,f0)|0,O=O+Math.imul(q0,b0)|0,A=A+Math.imul(q0,f0)|0,P=P+Math.imul(M0,a0)|0,O=O+Math.imul(M0,U$)|0,O=O+Math.imul(z0,a0)|0,A=A+Math.imul(z0,U$)|0,P=P+Math.imul(c,D$)|0,O=O+Math.imul(c,L$)|0,O=O+Math.imul(s,D$)|0,A=A+Math.imul(s,L$)|0,P=P+Math.imul(Y0,Z$)|0,O=O+Math.imul(Y0,I$)|0,O=O+Math.imul(W0,Z$)|0,A=A+Math.imul(W0,I$)|0;var R1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(R1>>>26)|0,R1&=67108863,P=Math.imul(p0,H0),O=Math.imul(p0,C0),O=O+Math.imul(l0,H0)|0,A=Math.imul(l0,C0),P=P+Math.imul(T0,d0)|0,O=O+Math.imul(T0,e)|0,O=O+Math.imul(V0,d0)|0,A=A+Math.imul(V0,e)|0,P=P+Math.imul(k0,b0)|0,O=O+Math.imul(k0,f0)|0,O=O+Math.imul(n0,b0)|0,A=A+Math.imul(n0,f0)|0,P=P+Math.imul(F0,a0)|0,O=O+Math.imul(F0,U$)|0,O=O+Math.imul(q0,a0)|0,A=A+Math.imul(q0,U$)|0,P=P+Math.imul(M0,D$)|0,O=O+Math.imul(M0,L$)|0,O=O+Math.imul(z0,D$)|0,A=A+Math.imul(z0,L$)|0,P=P+Math.imul(c,Z$)|0,O=O+Math.imul(c,I$)|0,O=O+Math.imul(s,Z$)|0,A=A+Math.imul(s,I$)|0;var e1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(e1>>>26)|0,e1&=67108863,P=Math.imul(p0,d0),O=Math.imul(p0,e),O=O+Math.imul(l0,d0)|0,A=Math.imul(l0,e),P=P+Math.imul(T0,b0)|0,O=O+Math.imul(T0,f0)|0,O=O+Math.imul(V0,b0)|0,A=A+Math.imul(V0,f0)|0,P=P+Math.imul(k0,a0)|0,O=O+Math.imul(k0,U$)|0,O=O+Math.imul(n0,a0)|0,A=A+Math.imul(n0,U$)|0,P=P+Math.imul(F0,D$)|0,O=O+Math.imul(F0,L$)|0,O=O+Math.imul(q0,D$)|0,A=A+Math.imul(q0,L$)|0,P=P+Math.imul(M0,Z$)|0,O=O+Math.imul(M0,I$)|0,O=O+Math.imul(z0,Z$)|0,A=A+Math.imul(z0,I$)|0;var B1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(B1>>>26)|0,B1&=67108863,P=Math.imul(p0,b0),O=Math.imul(p0,f0),O=O+Math.imul(l0,b0)|0,A=Math.imul(l0,f0),P=P+Math.imul(T0,a0)|0,O=O+Math.imul(T0,U$)|0,O=O+Math.imul(V0,a0)|0,A=A+Math.imul(V0,U$)|0,P=P+Math.imul(k0,D$)|0,O=O+Math.imul(k0,L$)|0,O=O+Math.imul(n0,D$)|0,A=A+Math.imul(n0,L$)|0,P=P+Math.imul(F0,Z$)|0,O=O+Math.imul(F0,I$)|0,O=O+Math.imul(q0,Z$)|0,A=A+Math.imul(q0,I$)|0;var f1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(f1>>>26)|0,f1&=67108863,P=Math.imul(p0,a0),O=Math.imul(p0,U$),O=O+Math.imul(l0,a0)|0,A=Math.imul(l0,U$),P=P+Math.imul(T0,D$)|0,O=O+Math.imul(T0,L$)|0,O=O+Math.imul(V0,D$)|0,A=A+Math.imul(V0,L$)|0,P=P+Math.imul(k0,Z$)|0,O=O+Math.imul(k0,I$)|0,O=O+Math.imul(n0,Z$)|0,A=A+Math.imul(n0,I$)|0;var p1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(p1>>>26)|0,p1&=67108863,P=Math.imul(p0,D$),O=Math.imul(p0,L$),O=O+Math.imul(l0,D$)|0,A=Math.imul(l0,L$),P=P+Math.imul(T0,Z$)|0,O=O+Math.imul(T0,I$)|0,O=O+Math.imul(V0,Z$)|0,A=A+Math.imul(V0,I$)|0;var j1=(q+P|0)+((O&8191)<<13)|0;q=(A+(O>>>13)|0)+(j1>>>26)|0,j1&=67108863,P=Math.imul(p0,Z$),O=Math.imul(p0,I$),O=O+Math.imul(l0,Z$)|0,A=Math.imul(l0,I$);var v1=(q+P|0)+((O&8191)<<13)|0;if(q=(A+(O>>>13)|0)+(v1>>>26)|0,v1&=67108863,v[0]=I1,v[1]=C$,v[2]=g$,v[3]=z1,v[4]=U1,v[5]=o1,v[6]=t1,v[7]=r1,v[8]=a1,v[9]=s1,v[10]=Y1,v[11]=S1,v[12]=R1,v[13]=e1,v[14]=B1,v[15]=f1,v[16]=p1,v[17]=j1,v[18]=v1,q!==0)v[19]=q,F.length++;return F};if(!Math.imul)w=x;function y(Q,D,F){F.negative=D.negative^Q.negative,F.length=Q.length+D.length;var L=0,H=0;for(var v=0;v<F.length-1;v++){var q=H;H=0;var P=L&67108863,O=Math.min(v,D.length-1);for(var A=Math.max(0,v-Q.length+1);A<=O;A++){var k=v-A,j=Q.words[k]|0,h=D.words[A]|0,a=j*h,J0=a&67108863;q=q+(a/67108864|0)|0,J0=J0+P|0,P=J0&67108863,q=q+(J0>>>26)|0,H+=q>>>26,q&=67108863}F.words[v]=P,L=q,q=H}if(L!==0)F.words[v]=L;else F.length--;return F.strip()}function g(Q,D,F){var L=new b;return L.mulp(Q,D,F)}Y.prototype.mulTo=function(Q,D){var F,L=this.length+Q.length;if(this.length===10&&Q.length===10)F=w(this,Q,D);else if(L<63)F=x(this,Q,D);else if(L<1024)F=y(this,Q,D);else F=g(this,Q,D);return F};function b(Q,D){this.x=Q,this.y=D}b.prototype.makeRBT=function(Q){var D=Array(Q),F=Y.prototype._countBits(Q)-1;for(var L=0;L<Q;L++)D[L]=this.revBin(L,F,Q);return D},b.prototype.revBin=function(Q,D,F){if(Q===0||Q===F-1)return Q;var L=0;for(var H=0;H<D;H++)L|=(Q&1)<<D-H-1,Q>>=1;return L},b.prototype.permute=function(Q,D,F,L,H,v){for(var q=0;q<v;q++)L[q]=D[Q[q]],H[q]=F[Q[q]]},b.prototype.transform=function(Q,D,F,L,H,v){this.permute(v,Q,D,F,L,H);for(var q=1;q<H;q<<=1){var P=q<<1,O=Math.cos(2*Math.PI/P),A=Math.sin(2*Math.PI/P);for(var k=0;k<H;k+=P){var j=O,h=A;for(var a=0;a<q;a++){var J0=F[k+a],K0=L[k+a],O0=F[k+a+q],d=L[k+a+q],m=j*O0-h*d;if(d=j*d+h*O0,O0=m,F[k+a]=J0+O0,L[k+a]=K0+d,F[k+a+q]=J0-O0,L[k+a+q]=K0-d,a!==P)m=O*j-A*h,h=O*h+A*j,j=m}}}},b.prototype.guessLen13b=function(Q,D){var F=Math.max(D,Q)|1,L=F&1,H=0;for(F=F/2|0;F;F=F>>>1)H++;return 1<<H+1+L},b.prototype.conjugate=function(Q,D,F){if(F<=1)return;for(var L=0;L<F/2;L++){var H=Q[L];Q[L]=Q[F-L-1],Q[F-L-1]=H,H=D[L],D[L]=-D[F-L-1],D[F-L-1]=-H}},b.prototype.normalize13b=function(Q,D){var F=0;for(var L=0;L<D/2;L++){var H=Math.round(Q[2*L+1]/D)*8192+Math.round(Q[2*L]/D)+F;if(Q[L]=H&67108863,H<67108864)F=0;else F=H/67108864|0}return Q},b.prototype.convert13b=function(Q,D,F,L){var H=0;for(var v=0;v<D;v++)H=H+(Q[v]|0),F[2*v]=H&8191,H=H>>>13,F[2*v+1]=H&8191,H=H>>>13;for(v=2*D;v<L;++v)F[v]=0;_(H===0),_((H&-8192)===0)},b.prototype.stub=function(Q){var D=Array(Q);for(var F=0;F<Q;F++)D[F]=0;return D},b.prototype.mulp=function(Q,D,F){var L=2*this.guessLen13b(Q.length,D.length),H=this.makeRBT(L),v=this.stub(L),q=Array(L),P=Array(L),O=Array(L),A=Array(L),k=Array(L),j=Array(L),h=F.words;h.length=L,this.convert13b(Q.words,Q.length,q,L),this.convert13b(D.words,D.length,A,L),this.transform(q,v,P,O,L,H),this.transform(A,v,k,j,L,H);for(var a=0;a<L;a++){var J0=P[a]*k[a]-O[a]*j[a];O[a]=P[a]*j[a]+O[a]*k[a],P[a]=J0}return this.conjugate(P,O,L),this.transform(P,O,h,v,L,H),this.conjugate(h,v,L),this.normalize13b(h,L),F.negative=Q.negative^D.negative,F.length=Q.length+D.length,F.strip()},Y.prototype.mul=function(Q){var D=new Y(null);return D.words=Array(this.length+Q.length),this.mulTo(Q,D)},Y.prototype.mulf=function(Q){var D=new Y(null);return D.words=Array(this.length+Q.length),g(this,Q,D)},Y.prototype.imul=function(Q){return this.clone().mulTo(Q,this)},Y.prototype.imuln=function(Q){_(typeof Q==="number"),_(Q<67108864);var D=0;for(var F=0;F<this.length;F++){var L=(this.words[F]|0)*Q,H=(L&67108863)+(D&67108863);D>>=26,D+=L/67108864|0,D+=H>>>26,this.words[F]=H&67108863}if(D!==0)this.words[F]=D,this.length++;return this.length=Q===0?1:this.length,this},Y.prototype.muln=function(Q){return this.clone().imuln(Q)},Y.prototype.sqr=function(){return this.mul(this)},Y.prototype.isqr=function(){return this.imul(this.clone())},Y.prototype.pow=function(Q){var D=B(Q);if(D.length===0)return new Y(1);var F=this;for(var L=0;L<D.length;L++,F=F.sqr())if(D[L]!==0)break;if(++L<D.length)for(var H=F.sqr();L<D.length;L++,H=H.sqr()){if(D[L]===0)continue;F=F.mul(H)}return F},Y.prototype.iushln=function(Q){_(typeof Q==="number"&&Q>=0);var D=Q%26,F=(Q-D)/26,L=67108863>>>26-D<<26-D,H;if(D!==0){var v=0;for(H=0;H<this.length;H++){var q=this.words[H]&L,P=(this.words[H]|0)-q<<D;this.words[H]=P|v,v=q>>>26-D}if(v)this.words[H]=v,this.length++}if(F!==0){for(H=this.length-1;H>=0;H--)this.words[H+F]=this.words[H];for(H=0;H<F;H++)this.words[H]=0;this.length+=F}return this.strip()},Y.prototype.ishln=function(Q){return _(this.negative===0),this.iushln(Q)},Y.prototype.iushrn=function(Q,D,F){_(typeof Q==="number"&&Q>=0);var L;if(D)L=(D-D%26)/26;else L=0;var H=Q%26,v=Math.min((Q-H)/26,this.length),q=67108863^67108863>>>H<<H,P=F;if(L-=v,L=Math.max(0,L),P){for(var O=0;O<v;O++)P.words[O]=this.words[O];P.length=v}if(v===0);else if(this.length>v){this.length-=v;for(O=0;O<this.length;O++)this.words[O]=this.words[O+v]}else this.words[0]=0,this.length=1;var A=0;for(O=this.length-1;O>=0&&(A!==0||O>=L);O--){var k=this.words[O]|0;this.words[O]=A<<26-H|k>>>H,A=k&q}if(P&&A!==0)P.words[P.length++]=A;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},Y.prototype.ishrn=function(Q,D,F){return _(this.negative===0),this.iushrn(Q,D,F)},Y.prototype.shln=function(Q){return this.clone().ishln(Q)},Y.prototype.ushln=function(Q){return this.clone().iushln(Q)},Y.prototype.shrn=function(Q){return this.clone().ishrn(Q)},Y.prototype.ushrn=function(Q){return this.clone().iushrn(Q)},Y.prototype.testn=function(Q){_(typeof Q==="number"&&Q>=0);var D=Q%26,F=(Q-D)/26,L=1<<D;if(this.length<=F)return!1;var H=this.words[F];return!!(H&L)},Y.prototype.imaskn=function(Q){_(typeof Q==="number"&&Q>=0);var D=Q%26,F=(Q-D)/26;if(_(this.negative===0,"imaskn works only with positive numbers"),this.length<=F)return this;if(D!==0)F++;if(this.length=Math.min(F,this.length),D!==0){var L=67108863^67108863>>>D<<D;this.words[this.length-1]&=L}return this.strip()},Y.prototype.maskn=function(Q){return this.clone().imaskn(Q)},Y.prototype.iaddn=function(Q){if(_(typeof Q==="number"),_(Q<67108864),Q<0)return this.isubn(-Q);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<Q)return this.words[0]=Q-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(Q),this.negative=1,this}return this._iaddn(Q)},Y.prototype._iaddn=function(Q){this.words[0]+=Q;for(var D=0;D<this.length&&this.words[D]>=67108864;D++)if(this.words[D]-=67108864,D===this.length-1)this.words[D+1]=1;else this.words[D+1]++;return this.length=Math.max(this.length,D+1),this},Y.prototype.isubn=function(Q){if(_(typeof Q==="number"),_(Q<67108864),Q<0)return this.iaddn(-Q);if(this.negative!==0)return this.negative=0,this.iaddn(Q),this.negative=1,this;if(this.words[0]-=Q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var D=0;D<this.length&&this.words[D]<0;D++)this.words[D]+=67108864,this.words[D+1]-=1;return this.strip()},Y.prototype.addn=function(Q){return this.clone().iaddn(Q)},Y.prototype.subn=function(Q){return this.clone().isubn(Q)},Y.prototype.iabs=function(){return this.negative=0,this},Y.prototype.abs=function(){return this.clone().iabs()},Y.prototype._ishlnsubmul=function(Q,D,F){var L=Q.length+F,H;this._expand(L);var v,q=0;for(H=0;H<Q.length;H++){v=(this.words[H+F]|0)+q;var P=(Q.words[H]|0)*D;v-=P&67108863,q=(v>>26)-(P/67108864|0),this.words[H+F]=v&67108863}for(;H<this.length-F;H++)v=(this.words[H+F]|0)+q,q=v>>26,this.words[H+F]=v&67108863;if(q===0)return this.strip();_(q===-1),q=0;for(H=0;H<this.length;H++)v=-(this.words[H]|0)+q,q=v>>26,this.words[H]=v&67108863;return this.negative=1,this.strip()},Y.prototype._wordDiv=function(Q,D){var F=this.length-Q.length,L=this.clone(),H=Q,v=H.words[H.length-1]|0,q=this._countBits(v);if(F=26-q,F!==0)H=H.ushln(F),L.iushln(F),v=H.words[H.length-1]|0;var P=L.length-H.length,O;if(D!=="mod"){O=new Y(null),O.length=P+1,O.words=Array(O.length);for(var A=0;A<O.length;A++)O.words[A]=0}var k=L.clone()._ishlnsubmul(H,1,P);if(k.negative===0){if(L=k,O)O.words[P]=1}for(var j=P-1;j>=0;j--){var h=(L.words[H.length+j]|0)*67108864+(L.words[H.length+j-1]|0);h=Math.min(h/v|0,67108863),L._ishlnsubmul(H,h,j);while(L.negative!==0)if(h--,L.negative=0,L._ishlnsubmul(H,1,j),!L.isZero())L.negative^=1;if(O)O.words[j]=h}if(O)O.strip();if(L.strip(),D!=="div"&&F!==0)L.iushrn(F);return{div:O||null,mod:L}},Y.prototype.divmod=function(Q,D,F){if(_(!Q.isZero()),this.isZero())return{div:new Y(0),mod:new Y(0)};var L,H,v;if(this.negative!==0&&Q.negative===0){if(v=this.neg().divmod(Q,D),D!=="mod")L=v.div.neg();if(D!=="div"){if(H=v.mod.neg(),F&&H.negative!==0)H.iadd(Q)}return{div:L,mod:H}}if(this.negative===0&&Q.negative!==0){if(v=this.divmod(Q.neg(),D),D!=="mod")L=v.div.neg();return{div:L,mod:v.mod}}if((this.negative&Q.negative)!==0){if(v=this.neg().divmod(Q.neg(),D),D!=="div"){if(H=v.mod.neg(),F&&H.negative!==0)H.isub(Q)}return{div:v.div,mod:H}}if(Q.length>this.length||this.cmp(Q)<0)return{div:new Y(0),mod:this};if(Q.length===1){if(D==="div")return{div:this.divn(Q.words[0]),mod:null};if(D==="mod")return{div:null,mod:new Y(this.modn(Q.words[0]))};return{div:this.divn(Q.words[0]),mod:new Y(this.modn(Q.words[0]))}}return this._wordDiv(Q,D)},Y.prototype.div=function(Q){return this.divmod(Q,"div",!1).div},Y.prototype.mod=function(Q){return this.divmod(Q,"mod",!1).mod},Y.prototype.umod=function(Q){return this.divmod(Q,"mod",!0).mod},Y.prototype.divRound=function(Q){var D=this.divmod(Q);if(D.mod.isZero())return D.div;var F=D.div.negative!==0?D.mod.isub(Q):D.mod,L=Q.ushrn(1),H=Q.andln(1),v=F.cmp(L);if(v<0||H===1&&v===0)return D.div;return D.div.negative!==0?D.div.isubn(1):D.div.iaddn(1)},Y.prototype.modn=function(Q){_(Q<=67108863);var D=67108864%Q,F=0;for(var L=this.length-1;L>=0;L--)F=(D*F+(this.words[L]|0))%Q;return F},Y.prototype.idivn=function(Q){_(Q<=67108863);var D=0;for(var F=this.length-1;F>=0;F--){var L=(this.words[F]|0)+D*67108864;this.words[F]=L/Q|0,D=L%Q}return this.strip()},Y.prototype.divn=function(Q){return this.clone().idivn(Q)},Y.prototype.egcd=function(Q){_(Q.negative===0),_(!Q.isZero());var D=this,F=Q.clone();if(D.negative!==0)D=D.umod(Q);else D=D.clone();var L=new Y(1),H=new Y(0),v=new Y(0),q=new Y(1),P=0;while(D.isEven()&&F.isEven())D.iushrn(1),F.iushrn(1),++P;var O=F.clone(),A=D.clone();while(!D.isZero()){for(var k=0,j=1;(D.words[0]&j)===0&&k<26;++k,j<<=1);if(k>0){D.iushrn(k);while(k-- >0){if(L.isOdd()||H.isOdd())L.iadd(O),H.isub(A);L.iushrn(1),H.iushrn(1)}}for(var h=0,a=1;(F.words[0]&a)===0&&h<26;++h,a<<=1);if(h>0){F.iushrn(h);while(h-- >0){if(v.isOdd()||q.isOdd())v.iadd(O),q.isub(A);v.iushrn(1),q.iushrn(1)}}if(D.cmp(F)>=0)D.isub(F),L.isub(v),H.isub(q);else F.isub(D),v.isub(L),q.isub(H)}return{a:v,b:q,gcd:F.iushln(P)}},Y.prototype._invmp=function(Q){_(Q.negative===0),_(!Q.isZero());var D=this,F=Q.clone();if(D.negative!==0)D=D.umod(Q);else D=D.clone();var L=new Y(1),H=new Y(0),v=F.clone();while(D.cmpn(1)>0&&F.cmpn(1)>0){for(var q=0,P=1;(D.words[0]&P)===0&&q<26;++q,P<<=1);if(q>0){D.iushrn(q);while(q-- >0){if(L.isOdd())L.iadd(v);L.iushrn(1)}}for(var O=0,A=1;(F.words[0]&A)===0&&O<26;++O,A<<=1);if(O>0){F.iushrn(O);while(O-- >0){if(H.isOdd())H.iadd(v);H.iushrn(1)}}if(D.cmp(F)>=0)D.isub(F),L.isub(H);else F.isub(D),H.isub(L)}var k;if(D.cmpn(1)===0)k=L;else k=H;if(k.cmpn(0)<0)k.iadd(Q);return k},Y.prototype.gcd=function(Q){if(this.isZero())return Q.abs();if(Q.isZero())return this.abs();var D=this.clone(),F=Q.clone();D.negative=0,F.negative=0;for(var L=0;D.isEven()&&F.isEven();L++)D.iushrn(1),F.iushrn(1);do{while(D.isEven())D.iushrn(1);while(F.isEven())F.iushrn(1);var H=D.cmp(F);if(H<0){var v=D;D=F,F=v}else if(H===0||F.cmpn(1)===0)break;D.isub(F)}while(!0);return F.iushln(L)},Y.prototype.invm=function(Q){return this.egcd(Q).a.umod(Q)},Y.prototype.isEven=function(){return(this.words[0]&1)===0},Y.prototype.isOdd=function(){return(this.words[0]&1)===1},Y.prototype.andln=function(Q){return this.words[0]&Q},Y.prototype.bincn=function(Q){_(typeof Q==="number");var D=Q%26,F=(Q-D)/26,L=1<<D;if(this.length<=F)return this._expand(F+1),this.words[F]|=L,this;var H=L;for(var v=F;H!==0&&v<this.length;v++){var q=this.words[v]|0;q+=H,H=q>>>26,q&=67108863,this.words[v]=q}if(H!==0)this.words[v]=H,this.length++;return this},Y.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Y.prototype.cmpn=function(Q){var D=Q<0;if(this.negative!==0&&!D)return-1;if(this.negative===0&&D)return 1;this.strip();var F;if(this.length>1)F=1;else{if(D)Q=-Q;_(Q<=67108863,"Number is too big");var L=this.words[0]|0;F=L===Q?0:L<Q?-1:1}if(this.negative!==0)return-F|0;return F},Y.prototype.cmp=function(Q){if(this.negative!==0&&Q.negative===0)return-1;if(this.negative===0&&Q.negative!==0)return 1;var D=this.ucmp(Q);if(this.negative!==0)return-D|0;return D},Y.prototype.ucmp=function(Q){if(this.length>Q.length)return 1;if(this.length<Q.length)return-1;var D=0;for(var F=this.length-1;F>=0;F--){var L=this.words[F]|0,H=Q.words[F]|0;if(L===H)continue;if(L<H)D=-1;else if(L>H)D=1;break}return D},Y.prototype.gtn=function(Q){return this.cmpn(Q)===1},Y.prototype.gt=function(Q){return this.cmp(Q)===1},Y.prototype.gten=function(Q){return this.cmpn(Q)>=0},Y.prototype.gte=function(Q){return this.cmp(Q)>=0},Y.prototype.ltn=function(Q){return this.cmpn(Q)===-1},Y.prototype.lt=function(Q){return this.cmp(Q)===-1},Y.prototype.lten=function(Q){return this.cmpn(Q)<=0},Y.prototype.lte=function(Q){return this.cmp(Q)<=0},Y.prototype.eqn=function(Q){return this.cmpn(Q)===0},Y.prototype.eq=function(Q){return this.cmp(Q)===0},Y.red=function(Q){return new t(Q)},Y.prototype.toRed=function(Q){return _(!this.red,"Already a number in reduction context"),_(this.negative===0,"red works only with positives"),Q.convertTo(this)._forceRed(Q)},Y.prototype.fromRed=function(){return _(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Y.prototype._forceRed=function(Q){return this.red=Q,this},Y.prototype.forceRed=function(Q){return _(!this.red,"Already a number in reduction context"),this._forceRed(Q)},Y.prototype.redAdd=function(Q){return _(this.red,"redAdd works only with red numbers"),this.red.add(this,Q)},Y.prototype.redIAdd=function(Q){return _(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Q)},Y.prototype.redSub=function(Q){return _(this.red,"redSub works only with red numbers"),this.red.sub(this,Q)},Y.prototype.redISub=function(Q){return _(this.red,"redISub works only with red numbers"),this.red.isub(this,Q)},Y.prototype.redShl=function(Q){return _(this.red,"redShl works only with red numbers"),this.red.shl(this,Q)},Y.prototype.redMul=function(Q){return _(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.mul(this,Q)},Y.prototype.redIMul=function(Q){return _(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.imul(this,Q)},Y.prototype.redSqr=function(){return _(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Y.prototype.redISqr=function(){return _(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Y.prototype.redSqrt=function(){return _(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Y.prototype.redInvm=function(){return _(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Y.prototype.redNeg=function(){return _(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Y.prototype.redPow=function(Q){return _(this.red&&!Q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Q)};var l={k256:null,p224:null,p192:null,p25519:null};function i(Q,D){this.name=Q,this.p=new Y(D,16),this.n=this.p.bitLength(),this.k=new Y(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}i.prototype._tmp=function(){var Q=new Y(null);return Q.words=Array(Math.ceil(this.n/13)),Q},i.prototype.ireduce=function(Q){var D=Q,F;do this.split(D,this.tmp),D=this.imulK(D),D=D.iadd(this.tmp),F=D.bitLength();while(F>this.n);var L=F<this.n?-1:D.ucmp(this.p);if(L===0)D.words[0]=0,D.length=1;else if(L>0)D.isub(this.p);else if(D.strip!==void 0)D.strip();else D._strip();return D},i.prototype.split=function(Q,D){Q.iushrn(this.n,0,D)},i.prototype.imulK=function(Q){return Q.imul(this.k)};function $0(){i.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}J($0,i),$0.prototype.split=function(Q,D){var F=4194303,L=Math.min(Q.length,9);for(var H=0;H<L;H++)D.words[H]=Q.words[H];if(D.length=L,Q.length<=9){Q.words[0]=0,Q.length=1;return}var v=Q.words[9];D.words[D.length++]=v&F;for(H=10;H<Q.length;H++){var q=Q.words[H]|0;Q.words[H-10]=(q&F)<<4|v>>>22,v=q}if(v>>>=22,Q.words[H-10]=v,v===0&&Q.length>10)Q.length-=10;else Q.length-=9},$0.prototype.imulK=function(Q){Q.words[Q.length]=0,Q.words[Q.length+1]=0,Q.length+=2;var D=0;for(var F=0;F<Q.length;F++){var L=Q.words[F]|0;D+=L*977,Q.words[F]=D&67108863,D=L*64+(D/67108864|0)}if(Q.words[Q.length-1]===0){if(Q.length--,Q.words[Q.length-1]===0)Q.length--}return Q};function Q0(){i.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}J(Q0,i);function G0(){i.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}J(G0,i);function D0(){i.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}J(D0,i),D0.prototype.imulK=function(Q){var D=0;for(var F=0;F<Q.length;F++){var L=(Q.words[F]|0)*19+D,H=L&67108863;L>>>=26,Q.words[F]=H,D=L}if(D!==0)Q.words[Q.length++]=D;return Q},Y._prime=function(Q){if(l[Q])return l[Q];var D;if(Q==="k256")D=new $0;else if(Q==="p224")D=new Q0;else if(Q==="p192")D=new G0;else if(Q==="p25519")D=new D0;else throw Error("Unknown prime "+Q);return l[Q]=D,D};function t(Q){if(typeof Q==="string"){var D=Y._prime(Q);this.m=D.p,this.prime=D}else _(Q.gtn(1),"modulus must be greater than 1"),this.m=Q,this.prime=null}t.prototype._verify1=function(Q){_(Q.negative===0,"red works only with positives"),_(Q.red,"red works only with red numbers")},t.prototype._verify2=function(Q,D){_((Q.negative|D.negative)===0,"red works only with positives"),_(Q.red&&Q.red===D.red,"red works only with red numbers")},t.prototype.imod=function(Q){if(this.prime)return this.prime.ireduce(Q)._forceRed(this);return Q.umod(this.m)._forceRed(this)},t.prototype.neg=function(Q){if(Q.isZero())return Q.clone();return this.m.sub(Q)._forceRed(this)},t.prototype.add=function(Q,D){this._verify2(Q,D);var F=Q.add(D);if(F.cmp(this.m)>=0)F.isub(this.m);return F._forceRed(this)},t.prototype.iadd=function(Q,D){this._verify2(Q,D);var F=Q.iadd(D);if(F.cmp(this.m)>=0)F.isub(this.m);return F},t.prototype.sub=function(Q,D){this._verify2(Q,D);var F=Q.sub(D);if(F.cmpn(0)<0)F.iadd(this.m);return F._forceRed(this)},t.prototype.isub=function(Q,D){this._verify2(Q,D);var F=Q.isub(D);if(F.cmpn(0)<0)F.iadd(this.m);return F},t.prototype.shl=function(Q,D){return this._verify1(Q),this.imod(Q.ushln(D))},t.prototype.imul=function(Q,D){return this._verify2(Q,D),this.imod(Q.imul(D))},t.prototype.mul=function(Q,D){return this._verify2(Q,D),this.imod(Q.mul(D))},t.prototype.isqr=function(Q){return this.imul(Q,Q.clone())},t.prototype.sqr=function(Q){return this.mul(Q,Q)},t.prototype.sqrt=function(Q){if(Q.isZero())return Q.clone();var D=this.m.andln(3);if(_(D%2===1),D===3){var F=this.m.add(new Y(1)).iushrn(2);return this.pow(Q,F)}var L=this.m.subn(1),H=0;while(!L.isZero()&&L.andln(1)===0)H++,L.iushrn(1);_(!L.isZero());var v=new Y(1).toRed(this),q=v.redNeg(),P=this.m.subn(1).iushrn(1),O=this.m.bitLength();O=new Y(2*O*O).toRed(this);while(this.pow(O,P).cmp(q)!==0)O.redIAdd(q);var A=this.pow(O,L),k=this.pow(Q,L.addn(1).iushrn(1)),j=this.pow(Q,L),h=H;while(j.cmp(v)!==0){var a=j;for(var J0=0;a.cmp(v)!==0;J0++)a=a.redSqr();_(J0<h);var K0=this.pow(A,new Y(1).iushln(h-J0-1));k=k.redMul(K0),A=K0.redSqr(),j=j.redMul(A),h=J0}return k},t.prototype.invm=function(Q){var D=Q._invmp(this.m);if(D.negative!==0)return D.negative=0,this.imod(D).redNeg();else return this.imod(D)},t.prototype.pow=function(Q,D){if(D.isZero())return new Y(1).toRed(this);if(D.cmpn(1)===0)return Q.clone();var F=4,L=Array(1<<F);L[0]=new Y(1).toRed(this),L[1]=Q;for(var H=2;H<L.length;H++)L[H]=this.mul(L[H-1],Q);var v=L[0],q=0,P=0,O=D.bitLength()%26;if(O===0)O=26;for(H=D.length-1;H>=0;H--){var A=D.words[H];for(var k=O-1;k>=0;k--){var j=A>>k&1;if(v!==L[0])v=this.sqr(v);if(j===0&&q===0){P=0;continue}if(q<<=1,q|=j,P++,P!==F&&(H!==0||k!==0))continue;v=this.mul(v,L[q]),P=0,q=0}O=26}return v},t.prototype.convertTo=function(Q){var D=Q.umod(this.m);return D===Q?D.clone():D},t.prototype.convertFrom=function(Q){var D=Q.clone();return D.red=null,D},Y.mont=function(Q){return new P0(Q)};function P0(Q){if(t.call(this,Q),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new Y(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}J(P0,t),P0.prototype.convertTo=function(Q){return this.imod(Q.ushln(this.shift))},P0.prototype.convertFrom=function(Q){var D=this.imod(Q.mul(this.rinv));return D.red=null,D},P0.prototype.imul=function(Q,D){if(Q.isZero()||D.isZero())return Q.words[0]=0,Q.length=1,Q;var F=Q.imul(D),L=F.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),H=F.isub(L).iushrn(this.shift),v=H;if(H.cmp(this.m)>=0)v=H.isub(this.m);else if(H.cmpn(0)<0)v=H.iadd(this.m);return v._forceRed(this)},P0.prototype.mul=function(Q,D){if(Q.isZero()||D.isZero())return new Y(0)._forceRed(this);var F=Q.mul(D),L=F.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),H=F.isub(L).iushrn(this.shift),v=H;if(H.cmp(this.m)>=0)v=H.isub(this.m);else if(H.cmpn(0)<0)v=H.iadd(this.m);return v._forceRed(this)},P0.prototype.invm=function(Q){var D=this.imod(Q._invmp(this.m).mul(this.r2));return D._forceRed(this)}})(typeof I>"u"||I,$)}),eN=$$(($,I)=>{var G=ZW(),Z=oU().Buffer;function _(J,Y){return Z.from(J.toRed(G.mont(Y.modulus)).redPow(new G(Y.publicExponent)).fromRed().toArray())}I.exports=_}),Kn=$$(($,I)=>{(function(G,Z){function _(L,H){if(!L)throw Error(H||"Assertion failed")}function J(L,H){L.super_=H;var v=function(){};v.prototype=H.prototype,L.prototype=new v,L.prototype.constructor=L}function Y(L,H,v){if(Y.isBN(L))return L;if(this.negative=0,this.words=null,this.length=0,this.red=null,L!==null){if(H==="le"||H==="be")v=H,H=10;this._init(L||0,H||10,v||"be")}}if(typeof G==="object")G.exports=Y;else Z.BN=Y;Y.BN=Y,Y.wordSize=26;var W;try{if(typeof window<"u"&&typeof window.Buffer<"u")W=window.Buffer;else W=(u1(),V$(h1)).Buffer}catch(L){}Y.isBN=function(L){if(L instanceof Y)return!0;return L!==null&&typeof L==="object"&&L.constructor.wordSize===Y.wordSize&&Array.isArray(L.words)},Y.max=function(L,H){if(L.cmp(H)>0)return L;return H},Y.min=function(L,H){if(L.cmp(H)<0)return L;return H},Y.prototype._init=function(L,H,v){if(typeof L==="number")return this._initNumber(L,H,v);if(typeof L==="object")return this._initArray(L,H,v);if(H==="hex")H=16;_(H===(H|0)&&H>=2&&H<=36),L=L.toString().replace(/\s+/g,"");var q=0;if(L[0]==="-")q++,this.negative=1;if(q<L.length){if(H===16)this._parseHex(L,q,v);else if(this._parseBase(L,H,q),v==="le")this._initArray(this.toArray(),H,v)}},Y.prototype._initNumber=function(L,H,v){if(L<0)this.negative=1,L=-L;if(L<67108864)this.words=[L&67108863],this.length=1;else if(L<4503599627370496)this.words=[L&67108863,L/67108864&67108863],this.length=2;else _(L<9007199254740992),this.words=[L&67108863,L/67108864&67108863,1],this.length=3;if(v!=="le")return;this._initArray(this.toArray(),H,v)},Y.prototype._initArray=function(L,H,v){if(_(typeof L.length==="number"),L.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(L.length/3),this.words=Array(this.length);for(var q=0;q<this.length;q++)this.words[q]=0;var P,O,A=0;if(v==="be"){for(q=L.length-1,P=0;q>=0;q-=3)if(O=L[q]|L[q-1]<<8|L[q-2]<<16,this.words[P]|=O<<A&67108863,this.words[P+1]=O>>>26-A&67108863,A+=24,A>=26)A-=26,P++}else if(v==="le"){for(q=0,P=0;q<L.length;q+=3)if(O=L[q]|L[q+1]<<8|L[q+2]<<16,this.words[P]|=O<<A&67108863,this.words[P+1]=O>>>26-A&67108863,A+=24,A>=26)A-=26,P++}return this._strip()};function R(L,H){var v=L.charCodeAt(H);if(v>=48&&v<=57)return v-48;else if(v>=65&&v<=70)return v-55;else if(v>=97&&v<=102)return v-87;else _(!1,"Invalid character in "+L)}function M(L,H,v){var q=R(L,v);if(v-1>=H)q|=R(L,v-1)<<4;return q}Y.prototype._parseHex=function(L,H,v){this.length=Math.ceil((L.length-H)/6),this.words=Array(this.length);for(var q=0;q<this.length;q++)this.words[q]=0;var P=0,O=0,A;if(v==="be")for(q=L.length-1;q>=H;q-=2)if(A=M(L,H,q)<<P,this.words[O]|=A&67108863,P>=18)P-=18,O+=1,this.words[O]|=A>>>26;else P+=8;else{var k=L.length-H;for(q=k%2===0?H+1:H;q<L.length;q+=2)if(A=M(L,H,q)<<P,this.words[O]|=A&67108863,P>=18)P-=18,O+=1,this.words[O]|=A>>>26;else P+=8}this._strip()};function E(L,H,v,q){var P=0,O=0,A=Math.min(L.length,v);for(var k=H;k<A;k++){var j=L.charCodeAt(k)-48;if(P*=q,j>=49)O=j-49+10;else if(j>=17)O=j-17+10;else O=j;_(j>=0&&O<q,"Invalid character"),P+=O}return P}Y.prototype._parseBase=function(L,H,v){this.words=[0],this.length=1;for(var q=0,P=1;P<=67108863;P*=H)q++;q--,P=P/H|0;var O=L.length-v,A=O%q,k=Math.min(O,O-A)+v,j=0;for(var h=v;h<k;h+=q)if(j=E(L,h,h+q,H),this.imuln(P),this.words[0]+j<67108864)this.words[0]+=j;else this._iaddn(j);if(A!==0){var a=1;j=E(L,h,L.length,H);for(h=0;h<A;h++)a*=H;if(this.imuln(a),this.words[0]+j<67108864)this.words[0]+=j;else this._iaddn(j)}this._strip()},Y.prototype.copy=function(L){L.words=Array(this.length);for(var H=0;H<this.length;H++)L.words[H]=this.words[H];L.length=this.length,L.negative=this.negative,L.red=this.red};function T(L,H){L.words=H.words,L.length=H.length,L.negative=H.negative,L.red=H.red}if(Y.prototype._move=function(L){T(L,this)},Y.prototype.clone=function(){var L=new Y(null);return this.copy(L),L},Y.prototype._expand=function(L){while(this.length<L)this.words[this.length++]=0;return this},Y.prototype._strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},Y.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},typeof Symbol<"u"&&typeof Symbol.for==="function")try{Y.prototype[Symbol.for("nodejs.util.inspect.custom")]=S}catch(L){Y.prototype.inspect=S}else Y.prototype.inspect=S;function S(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var N=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],B=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],x=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(Y.prototype.toString=function(L,H){L=L||10,H=H|0||1;var v;if(L===16||L==="hex"){v="";var q=0,P=0;for(var O=0;O<this.length;O++){var A=this.words[O],k=((A<<q|P)&16777215).toString(16);if(P=A>>>24-q&16777215,q+=2,q>=26)q-=26,O--;if(P!==0||O!==this.length-1)v=N[6-k.length]+k+v;else v=k+v}if(P!==0)v=P.toString(16)+v;while(v.length%H!==0)v="0"+v;if(this.negative!==0)v="-"+v;return v}if(L===(L|0)&&L>=2&&L<=36){var j=B[L],h=x[L];v="";var a=this.clone();a.negative=0;while(!a.isZero()){var J0=a.modrn(h).toString(L);if(a=a.idivn(h),!a.isZero())v=N[j-J0.length]+J0+v;else v=J0+v}if(this.isZero())v="0"+v;while(v.length%H!==0)v="0"+v;if(this.negative!==0)v="-"+v;return v}_(!1,"Base should be between 2 and 36")},Y.prototype.toNumber=function(){var L=this.words[0];if(this.length===2)L+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)L+=4503599627370496+this.words[1]*67108864;else if(this.length>2)_(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-L:L},Y.prototype.toJSON=function(){return this.toString(16,2)},W)Y.prototype.toBuffer=function(L,H){return this.toArrayLike(W,L,H)};Y.prototype.toArray=function(L,H){return this.toArrayLike(Array,L,H)};var w=function(L,H){if(L.allocUnsafe)return L.allocUnsafe(H);return new L(H)};if(Y.prototype.toArrayLike=function(L,H,v){this._strip();var q=this.byteLength(),P=v||Math.max(1,q);_(q<=P,"byte array longer than desired length"),_(P>0,"Requested array length <= 0");var O=w(L,P),A=H==="le"?"LE":"BE";return this["_toArrayLike"+A](O,q),O},Y.prototype._toArrayLikeLE=function(L,H){var v=0,q=0;for(var P=0,O=0;P<this.length;P++){var A=this.words[P]<<O|q;if(L[v++]=A&255,v<L.length)L[v++]=A>>8&255;if(v<L.length)L[v++]=A>>16&255;if(O===6){if(v<L.length)L[v++]=A>>24&255;q=0,O=0}else q=A>>>24,O+=2}if(v<L.length){L[v++]=q;while(v<L.length)L[v++]=0}},Y.prototype._toArrayLikeBE=function(L,H){var v=L.length-1,q=0;for(var P=0,O=0;P<this.length;P++){var A=this.words[P]<<O|q;if(L[v--]=A&255,v>=0)L[v--]=A>>8&255;if(v>=0)L[v--]=A>>16&255;if(O===6){if(v>=0)L[v--]=A>>24&255;q=0,O=0}else q=A>>>24,O+=2}if(v>=0){L[v--]=q;while(v>=0)L[v--]=0}},Math.clz32)Y.prototype._countBits=function(L){return 32-Math.clz32(L)};else Y.prototype._countBits=function(L){var H=L,v=0;if(H>=4096)v+=13,H>>>=13;if(H>=64)v+=7,H>>>=7;if(H>=8)v+=4,H>>>=4;if(H>=2)v+=2,H>>>=2;return v+H};Y.prototype._zeroBits=function(L){if(L===0)return 26;var H=L,v=0;if((H&8191)===0)v+=13,H>>>=13;if((H&127)===0)v+=7,H>>>=7;if((H&15)===0)v+=4,H>>>=4;if((H&3)===0)v+=2,H>>>=2;if((H&1)===0)v++;return v},Y.prototype.bitLength=function(){var L=this.words[this.length-1],H=this._countBits(L);return(this.length-1)*26+H};function y(L){var H=Array(L.bitLength());for(var v=0;v<H.length;v++){var q=v/26|0,P=v%26;H[v]=L.words[q]>>>P&1}return H}Y.prototype.zeroBits=function(){if(this.isZero())return 0;var L=0;for(var H=0;H<this.length;H++){var v=this._zeroBits(this.words[H]);if(L+=v,v!==26)break}return L},Y.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},Y.prototype.toTwos=function(L){if(this.negative!==0)return this.abs().inotn(L).iaddn(1);return this.clone()},Y.prototype.fromTwos=function(L){if(this.testn(L-1))return this.notn(L).iaddn(1).ineg();return this.clone()},Y.prototype.isNeg=function(){return this.negative!==0},Y.prototype.neg=function(){return this.clone().ineg()},Y.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},Y.prototype.iuor=function(L){while(this.length<L.length)this.words[this.length++]=0;for(var H=0;H<L.length;H++)this.words[H]=this.words[H]|L.words[H];return this._strip()},Y.prototype.ior=function(L){return _((this.negative|L.negative)===0),this.iuor(L)},Y.prototype.or=function(L){if(this.length>L.length)return this.clone().ior(L);return L.clone().ior(this)},Y.prototype.uor=function(L){if(this.length>L.length)return this.clone().iuor(L);return L.clone().iuor(this)},Y.prototype.iuand=function(L){var H;if(this.length>L.length)H=L;else H=this;for(var v=0;v<H.length;v++)this.words[v]=this.words[v]&L.words[v];return this.length=H.length,this._strip()},Y.prototype.iand=function(L){return _((this.negative|L.negative)===0),this.iuand(L)},Y.prototype.and=function(L){if(this.length>L.length)return this.clone().iand(L);return L.clone().iand(this)},Y.prototype.uand=function(L){if(this.length>L.length)return this.clone().iuand(L);return L.clone().iuand(this)},Y.prototype.iuxor=function(L){var H,v;if(this.length>L.length)H=this,v=L;else H=L,v=this;for(var q=0;q<v.length;q++)this.words[q]=H.words[q]^v.words[q];if(this!==H)for(;q<H.length;q++)this.words[q]=H.words[q];return this.length=H.length,this._strip()},Y.prototype.ixor=function(L){return _((this.negative|L.negative)===0),this.iuxor(L)},Y.prototype.xor=function(L){if(this.length>L.length)return this.clone().ixor(L);return L.clone().ixor(this)},Y.prototype.uxor=function(L){if(this.length>L.length)return this.clone().iuxor(L);return L.clone().iuxor(this)},Y.prototype.inotn=function(L){_(typeof L==="number"&&L>=0);var H=Math.ceil(L/26)|0,v=L%26;if(this._expand(H),v>0)H--;for(var q=0;q<H;q++)this.words[q]=~this.words[q]&67108863;if(v>0)this.words[q]=~this.words[q]&67108863>>26-v;return this._strip()},Y.prototype.notn=function(L){return this.clone().inotn(L)},Y.prototype.setn=function(L,H){_(typeof L==="number"&&L>=0);var v=L/26|0,q=L%26;if(this._expand(v+1),H)this.words[v]=this.words[v]|1<<q;else this.words[v]=this.words[v]&~(1<<q);return this._strip()},Y.prototype.iadd=function(L){var H;if(this.negative!==0&&L.negative===0)return this.negative=0,H=this.isub(L),this.negative^=1,this._normSign();else if(this.negative===0&&L.negative!==0)return L.negative=0,H=this.isub(L),L.negative=1,H._normSign();var v,q;if(this.length>L.length)v=this,q=L;else v=L,q=this;var P=0;for(var O=0;O<q.length;O++)H=(v.words[O]|0)+(q.words[O]|0)+P,this.words[O]=H&67108863,P=H>>>26;for(;P!==0&&O<v.length;O++)H=(v.words[O]|0)+P,this.words[O]=H&67108863,P=H>>>26;if(this.length=v.length,P!==0)this.words[this.length]=P,this.length++;else if(v!==this)for(;O<v.length;O++)this.words[O]=v.words[O];return this},Y.prototype.add=function(L){var H;if(L.negative!==0&&this.negative===0)return L.negative=0,H=this.sub(L),L.negative^=1,H;else if(L.negative===0&&this.negative!==0)return this.negative=0,H=L.sub(this),this.negative=1,H;if(this.length>L.length)return this.clone().iadd(L);return L.clone().iadd(this)},Y.prototype.isub=function(L){if(L.negative!==0){L.negative=0;var H=this.iadd(L);return L.negative=1,H._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(L),this.negative=1,this._normSign();var v=this.cmp(L);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var q,P;if(v>0)q=this,P=L;else q=L,P=this;var O=0;for(var A=0;A<P.length;A++)H=(q.words[A]|0)-(P.words[A]|0)+O,O=H>>26,this.words[A]=H&67108863;for(;O!==0&&A<q.length;A++)H=(q.words[A]|0)+O,O=H>>26,this.words[A]=H&67108863;if(O===0&&A<q.length&&q!==this)for(;A<q.length;A++)this.words[A]=q.words[A];if(this.length=Math.max(this.length,A),q!==this)this.negative=1;return this._strip()},Y.prototype.sub=function(L){return this.clone().isub(L)};function g(L,H,v){v.negative=H.negative^L.negative;var q=L.length+H.length|0;v.length=q,q=q-1|0;var P=L.words[0]|0,O=H.words[0]|0,A=P*O,k=A&67108863,j=A/67108864|0;v.words[0]=k;for(var h=1;h<q;h++){var a=j>>>26,J0=j&67108863,K0=Math.min(h,H.length-1);for(var O0=Math.max(0,h-L.length+1);O0<=K0;O0++){var d=h-O0|0;P=L.words[d]|0,O=H.words[O0]|0,A=P*O+J0,a+=A/67108864|0,J0=A&67108863}v.words[h]=J0|0,j=a|0}if(j!==0)v.words[h]=j|0;else v.length--;return v._strip()}var b=function(L,H,v){var q=L.words,P=H.words,O=v.words,A=0,k,j,h,a=q[0]|0,J0=a&8191,K0=a>>>13,O0=q[1]|0,d=O0&8191,m=O0>>>13,r=q[2]|0,Y0=r&8191,W0=r>>>13,I0=q[3]|0,c=I0&8191,s=I0>>>13,S0=q[4]|0,M0=S0&8191,z0=S0>>>13,c0=q[5]|0,F0=c0&8191,q0=c0>>>13,s0=q[6]|0,k0=s0&8191,n0=s0>>>13,M$=q[7]|0,T0=M$&8191,V0=M$>>>13,X$=q[8]|0,p0=X$&8191,l0=X$>>>13,L0=q[9]|0,N0=L0&8191,B0=L0>>>13,Y$=P[0]|0,u=Y$&8191,_0=Y$>>>13,o=P[1]|0,R0=o&8191,x0=o>>>13,p=P[2]|0,A0=p&8191,v0=p>>>13,X0=P[3]|0,H0=X0&8191,C0=X0>>>13,H$=P[4]|0,d0=H$&8191,e=H$>>>13,E0=P[5]|0,b0=E0&8191,f0=E0>>>13,z$=P[6]|0,a0=z$&8191,U$=z$>>>13,c$=P[7]|0,D$=c$&8191,L$=c$>>>13,B$=P[8]|0,Z$=B$&8191,I$=B$>>>13,I1=P[9]|0,C$=I1&8191,g$=I1>>>13;v.negative=L.negative^H.negative,v.length=19,k=Math.imul(J0,u),j=Math.imul(J0,_0),j=j+Math.imul(K0,u)|0,h=Math.imul(K0,_0);var z1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(z1>>>26)|0,z1&=67108863,k=Math.imul(d,u),j=Math.imul(d,_0),j=j+Math.imul(m,u)|0,h=Math.imul(m,_0),k=k+Math.imul(J0,R0)|0,j=j+Math.imul(J0,x0)|0,j=j+Math.imul(K0,R0)|0,h=h+Math.imul(K0,x0)|0;var U1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(U1>>>26)|0,U1&=67108863,k=Math.imul(Y0,u),j=Math.imul(Y0,_0),j=j+Math.imul(W0,u)|0,h=Math.imul(W0,_0),k=k+Math.imul(d,R0)|0,j=j+Math.imul(d,x0)|0,j=j+Math.imul(m,R0)|0,h=h+Math.imul(m,x0)|0,k=k+Math.imul(J0,A0)|0,j=j+Math.imul(J0,v0)|0,j=j+Math.imul(K0,A0)|0,h=h+Math.imul(K0,v0)|0;var o1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(o1>>>26)|0,o1&=67108863,k=Math.imul(c,u),j=Math.imul(c,_0),j=j+Math.imul(s,u)|0,h=Math.imul(s,_0),k=k+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,x0)|0,j=j+Math.imul(W0,R0)|0,h=h+Math.imul(W0,x0)|0,k=k+Math.imul(d,A0)|0,j=j+Math.imul(d,v0)|0,j=j+Math.imul(m,A0)|0,h=h+Math.imul(m,v0)|0,k=k+Math.imul(J0,H0)|0,j=j+Math.imul(J0,C0)|0,j=j+Math.imul(K0,H0)|0,h=h+Math.imul(K0,C0)|0;var t1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(t1>>>26)|0,t1&=67108863,k=Math.imul(M0,u),j=Math.imul(M0,_0),j=j+Math.imul(z0,u)|0,h=Math.imul(z0,_0),k=k+Math.imul(c,R0)|0,j=j+Math.imul(c,x0)|0,j=j+Math.imul(s,R0)|0,h=h+Math.imul(s,x0)|0,k=k+Math.imul(Y0,A0)|0,j=j+Math.imul(Y0,v0)|0,j=j+Math.imul(W0,A0)|0,h=h+Math.imul(W0,v0)|0,k=k+Math.imul(d,H0)|0,j=j+Math.imul(d,C0)|0,j=j+Math.imul(m,H0)|0,h=h+Math.imul(m,C0)|0,k=k+Math.imul(J0,d0)|0,j=j+Math.imul(J0,e)|0,j=j+Math.imul(K0,d0)|0,h=h+Math.imul(K0,e)|0;var r1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(r1>>>26)|0,r1&=67108863,k=Math.imul(F0,u),j=Math.imul(F0,_0),j=j+Math.imul(q0,u)|0,h=Math.imul(q0,_0),k=k+Math.imul(M0,R0)|0,j=j+Math.imul(M0,x0)|0,j=j+Math.imul(z0,R0)|0,h=h+Math.imul(z0,x0)|0,k=k+Math.imul(c,A0)|0,j=j+Math.imul(c,v0)|0,j=j+Math.imul(s,A0)|0,h=h+Math.imul(s,v0)|0,k=k+Math.imul(Y0,H0)|0,j=j+Math.imul(Y0,C0)|0,j=j+Math.imul(W0,H0)|0,h=h+Math.imul(W0,C0)|0,k=k+Math.imul(d,d0)|0,j=j+Math.imul(d,e)|0,j=j+Math.imul(m,d0)|0,h=h+Math.imul(m,e)|0,k=k+Math.imul(J0,b0)|0,j=j+Math.imul(J0,f0)|0,j=j+Math.imul(K0,b0)|0,h=h+Math.imul(K0,f0)|0;var a1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(a1>>>26)|0,a1&=67108863,k=Math.imul(k0,u),j=Math.imul(k0,_0),j=j+Math.imul(n0,u)|0,h=Math.imul(n0,_0),k=k+Math.imul(F0,R0)|0,j=j+Math.imul(F0,x0)|0,j=j+Math.imul(q0,R0)|0,h=h+Math.imul(q0,x0)|0,k=k+Math.imul(M0,A0)|0,j=j+Math.imul(M0,v0)|0,j=j+Math.imul(z0,A0)|0,h=h+Math.imul(z0,v0)|0,k=k+Math.imul(c,H0)|0,j=j+Math.imul(c,C0)|0,j=j+Math.imul(s,H0)|0,h=h+Math.imul(s,C0)|0,k=k+Math.imul(Y0,d0)|0,j=j+Math.imul(Y0,e)|0,j=j+Math.imul(W0,d0)|0,h=h+Math.imul(W0,e)|0,k=k+Math.imul(d,b0)|0,j=j+Math.imul(d,f0)|0,j=j+Math.imul(m,b0)|0,h=h+Math.imul(m,f0)|0,k=k+Math.imul(J0,a0)|0,j=j+Math.imul(J0,U$)|0,j=j+Math.imul(K0,a0)|0,h=h+Math.imul(K0,U$)|0;var s1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(s1>>>26)|0,s1&=67108863,k=Math.imul(T0,u),j=Math.imul(T0,_0),j=j+Math.imul(V0,u)|0,h=Math.imul(V0,_0),k=k+Math.imul(k0,R0)|0,j=j+Math.imul(k0,x0)|0,j=j+Math.imul(n0,R0)|0,h=h+Math.imul(n0,x0)|0,k=k+Math.imul(F0,A0)|0,j=j+Math.imul(F0,v0)|0,j=j+Math.imul(q0,A0)|0,h=h+Math.imul(q0,v0)|0,k=k+Math.imul(M0,H0)|0,j=j+Math.imul(M0,C0)|0,j=j+Math.imul(z0,H0)|0,h=h+Math.imul(z0,C0)|0,k=k+Math.imul(c,d0)|0,j=j+Math.imul(c,e)|0,j=j+Math.imul(s,d0)|0,h=h+Math.imul(s,e)|0,k=k+Math.imul(Y0,b0)|0,j=j+Math.imul(Y0,f0)|0,j=j+Math.imul(W0,b0)|0,h=h+Math.imul(W0,f0)|0,k=k+Math.imul(d,a0)|0,j=j+Math.imul(d,U$)|0,j=j+Math.imul(m,a0)|0,h=h+Math.imul(m,U$)|0,k=k+Math.imul(J0,D$)|0,j=j+Math.imul(J0,L$)|0,j=j+Math.imul(K0,D$)|0,h=h+Math.imul(K0,L$)|0;var Y1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(Y1>>>26)|0,Y1&=67108863,k=Math.imul(p0,u),j=Math.imul(p0,_0),j=j+Math.imul(l0,u)|0,h=Math.imul(l0,_0),k=k+Math.imul(T0,R0)|0,j=j+Math.imul(T0,x0)|0,j=j+Math.imul(V0,R0)|0,h=h+Math.imul(V0,x0)|0,k=k+Math.imul(k0,A0)|0,j=j+Math.imul(k0,v0)|0,j=j+Math.imul(n0,A0)|0,h=h+Math.imul(n0,v0)|0,k=k+Math.imul(F0,H0)|0,j=j+Math.imul(F0,C0)|0,j=j+Math.imul(q0,H0)|0,h=h+Math.imul(q0,C0)|0,k=k+Math.imul(M0,d0)|0,j=j+Math.imul(M0,e)|0,j=j+Math.imul(z0,d0)|0,h=h+Math.imul(z0,e)|0,k=k+Math.imul(c,b0)|0,j=j+Math.imul(c,f0)|0,j=j+Math.imul(s,b0)|0,h=h+Math.imul(s,f0)|0,k=k+Math.imul(Y0,a0)|0,j=j+Math.imul(Y0,U$)|0,j=j+Math.imul(W0,a0)|0,h=h+Math.imul(W0,U$)|0,k=k+Math.imul(d,D$)|0,j=j+Math.imul(d,L$)|0,j=j+Math.imul(m,D$)|0,h=h+Math.imul(m,L$)|0,k=k+Math.imul(J0,Z$)|0,j=j+Math.imul(J0,I$)|0,j=j+Math.imul(K0,Z$)|0,h=h+Math.imul(K0,I$)|0;var S1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(S1>>>26)|0,S1&=67108863,k=Math.imul(N0,u),j=Math.imul(N0,_0),j=j+Math.imul(B0,u)|0,h=Math.imul(B0,_0),k=k+Math.imul(p0,R0)|0,j=j+Math.imul(p0,x0)|0,j=j+Math.imul(l0,R0)|0,h=h+Math.imul(l0,x0)|0,k=k+Math.imul(T0,A0)|0,j=j+Math.imul(T0,v0)|0,j=j+Math.imul(V0,A0)|0,h=h+Math.imul(V0,v0)|0,k=k+Math.imul(k0,H0)|0,j=j+Math.imul(k0,C0)|0,j=j+Math.imul(n0,H0)|0,h=h+Math.imul(n0,C0)|0,k=k+Math.imul(F0,d0)|0,j=j+Math.imul(F0,e)|0,j=j+Math.imul(q0,d0)|0,h=h+Math.imul(q0,e)|0,k=k+Math.imul(M0,b0)|0,j=j+Math.imul(M0,f0)|0,j=j+Math.imul(z0,b0)|0,h=h+Math.imul(z0,f0)|0,k=k+Math.imul(c,a0)|0,j=j+Math.imul(c,U$)|0,j=j+Math.imul(s,a0)|0,h=h+Math.imul(s,U$)|0,k=k+Math.imul(Y0,D$)|0,j=j+Math.imul(Y0,L$)|0,j=j+Math.imul(W0,D$)|0,h=h+Math.imul(W0,L$)|0,k=k+Math.imul(d,Z$)|0,j=j+Math.imul(d,I$)|0,j=j+Math.imul(m,Z$)|0,h=h+Math.imul(m,I$)|0,k=k+Math.imul(J0,C$)|0,j=j+Math.imul(J0,g$)|0,j=j+Math.imul(K0,C$)|0,h=h+Math.imul(K0,g$)|0;var R1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(R1>>>26)|0,R1&=67108863,k=Math.imul(N0,R0),j=Math.imul(N0,x0),j=j+Math.imul(B0,R0)|0,h=Math.imul(B0,x0),k=k+Math.imul(p0,A0)|0,j=j+Math.imul(p0,v0)|0,j=j+Math.imul(l0,A0)|0,h=h+Math.imul(l0,v0)|0,k=k+Math.imul(T0,H0)|0,j=j+Math.imul(T0,C0)|0,j=j+Math.imul(V0,H0)|0,h=h+Math.imul(V0,C0)|0,k=k+Math.imul(k0,d0)|0,j=j+Math.imul(k0,e)|0,j=j+Math.imul(n0,d0)|0,h=h+Math.imul(n0,e)|0,k=k+Math.imul(F0,b0)|0,j=j+Math.imul(F0,f0)|0,j=j+Math.imul(q0,b0)|0,h=h+Math.imul(q0,f0)|0,k=k+Math.imul(M0,a0)|0,j=j+Math.imul(M0,U$)|0,j=j+Math.imul(z0,a0)|0,h=h+Math.imul(z0,U$)|0,k=k+Math.imul(c,D$)|0,j=j+Math.imul(c,L$)|0,j=j+Math.imul(s,D$)|0,h=h+Math.imul(s,L$)|0,k=k+Math.imul(Y0,Z$)|0,j=j+Math.imul(Y0,I$)|0,j=j+Math.imul(W0,Z$)|0,h=h+Math.imul(W0,I$)|0,k=k+Math.imul(d,C$)|0,j=j+Math.imul(d,g$)|0,j=j+Math.imul(m,C$)|0,h=h+Math.imul(m,g$)|0;var e1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(e1>>>26)|0,e1&=67108863,k=Math.imul(N0,A0),j=Math.imul(N0,v0),j=j+Math.imul(B0,A0)|0,h=Math.imul(B0,v0),k=k+Math.imul(p0,H0)|0,j=j+Math.imul(p0,C0)|0,j=j+Math.imul(l0,H0)|0,h=h+Math.imul(l0,C0)|0,k=k+Math.imul(T0,d0)|0,j=j+Math.imul(T0,e)|0,j=j+Math.imul(V0,d0)|0,h=h+Math.imul(V0,e)|0,k=k+Math.imul(k0,b0)|0,j=j+Math.imul(k0,f0)|0,j=j+Math.imul(n0,b0)|0,h=h+Math.imul(n0,f0)|0,k=k+Math.imul(F0,a0)|0,j=j+Math.imul(F0,U$)|0,j=j+Math.imul(q0,a0)|0,h=h+Math.imul(q0,U$)|0,k=k+Math.imul(M0,D$)|0,j=j+Math.imul(M0,L$)|0,j=j+Math.imul(z0,D$)|0,h=h+Math.imul(z0,L$)|0,k=k+Math.imul(c,Z$)|0,j=j+Math.imul(c,I$)|0,j=j+Math.imul(s,Z$)|0,h=h+Math.imul(s,I$)|0,k=k+Math.imul(Y0,C$)|0,j=j+Math.imul(Y0,g$)|0,j=j+Math.imul(W0,C$)|0,h=h+Math.imul(W0,g$)|0;var B1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(B1>>>26)|0,B1&=67108863,k=Math.imul(N0,H0),j=Math.imul(N0,C0),j=j+Math.imul(B0,H0)|0,h=Math.imul(B0,C0),k=k+Math.imul(p0,d0)|0,j=j+Math.imul(p0,e)|0,j=j+Math.imul(l0,d0)|0,h=h+Math.imul(l0,e)|0,k=k+Math.imul(T0,b0)|0,j=j+Math.imul(T0,f0)|0,j=j+Math.imul(V0,b0)|0,h=h+Math.imul(V0,f0)|0,k=k+Math.imul(k0,a0)|0,j=j+Math.imul(k0,U$)|0,j=j+Math.imul(n0,a0)|0,h=h+Math.imul(n0,U$)|0,k=k+Math.imul(F0,D$)|0,j=j+Math.imul(F0,L$)|0,j=j+Math.imul(q0,D$)|0,h=h+Math.imul(q0,L$)|0,k=k+Math.imul(M0,Z$)|0,j=j+Math.imul(M0,I$)|0,j=j+Math.imul(z0,Z$)|0,h=h+Math.imul(z0,I$)|0,k=k+Math.imul(c,C$)|0,j=j+Math.imul(c,g$)|0,j=j+Math.imul(s,C$)|0,h=h+Math.imul(s,g$)|0;var f1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(f1>>>26)|0,f1&=67108863,k=Math.imul(N0,d0),j=Math.imul(N0,e),j=j+Math.imul(B0,d0)|0,h=Math.imul(B0,e),k=k+Math.imul(p0,b0)|0,j=j+Math.imul(p0,f0)|0,j=j+Math.imul(l0,b0)|0,h=h+Math.imul(l0,f0)|0,k=k+Math.imul(T0,a0)|0,j=j+Math.imul(T0,U$)|0,j=j+Math.imul(V0,a0)|0,h=h+Math.imul(V0,U$)|0,k=k+Math.imul(k0,D$)|0,j=j+Math.imul(k0,L$)|0,j=j+Math.imul(n0,D$)|0,h=h+Math.imul(n0,L$)|0,k=k+Math.imul(F0,Z$)|0,j=j+Math.imul(F0,I$)|0,j=j+Math.imul(q0,Z$)|0,h=h+Math.imul(q0,I$)|0,k=k+Math.imul(M0,C$)|0,j=j+Math.imul(M0,g$)|0,j=j+Math.imul(z0,C$)|0,h=h+Math.imul(z0,g$)|0;var p1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(p1>>>26)|0,p1&=67108863,k=Math.imul(N0,b0),j=Math.imul(N0,f0),j=j+Math.imul(B0,b0)|0,h=Math.imul(B0,f0),k=k+Math.imul(p0,a0)|0,j=j+Math.imul(p0,U$)|0,j=j+Math.imul(l0,a0)|0,h=h+Math.imul(l0,U$)|0,k=k+Math.imul(T0,D$)|0,j=j+Math.imul(T0,L$)|0,j=j+Math.imul(V0,D$)|0,h=h+Math.imul(V0,L$)|0,k=k+Math.imul(k0,Z$)|0,j=j+Math.imul(k0,I$)|0,j=j+Math.imul(n0,Z$)|0,h=h+Math.imul(n0,I$)|0,k=k+Math.imul(F0,C$)|0,j=j+Math.imul(F0,g$)|0,j=j+Math.imul(q0,C$)|0,h=h+Math.imul(q0,g$)|0;var j1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(j1>>>26)|0,j1&=67108863,k=Math.imul(N0,a0),j=Math.imul(N0,U$),j=j+Math.imul(B0,a0)|0,h=Math.imul(B0,U$),k=k+Math.imul(p0,D$)|0,j=j+Math.imul(p0,L$)|0,j=j+Math.imul(l0,D$)|0,h=h+Math.imul(l0,L$)|0,k=k+Math.imul(T0,Z$)|0,j=j+Math.imul(T0,I$)|0,j=j+Math.imul(V0,Z$)|0,h=h+Math.imul(V0,I$)|0,k=k+Math.imul(k0,C$)|0,j=j+Math.imul(k0,g$)|0,j=j+Math.imul(n0,C$)|0,h=h+Math.imul(n0,g$)|0;var v1=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(v1>>>26)|0,v1&=67108863,k=Math.imul(N0,D$),j=Math.imul(N0,L$),j=j+Math.imul(B0,D$)|0,h=Math.imul(B0,L$),k=k+Math.imul(p0,Z$)|0,j=j+Math.imul(p0,I$)|0,j=j+Math.imul(l0,Z$)|0,h=h+Math.imul(l0,I$)|0,k=k+Math.imul(T0,C$)|0,j=j+Math.imul(T0,g$)|0,j=j+Math.imul(V0,C$)|0,h=h+Math.imul(V0,g$)|0;var c2=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(c2>>>26)|0,c2&=67108863,k=Math.imul(N0,Z$),j=Math.imul(N0,I$),j=j+Math.imul(B0,Z$)|0,h=Math.imul(B0,I$),k=k+Math.imul(p0,C$)|0,j=j+Math.imul(p0,g$)|0,j=j+Math.imul(l0,C$)|0,h=h+Math.imul(l0,g$)|0;var YY=(A+k|0)+((j&8191)<<13)|0;A=(h+(j>>>13)|0)+(YY>>>26)|0,YY&=67108863,k=Math.imul(N0,C$),j=Math.imul(N0,g$),j=j+Math.imul(B0,C$)|0,h=Math.imul(B0,g$);var JY=(A+k|0)+((j&8191)<<13)|0;if(A=(h+(j>>>13)|0)+(JY>>>26)|0,JY&=67108863,O[0]=z1,O[1]=U1,O[2]=o1,O[3]=t1,O[4]=r1,O[5]=a1,O[6]=s1,O[7]=Y1,O[8]=S1,O[9]=R1,O[10]=e1,O[11]=B1,O[12]=f1,O[13]=p1,O[14]=j1,O[15]=v1,O[16]=c2,O[17]=YY,O[18]=JY,A!==0)O[19]=A,v.length++;return v};if(!Math.imul)b=g;function l(L,H,v){v.negative=H.negative^L.negative,v.length=L.length+H.length;var q=0,P=0;for(var O=0;O<v.length-1;O++){var A=P;P=0;var k=q&67108863,j=Math.min(O,H.length-1);for(var h=Math.max(0,O-L.length+1);h<=j;h++){var a=O-h,J0=L.words[a]|0,K0=H.words[h]|0,O0=J0*K0,d=O0&67108863;A=A+(O0/67108864|0)|0,d=d+k|0,k=d&67108863,A=A+(d>>>26)|0,P+=A>>>26,A&=67108863}v.words[O]=k,q=A,A=P}if(q!==0)v.words[O]=q;else v.length--;return v._strip()}function i(L,H,v){return l(L,H,v)}Y.prototype.mulTo=function(L,H){var v,q=this.length+L.length;if(this.length===10&&L.length===10)v=b(this,L,H);else if(q<63)v=g(this,L,H);else if(q<1024)v=l(this,L,H);else v=i(this,L,H);return v};function $0(L,H){this.x=L,this.y=H}$0.prototype.makeRBT=function(L){var H=Array(L),v=Y.prototype._countBits(L)-1;for(var q=0;q<L;q++)H[q]=this.revBin(q,v,L);return H},$0.prototype.revBin=function(L,H,v){if(L===0||L===v-1)return L;var q=0;for(var P=0;P<H;P++)q|=(L&1)<<H-P-1,L>>=1;return q},$0.prototype.permute=function(L,H,v,q,P,O){for(var A=0;A<O;A++)q[A]=H[L[A]],P[A]=v[L[A]]},$0.prototype.transform=function(L,H,v,q,P,O){this.permute(O,L,H,v,q,P);for(var A=1;A<P;A<<=1){var k=A<<1,j=Math.cos(2*Math.PI/k),h=Math.sin(2*Math.PI/k);for(var a=0;a<P;a+=k){var J0=j,K0=h;for(var O0=0;O0<A;O0++){var d=v[a+O0],m=q[a+O0],r=v[a+O0+A],Y0=q[a+O0+A],W0=J0*r-K0*Y0;if(Y0=J0*Y0+K0*r,r=W0,v[a+O0]=d+r,q[a+O0]=m+Y0,v[a+O0+A]=d-r,q[a+O0+A]=m-Y0,O0!==k)W0=j*J0-h*K0,K0=j*K0+h*J0,J0=W0}}}},$0.prototype.guessLen13b=function(L,H){var v=Math.max(H,L)|1,q=v&1,P=0;for(v=v/2|0;v;v=v>>>1)P++;return 1<<P+1+q},$0.prototype.conjugate=function(L,H,v){if(v<=1)return;for(var q=0;q<v/2;q++){var P=L[q];L[q]=L[v-q-1],L[v-q-1]=P,P=H[q],H[q]=-H[v-q-1],H[v-q-1]=-P}},$0.prototype.normalize13b=function(L,H){var v=0;for(var q=0;q<H/2;q++){var P=Math.round(L[2*q+1]/H)*8192+Math.round(L[2*q]/H)+v;if(L[q]=P&67108863,P<67108864)v=0;else v=P/67108864|0}return L},$0.prototype.convert13b=function(L,H,v,q){var P=0;for(var O=0;O<H;O++)P=P+(L[O]|0),v[2*O]=P&8191,P=P>>>13,v[2*O+1]=P&8191,P=P>>>13;for(O=2*H;O<q;++O)v[O]=0;_(P===0),_((P&-8192)===0)},$0.prototype.stub=function(L){var H=Array(L);for(var v=0;v<L;v++)H[v]=0;return H},$0.prototype.mulp=function(L,H,v){var q=2*this.guessLen13b(L.length,H.length),P=this.makeRBT(q),O=this.stub(q),A=Array(q),k=Array(q),j=Array(q),h=Array(q),a=Array(q),J0=Array(q),K0=v.words;K0.length=q,this.convert13b(L.words,L.length,A,q),this.convert13b(H.words,H.length,h,q),this.transform(A,O,k,j,q,P),this.transform(h,O,a,J0,q,P);for(var O0=0;O0<q;O0++){var d=k[O0]*a[O0]-j[O0]*J0[O0];j[O0]=k[O0]*J0[O0]+j[O0]*a[O0],k[O0]=d}return this.conjugate(k,j,q),this.transform(k,j,K0,O,q,P),this.conjugate(K0,O,q),this.normalize13b(K0,q),v.negative=L.negative^H.negative,v.length=L.length+H.length,v._strip()},Y.prototype.mul=function(L){var H=new Y(null);return H.words=Array(this.length+L.length),this.mulTo(L,H)},Y.prototype.mulf=function(L){var H=new Y(null);return H.words=Array(this.length+L.length),i(this,L,H)},Y.prototype.imul=function(L){return this.clone().mulTo(L,this)},Y.prototype.imuln=function(L){var H=L<0;if(H)L=-L;_(typeof L==="number"),_(L<67108864);var v=0;for(var q=0;q<this.length;q++){var P=(this.words[q]|0)*L,O=(P&67108863)+(v&67108863);v>>=26,v+=P/67108864|0,v+=O>>>26,this.words[q]=O&67108863}if(v!==0)this.words[q]=v,this.length++;return this.length=L===0?1:this.length,H?this.ineg():this},Y.prototype.muln=function(L){return this.clone().imuln(L)},Y.prototype.sqr=function(){return this.mul(this)},Y.prototype.isqr=function(){return this.imul(this.clone())},Y.prototype.pow=function(L){var H=y(L);if(H.length===0)return new Y(1);var v=this;for(var q=0;q<H.length;q++,v=v.sqr())if(H[q]!==0)break;if(++q<H.length)for(var P=v.sqr();q<H.length;q++,P=P.sqr()){if(H[q]===0)continue;v=v.mul(P)}return v},Y.prototype.iushln=function(L){_(typeof L==="number"&&L>=0);var H=L%26,v=(L-H)/26,q=67108863>>>26-H<<26-H,P;if(H!==0){var O=0;for(P=0;P<this.length;P++){var A=this.words[P]&q,k=(this.words[P]|0)-A<<H;this.words[P]=k|O,O=A>>>26-H}if(O)this.words[P]=O,this.length++}if(v!==0){for(P=this.length-1;P>=0;P--)this.words[P+v]=this.words[P];for(P=0;P<v;P++)this.words[P]=0;this.length+=v}return this._strip()},Y.prototype.ishln=function(L){return _(this.negative===0),this.iushln(L)},Y.prototype.iushrn=function(L,H,v){_(typeof L==="number"&&L>=0);var q;if(H)q=(H-H%26)/26;else q=0;var P=L%26,O=Math.min((L-P)/26,this.length),A=67108863^67108863>>>P<<P,k=v;if(q-=O,q=Math.max(0,q),k){for(var j=0;j<O;j++)k.words[j]=this.words[j];k.length=O}if(O===0);else if(this.length>O){this.length-=O;for(j=0;j<this.length;j++)this.words[j]=this.words[j+O]}else this.words[0]=0,this.length=1;var h=0;for(j=this.length-1;j>=0&&(h!==0||j>=q);j--){var a=this.words[j]|0;this.words[j]=h<<26-P|a>>>P,h=a&A}if(k&&h!==0)k.words[k.length++]=h;if(this.length===0)this.words[0]=0,this.length=1;return this._strip()},Y.prototype.ishrn=function(L,H,v){return _(this.negative===0),this.iushrn(L,H,v)},Y.prototype.shln=function(L){return this.clone().ishln(L)},Y.prototype.ushln=function(L){return this.clone().iushln(L)},Y.prototype.shrn=function(L){return this.clone().ishrn(L)},Y.prototype.ushrn=function(L){return this.clone().iushrn(L)},Y.prototype.testn=function(L){_(typeof L==="number"&&L>=0);var H=L%26,v=(L-H)/26,q=1<<H;if(this.length<=v)return!1;var P=this.words[v];return!!(P&q)},Y.prototype.imaskn=function(L){_(typeof L==="number"&&L>=0);var H=L%26,v=(L-H)/26;if(_(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(H!==0)v++;if(this.length=Math.min(v,this.length),H!==0){var q=67108863^67108863>>>H<<H;this.words[this.length-1]&=q}return this._strip()},Y.prototype.maskn=function(L){return this.clone().imaskn(L)},Y.prototype.iaddn=function(L){if(_(typeof L==="number"),_(L<67108864),L<0)return this.isubn(-L);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<=L)return this.words[0]=L-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(L),this.negative=1,this}return this._iaddn(L)},Y.prototype._iaddn=function(L){this.words[0]+=L;for(var H=0;H<this.length&&this.words[H]>=67108864;H++)if(this.words[H]-=67108864,H===this.length-1)this.words[H+1]=1;else this.words[H+1]++;return this.length=Math.max(this.length,H+1),this},Y.prototype.isubn=function(L){if(_(typeof L==="number"),_(L<67108864),L<0)return this.iaddn(-L);if(this.negative!==0)return this.negative=0,this.iaddn(L),this.negative=1,this;if(this.words[0]-=L,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var H=0;H<this.length&&this.words[H]<0;H++)this.words[H]+=67108864,this.words[H+1]-=1;return this._strip()},Y.prototype.addn=function(L){return this.clone().iaddn(L)},Y.prototype.subn=function(L){return this.clone().isubn(L)},Y.prototype.iabs=function(){return this.negative=0,this},Y.prototype.abs=function(){return this.clone().iabs()},Y.prototype._ishlnsubmul=function(L,H,v){var q=L.length+v,P;this._expand(q);var O,A=0;for(P=0;P<L.length;P++){O=(this.words[P+v]|0)+A;var k=(L.words[P]|0)*H;O-=k&67108863,A=(O>>26)-(k/67108864|0),this.words[P+v]=O&67108863}for(;P<this.length-v;P++)O=(this.words[P+v]|0)+A,A=O>>26,this.words[P+v]=O&67108863;if(A===0)return this._strip();_(A===-1),A=0;for(P=0;P<this.length;P++)O=-(this.words[P]|0)+A,A=O>>26,this.words[P]=O&67108863;return this.negative=1,this._strip()},Y.prototype._wordDiv=function(L,H){var v=this.length-L.length,q=this.clone(),P=L,O=P.words[P.length-1]|0,A=this._countBits(O);if(v=26-A,v!==0)P=P.ushln(v),q.iushln(v),O=P.words[P.length-1]|0;var k=q.length-P.length,j;if(H!=="mod"){j=new Y(null),j.length=k+1,j.words=Array(j.length);for(var h=0;h<j.length;h++)j.words[h]=0}var a=q.clone()._ishlnsubmul(P,1,k);if(a.negative===0){if(q=a,j)j.words[k]=1}for(var J0=k-1;J0>=0;J0--){var K0=(q.words[P.length+J0]|0)*67108864+(q.words[P.length+J0-1]|0);K0=Math.min(K0/O|0,67108863),q._ishlnsubmul(P,K0,J0);while(q.negative!==0)if(K0--,q.negative=0,q._ishlnsubmul(P,1,J0),!q.isZero())q.negative^=1;if(j)j.words[J0]=K0}if(j)j._strip();if(q._strip(),H!=="div"&&v!==0)q.iushrn(v);return{div:j||null,mod:q}},Y.prototype.divmod=function(L,H,v){if(_(!L.isZero()),this.isZero())return{div:new Y(0),mod:new Y(0)};var q,P,O;if(this.negative!==0&&L.negative===0){if(O=this.neg().divmod(L,H),H!=="mod")q=O.div.neg();if(H!=="div"){if(P=O.mod.neg(),v&&P.negative!==0)P.iadd(L)}return{div:q,mod:P}}if(this.negative===0&&L.negative!==0){if(O=this.divmod(L.neg(),H),H!=="mod")q=O.div.neg();return{div:q,mod:O.mod}}if((this.negative&L.negative)!==0){if(O=this.neg().divmod(L.neg(),H),H!=="div"){if(P=O.mod.neg(),v&&P.negative!==0)P.isub(L)}return{div:O.div,mod:P}}if(L.length>this.length||this.cmp(L)<0)return{div:new Y(0),mod:this};if(L.length===1){if(H==="div")return{div:this.divn(L.words[0]),mod:null};if(H==="mod")return{div:null,mod:new Y(this.modrn(L.words[0]))};return{div:this.divn(L.words[0]),mod:new Y(this.modrn(L.words[0]))}}return this._wordDiv(L,H)},Y.prototype.div=function(L){return this.divmod(L,"div",!1).div},Y.prototype.mod=function(L){return this.divmod(L,"mod",!1).mod},Y.prototype.umod=function(L){return this.divmod(L,"mod",!0).mod},Y.prototype.divRound=function(L){var H=this.divmod(L);if(H.mod.isZero())return H.div;var v=H.div.negative!==0?H.mod.isub(L):H.mod,q=L.ushrn(1),P=L.andln(1),O=v.cmp(q);if(O<0||P===1&&O===0)return H.div;return H.div.negative!==0?H.div.isubn(1):H.div.iaddn(1)},Y.prototype.modrn=function(L){var H=L<0;if(H)L=-L;_(L<=67108863);var v=67108864%L,q=0;for(var P=this.length-1;P>=0;P--)q=(v*q+(this.words[P]|0))%L;return H?-q:q},Y.prototype.modn=function(L){return this.modrn(L)},Y.prototype.idivn=function(L){var H=L<0;if(H)L=-L;_(L<=67108863);var v=0;for(var q=this.length-1;q>=0;q--){var P=(this.words[q]|0)+v*67108864;this.words[q]=P/L|0,v=P%L}return this._strip(),H?this.ineg():this},Y.prototype.divn=function(L){return this.clone().idivn(L)},Y.prototype.egcd=function(L){_(L.negative===0),_(!L.isZero());var H=this,v=L.clone();if(H.negative!==0)H=H.umod(L);else H=H.clone();var q=new Y(1),P=new Y(0),O=new Y(0),A=new Y(1),k=0;while(H.isEven()&&v.isEven())H.iushrn(1),v.iushrn(1),++k;var j=v.clone(),h=H.clone();while(!H.isZero()){for(var a=0,J0=1;(H.words[0]&J0)===0&&a<26;++a,J0<<=1);if(a>0){H.iushrn(a);while(a-- >0){if(q.isOdd()||P.isOdd())q.iadd(j),P.isub(h);q.iushrn(1),P.iushrn(1)}}for(var K0=0,O0=1;(v.words[0]&O0)===0&&K0<26;++K0,O0<<=1);if(K0>0){v.iushrn(K0);while(K0-- >0){if(O.isOdd()||A.isOdd())O.iadd(j),A.isub(h);O.iushrn(1),A.iushrn(1)}}if(H.cmp(v)>=0)H.isub(v),q.isub(O),P.isub(A);else v.isub(H),O.isub(q),A.isub(P)}return{a:O,b:A,gcd:v.iushln(k)}},Y.prototype._invmp=function(L){_(L.negative===0),_(!L.isZero());var H=this,v=L.clone();if(H.negative!==0)H=H.umod(L);else H=H.clone();var q=new Y(1),P=new Y(0),O=v.clone();while(H.cmpn(1)>0&&v.cmpn(1)>0){for(var A=0,k=1;(H.words[0]&k)===0&&A<26;++A,k<<=1);if(A>0){H.iushrn(A);while(A-- >0){if(q.isOdd())q.iadd(O);q.iushrn(1)}}for(var j=0,h=1;(v.words[0]&h)===0&&j<26;++j,h<<=1);if(j>0){v.iushrn(j);while(j-- >0){if(P.isOdd())P.iadd(O);P.iushrn(1)}}if(H.cmp(v)>=0)H.isub(v),q.isub(P);else v.isub(H),P.isub(q)}var a;if(H.cmpn(1)===0)a=q;else a=P;if(a.cmpn(0)<0)a.iadd(L);return a},Y.prototype.gcd=function(L){if(this.isZero())return L.abs();if(L.isZero())return this.abs();var H=this.clone(),v=L.clone();H.negative=0,v.negative=0;for(var q=0;H.isEven()&&v.isEven();q++)H.iushrn(1),v.iushrn(1);do{while(H.isEven())H.iushrn(1);while(v.isEven())v.iushrn(1);var P=H.cmp(v);if(P<0){var O=H;H=v,v=O}else if(P===0||v.cmpn(1)===0)break;H.isub(v)}while(!0);return v.iushln(q)},Y.prototype.invm=function(L){return this.egcd(L).a.umod(L)},Y.prototype.isEven=function(){return(this.words[0]&1)===0},Y.prototype.isOdd=function(){return(this.words[0]&1)===1},Y.prototype.andln=function(L){return this.words[0]&L},Y.prototype.bincn=function(L){_(typeof L==="number");var H=L%26,v=(L-H)/26,q=1<<H;if(this.length<=v)return this._expand(v+1),this.words[v]|=q,this;var P=q;for(var O=v;P!==0&&O<this.length;O++){var A=this.words[O]|0;A+=P,P=A>>>26,A&=67108863,this.words[O]=A}if(P!==0)this.words[O]=P,this.length++;return this},Y.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Y.prototype.cmpn=function(L){var H=L<0;if(this.negative!==0&&!H)return-1;if(this.negative===0&&H)return 1;this._strip();var v;if(this.length>1)v=1;else{if(H)L=-L;_(L<=67108863,"Number is too big");var q=this.words[0]|0;v=q===L?0:q<L?-1:1}if(this.negative!==0)return-v|0;return v},Y.prototype.cmp=function(L){if(this.negative!==0&&L.negative===0)return-1;if(this.negative===0&&L.negative!==0)return 1;var H=this.ucmp(L);if(this.negative!==0)return-H|0;return H},Y.prototype.ucmp=function(L){if(this.length>L.length)return 1;if(this.length<L.length)return-1;var H=0;for(var v=this.length-1;v>=0;v--){var q=this.words[v]|0,P=L.words[v]|0;if(q===P)continue;if(q<P)H=-1;else if(q>P)H=1;break}return H},Y.prototype.gtn=function(L){return this.cmpn(L)===1},Y.prototype.gt=function(L){return this.cmp(L)===1},Y.prototype.gten=function(L){return this.cmpn(L)>=0},Y.prototype.gte=function(L){return this.cmp(L)>=0},Y.prototype.ltn=function(L){return this.cmpn(L)===-1},Y.prototype.lt=function(L){return this.cmp(L)===-1},Y.prototype.lten=function(L){return this.cmpn(L)<=0},Y.prototype.lte=function(L){return this.cmp(L)<=0},Y.prototype.eqn=function(L){return this.cmpn(L)===0},Y.prototype.eq=function(L){return this.cmp(L)===0},Y.red=function(L){return new D(L)},Y.prototype.toRed=function(L){return _(!this.red,"Already a number in reduction context"),_(this.negative===0,"red works only with positives"),L.convertTo(this)._forceRed(L)},Y.prototype.fromRed=function(){return _(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Y.prototype._forceRed=function(L){return this.red=L,this},Y.prototype.forceRed=function(L){return _(!this.red,"Already a number in reduction context"),this._forceRed(L)},Y.prototype.redAdd=function(L){return _(this.red,"redAdd works only with red numbers"),this.red.add(this,L)},Y.prototype.redIAdd=function(L){return _(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,L)},Y.prototype.redSub=function(L){return _(this.red,"redSub works only with red numbers"),this.red.sub(this,L)},Y.prototype.redISub=function(L){return _(this.red,"redISub works only with red numbers"),this.red.isub(this,L)},Y.prototype.redShl=function(L){return _(this.red,"redShl works only with red numbers"),this.red.shl(this,L)},Y.prototype.redMul=function(L){return _(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.mul(this,L)},Y.prototype.redIMul=function(L){return _(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.imul(this,L)},Y.prototype.redSqr=function(){return _(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Y.prototype.redISqr=function(){return _(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Y.prototype.redSqrt=function(){return _(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Y.prototype.redInvm=function(){return _(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Y.prototype.redNeg=function(){return _(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Y.prototype.redPow=function(L){return _(this.red&&!L.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,L)};var Q0={k256:null,p224:null,p192:null,p25519:null};function G0(L,H){this.name=L,this.p=new Y(H,16),this.n=this.p.bitLength(),this.k=new Y(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}G0.prototype._tmp=function(){var L=new Y(null);return L.words=Array(Math.ceil(this.n/13)),L},G0.prototype.ireduce=function(L){var H=L,v;do this.split(H,this.tmp),H=this.imulK(H),H=H.iadd(this.tmp),v=H.bitLength();while(v>this.n);var q=v<this.n?-1:H.ucmp(this.p);if(q===0)H.words[0]=0,H.length=1;else if(q>0)H.isub(this.p);else if(H.strip!==void 0)H.strip();else H._strip();return H},G0.prototype.split=function(L,H){L.iushrn(this.n,0,H)},G0.prototype.imulK=function(L){return L.imul(this.k)};function D0(){G0.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}J(D0,G0),D0.prototype.split=function(L,H){var v=4194303,q=Math.min(L.length,9);for(var P=0;P<q;P++)H.words[P]=L.words[P];if(H.length=q,L.length<=9){L.words[0]=0,L.length=1;return}var O=L.words[9];H.words[H.length++]=O&v;for(P=10;P<L.length;P++){var A=L.words[P]|0;L.words[P-10]=(A&v)<<4|O>>>22,O=A}if(O>>>=22,L.words[P-10]=O,O===0&&L.length>10)L.length-=10;else L.length-=9},D0.prototype.imulK=function(L){L.words[L.length]=0,L.words[L.length+1]=0,L.length+=2;var H=0;for(var v=0;v<L.length;v++){var q=L.words[v]|0;H+=q*977,L.words[v]=H&67108863,H=q*64+(H/67108864|0)}if(L.words[L.length-1]===0){if(L.length--,L.words[L.length-1]===0)L.length--}return L};function t(){G0.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}J(t,G0);function P0(){G0.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}J(P0,G0);function Q(){G0.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}J(Q,G0),Q.prototype.imulK=function(L){var H=0;for(var v=0;v<L.length;v++){var q=(L.words[v]|0)*19+H,P=q&67108863;q>>>=26,L.words[v]=P,H=q}if(H!==0)L.words[L.length++]=H;return L},Y._prime=function(L){if(Q0[L])return Q0[L];var H;if(L==="k256")H=new D0;else if(L==="p224")H=new t;else if(L==="p192")H=new P0;else if(L==="p25519")H=new Q;else throw Error("Unknown prime "+L);return Q0[L]=H,H};function D(L){if(typeof L==="string"){var H=Y._prime(L);this.m=H.p,this.prime=H}else _(L.gtn(1),"modulus must be greater than 1"),this.m=L,this.prime=null}D.prototype._verify1=function(L){_(L.negative===0,"red works only with positives"),_(L.red,"red works only with red numbers")},D.prototype._verify2=function(L,H){_((L.negative|H.negative)===0,"red works only with positives"),_(L.red&&L.red===H.red,"red works only with red numbers")},D.prototype.imod=function(L){if(this.prime)return this.prime.ireduce(L)._forceRed(this);return T(L,L.umod(this.m)._forceRed(this)),L},D.prototype.neg=function(L){if(L.isZero())return L.clone();return this.m.sub(L)._forceRed(this)},D.prototype.add=function(L,H){this._verify2(L,H);var v=L.add(H);if(v.cmp(this.m)>=0)v.isub(this.m);return v._forceRed(this)},D.prototype.iadd=function(L,H){this._verify2(L,H);var v=L.iadd(H);if(v.cmp(this.m)>=0)v.isub(this.m);return v},D.prototype.sub=function(L,H){this._verify2(L,H);var v=L.sub(H);if(v.cmpn(0)<0)v.iadd(this.m);return v._forceRed(this)},D.prototype.isub=function(L,H){this._verify2(L,H);var v=L.isub(H);if(v.cmpn(0)<0)v.iadd(this.m);return v},D.prototype.shl=function(L,H){return this._verify1(L),this.imod(L.ushln(H))},D.prototype.imul=function(L,H){return this._verify2(L,H),this.imod(L.imul(H))},D.prototype.mul=function(L,H){return this._verify2(L,H),this.imod(L.mul(H))},D.prototype.isqr=function(L){return this.imul(L,L.clone())},D.prototype.sqr=function(L){return this.mul(L,L)},D.prototype.sqrt=function(L){if(L.isZero())return L.clone();var H=this.m.andln(3);if(_(H%2===1),H===3){var v=this.m.add(new Y(1)).iushrn(2);return this.pow(L,v)}var q=this.m.subn(1),P=0;while(!q.isZero()&&q.andln(1)===0)P++,q.iushrn(1);_(!q.isZero());var O=new Y(1).toRed(this),A=O.redNeg(),k=this.m.subn(1).iushrn(1),j=this.m.bitLength();j=new Y(2*j*j).toRed(this);while(this.pow(j,k).cmp(A)!==0)j.redIAdd(A);var h=this.pow(j,q),a=this.pow(L,q.addn(1).iushrn(1)),J0=this.pow(L,q),K0=P;while(J0.cmp(O)!==0){var O0=J0;for(var d=0;O0.cmp(O)!==0;d++)O0=O0.redSqr();_(d<K0);var m=this.pow(h,new Y(1).iushln(K0-d-1));a=a.redMul(m),h=m.redSqr(),J0=J0.redMul(h),K0=d}return a},D.prototype.invm=function(L){var H=L._invmp(this.m);if(H.negative!==0)return H.negative=0,this.imod(H).redNeg();else return this.imod(H)},D.prototype.pow=function(L,H){if(H.isZero())return new Y(1).toRed(this);if(H.cmpn(1)===0)return L.clone();var v=4,q=Array(1<<v);q[0]=new Y(1).toRed(this),q[1]=L;for(var P=2;P<q.length;P++)q[P]=this.mul(q[P-1],L);var O=q[0],A=0,k=0,j=H.bitLength()%26;if(j===0)j=26;for(P=H.length-1;P>=0;P--){var h=H.words[P];for(var a=j-1;a>=0;a--){var J0=h>>a&1;if(O!==q[0])O=this.sqr(O);if(J0===0&&A===0){k=0;continue}if(A<<=1,A|=J0,k++,k!==v&&(P!==0||a!==0))continue;O=this.mul(O,q[A]),k=0,A=0}j=26}return O},D.prototype.convertTo=function(L){var H=L.umod(this.m);return H===L?H.clone():H},D.prototype.convertFrom=function(L){var H=L.clone();return H.red=null,H},Y.mont=function(L){return new F(L)};function F(L){if(D.call(this,L),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new Y(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}J(F,D),F.prototype.convertTo=function(L){return this.imod(L.ushln(this.shift))},F.prototype.convertFrom=function(L){var H=this.imod(L.mul(this.rinv));return H.red=null,H},F.prototype.imul=function(L,H){if(L.isZero()||H.isZero())return L.words[0]=0,L.length=1,L;var v=L.imul(H),q=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),P=v.isub(q).iushrn(this.shift),O=P;if(P.cmp(this.m)>=0)O=P.isub(this.m);else if(P.cmpn(0)<0)O=P.iadd(this.m);return O._forceRed(this)},F.prototype.mul=function(L,H){if(L.isZero()||H.isZero())return new Y(0)._forceRed(this);var v=L.mul(H),q=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),P=v.isub(q).iushrn(this.shift),O=P;if(P.cmp(this.m)>=0)O=P.isub(this.m);else if(P.cmpn(0)<0)O=P.iadd(this.m);return O._forceRed(this)},F.prototype.invm=function(L){var H=this.imod(L._invmp(this.m).mul(this.r2));return H._forceRed(this)}})(typeof I>"u"||I,$)}),$B=$$(($,I)=>{var G=Kn(),Z=wZ(),_=oU().Buffer;function J(R){var M=R.modulus.byteLength(),E;do E=new G(Z(M));while(E.cmp(R.modulus)>=0||!E.umod(R.prime1)||!E.umod(R.prime2));return E}function Y(R){var M=J(R),E=M.toRed(G.mont(R.modulus)).redPow(new G(R.publicExponent)).fromRed();return{blinder:E,unblinder:M.invm(R.modulus)}}function W(R,M){var E=Y(M),T=M.modulus.byteLength(),S=new G(R).mul(E.blinder).umod(M.modulus),N=S.toRed(G.mont(M.prime1)),B=S.toRed(G.mont(M.prime2)),x=M.coefficient,w=M.prime1,y=M.prime2,g=N.redPow(M.exponent1).fromRed(),b=B.redPow(M.exponent2).fromRed(),l=g.isub(b).imul(x).umod(w).imul(y);return b.iadd(l).imul(E.unblinder).umod(M.modulus).toArrayLike(_,"be",T)}W.getr=J,I.exports=W}),Wn=$$(($,I)=>{var G=rN(),Z=wZ(),_=xZ(),J=aN(),Y=sN(),W=ZW(),R=eN(),M=$B(),E=oU().Buffer;I.exports=function(B,x,w){var y;if(B.padding)y=B.padding;else if(w)y=1;else y=4;var g=G(B),b;if(y===4)b=T(g,x);else if(y===1)b=S(g,x,w);else if(y===3){if(b=new W(x),b.cmp(g.modulus)>=0)throw Error("data too long for modulus")}else throw Error("unknown padding");if(w)return M(b,g);else return R(b,g)};function T(B,x){var w=B.modulus.byteLength(),y=x.length,g=_("sha1").update(E.alloc(0)).digest(),b=g.length,l=2*b;if(y>w-l-2)throw Error("message too long");var i=E.alloc(w-y-l-2),$0=w-b-1,Q0=Z(b),G0=Y(E.concat([g,i,E.alloc(1,1),x],$0),J(Q0,$0)),D0=Y(Q0,J(G0,b));return new W(E.concat([E.alloc(1),D0,G0],w))}function S(B,x,w){var y=x.length,g=B.modulus.byteLength();if(y>g-11)throw Error("message too long");var b;if(w)b=E.alloc(g-y-3,255);else b=N(g-y-3);return new W(E.concat([E.from([0,w?1:2]),b,E.alloc(1),x],g))}function N(B){var x=E.allocUnsafe(B),w=0,y=Z(B*2),g=0,b;while(w<B){if(g===y.length)y=Z(B*2),g=0;if(b=y[g++],b)x[w++]=b}return x}}),Hn=$$(($,I)=>{var G=rN(),Z=aN(),_=sN(),J=ZW(),Y=$B(),W=xZ(),R=eN(),M=oU().Buffer;I.exports=function(N,B,x){var w;if(N.padding)w=N.padding;else if(x)w=1;else w=4;var y=G(N),g=y.modulus.byteLength();if(B.length>g||new J(B).cmp(y.modulus)>=0)throw Error("decryption error");var b;if(x)b=R(new J(B),y);else b=Y(B,y);var l=M.alloc(g-b.length);if(b=M.concat([l,b],g),w===4)return E(y,b);else if(w===1)return T(y,b,x);else if(w===3)return b;else throw Error("unknown padding")};function E(N,B){var x=N.modulus.byteLength(),w=W("sha1").update(M.alloc(0)).digest(),y=w.length;if(B[0]!==0)throw Error("decryption error");var g=B.slice(1,y+1),b=B.slice(y+1),l=_(g,Z(b,y)),i=_(b,Z(l,x-y-1));if(S(w,i.slice(0,y)))throw Error("decryption error");var $0=y;while(i[$0]===0)$0++;if(i[$0++]!==1)throw Error("decryption error");return i.slice($0)}function T(N,B,x){var w=B.slice(0,2),y=2,g=0;while(B[y++]!==0)if(y>=B.length){g++;break}var b=B.slice(2,y-1);if(w.toString("hex")!=="0002"&&!x||w.toString("hex")!=="0001"&&x)g++;if(b.length<8)g++;if(g)throw Error("decryption error");return B.slice(y)}function S(N,B){N=M.from(N),B=M.from(B);var x=0,w=N.length;if(N.length!==B.length)x++,w=Math.min(N.length,B.length);var y=-1;while(++y<w)x+=N[y]^B[y];return x}}),UW=$$(($)=>{$.publicEncrypt=Wn(),$.privateDecrypt=Hn(),$.privateEncrypt=function(I,G){return $.publicEncrypt(I,G,!0)},$.publicDecrypt=function(I,G){return $.privateDecrypt(I,G,!0)}}),Fn=$$(($)=>{var I=(d1(),V$(k6));if(typeof I.publicEncrypt!=="function")I=UW();if($.publicEncrypt=I.publicEncrypt,$.privateDecrypt=I.privateDecrypt,typeof I.privateEncrypt!=="function")$.privateEncrypt=UW().privateEncrypt;else $.privateEncrypt=I.privateEncrypt;if(typeof I.publicDecrypt!=="function")$.publicDecrypt=UW().publicDecrypt;else $.publicDecrypt=I.publicDecrypt}),Tn=$$(($)=>{var I=oU(),G=wZ(),Z=I.Buffer,_=I.kMaxLength,J=globalThis.crypto||globalThis.msCrypto,Y=Math.pow(2,32)-1;function W(S,N){if(typeof S!=="number"||S!==S)throw TypeError("offset must be a number");if(S>Y||S<0)throw TypeError("offset must be a uint32");if(S>_||S>N)throw RangeError("offset out of range")}function R(S,N,B){if(typeof S!=="number"||S!==S)throw TypeError("size must be a number");if(S>Y||S<0)throw TypeError("size must be a uint32");if(S+N>B||S>_)throw RangeError("buffer too small")}J&&J.getRandomValues,$.randomFill=M,$.randomFillSync=T;function M(S,N,B,x){if(!Z.isBuffer(S)&&!(S instanceof globalThis.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof N==="function")x=N,N=0,B=S.length;else if(typeof B==="function")x=B,B=S.length-N;else if(typeof x!=="function")throw TypeError('"cb" argument must be a function');return W(N,S.length),R(B,N,S.length),E(S,N,B,x)}function E(S,N,B,x){if(!1)var w,y;if(x){G(B,function(b,l){if(b)return x(b);l.copy(S,N),x(null,S)});return}var g=G(B);return g.copy(S,N),S}function T(S,N,B){if(typeof N>"u")N=0;if(!Z.isBuffer(S)&&!(S instanceof globalThis.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if(W(N,S.length),B===void 0)B=S.length-N;return R(B,N,S.length),E(S,N,B)}}),Mn=$$(($,I)=>{var G=(d1(),V$(k6));if(typeof G.randomFill==="function"&&typeof G.randomFillSync==="function")$.randomFill=G.randomFill,$.randomFillSync=G.randomFillSync;else I.exports=Tn()}),An=$$(($)=>{$.randomBytes=$.rng=$.pseudoRandomBytes=$.prng=wZ(),$.createHash=$.Hash=xZ(),$.createHmac=$.Hmac=qN();var I=lh(),G=Object.keys(I),Z=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(G);$.getHashes=function(){return Z};var _=hN();$.pbkdf2=_.pbkdf2,$.pbkdf2Sync=_.pbkdf2Sync;var J=vu();$.Cipher=J.Cipher,$.createCipher=J.createCipher,$.Cipheriv=J.Cipheriv,$.createCipheriv=J.createCipheriv,$.Decipher=J.Decipher,$.createDecipher=J.createDecipher,$.Decipheriv=J.Decipheriv,$.createDecipheriv=J.createDecipheriv,$.getCiphers=J.getCiphers,$.listCiphers=J.listCiphers;var Y=Cu();$.DiffieHellmanGroup=Y.DiffieHellmanGroup,$.createDiffieHellmanGroup=Y.createDiffieHellmanGroup,$.getDiffieHellman=Y.getDiffieHellman,$.createDiffieHellman=Y.createDiffieHellman,$.DiffieHellman=Y.DiffieHellman;var W=qu();$.createSign=W.createSign,$.Sign=W.Sign,$.createVerify=W.createVerify,$.Verify=W.Verify,$.createECDH=au();var R=Fn();$.publicEncrypt=R.publicEncrypt,$.privateEncrypt=R.privateEncrypt,$.publicDecrypt=R.publicDecrypt,$.privateDecrypt=R.privateDecrypt;var M=Mn();$.randomFill=M.randomFill,$.randomFillSync=M.randomFillSync,$.createCredentials=function(){throw Error(`sorry, createCredentials is not implemented yet
244
244
  we accept pull requests
245
245
  https://github.com/browserify/crypto-browserify`)},$.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}}),r$=ch(An(),1),En=r$.prng,Rn=r$.pseudoRandomBytes,Pn=r$.rng,Vn=r$.randomBytes,Sn=r$.Hash,j6=r$.createHash,vn=r$.Hmac,Cn=r$.createHmac,qn=r$.getHashes,Nn=r$.pbkdf2,Bn=r$.pbkdf2Sync,jn=r$.Cipher,kn=r$.createCipher,gn=r$.Cipheriv,wn=r$.createCipheriv,xn=r$.Decipher,fn=r$.createDecipher,yn=r$.Decipheriv,bn=r$.createDecipheriv,hn=r$.getCiphers,un=r$.listCiphers,nn=r$.DiffieHellmanGroup,pn=r$.createDiffieHellmanGroup,cn=r$.getDiffieHellman,ln=r$.createDiffieHellman,mn=r$.DiffieHellman,dn=r$.createSign,on=r$.Sign,tn=r$.createVerify,rn=r$.Verify,an=r$.createECDH,sn=r$.publicEncrypt,en=r$.privateEncrypt,$p=r$.publicDecrypt,Up=r$.privateDecrypt,Ip=r$.randomFill,_p=r$.randomFillSync,Xp=r$.createCredentials,Gp=r$.constants,Qp=["p192","p224","p256","p384","p521","curve25519","ed25519","secp256k1","secp224r1","prime256v1","prime192v1","ed25519","secp384r1","secp521r1"];Zp=crypto,Op=crypto});var QB={};LU(QB,{sep:()=>KW,resolve:()=>$I,relative:()=>DW,posix:()=>JB,parse:()=>GB,normalize:()=>LW,join:()=>G1,isAbsolute:()=>j2,format:()=>XB,extname:()=>_B,dirname:()=>i1,delimiter:()=>YB,default:()=>Dp,basename:()=>DG,_makeLong:()=>IB});function rI($){if(typeof $!=="string")throw TypeError("Path must be a string. Received "+JSON.stringify($))}function UB($,I){var G="",Z=0,_=-1,J=0,Y;for(var W=0;W<=$.length;++W){if(W<$.length)Y=$.charCodeAt(W);else if(Y===47)break;else Y=47;if(Y===47){if(_===W-1||J===1);else if(_!==W-1&&J===2){if(G.length<2||Z!==2||G.charCodeAt(G.length-1)!==46||G.charCodeAt(G.length-2)!==46){if(G.length>2){var R=G.lastIndexOf("/");if(R!==G.length-1){if(R===-1)G="",Z=0;else G=G.slice(0,R),Z=G.length-1-G.lastIndexOf("/");_=W,J=0;continue}}else if(G.length===2||G.length===1){G="",Z=0,_=W,J=0;continue}}if(I){if(G.length>0)G+="/..";else G="..";Z=2}}else{if(G.length>0)G+="/"+$.slice(_+1,W);else G=$.slice(_+1,W);Z=W-_-1}_=W,J=0}else if(Y===46&&J!==-1)++J;else J=-1}return G}function Lp($,I){var G=I.dir||I.root,Z=I.base||(I.name||"")+(I.ext||"");if(!G)return Z;if(G===I.root)return G+Z;return G+$+Z}function $I(){var $="",I=!1,G;for(var Z=arguments.length-1;Z>=-1&&!I;Z--){var _;if(Z>=0)_=arguments[Z];else{if(G===void 0)G=process.cwd();_=G}if(rI(_),_.length===0)continue;$=_+"/"+$,I=_.charCodeAt(0)===47}if($=UB($,!I),I)if($.length>0)return"/"+$;else return"/";else if($.length>0)return $;else return"."}function LW($){if(rI($),$.length===0)return".";var I=$.charCodeAt(0)===47,G=$.charCodeAt($.length-1)===47;if($=UB($,!I),$.length===0&&!I)$=".";if($.length>0&&G)$+="/";if(I)return"/"+$;return $}function j2($){return rI($),$.length>0&&$.charCodeAt(0)===47}function G1(){if(arguments.length===0)return".";var $;for(var I=0;I<arguments.length;++I){var G=arguments[I];if(rI(G),G.length>0)if($===void 0)$=G;else $+="/"+G}if($===void 0)return".";return LW($)}function DW($,I){if(rI($),rI(I),$===I)return"";if($=$I($),I=$I(I),$===I)return"";var G=1;for(;G<$.length;++G)if($.charCodeAt(G)!==47)break;var Z=$.length,_=Z-G,J=1;for(;J<I.length;++J)if(I.charCodeAt(J)!==47)break;var Y=I.length,W=Y-J,R=_<W?_:W,M=-1,E=0;for(;E<=R;++E){if(E===R){if(W>R){if(I.charCodeAt(J+E)===47)return I.slice(J+E+1);else if(E===0)return I.slice(J+E)}else if(_>R){if($.charCodeAt(G+E)===47)M=E;else if(E===0)M=0}break}var T=$.charCodeAt(G+E),S=I.charCodeAt(J+E);if(T!==S)break;else if(T===47)M=E}var N="";for(E=G+M+1;E<=Z;++E)if(E===Z||$.charCodeAt(E)===47)if(N.length===0)N+="..";else N+="/..";if(N.length>0)return N+I.slice(J+M);else{if(J+=M,I.charCodeAt(J)===47)++J;return I.slice(J)}}function IB($){return $}function i1($){if(rI($),$.length===0)return".";var I=$.charCodeAt(0),G=I===47,Z=-1,_=!0;for(var J=$.length-1;J>=1;--J)if(I=$.charCodeAt(J),I===47){if(!_){Z=J;break}}else _=!1;if(Z===-1)return G?"/":".";if(G&&Z===1)return"//";return $.slice(0,Z)}function DG($,I){if(I!==void 0&&typeof I!=="string")throw TypeError('"ext" argument must be a string');rI($);var G=0,Z=-1,_=!0,J;if(I!==void 0&&I.length>0&&I.length<=$.length){if(I.length===$.length&&I===$)return"";var Y=I.length-1,W=-1;for(J=$.length-1;J>=0;--J){var R=$.charCodeAt(J);if(R===47){if(!_){G=J+1;break}}else{if(W===-1)_=!1,W=J+1;if(Y>=0)if(R===I.charCodeAt(Y)){if(--Y===-1)Z=J}else Y=-1,Z=W}}if(G===Z)Z=W;else if(Z===-1)Z=$.length;return $.slice(G,Z)}else{for(J=$.length-1;J>=0;--J)if($.charCodeAt(J)===47){if(!_){G=J+1;break}}else if(Z===-1)_=!1,Z=J+1;if(Z===-1)return"";return $.slice(G,Z)}}function _B($){rI($);var I=-1,G=0,Z=-1,_=!0,J=0;for(var Y=$.length-1;Y>=0;--Y){var W=$.charCodeAt(Y);if(W===47){if(!_){G=Y+1;break}continue}if(Z===-1)_=!1,Z=Y+1;if(W===46){if(I===-1)I=Y;else if(J!==1)J=1}else if(I!==-1)J=-1}if(I===-1||Z===-1||J===0||J===1&&I===Z-1&&I===G+1)return"";return $.slice(I,Z)}function XB($){if($===null||typeof $!=="object")throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof $);return Lp("/",$)}function GB($){rI($);var I={root:"",dir:"",base:"",ext:"",name:""};if($.length===0)return I;var G=$.charCodeAt(0),Z=G===47,_;if(Z)I.root="/",_=1;else _=0;var J=-1,Y=0,W=-1,R=!0,M=$.length-1,E=0;for(;M>=_;--M){if(G=$.charCodeAt(M),G===47){if(!R){Y=M+1;break}continue}if(W===-1)R=!1,W=M+1;if(G===46){if(J===-1)J=M;else if(E!==1)E=1}else if(J!==-1)E=-1}if(J===-1||W===-1||E===0||E===1&&J===W-1&&J===Y+1){if(W!==-1)if(Y===0&&Z)I.base=I.name=$.slice(1,W);else I.base=I.name=$.slice(Y,W)}else{if(Y===0&&Z)I.name=$.slice(1,J),I.base=$.slice(1,W);else I.name=$.slice(Y,J),I.base=$.slice(Y,W);I.ext=$.slice(J,W)}if(Y>0)I.dir=$.slice(0,Y-1);else if(Z)I.dir="/";return I}var KW="/",YB=":",JB,Dp;var DU=WI(()=>{JB=(($)=>($.posix=$,$))({resolve:$I,normalize:LW,isAbsolute:j2,join:G1,relative:DW,_makeLong:IB,dirname:i1,basename:DG,extname:_B,format:XB,parse:GB,sep:KW,delimiter:YB,win32:null,posix:null}),Dp=JB});var vk=N6((AI0,Sk)=>{function Ni($){let I=String($??"").trim(),G=/^(\S+)\s+from\s+(\S+)$/.exec(I);if(G){let Z=Date.parse(G[1]),_=Date.parse(G[2]);if(!Number.isNaN(Z)&&!Number.isNaN(_))return{kind:"running",at:Z,since:_}}else{let Z=Date.parse(I);if(!Number.isNaN(Z))return{kind:"frozen",at:Z}}throw Error(`world clock: expected an ISO-8601 instant, or "<instant> from <instant>", got ${JSON.stringify(I.slice(0,60))}`)}function Bi($,I){return $.kind==="running"?$.at+(I-$.since):$.at}function ji($){return $.kind==="running"?`${new Date($.at).toISOString()} from ${new Date($.since).toISOString()}`:new Date($.at).toISOString()}Sk.exports={parseClock:Ni,clockNowMs:Bi,formatClock:ji}});var RE={};LU(RE,{resolveObject:()=>zg,resolve:()=>Qg,parse:()=>IY,format:()=>Jg,default:()=>to,Url:()=>y6,URLSearchParams:()=>Gg,URL:()=>AE});function EE($){return typeof $==="string"}function Yg($){return typeof $==="object"&&$!==null}function m5($){return $===null}function ho($){return $==null}function y6(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function IY($,I,G){if($&&Yg($)&&$ instanceof y6)return $;var Z=new y6;return Z.parse($,I,G),Z}function Jg($){if(EE($))$=IY($);if(!($ instanceof y6))return y6.prototype.format.call($);return $.format()}function Qg($,I){return IY($,!1,!0).resolve(I)}function zg($,I){if(!$)return I;return IY($,!1,!0).resolveObject(I)}var AE,Gg,uo,no,po,co,lo,FE,Ig,_g,mo=255,Xg,io,oo,TE,UY,ME,to;var PE=WI(()=>{({URL:AE,URLSearchParams:Gg}=globalThis);uo=/^([a-z0-9.+-]+:)/i,no=/:[0-9]*$/,po=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,co=["<",">",'"',"`"," ","\r",`
246
- `,"\t"],lo=["{","}","|","\\","^","`"].concat(co),FE=["'"].concat(lo),Ig=["%","/","?",";","#"].concat(FE),_g=["/","?","#"],Xg=/^[+a-z0-9A-Z_-]{0,63}$/,io=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,oo={javascript:!0,"javascript:":!0},TE={javascript:!0,"javascript:":!0},UY={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},ME={parse($){var I=decodeURIComponent;return($+"").replace(/\+/g," ").split("&").filter(Boolean).reduce(function(G,Z,_){var J=Z.split("="),Y=I(J[0]||""),W=I(J[1]||""),R=G[Y];return G[Y]=R===void 0?W:[].concat(R,W),G},{})},stringify($){var I=encodeURIComponent;return Object.keys($||{}).reduce(function(G,Z){return[].concat($[Z]).forEach(function(_){G.push(I(Z)+"="+I(_))}),G},[]).join("&").replace(/\s/g,"+")}};y6.prototype.parse=function($,I,G){if(!EE($))throw TypeError("Parameter 'url' must be a string, not "+typeof $);var Z=$.indexOf("?"),_=Z!==-1&&Z<$.indexOf("#")?"?":"#",J=$.split(_),Y=/\\/g;J[0]=J[0].replace(Y,"/"),$=J.join(_);var W=$;if(W=W.trim(),!G&&$.split("#").length===1){var R=po.exec(W);if(R){if(this.path=W,this.href=W,this.pathname=R[1],R[2])if(this.search=R[2],I)this.query=ME.parse(this.search.substr(1));else this.query=this.search.substr(1);else if(I)this.search="",this.query={};return this}}var M=uo.exec(W);if(M){M=M[0];var E=M.toLowerCase();this.protocol=E,W=W.substr(M.length)}if(G||M||W.match(/^\/\/[^@\/]+@[^@\/]+/)){var T=W.substr(0,2)==="//";if(T&&!(M&&TE[M]))W=W.substr(2),this.slashes=!0}if(!TE[M]&&(T||M&&!UY[M])){var S=-1;for(var N=0;N<_g.length;N++){var B=W.indexOf(_g[N]);if(B!==-1&&(S===-1||B<S))S=B}var x,w;if(S===-1)w=W.lastIndexOf("@");else w=W.lastIndexOf("@",S);if(w!==-1)x=W.slice(0,w),W=W.slice(w+1),this.auth=decodeURIComponent(x);S=-1;for(var N=0;N<Ig.length;N++){var B=W.indexOf(Ig[N]);if(B!==-1&&(S===-1||B<S))S=B}if(S===-1)S=W.length;this.host=W.slice(0,S),W=W.slice(S),this.parseHost(),this.hostname=this.hostname||"";var y=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!y){var g=this.hostname.split(/\./);for(var N=0,b=g.length;N<b;N++){var l=g[N];if(!l)continue;if(!l.match(Xg)){var i="";for(var $0=0,Q0=l.length;$0<Q0;$0++)if(l.charCodeAt($0)>127)i+="x";else i+=l[$0];if(!i.match(Xg)){var G0=g.slice(0,N),D0=g.slice(N+1),t=l.match(io);if(t)G0.push(t[1]),D0.unshift(t[2]);if(D0.length)W="/"+D0.join(".")+W;this.hostname=G0.join(".");break}}}}if(this.hostname.length>mo)this.hostname="";else this.hostname=this.hostname.toLowerCase();if(!y)this.hostname=new AE(`https://${this.hostname}`).hostname;var P0=this.port?":"+this.port:"",Q=this.hostname||"";if(this.host=Q+P0,this.href+=this.host,y){if(this.hostname=this.hostname.substr(1,this.hostname.length-2),W[0]!=="/")W="/"+W}}if(!oo[E])for(var N=0,b=FE.length;N<b;N++){var D=FE[N];if(W.indexOf(D)===-1)continue;var F=encodeURIComponent(D);if(F===D)F=escape(D);W=W.split(D).join(F)}var L=W.indexOf("#");if(L!==-1)this.hash=W.substr(L),W=W.slice(0,L);var H=W.indexOf("?");if(H!==-1){if(this.search=W.substr(H),this.query=W.substr(H+1),I)this.query=ME.parse(this.query);W=W.slice(0,H)}else if(I)this.search="",this.query={};if(W)this.pathname=W;if(UY[E]&&this.hostname&&!this.pathname)this.pathname="/";if(this.pathname||this.search){var P0=this.pathname||"",v=this.search||"";this.path=P0+v}return this.href=this.format(),this};y6.prototype.format=function(){var $=this.auth||"";if($)$=encodeURIComponent($),$=$.replace(/%3A/i,":"),$+="@";var I=this.protocol||"",G=this.pathname||"",Z=this.hash||"",_=!1,J="";if(this.host)_=$+this.host;else if(this.hostname){if(_=$+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port)_+=":"+this.port}if(this.query&&Yg(this.query)&&Object.keys(this.query).length)J=ME.stringify(this.query);var Y=this.search||J&&"?"+J||"";if(I&&I.substr(-1)!==":")I+=":";if(this.slashes||(!I||UY[I])&&_!==!1){if(_="//"+(_||""),G&&G.charAt(0)!=="/")G="/"+G}else if(!_)_="";if(Z&&Z.charAt(0)!=="#")Z="#"+Z;if(Y&&Y.charAt(0)!=="?")Y="?"+Y;return G=G.replace(/[?#]/g,function(W){return encodeURIComponent(W)}),Y=Y.replace("#","%23"),I+_+G+Y+Z};y6.prototype.resolve=function($){return this.resolveObject(IY($,!1,!0)).format()};y6.prototype.resolveObject=function($){if(EE($)){var I=new y6;I.parse($,!1,!0),$=I}var G=new y6,Z=Object.keys(this);for(var _=0;_<Z.length;_++){var J=Z[_];G[J]=this[J]}if(G.hash=$.hash,$.href==="")return G.href=G.format(),G;if($.slashes&&!$.protocol){var Y=Object.keys($);for(var W=0;W<Y.length;W++){var R=Y[W];if(R!=="protocol")G[R]=$[R]}if(UY[G.protocol]&&G.hostname&&!G.pathname)G.path=G.pathname="/";return G.href=G.format(),G}if($.protocol&&$.protocol!==G.protocol){if(!UY[$.protocol]){var M=Object.keys($);for(var E=0;E<M.length;E++){var T=M[E];G[T]=$[T]}return G.href=G.format(),G}if(G.protocol=$.protocol,!$.host&&!TE[$.protocol]){var b=($.pathname||"").split("/");while(b.length&&!($.host=b.shift()));if(!$.host)$.host="";if(!$.hostname)$.hostname="";if(b[0]!=="")b.unshift("");if(b.length<2)b.unshift("");G.pathname=b.join("/")}else G.pathname=$.pathname;if(G.search=$.search,G.query=$.query,G.host=$.host||"",G.auth=$.auth,G.hostname=$.hostname||$.host,G.port=$.port,G.pathname||G.search){var S=G.pathname||"",N=G.search||"";G.path=S+N}return G.slashes=G.slashes||$.slashes,G.href=G.format(),G}var B=G.pathname&&G.pathname.charAt(0)==="/",x=$.host||$.pathname&&$.pathname.charAt(0)==="/",w=x||B||G.host&&$.pathname,y=w,g=G.pathname&&G.pathname.split("/")||[],b=$.pathname&&$.pathname.split("/")||[],l=G.protocol&&!UY[G.protocol];if(l){if(G.hostname="",G.port=null,G.host)if(g[0]==="")g[0]=G.host;else g.unshift(G.host);if(G.host="",$.protocol){if($.hostname=null,$.port=null,$.host)if(b[0]==="")b[0]=$.host;else b.unshift($.host);$.host=null}w=w&&(b[0]===""||g[0]==="")}if(x)G.host=$.host||$.host===""?$.host:G.host,G.hostname=$.hostname||$.hostname===""?$.hostname:G.hostname,G.search=$.search,G.query=$.query,g=b;else if(b.length){if(!g)g=[];g.pop(),g=g.concat(b),G.search=$.search,G.query=$.query}else if(!ho($.search)){if(l){G.hostname=G.host=g.shift();var i=G.host&&G.host.indexOf("@")>0?G.host.split("@"):!1;if(i)G.auth=i.shift(),G.host=G.hostname=i.shift()}if(G.search=$.search,G.query=$.query,!m5(G.pathname)||!m5(G.search))G.path=(G.pathname?G.pathname:"")+(G.search?G.search:"");return G.href=G.format(),G}if(!g.length){if(G.pathname=null,G.search)G.path="/"+G.search;else G.path=null;return G.href=G.format(),G}var $0=g.slice(-1)[0],Q0=(G.host||$.host||g.length>1)&&($0==="."||$0==="..")||$0==="",G0=0;for(var D0=g.length;D0>=0;D0--)if($0=g[D0],$0===".")g.splice(D0,1);else if($0==="..")g.splice(D0,1),G0++;else if(G0)g.splice(D0,1),G0--;if(!w&&!y)for(;G0--;G0)g.unshift("..");if(w&&g[0]!==""&&(!g[0]||g[0].charAt(0)!=="/"))g.unshift("");if(Q0&&g.join("/").substr(-1)!=="/")g.push("");var t=g[0]===""||g[0]&&g[0].charAt(0)==="/";if(l){G.hostname=G.host=t?"":g.length?g.shift():"";var i=G.host&&G.host.indexOf("@")>0?G.host.split("@"):!1;if(i)G.auth=i.shift(),G.host=G.hostname=i.shift()}if(w=w||G.host&&g.length,w&&!t)g.unshift("");if(!g.length)G.pathname=null,G.path=null;else G.pathname=g.join("/");if(!m5(G.pathname)||!m5(G.search))G.path=(G.pathname?G.pathname:"")+(G.search?G.search:"");return G.auth=$.auth||G.auth,G.slashes=G.slashes||$.slashes,G.href=G.format(),G};y6.prototype.parseHost=function(){var $=this.host,I=no.exec($);if(I){if(I=I[0],I!==":")this.port=I.substr(1);$=$.substr(0,$.length-I.length)}if($)this.hostname=$};to={parse:IY,resolve:Qg,resolveObject:zg,format:Jg,Url:y6,URL:AE,URLSearchParams:Gg}});var d5={};LU(d5,{request:()=>Dt,globalAgent:()=>Tt,get:()=>Kt,default:()=>Eg,STATUS_CODES:()=>Mt,METHODS:()=>At,IncomingMessage:()=>Ht,ClientRequest:()=>Wt,Agent:()=>Ft});var ro,ao,Zg,so,eo,$t=($,I,G)=>{G=$!=null?ro(ao($)):{};let Z=I||!$||!$.__esModule?Zg(G,"default",{value:$,enumerable:!0}):G;for(let _ of so($))if(!eo.call(Z,_))Zg(Z,_,{get:()=>$[_],enumerable:!0});return Z},x1=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports),Lg,Ut,IX,It,Dg,_X,Kg,_t,Wg,_Y,Xt,Og,VE,Gt,Yt,Hg,Fg,Jt,Qt,Tg,Mg,zt,Zt,Ot,Lt,Ag,Dt,Kt,Wt,Ht,Ft,Tt,Mt,At,Eg;var Xz=WI(()=>{ro=Object.create,{getPrototypeOf:ao,defineProperty:Zg,getOwnPropertyNames:so}=Object,eo=Object.prototype.hasOwnProperty,Lg=x1(($)=>{$.fetch=_(globalThis.fetch)&&_(globalThis.ReadableStream),$.writableStream=_(globalThis.WritableStream),$.abortController=_(globalThis.AbortController);var I;function G(){if(I!==void 0)return I;if(globalThis.XMLHttpRequest){I=new globalThis.XMLHttpRequest;try{I.open("GET",globalThis.XDomainRequest?"/":"https://example.com")}catch(J){I=null}}else I=null;return I}function Z(J){var Y=G();if(!Y)return!1;try{return Y.responseType=J,Y.responseType===J}catch(W){}return!1}$.arraybuffer=$.fetch||Z("arraybuffer"),$.msstream=!$.fetch&&Z("ms-stream"),$.mozchunkedarraybuffer=!$.fetch&&Z("moz-chunked-arraybuffer"),$.overrideMimeType=$.fetch||(G()?_(G().overrideMimeType):!1);function _(J){return typeof J==="function"}I=null}),Ut=x1(($,I)=>{if(typeof Object.create==="function")I.exports=function(G,Z){if(Z)G.super_=Z,G.prototype=Object.create(Z.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}})};else I.exports=function(G,Z){if(Z){G.super_=Z;var _=function(){};_.prototype=Z.prototype,G.prototype=new _,G.prototype.constructor=G}}}),IX=x1(($,I)=>{try{if(G=(C2(),V$(v2)),typeof G.inherits!=="function")throw"";I.exports=G.inherits}catch(Z){I.exports=Ut()}var G}),It=x1(($,I)=>{function G(w,y){var g=Object.keys(w);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(w);y&&(b=b.filter(function(l){return Object.getOwnPropertyDescriptor(w,l).enumerable})),g.push.apply(g,b)}return g}function Z(w){for(var y=1;y<arguments.length;y++){var g=arguments[y]!=null?arguments[y]:{};y%2?G(Object(g),!0).forEach(function(b){_(w,b,g[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(g)):G(Object(g)).forEach(function(b){Object.defineProperty(w,b,Object.getOwnPropertyDescriptor(g,b))})}return w}function _(w,y,g){if(y=R(y),y in w)Object.defineProperty(w,y,{value:g,enumerable:!0,configurable:!0,writable:!0});else w[y]=g;return w}function J(w,y){if(!(w instanceof y))throw TypeError("Cannot call a class as a function")}function Y(w,y){for(var g=0;g<y.length;g++){var b=y[g];if(b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b)b.writable=!0;Object.defineProperty(w,R(b.key),b)}}function W(w,y,g){if(y)Y(w.prototype,y);if(g)Y(w,g);return Object.defineProperty(w,"prototype",{writable:!1}),w}function R(w){var y=M(w,"string");return typeof y==="symbol"?y:String(y)}function M(w,y){if(typeof w!=="object"||w===null)return w;var g=w[Symbol.toPrimitive];if(g!==void 0){var b=g.call(w,y||"default");if(typeof b!=="object")return b;throw TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(w)}var E=(u1(),V$(h1)),T=E.Buffer,S=(C2(),V$(v2)),N=S.inspect,B=N&&N.custom||"inspect";function x(w,y,g){T.prototype.copy.call(w,y,g)}I.exports=function(){function w(){J(this,w),this.head=null,this.tail=null,this.length=0}return W(w,[{key:"push",value:function(y){var g={data:y,next:null};if(this.length>0)this.tail.next=g;else this.head=g;this.tail=g,++this.length}},{key:"unshift",value:function(y){var g={data:y,next:this.head};if(this.length===0)this.tail=g;this.head=g,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var y=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,y}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";var g=this.head,b=""+g.data;while(g=g.next)b+=y+g.data;return b}},{key:"concat",value:function(y){if(this.length===0)return T.alloc(0);var g=T.allocUnsafe(y>>>0),b=this.head,l=0;while(b)x(b.data,g,l),l+=b.data.length,b=b.next;return g}},{key:"consume",value:function(y,g){var b;if(y<this.head.data.length)b=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y);else if(y===this.head.data.length)b=this.shift();else b=g?this._getString(y):this._getBuffer(y);return b}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var g=this.head,b=1,l=g.data;y-=l.length;while(g=g.next){var i=g.data,$0=y>i.length?i.length:y;if($0===i.length)l+=i;else l+=i.slice(0,y);if(y-=$0,y===0){if($0===i.length)if(++b,g.next)this.head=g.next;else this.head=this.tail=null;else this.head=g,g.data=i.slice($0);break}++b}return this.length-=b,l}},{key:"_getBuffer",value:function(y){var g=T.allocUnsafe(y),b=this.head,l=1;b.data.copy(g),y-=b.data.length;while(b=b.next){var i=b.data,$0=y>i.length?i.length:y;if(i.copy(g,g.length-y,0,$0),y-=$0,y===0){if($0===i.length)if(++l,b.next)this.head=b.next;else this.head=this.tail=null;else this.head=b,b.data=i.slice($0);break}++l}return this.length-=l,g}},{key:B,value:function(y,g){return N(this,Z(Z({},g),{},{depth:0,customInspect:!1}))}}]),w}()}),Dg=x1(($,I)=>{function G(R,M){var E=this,T=this._readableState&&this._readableState.destroyed,S=this._writableState&&this._writableState.destroyed;if(T||S){if(M)M(R);else if(R){if(!this._writableState)process.nextTick(Y,this,R);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(Y,this,R)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(R||null,function(N){if(!M&&N)if(!E._writableState)process.nextTick(Z,E,N);else if(!E._writableState.errorEmitted)E._writableState.errorEmitted=!0,process.nextTick(Z,E,N);else process.nextTick(_,E);else if(M)process.nextTick(_,E),M(N);else process.nextTick(_,E)}),this}function Z(R,M){Y(R,M),_(R)}function _(R){if(R._writableState&&!R._writableState.emitClose)return;if(R._readableState&&!R._readableState.emitClose)return;R.emit("close")}function J(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function Y(R,M){R.emit("error",M)}function W(R,M){var{_readableState:E,_writableState:T}=R;if(E&&E.autoDestroy||T&&T.autoDestroy)R.destroy(M);else R.emit("error",M)}I.exports={destroy:G,undestroy:J,errorOrDestroy:W}}),_X=x1(($,I)=>{var G={};function Z(R,M,E){if(!E)E=Error;function T(N,B,x){if(typeof M==="string")return M;else return M(N,B,x)}class S extends E{constructor(N,B,x){super(T(N,B,x))}}S.prototype.name=E.name,S.prototype.code=R,G[R]=S}function _(R,M){if(Array.isArray(R)){let E=R.length;if(R=R.map((T)=>String(T)),E>2)return`one of ${M} ${R.slice(0,E-1).join(", ")}, or `+R[E-1];else if(E===2)return`one of ${M} ${R[0]} or ${R[1]}`;else return`of ${M} ${R[0]}`}else return`of ${M} ${String(R)}`}function J(R,M,E){return R.substr(!E||E<0?0:+E,M.length)===M}function Y(R,M,E){if(E===void 0||E>R.length)E=R.length;return R.substring(E-M.length,E)===M}function W(R,M,E){if(typeof E!=="number")E=0;if(E+M.length>R.length)return!1;else return R.indexOf(M,E)!==-1}Z("ERR_INVALID_OPT_VALUE",function(R,M){return'The value "'+M+'" is invalid for option "'+R+'"'},TypeError),Z("ERR_INVALID_ARG_TYPE",function(R,M,E){let T;if(typeof M==="string"&&J(M,"not "))T="must not be",M=M.replace(/^not /,"");else T="must be";let S;if(Y(R," argument"))S=`The ${R} ${T} ${_(M,"type")}`;else{let N=W(R,".")?"property":"argument";S=`The "${R}" ${N} ${T} ${_(M,"type")}`}return S+=`. Received type ${typeof E}`,S},TypeError),Z("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Z("ERR_METHOD_NOT_IMPLEMENTED",function(R){return"The "+R+" method is not implemented"}),Z("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Z("ERR_STREAM_DESTROYED",function(R){return"Cannot call "+R+" after a stream was destroyed"}),Z("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Z("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Z("ERR_STREAM_WRITE_AFTER_END","write after end"),Z("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Z("ERR_UNKNOWN_ENCODING",function(R){return"Unknown encoding: "+R},TypeError),Z("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),$.codes=G}),Kg=x1(($,I)=>{var G=_X().codes.ERR_INVALID_OPT_VALUE;function Z(J,Y,W){return J.highWaterMark!=null?J.highWaterMark:Y?J[W]:null}function _(J,Y,W,R){var M=Z(Y,R,W);if(M!=null){if(!(isFinite(M)&&Math.floor(M)===M)||M<0){var E=R?W:"highWaterMark";throw new G(E,M)}return Math.floor(M)}return J.objectMode?16:16384}I.exports={getHighWaterMark:_}}),_t=x1(($,I)=>{I.exports=(C2(),V$(v2)).deprecate}),Wg=x1(($,I)=>{I.exports=t;function G(O0){var d=this;this.next=null,this.entry=null,this.finish=function(){K0(d,O0)}}var Z;t.WritableState=G0;var _={deprecate:_t()},J=w4(),Y=(u1(),V$(h1)).Buffer,W=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function R(O0){return Y.from(O0)}function M(O0){return Y.isBuffer(O0)||O0 instanceof W}var E=Dg(),T=Kg(),S=T.getHighWaterMark,N=_X().codes,B=N.ERR_INVALID_ARG_TYPE,x=N.ERR_METHOD_NOT_IMPLEMENTED,w=N.ERR_MULTIPLE_CALLBACK,y=N.ERR_STREAM_CANNOT_PIPE,g=N.ERR_STREAM_DESTROYED,b=N.ERR_STREAM_NULL_VALUES,l=N.ERR_STREAM_WRITE_AFTER_END,i=N.ERR_UNKNOWN_ENCODING,$0=E.errorOrDestroy;IX()(t,J);function Q0(){}function G0(O0,d,m){if(Z=Z||_Y(),O0=O0||{},typeof m!=="boolean")m=d instanceof Z;if(this.objectMode=!!O0.objectMode,m)this.objectMode=this.objectMode||!!O0.writableObjectMode;this.highWaterMark=S(this,O0,"writableHighWaterMark",m),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var r=O0.decodeStrings===!1;this.decodeStrings=!r,this.defaultEncoding=O0.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y0){q(d,Y0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=O0.emitClose!==!1,this.autoDestroy=!!O0.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new G(this)}G0.prototype.getBuffer=function(){var O0=this.bufferedRequest,d=[];while(O0)d.push(O0),O0=O0.next;return d},function(){try{Object.defineProperty(G0.prototype,"buffer",{get:_.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(O0){}}();var D0;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")D0=Function.prototype[Symbol.hasInstance],Object.defineProperty(t,Symbol.hasInstance,{value:function(O0){if(D0.call(this,O0))return!0;if(this!==t)return!1;return O0&&O0._writableState instanceof G0}});else D0=function(O0){return O0 instanceof this};function t(O0){Z=Z||_Y();var d=this instanceof Z;if(!d&&!D0.call(t,this))return new t(O0);if(this._writableState=new G0(O0,this,d),this.writable=!0,O0){if(typeof O0.write==="function")this._write=O0.write;if(typeof O0.writev==="function")this._writev=O0.writev;if(typeof O0.destroy==="function")this._destroy=O0.destroy;if(typeof O0.final==="function")this._final=O0.final}J.call(this)}t.prototype.pipe=function(){$0(this,new y)};function P0(O0,d){var m=new l;$0(O0,m),process.nextTick(d,m)}function Q(O0,d,m,r){var Y0;if(m===null)Y0=new b;else if(typeof m!=="string"&&!d.objectMode)Y0=new B("chunk",["string","Buffer"],m);if(Y0)return $0(O0,Y0),process.nextTick(r,Y0),!1;return!0}t.prototype.write=function(O0,d,m){var r=this._writableState,Y0=!1,W0=!r.objectMode&&M(O0);if(W0&&!Y.isBuffer(O0))O0=R(O0);if(typeof d==="function")m=d,d=null;if(W0)d="buffer";else if(!d)d=r.defaultEncoding;if(typeof m!=="function")m=Q0;if(r.ending)P0(this,m);else if(W0||Q(this,r,O0,m))r.pendingcb++,Y0=F(this,r,W0,O0,d,m);return Y0},t.prototype.cork=function(){this._writableState.corked++},t.prototype.uncork=function(){var O0=this._writableState;if(O0.corked){if(O0.corked--,!O0.writing&&!O0.corked&&!O0.bufferProcessing&&O0.bufferedRequest)A(this,O0)}},t.prototype.setDefaultEncoding=function(O0){if(typeof O0==="string")O0=O0.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((O0+"").toLowerCase())>-1))throw new i(O0);return this._writableState.defaultEncoding=O0,this},Object.defineProperty(t.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function D(O0,d,m){if(!O0.objectMode&&O0.decodeStrings!==!1&&typeof d==="string")d=Y.from(d,m);return d}Object.defineProperty(t.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function F(O0,d,m,r,Y0,W0){if(!m){var I0=D(d,r,Y0);if(r!==I0)m=!0,Y0="buffer",r=I0}var c=d.objectMode?1:r.length;d.length+=c;var s=d.length<d.highWaterMark;if(!s)d.needDrain=!0;if(d.writing||d.corked){var S0=d.lastBufferedRequest;if(d.lastBufferedRequest={chunk:r,encoding:Y0,isBuf:m,callback:W0,next:null},S0)S0.next=d.lastBufferedRequest;else d.bufferedRequest=d.lastBufferedRequest;d.bufferedRequestCount+=1}else L(O0,d,!1,c,r,Y0,W0);return s}function L(O0,d,m,r,Y0,W0,I0){if(d.writelen=r,d.writecb=I0,d.writing=!0,d.sync=!0,d.destroyed)d.onwrite(new g("write"));else if(m)O0._writev(Y0,d.onwrite);else O0._write(Y0,W0,d.onwrite);d.sync=!1}function H(O0,d,m,r,Y0){if(--d.pendingcb,m)process.nextTick(Y0,r),process.nextTick(a,O0,d),O0._writableState.errorEmitted=!0,$0(O0,r);else Y0(r),O0._writableState.errorEmitted=!0,$0(O0,r),a(O0,d)}function v(O0){O0.writing=!1,O0.writecb=null,O0.length-=O0.writelen,O0.writelen=0}function q(O0,d){var m=O0._writableState,r=m.sync,Y0=m.writecb;if(typeof Y0!=="function")throw new w;if(v(m),d)H(O0,m,r,d,Y0);else{var W0=k(m)||O0.destroyed;if(!W0&&!m.corked&&!m.bufferProcessing&&m.bufferedRequest)A(O0,m);if(r)process.nextTick(P,O0,m,W0,Y0);else P(O0,m,W0,Y0)}}function P(O0,d,m,r){if(!m)O(O0,d);d.pendingcb--,r(),a(O0,d)}function O(O0,d){if(d.length===0&&d.needDrain)d.needDrain=!1,O0.emit("drain")}function A(O0,d){d.bufferProcessing=!0;var m=d.bufferedRequest;if(O0._writev&&m&&m.next){var r=d.bufferedRequestCount,Y0=Array(r),W0=d.corkedRequestsFree;W0.entry=m;var I0=0,c=!0;while(m){if(Y0[I0]=m,!m.isBuf)c=!1;m=m.next,I0+=1}if(Y0.allBuffers=c,L(O0,d,!0,d.length,Y0,"",W0.finish),d.pendingcb++,d.lastBufferedRequest=null,W0.next)d.corkedRequestsFree=W0.next,W0.next=null;else d.corkedRequestsFree=new G(d);d.bufferedRequestCount=0}else{while(m){var{chunk:s,encoding:S0,callback:M0}=m,z0=d.objectMode?1:s.length;if(L(O0,d,!1,z0,s,S0,M0),m=m.next,d.bufferedRequestCount--,d.writing)break}if(m===null)d.lastBufferedRequest=null}d.bufferedRequest=m,d.bufferProcessing=!1}t.prototype._write=function(O0,d,m){m(new x("_write()"))},t.prototype._writev=null,t.prototype.end=function(O0,d,m){var r=this._writableState;if(typeof O0==="function")m=O0,O0=null,d=null;else if(typeof d==="function")m=d,d=null;if(O0!==null&&O0!==void 0)this.write(O0,d);if(r.corked)r.corked=1,this.uncork();if(!r.ending)J0(this,r,m);return this},Object.defineProperty(t.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function k(O0){return O0.ending&&O0.length===0&&O0.bufferedRequest===null&&!O0.finished&&!O0.writing}function j(O0,d){O0._final(function(m){if(d.pendingcb--,m)$0(O0,m);d.prefinished=!0,O0.emit("prefinish"),a(O0,d)})}function h(O0,d){if(!d.prefinished&&!d.finalCalled)if(typeof O0._final==="function"&&!d.destroyed)d.pendingcb++,d.finalCalled=!0,process.nextTick(j,O0,d);else d.prefinished=!0,O0.emit("prefinish")}function a(O0,d){var m=k(d);if(m){if(h(O0,d),d.pendingcb===0){if(d.finished=!0,O0.emit("finish"),d.autoDestroy){var r=O0._readableState;if(!r||r.autoDestroy&&r.endEmitted)O0.destroy()}}}return m}function J0(O0,d,m){if(d.ending=!0,a(O0,d),m)if(d.finished)process.nextTick(m);else O0.once("finish",m);d.ended=!0,O0.writable=!1}function K0(O0,d,m){var r=O0.entry;O0.entry=null;while(r){var Y0=r.callback;d.pendingcb--,Y0(m),r=r.next}d.corkedRequestsFree.next=O0}Object.defineProperty(t.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(O0){if(!this._writableState)return;this._writableState.destroyed=O0}}),t.prototype.destroy=E.destroy,t.prototype._undestroy=E.undestroy,t.prototype._destroy=function(O0,d){d(O0)}}),_Y=x1(($,I)=>{var G=Object.keys||function(T){var S=[];for(var N in T)S.push(N);return S};I.exports=R;var Z=Hg(),_=Wg();IX()(R,Z);{J=G(_.prototype);for(W=0;W<J.length;W++)if(Y=J[W],!R.prototype[Y])R.prototype[Y]=_.prototype[Y]}var J,Y,W;function R(T){if(!(this instanceof R))return new R(T);if(Z.call(this,T),_.call(this,T),this.allowHalfOpen=!0,T){if(T.readable===!1)this.readable=!1;if(T.writable===!1)this.writable=!1;if(T.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",M)}}Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function M(){if(this._writableState.ended)return;process.nextTick(E,this)}function E(T){T.end()}Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(T){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=T,this._writableState.destroyed=T}})}),Xt=x1(($,I)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var G=(u1(),V$(h1)),Z=G.Buffer;function _(Y,W){for(var R in Y)W[R]=Y[R]}if(Z.from&&Z.alloc&&Z.allocUnsafe&&Z.allocUnsafeSlow)I.exports=G;else _(G,$),$.Buffer=J;function J(Y,W,R){return Z(Y,W,R)}J.prototype=Object.create(Z.prototype),_(Z,J),J.from=function(Y,W,R){if(typeof Y==="number")throw TypeError("Argument must not be a number");return Z(Y,W,R)},J.alloc=function(Y,W,R){if(typeof Y!=="number")throw TypeError("Argument must be a number");var M=Z(Y);if(W!==void 0)if(typeof R==="string")M.fill(W,R);else M.fill(W);else M.fill(0);return M},J.allocUnsafe=function(Y){if(typeof Y!=="number")throw TypeError("Argument must be a number");return Z(Y)},J.allocUnsafeSlow=function(Y){if(typeof Y!=="number")throw TypeError("Argument must be a number");return G.SlowBuffer(Y)}}),Og=x1(($)=>{var I=Xt().Buffer,G=I.isEncoding||function(g){switch(g=""+g,g&&g.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Z(g){if(!g)return"utf8";var b;while(!0)switch(g){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return g;default:if(b)return;g=(""+g).toLowerCase(),b=!0}}function _(g){var b=Z(g);if(typeof b!=="string"&&(I.isEncoding===G||!G(g)))throw Error("Unknown encoding: "+g);return b||g}$.StringDecoder=J;function J(g){this.encoding=_(g);var b;switch(this.encoding){case"utf16le":this.text=S,this.end=N,b=4;break;case"utf8":this.fillLast=M,b=4;break;case"base64":this.text=B,this.end=x,b=3;break;default:this.write=w,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=I.allocUnsafe(b)}J.prototype.write=function(g){if(g.length===0)return"";var b,l;if(this.lastNeed){if(b=this.fillLast(g),b===void 0)return"";l=this.lastNeed,this.lastNeed=0}else l=0;if(l<g.length)return b?b+this.text(g,l):this.text(g,l);return b||""},J.prototype.end=T,J.prototype.text=E,J.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length};function Y(g){if(g<=127)return 0;else if(g>>5===6)return 2;else if(g>>4===14)return 3;else if(g>>3===30)return 4;return g>>6===2?-1:-2}function W(g,b,l){var i=b.length-1;if(i<l)return 0;var $0=Y(b[i]);if($0>=0){if($0>0)g.lastNeed=$0-1;return $0}if(--i<l||$0===-2)return 0;if($0=Y(b[i]),$0>=0){if($0>0)g.lastNeed=$0-2;return $0}if(--i<l||$0===-2)return 0;if($0=Y(b[i]),$0>=0){if($0>0)if($0===2)$0=0;else g.lastNeed=$0-3;return $0}return 0}function R(g,b,l){if((b[0]&192)!==128)return g.lastNeed=0,"�";if(g.lastNeed>1&&b.length>1){if((b[1]&192)!==128)return g.lastNeed=1,"�";if(g.lastNeed>2&&b.length>2){if((b[2]&192)!==128)return g.lastNeed=2,"�"}}}function M(g){var b=this.lastTotal-this.lastNeed,l=R(this,g,b);if(l!==void 0)return l;if(this.lastNeed<=g.length)return g.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,b,0,g.length),this.lastNeed-=g.length}function E(g,b){var l=W(this,g,b);if(!this.lastNeed)return g.toString("utf8",b);this.lastTotal=l;var i=g.length-(l-this.lastNeed);return g.copy(this.lastChar,0,i),g.toString("utf8",b,i)}function T(g){var b=g&&g.length?this.write(g):"";if(this.lastNeed)return b+"�";return b}function S(g,b){if((g.length-b)%2===0){var l=g.toString("utf16le",b);if(l){var i=l.charCodeAt(l.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],l.slice(0,-1)}return l}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",b,g.length-1)}function N(g){var b=g&&g.length?this.write(g):"";if(this.lastNeed){var l=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,l)}return b}function B(g,b){var l=(g.length-b)%3;if(l===0)return g.toString("base64",b);if(this.lastNeed=3-l,this.lastTotal=3,l===1)this.lastChar[0]=g[g.length-1];else this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1];return g.toString("base64",b,g.length-l)}function x(g){var b=g&&g.length?this.write(g):"";if(this.lastNeed)return b+this.lastChar.toString("base64",0,3-this.lastNeed);return b}function w(g){return g.toString(this.encoding)}function y(g){return g&&g.length?this.write(g):""}}),VE=x1(($,I)=>{var G=_X().codes.ERR_STREAM_PREMATURE_CLOSE;function Z(W){var R=!1;return function(){if(R)return;R=!0;for(var M=arguments.length,E=Array(M),T=0;T<M;T++)E[T]=arguments[T];W.apply(this,E)}}function _(){}function J(W){return W.setHeader&&typeof W.abort==="function"}function Y(W,R,M){if(typeof R==="function")return Y(W,null,R);if(!R)R={};M=Z(M||_);var E=R.readable||R.readable!==!1&&W.readable,T=R.writable||R.writable!==!1&&W.writable,S=function(){if(!W.writable)B()},N=W._writableState&&W._writableState.finished,B=function(){if(T=!1,N=!0,!E)M.call(W)},x=W._readableState&&W._readableState.endEmitted,w=function(){if(E=!1,x=!0,!T)M.call(W)},y=function(l){M.call(W,l)},g=function(){var l;if(E&&!x){if(!W._readableState||!W._readableState.ended)l=new G;return M.call(W,l)}if(T&&!N){if(!W._writableState||!W._writableState.ended)l=new G;return M.call(W,l)}},b=function(){W.req.on("finish",B)};if(J(W))if(W.on("complete",B),W.on("abort",g),W.req)b();else W.on("request",b);else if(T&&!W._writableState)W.on("end",S),W.on("close",S);if(W.on("end",w),W.on("finish",B),R.error!==!1)W.on("error",y);return W.on("close",g),function(){if(W.removeListener("complete",B),W.removeListener("abort",g),W.removeListener("request",b),W.req)W.req.removeListener("finish",B);W.removeListener("end",S),W.removeListener("close",S),W.removeListener("finish",B),W.removeListener("end",w),W.removeListener("error",y),W.removeListener("close",g)}}I.exports=Y}),Gt=x1(($,I)=>{var G;function Z(i,$0,Q0){if($0=_($0),$0 in i)Object.defineProperty(i,$0,{value:Q0,enumerable:!0,configurable:!0,writable:!0});else i[$0]=Q0;return i}function _(i){var $0=J(i,"string");return typeof $0==="symbol"?$0:String($0)}function J(i,$0){if(typeof i!=="object"||i===null)return i;var Q0=i[Symbol.toPrimitive];if(Q0!==void 0){var G0=Q0.call(i,$0||"default");if(typeof G0!=="object")return G0;throw TypeError("@@toPrimitive must return a primitive value.")}return($0==="string"?String:Number)(i)}var Y=VE(),W=Symbol("lastResolve"),R=Symbol("lastReject"),M=Symbol("error"),E=Symbol("ended"),T=Symbol("lastPromise"),S=Symbol("handlePromise"),N=Symbol("stream");function B(i,$0){return{value:i,done:$0}}function x(i){var $0=i[W];if($0!==null){var Q0=i[N].read();if(Q0!==null)i[T]=null,i[W]=null,i[R]=null,$0(B(Q0,!1))}}function w(i){process.nextTick(x,i)}function y(i,$0){return function(Q0,G0){i.then(function(){if($0[E]){Q0(B(void 0,!0));return}$0[S](Q0,G0)},G0)}}var g=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((G={get stream(){return this[N]},next:function(){var i=this,$0=this[M];if($0!==null)return Promise.reject($0);if(this[E])return Promise.resolve(B(void 0,!0));if(this[N].destroyed)return new Promise(function(t,P0){process.nextTick(function(){if(i[M])P0(i[M]);else t(B(void 0,!0))})});var Q0=this[T],G0;if(Q0)G0=new Promise(y(Q0,this));else{var D0=this[N].read();if(D0!==null)return Promise.resolve(B(D0,!1));G0=new Promise(this[S])}return this[T]=G0,G0}},Z(G,Symbol.asyncIterator,function(){return this}),Z(G,"return",function(){var i=this;return new Promise(function($0,Q0){i[N].destroy(null,function(G0){if(G0){Q0(G0);return}$0(B(void 0,!0))})})}),G),g),l=function(i){var $0,Q0=Object.create(b,($0={},Z($0,N,{value:i,writable:!0}),Z($0,W,{value:null,writable:!0}),Z($0,R,{value:null,writable:!0}),Z($0,M,{value:null,writable:!0}),Z($0,E,{value:i._readableState.endEmitted,writable:!0}),Z($0,S,{value:function(G0,D0){var t=Q0[N].read();if(t)Q0[T]=null,Q0[W]=null,Q0[R]=null,G0(B(t,!1));else Q0[W]=G0,Q0[R]=D0},writable:!0}),$0));return Q0[T]=null,Y(i,function(G0){if(G0&&G0.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D0=Q0[R];if(D0!==null)Q0[T]=null,Q0[W]=null,Q0[R]=null,D0(G0);Q0[M]=G0;return}var t=Q0[W];if(t!==null)Q0[T]=null,Q0[W]=null,Q0[R]=null,t(B(void 0,!0));Q0[E]=!0}),i.on("readable",w.bind(null,Q0)),Q0};I.exports=l}),Yt=x1(($,I)=>{function G(T,S,N,B,x,w,y){try{var g=T[w](y),b=g.value}catch(l){N(l);return}if(g.done)S(b);else Promise.resolve(b).then(B,x)}function Z(T){return function(){var S=this,N=arguments;return new Promise(function(B,x){var w=T.apply(S,N);function y(b){G(w,B,x,y,g,"next",b)}function g(b){G(w,B,x,y,g,"throw",b)}y(void 0)})}}function _(T,S){var N=Object.keys(T);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(T);S&&(B=B.filter(function(x){return Object.getOwnPropertyDescriptor(T,x).enumerable})),N.push.apply(N,B)}return N}function J(T){for(var S=1;S<arguments.length;S++){var N=arguments[S]!=null?arguments[S]:{};S%2?_(Object(N),!0).forEach(function(B){Y(T,B,N[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(N)):_(Object(N)).forEach(function(B){Object.defineProperty(T,B,Object.getOwnPropertyDescriptor(N,B))})}return T}function Y(T,S,N){if(S=W(S),S in T)Object.defineProperty(T,S,{value:N,enumerable:!0,configurable:!0,writable:!0});else T[S]=N;return T}function W(T){var S=R(T,"string");return typeof S==="symbol"?S:String(S)}function R(T,S){if(typeof T!=="object"||T===null)return T;var N=T[Symbol.toPrimitive];if(N!==void 0){var B=N.call(T,S||"default");if(typeof B!=="object")return B;throw TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(T)}var M=_X().codes.ERR_INVALID_ARG_TYPE;function E(T,S,N){var B;if(S&&typeof S.next==="function")B=S;else if(S&&S[Symbol.asyncIterator])B=S[Symbol.asyncIterator]();else if(S&&S[Symbol.iterator])B=S[Symbol.iterator]();else throw new M("iterable",["Iterable"],S);var x=new T(J({objectMode:!0},N)),w=!1;x._read=function(){if(!w)w=!0,y()};function y(){return g.apply(this,arguments)}function g(){return g=Z(function*(){try{var b=yield B.next(),l=b.value,i=b.done;if(i)x.push(null);else if(x.push(yield l))y();else w=!1}catch($0){x.destroy($0)}}),g.apply(this,arguments)}return x}I.exports=E}),Hg=x1(($,I)=>{I.exports=Q;var G;Q.ReadableState=P0;var Z=(ZG(),V$(zG)).EventEmitter,_=function(I0,c){return I0.listeners(c).length},J=w4(),Y=(u1(),V$(h1)).Buffer,W=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function R(I0){return Y.from(I0)}function M(I0){return Y.isBuffer(I0)||I0 instanceof W}var E=(C2(),V$(v2)),T;if(E&&E.debuglog)T=E.debuglog("stream");else T=function(){};var S=It(),N=Dg(),B=Kg(),x=B.getHighWaterMark,w=_X().codes,y=w.ERR_INVALID_ARG_TYPE,g=w.ERR_STREAM_PUSH_AFTER_EOF,b=w.ERR_METHOD_NOT_IMPLEMENTED,l=w.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,i,$0,Q0;IX()(Q,J);var G0=N.errorOrDestroy,D0=["error","close","destroy","pause","resume"];function t(I0,c,s){if(typeof I0.prependListener==="function")return I0.prependListener(c,s);if(!I0._events||!I0._events[c])I0.on(c,s);else if(Array.isArray(I0._events[c]))I0._events[c].unshift(s);else I0._events[c]=[s,I0._events[c]]}function P0(I0,c,s){if(G=G||_Y(),I0=I0||{},typeof s!=="boolean")s=c instanceof G;if(this.objectMode=!!I0.objectMode,s)this.objectMode=this.objectMode||!!I0.readableObjectMode;if(this.highWaterMark=x(this,I0,"readableHighWaterMark",s),this.buffer=new S,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=I0.emitClose!==!1,this.autoDestroy=!!I0.autoDestroy,this.destroyed=!1,this.defaultEncoding=I0.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,I0.encoding){if(!i)i=Og().StringDecoder;this.decoder=new i(I0.encoding),this.encoding=I0.encoding}}function Q(I0){if(G=G||_Y(),!(this instanceof Q))return new Q(I0);var c=this instanceof G;if(this._readableState=new P0(I0,this,c),this.readable=!0,I0){if(typeof I0.read==="function")this._read=I0.read;if(typeof I0.destroy==="function")this._destroy=I0.destroy}J.call(this)}Object.defineProperty(Q.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(I0){if(!this._readableState)return;this._readableState.destroyed=I0}}),Q.prototype.destroy=N.destroy,Q.prototype._undestroy=N.undestroy,Q.prototype._destroy=function(I0,c){c(I0)},Q.prototype.push=function(I0,c){var s=this._readableState,S0;if(!s.objectMode){if(typeof I0==="string"){if(c=c||s.defaultEncoding,c!==s.encoding)I0=Y.from(I0,c),c="";S0=!0}}else S0=!0;return D(this,I0,c,!1,S0)},Q.prototype.unshift=function(I0){return D(this,I0,null,!0,!1)};function D(I0,c,s,S0,M0){T("readableAddChunk",c);var z0=I0._readableState;if(c===null)z0.reading=!1,P(I0,z0);else{var c0;if(!M0)c0=L(z0,c);if(c0)G0(I0,c0);else if(z0.objectMode||c&&c.length>0){if(typeof c!=="string"&&!z0.objectMode&&Object.getPrototypeOf(c)!==Y.prototype)c=R(c);if(S0)if(z0.endEmitted)G0(I0,new l);else F(I0,z0,c,!0);else if(z0.ended)G0(I0,new g);else if(z0.destroyed)return!1;else if(z0.reading=!1,z0.decoder&&!s)if(c=z0.decoder.write(c),z0.objectMode||c.length!==0)F(I0,z0,c,!1);else k(I0,z0);else F(I0,z0,c,!1)}else if(!S0)z0.reading=!1,k(I0,z0)}return!z0.ended&&(z0.length<z0.highWaterMark||z0.length===0)}function F(I0,c,s,S0){if(c.flowing&&c.length===0&&!c.sync)c.awaitDrain=0,I0.emit("data",s);else{if(c.length+=c.objectMode?1:s.length,S0)c.buffer.unshift(s);else c.buffer.push(s);if(c.needReadable)O(I0)}k(I0,c)}function L(I0,c){var s;if(!M(c)&&typeof c!=="string"&&c!==void 0&&!I0.objectMode)s=new y("chunk",["string","Buffer","Uint8Array"],c);return s}Q.prototype.isPaused=function(){return this._readableState.flowing===!1},Q.prototype.setEncoding=function(I0){if(!i)i=Og().StringDecoder;var c=new i(I0);this._readableState.decoder=c,this._readableState.encoding=this._readableState.decoder.encoding;var s=this._readableState.buffer.head,S0="";while(s!==null)S0+=c.write(s.data),s=s.next;if(this._readableState.buffer.clear(),S0!=="")this._readableState.buffer.push(S0);return this._readableState.length=S0.length,this};var H=1073741824;function v(I0){if(I0>=H)I0=H;else I0--,I0|=I0>>>1,I0|=I0>>>2,I0|=I0>>>4,I0|=I0>>>8,I0|=I0>>>16,I0++;return I0}function q(I0,c){if(I0<=0||c.length===0&&c.ended)return 0;if(c.objectMode)return 1;if(I0!==I0)if(c.flowing&&c.length)return c.buffer.head.data.length;else return c.length;if(I0>c.highWaterMark)c.highWaterMark=v(I0);if(I0<=c.length)return I0;if(!c.ended)return c.needReadable=!0,0;return c.length}Q.prototype.read=function(I0){T("read",I0),I0=parseInt(I0,10);var c=this._readableState,s=I0;if(I0!==0)c.emittedReadable=!1;if(I0===0&&c.needReadable&&((c.highWaterMark!==0?c.length>=c.highWaterMark:c.length>0)||c.ended)){if(T("read: emitReadable",c.length,c.ended),c.length===0&&c.ended)r(this);else O(this);return null}if(I0=q(I0,c),I0===0&&c.ended){if(c.length===0)r(this);return null}var S0=c.needReadable;if(T("need readable",S0),c.length===0||c.length-I0<c.highWaterMark)S0=!0,T("length less than watermark",S0);if(c.ended||c.reading)S0=!1,T("reading or ended",S0);else if(S0){if(T("do read"),c.reading=!0,c.sync=!0,c.length===0)c.needReadable=!0;if(this._read(c.highWaterMark),c.sync=!1,!c.reading)I0=q(s,c)}var M0;if(I0>0)M0=m(I0,c);else M0=null;if(M0===null)c.needReadable=c.length<=c.highWaterMark,I0=0;else c.length-=I0,c.awaitDrain=0;if(c.length===0){if(!c.ended)c.needReadable=!0;if(s!==I0&&c.ended)r(this)}if(M0!==null)this.emit("data",M0);return M0};function P(I0,c){if(T("onEofChunk"),c.ended)return;if(c.decoder){var s=c.decoder.end();if(s&&s.length)c.buffer.push(s),c.length+=c.objectMode?1:s.length}if(c.ended=!0,c.sync)O(I0);else if(c.needReadable=!1,!c.emittedReadable)c.emittedReadable=!0,A(I0)}function O(I0){var c=I0._readableState;if(T("emitReadable",c.needReadable,c.emittedReadable),c.needReadable=!1,!c.emittedReadable)T("emitReadable",c.flowing),c.emittedReadable=!0,process.nextTick(A,I0)}function A(I0){var c=I0._readableState;if(T("emitReadable_",c.destroyed,c.length,c.ended),!c.destroyed&&(c.length||c.ended))I0.emit("readable"),c.emittedReadable=!1;c.needReadable=!c.flowing&&!c.ended&&c.length<=c.highWaterMark,d(I0)}function k(I0,c){if(!c.readingMore)c.readingMore=!0,process.nextTick(j,I0,c)}function j(I0,c){while(!c.reading&&!c.ended&&(c.length<c.highWaterMark||c.flowing&&c.length===0)){var s=c.length;if(T("maybeReadMore read 0"),I0.read(0),s===c.length)break}c.readingMore=!1}Q.prototype._read=function(I0){G0(this,new b("_read()"))},Q.prototype.pipe=function(I0,c){var s=this,S0=this._readableState;switch(S0.pipesCount){case 0:S0.pipes=I0;break;case 1:S0.pipes=[S0.pipes,I0];break;default:S0.pipes.push(I0);break}S0.pipesCount+=1,T("pipe count=%d opts=%j",S0.pipesCount,c);var M0=(!c||c.end!==!1)&&I0!==process.stdout&&I0!==process.stderr,z0=M0?F0:X$;if(S0.endEmitted)process.nextTick(z0);else s.once("end",z0);I0.on("unpipe",c0);function c0(p0,l0){if(T("onunpipe"),p0===s){if(l0&&l0.hasUnpiped===!1)l0.hasUnpiped=!0,k0()}}function F0(){T("onend"),I0.end()}var q0=h(s);I0.on("drain",q0);var s0=!1;function k0(){if(T("cleanup"),I0.removeListener("close",T0),I0.removeListener("finish",V0),I0.removeListener("drain",q0),I0.removeListener("error",M$),I0.removeListener("unpipe",c0),s.removeListener("end",F0),s.removeListener("end",X$),s.removeListener("data",n0),s0=!0,S0.awaitDrain&&(!I0._writableState||I0._writableState.needDrain))q0()}s.on("data",n0);function n0(p0){T("ondata");var l0=I0.write(p0);if(T("dest.write",l0),l0===!1){if((S0.pipesCount===1&&S0.pipes===I0||S0.pipesCount>1&&W0(S0.pipes,I0)!==-1)&&!s0)T("false write response, pause",S0.awaitDrain),S0.awaitDrain++;s.pause()}}function M$(p0){if(T("onerror",p0),X$(),I0.removeListener("error",M$),_(I0,"error")===0)G0(I0,p0)}t(I0,"error",M$);function T0(){I0.removeListener("finish",V0),X$()}I0.once("close",T0);function V0(){T("onfinish"),I0.removeListener("close",T0),X$()}I0.once("finish",V0);function X$(){T("unpipe"),s.unpipe(I0)}if(I0.emit("pipe",s),!S0.flowing)T("pipe resume"),s.resume();return I0};function h(I0){return function(){var c=I0._readableState;if(T("pipeOnDrain",c.awaitDrain),c.awaitDrain)c.awaitDrain--;if(c.awaitDrain===0&&_(I0,"data"))c.flowing=!0,d(I0)}}Q.prototype.unpipe=function(I0){var c=this._readableState,s={hasUnpiped:!1};if(c.pipesCount===0)return this;if(c.pipesCount===1){if(I0&&I0!==c.pipes)return this;if(!I0)I0=c.pipes;if(c.pipes=null,c.pipesCount=0,c.flowing=!1,I0)I0.emit("unpipe",this,s);return this}if(!I0){var{pipes:S0,pipesCount:M0}=c;c.pipes=null,c.pipesCount=0,c.flowing=!1;for(var z0=0;z0<M0;z0++)S0[z0].emit("unpipe",this,{hasUnpiped:!1});return this}var c0=W0(c.pipes,I0);if(c0===-1)return this;if(c.pipes.splice(c0,1),c.pipesCount-=1,c.pipesCount===1)c.pipes=c.pipes[0];return I0.emit("unpipe",this,s),this},Q.prototype.on=function(I0,c){var s=J.prototype.on.call(this,I0,c),S0=this._readableState;if(I0==="data"){if(S0.readableListening=this.listenerCount("readable")>0,S0.flowing!==!1)this.resume()}else if(I0==="readable"){if(!S0.endEmitted&&!S0.readableListening){if(S0.readableListening=S0.needReadable=!0,S0.flowing=!1,S0.emittedReadable=!1,T("on readable",S0.length,S0.reading),S0.length)O(this);else if(!S0.reading)process.nextTick(J0,this)}}return s},Q.prototype.addListener=Q.prototype.on,Q.prototype.removeListener=function(I0,c){var s=J.prototype.removeListener.call(this,I0,c);if(I0==="readable")process.nextTick(a,this);return s},Q.prototype.removeAllListeners=function(I0){var c=J.prototype.removeAllListeners.apply(this,arguments);if(I0==="readable"||I0===void 0)process.nextTick(a,this);return c};function a(I0){var c=I0._readableState;if(c.readableListening=I0.listenerCount("readable")>0,c.resumeScheduled&&!c.paused)c.flowing=!0;else if(I0.listenerCount("data")>0)I0.resume()}function J0(I0){T("readable nexttick read 0"),I0.read(0)}Q.prototype.resume=function(){var I0=this._readableState;if(!I0.flowing)T("resume"),I0.flowing=!I0.readableListening,K0(this,I0);return I0.paused=!1,this};function K0(I0,c){if(!c.resumeScheduled)c.resumeScheduled=!0,process.nextTick(O0,I0,c)}function O0(I0,c){if(T("resume",c.reading),!c.reading)I0.read(0);if(c.resumeScheduled=!1,I0.emit("resume"),d(I0),c.flowing&&!c.reading)I0.read(0)}Q.prototype.pause=function(){if(T("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)T("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function d(I0){var c=I0._readableState;T("flow",c.flowing);while(c.flowing&&I0.read()!==null);}if(Q.prototype.wrap=function(I0){var c=this,s=this._readableState,S0=!1;I0.on("end",function(){if(T("wrapped end"),s.decoder&&!s.ended){var c0=s.decoder.end();if(c0&&c0.length)c.push(c0)}c.push(null)}),I0.on("data",function(c0){if(T("wrapped data"),s.decoder)c0=s.decoder.write(c0);if(s.objectMode&&(c0===null||c0===void 0))return;else if(!s.objectMode&&(!c0||!c0.length))return;var F0=c.push(c0);if(!F0)S0=!0,I0.pause()});for(var M0 in I0)if(this[M0]===void 0&&typeof I0[M0]==="function")this[M0]=function(c0){return function(){return I0[c0].apply(I0,arguments)}}(M0);for(var z0=0;z0<D0.length;z0++)I0.on(D0[z0],this.emit.bind(this,D0[z0]));return this._read=function(c0){if(T("wrapped _read",c0),S0)S0=!1,I0.resume()},this},typeof Symbol==="function")Q.prototype[Symbol.asyncIterator]=function(){if($0===void 0)$0=Gt();return $0(this)};Object.defineProperty(Q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Q.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Q.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(I0){if(this._readableState)this._readableState.flowing=I0}}),Q._fromList=m,Object.defineProperty(Q.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function m(I0,c){if(c.length===0)return null;var s;if(c.objectMode)s=c.buffer.shift();else if(!I0||I0>=c.length){if(c.decoder)s=c.buffer.join("");else if(c.buffer.length===1)s=c.buffer.first();else s=c.buffer.concat(c.length);c.buffer.clear()}else s=c.buffer.consume(I0,c.decoder);return s}function r(I0){var c=I0._readableState;if(T("endReadable",c.endEmitted),!c.endEmitted)c.ended=!0,process.nextTick(Y0,c,I0)}function Y0(I0,c){if(T("endReadableNT",I0.endEmitted,I0.length),!I0.endEmitted&&I0.length===0){if(I0.endEmitted=!0,c.readable=!1,c.emit("end"),I0.autoDestroy){var s=c._writableState;if(!s||s.autoDestroy&&s.finished)c.destroy()}}}if(typeof Symbol==="function")Q.from=function(I0,c){if(Q0===void 0)Q0=Yt();return Q0(Q,I0,c)};function W0(I0,c){for(var s=0,S0=I0.length;s<S0;s++)if(I0[s]===c)return s;return-1}}),Fg=x1(($,I)=>{I.exports=M;var G=_X().codes,Z=G.ERR_METHOD_NOT_IMPLEMENTED,_=G.ERR_MULTIPLE_CALLBACK,J=G.ERR_TRANSFORM_ALREADY_TRANSFORMING,Y=G.ERR_TRANSFORM_WITH_LENGTH_0,W=_Y();IX()(M,W);function R(S,N){var B=this._transformState;B.transforming=!1;var x=B.writecb;if(x===null)return this.emit("error",new _);if(B.writechunk=null,B.writecb=null,N!=null)this.push(N);x(S);var w=this._readableState;if(w.reading=!1,w.needReadable||w.length<w.highWaterMark)this._read(w.highWaterMark)}function M(S){if(!(this instanceof M))return new M(S);if(W.call(this,S),this._transformState={afterTransform:R.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,S){if(typeof S.transform==="function")this._transform=S.transform;if(typeof S.flush==="function")this._flush=S.flush}this.on("prefinish",E)}function E(){var S=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(N,B){T(S,N,B)});else T(this,null,null)}M.prototype.push=function(S,N){return this._transformState.needTransform=!1,W.prototype.push.call(this,S,N)},M.prototype._transform=function(S,N,B){B(new Z("_transform()"))},M.prototype._write=function(S,N,B){var x=this._transformState;if(x.writecb=B,x.writechunk=S,x.writeencoding=N,!x.transforming){var w=this._readableState;if(x.needTransform||w.needReadable||w.length<w.highWaterMark)this._read(w.highWaterMark)}},M.prototype._read=function(S){var N=this._transformState;if(N.writechunk!==null&&!N.transforming)N.transforming=!0,this._transform(N.writechunk,N.writeencoding,N.afterTransform);else N.needTransform=!0},M.prototype._destroy=function(S,N){W.prototype._destroy.call(this,S,function(B){N(B)})};function T(S,N,B){if(N)return S.emit("error",N);if(B!=null)S.push(B);if(S._writableState.length)throw new Y;if(S._transformState.transforming)throw new J;return S.push(null)}}),Jt=x1(($,I)=>{I.exports=Z;var G=Fg();IX()(Z,G);function Z(_){if(!(this instanceof Z))return new Z(_);G.call(this,_)}Z.prototype._transform=function(_,J,Y){Y(null,_)}}),Qt=x1(($,I)=>{var G;function Z(B){var x=!1;return function(){if(x)return;x=!0,B.apply(void 0,arguments)}}var _=_X().codes,J=_.ERR_MISSING_ARGS,Y=_.ERR_STREAM_DESTROYED;function W(B){if(B)throw B}function R(B){return B.setHeader&&typeof B.abort==="function"}function M(B,x,w,y){y=Z(y);var g=!1;if(B.on("close",function(){g=!0}),G===void 0)G=VE();G(B,{readable:x,writable:w},function(l){if(l)return y(l);g=!0,y()});var b=!1;return function(l){if(g)return;if(b)return;if(b=!0,R(B))return B.abort();if(typeof B.destroy==="function")return B.destroy();y(l||new Y("pipe"))}}function E(B){B()}function T(B,x){return B.pipe(x)}function S(B){if(!B.length)return W;if(typeof B[B.length-1]!=="function")return W;return B.pop()}function N(){for(var B=arguments.length,x=Array(B),w=0;w<B;w++)x[w]=arguments[w];var y=S(x);if(Array.isArray(x[0]))x=x[0];if(x.length<2)throw new J("streams");var g,b=x.map(function(l,i){var $0=i<x.length-1,Q0=i>0;return M(l,$0,Q0,function(G0){if(!g)g=G0;if(G0)b.forEach(E);if($0)return;b.forEach(E),y(g)})});return x.reduce(T)}I.exports=N}),Tg=x1(($,I)=>{var G=w4();$=I.exports=Hg(),$.Stream=G||$,$.Readable=$,$.Writable=Wg(),$.Duplex=_Y(),$.Transform=Fg(),$.PassThrough=Jt(),$.finished=VE(),$.pipeline=Qt()}),Mg=x1(($)=>{var I=Lg(),G=IX(),Z=Tg(),_=$.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},J=$.IncomingMessage=function(Y,W,R,M){var E=this;if(Z.Readable.call(E),E._mode=R,E.headers={},E.rawHeaders=[],E.trailers={},E.rawTrailers=[],E.on("end",function(){process.nextTick(function(){E.emit("close")})}),R==="fetch"){let y=function(){N.read().then(function(g){if(E._destroyed)return;if(M(g.done),g.done){E.push(null);return}E.push(Buffer.from(g.value)),y()}).catch(function(g){if(M(!0),!E._destroyed)E.emit("error",g)})};var T=y;if(E._fetchResponse=W,E.url=W.url,E.statusCode=W.status,E.statusMessage=W.statusText,W.headers.forEach(function(g,b){E.headers[b.toLowerCase()]=g,E.rawHeaders.push(b,g)}),I.writableStream){var S=new WritableStream({write:function(g){return M(!1),new Promise(function(b,l){if(E._destroyed)l();else if(E.push(Buffer.from(g)))b();else E._resumeFetch=b})},close:function(){if(M(!0),!E._destroyed)E.push(null)},abort:function(g){if(M(!0),!E._destroyed)E.emit("error",g)}});try{W.body.pipeTo(S).catch(function(g){if(M(!0),!E._destroyed)E.emit("error",g)});return}catch(g){}}var N=W.body.getReader();y()}else{E._xhr=Y,E._pos=0,E.url=Y.responseURL,E.statusCode=Y.status,E.statusMessage=Y.statusText;var B=Y.getAllResponseHeaders().split(/\r?\n/);if(B.forEach(function(y){var g=y.match(/^([^:]+):\s*(.*)/);if(g){var b=g[1].toLowerCase();if(b==="set-cookie"){if(E.headers[b]===void 0)E.headers[b]=[];E.headers[b].push(g[2])}else if(E.headers[b]!==void 0)E.headers[b]+=", "+g[2];else E.headers[b]=g[2];E.rawHeaders.push(g[1],g[2])}}),E._charset="x-user-defined",!I.overrideMimeType){var x=E.rawHeaders["mime-type"];if(x){var w=x.match(/;\s*charset=([^;])(;|$)/);if(w)E._charset=w[1].toLowerCase()}if(!E._charset)E._charset="utf-8"}}};G(J,Z.Readable),J.prototype._read=function(){var Y=this,W=Y._resumeFetch;if(W)Y._resumeFetch=null,W()},J.prototype._onXHRProgress=function(Y){var W=this,R=W._xhr,M=null;switch(W._mode){case"text":if(M=R.responseText,M.length>W._pos){var E=M.substr(W._pos);if(W._charset==="x-user-defined"){var T=Buffer.alloc(E.length);for(var S=0;S<E.length;S++)T[S]=E.charCodeAt(S)&255;W.push(T)}else W.push(E,W._charset);W._pos=M.length}break;case"arraybuffer":if(R.readyState!==_.DONE||!R.response)break;M=R.response,W.push(Buffer.from(new Uint8Array(M)));break;case"moz-chunked-arraybuffer":if(M=R.response,R.readyState!==_.LOADING||!M)break;W.push(Buffer.from(new Uint8Array(M)));break;case"ms-stream":if(M=R.response,R.readyState!==_.LOADING)break;var N=new globalThis.MSStreamReader;N.onprogress=function(){if(N.result.byteLength>W._pos)W.push(Buffer.from(new Uint8Array(N.result.slice(W._pos)))),W._pos=N.result.byteLength},N.onload=function(){Y(!0),W.push(null)},N.readAsArrayBuffer(M);break}if(W._xhr.readyState===_.DONE&&W._mode!=="ms-stream")Y(!0),W.push(null)}}),zt=x1(($,I)=>{var G=Lg(),Z=IX(),_=Mg(),J=Tg(),Y=_.IncomingMessage,W=_.readyStates;function R(S,N){if(G.fetch&&N)return"fetch";else if(G.mozchunkedarraybuffer)return"moz-chunked-arraybuffer";else if(G.msstream)return"ms-stream";else if(G.arraybuffer&&S)return"arraybuffer";else return"text"}var M=I.exports=function(S){var N=this;if(J.Writable.call(N),N._opts=S,N._body=[],N._headers={},S.auth)N.setHeader("Authorization","Basic "+Buffer.from(S.auth).toString("base64"));Object.keys(S.headers).forEach(function(w){N.setHeader(w,S.headers[w])});var B,x=!0;if(S.mode==="disable-fetch"||"requestTimeout"in S&&!G.abortController)x=!1,B=!0;else if(S.mode==="prefer-streaming")B=!1;else if(S.mode==="allow-wrong-content-type")B=!G.overrideMimeType;else if(!S.mode||S.mode==="default"||S.mode==="prefer-fast")B=!0;else throw Error("Invalid value for opts.mode");N._mode=R(B,x),N._fetchTimer=null,N._socketTimeout=null,N._socketTimer=null,N.on("finish",function(){N._onFinish()})};Z(M,J.Writable),M.prototype.setHeader=function(S,N){var B=this,x=S.toLowerCase();if(T.indexOf(x)!==-1)return;B._headers[x]={name:S,value:N}},M.prototype.getHeader=function(S){var N=this._headers[S.toLowerCase()];if(N)return N.value;return null},M.prototype.removeHeader=function(S){var N=this;delete N._headers[S.toLowerCase()]},M.prototype._onFinish=function(){var S=this;if(S._destroyed)return;var N=S._opts;if("timeout"in N&&N.timeout!==0)S.setTimeout(N.timeout);var B=S._headers,x=null;if(N.method!=="GET"&&N.method!=="HEAD")x=new Blob(S._body,{type:(B["content-type"]||{}).value||""});var w=[];if(Object.keys(B).forEach(function(l){var i=B[l].name,$0=B[l].value;if(Array.isArray($0))$0.forEach(function(Q0){w.push([i,Q0])});else w.push([i,$0])}),S._mode==="fetch"){var y=null;if(G.abortController){var g=new AbortController;if(y=g.signal,S._fetchAbortController=g,"requestTimeout"in N&&N.requestTimeout!==0)S._fetchTimer=globalThis.setTimeout(function(){if(S.emit("requestTimeout"),S._fetchAbortController)S._fetchAbortController.abort()},N.requestTimeout)}globalThis.fetch(S._opts.url,{method:S._opts.method,headers:w,body:x||void 0,mode:"cors",credentials:N.withCredentials?"include":"same-origin",signal:y}).then(function(l){S._fetchResponse=l,S._resetTimers(!1),S._connect()},function(l){if(S._resetTimers(!0),!S._destroyed)S.emit("error",l)})}else{var b=S._xhr=new globalThis.XMLHttpRequest;try{b.open(S._opts.method,S._opts.url,!0)}catch(l){process.nextTick(function(){S.emit("error",l)});return}if("responseType"in b)b.responseType=S._mode;if("withCredentials"in b)b.withCredentials=!!N.withCredentials;if(S._mode==="text"&&"overrideMimeType"in b)b.overrideMimeType("text/plain; charset=x-user-defined");if("requestTimeout"in N)b.timeout=N.requestTimeout,b.ontimeout=function(){S.emit("requestTimeout")};if(w.forEach(function(l){b.setRequestHeader(l[0],l[1])}),S._response=null,b.onreadystatechange=function(){switch(b.readyState){case W.LOADING:case W.DONE:S._onXHRProgress();break}},S._mode==="moz-chunked-arraybuffer")b.onprogress=function(){S._onXHRProgress()};b.onerror=function(){if(S._destroyed)return;S._resetTimers(!0),S.emit("error",Error("XHR error"))};try{b.send(x)}catch(l){process.nextTick(function(){S.emit("error",l)});return}}};function E(S){try{var N=S.status;return N!==null&&N!==0}catch(B){return!1}}M.prototype._onXHRProgress=function(){var S=this;if(S._resetTimers(!1),!E(S._xhr)||S._destroyed)return;if(!S._response)S._connect();S._response._onXHRProgress(S._resetTimers.bind(S))},M.prototype._connect=function(){var S=this;if(S._destroyed)return;S._response=new Y(S._xhr,S._fetchResponse,S._mode,S._resetTimers.bind(S)),S._response.on("error",function(N){S.emit("error",N)}),S.emit("response",S._response)},M.prototype._write=function(S,N,B){var x=this;x._body.push(S),B()},M.prototype._resetTimers=function(S){var N=this;if(globalThis.clearTimeout(N._socketTimer),N._socketTimer=null,S)globalThis.clearTimeout(N._fetchTimer),N._fetchTimer=null;else if(N._socketTimeout)N._socketTimer=globalThis.setTimeout(function(){N.emit("timeout")},N._socketTimeout)},M.prototype.abort=M.prototype.destroy=function(S){var N=this;if(N._destroyed=!0,N._resetTimers(!0),N._response)N._response._destroyed=!0;if(N._xhr)N._xhr.abort();else if(N._fetchAbortController)N._fetchAbortController.abort();if(S)N.emit("error",S)},M.prototype.end=function(S,N,B){var x=this;if(typeof S==="function")B=S,S=void 0;J.Writable.prototype.end.call(x,S,N,B)},M.prototype.setTimeout=function(S,N){var B=this;if(N)B.once("timeout",N);B._socketTimeout=S,B._resetTimers(!1)},M.prototype.flushHeaders=function(){},M.prototype.setNoDelay=function(){},M.prototype.setSocketKeepAlive=function(){};var T=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}),Zt=x1(($,I)=>{I.exports=Z;var G=Object.prototype.hasOwnProperty;function Z(){var _={};for(var J=0;J<arguments.length;J++){var Y=arguments[J];for(var W in Y)if(G.call(Y,W))_[W]=Y[W]}return _}}),Ot=x1(($,I)=>{I.exports=(Xz(),V$(d5)).STATUS_CODES}),Lt=x1(($)=>{var I=zt(),G=Mg(),Z=Zt(),_=Ot(),J=(PE(),V$(RE)),Y=$;Y.request=function(W,R){if(typeof W==="string")W=J.parse(W);else W=Z(W);var M=globalThis.location.protocol.search(/^https?:$/)===-1?"http:":"",E=W.protocol||M,T=W.hostname||W.host,S=W.port,N=W.path||"/";if(T&&T.indexOf(":")!==-1)T="["+T+"]";W.url=(T?E+"//"+T:"")+(S?":"+S:"")+N,W.method=(W.method||"GET").toUpperCase(),W.headers=W.headers||{};var B=new I(W);if(R)B.on("response",R);return B},Y.get=function(W,R){var M=Y.request(W,R);return M.end(),M},Y.ClientRequest=I,Y.IncomingMessage=G.IncomingMessage,Y.Agent=function(){},Y.Agent.defaultMaxSockets=4,Y.globalAgent=new Y.Agent,Y.STATUS_CODES=_,Y.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}),Ag=$t(Lt(),1),{request:Dt,get:Kt,ClientRequest:Wt,IncomingMessage:Ht,Agent:Ft,globalAgent:Tt,STATUS_CODES:Mt,METHODS:At}=Ag.default,Eg=Ag.default});var Vg={};LU(Vg,{isIPv6:()=>vE,isIPv4:()=>SE,isIP:()=>Rg,default:()=>Pg});function SE($){return Et.test($)}function vE($){return Rt.test($)}function Rg($){if(SE($))return 4;if(vE($))return 6;return 0}var Et,Rt,Pg;var CE=WI(()=>{Et=new RegExp("^(?:(?: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])$"),Rt=new RegExp("^(?:(?:(?:[0-9a-fA-F]{1,4}):){7}(?:(?:[0-9a-fA-F]{1,4})|:)|(?:(?:[0-9a-fA-F]{1,4}):){6}(?:(?:(?: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])|:(?:[0-9a-fA-F]{1,4})|:)|(?:(?:[0-9a-fA-F]{1,4}):){5}(?::(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,2}|:)|(?:(?:[0-9a-fA-F]{1,4}):){4}(?:(?::(?:[0-9a-fA-F]{1,4})){0,1}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,3}|:)|(?:(?:[0-9a-fA-F]{1,4}):){3}(?:(?::(?:[0-9a-fA-F]{1,4})){0,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])|(?::(?:[0-9a-fA-F]{1,4})){1,4}|:)|(?:(?:[0-9a-fA-F]{1,4}):){2}(?:(?::(?:[0-9a-fA-F]{1,4})){0,3}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,5}|:)|(?:(?:[0-9a-fA-F]{1,4}):){1}(?:(?::(?:[0-9a-fA-F]{1,4})){0,4}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,6}|:)|(?::(?:(?::(?:[0-9a-fA-F]{1,4})){0,5}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,7}|:)))(?:%[0-9a-zA-Z-.:]{1,})?$");Pg={isIPv4:SE,isIPv6:vE,isIP:Rg}});var qg=N6((tQ0,pt)=>{pt.exports={"//":"GENERATED by scripts/pack-facts.ts — do not hand-edit. Compiled from each pack's `pack: TwinPack` descriptor; pack-facts.test.ts fails on drift.",packs:{ahrefs:{adoption:{pypi:[],sdks:["@ahrefs/mcp"],scopes:["@ahrefs/"],envStems:["AHREFS"]},hosts:[{host:"api.ahrefs.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["target","usage","cache","audit"],serveExport:"createAhrefsTwinServer"},"ai-gateway":{adoption:{pypi:[],sdks:["@ai-sdk/gateway"],envStems:["AIGATEWAY"]},hostsNone:"SDK is base-URL-configured (@ai-sdk/gateway baseURL / AI_GATEWAY_BASE_URL) — worlds wire the twin through explicit endpoint config; no injector entry grounded yet",archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["generation"],serveExport:"createAiGatewayTwinServer"},airtable:{adoption:{pypi:["pyairtable","airtable-python-wrapper"],sdks:["airtable"],envStems:["AIRTABLE"]},hosts:[{host:"api.airtable.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["base","table","record","comment"],endpointEnvNone:"the injector intercepts api.airtable.com (see `hosts`), which covers every client with no env at all; AIRTABLE_ENDPOINT_URL is real (Airtable.default_config(), airtable@0.12.2) but injecting it alongside interception is the strictly narrower answer — one wiring, not two.",serveExport:"createAirtableTwinServer"},algolia:{adoption:{pypi:["algoliasearch"],sdks:["algoliasearch"],envStems:["ALGOLIA","ALGOLIAWRITE"]},hostsNone:"per-app-ID host scheme ({appId}.algolia.net / {appId}-dsn.algolia.net / {appId}-N.algolianet.com, see the pack README §Host tolerance) — no fixed host list to match; the host-tolerant twin is wired by explicit client host config",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["index","record","synonym","settings"],serveExport:"createAlgoliaTwinServer"},anthropic:{adoption:{pypi:["anthropic","claude-agent-sdk","claude-code-sdk"],sdks:["@anthropic-ai/sdk","@ai-sdk/anthropic","@anthropic-ai/vertex-sdk","@anthropic-ai/bedrock-sdk","@anthropic-ai/claude-agent-sdk"],scopes:["@anthropic-ai/"],envStems:["ANTHROPIC","CLAUDE"]},hosts:[{host:"api.anthropic.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["message_batch","file","agent","environment","session","vault","vault_credential","memory_store","memory","memory_version","deployment","deployment_run","skill","webhook_secret"],serveExport:"createAnthropicTwinServer"},assemblyai:{adoption:{pypi:["assemblyai"],sdks:["assemblyai"],envStems:["ASSEMBLYAI"]},hosts:[{host:"api.assemblyai.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["transcript","upload"],serveExport:"createAssemblyAITwinServer"},aws:{adoption:{pypi:["boto3","botocore","aioboto3","aiobotocore"],sdks:["@aws-sdk/client-s3","@aws-sdk/s3-request-presigner","@aws-sdk/lib-storage","@aws-sdk/client-dynamodb","@aws-sdk/lib-dynamodb","@aws-sdk/client-timestream-write","@aws-sdk/client-timestream-query","aws-sdk","@aws-sdk/client-sesv2","@aws-sdk/client-secrets-manager","@aws-sdk/client-bedrock-runtime","@aws-sdk/client-bedrock","@ai-sdk/amazon-bedrock"],envStems:["AWS","S3","LANGFUSELLMCONNECTIONBEDROCK"],worldIds:["s3","dynamodb","timestream","timestreamwrite","timestreamquery","sesv2","secretsmanager","bedrock"]},hosts:[{key:"s3",host:"s3.amazonaws.com"},{key:"s3",suffix:".s3.amazonaws.com"},{key:"s3",hostPattern:"^s3[.-][a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",hostPattern:"\\.s3[.-][a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",hostPattern:"^s3\\.dualstack\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",hostPattern:"\\.s3\\.dualstack\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",suffix:".s3-accelerate.amazonaws.com"},{key:"s3",suffix:".s3-accelerate.dualstack.amazonaws.com"},{key:"dynamodb",hostPattern:"^dynamodb\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"timestream",hostPattern:"(^|\\.)(ingest|query)\\.timestream\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"sesv2",hostPattern:"^email\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"secretsmanager",hostPattern:"^secretsmanager(-fips)?\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"bedrock",hostPattern:"^bedrock(-runtime)?(-fips)?\\.[a-z0-9-]+\\.(amazonaws\\.com|api\\.aws)$"}],archetype:"signed-protocol",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{foundation_model:"the account catalog: pulled from ListFoundationModels, never created by a caller"},resources:["bucket","object","multipart_upload","table","item","database","record","message","secret","invocation","foundation_model","identity"],serveExport:"createAwsTwinServer"},axiom:{adoption:{sdks:["@axiomhq/js","@axiomhq/logging","@axiomhq/nextjs"],pypi:["axiom-py"],envStems:["AXIOM"]},hosts:[{host:"api.axiom.co"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["dataset","event"],endpointEnvNone:"no env var: @axiomhq/js reads its base URL only from the `url` constructor option (httpClient.ts:33,45) and Dub constructs `new Axiom({ token })` with none, so interception is the hosts entry above; an AXIOM_URL no client reads would be invented surface.",serveExport:"createAxiomTwinServer"},azure:{adoption:{pypi:["azure-storage-blob","azure-ai-inference"],sdks:["@azure/storage-blob","@azure/openai","@azure-rest/ai-inference","@ai-sdk/azure"],envStems:["AZURE","AZUREOPENAI","AZUREGPT4OMINI","AZUREGPT5","AZUREGPT5MINI","AZUREGPT5NANO"]},hosts:[{suffix:".blob.core.windows.net"},{suffix:".openai.azure.com"},{suffix:".cognitiveservices.azure.com",pathPattern:"^/openai/"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["container","blob","block","deployment"],endpointEnvNone:"Host-based interception only. @azure/storage-blob is configured with a blob endpoint URL or a connection string (both resolving to <account>.blob.core.windows.net, which the injector rewrites), and reads no base-URL environment variable of its own — the same reason the aws pack declares none.",serveExport:"createAzureTwinServer"},azureformrecognizer:{adoption:{pypi:["azure-ai-documentintelligence","azure-ai-formrecognizer"],sdks:["@azure-rest/ai-document-intelligence","@azure/ai-form-recognizer"],envStems:["AZUREFORMRECOGNIZER","AZUREDOCUMENTINTELLIGENCE"]},hosts:[{suffix:".cognitiveservices.azure.com",pathPattern:"^/(documentintelligence|formrecognizer)/"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"prebuilt models are the vendor's catalog; a custom model is born of a training job this twin does not run"},resources:["analysis","model"],serveExport:"createAzureFormRecognizerTwinServer"},bitly:{adoption:{pypi:[],envStems:["BITLY"]},hosts:[{host:"api-ssl.bitly.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["bitlink","group","organization","user","qr_code","campaign","channel","webhook","custom_bitlink","click"],endpointEnvNone:"no injector-free path: Bitly integrations hardcode https://api-ssl.bitly.com and the vendor documents no base-URL override, so interception is the hosts entry above; a BITLY_BASE_URL would be invented surface no app reads.",serveExport:"createBitlyTwinServer"},bluesky:{adoption:{sdks:["@atproto/api"],pypi:[],envStems:["BLUESKY","BSKY"]},hosts:[{host:"bsky.social",pathPattern:"^/xrpc/(com\\.atproto|app\\.bsky)\\."},{hostPattern:"^[a-z0-9-]+\\.[a-z0-9-]+\\.host\\.bsky\\.network$",pathPattern:"^/xrpc/(com\\.atproto|app\\.bsky)\\."},{host:"api.bsky.app",pathPattern:"^/xrpc/app\\.bsky\\.(actor|feed)\\."},{host:"public.api.bsky.app",pathPattern:"^/xrpc/app\\.bsky\\.(actor|feed)\\."},{host:"video.bsky.app",pathPattern:"^/(xrpc/app\\.bsky\\.video\\.|watch/)"},{host:"cdn.bsky.app",pathPattern:"^/img/"},{host:"bsky.app",pathPattern:"^/profile/[^/]+/?$|^/profile/[^/]+/post/[A-Za-z0-9._:~-]{1,512}/?$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["account","post","follow","profile"],endpointEnvNone:"@atproto/api reads no base-URL environment variable (an AtpAgent takes its `service` URL in code, and the video service's is the social-app's constant), so a World reaches it through the hosts above; inventing a BLUESKY_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createBlueskyTwinServer"},calcom:{adoption:{pypi:[],envStems:["CALCOM","CAL"]},hosts:[{host:"api.cal.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["booking","event_type","schedule","team","membership","webhook","slot"],serveExport:"createCalcomTwinServer"},cerebras:{adoption:{sdks:["@cerebras/cerebras_cloud_sdk","@ai-sdk/cerebras"],envStems:["CEREBRAS"]},hosts:[{host:"api.cerebras.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:[],endpointEnvNone:"The injector intercepts api.cerebras.ai (see `hosts`), so a world wires this pack through CEREBRAS_TWIN_URL rather than an app-read base-URL var. The SDK would honour CEREBRAS_BASE_URL, but the injector covers all of that traffic with zero app edits while an app-read env covers only clients constructed after the env lands — emitting both would quietly forgo interception.",serveExport:"createCerebrasTwinServer"},clerk:{adoption:{pypi:["clerk-backend-api"],sdks:["@clerk/backend","@clerk/clerk-sdk-node","@clerk/nextjs","@clerk/fastify","@clerk/express"],scopes:["@clerk/"],envStems:["CLERK"]},hosts:[{host:"api.clerk.com"},{suffix:".clerk.accounts.dev"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",assets:["client/clerk-js-dist","client/clerk.browser.js"],resources:["user","session","organization","organization_membership","organization_invitation","invitation","allowlist_identifier","blocklist_identifier","jwt_template","sign_in_token"],serveExport:"createClerkTwinServer"},cloudflare:{adoption:{pypi:["cloudflare"],tools:[{package:"wrangler",usage:"deployment"}],sdks:["cloudflare","aws4fetch"],envStems:["CLOUDFLARE"]},hosts:[{host:"api.cloudflare.com"},{host:"dash.cloudflare.com",pathPattern:"^/(login|_twin/users/|[0-9a-f]{32}/r2/|$)"},{suffix:".r2.cloudflarestorage.com"}],hostsClaimed:{door:"/twin/hosts",note:"the custom domains connected to R2 buckets"},archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["account","zone","cloudflare_tunnel","tunnel_configuration","dns_record","worker_script","worker_route","worker_domain","workers_subdomain","durable_object_namespace","r2_bucket","r2_custom_domain","hyperdrive_config","queue","queue_consumer","worker_version","worker_asset","worker_asset_upload_session"],serveExport:"createCloudflareTwinServer"},cohere:{adoption:{pypi:["cohere"],sdks:["cohere-ai","@ai-sdk/cohere"],envStems:["COHERE","CO"]},hosts:[{host:"api.cohere.com"},{host:"api.cohere.ai"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["dataset","connector","embed_job","token"],endpointEnvNone:"neither official SDK reads a base-URL env var: cohere-ai@8.1.0 takes the override as the `baseUrl`/`environment` CONSTRUCTOR option and reads only CO_API_KEY from the environment (auth/BearerAuthProvider.js), and @ai-sdk/cohere@4.0.35 takes `options.baseURL` and reads only COHERE_API_KEY. Interception is host-based on api.cohere.com and api.cohere.ai; inventing a COHERE_BASE_URL nothing reads would make `covers` claim a world it does not cover.",serveExport:"createCohereTwinServer"},currencyapi:{adoption:{sdks:["@everapi/currencyapi-js"],pypi:["currencyapicom"],envStems:["CURRENCYAPI"]},hosts:[{host:"api.currencyapi.com"},{host:"app.currencyapi.com",pathPattern:"^/(register|login|dashboard|subscription)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["_account","_api_key","_usage","_web_session"],endpointEnvNone:"currencyapi's clients hardcode https://api.currencyapi.com/v3 (@everapi/currencyapi-js index.js `baseUrl`, dubinc/dub apps/web/lib/currencyapi/client.ts `baseUrl`) and read no base-URL env; interception is the hosts above.",serveExport:"createCurrencyapiTwinServer"},daily:{adoption:{envStems:["DAILY"]},hosts:[{host:"api.daily.co"},{hostPattern:"^[a-z0-9][a-z0-9-]*\\.daily\\.co$"},{host:"c.daily.co",exclude:!0},{host:"gs.daily.co",exclude:!0},{host:"www.daily.co",exclude:!0},{host:"dashboard.daily.co",exclude:!0},{host:"docs.daily.co",exclude:!0},{host:"help.daily.co",exclude:!0},{host:"status.daily.co",exclude:!0},{host:"blog.daily.co",exclude:!0},{host:"pipecat.daily.co",exclude:!0},{host:"reference-python.daily.co",exclude:!0},{host:"reference-ios.daily.co",exclude:!0},{host:"reference-android.daily.co",exclude:!0}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["Room","Meeting","Recording","Transcript","BatchJob","Webhook","_domain","_delivery","_receiver"],endpointEnvNone:"Daily's REST clients hardcode https://api.daily.co/v1 (Cal.com packages/app-store/dailyvideo/lib/dailyApiFetcher.ts) and read no base-URL env; interception is the hosts above.",serveExport:"createDailyTwinServer"},datadog:{adoption:{pypi:["datadog","datadog-api-client","ddtrace"],sdks:["@datadog/datadog-api-client","@datadog/browser-rum","@datadog/browser-logs","dd-trace"],scopes:["@datadog/"],envStems:["DATADOG","DD"]},hosts:[{host:"datadoghq.com"},{suffix:".datadoghq.com"},{host:"datadoghq.eu"},{suffix:".datadoghq.eu"},{host:"ddog-gov.com"},{suffix:".ddog-gov.com"},{hostPattern:"^([a-z0-9-]+\\.)?browser-intake-(?:[a-z0-9]+-)?(?:datadoghq\\.(?:com|eu)|ddog-gov\\.com)$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["org","rum_application","rum_event","log","metric_series","metric_def","service_check","event","monitor","dashboard","host","slo","downtime","api_key","user"],serveExport:"createDatadogTwinServer"},deepgram:{adoption:{pypi:["deepgram-sdk"],sdks:["@deepgram/sdk"],envStems:["DEEPGRAM"]},hosts:[{host:"api.deepgram.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{project:"the tenant itself: born with the account, never created through the API"},resources:["project","key","request"],serveExport:"createDeepgramTwinServer"},deepinfra:{adoption:{sdks:["deepinfra","@ai-sdk/deepinfra"],envStems:["DEEPINFRA"]},hosts:[{host:"api.deepinfra.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog",rate_limit:"the account ledger the vendor keeps; read-only"},resources:["model","file","batch","rate_limit"],endpointEnvNone:"the deepinfra SDK exposes no base-URL env: DeepInfraClient takes the endpoint URL as a constructor argument (the modelName IS the full URL) and reads only DEEPINFRA_API_KEY; interception is the hosts above.",serveExport:"createDeepinfraTwinServer"},deepseek:{adoption:{pypi:[],sdks:["@ai-sdk/deepseek"],envStems:["DEEPSEEK"]},hosts:[{host:"api.deepseek.com"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog",balance:"the account ledger the vendor keeps; read-only"},resources:["model","file","balance","cache_prefix"],endpointEnvNone:"no app-read endpoint env: @ai-sdk/deepseek — the only first-party npm client of this surface — reads exactly one environment variable (DEEPSEEK_API_KEY, via loadApiKey in src/deepseek-provider.ts) and takes baseURL as a constructor option, so there is no vendor-documented base-URL var to inject. The injector covers api.deepseek.com instead (see `hosts`). NextChat's DEEPSEEK_URL is one application's own convention, not vendor surface, and claiming it would report a world covered while the SDK-based majority still reached the real vendor.",serveExport:"createDeepSeekTwinServer"},discord:{adoption:{sdks:["discord.js","@discordjs/rest","@discordjs/core","@discordjs/builders","discord-api-types"],pypi:["discord.py","discord"],envStems:["DISCORD"]},hosts:[{host:"discord.com",pathPattern:"^/api/"},{host:"discord.com",pathPattern:"^/(oauth2/authorize|login)/?$"},{host:"gateway.discord.gg"},{host:"discordapp.com",pathPattern:"^/api/"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["application","application_command","ban","channel","guild","interaction_response","invite","member","message","oauth_grant","role","user","webhook"],endpointEnvNone:"no Discord client reads a base-URL env var — discord.js takes `api` as a REST constructor option and discord.py hardcodes its Route base, so interception is the `hosts` entries above. Inventing a DISCORD_BASE_URL would report coverage the app could not use.",serveExport:"createDiscordTwinServer"},dynadot:{adoption:{pypi:[],envStems:["DYNADOT"]},hosts:[{host:"api.dynadot.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["domain","account"],serveExport:"createDynadotTwinServer"},elevenlabs:{adoption:{pypi:["elevenlabs"],sdks:["elevenlabs","@elevenlabs/elevenlabs-js"],scopes:["@elevenlabs/"],envStems:["ELEVENLABS"]},hosts:[{host:"api.elevenlabs.io"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["voice","generated_voice","pronunciation_dictionary","dubbing","history_item"],serveExport:"createElevenLabsTwinServer"},expo:{adoption:{sdks:["expo-server-sdk"],pypi:["exponent-server-sdk"],envStems:["EXPO"]},hosts:[{host:"exp.host"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["push_device","push_ticket"],endpointEnvNone:"expo-server-sdk-node DOES read EXPO_BASE_URL (src/ExpoClientValues.ts builds both push URLs from process.env['EXPO_BASE_URL'] || 'https://exp.host'), but this pack claims exp.host in `hosts`, so interception is host-based and zero-edit; emitting the var would forgo that. Point EXPO_BASE_URL at the twin by hand only when running outside an injected world.",serveExport:"createExpoTwinServer"},fal:{adoption:{pypi:["fal-client","fal"],sdks:["@fal-ai/client","@fal-ai/serverless-client"],scopes:["@fal-ai/"],envStems:["FAL"]},hostsNone:"host-split surface (fal.run / queue.fal.run) with no injector entry grounded yet — worlds wire the twin via the client's explicit endpoint config; a visible gap until its hosts are grounded here",archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["request","signing_key"],serveExport:"createFalTwinServer"},figma:{adoption:{pypi:[],sdks:["figma-api","@figma/rest-api-spec"],scopes:["@figma/"],envStems:["FIGMA"]},hostsNone:'no injector entry grounded yet — the pack README wires clients at the twin by base URL ("nothing changed but the base URL"); zero-edit interception of api.figma.com is a visible gap until grounded here',archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["file","comment","version","project","team","user","credential"],serveExport:"createFigmaTwinServer"},firecrawl:{adoption:{pypi:["firecrawl-py","firecrawl"],sdks:["@mendable/firecrawl-js","firecrawl"],scopes:["@mendable/"],envStems:["FIRECRAWL","S2SFIRECRAWLINTEGRATIONSTOFIRECRAWL"]},hosts:[{host:"api.firecrawl.dev"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["document","crawl","audit"],serveExport:"createFirecrawlTwinServer"},fireworks:{adoption:{pypi:["fireworks-ai"],sdks:["@ai-sdk/fireworks"],envStems:["FIREWORKS"]},hosts:[{host:"api.fireworks.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{account:"the vendor’s own account row (one per credential, not creatable through the API)",quota:"vendor-assigned limits (read-only in the API; the twin derives them from the account)",serverlessModel:"the vendor catalog (serverless models are curated by Fireworks, not created by callers)"},resources:["deployment","dataset","batchInferenceJob","supervisedFineTuningJob","user","apiKey","secret","model"],endpointEnvNone:"The injector intercepts api.fireworks.ai (see `hosts`), so a world wires this pack through FIREWORKS_TWIN_URL rather than an app-read base-URL var. The `fireworks` Python client would honour FIREWORKS_BASE_URL, but @ai-sdk/fireworks — the dominant client in this repo’s demand census — takes its baseURL as a constructor option and reads no such env, so an app-read var would cover only half the traffic while disabling the interception that covers all of it.",serveExport:"createFireworksTwinServer"},fly:{adoption:{pypi:[],sdks:["fly-admin"],envStems:["FLY"]},hosts:[{host:"api.machines.dev"},{host:"_api.internal"}],archetype:"engine-control",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["app","machine","volume","secret"],serveExport:"createFlyTwinServer"},gcs:{adoption:{pypi:["google-cloud-storage"],sdks:["@google-cloud/storage"],envStems:["GCS","GOOGLECLOUDSTORAGE"]},hosts:[{host:"storage.googleapis.com"},{suffix:".storage.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["bucket","object","upload"],serveExport:"createGcsTwinServer"},gemini:{adoption:{pypi:["google-genai","google-generativeai"],sdks:["@ai-sdk/google","@ai-sdk/google-vertex","@google/genai","@google/generative-ai","@google-cloud/vertexai"],envStems:["GEMINI","GOOGLEGENAI","GOOGLEGENERATIVEAI","GOOGLEGEMINI","GOOGLEVERTEX"],worldIds:["googlegenai","googleauth"]},hosts:[{host:"generativelanguage.googleapis.com"},{host:"aiplatform.googleapis.com"},{suffix:"-aiplatform.googleapis.com"},{key:"googleauth",host:"oauth2.googleapis.com"},{key:"googleauth",host:"www.googleapis.com",pathPattern:"^/(token|oauth2/v4/token)/?$"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["file","cached_content"],serveExport:"createGeminiTwinServer"},github:{adoption:{pypi:["pygithub"],sdks:["@octokit/rest","@octokit/core","octokit","@octokit/auth-app","@octokit/auth-oauth-app","@octokit/auth-oauth-device","@octokit/graphql","@octokit/webhooks"],scopes:["@octokit/"],envStems:["GITHUB","GH","BACKENDGITHUB","INFAPPCONNECTIONGITHUBAPP","INFAPPCONNECTIONGITHUBOAUTH","INFAPPCONNECTIONGITHUBRADARAPP","APPSMITHOAUTH2GITHUB"]},hosts:[{host:"api.github.com"},{host:"uploads.github.com",pathPattern:"^/repos/[^/]+/[^/]+/releases/\\d+/assets$"},{host:"github.com",pathPattern:"^/[^/]+/[^/]+/(info/refs|git-upload-pack|git-receive-pack)$"},{host:"github.com",pathPattern:"^/login/oauth/(authorize|access_token)$"},{host:"github.com",pathPattern:"^/(login|session|sessions/two-factor(/app)?)$"},{host:"github.com",pathPattern:"^/apps/[^/]+/installations/new$"},{host:"github.com",pathPattern:"^/(organizations/[^/]+/)?settings/apps/new$"},{host:"npm.pkg.github.com",pathPattern:"^/@"}],archetype:"engine-control",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["pull_request","pull_request_review","pull_request_review_comment","issue","issue_comment","repository","branch","git_ref"],serveExport:"createGithubTwinServer"},googleads:{adoption:{sdks:["google-ads-api","google-ads-node"],pypi:["google-ads"],envStems:["GOOGLEADS","GOOGLEADSDEVELOPER"]},hosts:[{host:"googleads.googleapis.com"},{host:"datamanager.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["customer","customer_client_link","conversion_action","click_conversion","ingest_request"],endpointEnvNone:"no Google Ads client exposes an HTTP base-URL override: google-ads-api builds the host into the request literally, google-ads-python's `endpoint` is a gRPC host:port for its transport channel, and Dub hardcodes the host in a raw fetch. Interception is host-based.",serveExport:"createGoogleAdsTwinServer"},googlecalendar:{adoption:{sdks:["@googleapis/calendar"],pypi:[],envStems:["GOOGLECALENDAR"]},hosts:[{host:"www.googleapis.com",pathPattern:"^/(batch/)?calendar/v3(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["Calendar","CalendarListEntry","Event"],endpointEnvNone:"@googleapis/calendar and googleapis read no base-URL variable: the root URL is the Discovery document's `https://www.googleapis.com/` unless the caller passes `rootUrl` (Inbox Zero reads its own GOOGLE_BASE_URL for that); interception is the host rule above.",serveExport:"createGooglecalendarTwinServer"},googlemaps:{adoption:{pypi:["googlemaps"],sdks:["@googlemaps/google-maps-services-js"],scopes:["@googlemaps/"],envStems:["GOOGLEMAPS"]},hosts:[{host:"maps.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["geocode","audit"],serveExport:"createGoogleMapsTwinServer"},googleoauth:{adoption:{pypi:["google-auth","google-auth-oauthlib"],sdks:["google-auth-library","@googleapis/oauth2"],envStems:["GOOGLE","GOOGLEOAUTH","GOOGLEOIDC","AUTHGOOGLE","AUTHGOOGLEOAUTH2","BACKENDGOOGLE","GOOGLEIOS","GOOGLELOGIN","GOOGLEWEB","NEXTPRIVATEGOOGLE","SSOGOOGLEOAUTH2","APPSMITHOAUTH2GOOGLE"]},archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","auth_request","authorization_code","access_token","refresh_token","grant"],serveExport:"createGoogleOAuthTwinServer"},groq:{adoption:{pypi:["groq"],sdks:["groq-sdk","@ai-sdk/groq"],envStems:["GROQ"]},hosts:[{host:"api.groq.com"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog"},resources:["file","batch","model"],endpointEnvNone:"The injector intercepts api.groq.com (see `hosts`), so a world wires this pack through GROQ_TWIN_URL rather than an app-read base-URL var. groq-sdk would honour GROQ_BASE_URL, but @ai-sdk/groq — the dominant client in this repo's demand census — takes its baseURL as a constructor option and reads no such env, so an app-read var would cover only half the traffic while disabling the interception that covers all of it.",serveExport:"createGroqTwinServer"},hubspot:{adoption:{pypi:["hubspot-api-client"],sdks:["@hubspot/api-client"],envStems:["HUBSPOT","HUBSPOTPRIVATEAPP"]},hosts:[{host:"api.hubapi.com"},{host:"app.hubspot.com"},{host:"api.hsforms.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{owner:"a portal user provisioned in HubSpot's admin, never through the CRM API"},resources:["crm_object","property","property_group","pipeline","association","owner"],endpointEnvNone:"the @hubspot/api-client SDK takes its base URL from the `basePath` CONSTRUCTOR option (IConfiguration.basePath → ApiClientConfigurator.getBaseServer), not from any environment variable — it reads no process.env at all, and HubSpot documents no base-URL env var. Interception is the api.hubapi.com host entry; inventing a HUBSPOT_BASE_URL the app does not read would report a world covered while its traffic still left the machine.",serveExport:"createHubspotTwinServer"},inngest:{adoption:{pypi:["inngest"],sdks:["inngest"],envStems:["INNGEST"]},hostsNone:"SDK is base-URL-configured by design (options.baseUrl / INNGEST_BASE_URL / INNGEST_EVENT_API_BASE_URL, verified in the pack README) — worlds wire the twin through those vars",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["event","function","run","step","signing_key"],endpointEnv:{name:"INNGEST_BASE_URL",templates:{INNGEST_EVENT_API_BASE_URL:"${url}"},note:"no injector entry: the inngest SDK is base-URL-configured through INNGEST_BASE_URL / INNGEST_EVENT_API_BASE_URL."},serveExport:"createInngestTwinServer"},instagram:{adoption:{envStems:["INSTAGRAM"]},hosts:[{host:"graph.facebook.com",pathPattern:"^(?:/v\\d+\\.\\d+)?/(?:me|\\d{1,25})(?:/(?:media|media_publish|content_publishing_limit))?/?$|^/_twin/"},{host:"graph.instagram.com",pathPattern:"^(?:/v\\d+\\.\\d+)?/(?:me|\\d{1,25})(?:/(?:media|media_publish|content_publishing_limit))?/?$|^/_twin/"},{host:"rupload.facebook.com",pathPattern:"^/ig-api-upload/"},{host:"scontent.cdninstagram.com",pathPattern:"^/(?:o1/v/t16/f2/m86/|v/t51\\.(?:71878-15|2885-19)/)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["ig_user","media"],endpointEnvNone:"Meta ships no Instagram Platform client that reads a base-URL environment variable: apps call https://graph.facebook.com/<version>/… and the rupload host by constant, so a World reaches them through the hosts above; inventing an INSTAGRAM_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createInstagramTwinServer"},intercom:{adoption:{pypi:["python-intercom"],sdks:["intercom-client"],envStems:["INTERCOM"]},hosts:[{host:"api.intercom.io"},{host:"api.eu.intercom.io"},{host:"api.au.intercom.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["contact","conversation","message","event","data_attribute","admin","tag","note","company","segment"],serveExport:"createIntercomTwinServer"},jira:{adoption:{pypi:["jira"],sdks:["jira.js"],envStems:["JIRA","ATLASSIAN"]},hosts:[{host:"atlassian.net"},{suffix:".atlassian.net"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{oauthtoken:"issued by Atlassian's OAuth authorization server, outside the REST API"},resources:["person","issue","comment","issuelink","attachment","worklog","watcher","vote","project","component","version","sprint","filter","dashboard","gadget","webhook","oauthtoken"],serveExport:"createJiraTwinServer"},langfuse:{adoption:{pypi:["langfuse"],sdks:["langfuse","langfuse-node"],envStems:["LANGFUSE"]},hosts:[{host:"cloud.langfuse.com"},{host:"us.cloud.langfuse.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["project","api_key","trace","observation","session","score","score_config","prompt","dataset","dataset_item","dataset_run","dataset_run_item","model","comment","annotation_queue","annotation_queue_item","media","llm_connection","ingestion_event"],serveExport:"createLangfuseTwinServer"},linear:{adoption:{pypi:[],sdks:["@linear/sdk"],scopes:["@linear/"],envStems:["LINEAR"]},hosts:[{host:"api.linear.app"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"graphql",resourcesUnreachable:{project:"born of the vendor's projectCreate mutation, which this twin does not model yet — pulled only",cycle:"born of the vendor's cycleCreate mutation, which this twin does not model yet — pulled only",user:"a workspace member, born of an invite flow outside the API",workflowState:"born with the team's workflow; the API reads them"},resources:["issue","team","project","cycle","user","label","workflowState","comment","notification"],serveExport:"createDerivedLinearTwinServer"},linkedin:{adoption:{sdks:["linkedin-api-client"],pypi:["linkedin-api-client"],envStems:["LINKEDIN"]},hosts:[{host:"api.linkedin.com",pathPattern:"^(?:/rest/(?:posts|images|videos|organizationAcls|organizations|organizationsLookup|networkSizes)(?:/[^/]+)?/?|/v2/userinfo/?)$|^/_twin/"},{host:"www.linkedin.com",pathPattern:"^/dms-uploads/"},{host:"media.licdn.com",pathPattern:"^/dms/image/"},{host:"dms.licdn.com",pathPattern:"^/playlist/"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["organization","member","organization_acl","token","post"],endpointEnvNone:"linkedin-api-client takes no base-URL environment variable (its RestliClient builds https://api.linkedin.com/rest URLs from a constant), so a World reaches it through the hosts above; inventing a LINKEDIN_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createLinkedinTwinServer"},livekit:{adoption:{pypi:["livekit-api","livekit","livekit-agents"],sdks:["livekit-server-sdk","@livekit/rtc-node"],scopes:["@livekit/"],envStems:["LIVEKIT"]},hostsNone:"real local media plane (livekit-server) exposed via app-read env (LIVEKIT_URL is ws:// — WebSocket media is outside the HTTP injector's reach)",archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["room","participant","egress","ingress","sip_inbound_trunk","sip_outbound_trunk","sip_dispatch_rule","sip_participant","agent_dispatch"],serveExport:"createLiveKitTwinServer"},mailgun:{adoption:{pypi:["mailgun"],sdks:["mailgun.js"],envStems:["MAILGUN"]},hosts:[{host:"api.mailgun.net"},{host:"api.eu.mailgun.net"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["domain","message","event","bounce","complaint","unsubscribe","whitelist","webhook","route","mailing_list","list_member","template","template_version","api_key","tag","account"],endpointEnvNone:"the mailgun.js SDK reads no environment variable of its own — verified in the shipped v14.0.0 bundle: `MAILGUN` occurs zero times, and every `process.env` hit belongs to bundled axios (proxy vars) or `debug` (DEBUG). The base URL is the constructor `url` option, so no app-read endpoint env exists to inject; redirection is via the `hosts` injector entries.",serveExport:"createMailgunTwinServer"},mapbox:{adoption:{pypi:["mapbox"],sdks:["@mapbox/mapbox-sdk"],scopes:["@mapbox/"],envStems:["MAPBOX"]},hosts:[{host:"api.mapbox.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["geocode","dataset","dsfeature","style","token","tileset","upload"],serveExport:"createMapboxTwinServer"},mistral:{adoption:{pypi:["mistralai"],sdks:["@mistralai/mistralai","@ai-sdk/mistral"],envStems:["MISTRAL"]},hosts:[{host:"api.mistral.ai"},{host:"api.eu.mistral.ai"},{host:"api.us.mistral.ai"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["file","batch_job","agent","conversation","conversation_entry"],serveExport:"createMistralTwinServer"},mixpanel:{adoption:{pypi:["mixpanel"],sdks:["mixpanel","mixpanel-browser"]},hosts:[{host:"api.mixpanel.com"},{host:"api-eu.mixpanel.com"},{host:"api-in.mixpanel.com"},{host:"api-js.mixpanel.com"},{host:"data.mixpanel.com"},{host:"data-eu.mixpanel.com"},{host:"data-in.mixpanel.com"},{host:"mixpanel.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["event","profile","identity","alias"],serveExport:"createMixpanelTwinServer"},mongodb:{adoption:{pypi:[],sdks:[]},hostsNone:"RAW-PROTOCOL pack — there is no host to map. MongoDB clients speak the wire protocol over a raw TCP socket to whatever host the connection string names, which the injector (http/fetch patching) cannot see; a World reaches this twin through the connection string itself (MONGO_URI and its kin), which World-managed infrastructure injects.",archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"raw-tcp",resources:["collection","index","document"],endpointEnvNone:"no vendor base-URL variable: the application reads its own connection-string variable (MONGO_URI, MONGODB_URL, DATABASE_URL, …), and World-managed infrastructure (`volter-world init` → `volter-world-infra`) injects that variable pointing at this twin's listener.",serveExport:"createMongodbTwinServer"},moonshot:{adoption:{pypi:[],sdks:[],envStems:["MOONSHOT"]},hosts:[{host:"api.moonshot.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog",balance:"the account ledger the vendor keeps; read-only"},resources:["file","batch","balance","model"],endpointEnvNone:"Moonshot ships no SDK of its own; its documented clients (the standard openai/anthropic SDKs) take their base URL as a constructor option and read no MOONSHOT_BASE_URL env, so an app-read var would cover only env-configured callers while disabling the api.moonshot.ai interception that covers all traffic.",serveExport:"createMoonshotTwinServer"},notion:{adoption:{pypi:["notion-client"],sdks:["@notionhq/client"],scopes:["@notionhq/"],envStems:["NOTION"]},hostsNone:"no injector entry grounded yet — worlds point @notionhq/client at the twin via its baseUrl option; zero-edit interception of api.notion.com is a visible gap until grounded here",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{user:"a workspace member, born of the workspace admin, read-only through the API"},resources:["page","block","database","comment","user","webhook"],serveExport:"createNotionTwinServer"},"npm-registry":{adoption:{pypi:[],envStems:["NPM"]},hosts:[{host:"registry.npmjs.org"},{host:"npm.pkg.github.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["package","tarball","advisory"],serveExport:"createNpmRegistryTwinServer"},"oa-treasury":{adoption:{pypi:[],envStems:["MODELPROXY","MODELPROXYADMIN","AGENTPROXY","AGENTPROXYADMIN","AGENTPROXYHMAC"]},hosts:[{hostPattern:"^volter-agent-model-proxy\\.[a-z0-9.-]+\\.workers\\.dev$"},{host:"open-autonomy.org"},{host:"www.open-autonomy.org"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["account","supplier","coupon","reserve","run","rail"],serveExport:"createOaTreasuryTwinServer"},openai:{adoption:{pypi:["openai","openai-agents"],sdks:["openai","@ai-sdk/openai"],envStems:["OPENAI","APOPENAI","OPENAIMODERATION","REWORKDPLATFORMOPENAI"]},hosts:[{host:"api.openai.com"},{host:"platform.openai.com",pathPattern:"^/(settings/proj[-_][^/]+/api-keys|login$)"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["file","batch","fine_tuning_job","vector_store","vector_store_file","response","chat_completion"],serveExport:"createOpenAITwinServer"},openrouter:{adoption:{pypi:["openrouter"],sdks:["@openrouter/ai-sdk-provider"],scopes:["@openrouter/"],envStems:["OPENROUTER","OR"]},hosts:[{host:"openrouter.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["generation","api_key","byok","preset"],serveExport:"createOpenRouterTwinServer"},openweather:{adoption:{pypi:["pyowm"],sdks:["openweather-api-node"],envStems:["OPENWEATHER","OPENWEATHERMAP"]},hosts:[{host:"api.openweathermap.org"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["observation","audit"],serveExport:"createOpenWeatherTwinServer"},paypal:{adoption:{sdks:["paypal-rest-sdk"],pypi:["paypalrestsdk"],envStems:["PAYPAL"]},hosts:[{host:"api.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"api-m.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"api.sandbox.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"api-m.sandbox.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"www.paypal.com",pathPattern:"^/signin/authorize/?$|^/connect/?$|^/webapps/auth/protocol/openidconnect/|^/_twin/"},{host:"www.sandbox.paypal.com",pathPattern:"^/signin/authorize/?$|^/connect/?$|^/webapps/auth/protocol/openidconnect/|^/_twin/"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","session","auth_request","authorization_code","access_token","refresh_token","payout_batch","payout_item","webhook","webhook_event"],endpointEnvNone:"no PayPal client reads a base-URL env var — paypal-rest-sdk takes mode: sandbox|live, the current @paypal server SDK takes an Environment enum, and the motivating app computes its host from NODE_ENV — so interception is the host entries above.",serveExport:"createPaypalTwinServer"},perplexity:{adoption:{pypi:["perplexityai"],sdks:["@ai-sdk/perplexity"],envStems:["PERPLEXITY"]},hosts:[{host:"api.perplexity.ai"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["async_request"],endpointEnvNone:"@ai-sdk/perplexity — the dominant client in the 2026-08-31-b demand census — takes its baseURL as a constructor option and reads NO base-URL environment variable (perplexity-provider.ts: `withoutTrailingSlash(options.baseURL ?? 'https://api.perplexity.ai')`, and `loadApiKey` reads only PERPLEXITY_API_KEY). Perplexity documents no base-URL env var for any client, so there is nothing to inject; a fabricated PERPLEXITY_BASE_URL would let `covers` call a world covered while the app kept calling api.perplexity.ai. The injector intercepts that host (see `hosts`) instead.",serveExport:"createPerplexityTwinServer"},pinecone:{adoption:{pypi:["pinecone","pinecone-client"],sdks:["@pinecone-database/pinecone"],scopes:["@pinecone-database/"],envStems:["PINECONE"]},hostsNone:"control/data host split with per-index data-plane hostnames ({index}-{project}.svc.{env}.pinecone.io, see the pack README) — SDK is pointed at the twin by explicit host config",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["index","collection","vector"],serveExport:"createPineconeTwinServer"},plain:{adoption:{pypi:[],sdks:["@team-plain/typescript-sdk"],scopes:["@team-plain/"],envStems:["PLAIN","NEXTPRIVATEPLAIN"]},hosts:[{host:"core-api.uk.plain.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"graphql",resourcesUnreachable:{company:"born of the vendor's createCompany mutation, which this twin does not model (no manifest entry) — pulled only",customerGroup:"born of createCustomerGroup, filed as todo plain.customergroups.op_create — pulled only",customerGroupMembership:"born of addCustomerToCustomerGroups over a group the twin cannot create yet — pulled only",workspace:"the tenant itself",user:"a workspace member, born of an invite",machineUser:"born in the workspace settings UI"},resources:["workspace","user","machineUser","customer","company","tenant","customerGroup","customerGroupMembership","thread","label","labelType","threadField","timelineEntry","note","customerEvent","webhookTarget","attachment"],serveExport:"createPlainTwinServer"},planetscale:{adoption:{pypi:[],sdks:["@planetscale/database"],envStems:["PLANETSCALE"]},hosts:[{suffix:".psdb.cloud"},{host:"api.planetscale.com",pathPattern:"^/v1/organizations(/|$)"},{host:"app.planetscale.com",pathPattern:"^/(sign-in|[^/]+/settings/service-tokens)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",nativeTransport:{protocol:"mysql",flag:"--mysql",upstreamEnv:"PLANETSCALE_TWIN_URL"},resources:["table","row","_session","_backup"],endpointEnv:{name:"PLANETSCALE_TWIN_URL",templates:{PLANETSCALE_DATABASE_URL:"http://twin:twin@${host}:${port}"},note:"the @planetscale/database client reads PLANETSCALE_DATABASE_URL and honours http:; the injector also redirects *.psdb.cloud."},prismaAdapter:{adapter:"@prisma/adapter-planetscale",export:"PrismaPlanetScale",urlEnv:"PLANETSCALE_DATABASE_URL"},serveExport:"createPlanetscaleTwinServer"},polar:{adoption:{pypi:["polar-sdk"],sdks:["@polar-sh/sdk"],scopes:["@polar-sh/"],envStems:["POLAR"]},hosts:[{host:"api.polar.sh"},{host:"sandbox-api.polar.sh"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["customer","product","subscription","order","checkout","benefit","discount","meter","event","customer_session","webhook_endpoint"],serveExport:"createPolarTwinServer"},posthog:{adoption:{pypi:["posthog"],sdks:["posthog-node","posthog-js","@posthog/api-client","@posthog/react"],envStems:["POSTHOG","POSTHOGANALYTICS","POSTHOGPERSONAL","POSTHOGPROJECT","POSTHOGPUBLIC"]},hosts:[{host:"app.posthog.com"},{host:"us.posthog.com"},{host:"eu.posthog.com"},{suffix:".i.posthog.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["project","event","person","feature_flag","insight","cohort","experiment","annotation","dashboard","action","group","org_member","early_access_feature","event_definition","property_definition"],serveExport:"createPosthogTwinServer"},postmark:{adoption:{pypi:["postmarker"],sdks:["postmark"],envStems:["POSTMARK"]},hosts:[{host:"api.postmarkapp.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["message","bounce","template","message_stream","webhook","suppression","server","domain","sender_signature","inbound_rule"],serveExport:"createPostmarkTwinServer"},reddit:{adoption:{sdks:["snoowrap"],pypi:[],envStems:["REDDIT"]},hosts:[{host:"oauth.reddit.com",pathPattern:"^/(?:api/v1/me|api/submit|api/del|api/comment|api/info|api/media/asset|by_id/[^/]+|r/[^/]+/(?:about|new|api/info)|user/[^/]+/(?:about|submitted)|subreddits/mine/(?:moderator|contributor)|(?:r/[^/]+/)?comments/[a-z0-9]+(?:/[^/]*)?)(?:\\.json)?/?$|^/_twin/"},{host:"www.reddit.com",pathPattern:"^/api/v1/access_token$"},{host:"reddit-uploaded-media.s3-accelerate.amazonaws.com"},{host:"v.redd.it",pathPattern:"^/[a-z0-9]{13}/DASH_\\d{2,4}\\.mp4$"},{host:"preview.redd.it",pathPattern:"^/[a-z0-9]{13}\\.(?:png|jpg|gif)$"},{host:"i.redd.it",pathPattern:"^/[a-z0-9]{13}\\.(?:png|jpg|gif)$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["user","subreddit","link","comment"],endpointEnvNone:"reddit clients take no base-URL environment variable (snoowrap and PRAW build https://oauth.reddit.com and https://www.reddit.com URLs from constants or explicit constructor options), so a World reaches them through the hosts above; inventing a REDDIT_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createRedditTwinServer"},redis:{adoption:{},hostsNone:"RAW-PROTOCOL pack — there is no host to map. Redis's protocol runs over a TCP socket the injector (which patches http/fetch) never sees, and a Redis has no vendor hostname: it is wherever the app's REDIS_URL points. The World points it here: init classifies REDIS_URL as managed infrastructure and the managed redis service is this twin.",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"raw-tcp",resources:["key","field","member","scored","entry","script"],endpointEnvNone:"Redis clients read no base-URL env of their own: the app passes its REDIS_URL (or host/port) to ioredis or node-redis itself, and init emits that REDIS_URL for the managed redis service (world-runtime/src/init.ts), not as a twin endpoint env.",serveExport:"createRedisTwinServer"},replicate:{adoption:{pypi:["replicate"],sdks:["replicate","@ai-sdk/replicate"],envStems:["REPLICATE","REWORKDPLATFORMREPLICATE"]},hostsNone:"no injector entry grounded yet — worlds wire the twin via the SDK's explicit baseUrl config; zero-edit interception of api.replicate.com is a visible gap until its hosts are grounded here",archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{model_version:"born of `cog push`, never of the HTTP API; pulled"},resources:["prediction","model","model_version","webhook_secret"],serveExport:"createReplicateTwinServer"},resend:{adoption:{pypi:["resend"],sdks:["resend"],envStems:["RESEND","NEXTPRIVATERESEND"]},hosts:[{host:"api.resend.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["email","audience","contact","domain","api_key"],serveExport:"createResendTwinServer"},runhuman:{adoption:{sdks:["runhuman"]},hosts:[{host:"runhuman.com",pathPattern:"^/api/"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["organization","project","api_key","user","tester_profile","job","pipeline_run"],endpointEnv:{name:"RUNHUMAN_API_URL",note:"grounded in volter-ai/runhuman packages/cli/src/lib/config.ts, which overrides the CLI apiUrl from RUNHUMAN_API_URL; RH2 reads its human-marketplace base URL from the provider row spec.url instead, which a rehearsal World sets to this same twin URL."},serveExport:"createRunhumanTwinServer"},scrapecreators:{adoption:{pypi:[],sdks:["@scrapecreators/cli"],envStems:["SCRAPECREATORS"]},hosts:[{host:"api.scrapecreators.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["profile","content","cache","account","usage"],serveExport:"createScrapeCreatorsTwinServer"},segment:{adoption:{pypi:["segment-analytics-python","analytics-python"],sdks:["@segment/analytics-node"],envStems:["SEGMENT"]},hosts:[{host:"api.segment.io"},{host:"events.eu1.segmentapis.com"},{host:"oauth2.segment.io"},{host:"oauth2.eu1.segmentapis.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["event","identity","group","dropped"],serveExport:"createSegmentTwinServer"},sendblue:{adoption:{pypi:["sendblue"],sdks:["sendblue"],envStems:["SENDBLUE"]},hostsNone:"no injector entry grounded yet — worlds wire the twin via explicit client endpoint config; a visible gap until its host is grounded here",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["message","credential"],serveExport:"createSendblueTwinServer"},sendgrid:{adoption:{pypi:["sendgrid"],sdks:["@sendgrid/mail","@sendgrid/client"],envStems:["SENDGRID","SENDGRIDSYNC"]},hosts:[{host:"api.sendgrid.com"},{host:"api.eu.sendgrid.com"},{host:"email.twilio.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["message"],serveExport:"createSendgridTwinServer"},sentry:{adoption:{pypi:["sentry-sdk"],sdks:["@sentry/node","@sentry/browser","@sentry/react","@sentry/nextjs","@sentry/vue","@sentry/sveltekit","@sentry/astro","@sentry/remix","@sentry/electron","@sentry/react-native"],scopes:["@sentry/"],envStems:["SENTRY","APPSMITHSENTRY"]},hosts:[{host:"sentry.io"},{suffix:".ingest.sentry.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["organization","team","project","project_key","issue","event","event_attachment","session","project_ownership","codeowners","project_filter","release","release_file","deploy","alert_rule","metric_alert","org_integration"],serveExport:"createSentryTwinServer"},slack:{adoption:{worldIds:["slackapp"],pypi:["slack-sdk","slack-bolt","slackclient"],sdks:["@slack/web-api","@slack/bolt","@slack/webhook","@slack/oauth"],scopes:["@slack/"],envStems:["SLACK","SLACKBOTUSER"]},hosts:[{key:"slackapp",host:"slack.com",pathPattern:"^/api/apps\\.connections\\.open/?$"},{host:"slack.com"},{host:"www.slack.com"},{host:"api.slack.com"},{host:"hooks.slack.com",pathPattern:"^/services/"},{host:"avatars.slack-edge.com",pathPattern:"^/T[A-Za-z0-9-]+/(([UWA][A-Za-z0-9-]+|icon)_[0-9]{1,4}\\.png|[UW][A-Za-z0-9-]+-[0-9a-f]{12}_([0-9]{1,4}|original)\\.(png|gif))$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"web-api",resources:["channel","user","message","file","audit"],serveExport:"createSlackTwinServer"},smtp:{adoption:{pypi:["aiosmtplib"],sdks:["nodemailer","nodemailer-smtp-transport","emailjs"],envStems:["NEXTPRIVATESMTP"]},hostsNone:"RAW-PROTOCOL pack — there is no host to map. SMTP is a line protocol over a raw TCP socket, so the injector (which patches http/fetch) cannot see the traffic at all, and there is no vendor hostname either: the relay is whatever the operator names (smtp.gmail.com, email-smtp.us-east-1.amazonaws.com, localhost:1025 …). Interception is app-read env instead — the world injects SMTP_HOST/SMTP_PORT + EMAIL_SERVER/EMAIL_SERVER_HOST/EMAIL_SERVER_PORT at the twin's listener (APP_READ_ENDPOINT_ENV in world-runtime/src/init.ts), which is the ONLY thing every SMTP client is configured with. Same class as livekit's ws:// media plane, one layer further down.",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"raw-tcp",resources:["message","relay"],serveExport:"createSmtpTwinServer"},snowflake:{adoption:{pypi:["snowflake-connector-python","snowflake","snowflake-snowpark-python","snowflake-sqlalchemy"],sdks:["snowflake-sdk"],envStems:["SNOWFLAKE"]},hosts:[{suffix:".snowflakecomputing.com"},{suffix:".snowflakecomputing.cn"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["database","schema","table","view","warehouse","session","query"],endpointEnvNone:"the snowflake-sdk takes its endpoint through createConnection()'s own account/host/accessUrl/protocol/port options or a connections.toml under SNOWFLAKE_HOME; it reads NO base-URL environment variable (verified against the packed snowflake-sdk@3.2.0 tarball, whose lib/ reads SNOWFLAKE_HOME, SNOWFLAKE_DEFAULT_CONNECTION_NAME, the SNOWFLAKE_DISABLE_*/SNOWFLAKE_CRL_*/SNOWFLAKE_RUNNING_INSIDE_SPCS switches, the SF_OCSP_*/SF_TELEMETRY_*/SF_CLIENT_CONFIG_FILE/SF_TEMPORARY_CREDENTIAL_CACHE_DIR debug and cache switches, the standard http_proxy family, and some non-Snowflake names like AWS_REGION/HOME - no base-URL variable of any kind). Interception is host-based via the .snowflakecomputing.com and .snowflakecomputing.cn suffix entries; a SNOWFLAKE_BASE_URL would be a var no app reads.",serveExport:"createSnowflakeTwinServer"},stigg:{adoption:{sdks:["@stigg/node-server-sdk","@stigg/react-sdk","@stigg/js-client-sdk","@stigg/api-client-js"],pypi:["stigg-api-client","stigg"],scopes:["@stigg/"],envStems:["STIGG","STIGGCLIENT"]},hosts:[{host:"api.stigg.io"},{host:"edge.api.stigg.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"graphql",resources:["product","plan","feature","packageEntitlement","price","customer","subscription","usageMeasurement","promotionalEntitlement","coupon","integration","hook"],endpointEnvNone:"the Stigg SDKs take their base URL as a constructor option (Stigg.initialize({ baseUri, baseEdgeUri })) and read NO env var for it. Verified by grep for process.env across the SDK dists: @stigg/node-server-sdk 4.55.0 (the version this pack pins and installs) and, in the consumer tree that motivated the pack, @stigg/node-server-sdk 4.2.0 and @stigg/js-client-sdk 3.67.0 — every one of them references only process.env.NODE_ENV. (The browser SDKs are NOT installed in this repo; that half of the evidence comes from ~/Code/Ponder and is therefore not re-checkable here, which is why both trees are named rather than one. §9 round 1 flagged the original citation for naming versions this repo does not carry.) Interception is by the api.stigg.io / edge.api.stigg.io host entries above.",serveExport:"createStiggTwinServer"},stream:{adoption:{pypi:["stream-chat"],sdks:["stream-chat"],envStems:["STREAM","GETSTREAM"]},hosts:[{host:"chat.stream-io-api.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["user","channel","message","channeltype","device","ban","mute","flag"],serveExport:"createStreamTwinServer"},stripe:{adoption:{pypi:["stripe"],sdks:["stripe"],envStems:["STRIPE","NEXTPRIVATESTRIPE"]},hosts:[{host:"api.stripe.com"},{host:"checkout.stripe.com",pathPattern:"^/c/pay/"},{host:"billing.stripe.com",pathPattern:"^/p/session/"},{host:"connect.stripe.com",pathPattern:"^/setup/|^/oauth/(authorize|token|deauthorize)/?$"},{host:"dashboard.stripe.com",pathPattern:"^/settings/public/?$|^/(test/)?settings/connect(/onboarding-options/oauth)?/?$"},{host:"verify.stripe.com",pathPattern:"^/start/"},{host:"js.stripe.com",pathPattern:"^/v3/financial-connections/|^/v3/?$|^/(v3|[a-z]+)/stripe\\.js$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["charge","customer","payment_intent","setup_intent","payment_method","subscription","price","product","invoice","invoiceitem","refund","event"],serveExport:"createStripeTwinServer"},supabase:{adoption:{pypi:["supabase","gotrue","supabase-auth","postgrest","storage3","supafunc","realtime"],sdks:["@supabase/supabase-js"],scopes:["@supabase/"],envStems:["SUPABASE"],worldIds:["supabasemgmt"]},hosts:[{host:"api.supabase.com"},{suffix:".supabase.co",pathPattern:"^/(rest|storage|auth)/v1(/|$)"}],archetype:"engine-control",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{access_token:"a personal access token minted in the dashboard; the twin only reads it as seeded state",network_ban:"born of the vendor's abuse detector",backup:"born of the vendor's scheduler"},resources:["organization","org_member","access_token","project","branch","config","secret","function","network_restrictions","network_ban","custom_hostname","read_replica","backup"],managedDatabase:{kind:"postgres",arg:"--database",note:"PostgREST, Storage and Auth are served over the application's own database: the World's managed postgres, the database its migrations and direct queries use"},serveExport:"createSupabaseTwinServer"},supermemory:{adoption:{pypi:["supermemory"],sdks:["supermemory"],envStems:["SUPERMEMORY"]},hosts:[{host:"api.supermemory.ai"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["document","setting"],serveExport:"createSupermemoryTwinServer"},svix:{adoption:{pypi:["svix"],sdks:["svix"],envStems:["SVIX"]},hosts:[{host:"api.svix.com"},{host:"api.us.svix.com"},{host:"api.eu.svix.com"},{host:"api.in.svix.com"},{host:"api.ca.svix.com"},{host:"api.au.svix.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["application","endpoint","message","message_attempt","event_type"],serveExport:"createSvixTwinServer"},tavily:{adoption:{sdks:["@tavily/core"],pypi:["tavily-python"],envStems:["TAVILY"]},hosts:[{host:"api.tavily.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["page","usage","log","research","keyless"],endpointEnvNone:"the @tavily/core SDK exposes no base-URL env var — it reads only TAVILY_API_KEY/TAVILY_HTTP(S)_PROXY/TAVILY_ORG_ID/TAVILY_PROJECT from process.env; base-URL override is the constructor option apiBaseURL (dist/index.mjs post()/get(): `apiBaseURL || BASE_URL`), so interception is the hosts entry above.",serveExport:"createTavilyTwinServer"},temporal:{adoption:{sdks:["@temporalio/client","@temporalio/worker","@temporalio/workflow","@temporalio/activity"],scopes:["@temporalio/"],pypi:["temporalio"],envStems:["TEMPORAL"]},hostsNone:"RAW-PROTOCOL pack — there is no host to map. The Temporal SDKs dial the frontend address they are configured with (Connection.connect / NativeConnection.connect `address`, conventionally TEMPORAL_ADDRESS) over gRPC, which the http/fetch injector never sees. Interception is the app-read address: the World injects TEMPORAL_ADDRESS=<host>:<port> at this twin (APP_READ_ENDPOINT_ENV in world-runtime/src/init.ts).",archetype:"engine-control",protocol:{declared:"2",major:2,standing:"current"},transport:"raw-tcp",resources:["workflow-execution","namespace"],serveExport:"createTemporalTwinServer"},tiktok:{adoption:{sdks:[],pypi:[],envStems:["TIKTOK"]},hosts:[{host:"www.tiktok.com",pathPattern:"^/v2/auth/authorize/?$|^/_twin/"},{host:"open.tiktokapis.com",pathPattern:"^/v2/(?:oauth/(?:token|revoke)|user/info|video/(?:list|query)|post/publish/(?:creator_info/query|video/init|inbox/video/init|status/fetch))/?$|^/_twin/"},{host:"open-upload.tiktokapis.com",pathPattern:"^/video/?$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","session","auth_request","grant","video","publish"],endpointEnvNone:"no app-read base-URL env exists: TikTok publishes no official SDK with a base-URL option and integrations (Dub included) hardcode www.tiktok.com and open.tiktokapis.com, so interception is the path-scoped hosts entries above.",serveExport:"createTikTokTwinServer"},tinybird:{adoption:{pypi:["tinybird-python-sdk","tinybird-cli"],sdks:["@chronark/zod-bird"],scopes:["@chronark/zod-bird"],envStems:["TINYBIRD"]},hosts:[{host:"api.tinybird.co"},{hostPattern:"^api\\.[a-z0-9.-]+\\.tinybird\\.co$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["datasource","pipe","event","token","job","tag"],serveExport:"createTinybirdTwinServer"},togetherai:{adoption:{sdks:["together-ai"],envStems:["TOGETHER"]},hosts:[{host:"api.together.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog"},resources:["file","batch","finetune","model"],endpointEnv:{name:"TOGETHER_TWIN_URL",templates:{TOGETHER_API_BASE_URL:"${url}/v1"},note:"the injector covers api.together.ai, but together-ai's files.upload() reads TOGETHER_API_BASE_URL at module load and ignores client.baseURL (lib/upload.js:12) — the template points it at the twin's /v1 so the SDK upload flow does not egress to the real vendor."},serveExport:"createTogetheraiTwinServer"},tremendous:{adoption:{pypi:[],sdks:["tremendous"],envStems:["TREMENDOUS"]},hosts:[{host:"api.tremendous.com"},{host:"testflight.tremendous.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["order","reward","campaign","product","funding_source","invoice","topup","balance_txn","member","field","webhook","organization","settings"],serveExport:"createTremendousTwinServer"},tunnel:{adoption:{pypi:[],sdks:["@volter/tunnel"],envStems:["TUNNEL","VOLTERTUNNEL"]},hostsNone:"no injector entry by design: native cloudflared is an external binary, while @volter/tunnel opens a configurable WebSocket control channel and the CLI reads TUNNEL_SERVER_URL. Worlds wire that app-read endpoint directly; claiming api.trycloudflare.com in the Node injector would not redirect cloudflared and would falsely imply the Cloudflare edge data plane was twinned",archetype:"proxy",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["quick_tunnel","relay_tunnel","relay"],serveExport:"createTunnelTwinServer"},turbopuffer:{adoption:{sdks:["@turbopuffer/turbopuffer"],pypi:["turbopuffer"],scopes:["@turbopuffer/"],envStems:["TURBOPUFFER"]},hosts:[{hostPattern:"^(?:aws|gcp|azure)-[a-z0-9-]+\\.turbopuffer\\.com$"},{host:"turbopuffer.com",pathPattern:"^/(login|dashboard|_twin/users)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["namespace","document"],endpointEnv:{name:"TURBOPUFFER_TWIN_URL",templates:{TURBOPUFFER_BASE_URL:"${url}/{region}"},note:"grounded in @turbopuffer/turbopuffer@2.8.0 src/client.ts:253-288 (TURBOPUFFER_BASE_URL, {region} placeholder substitution) and internal/custom/fetch-node.ts (undici Agent.request under node, outside the injector); the injector also claims the regional *.turbopuffer.com hosts for fetch-based runtimes."},serveExport:"createTurbopufferTwinServer"},twelvelabs:{adoption:{pypi:["twelvelabs"],sdks:["twelvelabs-js"],envStems:["TWELVELABS"]},hosts:[{host:"api.twelvelabs.io"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["index","task","video"],serveExport:"createTwelvelabsTwinServer"},twilio:{adoption:{pypi:["twilio"],sdks:["twilio"],envStems:["TWILIO"]},hostsNone:"no injector entry grounded yet — worlds point the twilio SDK at the twin via explicit client config; zero-edit interception of the three real Twilio hosts (pack README §Coverage) is a visible gap until grounded here",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["message","verification","phone_number","signing_key"],serveExport:"createTwilioTwinServer"},upstash:{adoption:{pypi:["upstash-redis","upstash-ratelimit","qstash","upstash-workflow"],sdks:["@upstash/redis","@upstash/ratelimit","@upstash/qstash","@upstash/workflow"],scopes:["@upstash/redis","@upstash/ratelimit","@upstash/qstash","@upstash/workflow"],envStems:["UPSTASHREDIS","KVREST","QSTASH"]},hosts:[{suffix:".upstash.io"},{suffix:"-vector.upstash.io",exclude:!0},{host:"api.upstash.com",pathPattern:"^/v2/(redis|team|teams)(/|$)"},{host:"console.upstash.com",pathPattern:"^/(login|account/(api|teams)|qstash|invite)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["key"],endpointEnv:{name:"UPSTASH_TWIN_URL",templates:{QSTASH_URL:"${url}"},note:"@upstash/qstash and @upstash/workflow read QSTASH_URL; the injector also redirects *.upstash.io (Redis databases, QStash) to this twin."},serveExport:"createUpstashRedisTwinServer"},upstashvector:{adoption:{pypi:["upstash-vector"],sdks:["@upstash/vector"],scopes:["@upstash/vector"],envStems:["UPSTASHVECTOR"]},hosts:[{suffix:"-vector.upstash.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["vector","namespace","config"],serveExport:"createUpstashVectorTwinServer"},vercel:{adoption:{pypi:["vercel"],sdks:["@vercel/sdk","@vercel/edge-config"],envStems:["VERCEL"]},hosts:[{host:"api.vercel.com"},{host:"edge-config.vercel.com"},{host:"avatar.vercel.sh"},{host:"vercel.com",pathPattern:"^/(login|account/tokens)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["team","project","project_domain","domain","dns_record","env_var","edge_config","deployment","alias","auth_token"],serveExport:"createVercelTwinServer"},veriff:{adoption:{pypi:[],sdks:["@veriff/js-sdk"],scopes:["@veriff/"],envStems:["VERIFF"]},hosts:[{host:"stationapi.veriff.com"},{host:"api.veriff.me"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["session","attempt","media","delivery"],serveExport:"createVeriffTwinServer"},vital:{adoption:{pypi:["vital"],sdks:["@tryvital/vital-node"],scopes:["@tryvital/"],envStems:["VITAL"]},hosts:[{host:"api.tryvital.io"},{host:"api.sandbox.tryvital.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["user","order","appointment","webhook"],serveExport:"createVitalTwinServer"},volteridentity:{adoption:{sdks:["@volter/identity"],pypi:[],envStems:[]},hosts:[{host:"id.volter.ai"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["person","session","oauth_client","oauth_resource","client_resource","consent","authorization_code","access_token","refresh_token","device_code","organization","member","invitation"],endpointEnv:{name:"VOLTER_ISSUER",note:'grounded in the consumers: browser-substrate services/gateway/cloudflare/volter.ts (`VOLTER_ISSUER`, "the identity service, https://id.volter.ai") discovers the issuer from it, and Volter Teams is configured with `VOLTER_ISSUER` (volter-ai/identity ROADMAP I4); the twin is its own issuer, so discovery, tokens and redirects all name the injected URL.'},serveExport:"createVolterIdentityTwinServer"},webrisk:{adoption:{pypi:["google-cloud-webrisk"],sdks:["@google-cloud/web-risk"],envStems:["WEBRISK"]},hosts:[{host:"webrisk.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["verdict","submission","operation","audit","iam_policy"],serveExport:"createWebRiskTwinServer"},x:{adoption:{pypi:["tweepy"],sdks:["twitter-api-v2"]},hosts:[{host:"api.x.com",pathPattern:"^/2/(?!(?:oauth2/(?:token|revoke)|users/me)/?$)|^/_twin/(?!assets/consent\\.(?:js|css)$)"},{host:"api.twitter.com",pathPattern:"^/2/(?!(?:oauth2/(?:token|revoke)|users/me)/?$)|^/_twin/(?!assets/consent\\.(?:js|css)$)"},{host:"x.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"twitter.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"www.x.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"www.twitter.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"mobile.twitter.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"mobile.x.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"pbs.twimg.com",pathPattern:"^/media/[0-9a-f]{64}\\.(?:jpg|png|gif|webp)$|^/ext_tw_video_thumb/[0-9]{1,19}/pu/img/[0-9a-f]{64}\\.svg$"},{host:"video.twimg.com",pathPattern:"^/ext_tw_video/[0-9]{1,19}/pu/vid/avc1/[0-9]+x[0-9]+/[0-9a-f]{64}\\.mp4$"},{host:"abs.twimg.com",pathPattern:"^/sticky/default_profile_images/default_profile_(?:normal|bigger|200x200|400x400)\\.png$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["account","post","follow","rate_limit","_token"],serveExport:"createXTwinServer"},xai:{adoption:{pypi:["xai-sdk"],sdks:["@ai-sdk/xai"],envStems:["XAI","GROK"]},hosts:[{host:"api.x.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{language_model:"the vendor catalog",model:"the vendor catalog"},resources:["deferred_completion","language_model","model","oauth_account","oauth_device_authorization","oauth_usage"],serveExport:"createXaiTwinServer"},xidentity:{adoption:{pypi:[],sdks:["@xdevplatform/xdk","twitter-api-sdk"],scopes:["@xdevplatform/"],envStems:["X","TWITTER"]},hosts:[{host:"x.com",pathPattern:"^/i/oauth2/authorize/?$|^/_twin/"},{host:"twitter.com",pathPattern:"^/i/oauth2/authorize/?$|^/_twin/"},{host:"api.x.com",pathPattern:"^/2/(?:oauth2/(?:token|revoke)|users/me)/?$|^/oauth/(?:request_token|authorize|authenticate|access_token)/?$|^/1\\.1/oauth/invalidate_token(?:\\.json)?/?$|^/_twin/assets/consent\\.(?:js|css)$"},{host:"api.twitter.com",pathPattern:"^/2/(?:oauth2/(?:token|revoke)|users/me)/?$|^/oauth/(?:request_token|authorize|authenticate|access_token)/?$|^/1\\.1/oauth/invalidate_token(?:\\.json)?/?$|^/_twin/assets/consent\\.(?:js|css)$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","session","auth_request","grant","rate_window","oauth1_app","oauth1_token","oauth1_grant","_authorization_code","_access_token","_refresh_token","_oauth1_request_token","_client_secret","_code_challenge"],serveExport:"createXIdentityTwinServer"},youtube:{adoption:{pypi:[],sdks:["@googleapis/youtube"],envStems:["YOUTUBE"]},hosts:[{host:"youtube.googleapis.com"},{host:"www.googleapis.com",pathPattern:"^/(upload/)?youtube/v3(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["channel","video","playlist","playlistItem"],serveExport:"createYouTubeTwinServer"}},undeclared:[]}});var i5=N6((rQ0,Bg)=>{var ct=($)=>typeof $==="string"&&(/^\/(o\/oauth2\/v2\/auth(\/oauthchooseaccount)?|o\/oauth2\/auth|o\/oauth2\/token|signin\/oauth\/error|\.well-known\/openid-configuration)\/?$/.test($)||/^\/_twin\//.test($)),lt=($)=>typeof $==="string"&&/^\/(token|oauth2\/v4\/token|revoke|tokeninfo|device\/code)\/?$/.test($),mt=($)=>typeof $==="string"&&/^\/(oauth2\/(v1\/certs|v3\/(certs|userinfo)|v2\/userinfo)|userinfo\/v2\/me)\/?$/.test($),__={googleoauth:($,I)=>$==="accounts.google.com"&&(I===void 0||ct(I))||$==="oauth2.googleapis.com"&&(I===void 0||lt(I))||$==="www.googleapis.com"&&(I===void 0||mt(I))||$==="openidconnect.googleapis.com",googlefavicon:($)=>$==="www.google.com"||$==="google.com"||$==="t2.gstatic.com",browserassets:($)=>$==="cdnjs.cloudflare.com"||$==="www.googletagmanager.com"||$==="www.google-analytics.com"||$==="connect.facebook.net"||$==="snap.licdn.com"||$==="px.ads.linkedin.com"||$==="static.hotjar.com"||$==="fonts.googleapis.com"||$==="fonts.gstatic.com"||$==="api.fontshare.com"||$==="images.subscribe.dev"||$==="www.youtube.com"||$==="www.youtube-nocookie.com"||$==="i.ytimg.com"};{let{packs:$}=qg();for(let I of Object.keys($)){let G=$[I].hosts;if(!G||G.length===0)continue;if(__[I])throw Error(`inject: vendor "${I}" declares hosts on its pack descriptor AND in the hand VENDOR_HOSTS table — one home per fact; delete the hand entry.`);let Z=new Map;for(let _ of G){let J=_.key===void 0?I:_.key;if(!Z.has(J))Z.set(J,[]);Z.get(J).push(_)}for(let[_,J]of Z){if(__[_])throw Error(`inject: key "${_}" (pack ${I}) is declared twice — on this descriptor and in the hand VENDOR_HOSTS table or another pack's descriptor; a key has one home.`);let Y=(M)=>{if(["host","suffix","hostPattern"].filter((N)=>M[N]!==void 0).length!==1)throw Error(`inject: key "${_}" (pack ${I}) rule ${JSON.stringify(M)} — exactly one of host | suffix | hostPattern (pack-facts.json is hand-edited or stale)`);let T=M.hostPattern===void 0?null:new RegExp(M.hostPattern),S=M.pathPattern===void 0?null:new RegExp(M.pathPattern);return(N,B)=>(M.host!==void 0?N===M.host:M.suffix!==void 0?N.endsWith(M.suffix):T.test(N))&&(S===null||B===void 0||S.test(B))},W=J.filter((M)=>M.exclude!==!0).map(Y),R=J.filter((M)=>M.exclude===!0).map(Y);__[_]=(M,E)=>W.some((T)=>T(M,E))&&!R.some((T)=>T(M,E))}}}function dt($){let I=String($||"").toLowerCase().replace(/\.$/,"");return Object.keys(__).some((G)=>__[G](I))}function it($){let I=String($||"").toLowerCase().replace(/\.$/,"");return Object.keys(__).filter((G)=>__[G](I))}function Ng($){return String($).toUpperCase().replace(/[^A-Z0-9]/g,"_")}function ot($){let I={};for(let G of Object.keys(__)){let Z=$[`${Ng(G)}_TWIN_URL`];if(Z)I[G]=Z.replace(/\/$/,"")}if($.TWIN_INJECT)for(let G of String($.TWIN_INJECT).split(",")){let Z=G.indexOf("=");if(Z<=0)continue;let _=G.slice(0,Z).trim(),J=G.slice(Z+1).trim();if(_&&J&&Object.hasOwn(__,_))I[_]=J.replace(/\/$/,"")}return I}Bg.exports={VENDOR_HOSTS:__,isVendorHost:dt,vendorsOfHost:it,twinEnvStem:Ng,twinOrigins:ot}});var gg={};LU(gg,{validateHeaderValue:()=>Fr,validateHeaderName:()=>Hr,setMaxIdleHTTPParsers:()=>Wr,request:()=>Kr,maxHeaderSize:()=>Dr,globalAgent:()=>Lr,get:()=>Or,default:()=>Tr,createServer:()=>Zr,ServerResponse:()=>zr,Server:()=>Qr,STATUS_CODES:()=>Jr,OutgoingMessage:()=>Yr,METHODS:()=>Gr,IncomingMessage:()=>Xr,ClientRequest:()=>_r,Agent:()=>Ir});var tt,rt,jg,at,st,et=($,I,G)=>{G=$!=null?tt(rt($)):{};let Z=I||!$||!$.__esModule?jg(G,"default",{value:$,enumerable:!0}):G;for(let _ of at($))if(!st.call(Z,_))jg(Z,_,{get:()=>$[_],enumerable:!0});return Z},$r=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports),Ur,kg,Ir,_r,Xr,Gr,Yr,Jr,Qr,zr,Zr,Or,Lr,Dr,Kr,Wr,Hr,Fr,Tr;var wg=WI(()=>{tt=Object.create,{getPrototypeOf:rt,defineProperty:jg,getOwnPropertyNames:at}=Object,st=Object.prototype.hasOwnProperty,Ur=$r(($,I)=>{var G=(Xz(),V$(d5)),Z=(PE(),V$(RE)),_=$;for(J in G)if(G.hasOwnProperty(J))_[J]=G[J];var J;_.request=function(W,R){return W=Y(W),G.request.call(this,W,R)},_.get=function(W,R){return W=Y(W),G.get.call(this,W,R)};function Y(W){if(typeof W==="string")W=Z.parse(W);if(!W.protocol)W.protocol="https:";if(W.protocol!=="https:")throw Error('Protocol "'+W.protocol+'" not supported. Expected "https:"');return W}}),kg=et(Ur(),1),{Agent:Ir,ClientRequest:_r,IncomingMessage:Xr,METHODS:Gr,OutgoingMessage:Yr,STATUS_CODES:Jr,Server:Qr,ServerResponse:zr,createServer:Zr,get:Or,globalAgent:Lr,maxHeaderSize:Dr,request:Kr,setMaxIdleHTTPParsers:Wr,validateHeaderName:Hr,validateHeaderValue:Fr}=kg,Tr=kg});var yE={};LU(yE,{throws:()=>ga,strictEqual:()=>ka,strict:()=>ja,rejects:()=>Ba,ok:()=>Na,notStrictEqual:()=>qa,notEqual:()=>Ca,notDeepStrictEqual:()=>va,notDeepEqual:()=>Sa,match:()=>Va,ifError:()=>Pa,fail:()=>Ra,equal:()=>Ea,doesNotThrow:()=>Aa,doesNotReject:()=>Ma,doesNotMatch:()=>Ta,default:()=>wa,deepStrictEqual:()=>Fa,deepEqual:()=>Ha,CallTracker:()=>Wa,AssertionError:()=>Ka});var Mr,Ar,xg,Er,Rr,Pr=($,I,G)=>{G=$!=null?Mr(Ar($)):{};let Z=I||!$||!$.__esModule?xg(G,"default",{value:$,enumerable:!0}):G;for(let _ of Er($))if(!Rr.call(Z,_))xg(Z,_,{get:()=>$[_],enumerable:!0});return Z},A$=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports),NE,o5,BE,Vr,Sr,vr,Cr,fg,Yz,qr,Nr,Br,jr,kr,gr,wr,xr,fr,yr,XY,t5,br,yg,bg,hr,Jz,jE,kE,ur,hg,gE,nr,wE,ug,xE,GY,pr,cr,lr,mr,dr,ir,or,tr,rr,ng,pg,ar,sr,r5,cg,er,$a,Ua,Ia,_a,Gz,lg,Xa,mg,Ga,dg,Ya,Ja,ig,fE,Qa,a5,za,Za,og,tg,Oa,La,Da,qE,rg,Ka,Wa,Ha,Fa,Ta,Ma,Aa,Ea,Ra,Pa,Va,Sa,va,Ca,qa,Na,Ba,ja,ka,ga,wa;var bE=WI(()=>{Mr=Object.create,{getPrototypeOf:Ar,defineProperty:xg,getOwnPropertyNames:Er}=Object,Rr=Object.prototype.hasOwnProperty,NE=A$(($,I)=>{I.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var G={},Z=Symbol("test"),_=Object(Z);if(typeof Z==="string")return!1;if(Object.prototype.toString.call(Z)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(_)!=="[object Symbol]")return!1;var J=42;G[Z]=J;for(var Y in G)return!1;if(typeof Object.keys==="function"&&Object.keys(G).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(G).length!==0)return!1;var W=Object.getOwnPropertySymbols(G);if(W.length!==1||W[0]!==Z)return!1;if(!Object.prototype.propertyIsEnumerable.call(G,Z))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var R=Object.getOwnPropertyDescriptor(G,Z);if(R.value!==J||R.enumerable!==!0)return!1}return!0}}),o5=A$(($,I)=>{var G=NE();I.exports=function(){return G()&&!!Symbol.toStringTag}}),BE=A$(($,I)=>{I.exports=Object}),Vr=A$(($,I)=>{I.exports=Error}),Sr=A$(($,I)=>{I.exports=EvalError}),vr=A$(($,I)=>{I.exports=RangeError}),Cr=A$(($,I)=>{I.exports=ReferenceError}),fg=A$(($,I)=>{I.exports=SyntaxError}),Yz=A$(($,I)=>{I.exports=TypeError}),qr=A$(($,I)=>{I.exports=URIError}),Nr=A$(($,I)=>{I.exports=Math.abs}),Br=A$(($,I)=>{I.exports=Math.floor}),jr=A$(($,I)=>{I.exports=Math.max}),kr=A$(($,I)=>{I.exports=Math.min}),gr=A$(($,I)=>{I.exports=Math.pow}),wr=A$(($,I)=>{I.exports=Math.round}),xr=A$(($,I)=>{I.exports=Number.isNaN||function(G){return G!==G}}),fr=A$(($,I)=>{var G=xr();I.exports=function(Z){if(G(Z)||Z===0)return Z;return Z<0?-1:1}}),yr=A$(($,I)=>{I.exports=Object.getOwnPropertyDescriptor}),XY=A$(($,I)=>{var G=yr();if(G)try{G([],"length")}catch(Z){G=null}I.exports=G}),t5=A$(($,I)=>{var G=Object.defineProperty||!1;if(G)try{G({},"a",{value:1})}catch(Z){G=!1}I.exports=G}),br=A$(($,I)=>{var G=typeof Symbol<"u"&&Symbol,Z=NE();I.exports=function(){if(typeof G!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof G("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return Z()}}),yg=A$(($,I)=>{I.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),bg=A$(($,I)=>{var G=BE();I.exports=G.getPrototypeOf||null}),hr=A$(($,I)=>{var G="Function.prototype.bind called on incompatible ",Z=Object.prototype.toString,_=Math.max,J="[object Function]",Y=function(M,E){var T=[];for(var S=0;S<M.length;S+=1)T[S]=M[S];for(var N=0;N<E.length;N+=1)T[N+M.length]=E[N];return T},W=function(M,E){var T=[];for(var S=E||0,N=0;S<M.length;S+=1,N+=1)T[N]=M[S];return T},R=function(M,E){var T="";for(var S=0;S<M.length;S+=1)if(T+=M[S],S+1<M.length)T+=E;return T};I.exports=function(M){var E=this;if(typeof E!=="function"||Z.apply(E)!==J)throw TypeError(G+E);var T=W(arguments,1),S,N=function(){if(this instanceof S){var g=E.apply(this,Y(T,arguments));if(Object(g)===g)return g;return this}return E.apply(M,Y(T,arguments))},B=_(0,E.length-T.length),x=[];for(var w=0;w<B;w++)x[w]="$"+w;if(S=Function("binder","return function ("+R(x,",")+"){ return binder.apply(this,arguments); }")(N),E.prototype){var y=function(){};y.prototype=E.prototype,S.prototype=new y,y.prototype=null}return S}}),Jz=A$(($,I)=>{var G=hr();I.exports=Function.prototype.bind||G}),jE=A$(($,I)=>{I.exports=Function.prototype.call}),kE=A$(($,I)=>{I.exports=Function.prototype.apply}),ur=A$(($,I)=>{I.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),hg=A$(($,I)=>{var G=Jz(),Z=kE(),_=jE(),J=ur();I.exports=J||G.call(_,Z)}),gE=A$(($,I)=>{var G=Jz(),Z=Yz(),_=jE(),J=hg();I.exports=function(Y){if(Y.length<1||typeof Y[0]!=="function")throw new Z("a function is required");return J(G,_,Y)}}),nr=A$(($,I)=>{var G=gE(),Z=XY(),_;try{_=[].__proto__===Array.prototype}catch(R){if(!R||typeof R!=="object"||!("code"in R)||R.code!=="ERR_PROTO_ACCESS")throw R}var J=!!_&&Z&&Z(Object.prototype,"__proto__"),Y=Object,W=Y.getPrototypeOf;I.exports=J&&typeof J.get==="function"?G([J.get]):typeof W==="function"?function(R){return W(R==null?R:Y(R))}:!1}),wE=A$(($,I)=>{var G=yg(),Z=bg(),_=nr();I.exports=G?function(J){return G(J)}:Z?function(J){if(!J||typeof J!=="object"&&typeof J!=="function")throw TypeError("getProto: not an object");return Z(J)}:_?function(J){return _(J)}:null}),ug=A$(($,I)=>{var G=Function.prototype.call,Z=Object.prototype.hasOwnProperty,_=Jz();I.exports=_.call(G,Z)}),xE=A$(($,I)=>{var G,Z=BE(),_=Vr(),J=Sr(),Y=vr(),W=Cr(),R=fg(),M=Yz(),E=qr(),T=Nr(),S=Br(),N=jr(),B=kr(),x=gr(),w=wr(),y=fr(),g=Function,b=function(r){try{return g('"use strict"; return ('+r+").constructor;")()}catch(Y0){}},l=XY(),i=t5(),$0=function(){throw new M},Q0=l?function(){try{return arguments.callee,$0}catch(r){try{return l(arguments,"callee").get}catch(Y0){return $0}}}():$0,G0=br()(),D0=wE(),t=bg(),P0=yg(),Q=kE(),D=jE(),F={},L=typeof Uint8Array>"u"||!D0?G:D0(Uint8Array),H={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?G:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?G:ArrayBuffer,"%ArrayIteratorPrototype%":G0&&D0?D0([][Symbol.iterator]()):G,"%AsyncFromSyncIteratorPrototype%":G,"%AsyncFunction%":F,"%AsyncGenerator%":F,"%AsyncGeneratorFunction%":F,"%AsyncIteratorPrototype%":F,"%Atomics%":typeof Atomics>"u"?G:Atomics,"%BigInt%":typeof BigInt>"u"?G:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?G:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?G:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?G:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":_,"%eval%":eval,"%EvalError%":J,"%Float16Array%":typeof Float16Array>"u"?G:Float16Array,"%Float32Array%":typeof Float32Array>"u"?G:Float32Array,"%Float64Array%":typeof Float64Array>"u"?G:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?G:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":F,"%Int8Array%":typeof Int8Array>"u"?G:Int8Array,"%Int16Array%":typeof Int16Array>"u"?G:Int16Array,"%Int32Array%":typeof Int32Array>"u"?G:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":G0&&D0?D0(D0([][Symbol.iterator]())):G,"%JSON%":typeof JSON==="object"?JSON:G,"%Map%":typeof Map>"u"?G:Map,"%MapIteratorPrototype%":typeof Map>"u"||!G0||!D0?G:D0(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Z,"%Object.getOwnPropertyDescriptor%":l,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?G:Promise,"%Proxy%":typeof Proxy>"u"?G:Proxy,"%RangeError%":Y,"%ReferenceError%":W,"%Reflect%":typeof Reflect>"u"?G:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?G:Set,"%SetIteratorPrototype%":typeof Set>"u"||!G0||!D0?G:D0(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?G:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":G0&&D0?D0(""[Symbol.iterator]()):G,"%Symbol%":G0?Symbol:G,"%SyntaxError%":R,"%ThrowTypeError%":Q0,"%TypedArray%":L,"%TypeError%":M,"%Uint8Array%":typeof Uint8Array>"u"?G:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?G:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?G:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?G:Uint32Array,"%URIError%":E,"%WeakMap%":typeof WeakMap>"u"?G:WeakMap,"%WeakRef%":typeof WeakRef>"u"?G:WeakRef,"%WeakSet%":typeof WeakSet>"u"?G:WeakSet,"%Function.prototype.call%":D,"%Function.prototype.apply%":Q,"%Object.defineProperty%":i,"%Object.getPrototypeOf%":t,"%Math.abs%":T,"%Math.floor%":S,"%Math.max%":N,"%Math.min%":B,"%Math.pow%":x,"%Math.round%":w,"%Math.sign%":y,"%Reflect.getPrototypeOf%":P0};if(D0)try{null.error}catch(r){v=D0(D0(r)),H["%Error.prototype%"]=v}var v,q=function r(Y0){var W0;if(Y0==="%AsyncFunction%")W0=b("async function () {}");else if(Y0==="%GeneratorFunction%")W0=b("function* () {}");else if(Y0==="%AsyncGeneratorFunction%")W0=b("async function* () {}");else if(Y0==="%AsyncGenerator%"){var I0=r("%AsyncGeneratorFunction%");if(I0)W0=I0.prototype}else if(Y0==="%AsyncIteratorPrototype%"){var c=r("%AsyncGenerator%");if(c&&D0)W0=D0(c.prototype)}return H[Y0]=W0,W0},P={__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"]},O=Jz(),A=ug(),k=O.call(D,Array.prototype.concat),j=O.call(Q,Array.prototype.splice),h=O.call(D,String.prototype.replace),a=O.call(D,String.prototype.slice),J0=O.call(D,RegExp.prototype.exec),K0=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O0=/\\(\\)?/g,d=function(r){var Y0=a(r,0,1),W0=a(r,-1);if(Y0==="%"&&W0!=="%")throw new R("invalid intrinsic syntax, expected closing `%`");else if(W0==="%"&&Y0!=="%")throw new R("invalid intrinsic syntax, expected opening `%`");var I0=[];return h(r,K0,function(c,s,S0,M0){I0[I0.length]=S0?h(M0,O0,"$1"):s||c}),I0},m=function(r,Y0){var W0=r,I0;if(A(P,W0))I0=P[W0],W0="%"+I0[0]+"%";if(A(H,W0)){var c=H[W0];if(c===F)c=q(W0);if(typeof c>"u"&&!Y0)throw new M("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:I0,name:W0,value:c}}throw new R("intrinsic "+r+" does not exist!")};I.exports=function(r,Y0){if(typeof r!=="string"||r.length===0)throw new M("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Y0!=="boolean")throw new M('"allowMissing" argument must be a boolean');if(J0(/^%?[^%]*%?$/,r)===null)throw new R("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var W0=d(r),I0=W0.length>0?W0[0]:"",c=m("%"+I0+"%",Y0),s=c.name,S0=c.value,M0=!1,z0=c.alias;if(z0)I0=z0[0],j(W0,k([0,1],z0));for(var c0=1,F0=!0;c0<W0.length;c0+=1){var q0=W0[c0],s0=a(q0,0,1),k0=a(q0,-1);if((s0==='"'||s0==="'"||s0==="`"||(k0==='"'||k0==="'"||k0==="`"))&&s0!==k0)throw new R("property names with quotes must have matching quotes");if(q0==="constructor"||!F0)M0=!0;if(I0+="."+q0,s="%"+I0+"%",A(H,s))S0=H[s];else if(S0!=null){if(!(q0 in S0)){if(!Y0)throw new M("base intrinsic for "+r+" exists, but the property is not available.");return}if(l&&c0+1>=W0.length){var n0=l(S0,q0);if(F0=!!n0,F0&&"get"in n0&&!("originalValue"in n0.get))S0=n0.get;else S0=S0[q0]}else F0=A(S0,q0),S0=S0[q0];if(F0&&!M0)H[s]=S0}}return S0}}),GY=A$(($,I)=>{var G=xE(),Z=gE(),_=Z([G("%String.prototype.indexOf%")]);I.exports=function(J,Y){var W=G(J,!!Y);if(typeof W==="function"&&_(J,".prototype.")>-1)return Z([W]);return W}}),pr=A$(($,I)=>{var G=o5()(),Z=GY(),_=Z("Object.prototype.toString"),J=function(R){if(G&&R&&typeof R==="object"&&Symbol.toStringTag in R)return!1;return _(R)==="[object Arguments]"},Y=function(R){if(J(R))return!0;return R!==null&&typeof R==="object"&&"length"in R&&typeof R.length==="number"&&R.length>=0&&_(R)!=="[object Array]"&&"callee"in R&&_(R.callee)==="[object Function]"},W=function(){return J(arguments)}();J.isLegacyArguments=Y,I.exports=W?J:Y}),cr=A$(($,I)=>{var G=GY(),Z=o5()(),_=ug(),J=XY(),Y;if(Z){if(W=G("RegExp.prototype.exec"),R={},M=function(){throw R},E={toString:M,valueOf:M},typeof Symbol.toPrimitive==="symbol")E[Symbol.toPrimitive]=M;Y=function(N){if(!N||typeof N!=="object")return!1;var B=J(N,"lastIndex"),x=B&&_(B,"value");if(!x)return!1;try{W(N,E)}catch(w){return w===R}}}else T=G("Object.prototype.toString"),S="[object RegExp]",Y=function(N){if(!N||typeof N!=="object"&&typeof N!=="function")return!1;return T(N)===S};var W,R,M,E,T,S;I.exports=Y}),lr=A$(($,I)=>{var G=GY(),Z=cr(),_=G("RegExp.prototype.exec"),J=Yz();I.exports=function(Y){if(!Z(Y))throw new J("`regex` must be a RegExp");return function(W){return _(Y,W)!==null}}}),mr=A$(($,I)=>{var G=function*(){}.constructor;I.exports=()=>G}),dr=A$(($,I)=>{var G=GY(),Z=lr(),_=Z(/^\s*(?:function)?\*/),J=o5()(),Y=wE(),W=G("Object.prototype.toString"),R=G("Function.prototype.toString"),M=mr();I.exports=function(E){if(typeof E!=="function")return!1;if(_(R(E)))return!0;if(!J){var T=W(E);return T==="[object GeneratorFunction]"}if(!Y)return!1;var S=M();return S&&Y(E)===S.prototype}}),ir=A$(($,I)=>{var G=Function.prototype.toString,Z=typeof Reflect==="object"&&Reflect!==null&&Reflect.apply,_,J;if(typeof Z==="function"&&typeof Object.defineProperty==="function")try{_=Object.defineProperty({},"length",{get:function(){throw J}}),J={},Z(function(){throw 42},null,_)}catch(l){if(l!==J)Z=null}else Z=null;var Y=/^\s*class\b/,W=function(l){try{var i=G.call(l);return Y.test(i)}catch($0){return!1}},R=function(l){try{if(W(l))return!1;return G.call(l),!0}catch(i){return!1}},M=Object.prototype.toString,E="[object Object]",T="[object Function]",S="[object GeneratorFunction]",N="[object HTMLAllCollection]",B="[object HTML document.all class]",x="[object HTMLCollection]",w=typeof Symbol==="function"&&!!Symbol.toStringTag,y=!(0 in[,]),g=function(){return!1};if(typeof document==="object"){if(b=document.all,M.call(b)===M.call(document.all))g=function(l){if((y||!l)&&(typeof l>"u"||typeof l==="object"))try{var i=M.call(l);return(i===N||i===B||i===x||i===E)&&l("")==null}catch($0){}return!1}}var b;I.exports=Z?function(l){if(g(l))return!0;if(!l)return!1;if(typeof l!=="function"&&typeof l!=="object")return!1;try{Z(l,null,_)}catch(i){if(i!==J)return!1}return!W(l)&&R(l)}:function(l){if(g(l))return!0;if(!l)return!1;if(typeof l!=="function"&&typeof l!=="object")return!1;if(w)return R(l);if(W(l))return!1;var i=M.call(l);if(i!==T&&i!==S&&!/^\[object HTML/.test(i))return!1;return R(l)}}),or=A$(($,I)=>{var G=ir(),Z=Object.prototype.toString,_=Object.prototype.hasOwnProperty,J=function(M,E,T){for(var S=0,N=M.length;S<N;S++)if(_.call(M,S))if(T==null)E(M[S],S,M);else E.call(T,M[S],S,M)},Y=function(M,E,T){for(var S=0,N=M.length;S<N;S++)if(T==null)E(M.charAt(S),S,M);else E.call(T,M.charAt(S),S,M)},W=function(M,E,T){for(var S in M)if(_.call(M,S))if(T==null)E(M[S],S,M);else E.call(T,M[S],S,M)};function R(M){return Z.call(M)==="[object Array]"}I.exports=function(M,E,T){if(!G(E))throw TypeError("iterator must be a function");var S;if(arguments.length>=3)S=T;if(R(M))J(M,E,S);else if(typeof M==="string")Y(M,E,S);else W(M,E,S)}}),tr=A$(($,I)=>{I.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}),rr=A$(($,I)=>{var G=tr(),Z=typeof globalThis>"u"?globalThis:globalThis;I.exports=function(){var _=[];for(var J=0;J<G.length;J++)if(typeof Z[G[J]]==="function")_[_.length]=G[J];return _}}),ng=A$(($,I)=>{var G=t5(),Z=fg(),_=Yz(),J=XY();I.exports=function(Y,W,R){if(!Y||typeof Y!=="object"&&typeof Y!=="function")throw new _("`obj` must be an object or a function`");if(typeof W!=="string"&&typeof W!=="symbol")throw new _("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null)throw new _("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null)throw new _("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null)throw new _("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=="boolean")throw new _("`loose`, if provided, must be a boolean");var M=arguments.length>3?arguments[3]:null,E=arguments.length>4?arguments[4]:null,T=arguments.length>5?arguments[5]:null,S=arguments.length>6?arguments[6]:!1,N=!!J&&J(Y,W);if(G)G(Y,W,{configurable:T===null&&N?N.configurable:!T,enumerable:M===null&&N?N.enumerable:!M,value:R,writable:E===null&&N?N.writable:!E});else if(S||!M&&!E&&!T)Y[W]=R;else throw new Z("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),pg=A$(($,I)=>{var G=t5(),Z=function(){return!!G};Z.hasArrayLengthDefineBug=function(){if(!G)return null;try{return G([],"length",{value:1}).length!==1}catch(_){return!0}},I.exports=Z}),ar=A$(($,I)=>{var G=xE(),Z=ng(),_=pg()(),J=XY(),Y=Yz(),W=G("%Math.floor%");I.exports=function(R,M){if(typeof R!=="function")throw new Y("`fn` is not a function");if(typeof M!=="number"||M<0||M>4294967295||W(M)!==M)throw new Y("`length` must be a positive 32-bit integer");var E=arguments.length>2&&!!arguments[2],T=!0,S=!0;if("length"in R&&J){var N=J(R,"length");if(N&&!N.configurable)T=!1;if(N&&!N.writable)S=!1}if(T||S||!E)if(_)Z(R,"length",M,!0,!0);else Z(R,"length",M);return R}}),sr=A$(($,I)=>{var G=Jz(),Z=kE(),_=hg();I.exports=function(){return _(G,Z,arguments)}}),r5=A$(($,I)=>{var G=ar(),Z=t5(),_=gE(),J=sr();if(I.exports=function(Y){var W=_(arguments),R=Y.length-(arguments.length-1);return G(W,1+(R>0?R:0),!0)},Z)Z(I.exports,"apply",{value:J});else I.exports.apply=J}),cg=A$(($,I)=>{var G=or(),Z=rr(),_=r5(),J=GY(),Y=XY(),W=wE(),R=J("Object.prototype.toString"),M=o5()(),E=typeof globalThis>"u"?globalThis:globalThis,T=Z(),S=J("String.prototype.slice"),N=J("Array.prototype.indexOf",!0)||function(y,g){for(var b=0;b<y.length;b+=1)if(y[b]===g)return b;return-1},B={__proto__:null};if(M&&Y&&W)G(T,function(y){var g=new E[y];if(Symbol.toStringTag in g&&W){var b=W(g),l=Y(b,Symbol.toStringTag);if(!l&&b){var i=W(b);l=Y(i,Symbol.toStringTag)}B["$"+y]=_(l.get)}});else G(T,function(y){var g=new E[y],b=g.slice||g.set;if(b)B["$"+y]=_(b)});var x=function(y){var g=!1;return G(B,function(b,l){if(!g)try{if("$"+b(y)===l)g=S(l,1)}catch(i){}}),g},w=function(y){var g=!1;return G(B,function(b,l){if(!g)try{b(y),g=S(l,1)}catch(i){}}),g};I.exports=function(y){if(!y||typeof y!=="object")return!1;if(!M){var g=S(R(y),8,-1);if(N(T,g)>-1)return g;if(g!=="Object")return!1;return w(y)}if(!Y)return null;return x(y)}}),er=A$(($,I)=>{var G=cg();I.exports=function(Z){return!!G(Z)}}),$a=A$(($)=>{var I=pr(),G=dr(),Z=cg(),_=er();function J(z0){return z0.call.bind(z0)}var Y=typeof BigInt<"u",W=typeof Symbol<"u",R=J(Object.prototype.toString),M=J(Number.prototype.valueOf),E=J(String.prototype.valueOf),T=J(Boolean.prototype.valueOf);if(Y)S=J(BigInt.prototype.valueOf);var S;if(W)N=J(Symbol.prototype.valueOf);var N;function B(z0,c0){if(typeof z0!=="object")return!1;try{return c0(z0),!0}catch(F0){return!1}}$.isArgumentsObject=I,$.isGeneratorFunction=G,$.isTypedArray=_;function x(z0){return typeof Promise<"u"&&z0 instanceof Promise||z0!==null&&typeof z0==="object"&&typeof z0.then==="function"&&typeof z0.catch==="function"}$.isPromise=x;function w(z0){if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)return ArrayBuffer.isView(z0);return _(z0)||j(z0)}$.isArrayBufferView=w;function y(z0){return Z(z0)==="Uint8Array"}$.isUint8Array=y;function g(z0){return Z(z0)==="Uint8ClampedArray"}$.isUint8ClampedArray=g;function b(z0){return Z(z0)==="Uint16Array"}$.isUint16Array=b;function l(z0){return Z(z0)==="Uint32Array"}$.isUint32Array=l;function i(z0){return Z(z0)==="Int8Array"}$.isInt8Array=i;function $0(z0){return Z(z0)==="Int16Array"}$.isInt16Array=$0;function Q0(z0){return Z(z0)==="Int32Array"}$.isInt32Array=Q0;function G0(z0){return Z(z0)==="Float32Array"}$.isFloat32Array=G0;function D0(z0){return Z(z0)==="Float64Array"}$.isFloat64Array=D0;function t(z0){return Z(z0)==="BigInt64Array"}$.isBigInt64Array=t;function P0(z0){return Z(z0)==="BigUint64Array"}$.isBigUint64Array=P0;function Q(z0){return R(z0)==="[object Map]"}Q.working=typeof Map<"u"&&Q(new Map);function D(z0){if(typeof Map>"u")return!1;return Q.working?Q(z0):z0 instanceof Map}$.isMap=D;function F(z0){return R(z0)==="[object Set]"}F.working=typeof Set<"u"&&F(new Set);function L(z0){if(typeof Set>"u")return!1;return F.working?F(z0):z0 instanceof Set}$.isSet=L;function H(z0){return R(z0)==="[object WeakMap]"}H.working=typeof WeakMap<"u"&&H(new WeakMap);function v(z0){if(typeof WeakMap>"u")return!1;return H.working?H(z0):z0 instanceof WeakMap}$.isWeakMap=v;function q(z0){return R(z0)==="[object WeakSet]"}q.working=typeof WeakSet<"u"&&q(new WeakSet);function P(z0){return q(z0)}$.isWeakSet=P;function O(z0){return R(z0)==="[object ArrayBuffer]"}O.working=typeof ArrayBuffer<"u"&&O(new ArrayBuffer);function A(z0){if(typeof ArrayBuffer>"u")return!1;return O.working?O(z0):z0 instanceof ArrayBuffer}$.isArrayBuffer=A;function k(z0){return R(z0)==="[object DataView]"}k.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&k(new DataView(new ArrayBuffer(1),0,1));function j(z0){if(typeof DataView>"u")return!1;return k.working?k(z0):z0 instanceof DataView}$.isDataView=j;var h=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function a(z0){return R(z0)==="[object SharedArrayBuffer]"}function J0(z0){if(typeof h>"u")return!1;if(typeof a.working>"u")a.working=a(new h);return a.working?a(z0):z0 instanceof h}$.isSharedArrayBuffer=J0;function K0(z0){return R(z0)==="[object AsyncFunction]"}$.isAsyncFunction=K0;function O0(z0){return R(z0)==="[object Map Iterator]"}$.isMapIterator=O0;function d(z0){return R(z0)==="[object Set Iterator]"}$.isSetIterator=d;function m(z0){return R(z0)==="[object Generator]"}$.isGeneratorObject=m;function r(z0){return R(z0)==="[object WebAssembly.Module]"}$.isWebAssemblyCompiledModule=r;function Y0(z0){return B(z0,M)}$.isNumberObject=Y0;function W0(z0){return B(z0,E)}$.isStringObject=W0;function I0(z0){return B(z0,T)}$.isBooleanObject=I0;function c(z0){return Y&&B(z0,S)}$.isBigIntObject=c;function s(z0){return W&&B(z0,N)}$.isSymbolObject=s;function S0(z0){return Y0(z0)||W0(z0)||I0(z0)||c(z0)||s(z0)}$.isBoxedPrimitive=S0;function M0(z0){return typeof Uint8Array<"u"&&(A(z0)||J0(z0))}$.isAnyArrayBuffer=M0,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(z0){Object.defineProperty($,z0,{enumerable:!1,value:function(){throw Error(z0+" is not supported in userland")}})})}),Ua=A$(($,I)=>{I.exports=function(G){return G instanceof Buffer}}),Ia=A$(($,I)=>{if(typeof Object.create==="function")I.exports=function(G,Z){if(Z)G.super_=Z,G.prototype=Object.create(Z.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}})};else I.exports=function(G,Z){if(Z){G.super_=Z;var _=function(){};_.prototype=Z.prototype,G.prototype=new _,G.prototype.constructor=G}}}),_a=A$(($,I)=>{try{if(G=(C2(),V$(v2)),typeof G.inherits!=="function")throw"";I.exports=G.inherits}catch(Z){I.exports=Ia()}var G}),Gz=A$(($)=>{var I=Object.getOwnPropertyDescriptors||function(A){var k=Object.keys(A),j={};for(var h=0;h<k.length;h++)j[k[h]]=Object.getOwnPropertyDescriptor(A,k[h]);return j},G=/%[sdj%]/g;$.format=function(A){if(!l(A)){var k=[];for(var j=0;j<arguments.length;j++)k.push(J(arguments[j]));return k.join(" ")}var j=1,h=arguments,a=h.length,J0=String(A).replace(G,function(O0){if(O0==="%%")return"%";if(j>=a)return O0;switch(O0){case"%s":return String(h[j++]);case"%d":return Number(h[j++]);case"%j":try{return JSON.stringify(h[j++])}catch(d){return"[Circular]"}default:return O0}});for(var K0=h[j];j<a;K0=h[++j])if(y(K0)||!G0(K0))J0+=" "+K0;else J0+=" "+J(K0);return J0},$.deprecate=function(A,k){if(typeof process<"u"&&process.noDeprecation===!0)return A;if(typeof process>"u")return function(){return $.deprecate(A,k).apply(this,arguments)};var j=!1;function h(){if(!j){if(process.throwDeprecation)throw Error(k);else if(process.traceDeprecation)console.trace(k);else console.error(k);j=!0}return A.apply(this,arguments)}return h};var Z={},_=/^$/;$.debuglog=function(A){if(A=A.toUpperCase(),!Z[A])if(_.test(A)){var k=process.pid;Z[A]=function(){var j=$.format.apply($,arguments);console.error("%s %d: %s",A,k,j)}}else Z[A]=function(){};return Z[A]};function J(A,k){var j={seen:[],stylize:W};if(arguments.length>=3)j.depth=arguments[2];if(arguments.length>=4)j.colors=arguments[3];if(w(k))j.showHidden=k;else if(k)$._extend(j,k);if($0(j.showHidden))j.showHidden=!1;if($0(j.depth))j.depth=2;if($0(j.colors))j.colors=!1;if($0(j.customInspect))j.customInspect=!0;if(j.colors)j.stylize=Y;return M(j,A,j.depth)}$.inspect=J,J.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},J.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Y(A,k){var j=J.styles[k];if(j)return"\x1B["+J.colors[j][0]+"m"+A+"\x1B["+J.colors[j][1]+"m";else return A}function W(A,k){return A}function R(A){var k={};return A.forEach(function(j,h){k[j]=!0}),k}function M(A,k,j){if(A.customInspect&&k&&P0(k.inspect)&&k.inspect!==$.inspect&&!(k.constructor&&k.constructor.prototype===k)){var h=k.inspect(j,A);if(!l(h))h=M(A,h,j);return h}var a=E(A,k);if(a)return a;var J0=Object.keys(k),K0=R(J0);if(A.showHidden)J0=Object.getOwnPropertyNames(k);if(t(k)&&(J0.indexOf("message")>=0||J0.indexOf("description")>=0))return T(k);if(J0.length===0){if(P0(k)){var O0=k.name?": "+k.name:"";return A.stylize("[Function"+O0+"]","special")}if(Q0(k))return A.stylize(RegExp.prototype.toString.call(k),"regexp");if(D0(k))return A.stylize(Date.prototype.toString.call(k),"date");if(t(k))return T(k)}var d="",m=!1,r=["{","}"];if(x(k))m=!0,r=["[","]"];if(P0(k)){var Y0=k.name?": "+k.name:"";d=" [Function"+Y0+"]"}if(Q0(k))d=" "+RegExp.prototype.toString.call(k);if(D0(k))d=" "+Date.prototype.toUTCString.call(k);if(t(k))d=" "+T(k);if(J0.length===0&&(!m||k.length==0))return r[0]+d+r[1];if(j<0)if(Q0(k))return A.stylize(RegExp.prototype.toString.call(k),"regexp");else return A.stylize("[Object]","special");A.seen.push(k);var W0;if(m)W0=S(A,k,j,K0,J0);else W0=J0.map(function(I0){return N(A,k,j,K0,I0,m)});return A.seen.pop(),B(W0,d,r)}function E(A,k){if($0(k))return A.stylize("undefined","undefined");if(l(k)){var j="'"+JSON.stringify(k).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return A.stylize(j,"string")}if(b(k))return A.stylize(""+k,"number");if(w(k))return A.stylize(""+k,"boolean");if(y(k))return A.stylize("null","null")}function T(A){return"["+Error.prototype.toString.call(A)+"]"}function S(A,k,j,h,a){var J0=[];for(var K0=0,O0=k.length;K0<O0;++K0)if(v(k,String(K0)))J0.push(N(A,k,j,h,String(K0),!0));else J0.push("");return a.forEach(function(d){if(!d.match(/^\d+$/))J0.push(N(A,k,j,h,d,!0))}),J0}function N(A,k,j,h,a,J0){var K0,O0,d;if(d=Object.getOwnPropertyDescriptor(k,a)||{value:k[a]},d.get)if(d.set)O0=A.stylize("[Getter/Setter]","special");else O0=A.stylize("[Getter]","special");else if(d.set)O0=A.stylize("[Setter]","special");if(!v(h,a))K0="["+a+"]";if(!O0)if(A.seen.indexOf(d.value)<0){if(y(j))O0=M(A,d.value,null);else O0=M(A,d.value,j-1);if(O0.indexOf(`
246
+ `,"\t"],lo=["{","}","|","\\","^","`"].concat(co),FE=["'"].concat(lo),Ig=["%","/","?",";","#"].concat(FE),_g=["/","?","#"],Xg=/^[+a-z0-9A-Z_-]{0,63}$/,io=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,oo={javascript:!0,"javascript:":!0},TE={javascript:!0,"javascript:":!0},UY={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},ME={parse($){var I=decodeURIComponent;return($+"").replace(/\+/g," ").split("&").filter(Boolean).reduce(function(G,Z,_){var J=Z.split("="),Y=I(J[0]||""),W=I(J[1]||""),R=G[Y];return G[Y]=R===void 0?W:[].concat(R,W),G},{})},stringify($){var I=encodeURIComponent;return Object.keys($||{}).reduce(function(G,Z){return[].concat($[Z]).forEach(function(_){G.push(I(Z)+"="+I(_))}),G},[]).join("&").replace(/\s/g,"+")}};y6.prototype.parse=function($,I,G){if(!EE($))throw TypeError("Parameter 'url' must be a string, not "+typeof $);var Z=$.indexOf("?"),_=Z!==-1&&Z<$.indexOf("#")?"?":"#",J=$.split(_),Y=/\\/g;J[0]=J[0].replace(Y,"/"),$=J.join(_);var W=$;if(W=W.trim(),!G&&$.split("#").length===1){var R=po.exec(W);if(R){if(this.path=W,this.href=W,this.pathname=R[1],R[2])if(this.search=R[2],I)this.query=ME.parse(this.search.substr(1));else this.query=this.search.substr(1);else if(I)this.search="",this.query={};return this}}var M=uo.exec(W);if(M){M=M[0];var E=M.toLowerCase();this.protocol=E,W=W.substr(M.length)}if(G||M||W.match(/^\/\/[^@\/]+@[^@\/]+/)){var T=W.substr(0,2)==="//";if(T&&!(M&&TE[M]))W=W.substr(2),this.slashes=!0}if(!TE[M]&&(T||M&&!UY[M])){var S=-1;for(var N=0;N<_g.length;N++){var B=W.indexOf(_g[N]);if(B!==-1&&(S===-1||B<S))S=B}var x,w;if(S===-1)w=W.lastIndexOf("@");else w=W.lastIndexOf("@",S);if(w!==-1)x=W.slice(0,w),W=W.slice(w+1),this.auth=decodeURIComponent(x);S=-1;for(var N=0;N<Ig.length;N++){var B=W.indexOf(Ig[N]);if(B!==-1&&(S===-1||B<S))S=B}if(S===-1)S=W.length;this.host=W.slice(0,S),W=W.slice(S),this.parseHost(),this.hostname=this.hostname||"";var y=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!y){var g=this.hostname.split(/\./);for(var N=0,b=g.length;N<b;N++){var l=g[N];if(!l)continue;if(!l.match(Xg)){var i="";for(var $0=0,Q0=l.length;$0<Q0;$0++)if(l.charCodeAt($0)>127)i+="x";else i+=l[$0];if(!i.match(Xg)){var G0=g.slice(0,N),D0=g.slice(N+1),t=l.match(io);if(t)G0.push(t[1]),D0.unshift(t[2]);if(D0.length)W="/"+D0.join(".")+W;this.hostname=G0.join(".");break}}}}if(this.hostname.length>mo)this.hostname="";else this.hostname=this.hostname.toLowerCase();if(!y)this.hostname=new AE(`https://${this.hostname}`).hostname;var P0=this.port?":"+this.port:"",Q=this.hostname||"";if(this.host=Q+P0,this.href+=this.host,y){if(this.hostname=this.hostname.substr(1,this.hostname.length-2),W[0]!=="/")W="/"+W}}if(!oo[E])for(var N=0,b=FE.length;N<b;N++){var D=FE[N];if(W.indexOf(D)===-1)continue;var F=encodeURIComponent(D);if(F===D)F=escape(D);W=W.split(D).join(F)}var L=W.indexOf("#");if(L!==-1)this.hash=W.substr(L),W=W.slice(0,L);var H=W.indexOf("?");if(H!==-1){if(this.search=W.substr(H),this.query=W.substr(H+1),I)this.query=ME.parse(this.query);W=W.slice(0,H)}else if(I)this.search="",this.query={};if(W)this.pathname=W;if(UY[E]&&this.hostname&&!this.pathname)this.pathname="/";if(this.pathname||this.search){var P0=this.pathname||"",v=this.search||"";this.path=P0+v}return this.href=this.format(),this};y6.prototype.format=function(){var $=this.auth||"";if($)$=encodeURIComponent($),$=$.replace(/%3A/i,":"),$+="@";var I=this.protocol||"",G=this.pathname||"",Z=this.hash||"",_=!1,J="";if(this.host)_=$+this.host;else if(this.hostname){if(_=$+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port)_+=":"+this.port}if(this.query&&Yg(this.query)&&Object.keys(this.query).length)J=ME.stringify(this.query);var Y=this.search||J&&"?"+J||"";if(I&&I.substr(-1)!==":")I+=":";if(this.slashes||(!I||UY[I])&&_!==!1){if(_="//"+(_||""),G&&G.charAt(0)!=="/")G="/"+G}else if(!_)_="";if(Z&&Z.charAt(0)!=="#")Z="#"+Z;if(Y&&Y.charAt(0)!=="?")Y="?"+Y;return G=G.replace(/[?#]/g,function(W){return encodeURIComponent(W)}),Y=Y.replace("#","%23"),I+_+G+Y+Z};y6.prototype.resolve=function($){return this.resolveObject(IY($,!1,!0)).format()};y6.prototype.resolveObject=function($){if(EE($)){var I=new y6;I.parse($,!1,!0),$=I}var G=new y6,Z=Object.keys(this);for(var _=0;_<Z.length;_++){var J=Z[_];G[J]=this[J]}if(G.hash=$.hash,$.href==="")return G.href=G.format(),G;if($.slashes&&!$.protocol){var Y=Object.keys($);for(var W=0;W<Y.length;W++){var R=Y[W];if(R!=="protocol")G[R]=$[R]}if(UY[G.protocol]&&G.hostname&&!G.pathname)G.path=G.pathname="/";return G.href=G.format(),G}if($.protocol&&$.protocol!==G.protocol){if(!UY[$.protocol]){var M=Object.keys($);for(var E=0;E<M.length;E++){var T=M[E];G[T]=$[T]}return G.href=G.format(),G}if(G.protocol=$.protocol,!$.host&&!TE[$.protocol]){var b=($.pathname||"").split("/");while(b.length&&!($.host=b.shift()));if(!$.host)$.host="";if(!$.hostname)$.hostname="";if(b[0]!=="")b.unshift("");if(b.length<2)b.unshift("");G.pathname=b.join("/")}else G.pathname=$.pathname;if(G.search=$.search,G.query=$.query,G.host=$.host||"",G.auth=$.auth,G.hostname=$.hostname||$.host,G.port=$.port,G.pathname||G.search){var S=G.pathname||"",N=G.search||"";G.path=S+N}return G.slashes=G.slashes||$.slashes,G.href=G.format(),G}var B=G.pathname&&G.pathname.charAt(0)==="/",x=$.host||$.pathname&&$.pathname.charAt(0)==="/",w=x||B||G.host&&$.pathname,y=w,g=G.pathname&&G.pathname.split("/")||[],b=$.pathname&&$.pathname.split("/")||[],l=G.protocol&&!UY[G.protocol];if(l){if(G.hostname="",G.port=null,G.host)if(g[0]==="")g[0]=G.host;else g.unshift(G.host);if(G.host="",$.protocol){if($.hostname=null,$.port=null,$.host)if(b[0]==="")b[0]=$.host;else b.unshift($.host);$.host=null}w=w&&(b[0]===""||g[0]==="")}if(x)G.host=$.host||$.host===""?$.host:G.host,G.hostname=$.hostname||$.hostname===""?$.hostname:G.hostname,G.search=$.search,G.query=$.query,g=b;else if(b.length){if(!g)g=[];g.pop(),g=g.concat(b),G.search=$.search,G.query=$.query}else if(!ho($.search)){if(l){G.hostname=G.host=g.shift();var i=G.host&&G.host.indexOf("@")>0?G.host.split("@"):!1;if(i)G.auth=i.shift(),G.host=G.hostname=i.shift()}if(G.search=$.search,G.query=$.query,!m5(G.pathname)||!m5(G.search))G.path=(G.pathname?G.pathname:"")+(G.search?G.search:"");return G.href=G.format(),G}if(!g.length){if(G.pathname=null,G.search)G.path="/"+G.search;else G.path=null;return G.href=G.format(),G}var $0=g.slice(-1)[0],Q0=(G.host||$.host||g.length>1)&&($0==="."||$0==="..")||$0==="",G0=0;for(var D0=g.length;D0>=0;D0--)if($0=g[D0],$0===".")g.splice(D0,1);else if($0==="..")g.splice(D0,1),G0++;else if(G0)g.splice(D0,1),G0--;if(!w&&!y)for(;G0--;G0)g.unshift("..");if(w&&g[0]!==""&&(!g[0]||g[0].charAt(0)!=="/"))g.unshift("");if(Q0&&g.join("/").substr(-1)!=="/")g.push("");var t=g[0]===""||g[0]&&g[0].charAt(0)==="/";if(l){G.hostname=G.host=t?"":g.length?g.shift():"";var i=G.host&&G.host.indexOf("@")>0?G.host.split("@"):!1;if(i)G.auth=i.shift(),G.host=G.hostname=i.shift()}if(w=w||G.host&&g.length,w&&!t)g.unshift("");if(!g.length)G.pathname=null,G.path=null;else G.pathname=g.join("/");if(!m5(G.pathname)||!m5(G.search))G.path=(G.pathname?G.pathname:"")+(G.search?G.search:"");return G.auth=$.auth||G.auth,G.slashes=G.slashes||$.slashes,G.href=G.format(),G};y6.prototype.parseHost=function(){var $=this.host,I=no.exec($);if(I){if(I=I[0],I!==":")this.port=I.substr(1);$=$.substr(0,$.length-I.length)}if($)this.hostname=$};to={parse:IY,resolve:Qg,resolveObject:zg,format:Jg,Url:y6,URL:AE,URLSearchParams:Gg}});var d5={};LU(d5,{request:()=>Dt,globalAgent:()=>Tt,get:()=>Kt,default:()=>Eg,STATUS_CODES:()=>Mt,METHODS:()=>At,IncomingMessage:()=>Ht,ClientRequest:()=>Wt,Agent:()=>Ft});var ro,ao,Zg,so,eo,$t=($,I,G)=>{G=$!=null?ro(ao($)):{};let Z=I||!$||!$.__esModule?Zg(G,"default",{value:$,enumerable:!0}):G;for(let _ of so($))if(!eo.call(Z,_))Zg(Z,_,{get:()=>$[_],enumerable:!0});return Z},x1=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports),Lg,Ut,IX,It,Dg,_X,Kg,_t,Wg,_Y,Xt,Og,VE,Gt,Yt,Hg,Fg,Jt,Qt,Tg,Mg,zt,Zt,Ot,Lt,Ag,Dt,Kt,Wt,Ht,Ft,Tt,Mt,At,Eg;var Xz=WI(()=>{ro=Object.create,{getPrototypeOf:ao,defineProperty:Zg,getOwnPropertyNames:so}=Object,eo=Object.prototype.hasOwnProperty,Lg=x1(($)=>{$.fetch=_(globalThis.fetch)&&_(globalThis.ReadableStream),$.writableStream=_(globalThis.WritableStream),$.abortController=_(globalThis.AbortController);var I;function G(){if(I!==void 0)return I;if(globalThis.XMLHttpRequest){I=new globalThis.XMLHttpRequest;try{I.open("GET",globalThis.XDomainRequest?"/":"https://example.com")}catch(J){I=null}}else I=null;return I}function Z(J){var Y=G();if(!Y)return!1;try{return Y.responseType=J,Y.responseType===J}catch(W){}return!1}$.arraybuffer=$.fetch||Z("arraybuffer"),$.msstream=!$.fetch&&Z("ms-stream"),$.mozchunkedarraybuffer=!$.fetch&&Z("moz-chunked-arraybuffer"),$.overrideMimeType=$.fetch||(G()?_(G().overrideMimeType):!1);function _(J){return typeof J==="function"}I=null}),Ut=x1(($,I)=>{if(typeof Object.create==="function")I.exports=function(G,Z){if(Z)G.super_=Z,G.prototype=Object.create(Z.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}})};else I.exports=function(G,Z){if(Z){G.super_=Z;var _=function(){};_.prototype=Z.prototype,G.prototype=new _,G.prototype.constructor=G}}}),IX=x1(($,I)=>{try{if(G=(C2(),V$(v2)),typeof G.inherits!=="function")throw"";I.exports=G.inherits}catch(Z){I.exports=Ut()}var G}),It=x1(($,I)=>{function G(w,y){var g=Object.keys(w);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(w);y&&(b=b.filter(function(l){return Object.getOwnPropertyDescriptor(w,l).enumerable})),g.push.apply(g,b)}return g}function Z(w){for(var y=1;y<arguments.length;y++){var g=arguments[y]!=null?arguments[y]:{};y%2?G(Object(g),!0).forEach(function(b){_(w,b,g[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(g)):G(Object(g)).forEach(function(b){Object.defineProperty(w,b,Object.getOwnPropertyDescriptor(g,b))})}return w}function _(w,y,g){if(y=R(y),y in w)Object.defineProperty(w,y,{value:g,enumerable:!0,configurable:!0,writable:!0});else w[y]=g;return w}function J(w,y){if(!(w instanceof y))throw TypeError("Cannot call a class as a function")}function Y(w,y){for(var g=0;g<y.length;g++){var b=y[g];if(b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b)b.writable=!0;Object.defineProperty(w,R(b.key),b)}}function W(w,y,g){if(y)Y(w.prototype,y);if(g)Y(w,g);return Object.defineProperty(w,"prototype",{writable:!1}),w}function R(w){var y=M(w,"string");return typeof y==="symbol"?y:String(y)}function M(w,y){if(typeof w!=="object"||w===null)return w;var g=w[Symbol.toPrimitive];if(g!==void 0){var b=g.call(w,y||"default");if(typeof b!=="object")return b;throw TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(w)}var E=(u1(),V$(h1)),T=E.Buffer,S=(C2(),V$(v2)),N=S.inspect,B=N&&N.custom||"inspect";function x(w,y,g){T.prototype.copy.call(w,y,g)}I.exports=function(){function w(){J(this,w),this.head=null,this.tail=null,this.length=0}return W(w,[{key:"push",value:function(y){var g={data:y,next:null};if(this.length>0)this.tail.next=g;else this.head=g;this.tail=g,++this.length}},{key:"unshift",value:function(y){var g={data:y,next:this.head};if(this.length===0)this.tail=g;this.head=g,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var y=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,y}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";var g=this.head,b=""+g.data;while(g=g.next)b+=y+g.data;return b}},{key:"concat",value:function(y){if(this.length===0)return T.alloc(0);var g=T.allocUnsafe(y>>>0),b=this.head,l=0;while(b)x(b.data,g,l),l+=b.data.length,b=b.next;return g}},{key:"consume",value:function(y,g){var b;if(y<this.head.data.length)b=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y);else if(y===this.head.data.length)b=this.shift();else b=g?this._getString(y):this._getBuffer(y);return b}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var g=this.head,b=1,l=g.data;y-=l.length;while(g=g.next){var i=g.data,$0=y>i.length?i.length:y;if($0===i.length)l+=i;else l+=i.slice(0,y);if(y-=$0,y===0){if($0===i.length)if(++b,g.next)this.head=g.next;else this.head=this.tail=null;else this.head=g,g.data=i.slice($0);break}++b}return this.length-=b,l}},{key:"_getBuffer",value:function(y){var g=T.allocUnsafe(y),b=this.head,l=1;b.data.copy(g),y-=b.data.length;while(b=b.next){var i=b.data,$0=y>i.length?i.length:y;if(i.copy(g,g.length-y,0,$0),y-=$0,y===0){if($0===i.length)if(++l,b.next)this.head=b.next;else this.head=this.tail=null;else this.head=b,b.data=i.slice($0);break}++l}return this.length-=l,g}},{key:B,value:function(y,g){return N(this,Z(Z({},g),{},{depth:0,customInspect:!1}))}}]),w}()}),Dg=x1(($,I)=>{function G(R,M){var E=this,T=this._readableState&&this._readableState.destroyed,S=this._writableState&&this._writableState.destroyed;if(T||S){if(M)M(R);else if(R){if(!this._writableState)process.nextTick(Y,this,R);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(Y,this,R)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(R||null,function(N){if(!M&&N)if(!E._writableState)process.nextTick(Z,E,N);else if(!E._writableState.errorEmitted)E._writableState.errorEmitted=!0,process.nextTick(Z,E,N);else process.nextTick(_,E);else if(M)process.nextTick(_,E),M(N);else process.nextTick(_,E)}),this}function Z(R,M){Y(R,M),_(R)}function _(R){if(R._writableState&&!R._writableState.emitClose)return;if(R._readableState&&!R._readableState.emitClose)return;R.emit("close")}function J(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function Y(R,M){R.emit("error",M)}function W(R,M){var{_readableState:E,_writableState:T}=R;if(E&&E.autoDestroy||T&&T.autoDestroy)R.destroy(M);else R.emit("error",M)}I.exports={destroy:G,undestroy:J,errorOrDestroy:W}}),_X=x1(($,I)=>{var G={};function Z(R,M,E){if(!E)E=Error;function T(N,B,x){if(typeof M==="string")return M;else return M(N,B,x)}class S extends E{constructor(N,B,x){super(T(N,B,x))}}S.prototype.name=E.name,S.prototype.code=R,G[R]=S}function _(R,M){if(Array.isArray(R)){let E=R.length;if(R=R.map((T)=>String(T)),E>2)return`one of ${M} ${R.slice(0,E-1).join(", ")}, or `+R[E-1];else if(E===2)return`one of ${M} ${R[0]} or ${R[1]}`;else return`of ${M} ${R[0]}`}else return`of ${M} ${String(R)}`}function J(R,M,E){return R.substr(!E||E<0?0:+E,M.length)===M}function Y(R,M,E){if(E===void 0||E>R.length)E=R.length;return R.substring(E-M.length,E)===M}function W(R,M,E){if(typeof E!=="number")E=0;if(E+M.length>R.length)return!1;else return R.indexOf(M,E)!==-1}Z("ERR_INVALID_OPT_VALUE",function(R,M){return'The value "'+M+'" is invalid for option "'+R+'"'},TypeError),Z("ERR_INVALID_ARG_TYPE",function(R,M,E){let T;if(typeof M==="string"&&J(M,"not "))T="must not be",M=M.replace(/^not /,"");else T="must be";let S;if(Y(R," argument"))S=`The ${R} ${T} ${_(M,"type")}`;else{let N=W(R,".")?"property":"argument";S=`The "${R}" ${N} ${T} ${_(M,"type")}`}return S+=`. Received type ${typeof E}`,S},TypeError),Z("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Z("ERR_METHOD_NOT_IMPLEMENTED",function(R){return"The "+R+" method is not implemented"}),Z("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Z("ERR_STREAM_DESTROYED",function(R){return"Cannot call "+R+" after a stream was destroyed"}),Z("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Z("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Z("ERR_STREAM_WRITE_AFTER_END","write after end"),Z("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Z("ERR_UNKNOWN_ENCODING",function(R){return"Unknown encoding: "+R},TypeError),Z("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),$.codes=G}),Kg=x1(($,I)=>{var G=_X().codes.ERR_INVALID_OPT_VALUE;function Z(J,Y,W){return J.highWaterMark!=null?J.highWaterMark:Y?J[W]:null}function _(J,Y,W,R){var M=Z(Y,R,W);if(M!=null){if(!(isFinite(M)&&Math.floor(M)===M)||M<0){var E=R?W:"highWaterMark";throw new G(E,M)}return Math.floor(M)}return J.objectMode?16:16384}I.exports={getHighWaterMark:_}}),_t=x1(($,I)=>{I.exports=(C2(),V$(v2)).deprecate}),Wg=x1(($,I)=>{I.exports=t;function G(O0){var d=this;this.next=null,this.entry=null,this.finish=function(){K0(d,O0)}}var Z;t.WritableState=G0;var _={deprecate:_t()},J=w4(),Y=(u1(),V$(h1)).Buffer,W=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function R(O0){return Y.from(O0)}function M(O0){return Y.isBuffer(O0)||O0 instanceof W}var E=Dg(),T=Kg(),S=T.getHighWaterMark,N=_X().codes,B=N.ERR_INVALID_ARG_TYPE,x=N.ERR_METHOD_NOT_IMPLEMENTED,w=N.ERR_MULTIPLE_CALLBACK,y=N.ERR_STREAM_CANNOT_PIPE,g=N.ERR_STREAM_DESTROYED,b=N.ERR_STREAM_NULL_VALUES,l=N.ERR_STREAM_WRITE_AFTER_END,i=N.ERR_UNKNOWN_ENCODING,$0=E.errorOrDestroy;IX()(t,J);function Q0(){}function G0(O0,d,m){if(Z=Z||_Y(),O0=O0||{},typeof m!=="boolean")m=d instanceof Z;if(this.objectMode=!!O0.objectMode,m)this.objectMode=this.objectMode||!!O0.writableObjectMode;this.highWaterMark=S(this,O0,"writableHighWaterMark",m),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var r=O0.decodeStrings===!1;this.decodeStrings=!r,this.defaultEncoding=O0.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y0){q(d,Y0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=O0.emitClose!==!1,this.autoDestroy=!!O0.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new G(this)}G0.prototype.getBuffer=function(){var O0=this.bufferedRequest,d=[];while(O0)d.push(O0),O0=O0.next;return d},function(){try{Object.defineProperty(G0.prototype,"buffer",{get:_.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(O0){}}();var D0;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")D0=Function.prototype[Symbol.hasInstance],Object.defineProperty(t,Symbol.hasInstance,{value:function(O0){if(D0.call(this,O0))return!0;if(this!==t)return!1;return O0&&O0._writableState instanceof G0}});else D0=function(O0){return O0 instanceof this};function t(O0){Z=Z||_Y();var d=this instanceof Z;if(!d&&!D0.call(t,this))return new t(O0);if(this._writableState=new G0(O0,this,d),this.writable=!0,O0){if(typeof O0.write==="function")this._write=O0.write;if(typeof O0.writev==="function")this._writev=O0.writev;if(typeof O0.destroy==="function")this._destroy=O0.destroy;if(typeof O0.final==="function")this._final=O0.final}J.call(this)}t.prototype.pipe=function(){$0(this,new y)};function P0(O0,d){var m=new l;$0(O0,m),process.nextTick(d,m)}function Q(O0,d,m,r){var Y0;if(m===null)Y0=new b;else if(typeof m!=="string"&&!d.objectMode)Y0=new B("chunk",["string","Buffer"],m);if(Y0)return $0(O0,Y0),process.nextTick(r,Y0),!1;return!0}t.prototype.write=function(O0,d,m){var r=this._writableState,Y0=!1,W0=!r.objectMode&&M(O0);if(W0&&!Y.isBuffer(O0))O0=R(O0);if(typeof d==="function")m=d,d=null;if(W0)d="buffer";else if(!d)d=r.defaultEncoding;if(typeof m!=="function")m=Q0;if(r.ending)P0(this,m);else if(W0||Q(this,r,O0,m))r.pendingcb++,Y0=F(this,r,W0,O0,d,m);return Y0},t.prototype.cork=function(){this._writableState.corked++},t.prototype.uncork=function(){var O0=this._writableState;if(O0.corked){if(O0.corked--,!O0.writing&&!O0.corked&&!O0.bufferProcessing&&O0.bufferedRequest)A(this,O0)}},t.prototype.setDefaultEncoding=function(O0){if(typeof O0==="string")O0=O0.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((O0+"").toLowerCase())>-1))throw new i(O0);return this._writableState.defaultEncoding=O0,this},Object.defineProperty(t.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function D(O0,d,m){if(!O0.objectMode&&O0.decodeStrings!==!1&&typeof d==="string")d=Y.from(d,m);return d}Object.defineProperty(t.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function F(O0,d,m,r,Y0,W0){if(!m){var I0=D(d,r,Y0);if(r!==I0)m=!0,Y0="buffer",r=I0}var c=d.objectMode?1:r.length;d.length+=c;var s=d.length<d.highWaterMark;if(!s)d.needDrain=!0;if(d.writing||d.corked){var S0=d.lastBufferedRequest;if(d.lastBufferedRequest={chunk:r,encoding:Y0,isBuf:m,callback:W0,next:null},S0)S0.next=d.lastBufferedRequest;else d.bufferedRequest=d.lastBufferedRequest;d.bufferedRequestCount+=1}else L(O0,d,!1,c,r,Y0,W0);return s}function L(O0,d,m,r,Y0,W0,I0){if(d.writelen=r,d.writecb=I0,d.writing=!0,d.sync=!0,d.destroyed)d.onwrite(new g("write"));else if(m)O0._writev(Y0,d.onwrite);else O0._write(Y0,W0,d.onwrite);d.sync=!1}function H(O0,d,m,r,Y0){if(--d.pendingcb,m)process.nextTick(Y0,r),process.nextTick(a,O0,d),O0._writableState.errorEmitted=!0,$0(O0,r);else Y0(r),O0._writableState.errorEmitted=!0,$0(O0,r),a(O0,d)}function v(O0){O0.writing=!1,O0.writecb=null,O0.length-=O0.writelen,O0.writelen=0}function q(O0,d){var m=O0._writableState,r=m.sync,Y0=m.writecb;if(typeof Y0!=="function")throw new w;if(v(m),d)H(O0,m,r,d,Y0);else{var W0=k(m)||O0.destroyed;if(!W0&&!m.corked&&!m.bufferProcessing&&m.bufferedRequest)A(O0,m);if(r)process.nextTick(P,O0,m,W0,Y0);else P(O0,m,W0,Y0)}}function P(O0,d,m,r){if(!m)O(O0,d);d.pendingcb--,r(),a(O0,d)}function O(O0,d){if(d.length===0&&d.needDrain)d.needDrain=!1,O0.emit("drain")}function A(O0,d){d.bufferProcessing=!0;var m=d.bufferedRequest;if(O0._writev&&m&&m.next){var r=d.bufferedRequestCount,Y0=Array(r),W0=d.corkedRequestsFree;W0.entry=m;var I0=0,c=!0;while(m){if(Y0[I0]=m,!m.isBuf)c=!1;m=m.next,I0+=1}if(Y0.allBuffers=c,L(O0,d,!0,d.length,Y0,"",W0.finish),d.pendingcb++,d.lastBufferedRequest=null,W0.next)d.corkedRequestsFree=W0.next,W0.next=null;else d.corkedRequestsFree=new G(d);d.bufferedRequestCount=0}else{while(m){var{chunk:s,encoding:S0,callback:M0}=m,z0=d.objectMode?1:s.length;if(L(O0,d,!1,z0,s,S0,M0),m=m.next,d.bufferedRequestCount--,d.writing)break}if(m===null)d.lastBufferedRequest=null}d.bufferedRequest=m,d.bufferProcessing=!1}t.prototype._write=function(O0,d,m){m(new x("_write()"))},t.prototype._writev=null,t.prototype.end=function(O0,d,m){var r=this._writableState;if(typeof O0==="function")m=O0,O0=null,d=null;else if(typeof d==="function")m=d,d=null;if(O0!==null&&O0!==void 0)this.write(O0,d);if(r.corked)r.corked=1,this.uncork();if(!r.ending)J0(this,r,m);return this},Object.defineProperty(t.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function k(O0){return O0.ending&&O0.length===0&&O0.bufferedRequest===null&&!O0.finished&&!O0.writing}function j(O0,d){O0._final(function(m){if(d.pendingcb--,m)$0(O0,m);d.prefinished=!0,O0.emit("prefinish"),a(O0,d)})}function h(O0,d){if(!d.prefinished&&!d.finalCalled)if(typeof O0._final==="function"&&!d.destroyed)d.pendingcb++,d.finalCalled=!0,process.nextTick(j,O0,d);else d.prefinished=!0,O0.emit("prefinish")}function a(O0,d){var m=k(d);if(m){if(h(O0,d),d.pendingcb===0){if(d.finished=!0,O0.emit("finish"),d.autoDestroy){var r=O0._readableState;if(!r||r.autoDestroy&&r.endEmitted)O0.destroy()}}}return m}function J0(O0,d,m){if(d.ending=!0,a(O0,d),m)if(d.finished)process.nextTick(m);else O0.once("finish",m);d.ended=!0,O0.writable=!1}function K0(O0,d,m){var r=O0.entry;O0.entry=null;while(r){var Y0=r.callback;d.pendingcb--,Y0(m),r=r.next}d.corkedRequestsFree.next=O0}Object.defineProperty(t.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(O0){if(!this._writableState)return;this._writableState.destroyed=O0}}),t.prototype.destroy=E.destroy,t.prototype._undestroy=E.undestroy,t.prototype._destroy=function(O0,d){d(O0)}}),_Y=x1(($,I)=>{var G=Object.keys||function(T){var S=[];for(var N in T)S.push(N);return S};I.exports=R;var Z=Hg(),_=Wg();IX()(R,Z);{J=G(_.prototype);for(W=0;W<J.length;W++)if(Y=J[W],!R.prototype[Y])R.prototype[Y]=_.prototype[Y]}var J,Y,W;function R(T){if(!(this instanceof R))return new R(T);if(Z.call(this,T),_.call(this,T),this.allowHalfOpen=!0,T){if(T.readable===!1)this.readable=!1;if(T.writable===!1)this.writable=!1;if(T.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",M)}}Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function M(){if(this._writableState.ended)return;process.nextTick(E,this)}function E(T){T.end()}Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(T){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=T,this._writableState.destroyed=T}})}),Xt=x1(($,I)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var G=(u1(),V$(h1)),Z=G.Buffer;function _(Y,W){for(var R in Y)W[R]=Y[R]}if(Z.from&&Z.alloc&&Z.allocUnsafe&&Z.allocUnsafeSlow)I.exports=G;else _(G,$),$.Buffer=J;function J(Y,W,R){return Z(Y,W,R)}J.prototype=Object.create(Z.prototype),_(Z,J),J.from=function(Y,W,R){if(typeof Y==="number")throw TypeError("Argument must not be a number");return Z(Y,W,R)},J.alloc=function(Y,W,R){if(typeof Y!=="number")throw TypeError("Argument must be a number");var M=Z(Y);if(W!==void 0)if(typeof R==="string")M.fill(W,R);else M.fill(W);else M.fill(0);return M},J.allocUnsafe=function(Y){if(typeof Y!=="number")throw TypeError("Argument must be a number");return Z(Y)},J.allocUnsafeSlow=function(Y){if(typeof Y!=="number")throw TypeError("Argument must be a number");return G.SlowBuffer(Y)}}),Og=x1(($)=>{var I=Xt().Buffer,G=I.isEncoding||function(g){switch(g=""+g,g&&g.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Z(g){if(!g)return"utf8";var b;while(!0)switch(g){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return g;default:if(b)return;g=(""+g).toLowerCase(),b=!0}}function _(g){var b=Z(g);if(typeof b!=="string"&&(I.isEncoding===G||!G(g)))throw Error("Unknown encoding: "+g);return b||g}$.StringDecoder=J;function J(g){this.encoding=_(g);var b;switch(this.encoding){case"utf16le":this.text=S,this.end=N,b=4;break;case"utf8":this.fillLast=M,b=4;break;case"base64":this.text=B,this.end=x,b=3;break;default:this.write=w,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=I.allocUnsafe(b)}J.prototype.write=function(g){if(g.length===0)return"";var b,l;if(this.lastNeed){if(b=this.fillLast(g),b===void 0)return"";l=this.lastNeed,this.lastNeed=0}else l=0;if(l<g.length)return b?b+this.text(g,l):this.text(g,l);return b||""},J.prototype.end=T,J.prototype.text=E,J.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length};function Y(g){if(g<=127)return 0;else if(g>>5===6)return 2;else if(g>>4===14)return 3;else if(g>>3===30)return 4;return g>>6===2?-1:-2}function W(g,b,l){var i=b.length-1;if(i<l)return 0;var $0=Y(b[i]);if($0>=0){if($0>0)g.lastNeed=$0-1;return $0}if(--i<l||$0===-2)return 0;if($0=Y(b[i]),$0>=0){if($0>0)g.lastNeed=$0-2;return $0}if(--i<l||$0===-2)return 0;if($0=Y(b[i]),$0>=0){if($0>0)if($0===2)$0=0;else g.lastNeed=$0-3;return $0}return 0}function R(g,b,l){if((b[0]&192)!==128)return g.lastNeed=0,"�";if(g.lastNeed>1&&b.length>1){if((b[1]&192)!==128)return g.lastNeed=1,"�";if(g.lastNeed>2&&b.length>2){if((b[2]&192)!==128)return g.lastNeed=2,"�"}}}function M(g){var b=this.lastTotal-this.lastNeed,l=R(this,g,b);if(l!==void 0)return l;if(this.lastNeed<=g.length)return g.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,b,0,g.length),this.lastNeed-=g.length}function E(g,b){var l=W(this,g,b);if(!this.lastNeed)return g.toString("utf8",b);this.lastTotal=l;var i=g.length-(l-this.lastNeed);return g.copy(this.lastChar,0,i),g.toString("utf8",b,i)}function T(g){var b=g&&g.length?this.write(g):"";if(this.lastNeed)return b+"�";return b}function S(g,b){if((g.length-b)%2===0){var l=g.toString("utf16le",b);if(l){var i=l.charCodeAt(l.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],l.slice(0,-1)}return l}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",b,g.length-1)}function N(g){var b=g&&g.length?this.write(g):"";if(this.lastNeed){var l=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,l)}return b}function B(g,b){var l=(g.length-b)%3;if(l===0)return g.toString("base64",b);if(this.lastNeed=3-l,this.lastTotal=3,l===1)this.lastChar[0]=g[g.length-1];else this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1];return g.toString("base64",b,g.length-l)}function x(g){var b=g&&g.length?this.write(g):"";if(this.lastNeed)return b+this.lastChar.toString("base64",0,3-this.lastNeed);return b}function w(g){return g.toString(this.encoding)}function y(g){return g&&g.length?this.write(g):""}}),VE=x1(($,I)=>{var G=_X().codes.ERR_STREAM_PREMATURE_CLOSE;function Z(W){var R=!1;return function(){if(R)return;R=!0;for(var M=arguments.length,E=Array(M),T=0;T<M;T++)E[T]=arguments[T];W.apply(this,E)}}function _(){}function J(W){return W.setHeader&&typeof W.abort==="function"}function Y(W,R,M){if(typeof R==="function")return Y(W,null,R);if(!R)R={};M=Z(M||_);var E=R.readable||R.readable!==!1&&W.readable,T=R.writable||R.writable!==!1&&W.writable,S=function(){if(!W.writable)B()},N=W._writableState&&W._writableState.finished,B=function(){if(T=!1,N=!0,!E)M.call(W)},x=W._readableState&&W._readableState.endEmitted,w=function(){if(E=!1,x=!0,!T)M.call(W)},y=function(l){M.call(W,l)},g=function(){var l;if(E&&!x){if(!W._readableState||!W._readableState.ended)l=new G;return M.call(W,l)}if(T&&!N){if(!W._writableState||!W._writableState.ended)l=new G;return M.call(W,l)}},b=function(){W.req.on("finish",B)};if(J(W))if(W.on("complete",B),W.on("abort",g),W.req)b();else W.on("request",b);else if(T&&!W._writableState)W.on("end",S),W.on("close",S);if(W.on("end",w),W.on("finish",B),R.error!==!1)W.on("error",y);return W.on("close",g),function(){if(W.removeListener("complete",B),W.removeListener("abort",g),W.removeListener("request",b),W.req)W.req.removeListener("finish",B);W.removeListener("end",S),W.removeListener("close",S),W.removeListener("finish",B),W.removeListener("end",w),W.removeListener("error",y),W.removeListener("close",g)}}I.exports=Y}),Gt=x1(($,I)=>{var G;function Z(i,$0,Q0){if($0=_($0),$0 in i)Object.defineProperty(i,$0,{value:Q0,enumerable:!0,configurable:!0,writable:!0});else i[$0]=Q0;return i}function _(i){var $0=J(i,"string");return typeof $0==="symbol"?$0:String($0)}function J(i,$0){if(typeof i!=="object"||i===null)return i;var Q0=i[Symbol.toPrimitive];if(Q0!==void 0){var G0=Q0.call(i,$0||"default");if(typeof G0!=="object")return G0;throw TypeError("@@toPrimitive must return a primitive value.")}return($0==="string"?String:Number)(i)}var Y=VE(),W=Symbol("lastResolve"),R=Symbol("lastReject"),M=Symbol("error"),E=Symbol("ended"),T=Symbol("lastPromise"),S=Symbol("handlePromise"),N=Symbol("stream");function B(i,$0){return{value:i,done:$0}}function x(i){var $0=i[W];if($0!==null){var Q0=i[N].read();if(Q0!==null)i[T]=null,i[W]=null,i[R]=null,$0(B(Q0,!1))}}function w(i){process.nextTick(x,i)}function y(i,$0){return function(Q0,G0){i.then(function(){if($0[E]){Q0(B(void 0,!0));return}$0[S](Q0,G0)},G0)}}var g=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((G={get stream(){return this[N]},next:function(){var i=this,$0=this[M];if($0!==null)return Promise.reject($0);if(this[E])return Promise.resolve(B(void 0,!0));if(this[N].destroyed)return new Promise(function(t,P0){process.nextTick(function(){if(i[M])P0(i[M]);else t(B(void 0,!0))})});var Q0=this[T],G0;if(Q0)G0=new Promise(y(Q0,this));else{var D0=this[N].read();if(D0!==null)return Promise.resolve(B(D0,!1));G0=new Promise(this[S])}return this[T]=G0,G0}},Z(G,Symbol.asyncIterator,function(){return this}),Z(G,"return",function(){var i=this;return new Promise(function($0,Q0){i[N].destroy(null,function(G0){if(G0){Q0(G0);return}$0(B(void 0,!0))})})}),G),g),l=function(i){var $0,Q0=Object.create(b,($0={},Z($0,N,{value:i,writable:!0}),Z($0,W,{value:null,writable:!0}),Z($0,R,{value:null,writable:!0}),Z($0,M,{value:null,writable:!0}),Z($0,E,{value:i._readableState.endEmitted,writable:!0}),Z($0,S,{value:function(G0,D0){var t=Q0[N].read();if(t)Q0[T]=null,Q0[W]=null,Q0[R]=null,G0(B(t,!1));else Q0[W]=G0,Q0[R]=D0},writable:!0}),$0));return Q0[T]=null,Y(i,function(G0){if(G0&&G0.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D0=Q0[R];if(D0!==null)Q0[T]=null,Q0[W]=null,Q0[R]=null,D0(G0);Q0[M]=G0;return}var t=Q0[W];if(t!==null)Q0[T]=null,Q0[W]=null,Q0[R]=null,t(B(void 0,!0));Q0[E]=!0}),i.on("readable",w.bind(null,Q0)),Q0};I.exports=l}),Yt=x1(($,I)=>{function G(T,S,N,B,x,w,y){try{var g=T[w](y),b=g.value}catch(l){N(l);return}if(g.done)S(b);else Promise.resolve(b).then(B,x)}function Z(T){return function(){var S=this,N=arguments;return new Promise(function(B,x){var w=T.apply(S,N);function y(b){G(w,B,x,y,g,"next",b)}function g(b){G(w,B,x,y,g,"throw",b)}y(void 0)})}}function _(T,S){var N=Object.keys(T);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(T);S&&(B=B.filter(function(x){return Object.getOwnPropertyDescriptor(T,x).enumerable})),N.push.apply(N,B)}return N}function J(T){for(var S=1;S<arguments.length;S++){var N=arguments[S]!=null?arguments[S]:{};S%2?_(Object(N),!0).forEach(function(B){Y(T,B,N[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(N)):_(Object(N)).forEach(function(B){Object.defineProperty(T,B,Object.getOwnPropertyDescriptor(N,B))})}return T}function Y(T,S,N){if(S=W(S),S in T)Object.defineProperty(T,S,{value:N,enumerable:!0,configurable:!0,writable:!0});else T[S]=N;return T}function W(T){var S=R(T,"string");return typeof S==="symbol"?S:String(S)}function R(T,S){if(typeof T!=="object"||T===null)return T;var N=T[Symbol.toPrimitive];if(N!==void 0){var B=N.call(T,S||"default");if(typeof B!=="object")return B;throw TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(T)}var M=_X().codes.ERR_INVALID_ARG_TYPE;function E(T,S,N){var B;if(S&&typeof S.next==="function")B=S;else if(S&&S[Symbol.asyncIterator])B=S[Symbol.asyncIterator]();else if(S&&S[Symbol.iterator])B=S[Symbol.iterator]();else throw new M("iterable",["Iterable"],S);var x=new T(J({objectMode:!0},N)),w=!1;x._read=function(){if(!w)w=!0,y()};function y(){return g.apply(this,arguments)}function g(){return g=Z(function*(){try{var b=yield B.next(),l=b.value,i=b.done;if(i)x.push(null);else if(x.push(yield l))y();else w=!1}catch($0){x.destroy($0)}}),g.apply(this,arguments)}return x}I.exports=E}),Hg=x1(($,I)=>{I.exports=Q;var G;Q.ReadableState=P0;var Z=(ZG(),V$(zG)).EventEmitter,_=function(I0,c){return I0.listeners(c).length},J=w4(),Y=(u1(),V$(h1)).Buffer,W=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function R(I0){return Y.from(I0)}function M(I0){return Y.isBuffer(I0)||I0 instanceof W}var E=(C2(),V$(v2)),T;if(E&&E.debuglog)T=E.debuglog("stream");else T=function(){};var S=It(),N=Dg(),B=Kg(),x=B.getHighWaterMark,w=_X().codes,y=w.ERR_INVALID_ARG_TYPE,g=w.ERR_STREAM_PUSH_AFTER_EOF,b=w.ERR_METHOD_NOT_IMPLEMENTED,l=w.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,i,$0,Q0;IX()(Q,J);var G0=N.errorOrDestroy,D0=["error","close","destroy","pause","resume"];function t(I0,c,s){if(typeof I0.prependListener==="function")return I0.prependListener(c,s);if(!I0._events||!I0._events[c])I0.on(c,s);else if(Array.isArray(I0._events[c]))I0._events[c].unshift(s);else I0._events[c]=[s,I0._events[c]]}function P0(I0,c,s){if(G=G||_Y(),I0=I0||{},typeof s!=="boolean")s=c instanceof G;if(this.objectMode=!!I0.objectMode,s)this.objectMode=this.objectMode||!!I0.readableObjectMode;if(this.highWaterMark=x(this,I0,"readableHighWaterMark",s),this.buffer=new S,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=I0.emitClose!==!1,this.autoDestroy=!!I0.autoDestroy,this.destroyed=!1,this.defaultEncoding=I0.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,I0.encoding){if(!i)i=Og().StringDecoder;this.decoder=new i(I0.encoding),this.encoding=I0.encoding}}function Q(I0){if(G=G||_Y(),!(this instanceof Q))return new Q(I0);var c=this instanceof G;if(this._readableState=new P0(I0,this,c),this.readable=!0,I0){if(typeof I0.read==="function")this._read=I0.read;if(typeof I0.destroy==="function")this._destroy=I0.destroy}J.call(this)}Object.defineProperty(Q.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(I0){if(!this._readableState)return;this._readableState.destroyed=I0}}),Q.prototype.destroy=N.destroy,Q.prototype._undestroy=N.undestroy,Q.prototype._destroy=function(I0,c){c(I0)},Q.prototype.push=function(I0,c){var s=this._readableState,S0;if(!s.objectMode){if(typeof I0==="string"){if(c=c||s.defaultEncoding,c!==s.encoding)I0=Y.from(I0,c),c="";S0=!0}}else S0=!0;return D(this,I0,c,!1,S0)},Q.prototype.unshift=function(I0){return D(this,I0,null,!0,!1)};function D(I0,c,s,S0,M0){T("readableAddChunk",c);var z0=I0._readableState;if(c===null)z0.reading=!1,P(I0,z0);else{var c0;if(!M0)c0=L(z0,c);if(c0)G0(I0,c0);else if(z0.objectMode||c&&c.length>0){if(typeof c!=="string"&&!z0.objectMode&&Object.getPrototypeOf(c)!==Y.prototype)c=R(c);if(S0)if(z0.endEmitted)G0(I0,new l);else F(I0,z0,c,!0);else if(z0.ended)G0(I0,new g);else if(z0.destroyed)return!1;else if(z0.reading=!1,z0.decoder&&!s)if(c=z0.decoder.write(c),z0.objectMode||c.length!==0)F(I0,z0,c,!1);else k(I0,z0);else F(I0,z0,c,!1)}else if(!S0)z0.reading=!1,k(I0,z0)}return!z0.ended&&(z0.length<z0.highWaterMark||z0.length===0)}function F(I0,c,s,S0){if(c.flowing&&c.length===0&&!c.sync)c.awaitDrain=0,I0.emit("data",s);else{if(c.length+=c.objectMode?1:s.length,S0)c.buffer.unshift(s);else c.buffer.push(s);if(c.needReadable)O(I0)}k(I0,c)}function L(I0,c){var s;if(!M(c)&&typeof c!=="string"&&c!==void 0&&!I0.objectMode)s=new y("chunk",["string","Buffer","Uint8Array"],c);return s}Q.prototype.isPaused=function(){return this._readableState.flowing===!1},Q.prototype.setEncoding=function(I0){if(!i)i=Og().StringDecoder;var c=new i(I0);this._readableState.decoder=c,this._readableState.encoding=this._readableState.decoder.encoding;var s=this._readableState.buffer.head,S0="";while(s!==null)S0+=c.write(s.data),s=s.next;if(this._readableState.buffer.clear(),S0!=="")this._readableState.buffer.push(S0);return this._readableState.length=S0.length,this};var H=1073741824;function v(I0){if(I0>=H)I0=H;else I0--,I0|=I0>>>1,I0|=I0>>>2,I0|=I0>>>4,I0|=I0>>>8,I0|=I0>>>16,I0++;return I0}function q(I0,c){if(I0<=0||c.length===0&&c.ended)return 0;if(c.objectMode)return 1;if(I0!==I0)if(c.flowing&&c.length)return c.buffer.head.data.length;else return c.length;if(I0>c.highWaterMark)c.highWaterMark=v(I0);if(I0<=c.length)return I0;if(!c.ended)return c.needReadable=!0,0;return c.length}Q.prototype.read=function(I0){T("read",I0),I0=parseInt(I0,10);var c=this._readableState,s=I0;if(I0!==0)c.emittedReadable=!1;if(I0===0&&c.needReadable&&((c.highWaterMark!==0?c.length>=c.highWaterMark:c.length>0)||c.ended)){if(T("read: emitReadable",c.length,c.ended),c.length===0&&c.ended)r(this);else O(this);return null}if(I0=q(I0,c),I0===0&&c.ended){if(c.length===0)r(this);return null}var S0=c.needReadable;if(T("need readable",S0),c.length===0||c.length-I0<c.highWaterMark)S0=!0,T("length less than watermark",S0);if(c.ended||c.reading)S0=!1,T("reading or ended",S0);else if(S0){if(T("do read"),c.reading=!0,c.sync=!0,c.length===0)c.needReadable=!0;if(this._read(c.highWaterMark),c.sync=!1,!c.reading)I0=q(s,c)}var M0;if(I0>0)M0=m(I0,c);else M0=null;if(M0===null)c.needReadable=c.length<=c.highWaterMark,I0=0;else c.length-=I0,c.awaitDrain=0;if(c.length===0){if(!c.ended)c.needReadable=!0;if(s!==I0&&c.ended)r(this)}if(M0!==null)this.emit("data",M0);return M0};function P(I0,c){if(T("onEofChunk"),c.ended)return;if(c.decoder){var s=c.decoder.end();if(s&&s.length)c.buffer.push(s),c.length+=c.objectMode?1:s.length}if(c.ended=!0,c.sync)O(I0);else if(c.needReadable=!1,!c.emittedReadable)c.emittedReadable=!0,A(I0)}function O(I0){var c=I0._readableState;if(T("emitReadable",c.needReadable,c.emittedReadable),c.needReadable=!1,!c.emittedReadable)T("emitReadable",c.flowing),c.emittedReadable=!0,process.nextTick(A,I0)}function A(I0){var c=I0._readableState;if(T("emitReadable_",c.destroyed,c.length,c.ended),!c.destroyed&&(c.length||c.ended))I0.emit("readable"),c.emittedReadable=!1;c.needReadable=!c.flowing&&!c.ended&&c.length<=c.highWaterMark,d(I0)}function k(I0,c){if(!c.readingMore)c.readingMore=!0,process.nextTick(j,I0,c)}function j(I0,c){while(!c.reading&&!c.ended&&(c.length<c.highWaterMark||c.flowing&&c.length===0)){var s=c.length;if(T("maybeReadMore read 0"),I0.read(0),s===c.length)break}c.readingMore=!1}Q.prototype._read=function(I0){G0(this,new b("_read()"))},Q.prototype.pipe=function(I0,c){var s=this,S0=this._readableState;switch(S0.pipesCount){case 0:S0.pipes=I0;break;case 1:S0.pipes=[S0.pipes,I0];break;default:S0.pipes.push(I0);break}S0.pipesCount+=1,T("pipe count=%d opts=%j",S0.pipesCount,c);var M0=(!c||c.end!==!1)&&I0!==process.stdout&&I0!==process.stderr,z0=M0?F0:X$;if(S0.endEmitted)process.nextTick(z0);else s.once("end",z0);I0.on("unpipe",c0);function c0(p0,l0){if(T("onunpipe"),p0===s){if(l0&&l0.hasUnpiped===!1)l0.hasUnpiped=!0,k0()}}function F0(){T("onend"),I0.end()}var q0=h(s);I0.on("drain",q0);var s0=!1;function k0(){if(T("cleanup"),I0.removeListener("close",T0),I0.removeListener("finish",V0),I0.removeListener("drain",q0),I0.removeListener("error",M$),I0.removeListener("unpipe",c0),s.removeListener("end",F0),s.removeListener("end",X$),s.removeListener("data",n0),s0=!0,S0.awaitDrain&&(!I0._writableState||I0._writableState.needDrain))q0()}s.on("data",n0);function n0(p0){T("ondata");var l0=I0.write(p0);if(T("dest.write",l0),l0===!1){if((S0.pipesCount===1&&S0.pipes===I0||S0.pipesCount>1&&W0(S0.pipes,I0)!==-1)&&!s0)T("false write response, pause",S0.awaitDrain),S0.awaitDrain++;s.pause()}}function M$(p0){if(T("onerror",p0),X$(),I0.removeListener("error",M$),_(I0,"error")===0)G0(I0,p0)}t(I0,"error",M$);function T0(){I0.removeListener("finish",V0),X$()}I0.once("close",T0);function V0(){T("onfinish"),I0.removeListener("close",T0),X$()}I0.once("finish",V0);function X$(){T("unpipe"),s.unpipe(I0)}if(I0.emit("pipe",s),!S0.flowing)T("pipe resume"),s.resume();return I0};function h(I0){return function(){var c=I0._readableState;if(T("pipeOnDrain",c.awaitDrain),c.awaitDrain)c.awaitDrain--;if(c.awaitDrain===0&&_(I0,"data"))c.flowing=!0,d(I0)}}Q.prototype.unpipe=function(I0){var c=this._readableState,s={hasUnpiped:!1};if(c.pipesCount===0)return this;if(c.pipesCount===1){if(I0&&I0!==c.pipes)return this;if(!I0)I0=c.pipes;if(c.pipes=null,c.pipesCount=0,c.flowing=!1,I0)I0.emit("unpipe",this,s);return this}if(!I0){var{pipes:S0,pipesCount:M0}=c;c.pipes=null,c.pipesCount=0,c.flowing=!1;for(var z0=0;z0<M0;z0++)S0[z0].emit("unpipe",this,{hasUnpiped:!1});return this}var c0=W0(c.pipes,I0);if(c0===-1)return this;if(c.pipes.splice(c0,1),c.pipesCount-=1,c.pipesCount===1)c.pipes=c.pipes[0];return I0.emit("unpipe",this,s),this},Q.prototype.on=function(I0,c){var s=J.prototype.on.call(this,I0,c),S0=this._readableState;if(I0==="data"){if(S0.readableListening=this.listenerCount("readable")>0,S0.flowing!==!1)this.resume()}else if(I0==="readable"){if(!S0.endEmitted&&!S0.readableListening){if(S0.readableListening=S0.needReadable=!0,S0.flowing=!1,S0.emittedReadable=!1,T("on readable",S0.length,S0.reading),S0.length)O(this);else if(!S0.reading)process.nextTick(J0,this)}}return s},Q.prototype.addListener=Q.prototype.on,Q.prototype.removeListener=function(I0,c){var s=J.prototype.removeListener.call(this,I0,c);if(I0==="readable")process.nextTick(a,this);return s},Q.prototype.removeAllListeners=function(I0){var c=J.prototype.removeAllListeners.apply(this,arguments);if(I0==="readable"||I0===void 0)process.nextTick(a,this);return c};function a(I0){var c=I0._readableState;if(c.readableListening=I0.listenerCount("readable")>0,c.resumeScheduled&&!c.paused)c.flowing=!0;else if(I0.listenerCount("data")>0)I0.resume()}function J0(I0){T("readable nexttick read 0"),I0.read(0)}Q.prototype.resume=function(){var I0=this._readableState;if(!I0.flowing)T("resume"),I0.flowing=!I0.readableListening,K0(this,I0);return I0.paused=!1,this};function K0(I0,c){if(!c.resumeScheduled)c.resumeScheduled=!0,process.nextTick(O0,I0,c)}function O0(I0,c){if(T("resume",c.reading),!c.reading)I0.read(0);if(c.resumeScheduled=!1,I0.emit("resume"),d(I0),c.flowing&&!c.reading)I0.read(0)}Q.prototype.pause=function(){if(T("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)T("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function d(I0){var c=I0._readableState;T("flow",c.flowing);while(c.flowing&&I0.read()!==null);}if(Q.prototype.wrap=function(I0){var c=this,s=this._readableState,S0=!1;I0.on("end",function(){if(T("wrapped end"),s.decoder&&!s.ended){var c0=s.decoder.end();if(c0&&c0.length)c.push(c0)}c.push(null)}),I0.on("data",function(c0){if(T("wrapped data"),s.decoder)c0=s.decoder.write(c0);if(s.objectMode&&(c0===null||c0===void 0))return;else if(!s.objectMode&&(!c0||!c0.length))return;var F0=c.push(c0);if(!F0)S0=!0,I0.pause()});for(var M0 in I0)if(this[M0]===void 0&&typeof I0[M0]==="function")this[M0]=function(c0){return function(){return I0[c0].apply(I0,arguments)}}(M0);for(var z0=0;z0<D0.length;z0++)I0.on(D0[z0],this.emit.bind(this,D0[z0]));return this._read=function(c0){if(T("wrapped _read",c0),S0)S0=!1,I0.resume()},this},typeof Symbol==="function")Q.prototype[Symbol.asyncIterator]=function(){if($0===void 0)$0=Gt();return $0(this)};Object.defineProperty(Q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Q.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Q.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(I0){if(this._readableState)this._readableState.flowing=I0}}),Q._fromList=m,Object.defineProperty(Q.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function m(I0,c){if(c.length===0)return null;var s;if(c.objectMode)s=c.buffer.shift();else if(!I0||I0>=c.length){if(c.decoder)s=c.buffer.join("");else if(c.buffer.length===1)s=c.buffer.first();else s=c.buffer.concat(c.length);c.buffer.clear()}else s=c.buffer.consume(I0,c.decoder);return s}function r(I0){var c=I0._readableState;if(T("endReadable",c.endEmitted),!c.endEmitted)c.ended=!0,process.nextTick(Y0,c,I0)}function Y0(I0,c){if(T("endReadableNT",I0.endEmitted,I0.length),!I0.endEmitted&&I0.length===0){if(I0.endEmitted=!0,c.readable=!1,c.emit("end"),I0.autoDestroy){var s=c._writableState;if(!s||s.autoDestroy&&s.finished)c.destroy()}}}if(typeof Symbol==="function")Q.from=function(I0,c){if(Q0===void 0)Q0=Yt();return Q0(Q,I0,c)};function W0(I0,c){for(var s=0,S0=I0.length;s<S0;s++)if(I0[s]===c)return s;return-1}}),Fg=x1(($,I)=>{I.exports=M;var G=_X().codes,Z=G.ERR_METHOD_NOT_IMPLEMENTED,_=G.ERR_MULTIPLE_CALLBACK,J=G.ERR_TRANSFORM_ALREADY_TRANSFORMING,Y=G.ERR_TRANSFORM_WITH_LENGTH_0,W=_Y();IX()(M,W);function R(S,N){var B=this._transformState;B.transforming=!1;var x=B.writecb;if(x===null)return this.emit("error",new _);if(B.writechunk=null,B.writecb=null,N!=null)this.push(N);x(S);var w=this._readableState;if(w.reading=!1,w.needReadable||w.length<w.highWaterMark)this._read(w.highWaterMark)}function M(S){if(!(this instanceof M))return new M(S);if(W.call(this,S),this._transformState={afterTransform:R.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,S){if(typeof S.transform==="function")this._transform=S.transform;if(typeof S.flush==="function")this._flush=S.flush}this.on("prefinish",E)}function E(){var S=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(N,B){T(S,N,B)});else T(this,null,null)}M.prototype.push=function(S,N){return this._transformState.needTransform=!1,W.prototype.push.call(this,S,N)},M.prototype._transform=function(S,N,B){B(new Z("_transform()"))},M.prototype._write=function(S,N,B){var x=this._transformState;if(x.writecb=B,x.writechunk=S,x.writeencoding=N,!x.transforming){var w=this._readableState;if(x.needTransform||w.needReadable||w.length<w.highWaterMark)this._read(w.highWaterMark)}},M.prototype._read=function(S){var N=this._transformState;if(N.writechunk!==null&&!N.transforming)N.transforming=!0,this._transform(N.writechunk,N.writeencoding,N.afterTransform);else N.needTransform=!0},M.prototype._destroy=function(S,N){W.prototype._destroy.call(this,S,function(B){N(B)})};function T(S,N,B){if(N)return S.emit("error",N);if(B!=null)S.push(B);if(S._writableState.length)throw new Y;if(S._transformState.transforming)throw new J;return S.push(null)}}),Jt=x1(($,I)=>{I.exports=Z;var G=Fg();IX()(Z,G);function Z(_){if(!(this instanceof Z))return new Z(_);G.call(this,_)}Z.prototype._transform=function(_,J,Y){Y(null,_)}}),Qt=x1(($,I)=>{var G;function Z(B){var x=!1;return function(){if(x)return;x=!0,B.apply(void 0,arguments)}}var _=_X().codes,J=_.ERR_MISSING_ARGS,Y=_.ERR_STREAM_DESTROYED;function W(B){if(B)throw B}function R(B){return B.setHeader&&typeof B.abort==="function"}function M(B,x,w,y){y=Z(y);var g=!1;if(B.on("close",function(){g=!0}),G===void 0)G=VE();G(B,{readable:x,writable:w},function(l){if(l)return y(l);g=!0,y()});var b=!1;return function(l){if(g)return;if(b)return;if(b=!0,R(B))return B.abort();if(typeof B.destroy==="function")return B.destroy();y(l||new Y("pipe"))}}function E(B){B()}function T(B,x){return B.pipe(x)}function S(B){if(!B.length)return W;if(typeof B[B.length-1]!=="function")return W;return B.pop()}function N(){for(var B=arguments.length,x=Array(B),w=0;w<B;w++)x[w]=arguments[w];var y=S(x);if(Array.isArray(x[0]))x=x[0];if(x.length<2)throw new J("streams");var g,b=x.map(function(l,i){var $0=i<x.length-1,Q0=i>0;return M(l,$0,Q0,function(G0){if(!g)g=G0;if(G0)b.forEach(E);if($0)return;b.forEach(E),y(g)})});return x.reduce(T)}I.exports=N}),Tg=x1(($,I)=>{var G=w4();$=I.exports=Hg(),$.Stream=G||$,$.Readable=$,$.Writable=Wg(),$.Duplex=_Y(),$.Transform=Fg(),$.PassThrough=Jt(),$.finished=VE(),$.pipeline=Qt()}),Mg=x1(($)=>{var I=Lg(),G=IX(),Z=Tg(),_=$.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},J=$.IncomingMessage=function(Y,W,R,M){var E=this;if(Z.Readable.call(E),E._mode=R,E.headers={},E.rawHeaders=[],E.trailers={},E.rawTrailers=[],E.on("end",function(){process.nextTick(function(){E.emit("close")})}),R==="fetch"){let y=function(){N.read().then(function(g){if(E._destroyed)return;if(M(g.done),g.done){E.push(null);return}E.push(Buffer.from(g.value)),y()}).catch(function(g){if(M(!0),!E._destroyed)E.emit("error",g)})};var T=y;if(E._fetchResponse=W,E.url=W.url,E.statusCode=W.status,E.statusMessage=W.statusText,W.headers.forEach(function(g,b){E.headers[b.toLowerCase()]=g,E.rawHeaders.push(b,g)}),I.writableStream){var S=new WritableStream({write:function(g){return M(!1),new Promise(function(b,l){if(E._destroyed)l();else if(E.push(Buffer.from(g)))b();else E._resumeFetch=b})},close:function(){if(M(!0),!E._destroyed)E.push(null)},abort:function(g){if(M(!0),!E._destroyed)E.emit("error",g)}});try{W.body.pipeTo(S).catch(function(g){if(M(!0),!E._destroyed)E.emit("error",g)});return}catch(g){}}var N=W.body.getReader();y()}else{E._xhr=Y,E._pos=0,E.url=Y.responseURL,E.statusCode=Y.status,E.statusMessage=Y.statusText;var B=Y.getAllResponseHeaders().split(/\r?\n/);if(B.forEach(function(y){var g=y.match(/^([^:]+):\s*(.*)/);if(g){var b=g[1].toLowerCase();if(b==="set-cookie"){if(E.headers[b]===void 0)E.headers[b]=[];E.headers[b].push(g[2])}else if(E.headers[b]!==void 0)E.headers[b]+=", "+g[2];else E.headers[b]=g[2];E.rawHeaders.push(g[1],g[2])}}),E._charset="x-user-defined",!I.overrideMimeType){var x=E.rawHeaders["mime-type"];if(x){var w=x.match(/;\s*charset=([^;])(;|$)/);if(w)E._charset=w[1].toLowerCase()}if(!E._charset)E._charset="utf-8"}}};G(J,Z.Readable),J.prototype._read=function(){var Y=this,W=Y._resumeFetch;if(W)Y._resumeFetch=null,W()},J.prototype._onXHRProgress=function(Y){var W=this,R=W._xhr,M=null;switch(W._mode){case"text":if(M=R.responseText,M.length>W._pos){var E=M.substr(W._pos);if(W._charset==="x-user-defined"){var T=Buffer.alloc(E.length);for(var S=0;S<E.length;S++)T[S]=E.charCodeAt(S)&255;W.push(T)}else W.push(E,W._charset);W._pos=M.length}break;case"arraybuffer":if(R.readyState!==_.DONE||!R.response)break;M=R.response,W.push(Buffer.from(new Uint8Array(M)));break;case"moz-chunked-arraybuffer":if(M=R.response,R.readyState!==_.LOADING||!M)break;W.push(Buffer.from(new Uint8Array(M)));break;case"ms-stream":if(M=R.response,R.readyState!==_.LOADING)break;var N=new globalThis.MSStreamReader;N.onprogress=function(){if(N.result.byteLength>W._pos)W.push(Buffer.from(new Uint8Array(N.result.slice(W._pos)))),W._pos=N.result.byteLength},N.onload=function(){Y(!0),W.push(null)},N.readAsArrayBuffer(M);break}if(W._xhr.readyState===_.DONE&&W._mode!=="ms-stream")Y(!0),W.push(null)}}),zt=x1(($,I)=>{var G=Lg(),Z=IX(),_=Mg(),J=Tg(),Y=_.IncomingMessage,W=_.readyStates;function R(S,N){if(G.fetch&&N)return"fetch";else if(G.mozchunkedarraybuffer)return"moz-chunked-arraybuffer";else if(G.msstream)return"ms-stream";else if(G.arraybuffer&&S)return"arraybuffer";else return"text"}var M=I.exports=function(S){var N=this;if(J.Writable.call(N),N._opts=S,N._body=[],N._headers={},S.auth)N.setHeader("Authorization","Basic "+Buffer.from(S.auth).toString("base64"));Object.keys(S.headers).forEach(function(w){N.setHeader(w,S.headers[w])});var B,x=!0;if(S.mode==="disable-fetch"||"requestTimeout"in S&&!G.abortController)x=!1,B=!0;else if(S.mode==="prefer-streaming")B=!1;else if(S.mode==="allow-wrong-content-type")B=!G.overrideMimeType;else if(!S.mode||S.mode==="default"||S.mode==="prefer-fast")B=!0;else throw Error("Invalid value for opts.mode");N._mode=R(B,x),N._fetchTimer=null,N._socketTimeout=null,N._socketTimer=null,N.on("finish",function(){N._onFinish()})};Z(M,J.Writable),M.prototype.setHeader=function(S,N){var B=this,x=S.toLowerCase();if(T.indexOf(x)!==-1)return;B._headers[x]={name:S,value:N}},M.prototype.getHeader=function(S){var N=this._headers[S.toLowerCase()];if(N)return N.value;return null},M.prototype.removeHeader=function(S){var N=this;delete N._headers[S.toLowerCase()]},M.prototype._onFinish=function(){var S=this;if(S._destroyed)return;var N=S._opts;if("timeout"in N&&N.timeout!==0)S.setTimeout(N.timeout);var B=S._headers,x=null;if(N.method!=="GET"&&N.method!=="HEAD")x=new Blob(S._body,{type:(B["content-type"]||{}).value||""});var w=[];if(Object.keys(B).forEach(function(l){var i=B[l].name,$0=B[l].value;if(Array.isArray($0))$0.forEach(function(Q0){w.push([i,Q0])});else w.push([i,$0])}),S._mode==="fetch"){var y=null;if(G.abortController){var g=new AbortController;if(y=g.signal,S._fetchAbortController=g,"requestTimeout"in N&&N.requestTimeout!==0)S._fetchTimer=globalThis.setTimeout(function(){if(S.emit("requestTimeout"),S._fetchAbortController)S._fetchAbortController.abort()},N.requestTimeout)}globalThis.fetch(S._opts.url,{method:S._opts.method,headers:w,body:x||void 0,mode:"cors",credentials:N.withCredentials?"include":"same-origin",signal:y}).then(function(l){S._fetchResponse=l,S._resetTimers(!1),S._connect()},function(l){if(S._resetTimers(!0),!S._destroyed)S.emit("error",l)})}else{var b=S._xhr=new globalThis.XMLHttpRequest;try{b.open(S._opts.method,S._opts.url,!0)}catch(l){process.nextTick(function(){S.emit("error",l)});return}if("responseType"in b)b.responseType=S._mode;if("withCredentials"in b)b.withCredentials=!!N.withCredentials;if(S._mode==="text"&&"overrideMimeType"in b)b.overrideMimeType("text/plain; charset=x-user-defined");if("requestTimeout"in N)b.timeout=N.requestTimeout,b.ontimeout=function(){S.emit("requestTimeout")};if(w.forEach(function(l){b.setRequestHeader(l[0],l[1])}),S._response=null,b.onreadystatechange=function(){switch(b.readyState){case W.LOADING:case W.DONE:S._onXHRProgress();break}},S._mode==="moz-chunked-arraybuffer")b.onprogress=function(){S._onXHRProgress()};b.onerror=function(){if(S._destroyed)return;S._resetTimers(!0),S.emit("error",Error("XHR error"))};try{b.send(x)}catch(l){process.nextTick(function(){S.emit("error",l)});return}}};function E(S){try{var N=S.status;return N!==null&&N!==0}catch(B){return!1}}M.prototype._onXHRProgress=function(){var S=this;if(S._resetTimers(!1),!E(S._xhr)||S._destroyed)return;if(!S._response)S._connect();S._response._onXHRProgress(S._resetTimers.bind(S))},M.prototype._connect=function(){var S=this;if(S._destroyed)return;S._response=new Y(S._xhr,S._fetchResponse,S._mode,S._resetTimers.bind(S)),S._response.on("error",function(N){S.emit("error",N)}),S.emit("response",S._response)},M.prototype._write=function(S,N,B){var x=this;x._body.push(S),B()},M.prototype._resetTimers=function(S){var N=this;if(globalThis.clearTimeout(N._socketTimer),N._socketTimer=null,S)globalThis.clearTimeout(N._fetchTimer),N._fetchTimer=null;else if(N._socketTimeout)N._socketTimer=globalThis.setTimeout(function(){N.emit("timeout")},N._socketTimeout)},M.prototype.abort=M.prototype.destroy=function(S){var N=this;if(N._destroyed=!0,N._resetTimers(!0),N._response)N._response._destroyed=!0;if(N._xhr)N._xhr.abort();else if(N._fetchAbortController)N._fetchAbortController.abort();if(S)N.emit("error",S)},M.prototype.end=function(S,N,B){var x=this;if(typeof S==="function")B=S,S=void 0;J.Writable.prototype.end.call(x,S,N,B)},M.prototype.setTimeout=function(S,N){var B=this;if(N)B.once("timeout",N);B._socketTimeout=S,B._resetTimers(!1)},M.prototype.flushHeaders=function(){},M.prototype.setNoDelay=function(){},M.prototype.setSocketKeepAlive=function(){};var T=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}),Zt=x1(($,I)=>{I.exports=Z;var G=Object.prototype.hasOwnProperty;function Z(){var _={};for(var J=0;J<arguments.length;J++){var Y=arguments[J];for(var W in Y)if(G.call(Y,W))_[W]=Y[W]}return _}}),Ot=x1(($,I)=>{I.exports=(Xz(),V$(d5)).STATUS_CODES}),Lt=x1(($)=>{var I=zt(),G=Mg(),Z=Zt(),_=Ot(),J=(PE(),V$(RE)),Y=$;Y.request=function(W,R){if(typeof W==="string")W=J.parse(W);else W=Z(W);var M=globalThis.location.protocol.search(/^https?:$/)===-1?"http:":"",E=W.protocol||M,T=W.hostname||W.host,S=W.port,N=W.path||"/";if(T&&T.indexOf(":")!==-1)T="["+T+"]";W.url=(T?E+"//"+T:"")+(S?":"+S:"")+N,W.method=(W.method||"GET").toUpperCase(),W.headers=W.headers||{};var B=new I(W);if(R)B.on("response",R);return B},Y.get=function(W,R){var M=Y.request(W,R);return M.end(),M},Y.ClientRequest=I,Y.IncomingMessage=G.IncomingMessage,Y.Agent=function(){},Y.Agent.defaultMaxSockets=4,Y.globalAgent=new Y.Agent,Y.STATUS_CODES=_,Y.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}),Ag=$t(Lt(),1),{request:Dt,get:Kt,ClientRequest:Wt,IncomingMessage:Ht,Agent:Ft,globalAgent:Tt,STATUS_CODES:Mt,METHODS:At}=Ag.default,Eg=Ag.default});var Vg={};LU(Vg,{isIPv6:()=>vE,isIPv4:()=>SE,isIP:()=>Rg,default:()=>Pg});function SE($){return Et.test($)}function vE($){return Rt.test($)}function Rg($){if(SE($))return 4;if(vE($))return 6;return 0}var Et,Rt,Pg;var CE=WI(()=>{Et=new RegExp("^(?:(?: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])$"),Rt=new RegExp("^(?:(?:(?:[0-9a-fA-F]{1,4}):){7}(?:(?:[0-9a-fA-F]{1,4})|:)|(?:(?:[0-9a-fA-F]{1,4}):){6}(?:(?:(?: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])|:(?:[0-9a-fA-F]{1,4})|:)|(?:(?:[0-9a-fA-F]{1,4}):){5}(?::(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,2}|:)|(?:(?:[0-9a-fA-F]{1,4}):){4}(?:(?::(?:[0-9a-fA-F]{1,4})){0,1}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,3}|:)|(?:(?:[0-9a-fA-F]{1,4}):){3}(?:(?::(?:[0-9a-fA-F]{1,4})){0,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])|(?::(?:[0-9a-fA-F]{1,4})){1,4}|:)|(?:(?:[0-9a-fA-F]{1,4}):){2}(?:(?::(?:[0-9a-fA-F]{1,4})){0,3}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,5}|:)|(?:(?:[0-9a-fA-F]{1,4}):){1}(?:(?::(?:[0-9a-fA-F]{1,4})){0,4}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,6}|:)|(?::(?:(?::(?:[0-9a-fA-F]{1,4})){0,5}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,7}|:)))(?:%[0-9a-zA-Z-.:]{1,})?$");Pg={isIPv4:SE,isIPv6:vE,isIP:Rg}});var qg=N6((sQ0,pt)=>{pt.exports={"//":"GENERATED by scripts/pack-facts.ts — do not hand-edit. Compiled from each pack's `pack: TwinPack` descriptor; pack-facts.test.ts fails on drift.",packs:{ahrefs:{adoption:{pypi:[],sdks:["@ahrefs/mcp"],scopes:["@ahrefs/"],envStems:["AHREFS"]},hosts:[{host:"api.ahrefs.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["target","usage","cache","audit"],serveExport:"createAhrefsTwinServer"},"ai-gateway":{adoption:{pypi:[],sdks:["@ai-sdk/gateway"],envStems:["AIGATEWAY"]},hostsNone:"SDK is base-URL-configured (@ai-sdk/gateway baseURL / AI_GATEWAY_BASE_URL) — worlds wire the twin through explicit endpoint config; no injector entry grounded yet",archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["generation"],serveExport:"createAiGatewayTwinServer"},airtable:{adoption:{pypi:["pyairtable","airtable-python-wrapper"],sdks:["airtable"],envStems:["AIRTABLE"]},hosts:[{host:"api.airtable.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["base","table","record","comment"],endpointEnvNone:"the injector intercepts api.airtable.com (see `hosts`), which covers every client with no env at all; AIRTABLE_ENDPOINT_URL is real (Airtable.default_config(), airtable@0.12.2) but injecting it alongside interception is the strictly narrower answer — one wiring, not two.",serveExport:"createAirtableTwinServer"},algolia:{adoption:{pypi:["algoliasearch"],sdks:["algoliasearch"],envStems:["ALGOLIA","ALGOLIAWRITE"]},hostsNone:"per-app-ID host scheme ({appId}.algolia.net / {appId}-dsn.algolia.net / {appId}-N.algolianet.com, see the pack README §Host tolerance) — no fixed host list to match; the host-tolerant twin is wired by explicit client host config",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["index","record","synonym","settings"],serveExport:"createAlgoliaTwinServer"},anthropic:{adoption:{pypi:["anthropic","claude-agent-sdk","claude-code-sdk"],sdks:["@anthropic-ai/sdk","@ai-sdk/anthropic","@anthropic-ai/vertex-sdk","@anthropic-ai/bedrock-sdk","@anthropic-ai/claude-agent-sdk"],scopes:["@anthropic-ai/"],envStems:["ANTHROPIC","CLAUDE"]},hosts:[{host:"api.anthropic.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["message_batch","file","agent","environment","session","vault","vault_credential","memory_store","memory","memory_version","deployment","deployment_run","skill","webhook_secret"],serveExport:"createAnthropicTwinServer"},assemblyai:{adoption:{pypi:["assemblyai"],sdks:["assemblyai"],envStems:["ASSEMBLYAI"]},hosts:[{host:"api.assemblyai.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["transcript","upload"],serveExport:"createAssemblyAITwinServer"},aws:{adoption:{pypi:["boto3","botocore","aioboto3","aiobotocore"],sdks:["@aws-sdk/client-s3","@aws-sdk/s3-request-presigner","@aws-sdk/lib-storage","@aws-sdk/client-dynamodb","@aws-sdk/lib-dynamodb","@aws-sdk/client-timestream-write","@aws-sdk/client-timestream-query","aws-sdk","@aws-sdk/client-sesv2","@aws-sdk/client-secrets-manager","@aws-sdk/client-bedrock-runtime","@aws-sdk/client-bedrock","@ai-sdk/amazon-bedrock"],envStems:["AWS","S3","LANGFUSELLMCONNECTIONBEDROCK"],worldIds:["s3","dynamodb","timestream","timestreamwrite","timestreamquery","sesv2","secretsmanager","bedrock"]},hosts:[{key:"s3",host:"s3.amazonaws.com"},{key:"s3",suffix:".s3.amazonaws.com"},{key:"s3",hostPattern:"^s3[.-][a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",hostPattern:"\\.s3[.-][a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",hostPattern:"^s3\\.dualstack\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",hostPattern:"\\.s3\\.dualstack\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",suffix:".s3-accelerate.amazonaws.com"},{key:"s3",suffix:".s3-accelerate.dualstack.amazonaws.com"},{key:"dynamodb",hostPattern:"^dynamodb\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"timestream",hostPattern:"(^|\\.)(ingest|query)\\.timestream\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"sesv2",hostPattern:"^email\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"secretsmanager",hostPattern:"^secretsmanager(-fips)?\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"bedrock",hostPattern:"^bedrock(-runtime)?(-fips)?\\.[a-z0-9-]+\\.(amazonaws\\.com|api\\.aws)$"}],archetype:"signed-protocol",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{foundation_model:"the account catalog: pulled from ListFoundationModels, never created by a caller"},resources:["bucket","object","multipart_upload","table","item","database","record","message","secret","invocation","foundation_model","identity"],serveExport:"createAwsTwinServer"},axiom:{adoption:{sdks:["@axiomhq/js","@axiomhq/logging","@axiomhq/nextjs"],pypi:["axiom-py"],envStems:["AXIOM"]},hosts:[{host:"api.axiom.co"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["dataset","event"],endpointEnvNone:"no env var: @axiomhq/js reads its base URL only from the `url` constructor option (httpClient.ts:33,45) and Dub constructs `new Axiom({ token })` with none, so interception is the hosts entry above; an AXIOM_URL no client reads would be invented surface.",serveExport:"createAxiomTwinServer"},azure:{adoption:{pypi:["azure-storage-blob","azure-ai-inference"],sdks:["@azure/storage-blob","@azure/openai","@azure-rest/ai-inference","@ai-sdk/azure"],envStems:["AZURE","AZUREOPENAI","AZUREGPT4OMINI","AZUREGPT5","AZUREGPT5MINI","AZUREGPT5NANO"]},hosts:[{suffix:".blob.core.windows.net"},{suffix:".openai.azure.com"},{suffix:".cognitiveservices.azure.com",pathPattern:"^/openai/"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["container","blob","block","deployment"],endpointEnvNone:"Host-based interception only. @azure/storage-blob is configured with a blob endpoint URL or a connection string (both resolving to <account>.blob.core.windows.net, which the injector rewrites), and reads no base-URL environment variable of its own — the same reason the aws pack declares none.",serveExport:"createAzureTwinServer"},azureformrecognizer:{adoption:{pypi:["azure-ai-documentintelligence","azure-ai-formrecognizer"],sdks:["@azure-rest/ai-document-intelligence","@azure/ai-form-recognizer"],envStems:["AZUREFORMRECOGNIZER","AZUREDOCUMENTINTELLIGENCE"]},hosts:[{suffix:".cognitiveservices.azure.com",pathPattern:"^/(documentintelligence|formrecognizer)/"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"prebuilt models are the vendor's catalog; a custom model is born of a training job this twin does not run"},resources:["analysis","model"],serveExport:"createAzureFormRecognizerTwinServer"},bitly:{adoption:{pypi:[],envStems:["BITLY"]},hosts:[{host:"api-ssl.bitly.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["bitlink","group","organization","user","qr_code","campaign","channel","webhook","custom_bitlink","click"],endpointEnvNone:"no injector-free path: Bitly integrations hardcode https://api-ssl.bitly.com and the vendor documents no base-URL override, so interception is the hosts entry above; a BITLY_BASE_URL would be invented surface no app reads.",serveExport:"createBitlyTwinServer"},bluesky:{adoption:{sdks:["@atproto/api"],pypi:[],envStems:["BLUESKY","BSKY"]},hosts:[{host:"bsky.social",pathPattern:"^/xrpc/(com\\.atproto|app\\.bsky)\\."},{hostPattern:"^[a-z0-9-]+\\.[a-z0-9-]+\\.host\\.bsky\\.network$",pathPattern:"^/xrpc/(com\\.atproto|app\\.bsky)\\."},{host:"api.bsky.app",pathPattern:"^/xrpc/app\\.bsky\\.(actor|feed)\\."},{host:"public.api.bsky.app",pathPattern:"^/xrpc/app\\.bsky\\.(actor|feed)\\."},{host:"video.bsky.app",pathPattern:"^/(xrpc/app\\.bsky\\.video\\.|watch/)"},{host:"cdn.bsky.app",pathPattern:"^/img/"},{host:"bsky.app",pathPattern:"^/profile/[^/]+/?$|^/profile/[^/]+/post/[A-Za-z0-9._:~-]{1,512}/?$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["account","post","follow","profile"],endpointEnvNone:"@atproto/api reads no base-URL environment variable (an AtpAgent takes its `service` URL in code, and the video service's is the social-app's constant), so a World reaches it through the hosts above; inventing a BLUESKY_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createBlueskyTwinServer"},calcom:{adoption:{pypi:[],envStems:["CALCOM","CAL"]},hosts:[{host:"api.cal.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["booking","event_type","schedule","team","membership","webhook","slot"],serveExport:"createCalcomTwinServer"},cerebras:{adoption:{sdks:["@cerebras/cerebras_cloud_sdk","@ai-sdk/cerebras"],envStems:["CEREBRAS"]},hosts:[{host:"api.cerebras.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:[],endpointEnvNone:"The injector intercepts api.cerebras.ai (see `hosts`), so a world wires this pack through CEREBRAS_TWIN_URL rather than an app-read base-URL var. The SDK would honour CEREBRAS_BASE_URL, but the injector covers all of that traffic with zero app edits while an app-read env covers only clients constructed after the env lands — emitting both would quietly forgo interception.",serveExport:"createCerebrasTwinServer"},clerk:{adoption:{pypi:["clerk-backend-api"],sdks:["@clerk/backend","@clerk/clerk-sdk-node","@clerk/nextjs","@clerk/fastify","@clerk/express"],scopes:["@clerk/"],envStems:["CLERK"]},hosts:[{host:"api.clerk.com"},{suffix:".clerk.accounts.dev"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",assets:["client/clerk-js-dist","client/clerk.browser.js"],resources:["user","session","organization","organization_membership","organization_invitation","invitation","allowlist_identifier","blocklist_identifier","jwt_template","sign_in_token"],serveExport:"createClerkTwinServer"},cloudflare:{adoption:{pypi:["cloudflare"],tools:[{package:"wrangler",usage:"deployment"}],sdks:["cloudflare","aws4fetch"],envStems:["CLOUDFLARE"]},hosts:[{host:"api.cloudflare.com"},{host:"dash.cloudflare.com",pathPattern:"^/(login|_twin/users/|[0-9a-f]{32}/r2/|$)"},{suffix:".r2.cloudflarestorage.com"}],hostsClaimed:{door:"/twin/hosts",note:"the custom domains connected to R2 buckets"},archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["account","zone","cloudflare_tunnel","tunnel_configuration","dns_record","worker_script","worker_route","worker_domain","workers_subdomain","durable_object_namespace","r2_bucket","r2_custom_domain","hyperdrive_config","queue","queue_consumer","worker_version","worker_asset","worker_asset_upload_session"],serveExport:"createCloudflareTwinServer"},cohere:{adoption:{pypi:["cohere"],sdks:["cohere-ai","@ai-sdk/cohere"],envStems:["COHERE","CO"]},hosts:[{host:"api.cohere.com"},{host:"api.cohere.ai"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["dataset","connector","embed_job","token"],endpointEnvNone:"neither official SDK reads a base-URL env var: cohere-ai@8.1.0 takes the override as the `baseUrl`/`environment` CONSTRUCTOR option and reads only CO_API_KEY from the environment (auth/BearerAuthProvider.js), and @ai-sdk/cohere@4.0.35 takes `options.baseURL` and reads only COHERE_API_KEY. Interception is host-based on api.cohere.com and api.cohere.ai; inventing a COHERE_BASE_URL nothing reads would make `covers` claim a world it does not cover.",serveExport:"createCohereTwinServer"},currencyapi:{adoption:{sdks:["@everapi/currencyapi-js"],pypi:["currencyapicom"],envStems:["CURRENCYAPI"]},hosts:[{host:"api.currencyapi.com"},{host:"app.currencyapi.com",pathPattern:"^/(register|login|dashboard|subscription)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["_account","_api_key","_usage","_web_session"],endpointEnvNone:"currencyapi's clients hardcode https://api.currencyapi.com/v3 (@everapi/currencyapi-js index.js `baseUrl`, dubinc/dub apps/web/lib/currencyapi/client.ts `baseUrl`) and read no base-URL env; interception is the hosts above.",serveExport:"createCurrencyapiTwinServer"},daily:{adoption:{envStems:["DAILY"]},hosts:[{host:"api.daily.co"},{hostPattern:"^[a-z0-9][a-z0-9-]*\\.daily\\.co$"},{host:"c.daily.co",exclude:!0},{host:"gs.daily.co",exclude:!0},{host:"www.daily.co",exclude:!0},{host:"dashboard.daily.co",exclude:!0},{host:"docs.daily.co",exclude:!0},{host:"help.daily.co",exclude:!0},{host:"status.daily.co",exclude:!0},{host:"blog.daily.co",exclude:!0},{host:"pipecat.daily.co",exclude:!0},{host:"reference-python.daily.co",exclude:!0},{host:"reference-ios.daily.co",exclude:!0},{host:"reference-android.daily.co",exclude:!0}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["Room","Meeting","Recording","Transcript","BatchJob","Webhook","_domain","_delivery","_receiver"],endpointEnvNone:"Daily's REST clients hardcode https://api.daily.co/v1 (Cal.com packages/app-store/dailyvideo/lib/dailyApiFetcher.ts) and read no base-URL env; interception is the hosts above.",serveExport:"createDailyTwinServer"},datadog:{adoption:{pypi:["datadog","datadog-api-client","ddtrace"],sdks:["@datadog/datadog-api-client","@datadog/browser-rum","@datadog/browser-logs","dd-trace"],scopes:["@datadog/"],envStems:["DATADOG","DD"]},hosts:[{host:"datadoghq.com"},{suffix:".datadoghq.com"},{host:"datadoghq.eu"},{suffix:".datadoghq.eu"},{host:"ddog-gov.com"},{suffix:".ddog-gov.com"},{hostPattern:"^([a-z0-9-]+\\.)?browser-intake-(?:[a-z0-9]+-)?(?:datadoghq\\.(?:com|eu)|ddog-gov\\.com)$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["org","rum_application","rum_event","log","metric_series","metric_def","service_check","event","monitor","dashboard","host","slo","downtime","api_key","user"],serveExport:"createDatadogTwinServer"},deepgram:{adoption:{pypi:["deepgram-sdk"],sdks:["@deepgram/sdk"],envStems:["DEEPGRAM"]},hosts:[{host:"api.deepgram.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{project:"the tenant itself: born with the account, never created through the API"},resources:["project","key","request"],serveExport:"createDeepgramTwinServer"},deepinfra:{adoption:{sdks:["deepinfra","@ai-sdk/deepinfra"],envStems:["DEEPINFRA"]},hosts:[{host:"api.deepinfra.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog",rate_limit:"the account ledger the vendor keeps; read-only"},resources:["model","file","batch","rate_limit"],endpointEnvNone:"the deepinfra SDK exposes no base-URL env: DeepInfraClient takes the endpoint URL as a constructor argument (the modelName IS the full URL) and reads only DEEPINFRA_API_KEY; interception is the hosts above.",serveExport:"createDeepinfraTwinServer"},deepseek:{adoption:{pypi:[],sdks:["@ai-sdk/deepseek"],envStems:["DEEPSEEK"]},hosts:[{host:"api.deepseek.com"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog",balance:"the account ledger the vendor keeps; read-only"},resources:["model","file","balance","cache_prefix"],endpointEnvNone:"no app-read endpoint env: @ai-sdk/deepseek — the only first-party npm client of this surface — reads exactly one environment variable (DEEPSEEK_API_KEY, via loadApiKey in src/deepseek-provider.ts) and takes baseURL as a constructor option, so there is no vendor-documented base-URL var to inject. The injector covers api.deepseek.com instead (see `hosts`). NextChat's DEEPSEEK_URL is one application's own convention, not vendor surface, and claiming it would report a world covered while the SDK-based majority still reached the real vendor.",serveExport:"createDeepSeekTwinServer"},discord:{adoption:{sdks:["discord.js","@discordjs/rest","@discordjs/core","@discordjs/builders","discord-api-types"],pypi:["discord.py","discord"],envStems:["DISCORD"]},hosts:[{host:"discord.com",pathPattern:"^/api/"},{host:"discord.com",pathPattern:"^/(oauth2/authorize|login)/?$"},{host:"gateway.discord.gg"},{host:"discordapp.com",pathPattern:"^/api/"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["application","application_command","ban","channel","guild","interaction_response","invite","member","message","oauth_grant","role","user","webhook"],endpointEnvNone:"no Discord client reads a base-URL env var — discord.js takes `api` as a REST constructor option and discord.py hardcodes its Route base, so interception is the `hosts` entries above. Inventing a DISCORD_BASE_URL would report coverage the app could not use.",serveExport:"createDiscordTwinServer"},dynadot:{adoption:{pypi:[],envStems:["DYNADOT"]},hosts:[{host:"api.dynadot.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["domain","account"],serveExport:"createDynadotTwinServer"},elevenlabs:{adoption:{pypi:["elevenlabs"],sdks:["elevenlabs","@elevenlabs/elevenlabs-js"],scopes:["@elevenlabs/"],envStems:["ELEVENLABS"]},hosts:[{host:"api.elevenlabs.io"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["voice","generated_voice","pronunciation_dictionary","dubbing","history_item"],serveExport:"createElevenLabsTwinServer"},expo:{adoption:{sdks:["expo-server-sdk"],pypi:["exponent-server-sdk"],envStems:["EXPO"]},hosts:[{host:"exp.host"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["push_device","push_ticket"],endpointEnvNone:"expo-server-sdk-node DOES read EXPO_BASE_URL (src/ExpoClientValues.ts builds both push URLs from process.env['EXPO_BASE_URL'] || 'https://exp.host'), but this pack claims exp.host in `hosts`, so interception is host-based and zero-edit; emitting the var would forgo that. Point EXPO_BASE_URL at the twin by hand only when running outside an injected world.",serveExport:"createExpoTwinServer"},fal:{adoption:{pypi:["fal-client","fal"],sdks:["@fal-ai/client","@fal-ai/serverless-client"],scopes:["@fal-ai/"],envStems:["FAL"]},hostsNone:"host-split surface (fal.run / queue.fal.run) with no injector entry grounded yet — worlds wire the twin via the client's explicit endpoint config; a visible gap until its hosts are grounded here",archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["request","signing_key"],serveExport:"createFalTwinServer"},figma:{adoption:{pypi:[],sdks:["figma-api","@figma/rest-api-spec"],scopes:["@figma/"],envStems:["FIGMA"]},hostsNone:'no injector entry grounded yet — the pack README wires clients at the twin by base URL ("nothing changed but the base URL"); zero-edit interception of api.figma.com is a visible gap until grounded here',archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["file","comment","version","project","team","user","credential"],serveExport:"createFigmaTwinServer"},firecrawl:{adoption:{pypi:["firecrawl-py","firecrawl"],sdks:["@mendable/firecrawl-js","firecrawl"],scopes:["@mendable/"],envStems:["FIRECRAWL","S2SFIRECRAWLINTEGRATIONSTOFIRECRAWL"]},hosts:[{host:"api.firecrawl.dev"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["document","crawl","audit"],serveExport:"createFirecrawlTwinServer"},fireworks:{adoption:{pypi:["fireworks-ai"],sdks:["@ai-sdk/fireworks"],envStems:["FIREWORKS"]},hosts:[{host:"api.fireworks.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{account:"the vendor’s own account row (one per credential, not creatable through the API)",quota:"vendor-assigned limits (read-only in the API; the twin derives them from the account)",serverlessModel:"the vendor catalog (serverless models are curated by Fireworks, not created by callers)"},resources:["deployment","dataset","batchInferenceJob","supervisedFineTuningJob","user","apiKey","secret","model"],endpointEnvNone:"The injector intercepts api.fireworks.ai (see `hosts`), so a world wires this pack through FIREWORKS_TWIN_URL rather than an app-read base-URL var. The `fireworks` Python client would honour FIREWORKS_BASE_URL, but @ai-sdk/fireworks — the dominant client in this repo’s demand census — takes its baseURL as a constructor option and reads no such env, so an app-read var would cover only half the traffic while disabling the interception that covers all of it.",serveExport:"createFireworksTwinServer"},fly:{adoption:{pypi:[],sdks:["fly-admin"],envStems:["FLY"]},hosts:[{host:"api.machines.dev"},{host:"_api.internal"}],archetype:"engine-control",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["app","machine","volume","secret"],serveExport:"createFlyTwinServer"},gcs:{adoption:{pypi:["google-cloud-storage"],sdks:["@google-cloud/storage"],envStems:["GCS","GOOGLECLOUDSTORAGE"]},hosts:[{host:"storage.googleapis.com"},{suffix:".storage.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["bucket","object","upload"],serveExport:"createGcsTwinServer"},gemini:{adoption:{pypi:["google-genai","google-generativeai"],sdks:["@ai-sdk/google","@ai-sdk/google-vertex","@google/genai","@google/generative-ai","@google-cloud/vertexai"],envStems:["GEMINI","GOOGLEGENAI","GOOGLEGENERATIVEAI","GOOGLEGEMINI","GOOGLEVERTEX"],worldIds:["googlegenai","googleauth"]},hosts:[{host:"generativelanguage.googleapis.com"},{host:"aiplatform.googleapis.com"},{suffix:"-aiplatform.googleapis.com"},{key:"googleauth",host:"oauth2.googleapis.com"},{key:"googleauth",host:"www.googleapis.com",pathPattern:"^/(token|oauth2/v4/token)/?$"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["file","cached_content"],serveExport:"createGeminiTwinServer"},github:{adoption:{pypi:["pygithub"],sdks:["@octokit/rest","@octokit/core","octokit","@octokit/auth-app","@octokit/auth-oauth-app","@octokit/auth-oauth-device","@octokit/graphql","@octokit/webhooks"],scopes:["@octokit/"],envStems:["GITHUB","GH","BACKENDGITHUB","INFAPPCONNECTIONGITHUBAPP","INFAPPCONNECTIONGITHUBOAUTH","INFAPPCONNECTIONGITHUBRADARAPP","APPSMITHOAUTH2GITHUB"]},hosts:[{host:"api.github.com"},{host:"uploads.github.com",pathPattern:"^/repos/[^/]+/[^/]+/releases/\\d+/assets$"},{host:"github.com",pathPattern:"^/[^/]+/[^/]+/(info/refs|git-upload-pack|git-receive-pack)$"},{host:"github.com",pathPattern:"^/login/oauth/(authorize|access_token)$"},{host:"github.com",pathPattern:"^/(login|session|sessions/two-factor(/app)?)$"},{host:"github.com",pathPattern:"^/apps/[^/]+/installations/new$"},{host:"github.com",pathPattern:"^/(organizations/[^/]+/)?settings/apps/new$"},{host:"npm.pkg.github.com",pathPattern:"^/@"}],archetype:"engine-control",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["pull_request","pull_request_review","pull_request_review_comment","issue","issue_comment","repository","branch","git_ref"],serveExport:"createGithubTwinServer"},googleads:{adoption:{sdks:["google-ads-api","google-ads-node"],pypi:["google-ads"],envStems:["GOOGLEADS","GOOGLEADSDEVELOPER"]},hosts:[{host:"googleads.googleapis.com"},{host:"datamanager.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["customer","customer_client_link","conversion_action","click_conversion","ingest_request"],endpointEnvNone:"no Google Ads client exposes an HTTP base-URL override: google-ads-api builds the host into the request literally, google-ads-python's `endpoint` is a gRPC host:port for its transport channel, and Dub hardcodes the host in a raw fetch. Interception is host-based.",serveExport:"createGoogleAdsTwinServer"},googlecalendar:{adoption:{sdks:["@googleapis/calendar"],pypi:[],envStems:["GOOGLECALENDAR"]},hosts:[{host:"www.googleapis.com",pathPattern:"^/(batch/)?calendar/v3(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["Calendar","CalendarListEntry","Event"],endpointEnvNone:"@googleapis/calendar and googleapis read no base-URL variable: the root URL is the Discovery document's `https://www.googleapis.com/` unless the caller passes `rootUrl` (Inbox Zero reads its own GOOGLE_BASE_URL for that); interception is the host rule above.",serveExport:"createGooglecalendarTwinServer"},googlemaps:{adoption:{pypi:["googlemaps"],sdks:["@googlemaps/google-maps-services-js"],scopes:["@googlemaps/"],envStems:["GOOGLEMAPS"]},hosts:[{host:"maps.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["geocode","audit"],serveExport:"createGoogleMapsTwinServer"},googleoauth:{adoption:{pypi:["google-auth","google-auth-oauthlib"],sdks:["google-auth-library","@googleapis/oauth2"],envStems:["GOOGLE","GOOGLEOAUTH","GOOGLEOIDC","AUTHGOOGLE","AUTHGOOGLEOAUTH2","BACKENDGOOGLE","GOOGLEIOS","GOOGLELOGIN","GOOGLEWEB","NEXTPRIVATEGOOGLE","SSOGOOGLEOAUTH2","APPSMITHOAUTH2GOOGLE"]},archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","auth_request","authorization_code","access_token","refresh_token","grant"],serveExport:"createGoogleOAuthTwinServer"},groq:{adoption:{pypi:["groq"],sdks:["groq-sdk","@ai-sdk/groq"],envStems:["GROQ"]},hosts:[{host:"api.groq.com"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog"},resources:["file","batch","model"],endpointEnvNone:"The injector intercepts api.groq.com (see `hosts`), so a world wires this pack through GROQ_TWIN_URL rather than an app-read base-URL var. groq-sdk would honour GROQ_BASE_URL, but @ai-sdk/groq — the dominant client in this repo's demand census — takes its baseURL as a constructor option and reads no such env, so an app-read var would cover only half the traffic while disabling the interception that covers all of it.",serveExport:"createGroqTwinServer"},hubspot:{adoption:{pypi:["hubspot-api-client"],sdks:["@hubspot/api-client"],envStems:["HUBSPOT","HUBSPOTPRIVATEAPP"]},hosts:[{host:"api.hubapi.com"},{host:"app.hubspot.com"},{host:"api.hsforms.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{owner:"a portal user provisioned in HubSpot's admin, never through the CRM API"},resources:["crm_object","property","property_group","pipeline","association","owner"],endpointEnvNone:"the @hubspot/api-client SDK takes its base URL from the `basePath` CONSTRUCTOR option (IConfiguration.basePath → ApiClientConfigurator.getBaseServer), not from any environment variable — it reads no process.env at all, and HubSpot documents no base-URL env var. Interception is the api.hubapi.com host entry; inventing a HUBSPOT_BASE_URL the app does not read would report a world covered while its traffic still left the machine.",serveExport:"createHubspotTwinServer"},inngest:{adoption:{pypi:["inngest"],sdks:["inngest"],envStems:["INNGEST"]},hostsNone:"SDK is base-URL-configured by design (options.baseUrl / INNGEST_BASE_URL / INNGEST_EVENT_API_BASE_URL, verified in the pack README) — worlds wire the twin through those vars",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["event","function","run","step","signing_key"],endpointEnv:{name:"INNGEST_BASE_URL",templates:{INNGEST_EVENT_API_BASE_URL:"${url}"},note:"no injector entry: the inngest SDK is base-URL-configured through INNGEST_BASE_URL / INNGEST_EVENT_API_BASE_URL."},serveExport:"createInngestTwinServer"},instagram:{adoption:{envStems:["INSTAGRAM"]},hosts:[{host:"graph.facebook.com",pathPattern:"^(?:/v\\d+\\.\\d+)?/(?:me|\\d{1,25})(?:/(?:media|media_publish|content_publishing_limit))?/?$|^/_twin/"},{host:"graph.instagram.com",pathPattern:"^(?:/v\\d+\\.\\d+)?/(?:me|\\d{1,25})(?:/(?:media|media_publish|content_publishing_limit))?/?$|^/_twin/"},{host:"rupload.facebook.com",pathPattern:"^/ig-api-upload/"},{host:"scontent.cdninstagram.com",pathPattern:"^/(?:o1/v/t16/f2/m86/|v/t51\\.(?:71878-15|2885-19)/)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["ig_user","media"],endpointEnvNone:"Meta ships no Instagram Platform client that reads a base-URL environment variable: apps call https://graph.facebook.com/<version>/… and the rupload host by constant, so a World reaches them through the hosts above; inventing an INSTAGRAM_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createInstagramTwinServer"},intercom:{adoption:{pypi:["python-intercom"],sdks:["intercom-client"],envStems:["INTERCOM"]},hosts:[{host:"api.intercom.io"},{host:"api.eu.intercom.io"},{host:"api.au.intercom.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["contact","conversation","message","event","data_attribute","admin","tag","note","company","segment"],serveExport:"createIntercomTwinServer"},jira:{adoption:{pypi:["jira"],sdks:["jira.js"],envStems:["JIRA","ATLASSIAN"]},hosts:[{host:"atlassian.net"},{suffix:".atlassian.net"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{oauthtoken:"issued by Atlassian's OAuth authorization server, outside the REST API"},resources:["person","issue","comment","issuelink","attachment","worklog","watcher","vote","project","component","version","sprint","filter","dashboard","gadget","webhook","oauthtoken"],serveExport:"createJiraTwinServer"},langfuse:{adoption:{pypi:["langfuse"],sdks:["langfuse","langfuse-node"],envStems:["LANGFUSE"]},hosts:[{host:"cloud.langfuse.com"},{host:"us.cloud.langfuse.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["project","api_key","trace","observation","session","score","score_config","prompt","dataset","dataset_item","dataset_run","dataset_run_item","model","comment","annotation_queue","annotation_queue_item","media","llm_connection","ingestion_event"],serveExport:"createLangfuseTwinServer"},linear:{adoption:{pypi:[],sdks:["@linear/sdk"],scopes:["@linear/"],envStems:["LINEAR"]},hosts:[{host:"api.linear.app"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"graphql",resourcesUnreachable:{project:"born of the vendor's projectCreate mutation, which this twin does not model yet — pulled only",cycle:"born of the vendor's cycleCreate mutation, which this twin does not model yet — pulled only",user:"a workspace member, born of an invite flow outside the API",workflowState:"born with the team's workflow; the API reads them"},resources:["issue","team","project","cycle","user","label","workflowState","comment","notification"],serveExport:"createDerivedLinearTwinServer"},linkedin:{adoption:{sdks:["linkedin-api-client"],pypi:["linkedin-api-client"],envStems:["LINKEDIN"]},hosts:[{host:"api.linkedin.com",pathPattern:"^(?:/rest/(?:posts|images|videos|organizationAcls|organizations|organizationsLookup|networkSizes)(?:/[^/]+)?/?|/v2/userinfo/?)$|^/_twin/"},{host:"www.linkedin.com",pathPattern:"^/dms-uploads/"},{host:"media.licdn.com",pathPattern:"^/dms/image/"},{host:"dms.licdn.com",pathPattern:"^/playlist/"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["organization","member","organization_acl","token","post"],endpointEnvNone:"linkedin-api-client takes no base-URL environment variable (its RestliClient builds https://api.linkedin.com/rest URLs from a constant), so a World reaches it through the hosts above; inventing a LINKEDIN_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createLinkedinTwinServer"},livekit:{adoption:{pypi:["livekit-api","livekit","livekit-agents"],sdks:["livekit-server-sdk","@livekit/rtc-node"],scopes:["@livekit/"],envStems:["LIVEKIT"]},hostsNone:"real local media plane (livekit-server) exposed via app-read env (LIVEKIT_URL is ws:// — WebSocket media is outside the HTTP injector's reach)",archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["room","participant","egress","ingress","sip_inbound_trunk","sip_outbound_trunk","sip_dispatch_rule","sip_participant","agent_dispatch"],serveExport:"createLiveKitTwinServer"},mailgun:{adoption:{pypi:["mailgun"],sdks:["mailgun.js"],envStems:["MAILGUN"]},hosts:[{host:"api.mailgun.net"},{host:"api.eu.mailgun.net"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["domain","message","event","bounce","complaint","unsubscribe","whitelist","webhook","route","mailing_list","list_member","template","template_version","api_key","tag","account"],endpointEnvNone:"the mailgun.js SDK reads no environment variable of its own — verified in the shipped v14.0.0 bundle: `MAILGUN` occurs zero times, and every `process.env` hit belongs to bundled axios (proxy vars) or `debug` (DEBUG). The base URL is the constructor `url` option, so no app-read endpoint env exists to inject; redirection is via the `hosts` injector entries.",serveExport:"createMailgunTwinServer"},mapbox:{adoption:{pypi:["mapbox"],sdks:["@mapbox/mapbox-sdk"],scopes:["@mapbox/"],envStems:["MAPBOX"]},hosts:[{host:"api.mapbox.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["geocode","dataset","dsfeature","style","token","tileset","upload"],serveExport:"createMapboxTwinServer"},mistral:{adoption:{pypi:["mistralai"],sdks:["@mistralai/mistralai","@ai-sdk/mistral"],envStems:["MISTRAL"]},hosts:[{host:"api.mistral.ai"},{host:"api.eu.mistral.ai"},{host:"api.us.mistral.ai"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["file","batch_job","agent","conversation","conversation_entry"],serveExport:"createMistralTwinServer"},mixpanel:{adoption:{pypi:["mixpanel"],sdks:["mixpanel","mixpanel-browser"]},hosts:[{host:"api.mixpanel.com"},{host:"api-eu.mixpanel.com"},{host:"api-in.mixpanel.com"},{host:"api-js.mixpanel.com"},{host:"data.mixpanel.com"},{host:"data-eu.mixpanel.com"},{host:"data-in.mixpanel.com"},{host:"mixpanel.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["event","profile","identity","alias"],serveExport:"createMixpanelTwinServer"},mongodb:{adoption:{pypi:[],sdks:[]},hostsNone:"RAW-PROTOCOL pack — there is no host to map. MongoDB clients speak the wire protocol over a raw TCP socket to whatever host the connection string names, which the injector (http/fetch patching) cannot see; a World reaches this twin through the connection string itself (MONGO_URI and its kin), which World-managed infrastructure injects.",archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"raw-tcp",resources:["collection","index","document"],endpointEnvNone:"no vendor base-URL variable: the application reads its own connection-string variable (MONGO_URI, MONGODB_URL, DATABASE_URL, …), and World-managed infrastructure (`volter-world init` → `volter-world-infra`) injects that variable pointing at this twin's listener.",serveExport:"createMongodbTwinServer"},moonshot:{adoption:{pypi:[],sdks:[],envStems:["MOONSHOT"]},hosts:[{host:"api.moonshot.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog",balance:"the account ledger the vendor keeps; read-only"},resources:["file","batch","balance","model"],endpointEnvNone:"Moonshot ships no SDK of its own; its documented clients (the standard openai/anthropic SDKs) take their base URL as a constructor option and read no MOONSHOT_BASE_URL env, so an app-read var would cover only env-configured callers while disabling the api.moonshot.ai interception that covers all traffic.",serveExport:"createMoonshotTwinServer"},notion:{adoption:{pypi:["notion-client"],sdks:["@notionhq/client"],scopes:["@notionhq/"],envStems:["NOTION"]},hostsNone:"no injector entry grounded yet — worlds point @notionhq/client at the twin via its baseUrl option; zero-edit interception of api.notion.com is a visible gap until grounded here",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{user:"a workspace member, born of the workspace admin, read-only through the API"},resources:["page","block","database","comment","user","webhook"],serveExport:"createNotionTwinServer"},"npm-registry":{adoption:{pypi:[],envStems:["NPM"]},hosts:[{host:"registry.npmjs.org"},{host:"npm.pkg.github.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["package","tarball","advisory"],serveExport:"createNpmRegistryTwinServer"},"oa-treasury":{adoption:{pypi:[],envStems:["MODELPROXY","MODELPROXYADMIN","AGENTPROXY","AGENTPROXYADMIN","AGENTPROXYHMAC"]},hosts:[{hostPattern:"^volter-agent-model-proxy\\.[a-z0-9.-]+\\.workers\\.dev$"},{host:"open-autonomy.org"},{host:"www.open-autonomy.org"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["account","supplier","coupon","reserve","run","rail"],serveExport:"createOaTreasuryTwinServer"},openai:{adoption:{pypi:["openai","openai-agents"],sdks:["openai","@ai-sdk/openai"],envStems:["OPENAI","APOPENAI","OPENAIMODERATION","REWORKDPLATFORMOPENAI"]},hosts:[{host:"api.openai.com"},{host:"platform.openai.com",pathPattern:"^/(settings/proj[-_][^/]+/api-keys|login$)"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["file","batch","fine_tuning_job","vector_store","vector_store_file","response","chat_completion"],serveExport:"createOpenAITwinServer"},openrouter:{adoption:{pypi:["openrouter"],sdks:["@openrouter/ai-sdk-provider"],scopes:["@openrouter/"],envStems:["OPENROUTER","OR"]},hosts:[{host:"openrouter.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["generation","api_key","byok","preset"],serveExport:"createOpenRouterTwinServer"},openweather:{adoption:{pypi:["pyowm"],sdks:["openweather-api-node"],envStems:["OPENWEATHER","OPENWEATHERMAP"]},hosts:[{host:"api.openweathermap.org"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["observation","audit"],serveExport:"createOpenWeatherTwinServer"},paypal:{adoption:{sdks:["paypal-rest-sdk"],pypi:["paypalrestsdk"],envStems:["PAYPAL"]},hosts:[{host:"api.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"api-m.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"api.sandbox.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"api-m.sandbox.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"www.paypal.com",pathPattern:"^/signin/authorize/?$|^/connect/?$|^/webapps/auth/protocol/openidconnect/|^/_twin/"},{host:"www.sandbox.paypal.com",pathPattern:"^/signin/authorize/?$|^/connect/?$|^/webapps/auth/protocol/openidconnect/|^/_twin/"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","session","auth_request","authorization_code","access_token","refresh_token","payout_batch","payout_item","webhook","webhook_event"],endpointEnvNone:"no PayPal client reads a base-URL env var — paypal-rest-sdk takes mode: sandbox|live, the current @paypal server SDK takes an Environment enum, and the motivating app computes its host from NODE_ENV — so interception is the host entries above.",serveExport:"createPaypalTwinServer"},perplexity:{adoption:{pypi:["perplexityai"],sdks:["@ai-sdk/perplexity"],envStems:["PERPLEXITY"]},hosts:[{host:"api.perplexity.ai"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["async_request"],endpointEnvNone:"@ai-sdk/perplexity — the dominant client in the 2026-08-31-b demand census — takes its baseURL as a constructor option and reads NO base-URL environment variable (perplexity-provider.ts: `withoutTrailingSlash(options.baseURL ?? 'https://api.perplexity.ai')`, and `loadApiKey` reads only PERPLEXITY_API_KEY). Perplexity documents no base-URL env var for any client, so there is nothing to inject; a fabricated PERPLEXITY_BASE_URL would let `covers` call a world covered while the app kept calling api.perplexity.ai. The injector intercepts that host (see `hosts`) instead.",serveExport:"createPerplexityTwinServer"},pinecone:{adoption:{pypi:["pinecone","pinecone-client"],sdks:["@pinecone-database/pinecone"],scopes:["@pinecone-database/"],envStems:["PINECONE"]},hostsNone:"control/data host split with per-index data-plane hostnames ({index}-{project}.svc.{env}.pinecone.io, see the pack README) — SDK is pointed at the twin by explicit host config",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["index","collection","vector"],serveExport:"createPineconeTwinServer"},plain:{adoption:{pypi:[],sdks:["@team-plain/typescript-sdk"],scopes:["@team-plain/"],envStems:["PLAIN","NEXTPRIVATEPLAIN"]},hosts:[{host:"core-api.uk.plain.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"graphql",resourcesUnreachable:{company:"born of the vendor's createCompany mutation, which this twin does not model (no manifest entry) — pulled only",customerGroup:"born of createCustomerGroup, filed as todo plain.customergroups.op_create — pulled only",customerGroupMembership:"born of addCustomerToCustomerGroups over a group the twin cannot create yet — pulled only",workspace:"the tenant itself",user:"a workspace member, born of an invite",machineUser:"born in the workspace settings UI"},resources:["workspace","user","machineUser","customer","company","tenant","customerGroup","customerGroupMembership","thread","label","labelType","threadField","timelineEntry","note","customerEvent","webhookTarget","attachment"],serveExport:"createPlainTwinServer"},planetscale:{adoption:{pypi:[],sdks:["@planetscale/database"],envStems:["PLANETSCALE"]},hosts:[{suffix:".psdb.cloud"},{host:"api.planetscale.com",pathPattern:"^/v1/organizations(/|$)"},{host:"app.planetscale.com",pathPattern:"^/(sign-in|[^/]+/settings/service-tokens)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",nativeTransport:{protocol:"mysql",flag:"--mysql",upstreamEnv:"PLANETSCALE_TWIN_URL"},resources:["table","row","_session","_backup"],endpointEnv:{name:"PLANETSCALE_TWIN_URL",templates:{PLANETSCALE_DATABASE_URL:"http://twin:twin@${host}:${port}"},note:"the @planetscale/database client reads PLANETSCALE_DATABASE_URL and honours http:; the injector also redirects *.psdb.cloud."},prismaAdapter:{adapter:"@prisma/adapter-planetscale",export:"PrismaPlanetScale",urlEnv:"PLANETSCALE_DATABASE_URL"},serveExport:"createPlanetscaleTwinServer"},polar:{adoption:{pypi:["polar-sdk"],sdks:["@polar-sh/sdk"],scopes:["@polar-sh/"],envStems:["POLAR"]},hosts:[{host:"api.polar.sh"},{host:"sandbox-api.polar.sh"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["customer","product","subscription","order","checkout","benefit","discount","meter","event","customer_session","webhook_endpoint"],serveExport:"createPolarTwinServer"},posthog:{adoption:{pypi:["posthog"],sdks:["posthog-node","posthog-js","@posthog/api-client","@posthog/react"],envStems:["POSTHOG","POSTHOGANALYTICS","POSTHOGPERSONAL","POSTHOGPROJECT","POSTHOGPUBLIC"]},hosts:[{host:"app.posthog.com"},{host:"us.posthog.com"},{host:"eu.posthog.com"},{suffix:".i.posthog.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["project","event","person","feature_flag","insight","cohort","experiment","annotation","dashboard","action","group","org_member","early_access_feature","event_definition","property_definition"],serveExport:"createPosthogTwinServer"},postmark:{adoption:{pypi:["postmarker"],sdks:["postmark"],envStems:["POSTMARK"]},hosts:[{host:"api.postmarkapp.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["message","bounce","template","message_stream","webhook","suppression","server","domain","sender_signature","inbound_rule"],serveExport:"createPostmarkTwinServer"},reddit:{adoption:{sdks:["snoowrap"],pypi:[],envStems:["REDDIT"]},hosts:[{host:"oauth.reddit.com",pathPattern:"^/(?:api/v1/me|api/submit|api/del|api/comment|api/info|api/media/asset|by_id/[^/]+|r/[^/]+/(?:about|new|api/info)|user/[^/]+/(?:about|submitted)|subreddits/mine/(?:moderator|contributor)|(?:r/[^/]+/)?comments/[a-z0-9]+(?:/[^/]*)?)(?:\\.json)?/?$|^/_twin/"},{host:"www.reddit.com",pathPattern:"^/api/v1/access_token$"},{host:"reddit-uploaded-media.s3-accelerate.amazonaws.com"},{host:"v.redd.it",pathPattern:"^/[a-z0-9]{13}/DASH_\\d{2,4}\\.mp4$"},{host:"preview.redd.it",pathPattern:"^/[a-z0-9]{13}\\.(?:png|jpg|gif)$"},{host:"i.redd.it",pathPattern:"^/[a-z0-9]{13}\\.(?:png|jpg|gif)$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["user","subreddit","link","comment"],endpointEnvNone:"reddit clients take no base-URL environment variable (snoowrap and PRAW build https://oauth.reddit.com and https://www.reddit.com URLs from constants or explicit constructor options), so a World reaches them through the hosts above; inventing a REDDIT_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createRedditTwinServer"},redis:{adoption:{},hostsNone:"RAW-PROTOCOL pack — there is no host to map. Redis's protocol runs over a TCP socket the injector (which patches http/fetch) never sees, and a Redis has no vendor hostname: it is wherever the app's REDIS_URL points. The World points it here: init classifies REDIS_URL as managed infrastructure and the managed redis service is this twin.",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"raw-tcp",resources:["key","field","member","scored","entry","script"],endpointEnvNone:"Redis clients read no base-URL env of their own: the app passes its REDIS_URL (or host/port) to ioredis or node-redis itself, and init emits that REDIS_URL for the managed redis service (world-runtime/src/init.ts), not as a twin endpoint env.",serveExport:"createRedisTwinServer"},replicate:{adoption:{pypi:["replicate"],sdks:["replicate","@ai-sdk/replicate"],envStems:["REPLICATE","REWORKDPLATFORMREPLICATE"]},hostsNone:"no injector entry grounded yet — worlds wire the twin via the SDK's explicit baseUrl config; zero-edit interception of api.replicate.com is a visible gap until its hosts are grounded here",archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{model_version:"born of `cog push`, never of the HTTP API; pulled"},resources:["prediction","model","model_version","webhook_secret"],serveExport:"createReplicateTwinServer"},resend:{adoption:{pypi:["resend"],sdks:["resend"],envStems:["RESEND","NEXTPRIVATERESEND"]},hosts:[{host:"api.resend.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["email","audience","contact","domain","api_key"],serveExport:"createResendTwinServer"},runhuman:{adoption:{sdks:["runhuman"]},hosts:[{host:"runhuman.com",pathPattern:"^/api/"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["organization","project","api_key","user","tester_profile","job","pipeline_run"],endpointEnv:{name:"RUNHUMAN_API_URL",note:"grounded in volter-ai/runhuman packages/cli/src/lib/config.ts, which overrides the CLI apiUrl from RUNHUMAN_API_URL; RH2 reads its human-marketplace base URL from the provider row spec.url instead, which a rehearsal World sets to this same twin URL."},serveExport:"createRunhumanTwinServer"},scrapecreators:{adoption:{pypi:[],sdks:["@scrapecreators/cli"],envStems:["SCRAPECREATORS"]},hosts:[{host:"api.scrapecreators.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["profile","content","cache","account","usage"],serveExport:"createScrapeCreatorsTwinServer"},segment:{adoption:{pypi:["segment-analytics-python","analytics-python"],sdks:["@segment/analytics-node"],envStems:["SEGMENT"]},hosts:[{host:"api.segment.io"},{host:"events.eu1.segmentapis.com"},{host:"oauth2.segment.io"},{host:"oauth2.eu1.segmentapis.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["event","identity","group","dropped"],serveExport:"createSegmentTwinServer"},sendblue:{adoption:{pypi:["sendblue"],sdks:["sendblue"],envStems:["SENDBLUE"]},hostsNone:"no injector entry grounded yet — worlds wire the twin via explicit client endpoint config; a visible gap until its host is grounded here",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["message","credential"],serveExport:"createSendblueTwinServer"},sendgrid:{adoption:{pypi:["sendgrid"],sdks:["@sendgrid/mail","@sendgrid/client"],envStems:["SENDGRID","SENDGRIDSYNC"]},hosts:[{host:"api.sendgrid.com"},{host:"api.eu.sendgrid.com"},{host:"email.twilio.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["message"],serveExport:"createSendgridTwinServer"},sentry:{adoption:{pypi:["sentry-sdk"],sdks:["@sentry/node","@sentry/browser","@sentry/react","@sentry/nextjs","@sentry/vue","@sentry/sveltekit","@sentry/astro","@sentry/remix","@sentry/electron","@sentry/react-native"],scopes:["@sentry/"],envStems:["SENTRY","APPSMITHSENTRY"]},hosts:[{host:"sentry.io"},{suffix:".ingest.sentry.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["organization","team","project","project_key","issue","event","event_attachment","session","project_ownership","codeowners","project_filter","release","release_file","deploy","alert_rule","metric_alert","org_integration"],serveExport:"createSentryTwinServer"},slack:{adoption:{worldIds:["slackapp"],pypi:["slack-sdk","slack-bolt","slackclient"],sdks:["@slack/web-api","@slack/bolt","@slack/webhook","@slack/oauth"],scopes:["@slack/"],envStems:["SLACK","SLACKBOTUSER"]},hosts:[{key:"slackapp",host:"slack.com",pathPattern:"^/api/apps\\.connections\\.open/?$"},{host:"slack.com"},{host:"www.slack.com"},{host:"api.slack.com"},{host:"hooks.slack.com",pathPattern:"^/services/"},{host:"avatars.slack-edge.com",pathPattern:"^/T[A-Za-z0-9-]+/(([UWA][A-Za-z0-9-]+|icon)_[0-9]{1,4}\\.png|[UW][A-Za-z0-9-]+-[0-9a-f]{12}_([0-9]{1,4}|original)\\.(png|gif))$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"web-api",resources:["channel","user","message","file","audit"],serveExport:"createSlackTwinServer"},smtp:{adoption:{pypi:["aiosmtplib"],sdks:["nodemailer","nodemailer-smtp-transport","emailjs"],envStems:["NEXTPRIVATESMTP"]},hostsNone:"RAW-PROTOCOL pack — there is no host to map. SMTP is a line protocol over a raw TCP socket, so the injector (which patches http/fetch) cannot see the traffic at all, and there is no vendor hostname either: the relay is whatever the operator names (smtp.gmail.com, email-smtp.us-east-1.amazonaws.com, localhost:1025 …). Interception is app-read env instead — the world injects SMTP_HOST/SMTP_PORT + EMAIL_SERVER/EMAIL_SERVER_HOST/EMAIL_SERVER_PORT at the twin's listener (APP_READ_ENDPOINT_ENV in world-runtime/src/init.ts), which is the ONLY thing every SMTP client is configured with. Same class as livekit's ws:// media plane, one layer further down.",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"raw-tcp",resources:["message","relay"],serveExport:"createSmtpTwinServer"},snowflake:{adoption:{pypi:["snowflake-connector-python","snowflake","snowflake-snowpark-python","snowflake-sqlalchemy"],sdks:["snowflake-sdk"],envStems:["SNOWFLAKE"]},hosts:[{suffix:".snowflakecomputing.com"},{suffix:".snowflakecomputing.cn"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["database","schema","table","view","warehouse","session","query"],endpointEnvNone:"the snowflake-sdk takes its endpoint through createConnection()'s own account/host/accessUrl/protocol/port options or a connections.toml under SNOWFLAKE_HOME; it reads NO base-URL environment variable (verified against the packed snowflake-sdk@3.2.0 tarball, whose lib/ reads SNOWFLAKE_HOME, SNOWFLAKE_DEFAULT_CONNECTION_NAME, the SNOWFLAKE_DISABLE_*/SNOWFLAKE_CRL_*/SNOWFLAKE_RUNNING_INSIDE_SPCS switches, the SF_OCSP_*/SF_TELEMETRY_*/SF_CLIENT_CONFIG_FILE/SF_TEMPORARY_CREDENTIAL_CACHE_DIR debug and cache switches, the standard http_proxy family, and some non-Snowflake names like AWS_REGION/HOME - no base-URL variable of any kind). Interception is host-based via the .snowflakecomputing.com and .snowflakecomputing.cn suffix entries; a SNOWFLAKE_BASE_URL would be a var no app reads.",serveExport:"createSnowflakeTwinServer"},stigg:{adoption:{sdks:["@stigg/node-server-sdk","@stigg/react-sdk","@stigg/js-client-sdk","@stigg/api-client-js"],pypi:["stigg-api-client","stigg"],scopes:["@stigg/"],envStems:["STIGG","STIGGCLIENT"]},hosts:[{host:"api.stigg.io"},{host:"edge.api.stigg.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"graphql",resources:["product","plan","feature","packageEntitlement","price","customer","subscription","usageMeasurement","promotionalEntitlement","coupon","integration","hook"],endpointEnvNone:"the Stigg SDKs take their base URL as a constructor option (Stigg.initialize({ baseUri, baseEdgeUri })) and read NO env var for it. Verified by grep for process.env across the SDK dists: @stigg/node-server-sdk 4.55.0 (the version this pack pins and installs) and, in the consumer tree that motivated the pack, @stigg/node-server-sdk 4.2.0 and @stigg/js-client-sdk 3.67.0 — every one of them references only process.env.NODE_ENV. (The browser SDKs are NOT installed in this repo; that half of the evidence comes from ~/Code/Ponder and is therefore not re-checkable here, which is why both trees are named rather than one. §9 round 1 flagged the original citation for naming versions this repo does not carry.) Interception is by the api.stigg.io / edge.api.stigg.io host entries above.",serveExport:"createStiggTwinServer"},stream:{adoption:{pypi:["stream-chat"],sdks:["stream-chat"],envStems:["STREAM","GETSTREAM"]},hosts:[{host:"chat.stream-io-api.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["user","channel","message","channeltype","device","ban","mute","flag"],serveExport:"createStreamTwinServer"},stripe:{adoption:{pypi:["stripe"],sdks:["stripe"],envStems:["STRIPE","NEXTPRIVATESTRIPE"]},hosts:[{host:"api.stripe.com"},{host:"checkout.stripe.com",pathPattern:"^/c/pay/"},{host:"billing.stripe.com",pathPattern:"^/p/session/"},{host:"connect.stripe.com",pathPattern:"^/setup/|^/oauth/(authorize|token|deauthorize)/?$"},{host:"dashboard.stripe.com",pathPattern:"^/settings/public/?$|^/(test/)?settings/connect(/onboarding-options/oauth)?/?$"},{host:"verify.stripe.com",pathPattern:"^/start/"},{host:"js.stripe.com",pathPattern:"^/v3/financial-connections/|^/v3/?$|^/(v3|[a-z]+)/stripe\\.js$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["charge","customer","payment_intent","setup_intent","payment_method","subscription","price","product","invoice","invoiceitem","refund","event"],serveExport:"createStripeTwinServer"},supabase:{adoption:{pypi:["supabase","gotrue","supabase-auth","postgrest","storage3","supafunc","realtime"],sdks:["@supabase/supabase-js"],scopes:["@supabase/"],envStems:["SUPABASE"],worldIds:["supabasemgmt"]},hosts:[{host:"api.supabase.com"},{suffix:".supabase.co",pathPattern:"^/(rest|storage|auth)/v1(/|$)"}],archetype:"engine-control",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{access_token:"a personal access token minted in the dashboard; the twin only reads it as seeded state",network_ban:"born of the vendor's abuse detector",backup:"born of the vendor's scheduler"},resources:["organization","org_member","access_token","project","branch","config","secret","function","network_restrictions","network_ban","custom_hostname","read_replica","backup"],managedDatabase:{kind:"postgres",arg:"--database",note:"PostgREST, Storage and Auth are served over the application's own database: the World's managed postgres, the database its migrations and direct queries use"},serveExport:"createSupabaseTwinServer"},supermemory:{adoption:{pypi:["supermemory"],sdks:["supermemory"],envStems:["SUPERMEMORY"]},hosts:[{host:"api.supermemory.ai"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["document","setting"],serveExport:"createSupermemoryTwinServer"},svix:{adoption:{pypi:["svix"],sdks:["svix"],envStems:["SVIX"]},hosts:[{host:"api.svix.com"},{host:"api.us.svix.com"},{host:"api.eu.svix.com"},{host:"api.in.svix.com"},{host:"api.ca.svix.com"},{host:"api.au.svix.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["application","endpoint","message","message_attempt","event_type"],serveExport:"createSvixTwinServer"},tavily:{adoption:{sdks:["@tavily/core"],pypi:["tavily-python"],envStems:["TAVILY"]},hosts:[{host:"api.tavily.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["page","usage","log","research","keyless"],endpointEnvNone:"the @tavily/core SDK exposes no base-URL env var — it reads only TAVILY_API_KEY/TAVILY_HTTP(S)_PROXY/TAVILY_ORG_ID/TAVILY_PROJECT from process.env; base-URL override is the constructor option apiBaseURL (dist/index.mjs post()/get(): `apiBaseURL || BASE_URL`), so interception is the hosts entry above.",serveExport:"createTavilyTwinServer"},temporal:{adoption:{sdks:["@temporalio/client","@temporalio/worker","@temporalio/workflow","@temporalio/activity"],scopes:["@temporalio/"],pypi:["temporalio"],envStems:["TEMPORAL"]},hostsNone:"RAW-PROTOCOL pack — there is no host to map. The Temporal SDKs dial the frontend address they are configured with (Connection.connect / NativeConnection.connect `address`, conventionally TEMPORAL_ADDRESS) over gRPC, which the http/fetch injector never sees. Interception is the app-read address: the World injects TEMPORAL_ADDRESS=<host>:<port> at this twin (APP_READ_ENDPOINT_ENV in world-runtime/src/init.ts).",archetype:"engine-control",protocol:{declared:"2",major:2,standing:"current"},transport:"raw-tcp",resources:["workflow-execution","namespace"],serveExport:"createTemporalTwinServer"},tiktok:{adoption:{sdks:[],pypi:[],envStems:["TIKTOK"]},hosts:[{host:"www.tiktok.com",pathPattern:"^/v2/auth/authorize/?$|^/_twin/"},{host:"open.tiktokapis.com",pathPattern:"^/v2/(?:oauth/(?:token|revoke)|user/info|video/(?:list|query)|post/publish/(?:creator_info/query|video/init|inbox/video/init|status/fetch))/?$|^/_twin/"},{host:"open-upload.tiktokapis.com",pathPattern:"^/video/?$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","session","auth_request","grant","video","publish"],endpointEnvNone:"no app-read base-URL env exists: TikTok publishes no official SDK with a base-URL option and integrations (Dub included) hardcode www.tiktok.com and open.tiktokapis.com, so interception is the path-scoped hosts entries above.",serveExport:"createTikTokTwinServer"},tinybird:{adoption:{pypi:["tinybird-python-sdk","tinybird-cli"],sdks:["@chronark/zod-bird"],scopes:["@chronark/zod-bird"],envStems:["TINYBIRD"]},hosts:[{host:"api.tinybird.co"},{hostPattern:"^api\\.[a-z0-9.-]+\\.tinybird\\.co$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["datasource","pipe","event","token","job","tag"],serveExport:"createTinybirdTwinServer"},togetherai:{adoption:{sdks:["together-ai"],envStems:["TOGETHER"]},hosts:[{host:"api.together.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog"},resources:["file","batch","finetune","model"],endpointEnv:{name:"TOGETHER_TWIN_URL",templates:{TOGETHER_API_BASE_URL:"${url}/v1"},note:"the injector covers api.together.ai, but together-ai's files.upload() reads TOGETHER_API_BASE_URL at module load and ignores client.baseURL (lib/upload.js:12) — the template points it at the twin's /v1 so the SDK upload flow does not egress to the real vendor."},serveExport:"createTogetheraiTwinServer"},tremendous:{adoption:{pypi:[],sdks:["tremendous"],envStems:["TREMENDOUS"]},hosts:[{host:"api.tremendous.com"},{host:"testflight.tremendous.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["order","reward","campaign","product","funding_source","invoice","topup","balance_txn","member","field","webhook","organization","settings"],serveExport:"createTremendousTwinServer"},tunnel:{adoption:{pypi:[],sdks:["@volter/tunnel"],envStems:["TUNNEL","VOLTERTUNNEL"]},hostsNone:"no injector entry by design: native cloudflared is an external binary, while @volter/tunnel opens a configurable WebSocket control channel and the CLI reads TUNNEL_SERVER_URL. Worlds wire that app-read endpoint directly; claiming api.trycloudflare.com in the Node injector would not redirect cloudflared and would falsely imply the Cloudflare edge data plane was twinned",archetype:"proxy",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["quick_tunnel","relay_tunnel","relay"],serveExport:"createTunnelTwinServer"},turbopuffer:{adoption:{sdks:["@turbopuffer/turbopuffer"],pypi:["turbopuffer"],scopes:["@turbopuffer/"],envStems:["TURBOPUFFER"]},hosts:[{hostPattern:"^(?:aws|gcp|azure)-[a-z0-9-]+\\.turbopuffer\\.com$"},{host:"turbopuffer.com",pathPattern:"^/(login|dashboard|_twin/users)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["namespace","document"],endpointEnv:{name:"TURBOPUFFER_TWIN_URL",templates:{TURBOPUFFER_BASE_URL:"${url}/{region}"},note:"grounded in @turbopuffer/turbopuffer@2.8.0 src/client.ts:253-288 (TURBOPUFFER_BASE_URL, {region} placeholder substitution) and internal/custom/fetch-node.ts (undici Agent.request under node, outside the injector); the injector also claims the regional *.turbopuffer.com hosts for fetch-based runtimes."},serveExport:"createTurbopufferTwinServer"},twelvelabs:{adoption:{pypi:["twelvelabs"],sdks:["twelvelabs-js"],envStems:["TWELVELABS"]},hosts:[{host:"api.twelvelabs.io"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["index","task","video"],serveExport:"createTwelvelabsTwinServer"},twilio:{adoption:{pypi:["twilio"],sdks:["twilio"],envStems:["TWILIO"]},hostsNone:"no injector entry grounded yet — worlds point the twilio SDK at the twin via explicit client config; zero-edit interception of the three real Twilio hosts (pack README §Coverage) is a visible gap until grounded here",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["message","verification","phone_number","signing_key"],serveExport:"createTwilioTwinServer"},upstash:{adoption:{pypi:["upstash-redis","upstash-ratelimit","qstash","upstash-workflow"],sdks:["@upstash/redis","@upstash/ratelimit","@upstash/qstash","@upstash/workflow"],scopes:["@upstash/redis","@upstash/ratelimit","@upstash/qstash","@upstash/workflow"],envStems:["UPSTASHREDIS","KVREST","QSTASH"]},hosts:[{suffix:".upstash.io"},{suffix:"-vector.upstash.io",exclude:!0},{host:"api.upstash.com",pathPattern:"^/v2/(redis|team|teams)(/|$)"},{host:"console.upstash.com",pathPattern:"^/(login|account/(api|teams)|qstash|invite)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["key"],endpointEnv:{name:"UPSTASH_TWIN_URL",templates:{QSTASH_URL:"${url}"},note:"@upstash/qstash and @upstash/workflow read QSTASH_URL; the injector also redirects *.upstash.io (Redis databases, QStash) to this twin."},serveExport:"createUpstashRedisTwinServer"},upstashvector:{adoption:{pypi:["upstash-vector"],sdks:["@upstash/vector"],scopes:["@upstash/vector"],envStems:["UPSTASHVECTOR"]},hosts:[{suffix:"-vector.upstash.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["vector","namespace","config"],serveExport:"createUpstashVectorTwinServer"},vercel:{adoption:{pypi:["vercel"],sdks:["@vercel/sdk","@vercel/edge-config"],envStems:["VERCEL"]},hosts:[{host:"api.vercel.com"},{host:"edge-config.vercel.com"},{host:"avatar.vercel.sh"},{host:"vercel.com",pathPattern:"^/(login|account/tokens)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["team","project","project_domain","domain","dns_record","env_var","edge_config","deployment","alias","auth_token"],serveExport:"createVercelTwinServer"},veriff:{adoption:{pypi:[],sdks:["@veriff/js-sdk"],scopes:["@veriff/"],envStems:["VERIFF"]},hosts:[{host:"stationapi.veriff.com"},{host:"api.veriff.me"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["session","attempt","media","delivery"],serveExport:"createVeriffTwinServer"},vital:{adoption:{pypi:["vital"],sdks:["@tryvital/vital-node"],scopes:["@tryvital/"],envStems:["VITAL"]},hosts:[{host:"api.tryvital.io"},{host:"api.sandbox.tryvital.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["user","order","appointment","webhook"],serveExport:"createVitalTwinServer"},volteridentity:{adoption:{sdks:["@volter/identity"],pypi:[],envStems:[]},hosts:[{host:"id.volter.ai"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["person","session","oauth_client","oauth_resource","client_resource","consent","authorization_code","access_token","refresh_token","device_code","organization","member","invitation"],endpointEnv:{name:"VOLTER_ISSUER",note:'grounded in the consumers: browser-substrate services/gateway/cloudflare/volter.ts (`VOLTER_ISSUER`, "the identity service, https://id.volter.ai") discovers the issuer from it, and Volter Teams is configured with `VOLTER_ISSUER` (volter-ai/identity ROADMAP I4); the twin is its own issuer, so discovery, tokens and redirects all name the injected URL.'},serveExport:"createVolterIdentityTwinServer"},webrisk:{adoption:{pypi:["google-cloud-webrisk"],sdks:["@google-cloud/web-risk"],envStems:["WEBRISK"]},hosts:[{host:"webrisk.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["verdict","submission","operation","audit","iam_policy"],serveExport:"createWebRiskTwinServer"},x:{adoption:{pypi:["tweepy"],sdks:["twitter-api-v2"]},hosts:[{host:"api.x.com",pathPattern:"^/2/(?!(?:oauth2/(?:token|revoke)|users/me)/?$)|^/_twin/(?!assets/consent\\.(?:js|css)$)"},{host:"api.twitter.com",pathPattern:"^/2/(?!(?:oauth2/(?:token|revoke)|users/me)/?$)|^/_twin/(?!assets/consent\\.(?:js|css)$)"},{host:"x.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"twitter.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"www.x.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"www.twitter.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"mobile.twitter.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"mobile.x.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"pbs.twimg.com",pathPattern:"^/media/[0-9a-f]{64}\\.(?:jpg|png|gif|webp)$|^/ext_tw_video_thumb/[0-9]{1,19}/pu/img/[0-9a-f]{64}\\.svg$"},{host:"video.twimg.com",pathPattern:"^/ext_tw_video/[0-9]{1,19}/pu/vid/avc1/[0-9]+x[0-9]+/[0-9a-f]{64}\\.mp4$"},{host:"abs.twimg.com",pathPattern:"^/sticky/default_profile_images/default_profile_(?:normal|bigger|200x200|400x400)\\.png$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["account","post","follow","rate_limit","_token"],serveExport:"createXTwinServer"},xai:{adoption:{pypi:["xai-sdk"],sdks:["@ai-sdk/xai"],envStems:["XAI","GROK"]},hosts:[{host:"api.x.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{language_model:"the vendor catalog",model:"the vendor catalog"},resources:["deferred_completion","language_model","model","oauth_account","oauth_device_authorization","oauth_usage"],serveExport:"createXaiTwinServer"},xidentity:{adoption:{pypi:[],sdks:["@xdevplatform/xdk","twitter-api-sdk"],scopes:["@xdevplatform/"],envStems:["X","TWITTER"]},hosts:[{host:"x.com",pathPattern:"^/i/oauth2/authorize/?$|^/_twin/"},{host:"twitter.com",pathPattern:"^/i/oauth2/authorize/?$|^/_twin/"},{host:"api.x.com",pathPattern:"^/2/(?:oauth2/(?:token|revoke)|users/me)/?$|^/oauth/(?:request_token|authorize|authenticate|access_token)/?$|^/1\\.1/oauth/invalidate_token(?:\\.json)?/?$|^/_twin/assets/consent\\.(?:js|css)$"},{host:"api.twitter.com",pathPattern:"^/2/(?:oauth2/(?:token|revoke)|users/me)/?$|^/oauth/(?:request_token|authorize|authenticate|access_token)/?$|^/1\\.1/oauth/invalidate_token(?:\\.json)?/?$|^/_twin/assets/consent\\.(?:js|css)$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","session","auth_request","grant","rate_window","oauth1_app","oauth1_token","oauth1_grant","_authorization_code","_access_token","_refresh_token","_oauth1_request_token","_client_secret","_code_challenge"],serveExport:"createXIdentityTwinServer"},youtube:{adoption:{pypi:[],sdks:["@googleapis/youtube"],envStems:["YOUTUBE"]},hosts:[{host:"youtube.googleapis.com"},{host:"www.googleapis.com",pathPattern:"^/(upload/)?youtube/v3(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["channel","video","playlist","playlistItem"],serveExport:"createYouTubeTwinServer"}},undeclared:[]}});var i5=N6((eQ0,Bg)=>{var ct=($)=>typeof $==="string"&&(/^\/(o\/oauth2\/v2\/auth(\/oauthchooseaccount)?|o\/oauth2\/auth|o\/oauth2\/token|signin\/oauth\/error|\.well-known\/openid-configuration)\/?$/.test($)||/^\/_twin\//.test($)),lt=($)=>typeof $==="string"&&/^\/(token|oauth2\/v4\/token|revoke|tokeninfo|device\/code)\/?$/.test($),mt=($)=>typeof $==="string"&&/^\/(oauth2\/(v1\/certs|v3\/(certs|userinfo)|v2\/userinfo)|userinfo\/v2\/me)\/?$/.test($),__={googleoauth:($,I)=>$==="accounts.google.com"&&(I===void 0||ct(I))||$==="oauth2.googleapis.com"&&(I===void 0||lt(I))||$==="www.googleapis.com"&&(I===void 0||mt(I))||$==="openidconnect.googleapis.com",googlefavicon:($)=>$==="www.google.com"||$==="google.com"||$==="t2.gstatic.com",browserassets:($)=>$==="cdnjs.cloudflare.com"||$==="www.googletagmanager.com"||$==="www.google-analytics.com"||$==="connect.facebook.net"||$==="snap.licdn.com"||$==="px.ads.linkedin.com"||$==="static.hotjar.com"||$==="fonts.googleapis.com"||$==="fonts.gstatic.com"||$==="api.fontshare.com"||$==="images.subscribe.dev"||$==="www.youtube.com"||$==="www.youtube-nocookie.com"||$==="i.ytimg.com"};{let{packs:$}=qg();for(let I of Object.keys($)){let G=$[I].hosts;if(!G||G.length===0)continue;if(__[I])throw Error(`inject: vendor "${I}" declares hosts on its pack descriptor AND in the hand VENDOR_HOSTS table — one home per fact; delete the hand entry.`);let Z=new Map;for(let _ of G){let J=_.key===void 0?I:_.key;if(!Z.has(J))Z.set(J,[]);Z.get(J).push(_)}for(let[_,J]of Z){if(__[_])throw Error(`inject: key "${_}" (pack ${I}) is declared twice — on this descriptor and in the hand VENDOR_HOSTS table or another pack's descriptor; a key has one home.`);let Y=(M)=>{if(["host","suffix","hostPattern"].filter((N)=>M[N]!==void 0).length!==1)throw Error(`inject: key "${_}" (pack ${I}) rule ${JSON.stringify(M)} — exactly one of host | suffix | hostPattern (pack-facts.json is hand-edited or stale)`);let T=M.hostPattern===void 0?null:new RegExp(M.hostPattern),S=M.pathPattern===void 0?null:new RegExp(M.pathPattern);return(N,B)=>(M.host!==void 0?N===M.host:M.suffix!==void 0?N.endsWith(M.suffix):T.test(N))&&(S===null||B===void 0||S.test(B))},W=J.filter((M)=>M.exclude!==!0).map(Y),R=J.filter((M)=>M.exclude===!0).map(Y);__[_]=(M,E)=>W.some((T)=>T(M,E))&&!R.some((T)=>T(M,E))}}}function dt($){let I=String($||"").toLowerCase().replace(/\.$/,"");return Object.keys(__).some((G)=>__[G](I))}function it($){let I=String($||"").toLowerCase().replace(/\.$/,"");return Object.keys(__).filter((G)=>__[G](I))}function Ng($){return String($).toUpperCase().replace(/[^A-Z0-9]/g,"_")}function ot($){let I={};for(let G of Object.keys(__)){let Z=$[`${Ng(G)}_TWIN_URL`];if(Z)I[G]=Z.replace(/\/$/,"")}if($.TWIN_INJECT)for(let G of String($.TWIN_INJECT).split(",")){let Z=G.indexOf("=");if(Z<=0)continue;let _=G.slice(0,Z).trim(),J=G.slice(Z+1).trim();if(_&&J&&Object.hasOwn(__,_))I[_]=J.replace(/\/$/,"")}return I}Bg.exports={VENDOR_HOSTS:__,isVendorHost:dt,vendorsOfHost:it,twinEnvStem:Ng,twinOrigins:ot}});var gg={};LU(gg,{validateHeaderValue:()=>Fr,validateHeaderName:()=>Hr,setMaxIdleHTTPParsers:()=>Wr,request:()=>Kr,maxHeaderSize:()=>Dr,globalAgent:()=>Lr,get:()=>Or,default:()=>Tr,createServer:()=>Zr,ServerResponse:()=>zr,Server:()=>Qr,STATUS_CODES:()=>Jr,OutgoingMessage:()=>Yr,METHODS:()=>Gr,IncomingMessage:()=>Xr,ClientRequest:()=>_r,Agent:()=>Ir});var tt,rt,jg,at,st,et=($,I,G)=>{G=$!=null?tt(rt($)):{};let Z=I||!$||!$.__esModule?jg(G,"default",{value:$,enumerable:!0}):G;for(let _ of at($))if(!st.call(Z,_))jg(Z,_,{get:()=>$[_],enumerable:!0});return Z},$r=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports),Ur,kg,Ir,_r,Xr,Gr,Yr,Jr,Qr,zr,Zr,Or,Lr,Dr,Kr,Wr,Hr,Fr,Tr;var wg=WI(()=>{tt=Object.create,{getPrototypeOf:rt,defineProperty:jg,getOwnPropertyNames:at}=Object,st=Object.prototype.hasOwnProperty,Ur=$r(($,I)=>{var G=(Xz(),V$(d5)),Z=(PE(),V$(RE)),_=$;for(J in G)if(G.hasOwnProperty(J))_[J]=G[J];var J;_.request=function(W,R){return W=Y(W),G.request.call(this,W,R)},_.get=function(W,R){return W=Y(W),G.get.call(this,W,R)};function Y(W){if(typeof W==="string")W=Z.parse(W);if(!W.protocol)W.protocol="https:";if(W.protocol!=="https:")throw Error('Protocol "'+W.protocol+'" not supported. Expected "https:"');return W}}),kg=et(Ur(),1),{Agent:Ir,ClientRequest:_r,IncomingMessage:Xr,METHODS:Gr,OutgoingMessage:Yr,STATUS_CODES:Jr,Server:Qr,ServerResponse:zr,createServer:Zr,get:Or,globalAgent:Lr,maxHeaderSize:Dr,request:Kr,setMaxIdleHTTPParsers:Wr,validateHeaderName:Hr,validateHeaderValue:Fr}=kg,Tr=kg});var yE={};LU(yE,{throws:()=>ga,strictEqual:()=>ka,strict:()=>ja,rejects:()=>Ba,ok:()=>Na,notStrictEqual:()=>qa,notEqual:()=>Ca,notDeepStrictEqual:()=>va,notDeepEqual:()=>Sa,match:()=>Va,ifError:()=>Pa,fail:()=>Ra,equal:()=>Ea,doesNotThrow:()=>Aa,doesNotReject:()=>Ma,doesNotMatch:()=>Ta,default:()=>wa,deepStrictEqual:()=>Fa,deepEqual:()=>Ha,CallTracker:()=>Wa,AssertionError:()=>Ka});var Mr,Ar,xg,Er,Rr,Pr=($,I,G)=>{G=$!=null?Mr(Ar($)):{};let Z=I||!$||!$.__esModule?xg(G,"default",{value:$,enumerable:!0}):G;for(let _ of Er($))if(!Rr.call(Z,_))xg(Z,_,{get:()=>$[_],enumerable:!0});return Z},A$=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports),NE,o5,BE,Vr,Sr,vr,Cr,fg,Yz,qr,Nr,Br,jr,kr,gr,wr,xr,fr,yr,XY,t5,br,yg,bg,hr,Jz,jE,kE,ur,hg,gE,nr,wE,ug,xE,GY,pr,cr,lr,mr,dr,ir,or,tr,rr,ng,pg,ar,sr,r5,cg,er,$a,Ua,Ia,_a,Gz,lg,Xa,mg,Ga,dg,Ya,Ja,ig,fE,Qa,a5,za,Za,og,tg,Oa,La,Da,qE,rg,Ka,Wa,Ha,Fa,Ta,Ma,Aa,Ea,Ra,Pa,Va,Sa,va,Ca,qa,Na,Ba,ja,ka,ga,wa;var bE=WI(()=>{Mr=Object.create,{getPrototypeOf:Ar,defineProperty:xg,getOwnPropertyNames:Er}=Object,Rr=Object.prototype.hasOwnProperty,NE=A$(($,I)=>{I.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var G={},Z=Symbol("test"),_=Object(Z);if(typeof Z==="string")return!1;if(Object.prototype.toString.call(Z)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(_)!=="[object Symbol]")return!1;var J=42;G[Z]=J;for(var Y in G)return!1;if(typeof Object.keys==="function"&&Object.keys(G).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(G).length!==0)return!1;var W=Object.getOwnPropertySymbols(G);if(W.length!==1||W[0]!==Z)return!1;if(!Object.prototype.propertyIsEnumerable.call(G,Z))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var R=Object.getOwnPropertyDescriptor(G,Z);if(R.value!==J||R.enumerable!==!0)return!1}return!0}}),o5=A$(($,I)=>{var G=NE();I.exports=function(){return G()&&!!Symbol.toStringTag}}),BE=A$(($,I)=>{I.exports=Object}),Vr=A$(($,I)=>{I.exports=Error}),Sr=A$(($,I)=>{I.exports=EvalError}),vr=A$(($,I)=>{I.exports=RangeError}),Cr=A$(($,I)=>{I.exports=ReferenceError}),fg=A$(($,I)=>{I.exports=SyntaxError}),Yz=A$(($,I)=>{I.exports=TypeError}),qr=A$(($,I)=>{I.exports=URIError}),Nr=A$(($,I)=>{I.exports=Math.abs}),Br=A$(($,I)=>{I.exports=Math.floor}),jr=A$(($,I)=>{I.exports=Math.max}),kr=A$(($,I)=>{I.exports=Math.min}),gr=A$(($,I)=>{I.exports=Math.pow}),wr=A$(($,I)=>{I.exports=Math.round}),xr=A$(($,I)=>{I.exports=Number.isNaN||function(G){return G!==G}}),fr=A$(($,I)=>{var G=xr();I.exports=function(Z){if(G(Z)||Z===0)return Z;return Z<0?-1:1}}),yr=A$(($,I)=>{I.exports=Object.getOwnPropertyDescriptor}),XY=A$(($,I)=>{var G=yr();if(G)try{G([],"length")}catch(Z){G=null}I.exports=G}),t5=A$(($,I)=>{var G=Object.defineProperty||!1;if(G)try{G({},"a",{value:1})}catch(Z){G=!1}I.exports=G}),br=A$(($,I)=>{var G=typeof Symbol<"u"&&Symbol,Z=NE();I.exports=function(){if(typeof G!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof G("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return Z()}}),yg=A$(($,I)=>{I.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),bg=A$(($,I)=>{var G=BE();I.exports=G.getPrototypeOf||null}),hr=A$(($,I)=>{var G="Function.prototype.bind called on incompatible ",Z=Object.prototype.toString,_=Math.max,J="[object Function]",Y=function(M,E){var T=[];for(var S=0;S<M.length;S+=1)T[S]=M[S];for(var N=0;N<E.length;N+=1)T[N+M.length]=E[N];return T},W=function(M,E){var T=[];for(var S=E||0,N=0;S<M.length;S+=1,N+=1)T[N]=M[S];return T},R=function(M,E){var T="";for(var S=0;S<M.length;S+=1)if(T+=M[S],S+1<M.length)T+=E;return T};I.exports=function(M){var E=this;if(typeof E!=="function"||Z.apply(E)!==J)throw TypeError(G+E);var T=W(arguments,1),S,N=function(){if(this instanceof S){var g=E.apply(this,Y(T,arguments));if(Object(g)===g)return g;return this}return E.apply(M,Y(T,arguments))},B=_(0,E.length-T.length),x=[];for(var w=0;w<B;w++)x[w]="$"+w;if(S=Function("binder","return function ("+R(x,",")+"){ return binder.apply(this,arguments); }")(N),E.prototype){var y=function(){};y.prototype=E.prototype,S.prototype=new y,y.prototype=null}return S}}),Jz=A$(($,I)=>{var G=hr();I.exports=Function.prototype.bind||G}),jE=A$(($,I)=>{I.exports=Function.prototype.call}),kE=A$(($,I)=>{I.exports=Function.prototype.apply}),ur=A$(($,I)=>{I.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),hg=A$(($,I)=>{var G=Jz(),Z=kE(),_=jE(),J=ur();I.exports=J||G.call(_,Z)}),gE=A$(($,I)=>{var G=Jz(),Z=Yz(),_=jE(),J=hg();I.exports=function(Y){if(Y.length<1||typeof Y[0]!=="function")throw new Z("a function is required");return J(G,_,Y)}}),nr=A$(($,I)=>{var G=gE(),Z=XY(),_;try{_=[].__proto__===Array.prototype}catch(R){if(!R||typeof R!=="object"||!("code"in R)||R.code!=="ERR_PROTO_ACCESS")throw R}var J=!!_&&Z&&Z(Object.prototype,"__proto__"),Y=Object,W=Y.getPrototypeOf;I.exports=J&&typeof J.get==="function"?G([J.get]):typeof W==="function"?function(R){return W(R==null?R:Y(R))}:!1}),wE=A$(($,I)=>{var G=yg(),Z=bg(),_=nr();I.exports=G?function(J){return G(J)}:Z?function(J){if(!J||typeof J!=="object"&&typeof J!=="function")throw TypeError("getProto: not an object");return Z(J)}:_?function(J){return _(J)}:null}),ug=A$(($,I)=>{var G=Function.prototype.call,Z=Object.prototype.hasOwnProperty,_=Jz();I.exports=_.call(G,Z)}),xE=A$(($,I)=>{var G,Z=BE(),_=Vr(),J=Sr(),Y=vr(),W=Cr(),R=fg(),M=Yz(),E=qr(),T=Nr(),S=Br(),N=jr(),B=kr(),x=gr(),w=wr(),y=fr(),g=Function,b=function(r){try{return g('"use strict"; return ('+r+").constructor;")()}catch(Y0){}},l=XY(),i=t5(),$0=function(){throw new M},Q0=l?function(){try{return arguments.callee,$0}catch(r){try{return l(arguments,"callee").get}catch(Y0){return $0}}}():$0,G0=br()(),D0=wE(),t=bg(),P0=yg(),Q=kE(),D=jE(),F={},L=typeof Uint8Array>"u"||!D0?G:D0(Uint8Array),H={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?G:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?G:ArrayBuffer,"%ArrayIteratorPrototype%":G0&&D0?D0([][Symbol.iterator]()):G,"%AsyncFromSyncIteratorPrototype%":G,"%AsyncFunction%":F,"%AsyncGenerator%":F,"%AsyncGeneratorFunction%":F,"%AsyncIteratorPrototype%":F,"%Atomics%":typeof Atomics>"u"?G:Atomics,"%BigInt%":typeof BigInt>"u"?G:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?G:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?G:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?G:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":_,"%eval%":eval,"%EvalError%":J,"%Float16Array%":typeof Float16Array>"u"?G:Float16Array,"%Float32Array%":typeof Float32Array>"u"?G:Float32Array,"%Float64Array%":typeof Float64Array>"u"?G:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?G:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":F,"%Int8Array%":typeof Int8Array>"u"?G:Int8Array,"%Int16Array%":typeof Int16Array>"u"?G:Int16Array,"%Int32Array%":typeof Int32Array>"u"?G:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":G0&&D0?D0(D0([][Symbol.iterator]())):G,"%JSON%":typeof JSON==="object"?JSON:G,"%Map%":typeof Map>"u"?G:Map,"%MapIteratorPrototype%":typeof Map>"u"||!G0||!D0?G:D0(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Z,"%Object.getOwnPropertyDescriptor%":l,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?G:Promise,"%Proxy%":typeof Proxy>"u"?G:Proxy,"%RangeError%":Y,"%ReferenceError%":W,"%Reflect%":typeof Reflect>"u"?G:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?G:Set,"%SetIteratorPrototype%":typeof Set>"u"||!G0||!D0?G:D0(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?G:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":G0&&D0?D0(""[Symbol.iterator]()):G,"%Symbol%":G0?Symbol:G,"%SyntaxError%":R,"%ThrowTypeError%":Q0,"%TypedArray%":L,"%TypeError%":M,"%Uint8Array%":typeof Uint8Array>"u"?G:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?G:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?G:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?G:Uint32Array,"%URIError%":E,"%WeakMap%":typeof WeakMap>"u"?G:WeakMap,"%WeakRef%":typeof WeakRef>"u"?G:WeakRef,"%WeakSet%":typeof WeakSet>"u"?G:WeakSet,"%Function.prototype.call%":D,"%Function.prototype.apply%":Q,"%Object.defineProperty%":i,"%Object.getPrototypeOf%":t,"%Math.abs%":T,"%Math.floor%":S,"%Math.max%":N,"%Math.min%":B,"%Math.pow%":x,"%Math.round%":w,"%Math.sign%":y,"%Reflect.getPrototypeOf%":P0};if(D0)try{null.error}catch(r){v=D0(D0(r)),H["%Error.prototype%"]=v}var v,q=function r(Y0){var W0;if(Y0==="%AsyncFunction%")W0=b("async function () {}");else if(Y0==="%GeneratorFunction%")W0=b("function* () {}");else if(Y0==="%AsyncGeneratorFunction%")W0=b("async function* () {}");else if(Y0==="%AsyncGenerator%"){var I0=r("%AsyncGeneratorFunction%");if(I0)W0=I0.prototype}else if(Y0==="%AsyncIteratorPrototype%"){var c=r("%AsyncGenerator%");if(c&&D0)W0=D0(c.prototype)}return H[Y0]=W0,W0},P={__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"]},O=Jz(),A=ug(),k=O.call(D,Array.prototype.concat),j=O.call(Q,Array.prototype.splice),h=O.call(D,String.prototype.replace),a=O.call(D,String.prototype.slice),J0=O.call(D,RegExp.prototype.exec),K0=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O0=/\\(\\)?/g,d=function(r){var Y0=a(r,0,1),W0=a(r,-1);if(Y0==="%"&&W0!=="%")throw new R("invalid intrinsic syntax, expected closing `%`");else if(W0==="%"&&Y0!=="%")throw new R("invalid intrinsic syntax, expected opening `%`");var I0=[];return h(r,K0,function(c,s,S0,M0){I0[I0.length]=S0?h(M0,O0,"$1"):s||c}),I0},m=function(r,Y0){var W0=r,I0;if(A(P,W0))I0=P[W0],W0="%"+I0[0]+"%";if(A(H,W0)){var c=H[W0];if(c===F)c=q(W0);if(typeof c>"u"&&!Y0)throw new M("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:I0,name:W0,value:c}}throw new R("intrinsic "+r+" does not exist!")};I.exports=function(r,Y0){if(typeof r!=="string"||r.length===0)throw new M("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Y0!=="boolean")throw new M('"allowMissing" argument must be a boolean');if(J0(/^%?[^%]*%?$/,r)===null)throw new R("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var W0=d(r),I0=W0.length>0?W0[0]:"",c=m("%"+I0+"%",Y0),s=c.name,S0=c.value,M0=!1,z0=c.alias;if(z0)I0=z0[0],j(W0,k([0,1],z0));for(var c0=1,F0=!0;c0<W0.length;c0+=1){var q0=W0[c0],s0=a(q0,0,1),k0=a(q0,-1);if((s0==='"'||s0==="'"||s0==="`"||(k0==='"'||k0==="'"||k0==="`"))&&s0!==k0)throw new R("property names with quotes must have matching quotes");if(q0==="constructor"||!F0)M0=!0;if(I0+="."+q0,s="%"+I0+"%",A(H,s))S0=H[s];else if(S0!=null){if(!(q0 in S0)){if(!Y0)throw new M("base intrinsic for "+r+" exists, but the property is not available.");return}if(l&&c0+1>=W0.length){var n0=l(S0,q0);if(F0=!!n0,F0&&"get"in n0&&!("originalValue"in n0.get))S0=n0.get;else S0=S0[q0]}else F0=A(S0,q0),S0=S0[q0];if(F0&&!M0)H[s]=S0}}return S0}}),GY=A$(($,I)=>{var G=xE(),Z=gE(),_=Z([G("%String.prototype.indexOf%")]);I.exports=function(J,Y){var W=G(J,!!Y);if(typeof W==="function"&&_(J,".prototype.")>-1)return Z([W]);return W}}),pr=A$(($,I)=>{var G=o5()(),Z=GY(),_=Z("Object.prototype.toString"),J=function(R){if(G&&R&&typeof R==="object"&&Symbol.toStringTag in R)return!1;return _(R)==="[object Arguments]"},Y=function(R){if(J(R))return!0;return R!==null&&typeof R==="object"&&"length"in R&&typeof R.length==="number"&&R.length>=0&&_(R)!=="[object Array]"&&"callee"in R&&_(R.callee)==="[object Function]"},W=function(){return J(arguments)}();J.isLegacyArguments=Y,I.exports=W?J:Y}),cr=A$(($,I)=>{var G=GY(),Z=o5()(),_=ug(),J=XY(),Y;if(Z){if(W=G("RegExp.prototype.exec"),R={},M=function(){throw R},E={toString:M,valueOf:M},typeof Symbol.toPrimitive==="symbol")E[Symbol.toPrimitive]=M;Y=function(N){if(!N||typeof N!=="object")return!1;var B=J(N,"lastIndex"),x=B&&_(B,"value");if(!x)return!1;try{W(N,E)}catch(w){return w===R}}}else T=G("Object.prototype.toString"),S="[object RegExp]",Y=function(N){if(!N||typeof N!=="object"&&typeof N!=="function")return!1;return T(N)===S};var W,R,M,E,T,S;I.exports=Y}),lr=A$(($,I)=>{var G=GY(),Z=cr(),_=G("RegExp.prototype.exec"),J=Yz();I.exports=function(Y){if(!Z(Y))throw new J("`regex` must be a RegExp");return function(W){return _(Y,W)!==null}}}),mr=A$(($,I)=>{var G=function*(){}.constructor;I.exports=()=>G}),dr=A$(($,I)=>{var G=GY(),Z=lr(),_=Z(/^\s*(?:function)?\*/),J=o5()(),Y=wE(),W=G("Object.prototype.toString"),R=G("Function.prototype.toString"),M=mr();I.exports=function(E){if(typeof E!=="function")return!1;if(_(R(E)))return!0;if(!J){var T=W(E);return T==="[object GeneratorFunction]"}if(!Y)return!1;var S=M();return S&&Y(E)===S.prototype}}),ir=A$(($,I)=>{var G=Function.prototype.toString,Z=typeof Reflect==="object"&&Reflect!==null&&Reflect.apply,_,J;if(typeof Z==="function"&&typeof Object.defineProperty==="function")try{_=Object.defineProperty({},"length",{get:function(){throw J}}),J={},Z(function(){throw 42},null,_)}catch(l){if(l!==J)Z=null}else Z=null;var Y=/^\s*class\b/,W=function(l){try{var i=G.call(l);return Y.test(i)}catch($0){return!1}},R=function(l){try{if(W(l))return!1;return G.call(l),!0}catch(i){return!1}},M=Object.prototype.toString,E="[object Object]",T="[object Function]",S="[object GeneratorFunction]",N="[object HTMLAllCollection]",B="[object HTML document.all class]",x="[object HTMLCollection]",w=typeof Symbol==="function"&&!!Symbol.toStringTag,y=!(0 in[,]),g=function(){return!1};if(typeof document==="object"){if(b=document.all,M.call(b)===M.call(document.all))g=function(l){if((y||!l)&&(typeof l>"u"||typeof l==="object"))try{var i=M.call(l);return(i===N||i===B||i===x||i===E)&&l("")==null}catch($0){}return!1}}var b;I.exports=Z?function(l){if(g(l))return!0;if(!l)return!1;if(typeof l!=="function"&&typeof l!=="object")return!1;try{Z(l,null,_)}catch(i){if(i!==J)return!1}return!W(l)&&R(l)}:function(l){if(g(l))return!0;if(!l)return!1;if(typeof l!=="function"&&typeof l!=="object")return!1;if(w)return R(l);if(W(l))return!1;var i=M.call(l);if(i!==T&&i!==S&&!/^\[object HTML/.test(i))return!1;return R(l)}}),or=A$(($,I)=>{var G=ir(),Z=Object.prototype.toString,_=Object.prototype.hasOwnProperty,J=function(M,E,T){for(var S=0,N=M.length;S<N;S++)if(_.call(M,S))if(T==null)E(M[S],S,M);else E.call(T,M[S],S,M)},Y=function(M,E,T){for(var S=0,N=M.length;S<N;S++)if(T==null)E(M.charAt(S),S,M);else E.call(T,M.charAt(S),S,M)},W=function(M,E,T){for(var S in M)if(_.call(M,S))if(T==null)E(M[S],S,M);else E.call(T,M[S],S,M)};function R(M){return Z.call(M)==="[object Array]"}I.exports=function(M,E,T){if(!G(E))throw TypeError("iterator must be a function");var S;if(arguments.length>=3)S=T;if(R(M))J(M,E,S);else if(typeof M==="string")Y(M,E,S);else W(M,E,S)}}),tr=A$(($,I)=>{I.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}),rr=A$(($,I)=>{var G=tr(),Z=typeof globalThis>"u"?globalThis:globalThis;I.exports=function(){var _=[];for(var J=0;J<G.length;J++)if(typeof Z[G[J]]==="function")_[_.length]=G[J];return _}}),ng=A$(($,I)=>{var G=t5(),Z=fg(),_=Yz(),J=XY();I.exports=function(Y,W,R){if(!Y||typeof Y!=="object"&&typeof Y!=="function")throw new _("`obj` must be an object or a function`");if(typeof W!=="string"&&typeof W!=="symbol")throw new _("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null)throw new _("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null)throw new _("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null)throw new _("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=="boolean")throw new _("`loose`, if provided, must be a boolean");var M=arguments.length>3?arguments[3]:null,E=arguments.length>4?arguments[4]:null,T=arguments.length>5?arguments[5]:null,S=arguments.length>6?arguments[6]:!1,N=!!J&&J(Y,W);if(G)G(Y,W,{configurable:T===null&&N?N.configurable:!T,enumerable:M===null&&N?N.enumerable:!M,value:R,writable:E===null&&N?N.writable:!E});else if(S||!M&&!E&&!T)Y[W]=R;else throw new Z("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),pg=A$(($,I)=>{var G=t5(),Z=function(){return!!G};Z.hasArrayLengthDefineBug=function(){if(!G)return null;try{return G([],"length",{value:1}).length!==1}catch(_){return!0}},I.exports=Z}),ar=A$(($,I)=>{var G=xE(),Z=ng(),_=pg()(),J=XY(),Y=Yz(),W=G("%Math.floor%");I.exports=function(R,M){if(typeof R!=="function")throw new Y("`fn` is not a function");if(typeof M!=="number"||M<0||M>4294967295||W(M)!==M)throw new Y("`length` must be a positive 32-bit integer");var E=arguments.length>2&&!!arguments[2],T=!0,S=!0;if("length"in R&&J){var N=J(R,"length");if(N&&!N.configurable)T=!1;if(N&&!N.writable)S=!1}if(T||S||!E)if(_)Z(R,"length",M,!0,!0);else Z(R,"length",M);return R}}),sr=A$(($,I)=>{var G=Jz(),Z=kE(),_=hg();I.exports=function(){return _(G,Z,arguments)}}),r5=A$(($,I)=>{var G=ar(),Z=t5(),_=gE(),J=sr();if(I.exports=function(Y){var W=_(arguments),R=Y.length-(arguments.length-1);return G(W,1+(R>0?R:0),!0)},Z)Z(I.exports,"apply",{value:J});else I.exports.apply=J}),cg=A$(($,I)=>{var G=or(),Z=rr(),_=r5(),J=GY(),Y=XY(),W=wE(),R=J("Object.prototype.toString"),M=o5()(),E=typeof globalThis>"u"?globalThis:globalThis,T=Z(),S=J("String.prototype.slice"),N=J("Array.prototype.indexOf",!0)||function(y,g){for(var b=0;b<y.length;b+=1)if(y[b]===g)return b;return-1},B={__proto__:null};if(M&&Y&&W)G(T,function(y){var g=new E[y];if(Symbol.toStringTag in g&&W){var b=W(g),l=Y(b,Symbol.toStringTag);if(!l&&b){var i=W(b);l=Y(i,Symbol.toStringTag)}B["$"+y]=_(l.get)}});else G(T,function(y){var g=new E[y],b=g.slice||g.set;if(b)B["$"+y]=_(b)});var x=function(y){var g=!1;return G(B,function(b,l){if(!g)try{if("$"+b(y)===l)g=S(l,1)}catch(i){}}),g},w=function(y){var g=!1;return G(B,function(b,l){if(!g)try{b(y),g=S(l,1)}catch(i){}}),g};I.exports=function(y){if(!y||typeof y!=="object")return!1;if(!M){var g=S(R(y),8,-1);if(N(T,g)>-1)return g;if(g!=="Object")return!1;return w(y)}if(!Y)return null;return x(y)}}),er=A$(($,I)=>{var G=cg();I.exports=function(Z){return!!G(Z)}}),$a=A$(($)=>{var I=pr(),G=dr(),Z=cg(),_=er();function J(z0){return z0.call.bind(z0)}var Y=typeof BigInt<"u",W=typeof Symbol<"u",R=J(Object.prototype.toString),M=J(Number.prototype.valueOf),E=J(String.prototype.valueOf),T=J(Boolean.prototype.valueOf);if(Y)S=J(BigInt.prototype.valueOf);var S;if(W)N=J(Symbol.prototype.valueOf);var N;function B(z0,c0){if(typeof z0!=="object")return!1;try{return c0(z0),!0}catch(F0){return!1}}$.isArgumentsObject=I,$.isGeneratorFunction=G,$.isTypedArray=_;function x(z0){return typeof Promise<"u"&&z0 instanceof Promise||z0!==null&&typeof z0==="object"&&typeof z0.then==="function"&&typeof z0.catch==="function"}$.isPromise=x;function w(z0){if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)return ArrayBuffer.isView(z0);return _(z0)||j(z0)}$.isArrayBufferView=w;function y(z0){return Z(z0)==="Uint8Array"}$.isUint8Array=y;function g(z0){return Z(z0)==="Uint8ClampedArray"}$.isUint8ClampedArray=g;function b(z0){return Z(z0)==="Uint16Array"}$.isUint16Array=b;function l(z0){return Z(z0)==="Uint32Array"}$.isUint32Array=l;function i(z0){return Z(z0)==="Int8Array"}$.isInt8Array=i;function $0(z0){return Z(z0)==="Int16Array"}$.isInt16Array=$0;function Q0(z0){return Z(z0)==="Int32Array"}$.isInt32Array=Q0;function G0(z0){return Z(z0)==="Float32Array"}$.isFloat32Array=G0;function D0(z0){return Z(z0)==="Float64Array"}$.isFloat64Array=D0;function t(z0){return Z(z0)==="BigInt64Array"}$.isBigInt64Array=t;function P0(z0){return Z(z0)==="BigUint64Array"}$.isBigUint64Array=P0;function Q(z0){return R(z0)==="[object Map]"}Q.working=typeof Map<"u"&&Q(new Map);function D(z0){if(typeof Map>"u")return!1;return Q.working?Q(z0):z0 instanceof Map}$.isMap=D;function F(z0){return R(z0)==="[object Set]"}F.working=typeof Set<"u"&&F(new Set);function L(z0){if(typeof Set>"u")return!1;return F.working?F(z0):z0 instanceof Set}$.isSet=L;function H(z0){return R(z0)==="[object WeakMap]"}H.working=typeof WeakMap<"u"&&H(new WeakMap);function v(z0){if(typeof WeakMap>"u")return!1;return H.working?H(z0):z0 instanceof WeakMap}$.isWeakMap=v;function q(z0){return R(z0)==="[object WeakSet]"}q.working=typeof WeakSet<"u"&&q(new WeakSet);function P(z0){return q(z0)}$.isWeakSet=P;function O(z0){return R(z0)==="[object ArrayBuffer]"}O.working=typeof ArrayBuffer<"u"&&O(new ArrayBuffer);function A(z0){if(typeof ArrayBuffer>"u")return!1;return O.working?O(z0):z0 instanceof ArrayBuffer}$.isArrayBuffer=A;function k(z0){return R(z0)==="[object DataView]"}k.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&k(new DataView(new ArrayBuffer(1),0,1));function j(z0){if(typeof DataView>"u")return!1;return k.working?k(z0):z0 instanceof DataView}$.isDataView=j;var h=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function a(z0){return R(z0)==="[object SharedArrayBuffer]"}function J0(z0){if(typeof h>"u")return!1;if(typeof a.working>"u")a.working=a(new h);return a.working?a(z0):z0 instanceof h}$.isSharedArrayBuffer=J0;function K0(z0){return R(z0)==="[object AsyncFunction]"}$.isAsyncFunction=K0;function O0(z0){return R(z0)==="[object Map Iterator]"}$.isMapIterator=O0;function d(z0){return R(z0)==="[object Set Iterator]"}$.isSetIterator=d;function m(z0){return R(z0)==="[object Generator]"}$.isGeneratorObject=m;function r(z0){return R(z0)==="[object WebAssembly.Module]"}$.isWebAssemblyCompiledModule=r;function Y0(z0){return B(z0,M)}$.isNumberObject=Y0;function W0(z0){return B(z0,E)}$.isStringObject=W0;function I0(z0){return B(z0,T)}$.isBooleanObject=I0;function c(z0){return Y&&B(z0,S)}$.isBigIntObject=c;function s(z0){return W&&B(z0,N)}$.isSymbolObject=s;function S0(z0){return Y0(z0)||W0(z0)||I0(z0)||c(z0)||s(z0)}$.isBoxedPrimitive=S0;function M0(z0){return typeof Uint8Array<"u"&&(A(z0)||J0(z0))}$.isAnyArrayBuffer=M0,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(z0){Object.defineProperty($,z0,{enumerable:!1,value:function(){throw Error(z0+" is not supported in userland")}})})}),Ua=A$(($,I)=>{I.exports=function(G){return G instanceof Buffer}}),Ia=A$(($,I)=>{if(typeof Object.create==="function")I.exports=function(G,Z){if(Z)G.super_=Z,G.prototype=Object.create(Z.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}})};else I.exports=function(G,Z){if(Z){G.super_=Z;var _=function(){};_.prototype=Z.prototype,G.prototype=new _,G.prototype.constructor=G}}}),_a=A$(($,I)=>{try{if(G=(C2(),V$(v2)),typeof G.inherits!=="function")throw"";I.exports=G.inherits}catch(Z){I.exports=Ia()}var G}),Gz=A$(($)=>{var I=Object.getOwnPropertyDescriptors||function(A){var k=Object.keys(A),j={};for(var h=0;h<k.length;h++)j[k[h]]=Object.getOwnPropertyDescriptor(A,k[h]);return j},G=/%[sdj%]/g;$.format=function(A){if(!l(A)){var k=[];for(var j=0;j<arguments.length;j++)k.push(J(arguments[j]));return k.join(" ")}var j=1,h=arguments,a=h.length,J0=String(A).replace(G,function(O0){if(O0==="%%")return"%";if(j>=a)return O0;switch(O0){case"%s":return String(h[j++]);case"%d":return Number(h[j++]);case"%j":try{return JSON.stringify(h[j++])}catch(d){return"[Circular]"}default:return O0}});for(var K0=h[j];j<a;K0=h[++j])if(y(K0)||!G0(K0))J0+=" "+K0;else J0+=" "+J(K0);return J0},$.deprecate=function(A,k){if(typeof process<"u"&&process.noDeprecation===!0)return A;if(typeof process>"u")return function(){return $.deprecate(A,k).apply(this,arguments)};var j=!1;function h(){if(!j){if(process.throwDeprecation)throw Error(k);else if(process.traceDeprecation)console.trace(k);else console.error(k);j=!0}return A.apply(this,arguments)}return h};var Z={},_=/^$/;$.debuglog=function(A){if(A=A.toUpperCase(),!Z[A])if(_.test(A)){var k=process.pid;Z[A]=function(){var j=$.format.apply($,arguments);console.error("%s %d: %s",A,k,j)}}else Z[A]=function(){};return Z[A]};function J(A,k){var j={seen:[],stylize:W};if(arguments.length>=3)j.depth=arguments[2];if(arguments.length>=4)j.colors=arguments[3];if(w(k))j.showHidden=k;else if(k)$._extend(j,k);if($0(j.showHidden))j.showHidden=!1;if($0(j.depth))j.depth=2;if($0(j.colors))j.colors=!1;if($0(j.customInspect))j.customInspect=!0;if(j.colors)j.stylize=Y;return M(j,A,j.depth)}$.inspect=J,J.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},J.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Y(A,k){var j=J.styles[k];if(j)return"\x1B["+J.colors[j][0]+"m"+A+"\x1B["+J.colors[j][1]+"m";else return A}function W(A,k){return A}function R(A){var k={};return A.forEach(function(j,h){k[j]=!0}),k}function M(A,k,j){if(A.customInspect&&k&&P0(k.inspect)&&k.inspect!==$.inspect&&!(k.constructor&&k.constructor.prototype===k)){var h=k.inspect(j,A);if(!l(h))h=M(A,h,j);return h}var a=E(A,k);if(a)return a;var J0=Object.keys(k),K0=R(J0);if(A.showHidden)J0=Object.getOwnPropertyNames(k);if(t(k)&&(J0.indexOf("message")>=0||J0.indexOf("description")>=0))return T(k);if(J0.length===0){if(P0(k)){var O0=k.name?": "+k.name:"";return A.stylize("[Function"+O0+"]","special")}if(Q0(k))return A.stylize(RegExp.prototype.toString.call(k),"regexp");if(D0(k))return A.stylize(Date.prototype.toString.call(k),"date");if(t(k))return T(k)}var d="",m=!1,r=["{","}"];if(x(k))m=!0,r=["[","]"];if(P0(k)){var Y0=k.name?": "+k.name:"";d=" [Function"+Y0+"]"}if(Q0(k))d=" "+RegExp.prototype.toString.call(k);if(D0(k))d=" "+Date.prototype.toUTCString.call(k);if(t(k))d=" "+T(k);if(J0.length===0&&(!m||k.length==0))return r[0]+d+r[1];if(j<0)if(Q0(k))return A.stylize(RegExp.prototype.toString.call(k),"regexp");else return A.stylize("[Object]","special");A.seen.push(k);var W0;if(m)W0=S(A,k,j,K0,J0);else W0=J0.map(function(I0){return N(A,k,j,K0,I0,m)});return A.seen.pop(),B(W0,d,r)}function E(A,k){if($0(k))return A.stylize("undefined","undefined");if(l(k)){var j="'"+JSON.stringify(k).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return A.stylize(j,"string")}if(b(k))return A.stylize(""+k,"number");if(w(k))return A.stylize(""+k,"boolean");if(y(k))return A.stylize("null","null")}function T(A){return"["+Error.prototype.toString.call(A)+"]"}function S(A,k,j,h,a){var J0=[];for(var K0=0,O0=k.length;K0<O0;++K0)if(v(k,String(K0)))J0.push(N(A,k,j,h,String(K0),!0));else J0.push("");return a.forEach(function(d){if(!d.match(/^\d+$/))J0.push(N(A,k,j,h,d,!0))}),J0}function N(A,k,j,h,a,J0){var K0,O0,d;if(d=Object.getOwnPropertyDescriptor(k,a)||{value:k[a]},d.get)if(d.set)O0=A.stylize("[Getter/Setter]","special");else O0=A.stylize("[Getter]","special");else if(d.set)O0=A.stylize("[Setter]","special");if(!v(h,a))K0="["+a+"]";if(!O0)if(A.seen.indexOf(d.value)<0){if(y(j))O0=M(A,d.value,null);else O0=M(A,d.value,j-1);if(O0.indexOf(`
247
247
  `)>-1)if(J0)O0=O0.split(`
248
248
  `).map(function(m){return" "+m}).join(`
249
249
  `).slice(2);else O0=`
@@ -313,12 +313,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
313
313
  `))}throw Y0}};function K0(d,m,r,Y0,W0){if(!l(m))throw new T("regexp","RegExp",m);var I0=W0==="match";if(typeof d!=="string"||Q0(m,d)!==I0){if(r instanceof Error)throw r;var c=!r;r=r||(typeof d!=="string"?'The "string" argument must be of type string. Received type '+"".concat(G(d)," (").concat(y(d),")"):(I0?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(y(m),`. Input:
314
314
 
315
315
  `).concat(y(d),`
316
- `));var s=new x({actual:d,expected:m,message:r,operator:W0,stackStartFn:Y0});throw s.generatedMessage=c,s}}Q.match=function d(m,r,Y0){K0(m,r,Y0,d,"match")},Q.doesNotMatch=function d(m,r,Y0){K0(m,r,Y0,d,"doesNotMatch")};function O0(){for(var d=arguments.length,m=Array(d),r=0;r<d;r++)m[r]=arguments[r];H.apply(void 0,[O0,m.length].concat(m))}Q.strict=i(O0,Q,{equal:Q.strictEqual,deepEqual:Q.deepStrictEqual,notEqual:Q.notStrictEqual,notDeepEqual:Q.notDeepStrictEqual}),Q.strict.strict=Q.strict}),rg=Pr(qE(),1),{AssertionError:Ka,CallTracker:Wa,deepEqual:Ha,deepStrictEqual:Fa,doesNotMatch:Ta,doesNotReject:Ma,doesNotThrow:Aa,equal:Ea,fail:Ra,ifError:Pa,match:Va,notDeepEqual:Sa,notDeepStrictEqual:va,notEqual:Ca,notStrictEqual:qa,ok:Na,rejects:Ba,strict:ja,strictEqual:ka,throws:ga}=rg,wa=rg});var _w={};LU(_w,{default:()=>oa});var xa,fa,Qz,hE,uE,ya=($,I,G)=>{for(let Z of hE(I))if(!uE.call($,Z)&&Z!=="default")Qz($,Z,{get:()=>I[Z],enumerable:!0});if(G){for(let Z of hE(I))if(!uE.call(G,Z)&&Z!=="default")Qz(G,Z,{get:()=>I[Z],enumerable:!0});return G}},ag=($,I,G)=>{G=$!=null?xa(fa($)):{};let Z=I||!$||!$.__esModule?Qz(G,"default",{value:$,enumerable:!0}):G;for(let _ of hE($))if(!uE.call(Z,_))Qz(Z,_,{get:()=>$[_],enumerable:!0});return Z},b6=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports),ba=($,I)=>{for(var G in I)Qz($,G,{get:I[G],enumerable:!0,configurable:!0,set:(Z)=>I[G]=()=>Z})},ha,s5,ua,sg,eg,na,pa,ca,la,ma,da,ia,$w,Uw,Iw,oa;var Xw=WI(()=>{xa=Object.create,{getPrototypeOf:fa,defineProperty:Qz,getOwnPropertyNames:hE}=Object,uE=Object.prototype.hasOwnProperty,ha=b6(($,I)=>{function G(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}I.exports=G}),s5=b6(($)=>{var I=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function G(J,Y){return Object.prototype.hasOwnProperty.call(J,Y)}$.assign=function(J){var Y=Array.prototype.slice.call(arguments,1);while(Y.length){var W=Y.shift();if(!W)continue;if(typeof W!=="object")throw TypeError(W+"must be non-object");for(var R in W)if(G(W,R))J[R]=W[R]}return J},$.shrinkBuf=function(J,Y){if(J.length===Y)return J;if(J.subarray)return J.subarray(0,Y);return J.length=Y,J};var Z={arraySet:function(J,Y,W,R,M){if(Y.subarray&&J.subarray){J.set(Y.subarray(W,W+R),M);return}for(var E=0;E<R;E++)J[M+E]=Y[W+E]},flattenChunks:function(J){var Y,W,R,M,E,T;R=0;for(Y=0,W=J.length;Y<W;Y++)R+=J[Y].length;T=new Uint8Array(R),M=0;for(Y=0,W=J.length;Y<W;Y++)E=J[Y],T.set(E,M),M+=E.length;return T}},_={arraySet:function(J,Y,W,R,M){for(var E=0;E<R;E++)J[M+E]=Y[W+E]},flattenChunks:function(J){return[].concat.apply([],J)}};$.setTyped=function(J){if(J)$.Buf8=Uint8Array,$.Buf16=Uint16Array,$.Buf32=Int32Array,$.assign($,Z);else $.Buf8=Array,$.Buf16=Array,$.Buf32=Array,$.assign($,_)},$.setTyped(I)}),ua=b6(($)=>{var I=s5(),G=4,Z=0,_=1,J=2;function Y(L0){var N0=L0.length;while(--N0>=0)L0[N0]=0}var W=0,R=1,M=2,E=3,T=258,S=29,N=256,B=N+1+S,x=30,w=19,y=2*B+1,g=15,b=16,l=7,i=256,$0=16,Q0=17,G0=18,D0=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],t=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],P0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],D=512,F=Array((B+2)*2);Y(F);var L=Array(x*2);Y(L);var H=Array(D);Y(H);var v=Array(T-E+1);Y(v);var q=Array(S);Y(q);var P=Array(x);Y(P);function O(L0,N0,B0,Y$,u){this.static_tree=L0,this.extra_bits=N0,this.extra_base=B0,this.elems=Y$,this.max_length=u,this.has_stree=L0&&L0.length}var A,k,j;function h(L0,N0){this.dyn_tree=L0,this.max_code=0,this.stat_desc=N0}function a(L0){return L0<256?H[L0]:H[256+(L0>>>7)]}function J0(L0,N0){L0.pending_buf[L0.pending++]=N0&255,L0.pending_buf[L0.pending++]=N0>>>8&255}function K0(L0,N0,B0){if(L0.bi_valid>b-B0)L0.bi_buf|=N0<<L0.bi_valid&65535,J0(L0,L0.bi_buf),L0.bi_buf=N0>>b-L0.bi_valid,L0.bi_valid+=B0-b;else L0.bi_buf|=N0<<L0.bi_valid&65535,L0.bi_valid+=B0}function O0(L0,N0,B0){K0(L0,B0[N0*2],B0[N0*2+1])}function d(L0,N0){var B0=0;do B0|=L0&1,L0>>>=1,B0<<=1;while(--N0>0);return B0>>>1}function m(L0){if(L0.bi_valid===16)J0(L0,L0.bi_buf),L0.bi_buf=0,L0.bi_valid=0;else if(L0.bi_valid>=8)L0.pending_buf[L0.pending++]=L0.bi_buf&255,L0.bi_buf>>=8,L0.bi_valid-=8}function r(L0,N0){var{dyn_tree:B0,max_code:Y$}=N0,u=N0.stat_desc.static_tree,_0=N0.stat_desc.has_stree,o=N0.stat_desc.extra_bits,R0=N0.stat_desc.extra_base,x0=N0.stat_desc.max_length,p,A0,v0,X0,H0,C0,H$=0;for(X0=0;X0<=g;X0++)L0.bl_count[X0]=0;B0[L0.heap[L0.heap_max]*2+1]=0;for(p=L0.heap_max+1;p<y;p++){if(A0=L0.heap[p],X0=B0[B0[A0*2+1]*2+1]+1,X0>x0)X0=x0,H$++;if(B0[A0*2+1]=X0,A0>Y$)continue;if(L0.bl_count[X0]++,H0=0,A0>=R0)H0=o[A0-R0];if(C0=B0[A0*2],L0.opt_len+=C0*(X0+H0),_0)L0.static_len+=C0*(u[A0*2+1]+H0)}if(H$===0)return;do{X0=x0-1;while(L0.bl_count[X0]===0)X0--;L0.bl_count[X0]--,L0.bl_count[X0+1]+=2,L0.bl_count[x0]--,H$-=2}while(H$>0);for(X0=x0;X0!==0;X0--){A0=L0.bl_count[X0];while(A0!==0){if(v0=L0.heap[--p],v0>Y$)continue;if(B0[v0*2+1]!==X0)L0.opt_len+=(X0-B0[v0*2+1])*B0[v0*2],B0[v0*2+1]=X0;A0--}}}function Y0(L0,N0,B0){var Y$=Array(g+1),u=0,_0,o;for(_0=1;_0<=g;_0++)Y$[_0]=u=u+B0[_0-1]<<1;for(o=0;o<=N0;o++){var R0=L0[o*2+1];if(R0===0)continue;L0[o*2]=d(Y$[R0]++,R0)}}function W0(){var L0,N0,B0,Y$,u,_0=Array(g+1);B0=0;for(Y$=0;Y$<S-1;Y$++){q[Y$]=B0;for(L0=0;L0<1<<D0[Y$];L0++)v[B0++]=Y$}v[B0-1]=Y$,u=0;for(Y$=0;Y$<16;Y$++){P[Y$]=u;for(L0=0;L0<1<<t[Y$];L0++)H[u++]=Y$}u>>=7;for(;Y$<x;Y$++){P[Y$]=u<<7;for(L0=0;L0<1<<t[Y$]-7;L0++)H[256+u++]=Y$}for(N0=0;N0<=g;N0++)_0[N0]=0;L0=0;while(L0<=143)F[L0*2+1]=8,L0++,_0[8]++;while(L0<=255)F[L0*2+1]=9,L0++,_0[9]++;while(L0<=279)F[L0*2+1]=7,L0++,_0[7]++;while(L0<=287)F[L0*2+1]=8,L0++,_0[8]++;Y0(F,B+1,_0);for(L0=0;L0<x;L0++)L[L0*2+1]=5,L[L0*2]=d(L0,5);A=new O(F,D0,N+1,B,g),k=new O(L,t,0,x,g),j=new O([],P0,0,w,l)}function I0(L0){var N0;for(N0=0;N0<B;N0++)L0.dyn_ltree[N0*2]=0;for(N0=0;N0<x;N0++)L0.dyn_dtree[N0*2]=0;for(N0=0;N0<w;N0++)L0.bl_tree[N0*2]=0;L0.dyn_ltree[i*2]=1,L0.opt_len=L0.static_len=0,L0.last_lit=L0.matches=0}function c(L0){if(L0.bi_valid>8)J0(L0,L0.bi_buf);else if(L0.bi_valid>0)L0.pending_buf[L0.pending++]=L0.bi_buf;L0.bi_buf=0,L0.bi_valid=0}function s(L0,N0,B0,Y$){if(c(L0),Y$)J0(L0,B0),J0(L0,~B0);I.arraySet(L0.pending_buf,L0.window,N0,B0,L0.pending),L0.pending+=B0}function S0(L0,N0,B0,Y$){var u=N0*2,_0=B0*2;return L0[u]<L0[_0]||L0[u]===L0[_0]&&Y$[N0]<=Y$[B0]}function M0(L0,N0,B0){var Y$=L0.heap[B0],u=B0<<1;while(u<=L0.heap_len){if(u<L0.heap_len&&S0(N0,L0.heap[u+1],L0.heap[u],L0.depth))u++;if(S0(N0,Y$,L0.heap[u],L0.depth))break;L0.heap[B0]=L0.heap[u],B0=u,u<<=1}L0.heap[B0]=Y$}function z0(L0,N0,B0){var Y$,u,_0=0,o,R0;if(L0.last_lit!==0)do if(Y$=L0.pending_buf[L0.d_buf+_0*2]<<8|L0.pending_buf[L0.d_buf+_0*2+1],u=L0.pending_buf[L0.l_buf+_0],_0++,Y$===0)O0(L0,u,N0);else{if(o=v[u],O0(L0,o+N+1,N0),R0=D0[o],R0!==0)u-=q[o],K0(L0,u,R0);if(Y$--,o=a(Y$),O0(L0,o,B0),R0=t[o],R0!==0)Y$-=P[o],K0(L0,Y$,R0)}while(_0<L0.last_lit);O0(L0,i,N0)}function c0(L0,N0){var B0=N0.dyn_tree,Y$=N0.stat_desc.static_tree,u=N0.stat_desc.has_stree,_0=N0.stat_desc.elems,o,R0,x0=-1,p;L0.heap_len=0,L0.heap_max=y;for(o=0;o<_0;o++)if(B0[o*2]!==0)L0.heap[++L0.heap_len]=x0=o,L0.depth[o]=0;else B0[o*2+1]=0;while(L0.heap_len<2)if(p=L0.heap[++L0.heap_len]=x0<2?++x0:0,B0[p*2]=1,L0.depth[p]=0,L0.opt_len--,u)L0.static_len-=Y$[p*2+1];N0.max_code=x0;for(o=L0.heap_len>>1;o>=1;o--)M0(L0,B0,o);p=_0;do o=L0.heap[1],L0.heap[1]=L0.heap[L0.heap_len--],M0(L0,B0,1),R0=L0.heap[1],L0.heap[--L0.heap_max]=o,L0.heap[--L0.heap_max]=R0,B0[p*2]=B0[o*2]+B0[R0*2],L0.depth[p]=(L0.depth[o]>=L0.depth[R0]?L0.depth[o]:L0.depth[R0])+1,B0[o*2+1]=B0[R0*2+1]=p,L0.heap[1]=p++,M0(L0,B0,1);while(L0.heap_len>=2);L0.heap[--L0.heap_max]=L0.heap[1],r(L0,N0),Y0(B0,x0,L0.bl_count)}function F0(L0,N0,B0){var Y$,u=-1,_0,o=N0[1],R0=0,x0=7,p=4;if(o===0)x0=138,p=3;N0[(B0+1)*2+1]=65535;for(Y$=0;Y$<=B0;Y$++){if(_0=o,o=N0[(Y$+1)*2+1],++R0<x0&&_0===o)continue;else if(R0<p)L0.bl_tree[_0*2]+=R0;else if(_0!==0){if(_0!==u)L0.bl_tree[_0*2]++;L0.bl_tree[$0*2]++}else if(R0<=10)L0.bl_tree[Q0*2]++;else L0.bl_tree[G0*2]++;if(R0=0,u=_0,o===0)x0=138,p=3;else if(_0===o)x0=6,p=3;else x0=7,p=4}}function q0(L0,N0,B0){var Y$,u=-1,_0,o=N0[1],R0=0,x0=7,p=4;if(o===0)x0=138,p=3;for(Y$=0;Y$<=B0;Y$++){if(_0=o,o=N0[(Y$+1)*2+1],++R0<x0&&_0===o)continue;else if(R0<p)do O0(L0,_0,L0.bl_tree);while(--R0!==0);else if(_0!==0){if(_0!==u)O0(L0,_0,L0.bl_tree),R0--;O0(L0,$0,L0.bl_tree),K0(L0,R0-3,2)}else if(R0<=10)O0(L0,Q0,L0.bl_tree),K0(L0,R0-3,3);else O0(L0,G0,L0.bl_tree),K0(L0,R0-11,7);if(R0=0,u=_0,o===0)x0=138,p=3;else if(_0===o)x0=6,p=3;else x0=7,p=4}}function s0(L0){var N0;F0(L0,L0.dyn_ltree,L0.l_desc.max_code),F0(L0,L0.dyn_dtree,L0.d_desc.max_code),c0(L0,L0.bl_desc);for(N0=w-1;N0>=3;N0--)if(L0.bl_tree[Q[N0]*2+1]!==0)break;return L0.opt_len+=3*(N0+1)+5+5+4,N0}function k0(L0,N0,B0,Y$){var u;K0(L0,N0-257,5),K0(L0,B0-1,5),K0(L0,Y$-4,4);for(u=0;u<Y$;u++)K0(L0,L0.bl_tree[Q[u]*2+1],3);q0(L0,L0.dyn_ltree,N0-1),q0(L0,L0.dyn_dtree,B0-1)}function n0(L0){var N0=4093624447,B0;for(B0=0;B0<=31;B0++,N0>>>=1)if(N0&1&&L0.dyn_ltree[B0*2]!==0)return Z;if(L0.dyn_ltree[18]!==0||L0.dyn_ltree[20]!==0||L0.dyn_ltree[26]!==0)return _;for(B0=32;B0<N;B0++)if(L0.dyn_ltree[B0*2]!==0)return _;return Z}var M$=!1;function T0(L0){if(!M$)W0(),M$=!0;L0.l_desc=new h(L0.dyn_ltree,A),L0.d_desc=new h(L0.dyn_dtree,k),L0.bl_desc=new h(L0.bl_tree,j),L0.bi_buf=0,L0.bi_valid=0,I0(L0)}function V0(L0,N0,B0,Y$){K0(L0,(W<<1)+(Y$?1:0),3),s(L0,N0,B0,!0)}function X$(L0){K0(L0,R<<1,3),O0(L0,i,F),m(L0)}function p0(L0,N0,B0,Y$){var u,_0,o=0;if(L0.level>0){if(L0.strm.data_type===J)L0.strm.data_type=n0(L0);if(c0(L0,L0.l_desc),c0(L0,L0.d_desc),o=s0(L0),u=L0.opt_len+3+7>>>3,_0=L0.static_len+3+7>>>3,_0<=u)u=_0}else u=_0=B0+5;if(B0+4<=u&&N0!==-1)V0(L0,N0,B0,Y$);else if(L0.strategy===G||_0===u)K0(L0,(R<<1)+(Y$?1:0),3),z0(L0,F,L);else K0(L0,(M<<1)+(Y$?1:0),3),k0(L0,L0.l_desc.max_code+1,L0.d_desc.max_code+1,o+1),z0(L0,L0.dyn_ltree,L0.dyn_dtree);if(I0(L0),Y$)c(L0)}function l0(L0,N0,B0){if(L0.pending_buf[L0.d_buf+L0.last_lit*2]=N0>>>8&255,L0.pending_buf[L0.d_buf+L0.last_lit*2+1]=N0&255,L0.pending_buf[L0.l_buf+L0.last_lit]=B0&255,L0.last_lit++,N0===0)L0.dyn_ltree[B0*2]++;else L0.matches++,N0--,L0.dyn_ltree[(v[B0]+N+1)*2]++,L0.dyn_dtree[a(N0)*2]++;return L0.last_lit===L0.lit_bufsize-1}$._tr_init=T0,$._tr_stored_block=V0,$._tr_flush_block=p0,$._tr_tally=l0,$._tr_align=X$}),sg=b6(($,I)=>{function G(Z,_,J,Y){var W=Z&65535|0,R=Z>>>16&65535|0,M=0;while(J!==0){M=J>2000?2000:J,J-=M;do W=W+_[Y++]|0,R=R+W|0;while(--M);W%=65521,R%=65521}return W|R<<16|0}I.exports=G}),eg=b6(($,I)=>{function G(){var J,Y=[];for(var W=0;W<256;W++){J=W;for(var R=0;R<8;R++)J=J&1?3988292384^J>>>1:J>>>1;Y[W]=J}return Y}var Z=G();function _(J,Y,W,R){var M=Z,E=R+W;J^=-1;for(var T=R;T<E;T++)J=J>>>8^M[(J^Y[T])&255];return J^-1}I.exports=_}),na=b6(($,I)=>{I.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}}),pa=b6(($)=>{var I=s5(),G=ua(),Z=sg(),_=eg(),J=na(),Y=0,W=1,R=3,M=4,E=5,T=0,S=1,N=-2,B=-3,x=-5,w=-1,y=1,g=2,b=3,l=4,i=0,$0=2,Q0=8,G0=9,D0=15,t=8,P0=29,Q=256,D=Q+1+P0,F=30,L=19,H=2*D+1,v=15,q=3,P=258,O=P+q+1,A=32,k=42,j=69,h=73,a=91,J0=103,K0=113,O0=666,d=1,m=2,r=3,Y0=4,W0=3;function I0(p,A0){return p.msg=J[A0],A0}function c(p){return(p<<1)-(p>4?9:0)}function s(p){var A0=p.length;while(--A0>=0)p[A0]=0}function S0(p){var A0=p.state,v0=A0.pending;if(v0>p.avail_out)v0=p.avail_out;if(v0===0)return;if(I.arraySet(p.output,A0.pending_buf,A0.pending_out,v0,p.next_out),p.next_out+=v0,A0.pending_out+=v0,p.total_out+=v0,p.avail_out-=v0,A0.pending-=v0,A0.pending===0)A0.pending_out=0}function M0(p,A0){G._tr_flush_block(p,p.block_start>=0?p.block_start:-1,p.strstart-p.block_start,A0),p.block_start=p.strstart,S0(p.strm)}function z0(p,A0){p.pending_buf[p.pending++]=A0}function c0(p,A0){p.pending_buf[p.pending++]=A0>>>8&255,p.pending_buf[p.pending++]=A0&255}function F0(p,A0,v0,X0){var H0=p.avail_in;if(H0>X0)H0=X0;if(H0===0)return 0;if(p.avail_in-=H0,I.arraySet(A0,p.input,p.next_in,H0,v0),p.state.wrap===1)p.adler=Z(p.adler,A0,H0,v0);else if(p.state.wrap===2)p.adler=_(p.adler,A0,H0,v0);return p.next_in+=H0,p.total_in+=H0,H0}function q0(p,A0){var{max_chain_length:v0,strstart:X0}=p,H0,C0,H$=p.prev_length,d0=p.nice_match,e=p.strstart>p.w_size-O?p.strstart-(p.w_size-O):0,E0=p.window,b0=p.w_mask,f0=p.prev,z$=p.strstart+P,a0=E0[X0+H$-1],U$=E0[X0+H$];if(p.prev_length>=p.good_match)v0>>=2;if(d0>p.lookahead)d0=p.lookahead;do{if(H0=A0,E0[H0+H$]!==U$||E0[H0+H$-1]!==a0||E0[H0]!==E0[X0]||E0[++H0]!==E0[X0+1])continue;X0+=2,H0++;do;while(E0[++X0]===E0[++H0]&&E0[++X0]===E0[++H0]&&E0[++X0]===E0[++H0]&&E0[++X0]===E0[++H0]&&E0[++X0]===E0[++H0]&&E0[++X0]===E0[++H0]&&E0[++X0]===E0[++H0]&&E0[++X0]===E0[++H0]&&X0<z$);if(C0=P-(z$-X0),X0=z$-P,C0>H$){if(p.match_start=A0,H$=C0,C0>=d0)break;a0=E0[X0+H$-1],U$=E0[X0+H$]}}while((A0=f0[A0&b0])>e&&--v0!==0);if(H$<=p.lookahead)return H$;return p.lookahead}function s0(p){var A0=p.w_size,v0,X0,H0,C0,H$;do{if(C0=p.window_size-p.lookahead-p.strstart,p.strstart>=A0+(A0-O)){I.arraySet(p.window,p.window,A0,A0,0),p.match_start-=A0,p.strstart-=A0,p.block_start-=A0,X0=p.hash_size,v0=X0;do H0=p.head[--v0],p.head[v0]=H0>=A0?H0-A0:0;while(--X0);X0=A0,v0=X0;do H0=p.prev[--v0],p.prev[v0]=H0>=A0?H0-A0:0;while(--X0);C0+=A0}if(p.strm.avail_in===0)break;if(X0=F0(p.strm,p.window,p.strstart+p.lookahead,C0),p.lookahead+=X0,p.lookahead+p.insert>=q){H$=p.strstart-p.insert,p.ins_h=p.window[H$],p.ins_h=(p.ins_h<<p.hash_shift^p.window[H$+1])&p.hash_mask;while(p.insert)if(p.ins_h=(p.ins_h<<p.hash_shift^p.window[H$+q-1])&p.hash_mask,p.prev[H$&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=H$,H$++,p.insert--,p.lookahead+p.insert<q)break}}while(p.lookahead<O&&p.strm.avail_in!==0)}function k0(p,A0){var v0=65535;if(v0>p.pending_buf_size-5)v0=p.pending_buf_size-5;for(;;){if(p.lookahead<=1){if(s0(p),p.lookahead===0&&A0===Y)return d;if(p.lookahead===0)break}p.strstart+=p.lookahead,p.lookahead=0;var X0=p.block_start+v0;if(p.strstart===0||p.strstart>=X0){if(p.lookahead=p.strstart-X0,p.strstart=X0,M0(p,!1),p.strm.avail_out===0)return d}if(p.strstart-p.block_start>=p.w_size-O){if(M0(p,!1),p.strm.avail_out===0)return d}}if(p.insert=0,A0===M){if(M0(p,!0),p.strm.avail_out===0)return r;return Y0}if(p.strstart>p.block_start){if(M0(p,!1),p.strm.avail_out===0)return d}return d}function n0(p,A0){var v0,X0;for(;;){if(p.lookahead<O){if(s0(p),p.lookahead<O&&A0===Y)return d;if(p.lookahead===0)break}if(v0=0,p.lookahead>=q)p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+q-1])&p.hash_mask,v0=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart;if(v0!==0&&p.strstart-v0<=p.w_size-O)p.match_length=q0(p,v0);if(p.match_length>=q)if(X0=G._tr_tally(p,p.strstart-p.match_start,p.match_length-q),p.lookahead-=p.match_length,p.match_length<=p.max_lazy_match&&p.lookahead>=q){p.match_length--;do p.strstart++,p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+q-1])&p.hash_mask,v0=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart;while(--p.match_length!==0);p.strstart++}else p.strstart+=p.match_length,p.match_length=0,p.ins_h=p.window[p.strstart],p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+1])&p.hash_mask;else X0=G._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++;if(X0){if(M0(p,!1),p.strm.avail_out===0)return d}}if(p.insert=p.strstart<q-1?p.strstart:q-1,A0===M){if(M0(p,!0),p.strm.avail_out===0)return r;return Y0}if(p.last_lit){if(M0(p,!1),p.strm.avail_out===0)return d}return m}function M$(p,A0){var v0,X0,H0;for(;;){if(p.lookahead<O){if(s0(p),p.lookahead<O&&A0===Y)return d;if(p.lookahead===0)break}if(v0=0,p.lookahead>=q)p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+q-1])&p.hash_mask,v0=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart;if(p.prev_length=p.match_length,p.prev_match=p.match_start,p.match_length=q-1,v0!==0&&p.prev_length<p.max_lazy_match&&p.strstart-v0<=p.w_size-O){if(p.match_length=q0(p,v0),p.match_length<=5&&(p.strategy===y||p.match_length===q&&p.strstart-p.match_start>4096))p.match_length=q-1}if(p.prev_length>=q&&p.match_length<=p.prev_length){H0=p.strstart+p.lookahead-q,X0=G._tr_tally(p,p.strstart-1-p.prev_match,p.prev_length-q),p.lookahead-=p.prev_length-1,p.prev_length-=2;do if(++p.strstart<=H0)p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+q-1])&p.hash_mask,v0=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart;while(--p.prev_length!==0);if(p.match_available=0,p.match_length=q-1,p.strstart++,X0){if(M0(p,!1),p.strm.avail_out===0)return d}}else if(p.match_available){if(X0=G._tr_tally(p,0,p.window[p.strstart-1]),X0)M0(p,!1);if(p.strstart++,p.lookahead--,p.strm.avail_out===0)return d}else p.match_available=1,p.strstart++,p.lookahead--}if(p.match_available)X0=G._tr_tally(p,0,p.window[p.strstart-1]),p.match_available=0;if(p.insert=p.strstart<q-1?p.strstart:q-1,A0===M){if(M0(p,!0),p.strm.avail_out===0)return r;return Y0}if(p.last_lit){if(M0(p,!1),p.strm.avail_out===0)return d}return m}function T0(p,A0){var v0,X0,H0,C0,H$=p.window;for(;;){if(p.lookahead<=P){if(s0(p),p.lookahead<=P&&A0===Y)return d;if(p.lookahead===0)break}if(p.match_length=0,p.lookahead>=q&&p.strstart>0){if(H0=p.strstart-1,X0=H$[H0],X0===H$[++H0]&&X0===H$[++H0]&&X0===H$[++H0]){C0=p.strstart+P;do;while(X0===H$[++H0]&&X0===H$[++H0]&&X0===H$[++H0]&&X0===H$[++H0]&&X0===H$[++H0]&&X0===H$[++H0]&&X0===H$[++H0]&&X0===H$[++H0]&&H0<C0);if(p.match_length=P-(C0-H0),p.match_length>p.lookahead)p.match_length=p.lookahead}}if(p.match_length>=q)v0=G._tr_tally(p,1,p.match_length-q),p.lookahead-=p.match_length,p.strstart+=p.match_length,p.match_length=0;else v0=G._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++;if(v0){if(M0(p,!1),p.strm.avail_out===0)return d}}if(p.insert=0,A0===M){if(M0(p,!0),p.strm.avail_out===0)return r;return Y0}if(p.last_lit){if(M0(p,!1),p.strm.avail_out===0)return d}return m}function V0(p,A0){var v0;for(;;){if(p.lookahead===0){if(s0(p),p.lookahead===0){if(A0===Y)return d;break}}if(p.match_length=0,v0=G._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++,v0){if(M0(p,!1),p.strm.avail_out===0)return d}}if(p.insert=0,A0===M){if(M0(p,!0),p.strm.avail_out===0)return r;return Y0}if(p.last_lit){if(M0(p,!1),p.strm.avail_out===0)return d}return m}function X$(p,A0,v0,X0,H0){this.good_length=p,this.max_lazy=A0,this.nice_length=v0,this.max_chain=X0,this.func=H0}var p0=[new X$(0,0,0,0,k0),new X$(4,4,8,4,n0),new X$(4,5,16,8,n0),new X$(4,6,32,32,n0),new X$(4,4,16,16,M$),new X$(8,16,32,32,M$),new X$(8,16,128,128,M$),new X$(8,32,128,256,M$),new X$(32,128,258,1024,M$),new X$(32,258,258,4096,M$)];function l0(p){p.window_size=2*p.w_size,s(p.head),p.max_lazy_match=p0[p.level].max_lazy,p.good_match=p0[p.level].good_length,p.nice_match=p0[p.level].nice_length,p.max_chain_length=p0[p.level].max_chain,p.strstart=0,p.block_start=0,p.lookahead=0,p.insert=0,p.match_length=p.prev_length=q-1,p.match_available=0,p.ins_h=0}function L0(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Q0,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new I.Buf16(H*2),this.dyn_dtree=new I.Buf16((2*F+1)*2),this.bl_tree=new I.Buf16((2*L+1)*2),s(this.dyn_ltree),s(this.dyn_dtree),s(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new I.Buf16(v+1),this.heap=new I.Buf16(2*D+1),s(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new I.Buf16(2*D+1),s(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function N0(p){var A0;if(!p||!p.state)return I0(p,N);if(p.total_in=p.total_out=0,p.data_type=$0,A0=p.state,A0.pending=0,A0.pending_out=0,A0.wrap<0)A0.wrap=-A0.wrap;return A0.status=A0.wrap?k:K0,p.adler=A0.wrap===2?0:1,A0.last_flush=Y,G._tr_init(A0),T}function B0(p){var A0=N0(p);if(A0===T)l0(p.state);return A0}function Y$(p,A0){if(!p||!p.state)return N;if(p.state.wrap!==2)return N;return p.state.gzhead=A0,T}function u(p,A0,v0,X0,H0,C0){if(!p)return N;var H$=1;if(A0===w)A0=6;if(X0<0)H$=0,X0=-X0;else if(X0>15)H$=2,X0-=16;if(H0<1||H0>G0||v0!==Q0||X0<8||X0>15||A0<0||A0>9||C0<0||C0>l)return I0(p,N);if(X0===8)X0=9;var d0=new L0;return p.state=d0,d0.strm=p,d0.wrap=H$,d0.gzhead=null,d0.w_bits=X0,d0.w_size=1<<d0.w_bits,d0.w_mask=d0.w_size-1,d0.hash_bits=H0+7,d0.hash_size=1<<d0.hash_bits,d0.hash_mask=d0.hash_size-1,d0.hash_shift=~~((d0.hash_bits+q-1)/q),d0.window=new I.Buf8(d0.w_size*2),d0.head=new I.Buf16(d0.hash_size),d0.prev=new I.Buf16(d0.w_size),d0.lit_bufsize=1<<H0+6,d0.pending_buf_size=d0.lit_bufsize*4,d0.pending_buf=new I.Buf8(d0.pending_buf_size),d0.d_buf=1*d0.lit_bufsize,d0.l_buf=3*d0.lit_bufsize,d0.level=A0,d0.strategy=C0,d0.method=v0,B0(p)}function _0(p,A0){return u(p,A0,Q0,D0,t,i)}function o(p,A0){var v0,X0,H0,C0;if(!p||!p.state||A0>E||A0<0)return p?I0(p,N):N;if(X0=p.state,!p.output||!p.input&&p.avail_in!==0||X0.status===O0&&A0!==M)return I0(p,p.avail_out===0?x:N);if(X0.strm=p,v0=X0.last_flush,X0.last_flush=A0,X0.status===k)if(X0.wrap===2)if(p.adler=0,z0(X0,31),z0(X0,139),z0(X0,8),!X0.gzhead)z0(X0,0),z0(X0,0),z0(X0,0),z0(X0,0),z0(X0,0),z0(X0,X0.level===9?2:X0.strategy>=g||X0.level<2?4:0),z0(X0,W0),X0.status=K0;else{if(z0(X0,(X0.gzhead.text?1:0)+(X0.gzhead.hcrc?2:0)+(!X0.gzhead.extra?0:4)+(!X0.gzhead.name?0:8)+(!X0.gzhead.comment?0:16)),z0(X0,X0.gzhead.time&255),z0(X0,X0.gzhead.time>>8&255),z0(X0,X0.gzhead.time>>16&255),z0(X0,X0.gzhead.time>>24&255),z0(X0,X0.level===9?2:X0.strategy>=g||X0.level<2?4:0),z0(X0,X0.gzhead.os&255),X0.gzhead.extra&&X0.gzhead.extra.length)z0(X0,X0.gzhead.extra.length&255),z0(X0,X0.gzhead.extra.length>>8&255);if(X0.gzhead.hcrc)p.adler=_(p.adler,X0.pending_buf,X0.pending,0);X0.gzindex=0,X0.status=j}else{var H$=Q0+(X0.w_bits-8<<4)<<8,d0=-1;if(X0.strategy>=g||X0.level<2)d0=0;else if(X0.level<6)d0=1;else if(X0.level===6)d0=2;else d0=3;if(H$|=d0<<6,X0.strstart!==0)H$|=A;if(H$+=31-H$%31,X0.status=K0,c0(X0,H$),X0.strstart!==0)c0(X0,p.adler>>>16),c0(X0,p.adler&65535);p.adler=1}if(X0.status===j)if(X0.gzhead.extra){H0=X0.pending;while(X0.gzindex<(X0.gzhead.extra.length&65535)){if(X0.pending===X0.pending_buf_size){if(X0.gzhead.hcrc&&X0.pending>H0)p.adler=_(p.adler,X0.pending_buf,X0.pending-H0,H0);if(S0(p),H0=X0.pending,X0.pending===X0.pending_buf_size)break}z0(X0,X0.gzhead.extra[X0.gzindex]&255),X0.gzindex++}if(X0.gzhead.hcrc&&X0.pending>H0)p.adler=_(p.adler,X0.pending_buf,X0.pending-H0,H0);if(X0.gzindex===X0.gzhead.extra.length)X0.gzindex=0,X0.status=h}else X0.status=h;if(X0.status===h)if(X0.gzhead.name){H0=X0.pending;do{if(X0.pending===X0.pending_buf_size){if(X0.gzhead.hcrc&&X0.pending>H0)p.adler=_(p.adler,X0.pending_buf,X0.pending-H0,H0);if(S0(p),H0=X0.pending,X0.pending===X0.pending_buf_size){C0=1;break}}if(X0.gzindex<X0.gzhead.name.length)C0=X0.gzhead.name.charCodeAt(X0.gzindex++)&255;else C0=0;z0(X0,C0)}while(C0!==0);if(X0.gzhead.hcrc&&X0.pending>H0)p.adler=_(p.adler,X0.pending_buf,X0.pending-H0,H0);if(C0===0)X0.gzindex=0,X0.status=a}else X0.status=a;if(X0.status===a)if(X0.gzhead.comment){H0=X0.pending;do{if(X0.pending===X0.pending_buf_size){if(X0.gzhead.hcrc&&X0.pending>H0)p.adler=_(p.adler,X0.pending_buf,X0.pending-H0,H0);if(S0(p),H0=X0.pending,X0.pending===X0.pending_buf_size){C0=1;break}}if(X0.gzindex<X0.gzhead.comment.length)C0=X0.gzhead.comment.charCodeAt(X0.gzindex++)&255;else C0=0;z0(X0,C0)}while(C0!==0);if(X0.gzhead.hcrc&&X0.pending>H0)p.adler=_(p.adler,X0.pending_buf,X0.pending-H0,H0);if(C0===0)X0.status=J0}else X0.status=J0;if(X0.status===J0)if(X0.gzhead.hcrc){if(X0.pending+2>X0.pending_buf_size)S0(p);if(X0.pending+2<=X0.pending_buf_size)z0(X0,p.adler&255),z0(X0,p.adler>>8&255),p.adler=0,X0.status=K0}else X0.status=K0;if(X0.pending!==0){if(S0(p),p.avail_out===0)return X0.last_flush=-1,T}else if(p.avail_in===0&&c(A0)<=c(v0)&&A0!==M)return I0(p,x);if(X0.status===O0&&p.avail_in!==0)return I0(p,x);if(p.avail_in!==0||X0.lookahead!==0||A0!==Y&&X0.status!==O0){var e=X0.strategy===g?V0(X0,A0):X0.strategy===b?T0(X0,A0):p0[X0.level].func(X0,A0);if(e===r||e===Y0)X0.status=O0;if(e===d||e===r){if(p.avail_out===0)X0.last_flush=-1;return T}if(e===m){if(A0===W)G._tr_align(X0);else if(A0!==E){if(G._tr_stored_block(X0,0,0,!1),A0===R){if(s(X0.head),X0.lookahead===0)X0.strstart=0,X0.block_start=0,X0.insert=0}}if(S0(p),p.avail_out===0)return X0.last_flush=-1,T}}if(A0!==M)return T;if(X0.wrap<=0)return S;if(X0.wrap===2)z0(X0,p.adler&255),z0(X0,p.adler>>8&255),z0(X0,p.adler>>16&255),z0(X0,p.adler>>24&255),z0(X0,p.total_in&255),z0(X0,p.total_in>>8&255),z0(X0,p.total_in>>16&255),z0(X0,p.total_in>>24&255);else c0(X0,p.adler>>>16),c0(X0,p.adler&65535);if(S0(p),X0.wrap>0)X0.wrap=-X0.wrap;return X0.pending!==0?T:S}function R0(p){var A0;if(!p||!p.state)return N;if(A0=p.state.status,A0!==k&&A0!==j&&A0!==h&&A0!==a&&A0!==J0&&A0!==K0&&A0!==O0)return I0(p,N);return p.state=null,A0===K0?I0(p,B):T}function x0(p,A0){var v0=A0.length,X0,H0,C0,H$,d0,e,E0,b0;if(!p||!p.state)return N;if(X0=p.state,H$=X0.wrap,H$===2||H$===1&&X0.status!==k||X0.lookahead)return N;if(H$===1)p.adler=Z(p.adler,A0,v0,0);if(X0.wrap=0,v0>=X0.w_size){if(H$===0)s(X0.head),X0.strstart=0,X0.block_start=0,X0.insert=0;b0=new I.Buf8(X0.w_size),I.arraySet(b0,A0,v0-X0.w_size,X0.w_size,0),A0=b0,v0=X0.w_size}d0=p.avail_in,e=p.next_in,E0=p.input,p.avail_in=v0,p.next_in=0,p.input=A0,s0(X0);while(X0.lookahead>=q){H0=X0.strstart,C0=X0.lookahead-(q-1);do X0.ins_h=(X0.ins_h<<X0.hash_shift^X0.window[H0+q-1])&X0.hash_mask,X0.prev[H0&X0.w_mask]=X0.head[X0.ins_h],X0.head[X0.ins_h]=H0,H0++;while(--C0);X0.strstart=H0,X0.lookahead=q-1,s0(X0)}return X0.strstart+=X0.lookahead,X0.block_start=X0.strstart,X0.insert=X0.lookahead,X0.lookahead=0,X0.match_length=X0.prev_length=q-1,X0.match_available=0,p.next_in=e,p.input=E0,p.avail_in=d0,X0.wrap=H$,T}$.deflateInit=_0,$.deflateInit2=u,$.deflateReset=B0,$.deflateResetKeep=N0,$.deflateSetHeader=Y$,$.deflate=o,$.deflateEnd=R0,$.deflateSetDictionary=x0,$.deflateInfo="pako deflate (from Nodeca project)"}),ca=b6(($,I)=>{var G=30,Z=12;I.exports=function(_,J){var Y,W,R,M,E,T,S,N,B,x,w,y,g,b,l,i,$0,Q0,G0,D0,t,P0,Q,D,F;Y=_.state,W=_.next_in,D=_.input,R=W+(_.avail_in-5),M=_.next_out,F=_.output,E=M-(J-_.avail_out),T=M+(_.avail_out-257),S=Y.dmax,N=Y.wsize,B=Y.whave,x=Y.wnext,w=Y.window,y=Y.hold,g=Y.bits,b=Y.lencode,l=Y.distcode,i=(1<<Y.lenbits)-1,$0=(1<<Y.distbits)-1;$:do{if(g<15)y+=D[W++]<<g,g+=8,y+=D[W++]<<g,g+=8;Q0=b[y&i];U:for(;;){if(G0=Q0>>>24,y>>>=G0,g-=G0,G0=Q0>>>16&255,G0===0)F[M++]=Q0&65535;else if(G0&16){if(D0=Q0&65535,G0&=15,G0){if(g<G0)y+=D[W++]<<g,g+=8;D0+=y&(1<<G0)-1,y>>>=G0,g-=G0}if(g<15)y+=D[W++]<<g,g+=8,y+=D[W++]<<g,g+=8;Q0=l[y&$0];I:for(;;){if(G0=Q0>>>24,y>>>=G0,g-=G0,G0=Q0>>>16&255,G0&16){if(t=Q0&65535,G0&=15,g<G0){if(y+=D[W++]<<g,g+=8,g<G0)y+=D[W++]<<g,g+=8}if(t+=y&(1<<G0)-1,t>S){_.msg="invalid distance too far back",Y.mode=G;break $}if(y>>>=G0,g-=G0,G0=M-E,t>G0){if(G0=t-G0,G0>B){if(Y.sane){_.msg="invalid distance too far back",Y.mode=G;break $}}if(P0=0,Q=w,x===0){if(P0+=N-G0,G0<D0){D0-=G0;do F[M++]=w[P0++];while(--G0);P0=M-t,Q=F}}else if(x<G0){if(P0+=N+x-G0,G0-=x,G0<D0){D0-=G0;do F[M++]=w[P0++];while(--G0);if(P0=0,x<D0){G0=x,D0-=G0;do F[M++]=w[P0++];while(--G0);P0=M-t,Q=F}}}else if(P0+=x-G0,G0<D0){D0-=G0;do F[M++]=w[P0++];while(--G0);P0=M-t,Q=F}while(D0>2)F[M++]=Q[P0++],F[M++]=Q[P0++],F[M++]=Q[P0++],D0-=3;if(D0){if(F[M++]=Q[P0++],D0>1)F[M++]=Q[P0++]}}else{P0=M-t;do F[M++]=F[P0++],F[M++]=F[P0++],F[M++]=F[P0++],D0-=3;while(D0>2);if(D0){if(F[M++]=F[P0++],D0>1)F[M++]=F[P0++]}}}else if((G0&64)===0){Q0=l[(Q0&65535)+(y&(1<<G0)-1)];continue I}else{_.msg="invalid distance code",Y.mode=G;break $}break}}else if((G0&64)===0){Q0=b[(Q0&65535)+(y&(1<<G0)-1)];continue U}else if(G0&32){Y.mode=Z;break $}else{_.msg="invalid literal/length code",Y.mode=G;break $}break}}while(W<R&&M<T);D0=g>>3,W-=D0,g-=D0<<3,y&=(1<<g)-1,_.next_in=W,_.next_out=M,_.avail_in=W<R?5+(R-W):5-(W-R),_.avail_out=M<T?257+(T-M):257-(M-T),Y.hold=y,Y.bits=g;return}}),la=b6(($,I)=>{var G=s5(),Z=15,_=852,J=592,Y=0,W=1,R=2,M=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],E=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],T=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],S=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];I.exports=function(N,B,x,w,y,g,b,l){var i=l.bits,$0=0,Q0=0,G0=0,D0=0,t=0,P0=0,Q=0,D=0,F=0,L=0,H,v,q,P,O,A=null,k=0,j,h=new G.Buf16(Z+1),a=new G.Buf16(Z+1),J0=null,K0=0,O0,d,m;for($0=0;$0<=Z;$0++)h[$0]=0;for(Q0=0;Q0<w;Q0++)h[B[x+Q0]]++;t=i;for(D0=Z;D0>=1;D0--)if(h[D0]!==0)break;if(t>D0)t=D0;if(D0===0)return y[g++]=20971520,y[g++]=20971520,l.bits=1,0;for(G0=1;G0<D0;G0++)if(h[G0]!==0)break;if(t<G0)t=G0;D=1;for($0=1;$0<=Z;$0++)if(D<<=1,D-=h[$0],D<0)return-1;if(D>0&&(N===Y||D0!==1))return-1;a[1]=0;for($0=1;$0<Z;$0++)a[$0+1]=a[$0]+h[$0];for(Q0=0;Q0<w;Q0++)if(B[x+Q0]!==0)b[a[B[x+Q0]]++]=Q0;if(N===Y)A=J0=b,j=19;else if(N===W)A=M,k-=257,J0=E,K0-=257,j=256;else A=T,J0=S,j=-1;if(L=0,Q0=0,$0=G0,O=g,P0=t,Q=0,q=-1,F=1<<t,P=F-1,N===W&&F>_||N===R&&F>J)return 1;for(;;){if(O0=$0-Q,b[Q0]<j)d=0,m=b[Q0];else if(b[Q0]>j)d=J0[K0+b[Q0]],m=A[k+b[Q0]];else d=96,m=0;H=1<<$0-Q,v=1<<P0,G0=v;do v-=H,y[O+(L>>Q)+v]=O0<<24|d<<16|m|0;while(v!==0);H=1<<$0-1;while(L&H)H>>=1;if(H!==0)L&=H-1,L+=H;else L=0;if(Q0++,--h[$0]===0){if($0===D0)break;$0=B[x+b[Q0]]}if($0>t&&(L&P)!==q){if(Q===0)Q=t;O+=G0,P0=$0-Q,D=1<<P0;while(P0+Q<D0){if(D-=h[P0+Q],D<=0)break;P0++,D<<=1}if(F+=1<<P0,N===W&&F>_||N===R&&F>J)return 1;q=L&P,y[q]=t<<24|P0<<16|O-g|0}}if(L!==0)y[O+L]=$0-Q<<24|4194304|0;return l.bits=t,0}}),ma=b6(($)=>{var I=s5(),G=sg(),Z=eg(),_=ca(),J=la(),Y=0,W=1,R=2,M=4,E=5,T=6,S=0,N=1,B=2,x=-2,w=-3,y=-4,g=-5,b=8,l=1,i=2,$0=3,Q0=4,G0=5,D0=6,t=7,P0=8,Q=9,D=10,F=11,L=12,H=13,v=14,q=15,P=16,O=17,A=18,k=19,j=20,h=21,a=22,J0=23,K0=24,O0=25,d=26,m=27,r=28,Y0=29,W0=30,I0=31,c=32,s=852,S0=592,M0=15,z0=M0;function c0(u){return(u>>>24&255)+(u>>>8&65280)+((u&65280)<<8)+((u&255)<<24)}function F0(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function q0(u){var _0;if(!u||!u.state)return x;if(_0=u.state,u.total_in=u.total_out=_0.total=0,u.msg="",_0.wrap)u.adler=_0.wrap&1;return _0.mode=l,_0.last=0,_0.havedict=0,_0.dmax=32768,_0.head=null,_0.hold=0,_0.bits=0,_0.lencode=_0.lendyn=new I.Buf32(s),_0.distcode=_0.distdyn=new I.Buf32(S0),_0.sane=1,_0.back=-1,S}function s0(u){var _0;if(!u||!u.state)return x;return _0=u.state,_0.wsize=0,_0.whave=0,_0.wnext=0,q0(u)}function k0(u,_0){var o,R0;if(!u||!u.state)return x;if(R0=u.state,_0<0)o=0,_0=-_0;else if(o=(_0>>4)+1,_0<48)_0&=15;if(_0&&(_0<8||_0>15))return x;if(R0.window!==null&&R0.wbits!==_0)R0.window=null;return R0.wrap=o,R0.wbits=_0,s0(u)}function n0(u,_0){var o,R0;if(!u)return x;if(R0=new F0,u.state=R0,R0.window=null,o=k0(u,_0),o!==S)u.state=null;return o}function M$(u){return n0(u,z0)}var T0=!0,V0,X$;function p0(u){if(T0){var _0;V0=new I.Buf32(512),X$=new I.Buf32(32),_0=0;while(_0<144)u.lens[_0++]=8;while(_0<256)u.lens[_0++]=9;while(_0<280)u.lens[_0++]=7;while(_0<288)u.lens[_0++]=8;J(W,u.lens,0,288,V0,0,u.work,{bits:9}),_0=0;while(_0<32)u.lens[_0++]=5;J(R,u.lens,0,32,X$,0,u.work,{bits:5}),T0=!1}u.lencode=V0,u.lenbits=9,u.distcode=X$,u.distbits=5}function l0(u,_0,o,R0){var x0,p=u.state;if(p.window===null)p.wsize=1<<p.wbits,p.wnext=0,p.whave=0,p.window=new I.Buf8(p.wsize);if(R0>=p.wsize)I.arraySet(p.window,_0,o-p.wsize,p.wsize,0),p.wnext=0,p.whave=p.wsize;else{if(x0=p.wsize-p.wnext,x0>R0)x0=R0;if(I.arraySet(p.window,_0,o-R0,x0,p.wnext),R0-=x0,R0)I.arraySet(p.window,_0,o-R0,R0,0),p.wnext=R0,p.whave=p.wsize;else{if(p.wnext+=x0,p.wnext===p.wsize)p.wnext=0;if(p.whave<p.wsize)p.whave+=x0}}return 0}function L0(u,_0){var o,R0,x0,p,A0,v0,X0,H0,C0,H$,d0,e,E0,b0,f0=0,z$,a0,U$,c$,D$,L$,B$,Z$,I$=new I.Buf8(4),I1,C$,g$=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!u||!u.state||!u.output||!u.input&&u.avail_in!==0)return x;if(o=u.state,o.mode===L)o.mode=H;A0=u.next_out,x0=u.output,X0=u.avail_out,p=u.next_in,R0=u.input,v0=u.avail_in,H0=o.hold,C0=o.bits,H$=v0,d0=X0,Z$=S;$:for(;;)switch(o.mode){case l:if(o.wrap===0){o.mode=H;break}while(C0<16){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(o.wrap&2&&H0===35615){o.check=0,I$[0]=H0&255,I$[1]=H0>>>8&255,o.check=Z(o.check,I$,2,0),H0=0,C0=0,o.mode=i;break}if(o.flags=0,o.head)o.head.done=!1;if(!(o.wrap&1)||(((H0&255)<<8)+(H0>>8))%31){u.msg="incorrect header check",o.mode=W0;break}if((H0&15)!==b){u.msg="unknown compression method",o.mode=W0;break}if(H0>>>=4,C0-=4,B$=(H0&15)+8,o.wbits===0)o.wbits=B$;else if(B$>o.wbits){u.msg="invalid window size",o.mode=W0;break}o.dmax=1<<B$,u.adler=o.check=1,o.mode=H0&512?D:L,H0=0,C0=0;break;case i:while(C0<16){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(o.flags=H0,(o.flags&255)!==b){u.msg="unknown compression method",o.mode=W0;break}if(o.flags&57344){u.msg="unknown header flags set",o.mode=W0;break}if(o.head)o.head.text=H0>>8&1;if(o.flags&512)I$[0]=H0&255,I$[1]=H0>>>8&255,o.check=Z(o.check,I$,2,0);H0=0,C0=0,o.mode=$0;case $0:while(C0<32){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(o.head)o.head.time=H0;if(o.flags&512)I$[0]=H0&255,I$[1]=H0>>>8&255,I$[2]=H0>>>16&255,I$[3]=H0>>>24&255,o.check=Z(o.check,I$,4,0);H0=0,C0=0,o.mode=Q0;case Q0:while(C0<16){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(o.head)o.head.xflags=H0&255,o.head.os=H0>>8;if(o.flags&512)I$[0]=H0&255,I$[1]=H0>>>8&255,o.check=Z(o.check,I$,2,0);H0=0,C0=0,o.mode=G0;case G0:if(o.flags&1024){while(C0<16){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(o.length=H0,o.head)o.head.extra_len=H0;if(o.flags&512)I$[0]=H0&255,I$[1]=H0>>>8&255,o.check=Z(o.check,I$,2,0);H0=0,C0=0}else if(o.head)o.head.extra=null;o.mode=D0;case D0:if(o.flags&1024){if(e=o.length,e>v0)e=v0;if(e){if(o.head){if(B$=o.head.extra_len-o.length,!o.head.extra)o.head.extra=Array(o.head.extra_len);I.arraySet(o.head.extra,R0,p,e,B$)}if(o.flags&512)o.check=Z(o.check,R0,e,p);v0-=e,p+=e,o.length-=e}if(o.length)break $}o.length=0,o.mode=t;case t:if(o.flags&2048){if(v0===0)break $;e=0;do if(B$=R0[p+e++],o.head&&B$&&o.length<65536)o.head.name+=String.fromCharCode(B$);while(B$&&e<v0);if(o.flags&512)o.check=Z(o.check,R0,e,p);if(v0-=e,p+=e,B$)break $}else if(o.head)o.head.name=null;o.length=0,o.mode=P0;case P0:if(o.flags&4096){if(v0===0)break $;e=0;do if(B$=R0[p+e++],o.head&&B$&&o.length<65536)o.head.comment+=String.fromCharCode(B$);while(B$&&e<v0);if(o.flags&512)o.check=Z(o.check,R0,e,p);if(v0-=e,p+=e,B$)break $}else if(o.head)o.head.comment=null;o.mode=Q;case Q:if(o.flags&512){while(C0<16){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(H0!==(o.check&65535)){u.msg="header crc mismatch",o.mode=W0;break}H0=0,C0=0}if(o.head)o.head.hcrc=o.flags>>9&1,o.head.done=!0;u.adler=o.check=0,o.mode=L;break;case D:while(C0<32){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}u.adler=o.check=c0(H0),H0=0,C0=0,o.mode=F;case F:if(o.havedict===0)return u.next_out=A0,u.avail_out=X0,u.next_in=p,u.avail_in=v0,o.hold=H0,o.bits=C0,B;u.adler=o.check=1,o.mode=L;case L:if(_0===E||_0===T)break $;case H:if(o.last){H0>>>=C0&7,C0-=C0&7,o.mode=m;break}while(C0<3){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}switch(o.last=H0&1,H0>>>=1,C0-=1,H0&3){case 0:o.mode=v;break;case 1:if(p0(o),o.mode=j,_0===T){H0>>>=2,C0-=2;break $}break;case 2:o.mode=O;break;case 3:u.msg="invalid block type",o.mode=W0}H0>>>=2,C0-=2;break;case v:H0>>>=C0&7,C0-=C0&7;while(C0<32){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if((H0&65535)!==(H0>>>16^65535)){u.msg="invalid stored block lengths",o.mode=W0;break}if(o.length=H0&65535,H0=0,C0=0,o.mode=q,_0===T)break $;case q:o.mode=P;case P:if(e=o.length,e){if(e>v0)e=v0;if(e>X0)e=X0;if(e===0)break $;I.arraySet(x0,R0,p,e,A0),v0-=e,p+=e,X0-=e,A0+=e,o.length-=e;break}o.mode=L;break;case O:while(C0<14){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(o.nlen=(H0&31)+257,H0>>>=5,C0-=5,o.ndist=(H0&31)+1,H0>>>=5,C0-=5,o.ncode=(H0&15)+4,H0>>>=4,C0-=4,o.nlen>286||o.ndist>30){u.msg="too many length or distance symbols",o.mode=W0;break}o.have=0,o.mode=A;case A:while(o.have<o.ncode){while(C0<3){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}o.lens[g$[o.have++]]=H0&7,H0>>>=3,C0-=3}while(o.have<19)o.lens[g$[o.have++]]=0;if(o.lencode=o.lendyn,o.lenbits=7,I1={bits:o.lenbits},Z$=J(Y,o.lens,0,19,o.lencode,0,o.work,I1),o.lenbits=I1.bits,Z$){u.msg="invalid code lengths set",o.mode=W0;break}o.have=0,o.mode=k;case k:while(o.have<o.nlen+o.ndist){for(;;){if(f0=o.lencode[H0&(1<<o.lenbits)-1],z$=f0>>>24,a0=f0>>>16&255,U$=f0&65535,z$<=C0)break;if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(U$<16)H0>>>=z$,C0-=z$,o.lens[o.have++]=U$;else{if(U$===16){C$=z$+2;while(C0<C$){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(H0>>>=z$,C0-=z$,o.have===0){u.msg="invalid bit length repeat",o.mode=W0;break}B$=o.lens[o.have-1],e=3+(H0&3),H0>>>=2,C0-=2}else if(U$===17){C$=z$+3;while(C0<C$){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}H0>>>=z$,C0-=z$,B$=0,e=3+(H0&7),H0>>>=3,C0-=3}else{C$=z$+7;while(C0<C$){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}H0>>>=z$,C0-=z$,B$=0,e=11+(H0&127),H0>>>=7,C0-=7}if(o.have+e>o.nlen+o.ndist){u.msg="invalid bit length repeat",o.mode=W0;break}while(e--)o.lens[o.have++]=B$}}if(o.mode===W0)break;if(o.lens[256]===0){u.msg="invalid code -- missing end-of-block",o.mode=W0;break}if(o.lenbits=9,I1={bits:o.lenbits},Z$=J(W,o.lens,0,o.nlen,o.lencode,0,o.work,I1),o.lenbits=I1.bits,Z$){u.msg="invalid literal/lengths set",o.mode=W0;break}if(o.distbits=6,o.distcode=o.distdyn,I1={bits:o.distbits},Z$=J(R,o.lens,o.nlen,o.ndist,o.distcode,0,o.work,I1),o.distbits=I1.bits,Z$){u.msg="invalid distances set",o.mode=W0;break}if(o.mode=j,_0===T)break $;case j:o.mode=h;case h:if(v0>=6&&X0>=258){if(u.next_out=A0,u.avail_out=X0,u.next_in=p,u.avail_in=v0,o.hold=H0,o.bits=C0,_(u,d0),A0=u.next_out,x0=u.output,X0=u.avail_out,p=u.next_in,R0=u.input,v0=u.avail_in,H0=o.hold,C0=o.bits,o.mode===L)o.back=-1;break}o.back=0;for(;;){if(f0=o.lencode[H0&(1<<o.lenbits)-1],z$=f0>>>24,a0=f0>>>16&255,U$=f0&65535,z$<=C0)break;if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(a0&&(a0&240)===0){c$=z$,D$=a0,L$=U$;for(;;){if(f0=o.lencode[L$+((H0&(1<<c$+D$)-1)>>c$)],z$=f0>>>24,a0=f0>>>16&255,U$=f0&65535,c$+z$<=C0)break;if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}H0>>>=c$,C0-=c$,o.back+=c$}if(H0>>>=z$,C0-=z$,o.back+=z$,o.length=U$,a0===0){o.mode=d;break}if(a0&32){o.back=-1,o.mode=L;break}if(a0&64){u.msg="invalid literal/length code",o.mode=W0;break}o.extra=a0&15,o.mode=a;case a:if(o.extra){C$=o.extra;while(C0<C$){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}o.length+=H0&(1<<o.extra)-1,H0>>>=o.extra,C0-=o.extra,o.back+=o.extra}o.was=o.length,o.mode=J0;case J0:for(;;){if(f0=o.distcode[H0&(1<<o.distbits)-1],z$=f0>>>24,a0=f0>>>16&255,U$=f0&65535,z$<=C0)break;if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if((a0&240)===0){c$=z$,D$=a0,L$=U$;for(;;){if(f0=o.distcode[L$+((H0&(1<<c$+D$)-1)>>c$)],z$=f0>>>24,a0=f0>>>16&255,U$=f0&65535,c$+z$<=C0)break;if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}H0>>>=c$,C0-=c$,o.back+=c$}if(H0>>>=z$,C0-=z$,o.back+=z$,a0&64){u.msg="invalid distance code",o.mode=W0;break}o.offset=U$,o.extra=a0&15,o.mode=K0;case K0:if(o.extra){C$=o.extra;while(C0<C$){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}o.offset+=H0&(1<<o.extra)-1,H0>>>=o.extra,C0-=o.extra,o.back+=o.extra}if(o.offset>o.dmax){u.msg="invalid distance too far back",o.mode=W0;break}o.mode=O0;case O0:if(X0===0)break $;if(e=d0-X0,o.offset>e){if(e=o.offset-e,e>o.whave){if(o.sane){u.msg="invalid distance too far back",o.mode=W0;break}}if(e>o.wnext)e-=o.wnext,E0=o.wsize-e;else E0=o.wnext-e;if(e>o.length)e=o.length;b0=o.window}else b0=x0,E0=A0-o.offset,e=o.length;if(e>X0)e=X0;X0-=e,o.length-=e;do x0[A0++]=b0[E0++];while(--e);if(o.length===0)o.mode=h;break;case d:if(X0===0)break $;x0[A0++]=o.length,X0--,o.mode=h;break;case m:if(o.wrap){while(C0<32){if(v0===0)break $;v0--,H0|=R0[p++]<<C0,C0+=8}if(d0-=X0,u.total_out+=d0,o.total+=d0,d0)u.adler=o.check=o.flags?Z(o.check,x0,d0,A0-d0):G(o.check,x0,d0,A0-d0);if(d0=X0,(o.flags?H0:c0(H0))!==o.check){u.msg="incorrect data check",o.mode=W0;break}H0=0,C0=0}o.mode=r;case r:if(o.wrap&&o.flags){while(C0<32){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(H0!==(o.total&4294967295)){u.msg="incorrect length check",o.mode=W0;break}H0=0,C0=0}o.mode=Y0;case Y0:Z$=N;break $;case W0:Z$=w;break $;case I0:return y;case c:default:return x}if(u.next_out=A0,u.avail_out=X0,u.next_in=p,u.avail_in=v0,o.hold=H0,o.bits=C0,o.wsize||d0!==u.avail_out&&o.mode<W0&&(o.mode<m||_0!==M)){if(l0(u,u.output,u.next_out,d0-u.avail_out))return o.mode=I0,y}if(H$-=u.avail_in,d0-=u.avail_out,u.total_in+=H$,u.total_out+=d0,o.total+=d0,o.wrap&&d0)u.adler=o.check=o.flags?Z(o.check,x0,d0,u.next_out-d0):G(o.check,x0,d0,u.next_out-d0);if(u.data_type=o.bits+(o.last?64:0)+(o.mode===L?128:0)+(o.mode===j||o.mode===q?256:0),(H$===0&&d0===0||_0===M)&&Z$===S)Z$=g;return Z$}function N0(u){if(!u||!u.state)return x;var _0=u.state;if(_0.window)_0.window=null;return u.state=null,S}function B0(u,_0){var o;if(!u||!u.state)return x;if(o=u.state,(o.wrap&2)===0)return x;return o.head=_0,_0.done=!1,S}function Y$(u,_0){var o=_0.length,R0,x0,p;if(!u||!u.state)return x;if(R0=u.state,R0.wrap!==0&&R0.mode!==F)return x;if(R0.mode===F){if(x0=1,x0=G(x0,_0,o,0),x0!==R0.check)return w}if(p=l0(u,_0,o,o),p)return R0.mode=I0,y;return R0.havedict=1,S}$.inflateReset=s0,$.inflateReset2=k0,$.inflateResetKeep=q0,$.inflateInit=M$,$.inflateInit2=n0,$.inflate=L0,$.inflateEnd=N0,$.inflateGetHeader=B0,$.inflateSetDictionary=Y$,$.inflateInfo="pako inflate (from Nodeca project)"}),da=b6(($,I)=>{I.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}}),ia=b6(($)=>{var I=(bE(),V$(yE)),G=ha(),Z=pa(),_=ma(),J=da();for(Y in J)$[Y]=J[Y];var Y;$.NONE=0,$.DEFLATE=1,$.INFLATE=2,$.GZIP=3,$.GUNZIP=4,$.DEFLATERAW=5,$.INFLATERAW=6,$.UNZIP=7;var W=31,R=139;function M(E){if(typeof E!=="number"||E<$.DEFLATE||E>$.UNZIP)throw TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=E,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}M.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}if(this.pending_close=!1,I(this.init_done,"close before init"),I(this.mode<=$.UNZIP),this.mode===$.DEFLATE||this.mode===$.GZIP||this.mode===$.DEFLATERAW)Z.deflateEnd(this.strm);else if(this.mode===$.INFLATE||this.mode===$.GUNZIP||this.mode===$.INFLATERAW||this.mode===$.UNZIP)_.inflateEnd(this.strm);this.mode=$.NONE,this.dictionary=null},M.prototype.write=function(E,T,S,N,B,x,w){return this._write(!0,E,T,S,N,B,x,w)},M.prototype.writeSync=function(E,T,S,N,B,x,w){return this._write(!1,E,T,S,N,B,x,w)},M.prototype._write=function(E,T,S,N,B,x,w,y){if(I.equal(arguments.length,8),I(this.init_done,"write before init"),I(this.mode!==$.NONE,"already finalized"),I.equal(!1,this.write_in_progress,"write already in progress"),I.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,I.equal(!1,T===void 0,"must provide flush value"),this.write_in_progress=!0,T!==$.Z_NO_FLUSH&&T!==$.Z_PARTIAL_FLUSH&&T!==$.Z_SYNC_FLUSH&&T!==$.Z_FULL_FLUSH&&T!==$.Z_FINISH&&T!==$.Z_BLOCK)throw Error("Invalid flush value");if(S==null)S=Buffer.alloc(0),B=0,N=0;if(this.strm.avail_in=B,this.strm.input=S,this.strm.next_in=N,this.strm.avail_out=y,this.strm.output=x,this.strm.next_out=w,this.flush=T,!E){if(this._process(),this._checkError())return this._afterSync();return}var g=this;return process.nextTick(function(){g._process(),g._after()}),this},M.prototype._afterSync=function(){var E=this.strm.avail_out,T=this.strm.avail_in;return this.write_in_progress=!1,[T,E]},M.prototype._process=function(){var E=null;switch(this.mode){case $.DEFLATE:case $.GZIP:case $.DEFLATERAW:this.err=Z.deflate(this.strm,this.flush);break;case $.UNZIP:if(this.strm.avail_in>0)E=this.strm.next_in;switch(this.gzip_id_bytes_read){case 0:if(E===null)break;if(this.strm.input[E]===W){if(this.gzip_id_bytes_read=1,E++,this.strm.avail_in===1)break}else{this.mode=$.INFLATE;break}case 1:if(E===null)break;if(this.strm.input[E]===R)this.gzip_id_bytes_read=2,this.mode=$.GUNZIP;else this.mode=$.INFLATE;break;default:throw Error("invalid number of gzip magic number bytes read")}case $.INFLATE:case $.GUNZIP:case $.INFLATERAW:if(this.err=_.inflate(this.strm,this.flush),this.err===$.Z_NEED_DICT&&this.dictionary){if(this.err=_.inflateSetDictionary(this.strm,this.dictionary),this.err===$.Z_OK)this.err=_.inflate(this.strm,this.flush);else if(this.err===$.Z_DATA_ERROR)this.err=$.Z_NEED_DICT}while(this.strm.avail_in>0&&this.mode===$.GUNZIP&&this.err===$.Z_STREAM_END&&this.strm.next_in[0]!==0)this.reset(),this.err=_.inflate(this.strm,this.flush);break;default:throw Error("Unknown mode "+this.mode)}},M.prototype._checkError=function(){switch(this.err){case $.Z_OK:case $.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===$.Z_FINISH)return this._error("unexpected end of file"),!1;break;case $.Z_STREAM_END:break;case $.Z_NEED_DICT:if(this.dictionary==null)this._error("Missing dictionary");else this._error("Bad dictionary");return!1;default:return this._error("Zlib error"),!1}return!0},M.prototype._after=function(){if(!this._checkError())return;var E=this.strm.avail_out,T=this.strm.avail_in;if(this.write_in_progress=!1,this.callback(T,E),this.pending_close)this.close()},M.prototype._error=function(E){if(this.strm.msg)E=this.strm.msg;if(this.onerror(E,this.err),this.write_in_progress=!1,this.pending_close)this.close()},M.prototype.init=function(E,T,S,N,B){I(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),I(E>=8&&E<=15,"invalid windowBits"),I(T>=-1&&T<=9,"invalid compression level"),I(S>=1&&S<=9,"invalid memlevel"),I(N===$.Z_FILTERED||N===$.Z_HUFFMAN_ONLY||N===$.Z_RLE||N===$.Z_FIXED||N===$.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(T,E,S,N,B),this._setDictionary()},M.prototype.params=function(){throw Error("deflateParams Not supported")},M.prototype.reset=function(){this._reset(),this._setDictionary()},M.prototype._init=function(E,T,S,N,B){if(this.level=E,this.windowBits=T,this.memLevel=S,this.strategy=N,this.flush=$.Z_NO_FLUSH,this.err=$.Z_OK,this.mode===$.GZIP||this.mode===$.GUNZIP)this.windowBits+=16;if(this.mode===$.UNZIP)this.windowBits+=32;if(this.mode===$.DEFLATERAW||this.mode===$.INFLATERAW)this.windowBits=-1*this.windowBits;switch(this.strm=new G,this.mode){case $.DEFLATE:case $.GZIP:case $.DEFLATERAW:this.err=Z.deflateInit2(this.strm,this.level,$.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case $.INFLATE:case $.GUNZIP:case $.INFLATERAW:case $.UNZIP:this.err=_.inflateInit2(this.strm,this.windowBits);break;default:throw Error("Unknown mode "+this.mode)}if(this.err!==$.Z_OK)this._error("Init error");this.dictionary=B,this.write_in_progress=!1,this.init_done=!0},M.prototype._setDictionary=function(){if(this.dictionary==null)return;switch(this.err=$.Z_OK,this.mode){case $.DEFLATE:case $.DEFLATERAW:this.err=Z.deflateSetDictionary(this.strm,this.dictionary);break;default:break}if(this.err!==$.Z_OK)this._error("Failed to set dictionary")},M.prototype._reset=function(){switch(this.err=$.Z_OK,this.mode){case $.DEFLATE:case $.DEFLATERAW:case $.GZIP:this.err=Z.deflateReset(this.strm);break;case $.INFLATE:case $.INFLATERAW:case $.GUNZIP:this.err=_.inflateReset(this.strm);break;default:break}if(this.err!==$.Z_OK)this._error("Failed to reset stream")},$.Zlib=M}),$w=b6(($)=>{var I=(u1(),V$(h1)).Buffer,G=w4().Transform,Z=ia(),_=(C2(),V$(v2)),J=(bE(),V$(yE)).ok,Y=(u1(),V$(h1)).kMaxLength,W="Cannot create final Buffer. It would be larger than 0x"+Y.toString(16)+" bytes";Z.Z_MIN_WINDOWBITS=8,Z.Z_MAX_WINDOWBITS=15,Z.Z_DEFAULT_WINDOWBITS=15,Z.Z_MIN_CHUNK=64,Z.Z_MAX_CHUNK=1/0,Z.Z_DEFAULT_CHUNK=16384,Z.Z_MIN_MEMLEVEL=1,Z.Z_MAX_MEMLEVEL=9,Z.Z_DEFAULT_MEMLEVEL=8,Z.Z_MIN_LEVEL=-1,Z.Z_MAX_LEVEL=9,Z.Z_DEFAULT_LEVEL=Z.Z_DEFAULT_COMPRESSION;var R=Object.keys(Z);for(E=0;E<R.length;E++)if(M=R[E],M.match(/^Z/))Object.defineProperty($,M,{enumerable:!0,value:Z[M],writable:!1});var M,E,T={Z_OK:Z.Z_OK,Z_STREAM_END:Z.Z_STREAM_END,Z_NEED_DICT:Z.Z_NEED_DICT,Z_ERRNO:Z.Z_ERRNO,Z_STREAM_ERROR:Z.Z_STREAM_ERROR,Z_DATA_ERROR:Z.Z_DATA_ERROR,Z_MEM_ERROR:Z.Z_MEM_ERROR,Z_BUF_ERROR:Z.Z_BUF_ERROR,Z_VERSION_ERROR:Z.Z_VERSION_ERROR},S=Object.keys(T);for(B=0;B<S.length;B++)N=S[B],T[T[N]]=N;var N,B;Object.defineProperty($,"codes",{enumerable:!0,value:Object.freeze(T),writable:!1}),$.Deflate=y,$.Inflate=g,$.Gzip=b,$.Gunzip=l,$.DeflateRaw=i,$.InflateRaw=$0,$.Unzip=Q0,$.createDeflate=function(Q){return new y(Q)},$.createInflate=function(Q){return new g(Q)},$.createDeflateRaw=function(Q){return new i(Q)},$.createInflateRaw=function(Q){return new $0(Q)},$.createGzip=function(Q){return new b(Q)},$.createGunzip=function(Q){return new l(Q)},$.createUnzip=function(Q){return new Q0(Q)},$.deflate=function(Q,D,F){if(typeof D==="function")F=D,D={};return x(new y(D),Q,F)},$.deflateSync=function(Q,D){return w(new y(D),Q)},$.gzip=function(Q,D,F){if(typeof D==="function")F=D,D={};return x(new b(D),Q,F)},$.gzipSync=function(Q,D){return w(new b(D),Q)},$.deflateRaw=function(Q,D,F){if(typeof D==="function")F=D,D={};return x(new i(D),Q,F)},$.deflateRawSync=function(Q,D){return w(new i(D),Q)},$.unzip=function(Q,D,F){if(typeof D==="function")F=D,D={};return x(new Q0(D),Q,F)},$.unzipSync=function(Q,D){return w(new Q0(D),Q)},$.inflate=function(Q,D,F){if(typeof D==="function")F=D,D={};return x(new g(D),Q,F)},$.inflateSync=function(Q,D){return w(new g(D),Q)},$.gunzip=function(Q,D,F){if(typeof D==="function")F=D,D={};return x(new l(D),Q,F)},$.gunzipSync=function(Q,D){return w(new l(D),Q)},$.inflateRaw=function(Q,D,F){if(typeof D==="function")F=D,D={};return x(new $0(D),Q,F)},$.inflateRawSync=function(Q,D){return w(new $0(D),Q)};function x(Q,D,F){var L=[],H=0;Q.on("error",q),Q.on("end",P),Q.end(D),v();function v(){var O;while((O=Q.read())!==null)L.push(O),H+=O.length;Q.once("readable",v)}function q(O){Q.removeListener("end",P),Q.removeListener("readable",v),F(O)}function P(){var O,A=null;if(H>=Y)A=RangeError(W);else O=I.concat(L,H);L=[],Q.close(),F(A,O)}}function w(Q,D){if(typeof D==="string")D=I.from(D);if(!I.isBuffer(D))throw TypeError("Not a string or buffer");var F=Q._finishFlushFlag;return Q._processChunk(D,F)}function y(Q){if(!(this instanceof y))return new y(Q);D0.call(this,Q,Z.DEFLATE)}function g(Q){if(!(this instanceof g))return new g(Q);D0.call(this,Q,Z.INFLATE)}function b(Q){if(!(this instanceof b))return new b(Q);D0.call(this,Q,Z.GZIP)}function l(Q){if(!(this instanceof l))return new l(Q);D0.call(this,Q,Z.GUNZIP)}function i(Q){if(!(this instanceof i))return new i(Q);D0.call(this,Q,Z.DEFLATERAW)}function $0(Q){if(!(this instanceof $0))return new $0(Q);D0.call(this,Q,Z.INFLATERAW)}function Q0(Q){if(!(this instanceof Q0))return new Q0(Q);D0.call(this,Q,Z.UNZIP)}function G0(Q){return Q===Z.Z_NO_FLUSH||Q===Z.Z_PARTIAL_FLUSH||Q===Z.Z_SYNC_FLUSH||Q===Z.Z_FULL_FLUSH||Q===Z.Z_FINISH||Q===Z.Z_BLOCK}function D0(Q,D){var F=this;if(this._opts=Q=Q||{},this._chunkSize=Q.chunkSize||$.Z_DEFAULT_CHUNK,G.call(this,Q),Q.flush&&!G0(Q.flush))throw Error("Invalid flush flag: "+Q.flush);if(Q.finishFlush&&!G0(Q.finishFlush))throw Error("Invalid flush flag: "+Q.finishFlush);if(this._flushFlag=Q.flush||Z.Z_NO_FLUSH,this._finishFlushFlag=typeof Q.finishFlush<"u"?Q.finishFlush:Z.Z_FINISH,Q.chunkSize){if(Q.chunkSize<$.Z_MIN_CHUNK||Q.chunkSize>$.Z_MAX_CHUNK)throw Error("Invalid chunk size: "+Q.chunkSize)}if(Q.windowBits){if(Q.windowBits<$.Z_MIN_WINDOWBITS||Q.windowBits>$.Z_MAX_WINDOWBITS)throw Error("Invalid windowBits: "+Q.windowBits)}if(Q.level){if(Q.level<$.Z_MIN_LEVEL||Q.level>$.Z_MAX_LEVEL)throw Error("Invalid compression level: "+Q.level)}if(Q.memLevel){if(Q.memLevel<$.Z_MIN_MEMLEVEL||Q.memLevel>$.Z_MAX_MEMLEVEL)throw Error("Invalid memLevel: "+Q.memLevel)}if(Q.strategy){if(Q.strategy!=$.Z_FILTERED&&Q.strategy!=$.Z_HUFFMAN_ONLY&&Q.strategy!=$.Z_RLE&&Q.strategy!=$.Z_FIXED&&Q.strategy!=$.Z_DEFAULT_STRATEGY)throw Error("Invalid strategy: "+Q.strategy)}if(Q.dictionary){if(!I.isBuffer(Q.dictionary))throw Error("Invalid dictionary: it should be a Buffer instance")}this._handle=new Z.Zlib(D);var L=this;this._hadError=!1,this._handle.onerror=function(q,P){t(L),L._hadError=!0;var O=Error(q);O.errno=P,O.code=$.codes[P],L.emit("error",O)};var H=$.Z_DEFAULT_COMPRESSION;if(typeof Q.level==="number")H=Q.level;var v=$.Z_DEFAULT_STRATEGY;if(typeof Q.strategy==="number")v=Q.strategy;this._handle.init(Q.windowBits||$.Z_DEFAULT_WINDOWBITS,H,Q.memLevel||$.Z_DEFAULT_MEMLEVEL,v,Q.dictionary),this._buffer=I.allocUnsafe(this._chunkSize),this._offset=0,this._level=H,this._strategy=v,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!F._handle},configurable:!0,enumerable:!0})}_.inherits(D0,G),D0.prototype.params=function(Q,D,F){if(Q<$.Z_MIN_LEVEL||Q>$.Z_MAX_LEVEL)throw RangeError("Invalid compression level: "+Q);if(D!=$.Z_FILTERED&&D!=$.Z_HUFFMAN_ONLY&&D!=$.Z_RLE&&D!=$.Z_FIXED&&D!=$.Z_DEFAULT_STRATEGY)throw TypeError("Invalid strategy: "+D);if(this._level!==Q||this._strategy!==D){var L=this;this.flush(Z.Z_SYNC_FLUSH,function(){if(J(L._handle,"zlib binding closed"),L._handle.params(Q,D),!L._hadError){if(L._level=Q,L._strategy=D,F)F()}})}else process.nextTick(F)},D0.prototype.reset=function(){return J(this._handle,"zlib binding closed"),this._handle.reset()},D0.prototype._flush=function(Q){this._transform(I.alloc(0),"",Q)},D0.prototype.flush=function(Q,D){var F=this,L=this._writableState;if(typeof Q==="function"||Q===void 0&&!D)D=Q,Q=Z.Z_FULL_FLUSH;if(L.ended){if(D)process.nextTick(D)}else if(L.ending){if(D)this.once("end",D)}else if(L.needDrain){if(D)this.once("drain",function(){return F.flush(Q,D)})}else this._flushFlag=Q,this.write(I.alloc(0),"",D)},D0.prototype.close=function(Q){t(this,Q),process.nextTick(P0,this)};function t(Q,D){if(D)process.nextTick(D);if(!Q._handle)return;Q._handle.close(),Q._handle=null}function P0(Q){Q.emit("close")}D0.prototype._transform=function(Q,D,F){var L,H=this._writableState,v=H.ending||H.ended,q=v&&(!Q||H.length===Q.length);if(Q!==null&&!I.isBuffer(Q))return F(Error("invalid input"));if(!this._handle)return F(Error("zlib binding closed"));if(q)L=this._finishFlushFlag;else if(L=this._flushFlag,Q.length>=H.length)this._flushFlag=this._opts.flush||Z.Z_NO_FLUSH;this._processChunk(Q,L,F)},D0.prototype._processChunk=function(Q,D,F){var L=Q&&Q.length,H=this._chunkSize-this._offset,v=0,q=this,P=typeof F==="function";if(!P){var O=[],A=0,k;this.on("error",function(K0){k=K0}),J(this._handle,"zlib binding closed");do var j=this._handle.writeSync(D,Q,v,L,this._buffer,this._offset,H);while(!this._hadError&&J0(j[0],j[1]));if(this._hadError)throw k;if(A>=Y)throw t(this),RangeError(W);var h=I.concat(O,A);return t(this),h}J(this._handle,"zlib binding closed");var a=this._handle.write(D,Q,v,L,this._buffer,this._offset,H);a.buffer=Q,a.callback=J0;function J0(K0,O0){if(this)this.buffer=null,this.callback=null;if(q._hadError)return;var d=H-O0;if(J(d>=0,"have should not go down"),d>0){var m=q._buffer.slice(q._offset,q._offset+d);if(q._offset+=d,P)q.push(m);else O.push(m),A+=m.length}if(O0===0||q._offset>=q._chunkSize)H=q._chunkSize,q._offset=0,q._buffer=I.allocUnsafe(q._chunkSize);if(O0===0){if(v+=L-K0,L=K0,!P)return!0;var r=q._handle.write(D,Q,v,L,q._buffer,q._offset,q._chunkSize);r.callback=J0,r.buffer=Q;return}if(!P)return!1;F()}},_.inherits(y,D0),_.inherits(g,D0),_.inherits(b,D0),_.inherits(l,D0),_.inherits(i,D0),_.inherits($0,D0),_.inherits(Q0,D0)}),Uw={};ba(Uw,{default:()=>Iw.default});ya(Uw,ag($w(),1));Iw=ag($w(),1),oa=Iw.default});var zz=N6((aQ0,Lw)=>{function Gw($,I,G){if(!$||typeof $!=="object"||Array.isArray($)||Object.keys($).some((Z)=>!I.includes(Z)))throw Error(`${G} has an invalid shape`);return $}function ta($){if(!Array.isArray($)||$.length>256)throw Error("World network egress must be an array of at most 256 exact HTTPS origins");let I=$.map((G)=>{if(typeof G!=="string"||G.length>2048)throw Error("World network egress origins must be strings");let Z;try{Z=new URL(G)}catch{throw Error(`Invalid World network origin: ${G}`)}if(Z.protocol!=="https:"||Z.origin!==G||Z.username||Z.password||!/^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/.test(Z.hostname)||Z.hostname.split(".").some((_)=>!_||_.length>63||_.startsWith("-")||_.endsWith("-"))||/^[\d.]+$/.test(Z.hostname)||Z.hostname==="localhost"||Z.hostname.endsWith(".localhost"))throw Error(`World network requires an exact canonical HTTPS origin: ${G}`);return G});return Object.freeze([...new Set(I)].sort())}function Yw($){let I=Gw($,["egress"],"World network");return Object.freeze({egress:ta(I.egress)})}function Jw($,I){if(typeof $!=="string"||!$||$.length>256)throw Error("World network policy requires its World identity");return Object.freeze({version:1,world:$,egress:Yw(I).egress})}function Qw($){let I=Gw($,["version","world","egress"],"World network policy");if(I.version!==1)throw Error("Unsupported World network policy version");return Jw(I.world,{egress:I.egress})}function zw($){let I=$.VOLTER_WORLD_NETWORK_POLICY;if(I===void 0)return;if(typeof I!=="string"||I.length>65536)throw Error("Invalid published World network policy");let G=Qw(JSON.parse(I));if(!$.VOLTER_WORLD||G.world!==$.VOLTER_WORLD)throw Error("World network policy does not belong to the attached World");return G}function Zw($,I){let G;try{G=new URL(String(I))}catch{return!1}return G.protocol==="https:"&&!G.username&&!G.password&&$.egress.includes(G.origin)}function Ow($){let I=String($||"").toLowerCase().replace(/^\[|\]$/g,"");if(!I)return!0;if(I==="localhost"||I.endsWith(".localhost")||I.endsWith(".test")||I==="0.0.0.0"||I==="::1")return!0;let G=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(I);if(G){let Z=Number(G[1]),_=Number(G[2]);return Z===127||Z===10||Z===172&&_>=16&&_<=31||Z===192&&_===168||Z===169&&_===254}return I.includes(":")&&(I.startsWith("fc")||I.startsWith("fd")||I.startsWith("fe80:"))}function ra($,I=process.env){let G;try{G=new URL(String($))}catch{return`unparseable destination ${String($)}`}if(Ow(G.hostname))return null;if(I.VOLTER_TWIN_STRICT_EGRESS==="1"||I.VOLTER_TWIN_STRICT_EGRESS==="true")return`sealed World refuses untwinned host ${G.hostname}`;let Z;try{Z=zw(I)}catch(_){return`World network policy unreadable (${_.message}); refusing ${G.hostname}`}if(Z!==void 0&&!Zw(Z,G))return`World network policy does not allow ${G.origin}`;return null}Lw.exports={isWorldInternalHost:Ow,worldEgressRefusal:ra,WORLD_NETWORK_POLICY_ENV:"VOLTER_WORLD_NETWORK_POLICY",normalizeWorldNetwork:Yw,createWorldNetworkPolicy:Jw,parseWorldNetworkPolicy:Qw,worldNetworkPolicyFromEnv:zw,allowsWorldNetworkEgress:Zw}});var Ew=N6((sQ0,Aw)=>{var Dw=new Map;function Kw($,I){if(!I||!Array.isArray(I.hosts)||!I.hosts.length)return null;return{name:$,url:typeof I.url==="string"?I.url:null,hosts:new Set(I.hosts.map((G)=>String(G).toLowerCase()))}}function aa($){if(!$)return{routes:[],twins:{}};let I=Date.now(),G=Dw.get($);if(G&&I-G.checkedAt<1000)return G;if(!G)G={checkedAt:0,mtimeMs:-1,routes:[],services:{},twins:{}},Dw.set($,G);G.checkedAt=I;let Z=(()=>({})),_=(DU(),V$(QB)),J=_.join(_.dirname($),"app-url.json");try{let Y=JSON.parse(Z.readFileSync($,"utf8"));G.services=Y.services||{},G.twins=i5().twinOrigins(Y.env||{})}catch{}try{let Y=Z.statSync(J).mtimeMs;if(Y!==G.mtimeMs){G.mtimeMs=Y;let R=JSON.parse(Z.readFileSync(J,"utf8")),M=R.apps&&typeof R.apps==="object"?Object.entries(R.apps):[];G.routes=[Kw("app",R),...M.map(([E,T])=>Kw(E,T))].filter(Boolean)}let W=G.services;for(let R of G.routes){let M=R.url??W[R.name]?.url;R.origin=typeof M==="string"?M.replace(/\/$/,""):null}}catch(Y){if(G.mtimeMs=-1,Y&&Y.code==="ENOENT")G.routes=[]}return G}function Ww($,I,G={}){let Z=String(I||"").toLowerCase().replace(/\.$/,""),_=aa($),J=_.routes.find((W)=>W.origin&&Hw(W.hosts,Z));if(!J)return null;let Y=(W)=>Object.hasOwn(_.twins,W)||Object.hasOwn(G,W);return i5().vendorsOfHost(Z).some(Y)?null:J}function Hw($,I){if($.has(I))return!0;for(let G=I.indexOf(".");G>0;G=I.indexOf(".",G+1))if($.has(`*${I.slice(G)}`))return!0;return!1}function Fw($){return{"x-forwarded-host":$.host,"x-forwarded-proto":$.protocol==="https:"?"https":"http"}}function nE($,I=process.env){let G;try{G=new URL(String($))}catch{return null}if(G.protocol!=="http:"&&G.protocol!=="https:")return null;return Ww(I.VOLTER_WORLD_INSTANCE,G.hostname,i5().twinOrigins(I))}var e5=void 0;function pE(){if(e5===void 0){let $=process.env.NODE_EXTRA_CA_CERTS;try{e5=$?(()=>{throw new Error("Cannot require module "+"fs");})().readFileSync($):null}catch{e5=null}}return e5}var sa=["accept-encoding","x-twins-key","x-volter-twin-original-host","proxy-connection","host","x-forwarded-host","x-forwarded-proto"];function Tw($,I,G,Z,_){let{isIP:J}=(CE(),V$(Vg)),Y=new URL($.origin),W={};for(let[R,M]of Object.entries(Z||{}))if(M!==void 0&&!sa.includes(R.toLowerCase()))W[R]=M;if(Object.assign(W,Fw(I),{host:I.host}),(I.username||I.password)&&!Object.keys(W).some((R)=>R.toLowerCase()==="authorization"))W.authorization=`Basic ${Buffer.from(`${decodeURIComponent(I.username)}:${decodeURIComponent(I.password)}`).toString("base64")}`;return{protocol:Y.protocol,hostname:Y.hostname,port:Y.port||(Y.protocol==="https:"?443:80),method:G,path:`${Y.pathname.replace(/\/$/,"")}${I.pathname}${I.search}`,headers:W,..._&&_.signal?{signal:_.signal}:{},..._&&_.timeout!==void 0?{timeout:_.timeout}:{},...Y.protocol==="https:"&&pE()?{ca:pE()}:{},...Y.protocol==="https:"?{servername:J(Y.hostname)?"":Y.hostname}:{}}}function Mw($,I,{method:G="POST",headers:Z={},body:_,timeoutMs:J=30000,signal:Y}={}){let W=new URL(String(I));if(Y&&Y.aborted)return Promise.reject(Y.reason);let R=Tw($,W,G,Z),M=(R.protocol==="https:"?(wg(),V$(gg)):(Xz(),V$(d5))).request;return new Promise((E,T)=>{let S=!1,N=()=>x(Y.reason),B=()=>{if(S=!0,clearTimeout(y),Y)Y.removeEventListener("abort",N)},x=(g)=>{if(!S)B(),w.destroy(),T(g)},w=M(R,(g)=>{g.on("error",x),g.on("aborted",()=>x(Error(`the application's answer to ${W.origin}${W.pathname} was cut off`)));let b=String(g.headers["content-encoding"]||"").toLowerCase(),l=(Xw(),V$(_w)),i=b==="gzip"||b==="x-gzip"?l.createGunzip():b==="deflate"?l.createInflate():b==="br"?l.createBrotliDecompress():null,$0=i?g.pipe(i):g,Q0=[];$0.on("data",(G0)=>Q0.push(G0)),$0.on("error",x),$0.on("end",()=>{if(S)return;B();let G0={};for(let[D0,t]of Object.entries(g.headers))if(t!==void 0&&!(i&&(D0==="content-encoding"||D0==="content-length")))G0[D0.toLowerCase()]=Array.isArray(t)?t.join(", "):String(t);E({status:g.statusCode,headers:G0,body:Buffer.concat(Q0).toString("utf8")})})}),y=Number.isFinite(J)?setTimeout(()=>x(Error(`the application did not answer ${W.origin}${W.pathname} within ${J} ms`)),J):void 0;if(w.on("error",x),Y)Y.addEventListener("abort",N,{once:!0});if(_!=null&&G!=="GET"&&G!=="HEAD")w.write(_);w.end()})}var ea=[301,302,303,307,308],$s=[204,205,304],Us=["authorization","cookie","proxy-authorization"];function Is($,I){if($==null)return null;if(typeof $==="string")return $;if($ instanceof URLSearchParams){if(!Object.keys(I).some((G)=>G.toLowerCase()==="content-type"))I["content-type"]="application/x-www-form-urlencoded;charset=UTF-8";return $.toString()}if($ instanceof ArrayBuffer)return Buffer.from($);if(ArrayBuffer.isView($))return Buffer.from($.buffer,$.byteOffset,$.byteLength);throw TypeError("appFetch sends a string, URLSearchParams or bytes body")}async function _s($,I={}){if(!nE($)){let R=zz().worldEgressRefusal($);if(R!==null)throw TypeError(R);return fetch($,I)}let G=I.redirect||"follow",Z=I.signal||void 0,_=new URL(String($)),J=String(I.method||"GET").toUpperCase(),Y={};new Headers(I.headers||{}).forEach((R,M)=>{Y[M]=R});let W=Is(I.body,Y);for(let R=0;;R++){let M=nE(_),E;if(M){let N=zz().worldEgressRefusal(M.origin);if(N!==null)throw TypeError(N);let B=await Mw(M,_,{method:J,headers:Y,body:W,signal:Z,timeoutMs:300000}),x=$s.includes(B.status)||J==="HEAD",w=B.status>=200&&B.status<=599;if(E=new Response(x?null:B.body,{status:w?B.status:200,headers:B.headers}),!w)Object.defineProperties(E,{status:{value:B.status},ok:{value:!1}});Object.defineProperty(E,"url",{value:_.toString()})}else{let N=zz().worldEgressRefusal(_);if(N!==null)throw TypeError(N);for(let B of Object.keys(Y))if(["x-twins-key","x-volter-twin-original-host"].includes(B.toLowerCase()))delete Y[B];E=await fetch(_,{method:J,headers:Y,...W!=null&&J!=="GET"&&J!=="HEAD"?{body:W}:{},redirect:"manual",signal:Z})}if(R>0)Object.defineProperty(E,"redirected",{value:!0});let T=E.headers.get("location");if(!ea.includes(E.status)||T===null||G==="manual")return E;if(G==="error")throw TypeError(`${_.origin}${_.pathname} redirected, and the request's redirect mode is error`);if(R>=20)throw TypeError("redirect count exceeded");if(E.body)await E.body.cancel();let S=new URL(T,_);if(S.protocol!=="http:"&&S.protocol!=="https:")throw TypeError(`redirect to ${S.protocol} is not followed`);if(E.status===303&&J!=="GET"&&J!=="HEAD"||(E.status===301||E.status===302)&&J==="POST"){J="GET",W=null;for(let N of Object.keys(Y))if(/^content-/i.test(N))delete Y[N]}if(S.origin!==_.origin){for(let N of Object.keys(Y))if(Us.includes(N.toLowerCase()))delete Y[N]}_=S}}Aw.exports={appRouteFor:Ww,appHostMatch:Hw,appForwardHeaders:Fw,appDestination:nE,appRequestOptions:Tw,deliverToApp:Mw,appFetch:_s,sessionCa:pE}});var lE=N6((Gs)=>{var GX=J6(yJ());(function(){function $(O){if(O==null)return null;if(typeof O==="function")return O.$$typeof===t?null:O.displayName||O.name||null;if(typeof O==="string")return O;switch(O){case x:return"Fragment";case y:return"Profiler";case w:return"StrictMode";case i:return"Suspense";case $0:return"SuspenseList";case D0:return"Activity"}if(typeof O==="object")switch(typeof O.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),O.$$typeof){case B:return"Portal";case b:return O.displayName||"Context";case g:return(O._context.displayName||"Context")+".Consumer";case l:var A=O.render;return O=O.displayName,O||(O=A.displayName||A.name||"",O=O!==""?"ForwardRef("+O+")":"ForwardRef"),O;case Q0:return A=O.displayName||null,A!==null?A:$(O.type)||"Memo";case G0:A=O._payload,O=O._init;try{return $(O(A))}catch(k){}}return null}function I(O){return""+O}function G(O){try{I(O);var A=!1}catch(h){A=!0}if(A){A=console;var k=A.error,j=typeof Symbol==="function"&&Symbol.toStringTag&&O[Symbol.toStringTag]||O.constructor.name||"Object";return k.call(A,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",j),I(O)}}function Z(O){if(O===x)return"<>";if(typeof O==="object"&&O!==null&&O.$$typeof===G0)return"<...>";try{var A=$(O);return A?"<"+A+">":"<...>"}catch(k){return"<...>"}}function _(){var O=P0.A;return O===null?null:O.getOwner()}function J(){return Error("react-stack-top-frame")}function Y(O){if(Q.call(O,"key")){var A=Object.getOwnPropertyDescriptor(O,"key").get;if(A&&A.isReactWarning)return!1}return O.key!==void 0}function W(O,A){function k(){L||(L=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",A))}k.isReactWarning=!0,Object.defineProperty(O,"key",{get:k,configurable:!0})}function R(){var O=$(this.type);return H[O]||(H[O]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),O=this.props.ref,O!==void 0?O:null}function M(O,A,k,j,h,a){var J0=k.ref;return O={$$typeof:N,type:O,key:A,props:k,_owner:j},(J0!==void 0?J0:null)!==null?Object.defineProperty(O,"ref",{enumerable:!1,get:R}):Object.defineProperty(O,"ref",{enumerable:!1,value:null}),O._store={},Object.defineProperty(O._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(O,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(O,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:h}),Object.defineProperty(O,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(O.props),Object.freeze(O)),O}function E(O,A,k,j,h,a){var J0=A.children;if(J0!==void 0)if(j)if(D(J0)){for(j=0;j<J0.length;j++)T(J0[j]);Object.freeze&&Object.freeze(J0)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else T(J0);if(Q.call(A,"key")){J0=$(O);var K0=Object.keys(A).filter(function(d){return d!=="key"});j=0<K0.length?"{key: someKey, "+K0.join(": ..., ")+": ...}":"{key: someKey}",P[J0+j]||(K0=0<K0.length?"{"+K0.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
316
+ `));var s=new x({actual:d,expected:m,message:r,operator:W0,stackStartFn:Y0});throw s.generatedMessage=c,s}}Q.match=function d(m,r,Y0){K0(m,r,Y0,d,"match")},Q.doesNotMatch=function d(m,r,Y0){K0(m,r,Y0,d,"doesNotMatch")};function O0(){for(var d=arguments.length,m=Array(d),r=0;r<d;r++)m[r]=arguments[r];H.apply(void 0,[O0,m.length].concat(m))}Q.strict=i(O0,Q,{equal:Q.strictEqual,deepEqual:Q.deepStrictEqual,notEqual:Q.notStrictEqual,notDeepEqual:Q.notDeepStrictEqual}),Q.strict.strict=Q.strict}),rg=Pr(qE(),1),{AssertionError:Ka,CallTracker:Wa,deepEqual:Ha,deepStrictEqual:Fa,doesNotMatch:Ta,doesNotReject:Ma,doesNotThrow:Aa,equal:Ea,fail:Ra,ifError:Pa,match:Va,notDeepEqual:Sa,notDeepStrictEqual:va,notEqual:Ca,notStrictEqual:qa,ok:Na,rejects:Ba,strict:ja,strictEqual:ka,throws:ga}=rg,wa=rg});var _w={};LU(_w,{default:()=>oa});var xa,fa,Qz,hE,uE,ya=($,I,G)=>{for(let Z of hE(I))if(!uE.call($,Z)&&Z!=="default")Qz($,Z,{get:()=>I[Z],enumerable:!0});if(G){for(let Z of hE(I))if(!uE.call(G,Z)&&Z!=="default")Qz(G,Z,{get:()=>I[Z],enumerable:!0});return G}},ag=($,I,G)=>{G=$!=null?xa(fa($)):{};let Z=I||!$||!$.__esModule?Qz(G,"default",{value:$,enumerable:!0}):G;for(let _ of hE($))if(!uE.call(Z,_))Qz(Z,_,{get:()=>$[_],enumerable:!0});return Z},b6=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports),ba=($,I)=>{for(var G in I)Qz($,G,{get:I[G],enumerable:!0,configurable:!0,set:(Z)=>I[G]=()=>Z})},ha,s5,ua,sg,eg,na,pa,ca,la,ma,da,ia,$w,Uw,Iw,oa;var Xw=WI(()=>{xa=Object.create,{getPrototypeOf:fa,defineProperty:Qz,getOwnPropertyNames:hE}=Object,uE=Object.prototype.hasOwnProperty,ha=b6(($,I)=>{function G(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}I.exports=G}),s5=b6(($)=>{var I=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function G(J,Y){return Object.prototype.hasOwnProperty.call(J,Y)}$.assign=function(J){var Y=Array.prototype.slice.call(arguments,1);while(Y.length){var W=Y.shift();if(!W)continue;if(typeof W!=="object")throw TypeError(W+"must be non-object");for(var R in W)if(G(W,R))J[R]=W[R]}return J},$.shrinkBuf=function(J,Y){if(J.length===Y)return J;if(J.subarray)return J.subarray(0,Y);return J.length=Y,J};var Z={arraySet:function(J,Y,W,R,M){if(Y.subarray&&J.subarray){J.set(Y.subarray(W,W+R),M);return}for(var E=0;E<R;E++)J[M+E]=Y[W+E]},flattenChunks:function(J){var Y,W,R,M,E,T;R=0;for(Y=0,W=J.length;Y<W;Y++)R+=J[Y].length;T=new Uint8Array(R),M=0;for(Y=0,W=J.length;Y<W;Y++)E=J[Y],T.set(E,M),M+=E.length;return T}},_={arraySet:function(J,Y,W,R,M){for(var E=0;E<R;E++)J[M+E]=Y[W+E]},flattenChunks:function(J){return[].concat.apply([],J)}};$.setTyped=function(J){if(J)$.Buf8=Uint8Array,$.Buf16=Uint16Array,$.Buf32=Int32Array,$.assign($,Z);else $.Buf8=Array,$.Buf16=Array,$.Buf32=Array,$.assign($,_)},$.setTyped(I)}),ua=b6(($)=>{var I=s5(),G=4,Z=0,_=1,J=2;function Y(L0){var N0=L0.length;while(--N0>=0)L0[N0]=0}var W=0,R=1,M=2,E=3,T=258,S=29,N=256,B=N+1+S,x=30,w=19,y=2*B+1,g=15,b=16,l=7,i=256,$0=16,Q0=17,G0=18,D0=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],t=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],P0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],D=512,F=Array((B+2)*2);Y(F);var L=Array(x*2);Y(L);var H=Array(D);Y(H);var v=Array(T-E+1);Y(v);var q=Array(S);Y(q);var P=Array(x);Y(P);function O(L0,N0,B0,Y$,u){this.static_tree=L0,this.extra_bits=N0,this.extra_base=B0,this.elems=Y$,this.max_length=u,this.has_stree=L0&&L0.length}var A,k,j;function h(L0,N0){this.dyn_tree=L0,this.max_code=0,this.stat_desc=N0}function a(L0){return L0<256?H[L0]:H[256+(L0>>>7)]}function J0(L0,N0){L0.pending_buf[L0.pending++]=N0&255,L0.pending_buf[L0.pending++]=N0>>>8&255}function K0(L0,N0,B0){if(L0.bi_valid>b-B0)L0.bi_buf|=N0<<L0.bi_valid&65535,J0(L0,L0.bi_buf),L0.bi_buf=N0>>b-L0.bi_valid,L0.bi_valid+=B0-b;else L0.bi_buf|=N0<<L0.bi_valid&65535,L0.bi_valid+=B0}function O0(L0,N0,B0){K0(L0,B0[N0*2],B0[N0*2+1])}function d(L0,N0){var B0=0;do B0|=L0&1,L0>>>=1,B0<<=1;while(--N0>0);return B0>>>1}function m(L0){if(L0.bi_valid===16)J0(L0,L0.bi_buf),L0.bi_buf=0,L0.bi_valid=0;else if(L0.bi_valid>=8)L0.pending_buf[L0.pending++]=L0.bi_buf&255,L0.bi_buf>>=8,L0.bi_valid-=8}function r(L0,N0){var{dyn_tree:B0,max_code:Y$}=N0,u=N0.stat_desc.static_tree,_0=N0.stat_desc.has_stree,o=N0.stat_desc.extra_bits,R0=N0.stat_desc.extra_base,x0=N0.stat_desc.max_length,p,A0,v0,X0,H0,C0,H$=0;for(X0=0;X0<=g;X0++)L0.bl_count[X0]=0;B0[L0.heap[L0.heap_max]*2+1]=0;for(p=L0.heap_max+1;p<y;p++){if(A0=L0.heap[p],X0=B0[B0[A0*2+1]*2+1]+1,X0>x0)X0=x0,H$++;if(B0[A0*2+1]=X0,A0>Y$)continue;if(L0.bl_count[X0]++,H0=0,A0>=R0)H0=o[A0-R0];if(C0=B0[A0*2],L0.opt_len+=C0*(X0+H0),_0)L0.static_len+=C0*(u[A0*2+1]+H0)}if(H$===0)return;do{X0=x0-1;while(L0.bl_count[X0]===0)X0--;L0.bl_count[X0]--,L0.bl_count[X0+1]+=2,L0.bl_count[x0]--,H$-=2}while(H$>0);for(X0=x0;X0!==0;X0--){A0=L0.bl_count[X0];while(A0!==0){if(v0=L0.heap[--p],v0>Y$)continue;if(B0[v0*2+1]!==X0)L0.opt_len+=(X0-B0[v0*2+1])*B0[v0*2],B0[v0*2+1]=X0;A0--}}}function Y0(L0,N0,B0){var Y$=Array(g+1),u=0,_0,o;for(_0=1;_0<=g;_0++)Y$[_0]=u=u+B0[_0-1]<<1;for(o=0;o<=N0;o++){var R0=L0[o*2+1];if(R0===0)continue;L0[o*2]=d(Y$[R0]++,R0)}}function W0(){var L0,N0,B0,Y$,u,_0=Array(g+1);B0=0;for(Y$=0;Y$<S-1;Y$++){q[Y$]=B0;for(L0=0;L0<1<<D0[Y$];L0++)v[B0++]=Y$}v[B0-1]=Y$,u=0;for(Y$=0;Y$<16;Y$++){P[Y$]=u;for(L0=0;L0<1<<t[Y$];L0++)H[u++]=Y$}u>>=7;for(;Y$<x;Y$++){P[Y$]=u<<7;for(L0=0;L0<1<<t[Y$]-7;L0++)H[256+u++]=Y$}for(N0=0;N0<=g;N0++)_0[N0]=0;L0=0;while(L0<=143)F[L0*2+1]=8,L0++,_0[8]++;while(L0<=255)F[L0*2+1]=9,L0++,_0[9]++;while(L0<=279)F[L0*2+1]=7,L0++,_0[7]++;while(L0<=287)F[L0*2+1]=8,L0++,_0[8]++;Y0(F,B+1,_0);for(L0=0;L0<x;L0++)L[L0*2+1]=5,L[L0*2]=d(L0,5);A=new O(F,D0,N+1,B,g),k=new O(L,t,0,x,g),j=new O([],P0,0,w,l)}function I0(L0){var N0;for(N0=0;N0<B;N0++)L0.dyn_ltree[N0*2]=0;for(N0=0;N0<x;N0++)L0.dyn_dtree[N0*2]=0;for(N0=0;N0<w;N0++)L0.bl_tree[N0*2]=0;L0.dyn_ltree[i*2]=1,L0.opt_len=L0.static_len=0,L0.last_lit=L0.matches=0}function c(L0){if(L0.bi_valid>8)J0(L0,L0.bi_buf);else if(L0.bi_valid>0)L0.pending_buf[L0.pending++]=L0.bi_buf;L0.bi_buf=0,L0.bi_valid=0}function s(L0,N0,B0,Y$){if(c(L0),Y$)J0(L0,B0),J0(L0,~B0);I.arraySet(L0.pending_buf,L0.window,N0,B0,L0.pending),L0.pending+=B0}function S0(L0,N0,B0,Y$){var u=N0*2,_0=B0*2;return L0[u]<L0[_0]||L0[u]===L0[_0]&&Y$[N0]<=Y$[B0]}function M0(L0,N0,B0){var Y$=L0.heap[B0],u=B0<<1;while(u<=L0.heap_len){if(u<L0.heap_len&&S0(N0,L0.heap[u+1],L0.heap[u],L0.depth))u++;if(S0(N0,Y$,L0.heap[u],L0.depth))break;L0.heap[B0]=L0.heap[u],B0=u,u<<=1}L0.heap[B0]=Y$}function z0(L0,N0,B0){var Y$,u,_0=0,o,R0;if(L0.last_lit!==0)do if(Y$=L0.pending_buf[L0.d_buf+_0*2]<<8|L0.pending_buf[L0.d_buf+_0*2+1],u=L0.pending_buf[L0.l_buf+_0],_0++,Y$===0)O0(L0,u,N0);else{if(o=v[u],O0(L0,o+N+1,N0),R0=D0[o],R0!==0)u-=q[o],K0(L0,u,R0);if(Y$--,o=a(Y$),O0(L0,o,B0),R0=t[o],R0!==0)Y$-=P[o],K0(L0,Y$,R0)}while(_0<L0.last_lit);O0(L0,i,N0)}function c0(L0,N0){var B0=N0.dyn_tree,Y$=N0.stat_desc.static_tree,u=N0.stat_desc.has_stree,_0=N0.stat_desc.elems,o,R0,x0=-1,p;L0.heap_len=0,L0.heap_max=y;for(o=0;o<_0;o++)if(B0[o*2]!==0)L0.heap[++L0.heap_len]=x0=o,L0.depth[o]=0;else B0[o*2+1]=0;while(L0.heap_len<2)if(p=L0.heap[++L0.heap_len]=x0<2?++x0:0,B0[p*2]=1,L0.depth[p]=0,L0.opt_len--,u)L0.static_len-=Y$[p*2+1];N0.max_code=x0;for(o=L0.heap_len>>1;o>=1;o--)M0(L0,B0,o);p=_0;do o=L0.heap[1],L0.heap[1]=L0.heap[L0.heap_len--],M0(L0,B0,1),R0=L0.heap[1],L0.heap[--L0.heap_max]=o,L0.heap[--L0.heap_max]=R0,B0[p*2]=B0[o*2]+B0[R0*2],L0.depth[p]=(L0.depth[o]>=L0.depth[R0]?L0.depth[o]:L0.depth[R0])+1,B0[o*2+1]=B0[R0*2+1]=p,L0.heap[1]=p++,M0(L0,B0,1);while(L0.heap_len>=2);L0.heap[--L0.heap_max]=L0.heap[1],r(L0,N0),Y0(B0,x0,L0.bl_count)}function F0(L0,N0,B0){var Y$,u=-1,_0,o=N0[1],R0=0,x0=7,p=4;if(o===0)x0=138,p=3;N0[(B0+1)*2+1]=65535;for(Y$=0;Y$<=B0;Y$++){if(_0=o,o=N0[(Y$+1)*2+1],++R0<x0&&_0===o)continue;else if(R0<p)L0.bl_tree[_0*2]+=R0;else if(_0!==0){if(_0!==u)L0.bl_tree[_0*2]++;L0.bl_tree[$0*2]++}else if(R0<=10)L0.bl_tree[Q0*2]++;else L0.bl_tree[G0*2]++;if(R0=0,u=_0,o===0)x0=138,p=3;else if(_0===o)x0=6,p=3;else x0=7,p=4}}function q0(L0,N0,B0){var Y$,u=-1,_0,o=N0[1],R0=0,x0=7,p=4;if(o===0)x0=138,p=3;for(Y$=0;Y$<=B0;Y$++){if(_0=o,o=N0[(Y$+1)*2+1],++R0<x0&&_0===o)continue;else if(R0<p)do O0(L0,_0,L0.bl_tree);while(--R0!==0);else if(_0!==0){if(_0!==u)O0(L0,_0,L0.bl_tree),R0--;O0(L0,$0,L0.bl_tree),K0(L0,R0-3,2)}else if(R0<=10)O0(L0,Q0,L0.bl_tree),K0(L0,R0-3,3);else O0(L0,G0,L0.bl_tree),K0(L0,R0-11,7);if(R0=0,u=_0,o===0)x0=138,p=3;else if(_0===o)x0=6,p=3;else x0=7,p=4}}function s0(L0){var N0;F0(L0,L0.dyn_ltree,L0.l_desc.max_code),F0(L0,L0.dyn_dtree,L0.d_desc.max_code),c0(L0,L0.bl_desc);for(N0=w-1;N0>=3;N0--)if(L0.bl_tree[Q[N0]*2+1]!==0)break;return L0.opt_len+=3*(N0+1)+5+5+4,N0}function k0(L0,N0,B0,Y$){var u;K0(L0,N0-257,5),K0(L0,B0-1,5),K0(L0,Y$-4,4);for(u=0;u<Y$;u++)K0(L0,L0.bl_tree[Q[u]*2+1],3);q0(L0,L0.dyn_ltree,N0-1),q0(L0,L0.dyn_dtree,B0-1)}function n0(L0){var N0=4093624447,B0;for(B0=0;B0<=31;B0++,N0>>>=1)if(N0&1&&L0.dyn_ltree[B0*2]!==0)return Z;if(L0.dyn_ltree[18]!==0||L0.dyn_ltree[20]!==0||L0.dyn_ltree[26]!==0)return _;for(B0=32;B0<N;B0++)if(L0.dyn_ltree[B0*2]!==0)return _;return Z}var M$=!1;function T0(L0){if(!M$)W0(),M$=!0;L0.l_desc=new h(L0.dyn_ltree,A),L0.d_desc=new h(L0.dyn_dtree,k),L0.bl_desc=new h(L0.bl_tree,j),L0.bi_buf=0,L0.bi_valid=0,I0(L0)}function V0(L0,N0,B0,Y$){K0(L0,(W<<1)+(Y$?1:0),3),s(L0,N0,B0,!0)}function X$(L0){K0(L0,R<<1,3),O0(L0,i,F),m(L0)}function p0(L0,N0,B0,Y$){var u,_0,o=0;if(L0.level>0){if(L0.strm.data_type===J)L0.strm.data_type=n0(L0);if(c0(L0,L0.l_desc),c0(L0,L0.d_desc),o=s0(L0),u=L0.opt_len+3+7>>>3,_0=L0.static_len+3+7>>>3,_0<=u)u=_0}else u=_0=B0+5;if(B0+4<=u&&N0!==-1)V0(L0,N0,B0,Y$);else if(L0.strategy===G||_0===u)K0(L0,(R<<1)+(Y$?1:0),3),z0(L0,F,L);else K0(L0,(M<<1)+(Y$?1:0),3),k0(L0,L0.l_desc.max_code+1,L0.d_desc.max_code+1,o+1),z0(L0,L0.dyn_ltree,L0.dyn_dtree);if(I0(L0),Y$)c(L0)}function l0(L0,N0,B0){if(L0.pending_buf[L0.d_buf+L0.last_lit*2]=N0>>>8&255,L0.pending_buf[L0.d_buf+L0.last_lit*2+1]=N0&255,L0.pending_buf[L0.l_buf+L0.last_lit]=B0&255,L0.last_lit++,N0===0)L0.dyn_ltree[B0*2]++;else L0.matches++,N0--,L0.dyn_ltree[(v[B0]+N+1)*2]++,L0.dyn_dtree[a(N0)*2]++;return L0.last_lit===L0.lit_bufsize-1}$._tr_init=T0,$._tr_stored_block=V0,$._tr_flush_block=p0,$._tr_tally=l0,$._tr_align=X$}),sg=b6(($,I)=>{function G(Z,_,J,Y){var W=Z&65535|0,R=Z>>>16&65535|0,M=0;while(J!==0){M=J>2000?2000:J,J-=M;do W=W+_[Y++]|0,R=R+W|0;while(--M);W%=65521,R%=65521}return W|R<<16|0}I.exports=G}),eg=b6(($,I)=>{function G(){var J,Y=[];for(var W=0;W<256;W++){J=W;for(var R=0;R<8;R++)J=J&1?3988292384^J>>>1:J>>>1;Y[W]=J}return Y}var Z=G();function _(J,Y,W,R){var M=Z,E=R+W;J^=-1;for(var T=R;T<E;T++)J=J>>>8^M[(J^Y[T])&255];return J^-1}I.exports=_}),na=b6(($,I)=>{I.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}}),pa=b6(($)=>{var I=s5(),G=ua(),Z=sg(),_=eg(),J=na(),Y=0,W=1,R=3,M=4,E=5,T=0,S=1,N=-2,B=-3,x=-5,w=-1,y=1,g=2,b=3,l=4,i=0,$0=2,Q0=8,G0=9,D0=15,t=8,P0=29,Q=256,D=Q+1+P0,F=30,L=19,H=2*D+1,v=15,q=3,P=258,O=P+q+1,A=32,k=42,j=69,h=73,a=91,J0=103,K0=113,O0=666,d=1,m=2,r=3,Y0=4,W0=3;function I0(p,A0){return p.msg=J[A0],A0}function c(p){return(p<<1)-(p>4?9:0)}function s(p){var A0=p.length;while(--A0>=0)p[A0]=0}function S0(p){var A0=p.state,v0=A0.pending;if(v0>p.avail_out)v0=p.avail_out;if(v0===0)return;if(I.arraySet(p.output,A0.pending_buf,A0.pending_out,v0,p.next_out),p.next_out+=v0,A0.pending_out+=v0,p.total_out+=v0,p.avail_out-=v0,A0.pending-=v0,A0.pending===0)A0.pending_out=0}function M0(p,A0){G._tr_flush_block(p,p.block_start>=0?p.block_start:-1,p.strstart-p.block_start,A0),p.block_start=p.strstart,S0(p.strm)}function z0(p,A0){p.pending_buf[p.pending++]=A0}function c0(p,A0){p.pending_buf[p.pending++]=A0>>>8&255,p.pending_buf[p.pending++]=A0&255}function F0(p,A0,v0,X0){var H0=p.avail_in;if(H0>X0)H0=X0;if(H0===0)return 0;if(p.avail_in-=H0,I.arraySet(A0,p.input,p.next_in,H0,v0),p.state.wrap===1)p.adler=Z(p.adler,A0,H0,v0);else if(p.state.wrap===2)p.adler=_(p.adler,A0,H0,v0);return p.next_in+=H0,p.total_in+=H0,H0}function q0(p,A0){var{max_chain_length:v0,strstart:X0}=p,H0,C0,H$=p.prev_length,d0=p.nice_match,e=p.strstart>p.w_size-O?p.strstart-(p.w_size-O):0,E0=p.window,b0=p.w_mask,f0=p.prev,z$=p.strstart+P,a0=E0[X0+H$-1],U$=E0[X0+H$];if(p.prev_length>=p.good_match)v0>>=2;if(d0>p.lookahead)d0=p.lookahead;do{if(H0=A0,E0[H0+H$]!==U$||E0[H0+H$-1]!==a0||E0[H0]!==E0[X0]||E0[++H0]!==E0[X0+1])continue;X0+=2,H0++;do;while(E0[++X0]===E0[++H0]&&E0[++X0]===E0[++H0]&&E0[++X0]===E0[++H0]&&E0[++X0]===E0[++H0]&&E0[++X0]===E0[++H0]&&E0[++X0]===E0[++H0]&&E0[++X0]===E0[++H0]&&E0[++X0]===E0[++H0]&&X0<z$);if(C0=P-(z$-X0),X0=z$-P,C0>H$){if(p.match_start=A0,H$=C0,C0>=d0)break;a0=E0[X0+H$-1],U$=E0[X0+H$]}}while((A0=f0[A0&b0])>e&&--v0!==0);if(H$<=p.lookahead)return H$;return p.lookahead}function s0(p){var A0=p.w_size,v0,X0,H0,C0,H$;do{if(C0=p.window_size-p.lookahead-p.strstart,p.strstart>=A0+(A0-O)){I.arraySet(p.window,p.window,A0,A0,0),p.match_start-=A0,p.strstart-=A0,p.block_start-=A0,X0=p.hash_size,v0=X0;do H0=p.head[--v0],p.head[v0]=H0>=A0?H0-A0:0;while(--X0);X0=A0,v0=X0;do H0=p.prev[--v0],p.prev[v0]=H0>=A0?H0-A0:0;while(--X0);C0+=A0}if(p.strm.avail_in===0)break;if(X0=F0(p.strm,p.window,p.strstart+p.lookahead,C0),p.lookahead+=X0,p.lookahead+p.insert>=q){H$=p.strstart-p.insert,p.ins_h=p.window[H$],p.ins_h=(p.ins_h<<p.hash_shift^p.window[H$+1])&p.hash_mask;while(p.insert)if(p.ins_h=(p.ins_h<<p.hash_shift^p.window[H$+q-1])&p.hash_mask,p.prev[H$&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=H$,H$++,p.insert--,p.lookahead+p.insert<q)break}}while(p.lookahead<O&&p.strm.avail_in!==0)}function k0(p,A0){var v0=65535;if(v0>p.pending_buf_size-5)v0=p.pending_buf_size-5;for(;;){if(p.lookahead<=1){if(s0(p),p.lookahead===0&&A0===Y)return d;if(p.lookahead===0)break}p.strstart+=p.lookahead,p.lookahead=0;var X0=p.block_start+v0;if(p.strstart===0||p.strstart>=X0){if(p.lookahead=p.strstart-X0,p.strstart=X0,M0(p,!1),p.strm.avail_out===0)return d}if(p.strstart-p.block_start>=p.w_size-O){if(M0(p,!1),p.strm.avail_out===0)return d}}if(p.insert=0,A0===M){if(M0(p,!0),p.strm.avail_out===0)return r;return Y0}if(p.strstart>p.block_start){if(M0(p,!1),p.strm.avail_out===0)return d}return d}function n0(p,A0){var v0,X0;for(;;){if(p.lookahead<O){if(s0(p),p.lookahead<O&&A0===Y)return d;if(p.lookahead===0)break}if(v0=0,p.lookahead>=q)p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+q-1])&p.hash_mask,v0=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart;if(v0!==0&&p.strstart-v0<=p.w_size-O)p.match_length=q0(p,v0);if(p.match_length>=q)if(X0=G._tr_tally(p,p.strstart-p.match_start,p.match_length-q),p.lookahead-=p.match_length,p.match_length<=p.max_lazy_match&&p.lookahead>=q){p.match_length--;do p.strstart++,p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+q-1])&p.hash_mask,v0=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart;while(--p.match_length!==0);p.strstart++}else p.strstart+=p.match_length,p.match_length=0,p.ins_h=p.window[p.strstart],p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+1])&p.hash_mask;else X0=G._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++;if(X0){if(M0(p,!1),p.strm.avail_out===0)return d}}if(p.insert=p.strstart<q-1?p.strstart:q-1,A0===M){if(M0(p,!0),p.strm.avail_out===0)return r;return Y0}if(p.last_lit){if(M0(p,!1),p.strm.avail_out===0)return d}return m}function M$(p,A0){var v0,X0,H0;for(;;){if(p.lookahead<O){if(s0(p),p.lookahead<O&&A0===Y)return d;if(p.lookahead===0)break}if(v0=0,p.lookahead>=q)p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+q-1])&p.hash_mask,v0=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart;if(p.prev_length=p.match_length,p.prev_match=p.match_start,p.match_length=q-1,v0!==0&&p.prev_length<p.max_lazy_match&&p.strstart-v0<=p.w_size-O){if(p.match_length=q0(p,v0),p.match_length<=5&&(p.strategy===y||p.match_length===q&&p.strstart-p.match_start>4096))p.match_length=q-1}if(p.prev_length>=q&&p.match_length<=p.prev_length){H0=p.strstart+p.lookahead-q,X0=G._tr_tally(p,p.strstart-1-p.prev_match,p.prev_length-q),p.lookahead-=p.prev_length-1,p.prev_length-=2;do if(++p.strstart<=H0)p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+q-1])&p.hash_mask,v0=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart;while(--p.prev_length!==0);if(p.match_available=0,p.match_length=q-1,p.strstart++,X0){if(M0(p,!1),p.strm.avail_out===0)return d}}else if(p.match_available){if(X0=G._tr_tally(p,0,p.window[p.strstart-1]),X0)M0(p,!1);if(p.strstart++,p.lookahead--,p.strm.avail_out===0)return d}else p.match_available=1,p.strstart++,p.lookahead--}if(p.match_available)X0=G._tr_tally(p,0,p.window[p.strstart-1]),p.match_available=0;if(p.insert=p.strstart<q-1?p.strstart:q-1,A0===M){if(M0(p,!0),p.strm.avail_out===0)return r;return Y0}if(p.last_lit){if(M0(p,!1),p.strm.avail_out===0)return d}return m}function T0(p,A0){var v0,X0,H0,C0,H$=p.window;for(;;){if(p.lookahead<=P){if(s0(p),p.lookahead<=P&&A0===Y)return d;if(p.lookahead===0)break}if(p.match_length=0,p.lookahead>=q&&p.strstart>0){if(H0=p.strstart-1,X0=H$[H0],X0===H$[++H0]&&X0===H$[++H0]&&X0===H$[++H0]){C0=p.strstart+P;do;while(X0===H$[++H0]&&X0===H$[++H0]&&X0===H$[++H0]&&X0===H$[++H0]&&X0===H$[++H0]&&X0===H$[++H0]&&X0===H$[++H0]&&X0===H$[++H0]&&H0<C0);if(p.match_length=P-(C0-H0),p.match_length>p.lookahead)p.match_length=p.lookahead}}if(p.match_length>=q)v0=G._tr_tally(p,1,p.match_length-q),p.lookahead-=p.match_length,p.strstart+=p.match_length,p.match_length=0;else v0=G._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++;if(v0){if(M0(p,!1),p.strm.avail_out===0)return d}}if(p.insert=0,A0===M){if(M0(p,!0),p.strm.avail_out===0)return r;return Y0}if(p.last_lit){if(M0(p,!1),p.strm.avail_out===0)return d}return m}function V0(p,A0){var v0;for(;;){if(p.lookahead===0){if(s0(p),p.lookahead===0){if(A0===Y)return d;break}}if(p.match_length=0,v0=G._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++,v0){if(M0(p,!1),p.strm.avail_out===0)return d}}if(p.insert=0,A0===M){if(M0(p,!0),p.strm.avail_out===0)return r;return Y0}if(p.last_lit){if(M0(p,!1),p.strm.avail_out===0)return d}return m}function X$(p,A0,v0,X0,H0){this.good_length=p,this.max_lazy=A0,this.nice_length=v0,this.max_chain=X0,this.func=H0}var p0=[new X$(0,0,0,0,k0),new X$(4,4,8,4,n0),new X$(4,5,16,8,n0),new X$(4,6,32,32,n0),new X$(4,4,16,16,M$),new X$(8,16,32,32,M$),new X$(8,16,128,128,M$),new X$(8,32,128,256,M$),new X$(32,128,258,1024,M$),new X$(32,258,258,4096,M$)];function l0(p){p.window_size=2*p.w_size,s(p.head),p.max_lazy_match=p0[p.level].max_lazy,p.good_match=p0[p.level].good_length,p.nice_match=p0[p.level].nice_length,p.max_chain_length=p0[p.level].max_chain,p.strstart=0,p.block_start=0,p.lookahead=0,p.insert=0,p.match_length=p.prev_length=q-1,p.match_available=0,p.ins_h=0}function L0(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Q0,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new I.Buf16(H*2),this.dyn_dtree=new I.Buf16((2*F+1)*2),this.bl_tree=new I.Buf16((2*L+1)*2),s(this.dyn_ltree),s(this.dyn_dtree),s(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new I.Buf16(v+1),this.heap=new I.Buf16(2*D+1),s(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new I.Buf16(2*D+1),s(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function N0(p){var A0;if(!p||!p.state)return I0(p,N);if(p.total_in=p.total_out=0,p.data_type=$0,A0=p.state,A0.pending=0,A0.pending_out=0,A0.wrap<0)A0.wrap=-A0.wrap;return A0.status=A0.wrap?k:K0,p.adler=A0.wrap===2?0:1,A0.last_flush=Y,G._tr_init(A0),T}function B0(p){var A0=N0(p);if(A0===T)l0(p.state);return A0}function Y$(p,A0){if(!p||!p.state)return N;if(p.state.wrap!==2)return N;return p.state.gzhead=A0,T}function u(p,A0,v0,X0,H0,C0){if(!p)return N;var H$=1;if(A0===w)A0=6;if(X0<0)H$=0,X0=-X0;else if(X0>15)H$=2,X0-=16;if(H0<1||H0>G0||v0!==Q0||X0<8||X0>15||A0<0||A0>9||C0<0||C0>l)return I0(p,N);if(X0===8)X0=9;var d0=new L0;return p.state=d0,d0.strm=p,d0.wrap=H$,d0.gzhead=null,d0.w_bits=X0,d0.w_size=1<<d0.w_bits,d0.w_mask=d0.w_size-1,d0.hash_bits=H0+7,d0.hash_size=1<<d0.hash_bits,d0.hash_mask=d0.hash_size-1,d0.hash_shift=~~((d0.hash_bits+q-1)/q),d0.window=new I.Buf8(d0.w_size*2),d0.head=new I.Buf16(d0.hash_size),d0.prev=new I.Buf16(d0.w_size),d0.lit_bufsize=1<<H0+6,d0.pending_buf_size=d0.lit_bufsize*4,d0.pending_buf=new I.Buf8(d0.pending_buf_size),d0.d_buf=1*d0.lit_bufsize,d0.l_buf=3*d0.lit_bufsize,d0.level=A0,d0.strategy=C0,d0.method=v0,B0(p)}function _0(p,A0){return u(p,A0,Q0,D0,t,i)}function o(p,A0){var v0,X0,H0,C0;if(!p||!p.state||A0>E||A0<0)return p?I0(p,N):N;if(X0=p.state,!p.output||!p.input&&p.avail_in!==0||X0.status===O0&&A0!==M)return I0(p,p.avail_out===0?x:N);if(X0.strm=p,v0=X0.last_flush,X0.last_flush=A0,X0.status===k)if(X0.wrap===2)if(p.adler=0,z0(X0,31),z0(X0,139),z0(X0,8),!X0.gzhead)z0(X0,0),z0(X0,0),z0(X0,0),z0(X0,0),z0(X0,0),z0(X0,X0.level===9?2:X0.strategy>=g||X0.level<2?4:0),z0(X0,W0),X0.status=K0;else{if(z0(X0,(X0.gzhead.text?1:0)+(X0.gzhead.hcrc?2:0)+(!X0.gzhead.extra?0:4)+(!X0.gzhead.name?0:8)+(!X0.gzhead.comment?0:16)),z0(X0,X0.gzhead.time&255),z0(X0,X0.gzhead.time>>8&255),z0(X0,X0.gzhead.time>>16&255),z0(X0,X0.gzhead.time>>24&255),z0(X0,X0.level===9?2:X0.strategy>=g||X0.level<2?4:0),z0(X0,X0.gzhead.os&255),X0.gzhead.extra&&X0.gzhead.extra.length)z0(X0,X0.gzhead.extra.length&255),z0(X0,X0.gzhead.extra.length>>8&255);if(X0.gzhead.hcrc)p.adler=_(p.adler,X0.pending_buf,X0.pending,0);X0.gzindex=0,X0.status=j}else{var H$=Q0+(X0.w_bits-8<<4)<<8,d0=-1;if(X0.strategy>=g||X0.level<2)d0=0;else if(X0.level<6)d0=1;else if(X0.level===6)d0=2;else d0=3;if(H$|=d0<<6,X0.strstart!==0)H$|=A;if(H$+=31-H$%31,X0.status=K0,c0(X0,H$),X0.strstart!==0)c0(X0,p.adler>>>16),c0(X0,p.adler&65535);p.adler=1}if(X0.status===j)if(X0.gzhead.extra){H0=X0.pending;while(X0.gzindex<(X0.gzhead.extra.length&65535)){if(X0.pending===X0.pending_buf_size){if(X0.gzhead.hcrc&&X0.pending>H0)p.adler=_(p.adler,X0.pending_buf,X0.pending-H0,H0);if(S0(p),H0=X0.pending,X0.pending===X0.pending_buf_size)break}z0(X0,X0.gzhead.extra[X0.gzindex]&255),X0.gzindex++}if(X0.gzhead.hcrc&&X0.pending>H0)p.adler=_(p.adler,X0.pending_buf,X0.pending-H0,H0);if(X0.gzindex===X0.gzhead.extra.length)X0.gzindex=0,X0.status=h}else X0.status=h;if(X0.status===h)if(X0.gzhead.name){H0=X0.pending;do{if(X0.pending===X0.pending_buf_size){if(X0.gzhead.hcrc&&X0.pending>H0)p.adler=_(p.adler,X0.pending_buf,X0.pending-H0,H0);if(S0(p),H0=X0.pending,X0.pending===X0.pending_buf_size){C0=1;break}}if(X0.gzindex<X0.gzhead.name.length)C0=X0.gzhead.name.charCodeAt(X0.gzindex++)&255;else C0=0;z0(X0,C0)}while(C0!==0);if(X0.gzhead.hcrc&&X0.pending>H0)p.adler=_(p.adler,X0.pending_buf,X0.pending-H0,H0);if(C0===0)X0.gzindex=0,X0.status=a}else X0.status=a;if(X0.status===a)if(X0.gzhead.comment){H0=X0.pending;do{if(X0.pending===X0.pending_buf_size){if(X0.gzhead.hcrc&&X0.pending>H0)p.adler=_(p.adler,X0.pending_buf,X0.pending-H0,H0);if(S0(p),H0=X0.pending,X0.pending===X0.pending_buf_size){C0=1;break}}if(X0.gzindex<X0.gzhead.comment.length)C0=X0.gzhead.comment.charCodeAt(X0.gzindex++)&255;else C0=0;z0(X0,C0)}while(C0!==0);if(X0.gzhead.hcrc&&X0.pending>H0)p.adler=_(p.adler,X0.pending_buf,X0.pending-H0,H0);if(C0===0)X0.status=J0}else X0.status=J0;if(X0.status===J0)if(X0.gzhead.hcrc){if(X0.pending+2>X0.pending_buf_size)S0(p);if(X0.pending+2<=X0.pending_buf_size)z0(X0,p.adler&255),z0(X0,p.adler>>8&255),p.adler=0,X0.status=K0}else X0.status=K0;if(X0.pending!==0){if(S0(p),p.avail_out===0)return X0.last_flush=-1,T}else if(p.avail_in===0&&c(A0)<=c(v0)&&A0!==M)return I0(p,x);if(X0.status===O0&&p.avail_in!==0)return I0(p,x);if(p.avail_in!==0||X0.lookahead!==0||A0!==Y&&X0.status!==O0){var e=X0.strategy===g?V0(X0,A0):X0.strategy===b?T0(X0,A0):p0[X0.level].func(X0,A0);if(e===r||e===Y0)X0.status=O0;if(e===d||e===r){if(p.avail_out===0)X0.last_flush=-1;return T}if(e===m){if(A0===W)G._tr_align(X0);else if(A0!==E){if(G._tr_stored_block(X0,0,0,!1),A0===R){if(s(X0.head),X0.lookahead===0)X0.strstart=0,X0.block_start=0,X0.insert=0}}if(S0(p),p.avail_out===0)return X0.last_flush=-1,T}}if(A0!==M)return T;if(X0.wrap<=0)return S;if(X0.wrap===2)z0(X0,p.adler&255),z0(X0,p.adler>>8&255),z0(X0,p.adler>>16&255),z0(X0,p.adler>>24&255),z0(X0,p.total_in&255),z0(X0,p.total_in>>8&255),z0(X0,p.total_in>>16&255),z0(X0,p.total_in>>24&255);else c0(X0,p.adler>>>16),c0(X0,p.adler&65535);if(S0(p),X0.wrap>0)X0.wrap=-X0.wrap;return X0.pending!==0?T:S}function R0(p){var A0;if(!p||!p.state)return N;if(A0=p.state.status,A0!==k&&A0!==j&&A0!==h&&A0!==a&&A0!==J0&&A0!==K0&&A0!==O0)return I0(p,N);return p.state=null,A0===K0?I0(p,B):T}function x0(p,A0){var v0=A0.length,X0,H0,C0,H$,d0,e,E0,b0;if(!p||!p.state)return N;if(X0=p.state,H$=X0.wrap,H$===2||H$===1&&X0.status!==k||X0.lookahead)return N;if(H$===1)p.adler=Z(p.adler,A0,v0,0);if(X0.wrap=0,v0>=X0.w_size){if(H$===0)s(X0.head),X0.strstart=0,X0.block_start=0,X0.insert=0;b0=new I.Buf8(X0.w_size),I.arraySet(b0,A0,v0-X0.w_size,X0.w_size,0),A0=b0,v0=X0.w_size}d0=p.avail_in,e=p.next_in,E0=p.input,p.avail_in=v0,p.next_in=0,p.input=A0,s0(X0);while(X0.lookahead>=q){H0=X0.strstart,C0=X0.lookahead-(q-1);do X0.ins_h=(X0.ins_h<<X0.hash_shift^X0.window[H0+q-1])&X0.hash_mask,X0.prev[H0&X0.w_mask]=X0.head[X0.ins_h],X0.head[X0.ins_h]=H0,H0++;while(--C0);X0.strstart=H0,X0.lookahead=q-1,s0(X0)}return X0.strstart+=X0.lookahead,X0.block_start=X0.strstart,X0.insert=X0.lookahead,X0.lookahead=0,X0.match_length=X0.prev_length=q-1,X0.match_available=0,p.next_in=e,p.input=E0,p.avail_in=d0,X0.wrap=H$,T}$.deflateInit=_0,$.deflateInit2=u,$.deflateReset=B0,$.deflateResetKeep=N0,$.deflateSetHeader=Y$,$.deflate=o,$.deflateEnd=R0,$.deflateSetDictionary=x0,$.deflateInfo="pako deflate (from Nodeca project)"}),ca=b6(($,I)=>{var G=30,Z=12;I.exports=function(_,J){var Y,W,R,M,E,T,S,N,B,x,w,y,g,b,l,i,$0,Q0,G0,D0,t,P0,Q,D,F;Y=_.state,W=_.next_in,D=_.input,R=W+(_.avail_in-5),M=_.next_out,F=_.output,E=M-(J-_.avail_out),T=M+(_.avail_out-257),S=Y.dmax,N=Y.wsize,B=Y.whave,x=Y.wnext,w=Y.window,y=Y.hold,g=Y.bits,b=Y.lencode,l=Y.distcode,i=(1<<Y.lenbits)-1,$0=(1<<Y.distbits)-1;$:do{if(g<15)y+=D[W++]<<g,g+=8,y+=D[W++]<<g,g+=8;Q0=b[y&i];U:for(;;){if(G0=Q0>>>24,y>>>=G0,g-=G0,G0=Q0>>>16&255,G0===0)F[M++]=Q0&65535;else if(G0&16){if(D0=Q0&65535,G0&=15,G0){if(g<G0)y+=D[W++]<<g,g+=8;D0+=y&(1<<G0)-1,y>>>=G0,g-=G0}if(g<15)y+=D[W++]<<g,g+=8,y+=D[W++]<<g,g+=8;Q0=l[y&$0];I:for(;;){if(G0=Q0>>>24,y>>>=G0,g-=G0,G0=Q0>>>16&255,G0&16){if(t=Q0&65535,G0&=15,g<G0){if(y+=D[W++]<<g,g+=8,g<G0)y+=D[W++]<<g,g+=8}if(t+=y&(1<<G0)-1,t>S){_.msg="invalid distance too far back",Y.mode=G;break $}if(y>>>=G0,g-=G0,G0=M-E,t>G0){if(G0=t-G0,G0>B){if(Y.sane){_.msg="invalid distance too far back",Y.mode=G;break $}}if(P0=0,Q=w,x===0){if(P0+=N-G0,G0<D0){D0-=G0;do F[M++]=w[P0++];while(--G0);P0=M-t,Q=F}}else if(x<G0){if(P0+=N+x-G0,G0-=x,G0<D0){D0-=G0;do F[M++]=w[P0++];while(--G0);if(P0=0,x<D0){G0=x,D0-=G0;do F[M++]=w[P0++];while(--G0);P0=M-t,Q=F}}}else if(P0+=x-G0,G0<D0){D0-=G0;do F[M++]=w[P0++];while(--G0);P0=M-t,Q=F}while(D0>2)F[M++]=Q[P0++],F[M++]=Q[P0++],F[M++]=Q[P0++],D0-=3;if(D0){if(F[M++]=Q[P0++],D0>1)F[M++]=Q[P0++]}}else{P0=M-t;do F[M++]=F[P0++],F[M++]=F[P0++],F[M++]=F[P0++],D0-=3;while(D0>2);if(D0){if(F[M++]=F[P0++],D0>1)F[M++]=F[P0++]}}}else if((G0&64)===0){Q0=l[(Q0&65535)+(y&(1<<G0)-1)];continue I}else{_.msg="invalid distance code",Y.mode=G;break $}break}}else if((G0&64)===0){Q0=b[(Q0&65535)+(y&(1<<G0)-1)];continue U}else if(G0&32){Y.mode=Z;break $}else{_.msg="invalid literal/length code",Y.mode=G;break $}break}}while(W<R&&M<T);D0=g>>3,W-=D0,g-=D0<<3,y&=(1<<g)-1,_.next_in=W,_.next_out=M,_.avail_in=W<R?5+(R-W):5-(W-R),_.avail_out=M<T?257+(T-M):257-(M-T),Y.hold=y,Y.bits=g;return}}),la=b6(($,I)=>{var G=s5(),Z=15,_=852,J=592,Y=0,W=1,R=2,M=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],E=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],T=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],S=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];I.exports=function(N,B,x,w,y,g,b,l){var i=l.bits,$0=0,Q0=0,G0=0,D0=0,t=0,P0=0,Q=0,D=0,F=0,L=0,H,v,q,P,O,A=null,k=0,j,h=new G.Buf16(Z+1),a=new G.Buf16(Z+1),J0=null,K0=0,O0,d,m;for($0=0;$0<=Z;$0++)h[$0]=0;for(Q0=0;Q0<w;Q0++)h[B[x+Q0]]++;t=i;for(D0=Z;D0>=1;D0--)if(h[D0]!==0)break;if(t>D0)t=D0;if(D0===0)return y[g++]=20971520,y[g++]=20971520,l.bits=1,0;for(G0=1;G0<D0;G0++)if(h[G0]!==0)break;if(t<G0)t=G0;D=1;for($0=1;$0<=Z;$0++)if(D<<=1,D-=h[$0],D<0)return-1;if(D>0&&(N===Y||D0!==1))return-1;a[1]=0;for($0=1;$0<Z;$0++)a[$0+1]=a[$0]+h[$0];for(Q0=0;Q0<w;Q0++)if(B[x+Q0]!==0)b[a[B[x+Q0]]++]=Q0;if(N===Y)A=J0=b,j=19;else if(N===W)A=M,k-=257,J0=E,K0-=257,j=256;else A=T,J0=S,j=-1;if(L=0,Q0=0,$0=G0,O=g,P0=t,Q=0,q=-1,F=1<<t,P=F-1,N===W&&F>_||N===R&&F>J)return 1;for(;;){if(O0=$0-Q,b[Q0]<j)d=0,m=b[Q0];else if(b[Q0]>j)d=J0[K0+b[Q0]],m=A[k+b[Q0]];else d=96,m=0;H=1<<$0-Q,v=1<<P0,G0=v;do v-=H,y[O+(L>>Q)+v]=O0<<24|d<<16|m|0;while(v!==0);H=1<<$0-1;while(L&H)H>>=1;if(H!==0)L&=H-1,L+=H;else L=0;if(Q0++,--h[$0]===0){if($0===D0)break;$0=B[x+b[Q0]]}if($0>t&&(L&P)!==q){if(Q===0)Q=t;O+=G0,P0=$0-Q,D=1<<P0;while(P0+Q<D0){if(D-=h[P0+Q],D<=0)break;P0++,D<<=1}if(F+=1<<P0,N===W&&F>_||N===R&&F>J)return 1;q=L&P,y[q]=t<<24|P0<<16|O-g|0}}if(L!==0)y[O+L]=$0-Q<<24|4194304|0;return l.bits=t,0}}),ma=b6(($)=>{var I=s5(),G=sg(),Z=eg(),_=ca(),J=la(),Y=0,W=1,R=2,M=4,E=5,T=6,S=0,N=1,B=2,x=-2,w=-3,y=-4,g=-5,b=8,l=1,i=2,$0=3,Q0=4,G0=5,D0=6,t=7,P0=8,Q=9,D=10,F=11,L=12,H=13,v=14,q=15,P=16,O=17,A=18,k=19,j=20,h=21,a=22,J0=23,K0=24,O0=25,d=26,m=27,r=28,Y0=29,W0=30,I0=31,c=32,s=852,S0=592,M0=15,z0=M0;function c0(u){return(u>>>24&255)+(u>>>8&65280)+((u&65280)<<8)+((u&255)<<24)}function F0(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function q0(u){var _0;if(!u||!u.state)return x;if(_0=u.state,u.total_in=u.total_out=_0.total=0,u.msg="",_0.wrap)u.adler=_0.wrap&1;return _0.mode=l,_0.last=0,_0.havedict=0,_0.dmax=32768,_0.head=null,_0.hold=0,_0.bits=0,_0.lencode=_0.lendyn=new I.Buf32(s),_0.distcode=_0.distdyn=new I.Buf32(S0),_0.sane=1,_0.back=-1,S}function s0(u){var _0;if(!u||!u.state)return x;return _0=u.state,_0.wsize=0,_0.whave=0,_0.wnext=0,q0(u)}function k0(u,_0){var o,R0;if(!u||!u.state)return x;if(R0=u.state,_0<0)o=0,_0=-_0;else if(o=(_0>>4)+1,_0<48)_0&=15;if(_0&&(_0<8||_0>15))return x;if(R0.window!==null&&R0.wbits!==_0)R0.window=null;return R0.wrap=o,R0.wbits=_0,s0(u)}function n0(u,_0){var o,R0;if(!u)return x;if(R0=new F0,u.state=R0,R0.window=null,o=k0(u,_0),o!==S)u.state=null;return o}function M$(u){return n0(u,z0)}var T0=!0,V0,X$;function p0(u){if(T0){var _0;V0=new I.Buf32(512),X$=new I.Buf32(32),_0=0;while(_0<144)u.lens[_0++]=8;while(_0<256)u.lens[_0++]=9;while(_0<280)u.lens[_0++]=7;while(_0<288)u.lens[_0++]=8;J(W,u.lens,0,288,V0,0,u.work,{bits:9}),_0=0;while(_0<32)u.lens[_0++]=5;J(R,u.lens,0,32,X$,0,u.work,{bits:5}),T0=!1}u.lencode=V0,u.lenbits=9,u.distcode=X$,u.distbits=5}function l0(u,_0,o,R0){var x0,p=u.state;if(p.window===null)p.wsize=1<<p.wbits,p.wnext=0,p.whave=0,p.window=new I.Buf8(p.wsize);if(R0>=p.wsize)I.arraySet(p.window,_0,o-p.wsize,p.wsize,0),p.wnext=0,p.whave=p.wsize;else{if(x0=p.wsize-p.wnext,x0>R0)x0=R0;if(I.arraySet(p.window,_0,o-R0,x0,p.wnext),R0-=x0,R0)I.arraySet(p.window,_0,o-R0,R0,0),p.wnext=R0,p.whave=p.wsize;else{if(p.wnext+=x0,p.wnext===p.wsize)p.wnext=0;if(p.whave<p.wsize)p.whave+=x0}}return 0}function L0(u,_0){var o,R0,x0,p,A0,v0,X0,H0,C0,H$,d0,e,E0,b0,f0=0,z$,a0,U$,c$,D$,L$,B$,Z$,I$=new I.Buf8(4),I1,C$,g$=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!u||!u.state||!u.output||!u.input&&u.avail_in!==0)return x;if(o=u.state,o.mode===L)o.mode=H;A0=u.next_out,x0=u.output,X0=u.avail_out,p=u.next_in,R0=u.input,v0=u.avail_in,H0=o.hold,C0=o.bits,H$=v0,d0=X0,Z$=S;$:for(;;)switch(o.mode){case l:if(o.wrap===0){o.mode=H;break}while(C0<16){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(o.wrap&2&&H0===35615){o.check=0,I$[0]=H0&255,I$[1]=H0>>>8&255,o.check=Z(o.check,I$,2,0),H0=0,C0=0,o.mode=i;break}if(o.flags=0,o.head)o.head.done=!1;if(!(o.wrap&1)||(((H0&255)<<8)+(H0>>8))%31){u.msg="incorrect header check",o.mode=W0;break}if((H0&15)!==b){u.msg="unknown compression method",o.mode=W0;break}if(H0>>>=4,C0-=4,B$=(H0&15)+8,o.wbits===0)o.wbits=B$;else if(B$>o.wbits){u.msg="invalid window size",o.mode=W0;break}o.dmax=1<<B$,u.adler=o.check=1,o.mode=H0&512?D:L,H0=0,C0=0;break;case i:while(C0<16){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(o.flags=H0,(o.flags&255)!==b){u.msg="unknown compression method",o.mode=W0;break}if(o.flags&57344){u.msg="unknown header flags set",o.mode=W0;break}if(o.head)o.head.text=H0>>8&1;if(o.flags&512)I$[0]=H0&255,I$[1]=H0>>>8&255,o.check=Z(o.check,I$,2,0);H0=0,C0=0,o.mode=$0;case $0:while(C0<32){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(o.head)o.head.time=H0;if(o.flags&512)I$[0]=H0&255,I$[1]=H0>>>8&255,I$[2]=H0>>>16&255,I$[3]=H0>>>24&255,o.check=Z(o.check,I$,4,0);H0=0,C0=0,o.mode=Q0;case Q0:while(C0<16){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(o.head)o.head.xflags=H0&255,o.head.os=H0>>8;if(o.flags&512)I$[0]=H0&255,I$[1]=H0>>>8&255,o.check=Z(o.check,I$,2,0);H0=0,C0=0,o.mode=G0;case G0:if(o.flags&1024){while(C0<16){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(o.length=H0,o.head)o.head.extra_len=H0;if(o.flags&512)I$[0]=H0&255,I$[1]=H0>>>8&255,o.check=Z(o.check,I$,2,0);H0=0,C0=0}else if(o.head)o.head.extra=null;o.mode=D0;case D0:if(o.flags&1024){if(e=o.length,e>v0)e=v0;if(e){if(o.head){if(B$=o.head.extra_len-o.length,!o.head.extra)o.head.extra=Array(o.head.extra_len);I.arraySet(o.head.extra,R0,p,e,B$)}if(o.flags&512)o.check=Z(o.check,R0,e,p);v0-=e,p+=e,o.length-=e}if(o.length)break $}o.length=0,o.mode=t;case t:if(o.flags&2048){if(v0===0)break $;e=0;do if(B$=R0[p+e++],o.head&&B$&&o.length<65536)o.head.name+=String.fromCharCode(B$);while(B$&&e<v0);if(o.flags&512)o.check=Z(o.check,R0,e,p);if(v0-=e,p+=e,B$)break $}else if(o.head)o.head.name=null;o.length=0,o.mode=P0;case P0:if(o.flags&4096){if(v0===0)break $;e=0;do if(B$=R0[p+e++],o.head&&B$&&o.length<65536)o.head.comment+=String.fromCharCode(B$);while(B$&&e<v0);if(o.flags&512)o.check=Z(o.check,R0,e,p);if(v0-=e,p+=e,B$)break $}else if(o.head)o.head.comment=null;o.mode=Q;case Q:if(o.flags&512){while(C0<16){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(H0!==(o.check&65535)){u.msg="header crc mismatch",o.mode=W0;break}H0=0,C0=0}if(o.head)o.head.hcrc=o.flags>>9&1,o.head.done=!0;u.adler=o.check=0,o.mode=L;break;case D:while(C0<32){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}u.adler=o.check=c0(H0),H0=0,C0=0,o.mode=F;case F:if(o.havedict===0)return u.next_out=A0,u.avail_out=X0,u.next_in=p,u.avail_in=v0,o.hold=H0,o.bits=C0,B;u.adler=o.check=1,o.mode=L;case L:if(_0===E||_0===T)break $;case H:if(o.last){H0>>>=C0&7,C0-=C0&7,o.mode=m;break}while(C0<3){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}switch(o.last=H0&1,H0>>>=1,C0-=1,H0&3){case 0:o.mode=v;break;case 1:if(p0(o),o.mode=j,_0===T){H0>>>=2,C0-=2;break $}break;case 2:o.mode=O;break;case 3:u.msg="invalid block type",o.mode=W0}H0>>>=2,C0-=2;break;case v:H0>>>=C0&7,C0-=C0&7;while(C0<32){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if((H0&65535)!==(H0>>>16^65535)){u.msg="invalid stored block lengths",o.mode=W0;break}if(o.length=H0&65535,H0=0,C0=0,o.mode=q,_0===T)break $;case q:o.mode=P;case P:if(e=o.length,e){if(e>v0)e=v0;if(e>X0)e=X0;if(e===0)break $;I.arraySet(x0,R0,p,e,A0),v0-=e,p+=e,X0-=e,A0+=e,o.length-=e;break}o.mode=L;break;case O:while(C0<14){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(o.nlen=(H0&31)+257,H0>>>=5,C0-=5,o.ndist=(H0&31)+1,H0>>>=5,C0-=5,o.ncode=(H0&15)+4,H0>>>=4,C0-=4,o.nlen>286||o.ndist>30){u.msg="too many length or distance symbols",o.mode=W0;break}o.have=0,o.mode=A;case A:while(o.have<o.ncode){while(C0<3){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}o.lens[g$[o.have++]]=H0&7,H0>>>=3,C0-=3}while(o.have<19)o.lens[g$[o.have++]]=0;if(o.lencode=o.lendyn,o.lenbits=7,I1={bits:o.lenbits},Z$=J(Y,o.lens,0,19,o.lencode,0,o.work,I1),o.lenbits=I1.bits,Z$){u.msg="invalid code lengths set",o.mode=W0;break}o.have=0,o.mode=k;case k:while(o.have<o.nlen+o.ndist){for(;;){if(f0=o.lencode[H0&(1<<o.lenbits)-1],z$=f0>>>24,a0=f0>>>16&255,U$=f0&65535,z$<=C0)break;if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(U$<16)H0>>>=z$,C0-=z$,o.lens[o.have++]=U$;else{if(U$===16){C$=z$+2;while(C0<C$){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(H0>>>=z$,C0-=z$,o.have===0){u.msg="invalid bit length repeat",o.mode=W0;break}B$=o.lens[o.have-1],e=3+(H0&3),H0>>>=2,C0-=2}else if(U$===17){C$=z$+3;while(C0<C$){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}H0>>>=z$,C0-=z$,B$=0,e=3+(H0&7),H0>>>=3,C0-=3}else{C$=z$+7;while(C0<C$){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}H0>>>=z$,C0-=z$,B$=0,e=11+(H0&127),H0>>>=7,C0-=7}if(o.have+e>o.nlen+o.ndist){u.msg="invalid bit length repeat",o.mode=W0;break}while(e--)o.lens[o.have++]=B$}}if(o.mode===W0)break;if(o.lens[256]===0){u.msg="invalid code -- missing end-of-block",o.mode=W0;break}if(o.lenbits=9,I1={bits:o.lenbits},Z$=J(W,o.lens,0,o.nlen,o.lencode,0,o.work,I1),o.lenbits=I1.bits,Z$){u.msg="invalid literal/lengths set",o.mode=W0;break}if(o.distbits=6,o.distcode=o.distdyn,I1={bits:o.distbits},Z$=J(R,o.lens,o.nlen,o.ndist,o.distcode,0,o.work,I1),o.distbits=I1.bits,Z$){u.msg="invalid distances set",o.mode=W0;break}if(o.mode=j,_0===T)break $;case j:o.mode=h;case h:if(v0>=6&&X0>=258){if(u.next_out=A0,u.avail_out=X0,u.next_in=p,u.avail_in=v0,o.hold=H0,o.bits=C0,_(u,d0),A0=u.next_out,x0=u.output,X0=u.avail_out,p=u.next_in,R0=u.input,v0=u.avail_in,H0=o.hold,C0=o.bits,o.mode===L)o.back=-1;break}o.back=0;for(;;){if(f0=o.lencode[H0&(1<<o.lenbits)-1],z$=f0>>>24,a0=f0>>>16&255,U$=f0&65535,z$<=C0)break;if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(a0&&(a0&240)===0){c$=z$,D$=a0,L$=U$;for(;;){if(f0=o.lencode[L$+((H0&(1<<c$+D$)-1)>>c$)],z$=f0>>>24,a0=f0>>>16&255,U$=f0&65535,c$+z$<=C0)break;if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}H0>>>=c$,C0-=c$,o.back+=c$}if(H0>>>=z$,C0-=z$,o.back+=z$,o.length=U$,a0===0){o.mode=d;break}if(a0&32){o.back=-1,o.mode=L;break}if(a0&64){u.msg="invalid literal/length code",o.mode=W0;break}o.extra=a0&15,o.mode=a;case a:if(o.extra){C$=o.extra;while(C0<C$){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}o.length+=H0&(1<<o.extra)-1,H0>>>=o.extra,C0-=o.extra,o.back+=o.extra}o.was=o.length,o.mode=J0;case J0:for(;;){if(f0=o.distcode[H0&(1<<o.distbits)-1],z$=f0>>>24,a0=f0>>>16&255,U$=f0&65535,z$<=C0)break;if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if((a0&240)===0){c$=z$,D$=a0,L$=U$;for(;;){if(f0=o.distcode[L$+((H0&(1<<c$+D$)-1)>>c$)],z$=f0>>>24,a0=f0>>>16&255,U$=f0&65535,c$+z$<=C0)break;if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}H0>>>=c$,C0-=c$,o.back+=c$}if(H0>>>=z$,C0-=z$,o.back+=z$,a0&64){u.msg="invalid distance code",o.mode=W0;break}o.offset=U$,o.extra=a0&15,o.mode=K0;case K0:if(o.extra){C$=o.extra;while(C0<C$){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}o.offset+=H0&(1<<o.extra)-1,H0>>>=o.extra,C0-=o.extra,o.back+=o.extra}if(o.offset>o.dmax){u.msg="invalid distance too far back",o.mode=W0;break}o.mode=O0;case O0:if(X0===0)break $;if(e=d0-X0,o.offset>e){if(e=o.offset-e,e>o.whave){if(o.sane){u.msg="invalid distance too far back",o.mode=W0;break}}if(e>o.wnext)e-=o.wnext,E0=o.wsize-e;else E0=o.wnext-e;if(e>o.length)e=o.length;b0=o.window}else b0=x0,E0=A0-o.offset,e=o.length;if(e>X0)e=X0;X0-=e,o.length-=e;do x0[A0++]=b0[E0++];while(--e);if(o.length===0)o.mode=h;break;case d:if(X0===0)break $;x0[A0++]=o.length,X0--,o.mode=h;break;case m:if(o.wrap){while(C0<32){if(v0===0)break $;v0--,H0|=R0[p++]<<C0,C0+=8}if(d0-=X0,u.total_out+=d0,o.total+=d0,d0)u.adler=o.check=o.flags?Z(o.check,x0,d0,A0-d0):G(o.check,x0,d0,A0-d0);if(d0=X0,(o.flags?H0:c0(H0))!==o.check){u.msg="incorrect data check",o.mode=W0;break}H0=0,C0=0}o.mode=r;case r:if(o.wrap&&o.flags){while(C0<32){if(v0===0)break $;v0--,H0+=R0[p++]<<C0,C0+=8}if(H0!==(o.total&4294967295)){u.msg="incorrect length check",o.mode=W0;break}H0=0,C0=0}o.mode=Y0;case Y0:Z$=N;break $;case W0:Z$=w;break $;case I0:return y;case c:default:return x}if(u.next_out=A0,u.avail_out=X0,u.next_in=p,u.avail_in=v0,o.hold=H0,o.bits=C0,o.wsize||d0!==u.avail_out&&o.mode<W0&&(o.mode<m||_0!==M)){if(l0(u,u.output,u.next_out,d0-u.avail_out))return o.mode=I0,y}if(H$-=u.avail_in,d0-=u.avail_out,u.total_in+=H$,u.total_out+=d0,o.total+=d0,o.wrap&&d0)u.adler=o.check=o.flags?Z(o.check,x0,d0,u.next_out-d0):G(o.check,x0,d0,u.next_out-d0);if(u.data_type=o.bits+(o.last?64:0)+(o.mode===L?128:0)+(o.mode===j||o.mode===q?256:0),(H$===0&&d0===0||_0===M)&&Z$===S)Z$=g;return Z$}function N0(u){if(!u||!u.state)return x;var _0=u.state;if(_0.window)_0.window=null;return u.state=null,S}function B0(u,_0){var o;if(!u||!u.state)return x;if(o=u.state,(o.wrap&2)===0)return x;return o.head=_0,_0.done=!1,S}function Y$(u,_0){var o=_0.length,R0,x0,p;if(!u||!u.state)return x;if(R0=u.state,R0.wrap!==0&&R0.mode!==F)return x;if(R0.mode===F){if(x0=1,x0=G(x0,_0,o,0),x0!==R0.check)return w}if(p=l0(u,_0,o,o),p)return R0.mode=I0,y;return R0.havedict=1,S}$.inflateReset=s0,$.inflateReset2=k0,$.inflateResetKeep=q0,$.inflateInit=M$,$.inflateInit2=n0,$.inflate=L0,$.inflateEnd=N0,$.inflateGetHeader=B0,$.inflateSetDictionary=Y$,$.inflateInfo="pako inflate (from Nodeca project)"}),da=b6(($,I)=>{I.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}}),ia=b6(($)=>{var I=(bE(),V$(yE)),G=ha(),Z=pa(),_=ma(),J=da();for(Y in J)$[Y]=J[Y];var Y;$.NONE=0,$.DEFLATE=1,$.INFLATE=2,$.GZIP=3,$.GUNZIP=4,$.DEFLATERAW=5,$.INFLATERAW=6,$.UNZIP=7;var W=31,R=139;function M(E){if(typeof E!=="number"||E<$.DEFLATE||E>$.UNZIP)throw TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=E,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}M.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}if(this.pending_close=!1,I(this.init_done,"close before init"),I(this.mode<=$.UNZIP),this.mode===$.DEFLATE||this.mode===$.GZIP||this.mode===$.DEFLATERAW)Z.deflateEnd(this.strm);else if(this.mode===$.INFLATE||this.mode===$.GUNZIP||this.mode===$.INFLATERAW||this.mode===$.UNZIP)_.inflateEnd(this.strm);this.mode=$.NONE,this.dictionary=null},M.prototype.write=function(E,T,S,N,B,x,w){return this._write(!0,E,T,S,N,B,x,w)},M.prototype.writeSync=function(E,T,S,N,B,x,w){return this._write(!1,E,T,S,N,B,x,w)},M.prototype._write=function(E,T,S,N,B,x,w,y){if(I.equal(arguments.length,8),I(this.init_done,"write before init"),I(this.mode!==$.NONE,"already finalized"),I.equal(!1,this.write_in_progress,"write already in progress"),I.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,I.equal(!1,T===void 0,"must provide flush value"),this.write_in_progress=!0,T!==$.Z_NO_FLUSH&&T!==$.Z_PARTIAL_FLUSH&&T!==$.Z_SYNC_FLUSH&&T!==$.Z_FULL_FLUSH&&T!==$.Z_FINISH&&T!==$.Z_BLOCK)throw Error("Invalid flush value");if(S==null)S=Buffer.alloc(0),B=0,N=0;if(this.strm.avail_in=B,this.strm.input=S,this.strm.next_in=N,this.strm.avail_out=y,this.strm.output=x,this.strm.next_out=w,this.flush=T,!E){if(this._process(),this._checkError())return this._afterSync();return}var g=this;return process.nextTick(function(){g._process(),g._after()}),this},M.prototype._afterSync=function(){var E=this.strm.avail_out,T=this.strm.avail_in;return this.write_in_progress=!1,[T,E]},M.prototype._process=function(){var E=null;switch(this.mode){case $.DEFLATE:case $.GZIP:case $.DEFLATERAW:this.err=Z.deflate(this.strm,this.flush);break;case $.UNZIP:if(this.strm.avail_in>0)E=this.strm.next_in;switch(this.gzip_id_bytes_read){case 0:if(E===null)break;if(this.strm.input[E]===W){if(this.gzip_id_bytes_read=1,E++,this.strm.avail_in===1)break}else{this.mode=$.INFLATE;break}case 1:if(E===null)break;if(this.strm.input[E]===R)this.gzip_id_bytes_read=2,this.mode=$.GUNZIP;else this.mode=$.INFLATE;break;default:throw Error("invalid number of gzip magic number bytes read")}case $.INFLATE:case $.GUNZIP:case $.INFLATERAW:if(this.err=_.inflate(this.strm,this.flush),this.err===$.Z_NEED_DICT&&this.dictionary){if(this.err=_.inflateSetDictionary(this.strm,this.dictionary),this.err===$.Z_OK)this.err=_.inflate(this.strm,this.flush);else if(this.err===$.Z_DATA_ERROR)this.err=$.Z_NEED_DICT}while(this.strm.avail_in>0&&this.mode===$.GUNZIP&&this.err===$.Z_STREAM_END&&this.strm.next_in[0]!==0)this.reset(),this.err=_.inflate(this.strm,this.flush);break;default:throw Error("Unknown mode "+this.mode)}},M.prototype._checkError=function(){switch(this.err){case $.Z_OK:case $.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===$.Z_FINISH)return this._error("unexpected end of file"),!1;break;case $.Z_STREAM_END:break;case $.Z_NEED_DICT:if(this.dictionary==null)this._error("Missing dictionary");else this._error("Bad dictionary");return!1;default:return this._error("Zlib error"),!1}return!0},M.prototype._after=function(){if(!this._checkError())return;var E=this.strm.avail_out,T=this.strm.avail_in;if(this.write_in_progress=!1,this.callback(T,E),this.pending_close)this.close()},M.prototype._error=function(E){if(this.strm.msg)E=this.strm.msg;if(this.onerror(E,this.err),this.write_in_progress=!1,this.pending_close)this.close()},M.prototype.init=function(E,T,S,N,B){I(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),I(E>=8&&E<=15,"invalid windowBits"),I(T>=-1&&T<=9,"invalid compression level"),I(S>=1&&S<=9,"invalid memlevel"),I(N===$.Z_FILTERED||N===$.Z_HUFFMAN_ONLY||N===$.Z_RLE||N===$.Z_FIXED||N===$.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(T,E,S,N,B),this._setDictionary()},M.prototype.params=function(){throw Error("deflateParams Not supported")},M.prototype.reset=function(){this._reset(),this._setDictionary()},M.prototype._init=function(E,T,S,N,B){if(this.level=E,this.windowBits=T,this.memLevel=S,this.strategy=N,this.flush=$.Z_NO_FLUSH,this.err=$.Z_OK,this.mode===$.GZIP||this.mode===$.GUNZIP)this.windowBits+=16;if(this.mode===$.UNZIP)this.windowBits+=32;if(this.mode===$.DEFLATERAW||this.mode===$.INFLATERAW)this.windowBits=-1*this.windowBits;switch(this.strm=new G,this.mode){case $.DEFLATE:case $.GZIP:case $.DEFLATERAW:this.err=Z.deflateInit2(this.strm,this.level,$.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case $.INFLATE:case $.GUNZIP:case $.INFLATERAW:case $.UNZIP:this.err=_.inflateInit2(this.strm,this.windowBits);break;default:throw Error("Unknown mode "+this.mode)}if(this.err!==$.Z_OK)this._error("Init error");this.dictionary=B,this.write_in_progress=!1,this.init_done=!0},M.prototype._setDictionary=function(){if(this.dictionary==null)return;switch(this.err=$.Z_OK,this.mode){case $.DEFLATE:case $.DEFLATERAW:this.err=Z.deflateSetDictionary(this.strm,this.dictionary);break;default:break}if(this.err!==$.Z_OK)this._error("Failed to set dictionary")},M.prototype._reset=function(){switch(this.err=$.Z_OK,this.mode){case $.DEFLATE:case $.DEFLATERAW:case $.GZIP:this.err=Z.deflateReset(this.strm);break;case $.INFLATE:case $.INFLATERAW:case $.GUNZIP:this.err=_.inflateReset(this.strm);break;default:break}if(this.err!==$.Z_OK)this._error("Failed to reset stream")},$.Zlib=M}),$w=b6(($)=>{var I=(u1(),V$(h1)).Buffer,G=w4().Transform,Z=ia(),_=(C2(),V$(v2)),J=(bE(),V$(yE)).ok,Y=(u1(),V$(h1)).kMaxLength,W="Cannot create final Buffer. It would be larger than 0x"+Y.toString(16)+" bytes";Z.Z_MIN_WINDOWBITS=8,Z.Z_MAX_WINDOWBITS=15,Z.Z_DEFAULT_WINDOWBITS=15,Z.Z_MIN_CHUNK=64,Z.Z_MAX_CHUNK=1/0,Z.Z_DEFAULT_CHUNK=16384,Z.Z_MIN_MEMLEVEL=1,Z.Z_MAX_MEMLEVEL=9,Z.Z_DEFAULT_MEMLEVEL=8,Z.Z_MIN_LEVEL=-1,Z.Z_MAX_LEVEL=9,Z.Z_DEFAULT_LEVEL=Z.Z_DEFAULT_COMPRESSION;var R=Object.keys(Z);for(E=0;E<R.length;E++)if(M=R[E],M.match(/^Z/))Object.defineProperty($,M,{enumerable:!0,value:Z[M],writable:!1});var M,E,T={Z_OK:Z.Z_OK,Z_STREAM_END:Z.Z_STREAM_END,Z_NEED_DICT:Z.Z_NEED_DICT,Z_ERRNO:Z.Z_ERRNO,Z_STREAM_ERROR:Z.Z_STREAM_ERROR,Z_DATA_ERROR:Z.Z_DATA_ERROR,Z_MEM_ERROR:Z.Z_MEM_ERROR,Z_BUF_ERROR:Z.Z_BUF_ERROR,Z_VERSION_ERROR:Z.Z_VERSION_ERROR},S=Object.keys(T);for(B=0;B<S.length;B++)N=S[B],T[T[N]]=N;var N,B;Object.defineProperty($,"codes",{enumerable:!0,value:Object.freeze(T),writable:!1}),$.Deflate=y,$.Inflate=g,$.Gzip=b,$.Gunzip=l,$.DeflateRaw=i,$.InflateRaw=$0,$.Unzip=Q0,$.createDeflate=function(Q){return new y(Q)},$.createInflate=function(Q){return new g(Q)},$.createDeflateRaw=function(Q){return new i(Q)},$.createInflateRaw=function(Q){return new $0(Q)},$.createGzip=function(Q){return new b(Q)},$.createGunzip=function(Q){return new l(Q)},$.createUnzip=function(Q){return new Q0(Q)},$.deflate=function(Q,D,F){if(typeof D==="function")F=D,D={};return x(new y(D),Q,F)},$.deflateSync=function(Q,D){return w(new y(D),Q)},$.gzip=function(Q,D,F){if(typeof D==="function")F=D,D={};return x(new b(D),Q,F)},$.gzipSync=function(Q,D){return w(new b(D),Q)},$.deflateRaw=function(Q,D,F){if(typeof D==="function")F=D,D={};return x(new i(D),Q,F)},$.deflateRawSync=function(Q,D){return w(new i(D),Q)},$.unzip=function(Q,D,F){if(typeof D==="function")F=D,D={};return x(new Q0(D),Q,F)},$.unzipSync=function(Q,D){return w(new Q0(D),Q)},$.inflate=function(Q,D,F){if(typeof D==="function")F=D,D={};return x(new g(D),Q,F)},$.inflateSync=function(Q,D){return w(new g(D),Q)},$.gunzip=function(Q,D,F){if(typeof D==="function")F=D,D={};return x(new l(D),Q,F)},$.gunzipSync=function(Q,D){return w(new l(D),Q)},$.inflateRaw=function(Q,D,F){if(typeof D==="function")F=D,D={};return x(new $0(D),Q,F)},$.inflateRawSync=function(Q,D){return w(new $0(D),Q)};function x(Q,D,F){var L=[],H=0;Q.on("error",q),Q.on("end",P),Q.end(D),v();function v(){var O;while((O=Q.read())!==null)L.push(O),H+=O.length;Q.once("readable",v)}function q(O){Q.removeListener("end",P),Q.removeListener("readable",v),F(O)}function P(){var O,A=null;if(H>=Y)A=RangeError(W);else O=I.concat(L,H);L=[],Q.close(),F(A,O)}}function w(Q,D){if(typeof D==="string")D=I.from(D);if(!I.isBuffer(D))throw TypeError("Not a string or buffer");var F=Q._finishFlushFlag;return Q._processChunk(D,F)}function y(Q){if(!(this instanceof y))return new y(Q);D0.call(this,Q,Z.DEFLATE)}function g(Q){if(!(this instanceof g))return new g(Q);D0.call(this,Q,Z.INFLATE)}function b(Q){if(!(this instanceof b))return new b(Q);D0.call(this,Q,Z.GZIP)}function l(Q){if(!(this instanceof l))return new l(Q);D0.call(this,Q,Z.GUNZIP)}function i(Q){if(!(this instanceof i))return new i(Q);D0.call(this,Q,Z.DEFLATERAW)}function $0(Q){if(!(this instanceof $0))return new $0(Q);D0.call(this,Q,Z.INFLATERAW)}function Q0(Q){if(!(this instanceof Q0))return new Q0(Q);D0.call(this,Q,Z.UNZIP)}function G0(Q){return Q===Z.Z_NO_FLUSH||Q===Z.Z_PARTIAL_FLUSH||Q===Z.Z_SYNC_FLUSH||Q===Z.Z_FULL_FLUSH||Q===Z.Z_FINISH||Q===Z.Z_BLOCK}function D0(Q,D){var F=this;if(this._opts=Q=Q||{},this._chunkSize=Q.chunkSize||$.Z_DEFAULT_CHUNK,G.call(this,Q),Q.flush&&!G0(Q.flush))throw Error("Invalid flush flag: "+Q.flush);if(Q.finishFlush&&!G0(Q.finishFlush))throw Error("Invalid flush flag: "+Q.finishFlush);if(this._flushFlag=Q.flush||Z.Z_NO_FLUSH,this._finishFlushFlag=typeof Q.finishFlush<"u"?Q.finishFlush:Z.Z_FINISH,Q.chunkSize){if(Q.chunkSize<$.Z_MIN_CHUNK||Q.chunkSize>$.Z_MAX_CHUNK)throw Error("Invalid chunk size: "+Q.chunkSize)}if(Q.windowBits){if(Q.windowBits<$.Z_MIN_WINDOWBITS||Q.windowBits>$.Z_MAX_WINDOWBITS)throw Error("Invalid windowBits: "+Q.windowBits)}if(Q.level){if(Q.level<$.Z_MIN_LEVEL||Q.level>$.Z_MAX_LEVEL)throw Error("Invalid compression level: "+Q.level)}if(Q.memLevel){if(Q.memLevel<$.Z_MIN_MEMLEVEL||Q.memLevel>$.Z_MAX_MEMLEVEL)throw Error("Invalid memLevel: "+Q.memLevel)}if(Q.strategy){if(Q.strategy!=$.Z_FILTERED&&Q.strategy!=$.Z_HUFFMAN_ONLY&&Q.strategy!=$.Z_RLE&&Q.strategy!=$.Z_FIXED&&Q.strategy!=$.Z_DEFAULT_STRATEGY)throw Error("Invalid strategy: "+Q.strategy)}if(Q.dictionary){if(!I.isBuffer(Q.dictionary))throw Error("Invalid dictionary: it should be a Buffer instance")}this._handle=new Z.Zlib(D);var L=this;this._hadError=!1,this._handle.onerror=function(q,P){t(L),L._hadError=!0;var O=Error(q);O.errno=P,O.code=$.codes[P],L.emit("error",O)};var H=$.Z_DEFAULT_COMPRESSION;if(typeof Q.level==="number")H=Q.level;var v=$.Z_DEFAULT_STRATEGY;if(typeof Q.strategy==="number")v=Q.strategy;this._handle.init(Q.windowBits||$.Z_DEFAULT_WINDOWBITS,H,Q.memLevel||$.Z_DEFAULT_MEMLEVEL,v,Q.dictionary),this._buffer=I.allocUnsafe(this._chunkSize),this._offset=0,this._level=H,this._strategy=v,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!F._handle},configurable:!0,enumerable:!0})}_.inherits(D0,G),D0.prototype.params=function(Q,D,F){if(Q<$.Z_MIN_LEVEL||Q>$.Z_MAX_LEVEL)throw RangeError("Invalid compression level: "+Q);if(D!=$.Z_FILTERED&&D!=$.Z_HUFFMAN_ONLY&&D!=$.Z_RLE&&D!=$.Z_FIXED&&D!=$.Z_DEFAULT_STRATEGY)throw TypeError("Invalid strategy: "+D);if(this._level!==Q||this._strategy!==D){var L=this;this.flush(Z.Z_SYNC_FLUSH,function(){if(J(L._handle,"zlib binding closed"),L._handle.params(Q,D),!L._hadError){if(L._level=Q,L._strategy=D,F)F()}})}else process.nextTick(F)},D0.prototype.reset=function(){return J(this._handle,"zlib binding closed"),this._handle.reset()},D0.prototype._flush=function(Q){this._transform(I.alloc(0),"",Q)},D0.prototype.flush=function(Q,D){var F=this,L=this._writableState;if(typeof Q==="function"||Q===void 0&&!D)D=Q,Q=Z.Z_FULL_FLUSH;if(L.ended){if(D)process.nextTick(D)}else if(L.ending){if(D)this.once("end",D)}else if(L.needDrain){if(D)this.once("drain",function(){return F.flush(Q,D)})}else this._flushFlag=Q,this.write(I.alloc(0),"",D)},D0.prototype.close=function(Q){t(this,Q),process.nextTick(P0,this)};function t(Q,D){if(D)process.nextTick(D);if(!Q._handle)return;Q._handle.close(),Q._handle=null}function P0(Q){Q.emit("close")}D0.prototype._transform=function(Q,D,F){var L,H=this._writableState,v=H.ending||H.ended,q=v&&(!Q||H.length===Q.length);if(Q!==null&&!I.isBuffer(Q))return F(Error("invalid input"));if(!this._handle)return F(Error("zlib binding closed"));if(q)L=this._finishFlushFlag;else if(L=this._flushFlag,Q.length>=H.length)this._flushFlag=this._opts.flush||Z.Z_NO_FLUSH;this._processChunk(Q,L,F)},D0.prototype._processChunk=function(Q,D,F){var L=Q&&Q.length,H=this._chunkSize-this._offset,v=0,q=this,P=typeof F==="function";if(!P){var O=[],A=0,k;this.on("error",function(K0){k=K0}),J(this._handle,"zlib binding closed");do var j=this._handle.writeSync(D,Q,v,L,this._buffer,this._offset,H);while(!this._hadError&&J0(j[0],j[1]));if(this._hadError)throw k;if(A>=Y)throw t(this),RangeError(W);var h=I.concat(O,A);return t(this),h}J(this._handle,"zlib binding closed");var a=this._handle.write(D,Q,v,L,this._buffer,this._offset,H);a.buffer=Q,a.callback=J0;function J0(K0,O0){if(this)this.buffer=null,this.callback=null;if(q._hadError)return;var d=H-O0;if(J(d>=0,"have should not go down"),d>0){var m=q._buffer.slice(q._offset,q._offset+d);if(q._offset+=d,P)q.push(m);else O.push(m),A+=m.length}if(O0===0||q._offset>=q._chunkSize)H=q._chunkSize,q._offset=0,q._buffer=I.allocUnsafe(q._chunkSize);if(O0===0){if(v+=L-K0,L=K0,!P)return!0;var r=q._handle.write(D,Q,v,L,q._buffer,q._offset,q._chunkSize);r.callback=J0,r.buffer=Q;return}if(!P)return!1;F()}},_.inherits(y,D0),_.inherits(g,D0),_.inherits(b,D0),_.inherits(l,D0),_.inherits(i,D0),_.inherits($0,D0),_.inherits(Q0,D0)}),Uw={};ba(Uw,{default:()=>Iw.default});ya(Uw,ag($w(),1));Iw=ag($w(),1),oa=Iw.default});var zz=N6(($z0,Lw)=>{function Gw($,I,G){if(!$||typeof $!=="object"||Array.isArray($)||Object.keys($).some((Z)=>!I.includes(Z)))throw Error(`${G} has an invalid shape`);return $}function ta($){if(!Array.isArray($)||$.length>256)throw Error("World network egress must be an array of at most 256 exact HTTPS origins");let I=$.map((G)=>{if(typeof G!=="string"||G.length>2048)throw Error("World network egress origins must be strings");let Z;try{Z=new URL(G)}catch{throw Error(`Invalid World network origin: ${G}`)}if(Z.protocol!=="https:"||Z.origin!==G||Z.username||Z.password||!/^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/.test(Z.hostname)||Z.hostname.split(".").some((_)=>!_||_.length>63||_.startsWith("-")||_.endsWith("-"))||/^[\d.]+$/.test(Z.hostname)||Z.hostname==="localhost"||Z.hostname.endsWith(".localhost"))throw Error(`World network requires an exact canonical HTTPS origin: ${G}`);return G});return Object.freeze([...new Set(I)].sort())}function Yw($){let I=Gw($,["egress"],"World network");return Object.freeze({egress:ta(I.egress)})}function Jw($,I){if(typeof $!=="string"||!$||$.length>256)throw Error("World network policy requires its World identity");return Object.freeze({version:1,world:$,egress:Yw(I).egress})}function Qw($){let I=Gw($,["version","world","egress"],"World network policy");if(I.version!==1)throw Error("Unsupported World network policy version");return Jw(I.world,{egress:I.egress})}function zw($){let I=$.VOLTER_WORLD_NETWORK_POLICY;if(I===void 0)return;if(typeof I!=="string"||I.length>65536)throw Error("Invalid published World network policy");let G=Qw(JSON.parse(I));if(!$.VOLTER_WORLD||G.world!==$.VOLTER_WORLD)throw Error("World network policy does not belong to the attached World");return G}function Zw($,I){let G;try{G=new URL(String(I))}catch{return!1}return G.protocol==="https:"&&!G.username&&!G.password&&$.egress.includes(G.origin)}function Ow($){let I=String($||"").toLowerCase().replace(/^\[|\]$/g,"");if(!I)return!0;if(I==="localhost"||I.endsWith(".localhost")||I.endsWith(".test")||I==="0.0.0.0"||I==="::1")return!0;let G=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(I);if(G){let Z=Number(G[1]),_=Number(G[2]);return Z===127||Z===10||Z===172&&_>=16&&_<=31||Z===192&&_===168||Z===169&&_===254}return I.includes(":")&&(I.startsWith("fc")||I.startsWith("fd")||I.startsWith("fe80:"))}function ra($,I=process.env){let G;try{G=new URL(String($))}catch{return`unparseable destination ${String($)}`}if(Ow(G.hostname))return null;if(I.VOLTER_TWIN_STRICT_EGRESS==="1"||I.VOLTER_TWIN_STRICT_EGRESS==="true")return`sealed World refuses untwinned host ${G.hostname}`;let Z;try{Z=zw(I)}catch(_){return`World network policy unreadable (${_.message}); refusing ${G.hostname}`}if(Z!==void 0&&!Zw(Z,G))return`World network policy does not allow ${G.origin}`;return null}Lw.exports={isWorldInternalHost:Ow,worldEgressRefusal:ra,WORLD_NETWORK_POLICY_ENV:"VOLTER_WORLD_NETWORK_POLICY",normalizeWorldNetwork:Yw,createWorldNetworkPolicy:Jw,parseWorldNetworkPolicy:Qw,worldNetworkPolicyFromEnv:zw,allowsWorldNetworkEgress:Zw}});var Ew=N6((Uz0,Aw)=>{var Dw=new Map;function Kw($,I){if(!I||!Array.isArray(I.hosts)||!I.hosts.length)return null;return{name:$,url:typeof I.url==="string"?I.url:null,hosts:new Set(I.hosts.map((G)=>String(G).toLowerCase()))}}function aa($){if(!$)return{routes:[],twins:{}};let I=Date.now(),G=Dw.get($);if(G&&I-G.checkedAt<1000)return G;if(!G)G={checkedAt:0,mtimeMs:-1,routes:[],services:{},twins:{}},Dw.set($,G);G.checkedAt=I;let Z=(()=>({})),_=(DU(),V$(QB)),J=_.join(_.dirname($),"app-url.json");try{let Y=JSON.parse(Z.readFileSync($,"utf8"));G.services=Y.services||{},G.twins=i5().twinOrigins(Y.env||{})}catch{}try{let Y=Z.statSync(J).mtimeMs;if(Y!==G.mtimeMs){G.mtimeMs=Y;let R=JSON.parse(Z.readFileSync(J,"utf8")),M=R.apps&&typeof R.apps==="object"?Object.entries(R.apps):[];G.routes=[Kw("app",R),...M.map(([E,T])=>Kw(E,T))].filter(Boolean)}let W=G.services;for(let R of G.routes){let M=R.url??W[R.name]?.url;R.origin=typeof M==="string"?M.replace(/\/$/,""):null}}catch(Y){if(G.mtimeMs=-1,Y&&Y.code==="ENOENT")G.routes=[]}return G}function Ww($,I,G={}){let Z=String(I||"").toLowerCase().replace(/\.$/,""),_=aa($),J=_.routes.find((W)=>W.origin&&Hw(W.hosts,Z));if(!J)return null;let Y=(W)=>Object.hasOwn(_.twins,W)||Object.hasOwn(G,W);return i5().vendorsOfHost(Z).some(Y)?null:J}function Hw($,I){if($.has(I))return!0;for(let G=I.indexOf(".");G>0;G=I.indexOf(".",G+1))if($.has(`*${I.slice(G)}`))return!0;return!1}function Fw($){return{"x-forwarded-host":$.host,"x-forwarded-proto":$.protocol==="https:"?"https":"http"}}function nE($,I=process.env){let G;try{G=new URL(String($))}catch{return null}if(G.protocol!=="http:"&&G.protocol!=="https:")return null;return Ww(I.VOLTER_WORLD_INSTANCE,G.hostname,i5().twinOrigins(I))}var e5=void 0;function pE(){if(e5===void 0){let $=process.env.NODE_EXTRA_CA_CERTS;try{e5=$?(()=>{throw new Error("Cannot require module "+"fs");})().readFileSync($):null}catch{e5=null}}return e5}var sa=["accept-encoding","x-twins-key","x-volter-twin-original-host","proxy-connection","host","x-forwarded-host","x-forwarded-proto"];function Tw($,I,G,Z,_){let{isIP:J}=(CE(),V$(Vg)),Y=new URL($.origin),W={};for(let[R,M]of Object.entries(Z||{}))if(M!==void 0&&!sa.includes(R.toLowerCase()))W[R]=M;if(Object.assign(W,Fw(I),{host:I.host}),(I.username||I.password)&&!Object.keys(W).some((R)=>R.toLowerCase()==="authorization"))W.authorization=`Basic ${Buffer.from(`${decodeURIComponent(I.username)}:${decodeURIComponent(I.password)}`).toString("base64")}`;return{protocol:Y.protocol,hostname:Y.hostname,port:Y.port||(Y.protocol==="https:"?443:80),method:G,path:`${Y.pathname.replace(/\/$/,"")}${I.pathname}${I.search}`,headers:W,..._&&_.signal?{signal:_.signal}:{},..._&&_.timeout!==void 0?{timeout:_.timeout}:{},...Y.protocol==="https:"&&pE()?{ca:pE()}:{},...Y.protocol==="https:"?{servername:J(Y.hostname)?"":Y.hostname}:{}}}function Mw($,I,{method:G="POST",headers:Z={},body:_,timeoutMs:J=30000,signal:Y}={}){let W=new URL(String(I));if(Y&&Y.aborted)return Promise.reject(Y.reason);let R=Tw($,W,G,Z),M=(R.protocol==="https:"?(wg(),V$(gg)):(Xz(),V$(d5))).request;return new Promise((E,T)=>{let S=!1,N=()=>x(Y.reason),B=()=>{if(S=!0,clearTimeout(y),Y)Y.removeEventListener("abort",N)},x=(g)=>{if(!S)B(),w.destroy(),T(g)},w=M(R,(g)=>{g.on("error",x),g.on("aborted",()=>x(Error(`the application's answer to ${W.origin}${W.pathname} was cut off`)));let b=String(g.headers["content-encoding"]||"").toLowerCase(),l=(Xw(),V$(_w)),i=b==="gzip"||b==="x-gzip"?l.createGunzip():b==="deflate"?l.createInflate():b==="br"?l.createBrotliDecompress():null,$0=i?g.pipe(i):g,Q0=[];$0.on("data",(G0)=>Q0.push(G0)),$0.on("error",x),$0.on("end",()=>{if(S)return;B();let G0={};for(let[D0,t]of Object.entries(g.headers))if(t!==void 0&&!(i&&(D0==="content-encoding"||D0==="content-length")))G0[D0.toLowerCase()]=Array.isArray(t)?t.join(", "):String(t);E({status:g.statusCode,headers:G0,body:Buffer.concat(Q0).toString("utf8")})})}),y=Number.isFinite(J)?setTimeout(()=>x(Error(`the application did not answer ${W.origin}${W.pathname} within ${J} ms`)),J):void 0;if(w.on("error",x),Y)Y.addEventListener("abort",N,{once:!0});if(_!=null&&G!=="GET"&&G!=="HEAD")w.write(_);w.end()})}var ea=[301,302,303,307,308],$s=[204,205,304],Us=["authorization","cookie","proxy-authorization"];function Is($,I){if($==null)return null;if(typeof $==="string")return $;if($ instanceof URLSearchParams){if(!Object.keys(I).some((G)=>G.toLowerCase()==="content-type"))I["content-type"]="application/x-www-form-urlencoded;charset=UTF-8";return $.toString()}if($ instanceof ArrayBuffer)return Buffer.from($);if(ArrayBuffer.isView($))return Buffer.from($.buffer,$.byteOffset,$.byteLength);throw TypeError("appFetch sends a string, URLSearchParams or bytes body")}async function _s($,I={}){if(!nE($)){let R=zz().worldEgressRefusal($);if(R!==null)throw TypeError(R);return fetch($,I)}let G=I.redirect||"follow",Z=I.signal||void 0,_=new URL(String($)),J=String(I.method||"GET").toUpperCase(),Y={};new Headers(I.headers||{}).forEach((R,M)=>{Y[M]=R});let W=Is(I.body,Y);for(let R=0;;R++){let M=nE(_),E;if(M){let N=zz().worldEgressRefusal(M.origin);if(N!==null)throw TypeError(N);let B=await Mw(M,_,{method:J,headers:Y,body:W,signal:Z,timeoutMs:300000}),x=$s.includes(B.status)||J==="HEAD",w=B.status>=200&&B.status<=599;if(E=new Response(x?null:B.body,{status:w?B.status:200,headers:B.headers}),!w)Object.defineProperties(E,{status:{value:B.status},ok:{value:!1}});Object.defineProperty(E,"url",{value:_.toString()})}else{let N=zz().worldEgressRefusal(_);if(N!==null)throw TypeError(N);for(let B of Object.keys(Y))if(["x-twins-key","x-volter-twin-original-host"].includes(B.toLowerCase()))delete Y[B];E=await fetch(_,{method:J,headers:Y,...W!=null&&J!=="GET"&&J!=="HEAD"?{body:W}:{},redirect:"manual",signal:Z})}if(R>0)Object.defineProperty(E,"redirected",{value:!0});let T=E.headers.get("location");if(!ea.includes(E.status)||T===null||G==="manual")return E;if(G==="error")throw TypeError(`${_.origin}${_.pathname} redirected, and the request's redirect mode is error`);if(R>=20)throw TypeError("redirect count exceeded");if(E.body)await E.body.cancel();let S=new URL(T,_);if(S.protocol!=="http:"&&S.protocol!=="https:")throw TypeError(`redirect to ${S.protocol} is not followed`);if(E.status===303&&J!=="GET"&&J!=="HEAD"||(E.status===301||E.status===302)&&J==="POST"){J="GET",W=null;for(let N of Object.keys(Y))if(/^content-/i.test(N))delete Y[N]}if(S.origin!==_.origin){for(let N of Object.keys(Y))if(Us.includes(N.toLowerCase()))delete Y[N]}_=S}}Aw.exports={appRouteFor:Ww,appHostMatch:Hw,appForwardHeaders:Fw,appDestination:nE,appRequestOptions:Tw,deliverToApp:Mw,appFetch:_s,sessionCa:pE}});var lE=N6((Gs)=>{var GX=J6(yJ());(function(){function $(O){if(O==null)return null;if(typeof O==="function")return O.$$typeof===t?null:O.displayName||O.name||null;if(typeof O==="string")return O;switch(O){case x:return"Fragment";case y:return"Profiler";case w:return"StrictMode";case i:return"Suspense";case $0:return"SuspenseList";case D0:return"Activity"}if(typeof O==="object")switch(typeof O.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),O.$$typeof){case B:return"Portal";case b:return O.displayName||"Context";case g:return(O._context.displayName||"Context")+".Consumer";case l:var A=O.render;return O=O.displayName,O||(O=A.displayName||A.name||"",O=O!==""?"ForwardRef("+O+")":"ForwardRef"),O;case Q0:return A=O.displayName||null,A!==null?A:$(O.type)||"Memo";case G0:A=O._payload,O=O._init;try{return $(O(A))}catch(k){}}return null}function I(O){return""+O}function G(O){try{I(O);var A=!1}catch(h){A=!0}if(A){A=console;var k=A.error,j=typeof Symbol==="function"&&Symbol.toStringTag&&O[Symbol.toStringTag]||O.constructor.name||"Object";return k.call(A,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",j),I(O)}}function Z(O){if(O===x)return"<>";if(typeof O==="object"&&O!==null&&O.$$typeof===G0)return"<...>";try{var A=$(O);return A?"<"+A+">":"<...>"}catch(k){return"<...>"}}function _(){var O=P0.A;return O===null?null:O.getOwner()}function J(){return Error("react-stack-top-frame")}function Y(O){if(Q.call(O,"key")){var A=Object.getOwnPropertyDescriptor(O,"key").get;if(A&&A.isReactWarning)return!1}return O.key!==void 0}function W(O,A){function k(){L||(L=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",A))}k.isReactWarning=!0,Object.defineProperty(O,"key",{get:k,configurable:!0})}function R(){var O=$(this.type);return H[O]||(H[O]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),O=this.props.ref,O!==void 0?O:null}function M(O,A,k,j,h,a){var J0=k.ref;return O={$$typeof:N,type:O,key:A,props:k,_owner:j},(J0!==void 0?J0:null)!==null?Object.defineProperty(O,"ref",{enumerable:!1,get:R}):Object.defineProperty(O,"ref",{enumerable:!1,value:null}),O._store={},Object.defineProperty(O._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(O,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(O,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:h}),Object.defineProperty(O,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(O.props),Object.freeze(O)),O}function E(O,A,k,j,h,a){var J0=A.children;if(J0!==void 0)if(j)if(D(J0)){for(j=0;j<J0.length;j++)T(J0[j]);Object.freeze&&Object.freeze(J0)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else T(J0);if(Q.call(A,"key")){J0=$(O);var K0=Object.keys(A).filter(function(d){return d!=="key"});j=0<K0.length?"{key: someKey, "+K0.join(": ..., ")+": ...}":"{key: someKey}",P[J0+j]||(K0=0<K0.length?"{"+K0.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
317
317
  let props = %s;
318
318
  <%s {...props} />
319
319
  React keys must be passed directly to JSX without using spread:
320
320
  let props = %s;
321
- <%s key={someKey} {...props} />`,j,J0,K0,J0),P[J0+j]=!0)}if(J0=null,k!==void 0&&(G(k),J0=""+k),Y(A)&&(G(A.key),J0=""+A.key),"key"in A){k={};for(var O0 in A)O0!=="key"&&(k[O0]=A[O0])}else k=A;return J0&&W(k,typeof O==="function"?O.displayName||O.name||"Unknown":O),M(O,J0,k,_(),h,a)}function T(O){S(O)?O._store&&(O._store.validated=1):typeof O==="object"&&O!==null&&O.$$typeof===G0&&(O._payload.status==="fulfilled"?S(O._payload.value)&&O._payload.value._store&&(O._payload.value._store.validated=1):O._store&&(O._store.validated=1))}function S(O){return typeof O==="object"&&O!==null&&O.$$typeof===N}var N=Symbol.for("react.transitional.element"),B=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),b=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),$0=Symbol.for("react.suspense_list"),Q0=Symbol.for("react.memo"),G0=Symbol.for("react.lazy"),D0=Symbol.for("react.activity"),t=Symbol.for("react.client.reference"),P0=GX.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=Object.prototype.hasOwnProperty,D=Array.isArray,F=console.createTask?console.createTask:function(){return null};GX={react_stack_bottom_frame:function(O){return O()}};var L,H={},v=GX.react_stack_bottom_frame.bind(GX,J)(),q=F(Z(J)),P={};Gs.Fragment=x,Gs.jsxDEV=function(O,A,k,j){var h=1e4>P0.recentlyCreatedOwnerStacks++;return E(O,A,k,j,h?Error("react-stack-top-frame"):v,h?F(Z(O)):q)}})()});var E1=J6(yJ(),1),Cw=J6(vq(),1);var{readFile:Vz0}=(()=>({}));d1();var{closeSync:o60,existsSync:t60,fstatSync:r60,mkdirSync:a60,openSync:s60,readFileSync:e60,renameSync:$I0,rmSync:UI0,statSync:II0,writeFileSync:_I0,writeSync:XI0}=(()=>({}));var bZ=function(){if(typeof location<"u")return location.hostname;else return""};var OW=function(){return"/"};DU();function tJ(){let $=process.env.VOLTER_HOME;return $!==void 0&&$!==""?$:G1(OW(),".volter")}DU();DU();d1();d1();DU();var{appendFileSync:Kp,chmodSync:OB,closeSync:hZ,existsSync:rJ,fsyncSync:Wp,fstatSync:LB,lstatSync:DB,mkdirSync:aJ,openSync:uZ,readdirSync:Hp,readSync:Fp,realpathSync:Tp,readFileSync:TW,renameSync:KB,rmSync:WB,statSync:TB,unlinkSync:FW,writeFileSync:sJ}=(()=>({}));var{AsyncLocalStorage:L00}=(()=>({}));var zB="x-volter-read-only";class WW extends Error{service;constructor($){super(`${$}: this request is read-only (${zB}: 1); it cannot write`);this.service=$;this.name="ReadOnlyRequestError"}}var ZB;function HW(){let $=ZB?.getStore();return $!==void 0&&$.readOnly&&!$.vendorMove}function w_($){if(!HW())return;let I=new WW($);throw ZB.getStore().refusals.push(I),I}DU();var Mp=0,Ap=60000;function MW($){try{return JSON.parse(TW($,"utf8"))}catch{return null}}function Ep($){try{return process.kill($,0),!0}catch(I){return I.code==="EPERM"}}function HB($,I=!1){let G=MW($);if(G&&G.hostname===bZ()&&Number.isInteger(G.pid)&&!Ep(G.pid))return!0;if(I)return!1;let _=G&&typeof G.at==="string"?Date.parse(G.at):NaN;if(!Number.isFinite(_))try{_=TB($).mtimeMs}catch{return!1}return Date.now()-_>Ap}function FB($){Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,$)}class nZ{read($){if(!rJ($))return null;return TW($,"utf8")}readLines($){if(!rJ($))return[];return TW($,"utf8").split(`
321
+ <%s key={someKey} {...props} />`,j,J0,K0,J0),P[J0+j]=!0)}if(J0=null,k!==void 0&&(G(k),J0=""+k),Y(A)&&(G(A.key),J0=""+A.key),"key"in A){k={};for(var O0 in A)O0!=="key"&&(k[O0]=A[O0])}else k=A;return J0&&W(k,typeof O==="function"?O.displayName||O.name||"Unknown":O),M(O,J0,k,_(),h,a)}function T(O){S(O)?O._store&&(O._store.validated=1):typeof O==="object"&&O!==null&&O.$$typeof===G0&&(O._payload.status==="fulfilled"?S(O._payload.value)&&O._payload.value._store&&(O._payload.value._store.validated=1):O._store&&(O._store.validated=1))}function S(O){return typeof O==="object"&&O!==null&&O.$$typeof===N}var N=Symbol.for("react.transitional.element"),B=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),b=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),$0=Symbol.for("react.suspense_list"),Q0=Symbol.for("react.memo"),G0=Symbol.for("react.lazy"),D0=Symbol.for("react.activity"),t=Symbol.for("react.client.reference"),P0=GX.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=Object.prototype.hasOwnProperty,D=Array.isArray,F=console.createTask?console.createTask:function(){return null};GX={react_stack_bottom_frame:function(O){return O()}};var L,H={},v=GX.react_stack_bottom_frame.bind(GX,J)(),q=F(Z(J)),P={};Gs.Fragment=x,Gs.jsxDEV=function(O,A,k,j){var h=1e4>P0.recentlyCreatedOwnerStacks++;return E(O,A,k,j,h?Error("react-stack-top-frame"):v,h?F(Z(O)):q)}})()});var E1=J6(yJ(),1),Cw=J6(vq(),1);var{readFile:Cz0}=(()=>({}));d1();var{closeSync:o60,existsSync:t60,fstatSync:r60,mkdirSync:a60,openSync:s60,readFileSync:e60,renameSync:$I0,rmSync:UI0,statSync:II0,writeFileSync:_I0,writeSync:XI0}=(()=>({}));var bZ=function(){if(typeof location<"u")return location.hostname;else return""};var OW=function(){return"/"};DU();function tJ(){let $=process.env.VOLTER_HOME;return $!==void 0&&$!==""?$:G1(OW(),".volter")}DU();DU();d1();d1();DU();var{appendFileSync:Kp,chmodSync:OB,closeSync:hZ,existsSync:rJ,fsyncSync:Wp,fstatSync:LB,lstatSync:DB,mkdirSync:aJ,openSync:uZ,readdirSync:Hp,readSync:Fp,realpathSync:Tp,readFileSync:TW,renameSync:KB,rmSync:WB,statSync:TB,unlinkSync:FW,writeFileSync:sJ}=(()=>({}));var{AsyncLocalStorage:L00}=(()=>({}));var zB="x-volter-read-only";class WW extends Error{service;constructor($){super(`${$}: this request is read-only (${zB}: 1); it cannot write`);this.service=$;this.name="ReadOnlyRequestError"}}var ZB;function HW(){let $=ZB?.getStore();return $!==void 0&&$.readOnly&&!$.vendorMove}function w_($){if(!HW())return;let I=new WW($);throw ZB.getStore().refusals.push(I),I}DU();var Mp=0,Ap=60000;function MW($){try{return JSON.parse(TW($,"utf8"))}catch{return null}}function Ep($){try{return process.kill($,0),!0}catch(I){return I.code==="EPERM"}}function HB($,I=!1){let G=MW($);if(G&&G.hostname===bZ()&&Number.isInteger(G.pid)&&!Ep(G.pid))return!0;if(I)return!1;let _=G&&typeof G.at==="string"?Date.parse(G.at):NaN;if(!Number.isFinite(_))try{_=TB($).mtimeMs}catch{return!1}return Date.now()-_>Ap}function FB($){Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,$)}class nZ{read($){if(!rJ($))return null;return TW($,"utf8")}readLines($){if(!rJ($))return[];return TW($,"utf8").split(`
322
322
  `)}readRange($,I){let G;try{G=uZ($,"r")}catch(Z){if(Z.code==="ENOENT")return null;throw Z}try{let Z=LB(G).size;if(I>=Z)return"";let _=Buffer.allocUnsafe(Z-I),J=0;while(J<_.length){let Y=Fp(G,_,J,_.length-J,I+J);if(Y===0)break;J+=Y}return _.toString("utf8",0,J)}finally{hZ(G)}}append($,I){w_("the World");let G=uZ($,"a");try{if(Kp(G,I),process.env.VOLTER_DURABLE==="1")Wp(G)}finally{hZ(G)}}write($,I,G={}){if(w_("the World"),!G.secret){aJ(i1($),{recursive:!0}),sJ($,I);return}aJ(i1($),{recursive:!0,mode:448}),sJ($,I,{mode:384}),OB($,384)}writeAtomic($,I,G={}){w_("the World"),aJ(i1($),{recursive:!0});let Z=`${$}.${process.pid}.${Date.now()}.${Mp++}.tmp`;try{if(sJ(Z,I,G.secret?{mode:384}:void 0),KB(Z,$),G.secret)OB($,384)}finally{WB(Z,{force:!0})}}exists($){return rJ($)}remove($){w_("the World"),WB($,{recursive:!0,force:!0})}mkdir($){aJ($,{recursive:!0})}list($){if(!rJ($))return[];return Hp($)}canonicalPath($){let I=$I($);try{return Tp(I)}catch(G){if(G.code!=="ENOENT"||i1(I)===I)throw G;return G1(this.canonicalPath(i1(I)),DG(I))}}stat($){if(!rJ($))return null;let I=TB($);return{size:I.size,mtimeMs:I.mtimeMs,isDirectory:I.isDirectory(),...DB($).isSymbolicLink()?{isSymbolicLink:!0}:{}}}withLock($,I,G={}){aJ(i1($),{recursive:!0});let Z=Date.now(),_=null;while(_===null)try{_=uZ($,"wx")}catch(Y){if(Y.code!=="EEXIST")throw Y;if(HB($,G.retainLiveOwner)){let R=`${$}.recovery`,M;try{M=uZ(R,"wx")}catch(E){if(E.code!=="EEXIST")throw E;if(Date.now()-Z>1e4)throw Error(`Lock recovery is active or interrupted: ${R}. Inspect its owner before removing the recovery record.`);FB(25);continue}try{if(sJ(M,JSON.stringify({pid:process.pid,hostname:bZ()})),HB($,G.retainLiveOwner)){let E=MW($),T=`${$}.stale.${process.pid}.${Date.now()}`;try{KB($,T),console.warn(`[world] reclaiming stale storage lock ${$} (held by pid ${E?.pid??"?"} on ${E?.hostname??"?"})`),FW(T)}catch(S){if(S.code!=="ENOENT")throw S}}}finally{hZ(M),FW(R)}continue}if(Date.now()-Z>1e4){let R=MW($),M=R&&typeof R.at==="string"?Date.parse(R.at):NaN;throw Error(`Timed out waiting for world storage lock: ${$}${R?` (held by pid ${R.pid} on ${R.hostname}${Number.isFinite(M)?` for ${Date.now()-M}ms`:""})`:""}`)}FB(25)}try{sJ(_,`${JSON.stringify({pid:process.pid,hostname:bZ(),at:new Date().toISOString()})}
323
323
  `)}catch{}let J=Date.now();try{return I()}finally{let Y=Date.now()-J;if(Y>2000)console.warn(`[world] held storage lock ${$} for ${Y}ms (pid ${process.pid})
324
324
  ${Error().stack?.split(`
@@ -384,5 +384,5 @@ ${R}`:R:"",E=Function,T=`return (input) => {
384
384
  ${R}
385
385
  }`,S;try{S=new E(...Y,T)(...W)}catch(N){throw new $1(`this schema (generated code failed to evaluate: ${N.message})`)}if(I?.debug)S.code=M;return S.definite=Z.definite,S}function k$($,I){for(let[Z,_]of $.constants)if(_===I)return Z;let G=`c${$.constantCounter++}`;return $.constants.set(G,I),G}function l4($,I){return $.definite=!1,k$($,I)}function q$($){return`v${$.varCounter++}`}function Em($,I){let G=$._zod.run({value:I,issues:[]},{});if(G&&typeof G.then==="function")return aU;let Z=G;return Z.issues.length===0?Z.value:aU}function yU($,I,G,Z,_=!0){let J=$.content.length,Y=I.constants.size,W=I.constantCounter,R=I.varCounter;try{return n1($,I,G,Z,_)}catch(M){if(!(M instanceof $1)||!M.islandable)throw M;if($.content.length=J,I.constants.size>Y){let E=Array.from(I.constants.keys()).slice(Y);for(let T of E)I.constants.delete(T)}return I.constantCounter=W,I.varCounter=R,Rm($,I,G,Z)}}function Rm($,I,G,Z){I.definite=!1;let _=k$(I,G),J=k$(I,Em),Y=q$(I);return $.write(`const ${Y} = ${J}(${_}, ${Z});`),$.write(`if (${Y} === INVALID) return INVALID;`),Y}var Pm=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function Vm($,I,G,Z){let _=G._zod.def.checks;if(!_||_.length===0)return Z;let J=Z;for(let Y of _){let W=Y._zod.def;if(W.when&&!Pm.has(W.check))throw new $1('check with a custom "when" condition');switch(W.check){case"greater_than":Sm($,I,W,J);break;case"less_than":vm($,I,W,J);break;case"multiple_of":Cm($,I,W,J);break;case"number_format":Pj($,W,J);break;case"min_length":{let R=p4(W.minimum,"min_length"),M=TM($,I,J,`${J}.length >= ${R} && ${J}.length < ${W.minimum*2}`);$.write(`if (${M} < ${R}) return INVALID;`);break}case"max_length":{let R=p4(W.maximum,"max_length"),M=TM($,I,J,`${J}.length > ${R}`);$.write(`if (${M} > ${R}) return INVALID;`);break}case"length_equals":{let R=p4(W.length,"length_equals"),M=TM($,I,J,`${J}.length >= ${R} && ${J}.length <= ${W.length*2}`);$.write(`if (${M} !== ${R}) return INVALID;`);break}case"min_size":$.write(`if (${J}.size < ${p4(W.minimum,"min_size")}) return INVALID;`);break;case"max_size":$.write(`if (${J}.size > ${p4(W.maximum,"max_size")}) return INVALID;`);break;case"size_equals":$.write(`if (${J}.size !== ${p4(W.size,"size_equals")}) return INVALID;`);break;case"string_format":J=Vj($,I,W,J);break;case"custom":J=gm($,I,Y,J);break;case"bigint_format":qm($,W,J);break;case"mime_type":Nm($,I,W,J);break;case"property":jm($,I,W,J);break;case"properties":Bm($,I,W,J);break;case"overwrite":{let R=q$(I);km($,I,Y,J,R),J=R;break}default:throw new $1(`check type ${W.check}`)}}return J}function TM($,I,G,Z){let _=k$(I,b4),J=q$(I);return $.write(`const ${J} = typeof ${G} === "string" && ${Z} ? ${_}(${G}) : ${G}.length;`),J}function p4($,I){if(typeof $!=="number"||!Number.isFinite($))throw new $1(`${I} bound of type ${typeof $}`);return`${$}`}function Rj($,I){if(typeof I==="bigint")return`${I}n`;if(typeof I==="number"){if(Number.isNaN(I))throw new $1("comparison check with NaN bound");return`${I}`}if(I instanceof Date){if(Number.isNaN(I.getTime()))throw new $1("comparison check with Invalid Date bound");return k$($,I)}throw new $1(`comparison check bound of type ${typeof I}`)}function Sm($,I,G,Z){let _=G.inclusive?"<":"<=";$.write(`if (${Z} ${_} ${Rj(I,G.value)}) return INVALID;`)}function vm($,I,G,Z){let _=G.inclusive?">":">=";$.write(`if (${Z} ${_} ${Rj(I,G.value)}) return INVALID;`)}function Cm($,I,G,Z){if(typeof G.value==="bigint"){if(G.value===BigInt(0))throw new $1("multiple_of check with a zero divisor");$.write(`if (${Z} % ${G.value}n !== 0n) return INVALID;`)}else{let _=k$(I,$Q);$.write(`if (${_}(${Z}, ${p4(G.value,"multiple_of")}) !== 0) return INVALID;`)}}function Pj($,I,G){let Z=I.format;switch(Z){case"safeint":$.write(`if (!Number.isSafeInteger(${G})) return INVALID;`);break;case"int32":$.write(`if (!Number.isInteger(${G}) || ${G} < -2147483648 || ${G} > 2147483647) return INVALID;`);break;case"uint32":$.write(`if (!Number.isInteger(${G}) || ${G} < 0 || ${G} > 4294967295) return INVALID;`);break;case"float32":$.write(`if (!Number.isFinite(${G}) || ${G} < -3.4028234663852886e38 || ${G} > 3.4028234663852886e38) return INVALID;`);break;case"float64":$.write(`if (!Number.isFinite(${G})) return INVALID;`);break;default:throw new $1(`number format ${Z}`)}}function qm($,I,G){let Z=I.format;if(!Z)return;switch(Z){case"int64":$.write(`if (${G} < -9223372036854775808n || ${G} > 9223372036854775807n) return INVALID;`);break;case"uint64":$.write(`if (${G} < 0n || ${G} > 18446744073709551615n) return INVALID;`);break;default:throw new $1(`bigint format ${Z}`)}}function Nm($,I,G,Z){let _=G.mime;if(_&&_.length>0){let J=k$(I,new Set(_));$.write(`if (!${J}.has(${Z}.type)) return INVALID;`)}}function Bm($,I,G,Z){if(G.when)throw new $1('check with a custom "when" condition');$.write(`if (${Z} == null) return INVALID;`);let _=G.shape;for(let J of Reflect.ownKeys(_)){let Y=typeof J==="symbol"?k$(I,J):tU(J),W=q$(I);$.write(`const ${W} = ${Z}[${Y}];`),yU($,I,_[J],W,!1)}}function jm($,I,G,Z){let _=`${Z}[${JSON.stringify(G.property)}]`;n1($,I,G.schema,_)}function km($,I,G,Z,_){let J=G._zod.def.tx;if(!J)throw new $1("overwrite check without a transform function");if(m4(J))throw new sI("z.compile: async overwrite transforms are not supported");let Y=k$(I,J);$.write(`const ${_} = ${Y}(${Z});`)}function MM(){throw new w6}function RM($){this.issues.push($)}function gm($,I,G,Z){let _=G._zod.def;if(_.fn){if(m4(_.fn))throw new sI("z.compile: async .refine() predicates are not supported");let J=l4(I,_.fn),Y=k$(I,MM),W=q$(I);return $.write(`const ${W} = ${J}(${Z});`),$.write(`if (${W} instanceof Promise) ${Y}();`),$.write(`if (!${W}) return INVALID;`),Z}if(G._zod.check){if(m4(G._zod.check))throw new sI("z.compile: async .superRefine() / check functions are not supported");let J=G._zod.check,W=l4(I,(M)=>{let E={value:M,issues:[],addIssue:RM};if(J(E)instanceof Promise)MM();return E.issues.length===0?E.value:aU}),R=q$(I);return $.write(`const ${R} = ${W}(${Z});`),$.write(`if (${R} === INVALID) return INVALID;`),R}throw new $1("custom check without a predicate or check function")}var wm=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function Vj($,I,G,Z,_=!0){let J=G.format;if(J==="base64"){let M=k$(I,MQ);return $.write(`if (!${M}(${Z})) return INVALID;`),Z}if(J==="base64url"){let M=k$(I,RO);return $.write(`if (!${M}(${Z})) return INVALID;`),Z}if(J==="jwt"){let M=k$(I,SO),E=k$(I,G.alg??null);return $.write(`if (!${M}(${Z}, ${E})) return INVALID;`),Z}if(J==="ipv6"){let M=k$(I,TQ);return $.write(`if (!${M}(${Z})) return INVALID;`),Z}if(J==="cidrv6"){let M=k$(I,AO);return $.write(`if (!${M}(${Z})) return INVALID;`),Z}if(J==="credit_card"){let M=k$(I,PO);return $.write(`if (!${M}(${Z})) return INVALID;`),Z}if(J==="iban"){let M=k$(I,VO);return $.write(`if (!${M}(${Z})) return INVALID;`),Z}let Y=G;if(J==="url"||J==="httpurl"||Y.normalize||Y.hostname!==void 0||Y.protocol!==void 0){let M=k$(I,FO),E=k$(I,G),T=q$(I),S=q$(I);if($.write(`const ${T} = ${Z}.trim();`),$.write(`const ${S} = ${M}(${T}, ${E});`),$.write(`if (typeof ${S} === "number") return INVALID;`),Y.hostname!==void 0){let x=k$(I,TO);$.write(`if (!${x}(${S}, ${E}.hostname)) return INVALID;`)}if(Y.protocol!==void 0){let x=k$(I,MO);$.write(`if (!${x}(${S}, ${E}.protocol)) return INVALID;`)}if(!_)return null;let N=q$(I),B=Y.normalize?`${S}.href`:`${k$(I,FQ)}(${T})`;return $.write(`const ${N} = ${B};`),N}let W=G.fn;if(W){if(m4(W))throw new $1(`async string format ${J}`);let M=k$(I,W);return $.write(`if (!${M}(${Z})) return INVALID;`),Z}if(wm.has(J)&&G.pattern){let M=k$(I,G.pattern);return $.write(`${M}.lastIndex = 0;`),$.write(`if (!${M}.test(${Z})) return INVALID;`),Z}let R=G.format;switch(R){case"regex":throw new $1("regex format without a pattern");case"lowercase":$.write(`if (${Z} !== ${Z}.toLowerCase()) return INVALID;`);break;case"uppercase":$.write(`if (${Z} !== ${Z}.toUpperCase()) return INVALID;`);break;case"includes":$.write(`if (!${Z}.includes(${tU(G.includes)})) return INVALID;`);break;case"starts_with":{let M=G.prefix;$.write(`if (${Z}.slice(0, ${M.length}) !== ${tU(M)}) return INVALID;`);break}case"ends_with":{let M=G.suffix;$.write(`if (${Z}.slice(-${M.length}) !== ${tU(M)}) return INVALID;`);break}default:throw new $1(`string format ${R}`)}return Z}function n1($,I,G,Z,_=!0){let J=G._zod.def,Y=J.type;if(J.coerce)throw new $1(`coercion (z.coerce.${Y}())`);let W=_||!!J.checks?.length,R;switch(Y){case"string":R=xm($,I,G,Z,W);break;case"number":R=fm($,G,Z);break;case"boolean":R=ym($,Z);break;case"bigint":R=bm($,G,Z);break;case"symbol":R=hm($,Z);break;case"undefined":R=um($,Z);break;case"null":R=nm($,Z);break;case"any":case"unknown":R=Z;break;case"never":$.write("return INVALID;"),R=Z;break;case"void":R=pm($,Z);break;case"nan":R=cm($,Z);break;case"date":R=lm($,Z);break;case"object":R=mm($,I,G,Z,W);break;case"optional":R=dm($,I,G,Z,W);break;case"nullable":R=tm($,I,G,Z,W);break;case"array":R=rm($,I,G,Z,W);break;case"literal":R=am($,I,G,Z);break;case"enum":R=sm($,I,G,Z);break;case"readonly":{let M=Mj($,I,G,Z),E=q$(I);$.write(`const ${E} = Object.freeze(${M});`),R=E;break}case"success":Mj($,I,G,Z),R="true";break;case"default":case"prefault":R=em($,I,G,Z);break;case"nonoptional":R=$d($,I,G,Z);break;case"tuple":R=Ud($,I,G,Z);break;case"union":R=Id($,I,G,Z);break;case"intersection":R=Gd($,I,G,Z);break;case"record":R=Yd($,I,G,Z);break;case"map":R=Qd($,I,G,Z);break;case"set":R=zd($,I,G,Z);break;case"file":R=Zd($,Z);break;case"template_literal":R=Od($,I,G,Z);break;case"lazy":R=Ld($,I,G,Z);break;case"pipe":R=Dd($,I,G,Z);break;case"custom":R=Kd($,I,G,Z);break;case"transform":R=Fd($,I,G,Z);break;case"catch":R=Hd($,I,G,Z);break;default:throw new $1(`schema type ${Y}`)}if(R===null)return null;return Vm($,I,G,R)}function xm($,I,G,Z,_=!0){$.write(`if (typeof ${Z} !== "string") return INVALID;`);let J=G._zod.def;if(J.format===void 0)return Z;return Vj($,I,J,Z,_)}function fm($,I,G){$.write(`if (typeof ${G} !== "number" || !Number.isFinite(${G})) return INVALID;`);let Z=I._zod.def;if(Z.check==="number_format"&&Z.format)Pj($,{format:Z.format},G);return G}function ym($,I){return $.write(`if (typeof ${I} !== "boolean") return INVALID;`),I}function bm($,I,G){$.write(`if (typeof ${G} !== "bigint") return INVALID;`);let Z=I._zod.def;if(Z.format)switch(Z.format){case"int64":$.write(`if (${G} < -9223372036854775808n || ${G} > 9223372036854775807n) return INVALID;`);break;case"uint64":$.write(`if (${G} < 0n || ${G} > 18446744073709551615n) return INVALID;`);break}return G}function hm($,I){return $.write(`if (typeof ${I} !== "symbol") return INVALID;`),I}function um($,I){return $.write(`if (${I} !== undefined) return INVALID;`),I}function nm($,I){return $.write(`if (${I} !== null) return INVALID;`),I}function pm($,I){return $.write(`if (${I} !== undefined) return INVALID;`),I}function cm($,I){return $.write(`if (typeof ${I} !== "number" || !Number.isNaN(${I})) return INVALID;`),I}function lm($,I){return $.write(`if (!(${I} instanceof Date) || Number.isNaN(${I}.getTime())) return INVALID;`),I}function mm($,I,G,Z,_=!0){let J=G._zod.def;$.write(`if (typeof ${Z} !== "object" || ${Z} === null || Array.isArray(${Z})) return INVALID;`);let Y=J.shape,W=Object.keys(Y),R=Object.getOwnPropertySymbols(Y),M=R.length?[...W,...R]:W,E=(g)=>typeof g==="symbol"?k$(I,g):tU(g),T=(g)=>typeof g==="symbol"?`[${E(g)}]`:tU(g),S=Y;if(W.includes("__proto__"))throw new $1('object shape key "__proto__"');let N=new Map;for(let g of M){let b=S[g],l=E(g),i=q$(I);if($.write(`const ${i} = ${Z}[${l}];`),b._zod.optin!==void 0){let $0=q$(I);if($.write(`let ${$0} = (() => {`),$.indented((Q0)=>{let G0=yU(Q0,I,b,i);Q0.write(`return ${G0};`)}),$.write("})();"),b._zod.optout==="optional")$.write(`if (${$0} === INVALID) {`),$.indented((Q0)=>{Q0.write(`if (${l} in ${Z}) return INVALID;`),Q0.write(`${$0} = undefined;`)}),$.write("}");else $.write(`if (${$0} === INVALID) return INVALID;`);N.set(g,$0)}else{if(om(b))$.write(`if (!(${l} in ${Z})) return INVALID;`);let $0=yU($,I,b,i,_);if($0!==null)N.set(g,$0)}}let B=J.catchall,x="none";if(B){let g=B._zod.def.type;if(g==="never"){let b=W.map((l)=>`k !== ${tU(l)}`).join(" && ")||"true";$.write(`for (const k in ${Z}) {`),$.indented((l)=>{l.write(`if (${b}) return INVALID;`)}),$.write("}")}else if((g==="unknown"||g==="any")&&!B._zod.def.checks?.length)x="passthrough";else x="schema"}let w=q$(I),y=M.some((g)=>Tj(S[g])||AM(S[g]));if(!_){if(x==="schema"){let g=W.length>0?k$(I,new Set(W)):null;$.write(`for (const k in ${Z}) {`),$.indented((b)=>{if(b.write('if (k === "__proto__") continue;'),g)b.write(`if (${g}.has(k)) continue;`);let l=q$(I);b.write(`const ${l} = ${Z}[k];`),yU(b,I,B,l,!1)}),$.write("}")}return null}if(!y){let g=M.map((b)=>`${T(b)}: ${N.get(b)}`).join(", ");$.write(`const ${w} = { ${g} };`)}else{$.write(`const ${w} = {};`);for(let g of M){let b=E(g),l=N.get(g);if(AM(S[g]))$.write(`if (${b} in ${Z}) ${w}[${b}] = ${l};`);else if(Tj(S[g]))$.write(`if (${l} !== undefined || ${b} in ${Z}) ${w}[${b}] = ${l};`);else $.write(`${w}[${b}] = ${l};`)}}if(x!=="none"){let g=W.length>0?k$(I,new Set(W)):null;$.write(`for (const k in ${Z}) {`),$.indented((b)=>{if(b.write('if (k === "__proto__") continue;'),g)b.write(`if (${g}.has(k)) continue;`);if(x==="passthrough")b.write(`${w}[k] = ${Z}[k];`);else{let l=q$(I);b.write(`const ${l} = ${Z}[k];`);let i=yU(b,I,B,l);b.write(`${w}[k] = ${i};`)}}),$.write("}")}return w}function dm($,I,G,Z,_=!0){let J=G._zod.def;if(im(G))return n1($,I,J.innerType,Z,_);if(J.innerType._zod.optin==="defaulted"){let W=q$(I),R=q$(I);return $.write(`let ${W};`),$.write(`if (${Z} === undefined) {`),$.indented((M)=>{M.write(`const ${R} = (() => {`),M.indented((E)=>{let T=n1(E,I,J.innerType,Z);E.write(`return ${T};`)}),M.write("})();"),M.write(`if (${R} !== INVALID) ${W} = ${R};`)}),$.write("} else {"),$.indented((M)=>{let E=n1(M,I,J.innerType,Z);M.write(`${W} = ${E};`)}),$.write("}"),W}let Y=_?q$(I):null;if(Y)$.write(`let ${Y};`);return $.write(`if (${Z} !== undefined) {`),$.indented((W)=>{let R=n1(W,I,J.innerType,Z,_);if(Y&&R!==null)W.write(`${Y} = ${R};`)}),$.write("}"),Y}function im($){return $._zod.traits?.has("$ZodExactOptional")===!0}function om($){return $._zod.optin===void 0&&c4($)}function c4($){if($._zod.def.coerce)return!0;let I=$._zod.def;switch(I.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return I.innerType?c4(I.innerType):!1;case"literal":return!!I.values?.includes(void 0);case"enum":return!!$._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return I.innerType?c4(I.innerType):!0;case"catch":return!0;case"union":return I.options?I.options.some(c4):!0;case"intersection":if(!I.left||!I.right)return!0;return c4(I.left)&&c4(I.right);case"pipe":return I.in?c4(I.in):!0;default:return!0}}function AM($){return $._zod.optin==="optional"&&$._zod.optout==="optional"}function Tj($){return($._zod.optin!=="defaulted"||$._zod.optout==="optional")&&BG($)}function BG($){let I=$._zod.def;switch(I.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!I.values?.includes(void 0);case"enum":return!!$._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return I.innerType?BG(I.innerType):!0;case"union":return I.options?I.options.some(BG):!0;case"intersection":return!I.left||!I.right||BG(I.left)||BG(I.right);case"pipe":return I.out?BG(I.out):!0;default:return!0}}function tm($,I,G,Z,_=!0){let J=G._zod.def,Y=_?q$(I):null;if(Y)$.write(`let ${Y} = null;`);return $.write(`if (${Z} !== null) {`),$.indented((W)=>{let R=n1(W,I,J.innerType,Z,_);if(Y&&R!==null)W.write(`${Y} = ${R};`)}),$.write("}"),Y}function rm($,I,G,Z,_=!0){let J=G._zod.def;$.write(`if (!Array.isArray(${Z})) return INVALID;`);let Y=_?q$(I):null,W=q$(I),R=q$(I);if(Y)$.write(`const ${Y} = new Array(${Z}.length);`);return $.write(`for (let ${W} = 0; ${W} < ${Z}.length; ${W}++) {`),$.indented((M)=>{M.write(`const ${R} = ${Z}[${W}];`);let E=yU(M,I,J.element,R,_);if(Y&&E!==null)M.write(`${Y}[${W}] = ${E};`)}),$.write("}"),Y}function am($,I,G,Z){let J=G._zod.def.values;if(J.length!==1){let W=k$(I,new Set(J));return $.write(`if (!${W}.has(${Z})) return INVALID;`),Z}let Y=J[0];if(typeof Y==="number"&&Number.isNaN(Y)){let W=k$(I,new Set(J));return $.write(`if (!${W}.has(${Z})) return INVALID;`),Z}if(typeof Y==="string")$.write(`if (${Z} !== ${tU(Y)}) return INVALID;`);else if(typeof Y==="number"||typeof Y==="boolean")$.write(`if (${Z} !== ${Y}) return INVALID;`);else if(Y===null)$.write(`if (${Z} !== null) return INVALID;`);else if(Y===void 0)$.write(`if (${Z} !== undefined) return INVALID;`);else if(typeof Y==="bigint")$.write(`if (${Z} !== ${Y}n) return INVALID;`);else throw new $1(`literal type ${typeof Y}`);return Z}function sm($,I,G,Z){let _=G._zod.values;if(!_)throw new $1("enum schema without enumerated values");let J=k$(I,_);return $.write(`if (!${J}.has(${Z})) return INVALID;`),Z}function Mj($,I,G,Z){let _=G._zod.def;return n1($,I,_.innerType,Z)}function em($,I,G,Z){let _=G._zod.def,Y=Object.getOwnPropertyDescriptor(G._zod.def,"defaultValue")?()=>G._zod.def.defaultValue:void 0;if(G._zod.def.type==="prefault"){if(!Y)return n1($,I,_.innerType,Z);let R=k$(I,Y),M=q$(I);return $.write(`let ${M} = ${Z};`),$.write(`if (${Z} === undefined) ${M} = ${R}();`),n1($,I,_.innerType,M)}let W=q$(I);if(Y){let R=k$(I,Y),M=k$(I,UQ);$.write(`let ${W};`),$.write(`if (${Z} === undefined) {`),$.indented((E)=>{E.write(`${W} = ${M}(${R}());`)}),$.write("} else {"),$.indented((E)=>{let T=n1(E,I,_.innerType,Z);E.write(`${W} = ${T} === undefined ? ${M}(${R}()) : ${T};`)}),$.write("}")}else $.write(`let ${W};`),$.write(`if (${Z} !== undefined) {`),$.indented((R)=>{let M=n1(R,I,_.innerType,Z);R.write(`${W} = ${M};`)}),$.write("}");return W}function $d($,I,G,Z){let _=G._zod.def,J=n1($,I,_.innerType,Z),Y=q$(I);return $.write(`const ${Y} = ${J};`),$.write(`if (${Y} === undefined) return INVALID;`),Y}function Ud($,I,G,Z){let _=G._zod.def,J=_.items,Y=_.rest;$.write(`if (!Array.isArray(${Z})) return INVALID;`);let W=Aj(J,"optin"),R=Aj(J,"optout");if(Y)$.write(`if (${Z}.length < ${W}) return INVALID;`);else $.write(`if (${Z}.length < ${W} || ${Z}.length > ${J.length}) return INVALID;`);let M=q$(I);$.write(`const ${M} = [];`);for(let E=0;E<J.length;E++){let T=J[E];if(E>=R)$.write(`if (${M}.length === ${E}) {`),$.indented((S)=>{S.write(`if (${E} < ${Z}.length) {`),S.indented((N)=>{let B=q$(I);N.write(`const ${B} = ${Z}[${E}];`);let x=yU(N,I,T,B);N.write(`${M}[${E}] = ${x};`)}),S.write("} else {"),S.indented((N)=>{if(AM(T)){N.write(`${M}.length = ${E};`);return}let B=q$(I),x=q$(I);N.write(`const ${B} = undefined;`),N.write(`const ${x} = (() => {`),N.indented((w)=>{let y=yU(w,I,T,B);w.write(`return ${y};`)}),N.write("})();"),N.write(`if (${x} === INVALID || ${x} === undefined) ${M}.length = ${E};`),N.write(`else ${M}[${E}] = ${x};`)}),S.write("}")}),$.write("}");else{let S=q$(I);$.write(`const ${S} = ${Z}[${E}];`);let N=yU($,I,T,S);$.write(`${M}[${E}] = ${N};`)}}if(Y){let E=q$(I),T=q$(I);$.write(`for (let ${E} = ${J.length}; ${E} < ${Z}.length; ${E}++) {`),$.indented((S)=>{S.write(`const ${T} = ${Z}[${E}];`);let N=yU(S,I,Y,T);S.write(`${M}[${E}] = ${N};`)}),$.write("}")}return M}function Aj($,I){for(let G=$.length-1;G>=0;G--)if(!(I==="optin"?$[G]._zod.optin!==void 0:$[G]._zod.optout==="optional"))return G+1;return 0}function Id($,I,G,Z){let _=G._zod.def,J=_.options;if(_.discriminator)return _d($,I,_,Z);if(_.inclusive===!1)throw new $1("exclusive unions (z.xor)");if(J.length===0)return $.write("return INVALID;"),Z;if(J.length===1)return n1($,I,J[0],Z);if(J.every((R)=>R._zod.def.type==="literal"&&!R._zod.def.checks?.length)){let R=new Set(J.flatMap((E)=>E._zod.def.values)),M=k$(I,R);return $.write(`if (!${M}.has(${Z})) return INVALID;`),Z}let W=q$(I);$.write(`let ${W};`);for(let R=0;R<J.length;R++){let M=J[R];if(R===0)$.write(`${W} = (() => {`);else $.write(`if (${W} === INVALID) ${W} = (() => {`);$.indented((E)=>{let T=n1(E,I,M,Z);E.write(`return ${T};`)}),$.write("})();")}return $.write(`if (${W} === INVALID) return INVALID;`),W}function _d($,I,G,Z){if(G.unionFallback)throw new $1("discriminated union with unionFallback");if(G.options.length===0)return $.write("return INVALID;"),Z;let _=q$(I),J=q$(I);$.write(`const ${_} = ${Z}?.[${tU(G.discriminator)}];`),$.write(`let ${J};`);let Y=!0,W=new Set;for(let R of G.options){let M=R._zod.propValues?.[G.discriminator];if(!M||M.size===0)throw new $1("discriminated union option without static discriminator values");for(let S of M){if(W.has(S))throw new $1(`duplicate discriminator value ${String(S)}`);W.add(S)}let E=Array.from(M,(S)=>Xd(I,_,S)),T=Y?"if":"else if";$.write(`${T} (${E.join(" || ")}) {`),$.indented((S)=>{let N=n1(S,I,R,Z);S.write(`${J} = ${N};`)}),$.write("}"),Y=!1}return $.write("else { return INVALID; }"),J}function Xd($,I,G){if(typeof G==="string")return`${I} === ${tU(G)}`;if(typeof G==="number"){if(Number.isNaN(G))return`Number.isNaN(${I})`;return`${I} === ${G}`}if(typeof G==="boolean")return`${I} === ${G}`;if(G===null)return`${I} === null`;if(G===void 0)return`${I} === undefined`;if(typeof G==="bigint")return`${I} === ${G}n`;if(typeof G==="symbol"){let Z=k$($,G);return`${I} === ${Z}`}throw new $1(`literal discriminator value ${String(G)}`)}function Gd($,I,G,Z){let _=G._zod.def;I.definite=!1;let J=yU($,I,_.left,Z),Y=yU($,I,_.right,Z),W=k$(I,CG),R=q$(I);return $.write(`const ${R} = ${W}(${J}, ${Y});`),$.write(`if (!${R}.valid) return INVALID;`),`${R}.data`}function Yd($,I,G,Z){let _=G._zod.def,J=k$(I,UI);$.write(`if (!${J}(${Z})) return INVALID;`);let Y=q$(I),W=q$(I),R=q$(I);$.write(`const ${Y} = {};`);let M=_,E=M.partial?void 0:_.keyType._zod.values;if(E){let N=[];for(let x of E){if(!(typeof x==="string"||typeof x==="number"||typeof x==="symbol"))throw new $1(`record key value ${String(x)}`);let w=typeof x==="number"?x.toString():x;if(w==="__proto__")throw new $1('record key "__proto__"');N.push(w);let y=k$(I,x),g=n1($,I,_.keyType,y),b=q$(I);$.write(`const ${b} = ${Z}[${Jd(I,w)}];`);let l=yU($,I,_.valueType,b);$.write(`${Y}[${g}] = ${l};`)}let B=k$(I,new Set(N));return $.write(`for (const ${W} in ${Z}) {`),$.indented((x)=>{if(x.write(`if (${B}.has(${W})) continue;`),M.mode==="loose")x.write(`if (${W} !== "__proto__") ${Y}[${W}] = ${Z}[${W}];`);else x.write("return INVALID;")}),$.write("}"),Y}let T=_.keyType._zod.def;if(!(T.type==="string"&&T.format===void 0&&!T.coerce&&(T.checks?.length??0)===0)){let N=_.mode==="loose",B=bO(_.keyType);if(B.definite===!1)I.definite=!1;let x=k$(I,B),w=k$(I,aI),y=q$(I);return Ej($,I,Z,W,(g)=>{if(g.write(`let ${y} = ${x}(${W});`),g.write(`if (${y} === INVALID && typeof ${W} === "string" && ${w}.test(${W})) ${y} = ${x}(Number(${W}));`),N)g.write(`if (${y} === INVALID) { ${Y}[${W}] = ${Z}[${W}]; continue; }`);else g.write(`if (${y} === INVALID) return INVALID;`);g.write(`if (${y} === "__proto__") continue;`);let b=q$(I);g.write(`const ${b} = ${Z}[${W}];`);let l=yU(g,I,_.valueType,b);g.write(`${Y}[${y}] = ${l};`)}),Y}return Ej($,I,Z,W,(N)=>{N.write(`const ${R} = ${Z}[${W}];`);let B=yU(N,I,_.valueType,R);N.write(`${Y}[${W}] = ${B};`)},"return INVALID;"),Y}function Ej($,I,G,Z,_,J){let Y=k$(I,Object.prototype.propertyIsEnumerable),W=q$(I),R=q$(I),M=q$(I);$.write(`const ${W} = Object.getOwnPropertySymbols(${G});`),$.write(`const ${R} = Object.getOwnPropertyNames(${G});`),$.write(`for (let ${M} = 0; ${M} < ${R}.length; ${M}++) {`),$.indented((E)=>{E.write(`const ${Z} = ${R}[${M}];`),E.write(`if (${Z} === "__proto__" || !${Y}.call(${G}, ${Z})) continue;`),_(E)}),$.write("}"),$.write(`for (let ${M} = 0; ${M} < ${W}.length; ${M}++) {`),$.indented((E)=>{if(E.write(`const ${Z} = ${W}[${M}];`),E.write(`if (!${Y}.call(${G}, ${Z})) continue;`),J)E.write(J);else _(E)}),$.write("}")}function Jd($,I){if(typeof I==="string")return tU(I);return k$($,I)}function Qd($,I,G,Z){let _=G._zod.def;$.write(`if (!(${Z} instanceof Map)) return INVALID;`);let J=q$(I),Y=q$(I),W=q$(I);return $.write(`const ${J} = new Map();`),$.write(`for (const [${Y}, ${W}] of ${Z}) {`),$.indented((R)=>{let M=n1(R,I,_.keyType,Y),E=n1(R,I,_.valueType,W);R.write(`${J}.set(${M}, ${E});`)}),$.write("}"),J}function zd($,I,G,Z){let _=G._zod.def;$.write(`if (!(${Z} instanceof Set)) return INVALID;`);let J=q$(I),Y=q$(I);return $.write(`const ${J} = new Set();`),$.write(`for (const ${Y} of ${Z}) {`),$.indented((W)=>{let R=n1(W,I,_.valueType,Y);W.write(`${J}.add(${R});`)}),$.write("}"),J}function Zd($,I){return $.write(`if (!(${I} instanceof File)) return INVALID;`),I}function Od($,I,G,Z){$.write(`if (typeof ${Z} !== "string") return INVALID;`);let _=G._zod.pattern;if(_){let J=k$(I,_);$.write(`${J}.lastIndex = 0;`),$.write(`if (!${J}.test(${Z})) return INVALID;`)}return Z}function Ld($,I,G,Z){let _=G._zod.def,J=l4(I,_.getter),Y=k$(I,{parser:null});$.write(`if (!${Y}.parser) {`),$.indented((R)=>{R.write(`const inner = ${J}();`),R.write(`${Y}.parser = function(input) {`),R.indented((M)=>{M.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),M.write("return result.issues.length === 0 ? result.value : INVALID;")}),R.write("};")}),$.write("}");let W=q$(I);return $.write(`const ${W} = ${Y}.parser(${Z});`),$.write(`if (${W} === INVALID) return INVALID;`),W}function Dd($,I,G,Z){let _=G._zod.def,J=n1($,I,_.in,Z);if(_.transform){if(m4(_.transform))throw new sI("z.compile: async transforms in pipes are not supported");let Y=_.transform,R=l4(I,(E)=>{let T={value:E,issues:[],addIssue:RM},S=Y(E,T);if(S instanceof Promise)return aU;return T.issues.length===0?S:aU}),M=q$(I);return $.write(`const ${M} = ${R}(${J});`),$.write(`if (${M} === INVALID) return INVALID;`),n1($,I,_.out,M)}else return n1($,I,_.out,J)}function m4($){return typeof $==="function"&&($.constructor.name==="AsyncFunction"||$[Symbol.toStringTag]==="AsyncFunction")}function Kd($,I,G,Z){let _=G._zod.def;if(_.fn){if(m4(_.fn))throw new sI("z.compile: async custom predicates are not supported");let J=l4(I,_.fn),Y=k$(I,MM),W=q$(I);$.write(`const ${W} = ${J}(${Z});`),$.write(`if (${W} instanceof Promise) ${Y}();`),$.write(`if (!${W}) return INVALID;`)}else throw new $1("custom schema without a predicate function");return Z}function Wd($,I,G){let Z=$._zod.run({value:G,issues:[]},{});if(Z&&typeof Z.then==="function")return aU;let _=Z;if(_.issues.length===0)return _.value;return I()}function Hd($,I,G,Z){let _=G._zod.def;if(!_.catchValue[oZ])throw new $1("catch with a callback (only a constant catch value compiles)",!1);let J=q$(I);$.write(`let ${J} = (() => {`),$.indented((M)=>{let E=yU(M,I,_.innerType,Z);M.write(`return ${E};`)}),$.write("})();");let Y=k$(I,_.innerType),W=l4(I,_.catchValue),R=k$(I,Wd);return $.write(`if (${J} === INVALID) {`),$.indented((M)=>{M.write(`${J} = ${R}(${Y}, ${W}, ${Z});`),M.write(`if (${J} === INVALID) return INVALID;`)}),$.write("}"),J}function Fd($,I,G,Z){let _=G._zod.def;if(_.transform){if(m4(_.transform))throw new sI("z.compile: async transforms are not supported");let J=_.transform,W=l4(I,(M)=>{let E={value:M,issues:[],addIssue:RM},T=J(M,E);if(T instanceof Promise)return aU;return E.issues.length===0?T:aU}),R=q$(I);return $.write(`const ${R} = ${W}(${Z});`),$.write(`if (${R} === INVALID) return INVALID;`),R}return Z}function hO($){if($.checks)$.checks=[...$.checks];return $}function PM($,I){return new $(hO({type:"string",...W$(I)}))}function VM($,I){return new $(hO({type:"string",coerce:!0,...W$(I)}))}function uO($,I){return new $({type:"string",format:"email",check:"string_format",abort:!1,...W$(I)})}function nO($,I){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...W$(I)})}function pO($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...W$(I)})}function cO($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...W$(I)})}function lO($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...W$(I)})}function mO($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...W$(I)})}function gQ($,I){return new $({type:"string",format:"url",check:"string_format",abort:!1,...W$(I)})}function dO($,I){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...W$(I)})}function iO($,I){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...W$(I)})}function oO($,I){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...W$(I)})}function tO($,I){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...W$(I)})}function rO($,I){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...W$(I)})}function aO($,I){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...W$(I)})}function sO($,I){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...W$(I)})}function eO($,I){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...W$(I)})}function $5($,I){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...W$(I)})}function SM($,I){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...W$(I)})}function U5($,I){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...W$(I)})}function I5($,I){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...W$(I)})}function _5($,I){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...W$(I)})}function X5($,I){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...W$(I)})}function G5($,I){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...W$(I)})}function vM($,I){return new $({type:"string",format:"credit_card",check:"string_format",abort:!1,...W$(I)})}function CM($,I){return new $({type:"string",format:"iban",check:"string_format",abort:!1,...W$(I)})}function Y5($,I){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...W$(I)})}var qM={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function wQ($,I){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...W$(I)})}function xQ($,I){return new $({type:"string",format:"date",check:"string_format",...W$(I)})}function fQ($,I){return new $({type:"string",format:"time",check:"string_format",precision:null,...W$(I)})}function yQ($,I){return new $({type:"string",format:"duration",check:"string_format",...W$(I)})}function NM($,I){return new $(hO({type:"number",checks:[],...W$(I)}))}function BM($,I){return new $(hO({type:"number",coerce:!0,checks:[],...W$(I)}))}function jM($,I){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...W$(I)})}function kM($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...W$(I)})}function gM($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...W$(I)})}function wM($,I){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...W$(I)})}function xM($,I){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...W$(I)})}function fM($,I){return new $({type:"boolean",...W$(I)})}function yM($,I){return new $({type:"boolean",coerce:!0,...W$(I)})}function bM($,I){return new $({type:"bigint",...W$(I)})}function hM($,I){return new $({type:"bigint",coerce:!0,...W$(I)})}function uM($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...W$(I)})}function nM($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...W$(I)})}function pM($,I){return new $({type:"symbol",...W$(I)})}function cM($,I){return new $({type:"undefined",...W$(I)})}function lM($,I){return new $({type:"null",...W$(I)})}function mM($){return new $({type:"any"})}function dM($){return new $({type:"unknown"})}function iM($,I){return new $({type:"never",...W$(I)})}function oM($,I){return new $({type:"void",...W$(I)})}function tM($,I){return new $({type:"date",...W$(I)})}function rM($,I){return new $({type:"date",coerce:!0,...W$(I)})}function aM($,I){return new $({type:"nan",...W$(I)})}function eI($,I){return new ZO({check:"less_than",...W$(I),value:$,inclusive:!1})}function x6($,I){return new ZO({check:"less_than",...W$(I),value:$,inclusive:!0})}function $_($,I){return new OO({check:"greater_than",...W$(I),value:$,inclusive:!1})}function f6($,I){return new OO({check:"greater_than",...W$(I),value:$,inclusive:!0})}function J5($){return $_(0,$)}function Q5($){return eI(0,$)}function z5($){return x6(0,$)}function Z5($){return f6(0,$)}function w2($,I){return new CH({check:"multiple_of",...W$(I),value:$})}function x2($,I){return new BH({check:"max_size",...W$(I),maximum:$})}function U_($,I){return new jH({check:"min_size",...W$(I),minimum:$})}function d4($,I){return new kH({check:"size_equals",...W$(I),size:$})}function i4($,I){return new gH({check:"max_length",...W$(I),maximum:$})}function y_($,I){return new wH({check:"min_length",...W$(I),minimum:$})}function o4($,I){return new xH({check:"length_equals",...W$(I),length:$})}function jG($,I){return new fH({check:"string_format",format:"regex",...W$(I),pattern:$})}function kG($){return new yH({check:"string_format",format:"lowercase",...W$($)})}function gG($){return new bH({check:"string_format",format:"uppercase",...W$($)})}function wG($,I){return new hH({check:"string_format",format:"includes",...W$(I),includes:$})}function xG($,I){return new uH({check:"string_format",format:"starts_with",...W$(I),prefix:$})}function fG($,I){return new nH({check:"string_format",format:"ends_with",...W$(I),suffix:$})}function O5($,I,G){return new pH({check:"property",property:$,schema:I,...W$(G)})}function yG($,I){return new cH({check:"properties",shape:$,...W$(I)})}function bG($,I){return new lH({check:"mime_type",mime:$,...W$(I)})}function FI($){return new mH({check:"overwrite",tx:$})}function hG($){return FI((I)=>I.normalize($))}function uG(){return FI(($)=>$.trim())}function nG(){return FI(($)=>$.toLowerCase())}function pG(){return FI(($)=>$.toUpperCase())}function cG(){return FI(($)=>NW($))}function sM($,I,G){return new $({type:"array",element:I,...W$(G)})}function Td($,I,G){return new $({type:"union",options:I,...W$(G)})}function Md($,I,G){return new $({type:"union",options:I,inclusive:!1,...W$(G)})}function Ad($,I,G,Z){return new $({type:"union",options:G,discriminator:I,...W$(Z)})}function Ed($,I,G){return new $({type:"intersection",left:I,right:G})}function Rd($,I,G,Z){let _=G instanceof y$;return new $({type:"tuple",items:I,rest:_?G:null,...W$(_?Z:G)})}function Pd($,I,G,Z){return new $({type:"record",keyType:I,valueType:G,...W$(Z)})}function Vd($,I,G,Z){return new $({type:"map",keyType:I,valueType:G,...W$(Z)})}function Sd($,I,G){return new $({type:"set",valueType:I,...W$(G)})}function vd($,I,G){let Z=Array.isArray(I)?Object.fromEntries(I.map((_)=>[_,_])):I;return new $({type:"enum",entries:Z,...W$(G)})}function Cd($,I,G){return new $({type:"enum",entries:I,...W$(G)})}function qd($,I,G){return new $({type:"literal",values:Array.isArray(I)?I:[I],...W$(G)})}function eM($,I){return new $({type:"file",...W$(I)})}function Nd($,I){return new $({type:"transform",transform:I})}function Bd($,I){return new $({type:"optional",innerType:I})}function jd($,I){return new $({type:"nullable",innerType:I})}function kd($,I,G){return new $({type:"default",innerType:I,get defaultValue(){return typeof G==="function"?G():UQ(G)}})}function gd($,I,G){return new $({type:"nonoptional",innerType:I,...W$(G)})}function wd($,I){return new $({type:"success",innerType:I})}function xd($,I,G){return new $({type:"catch",innerType:I,catchValue:typeof G==="function"?G:xW(G)})}function fd($,I,G){return new $({type:"pipe",in:I,out:G})}function yd($,I){return new $({type:"readonly",innerType:I})}function bd($,I,G){return new $({type:"template_literal",parts:I,...W$(G)})}function hd($,I){return new $({type:"lazy",getter:I})}function ud($,I){return new $({type:"promise",innerType:I})}function $A($,I,G){let Z=W$(G);return Z.abort??(Z.abort=!0),new $({type:"custom",check:"custom",fn:I,...Z})}function UA($,I,G){return new $({type:"custom",check:"custom",fn:I,...W$(G)})}function IA($,I){let G=Sj((Z)=>{return Z.addIssue=(_)=>{if(typeof _==="string")Z.issues.push(AG(_,Z.value,G._zod.def));else{let J=_;if(J.fatal)J.continue=!1;if(J.code??(J.code="custom"),!("input"in J))J.input=Z.value;J.inst??(J.inst=G),J.continue??(J.continue=!G._zod.def.abort),Z.issues.push(AG(J))}},$(Z.value,Z)},I);return G}function Sj($,I){let G=new A1({check:"custom",...W$(I)});return G._zod.check=$,G}function _A($){let I=new A1({check:"describe"});return I._zod.onattach=[(G)=>{let Z=kU.get(G)??{};kU.add(G,{...Z,description:$})}],I._zod.check=()=>{},I}function XA($){let I=new A1({check:"meta"});return I._zod.onattach=[(G)=>{let Z=kU.get(G)??{};kU.add(G,{...Z,...$})}],I._zod.check=()=>{},I}function GA($,I){let G=W$(I),Z=G.truthy??["true","1","yes","on","y","enabled"],_=G.falsy??["false","0","no","off","n","disabled"];if(G.case!=="sensitive")Z=Z.map((N)=>typeof N==="string"?N.toLowerCase():N),_=_.map((N)=>typeof N==="string"?N.toLowerCase():N);let J=new Set(Z),Y=new Set(_),W=$.Codec??PQ,R=$.Boolean??EQ,E=new($.String??n4)({type:"string",error:G.error}),T=new R({type:"boolean",error:G.error}),S=new W({type:"pipe",in:E,out:T,transform:(N,B)=>{let x=N;if(G.case!=="sensitive")x=x.toLowerCase();if(J.has(x))return!0;else if(Y.has(x))return!1;else return B.issues.push({code:"invalid_value",expected:"stringbool",values:[...J,...Y],input:B.value,inst:S,continue:!1}),{}},reverseTransform:(N,B)=>{if(N===!0)return Z[0]||"true";else return _[0]||"false"},error:G.error});return S._zod.bag.truthy=Z,S._zod.bag.falsy=_,S._zod.bag.case=G.case??"insensitive",S}function t4($,I,G,Z={}){let _=W$(Z),J={check:"string_format",type:"string",format:I,fn:typeof G==="function"?G:(W)=>G.test(W),..._};if(G instanceof RegExp)J.pattern=G;return new $(J)}function bQ($,...I){for(let G of I)for(let Z of Reflect.ownKeys(G))if(Object.prototype.propertyIsEnumerable.call(G,Z))jU($,Z,G[Z]);return $}function f2($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??kU,target:I,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:$?.cycles??"ref",reused:$?.reused??"inline",intersections:[],deferred:[],external:$?.external??void 0}}function FU($,I,G,Z,_){let J=typeof I.unrepresentable==="function"?I.unrepresentable({zodSchema:$,path:Z.path,message:_}):I.unrepresentable;if(J==="any")return!1;if(J===void 0||J==="throw")throw Error(_);return Object.assign(G,J),!0}function W1($,I,G={path:[],schemaPath:[]}){var Z;let _=$._zod.def,J=I.seen.get($);if(J){if(J.count++,G.schemaPath.includes($))J.cycle=G.path;return J.schema}let Y={schema:{},count:1,cycle:void 0,path:G.path};I.seen.set($,Y),I.sharedDefsExtractedFor=void 0,I.sharedEmitDoneFor=void 0;let W=$._zod.toJSONSchema?.();if(W)Y.schema=W;else{let E={...G,schemaPath:[...G.schemaPath,$],path:G.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(I,Y.schema,E);else{let S=Y.schema,N=I.processors[_.type];if(!N)throw Error(`[toJSONSchema]: Non-representable type encountered: ${_.type}`);N($,I,S,E)}let T=$._zod.parent;if(T){if(!Y.ref)Y.ref=T;W1(T,I,E),I.seen.get(T).isParent=!0}}let R=I.metadataRegistry.get($);if(R)bQ(Y.schema,R);if(I.io==="input"&&sU($))delete Y.schema.examples,delete Y.schema.default;if(I.io==="input"&&"_prefault"in Y.schema)(Z=Y.schema).default??(Z.default=Y.schema._prefault);return delete Y.schema._prefault,I.seen.get($).schema}function vj($){return $.replace(/~/g,"~0").replace(/\//g,"~1")}function y2($,I){let G=$.seen.get(I);if(!G)throw Error("Unprocessed schema. This is a bug in Zod.");if($.external&&$.sharedDefsExtractedFor===$.external)return;let Z=new Map;for(let Y of $.seen.entries()){let W=$.metadataRegistry.get(Y[0])?.id;if(W){let R=Z.get(W);if(R&&R!==Y[0])throw Error(`Duplicate schema id "${W}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);Z.set(W,Y[0])}}let _=(Y)=>{let W=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let T=$.external.registry.get(Y[0])?.id,S=$.external.uri??((B)=>B);if(T)return{ref:S(T)};let N=Y[1].defId??Y[1].schema.id??`schema${$.counter++}`;return Y[1].defId=N,{defId:N,ref:`${S("__shared")}#/${W}/${vj(N)}`}}let R="#",M=`${R}/${W}/`;if(Y[1]===G&&!Y[1].schema.id)return{ref:R};let E=Y[1].schema.id??`__schema${$.counter++}`;return{defId:E,ref:M+vj(E)}},J=(Y)=>{if(Y[1].schema.$ref)return;let W=Y[1],{ref:R,defId:M}=_(Y);if(W.def={...W.schema},M)W.defId=M;let E=W.schema;for(let T in E)delete E[T];E.$ref=R};if($.cycles==="throw")for(let Y of $.seen.entries()){let W=Y[1];if(W.cycle)throw Error(`Cycle detected: #/${W.cycle?.join("/")}/<root>
386
386
 
387
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let Y of $.seen.entries()){let W=Y[1];if(I===Y[0]){J(Y);continue}if($.external){let M=$.external.registry.get(Y[0])?.id;if(I!==Y[0]&&M){J(Y);continue}}if($.metadataRegistry.get(Y[0])?.id){J(Y);continue}if(W.cycle){J(Y);continue}if(W.count>1){if($.reused==="ref")J(Y)}}if($.external)$.sharedDefsExtractedFor=$.external}function Nj($){let I=$.anyOf;if(!Array.isArray(I)||I.length===0||$.type!==void 0)return;let G=[];for(let Z of I){if(!Z||typeof Z!=="object")return;Nj(Z);let _=Object.keys(Z);if(_.length!==1||_[0]!=="type")return;let J=Z.type;for(let Y of Array.isArray(J)?J:[J]){if(typeof Y!=="string")return;if(!G.includes(Y))G.push(Y)}}delete $.anyOf,$.type=G.length===1?G[0]:G}var Bj=new Set(["type","properties","required","additionalProperties"]),Cj=["oneOf","anyOf"];function qj($){let I=$.additionalProperties;if(I===void 0||I===!1||typeof I!=="object"||I===null)return null;return Object.keys(I).length?I:null}function YA($){let I=[];for(let J of $){if(typeof J!=="object"||J.type!=="object")return null;for(let Y in J)if(!Bj.has(Y))return null;I.push(J)}let G={},Z=new Set;for(let J of I){for(let Y in J.properties){if(Object.prototype.hasOwnProperty.call(G,Y))continue;let W=[];for(let M of I){let E=M.properties?.[Y]??qj(M);if(E===null||E===void 0)continue;if(!W.some((T)=>JSON.stringify(T)===JSON.stringify(E)))W.push(E)}let R=W.length===1?W[0]:YA(W)??{allOf:W};jU(G,Y,R)}for(let Y of J.required??[])Z.add(Y)}let _={type:"object",properties:G};if(Z.size)_.required=[...Z];if(I.every((J)=>J.additionalProperties===!1))_.additionalProperties=!1;else{let J=[];for(let Y of I){let W=qj(Y);if(W&&!J.some((R)=>JSON.stringify(R)===JSON.stringify(W)))J.push(W)}if(J.length===1)_.additionalProperties=J[0];else if(J.length>1)_.additionalProperties={allOf:J}}return _}function nd($){let I=$.allOf;if(!Array.isArray(I)||I.length<2)return;for(let _ of Bj)if(_ in $)return;let G=I.filter((_)=>Cj.some((J)=>Array.isArray(_[J]))),Z=null;if(!G.length)Z=YA(I);else{let _=G[0],J=Cj.find((R)=>Array.isArray(_[R]));if(Object.keys(_).length!==1)return;let Y=I.filter((R)=>R!==_),W=_[J].map((R)=>YA([...Y,R]));if(W.some((R)=>!R))return;Z={[J]:W}}if(!Z)return;delete $.allOf,bQ($,Z)}function b2($,I){let G=$.seen.get(I);if(!G)throw Error("Unprocessed schema. This is a bug in Zod.");let Z=(W)=>{let R=$.seen.get(W);if(R.ref===null)return;let M=R.def??R.schema,E={...M},T=R.ref;if(R.ref=null,T){Z(T);let N=$.seen.get(T),B=N.schema;if(B.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))M.allOf=M.allOf??[],M.allOf.push(B);else bQ(M,B);if(bQ(M,E),W._zod.parent===T)for(let w in M){if(w==="$ref"||w==="allOf")continue;if(!(w in E))delete M[w]}if(B.$ref&&N.def)for(let w in M){if(w==="$ref"||w==="allOf")continue;if(w in N.def&&JSON.stringify(M[w])===JSON.stringify(N.def[w]))delete M[w]}}let S=W._zod.parent;if(S&&S!==T){Z(S);let N=$.seen.get(S);if(N?.schema.$ref){if(M.$ref=N.schema.$ref,N.def)for(let B in M){if(B==="$ref"||B==="allOf")continue;if(B in N.def&&JSON.stringify(M[B])===JSON.stringify(N.def[B]))delete M[B]}}}$.override({zodSchema:W,jsonSchema:M,path:R.path??[]})};if(!$.external||$.sharedEmitDoneFor!==$.external){for(let W of[...$.seen.entries()].reverse())Z(W[0]);if($.target!=="openapi-3.0")for(let W of $.seen.entries())Nj(W[1].def??W[1].schema);for(let W of $.deferred)W();if($.intersections.length){let W=new Map;for(let R of $.seen.values())for(let M of[R.schema,R.def]){let E=M?.allOf;if(!Array.isArray(E))continue;let T=W.get(E);if(T)T.push(M);else W.set(E,[M])}for(let R of $.intersections)for(let M of W.get(R)??[])nd(M)}}let _={};if($.target==="draft-2020-12")_.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")_.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")_.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let W=$.external.registry.get(I)?.id;if(!W)throw Error("Schema is missing an `id` property");_.$id=$.external.uri(W)}bQ(_,G.defId?G.schema:G.def??G.schema);let J=$.metadataRegistry.get(I)?.id;if(J!==void 0&&_.id===J)delete _.id;let Y=$.external?.defs??{};if(!$.external||$.sharedEmitDoneFor!==$.external)for(let W of $.seen.entries()){let R=W[1];if(R.def&&R.defId){if(R.def.id===R.defId)delete R.def.id;jU(Y,R.defId,R.def)}}if($.external)$.sharedEmitDoneFor=$.external;if($.external);else if(Object.keys(Y).length>0)if($.target==="draft-2020-12")_.$defs=Y;else _.definitions=Y;try{let W=JSON.parse(JSON.stringify(_));return Object.defineProperty(W,"~standard",{value:{...I["~standard"],jsonSchema:{input:lG(I,"input",$.processors),output:lG(I,"output",$.processors)}},enumerable:!1,writable:!1}),W}catch(W){throw Error("Error converting schema to JSON.")}}function sU($,I){let G=I??{seen:new Set};if(G.seen.has($))return!1;G.seen.add($);let Z=$._zod.def;if(Z.type==="transform")return!0;if(Z.type==="array")return sU(Z.element,G);if(Z.type==="set")return sU(Z.valueType,G);if(Z.type==="lazy")return sU(Z.getter(),G);if(Z.type==="promise"||Z.type==="optional"||Z.type==="nonoptional"||Z.type==="nullable"||Z.type==="readonly"||Z.type==="default"||Z.type==="prefault"||Z.type==="catch")return sU(Z.innerType,G);if(Z.type==="intersection")return sU(Z.left,G)||sU(Z.right,G);if(Z.type==="record"||Z.type==="map")return sU(Z.keyType,G)||sU(Z.valueType,G);if(Z.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return sU(Z.in,G)||sU(Z.out,G)}if(Z.type==="object"){for(let _ in Z.shape)if(sU(Z.shape[_],G))return!0;return!1}if(Z.type==="union"){for(let _ of Z.options)if(sU(_,G))return!0;return!1}if(Z.type==="tuple"){for(let _ of Z.items)if(sU(_,G))return!0;if(Z.rest&&sU(Z.rest,G))return!0;return!1}return!1}var JA=($,I={})=>(G)=>{let Z=f2({...G,processors:I});return W1($,Z),y2(Z,$),b2(Z,$)},lG=($,I,G={})=>(Z)=>{let{libraryOptions:_,target:J}=Z??{},Y=f2({..._??{},target:J,io:I,processors:G});return W1($,Y),y2(Y,$),b2(Y,$)};var mG=($,I,G)=>{if($[I]===void 0||G>$[I])$[I]=G},dG=($,I,G)=>{if($[I]===void 0||G<$[I])$[I]=G},jj=($,I)=>{mG($,"minimum",I),dG($,"maximum",I)},xj=($,I)=>{if($.multipleOf??($.multipleOf=[]),!$.multipleOf.includes(I))$.multipleOf.push(I)},fj=($,I)=>{$.patterns??($.patterns=new Set),$.patterns.add(I)},yj=($,I)=>{$.mime=$.mime?$.mime.filter((G)=>I.includes(G)):[...I]},bj=($,I)=>{if($.format=I,I.includes("int"))$.isInt=!0},kj=($,I)=>mG($,"minimum",I.minimum),gj=($,I)=>dG($,"maximum",I.maximum),wj=($)=>(I,G)=>{bj(I,G.format);let[Z,_]=$[G.format];mG(I,"minimum",Z),dG(I,"maximum",_)},pd={greater_than:($,I)=>mG($,I.inclusive?"minimum":"exclusiveMinimum",I.value),less_than:($,I)=>dG($,I.inclusive?"maximum":"exclusiveMaximum",I.value),multiple_of:($,I)=>xj($,I.value),number_format:wj(_Q),bigint_format:wj(XQ),min_length:kj,max_length:gj,length_equals:($,I)=>jj($,I.length),min_size:kj,max_size:gj,size_equals:($,I)=>jj($,I.size),string_format:($,I)=>{if(bj($,I.format),I.pattern)fj($,I.pattern);if(I.format==="base64"||I.format==="base64url")$.contentEncoding=I.format;if(I.local||I.precision===-1)$.laxFormat=!0},mime_type:($,I)=>yj($,I.mime)};function TU($){let I={},G=$._zod.def,Z=$._zod.traits.has("$ZodCheck")?[$,...G.checks??[]]:G.checks??[];for(let J of Z)pd[J._zod.def.check]?.(I,J._zod.def);let _=$._zod.bag;if(_.minimum!==void 0)mG(I,"minimum",_.minimum);if(_.exclusiveMinimum!==void 0)mG(I,"exclusiveMinimum",_.exclusiveMinimum);if(_.maximum!==void 0)dG(I,"maximum",_.maximum);if(_.exclusiveMaximum!==void 0)dG(I,"exclusiveMaximum",_.exclusiveMaximum);if(_.multipleOf!==void 0)xj(I,_.multipleOf);if(_.format!==void 0){if(I.format??(I.format=_.format),_.format.includes("int"))I.isInt=!0}if(_.mime)yj(I,_.mime);for(let J of _.patterns??[])fj(I,J);return I}var cd={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ld=new Map([[EO,JH],[AQ,QH]]),hj=($)=>ld.get($)??$,ZA=($,I,G,Z)=>{let _=G;_.type="string";let{minimum:J,maximum:Y,format:W,patterns:R,contentEncoding:M,laxFormat:E}=TU($);if(typeof J==="number")_.minLength=J;if(typeof Y==="number")_.maxLength=Y;if(W){if(_.format=cd[W]??W,_.format==="")delete _.format;if(W==="time"||E)delete _.format}if(M)_.contentEncoding=M;if(R&&R.size>0){let T=[...R].map(hj);if(T.length===1)_.pattern=T[0].source;else if(T.length>1)_.allOf=[...T.map((S)=>({...I.target==="draft-07"||I.target==="draft-04"||I.target==="openapi-3.0"?{type:"string"}:{},pattern:S.source}))]}},OA=($,I,G,Z)=>{let _=G,{minimum:J,maximum:Y,multipleOf:W,exclusiveMaximum:R,exclusiveMinimum:M,isInt:E}=TU($);_.type=E?"integer":"number";let T=typeof M==="number"&&M>=(J??Number.NEGATIVE_INFINITY),S=typeof R==="number"&&R<=(Y??Number.POSITIVE_INFINITY),N=I.target==="draft-04"||I.target==="openapi-3.0";if(T)if(N)_.minimum=M,_.exclusiveMinimum=!0;else _.exclusiveMinimum=M;else if(typeof J==="number")_.minimum=J;if(S)if(N)_.maximum=R,_.exclusiveMaximum=!0;else _.exclusiveMaximum=R;else if(typeof Y==="number")_.maximum=Y;if(W){let B=new Set;for(let y of W)if(Number.isFinite(y)&&y!==0)B.add(Math.abs(y));else FU($,I,_,Z,`A multipleOf divisor of ${y} cannot be represented in JSON Schema`);let[x,...w]=B;if(x!==void 0)_.multipleOf=x;if(w.length)_.allOf=[..._.allOf??[],...w.map((y)=>({multipleOf:y}))]}},LA=($,I,G,Z)=>{G.type="boolean"},DA=($,I,G,Z)=>{FU($,I,G,Z,"BigInt cannot be represented in JSON Schema")},KA=($,I,G,Z)=>{FU($,I,G,Z,"Symbols cannot be represented in JSON Schema")},WA=($,I,G,Z)=>{if(I.target==="openapi-3.0")G.type="string",G.nullable=!0,G.enum=[null];else G.type="null"},HA=($,I,G,Z)=>{FU($,I,G,Z,"Undefined cannot be represented in JSON Schema")},FA=($,I,G,Z)=>{FU($,I,G,Z,"Void cannot be represented in JSON Schema")},TA=($,I,G,Z)=>{G.not={}},MA=($,I,G,Z)=>{},AA=($,I,G,Z)=>{},EA=($,I,G,Z)=>{FU($,I,G,Z,"Date cannot be represented in JSON Schema")},RA=($,I,G,Z)=>{let _=$._zod.def,J=HG(_.entries);if(J.length===0){G.not={};return}if(J.every((Y)=>typeof Y==="number"))G.type="number";if(J.every((Y)=>typeof Y==="string"))G.type="string";G.enum=J},PA=($,I,G,Z)=>{let _=$._zod.def;if(_.values.length===0){G.not={};return}let J=[];for(let Y of _.values)if(Y===void 0){if(FU($,I,G,Z,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof Y==="bigint"){if(FU($,I,G,Z,"BigInt literals cannot be represented in JSON Schema"))return;J.push(Number(Y))}else J.push(Y);if(J.length===0);else if(J.length===1){let Y=J[0];if(G.type=Y===null?"null":typeof Y,I.target==="draft-04"||I.target==="openapi-3.0")G.enum=[Y];else G.const=Y}else{if(J.every((Y)=>typeof Y==="number"))G.type="number";if(J.every((Y)=>typeof Y==="string"))G.type="string";if(J.every((Y)=>typeof Y==="boolean"))G.type="boolean";if(J.every((Y)=>Y===null))G.type="null";G.enum=J}},VA=($,I,G,Z)=>{FU($,I,G,Z,"NaN cannot be represented in JSON Schema")},SA=($,I,G,Z)=>{let _=G,J=$._zod.pattern;if(!J)throw Error("Pattern not found in template literal");_.type="string",_.pattern=J.source},vA=($,I,G,Z)=>{let _=G;_.type="string",_.format="binary",_.contentEncoding="binary";let{minimum:J,maximum:Y,mime:W}=TU($);if(J!==void 0)_.minLength=J;if(Y!==void 0)_.maxLength=Y;if(!W)return;if(W.length===0)_.not={};else if(W.length===1)_.contentMediaType=W[0];else _.anyOf=W.map((R)=>({contentMediaType:R}))},CA=($,I,G,Z)=>{G.type="boolean"},qA=($,I,G,Z)=>{FU($,I,G,Z,"Custom types cannot be represented in JSON Schema")},NA=($,I,G,Z)=>{FU($,I,G,Z,"Function types cannot be represented in JSON Schema")},BA=($,I,G,Z)=>{FU($,I,G,Z,"Transforms cannot be represented in JSON Schema")},jA=($,I,G,Z)=>{FU($,I,G,Z,"Map cannot be represented in JSON Schema")},kA=($,I,G,Z)=>{FU($,I,G,Z,"Set cannot be represented in JSON Schema")},gA=($,I,G,Z)=>{let _=G,J=$._zod.def,{minimum:Y,maximum:W}=TU($);if(typeof Y==="number")_.minItems=Y;if(typeof W==="number")_.maxItems=W;_.type="array",_.items=W1(J.element,I,{...Z,path:[...Z.path,"items"]})};function hQ($){let I=$._zod.def;if(I.type==="pipe"&&I.in._zod.traits.has("$ZodTransform"))return hQ(I.out);if(I.type==="catch")return hQ(I.innerType);return $._zod.optin}var wA=($,I,G,Z)=>{let _=G,J=$._zod.def,Y=J.shape;if(Object.getOwnPropertySymbols(Y).length&&FU($,I,_,Z,"Symbol keys cannot be represented in JSON Schema"))return;_.type="object",_.properties={};for(let M in Y)jU(_.properties,M,W1(Y[M],I,{...Z,path:[...Z.path,"properties",M]}));let R=[];for(let M of Object.keys(Y)){let E=J.shape[M];if(I.io==="input"?hQ(E)===void 0:E._zod.optout===void 0)R.push(M)}if(R.length>0)_.required=R;if(J.catchall?._zod.def.type==="never")_.additionalProperties=!1;else if(!J.catchall){if(I.io==="output")_.additionalProperties=!1}else if(J.catchall)_.additionalProperties=W1(J.catchall,I,{...Z,path:[...Z.path,"additionalProperties"]})},D5=($,I,G,Z)=>{let _=$._zod.def,J=_.inclusive===!1,Y=_.options.map((W,R)=>W1(W,I,{...Z,path:[...Z.path,J?"oneOf":"anyOf",R]}));if(J)G.oneOf=Y;else G.anyOf=Y},xA=($,I,G,Z)=>{let _=$._zod.def,J=W1(_.left,I,{...Z,path:[...Z.path,"allOf",0]}),Y=W1(_.right,I,{...Z,path:[...Z.path,"allOf",1]}),W=(M)=>("allOf"in M)&&Object.keys(M).length===1,R=[...W(J)?J.allOf:[J],...W(Y)?Y.allOf:[Y]];G.allOf=R,I.intersections.push(R)},fA=($,I,G,Z)=>{let _=G,J=$._zod.def;_.type="array";let Y=I.target==="draft-2020-12"?"prefixItems":"items",W=I.target==="draft-2020-12"?"items":I.target==="openapi-3.0"?"items":"additionalItems",R=J.items.map((x,w)=>W1(x,I,{...Z,path:[...Z.path,Y,w]})),M=J.rest?W1(J.rest,I,{...Z,path:[...Z.path,W,...I.target==="openapi-3.0"?[J.items.length]:[]]}):null,E=J.items.length;while(E>0){let x=J.items[E-1];if(!(I.io==="input"?hQ(x)!==void 0:x._zod.optout==="optional"))break;E--}let T=J.items.length,S=!J.rest;if(I.target==="draft-2020-12"){if(_.prefixItems=R,S)_.items=!1;else if(M)_.items=M;if(E>0)_.minItems=E;if(S)_.maxItems=T}else if(I.target==="openapi-3.0"){if(_.items={anyOf:R},M)_.items.anyOf.push(M);if(E>0)_.minItems=E;if(S)_.maxItems=T}else{if(_.items=R,S)_.additionalItems=!1;else if(M)_.additionalItems=M;if(E>0)_.minItems=E;if(S)_.maxItems=T}let{minimum:N,maximum:B}=TU($);if(typeof N==="number")_.minItems=N;if(typeof B==="number")_.maxItems=B};function QA($,I,G){if(I.$ref){if(G.has(I))return I;G.add(I);let B=$.get(I)?.def;if(!B)return I;let x=QA($,B,G);return x===B?I:x}for(let B of["anyOf","oneOf"]){let x=I[B];if(!Array.isArray(x))continue;let w=x.map((y)=>QA($,y,G));if(w.some((y,g)=>y!==x[g]))I={...I,[B]:w}}let Z=Array.isArray(I.type)?I.type:[I.type],_=!Z.includes("string")&&Z.some((B)=>B==="number"||B==="integer"),J=I.enum??(I.const!==void 0?[I.const]:void 0);if(!_&&!J?.some((B)=>typeof B==="number"))return I;let{minimum:Y,maximum:W,exclusiveMinimum:R,exclusiveMaximum:M,multipleOf:E,format:T,id:S,...N}=I;if(N.enum)N.enum=N.enum.map((B)=>typeof B==="number"?String(B):B);else if(typeof N.const==="number")N.const=String(N.const);if(!_)return N;if(N.type="string",!J)N.pattern=(Z.includes("number")?aI:DQ).source;return N}var zA=new WeakMap;function md($){let I=new Map;for(let Z of $.seen.values())if(Z.def&&!I.has(Z.schema))I.set(Z.schema,Z);let G=new Map;for(let Z of zA.get($)??[]){let _=$.seen.get(Z),J=(_?.def??_?.schema)?.propertyNames;if(!J||J===!0||G.has(J))continue;let Y=QA(I,J,new Set);if(Y!==J)G.set(J,Y)}if(!G.size)return;for(let Z of $.seen.values())for(let _ of[Z.schema,Z.def]){let J=_&&G.get(_.propertyNames);if(J)_.propertyNames=J}}var yA=($,I,G,Z)=>{let _=G,J=$._zod.def;_.type="object";let Y=J.keyType,W=TU(Y).patterns;if(J.mode==="loose"&&W&&W.size>0){let E=W1(J.valueType,I,{...Z,path:[...Z.path,"patternProperties","*"]});_.patternProperties={};for(let T of W)jU(_.patternProperties,hj(T).source,E)}else{if(I.target==="draft-07"||I.target==="draft-2020-12"){_.propertyNames=W1(J.keyType,I,{...Z,path:[...Z.path,"propertyNames"]});let E=zA.get(I);if(!E)E=[],zA.set(I,E),I.deferred.push(()=>md(I));E.push($)}_.additionalProperties=W1(J.valueType,I,{...Z,path:[...Z.path,"additionalProperties"]})}let R=Y._zod.values,M=I.io==="input"&&hQ(J.valueType)!==void 0;if(R&&!J.partial&&!M){let E=[...R].filter((T)=>typeof T==="string"||typeof T==="number");if(E.length>0)_.required=E.map(String)}},bA=($,I,G,Z)=>{let _=$._zod.def,J=W1(_.innerType,I,Z),Y=I.seen.get($);if(I.target==="openapi-3.0")Y.ref=_.innerType,G.nullable=!0;else G.anyOf=[J,{type:"null"}]},hA=($,I,G,Z)=>{let _=$._zod.def;W1(_.innerType,I,Z);let J=I.seen.get($);J.ref=_.innerType},uA=Symbol();function uj($,I,G,Z,_){let J=!1,Y=JSON.stringify($,(W,R)=>{if(typeof R!=="bigint")return R;return J=!0,null});if(!J)return JSON.parse(Y);return FU(I,G,Z,_,"BigInt defaults cannot be represented in JSON Schema"),uA}var nA=($,I,G,Z)=>{let _=$._zod.def;W1(_.innerType,I,Z);let J=I.seen.get($);J.ref=_.innerType;let Y=uj(_.defaultValue,$,I,G,Z);if(Y!==uA)G.default=Y},pA=($,I,G,Z)=>{let _=$._zod.def;W1(_.innerType,I,Z);let J=I.seen.get($);if(J.ref=_.innerType,I.io!=="input")return;let Y=uj(_.defaultValue,$,I,G,Z);if(Y!==uA)G._prefault=Y},cA=($,I,G,Z)=>{let _=$._zod.def;W1(_.innerType,I,Z);let J=I.seen.get($);J.ref=_.innerType;let Y;try{Y=_.catchValue(void 0)}catch{FU($,I,G,Z,"Dynamic catch values are not supported in JSON Schema");return}G.default=Y},lA=($,I,G,Z)=>{let _=$._zod.def,J=_.in._zod.traits.has("$ZodTransform"),Y=I.io==="input"?J?_.out:_.in:_.out;W1(Y,I,Z);let W=I.seen.get($);W.ref=Y},mA=($,I,G,Z)=>{let _=$._zod.def;W1(_.innerType,I,Z);let J=I.seen.get($);J.ref=_.innerType,G.readOnly=!0},dA=($,I,G,Z)=>{let _=$._zod.def;W1(_.innerType,I,Z);let J=I.seen.get($);J.ref=_.innerType},K5=($,I,G,Z)=>{let _=$._zod.def;W1(_.innerType,I,Z);let J=I.seen.get($);J.ref=_.innerType},iA=($,I,G,Z)=>{let _=$._zod.innerType;W1(_,I,Z);let J=I.seen.get($);J.ref=_},L5={string:ZA,number:OA,boolean:LA,bigint:DA,symbol:KA,null:WA,undefined:HA,void:FA,never:TA,any:MA,unknown:AA,date:EA,enum:RA,literal:PA,nan:VA,template_literal:SA,file:vA,success:CA,custom:qA,function:NA,transform:BA,map:jA,set:kA,array:gA,object:wA,union:D5,intersection:xA,tuple:fA,record:yA,nullable:bA,nonoptional:hA,default:nA,prefault:pA,catch:cA,pipe:lA,readonly:mA,promise:dA,optional:K5,lazy:iA};function W5($,I){if("_idmap"in $){let Z=$,_=f2({...I,processors:L5}),J={};for(let R of Z._idmap.entries()){let[M,E]=R;W1(E,_)}let Y={},W={registry:Z,uri:I?.uri,defs:J};_.external=W;for(let R of Z._idmap.entries()){let[M,E]=R;y2(_,E),jU(Y,M,b2(_,E))}if(Object.keys(J).length>0){let R=_.target==="draft-2020-12"?"$defs":"definitions";Y.__shared={[R]:J}}return{schemas:Y}}let G=f2({...I,processors:L5});return W1($,G),y2(G,$),b2(G,$)}class oA{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";this.ctx=f2({processors:L5,target:I,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,I={path:[],schemaPath:[]}){return W1($,this.ctx,I)}emit($,I){if(I){if(I.cycles)this.ctx.cycles=I.cycles;if(I.reused)this.ctx.reused=I.reused;if(I.external)this.ctx.external=I.external}this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,y2(this.ctx,$);let G=b2(this.ctx,$),{"~standard":Z,..._}=G;return _}}var nj={};var $Y={};LU($Y,{xor:()=>y3,xid:()=>_3,void:()=>j3,uuidv7:()=>tj,uuidv6:()=>oj,uuidv4:()=>ij,uuid:()=>dj,url:()=>rj,unknown:()=>r4,union:()=>eG,undefined:()=>N3,ulid:()=>I3,uint64:()=>C3,uint32:()=>V3,tuple:()=>v7,transform:()=>n5,templateLiteral:()=>a3,symbol:()=>q3,superRefine:()=>e7,success:()=>i3,stringbool:()=>Gk,stringFormat:()=>H3,string:()=>uQ,strictObject:()=>x3,set:()=>p3,refine:()=>s7,record:()=>C7,readonly:()=>d7,promise:()=>s3,preprocess:()=>Jk,prefault:()=>b7,pipe:()=>M5,partialRecord:()=>h3,optional:()=>a4,object:()=>w3,number:()=>Z7,nullish:()=>d3,nullable:()=>nQ,null:()=>W7,nonoptional:()=>h7,never:()=>h5,nativeEnum:()=>c3,nanoid:()=>ej,nan:()=>o3,meta:()=>_k,map:()=>n3,mac:()=>Y3,looseRecord:()=>u3,looseObject:()=>f3,literal:()=>l3,lazy:()=>t7,ksuid:()=>X3,keyof:()=>g3,jwt:()=>W3,json:()=>Yk,ipv6:()=>J3,ipv4:()=>G3,invertCodec:()=>r3,intersection:()=>V7,int64:()=>v3,int32:()=>P3,int:()=>T5,instanceof:()=>Xk,iban:()=>K3,httpUrl:()=>aj,hostname:()=>F3,hex:()=>T3,hash:()=>A3,guid:()=>mj,function:()=>e3,float64:()=>R3,float32:()=>E3,file:()=>m3,exactOptional:()=>g7,enum:()=>u5,emoji:()=>sj,email:()=>lj,e164:()=>L3,discriminatedUnion:()=>b3,describe:()=>Ik,date:()=>k3,custom:()=>Uk,currencyCode:()=>M3,cuid2:()=>U3,cuid:()=>$3,creditCard:()=>D3,codec:()=>t3,cidrv6:()=>z3,cidrv4:()=>Q3,check:()=>$k,catch:()=>p7,boolean:()=>O7,bigint:()=>S3,base64url:()=>O3,base64:()=>Z3,array:()=>lQ,any:()=>B3,_function:()=>e3,_default:()=>f7,_ZodString:()=>A5,ZodXor:()=>E7,ZodXID:()=>q5,ZodVoid:()=>M7,ZodUnknown:()=>F7,ZodUnion:()=>dQ,ZodUndefined:()=>D7,ZodUUID:()=>I_,ZodURL:()=>pQ,ZodULID:()=>C5,ZodType:()=>p$,ZodTuple:()=>S7,ZodTransform:()=>k7,ZodTemplateLiteral:()=>i7,ZodSymbol:()=>L7,ZodSuccess:()=>u7,ZodStringFormat:()=>H1,ZodString:()=>tG,ZodSet:()=>N7,ZodRecord:()=>iG,ZodReadonly:()=>m7,ZodPromise:()=>r7,ZodPreprocess:()=>l7,ZodPrefault:()=>y7,ZodPipe:()=>oQ,ZodOptional:()=>iQ,ZodObject:()=>mQ,ZodNumberFormat:()=>$X,ZodNumber:()=>rG,ZodNullable:()=>w7,ZodNull:()=>K7,ZodNonOptional:()=>c5,ZodNever:()=>T7,ZodNanoID:()=>V5,ZodNaN:()=>c7,ZodMap:()=>q7,ZodMAC:()=>J7,ZodLiteral:()=>B7,ZodLazy:()=>o7,ZodKSUID:()=>N5,ZodJWT:()=>y5,ZodIntersection:()=>P7,ZodInstanceOf:()=>$E,ZodISOTime:()=>n2,ZodISODuration:()=>p2,ZodISODateTime:()=>h2,ZodISODate:()=>u2,ZodIPv6:()=>j5,ZodIPv4:()=>B5,ZodIBAN:()=>z7,ZodGUID:()=>R5,ZodFunction:()=>a7,ZodFile:()=>j7,ZodExactOptional:()=>p5,ZodEnum:()=>oG,ZodEmoji:()=>P5,ZodEmail:()=>E5,ZodE164:()=>f5,ZodDiscriminatedUnion:()=>R7,ZodDefault:()=>x7,ZodDate:()=>cQ,ZodCustomStringFormat:()=>e4,ZodCustom:()=>rQ,ZodCreditCard:()=>Q7,ZodCodec:()=>tQ,ZodCatch:()=>n7,ZodCUID2:()=>v5,ZodCUID:()=>S5,ZodCIDRv6:()=>g5,ZodCIDRv4:()=>k5,ZodBoolean:()=>aG,ZodBigIntFormat:()=>b5,ZodBigInt:()=>sG,ZodBase64URL:()=>x5,ZodBase64:()=>w5,ZodArray:()=>A7,ZodAny:()=>H7});var H5={};LU(H5,{uppercase:()=>gG,trim:()=>uG,toUpperCase:()=>pG,toLowerCase:()=>nG,startsWith:()=>xG,slugify:()=>cG,size:()=>d4,regex:()=>jG,property:()=>O5,properties:()=>yG,positive:()=>J5,overwrite:()=>FI,normalize:()=>hG,nonpositive:()=>z5,nonnegative:()=>Z5,negative:()=>Q5,multipleOf:()=>w2,minSize:()=>U_,minLength:()=>y_,mime:()=>bG,maxSize:()=>x2,maxLength:()=>i4,lte:()=>x6,lt:()=>eI,lowercase:()=>kG,length:()=>o4,includes:()=>wG,gte:()=>f6,gt:()=>$_,endsWith:()=>fG});var pj=new WeakSet([Object.prototype,Error.prototype]);function F5($,I,G){Object.defineProperty($,I,{configurable:!0,enumerable:!1,get(){let Z=G(this);return Object.defineProperty(this,I,{value:Z,configurable:!0,writable:!0}),Z},set(Z){Object.defineProperty(this,I,{value:Z,configurable:!0,writable:!0})}})}var cj=($,I)=>{nW.init($,I),$.name="ZodError";let G=Object.getPrototypeOf($);if(pj.has(G))return;pj.add(G),F5(G,"format",(Z)=>(_)=>zQ(Z,_)),F5(G,"flatten",(Z)=>(_)=>QQ(Z,_)),F5(G,"addIssue",(Z)=>(_)=>{Z.issues.push(_),Z.message=JSON.stringify(Z.issues,FG,2)}),F5(G,"addIssues",(Z)=>(_)=>{Z.issues.push(..._),Z.message=JSON.stringify(Z.issues,FG,2)}),Object.defineProperty(G,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}})},id=m0("ZodError",cj),D6=m0("ZodError",cj,void 0,{Parent:Error});var tA=EG(D6),rA=RG(D6),aA=PG(D6),sA=VG(D6),eA=sZ(D6),$7=eZ(D6),U7=$O(D6),I7=UO(D6),_7=IO(D6),X7=_O(D6),G7=XO(D6),Y7=GO(D6);function td(){if(!SU.localeError)IU(qQ())}function s4(){if(!SU.memoizer)IU({memoizer:CQ()})}var p$=m0("ZodType",($,I)=>{return td(),y$.init($,I),$.def=I,$.type=I.type,$},{check(...$){let I=this.def;return this.clone(G$.mergeDefs(I,{checks:[...I.checks??[],...$.map((G)=>typeof G==="function"?{_zod:{check:G,def:{check:"custom"},onattach:[]}}:G)]}),{parent:!0})},with(...$){return this.check(...$)},clone($,I){return D1(this,$,I)},brand(){return this},register($,I){return $.add(this,I),this},refine($,I){return this.check(s7($,I))},superRefine($,I){return this.check(e7($,I))},overwrite($){return this.check(FI($))},optional(){return a4(this)},exactOptional(){return g7(this)},nullable(){return nQ(this)},nullish(){return a4(nQ(this))},nonoptional($){return h7(this,$)},array(){return lQ(this)},or($){return eG([this,$])},and($){return V7(this,$)},transform($){return M5(this,n5($))},default($){return f7(this,$)},prefault($){return b7(this,$)},catch($){return p7(this,$)},pipe($){return M5(this,$)},readonly(){return d7(this)},describe($){let I=this.clone();return kU.add(I,{description:$}),I},meta(...$){if($.length===0)return kU.get(this);let I=this.clone();return kU.add(I,$[0]),I},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply($,...I){return I.length===0?$(this):$(this,...I)},get "~standard"(){return G$.hide(this,"~standard",{...HO(this),jsonSchema:{input:lG(this,"input"),output:lG(this,"output")}})},set "~standard"($){G$.own(this,"~standard",$)},parse:function $(I,G){return tA(this,I,G,{callee:$})},parseAsync:async function $(I,G){return await rA(this,I,G,{callee:$})},safeParse($,I){return aA(this,$,I)},async safeParseAsync($,I){return sA(this,$,I)},get spa(){return this?.safeParseAsync},set spa($){G$.own(this,"spa",$)},validate($,I){return ZQ(this,$,I)},validateAsync($,I){return OQ(this,$,I)},encode:function $(I,G){return eA(this,I,G,{callee:$})},decode:function $(I,G){return $7(this,I,G,{callee:$})},encodeAsync:async function $(I,G){return await U7(this,I,G,{callee:$})},decodeAsync:async function $(I,G){return await I7(this,I,G,{callee:$})},safeEncode($,I){return _7(this,$,I)},safeDecode($,I){return X7(this,$,I)},async safeEncodeAsync($,I){return G7(this,$,I)},async safeDecodeAsync($,I){return Y7(this,$,I)},toJSONSchema($){return JA(this,{})($)},get description(){return kU.get(this)?.description},get _def(){return this._zod.def}}),A5=m0("_ZodString",($,I)=>{n4.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>ZA($,G,Z,_)},G$.derived({format:($)=>TU($).format??null,minLength:($)=>TU($).minimum??null,maxLength:($)=>TU($).maximum??null},{regex(...$){return this.check(jG(...$))},includes(...$){return this.check(wG(...$))},startsWith(...$){return this.check(xG(...$))},endsWith(...$){return this.check(fG(...$))},min(...$){return this.check(y_(...$))},max(...$){return this.check(i4(...$))},length(...$){return this.check(o4(...$))},nonempty(...$){return this.check(y_(1,...$))},lowercase($){return this.check(kG($))},uppercase($){return this.check(gG($))},trim(){return this.check(uG())},normalize(...$){return this.check(hG(...$))},toLowerCase(){return this.check(nG())},toUpperCase(){return this.check(pG())},slugify(){return this.check(cG())}})),tG=m0("ZodString",($,I)=>{n4.init($,I),A5.init($,I)},{email($){return this.check(uO(E5,$))},url($){return this.check(gQ(pQ,$))},jwt($){return this.check(Y5(y5,$))},emoji($){return this.check(dO(P5,$))},guid($){return this.check(nO(R5,$))},uuid($){return this.check(pO(I_,$))},uuidv4($){return this.check(cO(I_,$))},uuidv6($){return this.check(lO(I_,$))},uuidv7($){return this.check(mO(I_,$))},nanoid($){return this.check(iO(V5,$))},cuid($){return this.check(oO(S5,$))},cuid2($){return this.check(tO(v5,$))},ulid($){return this.check(rO(C5,$))},base64($){return this.check(_5(w5,$))},base64url($){return this.check(X5(x5,$))},xid($){return this.check(aO(q5,$))},ksuid($){return this.check(sO(N5,$))},ipv4($){return this.check(eO(B5,$))},ipv6($){return this.check($5(j5,$))},cidrv4($){return this.check(U5(k5,$))},cidrv6($){return this.check(I5(g5,$))},e164($){return this.check(G5(f5,$))},datetime($){return this.check(wQ(h2,$))},date($){return this.check(xQ(u2,$))},time($){return this.check(fQ(n2,$))},duration($){return this.check(yQ(p2,$))}});function uQ($){return PM(tG,$)}var H1=m0("ZodStringFormat",($,I)=>{K1.init($,I),A5.init($,I)}),h2=m0("ZodISODateTime",($,I)=>{JF.init($,I),H1.init($,I)}),u2=m0("ZodISODate",($,I)=>{QF.init($,I),H1.init($,I)}),n2=m0("ZodISOTime",($,I)=>{zF.init($,I),H1.init($,I)}),p2=m0("ZodISODuration",($,I)=>{ZF.init($,I),H1.init($,I)}),E5=m0("ZodEmail",($,I)=>{rH.init($,I),H1.init($,I)});function lj($){return uO(E5,$)}var R5=m0("ZodGUID",($,I)=>{oH.init($,I),H1.init($,I)});function mj($){return nO(R5,$)}var I_=m0("ZodUUID",($,I)=>{tH.init($,I),H1.init($,I)});function dj($){return pO(I_,$)}function ij($){return cO(I_,$)}function oj($){return lO(I_,$)}function tj($){return mO(I_,$)}var pQ=m0("ZodURL",($,I)=>{eH.init($,I),H1.init($,I)});function rj($){return gQ(pQ,$)}function aj($){return gQ(pQ,{protocol:LQ,hostname:ZH,...G$.normalizeParams($)})}var P5=m0("ZodEmoji",($,I)=>{$F.init($,I),H1.init($,I)});function sj($){return dO(P5,$)}var V5=m0("ZodNanoID",($,I)=>{UF.init($,I),H1.init($,I)});function ej($){return iO(V5,$)}var S5=m0("ZodCUID",($,I)=>{IF.init($,I),H1.init($,I)});function $3($){return oO(S5,$)}var v5=m0("ZodCUID2",($,I)=>{_F.init($,I),H1.init($,I)});function U3($){return tO(v5,$)}var C5=m0("ZodULID",($,I)=>{XF.init($,I),H1.init($,I)});function I3($){return rO(C5,$)}var q5=m0("ZodXID",($,I)=>{GF.init($,I),H1.init($,I)});function _3($){return aO(q5,$)}var N5=m0("ZodKSUID",($,I)=>{YF.init($,I),H1.init($,I)});function X3($){return sO(N5,$)}var B5=m0("ZodIPv4",($,I)=>{OF.init($,I),H1.init($,I)});function G3($){return eO(B5,$)}var J7=m0("ZodMAC",($,I)=>{DF.init($,I),H1.init($,I)});function Y3($){return SM(J7,$)}var j5=m0("ZodIPv6",($,I)=>{LF.init($,I),H1.init($,I)});function J3($){return $5(j5,$)}var k5=m0("ZodCIDRv4",($,I)=>{KF.init($,I),H1.init($,I)});function Q3($){return U5(k5,$)}var g5=m0("ZodCIDRv6",($,I)=>{WF.init($,I),H1.init($,I)});function z3($){return I5(g5,$)}var w5=m0("ZodBase64",($,I)=>{HF.init($,I),H1.init($,I)});function Z3($){return _5(w5,$)}var x5=m0("ZodBase64URL",($,I)=>{FF.init($,I),H1.init($,I)});function O3($){return X5(x5,$)}var f5=m0("ZodE164",($,I)=>{TF.init($,I),H1.init($,I)});function L3($){return G5(f5,$)}var Q7=m0("ZodCreditCard",($,I)=>{MF.init($,I),H1.init($,I)});function D3($){return vM(Q7,$)}var z7=m0("ZodIBAN",($,I)=>{AF.init($,I),H1.init($,I)});function K3($){return CM(z7,$)}var y5=m0("ZodJWT",($,I)=>{EF.init($,I),H1.init($,I)});function W3($){return Y5(y5,$)}var e4=m0("ZodCustomStringFormat",($,I)=>{RF.init($,I),H1.init($,I)});function H3($,I,G={}){return t4(e4,$,I,G)}function F3($){return t4(e4,"hostname",zH,$)}function T3($){return t4(e4,"hex",VH,$)}function M3($){return t4(e4,"currency_code",LH,$)}function A3($,I){let G=I?.enc??"hex",Z=`${$}_${G}`,_=_I[Z];if(!_)throw Error(`Unrecognized hash format: ${Z}`);return t4(e4,Z,_,I)}var rG=m0("ZodNumber",($,I)=>{vO.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>OA($,G,Z,_),$.isFinite=!0},G$.derived({minValue:($)=>{let{minimum:I,exclusiveMinimum:G}=TU($);return Math.max(I??Number.NEGATIVE_INFINITY,G??Number.NEGATIVE_INFINITY)},maxValue:($)=>{let{maximum:I,exclusiveMaximum:G}=TU($);return Math.min(I??Number.POSITIVE_INFINITY,G??Number.POSITIVE_INFINITY)},isInt:($)=>{let{isInt:I,multipleOf:G}=TU($);return!!I||!!G?.some(Number.isSafeInteger)},format:($)=>TU($).format??null},{gt($,I){return this.check($_($,I))},gte($,I){return this.check(f6($,I))},min($,I){return this.check(f6($,I))},lt($,I){return this.check(eI($,I))},lte($,I){return this.check(x6($,I))},max($,I){return this.check(x6($,I))},int($){return this.check(T5($))},safe($){return this.check(T5($))},positive($){return this.check($_(0,$))},nonnegative($){return this.check(f6(0,$))},negative($){return this.check(eI(0,$))},nonpositive($){return this.check(x6(0,$))},multipleOf($,I){return this.check(w2($,I))},step($,I){return this.check(w2($,I))},finite(){return this}}));function Z7($){return NM(rG,$)}var $X=m0("ZodNumberFormat",($,I)=>{PF.init($,I),rG.init($,I)});function T5($){return jM($X,$)}function E3($){return kM($X,$)}function R3($){return gM($X,$)}function P3($){return wM($X,$)}function V3($){return xM($X,$)}var aG=m0("ZodBoolean",($,I)=>{EQ.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>LA($,G,Z,_)});function O7($){return fM(aG,$)}var sG=m0("ZodBigInt",($,I)=>{CO.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>DA($,G,Z,_)},G$.derived({minValue:($)=>TU($).minimum??null,maxValue:($)=>TU($).maximum??null,format:($)=>TU($).format??null},{gte($,I){return this.check(f6($,I))},min($,I){return this.check(f6($,I))},gt($,I){return this.check($_($,I))},lt($,I){return this.check(eI($,I))},lte($,I){return this.check(x6($,I))},max($,I){return this.check(x6($,I))},positive($){return this.check($_(BigInt(0),$))},negative($){return this.check(eI(BigInt(0),$))},nonpositive($){return this.check(x6(BigInt(0),$))},nonnegative($){return this.check(f6(BigInt(0),$))},multipleOf($,I){return this.check(w2($,I))}}));function S3($){return bM(sG,$)}var b5=m0("ZodBigIntFormat",($,I)=>{VF.init($,I),sG.init($,I)});function v3($){return uM(b5,$)}function C3($){return nM(b5,$)}var L7=m0("ZodSymbol",($,I)=>{SF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>KA($,G,Z,_)});function q3($){return pM(L7,$)}var D7=m0("ZodUndefined",($,I)=>{vF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>HA($,G,Z,_)});function N3($){return cM(D7,$)}var K7=m0("ZodNull",($,I)=>{CF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>WA($,G,Z,_)});function W7($){return lM(K7,$)}var H7=m0("ZodAny",($,I)=>{qF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>MA($,G,Z,_)});function B3(){return mM(H7)}var F7=m0("ZodUnknown",($,I)=>{NF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>AA($,G,Z,_)});function r4(){return dM(F7)}var T7=m0("ZodNever",($,I)=>{BF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>TA($,G,Z,_)});function h5($){return iM(T7,$)}var M7=m0("ZodVoid",($,I)=>{jF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>FA($,G,Z,_)});function j3($){return oM(M7,$)}var cQ=m0("ZodDate",($,I)=>{kF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>EA($,G,Z,_),$.min=(G,Z)=>$.check(f6(G,Z)),$.max=(G,Z)=>$.check(x6(G,Z))},G$.derived({minDate:($)=>{let{minimum:I}=TU($);return I?new Date(I):null},maxDate:($)=>{let{maximum:I}=TU($);return I?new Date(I):null}},{}));function k3($){return tM(cQ,$)}var A7=m0("ZodArray",($,I)=>{s4(),gF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>gA($,G,Z,_),$.element=I.element},{min($,I){return this.check(y_($,I))},nonempty($){return this.check(y_(1,$))},max($,I){return this.check(i4($,I))},length($,I){return this.check(o4($,I))},unwrap(){return this.element}});function lQ($,I){return sM(A7,$,I)}function g3($){let I=$._zod.def.shape;return u5(Object.keys(I))}var mQ=m0("ZodObject",($,I)=>{s4(),wF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>wA($,G,Z,_),G$.installLazyProp($,"shape",(G)=>G._zod.def.shape,!1)},{keyof(){return u5(Object.keys(this._zod.def.shape))},catchall($){return this.clone(G$.mergeDefs(this._zod.def,{catchall:$}))},passthrough(){return this.clone(G$.mergeDefs(this._zod.def,{catchall:r4()}))},loose(){return this.clone(G$.mergeDefs(this._zod.def,{catchall:r4()}))},strict(){return this.clone(G$.mergeDefs(this._zod.def,{catchall:h5()}))},strip(){return this.clone(G$.mergeDefs(this._zod.def,{catchall:void 0}))},extend($){return G$.extend(this,$)},safeExtend($){return G$.safeExtend(this,$)},merge($){return G$.merge(this,$)},pick($){return G$.pick(this,$)},omit($){return G$.omit(this,$)},partial(...$){return G$.partial(iQ,this,$[0])},exactPartial(...$){return G$.partial(p5,this,$[0],"exactPartial")},required(...$){return G$.required(c5,this,$[0])}});function w3($,I){let G={type:"object",shape:$??{},...G$.normalizeParams(I)};return new mQ(G)}function x3($,I){return new mQ({type:"object",shape:$,catchall:h5(),...G$.normalizeParams(I)})}function f3($,I){return new mQ({type:"object",shape:$,catchall:r4(),...G$.normalizeParams(I)})}var dQ=m0("ZodUnion",($,I)=>{RQ.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>D5($,G,Z,_),$.options=I.options});function eG($,I){return new dQ({type:"union",options:$,...G$.normalizeParams(I)})}var E7=m0("ZodXor",($,I)=>{dQ.init($,I),xF.init($,I),$._zod.processJSONSchema=(G,Z,_)=>D5($,G,Z,_),$.options=I.options});function y3($,I){return new E7({type:"union",options:$,inclusive:!1,...G$.normalizeParams(I)})}var R7=m0("ZodDiscriminatedUnion",($,I)=>{dQ.init($,I),yF.init($,I)});function b3($,I,G){return new R7({type:"union",options:I,discriminator:$,...G$.normalizeParams(G)})}var P7=m0("ZodIntersection",($,I)=>{bF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>xA($,G,Z,_)});function V7($,I){return new P7({type:"intersection",left:$,right:I})}var S7=m0("ZodTuple",($,I)=>{s4(),qO.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>fA($,G,Z,_)},{rest($){return this.clone({...this._zod.def,rest:$})},partial(){let $=this._zod.def;if($.checks?.length)throw Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...$,items:$.items.map((I)=>new iQ({type:"optional",innerType:I}))})}});function v7($,I,G){let Z=I instanceof y$,_=Z?G:I;return new S7({type:"tuple",items:$,rest:Z?I:null,...G$.normalizeParams(_)})}var iG=m0("ZodRecord",($,I)=>{s4(),hF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>yA($,G,Z,_),$.keyType=I.keyType,$.valueType=I.valueType});function C7($,I,G){if(!I||!I._zod)return new iG({type:"record",keyType:uQ(),valueType:$,...G$.normalizeParams(I)});return new iG({type:"record",keyType:$,valueType:I,...G$.normalizeParams(G)})}function h3($,I,G){return new iG({type:"record",keyType:$,valueType:I,...G$.normalizeParams(G),partial:!0})}function u3($,I,G){return new iG({type:"record",keyType:$,valueType:I,mode:"loose",...G$.normalizeParams(G)})}var q7=m0("ZodMap",($,I)=>{s4(),uF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>jA($,G,Z,_),$.keyType=I.keyType,$.valueType=I.valueType,$.min=(...G)=>$.check(U_(...G)),$.nonempty=(G)=>$.check(U_(1,G)),$.max=(...G)=>$.check(x2(...G)),$.size=(...G)=>$.check(d4(...G))});function n3($,I,G){return new q7({type:"map",keyType:$,valueType:I,...G$.normalizeParams(G)})}var N7=m0("ZodSet",($,I)=>{s4(),nF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>kA($,G,Z,_),$.min=(...G)=>$.check(U_(...G)),$.nonempty=(G)=>$.check(U_(1,G)),$.max=(...G)=>$.check(x2(...G)),$.size=(...G)=>$.check(d4(...G))});function p3($,I){return new N7({type:"set",valueType:$,...G$.normalizeParams(I)})}var oG=m0("ZodEnum",($,I)=>{pF.init($,I),p$.init($,I),$._zod.processJSONSchema=(Z,_,J)=>RA($,Z,_,J),$.enum=I.entries,$.options=[...$._zod.values];let G=new Set(Object.keys(I.entries));$.extract=(Z,_)=>{let J={};for(let Y of Z)if(G.has(Y))J[Y]=I.entries[Y];else throw Error(`Key ${Y} not found in enum`);return new oG({...I,checks:[],...G$.normalizeParams(_),entries:J})},$.exclude=(Z,_)=>{let J={...I.entries};for(let Y of Z)if(G.has(Y))delete J[Y];else throw Error(`Key ${Y} not found in enum`);return new oG({...I,checks:[],...G$.normalizeParams(_),entries:J})}});function u5($,I){let G=Array.isArray($)?Object.fromEntries($.map((Z)=>[Z,Z])):$;return new oG({type:"enum",entries:G,...G$.normalizeParams(I)})}function c3($,I){return new oG({type:"enum",entries:$,...G$.normalizeParams(I)})}var B7=m0("ZodLiteral",($,I)=>{cF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>PA($,G,Z,_),$.values=new Set(I.values),Object.defineProperty($,"value",{get(){if(I.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return I.values[0]}})});function l3($,I){return new B7({type:"literal",values:Array.isArray($)?$:[$],...G$.normalizeParams(I)})}var j7=m0("ZodFile",($,I)=>{lF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>vA($,G,Z,_),$.min=(G,Z)=>$.check(U_(G,Z)),$.max=(G,Z)=>$.check(x2(G,Z)),$.mime=(G,Z)=>$.check(bG(Array.isArray(G)?G:[G],Z))});function m3($){return eM(j7,$)}var k7=m0("ZodTransform",($,I)=>{s4(),mF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>BA($,G,Z,_),$._zod.parse=(G,Z)=>{if(Z.direction==="backward")throw new h4($.constructor.name);G.addIssue=(J)=>{if(typeof J==="string")G.issues.push(G$.issue(J,G.value,I));else{let Y=J;if(Y.fatal)Y.continue=!1;if(Y.code??(Y.code="custom"),!("input"in Y))Y.input=G.value;Y.inst??(Y.inst=$),G.issues.push(G$.issue(Y))}};let _=I.transform(G.value,G);if(_ instanceof Promise)return _.then((J)=>{return G.value=J,G});return G.value=_,G}});function n5($){return new k7({type:"transform",transform:$})}var iQ=m0("ZodOptional",($,I)=>{NO.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>K5($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function a4($){return new iQ({type:"optional",innerType:$})}var p5=m0("ZodExactOptional",($,I)=>{dF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>K5($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function g7($){return new p5({type:"optional",innerType:$})}var w7=m0("ZodNullable",($,I)=>{iF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>bA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function nQ($){return new w7({type:"nullable",innerType:$})}function d3($){return a4(nQ($))}var x7=m0("ZodDefault",($,I)=>{oF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>nA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function f7($,I){return new x7({type:"default",innerType:$,get defaultValue(){return typeof I==="function"?I():G$.shallowClone(I)}})}var y7=m0("ZodPrefault",($,I)=>{tF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>pA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function b7($,I){return new y7({type:"prefault",innerType:$,get defaultValue(){return typeof I==="function"?I():G$.shallowClone(I)}})}var c5=m0("ZodNonOptional",($,I)=>{rF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>hA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function h7($,I){return new c5({type:"nonoptional",innerType:$,...G$.normalizeParams(I)})}var u7=m0("ZodSuccess",($,I)=>{aF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>CA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function i3($){return new u7({type:"success",innerType:$})}var n7=m0("ZodCatch",($,I)=>{sF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>cA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function p7($,I){return new n7({type:"catch",innerType:$,catchValue:typeof I==="function"?I:G$.constantCatch(I)})}var c7=m0("ZodNaN",($,I)=>{eF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>VA($,G,Z,_)});function o3($){return aM(c7,$)}var oQ=m0("ZodPipe",($,I)=>{BO.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>lA($,G,Z,_),$.in=I.in,$.out=I.out});function M5($,I){return new oQ({type:"pipe",in:$,out:I})}var tQ=m0("ZodCodec",($,I)=>{oQ.init($,I),PQ.init($,I)});function t3($,I,G){return new tQ({type:"pipe",in:$,out:I,transform:G.decode,reverseTransform:G.encode})}function r3($){let I=$._zod.def;return new tQ({type:"pipe",in:I.out,out:I.in,transform:I.reverseTransform,reverseTransform:I.transform})}var l7=m0("ZodPreprocess",($,I)=>{oQ.init($,I),$T.init($,I)}),m7=m0("ZodReadonly",($,I)=>{UT.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>mA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function d7($){return new m7({type:"readonly",innerType:$})}var i7=m0("ZodTemplateLiteral",($,I)=>{IT.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>SA($,G,Z,_)});function a3($,I){return new i7({type:"template_literal",parts:$,...G$.normalizeParams(I)})}var o7=m0("ZodLazy",($,I)=>{VQ.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>iA($,G,Z,_),$.unwrap=()=>$._zod.def.getter()});function t7($){return new o7({type:"lazy",getter:$})}var r7=m0("ZodPromise",($,I)=>{XT.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>dA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function s3($){return new r7({type:"promise",innerType:$})}var a7=m0("ZodFunction",($,I)=>{_T.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>NA($,G,Z,_)});function e3($){return new a7({type:"function",input:Array.isArray($?.input)?v7($?.input):$?.input??lQ(r4()),output:$?.output??r4()})}var rQ=m0("ZodCustom",($,I)=>{GT.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>qA($,G,Z,_)});function $k($){let I=new A1({check:"custom"});return I._zod.check=$,I}function Uk($,I){return $A(rQ,$??(()=>!0),I)}function s7($,I={}){return UA(rQ,$,I)}function e7($,I){return IA($,I)}var Ik=_A,_k=XA,$E=m0("ZodInstanceOf",($,I)=>{rQ.init($,I)},{properties($,I){return this.check(yG($,I))}});function Xk($,I={}){let G=new $E({type:"custom",check:"custom",fn:(Z)=>Z instanceof $,abort:!0,...G$.normalizeParams(I)});return G._zod.bag.Class=$,G._zod.check=(Z)=>{if(!(Z.value instanceof $))Z.issues.push({code:"invalid_type",expected:$.name,input:Z.value,inst:G,path:[...G._zod.def.path??[]]})},G}var Gk=(...$)=>GA({Codec:tQ,Boolean:aG,String:tG},...$);function Yk($){let I=t7(()=>{return eG([uQ($),Z7(),O7(),W7(),lQ(I),C7(uQ(),I)])});return I}function Jk($,I){return new l7({type:"pipe",in:n5($),out:I})}var rd={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function ad($){IU({customError:$})}function sd(){return IU().customError}var UE;(function($){})(UE||(UE={}));var aQ={};LU(aQ,{time:()=>Ui,duration:()=>Ii,datetime:()=>ed,date:()=>$i,ZodISOTime:()=>n2,ZodISODuration:()=>p2,ZodISODateTime:()=>h2,ZodISODate:()=>u2});function ed($){return wQ(h2,$)}function $i($){return xQ(u2,$)}function Ui($){return fQ(n2,$)}function Ii($){return yQ(p2,$)}var R$={...$Y,...H5,iso:aQ},_i=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Xi($,I){let G=$.$schema;if(G==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(G==="http://json-schema.org/draft-07/schema#")return"draft-7";if(G==="http://json-schema.org/draft-04/schema#")return"draft-4";return I??"draft-2020-12"}function Qk($,I){return $.map((G,Z)=>Z<I?G:G.optional())}function Gi($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}function Yi($,I){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let G=$.slice(1).split("/").filter(Boolean);if(G.length===0)return I.rootSchema;let Z=I.version==="draft-2020-12"?"$defs":"definitions";if(G[0]===Z){let _=G[1]===void 0?void 0:Gi(G[1]);if(!_||!I.defs[_])throw Error(`Reference not found: ${$}`);return I.defs[_]}throw Error(`Reference not found: ${$}`)}function Ji($,I){return R$.transform((Z)=>Z).check((Z)=>{let _=Z.value;if(typeof _!=="object"||_===null||Array.isArray(_))return;let J=Object.getOwnPropertyNames(_);if(I.minProperties!==void 0&&J.length<I.minProperties)Z.issues.push({origin:"object",code:"too_small",minimum:I.minProperties,inclusive:!0,message:`Too small: expected object to have >=${I.minProperties} properties`,input:_,inst:$,continue:!0});if(I.maxProperties!==void 0&&J.length>I.maxProperties)Z.issues.push({origin:"object",code:"too_big",maximum:I.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${I.maxProperties} properties`,input:_,inst:$,continue:!0});if(I.keySchema)for(let Y of J){let W=I.keySchema.safeParse(Y);if(W.success)continue;Z.issues.push({code:"invalid_key",origin:"record",issues:W.error.issues,input:Y,path:[Y],continue:!0})}}).pipe($)}function IE($,I){if($===null)return"z";let G=typeof $;if(G!=="object"){if(G==="number"&&Number.isNaN($))return null;let Z=String($);return`${G[0]}${Z.length}:${Z}`}if(I.has($))return null;I.add($);try{if(Array.isArray($)){let J=[];for(let Y of $){let W=IE(Y,I);if(W===null)return null;J.push(W)}return`a${J.length}:[${J.join(",")}]`}let Z=Object.keys($).sort(),_=[];for(let J of Z){let Y=IE($[J],I);if(Y===null)return null;_.push(`${J.length}:${J}=${Y}`)}return`o${_.length}:{${_.join(",")}}`}finally{I.delete($)}}var Qi=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),zi=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function sQ($){if(typeof $!=="object"||$===null)return!1;if(Array.isArray($))return $.some(sQ);if(typeof $.$ref==="string")return!0;return Object.entries($).some(([I,G])=>{if(Qi.has(I))return sQ(G);if(!zi.has(I)||typeof G!=="object"||G===null)return!1;return Object.values(G).some(sQ)})}function zk($){return $===1?"element":"elements"}function Zi($,I){return R$.transform((Z)=>Z).check((Z)=>{let _=Z.value;if(!Array.isArray(_))return;if(I.uniqueItems===!0){let J=new Map;for(let Y=0;Y<_.length;Y++){let W=IE(_[Y],new Set);if(W===null)continue;let R=J.get(W);if(R===void 0){J.set(W,Y);continue}Z.issues.push({code:"custom",message:`Array items must be unique: element at index ${Y} duplicates the one at index ${R}`,input:_,path:[Y],continue:!0})}}if(I.containsSchema){let J=I.minContains??1,Y=I.maxContains!==void 0?I.maxContains+1:Number.POSITIVE_INFINITY,W=0;for(let R of _)if(I.containsSchema.safeParse(R).success&&++W>=Y)break;if(W<J)Z.issues.push({code:"custom",message:`Array must contain at least ${J} matching ${zk(J)}; found ${W}`,input:_,continue:!0});if(I.maxContains!==void 0&&W>I.maxContains)Z.issues.push({code:"custom",message:`Array must contain at most ${I.maxContains} matching ${zk(I.maxContains)}`,input:_,continue:!0})}}).pipe($)}function Zk($,I){if($===!1)return;if($===void 0||$===!0)return R$.any();return eU($,I)}var Oi=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function Ok($,I){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return R$.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let _=$.$ref;if(I.refs.has(_))return I.refs.get(_);if(I.processing.has(_))return R$.lazy(()=>{if(!I.refs.has(_))throw Error(`Circular reference not resolved: ${_}`);return I.refs.get(_)});I.processing.add(_);let J=Yi(_,I),Y=eU(J,I);return I.refs.set(_,Y),I.processing.delete(_),Y}if($.enum!==void 0){let _=$.enum;if(I.version==="openapi-3.0"&&$.nullable===!0&&_.length===1&&_[0]===null)return R$.null();if(_.length===0)return R$.never();if(_.length===1)return R$.literal(_[0]);if(_.every((Y)=>typeof Y==="string"))return R$.enum(_);let J=_.map((Y)=>R$.literal(Y));if(J.length<2)return J[0];return R$.union([J[0],J[1],...J.slice(2)])}if($.const!==void 0)return R$.literal($.const);let G=$.type;if(Array.isArray(G)){let _=G.map((J)=>{let Y={...$,type:J};return Ok(Y,I)});if(_.length===0)return R$.never();if(_.length===1)return _[0];return R$.union(_)}if(!G)return R$.any();let Z;switch(G){case"string":{let _=R$.string();if($.format){let J=$.format;if(J==="email")_=_.check(R$.email());else if(J==="uri"||J==="uri-reference")_=_.check(R$.url());else if(J==="uuid"||J==="guid")_=_.check(R$.uuid());else if(J==="date-time")_=_.check(R$.iso.datetime({offset:!0}));else if(J==="date")_=_.check(R$.iso.date());else if(J==="time")_=_.check(R$.regex(Oi));else if(J==="duration")_=_.check(R$.iso.duration());else if(J==="hostname")_=_.check(R$.hostname());else if(J==="ipv4")_=_.check(R$.ipv4());else if(J==="ipv6")_=_.check(R$.ipv6());else if(J==="mac")_=_.check(R$.mac());else if(J==="cidr")_=_.check(R$.cidrv4());else if(J==="cidr-v6")_=_.check(R$.cidrv6());else if(J==="base64")_=_.check(R$.base64());else if(J==="base64url")_=_.check(R$.base64url());else if(J==="e164")_=_.check(R$.e164());else if(J==="credit_card")_=_.check(R$.creditCard());else if(J==="iban")_=_.check(R$.iban());else if(J==="jwt")_=_.check(R$.jwt());else if(J==="emoji")_=_.check(R$.emoji());else if(J==="nanoid")_=_.check(R$.nanoid());else if(J==="cuid")_=_.check(R$.cuid());else if(J==="cuid2")_=_.check(R$.cuid2());else if(J==="ulid")_=_.check(R$.ulid());else if(J==="xid")_=_.check(R$.xid());else if(J==="ksuid")_=_.check(R$.ksuid())}if(typeof $.minLength==="number")_=_.min($.minLength);if(typeof $.maxLength==="number")_=_.max($.maxLength);if($.pattern)_=_.regex(new RegExp($.pattern));Z=_;break}case"number":case"integer":{let _=G==="integer"?R$.number().int():R$.number();if(typeof $.minimum==="number"&&$.exclusiveMinimum!==!0)_=_.min($.minimum);if(typeof $.maximum==="number"&&$.exclusiveMaximum!==!0)_=_.max($.maximum);if(typeof $.exclusiveMinimum==="number")_=_.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")_=_.gt($.minimum);if(typeof $.exclusiveMaximum==="number")_=_.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")_=_.lt($.maximum);if(typeof $.multipleOf==="number")_=_.multipleOf($.multipleOf);Z=_;break}case"boolean":{Z=R$.boolean();break}case"null":{Z=R$.null();break}case"object":{let _={},J=$.properties||{},Y=new Set($.required||[]),W=typeof $.additionalProperties==="object"?eU($.additionalProperties,I):void 0;for(let[T,S]of Object.entries(J)){let N=eU(S,I);jU(_,T,Y.has(T)?N:N.optional())}if($.patternProperties){let T=$.patternProperties,S=Object.keys(T),N=[];for(let x of S){let w=eU(T[x],I),y=R$.string().regex(new RegExp(x));N.push(R$.looseRecord(y,w))}let B=[];if(Object.keys(_).length>0)B.push(R$.object(_).passthrough());if(B.push(...N),B.length===0)Z=R$.object({}).passthrough();else if(B.length===1)Z=B[0];else{let x=R$.intersection(B[0],B[1]);for(let w=2;w<B.length;w++)x=R$.intersection(x,B[w]);Z=x}if($.additionalProperties===!1){let x=Object.keys(_),w=S.map((g)=>new RegExp(g)),y=Z;Z=Z.check((g)=>{if(!UI(g.value))return;let b=[];for(let l of Object.keys(g.value)){if(x.includes(l))continue;if(w.some((i)=>i.test(l)))continue;b.push(l)}if(b.length)g.issues.push({code:"unrecognized_keys",keys:b,input:g.value,inst:y})})}}else{let T=R$.object(_);if($.additionalProperties===!1)Z=T.strict();else if(W)Z=T.catchall(W);else Z=T.passthrough()}let R=$.propertyNames!==void 0&&$.propertyNames!==!0,M=typeof $.minProperties==="number"?$.minProperties:void 0,E=typeof $.maxProperties==="number"?$.maxProperties:void 0;if(R||M!==void 0||E!==void 0){let T;if(R){let S=typeof $.propertyNames==="object"&&$.propertyNames.type===void 0?{type:"string",...$.propertyNames}:$.propertyNames;T=eU(S,I)}Z=Ji(Z,{keySchema:T,minProperties:M,maxProperties:E})}break}case"array":{let{prefixItems:_,items:J}=$;if(_&&Array.isArray(_)){let Y=typeof $.minItems==="number"?$.minItems:0,W=_.map((T)=>eU(T,I)),R=Qk(W,Y),M=!Array.isArray(J)?Zk(J,I):void 0,E=R$.tuple(R);if(Z=M?E.rest(M):E,typeof $.minItems==="number")Z=Z.check(R$.minLength($.minItems));if(typeof $.maxItems==="number")Z=Z.check(R$.maxLength($.maxItems))}else if(Array.isArray(J)){let Y=typeof $.minItems==="number"?$.minItems:0,W=J.map((T)=>eU(T,I)),R=Qk(W,Y),M=Zk($.additionalItems,I),E=R$.tuple(R);if(Z=M?E.rest(M):E,typeof $.minItems==="number")Z=Z.check(R$.minLength($.minItems));if(typeof $.maxItems==="number")Z=Z.check(R$.maxLength($.maxItems))}else if(J!==void 0){let Y=eU(J,I),W=R$.array(Y);if(typeof $.minItems==="number")W=W.min($.minItems);if(typeof $.maxItems==="number")W=W.max($.maxItems);Z=W}else Z=R$.array(R$.any());if($.uniqueItems===!0||$.contains!==void 0)Z=Zi(Z,{uniqueItems:$.uniqueItems===!0,containsSchema:$.contains!==void 0?eU($.contains,I):void 0,minContains:typeof $.minContains==="number"?$.minContains:void 0,maxContains:typeof $.maxContains==="number"?$.maxContains:void 0});break}default:throw Error(`Unsupported type: ${G}`)}return Z}function eU($,I){if(typeof $==="boolean")return $?R$.any():R$.never();let G=Ok($,I),Z=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let W=$.anyOf.map((M)=>eU(M,I)),R=R$.union(W);G=Z?R$.intersection(G,R):R}if($.oneOf&&Array.isArray($.oneOf)){let W=$.oneOf.map((M)=>eU(M,I)),R=R$.xor(W);G=Z?R$.intersection(G,R):R}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)G=Z?G:R$.any();else{let W=Z?G:eU($.allOf[0],I),R=Z?0:1;for(let M=R;M<$.allOf.length;M++)W=R$.intersection(W,eU($.allOf[M],I));G=W}if($.nullable===!0&&I.version==="openapi-3.0")G=R$.nullable(G);if($.readOnly===!0)G=R$.readonly(G);if($.default!==void 0)G=G.default($.default);let _={},J=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let W of J)if(W in $)_[W]=$[W];let Y=["contentEncoding","contentMediaType","contentSchema"];for(let W of Y)if(W in $)_[W]=$[W];if($.type==="object"&&$.$ref===void 0){if($.propertyNames!==void 0&&!sQ($.propertyNames))_.propertyNames=$.propertyNames;for(let W of["minProperties","maxProperties"])if($[W]!==void 0)_[W]=$[W]}if($.type==="array"&&$.$ref===void 0){if($.contains!==void 0&&!sQ($.contains))_.contains=$.contains;for(let W of["uniqueItems","minContains","maxContains"])if($[W]!==void 0)_[W]=$[W]}for(let W of Object.keys($))if(!_i.has(W))jU(_,W,$[W]);if(Object.keys(_).length>0)I.registry.add(G,_);if($.description)G=G.describe($.description);return G}function Lk($,I){if(typeof $==="boolean")return $?R$.any():R$.never();let G;try{G=JSON.parse(JSON.stringify($))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let Z=Xi(G,I?.defaultTarget),_=G.$defs||G.definitions||{},J={version:Z,defs:_,refs:new Map,processing:new Set,rootSchema:G,registry:I?.registry??kU};return eU(G,J)}var Dk=Symbol("z.visit/resolving");function eQ($,I){let G=typeof I==="function"?I:(Y,W)=>{let R=I[Y._zod.def.type];return R?R(Y,W):Y},Z=new Map;function _(Y){let W=Z.get(Y);if(W===Dk)return new VQ({type:"lazy",getter:()=>Z.get(Y)});if(W!==void 0)return W;Z.set(Y,Dk);let R=J(Y),M=G(R,R!==Y);return Z.set(Y,M),M}function J(Y){let W=Y._zod.def,R=W.type;switch(R){case"object":{let M=W.shape,E=Object.keys(M),T=!1,S={};for(let B of E){let x=_(M[B]);if(x!==M[B])T=!0;S[B]=x}let N=W.catchall;if(W.catchall){if(N=_(W.catchall),N!==W.catchall)T=!0}return T?D1(Y,{...W,shape:S,catchall:N}):Y}case"array":{let M=_(W.element);return M===W.element?Y:D1(Y,{...W,element:M})}case"tuple":{let M=W.items,E=!1,T=[];for(let N of M){let B=_(N);if(B!==N)E=!0;T.push(B)}let S=W.rest;if(W.rest){if(S=_(W.rest),S!==W.rest)E=!0}return E?D1(Y,{...W,items:T,rest:S}):Y}case"record":case"map":{let M=_(W.keyType),E=_(W.valueType);return M===W.keyType&&E===W.valueType?Y:D1(Y,{...W,keyType:M,valueType:E})}case"set":{let M=_(W.valueType);return M===W.valueType?Y:D1(Y,{...W,valueType:M})}case"union":{let M=W.options,E=!1,T=[];for(let S of M){let N=_(S);if(N!==S)E=!0;T.push(N)}return E?D1(Y,{...W,options:T}):Y}case"intersection":{let M=_(W.left),E=_(W.right);return M===W.left&&E===W.right?Y:D1(Y,{...W,left:M,right:E})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let M=_(W.innerType);return M===W.innerType?Y:D1(Y,{...W,innerType:M})}case"pipe":{let M=_(W.in),E=_(W.out);return M===W.in&&E===W.out?Y:D1(Y,{...W,in:M,out:E})}case"function":{let M=_(W.input),E=_(W.output);return M===W.input&&E===W.output?Y:D1(Y,{...W,input:M,output:E})}case"lazy":{let M=W.getter,{_cachedInner:E,...T}=W;return D1(Y,{...T,getter:()=>_(M())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return Y;default:return Y}}return _($)}function Kk($){return eQ($,{object:(I)=>I.partial(),union:(I)=>{let G=I._zod.def;return G.discriminator===void 0?I:eG(G.options)}})}function Li($,I){if(!I?.length)return $;let G=$._zod.def;return D1($,HI(G,{checks:[...G.checks??[],...I]}),{parent:!0})}function Wk($){return Li($.out,$.checks)}function Di($){return $.in._zod.traits.has("$ZodTransform")?Wk($):$.in}function Hk($){return eQ($,{pipe:(I)=>Di(I._zod.def),default:(I,G)=>G?a4(I._zod.def.innerType):I,catch:(I,G)=>G?I._zod.def.innerType:I})}function Fk($){return eQ($,{pipe:(I)=>Wk(I._zod.def),prefault:(I,G)=>G?I._zod.def.innerType:I})}var _E={};LU(_E,{string:()=>Ki,number:()=>Wi,date:()=>Ti,boolean:()=>Hi,bigint:()=>Fi});function Ki($){return VM(tG,$)}function Wi($){return BM(rG,$)}function Hi($){return yM(aG,$)}function Fi($){return hM(sG,$)}function Ti($){return rM(cQ,$)}var Tk=f$.object({id:f$.string().min(1).optional(),name:f$.string().min(1).optional(),kind:f$.enum(["human","agent","bot","system"])}),Mk=f$.object({type:f$.string().min(1),id:f$.string().min(1)}),Ak=f$.object({provider:f$.string().min(1),id:f$.string().min(1).optional(),url:f$.string().min(1).optional(),cursor:f$.string().min(1).optional(),rawRef:f$.string().min(1).optional()}),XE=f$.object({id:f$.string().min(1),service:f$.string().min(1),type:f$.string().min(1),schemaVersion:f$.number().int().positive(),idempotencyKey:f$.string().min(1),occurredAt:f$.string().min(1),observedAt:f$.string().min(1),origin:f$.enum(["virtual","external","agent","connector","replay","migration"]),actor:Tk.optional(),subject:Mk,causationId:f$.string().min(1).optional(),correlationId:f$.string().min(1).optional(),external:Ak.optional(),data:f$.record(f$.string(),f$.unknown()),raw:f$.record(f$.string(),f$.unknown()).optional()}),Ek=f$.object({version:f$.literal(1),service:f$.string().min(1),rebuiltAt:f$.string().min(1),eventCount:f$.number().int().nonnegative(),latestEventId:f$.string().min(1).optional(),subjects:f$.record(f$.string(),f$.object({type:f$.string().min(1),id:f$.string().min(1),latestEventId:f$.string().min(1),latestType:f$.string().min(1),updatedAt:f$.string().min(1)}))});function Rk($){return $I($||process.env.PROJECT_ROOT||process.cwd())}function pZ(){let $=process.env.VOLTER_STATE_DIR||".volter";if(j2($)||$.split(/[\\/]/).includes(".."))throw Error("VOLTER_STATE_DIR must be a relative directory without .. segments");return $}function l5($){return G1(Rk($),pZ(),"world")}function Ei($){if(!/^[A-Za-z0-9_-]+$/.test($))throw Error(`Invalid world service name: ${$}`);return $}var GE;function Pk($){let I=GE;return GE=$,I}var Ri=0;function g6($,I){let G=Ei($);if(Ri===0)GE?.(G,I);let Z=Rk(I),_=G1(l5(I),G);return{root:Z,service:G,dir:_,events:G1(_,"events.jsonl"),state:G1(_,"state.json"),resources:G1(_,"resources"),cursors:G1(_,"cursors"),ingests:G1(_,"ingests"),eventQueue:G1(_,"event-queue.jsonl")}}var Pi={windowMs:60000,ceiling:60,defaultWeight:2,maxRetryAfterSeconds:300,rules:[],reason:"no pack declared a budget for this vendor — this is the conservative fallback (30 calls/min at "+"the default weight), not a considered limit. Declare one on the pack with the vendor's real limits."};DU();var Vk="2.0",qi=Number(Vk.split(".")[0]);var ki=J6(vk(),1);d1();DU();var{AsyncLocalStorage:nI0}=(()=>({}));DU();var{AsyncLocalStorage:kI0}=(()=>({}));var gI0="0".repeat(32),wI0="0".repeat(16);var{AsyncLocalStorage:Yo}=(()=>({}));var di;function jk($){di=$}var QE="/__volter/world-boot";var{chmodSync:Z_0,existsSync:O_0,mkdirSync:L_0,readFileSync:D_0,writeFileSync:K_0}=(()=>({}));DU();d1();DU();var Jo=1e6,Qo=/(?:^|[-_.])(?:auth|authorization|token|jwt|key|apikey|secret|credential|credentials|signature|sig|password|passwd|pwd|session|sessionid|cookie|access[-_]?token|refresh[-_]?token)(?:[-_.]|$)/i,zo=/^(Bearer|Basic|Digest|Token|Negotiate|NTLM|OAuth|Signature|Hawk|AWS4-HMAC-SHA256|SharedKey|SharedKeyLite|GoogleLogin)\s+(\S[\s\S]*)$/i;function wk($){return`sha256:${j6("sha256").update($,"utf8").digest("hex").slice(0,16)}`}function Zo($,I,G){let Z=zo.exec(I);if(!Z&&!Qo.test($))return;let _=$.toLowerCase();if(I==="")return{name:_,in:G,empty:!0};if(Z)return{name:_,in:G,scheme:Z[1],fp:wk(Z[2])};return{name:_,in:G,fp:wk(I)}}function hk($,I){let G=[],Z=new Set,_=(J,Y,W)=>{let R=Zo(J,Y,W);if(!R)return;let M=`${R.in}:${R.name}`;if(Z.has(M))return;Z.add(M),G.push(R)};try{if(typeof $.forEach==="function")$.forEach((J,Y)=>_(Y,J,"header"));else for(let[J,Y]of Object.entries($))_(J,String(Y),"header")}catch{}try{if(I!==void 0){let J=typeof I==="string"?new URL(I,"http://twin.invalid").search:I.search;for(let[Y,W]of new URLSearchParams(J))_(Y,W,"query")}}catch{}return G.sort((J,Y)=>J.in===Y.in?J.name.localeCompare(Y.name):J.in.localeCompare(Y.in))}function OE($=process.env){return $.VOLTER_TWIN_REQUEST_JOURNAL==="1"}function uk($,I){return G1(i1(g6($,I).events),"requests.jsonl")}function nk($,I,G){if(!OE())return;try{let Z=fU(),_=uk($,G);if(Z.mkdir(i1(_)),(Z.stat(_)?.size??0)>=Jo)Z.writeAtomic(`${_}.1`,Z.read(_)??""),Z.write(_,"");let Y=JSON.stringify({at:I.at??new Date().toISOString(),method:I.method.toUpperCase(),path:I.path.split("?")[0],status:I.status,...typeof I.ms==="number"?{ms:I.ms}:{},...I.credentials?.length?{credentials:I.credentials}:{}});Z.append(_,`${Y}
387
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let Y of $.seen.entries()){let W=Y[1];if(I===Y[0]){J(Y);continue}if($.external){let M=$.external.registry.get(Y[0])?.id;if(I!==Y[0]&&M){J(Y);continue}}if($.metadataRegistry.get(Y[0])?.id){J(Y);continue}if(W.cycle){J(Y);continue}if(W.count>1){if($.reused==="ref")J(Y)}}if($.external)$.sharedDefsExtractedFor=$.external}function Nj($){let I=$.anyOf;if(!Array.isArray(I)||I.length===0||$.type!==void 0)return;let G=[];for(let Z of I){if(!Z||typeof Z!=="object")return;Nj(Z);let _=Object.keys(Z);if(_.length!==1||_[0]!=="type")return;let J=Z.type;for(let Y of Array.isArray(J)?J:[J]){if(typeof Y!=="string")return;if(!G.includes(Y))G.push(Y)}}delete $.anyOf,$.type=G.length===1?G[0]:G}var Bj=new Set(["type","properties","required","additionalProperties"]),Cj=["oneOf","anyOf"];function qj($){let I=$.additionalProperties;if(I===void 0||I===!1||typeof I!=="object"||I===null)return null;return Object.keys(I).length?I:null}function YA($){let I=[];for(let J of $){if(typeof J!=="object"||J.type!=="object")return null;for(let Y in J)if(!Bj.has(Y))return null;I.push(J)}let G={},Z=new Set;for(let J of I){for(let Y in J.properties){if(Object.prototype.hasOwnProperty.call(G,Y))continue;let W=[];for(let M of I){let E=M.properties?.[Y]??qj(M);if(E===null||E===void 0)continue;if(!W.some((T)=>JSON.stringify(T)===JSON.stringify(E)))W.push(E)}let R=W.length===1?W[0]:YA(W)??{allOf:W};jU(G,Y,R)}for(let Y of J.required??[])Z.add(Y)}let _={type:"object",properties:G};if(Z.size)_.required=[...Z];if(I.every((J)=>J.additionalProperties===!1))_.additionalProperties=!1;else{let J=[];for(let Y of I){let W=qj(Y);if(W&&!J.some((R)=>JSON.stringify(R)===JSON.stringify(W)))J.push(W)}if(J.length===1)_.additionalProperties=J[0];else if(J.length>1)_.additionalProperties={allOf:J}}return _}function nd($){let I=$.allOf;if(!Array.isArray(I)||I.length<2)return;for(let _ of Bj)if(_ in $)return;let G=I.filter((_)=>Cj.some((J)=>Array.isArray(_[J]))),Z=null;if(!G.length)Z=YA(I);else{let _=G[0],J=Cj.find((R)=>Array.isArray(_[R]));if(Object.keys(_).length!==1)return;let Y=I.filter((R)=>R!==_),W=_[J].map((R)=>YA([...Y,R]));if(W.some((R)=>!R))return;Z={[J]:W}}if(!Z)return;delete $.allOf,bQ($,Z)}function b2($,I){let G=$.seen.get(I);if(!G)throw Error("Unprocessed schema. This is a bug in Zod.");let Z=(W)=>{let R=$.seen.get(W);if(R.ref===null)return;let M=R.def??R.schema,E={...M},T=R.ref;if(R.ref=null,T){Z(T);let N=$.seen.get(T),B=N.schema;if(B.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))M.allOf=M.allOf??[],M.allOf.push(B);else bQ(M,B);if(bQ(M,E),W._zod.parent===T)for(let w in M){if(w==="$ref"||w==="allOf")continue;if(!(w in E))delete M[w]}if(B.$ref&&N.def)for(let w in M){if(w==="$ref"||w==="allOf")continue;if(w in N.def&&JSON.stringify(M[w])===JSON.stringify(N.def[w]))delete M[w]}}let S=W._zod.parent;if(S&&S!==T){Z(S);let N=$.seen.get(S);if(N?.schema.$ref){if(M.$ref=N.schema.$ref,N.def)for(let B in M){if(B==="$ref"||B==="allOf")continue;if(B in N.def&&JSON.stringify(M[B])===JSON.stringify(N.def[B]))delete M[B]}}}$.override({zodSchema:W,jsonSchema:M,path:R.path??[]})};if(!$.external||$.sharedEmitDoneFor!==$.external){for(let W of[...$.seen.entries()].reverse())Z(W[0]);if($.target!=="openapi-3.0")for(let W of $.seen.entries())Nj(W[1].def??W[1].schema);for(let W of $.deferred)W();if($.intersections.length){let W=new Map;for(let R of $.seen.values())for(let M of[R.schema,R.def]){let E=M?.allOf;if(!Array.isArray(E))continue;let T=W.get(E);if(T)T.push(M);else W.set(E,[M])}for(let R of $.intersections)for(let M of W.get(R)??[])nd(M)}}let _={};if($.target==="draft-2020-12")_.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")_.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")_.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let W=$.external.registry.get(I)?.id;if(!W)throw Error("Schema is missing an `id` property");_.$id=$.external.uri(W)}bQ(_,G.defId?G.schema:G.def??G.schema);let J=$.metadataRegistry.get(I)?.id;if(J!==void 0&&_.id===J)delete _.id;let Y=$.external?.defs??{};if(!$.external||$.sharedEmitDoneFor!==$.external)for(let W of $.seen.entries()){let R=W[1];if(R.def&&R.defId){if(R.def.id===R.defId)delete R.def.id;jU(Y,R.defId,R.def)}}if($.external)$.sharedEmitDoneFor=$.external;if($.external);else if(Object.keys(Y).length>0)if($.target==="draft-2020-12")_.$defs=Y;else _.definitions=Y;try{let W=JSON.parse(JSON.stringify(_));return Object.defineProperty(W,"~standard",{value:{...I["~standard"],jsonSchema:{input:lG(I,"input",$.processors),output:lG(I,"output",$.processors)}},enumerable:!1,writable:!1}),W}catch(W){throw Error("Error converting schema to JSON.")}}function sU($,I){let G=I??{seen:new Set};if(G.seen.has($))return!1;G.seen.add($);let Z=$._zod.def;if(Z.type==="transform")return!0;if(Z.type==="array")return sU(Z.element,G);if(Z.type==="set")return sU(Z.valueType,G);if(Z.type==="lazy")return sU(Z.getter(),G);if(Z.type==="promise"||Z.type==="optional"||Z.type==="nonoptional"||Z.type==="nullable"||Z.type==="readonly"||Z.type==="default"||Z.type==="prefault"||Z.type==="catch")return sU(Z.innerType,G);if(Z.type==="intersection")return sU(Z.left,G)||sU(Z.right,G);if(Z.type==="record"||Z.type==="map")return sU(Z.keyType,G)||sU(Z.valueType,G);if(Z.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return sU(Z.in,G)||sU(Z.out,G)}if(Z.type==="object"){for(let _ in Z.shape)if(sU(Z.shape[_],G))return!0;return!1}if(Z.type==="union"){for(let _ of Z.options)if(sU(_,G))return!0;return!1}if(Z.type==="tuple"){for(let _ of Z.items)if(sU(_,G))return!0;if(Z.rest&&sU(Z.rest,G))return!0;return!1}return!1}var JA=($,I={})=>(G)=>{let Z=f2({...G,processors:I});return W1($,Z),y2(Z,$),b2(Z,$)},lG=($,I,G={})=>(Z)=>{let{libraryOptions:_,target:J}=Z??{},Y=f2({..._??{},target:J,io:I,processors:G});return W1($,Y),y2(Y,$),b2(Y,$)};var mG=($,I,G)=>{if($[I]===void 0||G>$[I])$[I]=G},dG=($,I,G)=>{if($[I]===void 0||G<$[I])$[I]=G},jj=($,I)=>{mG($,"minimum",I),dG($,"maximum",I)},xj=($,I)=>{if($.multipleOf??($.multipleOf=[]),!$.multipleOf.includes(I))$.multipleOf.push(I)},fj=($,I)=>{$.patterns??($.patterns=new Set),$.patterns.add(I)},yj=($,I)=>{$.mime=$.mime?$.mime.filter((G)=>I.includes(G)):[...I]},bj=($,I)=>{if($.format=I,I.includes("int"))$.isInt=!0},kj=($,I)=>mG($,"minimum",I.minimum),gj=($,I)=>dG($,"maximum",I.maximum),wj=($)=>(I,G)=>{bj(I,G.format);let[Z,_]=$[G.format];mG(I,"minimum",Z),dG(I,"maximum",_)},pd={greater_than:($,I)=>mG($,I.inclusive?"minimum":"exclusiveMinimum",I.value),less_than:($,I)=>dG($,I.inclusive?"maximum":"exclusiveMaximum",I.value),multiple_of:($,I)=>xj($,I.value),number_format:wj(_Q),bigint_format:wj(XQ),min_length:kj,max_length:gj,length_equals:($,I)=>jj($,I.length),min_size:kj,max_size:gj,size_equals:($,I)=>jj($,I.size),string_format:($,I)=>{if(bj($,I.format),I.pattern)fj($,I.pattern);if(I.format==="base64"||I.format==="base64url")$.contentEncoding=I.format;if(I.local||I.precision===-1)$.laxFormat=!0},mime_type:($,I)=>yj($,I.mime)};function TU($){let I={},G=$._zod.def,Z=$._zod.traits.has("$ZodCheck")?[$,...G.checks??[]]:G.checks??[];for(let J of Z)pd[J._zod.def.check]?.(I,J._zod.def);let _=$._zod.bag;if(_.minimum!==void 0)mG(I,"minimum",_.minimum);if(_.exclusiveMinimum!==void 0)mG(I,"exclusiveMinimum",_.exclusiveMinimum);if(_.maximum!==void 0)dG(I,"maximum",_.maximum);if(_.exclusiveMaximum!==void 0)dG(I,"exclusiveMaximum",_.exclusiveMaximum);if(_.multipleOf!==void 0)xj(I,_.multipleOf);if(_.format!==void 0){if(I.format??(I.format=_.format),_.format.includes("int"))I.isInt=!0}if(_.mime)yj(I,_.mime);for(let J of _.patterns??[])fj(I,J);return I}var cd={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ld=new Map([[EO,JH],[AQ,QH]]),hj=($)=>ld.get($)??$,ZA=($,I,G,Z)=>{let _=G;_.type="string";let{minimum:J,maximum:Y,format:W,patterns:R,contentEncoding:M,laxFormat:E}=TU($);if(typeof J==="number")_.minLength=J;if(typeof Y==="number")_.maxLength=Y;if(W){if(_.format=cd[W]??W,_.format==="")delete _.format;if(W==="time"||E)delete _.format}if(M)_.contentEncoding=M;if(R&&R.size>0){let T=[...R].map(hj);if(T.length===1)_.pattern=T[0].source;else if(T.length>1)_.allOf=[...T.map((S)=>({...I.target==="draft-07"||I.target==="draft-04"||I.target==="openapi-3.0"?{type:"string"}:{},pattern:S.source}))]}},OA=($,I,G,Z)=>{let _=G,{minimum:J,maximum:Y,multipleOf:W,exclusiveMaximum:R,exclusiveMinimum:M,isInt:E}=TU($);_.type=E?"integer":"number";let T=typeof M==="number"&&M>=(J??Number.NEGATIVE_INFINITY),S=typeof R==="number"&&R<=(Y??Number.POSITIVE_INFINITY),N=I.target==="draft-04"||I.target==="openapi-3.0";if(T)if(N)_.minimum=M,_.exclusiveMinimum=!0;else _.exclusiveMinimum=M;else if(typeof J==="number")_.minimum=J;if(S)if(N)_.maximum=R,_.exclusiveMaximum=!0;else _.exclusiveMaximum=R;else if(typeof Y==="number")_.maximum=Y;if(W){let B=new Set;for(let y of W)if(Number.isFinite(y)&&y!==0)B.add(Math.abs(y));else FU($,I,_,Z,`A multipleOf divisor of ${y} cannot be represented in JSON Schema`);let[x,...w]=B;if(x!==void 0)_.multipleOf=x;if(w.length)_.allOf=[..._.allOf??[],...w.map((y)=>({multipleOf:y}))]}},LA=($,I,G,Z)=>{G.type="boolean"},DA=($,I,G,Z)=>{FU($,I,G,Z,"BigInt cannot be represented in JSON Schema")},KA=($,I,G,Z)=>{FU($,I,G,Z,"Symbols cannot be represented in JSON Schema")},WA=($,I,G,Z)=>{if(I.target==="openapi-3.0")G.type="string",G.nullable=!0,G.enum=[null];else G.type="null"},HA=($,I,G,Z)=>{FU($,I,G,Z,"Undefined cannot be represented in JSON Schema")},FA=($,I,G,Z)=>{FU($,I,G,Z,"Void cannot be represented in JSON Schema")},TA=($,I,G,Z)=>{G.not={}},MA=($,I,G,Z)=>{},AA=($,I,G,Z)=>{},EA=($,I,G,Z)=>{FU($,I,G,Z,"Date cannot be represented in JSON Schema")},RA=($,I,G,Z)=>{let _=$._zod.def,J=HG(_.entries);if(J.length===0){G.not={};return}if(J.every((Y)=>typeof Y==="number"))G.type="number";if(J.every((Y)=>typeof Y==="string"))G.type="string";G.enum=J},PA=($,I,G,Z)=>{let _=$._zod.def;if(_.values.length===0){G.not={};return}let J=[];for(let Y of _.values)if(Y===void 0){if(FU($,I,G,Z,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof Y==="bigint"){if(FU($,I,G,Z,"BigInt literals cannot be represented in JSON Schema"))return;J.push(Number(Y))}else J.push(Y);if(J.length===0);else if(J.length===1){let Y=J[0];if(G.type=Y===null?"null":typeof Y,I.target==="draft-04"||I.target==="openapi-3.0")G.enum=[Y];else G.const=Y}else{if(J.every((Y)=>typeof Y==="number"))G.type="number";if(J.every((Y)=>typeof Y==="string"))G.type="string";if(J.every((Y)=>typeof Y==="boolean"))G.type="boolean";if(J.every((Y)=>Y===null))G.type="null";G.enum=J}},VA=($,I,G,Z)=>{FU($,I,G,Z,"NaN cannot be represented in JSON Schema")},SA=($,I,G,Z)=>{let _=G,J=$._zod.pattern;if(!J)throw Error("Pattern not found in template literal");_.type="string",_.pattern=J.source},vA=($,I,G,Z)=>{let _=G;_.type="string",_.format="binary",_.contentEncoding="binary";let{minimum:J,maximum:Y,mime:W}=TU($);if(J!==void 0)_.minLength=J;if(Y!==void 0)_.maxLength=Y;if(!W)return;if(W.length===0)_.not={};else if(W.length===1)_.contentMediaType=W[0];else _.anyOf=W.map((R)=>({contentMediaType:R}))},CA=($,I,G,Z)=>{G.type="boolean"},qA=($,I,G,Z)=>{FU($,I,G,Z,"Custom types cannot be represented in JSON Schema")},NA=($,I,G,Z)=>{FU($,I,G,Z,"Function types cannot be represented in JSON Schema")},BA=($,I,G,Z)=>{FU($,I,G,Z,"Transforms cannot be represented in JSON Schema")},jA=($,I,G,Z)=>{FU($,I,G,Z,"Map cannot be represented in JSON Schema")},kA=($,I,G,Z)=>{FU($,I,G,Z,"Set cannot be represented in JSON Schema")},gA=($,I,G,Z)=>{let _=G,J=$._zod.def,{minimum:Y,maximum:W}=TU($);if(typeof Y==="number")_.minItems=Y;if(typeof W==="number")_.maxItems=W;_.type="array",_.items=W1(J.element,I,{...Z,path:[...Z.path,"items"]})};function hQ($){let I=$._zod.def;if(I.type==="pipe"&&I.in._zod.traits.has("$ZodTransform"))return hQ(I.out);if(I.type==="catch")return hQ(I.innerType);return $._zod.optin}var wA=($,I,G,Z)=>{let _=G,J=$._zod.def,Y=J.shape;if(Object.getOwnPropertySymbols(Y).length&&FU($,I,_,Z,"Symbol keys cannot be represented in JSON Schema"))return;_.type="object",_.properties={};for(let M in Y)jU(_.properties,M,W1(Y[M],I,{...Z,path:[...Z.path,"properties",M]}));let R=[];for(let M of Object.keys(Y)){let E=J.shape[M];if(I.io==="input"?hQ(E)===void 0:E._zod.optout===void 0)R.push(M)}if(R.length>0)_.required=R;if(J.catchall?._zod.def.type==="never")_.additionalProperties=!1;else if(!J.catchall){if(I.io==="output")_.additionalProperties=!1}else if(J.catchall)_.additionalProperties=W1(J.catchall,I,{...Z,path:[...Z.path,"additionalProperties"]})},D5=($,I,G,Z)=>{let _=$._zod.def,J=_.inclusive===!1,Y=_.options.map((W,R)=>W1(W,I,{...Z,path:[...Z.path,J?"oneOf":"anyOf",R]}));if(J)G.oneOf=Y;else G.anyOf=Y},xA=($,I,G,Z)=>{let _=$._zod.def,J=W1(_.left,I,{...Z,path:[...Z.path,"allOf",0]}),Y=W1(_.right,I,{...Z,path:[...Z.path,"allOf",1]}),W=(M)=>("allOf"in M)&&Object.keys(M).length===1,R=[...W(J)?J.allOf:[J],...W(Y)?Y.allOf:[Y]];G.allOf=R,I.intersections.push(R)},fA=($,I,G,Z)=>{let _=G,J=$._zod.def;_.type="array";let Y=I.target==="draft-2020-12"?"prefixItems":"items",W=I.target==="draft-2020-12"?"items":I.target==="openapi-3.0"?"items":"additionalItems",R=J.items.map((x,w)=>W1(x,I,{...Z,path:[...Z.path,Y,w]})),M=J.rest?W1(J.rest,I,{...Z,path:[...Z.path,W,...I.target==="openapi-3.0"?[J.items.length]:[]]}):null,E=J.items.length;while(E>0){let x=J.items[E-1];if(!(I.io==="input"?hQ(x)!==void 0:x._zod.optout==="optional"))break;E--}let T=J.items.length,S=!J.rest;if(I.target==="draft-2020-12"){if(_.prefixItems=R,S)_.items=!1;else if(M)_.items=M;if(E>0)_.minItems=E;if(S)_.maxItems=T}else if(I.target==="openapi-3.0"){if(_.items={anyOf:R},M)_.items.anyOf.push(M);if(E>0)_.minItems=E;if(S)_.maxItems=T}else{if(_.items=R,S)_.additionalItems=!1;else if(M)_.additionalItems=M;if(E>0)_.minItems=E;if(S)_.maxItems=T}let{minimum:N,maximum:B}=TU($);if(typeof N==="number")_.minItems=N;if(typeof B==="number")_.maxItems=B};function QA($,I,G){if(I.$ref){if(G.has(I))return I;G.add(I);let B=$.get(I)?.def;if(!B)return I;let x=QA($,B,G);return x===B?I:x}for(let B of["anyOf","oneOf"]){let x=I[B];if(!Array.isArray(x))continue;let w=x.map((y)=>QA($,y,G));if(w.some((y,g)=>y!==x[g]))I={...I,[B]:w}}let Z=Array.isArray(I.type)?I.type:[I.type],_=!Z.includes("string")&&Z.some((B)=>B==="number"||B==="integer"),J=I.enum??(I.const!==void 0?[I.const]:void 0);if(!_&&!J?.some((B)=>typeof B==="number"))return I;let{minimum:Y,maximum:W,exclusiveMinimum:R,exclusiveMaximum:M,multipleOf:E,format:T,id:S,...N}=I;if(N.enum)N.enum=N.enum.map((B)=>typeof B==="number"?String(B):B);else if(typeof N.const==="number")N.const=String(N.const);if(!_)return N;if(N.type="string",!J)N.pattern=(Z.includes("number")?aI:DQ).source;return N}var zA=new WeakMap;function md($){let I=new Map;for(let Z of $.seen.values())if(Z.def&&!I.has(Z.schema))I.set(Z.schema,Z);let G=new Map;for(let Z of zA.get($)??[]){let _=$.seen.get(Z),J=(_?.def??_?.schema)?.propertyNames;if(!J||J===!0||G.has(J))continue;let Y=QA(I,J,new Set);if(Y!==J)G.set(J,Y)}if(!G.size)return;for(let Z of $.seen.values())for(let _ of[Z.schema,Z.def]){let J=_&&G.get(_.propertyNames);if(J)_.propertyNames=J}}var yA=($,I,G,Z)=>{let _=G,J=$._zod.def;_.type="object";let Y=J.keyType,W=TU(Y).patterns;if(J.mode==="loose"&&W&&W.size>0){let E=W1(J.valueType,I,{...Z,path:[...Z.path,"patternProperties","*"]});_.patternProperties={};for(let T of W)jU(_.patternProperties,hj(T).source,E)}else{if(I.target==="draft-07"||I.target==="draft-2020-12"){_.propertyNames=W1(J.keyType,I,{...Z,path:[...Z.path,"propertyNames"]});let E=zA.get(I);if(!E)E=[],zA.set(I,E),I.deferred.push(()=>md(I));E.push($)}_.additionalProperties=W1(J.valueType,I,{...Z,path:[...Z.path,"additionalProperties"]})}let R=Y._zod.values,M=I.io==="input"&&hQ(J.valueType)!==void 0;if(R&&!J.partial&&!M){let E=[...R].filter((T)=>typeof T==="string"||typeof T==="number");if(E.length>0)_.required=E.map(String)}},bA=($,I,G,Z)=>{let _=$._zod.def,J=W1(_.innerType,I,Z),Y=I.seen.get($);if(I.target==="openapi-3.0")Y.ref=_.innerType,G.nullable=!0;else G.anyOf=[J,{type:"null"}]},hA=($,I,G,Z)=>{let _=$._zod.def;W1(_.innerType,I,Z);let J=I.seen.get($);J.ref=_.innerType},uA=Symbol();function uj($,I,G,Z,_){let J=!1,Y=JSON.stringify($,(W,R)=>{if(typeof R!=="bigint")return R;return J=!0,null});if(!J)return JSON.parse(Y);return FU(I,G,Z,_,"BigInt defaults cannot be represented in JSON Schema"),uA}var nA=($,I,G,Z)=>{let _=$._zod.def;W1(_.innerType,I,Z);let J=I.seen.get($);J.ref=_.innerType;let Y=uj(_.defaultValue,$,I,G,Z);if(Y!==uA)G.default=Y},pA=($,I,G,Z)=>{let _=$._zod.def;W1(_.innerType,I,Z);let J=I.seen.get($);if(J.ref=_.innerType,I.io!=="input")return;let Y=uj(_.defaultValue,$,I,G,Z);if(Y!==uA)G._prefault=Y},cA=($,I,G,Z)=>{let _=$._zod.def;W1(_.innerType,I,Z);let J=I.seen.get($);J.ref=_.innerType;let Y;try{Y=_.catchValue(void 0)}catch{FU($,I,G,Z,"Dynamic catch values are not supported in JSON Schema");return}G.default=Y},lA=($,I,G,Z)=>{let _=$._zod.def,J=_.in._zod.traits.has("$ZodTransform"),Y=I.io==="input"?J?_.out:_.in:_.out;W1(Y,I,Z);let W=I.seen.get($);W.ref=Y},mA=($,I,G,Z)=>{let _=$._zod.def;W1(_.innerType,I,Z);let J=I.seen.get($);J.ref=_.innerType,G.readOnly=!0},dA=($,I,G,Z)=>{let _=$._zod.def;W1(_.innerType,I,Z);let J=I.seen.get($);J.ref=_.innerType},K5=($,I,G,Z)=>{let _=$._zod.def;W1(_.innerType,I,Z);let J=I.seen.get($);J.ref=_.innerType},iA=($,I,G,Z)=>{let _=$._zod.innerType;W1(_,I,Z);let J=I.seen.get($);J.ref=_},L5={string:ZA,number:OA,boolean:LA,bigint:DA,symbol:KA,null:WA,undefined:HA,void:FA,never:TA,any:MA,unknown:AA,date:EA,enum:RA,literal:PA,nan:VA,template_literal:SA,file:vA,success:CA,custom:qA,function:NA,transform:BA,map:jA,set:kA,array:gA,object:wA,union:D5,intersection:xA,tuple:fA,record:yA,nullable:bA,nonoptional:hA,default:nA,prefault:pA,catch:cA,pipe:lA,readonly:mA,promise:dA,optional:K5,lazy:iA};function W5($,I){if("_idmap"in $){let Z=$,_=f2({...I,processors:L5}),J={};for(let R of Z._idmap.entries()){let[M,E]=R;W1(E,_)}let Y={},W={registry:Z,uri:I?.uri,defs:J};_.external=W;for(let R of Z._idmap.entries()){let[M,E]=R;y2(_,E),jU(Y,M,b2(_,E))}if(Object.keys(J).length>0){let R=_.target==="draft-2020-12"?"$defs":"definitions";Y.__shared={[R]:J}}return{schemas:Y}}let G=f2({...I,processors:L5});return W1($,G),y2(G,$),b2(G,$)}class oA{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";this.ctx=f2({processors:L5,target:I,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,I={path:[],schemaPath:[]}){return W1($,this.ctx,I)}emit($,I){if(I){if(I.cycles)this.ctx.cycles=I.cycles;if(I.reused)this.ctx.reused=I.reused;if(I.external)this.ctx.external=I.external}this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,y2(this.ctx,$);let G=b2(this.ctx,$),{"~standard":Z,..._}=G;return _}}var nj={};var $Y={};LU($Y,{xor:()=>y3,xid:()=>_3,void:()=>j3,uuidv7:()=>tj,uuidv6:()=>oj,uuidv4:()=>ij,uuid:()=>dj,url:()=>rj,unknown:()=>r4,union:()=>eG,undefined:()=>N3,ulid:()=>I3,uint64:()=>C3,uint32:()=>V3,tuple:()=>v7,transform:()=>n5,templateLiteral:()=>a3,symbol:()=>q3,superRefine:()=>e7,success:()=>i3,stringbool:()=>Gk,stringFormat:()=>H3,string:()=>uQ,strictObject:()=>x3,set:()=>p3,refine:()=>s7,record:()=>C7,readonly:()=>d7,promise:()=>s3,preprocess:()=>Jk,prefault:()=>b7,pipe:()=>M5,partialRecord:()=>h3,optional:()=>a4,object:()=>w3,number:()=>Z7,nullish:()=>d3,nullable:()=>nQ,null:()=>W7,nonoptional:()=>h7,never:()=>h5,nativeEnum:()=>c3,nanoid:()=>ej,nan:()=>o3,meta:()=>_k,map:()=>n3,mac:()=>Y3,looseRecord:()=>u3,looseObject:()=>f3,literal:()=>l3,lazy:()=>t7,ksuid:()=>X3,keyof:()=>g3,jwt:()=>W3,json:()=>Yk,ipv6:()=>J3,ipv4:()=>G3,invertCodec:()=>r3,intersection:()=>V7,int64:()=>v3,int32:()=>P3,int:()=>T5,instanceof:()=>Xk,iban:()=>K3,httpUrl:()=>aj,hostname:()=>F3,hex:()=>T3,hash:()=>A3,guid:()=>mj,function:()=>e3,float64:()=>R3,float32:()=>E3,file:()=>m3,exactOptional:()=>g7,enum:()=>u5,emoji:()=>sj,email:()=>lj,e164:()=>L3,discriminatedUnion:()=>b3,describe:()=>Ik,date:()=>k3,custom:()=>Uk,currencyCode:()=>M3,cuid2:()=>U3,cuid:()=>$3,creditCard:()=>D3,codec:()=>t3,cidrv6:()=>z3,cidrv4:()=>Q3,check:()=>$k,catch:()=>p7,boolean:()=>O7,bigint:()=>S3,base64url:()=>O3,base64:()=>Z3,array:()=>lQ,any:()=>B3,_function:()=>e3,_default:()=>f7,_ZodString:()=>A5,ZodXor:()=>E7,ZodXID:()=>q5,ZodVoid:()=>M7,ZodUnknown:()=>F7,ZodUnion:()=>dQ,ZodUndefined:()=>D7,ZodUUID:()=>I_,ZodURL:()=>pQ,ZodULID:()=>C5,ZodType:()=>p$,ZodTuple:()=>S7,ZodTransform:()=>k7,ZodTemplateLiteral:()=>i7,ZodSymbol:()=>L7,ZodSuccess:()=>u7,ZodStringFormat:()=>H1,ZodString:()=>tG,ZodSet:()=>N7,ZodRecord:()=>iG,ZodReadonly:()=>m7,ZodPromise:()=>r7,ZodPreprocess:()=>l7,ZodPrefault:()=>y7,ZodPipe:()=>oQ,ZodOptional:()=>iQ,ZodObject:()=>mQ,ZodNumberFormat:()=>$X,ZodNumber:()=>rG,ZodNullable:()=>w7,ZodNull:()=>K7,ZodNonOptional:()=>c5,ZodNever:()=>T7,ZodNanoID:()=>V5,ZodNaN:()=>c7,ZodMap:()=>q7,ZodMAC:()=>J7,ZodLiteral:()=>B7,ZodLazy:()=>o7,ZodKSUID:()=>N5,ZodJWT:()=>y5,ZodIntersection:()=>P7,ZodInstanceOf:()=>$E,ZodISOTime:()=>n2,ZodISODuration:()=>p2,ZodISODateTime:()=>h2,ZodISODate:()=>u2,ZodIPv6:()=>j5,ZodIPv4:()=>B5,ZodIBAN:()=>z7,ZodGUID:()=>R5,ZodFunction:()=>a7,ZodFile:()=>j7,ZodExactOptional:()=>p5,ZodEnum:()=>oG,ZodEmoji:()=>P5,ZodEmail:()=>E5,ZodE164:()=>f5,ZodDiscriminatedUnion:()=>R7,ZodDefault:()=>x7,ZodDate:()=>cQ,ZodCustomStringFormat:()=>e4,ZodCustom:()=>rQ,ZodCreditCard:()=>Q7,ZodCodec:()=>tQ,ZodCatch:()=>n7,ZodCUID2:()=>v5,ZodCUID:()=>S5,ZodCIDRv6:()=>g5,ZodCIDRv4:()=>k5,ZodBoolean:()=>aG,ZodBigIntFormat:()=>b5,ZodBigInt:()=>sG,ZodBase64URL:()=>x5,ZodBase64:()=>w5,ZodArray:()=>A7,ZodAny:()=>H7});var H5={};LU(H5,{uppercase:()=>gG,trim:()=>uG,toUpperCase:()=>pG,toLowerCase:()=>nG,startsWith:()=>xG,slugify:()=>cG,size:()=>d4,regex:()=>jG,property:()=>O5,properties:()=>yG,positive:()=>J5,overwrite:()=>FI,normalize:()=>hG,nonpositive:()=>z5,nonnegative:()=>Z5,negative:()=>Q5,multipleOf:()=>w2,minSize:()=>U_,minLength:()=>y_,mime:()=>bG,maxSize:()=>x2,maxLength:()=>i4,lte:()=>x6,lt:()=>eI,lowercase:()=>kG,length:()=>o4,includes:()=>wG,gte:()=>f6,gt:()=>$_,endsWith:()=>fG});var pj=new WeakSet([Object.prototype,Error.prototype]);function F5($,I,G){Object.defineProperty($,I,{configurable:!0,enumerable:!1,get(){let Z=G(this);return Object.defineProperty(this,I,{value:Z,configurable:!0,writable:!0}),Z},set(Z){Object.defineProperty(this,I,{value:Z,configurable:!0,writable:!0})}})}var cj=($,I)=>{nW.init($,I),$.name="ZodError";let G=Object.getPrototypeOf($);if(pj.has(G))return;pj.add(G),F5(G,"format",(Z)=>(_)=>zQ(Z,_)),F5(G,"flatten",(Z)=>(_)=>QQ(Z,_)),F5(G,"addIssue",(Z)=>(_)=>{Z.issues.push(_),Z.message=JSON.stringify(Z.issues,FG,2)}),F5(G,"addIssues",(Z)=>(_)=>{Z.issues.push(..._),Z.message=JSON.stringify(Z.issues,FG,2)}),Object.defineProperty(G,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}})},id=m0("ZodError",cj),D6=m0("ZodError",cj,void 0,{Parent:Error});var tA=EG(D6),rA=RG(D6),aA=PG(D6),sA=VG(D6),eA=sZ(D6),$7=eZ(D6),U7=$O(D6),I7=UO(D6),_7=IO(D6),X7=_O(D6),G7=XO(D6),Y7=GO(D6);function td(){if(!SU.localeError)IU(qQ())}function s4(){if(!SU.memoizer)IU({memoizer:CQ()})}var p$=m0("ZodType",($,I)=>{return td(),y$.init($,I),$.def=I,$.type=I.type,$},{check(...$){let I=this.def;return this.clone(G$.mergeDefs(I,{checks:[...I.checks??[],...$.map((G)=>typeof G==="function"?{_zod:{check:G,def:{check:"custom"},onattach:[]}}:G)]}),{parent:!0})},with(...$){return this.check(...$)},clone($,I){return D1(this,$,I)},brand(){return this},register($,I){return $.add(this,I),this},refine($,I){return this.check(s7($,I))},superRefine($,I){return this.check(e7($,I))},overwrite($){return this.check(FI($))},optional(){return a4(this)},exactOptional(){return g7(this)},nullable(){return nQ(this)},nullish(){return a4(nQ(this))},nonoptional($){return h7(this,$)},array(){return lQ(this)},or($){return eG([this,$])},and($){return V7(this,$)},transform($){return M5(this,n5($))},default($){return f7(this,$)},prefault($){return b7(this,$)},catch($){return p7(this,$)},pipe($){return M5(this,$)},readonly(){return d7(this)},describe($){let I=this.clone();return kU.add(I,{description:$}),I},meta(...$){if($.length===0)return kU.get(this);let I=this.clone();return kU.add(I,$[0]),I},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply($,...I){return I.length===0?$(this):$(this,...I)},get "~standard"(){return G$.hide(this,"~standard",{...HO(this),jsonSchema:{input:lG(this,"input"),output:lG(this,"output")}})},set "~standard"($){G$.own(this,"~standard",$)},parse:function $(I,G){return tA(this,I,G,{callee:$})},parseAsync:async function $(I,G){return await rA(this,I,G,{callee:$})},safeParse($,I){return aA(this,$,I)},async safeParseAsync($,I){return sA(this,$,I)},get spa(){return this?.safeParseAsync},set spa($){G$.own(this,"spa",$)},validate($,I){return ZQ(this,$,I)},validateAsync($,I){return OQ(this,$,I)},encode:function $(I,G){return eA(this,I,G,{callee:$})},decode:function $(I,G){return $7(this,I,G,{callee:$})},encodeAsync:async function $(I,G){return await U7(this,I,G,{callee:$})},decodeAsync:async function $(I,G){return await I7(this,I,G,{callee:$})},safeEncode($,I){return _7(this,$,I)},safeDecode($,I){return X7(this,$,I)},async safeEncodeAsync($,I){return G7(this,$,I)},async safeDecodeAsync($,I){return Y7(this,$,I)},toJSONSchema($){return JA(this,{})($)},get description(){return kU.get(this)?.description},get _def(){return this._zod.def}}),A5=m0("_ZodString",($,I)=>{n4.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>ZA($,G,Z,_)},G$.derived({format:($)=>TU($).format??null,minLength:($)=>TU($).minimum??null,maxLength:($)=>TU($).maximum??null},{regex(...$){return this.check(jG(...$))},includes(...$){return this.check(wG(...$))},startsWith(...$){return this.check(xG(...$))},endsWith(...$){return this.check(fG(...$))},min(...$){return this.check(y_(...$))},max(...$){return this.check(i4(...$))},length(...$){return this.check(o4(...$))},nonempty(...$){return this.check(y_(1,...$))},lowercase($){return this.check(kG($))},uppercase($){return this.check(gG($))},trim(){return this.check(uG())},normalize(...$){return this.check(hG(...$))},toLowerCase(){return this.check(nG())},toUpperCase(){return this.check(pG())},slugify(){return this.check(cG())}})),tG=m0("ZodString",($,I)=>{n4.init($,I),A5.init($,I)},{email($){return this.check(uO(E5,$))},url($){return this.check(gQ(pQ,$))},jwt($){return this.check(Y5(y5,$))},emoji($){return this.check(dO(P5,$))},guid($){return this.check(nO(R5,$))},uuid($){return this.check(pO(I_,$))},uuidv4($){return this.check(cO(I_,$))},uuidv6($){return this.check(lO(I_,$))},uuidv7($){return this.check(mO(I_,$))},nanoid($){return this.check(iO(V5,$))},cuid($){return this.check(oO(S5,$))},cuid2($){return this.check(tO(v5,$))},ulid($){return this.check(rO(C5,$))},base64($){return this.check(_5(w5,$))},base64url($){return this.check(X5(x5,$))},xid($){return this.check(aO(q5,$))},ksuid($){return this.check(sO(N5,$))},ipv4($){return this.check(eO(B5,$))},ipv6($){return this.check($5(j5,$))},cidrv4($){return this.check(U5(k5,$))},cidrv6($){return this.check(I5(g5,$))},e164($){return this.check(G5(f5,$))},datetime($){return this.check(wQ(h2,$))},date($){return this.check(xQ(u2,$))},time($){return this.check(fQ(n2,$))},duration($){return this.check(yQ(p2,$))}});function uQ($){return PM(tG,$)}var H1=m0("ZodStringFormat",($,I)=>{K1.init($,I),A5.init($,I)}),h2=m0("ZodISODateTime",($,I)=>{JF.init($,I),H1.init($,I)}),u2=m0("ZodISODate",($,I)=>{QF.init($,I),H1.init($,I)}),n2=m0("ZodISOTime",($,I)=>{zF.init($,I),H1.init($,I)}),p2=m0("ZodISODuration",($,I)=>{ZF.init($,I),H1.init($,I)}),E5=m0("ZodEmail",($,I)=>{rH.init($,I),H1.init($,I)});function lj($){return uO(E5,$)}var R5=m0("ZodGUID",($,I)=>{oH.init($,I),H1.init($,I)});function mj($){return nO(R5,$)}var I_=m0("ZodUUID",($,I)=>{tH.init($,I),H1.init($,I)});function dj($){return pO(I_,$)}function ij($){return cO(I_,$)}function oj($){return lO(I_,$)}function tj($){return mO(I_,$)}var pQ=m0("ZodURL",($,I)=>{eH.init($,I),H1.init($,I)});function rj($){return gQ(pQ,$)}function aj($){return gQ(pQ,{protocol:LQ,hostname:ZH,...G$.normalizeParams($)})}var P5=m0("ZodEmoji",($,I)=>{$F.init($,I),H1.init($,I)});function sj($){return dO(P5,$)}var V5=m0("ZodNanoID",($,I)=>{UF.init($,I),H1.init($,I)});function ej($){return iO(V5,$)}var S5=m0("ZodCUID",($,I)=>{IF.init($,I),H1.init($,I)});function $3($){return oO(S5,$)}var v5=m0("ZodCUID2",($,I)=>{_F.init($,I),H1.init($,I)});function U3($){return tO(v5,$)}var C5=m0("ZodULID",($,I)=>{XF.init($,I),H1.init($,I)});function I3($){return rO(C5,$)}var q5=m0("ZodXID",($,I)=>{GF.init($,I),H1.init($,I)});function _3($){return aO(q5,$)}var N5=m0("ZodKSUID",($,I)=>{YF.init($,I),H1.init($,I)});function X3($){return sO(N5,$)}var B5=m0("ZodIPv4",($,I)=>{OF.init($,I),H1.init($,I)});function G3($){return eO(B5,$)}var J7=m0("ZodMAC",($,I)=>{DF.init($,I),H1.init($,I)});function Y3($){return SM(J7,$)}var j5=m0("ZodIPv6",($,I)=>{LF.init($,I),H1.init($,I)});function J3($){return $5(j5,$)}var k5=m0("ZodCIDRv4",($,I)=>{KF.init($,I),H1.init($,I)});function Q3($){return U5(k5,$)}var g5=m0("ZodCIDRv6",($,I)=>{WF.init($,I),H1.init($,I)});function z3($){return I5(g5,$)}var w5=m0("ZodBase64",($,I)=>{HF.init($,I),H1.init($,I)});function Z3($){return _5(w5,$)}var x5=m0("ZodBase64URL",($,I)=>{FF.init($,I),H1.init($,I)});function O3($){return X5(x5,$)}var f5=m0("ZodE164",($,I)=>{TF.init($,I),H1.init($,I)});function L3($){return G5(f5,$)}var Q7=m0("ZodCreditCard",($,I)=>{MF.init($,I),H1.init($,I)});function D3($){return vM(Q7,$)}var z7=m0("ZodIBAN",($,I)=>{AF.init($,I),H1.init($,I)});function K3($){return CM(z7,$)}var y5=m0("ZodJWT",($,I)=>{EF.init($,I),H1.init($,I)});function W3($){return Y5(y5,$)}var e4=m0("ZodCustomStringFormat",($,I)=>{RF.init($,I),H1.init($,I)});function H3($,I,G={}){return t4(e4,$,I,G)}function F3($){return t4(e4,"hostname",zH,$)}function T3($){return t4(e4,"hex",VH,$)}function M3($){return t4(e4,"currency_code",LH,$)}function A3($,I){let G=I?.enc??"hex",Z=`${$}_${G}`,_=_I[Z];if(!_)throw Error(`Unrecognized hash format: ${Z}`);return t4(e4,Z,_,I)}var rG=m0("ZodNumber",($,I)=>{vO.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>OA($,G,Z,_),$.isFinite=!0},G$.derived({minValue:($)=>{let{minimum:I,exclusiveMinimum:G}=TU($);return Math.max(I??Number.NEGATIVE_INFINITY,G??Number.NEGATIVE_INFINITY)},maxValue:($)=>{let{maximum:I,exclusiveMaximum:G}=TU($);return Math.min(I??Number.POSITIVE_INFINITY,G??Number.POSITIVE_INFINITY)},isInt:($)=>{let{isInt:I,multipleOf:G}=TU($);return!!I||!!G?.some(Number.isSafeInteger)},format:($)=>TU($).format??null},{gt($,I){return this.check($_($,I))},gte($,I){return this.check(f6($,I))},min($,I){return this.check(f6($,I))},lt($,I){return this.check(eI($,I))},lte($,I){return this.check(x6($,I))},max($,I){return this.check(x6($,I))},int($){return this.check(T5($))},safe($){return this.check(T5($))},positive($){return this.check($_(0,$))},nonnegative($){return this.check(f6(0,$))},negative($){return this.check(eI(0,$))},nonpositive($){return this.check(x6(0,$))},multipleOf($,I){return this.check(w2($,I))},step($,I){return this.check(w2($,I))},finite(){return this}}));function Z7($){return NM(rG,$)}var $X=m0("ZodNumberFormat",($,I)=>{PF.init($,I),rG.init($,I)});function T5($){return jM($X,$)}function E3($){return kM($X,$)}function R3($){return gM($X,$)}function P3($){return wM($X,$)}function V3($){return xM($X,$)}var aG=m0("ZodBoolean",($,I)=>{EQ.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>LA($,G,Z,_)});function O7($){return fM(aG,$)}var sG=m0("ZodBigInt",($,I)=>{CO.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>DA($,G,Z,_)},G$.derived({minValue:($)=>TU($).minimum??null,maxValue:($)=>TU($).maximum??null,format:($)=>TU($).format??null},{gte($,I){return this.check(f6($,I))},min($,I){return this.check(f6($,I))},gt($,I){return this.check($_($,I))},lt($,I){return this.check(eI($,I))},lte($,I){return this.check(x6($,I))},max($,I){return this.check(x6($,I))},positive($){return this.check($_(BigInt(0),$))},negative($){return this.check(eI(BigInt(0),$))},nonpositive($){return this.check(x6(BigInt(0),$))},nonnegative($){return this.check(f6(BigInt(0),$))},multipleOf($,I){return this.check(w2($,I))}}));function S3($){return bM(sG,$)}var b5=m0("ZodBigIntFormat",($,I)=>{VF.init($,I),sG.init($,I)});function v3($){return uM(b5,$)}function C3($){return nM(b5,$)}var L7=m0("ZodSymbol",($,I)=>{SF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>KA($,G,Z,_)});function q3($){return pM(L7,$)}var D7=m0("ZodUndefined",($,I)=>{vF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>HA($,G,Z,_)});function N3($){return cM(D7,$)}var K7=m0("ZodNull",($,I)=>{CF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>WA($,G,Z,_)});function W7($){return lM(K7,$)}var H7=m0("ZodAny",($,I)=>{qF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>MA($,G,Z,_)});function B3(){return mM(H7)}var F7=m0("ZodUnknown",($,I)=>{NF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>AA($,G,Z,_)});function r4(){return dM(F7)}var T7=m0("ZodNever",($,I)=>{BF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>TA($,G,Z,_)});function h5($){return iM(T7,$)}var M7=m0("ZodVoid",($,I)=>{jF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>FA($,G,Z,_)});function j3($){return oM(M7,$)}var cQ=m0("ZodDate",($,I)=>{kF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>EA($,G,Z,_),$.min=(G,Z)=>$.check(f6(G,Z)),$.max=(G,Z)=>$.check(x6(G,Z))},G$.derived({minDate:($)=>{let{minimum:I}=TU($);return I?new Date(I):null},maxDate:($)=>{let{maximum:I}=TU($);return I?new Date(I):null}},{}));function k3($){return tM(cQ,$)}var A7=m0("ZodArray",($,I)=>{s4(),gF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>gA($,G,Z,_),$.element=I.element},{min($,I){return this.check(y_($,I))},nonempty($){return this.check(y_(1,$))},max($,I){return this.check(i4($,I))},length($,I){return this.check(o4($,I))},unwrap(){return this.element}});function lQ($,I){return sM(A7,$,I)}function g3($){let I=$._zod.def.shape;return u5(Object.keys(I))}var mQ=m0("ZodObject",($,I)=>{s4(),wF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>wA($,G,Z,_),G$.installLazyProp($,"shape",(G)=>G._zod.def.shape,!1)},{keyof(){return u5(Object.keys(this._zod.def.shape))},catchall($){return this.clone(G$.mergeDefs(this._zod.def,{catchall:$}))},passthrough(){return this.clone(G$.mergeDefs(this._zod.def,{catchall:r4()}))},loose(){return this.clone(G$.mergeDefs(this._zod.def,{catchall:r4()}))},strict(){return this.clone(G$.mergeDefs(this._zod.def,{catchall:h5()}))},strip(){return this.clone(G$.mergeDefs(this._zod.def,{catchall:void 0}))},extend($){return G$.extend(this,$)},safeExtend($){return G$.safeExtend(this,$)},merge($){return G$.merge(this,$)},pick($){return G$.pick(this,$)},omit($){return G$.omit(this,$)},partial(...$){return G$.partial(iQ,this,$[0])},exactPartial(...$){return G$.partial(p5,this,$[0],"exactPartial")},required(...$){return G$.required(c5,this,$[0])}});function w3($,I){let G={type:"object",shape:$??{},...G$.normalizeParams(I)};return new mQ(G)}function x3($,I){return new mQ({type:"object",shape:$,catchall:h5(),...G$.normalizeParams(I)})}function f3($,I){return new mQ({type:"object",shape:$,catchall:r4(),...G$.normalizeParams(I)})}var dQ=m0("ZodUnion",($,I)=>{RQ.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>D5($,G,Z,_),$.options=I.options});function eG($,I){return new dQ({type:"union",options:$,...G$.normalizeParams(I)})}var E7=m0("ZodXor",($,I)=>{dQ.init($,I),xF.init($,I),$._zod.processJSONSchema=(G,Z,_)=>D5($,G,Z,_),$.options=I.options});function y3($,I){return new E7({type:"union",options:$,inclusive:!1,...G$.normalizeParams(I)})}var R7=m0("ZodDiscriminatedUnion",($,I)=>{dQ.init($,I),yF.init($,I)});function b3($,I,G){return new R7({type:"union",options:I,discriminator:$,...G$.normalizeParams(G)})}var P7=m0("ZodIntersection",($,I)=>{bF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>xA($,G,Z,_)});function V7($,I){return new P7({type:"intersection",left:$,right:I})}var S7=m0("ZodTuple",($,I)=>{s4(),qO.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>fA($,G,Z,_)},{rest($){return this.clone({...this._zod.def,rest:$})},partial(){let $=this._zod.def;if($.checks?.length)throw Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...$,items:$.items.map((I)=>new iQ({type:"optional",innerType:I}))})}});function v7($,I,G){let Z=I instanceof y$,_=Z?G:I;return new S7({type:"tuple",items:$,rest:Z?I:null,...G$.normalizeParams(_)})}var iG=m0("ZodRecord",($,I)=>{s4(),hF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>yA($,G,Z,_),$.keyType=I.keyType,$.valueType=I.valueType});function C7($,I,G){if(!I||!I._zod)return new iG({type:"record",keyType:uQ(),valueType:$,...G$.normalizeParams(I)});return new iG({type:"record",keyType:$,valueType:I,...G$.normalizeParams(G)})}function h3($,I,G){return new iG({type:"record",keyType:$,valueType:I,...G$.normalizeParams(G),partial:!0})}function u3($,I,G){return new iG({type:"record",keyType:$,valueType:I,mode:"loose",...G$.normalizeParams(G)})}var q7=m0("ZodMap",($,I)=>{s4(),uF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>jA($,G,Z,_),$.keyType=I.keyType,$.valueType=I.valueType,$.min=(...G)=>$.check(U_(...G)),$.nonempty=(G)=>$.check(U_(1,G)),$.max=(...G)=>$.check(x2(...G)),$.size=(...G)=>$.check(d4(...G))});function n3($,I,G){return new q7({type:"map",keyType:$,valueType:I,...G$.normalizeParams(G)})}var N7=m0("ZodSet",($,I)=>{s4(),nF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>kA($,G,Z,_),$.min=(...G)=>$.check(U_(...G)),$.nonempty=(G)=>$.check(U_(1,G)),$.max=(...G)=>$.check(x2(...G)),$.size=(...G)=>$.check(d4(...G))});function p3($,I){return new N7({type:"set",valueType:$,...G$.normalizeParams(I)})}var oG=m0("ZodEnum",($,I)=>{pF.init($,I),p$.init($,I),$._zod.processJSONSchema=(Z,_,J)=>RA($,Z,_,J),$.enum=I.entries,$.options=[...$._zod.values];let G=new Set(Object.keys(I.entries));$.extract=(Z,_)=>{let J={};for(let Y of Z)if(G.has(Y))J[Y]=I.entries[Y];else throw Error(`Key ${Y} not found in enum`);return new oG({...I,checks:[],...G$.normalizeParams(_),entries:J})},$.exclude=(Z,_)=>{let J={...I.entries};for(let Y of Z)if(G.has(Y))delete J[Y];else throw Error(`Key ${Y} not found in enum`);return new oG({...I,checks:[],...G$.normalizeParams(_),entries:J})}});function u5($,I){let G=Array.isArray($)?Object.fromEntries($.map((Z)=>[Z,Z])):$;return new oG({type:"enum",entries:G,...G$.normalizeParams(I)})}function c3($,I){return new oG({type:"enum",entries:$,...G$.normalizeParams(I)})}var B7=m0("ZodLiteral",($,I)=>{cF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>PA($,G,Z,_),$.values=new Set(I.values),Object.defineProperty($,"value",{get(){if(I.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return I.values[0]}})});function l3($,I){return new B7({type:"literal",values:Array.isArray($)?$:[$],...G$.normalizeParams(I)})}var j7=m0("ZodFile",($,I)=>{lF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>vA($,G,Z,_),$.min=(G,Z)=>$.check(U_(G,Z)),$.max=(G,Z)=>$.check(x2(G,Z)),$.mime=(G,Z)=>$.check(bG(Array.isArray(G)?G:[G],Z))});function m3($){return eM(j7,$)}var k7=m0("ZodTransform",($,I)=>{s4(),mF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>BA($,G,Z,_),$._zod.parse=(G,Z)=>{if(Z.direction==="backward")throw new h4($.constructor.name);G.addIssue=(J)=>{if(typeof J==="string")G.issues.push(G$.issue(J,G.value,I));else{let Y=J;if(Y.fatal)Y.continue=!1;if(Y.code??(Y.code="custom"),!("input"in Y))Y.input=G.value;Y.inst??(Y.inst=$),G.issues.push(G$.issue(Y))}};let _=I.transform(G.value,G);if(_ instanceof Promise)return _.then((J)=>{return G.value=J,G});return G.value=_,G}});function n5($){return new k7({type:"transform",transform:$})}var iQ=m0("ZodOptional",($,I)=>{NO.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>K5($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function a4($){return new iQ({type:"optional",innerType:$})}var p5=m0("ZodExactOptional",($,I)=>{dF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>K5($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function g7($){return new p5({type:"optional",innerType:$})}var w7=m0("ZodNullable",($,I)=>{iF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>bA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function nQ($){return new w7({type:"nullable",innerType:$})}function d3($){return a4(nQ($))}var x7=m0("ZodDefault",($,I)=>{oF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>nA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function f7($,I){return new x7({type:"default",innerType:$,get defaultValue(){return typeof I==="function"?I():G$.shallowClone(I)}})}var y7=m0("ZodPrefault",($,I)=>{tF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>pA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function b7($,I){return new y7({type:"prefault",innerType:$,get defaultValue(){return typeof I==="function"?I():G$.shallowClone(I)}})}var c5=m0("ZodNonOptional",($,I)=>{rF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>hA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function h7($,I){return new c5({type:"nonoptional",innerType:$,...G$.normalizeParams(I)})}var u7=m0("ZodSuccess",($,I)=>{aF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>CA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function i3($){return new u7({type:"success",innerType:$})}var n7=m0("ZodCatch",($,I)=>{sF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>cA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function p7($,I){return new n7({type:"catch",innerType:$,catchValue:typeof I==="function"?I:G$.constantCatch(I)})}var c7=m0("ZodNaN",($,I)=>{eF.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>VA($,G,Z,_)});function o3($){return aM(c7,$)}var oQ=m0("ZodPipe",($,I)=>{BO.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>lA($,G,Z,_),$.in=I.in,$.out=I.out});function M5($,I){return new oQ({type:"pipe",in:$,out:I})}var tQ=m0("ZodCodec",($,I)=>{oQ.init($,I),PQ.init($,I)});function t3($,I,G){return new tQ({type:"pipe",in:$,out:I,transform:G.decode,reverseTransform:G.encode})}function r3($){let I=$._zod.def;return new tQ({type:"pipe",in:I.out,out:I.in,transform:I.reverseTransform,reverseTransform:I.transform})}var l7=m0("ZodPreprocess",($,I)=>{oQ.init($,I),$T.init($,I)}),m7=m0("ZodReadonly",($,I)=>{UT.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>mA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function d7($){return new m7({type:"readonly",innerType:$})}var i7=m0("ZodTemplateLiteral",($,I)=>{IT.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>SA($,G,Z,_)});function a3($,I){return new i7({type:"template_literal",parts:$,...G$.normalizeParams(I)})}var o7=m0("ZodLazy",($,I)=>{VQ.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>iA($,G,Z,_),$.unwrap=()=>$._zod.def.getter()});function t7($){return new o7({type:"lazy",getter:$})}var r7=m0("ZodPromise",($,I)=>{XT.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>dA($,G,Z,_),$.unwrap=()=>$._zod.def.innerType});function s3($){return new r7({type:"promise",innerType:$})}var a7=m0("ZodFunction",($,I)=>{_T.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>NA($,G,Z,_)});function e3($){return new a7({type:"function",input:Array.isArray($?.input)?v7($?.input):$?.input??lQ(r4()),output:$?.output??r4()})}var rQ=m0("ZodCustom",($,I)=>{GT.init($,I),p$.init($,I),$._zod.processJSONSchema=(G,Z,_)=>qA($,G,Z,_)});function $k($){let I=new A1({check:"custom"});return I._zod.check=$,I}function Uk($,I){return $A(rQ,$??(()=>!0),I)}function s7($,I={}){return UA(rQ,$,I)}function e7($,I){return IA($,I)}var Ik=_A,_k=XA,$E=m0("ZodInstanceOf",($,I)=>{rQ.init($,I)},{properties($,I){return this.check(yG($,I))}});function Xk($,I={}){let G=new $E({type:"custom",check:"custom",fn:(Z)=>Z instanceof $,abort:!0,...G$.normalizeParams(I)});return G._zod.bag.Class=$,G._zod.check=(Z)=>{if(!(Z.value instanceof $))Z.issues.push({code:"invalid_type",expected:$.name,input:Z.value,inst:G,path:[...G._zod.def.path??[]]})},G}var Gk=(...$)=>GA({Codec:tQ,Boolean:aG,String:tG},...$);function Yk($){let I=t7(()=>{return eG([uQ($),Z7(),O7(),W7(),lQ(I),C7(uQ(),I)])});return I}function Jk($,I){return new l7({type:"pipe",in:n5($),out:I})}var rd={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function ad($){IU({customError:$})}function sd(){return IU().customError}var UE;(function($){})(UE||(UE={}));var aQ={};LU(aQ,{time:()=>Ui,duration:()=>Ii,datetime:()=>ed,date:()=>$i,ZodISOTime:()=>n2,ZodISODuration:()=>p2,ZodISODateTime:()=>h2,ZodISODate:()=>u2});function ed($){return wQ(h2,$)}function $i($){return xQ(u2,$)}function Ui($){return fQ(n2,$)}function Ii($){return yQ(p2,$)}var R$={...$Y,...H5,iso:aQ},_i=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Xi($,I){let G=$.$schema;if(G==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(G==="http://json-schema.org/draft-07/schema#")return"draft-7";if(G==="http://json-schema.org/draft-04/schema#")return"draft-4";return I??"draft-2020-12"}function Qk($,I){return $.map((G,Z)=>Z<I?G:G.optional())}function Gi($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}function Yi($,I){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let G=$.slice(1).split("/").filter(Boolean);if(G.length===0)return I.rootSchema;let Z=I.version==="draft-2020-12"?"$defs":"definitions";if(G[0]===Z){let _=G[1]===void 0?void 0:Gi(G[1]);if(!_||!I.defs[_])throw Error(`Reference not found: ${$}`);return I.defs[_]}throw Error(`Reference not found: ${$}`)}function Ji($,I){return R$.transform((Z)=>Z).check((Z)=>{let _=Z.value;if(typeof _!=="object"||_===null||Array.isArray(_))return;let J=Object.getOwnPropertyNames(_);if(I.minProperties!==void 0&&J.length<I.minProperties)Z.issues.push({origin:"object",code:"too_small",minimum:I.minProperties,inclusive:!0,message:`Too small: expected object to have >=${I.minProperties} properties`,input:_,inst:$,continue:!0});if(I.maxProperties!==void 0&&J.length>I.maxProperties)Z.issues.push({origin:"object",code:"too_big",maximum:I.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${I.maxProperties} properties`,input:_,inst:$,continue:!0});if(I.keySchema)for(let Y of J){let W=I.keySchema.safeParse(Y);if(W.success)continue;Z.issues.push({code:"invalid_key",origin:"record",issues:W.error.issues,input:Y,path:[Y],continue:!0})}}).pipe($)}function IE($,I){if($===null)return"z";let G=typeof $;if(G!=="object"){if(G==="number"&&Number.isNaN($))return null;let Z=String($);return`${G[0]}${Z.length}:${Z}`}if(I.has($))return null;I.add($);try{if(Array.isArray($)){let J=[];for(let Y of $){let W=IE(Y,I);if(W===null)return null;J.push(W)}return`a${J.length}:[${J.join(",")}]`}let Z=Object.keys($).sort(),_=[];for(let J of Z){let Y=IE($[J],I);if(Y===null)return null;_.push(`${J.length}:${J}=${Y}`)}return`o${_.length}:{${_.join(",")}}`}finally{I.delete($)}}var Qi=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),zi=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function sQ($){if(typeof $!=="object"||$===null)return!1;if(Array.isArray($))return $.some(sQ);if(typeof $.$ref==="string")return!0;return Object.entries($).some(([I,G])=>{if(Qi.has(I))return sQ(G);if(!zi.has(I)||typeof G!=="object"||G===null)return!1;return Object.values(G).some(sQ)})}function zk($){return $===1?"element":"elements"}function Zi($,I){return R$.transform((Z)=>Z).check((Z)=>{let _=Z.value;if(!Array.isArray(_))return;if(I.uniqueItems===!0){let J=new Map;for(let Y=0;Y<_.length;Y++){let W=IE(_[Y],new Set);if(W===null)continue;let R=J.get(W);if(R===void 0){J.set(W,Y);continue}Z.issues.push({code:"custom",message:`Array items must be unique: element at index ${Y} duplicates the one at index ${R}`,input:_,path:[Y],continue:!0})}}if(I.containsSchema){let J=I.minContains??1,Y=I.maxContains!==void 0?I.maxContains+1:Number.POSITIVE_INFINITY,W=0;for(let R of _)if(I.containsSchema.safeParse(R).success&&++W>=Y)break;if(W<J)Z.issues.push({code:"custom",message:`Array must contain at least ${J} matching ${zk(J)}; found ${W}`,input:_,continue:!0});if(I.maxContains!==void 0&&W>I.maxContains)Z.issues.push({code:"custom",message:`Array must contain at most ${I.maxContains} matching ${zk(I.maxContains)}`,input:_,continue:!0})}}).pipe($)}function Zk($,I){if($===!1)return;if($===void 0||$===!0)return R$.any();return eU($,I)}var Oi=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function Ok($,I){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return R$.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let _=$.$ref;if(I.refs.has(_))return I.refs.get(_);if(I.processing.has(_))return R$.lazy(()=>{if(!I.refs.has(_))throw Error(`Circular reference not resolved: ${_}`);return I.refs.get(_)});I.processing.add(_);let J=Yi(_,I),Y=eU(J,I);return I.refs.set(_,Y),I.processing.delete(_),Y}if($.enum!==void 0){let _=$.enum;if(I.version==="openapi-3.0"&&$.nullable===!0&&_.length===1&&_[0]===null)return R$.null();if(_.length===0)return R$.never();if(_.length===1)return R$.literal(_[0]);if(_.every((Y)=>typeof Y==="string"))return R$.enum(_);let J=_.map((Y)=>R$.literal(Y));if(J.length<2)return J[0];return R$.union([J[0],J[1],...J.slice(2)])}if($.const!==void 0)return R$.literal($.const);let G=$.type;if(Array.isArray(G)){let _=G.map((J)=>{let Y={...$,type:J};return Ok(Y,I)});if(_.length===0)return R$.never();if(_.length===1)return _[0];return R$.union(_)}if(!G)return R$.any();let Z;switch(G){case"string":{let _=R$.string();if($.format){let J=$.format;if(J==="email")_=_.check(R$.email());else if(J==="uri"||J==="uri-reference")_=_.check(R$.url());else if(J==="uuid"||J==="guid")_=_.check(R$.uuid());else if(J==="date-time")_=_.check(R$.iso.datetime({offset:!0}));else if(J==="date")_=_.check(R$.iso.date());else if(J==="time")_=_.check(R$.regex(Oi));else if(J==="duration")_=_.check(R$.iso.duration());else if(J==="hostname")_=_.check(R$.hostname());else if(J==="ipv4")_=_.check(R$.ipv4());else if(J==="ipv6")_=_.check(R$.ipv6());else if(J==="mac")_=_.check(R$.mac());else if(J==="cidr")_=_.check(R$.cidrv4());else if(J==="cidr-v6")_=_.check(R$.cidrv6());else if(J==="base64")_=_.check(R$.base64());else if(J==="base64url")_=_.check(R$.base64url());else if(J==="e164")_=_.check(R$.e164());else if(J==="credit_card")_=_.check(R$.creditCard());else if(J==="iban")_=_.check(R$.iban());else if(J==="jwt")_=_.check(R$.jwt());else if(J==="emoji")_=_.check(R$.emoji());else if(J==="nanoid")_=_.check(R$.nanoid());else if(J==="cuid")_=_.check(R$.cuid());else if(J==="cuid2")_=_.check(R$.cuid2());else if(J==="ulid")_=_.check(R$.ulid());else if(J==="xid")_=_.check(R$.xid());else if(J==="ksuid")_=_.check(R$.ksuid())}if(typeof $.minLength==="number")_=_.min($.minLength);if(typeof $.maxLength==="number")_=_.max($.maxLength);if($.pattern)_=_.regex(new RegExp($.pattern));Z=_;break}case"number":case"integer":{let _=G==="integer"?R$.number().int():R$.number();if(typeof $.minimum==="number"&&$.exclusiveMinimum!==!0)_=_.min($.minimum);if(typeof $.maximum==="number"&&$.exclusiveMaximum!==!0)_=_.max($.maximum);if(typeof $.exclusiveMinimum==="number")_=_.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")_=_.gt($.minimum);if(typeof $.exclusiveMaximum==="number")_=_.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")_=_.lt($.maximum);if(typeof $.multipleOf==="number")_=_.multipleOf($.multipleOf);Z=_;break}case"boolean":{Z=R$.boolean();break}case"null":{Z=R$.null();break}case"object":{let _={},J=$.properties||{},Y=new Set($.required||[]),W=typeof $.additionalProperties==="object"?eU($.additionalProperties,I):void 0;for(let[T,S]of Object.entries(J)){let N=eU(S,I);jU(_,T,Y.has(T)?N:N.optional())}if($.patternProperties){let T=$.patternProperties,S=Object.keys(T),N=[];for(let x of S){let w=eU(T[x],I),y=R$.string().regex(new RegExp(x));N.push(R$.looseRecord(y,w))}let B=[];if(Object.keys(_).length>0)B.push(R$.object(_).passthrough());if(B.push(...N),B.length===0)Z=R$.object({}).passthrough();else if(B.length===1)Z=B[0];else{let x=R$.intersection(B[0],B[1]);for(let w=2;w<B.length;w++)x=R$.intersection(x,B[w]);Z=x}if($.additionalProperties===!1){let x=Object.keys(_),w=S.map((g)=>new RegExp(g)),y=Z;Z=Z.check((g)=>{if(!UI(g.value))return;let b=[];for(let l of Object.keys(g.value)){if(x.includes(l))continue;if(w.some((i)=>i.test(l)))continue;b.push(l)}if(b.length)g.issues.push({code:"unrecognized_keys",keys:b,input:g.value,inst:y})})}}else{let T=R$.object(_);if($.additionalProperties===!1)Z=T.strict();else if(W)Z=T.catchall(W);else Z=T.passthrough()}let R=$.propertyNames!==void 0&&$.propertyNames!==!0,M=typeof $.minProperties==="number"?$.minProperties:void 0,E=typeof $.maxProperties==="number"?$.maxProperties:void 0;if(R||M!==void 0||E!==void 0){let T;if(R){let S=typeof $.propertyNames==="object"&&$.propertyNames.type===void 0?{type:"string",...$.propertyNames}:$.propertyNames;T=eU(S,I)}Z=Ji(Z,{keySchema:T,minProperties:M,maxProperties:E})}break}case"array":{let{prefixItems:_,items:J}=$;if(_&&Array.isArray(_)){let Y=typeof $.minItems==="number"?$.minItems:0,W=_.map((T)=>eU(T,I)),R=Qk(W,Y),M=!Array.isArray(J)?Zk(J,I):void 0,E=R$.tuple(R);if(Z=M?E.rest(M):E,typeof $.minItems==="number")Z=Z.check(R$.minLength($.minItems));if(typeof $.maxItems==="number")Z=Z.check(R$.maxLength($.maxItems))}else if(Array.isArray(J)){let Y=typeof $.minItems==="number"?$.minItems:0,W=J.map((T)=>eU(T,I)),R=Qk(W,Y),M=Zk($.additionalItems,I),E=R$.tuple(R);if(Z=M?E.rest(M):E,typeof $.minItems==="number")Z=Z.check(R$.minLength($.minItems));if(typeof $.maxItems==="number")Z=Z.check(R$.maxLength($.maxItems))}else if(J!==void 0){let Y=eU(J,I),W=R$.array(Y);if(typeof $.minItems==="number")W=W.min($.minItems);if(typeof $.maxItems==="number")W=W.max($.maxItems);Z=W}else Z=R$.array(R$.any());if($.uniqueItems===!0||$.contains!==void 0)Z=Zi(Z,{uniqueItems:$.uniqueItems===!0,containsSchema:$.contains!==void 0?eU($.contains,I):void 0,minContains:typeof $.minContains==="number"?$.minContains:void 0,maxContains:typeof $.maxContains==="number"?$.maxContains:void 0});break}default:throw Error(`Unsupported type: ${G}`)}return Z}function eU($,I){if(typeof $==="boolean")return $?R$.any():R$.never();let G=Ok($,I),Z=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let W=$.anyOf.map((M)=>eU(M,I)),R=R$.union(W);G=Z?R$.intersection(G,R):R}if($.oneOf&&Array.isArray($.oneOf)){let W=$.oneOf.map((M)=>eU(M,I)),R=R$.xor(W);G=Z?R$.intersection(G,R):R}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)G=Z?G:R$.any();else{let W=Z?G:eU($.allOf[0],I),R=Z?0:1;for(let M=R;M<$.allOf.length;M++)W=R$.intersection(W,eU($.allOf[M],I));G=W}if($.nullable===!0&&I.version==="openapi-3.0")G=R$.nullable(G);if($.readOnly===!0)G=R$.readonly(G);if($.default!==void 0)G=G.default($.default);let _={},J=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let W of J)if(W in $)_[W]=$[W];let Y=["contentEncoding","contentMediaType","contentSchema"];for(let W of Y)if(W in $)_[W]=$[W];if($.type==="object"&&$.$ref===void 0){if($.propertyNames!==void 0&&!sQ($.propertyNames))_.propertyNames=$.propertyNames;for(let W of["minProperties","maxProperties"])if($[W]!==void 0)_[W]=$[W]}if($.type==="array"&&$.$ref===void 0){if($.contains!==void 0&&!sQ($.contains))_.contains=$.contains;for(let W of["uniqueItems","minContains","maxContains"])if($[W]!==void 0)_[W]=$[W]}for(let W of Object.keys($))if(!_i.has(W))jU(_,W,$[W]);if(Object.keys(_).length>0)I.registry.add(G,_);if($.description)G=G.describe($.description);return G}function Lk($,I){if(typeof $==="boolean")return $?R$.any():R$.never();let G;try{G=JSON.parse(JSON.stringify($))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let Z=Xi(G,I?.defaultTarget),_=G.$defs||G.definitions||{},J={version:Z,defs:_,refs:new Map,processing:new Set,rootSchema:G,registry:I?.registry??kU};return eU(G,J)}var Dk=Symbol("z.visit/resolving");function eQ($,I){let G=typeof I==="function"?I:(Y,W)=>{let R=I[Y._zod.def.type];return R?R(Y,W):Y},Z=new Map;function _(Y){let W=Z.get(Y);if(W===Dk)return new VQ({type:"lazy",getter:()=>Z.get(Y)});if(W!==void 0)return W;Z.set(Y,Dk);let R=J(Y),M=G(R,R!==Y);return Z.set(Y,M),M}function J(Y){let W=Y._zod.def,R=W.type;switch(R){case"object":{let M=W.shape,E=Object.keys(M),T=!1,S={};for(let B of E){let x=_(M[B]);if(x!==M[B])T=!0;S[B]=x}let N=W.catchall;if(W.catchall){if(N=_(W.catchall),N!==W.catchall)T=!0}return T?D1(Y,{...W,shape:S,catchall:N}):Y}case"array":{let M=_(W.element);return M===W.element?Y:D1(Y,{...W,element:M})}case"tuple":{let M=W.items,E=!1,T=[];for(let N of M){let B=_(N);if(B!==N)E=!0;T.push(B)}let S=W.rest;if(W.rest){if(S=_(W.rest),S!==W.rest)E=!0}return E?D1(Y,{...W,items:T,rest:S}):Y}case"record":case"map":{let M=_(W.keyType),E=_(W.valueType);return M===W.keyType&&E===W.valueType?Y:D1(Y,{...W,keyType:M,valueType:E})}case"set":{let M=_(W.valueType);return M===W.valueType?Y:D1(Y,{...W,valueType:M})}case"union":{let M=W.options,E=!1,T=[];for(let S of M){let N=_(S);if(N!==S)E=!0;T.push(N)}return E?D1(Y,{...W,options:T}):Y}case"intersection":{let M=_(W.left),E=_(W.right);return M===W.left&&E===W.right?Y:D1(Y,{...W,left:M,right:E})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let M=_(W.innerType);return M===W.innerType?Y:D1(Y,{...W,innerType:M})}case"pipe":{let M=_(W.in),E=_(W.out);return M===W.in&&E===W.out?Y:D1(Y,{...W,in:M,out:E})}case"function":{let M=_(W.input),E=_(W.output);return M===W.input&&E===W.output?Y:D1(Y,{...W,input:M,output:E})}case"lazy":{let M=W.getter,{_cachedInner:E,...T}=W;return D1(Y,{...T,getter:()=>_(M())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return Y;default:return Y}}return _($)}function Kk($){return eQ($,{object:(I)=>I.partial(),union:(I)=>{let G=I._zod.def;return G.discriminator===void 0?I:eG(G.options)}})}function Li($,I){if(!I?.length)return $;let G=$._zod.def;return D1($,HI(G,{checks:[...G.checks??[],...I]}),{parent:!0})}function Wk($){return Li($.out,$.checks)}function Di($){return $.in._zod.traits.has("$ZodTransform")?Wk($):$.in}function Hk($){return eQ($,{pipe:(I)=>Di(I._zod.def),default:(I,G)=>G?a4(I._zod.def.innerType):I,catch:(I,G)=>G?I._zod.def.innerType:I})}function Fk($){return eQ($,{pipe:(I)=>Wk(I._zod.def),prefault:(I,G)=>G?I._zod.def.innerType:I})}var _E={};LU(_E,{string:()=>Ki,number:()=>Wi,date:()=>Ti,boolean:()=>Hi,bigint:()=>Fi});function Ki($){return VM(tG,$)}function Wi($){return BM(rG,$)}function Hi($){return yM(aG,$)}function Fi($){return hM(sG,$)}function Ti($){return rM(cQ,$)}var Tk=f$.object({id:f$.string().min(1).optional(),name:f$.string().min(1).optional(),kind:f$.enum(["human","agent","bot","system"])}),Mk=f$.object({type:f$.string().min(1),id:f$.string().min(1)}),Ak=f$.object({provider:f$.string().min(1),id:f$.string().min(1).optional(),url:f$.string().min(1).optional(),cursor:f$.string().min(1).optional(),rawRef:f$.string().min(1).optional()}),XE=f$.object({id:f$.string().min(1),service:f$.string().min(1),type:f$.string().min(1),schemaVersion:f$.number().int().positive(),idempotencyKey:f$.string().min(1),occurredAt:f$.string().min(1),observedAt:f$.string().min(1),origin:f$.enum(["virtual","external","agent","connector","replay","migration"]),actor:Tk.optional(),subject:Mk,causationId:f$.string().min(1).optional(),correlationId:f$.string().min(1).optional(),external:Ak.optional(),data:f$.record(f$.string(),f$.unknown()),raw:f$.record(f$.string(),f$.unknown()).optional()}),Ek=f$.object({version:f$.literal(1),service:f$.string().min(1),rebuiltAt:f$.string().min(1),eventCount:f$.number().int().nonnegative(),latestEventId:f$.string().min(1).optional(),subjects:f$.record(f$.string(),f$.object({type:f$.string().min(1),id:f$.string().min(1),latestEventId:f$.string().min(1),latestType:f$.string().min(1),updatedAt:f$.string().min(1)}))});function Rk($){return $I($||process.env.PROJECT_ROOT||process.cwd())}function pZ(){let $=process.env.VOLTER_STATE_DIR||".volter";if(j2($)||$.split(/[\\/]/).includes(".."))throw Error("VOLTER_STATE_DIR must be a relative directory without .. segments");return $}function l5($){return G1(Rk($),pZ(),"world")}function Ei($){if(!/^[A-Za-z0-9_-]+$/.test($))throw Error(`Invalid world service name: ${$}`);return $}var GE;function Pk($){let I=GE;return GE=$,I}var Ri=0;function g6($,I){let G=Ei($);if(Ri===0)GE?.(G,I);let Z=Rk(I),_=G1(l5(I),G);return{root:Z,service:G,dir:_,events:G1(_,"events.jsonl"),state:G1(_,"state.json"),resources:G1(_,"resources"),cursors:G1(_,"cursors"),ingests:G1(_,"ingests"),eventQueue:G1(_,"event-queue.jsonl")}}var Pi={windowMs:60000,ceiling:60,defaultWeight:2,maxRetryAfterSeconds:300,rules:[],reason:"no pack declared a budget for this vendor — this is the conservative fallback (30 calls/min at "+"the default weight), not a considered limit. Declare one on the pack with the vendor's real limits."};DU();var Vk="2.0",qi=Number(Vk.split(".")[0]);var ki=J6(vk(),1);d1();DU();var{AsyncLocalStorage:nI0}=(()=>({}));DU();var{AsyncLocalStorage:kI0}=(()=>({}));var gI0="0".repeat(32),wI0="0".repeat(16);var{AsyncLocalStorage:Yo}=(()=>({}));var di;function jk($){di=$}var QE="/__volter/world-boot";var{chmodSync:Z_0,existsSync:O_0,mkdirSync:L_0,readFileSync:D_0,writeFileSync:K_0}=(()=>({}));DU();d1();DU();var Jo=1e6,Qo=/(?:^|[-_.])(?:auth|authorization|token|jwt|key|apikey|secret|credential|credentials|signature|sig|password|passwd|pwd|session|sessionid|cookie|access[-_]?token|refresh[-_]?token)(?:[-_.]|$)/i,zo=/^(Bearer|Basic|Digest|Token|Negotiate|NTLM|OAuth|Signature|Hawk|AWS4-HMAC-SHA256|SharedKey|SharedKeyLite|GoogleLogin)\s+(\S[\s\S]*)$/i;function wk($){return`sha256:${j6("sha256").update($,"utf8").digest("hex").slice(0,16)}`}function Zo($,I,G){let Z=zo.exec(I);if(!Z&&!Qo.test($))return;let _=$.toLowerCase();if(I==="")return{name:_,in:G,empty:!0};if(Z)return{name:_,in:G,scheme:Z[1],fp:wk(Z[2])};return{name:_,in:G,fp:wk(I)}}function hk($,I){let G=[],Z=new Set,_=(J,Y,W)=>{let R=Zo(J,Y,W);if(!R)return;let M=`${R.in}:${R.name}`;if(Z.has(M))return;Z.add(M),G.push(R)};try{if(typeof $.forEach==="function")$.forEach((J,Y)=>_(Y,J,"header"));else for(let[J,Y]of Object.entries($))_(J,String(Y),"header")}catch{}try{if(I!==void 0){let J=typeof I==="string"?new URL(I,"http://twin.invalid").search:I.search;for(let[Y,W]of new URLSearchParams(J))_(Y,W,"query")}}catch{}return G.sort((J,Y)=>J.in===Y.in?J.name.localeCompare(Y.name):J.in.localeCompare(Y.in))}function OE($=process.env){return $.VOLTER_TWIN_REQUEST_JOURNAL!=="0"}function uk($,I){return G1(i1(g6($,I).events),"requests.jsonl")}function nk($,I,G){if(!OE())return;try{let Z=fU(),_=uk($,G);if(Z.mkdir(i1(_)),(Z.stat(_)?.size??0)>=Jo)Z.writeAtomic(`${_}.1`,Z.read(_)??""),Z.write(_,"");let Y=JSON.stringify({at:I.at??new Date().toISOString(),method:I.method.toUpperCase(),path:I.path.split("?")[0],status:I.status,...typeof I.ms==="number"?{ms:I.ms}:{},...I.credentials?.length?{credentials:I.credentials}:{}});Z.append(_,`${Y}
388
388
  `)}catch{}}var pk=Symbol.for("volter.twin.requestJournal.identity"),xk=Symbol.for("volter.twin.requestJournal.installed"),zE;function Oo(){return zE??=new Yo,zE}function Lo(){Pk(($,I)=>{let G=zE?.getStore();if(!G||G.identity!==void 0)return;G.identity=I===void 0?{service:$}:{service:$,root:I}})}function Do($=process.argv){let I=$.indexOf("--root"),G=I>=0?$[I+1]:void 0;return G&&!G.startsWith("--")?G:void 0}var Ko=new Set(["world-runtime","world-tooling","world-attach","world-browser-assets","world-host"]);function fk($){if(!$)return;let I=/(?:packages[\\/]twin[\\/]|@volter[\\/]twin-)([A-Za-z0-9_-]+)/g;for(let G of $.matchAll(I)){let Z=G[1];if(!Ko.has(Z))return Z}return}function Wo(){if(typeof window<"u"||typeof document<"u")return!1;let $=globalThis.Bun,I=$&&typeof $.serve==="function"?$.serve:void 0;if(I&&I[xk])return!0;if(Lo(),jk((Z)=>yk(Z,fk(Error().stack))),!I)return!1;let G=function(_,...J){let Y=_;if(!Y||typeof Y.fetch!=="function")return I.apply(this,[_,...J]);let W=Y[pk]?void 0:fk(Error().stack);return I.apply(this,[{...Y,fetch:yk(Y,W)},...J])};return Object.defineProperty(G,xk,{value:!0}),$.serve=G,!0}function yk($,I){if($.twinRequestJournal===!1)return $.fetch;{let Z=$[pk],_=$.fetch;return async function(Y,W){if(!OE()||new URL(Y.url).pathname===QE)return _.call(this,Y,W);let R={},M=500,E=Date.now();try{let T=await Oo().run(R,()=>_.call(this,Y,W));if(T instanceof Response)M=T.status;else if(T===void 0)return T;return T}finally{Z??=R.identity;let T=Z??Ho(I);if(T){let S=new URL(Y.url);nk(T.service,{method:Y.method,path:S.pathname,status:M,ms:Date.now()-E,credentials:hk(Y.headers,S)},T.root)}}}}}function Ho($){let I=process.env.VOLTER_TWIN_JOURNAL_SERVICE||$;if(!I||!/^[A-Za-z0-9_-]+$/.test(I))return;let G=Do();return G===void 0?{service:I}:{service:I,root:G}}Wo();d1();var a_0=Symbol("absent");DU();d1();DU();var{closeSync:jo,existsSync:_z,mkdirSync:ko,openSync:go,readdirSync:wo,readFileSync:xo,readSync:fo,renameSync:yo,rmSync:$g,statSync:WE,writeFileSync:bo}=(()=>({}));d1();DU();var{closeSync:DE,constants:UX,fstatSync:ok,ftruncateSync:Vo,linkSync:So,lstatSync:LE,mkdirSync:vo,openSync:KE,readFileSync:Co,readSync:mk,rmSync:qo,writeFileSync:No}=(()=>({}));var tk=131072,rk=32,ak=4;function sk($){return $.isFile()&&$.nlink===1&&(!process.getuid||$.uid===process.getuid())&&($.mode&63)===0}function dk($){try{let I=LE($);return I.isDirectory()&&(I.mode&63)===0&&(!process.getuid||I.uid===process.getuid())}catch{return!1}}function ik($){let I;try{I=KE($,UX.O_RDONLY|UX.O_NONBLOCK|(UX.O_NOFOLLOW??0));let G=ok(I);if(!sk(G)||G.size>tk)return{};let Z=JSON.parse(Co(I,"utf8"));if(!Z||typeof Z!=="object"||Array.isArray(Z))return{};let _={};for(let[J,Y]of Object.entries(Z).slice(-rk)){if(!/^\d+:[a-f0-9]{64}$/.test(J)||!Array.isArray(Y))continue;_[J]=Y.filter((W)=>typeof W==="string"&&W.length<=4096&&j2(W)).slice(0,ak)}return _}catch{return{}}finally{if(I!==void 0)DE(I)}}function Bo($,I){let G=KE($,"r");try{let Z=j6("sha256"),_=Buffer.allocUnsafe(65536),J=I;while(J>0){let Y=mk(G,_,0,Math.min(_.length,J),null);if(!Y)return null;Z.update(_.subarray(0,Y)),J-=Y}if(mk(G,_,0,1,null))return null;return Z.digest("hex")}finally{DE(G)}}function ek($,I,G){let Z=G1($,`${G.slice(0,2)}.json`),_=`${I}:${G}`;return{reuse(J,Y){if(!dk($))return!1;for(let W of ik(Z)[_]??[]){try{let R=LE(W);if(!R.isFile()||R.dev!==I||R.size!==Y||process.getuid&&R.uid!==process.getuid())continue;So(W,J);let M=LE(J);if(M.isFile()&&M.dev===I&&M.size===Y&&(!process.getuid||M.uid===process.getuid())&&Bo(J,Y)===G)return!0}catch{}qo(J,{force:!0})}return!1},record(J){try{let Y=$I(J);if(Y.length>4096)return;let W=ik(Z),R=[Y,...(W[_]??[]).filter((T)=>T!==Y)].slice(0,ak);delete W[_],W[_]=R;let M=JSON.stringify(W);while(Object.keys(W).length>rk||Buffer.byteLength(M)>tk)delete W[Object.keys(W)[0]],M=JSON.stringify(W);if(vo($,{recursive:!0,mode:448}),!dk($))return;let E=KE(Z,UX.O_WRONLY|UX.O_CREAT|UX.O_NONBLOCK|(UX.O_NOFOLLOW??0),384);try{if(!sk(ok(E)))return;Vo(E,0),No(E,M)}finally{DE(E)}}catch{}}}}class HE{options;constructor($={}){this.options=$}async get($){if(!_z($))return null;return new Uint8Array(xo($))}async put($,I){ko(i1($),{recursive:!0});let G=`${$}.tmp.${LG()}`,Z;try{if(this.options.sharedIndexRoot!==!1)try{Z=ek(this.options.sharedIndexRoot??G1(tJ(),"blob-index-v1"),WE(i1($)).dev,Ug(I))}catch{}if(!Z?.reuse(G,I.byteLength))bo(G,I,{flag:"wx"});yo(G,$),Z?.record($)}finally{$g(G,{force:!0})}}async exists($){return _z($)}async remove($){$g($,{force:!0,recursive:$.endsWith("/")})}async list($){let I=[],G=(Z)=>{if(!_z(Z))return;for(let _ of wo(Z,{withFileTypes:!0})){let J=G1(Z,_.name);if(_.isDirectory())G(J);else if(!_.name.includes(".tmp."))I.push(J)}};return G($.replace(/\/$/,"")),I.sort()}async size($){if(!_z($))return null;return WE($).size}async getRange($,I,G){if(!_z($))return null;let Z=WE($).size,_=Math.max(0,I),J=Math.min(G,Z-1);if(J<_)return new Uint8Array(0);let Y=new Uint8Array(J-_+1),W=go($,"r"),R=0;try{while(R<Y.length){let M=fo(W,Y,R,Y.length-R,_+R);if(M===0)break;R+=M}}finally{jo(W)}return R===Y.length?Y:Y.subarray(0,R)}}function Ug($){return j6("sha256").update($).digest("hex")}var W20=new HE;Xz();CE();DU();d1();var{existsSync:l20,readFileSync:m20,statSync:d20}=(()=>({}));class qt{buf=new Uint8Array(65536);len=0;push($){if(this.len===this.buf.length){let I=new Uint8Array(this.buf.length*2);I.set(this.buf),this.buf=I}this.buf[this.len++]=$}copy($,I){if($>this.len)throw Error("inflate: distance too far back");for(let G=0;G<I;G++)this.push(this.buf[this.len-$])}bytes(){return this.buf.slice(0,this.len)}}var D40="0".repeat(40),K40=new Uint8Array([48,48,48,48]);var{AsyncLocalStorage:C40}=(()=>({}));var{AsyncLocalStorage:g40}=(()=>({}));var{existsSync:f40,readFileSync:y40,statSync:b40}=(()=>({}));var{existsSync:n40,readFileSync:p40}=(()=>({}));DU();var{existsSync:m40}=(()=>({}));DU();var vg="twin-org",Cg="twin-project";var Rw=J6(Ew(),1),Xs=J6(zz(),1);function Pw($){let I=String($??"").toLowerCase();if(I==="fatal"||I==="error"||I==="warning"||I==="info"||I==="debug")return I;return"muted"}function Vw($){let I=String($??"").toLowerCase();if(I==="resolved")return"resolved";if(I==="ignored"||I==="muted")return"ignored";if(I==="unresolved")return"unresolved";return"muted"}function cE($){let I=Number($);if(!Number.isFinite(I))return"0";if(I>=1e6)return`${(I/1e6).toFixed(1).replace(/\.0$/,"")}M`;if(I>=1000)return`${(I/1000).toFixed(1).replace(/\.0$/,"")}k`;return String(Math.trunc(I))}function Zz($,I=Date.now()){if(typeof $!=="string"||!$)return"—";let G=Date.parse($);if(Number.isNaN(G))return"—";let Z=Math.max(0,Math.floor((I-G)/1000));if(Z<60)return`${Z}s ago`;if(Z<3600)return`${Math.floor(Z/60)}m ago`;if(Z<86400)return`${Math.floor(Z/3600)}h ago`;return`${Math.floor(Z/86400)}d ago`}function Sw($){if(!$||typeof $!=="object")return[];let I=$.entries;if(!Array.isArray(I))return[];let G=I.find((Y)=>Y&&typeof Y==="object"&&Y.type==="exception"),Z=G&&G.data?.values;if(!Array.isArray(Z))return[];let J=Z[Z.length-1]?.stacktrace?.frames;return Array.isArray(J)?J:[]}function vw($){if(!$||typeof $!=="object")return[];let I=$.tags;if(!Array.isArray(I))return[];return I.filter((G)=>G&&typeof G==="object").map((G)=>({key:String(G.key),value:String(G.value)}))}var TI=vg,XX=Cg;var r0=J6(lE(),1),Ys=typeof document>"u"||document.querySelector("base[href]")===null?"":new URL(".",document.baseURI).pathname.replace(/\/$/,""),Js=[{key:"issues",label:"Issues"},{key:"dashboards",label:"Dashboards"},{key:"discover",label:"Discover"},{key:"releases",label:"Releases"},{key:"projects",label:"Projects"},{key:"alerts",label:"Alerts"},{key:"settings",label:"Settings"}];async function X_($){let I=await fetch(`${Ys}/api/0${$}`);try{return await I.json()}catch{return null}}function Qs({level:$}){return r0.jsxDEV("span",{className:`pill level-${Pw($)}`,children:String($??"").toUpperCase()||"—"},void 0,!1,void 0,this)}function qw({status:$}){return r0.jsxDEV("span",{className:`pill status-${Vw($)}`,children:String($??"").replace(/_/g," ")||"—"},void 0,!1,void 0,this)}function zs({issue:$,selected:I,onSelect:G}){return r0.jsxDEV("button",{className:`issue-row ${I?"selected":""}`,onClick:G,children:[r0.jsxDEV("div",{className:"issue-main",children:[r0.jsxDEV("div",{className:"issue-title",children:$.title},void 0,!1,void 0,this),r0.jsxDEV("div",{className:"issue-culprit mono",children:$.culprit||$.shortId},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r0.jsxDEV("div",{className:"issue-meta",children:[r0.jsxDEV(Qs,{level:$.level},void 0,!1,void 0,this),r0.jsxDEV(qw,{status:$.status},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"issue-count",title:"event count",children:[cE($.count)," events"]},void 0,!0,void 0,this),r0.jsxDEV("span",{className:"issue-lastseen",children:Zz($.lastSeen)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Zs({frames:$}){if($.length===0)return r0.jsxDEV("div",{className:"empty",children:"No stacktrace"},void 0,!1,void 0,this);return r0.jsxDEV("div",{className:"stacktrace",children:$.map((I,G)=>r0.jsxDEV("div",{className:"frame mono",children:[r0.jsxDEV("span",{className:"frame-fn",children:I.function??"?"},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"frame-file",children:[I.filename??I.module??"",I.lineno?`:${I.lineno}`:""]},void 0,!0,void 0,this)]},G,!0,void 0,this))},void 0,!1,void 0,this)}function Os({issue:$}){let[I,G]=E1.useState(null);E1.useEffect(()=>{let J=!0;return X_(`/issues/${$.id}/events/latest/`).then((Y)=>{if(J)G(Y)}),()=>{J=!1}},[$.id]);let Z=E1.useMemo(()=>Sw(I),[I]),_=E1.useMemo(()=>vw(I),[I]);return r0.jsxDEV("div",{className:"issue-detail",children:[r0.jsxDEV("h2",{className:"detail-title",children:$.title},void 0,!1,void 0,this),r0.jsxDEV("div",{className:"detail-sub mono",children:$.culprit},void 0,!1,void 0,this),r0.jsxDEV("div",{className:"detail-stats",children:[r0.jsxDEV("div",{children:[r0.jsxDEV("span",{className:"stat-label",children:"Events"},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"stat-value",children:cE($.count)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r0.jsxDEV("div",{children:[r0.jsxDEV("span",{className:"stat-label",children:"First seen"},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"stat-value",children:Zz($.firstSeen)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r0.jsxDEV("div",{children:[r0.jsxDEV("span",{className:"stat-label",children:"Last seen"},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"stat-value",children:Zz($.lastSeen)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r0.jsxDEV("div",{children:[r0.jsxDEV("span",{className:"stat-label",children:"Status"},void 0,!1,void 0,this),r0.jsxDEV(qw,{status:$.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),r0.jsxDEV("h3",{children:"Latest Event Stacktrace"},void 0,!1,void 0,this),r0.jsxDEV(Zs,{frames:Z},void 0,!1,void 0,this),r0.jsxDEV("h3",{children:"Tags"},void 0,!1,void 0,this),_.length===0?r0.jsxDEV("div",{className:"empty",children:"No tags"},void 0,!1,void 0,this):r0.jsxDEV("div",{className:"tags",children:_.map((J)=>r0.jsxDEV("span",{className:"tag mono",children:[J.key,": ",J.value]},J.key,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Ls(){let[$,I]=E1.useState([]),[G,Z]=E1.useState(null),[_,J]=E1.useState("is:unresolved");E1.useEffect(()=>{X_(`/projects/${TI}/${XX}/issues/?query=${encodeURIComponent(_)}`).then((W)=>I(Array.isArray(W)?W:[]))},[_]);let Y=$.find((W)=>W.id===G)??$[0];return r0.jsxDEV("div",{className:"split",children:[r0.jsxDEV("div",{className:"list",children:[r0.jsxDEV("div",{className:"search-bar",children:r0.jsxDEV("input",{className:"search-input",value:_,onChange:(W)=>J(W.target.value),placeholder:"is:unresolved level:error ..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.length===0?r0.jsxDEV("div",{className:"empty",children:"No issues"},void 0,!1,void 0,this):$.map((W)=>r0.jsxDEV(zs,{issue:W,selected:Y?.id===W.id,onSelect:()=>Z(W.id)},W.id,!1,void 0,this))]},void 0,!0,void 0,this),r0.jsxDEV("div",{className:"detail",children:Y?r0.jsxDEV(Os,{issue:Y},void 0,!1,void 0,this):r0.jsxDEV("div",{className:"empty",children:"Select an issue"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Ds({releases:$}){return r0.jsxDEV("div",{className:"list full",children:[r0.jsxDEV("h2",{className:"screen-title",children:"Releases"},void 0,!1,void 0,this),$.length===0?r0.jsxDEV("div",{className:"empty",children:"No releases"},void 0,!1,void 0,this):$.map((I)=>r0.jsxDEV("div",{className:"release-row",children:[r0.jsxDEV("span",{className:"release-version mono",children:I.version},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"release-commits",children:[I.commitCount??0," commits"]},void 0,!0,void 0,this),r0.jsxDEV("span",{className:"release-date",children:Zz(I.dateCreated)},void 0,!1,void 0,this)]},I.id,!0,void 0,this))]},void 0,!0,void 0,this)}function Ks(){let[$,I]=E1.useState([]);return E1.useEffect(()=>{X_(`/organizations/${TI}/releases/`).then((G)=>I(Array.isArray(G)?G:[]))},[]),r0.jsxDEV(Ds,{releases:$},void 0,!1,void 0,this)}function Ws({projects:$}){return r0.jsxDEV("div",{className:"list full",children:[r0.jsxDEV("h2",{className:"screen-title",children:"Projects"},void 0,!1,void 0,this),$.length===0?r0.jsxDEV("div",{className:"empty",children:"No projects"},void 0,!1,void 0,this):$.map((I)=>r0.jsxDEV("div",{className:"project-row",children:[r0.jsxDEV("span",{className:"project-name",children:I.name},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"project-slug mono",children:I.slug},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"project-platform",children:I.platform??"—"},void 0,!1,void 0,this)]},I.id,!0,void 0,this))]},void 0,!0,void 0,this)}function Hs(){let[$,I]=E1.useState([]);return E1.useEffect(()=>{X_("/projects/").then((G)=>I(Array.isArray(G)?G:[]))},[]),r0.jsxDEV(Ws,{projects:$},void 0,!1,void 0,this)}function Fs(){let[$,I]=E1.useState([]);return E1.useEffect(()=>{X_(`/projects/${TI}/${XX}/rules/`).then((G)=>I(Array.isArray(G)?G:[]))},[]),r0.jsxDEV("div",{className:"list full alerts-screen",children:[r0.jsxDEV("h2",{className:"screen-title",children:"Alerts"},void 0,!1,void 0,this),r0.jsxDEV("div",{className:"alerts-sub",children:["Issue alert rules for ",XX]},void 0,!0,void 0,this),$.length===0?r0.jsxDEV("div",{className:"empty",children:"No alert rules"},void 0,!1,void 0,this):$.map((G)=>r0.jsxDEV("div",{className:"alert-rule-row",children:[r0.jsxDEV("span",{className:"alert-rule-name",children:G.name},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"alert-rule-triggers",children:(Array.isArray(G.triggers)?G.triggers:[]).map((Z)=>r0.jsxDEV("span",{className:"alert-trigger pill",children:Z},Z,!1,void 0,this))},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"alert-rule-endpoints mono",children:[(Array.isArray(G.endpoints)?G.endpoints:[]).length," endpoint(s)"]},void 0,!0,void 0,this)]},G.id,!0,void 0,this))]},void 0,!0,void 0,this)}function Ts(){let[$,I]=E1.useState(null),[G,Z]=E1.useState([]),[_,J]=E1.useState([]);return E1.useEffect(()=>{X_(`/projects/${TI}/${XX}/`).then(I),X_(`/projects/${TI}/${XX}/keys/`).then((Y)=>Z(Array.isArray(Y)?Y:[])),X_(`/projects/${TI}/${XX}/environments/`).then((Y)=>J(Array.isArray(Y)?Y:[]))},[]),r0.jsxDEV("div",{className:"list full settings-screen",children:[r0.jsxDEV("h2",{className:"screen-title",children:"Settings"},void 0,!1,void 0,this),r0.jsxDEV("section",{className:"settings-section",children:[r0.jsxDEV("h3",{children:"General"},void 0,!1,void 0,this),r0.jsxDEV("div",{className:"setting-field",children:[r0.jsxDEV("span",{className:"setting-label",children:"Name"},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"setting-value",children:$?.name??"—"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r0.jsxDEV("div",{className:"setting-field",children:[r0.jsxDEV("span",{className:"setting-label",children:"Slug"},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"setting-value mono",children:$?.slug??"—"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r0.jsxDEV("div",{className:"setting-field",children:[r0.jsxDEV("span",{className:"setting-label",children:"Platform"},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"setting-value",children:$?.platform??"—"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),r0.jsxDEV("section",{className:"settings-section",children:[r0.jsxDEV("h3",{children:"Client Keys (DSN)"},void 0,!1,void 0,this),G.length===0?r0.jsxDEV("div",{className:"empty",children:"No keys"},void 0,!1,void 0,this):G.map((Y)=>r0.jsxDEV("div",{className:"dsn-row",children:[r0.jsxDEV("span",{className:"dsn-name",children:Y.name},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"dsn-public mono",children:Y.dsn?.public},void 0,!1,void 0,this),r0.jsxDEV("span",{className:`pill ${Y.isActive===!1?"status-ignored":"status-resolved"}`,children:Y.isActive===!1?"revoked":"active"},void 0,!1,void 0,this)]},Y.id,!0,void 0,this))]},void 0,!0,void 0,this),r0.jsxDEV("section",{className:"settings-section",children:[r0.jsxDEV("h3",{children:"Environments"},void 0,!1,void 0,this),_.length===0?r0.jsxDEV("div",{className:"empty",children:"No environments"},void 0,!1,void 0,this):r0.jsxDEV("div",{className:"env-list",children:_.map((Y)=>r0.jsxDEV("span",{className:"env-item pill",children:Y.name},Y.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Ms({dashboards:$}){return r0.jsxDEV("div",{className:"list full dashboards-screen",children:[r0.jsxDEV("h2",{className:"screen-title",children:"Dashboards"},void 0,!1,void 0,this),r0.jsxDEV("div",{className:"dashboards-sub",children:["Custom dashboards & widgets for ",TI]},void 0,!0,void 0,this),$.length===0?r0.jsxDEV("div",{className:"empty",children:"No dashboards"},void 0,!1,void 0,this):$.map((I)=>r0.jsxDEV("div",{className:"dashboard-row",children:[r0.jsxDEV("span",{className:"dashboard-title",children:I.title},void 0,!1,void 0,this),r0.jsxDEV("div",{className:"dashboard-widgets",children:[(Array.isArray(I.widgets)?I.widgets:[]).map((G,Z)=>r0.jsxDEV("div",{className:"widget-card",children:[r0.jsxDEV("span",{className:"widget-title",children:G.title},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"widget-type pill",children:G.displayType},void 0,!1,void 0,this)]},Z,!0,void 0,this)),(!Array.isArray(I.widgets)||I.widgets.length===0)&&r0.jsxDEV("span",{className:"empty",children:"No widgets"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},I.id,!0,void 0,this))]},void 0,!0,void 0,this)}function As(){let[$,I]=E1.useState([]);return E1.useEffect(()=>{X_(`/organizations/${TI}/dashboards/`).then((G)=>I(Array.isArray(G)?G:[]))},[]),r0.jsxDEV(Ms,{dashboards:$},void 0,!1,void 0,this)}function Es({saved:$,fields:I="title, count(), last_seen()",query:G="event.type:error",onFields:Z,onQuery:_}){let J=I.split(",").map((Y)=>Y.trim()).filter(Boolean);return r0.jsxDEV("div",{className:"list full discover-screen",children:[r0.jsxDEV("h2",{className:"screen-title",children:"Discover"},void 0,!1,void 0,this),r0.jsxDEV("div",{className:"discover-builder",children:[r0.jsxDEV("div",{className:"discover-field",children:[r0.jsxDEV("label",{className:"discover-label",children:"Columns"},void 0,!1,void 0,this),r0.jsxDEV("input",{className:"discover-columns",value:I,onChange:Z?(Y)=>Z(Y.target.value):void 0,placeholder:"title, count(), last_seen()",readOnly:!Z},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r0.jsxDEV("div",{className:"discover-field",children:[r0.jsxDEV("label",{className:"discover-label",children:"Query"},void 0,!1,void 0,this),r0.jsxDEV("input",{className:"discover-query",value:G,onChange:_?(Y)=>_(Y.target.value):void 0,placeholder:"event.type:error",readOnly:!_},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r0.jsxDEV("div",{className:"discover-columns-preview",children:J.map((Y)=>r0.jsxDEV("span",{className:"discover-column-chip mono",children:Y},Y,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r0.jsxDEV("div",{className:"discover-results-note empty",children:"Live query execution requires the data-plane query engine (not built yet) — the query builder config is faithful and saved queries persist."},void 0,!1,void 0,this),r0.jsxDEV("h3",{children:"Saved Queries"},void 0,!1,void 0,this),$.length===0?r0.jsxDEV("div",{className:"empty",children:"No saved queries"},void 0,!1,void 0,this):$.map((Y)=>r0.jsxDEV("div",{className:"saved-query-row",children:[r0.jsxDEV("span",{className:"saved-query-name",children:Y.name},void 0,!1,void 0,this),r0.jsxDEV("span",{className:"saved-query-fields mono",children:(Array.isArray(Y.fields)?Y.fields:[]).join(", ")},void 0,!1,void 0,this)]},Y.id,!0,void 0,this))]},void 0,!0,void 0,this)}function Rs(){let[$,I]=E1.useState([]),[G,Z]=E1.useState("title, count(), last_seen()"),[_,J]=E1.useState("event.type:error");return E1.useEffect(()=>{X_(`/organizations/${TI}/discover/saved/`).then((Y)=>I(Array.isArray(Y)?Y:[]))},[]),r0.jsxDEV(Es,{saved:$,fields:G,query:_,onFields:Z,onQuery:J},void 0,!1,void 0,this)}function Ps(){let[$,I]=E1.useState("issues");return r0.jsxDEV("div",{className:"app",children:[r0.jsxDEV("header",{className:"topbar",children:[r0.jsxDEV("span",{className:"brand",children:["Sentry ",r0.jsxDEV("span",{className:"badge",children:"twin"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r0.jsxDEV("span",{className:"org mono",children:TI},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r0.jsxDEV("div",{className:"body",children:[r0.jsxDEV("nav",{className:"sidenav",children:Js.map((G)=>r0.jsxDEV("button",{className:`nav-item ${$===G.key?"active":""}`,onClick:()=>I(G.key),children:G.label},G.key,!1,void 0,this))},void 0,!1,void 0,this),r0.jsxDEV("main",{className:"content",children:[$==="issues"&&r0.jsxDEV(Ls,{},void 0,!1,void 0,this),$==="dashboards"&&r0.jsxDEV(As,{},void 0,!1,void 0,this),$==="discover"&&r0.jsxDEV(Rs,{},void 0,!1,void 0,this),$==="releases"&&r0.jsxDEV(Ks,{},void 0,!1,void 0,this),$==="projects"&&r0.jsxDEV(Hs,{},void 0,!1,void 0,this),$==="alerts"&&r0.jsxDEV(Fs,{},void 0,!1,void 0,this),$==="settings"&&r0.jsxDEV(Ts,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}if(typeof document<"u"){let $=document.getElementById("root");if($)Cw.createRoot($).render(r0.jsxDEV(Ps,{},void 0,!1,void 0,this))}export{Ds as ReleasesView,Ws as ProjectsView,Es as DiscoverView,Ms as DashboardsView};