typescript-virtual-container 1.4.5 → 1.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +1 -1
  2. package/builds/self-standalone.js +2 -2
  3. package/builds/self-standalone.js.map +2 -2
  4. package/builds/standalone-wo-sftp.js +38 -37
  5. package/builds/standalone-wo-sftp.js.map +3 -3
  6. package/builds/standalone.cjs +491 -0
  7. package/builds/standalone.cjs.map +7 -0
  8. package/builds/standalone.js +2 -1
  9. package/builds/standalone.js.map +3 -3
  10. package/dist/commands/man.js +1 -1
  11. package/dist/commands/man.js.map +1 -1
  12. package/dist/self-standalone.js +1 -0
  13. package/dist/self-standalone.js.map +1 -1
  14. package/dist/standalone.js +7 -3
  15. package/dist/standalone.js.map +1 -1
  16. package/docs/classes/HoneyPot.html +8 -8
  17. package/docs/classes/SshClient.html +18 -18
  18. package/docs/classes/VirtualFileSystem.html +29 -29
  19. package/docs/classes/VirtualPackageManager.html +12 -12
  20. package/docs/classes/VirtualSftpServer.html +3 -3
  21. package/docs/classes/VirtualShell.html +22 -22
  22. package/docs/classes/VirtualSshServer.html +5 -5
  23. package/docs/classes/VirtualUserManager.html +26 -26
  24. package/docs/functions/assertDiff.html +1 -1
  25. package/docs/functions/diffSnapshots.html +1 -1
  26. package/docs/functions/formatDiff.html +1 -1
  27. package/docs/functions/getArg.html +1 -1
  28. package/docs/functions/getFlag.html +1 -1
  29. package/docs/functions/ifFlag.html +1 -1
  30. package/docs/index.html +1 -1
  31. package/docs/interfaces/AuditLogEntry.html +2 -2
  32. package/docs/interfaces/CommandContext.html +11 -11
  33. package/docs/interfaces/CommandResult.html +12 -12
  34. package/docs/interfaces/ExecStream.html +5 -5
  35. package/docs/interfaces/HoneyPotStats.html +2 -2
  36. package/docs/interfaces/InstalledPackage.html +10 -10
  37. package/docs/interfaces/NanoEditorSession.html +4 -4
  38. package/docs/interfaces/PackageDefinition.html +13 -13
  39. package/docs/interfaces/PackageFile.html +4 -4
  40. package/docs/interfaces/RemoveOptions.html +2 -2
  41. package/docs/interfaces/ShellEnv.html +3 -3
  42. package/docs/interfaces/ShellModule.html +7 -7
  43. package/docs/interfaces/ShellProperties.html +4 -4
  44. package/docs/interfaces/ShellStream.html +6 -6
  45. package/docs/interfaces/SudoChallenge.html +8 -8
  46. package/docs/interfaces/VfsBaseNode.html +6 -6
  47. package/docs/interfaces/VfsDiff.html +5 -5
  48. package/docs/interfaces/VfsDiffEntry.html +3 -3
  49. package/docs/interfaces/VfsDiffModified.html +5 -5
  50. package/docs/interfaces/VfsDirectoryNode.html +7 -7
  51. package/docs/interfaces/VfsFileNode.html +8 -8
  52. package/docs/interfaces/VfsOptions.html +3 -3
  53. package/docs/interfaces/VfsSnapshot.html +2 -2
  54. package/docs/interfaces/VfsSnapshotBaseNode.html +3 -3
  55. package/docs/interfaces/VfsSnapshotDirectoryNode.html +4 -4
  56. package/docs/interfaces/VfsSnapshotFileNode.html +5 -5
  57. package/docs/interfaces/WriteFileOptions.html +3 -3
  58. package/docs/types/CommandMode.html +1 -1
  59. package/docs/types/CommandOutcome.html +1 -1
  60. package/docs/types/VfsNodeStats.html +1 -1
  61. package/docs/types/VfsNodeType.html +1 -1
  62. package/docs/types/VfsPersistenceMode.html +1 -1
  63. package/docs/types/VfsSnapshotNode.html +1 -1
  64. package/package.json +4 -4
  65. package/src/commands/man.ts +1 -1
  66. package/src/self-standalone.ts +1 -1
  67. package/src/standalone.ts +8 -3
  68. package/docs/docs/.nojekyll +0 -1
  69. package/docs/docs/assets/hierarchy.js +0 -1
  70. package/docs/docs/assets/highlight.css +0 -162
  71. package/docs/docs/assets/icons.js +0 -18
  72. package/docs/docs/assets/icons.svg +0 -1
  73. package/docs/docs/assets/main.js +0 -60
  74. package/docs/docs/assets/navigation.js +0 -1
  75. package/docs/docs/assets/search.js +0 -1
  76. package/docs/docs/assets/style.css +0 -1633
  77. package/docs/docs/hierarchy.html +0 -1
  78. package/docs/docs/index.html +0 -1842
  79. package/docs/docs/media/LICENSE +0 -21
  80. package/docs/docs/modules.html +0 -1
  81. package/typedoc.json +0 -8
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  "use strict";var dp=Object.create;var Oc=Object.defineProperty;var hp=Object.getOwnPropertyDescriptor;var pp=Object.getOwnPropertyNames;var gp=Object.getPrototypeOf,mp=Object.prototype.hasOwnProperty;var lt=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var Ap=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of pp(t))!mp.call(n,s)&&s!==e&&Oc(n,s,{get:()=>t[s],enumerable:!(r=hp(t,s))||r.enumerable});return n};var zt=(n,t,e)=>(e=n!=null?dp(gp(n)):{},Ap(t||!n||!n.__esModule?Oc(e,"default",{value:n,enumerable:!0}):e,n));var gs=lt((ex,Zf)=>{Zf.exports={newInvalidAsn1Error:function(n){var t=new Error;return t.name="InvalidAsn1Error",t.message=n||"",t}}});var ms=lt((tx,eu)=>{eu.exports={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128}});var Po=lt((nx,tu)=>{"use strict";var As=require("buffer"),Tr=As.Buffer,pn={},gn;for(gn in As)As.hasOwnProperty(gn)&&(gn==="SlowBuffer"||gn==="Buffer"||(pn[gn]=As[gn]));var Lr=pn.Buffer={};for(gn in Tr)Tr.hasOwnProperty(gn)&&(gn==="allocUnsafe"||gn==="allocUnsafeSlow"||(Lr[gn]=Tr[gn]));pn.Buffer.prototype=Tr.prototype;(!Lr.from||Lr.from===Uint8Array.from)&&(Lr.from=function(n,t,e){if(typeof n=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof n);if(n&&typeof n.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n);return Tr(n,t,e)});Lr.alloc||(Lr.alloc=function(n,t,e){if(typeof n!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof n);if(n<0||n>=2*(1<<30))throw new RangeError('The value "'+n+'" is invalid for option "size"');var r=Tr(n);return!t||t.length===0?r.fill(0):typeof e=="string"?r.fill(t,e):r.fill(t),r});if(!pn.kStringMaxLength)try{pn.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}pn.constants||(pn.constants={MAX_LENGTH:pn.kMaxLength},pn.kStringMaxLength&&(pn.constants.MAX_STRING_LENGTH=pn.kStringMaxLength));tu.exports=pn});var iu=lt((rx,ru)=>{var Rg=require("assert"),nu=Po().Buffer,Ai=ms(),Ng=gs(),$r=Ng.newInvalidAsn1Error;function Jt(n){if(!n||!nu.isBuffer(n))throw new TypeError("data must be a node Buffer");this._buf=n,this._size=n.length,this._len=0,this._offset=0}Object.defineProperty(Jt.prototype,"length",{enumerable:!0,get:function(){return this._len}});Object.defineProperty(Jt.prototype,"offset",{enumerable:!0,get:function(){return this._offset}});Object.defineProperty(Jt.prototype,"remain",{get:function(){return this._size-this._offset}});Object.defineProperty(Jt.prototype,"buffer",{get:function(){return this._buf.slice(this._offset)}});Jt.prototype.readByte=function(n){if(this._size-this._offset<1)return null;var t=this._buf[this._offset]&255;return n||(this._offset+=1),t};Jt.prototype.peek=function(){return this.readByte(!0)};Jt.prototype.readLength=function(n){if(n===void 0&&(n=this._offset),n>=this._size)return null;var t=this._buf[n++]&255;if(t===null)return null;if((t&128)===128){if(t&=127,t===0)throw $r("Indefinite length not supported");if(t>4)throw $r("encoding too long");if(this._size-n<t)return null;this._len=0;for(var e=0;e<t;e++)this._len=(this._len<<8)+(this._buf[n++]&255)}else this._len=t;return n};Jt.prototype.readSequence=function(n){var t=this.peek();if(t===null)return null;if(n!==void 0&&n!==t)throw $r("Expected 0x"+n.toString(16)+": got 0x"+t.toString(16));var e=this.readLength(this._offset+1);return e===null?null:(this._offset=e,t)};Jt.prototype.readInt=function(){return this._readTag(Ai.Integer)};Jt.prototype.readBoolean=function(){return this._readTag(Ai.Boolean)!==0};Jt.prototype.readEnumeration=function(){return this._readTag(Ai.Enumeration)};Jt.prototype.readString=function(n,t){n||(n=Ai.OctetString);var e=this.peek();if(e===null)return null;if(e!==n)throw $r("Expected 0x"+n.toString(16)+": got 0x"+e.toString(16));var r=this.readLength(this._offset+1);if(r===null||this.length>this._size-r)return null;if(this._offset=r,this.length===0)return t?nu.alloc(0):"";var s=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,t?s:s.toString("utf8")};Jt.prototype.readOID=function(n){n||(n=Ai.OID);var t=this.readString(n,!0);if(t===null)return null;for(var e=[],r=0,s=0;s<t.length;s++){var i=t[s]&255;r<<=7,r+=i&127,(i&128)===0&&(e.push(r),r=0)}return r=e.shift(),e.unshift(r%40),e.unshift(r/40>>0),e.join(".")};Jt.prototype._readTag=function(n){Rg.ok(n!==void 0);var t=this.peek();if(t===null)return null;if(t!==n)throw $r("Expected 0x"+n.toString(16)+": got 0x"+t.toString(16));var e=this.readLength(this._offset+1);if(e===null)return null;if(this.length>4)throw $r("Integer too long: "+this.length);if(this.length>this._size-e)return null;this._offset=e;for(var r=this._buf[this._offset],s=0,i=0;i<this.length;i++)s<<=8,s|=this._buf[this._offset++]&255;return(r&128)===128&&i!==4&&(s-=1<<i*8),s>>0};ru.exports=Jt});var ou=lt((ix,su)=>{var Gn=require("assert"),ys=Po().Buffer,Yn=ms(),Pg=gs(),Es=Pg.newInvalidAsn1Error,Tg={size:1024,growthFactor:8};function Lg(n,t){Gn.ok(n),Gn.equal(typeof n,"object"),Gn.ok(t),Gn.equal(typeof t,"object");var e=Object.getOwnPropertyNames(n);return e.forEach(function(r){if(!t[r]){var s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,s)}}),t}function Gt(n){n=Lg(Tg,n||{}),this._buf=ys.alloc(n.size||1024),this._size=this._buf.length,this._offset=0,this._options=n,this._seq=[]}Object.defineProperty(Gt.prototype,"buffer",{get:function(){if(this._seq.length)throw Es(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}});Gt.prototype.writeByte=function(n){if(typeof n!="number")throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=n};Gt.prototype.writeInt=function(n,t){if(typeof n!="number")throw new TypeError("argument must be a Number");typeof t!="number"&&(t=Yn.Integer);for(var e=4;((n&4286578688)===0||(n&4286578688)===-8388608)&&e>1;)e--,n<<=8;if(e>4)throw Es("BER ints cannot be > 0xffffffff");for(this._ensure(2+e),this._buf[this._offset++]=t,this._buf[this._offset++]=e;e-- >0;)this._buf[this._offset++]=(n&4278190080)>>>24,n<<=8};Gt.prototype.writeNull=function(){this.writeByte(Yn.Null),this.writeByte(0)};Gt.prototype.writeEnumeration=function(n,t){if(typeof n!="number")throw new TypeError("argument must be a Number");return typeof t!="number"&&(t=Yn.Enumeration),this.writeInt(n,t)};Gt.prototype.writeBoolean=function(n,t){if(typeof n!="boolean")throw new TypeError("argument must be a Boolean");typeof t!="number"&&(t=Yn.Boolean),this._ensure(3),this._buf[this._offset++]=t,this._buf[this._offset++]=1,this._buf[this._offset++]=n?255:0};Gt.prototype.writeString=function(n,t){if(typeof n!="string")throw new TypeError("argument must be a string (was: "+typeof n+")");typeof t!="number"&&(t=Yn.OctetString);var e=ys.byteLength(n);this.writeByte(t),this.writeLength(e),e&&(this._ensure(e),this._buf.write(n,this._offset),this._offset+=e)};Gt.prototype.writeBuffer=function(n,t){if(typeof t!="number")throw new TypeError("tag must be a number");if(!ys.isBuffer(n))throw new TypeError("argument must be a buffer");this.writeByte(t),this.writeLength(n.length),this._ensure(n.length),n.copy(this._buf,this._offset,0,n.length),this._offset+=n.length};Gt.prototype.writeStringArray=function(n){if(!n instanceof Array)throw new TypeError("argument must be an Array[String]");var t=this;n.forEach(function(e){t.writeString(e)})};Gt.prototype.writeOID=function(n,t){if(typeof n!="string")throw new TypeError("argument must be a string");if(typeof t!="number"&&(t=Yn.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(n))throw new Error("argument is not a valid OID string");function e(o,a){a<128?o.push(a):a<16384?(o.push(a>>>7|128),o.push(a&127)):a<2097152?(o.push(a>>>14|128),o.push((a>>>7|128)&255),o.push(a&127)):a<268435456?(o.push(a>>>21|128),o.push((a>>>14|128)&255),o.push((a>>>7|128)&255),o.push(a&127)):(o.push((a>>>28|128)&255),o.push((a>>>21|128)&255),o.push((a>>>14|128)&255),o.push((a>>>7|128)&255),o.push(a&127))}var r=n.split("."),s=[];s.push(parseInt(r[0],10)*40+parseInt(r[1],10)),r.slice(2).forEach(function(o){e(s,parseInt(o,10))});var i=this;this._ensure(2+s.length),this.writeByte(t),this.writeLength(s.length),s.forEach(function(o){i.writeByte(o)})};Gt.prototype.writeLength=function(n){if(typeof n!="number")throw new TypeError("argument must be a Number");if(this._ensure(4),n<=127)this._buf[this._offset++]=n;else if(n<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=n;else if(n<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=n>>8,this._buf[this._offset++]=n;else if(n<=16777215)this._buf[this._offset++]=131,this._buf[this._offset++]=n>>16,this._buf[this._offset++]=n>>8,this._buf[this._offset++]=n;else throw Es("Length too long (> 4 bytes)")};Gt.prototype.startSequence=function(n){typeof n!="number"&&(n=Yn.Sequence|Yn.Constructor),this.writeByte(n),this._seq.push(this._offset),this._ensure(3),this._offset+=3};Gt.prototype.endSequence=function(){var n=this._seq.pop(),t=n+3,e=this._offset-t;if(e<=127)this._shift(t,e,-2),this._buf[n]=e;else if(e<=255)this._shift(t,e,-1),this._buf[n]=129,this._buf[n+1]=e;else if(e<=65535)this._buf[n]=130,this._buf[n+1]=e>>8,this._buf[n+2]=e;else if(e<=16777215)this._shift(t,e,1),this._buf[n]=131,this._buf[n+1]=e>>16,this._buf[n+2]=e>>8,this._buf[n+3]=e;else throw Es("Sequence too long")};Gt.prototype._shift=function(n,t,e){Gn.ok(n!==void 0),Gn.ok(t!==void 0),Gn.ok(e),this._buf.copy(this._buf,n+e,n,n+t),this._offset+=e};Gt.prototype._ensure=function(n){if(Gn.ok(n),this._size-this._offset<n){var t=this._size*this._options.growthFactor;t-this._offset<n&&(t+=n);var e=ys.alloc(t);this._buf.copy(e,0,0,this._offset),this._buf=e,this._size=t}};su.exports=Gt});var au=lt((sx,Ss)=>{var To=gs(),Lo=ms(),$g=iu(),Dg=ou();Ss.exports={Reader:$g,Writer:Dg};for(_s in Lo)Lo.hasOwnProperty(_s)&&(Ss.exports[_s]=Lo[_s]);var _s;for(bs in To)To.hasOwnProperty(bs)&&(Ss.exports[bs]=To[bs]);var bs});var yi=lt((ox,cu)=>{var $o=au();cu.exports={Ber:$o,BerReader:$o.Reader,BerWriter:$o.Writer}});var lu=lt((ax,xs)=>{(function(n){"use strict";var t=function(g){var y,m=new Float64Array(16);if(g)for(y=0;y<g.length;y++)m[y]=g[y];return m},e=function(){throw new Error("no PRNG")},r=new Uint8Array(16),s=new Uint8Array(32);s[0]=9;var i=t(),o=t([1]),a=t([56129,1]),c=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),u=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),h=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(g,y,m,d){g[y]=m>>24&255,g[y+1]=m>>16&255,g[y+2]=m>>8&255,g[y+3]=m&255,g[y+4]=d>>24&255,g[y+5]=d>>16&255,g[y+6]=d>>8&255,g[y+7]=d&255}function A(g,y,m,d,_){var $,F=0;for($=0;$<_;$++)F|=g[y+$]^m[d+$];return(1&F-1>>>8)-1}function E(g,y,m,d){return A(g,y,m,d,16)}function S(g,y,m,d){return A(g,y,m,d,32)}function x(g,y,m,d){for(var _=d[0]&255|(d[1]&255)<<8|(d[2]&255)<<16|(d[3]&255)<<24,$=m[0]&255|(m[1]&255)<<8|(m[2]&255)<<16|(m[3]&255)<<24,F=m[4]&255|(m[5]&255)<<8|(m[6]&255)<<16|(m[7]&255)<<24,J=m[8]&255|(m[9]&255)<<8|(m[10]&255)<<16|(m[11]&255)<<24,ae=m[12]&255|(m[13]&255)<<8|(m[14]&255)<<16|(m[15]&255)<<24,ye=d[4]&255|(d[5]&255)<<8|(d[6]&255)<<16|(d[7]&255)<<24,ge=y[0]&255|(y[1]&255)<<8|(y[2]&255)<<16|(y[3]&255)<<24,rt=y[4]&255|(y[5]&255)<<8|(y[6]&255)<<16|(y[7]&255)<<24,Ae=y[8]&255|(y[9]&255)<<8|(y[10]&255)<<16|(y[11]&255)<<24,Le=y[12]&255|(y[13]&255)<<8|(y[14]&255)<<16|(y[15]&255)<<24,$e=d[8]&255|(d[9]&255)<<8|(d[10]&255)<<16|(d[11]&255)<<24,Qe=m[16]&255|(m[17]&255)<<8|(m[18]&255)<<16|(m[19]&255)<<24,Fe=m[20]&255|(m[21]&255)<<8|(m[22]&255)<<16|(m[23]&255)<<24,De=m[24]&255|(m[25]&255)<<8|(m[26]&255)<<16|(m[27]&255)<<24,Me=m[28]&255|(m[29]&255)<<8|(m[30]&255)<<16|(m[31]&255)<<24,Ue=d[12]&255|(d[13]&255)<<8|(d[14]&255)<<16|(d[15]&255)<<24,Ee=_,Se=$,me=F,_e=J,be=ae,pe=ye,W=ge,q=rt,re=Ae,X=Le,Z=$e,oe=Qe,ke=Fe,We=De,Ke=Me,qe=Ue,I,ze=0;ze<20;ze+=2)I=Ee+ke|0,be^=I<<7|I>>>25,I=be+Ee|0,re^=I<<9|I>>>23,I=re+be|0,ke^=I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16&255,g[11]=me>>>24&255,g[12]=_e>>>0&255,g[13]=_e>>>8&255,g[14]=_e>>>16&255,g[15]=_e>>>24&255,g[16]=be>>>0&255,g[17]=be>>>8&255,g[18]=be>>>16&255,g[19]=be>>>24&255,g[20]=pe>>>0&255,g[21]=pe>>>8&255,g[22]=pe>>>16&255,g[23]=pe>>>24&255,g[24]=W>>>0&255,g[25]=W>>>8&255,g[26]=W>>>16&255,g[27]=W>>>24&255,g[28]=q>>>0&255,g[29]=q>>>8&255,g[30]=q>>>16&255,g[31]=q>>>24&255,g[32]=re>>>0&255,g[33]=re>>>8&255,g[34]=re>>>16&255,g[35]=re>>>24&255,g[36]=X>>>0&255,g[37]=X>>>8&255,g[38]=X>>>16&255,g[39]=X>>>24&255,g[40]=Z>>>0&255,g[41]=Z>>>8&255,g[42]=Z>>>16&255,g[43]=Z>>>24&255,g[44]=oe>>>0&255,g[45]=oe>>>8&255,g[46]=oe>>>16&255,g[47]=oe>>>24&255,g[48]=ke>>>0&255,g[49]=ke>>>8&255,g[50]=ke>>>16&255,g[51]=ke>>>24&255,g[52]=We>>>0&255,g[53]=We>>>8&255,g[54]=We>>>16&255,g[55]=We>>>24&255,g[56]=Ke>>>0&255,g[57]=Ke>>>8&255,g[58]=Ke>>>16&255,g[59]=Ke>>>24&255,g[60]=qe>>>0&255,g[61]=qe>>>8&255,g[62]=qe>>>16&255,g[63]=qe>>>24&255}function R(g,y,m,d){for(var _=d[0]&255|(d[1]&255)<<8|(d[2]&255)<<16|(d[3]&255)<<24,$=m[0]&255|(m[1]&255)<<8|(m[2]&255)<<16|(m[3]&255)<<24,F=m[4]&255|(m[5]&255)<<8|(m[6]&255)<<16|(m[7]&255)<<24,J=m[8]&255|(m[9]&255)<<8|(m[10]&255)<<16|(m[11]&255)<<24,ae=m[12]&255|(m[13]&255)<<8|(m[14]&255)<<16|(m[15]&255)<<24,ye=d[4]&255|(d[5]&255)<<8|(d[6]&255)<<16|(d[7]&255)<<24,ge=y[0]&255|(y[1]&255)<<8|(y[2]&255)<<16|(y[3]&255)<<24,rt=y[4]&255|(y[5]&255)<<8|(y[6]&255)<<16|(y[7]&255)<<24,Ae=y[8]&255|(y[9]&255)<<8|(y[10]&255)<<16|(y[11]&255)<<24,Le=y[12]&255|(y[13]&255)<<8|(y[14]&255)<<16|(y[15]&255)<<24,$e=d[8]&255|(d[9]&255)<<8|(d[10]&255)<<16|(d[11]&255)<<24,Qe=m[16]&255|(m[17]&255)<<8|(m[18]&255)<<16|(m[19]&255)<<24,Fe=m[20]&255|(m[21]&255)<<8|(m[22]&255)<<16|(m[23]&255)<<24,De=m[24]&255|(m[25]&255)<<8|(m[26]&255)<<16|(m[27]&255)<<24,Me=m[28]&255|(m[29]&255)<<8|(m[30]&255)<<16|(m[31]&255)<<24,Ue=d[12]&255|(d[13]&255)<<8|(d[14]&255)<<16|(d[15]&255)<<24,Ee=_,Se=$,me=F,_e=J,be=ae,pe=ye,W=ge,q=rt,re=Ae,X=Le,Z=$e,oe=Qe,ke=Fe,We=De,Ke=Me,qe=Ue,I,ze=0;ze<20;ze+=2)I=Ee+ke|0,be^=I<<7|I>>>25,I=be+Ee|0,re^=I<<9|I>>>23,I=re+be|0,ke^=I<<13|I>>>19,I=ke+re|0,Ee^=I<<18|I>>>14,I=pe+Se|0,X^=I<<7|I>>>25,I=X+pe|0,We^=I<<9|I>>>23,I=We+X|0,Se^=I<<13|I>>>19,I=Se+We|0,pe^=I<<18|I>>>14,I=Z+W|0,Ke^=I<<7|I>>>25,I=Ke+Z|0,me^=I<<9|I>>>23,I=me+Ke|0,W^=I<<13|I>>>19,I=W+me|0,Z^=I<<18|I>>>14,I=qe+oe|0,_e^=I<<7|I>>>25,I=_e+qe|0,q^=I<<9|I>>>23,I=q+_e|0,oe^=I<<13|I>>>19,I=oe+q|0,qe^=I<<18|I>>>14,I=Ee+_e|0,Se^=I<<7|I>>>25,I=Se+Ee|0,me^=I<<9|I>>>23,I=me+Se|0,_e^=I<<13|I>>>19,I=_e+me|0,Ee^=I<<18|I>>>14,I=pe+be|0,W^=I<<7|I>>>25,I=W+pe|0,q^=I<<9|I>>>23,I=q+W|0,be^=I<<13|I>>>19,I=be+q|0,pe^=I<<18|I>>>14,I=Z+X|0,oe^=I<<7|I>>>25,I=oe+Z|0,re^=I<<9|I>>>23,I=re+oe|0,X^=I<<13|I>>>19,I=X+re|0,Z^=I<<18|I>>>14,I=qe+Ke|0,ke^=I<<7|I>>>25,I=ke+qe|0,We^=I<<9|I>>>23,I=We+ke|0,Ke^=I<<13|I>>>19,I=Ke+We|0,qe^=I<<18|I>>>14;g[0]=Ee>>>0&255,g[1]=Ee>>>8&255,g[2]=Ee>>>16&255,g[3]=Ee>>>24&255,g[4]=pe>>>0&255,g[5]=pe>>>8&255,g[6]=pe>>>16&255,g[7]=pe>>>24&255,g[8]=Z>>>0&255,g[9]=Z>>>8&255,g[10]=Z>>>16&255,g[11]=Z>>>24&255,g[12]=qe>>>0&255,g[13]=qe>>>8&255,g[14]=qe>>>16&255,g[15]=qe>>>24&255,g[16]=W>>>0&255,g[17]=W>>>8&255,g[18]=W>>>16&255,g[19]=W>>>24&255,g[20]=q>>>0&255,g[21]=q>>>8&255,g[22]=q>>>16&255,g[23]=q>>>24&255,g[24]=re>>>0&255,g[25]=re>>>8&255,g[26]=re>>>16&255,g[27]=re>>>24&255,g[28]=X>>>0&255,g[29]=X>>>8&255,g[30]=X>>>16&255,g[31]=X>>>24&255}function H(g,y,m,d){x(g,y,m,d)}function C(g,y,m,d){R(g,y,m,d)}var U=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function Q(g,y,m,d,_,$,F){var J=new Uint8Array(16),ae=new Uint8Array(64),ye,ge;for(ge=0;ge<16;ge++)J[ge]=0;for(ge=0;ge<8;ge++)J[ge]=$[ge];for(;_>=64;){for(H(ae,J,F,U),ge=0;ge<64;ge++)g[y+ge]=m[d+ge]^ae[ge];for(ye=1,ge=8;ge<16;ge++)ye=ye+(J[ge]&255)|0,J[ge]=ye&255,ye>>>=8;_-=64,y+=64,d+=64}if(_>0)for(H(ae,J,F,U),ge=0;ge<_;ge++)g[y+ge]=m[d+ge]^ae[ge];return 0}function B(g,y,m,d,_){var $=new Uint8Array(16),F=new Uint8Array(64),J,ae;for(ae=0;ae<16;ae++)$[ae]=0;for(ae=0;ae<8;ae++)$[ae]=d[ae];for(;m>=64;){for(H(F,$,_,U),ae=0;ae<64;ae++)g[y+ae]=F[ae];for(J=1,ae=8;ae<16;ae++)J=J+($[ae]&255)|0,$[ae]=J&255,J>>>=8;m-=64,y+=64}if(m>0)for(H(F,$,_,U),ae=0;ae<m;ae++)g[y+ae]=F[ae];return 0}function b(g,y,m,d,_){var $=new Uint8Array(32);C($,d,_,U);for(var F=new Uint8Array(8),J=0;J<8;J++)F[J]=d[J+16];return B(g,y,m,F,$)}function w(g,y,m,d,_,$,F){var J=new Uint8Array(32);C(J,$,F,U);for(var ae=new Uint8Array(8),ye=0;ye<8;ye++)ae[ye]=$[ye+16];return Q(g,y,m,d,_,ae,J)}var k=function(g){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var y,m,d,_,$,F,J,ae;y=g[0]&255|(g[1]&255)<<8,this.r[0]=y&8191,m=g[2]&255|(g[3]&255)<<8,this.r[1]=(y>>>13|m<<3)&8191,d=g[4]&255|(g[5]&255)<<8,this.r[2]=(m>>>10|d<<6)&7939,_=g[6]&255|(g[7]&255)<<8,this.r[3]=(d>>>7|_<<9)&8191,$=g[8]&255|(g[9]&255)<<8,this.r[4]=(_>>>4|$<<12)&255,this.r[5]=$>>>1&8190,F=g[10]&255|(g[11]&255)<<8,this.r[6]=($>>>14|F<<2)&8191,J=g[12]&255|(g[13]&255)<<8,this.r[7]=(F>>>11|J<<5)&8065,ae=g[14]&255|(g[15]&255)<<8,this.r[8]=(J>>>8|ae<<8)&8191,this.r[9]=ae>>>5&127,this.pad[0]=g[16]&255|(g[17]&255)<<8,this.pad[1]=g[18]&255|(g[19]&255)<<8,this.pad[2]=g[20]&255|(g[21]&255)<<8,this.pad[3]=g[22]&255|(g[23]&255)<<8,this.pad[4]=g[24]&255|(g[25]&255)<<8,this.pad[5]=g[26]&255|(g[27]&255)<<8,this.pad[6]=g[28]&255|(g[29]&255)<<8,this.pad[7]=g[30]&255|(g[31]&255)<<8};k.prototype.blocks=function(g,y,m){for(var d=this.fin?0:2048,_,$,F,J,ae,ye,ge,rt,Ae,Le,$e,Qe,Fe,De,Me,Ue,Ee,Se,me,_e=this.h[0],be=this.h[1],pe=this.h[2],W=this.h[3],q=this.h[4],re=this.h[5],X=this.h[6],Z=this.h[7],oe=this.h[8],ke=this.h[9],We=this.r[0],Ke=this.r[1],qe=this.r[2],I=this.r[3],ze=this.r[4],it=this.r[5],st=this.r[6],Ve=this.r[7],et=this.r[8],tt=this.r[9];m>=16;)_=g[y+0]&255|(g[y+1]&255)<<8,_e+=_&8191,$=g[y+2]&255|(g[y+3]&255)<<8,be+=(_>>>13|$<<3)&8191,F=g[y+4]&255|(g[y+5]&255)<<8,pe+=($>>>10|F<<6)&8191,J=g[y+6]&255|(g[y+7]&255)<<8,W+=(F>>>7|J<<9)&8191,ae=g[y+8]&255|(g[y+9]&255)<<8,q+=(J>>>4|ae<<12)&8191,re+=ae>>>1&8191,ye=g[y+10]&255|(g[y+11]&255)<<8,X+=(ae>>>14|ye<<2)&8191,ge=g[y+12]&255|(g[y+13]&255)<<8,Z+=(ye>>>11|ge<<5)&8191,rt=g[y+14]&255|(g[y+15]&255)<<8,oe+=(ge>>>8|rt<<8)&8191,ke+=rt>>>5|d,Ae=0,Le=Ae,Le+=_e*We,Le+=be*(5*tt),Le+=pe*(5*et),Le+=W*(5*Ve),Le+=q*(5*st),Ae=Le>>>13,Le&=8191,Le+=re*(5*it),Le+=X*(5*ze),Le+=Z*(5*I),Le+=oe*(5*qe),Le+=ke*(5*Ke),Ae+=Le>>>13,Le&=8191,$e=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*qe,Ee+=X*Ke,Ee+=Z*We,Ee+=oe*(5*tt),Ee+=ke*(5*et),Ae+=Ee>>>13,Ee&=8191,Se=Ae,Se+=_e*et,Se+=be*Ve,Se+=pe*st,Se+=W*it,Se+=q*ze,Ae=Se>>>13,Se&=8191,Se+=re*I,Se+=X*qe,Se+=Z*Ke,Se+=oe*We,Se+=ke*(5*tt),Ae+=Se>>>13,Se&=8191,me=Ae,me+=_e*tt,me+=be*et,me+=pe*Ve,me+=W*st,me+=q*it,Ae=me>>>13,me&=8191,me+=re*ze,me+=X*I,me+=Z*qe,me+=oe*Ke,me+=ke*We,Ae+=me>>>13,me&=8191,Ae=(Ae<<2)+Ae|0,Ae=Ae+Le|0,Le=Ae&8191,Ae=Ae>>>13,$e+=Ae,_e=Le,be=$e,pe=Qe,W=Fe,q=De,re=Me,X=Ue,Z=Ee,oe=Se,ke=me,y+=16,m-=16;this.h[0]=_e,this.h[1]=be,this.h[2]=pe,this.h[3]=W,this.h[4]=q,this.h[5]=re,this.h[6]=X,this.h[7]=Z,this.h[8]=oe,this.h[9]=ke},k.prototype.finish=function(g,y){var m=new Uint16Array(10),d,_,$,F;if(this.leftover){for(F=this.leftover,this.buffer[F++]=1;F<16;F++)this.buffer[F]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(d=this.h[1]>>>13,this.h[1]&=8191,F=2;F<10;F++)this.h[F]+=d,d=this.h[F]>>>13,this.h[F]&=8191;for(this.h[0]+=d*5,d=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=d,d=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=d,m[0]=this.h[0]+5,d=m[0]>>>13,m[0]&=8191,F=1;F<10;F++)m[F]=this.h[F]+d,d=m[F]>>>13,m[F]&=8191;for(m[9]-=8192,_=(d^1)-1,F=0;F<10;F++)m[F]&=_;for(_=~_,F=0;F<10;F++)this.h[F]=this.h[F]&_|m[F];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,$=this.h[0]+this.pad[0],this.h[0]=$&65535,F=1;F<8;F++)$=(this.h[F]+this.pad[F]|0)+($>>>16)|0,this.h[F]=$&65535;g[y+0]=this.h[0]>>>0&255,g[y+1]=this.h[0]>>>8&255,g[y+2]=this.h[1]>>>0&255,g[y+3]=this.h[1]>>>8&255,g[y+4]=this.h[2]>>>0&255,g[y+5]=this.h[2]>>>8&255,g[y+6]=this.h[3]>>>0&255,g[y+7]=this.h[3]>>>8&255,g[y+8]=this.h[4]>>>0&255,g[y+9]=this.h[4]>>>8&255,g[y+10]=this.h[5]>>>0&255,g[y+11]=this.h[5]>>>8&255,g[y+12]=this.h[6]>>>0&255,g[y+13]=this.h[6]>>>8&255,g[y+14]=this.h[7]>>>0&255,g[y+15]=this.h[7]>>>8&255},k.prototype.update=function(g,y,m){var d,_;if(this.leftover){for(_=16-this.leftover,_>m&&(_=m),d=0;d<_;d++)this.buffer[this.leftover+d]=g[y+d];if(m-=_,y+=_,this.leftover+=_,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(m>=16&&(_=m-m%16,this.blocks(g,y,_),y+=_,m-=_),m){for(d=0;d<m;d++)this.buffer[this.leftover+d]=g[y+d];this.leftover+=m}};function v(g,y,m,d,_,$){var F=new k($);return F.update(m,d,_),F.finish(g,y),0}function P(g,y,m,d,_,$){var F=new Uint8Array(16);return v(F,0,m,d,_,$),E(g,y,F,0)}function ne(g,y,m,d,_){var $;if(m<32)return-1;for(w(g,0,y,0,m,d,_),v(g,16,g,32,m-32,g),$=0;$<16;$++)g[$]=0;return 0}function G(g,y,m,d,_){var $,F=new Uint8Array(32);if(m<32||(b(F,0,32,d,_),P(y,16,y,32,m-32,F)!==0))return-1;for(w(g,0,y,0,m,d,_),$=0;$<32;$++)g[$]=0;return 0}function Y(g,y){var m;for(m=0;m<16;m++)g[m]=y[m]|0}function te(g){var y,m,d=1;for(y=0;y<16;y++)m=g[y]+d+65535,d=Math.floor(m/65536),g[y]=m-d*65536;g[0]+=d-1+37*(d-1)}function le(g,y,m){for(var d,_=~(m-1),$=0;$<16;$++)d=_&(g[$]^y[$]),g[$]^=d,y[$]^=d}function M(g,y){var m,d,_,$=t(),F=t();for(m=0;m<16;m++)F[m]=y[m];for(te(F),te(F),te(F),d=0;d<2;d++){for($[0]=F[0]-65517,m=1;m<15;m++)$[m]=F[m]-65535-($[m-1]>>16&1),$[m-1]&=65535;$[15]=F[15]-32767-($[14]>>16&1),_=$[15]>>16&1,$[14]&=65535,le(F,$,1-_)}for(m=0;m<16;m++)g[2*m]=F[m]&255,g[2*m+1]=F[m]>>8}function N(g,y){var m=new Uint8Array(32),d=new Uint8Array(32);return M(m,g),M(d,y),S(m,0,d,0)}function L(g){var y=new Uint8Array(32);return M(y,g),y[0]&1}function K(g,y){var m;for(m=0;m<16;m++)g[m]=y[2*m]+(y[2*m+1]<<8);g[15]&=32767}function ee(g,y,m){for(var d=0;d<16;d++)g[d]=y[d]+m[d]}function ue(g,y,m){for(var d=0;d<16;d++)g[d]=y[d]-m[d]}function ie(g,y,m){var d,_,$=0,F=0,J=0,ae=0,ye=0,ge=0,rt=0,Ae=0,Le=0,$e=0,Qe=0,Fe=0,De=0,Me=0,Ue=0,Ee=0,Se=0,me=0,_e=0,be=0,pe=0,W=0,q=0,re=0,X=0,Z=0,oe=0,ke=0,We=0,Ke=0,qe=0,I=m[0],ze=m[1],it=m[2],st=m[3],Ve=m[4],et=m[5],tt=m[6],Rt=m[7],ut=m[8],kt=m[9],vt=m[10],Bt=m[11],Ut=m[12],qt=m[13],Kt=m[14],Vt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*Rt,W+=d*ut,q+=d*kt,re+=d*vt,X+=d*Bt,Z+=d*Ut,oe+=d*qt,ke+=d*Kt,We+=d*Vt,d=y[14],Ue+=d*I,Ee+=d*ze,Se+=d*it,me+=d*st,_e+=d*Ve,be+=d*et,pe+=d*tt,W+=d*Rt,q+=d*ut,re+=d*kt,X+=d*vt,Z+=d*Bt,oe+=d*Ut,ke+=d*qt,We+=d*Kt,Ke+=d*Vt,d=y[15],Ee+=d*I,Se+=d*ze,me+=d*it,_e+=d*st,be+=d*Ve,pe+=d*et,W+=d*tt,q+=d*Rt,re+=d*ut,X+=d*kt,Z+=d*vt,oe+=d*Bt,ke+=d*Ut,We+=d*qt,Ke+=d*Kt,qe+=d*Vt,$+=38*Se,F+=38*me,J+=38*_e,ae+=38*be,ye+=38*pe,ge+=38*W,rt+=38*q,Ae+=38*re,Le+=38*X,$e+=38*Z,Qe+=38*oe,Fe+=38*ke,De+=38*We,Me+=38*Ke,Ue+=38*qe,_=1,d=$+_+65535,_=Math.floor(d/65536),$=d-_*65536,d=F+_+65535,_=Math.floor(d/65536),F=d-_*65536,d=J+_+65535,_=Math.floor(d/65536),J=d-_*65536,d=ae+_+65535,_=Math.floor(d/65536),ae=d-_*65536,d=ye+_+65535,_=Math.floor(d/65536),ye=d-_*65536,d=ge+_+65535,_=Math.floor(d/65536),ge=d-_*65536,d=rt+_+65535,_=Math.floor(d/65536),rt=d-_*65536,d=Ae+_+65535,_=Math.floor(d/65536),Ae=d-_*65536,d=Le+_+65535,_=Math.floor(d/65536),Le=d-_*65536,d=$e+_+65535,_=Math.floor(d/65536),$e=d-_*65536,d=Qe+_+65535,_=Math.floor(d/65536),Qe=d-_*65536,d=Fe+_+65535,_=Math.floor(d/65536),Fe=d-_*65536,d=De+_+65535,_=Math.floor(d/65536),De=d-_*65536,d=Me+_+65535,_=Math.floor(d/65536),Me=d-_*65536,d=Ue+_+65535,_=Math.floor(d/65536),Ue=d-_*65536,d=Ee+_+65535,_=Math.floor(d/65536),Ee=d-_*65536,$+=_-1+37*(_-1),_=1,d=$+_+65535,_=Math.floor(d/65536),$=d-_*65536,d=F+_+65535,_=Math.floor(d/65536),F=d-_*65536,d=J+_+65535,_=Math.floor(d/65536),J=d-_*65536,d=ae+_+65535,_=Math.floor(d/65536),ae=d-_*65536,d=ye+_+65535,_=Math.floor(d/65536),ye=d-_*65536,d=ge+_+65535,_=Math.floor(d/65536),ge=d-_*65536,d=rt+_+65535,_=Math.floor(d/65536),rt=d-_*65536,d=Ae+_+65535,_=Math.floor(d/65536),Ae=d-_*65536,d=Le+_+65535,_=Math.floor(d/65536),Le=d-_*65536,d=$e+_+65535,_=Math.floor(d/65536),$e=d-_*65536,d=Qe+_+65535,_=Math.floor(d/65536),Qe=d-_*65536,d=Fe+_+65535,_=Math.floor(d/65536),Fe=d-_*65536,d=De+_+65535,_=Math.floor(d/65536),De=d-_*65536,d=Me+_+65535,_=Math.floor(d/65536),Me=d-_*65536,d=Ue+_+65535,_=Math.floor(d/65536),Ue=d-_*65536,d=Ee+_+65535,_=Math.floor(d/65536),Ee=d-_*65536,$+=_-1+37*(_-1),g[0]=$,g[1]=F,g[2]=J,g[3]=ae,g[4]=ye,g[5]=ge,g[6]=rt,g[7]=Ae,g[8]=Le,g[9]=$e,g[10]=Qe,g[11]=Fe,g[12]=De,g[13]=Me,g[14]=Ue,g[15]=Ee}function Xe(g,y){ie(g,y,y)}function ft(g,y){var m=t(),d;for(d=0;d<16;d++)m[d]=y[d];for(d=253;d>=0;d--)Xe(m,m),d!==2&&d!==4&&ie(m,m,y);for(d=0;d<16;d++)g[d]=m[d]}function on(g,y){var m=t(),d;for(d=0;d<16;d++)m[d]=y[d];for(d=250;d>=0;d--)Xe(m,m),d!==1&&ie(m,m,y);for(d=0;d<16;d++)g[d]=m[d]}function yr(g,y,m){var d=new Uint8Array(32),_=new Float64Array(80),$,F,J=t(),ae=t(),ye=t(),ge=t(),rt=t(),Ae=t();for(F=0;F<31;F++)d[F]=y[F];for(d[31]=y[31]&127|64,d[0]&=248,K(_,m),F=0;F<16;F++)ae[F]=_[F],ge[F]=J[F]=ye[F]=0;for(J[0]=ge[0]=1,F=254;F>=0;--F)$=d[F>>>3]>>>(F&7)&1,le(J,ae,$),le(ye,ge,$),ee(rt,J,ye),ue(J,J,ye),ee(ye,ae,ge),ue(ae,ae,ge),Xe(ge,rt),Xe(Ae,J),ie(J,ye,J),ie(ye,ae,rt),ee(rt,J,ye),ue(J,J,ye),Xe(ae,J),ue(ye,ge,Ae),ie(J,ye,a),ee(J,J,ge),ie(ye,ye,J),ie(J,ge,Ae),ie(ge,ae,_),Xe(ae,rt),le(J,ae,$),le(ye,ge,$);for(F=0;F<16;F++)_[F+16]=J[F],_[F+32]=ye[F],_[F+48]=ae[F],_[F+64]=ge[F];var Le=_.subarray(32),$e=_.subarray(16);return ft(Le,Le),ie($e,$e,Le),M(g,$e),0}function Er(g,y){return yr(g,y,s)}function Tn(g,y){return e(y,32),Er(g,y)}function _r(g,y,m){var d=new Uint8Array(32);return yr(d,m,y),C(g,r,d,U)}var si=ne,Ji=G;function oi(g,y,m,d,_,$){var F=new Uint8Array(32);return _r(F,_,$),si(g,y,m,d,F)}function br(g,y,m,d,_,$){var F=new Uint8Array(32);return _r(F,_,$),Ji(g,y,m,d,F)}var Sr=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function j(g,y,m,d){for(var _=new Int32Array(16),$=new Int32Array(16),F,J,ae,ye,ge,rt,Ae,Le,$e,Qe,Fe,De,Me,Ue,Ee,Se,me,_e,be,pe,W,q,re,X,Z,oe,ke=g[0],We=g[1],Ke=g[2],qe=g[3],I=g[4],ze=g[5],it=g[6],st=g[7],Ve=y[0],et=y[1],tt=y[2],Rt=y[3],ut=y[4],kt=y[5],vt=y[6],Bt=y[7],Ut=0;d>=128;){for(be=0;be<16;be++)pe=8*be+Ut,_[be]=m[pe+0]<<24|m[pe+1]<<16|m[pe+2]<<8|m[pe+3],$[be]=m[pe+4]<<24|m[pe+5]<<16|m[pe+6]<<8|m[pe+7];for(be=0;be<80;be++)if(F=ke,J=We,ae=Ke,ye=qe,ge=I,rt=ze,Ae=it,Le=st,$e=Ve,Qe=et,Fe=tt,De=Rt,Me=ut,Ue=kt,Ee=vt,Se=Bt,W=st,q=Bt,re=q&65535,X=q>>>16,Z=W&65535,oe=W>>>16,W=(I>>>14|ut<<18)^(I>>>18|ut<<14)^(ut>>>9|I<<23),q=(ut>>>14|I<<18)^(ut>>>18|I<<14)^(I>>>9|ut<<23),re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,W=I&ze^~I&it,q=ut&kt^~ut&vt,re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,W=Sr[be*2],q=Sr[be*2+1],re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,W=_[be%16],q=$[be%16],re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,X+=re>>>16,Z+=X>>>16,oe+=Z>>>16,me=Z&65535|oe<<16,_e=re&65535|X<<16,W=me,q=_e,re=q&65535,X=q>>>16,Z=W&65535,oe=W>>>16,W=(ke>>>28|Ve<<4)^(Ve>>>2|ke<<30)^(Ve>>>7|ke<<25),q=(Ve>>>28|ke<<4)^(ke>>>2|Ve<<30)^(ke>>>7|Ve<<25),re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,W=ke&We^ke&Ke^We&Ke,q=Ve&et^Ve&tt^et&tt,re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,X+=re>>>16,Z+=X>>>16,oe+=Z>>>16,Le=Z&65535|oe<<16,Se=re&65535|X<<16,W=ye,q=De,re=q&65535,X=q>>>16,Z=W&65535,oe=W>>>16,W=me,q=_e,re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,X+=re>>>16,Z+=X>>>16,oe+=Z>>>16,ye=Z&65535|oe<<16,De=re&65535|X<<16,We=F,Ke=J,qe=ae,I=ye,ze=ge,it=rt,st=Ae,ke=Le,et=$e,tt=Qe,Rt=Fe,ut=De,kt=Me,vt=Ue,Bt=Ee,Ve=Se,be%16===15)for(pe=0;pe<16;pe++)W=_[pe],q=$[pe],re=q&65535,X=q>>>16,Z=W&65535,oe=W>>>16,W=_[(pe+9)%16],q=$[(pe+9)%16],re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,me=_[(pe+1)%16],_e=$[(pe+1)%16],W=(me>>>1|_e<<31)^(me>>>8|_e<<24)^me>>>7,q=(_e>>>1|me<<31)^(_e>>>8|me<<24)^(_e>>>7|me<<25),re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,me=_[(pe+14)%16],_e=$[(pe+14)%16],W=(me>>>19|_e<<13)^(_e>>>29|me<<3)^me>>>6,q=(_e>>>19|me<<13)^(me>>>29|_e<<3)^(_e>>>6|me<<26),re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,X+=re>>>16,Z+=X>>>16,oe+=Z>>>16,_[pe]=Z&65535|oe<<16,$[pe]=re&65535|X<<16;W=ke,q=Ve,re=q&65535,X=q>>>16,Z=W&65535,oe=W>>>16,W=g[0],q=y[0],re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,X+=re>>>16,Z+=X>>>16,oe+=Z>>>16,g[0]=ke=Z&65535|oe<<16,y[0]=Ve=re&65535|X<<16,W=We,q=et,re=q&65535,X=q>>>16,Z=W&65535,oe=W>>>16,W=g[1],q=y[1],re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,X+=re>>>16,Z+=X>>>16,oe+=Z>>>16,g[1]=We=Z&65535|oe<<16,y[1]=et=re&65535|X<<16,W=Ke,q=tt,re=q&65535,X=q>>>16,Z=W&65535,oe=W>>>16,W=g[2],q=y[2],re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,X+=re>>>16,Z+=X>>>16,oe+=Z>>>16,g[2]=Ke=Z&65535|oe<<16,y[2]=tt=re&65535|X<<16,W=qe,q=Rt,re=q&65535,X=q>>>16,Z=W&65535,oe=W>>>16,W=g[3],q=y[3],re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,X+=re>>>16,Z+=X>>>16,oe+=Z>>>16,g[3]=qe=Z&65535|oe<<16,y[3]=Rt=re&65535|X<<16,W=I,q=ut,re=q&65535,X=q>>>16,Z=W&65535,oe=W>>>16,W=g[4],q=y[4],re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,X+=re>>>16,Z+=X>>>16,oe+=Z>>>16,g[4]=I=Z&65535|oe<<16,y[4]=ut=re&65535|X<<16,W=ze,q=kt,re=q&65535,X=q>>>16,Z=W&65535,oe=W>>>16,W=g[5],q=y[5],re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,X+=re>>>16,Z+=X>>>16,oe+=Z>>>16,g[5]=ze=Z&65535|oe<<16,y[5]=kt=re&65535|X<<16,W=it,q=vt,re=q&65535,X=q>>>16,Z=W&65535,oe=W>>>16,W=g[6],q=y[6],re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,X+=re>>>16,Z+=X>>>16,oe+=Z>>>16,g[6]=it=Z&65535|oe<<16,y[6]=vt=re&65535|X<<16,W=st,q=Bt,re=q&65535,X=q>>>16,Z=W&65535,oe=W>>>16,W=g[7],q=y[7],re+=q&65535,X+=q>>>16,Z+=W&65535,oe+=W>>>16,X+=re>>>16,Z+=X>>>16,oe+=Z>>>16,g[7]=st=Z&65535|oe<<16,y[7]=Bt=re&65535|X<<16,Ut+=128,d-=128}return d}function he(g,y,m){var d=new Int32Array(8),_=new Int32Array(8),$=new Uint8Array(256),F,J=m;for(d[0]=1779033703,d[1]=3144134277,d[2]=1013904242,d[3]=2773480762,d[4]=1359893119,d[5]=2600822924,d[6]=528734635,d[7]=1541459225,_[0]=4089235720,_[1]=2227873595,_[2]=4271175723,_[3]=1595750129,_[4]=2917565137,_[5]=725511199,_[6]=4215389547,_[7]=327033209,j(d,_,y,m),m%=128,F=0;F<m;F++)$[F]=y[J-m+F];for($[m]=128,m=256-128*(m<112?1:0),$[m-9]=0,p($,m-8,J/536870912|0,J<<3),j(d,_,$,m),F=0;F<8;F++)p(g,8*F,d[F],_[F]);return 0}function xe(g,y){var m=t(),d=t(),_=t(),$=t(),F=t(),J=t(),ae=t(),ye=t(),ge=t();ue(m,g[1],g[0]),ue(ge,y[1],y[0]),ie(m,m,ge),ee(d,g[0],g[1]),ee(ge,y[0],y[1]),ie(d,d,ge),ie(_,g[3],y[3]),ie(_,_,l),ie($,g[2],y[2]),ee($,$,$),ue(F,d,m),ue(J,$,_),ee(ae,$,_),ee(ye,d,m),ie(g[0],F,J),ie(g[1],ye,ae),ie(g[2],ae,J),ie(g[3],F,ye)}function Te(g,y,m){var d;for(d=0;d<4;d++)le(g[d],y[d],m)}function Je(g,y){var m=t(),d=t(),_=t();ft(_,y[2]),ie(m,y[0],_),ie(d,y[1],_),M(g,d),g[31]^=L(m)<<7}function Lt(g,y,m){var d,_;for(Y(g[0],i),Y(g[1],o),Y(g[2],o),Y(g[3],i),_=255;_>=0;--_)d=m[_/8|0]>>(_&7)&1,Te(g,y,d),xe(y,g),xe(g,g),Te(g,y,d)}function In(g,y){var m=[t(),t(),t(),t()];Y(m[0],f),Y(m[1],u),Y(m[2],o),ie(m[3],f,u),Lt(g,m,y)}function an(g,y,m){var d=new Uint8Array(64),_=[t(),t(),t(),t()],$;for(m||e(y,32),he(d,y,32),d[0]&=248,d[31]&=127,d[31]|=64,In(_,d),Je(g,_),$=0;$<32;$++)y[$+32]=g[$];return 0}var xr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function at(g,y){var m,d,_,$;for(d=63;d>=32;--d){for(m=0,_=d-32,$=d-12;_<$;++_)y[_]+=m-16*y[d]*xr[_-(d-32)],m=y[_]+128>>8,y[_]-=m*256;y[_]+=m,y[d]=0}for(m=0,_=0;_<32;_++)y[_]+=m-(y[31]>>4)*xr[_],m=y[_]>>8,y[_]&=255;for(_=0;_<32;_++)y[_]-=m*xr[_];for(d=0;d<32;d++)y[d+1]+=y[d]>>8,g[d]=y[d]&255}function Mt(g){var y=new Float64Array(64),m;for(m=0;m<64;m++)y[m]=g[m];for(m=0;m<64;m++)g[m]=0;at(g,y)}function Dt(g,y,m,d){var _=new Uint8Array(64),$=new Uint8Array(64),F=new Uint8Array(64),J,ae,ye=new Float64Array(64),ge=[t(),t(),t(),t()];he(_,d,32),_[0]&=248,_[31]&=127,_[31]|=64;var rt=m+64;for(J=0;J<m;J++)g[64+J]=y[J];for(J=0;J<32;J++)g[32+J]=_[32+J];for(he(F,g.subarray(32),m+32),Mt(F),In(ge,F),Je(g,ge),J=32;J<64;J++)g[J]=d[J];for(he($,g,m+64),Mt($),J=0;J<64;J++)ye[J]=0;for(J=0;J<32;J++)ye[J]=F[J];for(J=0;J<32;J++)for(ae=0;ae<32;ae++)ye[J+ae]+=$[J]*_[ae];return at(g.subarray(32),ye),rt}function It(g,y){var m=t(),d=t(),_=t(),$=t(),F=t(),J=t(),ae=t();return Y(g[2],o),K(g[1],y),Xe(_,g[1]),ie($,_,c),ue(_,_,g[2]),ee($,g[2],$),Xe(F,$),Xe(J,F),ie(ae,J,F),ie(m,ae,_),ie(m,m,$),on(m,m),ie(m,m,_),ie(m,m,$),ie(m,m,$),ie(g[0],m,$),Xe(d,g[0]),ie(d,d,$),N(d,_)&&ie(g[0],g[0],h),Xe(d,g[0]),ie(d,d,$),N(d,_)?-1:(L(g[0])===y[31]>>7&&ue(g[0],i,g[0]),ie(g[3],g[0],g[1]),0)}function gt(g,y,m,d){var _,$,F=new Uint8Array(32),J=new Uint8Array(64),ae=[t(),t(),t(),t()],ye=[t(),t(),t(),t()];if($=-1,m<64||It(ye,d))return-1;for(_=0;_<m;_++)g[_]=y[_];for(_=0;_<32;_++)g[_+32]=d[_];if(he(J,g,m),Mt(J),Lt(ae,ye,J),In(ye,y.subarray(32)),xe(ae,ye),Je(F,ae),m-=64,S(y,0,F,0)){for(_=0;_<m;_++)g[_]=0;return-1}for(_=0;_<m;_++)g[_]=y[_+64];return $=m,$}var dn=32,Ct=24,ar=32,wr=16,ai=32,Zi=32,ci=32,li=32,go=32,Dc=Ct,lp=ar,fp=wr,Ln=64,cr=32,Ir=64,mo=32,Ao=64;n.lowlevel={crypto_core_hsalsa20:C,crypto_stream_xor:w,crypto_stream:b,crypto_stream_salsa20_xor:Q,crypto_stream_salsa20:B,crypto_onetimeauth:v,crypto_onetimeauth_verify:P,crypto_verify_16:E,crypto_verify_32:S,crypto_secretbox:ne,crypto_secretbox_open:G,crypto_scalarmult:yr,crypto_scalarmult_base:Er,crypto_box_beforenm:_r,crypto_box_afternm:si,crypto_box:oi,crypto_box_open:br,crypto_box_keypair:Tn,crypto_hash:he,crypto_sign:Dt,crypto_sign_keypair:an,crypto_sign_open:gt,crypto_secretbox_KEYBYTES:dn,crypto_secretbox_NONCEBYTES:Ct,crypto_secretbox_ZEROBYTES:ar,crypto_secretbox_BOXZEROBYTES:wr,crypto_scalarmult_BYTES:ai,crypto_scalarmult_SCALARBYTES:Zi,crypto_box_PUBLICKEYBYTES:ci,crypto_box_SECRETKEYBYTES:li,crypto_box_BEFORENMBYTES:go,crypto_box_NONCEBYTES:Dc,crypto_box_ZEROBYTES:lp,crypto_box_BOXZEROBYTES:fp,crypto_sign_BYTES:Ln,crypto_sign_PUBLICKEYBYTES:cr,crypto_sign_SECRETKEYBYTES:Ir,crypto_sign_SEEDBYTES:mo,crypto_hash_BYTES:Ao};function Uc(g,y){if(g.length!==dn)throw new Error("bad key size");if(y.length!==Ct)throw new Error("bad nonce size")}function up(g,y){if(g.length!==ci)throw new Error("bad public key size");if(y.length!==li)throw new Error("bad secret key size")}function cn(){var g,y;for(y=0;y<arguments.length;y++)if((g=Object.prototype.toString.call(arguments[y]))!=="[object Uint8Array]")throw new TypeError("unexpected type "+g+", use Uint8Array")}function Mc(g){for(var y=0;y<g.length;y++)g[y]=0}n.util||(n.util={},n.util.decodeUTF8=n.util.encodeUTF8=n.util.encodeBase64=n.util.decodeBase64=function(){throw new Error("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js")}),n.randomBytes=function(g){var y=new Uint8Array(g);return e(y,g),y},n.secretbox=function(g,y,m){cn(g,y,m),Uc(m,y);for(var d=new Uint8Array(ar+g.length),_=new Uint8Array(d.length),$=0;$<g.length;$++)d[$+ar]=g[$];return ne(_,d,d.length,y,m),_.subarray(wr)},n.secretbox.open=function(g,y,m){cn(g,y,m),Uc(m,y);for(var d=new Uint8Array(wr+g.length),_=new Uint8Array(d.length),$=0;$<g.length;$++)d[$+wr]=g[$];return d.length<32||G(_,d,d.length,y,m)!==0?!1:_.subarray(ar)},n.secretbox.keyLength=dn,n.secretbox.nonceLength=Ct,n.secretbox.overheadLength=wr,n.scalarMult=function(g,y){if(cn(g,y),g.length!==Zi)throw new Error("bad n size");if(y.length!==ai)throw new Error("bad p size");var m=new Uint8Array(ai);return yr(m,g,y),m},n.scalarMult.base=function(g){if(cn(g),g.length!==Zi)throw new Error("bad n size");var y=new Uint8Array(ai);return Er(y,g),y},n.scalarMult.scalarLength=Zi,n.scalarMult.groupElementLength=ai,n.box=function(g,y,m,d){var _=n.box.before(m,d);return n.secretbox(g,y,_)},n.box.before=function(g,y){cn(g,y),up(g,y);var m=new Uint8Array(go);return _r(m,g,y),m},n.box.after=n.secretbox,n.box.open=function(g,y,m,d){var _=n.box.before(m,d);return n.secretbox.open(g,y,_)},n.box.open.after=n.secretbox.open,n.box.keyPair=function(){var g=new Uint8Array(ci),y=new Uint8Array(li);return Tn(g,y),{publicKey:g,secretKey:y}},n.box.keyPair.fromSecretKey=function(g){if(cn(g),g.length!==li)throw new Error("bad secret key size");var y=new Uint8Array(ci);return Er(y,g),{publicKey:y,secretKey:new Uint8Array(g)}},n.box.publicKeyLength=ci,n.box.secretKeyLength=li,n.box.sharedKeyLength=go,n.box.nonceLength=Dc,n.box.overheadLength=n.secretbox.overheadLength,n.sign=function(g,y){if(cn(g,y),y.length!==Ir)throw new Error("bad secret key size");var m=new Uint8Array(Ln+g.length);return Dt(m,g,g.length,y),m},n.sign.open=function(g,y){if(arguments.length!==2)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(cn(g,y),y.length!==cr)throw new Error("bad public key size");var m=new Uint8Array(g.length),d=gt(m,g,g.length,y);if(d<0)return null;for(var _=new Uint8Array(d),$=0;$<_.length;$++)_[$]=m[$];return _},n.sign.detached=function(g,y){for(var m=n.sign(g,y),d=new Uint8Array(Ln),_=0;_<d.length;_++)d[_]=m[_];return d},n.sign.detached.verify=function(g,y,m){if(cn(g,y,m),y.length!==Ln)throw new Error("bad signature size");if(m.length!==cr)throw new Error("bad public key size");var d=new Uint8Array(Ln+g.length),_=new Uint8Array(Ln+g.length),$;for($=0;$<Ln;$++)d[$]=y[$];for($=0;$<g.length;$++)d[$+Ln]=g[$];return gt(_,d,d.length,m)>=0},n.sign.keyPair=function(){var g=new Uint8Array(cr),y=new Uint8Array(Ir);return an(g,y),{publicKey:g,secretKey:y}},n.sign.keyPair.fromSecretKey=function(g){if(cn(g),g.length!==Ir)throw new Error("bad secret key size");for(var y=new Uint8Array(cr),m=0;m<y.length;m++)y[m]=g[32+m];return{publicKey:y,secretKey:new Uint8Array(g)}},n.sign.keyPair.fromSeed=function(g){if(cn(g),g.length!==mo)throw new Error("bad seed size");for(var y=new Uint8Array(cr),m=new Uint8Array(Ir),d=0;d<32;d++)m[d]=g[d];return an(y,m,!0),{publicKey:y,secretKey:m}},n.sign.publicKeyLength=cr,n.sign.secretKeyLength=Ir,n.sign.seedLength=mo,n.sign.signatureLength=Ln,n.hash=function(g){cn(g);var y=new Uint8Array(Ao);return he(y,g,g.length),y},n.hash.hashLength=Ao,n.verify=function(g,y){return cn(g,y),g.length===0||y.length===0||g.length!==y.length?!1:A(g,0,y,0,g.length)===0},n.setPRNG=function(g){e=g},(function(){var g=typeof self<"u"?self.crypto||self.msCrypto:null;if(g&&g.getRandomValues){var y=65536;n.setPRNG(function(m,d){var _,$=new Uint8Array(d);for(_=0;_<d;_+=y)g.getRandomValues($.subarray(_,_+Math.min(d-_,y)));for(_=0;_<d;_++)m[_]=$[_];Mc($)})}else typeof require<"u"&&(g=require("crypto"),g&&g.randomBytes&&n.setPRNG(function(m,d){var _,$=g.randomBytes(d);for(_=0;_<d;_++)m[_]=$[_];Mc($)}))})()})(typeof xs<"u"&&xs.exports?xs.exports:self.nacl=self.nacl||{})});var Oo=lt((cx,fu)=>{"use strict";var Do=lu().lowlevel.crypto_hash,Mn=0,ur=function(){this.S=[new Uint32Array([3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946]),new Uint32Array([1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055]),new Uint32Array([3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504]),new Uint32Array([976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462])],this.P=new Uint32Array([608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731])};function Is(n,t,e){return(n[0][t[e+3]]+n[1][t[e+2]]^n[2][t[e+1]])+n[3][t[e]]}ur.prototype.encipher=function(n,t){t===void 0&&(t=new Uint8Array(n.buffer),n.byteOffset!==0&&(t=t.subarray(n.byteOffset))),n[0]^=this.P[0];for(var e=1;e<16;e+=2)n[1]^=Is(this.S,t,0)^this.P[e],n[0]^=Is(this.S,t,4)^this.P[e+1];var r=n[0];n[0]=n[1]^this.P[17],n[1]=r};ur.prototype.decipher=function(n){var t=new Uint8Array(n.buffer);n.byteOffset!==0&&(t=t.subarray(n.byteOffset)),n[0]^=this.P[17];for(var e=16;e>0;e-=2)n[1]^=Is(this.S,t,0)^this.P[e],n[0]^=Is(this.S,t,4)^this.P[e-1];var r=n[0];n[0]=n[1]^this.P[0],n[1]=r};function fr(n,t){var e,r=0;for(e=0;e<4;e++,Mn++)Mn>=t&&(Mn=0),r=r<<8|n[Mn];return r}ur.prototype.expand0state=function(n,t){var e=new Uint32Array(2),r,s,i=new Uint8Array(e.buffer);for(r=0,Mn=0;r<18;r++)this.P[r]^=fr(n,t);for(Mn=0,r=0;r<18;r+=2)this.encipher(e,i),this.P[r]=e[0],this.P[r+1]=e[1];for(r=0;r<4;r++)for(s=0;s<256;s+=2)this.encipher(e,i),this.S[r][s]=e[0],this.S[r][s+1]=e[1]};ur.prototype.expandstate=function(n,t,e,r){var s=new Uint32Array(2),i,o;for(i=0,Mn=0;i<18;i++)this.P[i]^=fr(e,r);for(i=0,Mn=0;i<18;i+=2)s[0]^=fr(n,t),s[1]^=fr(n,t),this.encipher(s),this.P[i]=s[0],this.P[i+1]=s[1];for(i=0;i<4;i++)for(o=0;o<256;o+=2)s[0]^=fr(n,t),s[1]^=fr(n,t),this.encipher(s),this.S[i][o]=s[0],this.S[i][o+1]=s[1];Mn=0};ur.prototype.enc=function(n,t){for(var e=0;e<t;e++)this.encipher(n.subarray(e*2))};ur.prototype.dec=function(n,t){for(var e=0;e<t;e++)this.decipher(n.subarray(e*2))};var ws=8,Uo=32;function Mo(n,t,e){var r=new ur,s=new Uint32Array(ws),i,o=new Uint8Array([79,120,121,99,104,114,111,109,97,116,105,99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109,105,116,101]);for(r.expandstate(t,64,n,64),i=0;i<64;i++)r.expand0state(t,64),r.expand0state(n,64);for(i=0;i<ws;i++)s[i]=fr(o,o.byteLength);for(i=0;i<64;i++)r.enc(s,s.byteLength/8);for(i=0;i<ws;i++)e[4*i+3]=s[i]>>>24,e[4*i+2]=s[i]>>>16,e[4*i+1]=s[i]>>>8,e[4*i+0]=s[i]}function Ug(n,t,e,r,s,i,o){var a=new Uint8Array(64),c=new Uint8Array(64),l=new Uint8Array(Uo),f=new Uint8Array(Uo),u=new Uint8Array(r+4),h,p,A,E,S,x,R=i;if(o<1||t===0||r===0||i===0||i>l.byteLength*l.byteLength||r>1<<20)return-1;for(E=Math.floor((i+l.byteLength-1)/l.byteLength),A=Math.floor((i+E-1)/E),h=0;h<r;h++)u[h]=e[h];for(Do(a,n,t),x=1;i>0;x++){for(u[r+0]=x>>>24,u[r+1]=x>>>16,u[r+2]=x>>>8,u[r+3]=x,Do(c,u,r+4),Mo(a,c,f),h=l.byteLength;h--;)l[h]=f[h];for(h=1;h<o;h++)for(Do(c,f,f.byteLength),Mo(a,c,f),p=0;p<l.byteLength;p++)l[p]^=f[p];for(A=Math.min(A,i),h=0;h<A&&(S=h*E+(x-1),!(S>=R));h++)s[S]=l[h];i-=h}return 0}fu.exports={BLOCKS:ws,HASHSIZE:Uo,hash:Mo,pbkdf:Ug}});var Fn=lt((lx,ks)=>{"use strict";var On=require("crypto"),Ur;try{Ur=require("cpu-features")()}catch{}var{bindingAvailable:uu,CIPHER_INFO:Mg,MAC_INFO:Og}=Xn(),du=(()=>{if(typeof On.sign=="function"&&typeof On.verify=="function"){let n=`-----BEGIN PRIVATE KEY-----\r
2
3
  MC4CAQAwBQYDK2VwBCIEIHKj+sVa9WcD/q2DJUJaf43Kptc8xYuUQA4bOFj9vC8T\r
3
4
  -----END PRIVATE KEY-----`,t=Buffer.from("a"),e,r;try{e=On.sign(null,t,n),r=On.verify(null,t,n,e)}catch{}return Buffer.isBuffer(e)&&e.length===64&&r===!0}return!1})(),hu=typeof On.diffieHellman=="function"&&typeof On.generateKeyPairSync=="function"&&typeof On.createPublicKey=="function",Cs=["ecdh-sha2-nistp256","ecdh-sha2-nistp384","ecdh-sha2-nistp521","diffie-hellman-group-exchange-sha256","diffie-hellman-group14-sha256","diffie-hellman-group15-sha512","diffie-hellman-group16-sha512","diffie-hellman-group17-sha512","diffie-hellman-group18-sha512"];hu&&(Cs.unshift("curve25519-sha256"),Cs.unshift("curve25519-sha256@libssh.org"));var Fg=Cs.concat(["diffie-hellman-group-exchange-sha1","diffie-hellman-group14-sha1","diffie-hellman-group1-sha1"]),Fo=["ecdsa-sha2-nistp256","ecdsa-sha2-nistp384","ecdsa-sha2-nistp521","rsa-sha2-512","rsa-sha2-256","ssh-rsa"];du&&Fo.unshift("ssh-ed25519");var Hg=Fo.concat(["ssh-dss"]),pu=(()=>{let n=On.getCiphers();return t=>n.includes(Mg[t].sslName)})(),jn=["aes128-gcm@openssh.com","aes256-gcm@openssh.com","aes128-ctr","aes192-ctr","aes256-ctr"];Ur&&Ur.flags&&!Ur.flags.aes?uu?jn.unshift("chacha20-poly1305@openssh.com"):jn.push("chacha20-poly1305@openssh.com"):uu&&Ur&&Ur.arch==="x86"?jn.splice(4,0,"chacha20-poly1305@openssh.com"):jn.push("chacha20-poly1305@openssh.com");jn=jn.filter(pu);var Qg=jn.concat(["aes256-cbc","aes192-cbc","aes128-cbc","blowfish-cbc","3des-cbc","aes128-gcm","aes256-gcm","arcfour256","arcfour128","cast128-cbc","arcfour"].filter(pu)),gu=(()=>{let n=On.getHashes();return t=>n.includes(Og[t].sslName)})(),mu=["hmac-sha2-256-etm@openssh.com","hmac-sha2-512-etm@openssh.com","hmac-sha1-etm@openssh.com","hmac-sha2-256","hmac-sha2-512","hmac-sha1"].filter(gu),Wg=mu.concat(["hmac-md5","hmac-sha2-256-96","hmac-sha2-512-96","hmac-ripemd160","hmac-sha1-96","hmac-md5-96"].filter(gu)),Au=["none","zlib@openssh.com","zlib"],qg=Au.concat([]),Dr={BAD_DHGEX:1,OLD_EXIT:2,DYN_RPORT_BUG:4,BUG_DHGEX_LARGE:8,IMPLY_RSA_SHA2_SIGALGS:16};ks.exports={MESSAGE:{DISCONNECT:1,IGNORE:2,UNIMPLEMENTED:3,DEBUG:4,SERVICE_REQUEST:5,SERVICE_ACCEPT:6,EXT_INFO:7,KEXINIT:20,NEWKEYS:21,KEXDH_INIT:30,KEXDH_REPLY:31,KEXDH_GEX_GROUP:31,KEXDH_GEX_INIT:32,KEXDH_GEX_REPLY:33,KEXDH_GEX_REQUEST:34,KEXECDH_INIT:30,KEXECDH_REPLY:31,USERAUTH_REQUEST:50,USERAUTH_FAILURE:51,USERAUTH_SUCCESS:52,USERAUTH_BANNER:53,USERAUTH_PASSWD_CHANGEREQ:60,USERAUTH_PK_OK:60,USERAUTH_INFO_REQUEST:60,USERAUTH_INFO_RESPONSE:61,GLOBAL_REQUEST:80,REQUEST_SUCCESS:81,REQUEST_FAILURE:82,CHANNEL_OPEN:90,CHANNEL_OPEN_CONFIRMATION:91,CHANNEL_OPEN_FAILURE:92,CHANNEL_WINDOW_ADJUST:93,CHANNEL_DATA:94,CHANNEL_EXTENDED_DATA:95,CHANNEL_EOF:96,CHANNEL_CLOSE:97,CHANNEL_REQUEST:98,CHANNEL_SUCCESS:99,CHANNEL_FAILURE:100},DISCONNECT_REASON:{HOST_NOT_ALLOWED_TO_CONNECT:1,PROTOCOL_ERROR:2,KEY_EXCHANGE_FAILED:3,RESERVED:4,MAC_ERROR:5,COMPRESSION_ERROR:6,SERVICE_NOT_AVAILABLE:7,PROTOCOL_VERSION_NOT_SUPPORTED:8,HOST_KEY_NOT_VERIFIABLE:9,CONNECTION_LOST:10,BY_APPLICATION:11,TOO_MANY_CONNECTIONS:12,AUTH_CANCELED_BY_USER:13,NO_MORE_AUTH_METHODS_AVAILABLE:14,ILLEGAL_USER_NAME:15},DISCONNECT_REASON_STR:void 0,CHANNEL_OPEN_FAILURE:{ADMINISTRATIVELY_PROHIBITED:1,CONNECT_FAILED:2,UNKNOWN_CHANNEL_TYPE:3,RESOURCE_SHORTAGE:4},TERMINAL_MODE:{TTY_OP_END:0,VINTR:1,VQUIT:2,VERASE:3,VKILL:4,VEOF:5,VEOL:6,VEOL2:7,VSTART:8,VSTOP:9,VSUSP:10,VDSUSP:11,VREPRINT:12,VWERASE:13,VLNEXT:14,VFLUSH:15,VSWTCH:16,VSTATUS:17,VDISCARD:18,IGNPAR:30,PARMRK:31,INPCK:32,ISTRIP:33,INLCR:34,IGNCR:35,ICRNL:36,IUCLC:37,IXON:38,IXANY:39,IXOFF:40,IMAXBEL:41,ISIG:50,ICANON:51,XCASE:52,ECHO:53,ECHOE:54,ECHOK:55,ECHONL:56,NOFLSH:57,TOSTOP:58,IEXTEN:59,ECHOCTL:60,ECHOKE:61,PENDIN:62,OPOST:70,OLCUC:71,ONLCR:72,OCRNL:73,ONOCR:74,ONLRET:75,CS7:90,CS8:91,PARENB:92,PARODD:93,TTY_OP_ISPEED:128,TTY_OP_OSPEED:129},CHANNEL_EXTENDED_DATATYPE:{STDERR:1},SIGNALS:["ABRT","ALRM","FPE","HUP","ILL","INT","QUIT","SEGV","TERM","USR1","USR2","KILL","PIPE"].reduce((n,t)=>({...n,[t]:1}),{}),COMPAT:Dr,COMPAT_CHECKS:[["Cisco-1.25",Dr.BAD_DHGEX],[/^Cisco-1[.]/,Dr.BUG_DHGEX_LARGE],[/^[0-9.]+$/,Dr.OLD_EXIT],[/^OpenSSH_5[.][0-9]+/,Dr.DYN_RPORT_BUG],[/^OpenSSH_7[.]4/,Dr.IMPLY_RSA_SHA2_SIGALGS]],DEFAULT_KEX:Cs,SUPPORTED_KEX:Fg,DEFAULT_SERVER_HOST_KEY:Fo,SUPPORTED_SERVER_HOST_KEY:Hg,DEFAULT_CIPHER:jn,SUPPORTED_CIPHER:Qg,DEFAULT_MAC:mu,SUPPORTED_MAC:Wg,DEFAULT_COMPRESSION:Au,SUPPORTED_COMPRESSION:qg,curve25519Supported:hu,eddsaSupported:du};ks.exports.DISCONNECT_REASON_BY_VALUE=Array.from(Object.entries(ks.exports.DISCONNECT_REASON)).reduce((n,[t,e])=>({...n,[e]:t}),{})});var _n=lt((fx,bu)=>{"use strict";var mn=yi().Ber,vs,_u=Buffer[Symbol.species],Kg=Object.getPrototypeOf(Uint8Array.prototype).fill;function yu(n,t){return n[t++]*16777216+n[t++]*65536+n[t++]*256+n[t]}function Ei(n,t,e,r,s){s||(s=0),r>n.length&&(r=n.length);let i=r-e,o=t.length-s;return i>o&&(i=o),t.set(new Uint8Array(n.buffer,n.byteOffset+e,i),s),i}function _i(n,t,e){return e===void 0&&(e=n.length),new _u(n.buffer,n.byteOffset+t,e-t)}function Qo(){let n=0,t,e={init:(r,s)=>{t=r,n=typeof s=="number"?s:0},pos:()=>n,length:()=>t?t.length:0,avail:()=>t&&n<t.length?t.length-n:0,clear:()=>{t=void 0},readUInt32BE:()=>{if(!(!t||n+3>=t.length))return t[n++]*16777216+t[n++]*65536+t[n++]*256+t[n++]},readUInt64BE:r=>{if(!(!t||n+7>=t.length))switch(r){case"always":return BigInt(`0x${t.hexSlice(n,n+=8)}`);case"maybe":if(t[n]>31)return BigInt(`0x${t.hexSlice(n,n+=8)}`);default:return t[n++]*72057594037927940+t[n++]*281474976710656+t[n++]*1099511627776+t[n++]*4294967296+t[n++]*16777216+t[n++]*65536+t[n++]*256+t[n++]}},skip:r=>{t&&r>0&&(n+=r)},skipString:()=>{let r=e.readUInt32BE();if(r!==void 0)return n+=r,n<=t.length?r:void 0},readByte:()=>{if(t&&n<t.length)return t[n++]},readBool:()=>{if(t&&n<t.length)return!!t[n++]},readList:()=>{let r=e.readString(!0);if(r!==void 0)return r?r.split(","):[]},readString:(r,s)=>{typeof r=="number"&&(s=r,r=void 0);let i=e.readUInt32BE();if(i!==void 0&&!(t.length-n<i||typeof s=="number"&&i>s))return r?Buffer.isBuffer(r)?Ei(t,r,n,n+=i):t.utf8Slice(n,n+=i):_i(t,n,n+=i)},readRaw:r=>{if(t){if(typeof r!="number")return _i(t,n,n+=t.length-n);if(t.length-n>=r)return _i(t,n,n+=r)}}};return e}function Eu(n,t,e){let r=new Error(n);return typeof t=="boolean"?(e=t,r.level="protocol"):r.level=t||"protocol",r.fatal=!!e,r}function Ho(n,t,e){return n[e++]=t>>>24,n[e++]=t>>>16,n[e++]=t>>>8,n[e++]=t,e}var Bs=Qo();bu.exports={bufferCopy:Ei,bufferSlice:_i,FastBuffer:_u,bufferFill:(n,t,e,r)=>Kg.call(n,t,e,r),makeError:Eu,doFatalError:(n,t,e,r)=>{let s;return vs===void 0&&({DISCONNECT_REASON:vs}=Fn()),t instanceof Error?(s=t,typeof e!="number"?r=vs.PROTOCOL_ERROR:r=e):s=Eu(t,e,!0),typeof r!="number"&&(r=vs.PROTOCOL_ERROR),n.disconnect(r),n._destruct(),n._onError(s),1/0},readUInt32BE:yu,writeUInt32BE:Ho,writeUInt32LE:(n,t,e)=>(n[e++]=t,n[e++]=t>>>8,n[e++]=t>>>16,n[e++]=t>>>24,e),makeBufferParser:Qo,bufferParser:Qo(),readString:(n,t,e,r)=>{typeof e=="number"&&(r=e,e=void 0),t===void 0&&(t=0);let s=n.length-t;if(t<0||t>=n.length||s<4)return;let i=yu(n,t);if(s<4+i||typeof r=="number"&&i>r)return;t+=4;let o=t+i;return n._pos=o,e?Buffer.isBuffer(e)?Ei(n,e,t,o):n.utf8Slice(t,o):_i(n,t,o)},sigSSHToASN1:(n,t)=>{switch(t){case"ssh-dss":{if(n.length>40)return n;let e=new mn.Writer;e.startSequence();let r=n.slice(0,20),s=n.slice(20);if(r[0]&128){let i=Buffer.allocUnsafe(21);i[0]=0,r.copy(i,1),r=i}else r[0]===0&&!(r[1]&128)&&(r=r.slice(1));if(s[0]&128){let i=Buffer.allocUnsafe(21);i[0]=0,s.copy(i,1),s=i}else s[0]===0&&!(s[1]&128)&&(s=s.slice(1));return e.writeBuffer(r,mn.Integer),e.writeBuffer(s,mn.Integer),e.endSequence(),e.buffer}case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":case"ecdsa-sha2-nistp521":{Bs.init(n,0);let e=Bs.readString(),r=Bs.readString();if(Bs.clear(),e===void 0||r===void 0)return;let s=new mn.Writer;return s.startSequence(),s.writeBuffer(e,mn.Integer),s.writeBuffer(r,mn.Integer),s.endSequence(),s.buffer}default:return n}},convertSignature:(n,t)=>{switch(t){case"ssh-dss":{if(n.length<=40)return n;let e=new mn.Reader(n);e.readSequence();let r=e.readString(mn.Integer,!0),s=e.readString(mn.Integer,!0),i=0,o=0;if(r.length<20){let c=Buffer.allocUnsafe(20);c.set(r,1),r=c,r[0]=0}if(s.length<20){let c=Buffer.allocUnsafe(20);c.set(s,1),s=c,s[0]=0}r.length>20&&r[0]===0&&(i=1),s.length>20&&s[0]===0&&(o=1);let a=Buffer.allocUnsafe(r.length-i+(s.length-o));return Ei(r,a,i,r.length,0),Ei(s,a,o,s.length,r.length-i),a}case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":case"ecdsa-sha2-nistp521":{if(n[0]===0)return n;let e=new mn.Reader(n);e.readSequence();let r=e.readString(mn.Integer,!0),s=e.readString(mn.Integer,!0);if(r===null||s===null)return;let i=Buffer.allocUnsafe(4+r.length+4+s.length);return Ho(i,r.length,0),i.set(r,4),Ho(i,s.length,4+r.length),i.set(s,8+r.length),i}}return n},sendPacket:(n,t,e)=>!e&&n._kexinit!==void 0?(n._queue===void 0&&(n._queue=[]),n._queue.push(t),n._debug&&n._debug("Outbound: ... packet queued"),!1):(n._cipher.encrypt(t),!0)}});var Su=lt((Rs,qo)=>{var Wo=(function(){var n=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(n=n||__filename),(function(t){t=t||{};var e;e||(e=typeof t<"u"?t:{});var r,s;e.ready=new Promise(function(j,he){r=j,s=he});var i={},o;for(o in e)e.hasOwnProperty(o)&&(i[o]=e[o]);var a=typeof window=="object",c=typeof importScripts=="function",l=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",f="",u,h,p,A,E;l?(f=c?require("path").dirname(f)+"/":__dirname+"/",u=function(j,he){var xe=Tn(j);return xe?he?xe:xe.toString():(A||(A=require("fs")),E||(E=require("path")),j=E.normalize(j),A.readFileSync(j,he?null:"utf8"))},p=function(j){return j=u(j,!0),j.buffer||(j=new Uint8Array(j)),U(j.buffer),j},h=function(j,he,xe){var Te=Tn(j);Te&&he(Te),A||(A=require("fs")),E||(E=require("path")),j=E.normalize(j),A.readFile(j,function(Je,Lt){Je?xe(Je):he(Lt.buffer)})},1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),e.inspect=function(){return"[Emscripten Module object]"}):(a||c)&&(c?f=self.location.href:typeof document<"u"&&document.currentScript&&(f=document.currentScript.src),n&&(f=n),f.indexOf("blob:")!==0?f=f.substr(0,f.lastIndexOf("/")+1):f="",u=function(j){try{var he=new XMLHttpRequest;return he.open("GET",j,!1),he.send(null),he.responseText}catch(Je){if(j=Tn(j)){he=[];for(var xe=0;xe<j.length;xe++){var Te=j[xe];255<Te&&(yr&&U(!1,"Character code "+Te+" ("+String.fromCharCode(Te)+") at offset "+xe+" not in 0x00-0xFF."),Te&=255),he.push(String.fromCharCode(Te))}return he.join("")}throw Je}},c&&(p=function(j){try{var he=new XMLHttpRequest;return he.open("GET",j,!1),he.responseType="arraybuffer",he.send(null),new Uint8Array(he.response)}catch(xe){if(j=Tn(j))return j;throw xe}}),h=function(j,he,xe){var Te=new XMLHttpRequest;Te.open("GET",j,!0),Te.responseType="arraybuffer",Te.onload=function(){if(Te.status==200||Te.status==0&&Te.response)he(Te.response);else{var Je=Tn(j);Je?he(Je.buffer):xe()}},Te.onerror=xe,Te.send(null)}),e.print||console.log.bind(console);var S=e.printErr||console.warn.bind(console);for(o in i)i.hasOwnProperty(o)&&(e[o]=i[o]);i=null;var x;e.wasmBinary&&(x=e.wasmBinary);var R=e.noExitRuntime||!0;typeof WebAssembly!="object"&&K("no native wasm support detected");var H,C=!1;function U(j,he){j||K("Assertion failed: "+he)}function Q(j){var he=e["_"+j];return U(he,"Cannot call unknown function "+j+", make sure it is exported"),he}function B(j,he,xe,Te){var Je={string:function(at){var Mt=0;if(at!=null&&at!==0){var Dt=(at.length<<2)+1;Mt=oi(Dt);var It=Mt,gt=v;if(0<Dt){Dt=It+Dt-1;for(var dn=0;dn<at.length;++dn){var Ct=at.charCodeAt(dn);if(55296<=Ct&&57343>=Ct){var ar=at.charCodeAt(++dn);Ct=65536+((Ct&1023)<<10)|ar&1023}if(127>=Ct){if(It>=Dt)break;gt[It++]=Ct}else{if(2047>=Ct){if(It+1>=Dt)break;gt[It++]=192|Ct>>6}else{if(65535>=Ct){if(It+2>=Dt)break;gt[It++]=224|Ct>>12}else{if(It+3>=Dt)break;gt[It++]=240|Ct>>18,gt[It++]=128|Ct>>12&63}gt[It++]=128|Ct>>6&63}gt[It++]=128|Ct&63}}gt[It]=0}}return Mt},array:function(at){var Mt=oi(at.length);return k.set(at,Mt),Mt}},Lt=Q(j),In=[];if(j=0,Te)for(var an=0;an<Te.length;an++){var xr=Je[xe[an]];xr?(j===0&&(j=si()),In[an]=xr(Te[an])):In[an]=Te[an]}return xe=Lt.apply(null,In),xe=(function(at){if(he==="string")if(at){for(var Mt=v,Dt=at+NaN,It=at;Mt[It]&&!(It>=Dt);)++It;if(16<It-at&&Mt.subarray&&b)at=b.decode(Mt.subarray(at,It));else{for(Dt="";at<It;){var gt=Mt[at++];if(gt&128){var dn=Mt[at++]&63;if((gt&224)==192)Dt+=String.fromCharCode((gt&31)<<6|dn);else{var Ct=Mt[at++]&63;gt=(gt&240)==224?(gt&15)<<12|dn<<6|Ct:(gt&7)<<18|dn<<12|Ct<<6|Mt[at++]&63,65536>gt?Dt+=String.fromCharCode(gt):(gt-=65536,Dt+=String.fromCharCode(55296|gt>>10,56320|gt&1023))}}else Dt+=String.fromCharCode(gt)}at=Dt}}else at="";else at=he==="boolean"?!!at:at;return at})(xe),j!==0&&Ji(j),xe}var b=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,w,k,v;function P(){var j=H.buffer;w=j,e.HEAP8=k=new Int8Array(j),e.HEAP16=new Int16Array(j),e.HEAP32=new Int32Array(j),e.HEAPU8=v=new Uint8Array(j),e.HEAPU16=new Uint16Array(j),e.HEAPU32=new Uint32Array(j),e.HEAPF32=new Float32Array(j),e.HEAPF64=new Float64Array(j)}var ne,G=[],Y=[],te=[];function le(){var j=e.preRun.shift();G.unshift(j)}var M=0,N=null,L=null;e.preloadedImages={},e.preloadedAudios={};function K(j){throw e.onAbort&&e.onAbort(j),S(j),C=!0,j=new WebAssembly.RuntimeError("abort("+j+"). Build with -s ASSERTIONS=1 for more info."),s(j),j}var ee="data:application/octet-stream;base64,",ue;if(ue="data:application/octet-stream;base64,AGFzbQEAAAABIAZgAX8Bf2ADf39/AGABfwBgAABgAAF/YAZ/f39/f38AAgcBAWEBYQAAAwsKAAEDAQAAAgQFAgQFAXABAQEFBwEBgAKAgAIGCQF/AUGAjMACCwclCQFiAgABYwADAWQACQFlAAgBZgAHAWcABgFoAAUBaQAKAWoBAAqGTQpPAQJ/QYAIKAIAIgEgAEEDakF8cSICaiEAAkAgAkEAIAAgAU0bDQAgAD8AQRB0SwRAIAAQAEUNAQtBgAggADYCACABDwtBhAhBMDYCAEF/C4wFAg5+Cn8gACgCJCEUIAAoAiAhFSAAKAIcIREgACgCGCESIAAoAhQhEyACQRBPBEAgAC0ATEVBGHQhFyAAKAIEIhZBBWytIQ8gACgCCCIYQQVsrSENIAAoAgwiGUEFbK0hCyAAKAIQIhpBBWytIQkgADUCACEIIBqtIRAgGa0hDiAYrSEMIBatIQoDQCASIAEtAAMiEiABLQAEQQh0ciABLQAFQRB0ciABLQAGIhZBGHRyQQJ2Qf///x9xaq0iAyAOfiABLwAAIAEtAAJBEHRyIBNqIBJBGHRBg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RyNgIACyACQf7///8HSw0BIAIQASEBQQAQASEAIAFBf0YNASAAQX9GDQEgACABTQ0BIAAgAWsiBSAIQShqTQ0BC0G4C0G4CygCACAFaiIANgIAQbwLKAIAIABJBEBBvAsgADYCAAsCQAJAAkBBoAgoAgAiBwRAQcgLIQADQCABIAAoAgAiAyAAKAIEIgJqRg0CIAAoAggiAA0ACwwCC0GYCCgCACIAQQAgACABTRtFBEBBmAggATYCAAtBACEAQcwLIAU2AgBByAsgATYCAEGoCEF/NgIAQawIQeALKAIANgIAQdQLQQA2AgADQCAAQQN0IgNBuAhqIANBsAhqIgI2AgAgA0G8CGogAjYCACAAQQFqIgBBIEcNAAtBlAggBUEoayIDQXggAWtBB3FBACABQQhqQQdxGyIAayICNgIAQaAIIAAgAWoiADYCACAAIAJBAXI2AgQgASADakEoNgIEQaQIQfALKAIANgIADAILIAAtAAxBCHENACADIAdLDQAgASAHTQ0AIAAgAiAFajYCBEGgCCAHQXggB2tBB3FBACAHQQhqQQdxGyIAaiICNgIAQZQIQZQIKAIAIAVqIgEgAGsiADYCACACIABBAXI2AgQgASAHakEoNgIEQaQIQfALKAIANgIADAELQZgIKAIAIAFLBEBBmAggATYCAAsgASAFaiECQcgLIQACQAJAAkACQAJAAkADQCACIAAoAgBHBEAgACgCCCIADQEMAgsLIAAtAAxBCHFFDQELQcgLIQADQCAHIAAoAgAiAk8EQCACIAAoAgRqIgQgB0sNAwsgACgCCCEADAALAAsgACABNgIAIAAgACgCBCAFajYCBCABQXggAWtBB3FBACABQQhqQQdxG2oiCSAIQQNyNgIEIAJBeCACa0EHcUEAIAJBCGpBB3EbaiIFIAggCWoiBmshAiAFIAdGBEBBoAggBjYCAEGUCEGUCCgCACACaiIANgIAIAYgAEEBcjYCBAwDCyAFQZwIKAIARgRAQZwIIAY2AgBBkAhBkAgoAgAgAmoiADYCACAGIABBAXI2AgQgACAGaiAANgIADAMLIAUoAgQiAEEDcUEBRgRAIABBeHEhBwJAIABB/wFNBEAgBSgCCC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AXFFBEBBiAggASACcjYCACAADAELIAAoAggLIQIgACADNgIIIAIgAzYCDCADIAA2AgwgAyACNgIIDwtBHyECIANCADcCECAAQf///wdNBEAgAEEIdiIBIAFBgP4/akEQdkEIcSIBdCICIAJBgOAfakEQdkEEcSICdCIEIARBgIAPakEQdkECcSIEdEEPdiABIAJyIARyayIBQQF0IAAgAUEVanZBAXFyQRxqIQILIAMgAjYCHCACQQJ0QbgKaiEBAkACQAJAQYwIKAIAIgRBASACdCIHcUUEQEGMCCAEIAdyNgIAIAEgAzYCACADIAE2AhgMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgASgCACEBA0AgASIEKAIEQXhxIABGDQIgAkEddiEBIAJBAXQhAiAEIAFBBHFqIgdBEGooAgAiAQ0ACyAHIAM2AhAgAyAENgIYCyADIAM2AgwgAyADNgIIDAELIAQoAggiACADNgIMIAQgAzYCCCADQQA2AhggAyAENgIMIAMgADYCCAtBqAhBqAgoAgBBAWsiAEF/IAAbNgIACwsLCQEAQYEICwIGUA==",!ue.startsWith(ee)){var ie=ue;ue=e.locateFile?e.locateFile(ie,f):f+ie}function Xe(){var j=ue;try{if(j==ue&&x)return new Uint8Array(x);var he=Tn(j);if(he)return he;if(p)return p(j);throw"both async and sync fetching of the wasm failed"}catch(xe){K(xe)}}function ft(){if(!x&&(a||c)){if(typeof fetch=="function"&&!ue.startsWith("file://"))return fetch(ue,{credentials:"same-origin"}).then(function(j){if(!j.ok)throw"failed to load wasm binary file at '"+ue+"'";return j.arrayBuffer()}).catch(function(){return Xe()});if(h)return new Promise(function(j,he){h(ue,function(xe){j(new Uint8Array(xe))},he)})}return Promise.resolve().then(function(){return Xe()})}function on(j){for(;0<j.length;){var he=j.shift();if(typeof he=="function")he(e);else{var xe=he.m;typeof xe=="number"?he.l===void 0?ne.get(xe)():ne.get(xe)(he.l):xe(he.l===void 0?null:he.l)}}}var yr=!1,Er=typeof atob=="function"?atob:function(j){var he="",xe=0;j=j.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(j.charAt(xe++)),Je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(j.charAt(xe++)),Lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(j.charAt(xe++)),In="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(j.charAt(xe++));Te=Te<<2|Je>>4,Je=(Je&15)<<4|Lt>>2;var an=(Lt&3)<<6|In;he+=String.fromCharCode(Te),Lt!==64&&(he+=String.fromCharCode(Je)),In!==64&&(he+=String.fromCharCode(an))}while(xe<j.length);return he};function Tn(j){if(j.startsWith(ee)){if(j=j.slice(ee.length),typeof l=="boolean"&&l){var he=Buffer.from(j,"base64");he=new Uint8Array(he.buffer,he.byteOffset,he.byteLength)}else try{var xe=Er(j),Te=new Uint8Array(xe.length);for(j=0;j<xe.length;++j)Te[j]=xe.charCodeAt(j);he=Te}catch{throw Error("Converting base64 string to bytes failed.")}return he}}var _r={a:function(j){var he=v.length;if(j>>>=0,2147483648<j)return!1;for(var xe=1;4>=xe;xe*=2){var Te=he*(1+.2/xe);Te=Math.min(Te,j+100663296),Te=Math.max(j,Te),0<Te%65536&&(Te+=65536-Te%65536);e:{try{H.grow(Math.min(2147483648,Te)-w.byteLength+65535>>>16),P();var Je=1;break e}catch{}Je=void 0}if(Je)return!0}return!1}};(function(){function j(Je){e.asm=Je.exports,H=e.asm.b,P(),ne=e.asm.j,Y.unshift(e.asm.c),M--,e.monitorRunDependencies&&e.monitorRunDependencies(M),M==0&&(N!==null&&(clearInterval(N),N=null),L&&(Je=L,L=null,Je()))}function he(Je){j(Je.instance)}function xe(Je){return ft().then(function(Lt){return WebAssembly.instantiate(Lt,Te)}).then(Je,function(Lt){S("failed to asynchronously prepare wasm: "+Lt),K(Lt)})}var Te={a:_r};if(M++,e.monitorRunDependencies&&e.monitorRunDependencies(M),e.instantiateWasm)try{return e.instantiateWasm(Te,j)}catch(Je){return S("Module.instantiateWasm callback failed with error: "+Je),!1}return(function(){return x||typeof WebAssembly.instantiateStreaming!="function"||ue.startsWith(ee)||ue.startsWith("file://")||typeof fetch!="function"?xe(he):fetch(ue,{credentials:"same-origin"}).then(function(Je){return WebAssembly.instantiateStreaming(Je,Te).then(he,function(Lt){return S("wasm streaming compile failed: "+Lt),S("falling back to ArrayBuffer instantiation"),xe(he)})})})().catch(s),{}})(),e.___wasm_call_ctors=function(){return(e.___wasm_call_ctors=e.asm.c).apply(null,arguments)},e._poly1305_auth=function(){return(e._poly1305_auth=e.asm.d).apply(null,arguments)};var si=e.stackSave=function(){return(si=e.stackSave=e.asm.e).apply(null,arguments)},Ji=e.stackRestore=function(){return(Ji=e.stackRestore=e.asm.f).apply(null,arguments)},oi=e.stackAlloc=function(){return(oi=e.stackAlloc=e.asm.g).apply(null,arguments)};e._malloc=function(){return(e._malloc=e.asm.h).apply(null,arguments)},e._free=function(){return(e._free=e.asm.i).apply(null,arguments)},e.cwrap=function(j,he,xe,Te){xe=xe||[];var Je=xe.every(function(Lt){return Lt==="number"});return he!=="string"&&Je&&!Te?Q(j):function(){return B(j,he,xe,arguments)}};var br;L=function j(){br||Sr(),br||(L=j)};function Sr(){function j(){if(!br&&(br=!0,e.calledRun=!0,!C)){if(on(Y),r(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e.postRun)for(typeof e.postRun=="function"&&(e.postRun=[e.postRun]);e.postRun.length;){var he=e.postRun.shift();te.unshift(he)}on(te)}}if(!(0<M)){if(e.preRun)for(typeof e.preRun=="function"&&(e.preRun=[e.preRun]);e.preRun.length;)le();on(G),0<M||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),j()},1)):j())}}if(e.run=Sr,e.preInit)for(typeof e.preInit=="function"&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();return Sr(),t.ready})})();typeof Rs=="object"&&typeof qo=="object"?qo.exports=Wo:typeof define=="function"&&define.amd?define([],function(){return Wo}):typeof Rs=="object"&&(Rs.createPoly1305=Wo)});var Xn=lt((ux,ku)=>{"use strict";var{createCipheriv:Or,createDecipheriv:Ns,createHmac:Ko,randomFillSync:dr,timingSafeEqual:Vo}=require("crypto"),{readUInt32BE:Si,writeUInt32BE:fn}=_n(),Jn=Buffer[Symbol.species],xu=2**32-1,wu=Buffer.alloc(0),Mr=Buffer.alloc(4),Ps=new Map,hr=35e3,zo,ca,la,fa,ua,da,ha;try{zo=require("./crypto/build/Release/sshcrypto.node"),{AESGCMCipher:ca,ChaChaPolyCipher:la,GenericCipher:fa,AESGCMDecipher:ua,ChaChaPolyDecipher:da,GenericDecipher:ha}=zo}catch{}var Qt=1,Vg=(()=>{function n(t,e,r,s,i,o,a){return{sslName:t,blockLen:e,keyLen:r,ivLen:s!==0||a&Qt?s:e,authLen:i,discardLen:o,stream:!!(a&Qt)}}return{"chacha20-poly1305@openssh.com":n("chacha20",8,64,0,16,0,Qt),"aes128-gcm":n("aes-128-gcm",16,16,12,16,0,Qt),"aes256-gcm":n("aes-256-gcm",16,32,12,16,0,Qt),"aes128-gcm@openssh.com":n("aes-128-gcm",16,16,12,16,0,Qt),"aes256-gcm@openssh.com":n("aes-256-gcm",16,32,12,16,0,Qt),"aes128-cbc":n("aes-128-cbc",16,16,0,0,0,0),"aes192-cbc":n("aes-192-cbc",16,24,0,0,0,0),"aes256-cbc":n("aes-256-cbc",16,32,0,0,0,0),"rijndael-cbc@lysator.liu.se":n("aes-256-cbc",16,32,0,0,0,0),"3des-cbc":n("des-ede3-cbc",8,24,0,0,0,0),"blowfish-cbc":n("bf-cbc",8,16,0,0,0,0),"idea-cbc":n("idea-cbc",8,16,0,0,0,0),"cast128-cbc":n("cast-cbc",8,16,0,0,0,0),"aes128-ctr":n("aes-128-ctr",16,16,16,0,0,Qt),"aes192-ctr":n("aes-192-ctr",16,24,16,0,0,Qt),"aes256-ctr":n("aes-256-ctr",16,32,16,0,0,Qt),"3des-ctr":n("des-ede3",8,24,8,0,0,Qt),"blowfish-ctr":n("bf-ecb",8,16,8,0,0,Qt),"cast128-ctr":n("cast5-ecb",8,16,8,0,0,Qt),arcfour:n("rc4",8,16,0,0,1536,Qt),arcfour128:n("rc4",8,16,0,0,1536,Qt),arcfour256:n("rc4",8,32,0,0,1536,Qt),arcfour512:n("rc4",8,64,0,0,1536,Qt)}})(),zg=(()=>{function n(t,e,r,s){return{sslName:t,len:e,actualLen:r,isETM:s}}return{"hmac-md5":n("md5",16,16,!1),"hmac-md5-96":n("md5",16,12,!1),"hmac-ripemd160":n("ripemd160",20,20,!1),"hmac-sha1":n("sha1",20,20,!1),"hmac-sha1-etm@openssh.com":n("sha1",20,20,!0),"hmac-sha1-96":n("sha1",20,12,!1),"hmac-sha2-256":n("sha256",32,32,!1),"hmac-sha2-256-etm@openssh.com":n("sha256",32,32,!0),"hmac-sha2-256-96":n("sha256",32,12,!1),"hmac-sha2-512":n("sha512",64,64,!1),"hmac-sha2-512-etm@openssh.com":n("sha512",64,64,!0),"hmac-sha2-512-96":n("sha512",64,12,!1)}})(),Go=class{constructor(t,e){this.outSeqno=t,this._onWrite=e,this._dead=!1}free(){this._dead=!0}allocPacket(t){let e=5+t,r=8-(e&7);r<4&&(r+=8),e+=r;let s=Buffer.allocUnsafe(e);return fn(s,e-4,0),s[4]=r,dr(s,5+t,r),s}encrypt(t){this._dead||(this._onWrite(t),this.outSeqno=this.outSeqno+1>>>0)}},Iu=Buffer.alloc(32),en=Buffer.alloc(16),bi,xi,pa,Yo=class{constructor(t){let e=t.outbound;this.outSeqno=e.seqno,this._onWrite=e.onWrite,this._encKeyMain=e.cipherKey.slice(0,32),this._encKeyPktLen=e.cipherKey.slice(32),this._dead=!1}free(){this._dead=!0}allocPacket(t){let e=5+t,r=8-(e-4&7);r<4&&(r+=8),e+=r;let s=Buffer.allocUnsafe(e);return fn(s,e-4,0),s[4]=r,dr(s,5+t,r),s}encrypt(t){if(this._dead)return;en[0]=0,fn(en,this.outSeqno,12);let e=Or("chacha20",this._encKeyMain,en).update(Iu),r=Or("chacha20",this._encKeyPktLen,en).update(t.slice(0,4));this._onWrite(r),en[0]=1;let s=Or("chacha20",this._encKeyMain,en).update(t.slice(4));this._onWrite(s),pa(xi,r,r.length,s,s.length,e);let i=Buffer.allocUnsafe(16);i.set(new Uint8Array(bi.HEAPU8.buffer,xi,16),0),this._onWrite(i),this.outSeqno=this.outSeqno+1>>>0}},jo=class{constructor(t){let e=t.outbound;this.outSeqno=e.seqno,this._onWrite=e.onWrite,this._instance=new la(e.cipherKey),this._dead=!1}free(){this._dead=!0,this._instance.free()}allocPacket(t){let e=5+t,r=8-(e-4&7);r<4&&(r+=8),e+=r;let s=Buffer.allocUnsafe(e+16);return fn(s,e-4,0),s[4]=r,dr(s,5+t,r),s}encrypt(t){this._dead||(this._instance.encrypt(t,this.outSeqno),this._onWrite(t),this.outSeqno=this.outSeqno+1>>>0)}},Xo=class{constructor(t){let e=t.outbound;this.outSeqno=e.seqno,this._onWrite=e.onWrite,this._encSSLName=e.cipherInfo.sslName,this._encKey=e.cipherKey,this._encIV=e.cipherIV,this._dead=!1}free(){this._dead=!0}allocPacket(t){let e=5+t,r=16-(e-4&15);r<4&&(r+=16),e+=r;let s=Buffer.allocUnsafe(e);return fn(s,e-4,0),s[4]=r,dr(s,5+t,r),s}encrypt(t){if(this._dead)return;let e=Or(this._encSSLName,this._encKey,this._encIV);e.setAutoPadding(!1);let r=t.slice(0,4);e.setAAD(r),this._onWrite(r);let s=e.update(t.slice(4));this._onWrite(s);let i=e.final();i.length&&this._onWrite(i);let o=e.getAuthTag();this._onWrite(o),Cu(this._encIV),this.outSeqno=this.outSeqno+1>>>0}},Jo=class{constructor(t){let e=t.outbound;this.outSeqno=e.seqno,this._onWrite=e.onWrite,this._instance=new ca(e.cipherInfo.sslName,e.cipherKey,e.cipherIV),this._dead=!1}free(){this._dead=!0,this._instance.free()}allocPacket(t){let e=5+t,r=16-(e-4&15);r<4&&(r+=16),e+=r;let s=Buffer.allocUnsafe(e+16);return fn(s,e-4,0),s[4]=r,dr(s,5+t,r),s}encrypt(t){this._dead||(this._instance.encrypt(t),this._onWrite(t),this.outSeqno=this.outSeqno+1>>>0)}},Zo=class{constructor(t){let e=t.outbound;this.outSeqno=e.seqno,this._onWrite=e.onWrite,this._encBlockLen=e.cipherInfo.blockLen,this._cipherInstance=Or(e.cipherInfo.sslName,e.cipherKey,e.cipherIV),this._macSSLName=e.macInfo.sslName,this._macKey=e.macKey,this._macActualLen=e.macInfo.actualLen,this._macETM=e.macInfo.isETM,this._aadLen=this._macETM?4:0,this._dead=!1;let r=e.cipherInfo.discardLen;if(r){let s=Ps.get(r);s===void 0&&(s=Buffer.alloc(r),Ps.set(r,s)),this._cipherInstance.update(s)}}free(){this._dead=!0}allocPacket(t){let e=this._encBlockLen,r=5+t,s=e-(r-this._aadLen&e-1);s<4&&(s+=e),r+=s;let i=Buffer.allocUnsafe(r);return fn(i,r-4,0),i[4]=s,dr(i,5+t,s),i}encrypt(t){if(this._dead)return;let e;if(this._macETM){let s=new Uint8Array(t.buffer,t.byteOffset,4),i=this._cipherInstance.update(new Uint8Array(t.buffer,t.byteOffset+4,t.length-4));this._onWrite(s),this._onWrite(i),e=Ko(this._macSSLName,this._macKey),fn(Mr,this.outSeqno,0),e.update(Mr),e.update(s),e.update(i)}else{let s=this._cipherInstance.update(t);this._onWrite(s),e=Ko(this._macSSLName,this._macKey),fn(Mr,this.outSeqno,0),e.update(Mr),e.update(t)}let r=e.digest();r.length>this._macActualLen&&(r=r.slice(0,this._macActualLen)),this._onWrite(r),this.outSeqno=this.outSeqno+1>>>0}},ea=class{constructor(t){let e=t.outbound;this.outSeqno=e.seqno,this._onWrite=e.onWrite,this._encBlockLen=e.cipherInfo.blockLen,this._macLen=e.macInfo.len,this._macActualLen=e.macInfo.actualLen,this._aadLen=e.macInfo.isETM?4:0,this._instance=new fa(e.cipherInfo.sslName,e.cipherKey,e.cipherIV,e.macInfo.sslName,e.macKey,e.macInfo.isETM),this._dead=!1}free(){this._dead=!0,this._instance.free()}allocPacket(t){let e=this._encBlockLen,r=5+t,s=e-(r-this._aadLen&e-1);s<4&&(s+=e),r+=s;let i=Buffer.allocUnsafe(r+this._macLen);return fn(i,r-4,0),i[4]=s,dr(i,5+t,s),i}encrypt(t){this._dead||(this._instance.encrypt(t,this.outSeqno),this._macActualLen<this._macLen&&(t=new Jn(t.buffer,t.byteOffset,t.length-(this._macLen-this._macActualLen))),this._onWrite(t),this.outSeqno=this.outSeqno+1>>>0)}},ta=class{constructor(t,e){this.inSeqno=t,this._onPayload=e,this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0}free(){}decrypt(t,e,r){for(;e<r;){if(this._lenBytes<4){let i=Math.min(4-this._lenBytes,r-e);for(this._lenBytes+=i;i--;)this._len=(this._len<<8)+t[e++];if(this._lenBytes<4)return;if(this._len>hr||this._len<8||(4+this._len&7)!==0)throw new Error("Bad packet length");if(e>=r)return}if(this._packetPos<this._len){let i=Math.min(this._len-this._packetPos,r-e),o;if(e!==0||i!==r?o=new Uint8Array(t.buffer,t.byteOffset+e,i):o=t,i===this._len?this._packet=o:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(o,this._packetPos)),e+=i,this._packetPos+=i,this._packetPos<this._len)return}let s=this._packet?new Jn(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1):wu;this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0;{let i=this._onPayload(s);if(i!==void 0)return i===!1?e:i}}}},na=class{constructor(t){let e=t.inbound;this.inSeqno=e.seqno,this._onPayload=e.onPayload,this._decKeyMain=e.decipherKey.slice(0,32),this._decKeyPktLen=e.decipherKey.slice(32),this._len=0,this._lenBuf=Buffer.alloc(4),this._lenPos=0,this._packet=null,this._pktLen=0,this._mac=Buffer.allocUnsafe(16),this._calcMac=Buffer.allocUnsafe(16),this._macPos=0}free(){}decrypt(t,e,r){for(;e<r;){if(this._lenPos<4){let a=Math.min(4-this._lenPos,r-e);for(;a--;)this._lenBuf[this._lenPos++]=t[e++];if(this._lenPos<4)return;en[0]=0,fn(en,this.inSeqno,12);let c=Ns("chacha20",this._decKeyPktLen,en).update(this._lenBuf);if(this._len=Si(c,0),this._len>hr||this._len<8||(this._len&7)!==0)throw new Error("Bad packet length")}if(this._pktLen<this._len){if(e>=r)return;let a=Math.min(this._len-this._pktLen,r-e),c;if(e!==0||a!==r?c=new Uint8Array(t.buffer,t.byteOffset+e,a):c=t,a===this._len?this._packet=c:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(c,this._pktLen)),e+=a,this._pktLen+=a,this._pktLen<this._len||e>=r)return}{let a=Math.min(16-this._macPos,r-e);if(e!==0||a!==r?this._mac.set(new Uint8Array(t.buffer,t.byteOffset+e,a),this._macPos):this._mac.set(t,this._macPos),e+=a,this._macPos+=a,this._macPos<16)return}en[0]=0,fn(en,this.inSeqno,12);let s=Or("chacha20",this._decKeyMain,en).update(Iu);if(pa(xi,this._lenBuf,4,this._packet,this._packet.length,s),this._calcMac.set(new Uint8Array(bi.HEAPU8.buffer,xi,16),0),!Vo(this._calcMac,this._mac))throw new Error("Invalid MAC");en[0]=1;let i=Ns("chacha20",this._decKeyMain,en).update(this._packet),o=new Jn(i.buffer,i.byteOffset+1,i.length-i[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenPos=0,this._packet=null,this._pktLen=0,this._macPos=0;{let a=this._onPayload(o);if(a!==void 0)return a===!1?e:a}}}},ra=class{constructor(t){let e=t.inbound;this.inSeqno=e.seqno,this._onPayload=e.onPayload,this._instance=new da(e.decipherKey),this._len=0,this._lenBuf=Buffer.alloc(4),this._lenPos=0,this._packet=null,this._pktLen=0,this._mac=Buffer.allocUnsafe(16),this._macPos=0}free(){this._instance.free()}decrypt(t,e,r){for(;e<r;){if(this._lenPos<4){let i=Math.min(4-this._lenPos,r-e);for(;i--;)this._lenBuf[this._lenPos++]=t[e++];if(this._lenPos<4)return;if(this._len=this._instance.decryptLen(this._lenBuf,this.inSeqno),this._len>hr||this._len<8||(this._len&7)!==0)throw new Error("Bad packet length");if(e>=r)return}if(this._pktLen<this._len){let i=Math.min(this._len-this._pktLen,r-e),o;if(e!==0||i!==r?o=new Uint8Array(t.buffer,t.byteOffset+e,i):o=t,i===this._len?this._packet=o:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(o,this._pktLen)),e+=i,this._pktLen+=i,this._pktLen<this._len||e>=r)return}{let i=Math.min(16-this._macPos,r-e);if(e!==0||i!==r?this._mac.set(new Uint8Array(t.buffer,t.byteOffset+e,i),this._macPos):this._mac.set(t,this._macPos),e+=i,this._macPos+=i,this._macPos<16)return}this._instance.decrypt(this._packet,this._mac,this.inSeqno);let s=new Jn(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenPos=0,this._packet=null,this._pktLen=0,this._macPos=0;{let i=this._onPayload(s);if(i!==void 0)return i===!1?e:i}}}},ia=class{constructor(t){let e=t.inbound;this.inSeqno=e.seqno,this._onPayload=e.onPayload,this._decipherInstance=null,this._decipherSSLName=e.decipherInfo.sslName,this._decipherKey=e.decipherKey,this._decipherIV=e.decipherIV,this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._tag=Buffer.allocUnsafe(16),this._tagPos=0}free(){}decrypt(t,e,r){for(;e<r;){if(this._lenBytes<4){let i=Math.min(4-this._lenBytes,r-e);for(this._lenBytes+=i;i--;)this._len=(this._len<<8)+t[e++];if(this._lenBytes<4)return;if(this._len+20>hr||this._len<16||(this._len&15)!==0)throw new Error("Bad packet length");this._decipherInstance=Ns(this._decipherSSLName,this._decipherKey,this._decipherIV),this._decipherInstance.setAutoPadding(!1),this._decipherInstance.setAAD(Gg(this._len))}if(this._pktLen<this._len){if(e>=r)return;let i=Math.min(this._len-this._pktLen,r-e),o;if(e!==0||i!==r?o=this._decipherInstance.update(new Uint8Array(t.buffer,t.byteOffset+e,i)):o=this._decipherInstance.update(t),o.length&&(i===this._len?this._packet=o:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(o,this._packetPos)),this._packetPos+=o.length),e+=i,this._pktLen+=i,this._pktLen<this._len||e>=r)return}{let i=Math.min(16-this._tagPos,r-e);if(e!==0||i!==r?this._tag.set(new Uint8Array(t.buffer,t.byteOffset+e,i),this._tagPos):this._tag.set(t,this._tagPos),e+=i,this._tagPos+=i,this._tagPos<16)return}{this._decipherInstance.setAuthTag(this._tag);let i=this._decipherInstance.final();i.length&&(this._packet?this._packet.set(i,this._packetPos):this._packet=i)}let s=this._packet?new Jn(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1):wu;this.inSeqno=this.inSeqno+1>>>0,Cu(this._decipherIV),this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._tagPos=0;{let i=this._onPayload(s);if(i!==void 0)return i===!1?e:i}}}},sa=class{constructor(t){let e=t.inbound;this.inSeqno=e.seqno,this._onPayload=e.onPayload,this._instance=new ua(e.decipherInfo.sslName,e.decipherKey,e.decipherIV),this._len=0,this._lenBytes=0,this._packet=null,this._pktLen=0,this._tag=Buffer.allocUnsafe(16),this._tagPos=0}free(){}decrypt(t,e,r){for(;e<r;){if(this._lenBytes<4){let i=Math.min(4-this._lenBytes,r-e);for(this._lenBytes+=i;i--;)this._len=(this._len<<8)+t[e++];if(this._lenBytes<4)return;if(this._len+20>hr||this._len<16||(this._len&15)!==0)throw new Error(`Bad packet length: ${this._len}`)}if(this._pktLen<this._len){if(e>=r)return;let i=Math.min(this._len-this._pktLen,r-e),o;if(e!==0||i!==r?o=new Uint8Array(t.buffer,t.byteOffset+e,i):o=t,i===this._len?this._packet=o:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(o,this._pktLen)),e+=i,this._pktLen+=i,this._pktLen<this._len||e>=r)return}{let i=Math.min(16-this._tagPos,r-e);if(e!==0||i!==r?this._tag.set(new Uint8Array(t.buffer,t.byteOffset+e,i),this._tagPos):this._tag.set(t,this._tagPos),e+=i,this._tagPos+=i,this._tagPos<16)return}this._instance.decrypt(this._packet,this._len,this._tag);let s=new Jn(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenBytes=0,this._packet=null,this._pktLen=0,this._tagPos=0;{let i=this._onPayload(s);if(i!==void 0)return i===!1?e:i}}}},oa=class{constructor(t){let e=t.inbound;this.inSeqno=e.seqno,this._onPayload=e.onPayload,this._decipherInstance=Ns(e.decipherInfo.sslName,e.decipherKey,e.decipherIV),this._decipherInstance.setAutoPadding(!1),this._block=Buffer.allocUnsafe(e.macInfo.isETM?4:e.decipherInfo.blockLen),this._blockSize=e.decipherInfo.blockLen,this._blockPos=0,this._len=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._mac=Buffer.allocUnsafe(e.macInfo.actualLen),this._macPos=0,this._macSSLName=e.macInfo.sslName,this._macKey=e.macKey,this._macActualLen=e.macInfo.actualLen,this._macETM=e.macInfo.isETM,this._macInstance=null;let r=e.decipherInfo.discardLen;if(r){let s=Ps.get(r);s===void 0&&(s=Buffer.alloc(r),Ps.set(r,s)),this._decipherInstance.update(s)}}free(){}decrypt(t,e,r){for(;e<r;){if(this._blockPos<this._block.length){let o=Math.min(this._block.length-this._blockPos,r-e);if(e!==0||o!==r||o<t.length?this._block.set(new Uint8Array(t.buffer,t.byteOffset+e,o),this._blockPos):this._block.set(t,this._blockPos),e+=o,this._blockPos+=o,this._blockPos<this._block.length)return;let a,c;if(this._macETM?this._len=c=Si(this._block,0):(a=this._decipherInstance.update(this._block),this._len=Si(a,0),c=4+this._len-this._blockSize),this._len>hr||this._len<5||(c&this._blockSize-1)!==0)throw new Error("Bad packet length");if(this._macInstance=Ko(this._macSSLName,this._macKey),fn(Mr,this.inSeqno,0),this._macInstance.update(Mr),this._macETM?this._macInstance.update(this._block):(this._macInstance.update(new Uint8Array(a.buffer,a.byteOffset,4)),this._pktLen=a.length-4,this._packetPos=this._pktLen,this._packet=Buffer.allocUnsafe(this._len),this._packet.set(new Uint8Array(a.buffer,a.byteOffset+4,this._packetPos),0)),e>=r)return}if(this._pktLen<this._len){let o=Math.min(this._len-this._pktLen,r-e),a;e!==0||o!==r?a=new Uint8Array(t.buffer,t.byteOffset+e,o):a=t,this._macETM&&this._macInstance.update(a);let c=this._decipherInstance.update(a);if(c.length&&(o===this._len?this._packet=c:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(c,this._packetPos)),this._packetPos+=c.length),e+=o,this._pktLen+=o,this._pktLen<this._len||e>=r)return}{let o=Math.min(this._macActualLen-this._macPos,r-e);if(e!==0||o!==r?this._mac.set(new Uint8Array(t.buffer,t.byteOffset+e,o),this._macPos):this._mac.set(t,this._macPos),e+=o,this._macPos+=o,this._macPos<this._macActualLen)return}this._macETM||this._macInstance.update(this._packet);let s=this._macInstance.digest();if(this._macActualLen<s.length&&(s=new Uint8Array(s.buffer,s.byteOffset,this._macActualLen)),!Yg(s,this._mac))throw new Error("Invalid MAC");let i=new Jn(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._blockPos=0,this._len=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._macPos=0,this._macInstance=null;{let o=this._onPayload(i);if(o!==void 0)return o===!1?e:o}}}},aa=class{constructor(t){let e=t.inbound;this.inSeqno=e.seqno,this._onPayload=e.onPayload,this._instance=new ha(e.decipherInfo.sslName,e.decipherKey,e.decipherIV,e.macInfo.sslName,e.macKey,e.macInfo.isETM,e.macInfo.actualLen),this._block=Buffer.allocUnsafe(e.macInfo.isETM||e.decipherInfo.stream?4:e.decipherInfo.blockLen),this._blockPos=0,this._len=0,this._packet=null,this._pktLen=0,this._mac=Buffer.allocUnsafe(e.macInfo.actualLen),this._macPos=0,this._macActualLen=e.macInfo.actualLen,this._macETM=e.macInfo.isETM}free(){this._instance.free()}decrypt(t,e,r){for(;e<r;){if(this._blockPos<this._block.length){let i=Math.min(this._block.length-this._blockPos,r-e);if(e!==0||i!==r||i<t.length?this._block.set(new Uint8Array(t.buffer,t.byteOffset+e,i),this._blockPos):this._block.set(t,this._blockPos),e+=i,this._blockPos+=i,this._blockPos<this._block.length)return;let o;if(this._macETM?this._len=o=Si(this._block,0):(this._instance.decryptBlock(this._block),this._len=Si(this._block,0),o=4+this._len-this._block.length),this._len>hr||this._len<5||(o&this._block.length-1)!==0)throw new Error("Bad packet length");if(this._macETM||(this._pktLen=this._block.length-4,this._pktLen&&(this._packet=Buffer.allocUnsafe(this._len),this._packet.set(new Uint8Array(this._block.buffer,this._block.byteOffset+4,this._pktLen),0))),e>=r)return}if(this._pktLen<this._len){let i=Math.min(this._len-this._pktLen,r-e),o;if(e!==0||i!==r?o=new Uint8Array(t.buffer,t.byteOffset+e,i):o=t,i===this._len?this._packet=o:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(o,this._pktLen)),e+=i,this._pktLen+=i,this._pktLen<this._len||e>=r)return}{let i=Math.min(this._macActualLen-this._macPos,r-e);if(e!==0||i!==r?this._mac.set(new Uint8Array(t.buffer,t.byteOffset+e,i),this._macPos):this._mac.set(t,this._macPos),e+=i,this._macPos+=i,this._macPos<this._macActualLen)return}this._instance.decrypt(this._packet,this.inSeqno,this._block,this._mac);let s=new Jn(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._blockPos=0,this._len=0,this._packet=null,this._pktLen=0,this._macPos=0,this._macInstance=null;{let i=this._onPayload(s);if(i!==void 0)return i===!1?e:i}}}};function Cu(n){++n[11]>>>8&&++n[10]>>>8&&++n[9]>>>8&&++n[8]>>>8&&++n[7]>>>8&&++n[6]>>>8&&++n[5]>>>8&&++n[4]>>>8}var Gg=(()=>{let n=Buffer.alloc(4);return t=>(n[0]=t>>>24,n[1]=t>>>16,n[2]=t>>>8,n[3]=t,n)})();function Yg(n,t){return n.length!==t.length?(Vo(n,n),!1):Vo(n,t)}function jg(n){if(typeof n!="object"||n===null)throw new Error("Invalid config");if(typeof n.outbound!="object"||n.outbound===null)throw new Error("Invalid outbound");let t=n.outbound;if(typeof t.onWrite!="function")throw new Error("Invalid outbound.onWrite");if(typeof t.cipherInfo!="object"||t.cipherInfo===null)throw new Error("Invalid outbound.cipherInfo");if(!Buffer.isBuffer(t.cipherKey)||t.cipherKey.length!==t.cipherInfo.keyLen)throw new Error("Invalid outbound.cipherKey");if(t.cipherInfo.ivLen&&(!Buffer.isBuffer(t.cipherIV)||t.cipherIV.length!==t.cipherInfo.ivLen))throw new Error("Invalid outbound.cipherIV");if(typeof t.seqno!="number"||t.seqno<0||t.seqno>xu)throw new Error("Invalid outbound.seqno");let e=!!t.forceNative;switch(t.cipherInfo.sslName){case"aes-128-gcm":case"aes-256-gcm":return ca&&!e?new Jo(n):new Xo(n);case"chacha20":return la&&!e?new jo(n):new Yo(n);default:{if(typeof t.macInfo!="object"||t.macInfo===null)throw new Error("Invalid outbound.macInfo");if(!Buffer.isBuffer(t.macKey)||t.macKey.length!==t.macInfo.len)throw new Error("Invalid outbound.macKey");return fa&&!e?new ea(n):new Zo(n)}}}function Xg(n){if(typeof n!="object"||n===null)throw new Error("Invalid config");if(typeof n.inbound!="object"||n.inbound===null)throw new Error("Invalid inbound");let t=n.inbound;if(typeof t.onPayload!="function")throw new Error("Invalid inbound.onPayload");if(typeof t.decipherInfo!="object"||t.decipherInfo===null)throw new Error("Invalid inbound.decipherInfo");if(!Buffer.isBuffer(t.decipherKey)||t.decipherKey.length!==t.decipherInfo.keyLen)throw new Error("Invalid inbound.decipherKey");if(t.decipherInfo.ivLen&&(!Buffer.isBuffer(t.decipherIV)||t.decipherIV.length!==t.decipherInfo.ivLen))throw new Error("Invalid inbound.decipherIV");if(typeof t.seqno!="number"||t.seqno<0||t.seqno>xu)throw new Error("Invalid inbound.seqno");let e=!!t.forceNative;switch(t.decipherInfo.sslName){case"aes-128-gcm":case"aes-256-gcm":return ua&&!e?new sa(n):new ia(n);case"chacha20":return da&&!e?new ra(n):new na(n);default:{if(typeof t.macInfo!="object"||t.macInfo===null)throw new Error("Invalid inbound.macInfo");if(!Buffer.isBuffer(t.macKey)||t.macKey.length!==t.macInfo.len)throw new Error("Invalid inbound.macKey");return ha&&!e?new aa(n):new oa(n)}}}ku.exports={CIPHER_INFO:Vg,MAC_INFO:zg,bindingAvailable:!!zo,init:new Promise(async(n,t)=>{try{bi=await Su()(),xi=bi._malloc(16),pa=bi.cwrap("poly1305_auth",null,["number","array","number","array","number","array"])}catch(e){return t(e)}n()}),NullCipher:Go,createCipher:jg,NullDecipher:ta,createDecipher:Xg}});var er=lt((dx,Uu)=>{"use strict";var{createDecipheriv:ma,createECDH:Jg,createHash:Ii,createHmac:Zg,createSign:em,createVerify:tm,getCiphers:nm,sign:vu,verify:Bu}=require("crypto"),rm=nm(),{Ber:Ne}=yi(),im=Oo().pbkdf,{CIPHER_INFO:Ci}=Xn(),{eddsaSupported:Aa,SUPPORTED_CIPHER:sm}=Fn(),{bufferSlice:pr,makeBufferParser:om,readString:ve,readUInt32BE:wi,writeUInt32BE:Ft}=_n(),Hn=Symbol("Hash Algorithm"),bn=Symbol("Private key PEM"),Bn=Symbol("Public key PEM"),Zn=Symbol("Public key SSH"),Fr=Symbol("Decrypted Key"),ga=Object.create(null);{let n=Object.keys(Ci);for(let t=0;t<n.length;++t){let e=Ci[n[t]].sslName;!e||ga[e]||(ga[e]=Ci[n[t]])}}var Ts=om();function Sn(n,t){t=t.base64Slice(0,t.length);let e=t.replace(/.{64}/g,`$&
@@ -486,5 +487,5 @@ Sorry, try again.\r
486
487
  `),i.stderr&&n.stderr.write(`${tp(i.stderr)}\r
487
488
  `),n.exit(i.exitCode??0),s.vfs.flushMirror(),n.end()}).catch(i=>{console.error("Exec error:",i),n.stderr.write(`Error: ${String(i)}\r
488
489
  `),n.exit(1),n.end()})}var rp=require("node:crypto"),or=require("node:fs"),ho=require("node:path");function po(n=process.cwd()){let t=(0,ho.resolve)(n,".ssh-mimic","host_rsa");if((0,or.existsSync)(t))return(0,or.readFileSync)(t,"utf8");let e=(0,rp.generateKeyPairSync)("rsa",{modulusLength:2048,privateKeyEncoding:{type:"pkcs1",format:"pem"},publicKeyEncoding:{type:"pkcs1",format:"pem"}}).privateKey;return(0,or.mkdirSync)((0,ho.dirname)(t),{recursive:!0}),(0,or.writeFileSync)(t,e,{mode:384}),e}var ip=require("node:events"),ri=zt(require("node:path"),1),sp=zt(bc(),1);var Pc=!!process.env.DEV_MODE,ti=Pc?console.log.bind(console):()=>{},Pn=Pc?console.warn.bind(console):()=>{},ji=Pc?console.error.bind(console):()=>{},He={OK:0,EOF:1,NO_SUCH_FILE:2,PERMISSION_DENIED:3,FAILURE:4,BAD_MESSAGE:5,NO_CONNECTION:6,CONNECTION_LOST:7,OP_UNSUPPORTED:8},ni={READ:1,WRITE:2,APPEND:4,CREAT:8,TRUNC:16,EXCL:32},Nc=hn("SftpMimic"),ii=class extends ip.EventEmitter{port;server;hostname;shell;vfs;users;nextHandleId=0;handles=new Map;constructor({port:t,hostname:e="typescript-vm",shell:r,vfs:s,users:i}){if(super(),Nc.mark("constructor"),this.port=t,this.server=null,this.hostname=e,this.shell=null,r)this.vfs=r.vfs,this.users=r.users,this.hostname=r.hostname,this.shell=r;else if(s&&i)this.vfs=s,this.users=i;else{let o=new Kn(e);this.vfs=o.vfs,this.users=o.users,this.shell=o}}getVfs(){return this.shell?.vfs??this.vfs}getUsers(){return this.shell?.users??this.users}async start(){Nc.mark("start");let t=po();return this.shell?await this.shell.ensureInitialized():await this.users.initialize(),this.server=new sp.Server({hostKeys:[t],ident:`SSH-2.0-${this.hostname}`},e=>{let r=["password","keyboard-interactive"],s="root",i=null,o="unknown";this.emit("client:connect"),e.on("error",c=>{ji("[SFTP] Client error:",c)});let a=c=>{s=c,i=this.getUsers().registerSession(s,o).id;let l="/home";this.getVfs().exists(l)||this.getVfs().mkdir(l,493);let f=`/home/${s}`;this.getVfs().exists(f)||(this.getVfs().mkdir(f,493),this.getVfs().writeFile(`${f}/README.txt`,`Welcome to ${this.hostname}`),this.getVfs().flushMirror())};e.on("authentication",c=>{let l=c.username||"root";if(o=c.ip??o,ti(`[SFTP] Auth attempt: user=${l}, method=${c.method}, ip=${o}`),c.method==="password"){if(!this.getUsers().hasPassword(l)){a(l),this.emit("auth:success",{username:s,remoteAddress:o}),c.accept();return}if(!this.getUsers().verifyPassword(l,c.password??"")){this.emit("auth:failure",{username:l,remoteAddress:o}),c.reject(r);return}a(l),this.emit("auth:success",{username:s,remoteAddress:o}),c.accept();return}if(c.method==="keyboard-interactive"){let f=c;if(!this.getUsers().hasPassword(l)){a(l),this.emit("auth:success",{username:s,remoteAddress:o}),f.accept();return}f.prompt([{prompt:"Password: ",echo:!1}],u=>{let h=u[0]??"";if(!this.getUsers().verifyPassword(l,h)){this.emit("auth:failure",{username:l,remoteAddress:o}),f.reject(r);return}a(l),this.emit("auth:success",{username:s,remoteAddress:o}),f.accept()});return}c.reject(r)}),e.on("close",()=>{this.getUsers().unregisterSession(i),this.emit("client:disconnect",{user:s}),i=null}),e.on("ready",()=>{e.on("session",(c,l)=>{let f=c();f.on("error",u=>{ji(`[SFTP] Session error for user=${s}:`,u)}),f.on("sftp",u=>{let h=u();this.attachSftpHandlers(h,s)})})})}),new Promise((e,r)=>{this.server?.once("error",s=>r(s)),this.server?.listen(this.port,"0.0.0.0",()=>{let s=this.server?.address(),i=s&&typeof s=="object"&&"port"in s?s.port:this.port;ti(`SFTP Mimic listening on port ${i}`),this.emit("start",{port:i}),e(i)})})}stop(){Nc.mark("stop"),this.server&&this.server.close(()=>{ti("SFTP Mimic stopped"),this.emit("stop")})}resolveRequestPath(t,e){let r=`/home/${e}`;if(!t||t===".")return r;if(!t.startsWith("/")){let s=ri.posix.join(r,t);return ri.posix.normalize(s)}return ri.posix.normalize(t)}isPathWithinHome(t,e){let r=`/home/${e}`,s=ri.posix.normalize(t);return!!(s===r||s.startsWith(`${r}/`))}createAttrs(t){let e=t.mode&511;return{mode:(t.type==="directory"?16384:32768)|e,size:t.type==="file"?t.size:0,uid:0,gid:0,atime:Math.floor(t.createdAt.getTime()/1e3),mtime:Math.floor(t.updatedAt.getTime()/1e3)}}openHandle(t){let e=++this.nextHandleId,r=Buffer.alloc(4);return r.writeUInt32BE(e,0),this.handles.set(r.toString("hex"),t),r}getHandle(t){return this.handles.get(t.toString("hex"))}closeHandle(t){this.handles.delete(t.toString("hex"))}attachSftpHandlers(t,e){let r=()=>this.getVfs(),s=()=>this.getUsers();t.on("OPEN",(i,o,a)=>{let c=this.resolveRequestPath(o,e);if(!this.isPathWithinHome(c,e)){Pn(`[SFTP] Path traversal attempt blocked: user=${e}, path=${c}`),t.status(i,He.PERMISSION_DENIED);return}let l=a,f=!!(l&ni.READ),u=!!(l&ni.WRITE||l&ni.APPEND),h=!!(l&ni.CREAT),p=!!(l&ni.TRUNC);try{if(!r().exists(c)){if(!h){t.status(i,He.NO_SUCH_FILE);return}r().writeFile(c,Buffer.alloc(0))}if(r().stat(c).type==="directory"){t.status(i,He.FAILURE);return}let E=Buffer.from(r().readFile(c),"utf8");if(p&&(E=Buffer.alloc(0)),l&ni.APPEND){let x=this.openHandle({type:"file",path:c,flags:l,buffer:E});t.handle(i,x);return}let S=this.openHandle({type:"file",path:c,flags:l,buffer:E});t.handle(i,S)}catch(A){ji("SFTP OPEN error:",A),t.status(i,He.FAILURE)}}),t.on("READ",(i,o,a,c)=>{let l=this.getHandle(o);if(!l||l.type!=="file"){t.status(i,He.FAILURE);return}if(a>=l.buffer.length){t.status(i,He.EOF);return}let f=l.buffer.slice(a,a+c);t.data(i,f)}),t.on("WRITE",async(i,o,a,c)=>{let l=this.getHandle(o);if(!l||l.type!=="file"){t.status(i,He.FAILURE);return}let f=a+c.length;if(f>l.buffer.length){let u=Buffer.alloc(f);l.buffer.copy(u,0,0,l.buffer.length),l.buffer=u}c.copy(l.buffer,a),t.status(i,He.OK)}),t.on("FSTAT",(i,o)=>{let a=this.getHandle(o);if(!a){t.status(i,He.FAILURE);return}try{let c=r().stat(a.path);t.attrs(i,this.createAttrs(c))}catch{t.status(i,He.FAILURE)}}),t.on("CLOSE",async(i,o)=>{let a=this.getHandle(o);if(!a){t.status(i,He.FAILURE);return}if(a.type==="file")try{s().assertWriteWithinQuota(e,a.path,a.buffer),r().writeFile(a.path,a.buffer),r().flushMirror()}catch(c){ji("SFTP CLOSE write error:",c),t.status(i,He.FAILURE),this.closeHandle(o);return}this.closeHandle(o),t.status(i,He.OK)}),t.on("OPENDIR",(i,o)=>{let a=this.resolveRequestPath(o,e);if(!this.isPathWithinHome(a,e)){Pn(`[SFTP] Path traversal attempt blocked: user=${e}, path=${a}`),t.status(i,He.PERMISSION_DENIED);return}try{if(r().stat(a).type!=="directory"){t.status(i,He.FAILURE);return}let l=r().list(a),f=this.openHandle({type:"dir",path:a,entries:l,index:0});t.handle(i,f)}catch{t.status(i,He.NO_SUCH_FILE)}}),t.on("READDIR",(i,o)=>{let a=this.getHandle(o);if(!a||a.type!=="dir"){t.status(i,He.FAILURE);return}if(a.index>=a.entries.length){t.status(i,He.EOF);return}let c=a.entries[a.index++],l=ri.posix.join(a.path,c),f=r().stat(l),u=this.createAttrs(f),h=`${f.type==="directory"?"d":"-"}${(f.mode&511).toString(8)} ${c}`;return t.name(i,[{filename:c,longname:h,attrs:u}])}),t.on("STAT",(i,o)=>{let a=this.resolveRequestPath(o,e);if(!this.isPathWithinHome(a,e)){Pn(`[SFTP] Path traversal attempt blocked: user=${e}, path=${a}`),t.status(i,He.PERMISSION_DENIED);return}try{let c=r().stat(a);t.attrs(i,this.createAttrs(c))}catch{t.status(i,He.NO_SUCH_FILE)}}),t.on("LSTAT",(i,o)=>{let a=this.resolveRequestPath(o,e);if(!this.isPathWithinHome(a,e)){Pn(`[SFTP] Path traversal attempt blocked: user=${e}, path=${a}`),t.status(i,He.PERMISSION_DENIED);return}try{let c=r().stat(a);t.attrs(i,this.createAttrs(c))}catch{t.status(i,He.NO_SUCH_FILE)}}),t.on("FSETSTAT",(i,o,a)=>{let c=this.getHandle(o);if(!c){t.status(i,He.FAILURE);return}try{a.mode!==void 0&&r().chmod(c.path,a.mode),t.status(i,He.OK)}catch{t.status(i,He.FAILURE)}}),t.on("SETSTAT",(i,o,a)=>{let c=this.resolveRequestPath(o,e);if(!this.isPathWithinHome(c,e)){Pn(`[SFTP] Path traversal attempt blocked: user=${e}, path=${c}`),t.status(i,He.PERMISSION_DENIED);return}try{a.mode!==void 0&&r().chmod(c,a.mode),t.status(i,He.OK)}catch{t.status(i,He.FAILURE)}}),t.on("REALPATH",(i,o)=>{let a=this.resolveRequestPath(o,e);if(!this.isPathWithinHome(a,e)){Pn(`[SFTP] Path traversal attempt blocked: user=${e}, path=${a}`),t.status(i,He.PERMISSION_DENIED);return}t.name(i,[{filename:a,longname:a,attrs:{mode:16877,uid:0,gid:0,size:0,atime:0,mtime:0}}])}),t.on("MKDIR",(i,o)=>{let a=this.resolveRequestPath(o,e);if(!this.isPathWithinHome(a,e)){Pn(`[SFTP] Path traversal attempt blocked: user=${e}, path=${a}`),t.status(i,He.PERMISSION_DENIED);return}try{r().mkdir(a,493),r().flushMirror(),t.status(i,He.OK)}catch{t.status(i,He.FAILURE)}}),t.on("RMDIR",(i,o)=>{let a=this.resolveRequestPath(o,e);if(!this.isPathWithinHome(a,e)){Pn(`[SFTP] Path traversal attempt blocked: user=${e}, path=${a}`),t.status(i,He.PERMISSION_DENIED);return}try{r().remove(a,{recursive:!1}),r().flushMirror(),t.status(i,He.OK)}catch{t.status(i,He.FAILURE)}}),t.on("REMOVE",(i,o)=>{let a=this.resolveRequestPath(o,e);if(!this.isPathWithinHome(a,e)){Pn(`[SFTP] Path traversal attempt blocked: user=${e}, path=${a}`),t.status(i,He.PERMISSION_DENIED);return}try{r().remove(a,{recursive:!1}),r().flushMirror(),t.status(i,He.OK)}catch{t.status(i,He.FAILURE)}}),t.on("RENAME",(i,o,a)=>{let c=this.resolveRequestPath(o,e),l=this.resolveRequestPath(a,e);if(!this.isPathWithinHome(c,e)||!this.isPathWithinHome(l,e)){Pn(`[SFTP] Path traversal attempt blocked: user=${e}, from=${c}, to=${l}`),t.status(i,He.PERMISSION_DENIED);return}try{r().move(c,l),r().flushMirror(),t.status(i,He.OK)}catch{t.status(i,He.FAILURE)}}),t.on("READLINK",i=>{t.status(i,He.OP_UNSUPPORTED)}),t.on("SYMLINK",i=>{t.status(i,He.OP_UNSUPPORTED)}),t.on("error",i=>{ji(`[SFTP] Stream error for user=${e}:`,i)}),t.on("close",()=>{ti(`[SFTP] Stream closed for user=${e}`),this.handles.clear()}),t.on("end",()=>{ti(`[SFTP] end event for user=${e}`),this.handles.clear()}),t.on("END",()=>{ti(`[SFTP] END event for user=${e}`),this.handles.clear()})}};var Tc=hn("SshMimic"),Hy=!!process.env.DEV_MODE,op=Hy?console.log.bind(console):()=>{},Xi=class extends ap.EventEmitter{port;server;shell;maxAuthAttempts;lockoutDurationMs;authAttempts=new Map;constructor({port:t,hostname:e="typescript-vm",shell:r=new Kn(e),maxAuthAttempts:s=5,lockoutDurationMs:i=6e4}){super(),Tc.mark("constructor"),this.port=t,this.server=null,this.shell=r,this.maxAuthAttempts=s,this.lockoutDurationMs=i}isLockedOut(t){let e=this.authAttempts.get(t);return e?Date.now()<e.lockedUntil?!0:(e.lockedUntil>0&&this.authAttempts.delete(t),!1):!1}recordFailure(t){let e=this.authAttempts.get(t)??{attempts:0,lockedUntil:0};e.attempts+=1,e.attempts>=this.maxAuthAttempts&&(e.lockedUntil=Date.now()+this.lockoutDurationMs,this.emit("auth:lockout",{ip:t,until:new Date(e.lockedUntil)})),this.authAttempts.set(t,e)}recordSuccess(t){this.authAttempts.delete(t)}ensureHomeDir(t){let e=`/home/${t}`;this.shell.vfs.exists(e)||(this.shell.vfs.mkdir(e,493),this.shell.vfs.writeFile(`${e}/README.txt`,`Welcome to ${this.shell.hostname}
489
- `),this.shell.vfs.flushMirror())}async start(){Tc.mark("start");let t=this.shell,e=po();return await t.ensureInitialized(),this.server=new cp.Server({hostKeys:[e],ident:`SSH-2.0-${t.hostname}`},r=>{let s="root",i="unknown",o=null;this.emit("client:connect"),r.on("authentication",a=>{let c=a.username||"root";if(i=a.ip??i,this.isLockedOut(i)){this.emit("auth:failure",{username:c,remoteAddress:i,reason:"lockout"}),a.reject();return}if(a.method==="password"){if(!t.users.hasPassword(c)){s=c,o=t.users.registerSession(s,i).id,this.recordSuccess(i),this.emit("auth:success",{username:s,remoteAddress:i}),this.ensureHomeDir(s),a.accept();return}if(!a.password||a.password===""||!t.users.verifyPassword(c,a.password)){this.recordFailure(i),this.emit("auth:failure",{username:c,remoteAddress:i}),a.reject();return}s=c,o=t.users.registerSession(s,i).id,this.recordSuccess(i),this.emit("auth:success",{username:s,remoteAddress:i}),this.ensureHomeDir(s),a.accept();return}if(a.method==="publickey"){let l=t.users.getAuthorizedKeys(c);if(l.length===0){a.reject();return}let f=a.key;if(!l.some(h=>h.algo===f.algo&&h.data.equals(f.data))){this.recordFailure(i),this.emit("auth:failure",{username:c,remoteAddress:i,method:"publickey"}),a.reject();return}a.signature&&(s=c,o=t.users.registerSession(s,i).id,this.recordSuccess(i),this.emit("auth:success",{username:s,remoteAddress:i,method:"publickey"}),this.ensureHomeDir(s)),a.accept();return}a.reject(["password","publickey"])}),r.on("close",()=>{t.users.unregisterSession(o),this.emit("client:disconnect",{user:s}),o=null}),r.on("ready",()=>{r.on("session",a=>{let c=a(),l={cols:80,rows:24};c.on("pty",(f,u,h)=>{l.cols=h?.cols??l.cols,l.rows=h?.rows??l.rows,f()}),c.on("window-change",(f,u,h)=>{l.cols=h?.cols??l.cols,l.rows=h?.rows??l.rows}),c.on("shell",f=>{let u=f();t?.startInteractiveSession(u,s,o,i,l)}),c.on("exec",(f,u,h)=>{let p=f();p&&np(p,h.command.trim(),s,t.hostname,t)})})})}),new Promise((r,s)=>{this.server?.once("error",i=>s(i)),this.server?.listen(this.port,"0.0.0.0",()=>{op(`SSH Mimic listening on port ${this.port}`),this.emit("start",{port:this.port}),r(this.port)})})}stop(){Tc.mark("stop"),this.server&&this.server.close(()=>{op("SSH Mimic stopped"),this.emit("stop")})}clearLockout(t){this.authAttempts.delete(t)}};var Lc=process.env.SSH_MIMIC_HOSTNAME??"typescript-vm",$c=new Kn(Lc,void 0,{mode:"fs",snapshotPath:".vfs"});$c.addCommand("demo",[],()=>({stdout:"This is a demo command. It does nothing useful.",exitCode:0}));new Xi({port:2222,hostname:Lc,shell:$c}).start().catch(n=>{console.error("Failed to start SSH Mimic:",n),process.exit(1)});new ii({port:2223,hostname:Lc,shell:$c}).start().catch(n=>{console.error("Failed to start SFTP Mimic:",n),process.exit(1)});process.on("uncaughtException",n=>{console.log("Oh my god, something terrible happened: ",n)});process.on("unhandledRejection",(n,t)=>{console.log(" Oh Lord! We forgot to handle a promise rejection here: ",t),console.log(" The error was: ",n)});
490
+ `),this.shell.vfs.flushMirror())}async start(){Tc.mark("start");let t=this.shell,e=po();return await t.ensureInitialized(),this.server=new cp.Server({hostKeys:[e],ident:`SSH-2.0-${t.hostname}`},r=>{let s="root",i="unknown",o=null;this.emit("client:connect"),r.on("authentication",a=>{let c=a.username||"root";if(i=a.ip??i,this.isLockedOut(i)){this.emit("auth:failure",{username:c,remoteAddress:i,reason:"lockout"}),a.reject();return}if(a.method==="password"){if(!t.users.hasPassword(c)){s=c,o=t.users.registerSession(s,i).id,this.recordSuccess(i),this.emit("auth:success",{username:s,remoteAddress:i}),this.ensureHomeDir(s),a.accept();return}if(!a.password||a.password===""||!t.users.verifyPassword(c,a.password)){this.recordFailure(i),this.emit("auth:failure",{username:c,remoteAddress:i}),a.reject();return}s=c,o=t.users.registerSession(s,i).id,this.recordSuccess(i),this.emit("auth:success",{username:s,remoteAddress:i}),this.ensureHomeDir(s),a.accept();return}if(a.method==="publickey"){let l=t.users.getAuthorizedKeys(c);if(l.length===0){a.reject();return}let f=a.key;if(!l.some(h=>h.algo===f.algo&&h.data.equals(f.data))){this.recordFailure(i),this.emit("auth:failure",{username:c,remoteAddress:i,method:"publickey"}),a.reject();return}a.signature&&(s=c,o=t.users.registerSession(s,i).id,this.recordSuccess(i),this.emit("auth:success",{username:s,remoteAddress:i,method:"publickey"}),this.ensureHomeDir(s)),a.accept();return}a.reject(["password","publickey"])}),r.on("close",()=>{t.users.unregisterSession(o),this.emit("client:disconnect",{user:s}),o=null}),r.on("ready",()=>{r.on("session",a=>{let c=a(),l={cols:80,rows:24};c.on("pty",(f,u,h)=>{l.cols=h?.cols??l.cols,l.rows=h?.rows??l.rows,f()}),c.on("window-change",(f,u,h)=>{l.cols=h?.cols??l.cols,l.rows=h?.rows??l.rows}),c.on("shell",f=>{let u=f();t?.startInteractiveSession(u,s,o,i,l)}),c.on("exec",(f,u,h)=>{let p=f();p&&np(p,h.command.trim(),s,t.hostname,t)})})})}),new Promise((r,s)=>{this.server?.once("error",i=>s(i)),this.server?.listen(this.port,"0.0.0.0",()=>{op(`SSH Mimic listening on port ${this.port}`),this.emit("start",{port:this.port}),r(this.port)})})}stop(){Tc.mark("stop"),this.server&&this.server.close(()=>{op("SSH Mimic stopped"),this.emit("stop")})}clearLockout(t){this.authAttempts.delete(t)}};var Lc=process.env.SSH_MIMIC_HOSTNAME??"typescript-vm",$c=new Kn(Lc,void 0,{mode:"fs",snapshotPath:".vfs"});$c.addCommand("demo",[],()=>({stdout:"This is a demo command. It does nothing useful.",exitCode:0}));new Xi({port:2222,hostname:Lc,shell:$c}).start().catch(n=>{console.error("Failed to start SSH Mimic:",n),process.exit(1)});new ii({port:2223,hostname:Lc,shell:$c}).start().catch(n=>{console.error("Failed to start SFTP Mimic:",n),process.exit(1)});process.on("uncaughtException",n=>{console.debug("Oh my god, something terrible happened: ",n)});process.on("unhandledRejection",(n,t)=>{console.debug(" Oh Lord! We forgot to handle a promise rejection here: ",t),console.debug(" The error was: ",n)});setInterval(()=>{let n=process.memoryUsage().rss;console.debug(`Current memory usage: ${Math.round(n/1024/1024)} MB`)},1e3);
490
491
  //# sourceMappingURL=standalone.js.map