greybel-languageserver-browser 1.0.3 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -103,7 +103,7 @@ ${e}
103
103
  `),o=n.tags.filter(a=>a.tag==="param").map(a=>({label:a.name,types:a.type.split("|"),opt:a.optional})),l=(i=n.tags.find(a=>a.tag==="return"))!=null?i:{type:"any"},c=n.tags.filter(a=>a.tag==="example").map(fk);return hk.SignatureDefinitionFunction.parse({type:hk.SignatureDefinitionBaseType.Function,arguments:t.getArguments().map((a,u)=>{let p=a.getLabel(),d=a.getTypes().map(m=>m.toString()),h=a.isOptional();return vn(st({types:d,opt:h},o[u]),{label:p})}),returns:l.type.split("|"),description:s,example:c})}return t}gc.enrichWithMetaInformation=vA});var ig=T(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});yc.createResolveChain=void 0;var At=pe();function Ir(t,e,n=null,r=!1){switch(t.type){case At.ASTType.ParenthesisExpression:{Ir(t.expression,e,n);return}case At.ASTType.MemberExpression:{let i=t;Ir(i.base,e),e.push({ref:t,getter:i.identifier,unary:n,isInCallExpression:r});return}case At.ASTType.IndexExpression:{let i=t;Ir(i.base,e),e.push({ref:t,getter:i.index,unary:n,isInCallExpression:r});return}case At.ASTType.CallStatement:{Ir(t.expression,e,n,!0);return}case At.ASTType.CallExpression:{Ir(t.base,e,n,!0);return}case At.ASTType.NegationExpression:case At.ASTType.BinaryNegatedExpression:case At.ASTType.UnaryExpression:{let i=t;Ir(i.argument,e,i);return}case At.ASTType.Identifier:{e.push({ref:t,getter:t,unary:n,isInCallExpression:r});return}case At.ASTType.NumericLiteral:case At.ASTType.StringLiteral:case At.ASTType.NilLiteral:case At.ASTType.MapConstructorExpression:case At.ASTType.ListConstructorExpression:{e.push({ref:t,value:t,unary:n,isInCallExpression:r});return}case At.ASTType.SliceExpression:Ir(t.base,e),e.push({ref:t,unary:n,isInCallExpression:r})}}function _A(t){let e=[];return Ir(t,e),e}yc.createResolveChain=_A});var gk=T(sg=>{function mk(t,e){return t>e?1:-1}sg.hash=function t(e,n){var r=5381;if(typeof e=="object"&&e!==null&&(e.toString===Object.prototype.toString||e.toString===Array.prototype.toString)){n||(n=new WeakSet);for(var i=Object.keys(e).sort(mk),s=0;s<i.length;s++){var o=i[s],l=e[o];if(r=33*r^t(o,n),typeof l=="object"&&l!==null&&(e.toString===Object.prototype.toString||e.toString===Array.prototype.toString)){if(n.has(l))continue;n.add(l)}r=33*r^t(l,n)}return 33*r^t(e.constructor,n)}var c=typeof e;try{e instanceof Date?c+=e.getTime():c+=String(e)}catch(u){c+=String(Object.assign({},e))}for(var a=0;a<c.length;a++)r=33*r^c.charCodeAt(a);return r},sg.sortNumbers=mk});var lg=T(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.ObjectSet=as.ObjectSetIterator=void 0;var og=gk(),bc=class{constructor(e){let n=this;n.value=e,n.index=0}next(){let e=this;return e.index>=e.value.length?{value:null,done:!0}:{value:e.value[e.index++],done:!1}}};as.ObjectSetIterator=bc;var ag=class{constructor(e){let r=(e?Array.from(e):[]).map(i=>[(0,og.hash)(i),i]);this._map=new Map(r),this._first=null,this._last=null,r.length>0&&(this._first=r[0][0],this._last=r[r.length-1][0])}[Symbol.iterator](){return new bc(Array.from(this._map.values()))}first(){var e;return this._first!=null&&(e=this._map.get(this._first))!=null?e:null}last(){var e;return this._last!=null&&(e=this._map.get(this._last))!=null?e:null}toArray(){return Array.from(this._map.values())}add(e){var r;let n=(0,og.hash)(e);return this._map.set(n,e),(r=this._first)!=null||(this._first=n),this._last=n,this}delete(e){let n=(0,og.hash)(e);return this._map.delete(n)}extend(e){var n;for(let[r,i]of e._map)this._map.set(r,i),(n=this._first)!=null||(this._first=r),this._last=r;return this}toJSON(){return Array.from(this._map.values())}clear(){this._map.clear()}};as.ObjectSet=ag});var cg=T(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION=void 0;vc.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION="This is a custom method. You can add a description for this method by adding a comment above or after the function.\n```\nmyFunction = function(a, b, c) // This function does xyz\n```\nor\n```\n/*\n This function does xyz\n*/\nmyFunction = function(a, b, c)\n```"});var Jr=T(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.CompletionItemKind=void 0;var wA;(function(t){t.Variable="var",t.Property="var",t.Function="function",t.Literal="literal",t.Constant="constant",t.ListConstructor="list",t.MapConstructor="map",t.Expression="expr",t.Unknown="unknown"})(wA=Co.CompletionItemKind||(Co.CompletionItemKind={}))});var ug=T(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.isResolveChainItemWithValue=jn.isResolveChainItemWithIdentifier=jn.isResolveChainItemWithMember=jn.isResolveChainItemWithIndex=void 0;var Er=pe(),xA=t=>t!=null&&t.ref.type===Er.ASTType.IndexExpression;jn.isResolveChainItemWithIndex=xA;var SA=t=>t!=null&&t.ref.type===Er.ASTType.MemberExpression;jn.isResolveChainItemWithMember=SA;var kA=t=>t!=null&&t.ref.type===Er.ASTType.Identifier;jn.isResolveChainItemWithIdentifier=kA;var TA=t=>t!=null&&(t.ref.type===Er.ASTType.NumericLiteral||t.ref.type===Er.ASTType.StringLiteral||t.ref.type===Er.ASTType.NilLiteral||t.ref.type===Er.ASTType.MapConstructorExpression||t.ref.type===Er.ASTType.ListConstructorExpression);jn.isResolveChainItemWithValue=TA});var dg=T(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});_c.isSignatureDefinitionFunction=void 0;var IA=Yt(),EA=t=>t.getType().type===IA.SignatureDefinitionBaseType.Function;_c.isSignatureDefinitionFunction=EA});var Ro=T(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});wc.injectIdentifers=void 0;var CA=(t,e)=>{for(let[n,r]of e.values)n.startsWith("i:")&&t.set(n.slice(2),{kind:r.kind,line:r.line})};wc.injectIdentifers=CA});var Sc=T(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.isEligibleForProperties=void 0;var pg=Yt(),RA=t=>t.types.has(pg.SignatureDefinitionBaseType.Map)||t.types.has(pg.SignatureDefinitionBaseType.List)||t.types.has(pg.SignatureDefinitionBaseType.Any);xc.isEligibleForProperties=RA});var Tc=T(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.lookupProperty=void 0;var PA=Sc(),AA=(t,e)=>{let n=t;for(;(0,PA.isEligibleForProperties)(n);){let r=n.values.get(`i:${e}`);if(r!=null)return r;let i=n.values.get("i:__isa");if(i==null)break;n=i}return null};kc.lookupProperty=AA});var us=T(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.Entity=Cr.resolveEntity=void 0;var ls=Yt(),cs=Jr(),OA=dg(),DA=Ro(),Ic=Sc(),yk=Tc(),bk=lg(),jA=(t,e,n=!1)=>{if(e.isCallable()&&!n){let r=e.getReturnEntity();if(r!==null)return r;let i=e.getCallableReturnTypes();return i?new Xr({kind:cs.CompletionItemKind.Variable,container:t,label:e.label,context:e.context}).addType(...i):new Xr({kind:cs.CompletionItemKind.Variable,container:t,label:e.label,context:e.context}).addType(ls.SignatureDefinitionBaseType.Any)}return e};Cr.resolveEntity=jA;var hg={hasProperty(t,e,n){return!!(0,yk.lookupProperty)(t,n)||!t.isAPI()&&!!e.getDefinition(Array.from(t.types),n,!0)},resolveProperty(t,e,n,r=!1){var s;let i=(s=(0,yk.lookupProperty)(t,n))!=null?s:null;return i==null?t.isAPI()?null:e.getDefinition(Array.from(t.types),n,r):(0,Cr.resolveEntity)(e,i,r)},setProperty(t,e,n,r){if(!(0,Ic.isEligibleForProperties)(t))return!1;let i=`i:${n}`,s=t.values.get(i);return s?s.extend(r):t.values.set(i,r.copy({container:e,label:n,context:t})),!0}},fg={hasProperty(t,e,n){if(!(0,Ic.isEligibleForProperties)(t))return!1;for(let r of n.types)if(t.values.has(`t:${r}`))return!0;return!1},resolveProperty(t,e,n,r=!1){if(!(0,Ic.isEligibleForProperties)(t))return new Xr({kind:cs.CompletionItemKind.Variable,container:e,label:n.label,context:t}).addType(ls.SignatureDefinitionBaseType.Any);let i=new Xr({kind:cs.CompletionItemKind.Variable,container:e,label:n.label,context:t});for(let s of n.types){let o=t.values.get(`t:${s}`);o&&i.extend(o)}return i.types.size===0&&i.addType(ls.SignatureDefinitionBaseType.Any),(0,Cr.resolveEntity)(e,i,r)},setProperty(t,e,n,r){if(!(0,Ic.isEligibleForProperties)(t))return!1;for(let i of n.types){let s=`t:${i}`,o=t.values.get(s);o?o.extend(r):t.values.set(s,r.copy({container:e,label:i,context:t}))}return!0}},Xr=class t{get kind(){return this._kind}get line(){return this._line}get signatureDefinitions(){return this._signatureDefinitions}get context(){return this._context}get label(){return this._label}get types(){return this._types}get values(){return this._values}constructor(e){var n,r,i,s,o,l,c,a,u;this._isAPI=(n=e.isAPI)!=null?n:!1,this._isFromSignature=(r=e.isFromSignature)!=null?r:!1,this._kind=e.kind,this._line=(i=e.line)!=null?i:-1,this._label=(s=e.label)!=null?s:"anonymous",this._signatureDefinitions=(o=e.signatureDefinitions)!=null?o:new bk.ObjectSet,this._types=(l=e.types)!=null?l:new Set,this._values=(c=e.values)!=null?c:new Map,this._context=(a=e.context)!=null?a:null,this._container=e.container,this._returnEntity=(u=e.returnEntity)!=null?u:null}isFromSignature(){return this._isFromSignature}hasContext(){return this._context!=null&&!this._context.isAPI}isAPI(){return this._isAPI}isCallable(){return this._types.has(ls.SignatureDefinitionBaseType.Function)}getCallableReturnTypes(){if(!this.isCallable())return null;let e=Array.from(this._signatureDefinitions).filter(n=>(0,OA.isSignatureDefinitionFunction)(n));return e.length===0?null:e.flatMap(n=>n.getReturns()).map(n=>n.type)}addSignatureType(e){return this._signatureDefinitions.add(e),this.addType(e.getType().type),this}setReturnEntity(e){return this._returnEntity=e,this}getReturnEntity(){return this._returnEntity}setKind(e){return this._kind=e,this}setLine(e){return this._line=e,this}setLabel(e){return this._label=e,this}setContext(e){return this._context=e,this}addType(...e){for(let n of e)this._types.add(n);return this}hasProperty(e){switch(typeof e){case"object":return fg.hasProperty(this,this._container,e);default:return hg.hasProperty(this,this._container,e)}}resolveProperty(e,n=!1){switch(typeof e){case"object":return fg.resolveProperty(this,this._container,e,n);default:return hg.resolveProperty(this,this._container,e,n)}}setProperty(e,n){switch(typeof e){case"object":return fg.setProperty(this,this._container,e,n);default:return hg.setProperty(this,this._container,e,n)}}extend(e){if(e===this)return this;this._isFromSignature=!1,this._signatureDefinitions.extend(e.signatureDefinitions),this.addType(...e.types);for(let[n,r]of e.values){let i=this.values.get(n);i==null?this.values.set(n,r.copy({container:this._container,context:this})):i.extend(r)}return this}insertSignature(e){let n=Object.keys(e.getDefinitions());this.addType(ls.SignatureDefinitionBaseType.Map);for(let r=0;r<n.length;r++){let i=n[r],s=e.getDefinition(i),o=new t({label:i,kind:s.getType().type===ls.SignatureDefinitionBaseType.Function?cs.CompletionItemKind.Function:cs.CompletionItemKind.Property,container:this._container,isFromSignature:!0});o.addSignatureType(s),this.setProperty(i,o)}return this}getAllIdentifier(){let e=new Map,n=this._values.get("i:__isa");if(n!=null)for(let r of n.getAllIdentifier())e.set(...r);for(let r of this._types){let i=this._container.getAllIdentifier(r);for(let s of i)e.set(...s)}return(0,DA.injectIdentifers)(e,this),e}toJSONInternal(e=new WeakMap){if(e.has(this))return e.get(this);let n={};return e.set(this,n),n.kind=this.kind,n.signatureDefinitions=this._signatureDefinitions.toJSON(),n.types=Array.from(this._types),n.values=Array.from(this._values).reduce((r,[i,s])=>(r[i]=s==null?void 0:s.toJSONInternal(e),r),{}),n}toJSON(){return this.toJSONInternal()}copy(e={}){var r,i,s,o,l,c,a;let n=new t({kind:(r=e.kind)!=null?r:this._kind,line:(i=e.line)!=null?i:this._line,isFromSignature:(s=e.isFromSignature)!=null?s:this._isFromSignature,isAPI:(o=e.isAPI)!=null?o:this._isAPI,container:(l=e.container)!=null?l:this._container,label:(c=e.label)!=null?c:this._label,context:(a=e.context)!=null?a:this._context,signatureDefinitions:new bk.ObjectSet(Array.from(this._signatureDefinitions,u=>u.copy())),types:new Set(this._types),returnEntity:this._returnEntity});return e.values?n._values=e.values:n._values=new Map(Array.from(this._values,([u,p])=>[u,p.copy({container:e.container,line:e.line,context:n,values:p.values})])),n}};Cr.Entity=Xr});var yg=T(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.Scope=void 0;var Ec=Yt(),Zr=Jr(),mg=Ro(),Cc=us(),gg=class t{get signatureDefinitions(){return null}get kind(){return Zr.CompletionItemKind.Constant}get line(){return this._locals.line}get label(){return this._locals.label}get context(){return this._locals.context}get types(){return new Set(Ec.SignatureDefinitionBaseType.Map)}get values(){return this._locals.values}get globals(){return this._globals}get outer(){var e,n;return(n=(e=this._parent)==null?void 0:e.locals)!=null?n:null}get locals(){return this._locals}constructor(e){var n,r;this._container=e.container,this._parent=(n=e.parent)!=null?n:null,this._globals=e.globals,this._locals=(r=e.locals)!=null?r:new Cc.Entity({kind:Zr.CompletionItemKind.Constant,container:this._container,label:"locals"}).addType(Ec.SignatureDefinitionBaseType.Map)}addSignatureType(){throw new Error("Cannot add signature type to scope!")}hasProperty(e){return this._locals.hasProperty(e)}resolveProperty(e,n){return this._locals.resolveProperty(e,n)}resolveNamespace(e,n=!1){var r,i,s;if(typeof e!="string")throw new Error("Invalid property type for scope!");if(e==="locals")return this._locals;if(e==="outer")return(i=(r=this._parent)==null?void 0:r.locals)!=null?i:this._globals;if(e==="globals")return this._globals;if(this._locals.values.has(`i:${e}`)){let o=this._locals.values.get(`i:${e}`);return(0,Cc.resolveEntity)(this._container,o,n)}else if((s=this._parent)!=null&&s.locals.values.has(`i:${e}`)){let o=this._parent.locals.values.get(`i:${e}`);return(0,Cc.resolveEntity)(this._container,o,n)}else if(this._globals.values.has(`i:${e}`)){let o=this._globals.values.get(`i:${e}`);return(0,Cc.resolveEntity)(this._container,o,n)}return this._container.getGeneralDefinition(e,n)}setProperty(e,n){return this._locals.setProperty(e,n)}extend(e){return this._locals.extend(e),this}addType(){throw new Error("Scope cannot get type assigned!")}setReturnEntity(){throw new Error("Scope cannot set return entity!")}getReturnEntity(){throw new Error("Scope cannot get return entity!")}setKind(e){return this._locals.setKind(e),this}setLine(e){return this._locals.setLine(e),this}setLabel(e){return this._locals.setLabel(e),this}setContext(e){return this._locals.setContext(e),this}insertSignature(e){return this._locals.insertSignature(e),this}isAPI(){return!1}hasContext(){return!1}isFromSignature(){return!1}isCallable(){return!1}getCallableReturnTypes(){return null}getAllIdentifier(){let e=new Map([["globals",{kind:Zr.CompletionItemKind.Constant,line:-1}],["locals",{kind:Zr.CompletionItemKind.Constant,line:-1}],["outer",{kind:Zr.CompletionItemKind.Constant,line:-1}],...this._container.getAllIdentifier(Ec.SignatureDefinitionBaseType.General)]);return this._locals!==this._globals&&(0,mg.injectIdentifers)(e,this._globals),this._parent&&(0,mg.injectIdentifers)(e,this._parent.locals),(0,mg.injectIdentifers)(e,this._locals),this.isSelfAvailable()&&e.set("self",{kind:Zr.CompletionItemKind.Constant,line:-1}),this.isSuperAvailable()&&e.set("super",{kind:Zr.CompletionItemKind.Constant,line:-1}),e}isSelfAvailable(){return this._locals.context!=null&&this._locals.context.types.has(Ec.SignatureDefinitionBaseType.Map)}isSuperAvailable(){return this.isSelfAvailable()&&this._locals.context.hasProperty("__isa")}toJSON(){return this._locals.toJSON()}copy(e={}){var n;return new t({container:(n=e.container)!=null?n:this._container,parent:this._parent.copy({container:e.container}),globals:this._globals.copy({container:e.container}),locals:this._locals.copy(e)})}};Rc.Scope=gg});var ds=T(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.GreybelKeyword=void 0;var LA;(function(t){t.Envar="#envar",t.Import="#import",t.Include="#include",t.ImportWithComment="//import",t.IncludeWithComment="//include",t.Debugger="debugger",t.Line="#line",t.File="#filename",t.Inject="#inject"})(LA=Po.GreybelKeyword||(Po.GreybelKeyword={}))});var _g=T(vg=>{"use strict";Object.defineProperty(vg,"__esModule",{value:!0});var ei=pe(),MA=ds(),bg=class extends ei.LexerValidator{constructor(){super(...arguments),this.isKeyword=Set.prototype.has.bind(new Set([...Object.values(ei.Keyword),...Object.values(MA.GreybelKeyword)]))}isIdentifierStart(e){return super.isIdentifierStart(e)||e===ei.CharacterCode.HASH}isMultilineComment(e,n){return ei.CharacterCode.SLASH===e&&ei.CharacterCode.ASTERISK===n}isMultilineCommentEnd(e,n){return ei.CharacterCode.ASTERISK===e&&ei.CharacterCode.SLASH===n}isComment(e,n){return super.isComment(e,n)||this.isMultilineComment(e,n)}};vg.default=bg});var wg=T(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.CharacterCode=void 0;var qA;(function(t){t[t.VERTICAL_LINE=124]="VERTICAL_LINE",t[t.AMPERSAND=38]="AMPERSAND"})(qA=Ao.CharacterCode||(Ao.CharacterCode={}))});var ps=T(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.Operator=void 0;var FA;(function(t){t.BitwiseAnd="&",t.BitwiseOr="|",t.LeftShift="<<",t.RightShift=">>",t.UnsignedRightShift=">>>"})(FA=Oo.Operator||(Oo.Operator={}))});var Sg=T(Do=>{"use strict";var NA=Do&&Do.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Do,"__esModule",{value:!0});var mn=pe(),$A=NA(_g()),vk=wg(),_k=ds(),xg=ps();function wk(t){let e=this.content[this.index];return this.index+=e.length,this.createPunctuator(e,t)}var Pc=class t extends mn.Lexer{constructor(e,n={}){n.validator=n.validator||new $A.default,super(e,n)}scan(e,n){let r=t.greybelScanHandlers[e];return r?r.call(this,n)||super.scan(e,n):super.scan(e,n)}scanMultilineComment(e){let n=this,r=n.line,i=n.lineStart,s=n.index+2,o=0,l=n.offset,c=!1;for(;n.index<n.length;){let p=n.codeAt();if(n.validator.isEndOfLine(p))n.validator.isWinNewline(p,n.codeAt(1))&&n.index++,n.line++,o=n.index+1-n.offset,l=n.index+1;else if(n.validator.isMultilineCommentEnd(n.codeAt(),n.codeAt(1))){c=!0;break}n.index++}if(!c)return n.raise("Unexpected end of file in multiline comment.",new mn.ASTRange(new mn.ASTPosition(r,i-l+1),new mn.ASTPosition(n.line,n.index-l+1)));let a=n.content.slice(s,n.index);n.index+=2;let u=new mn.Token({type:mn.TokenType.Comment,value:a,line:r,lineStart:i,range:[n.tokenStart,n.index-o],offset:n.offset,afterSpace:e,lastLine:n.line,lastLineStart:n.lineStart});return n.offset=l,n.snapshot.enqueue(u),u}scanComment(e){let n=this,r=n.validator;return n.content.startsWith(_k.GreybelKeyword.ImportWithComment,n.index)||n.content.startsWith(_k.GreybelKeyword.IncludeWithComment,n.index)?(n.index++,n.scanIdentifierOrKeyword(e)):r.isMultilineComment(n.codeAt(),n.codeAt(1))?n.scanMultilineComment(e):super.scanComment(e)}};Do.default=Pc;Pc.greybelScanHandlers={[mn.CharacterCode.ARROW_LEFT]:function(e){if(mn.CharacterCode.ARROW_LEFT===this.codeAt(1))return this.scanPunctuator(xg.Operator.LeftShift,e)},[mn.CharacterCode.ARROW_RIGHT]:function(e){if(mn.CharacterCode.ARROW_RIGHT===this.codeAt(1))return mn.CharacterCode.ARROW_RIGHT===this.codeAt(2)?this.scanPunctuator(xg.Operator.UnsignedRightShift,e):this.scanPunctuator(xg.Operator.RightShift,e)},[vk.CharacterCode.AMPERSAND]:wk,[vk.CharacterCode.VERTICAL_LINE]:wk}});var Ac=T(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.ASTType=void 0;var BA;(function(t){t.FeatureImportExpression="FeatureImportExpression",t.FeatureIncludeExpression="FeatureIncludeExpression",t.FeatureEnvarExpression="FeatureEnvarExpression",t.FeatureInjectExpression="FeatureInjectExpression",t.FeatureDebuggerExpression="FeatureDebuggerExpression",t.FeatureLineExpression="FeatureLineExpression",t.FeatureFileExpression="FeatureFileExpression"})(BA=jo.ASTType||(jo.ASTType={}))});var Tg=T(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});Oc.ASTChunkAdvanced=void 0;var UA=pe(),kg=class t extends UA.ASTChunk{constructor(e){super(e),this.imports=e.imports||[],this.includes=e.includes||[],this.injects=e.injects||[]}clone(){return new t({literals:this.literals.map(e=>e.clone()),scopes:this.scopes.map(e=>e.clone()),imports:this.imports.map(e=>e.clone()),includes:this.includes.map(e=>e.clone()),injects:this.injects.map(e=>e.clone()),lines:this.lines,start:this.start,end:this.end,scope:this.scope})}};Oc.ASTChunkAdvanced=kg});var Ag=T(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.ASTFeatureFileExpression=an.ASTFeatureInjectExpression=an.ASTFeatureEnvarExpression=an.ASTFeatureIncludeExpression=an.ASTFeatureImportExpression=void 0;var Lo=pe(),Mo=Ac(),Ig=class t extends Lo.ASTBase{constructor(e){super(Mo.ASTType.FeatureImportExpression,e),this.name=e.name,this.path=e.path,this.chunk=e.chunk,this.namespace=e.namespace}toString(){return`FeatureImportExpression[${this.start}-${this.end}][name = ${this.name}, path = ${this.path}]`}clone(){return new t({name:this.name.clone(),path:this.path,chunk:this.chunk.clone(),namespace:this.namespace,start:this.start,end:this.end,scope:this.scope})}};an.ASTFeatureImportExpression=Ig;var Eg=class t extends Lo.ASTBase{constructor(e){super(Mo.ASTType.FeatureIncludeExpression,e),this.path=e.path,this.chunk=e.chunk,this.namespace=e.namespace}toString(){return`FeatureIncludeExpression[${this.start}-${this.end}][path = ${this.path}]`}clone(){return new t({path:this.path,chunk:this.chunk.clone(),namespace:this.namespace,start:this.start,end:this.end,scope:this.scope})}};an.ASTFeatureIncludeExpression=Eg;var Cg=class t extends Lo.ASTBase{constructor(e){super(Mo.ASTType.FeatureEnvarExpression,e),this.name=e.name}toString(){return`FeatureEnvarExpression[${this.start}-${this.end}][name = ${this.name}]`}clone(){return new t({name:this.name,start:this.start,end:this.end,scope:this.scope})}};an.ASTFeatureEnvarExpression=Cg;var Rg=class t extends Lo.ASTBase{constructor(e){super(Mo.ASTType.FeatureInjectExpression,e),this.path=e.path}toString(){return`FeatureInjectExpression[${this.start}-${this.end}][path = ${this.path}]`}clone(){return new t({path:this.path,start:this.start,end:this.end,scope:this.scope})}};an.ASTFeatureInjectExpression=Rg;var Pg=class t extends Lo.ASTBase{constructor(e){super(Mo.ASTType.FeatureFileExpression,e),this.filename=e.filename}toString(){return`FeatureFileExpression[${this.start}-${this.end}][path = ${this.filename}]`}clone(){return new t({filename:this.filename,start:this.start,end:this.end,scope:this.scope})}};an.ASTFeatureFileExpression=Pg});var jg=T(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.ASTFeatureInjectExpression=ft.ASTFeatureIncludeExpression=ft.ASTFeatureImportExpression=ft.ASTFeatureFileExpression=ft.ASTFeatureEnvarExpression=ft.ASTChunkAdvanced=ft.ASTType=ft.ASTProvider=void 0;var Og=pe(),xk=Ac(),WA=Tg(),qo=Ag(),Dg=class extends Og.ASTProvider{featureImportExpression(e){return new qo.ASTFeatureImportExpression(e)}featureIncludeExpression(e){return new qo.ASTFeatureIncludeExpression(e)}featureEnvarExpression(e){return new qo.ASTFeatureEnvarExpression(e)}featureInjectExpression(e){return new qo.ASTFeatureInjectExpression(e)}featureDebuggerExpression(e){return new Og.ASTBase(xk.ASTType.FeatureDebuggerExpression,e)}featureLineExpression(e){return new Og.ASTBase(xk.ASTType.FeatureLineExpression,e)}featureFileExpression(e){return new qo.ASTFeatureFileExpression(e)}chunkAdvanced(e){return new WA.ASTChunkAdvanced(e)}};ft.ASTProvider=Dg;var VA=Ac();Object.defineProperty(ft,"ASTType",{enumerable:!0,get:function(){return VA.ASTType}});var HA=Tg();Object.defineProperty(ft,"ASTChunkAdvanced",{enumerable:!0,get:function(){return HA.ASTChunkAdvanced}});var Fo=Ag();Object.defineProperty(ft,"ASTFeatureEnvarExpression",{enumerable:!0,get:function(){return Fo.ASTFeatureEnvarExpression}});Object.defineProperty(ft,"ASTFeatureFileExpression",{enumerable:!0,get:function(){return Fo.ASTFeatureFileExpression}});Object.defineProperty(ft,"ASTFeatureImportExpression",{enumerable:!0,get:function(){return Fo.ASTFeatureImportExpression}});Object.defineProperty(ft,"ASTFeatureIncludeExpression",{enumerable:!0,get:function(){return Fo.ASTFeatureIncludeExpression}});Object.defineProperty(ft,"ASTFeatureInjectExpression",{enumerable:!0,get:function(){return Fo.ASTFeatureInjectExpression}})});var Lg=T(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.SelectorGroups=ze.SelectorGroupType=ze.Selectors=ze.SelectorTypes=void 0;var ve=pe(),Dc=ds(),No=ps(),zA;(function(t){t.From="From",t.Envar="Envar",t.Inject="Inject",t.Line="Line",t.File="File",t.LeftShift="LeftShift",t.RightShift="RightShift",t.UnsignedRightShift="UnsignedRightShift",t.BitwiseOr="BitwiseOr",t.BitwiseAnd="BitwiseAnd",t.Escape="Escape"})(zA=ze.SelectorTypes||(ze.SelectorTypes={}));ze.Selectors=Object.assign(Object.assign({},ve.Selectors),{From:(0,ve.createSelector)({type:ve.TokenType.Identifier,value:"from"}),Envar:(0,ve.createSelector)({type:ve.TokenType.Keyword,value:Dc.GreybelKeyword.Envar}),Inject:(0,ve.createSelector)({type:ve.TokenType.Keyword,value:Dc.GreybelKeyword.Inject}),Line:(0,ve.createSelector)({type:ve.TokenType.Keyword,value:Dc.GreybelKeyword.Line}),File:(0,ve.createSelector)({type:ve.TokenType.Keyword,value:Dc.GreybelKeyword.File}),LeftShift:(0,ve.createSelector)({type:ve.TokenType.Punctuator,value:No.Operator.LeftShift}),RightShift:(0,ve.createSelector)({type:ve.TokenType.Punctuator,value:No.Operator.RightShift}),UnsignedRightShift:(0,ve.createSelector)({type:ve.TokenType.Punctuator,value:No.Operator.UnsignedRightShift}),BitwiseOr:(0,ve.createSelector)({type:ve.TokenType.Punctuator,value:No.Operator.BitwiseOr}),BitwiseAnd:(0,ve.createSelector)({type:ve.TokenType.Punctuator,value:No.Operator.BitwiseAnd}),Escape:(0,ve.createSelector)({type:ve.TokenType.Punctuator,value:ve.Operator.Escape})});var Vn;(function(t){t.MapSeparator="MapSeparator",t.ListSeparator="ListSeparator",t.PathSegmentEnd="PathSegmentEnd",t.BitwiseOperators="BitwiseOperators"})(Vn=ze.SelectorGroupType||(ze.SelectorGroupType={}));ze.SelectorGroups=Object.assign(Object.assign({},ve.SelectorGroups),{[Vn.MapSeparator]:(0,ve.createSelectorGroup)(Vn.MapSeparator,[ze.Selectors.MapSeperator,ze.Selectors.CRBracket]),[Vn.ListSeparator]:(0,ve.createSelectorGroup)(Vn.ListSeparator,[ze.Selectors.MapSeperator,ze.Selectors.SRBracket]),[Vn.PathSegmentEnd]:(0,ve.createSelectorGroup)(Vn.PathSegmentEnd,[ze.Selectors.EndOfLine,ze.Selectors.Comment,ze.Selectors.EndOfFile]),[Vn.BitwiseOperators]:(0,ve.createSelectorGroup)(Vn.BitwiseOperators,[ze.Selectors.LeftShift,ze.Selectors.RightShift,ze.Selectors.UnsignedRightShift])})});var Tk=T($o=>{"use strict";var GA=$o&&$o.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($o,"__esModule",{value:!0});var $t=pe(),KA=Gi(),Sk=Ji(),YA=GA(Sg()),QA=jg(),ti=ds(),kk=ps(),ge=Lg(),Mg=class extends $t.Parser{constructor(e,n={}){var r;n.lexer=n.lexer||new YA.default(e,{unsafe:n.unsafe,tabWidth:n.tabWidth}),n.astProvider=n.astProvider||new QA.ASTProvider,super(e,n);let i=this;i.filename=(r=n.filename)!==null&&r!==void 0?r:"unknown",i.imports=[],i.includes=[],i.injects=[]}skipNewlines(){let e=this,n=0;for(;;){if(ge.Selectors.Comment(e.token)){let r=e.astProvider.comment({value:e.token.value,isMultiline:e.token.value.indexOf(`
104
104
  `)!==-1,start:e.token.start,end:e.token.end,scope:e.currentScope});e.addItemToLines(r),e.backpatches.peek().body.push(r)}else if(ge.Selectors.EndOfLine(e.token))n++;else break;e.next()}return n}parseMap(e=!1,n=!1){let r=this;if(!ge.Selectors.CLBracket(r.token))return r.parseList(e,n);let i=r.currentScope,s=r.token.start,o=[],l=r.astProvider.mapConstructorExpression({fields:o,start:s,end:null,scope:i});if(r.next(),ge.Selectors.CRBracket(r.token))r.next();else for(;!ge.Selectors.EndOfFile(r.token);){if(r.skipNewlines(),ge.Selectors.CRBracket(r.token)){r.next();break}let c=r.astProvider.mapKeyString({key:null,value:null,start:r.token.start,end:null,scope:i});if(c.key=r.parseExpr(null),r.requireToken(ge.Selectors.MapKeyValueSeperator),r.skipNewlines(),r.currentAssignment){let u=r.astProvider.assignmentStatement({variable:r.astProvider.indexExpression({index:c.key,base:r.currentAssignment.variable,start:c.start,end:r.token.end,scope:i}),init:null,start:c.start,end:null}),p=r.currentAssignment;r.currentAssignment=u,c.value=r.parseExpr(c),r.currentAssignment=p,u.init=c.value,u.end=r.previousToken.end,i.assignments.push(u)}else c.value=r.parseExpr(c);c.end=r.previousToken.end,o.push(c),r.skipNewlines();let a=r.requireTokenOfAny(ge.SelectorGroups.MapSeparator,s);if(ge.Selectors.CRBracket(a))break}return l.end=r.token.start,l}parseList(e=!1,n=!1){let r=this;if(!ge.Selectors.SLBracket(r.token))return r.parseQuantity(e,n);let i=r.currentScope,s=r.token.start,o=[],l=r.astProvider.listConstructorExpression({fields:o,start:s,end:null,scope:i});if(r.next(),ge.Selectors.SRBracket(r.token))r.next();else for(;!ge.Selectors.EndOfFile(r.token);){if(r.skipNewlines(),ge.Selectors.SRBracket(r.token)){r.next();break}let c=r.astProvider.listValue({value:null,start:r.token.start,end:null,scope:i});if(r.currentAssignment){let u=r.astProvider.assignmentStatement({variable:r.astProvider.indexExpression({index:r.astProvider.literal($t.TokenType.NumericLiteral,{value:o.length,raw:`${o.length}`,start:s,end:r.token.end,scope:i}),base:r.currentAssignment.variable,start:null,end:null,scope:i}),init:null,start:null,end:null}),p=r.currentAssignment,d=r.token;r.currentAssignment=p,c.value=r.parseExpr(c),r.currentAssignment=p,u.variable.start=d.start,u.variable.end=r.previousToken.end,u.init=c.value,u.start=c.start,u.end=r.previousToken.end,i.assignments.push(u)}else c.value=r.parseExpr(c);c.end=r.previousToken.end,o.push(c),r.skipNewlines();let a=r.requireTokenOfAny(ge.SelectorGroups.ListSeparator,s);if(ge.Selectors.SRBracket(a))break}return l.end=r.token.start,l}parsePathSegment(){let e=this;if(this.token.type===$t.ASTType.StringLiteral){let r=this.token.value;return this.next(),r}let n="";for(;!ge.SelectorGroups.PathSegmentEnd(e.token);)n=n+e.token.value,e.next();return e.consumeMany(ge.SelectorGroups.PathSegmentEnd),n}parseFeatureIncludeStatement(){let e=this,n=e.previousToken.start,r=e.parsePathSegment(),i=e.astProvider.featureIncludeExpression({path:r,start:n,end:e.previousToken.end,scope:e.currentScope});return e.includes.push(i),i}parseFeatureImportStatement(){var e;let n=this,r=n.previousToken.start,i=n.parseIdentifier();if(!n.consume(ge.Selectors.From))return n.raise("expected from keyword",new Sk.Range(r,new KA.Position((e=n.token.lastLine)!==null&&e!==void 0?e:n.token.line,n.token.end.character))),n.parseInvalidCode();let s=n.parsePathSegment(),o=n.astProvider.featureImportExpression({name:i,path:s,start:r,end:n.previousToken.end,scope:n.currentScope});n.imports.push(o);let l=n.astProvider.assignmentStatement({variable:i,init:n.astProvider.literal($t.TokenType.NilLiteral,{value:null,raw:"null",start:i.start,end:i.end,scope:n.currentScope}),start:i.start,end:i.end,scope:n.currentScope});return n.currentScope.assignments.push(l),o}parseFeatureEnvarExpression(){let e=this,n=e.previousToken.start,r=e.token.value;return e.next(),e.astProvider.featureEnvarExpression({name:r,start:n,end:e.previousToken.end,scope:e.currentScope})}parseFeatureInjectExpression(){let e=this,n=e.previousToken.start,r=this.parsePathSegment();e.next();let i=e.astProvider.featureInjectExpression({path:r,start:n,end:e.previousToken.end,scope:e.currentScope});return e.injects.push(i),i}parseIsa(e=!1,n=!1){let r=this,i=r.token.start,s=r.parseBitwiseOr(e,n);if(ge.Selectors.Isa(r.token)){r.next(),r.skipNewlines();let o=r.parseBitwiseOr();return r.astProvider.isaExpression({operator:$t.Operator.Isa,left:s,right:o,start:i,end:r.previousToken.end,scope:r.currentScope})}return s}parseBitwiseOr(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseBitwiseAnd(e,n);for(;ge.Selectors.BitwiseOr(r.token);){r.next();let l=r.parseBitwiseAnd();o=r.astProvider.binaryExpression({operator:kk.Operator.BitwiseOr,left:o,right:l,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseBitwiseAnd(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseComparisons(e,n);for(;ge.Selectors.BitwiseAnd(r.token);){r.next();let l=r.parseComparisons();o=r.astProvider.binaryExpression({operator:kk.Operator.BitwiseAnd,left:o,right:l,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseAddSub(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseBitwise(e,n);for(;ge.Selectors.Plus(r.token)||ge.Selectors.Minus(r.token)&&(!n||!r.token.afterSpace||r.lexer.isAtWhitespace());){let l=r.token;r.next(),r.skipNewlines();let c=r.parseBitwise();o=r.astProvider.binaryExpression({operator:l.value,left:o,right:c,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseBitwise(e=!1,n=!1){let r=this,i=r.token.start,o=r.parseMultDiv(e,n);for(;ge.SelectorGroups.BitwiseOperators(r.token);){let l=r.token;r.next(),r.skipNewlines();let c=r.parseMultDiv();o=r.astProvider.binaryExpression({operator:l.value,left:o,right:c,start:i,end:r.previousToken.end,scope:r.currentScope})}return o}parseAtom(){let e=this;return ge.Selectors.Envar(e.token)?(e.next(),e.parseFeatureEnvarExpression()):ge.Selectors.Inject(e.token)?(e.next(),e.parseFeatureInjectExpression()):ge.Selectors.Line(e.token)?(e.next(),e.astProvider.featureLineExpression({start:new $t.ASTPosition(e.previousToken.line,e.previousToken.start.character),end:new $t.ASTPosition(e.previousToken.line,e.previousToken.end.character),scope:e.currentScope})):ge.Selectors.File(e.token)?(e.next(),e.astProvider.featureFileExpression({filename:e.filename,start:new $t.ASTPosition(e.previousToken.line,e.previousToken.start.character),end:new $t.ASTPosition(e.previousToken.line,e.previousToken.end.character),scope:e.currentScope})):super.parseAtom()}parseStatement(){let e=this,n=e.backpatches.peek();if(e.isType($t.TokenType.Keyword))switch(e.token.value){case ti.GreybelKeyword.Include:case ti.GreybelKeyword.IncludeWithComment:{e.next();let i=e.parseFeatureIncludeStatement();e.addItemToLines(i),n.body.push(i);return}case ti.GreybelKeyword.Import:case ti.GreybelKeyword.ImportWithComment:{e.next();let i=e.parseFeatureImportStatement();e.addItemToLines(i),n.body.push(i);return}case ti.GreybelKeyword.Envar:{e.next();let i=e.parseFeatureEnvarExpression();e.addItemToLines(i),n.body.push(i);return}case ti.GreybelKeyword.Inject:{e.next();let i=e.parseFeatureInjectExpression();e.addItemToLines(i),n.body.push(i);return}case ti.GreybelKeyword.Debugger:{e.next();let i=e.astProvider.featureDebuggerExpression({start:new $t.ASTPosition(e.previousToken.line,e.previousToken.start.character),end:new $t.ASTPosition(e.previousToken.line,e.previousToken.end.character),scope:e.currentScope});e.addItemToLines(i),n.body.push(i);return}default:break}super.parseStatement()}parseChunk(){let e=this;e.next();let n=e.token.start,r=e.astProvider.chunkAdvanced({start:n,end:null}),i=new $t.PendingChunk(r);for(e.backpatches.setDefault(i),e.pushScope(r);!ge.Selectors.EndOfFile(e.token)&&(e.skipNewlines(),!ge.Selectors.EndOfFile(e.token));)e.lexer.recordSnapshot(),e.statementErrors=[],e.parseStatement(),e.statementErrors.length>0&&e.tryToRecover();let s=e.backpatches.pop();for(;!(0,$t.isPendingChunk)(s);){let o=e.raise(`found open block ${s.block.type}`,new Sk.Range(s.block.start,s.block.start));if(s.complete(e.previousToken),e.errors.push(o),!e.unsafe)throw o;s=e.backpatches.pop()}return e.finishRemaingScopes(),e.popScope(),i.complete(e.token),r.literals=e.literals,r.scopes=e.scopes,r.lines=e.lines,r.imports=e.imports,r.includes=e.includes,r.injects=e.injects,r}};$o.default=Mg});var Bt=T(ct=>{"use strict";var JA=ct&&ct.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Bo=ct&&ct.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&JA(e,t,n)},qg=ct&&ct.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ct,"__esModule",{value:!0});ct.Parser=ct.LexerValidator=ct.Lexer=void 0;var XA=Sg();Object.defineProperty(ct,"Lexer",{enumerable:!0,get:function(){return qg(XA).default}});var ZA=_g();Object.defineProperty(ct,"LexerValidator",{enumerable:!0,get:function(){return qg(ZA).default}});var eO=Tk();Object.defineProperty(ct,"Parser",{enumerable:!0,get:function(){return qg(eO).default}});Bo(jg(),ct);Bo(wg(),ct);Bo(ds(),ct);Bo(ps(),ct);Bo(Lg(),ct)});var Ng=T(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.Aggregator=void 0;var jc=Bt(),me=Yt(),we=pe(),tO=cg(),ue=Jr(),ni=ug(),Ik=Om(),nO=rg(),Ek=ig(),Ck=bo(),rO=us(),Fg=class{get definitions(){return this._definitions}get parent(){return this._parent}constructor(e){var n;this._root=e.root,this._scope=e.scope,this._document=e.document,this._parent=(n=e.parent)!=null?n:null,this._definitions=new Map}factory(e){return new rO.Entity({kind:e,container:this._document.container})}createFunctionDescription(e,n=tO.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION){let r=this._document.getLastASTItemOfLine(e.start.line-1),i=this._document.findASTItemInLine(e.start.line,we.ASTType.Comment);if(r instanceof we.ASTComment){let s=new Set,o=[],l=e.start.line-1;for(;l>=0;){let c=this._document.getLastASTItemOfLine(l--);if(!s.has(c))if(c instanceof we.ASTComment)s.add(c),o.unshift(c.value);else break}return o.join(`
105
105
 
106
- `)}else if(i instanceof we.ASTComment)return i.value;return n}resolveFunctionStatement(e){let n=me.SignatureDefinitionFunction.parse({type:me.SignatureDefinitionBaseType.Function,description:this.createFunctionDescription(e),arguments:e.parameters.map(r=>{var s,o,l;if(r.type===we.ASTType.Identifier)return{label:(s=r.name)!=null?s:"unknown",type:me.SignatureDefinitionBaseType.Any};let i=r;return{label:(l=(o=i.variable)==null?void 0:o.name)!=null?l:"unknown",types:Array.from(this.resolveTypeWithDefault(i.init).types)}}),returns:["any"]});return this.factory(ue.CompletionItemKind.Function).addType(me.SignatureDefinitionBaseType.Function).addSignatureType((0,nO.enrichWithMetaInformation)(n)).setLine(e.start.line)}resolveParenthesisExpression(e){return this.resolveTypeWithDefault(e.expression)}resolveBinaryExpression(e){let n=this.factory(ue.CompletionItemKind.Expression).setLabel("Binary Expr").setLine(e.start.line),r=this.resolveTypeWithDefault(e.left),i=this.resolveTypeWithDefault(e.right);return n.extend(r),n.extend(i),n}resolveLogicalExpression(e){return this.factory(ue.CompletionItemKind.Expression).setLabel("Logical Expr").addType(me.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveComparisonGroupExpression(e){return this.factory(ue.CompletionItemKind.Expression).setLabel("Comparison Group Expr").addType(me.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveIsaExpression(e){return this.factory(ue.CompletionItemKind.Expression).setLabel("Isa Expr").addType(me.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveCallStatement(e){let n=this.resolveNamespace(e);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveCallExpression(e){let n=this.resolveNamespace(e);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveUnaryExpression(e){let n=this.resolveNamespace(e);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveMapConstructorExpression(e){let n=this.factory(ue.CompletionItemKind.MapConstructor).addType(me.SignatureDefinitionBaseType.Map);for(let r=0;r<e.fields.length;r++){let i=e.fields[r],s=this.resolveTypeWithDefault(i.value).setLine(i.start.line);if(i.key.type===we.ASTType.StringLiteral)n.setProperty(i.key.value.toString(),s);else{let o=this.resolveTypeWithDefault(i.key).setLine(i.start.line);n.setProperty(o,s)}}return n.setLabel("{}").setLine(e.start.line)}resolveListConstructorExpression(e){let n=this.factory(ue.CompletionItemKind.ListConstructor).addType(me.SignatureDefinitionBaseType.List);for(let r=0;r<e.fields.length;r++){let i=e.fields[r],s=this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Number).setLine(i.start.line),o=this.resolveTypeWithDefault(i.value).setLine(i.start.line);n.setProperty(s,o)}return n.setLabel("[]").setLine(e.start.line)}resolveSliceExpression(e){let n=this.resolveNamespace(e).setLine(e.start.line);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveIndexExpression(e,n=!1){let r=this.resolveNamespace(e,n);return r===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):r}resolveMemberExpression(e,n=!1){let r=this.resolveNamespace(e,n);return r===null?this.factory(ue.CompletionItemKind.Property).addType(me.SignatureDefinitionBaseType.Any).setLabel(e.identifier.name).setLine(e.start.line):r}resolveIdentifier(e,n=!1){let r=this.resolveNamespace(e,n);return r===null?this.factory(ue.CompletionItemKind.Property).addType(me.SignatureDefinitionBaseType.Any).setLabel(e.name).setLine(e.start.line):r}resolveType(e,n=!1){if(e==null)return null;switch(e.type){case we.ASTType.ParenthesisExpression:return this.resolveParenthesisExpression(e);case we.ASTType.CallStatement:return this.resolveCallStatement(e);case we.ASTType.CallExpression:return this.resolveCallExpression(e);case we.ASTType.BinaryExpression:return this.resolveBinaryExpression(e);case we.ASTType.LogicalExpression:return this.resolveLogicalExpression(e);case we.ASTType.IsaExpression:return this.resolveIsaExpression(e);case we.ASTType.ComparisonGroupExpression:return this.resolveComparisonGroupExpression(e);case we.ASTType.FunctionDeclaration:return this.resolveFunctionStatement(e);case we.ASTType.SliceExpression:return this.resolveSliceExpression(e);case we.ASTType.IndexExpression:return this.resolveIndexExpression(e,n);case we.ASTType.MemberExpression:return this.resolveMemberExpression(e,n);case we.ASTType.Identifier:return this.resolveIdentifier(e,n);case we.ASTType.MapConstructorExpression:return this.resolveMapConstructorExpression(e);case we.ASTType.ListConstructorExpression:return this.resolveListConstructorExpression(e);case we.ASTType.NegationExpression:case we.ASTType.BinaryNegatedExpression:case we.ASTType.UnaryExpression:return this.resolveUnaryExpression(e);case we.ASTType.NilLiteral:return this.factory(ue.CompletionItemKind.Literal).addType("null").setLabel("null").setLine(e.start.line);case we.ASTType.StringLiteral:{let r=e.value.toString();return this.factory(ue.CompletionItemKind.Literal).addType(me.SignatureDefinitionBaseType.String).setLabel(`"${r.length>20?r.substr(0,20)+"...":r}"`).setLine(e.start.line)}case we.ASTType.NumericLiteral:case we.ASTType.BooleanLiteral:{let r=e.value.toString();return this.factory(ue.CompletionItemKind.Literal).addType(me.SignatureDefinitionBaseType.Number).setLabel(r).setLine(e.start.line)}case jc.ASTType.FeatureFileExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.String).setLabel("File Expr").setLine(e.start.line);case jc.ASTType.FeatureLineExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.Number).setLabel("Line Expr").setLine(e.start.line);case jc.ASTType.FeatureEnvarExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.String).setLabel("Envar Expr").setLine(e.start.line);case jc.ASTType.FeatureInjectExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.String).setLabel("Inject Expr").setLine(e.start.line);default:return null}}resolveTypeWithDefault(e,n=!1){var r;return(r=this.resolveType(e,n))!=null?r:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line)}resolveChain(e,n=!1){var l,c,a,u,p,d,h,m,f,g,b;if(e.length===0)return null;let r=null,i=e[0],s=((l=i.unary)==null?void 0:l.operator)==="@"&&!i.isInCallExpression||n&&e.length===1;if((0,ni.isResolveChainItemWithIdentifier)(i))if(i.getter.name==="globals")r=this._scope.globals;else if(i.getter.name==="outer")r=this._scope.outer;else if(i.getter.name==="locals")r=this._scope.locals;else if(i.getter.name==="super"){let v=(a=(c=this._document.getScopeContext(i.ref.scope))==null?void 0:c.scope.context)==null?void 0:a.values.get("i:__isa");v==null?r=this.factory(ue.CompletionItemKind.Constant).addType("null").setLabel("super"):r=v.copy({kind:ue.CompletionItemKind.Constant,label:"super",values:v.values})}else if(i.getter.name==="self"){let v=(u=this._document.getScopeContext(i.ref.scope))==null?void 0:u.scope.context;v==null?r=this.factory(ue.CompletionItemKind.Constant).addType("null").setLabel("self"):r=v.copy({kind:ue.CompletionItemKind.Constant,label:"self",values:v.values})}else r=(p=this._scope.resolveNamespace(i.getter.name,s))!=null?p:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLabel(i.getter.name);else if((0,ni.isResolveChainItemWithValue)(i))r=this.resolveTypeWithDefault(i.value,s);else return null;if(((d=i.unary)==null?void 0:d.operator)==="new"&&r!==null){let v=this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Map).setLabel(r.label);v.setProperty("__isa",r),r=v}let o=e.length;for(let v=1;v<o&&r!==null;v++){let _=e[v],w=((h=_.unary)==null?void 0:h.operator)==="@"&&!_.isInCallExpression||n&&e.length-1===v;if((0,ni.isResolveChainItemWithMember)(_))r=(m=r.resolveProperty(_.getter.name,w))!=null?m:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLabel(_.getter.name);else if((0,ni.isResolveChainItemWithIndex)(_))if((0,Ck.isValidIdentifierLiteral)(_.getter)){let S=_.getter.value.toString();r=(f=r.resolveProperty(S,_.isInCallExpression))!=null?f:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLabel(S)}else{let S=this.resolveTypeWithDefault(_.getter);r=(g=r.resolveProperty(S,_.isInCallExpression))!=null?g:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any)}else if(_.ref.type===we.ASTType.SliceExpression)r=r.copy();else return null;if(((b=_.unary)==null?void 0:b.operator)==="new"&&r!==null){let S=this.factory(ue.CompletionItemKind.Property).addType(me.SignatureDefinitionBaseType.Map).setLabel(r.label);S.setProperty("__isa",r),r=S}}return r}resolveNamespace(e,n=!1){let r=(0,Ek.createResolveChain)(e);return this.resolveChain(r,n)}defineNamespace(e,n){let r=(0,Ek.createResolveChain)(e),i=r.pop();if(r.length>0){let o=this.resolveChain(r);if(o===null)return!1;if((0,ni.isResolveChainItemWithMember)(i))return o.setProperty(i.getter.name,n);if((0,ni.isResolveChainItemWithIndex)(i)){if((0,Ck.isValidIdentifierLiteral)(i.getter))return o.setProperty(i.getter.value.toString(),n);{let l=this.resolveTypeWithDefault(i.getter);return o.setProperty(l,n)}}return!1}let s=this._scope;return(0,ni.isResolveChainItemWithIdentifier)(i)?s.setProperty(i.getter.name,n):!1}resolveAvailableAssignmentsWithQuery(e){let n=[],r=new Set([this,this._parent,this._document.getRootScopeContext().aggregator]);for(let i of r){let s=i.definitions;for(let o of s.keys())if(o.includes(e)){let l=s.get(o);n.push(...l)}}return n}resolveAvailableAssignments(e){let n=(0,Ik.createExpressionId)(e),r=this;n.startsWith("globals.")?(r=this._document.getRootScopeContext().aggregator,n=n.slice(8)):n.startsWith("locals.")?(r=this,n=n.slice(7)):n.startsWith("outer.")&&(r=this.parent,n=n.slice(6));let i=[],s=new Set([r,r._parent,r._document.getRootScopeContext().aggregator]);for(let o of s){if(o==null)continue;let l=o._definitions.get(n);l!=null&&i.push(...l)}return i}analyze(){var e,n;for(let r=0;r<this._root.assignments.length;r++){let i=this._root.assignments[r],s=(n=(e=this.resolveType(i.init))==null?void 0:e.copy().setLine(i.start.line))!=null?n:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(i.start.line);this.defineNamespace(i.variable,s);let o=(0,Ik.createExpressionId)(i.variable),l=this._definitions;o.startsWith("globals.")?(l=this._document.getRootScopeContext().aggregator.definitions,o=o.slice(8)):o.startsWith("locals.")?(l=this._definitions,o=o.slice(7)):o.startsWith("outer.")&&(l=this.parent.definitions,o=o.slice(6));let c=l.get(o);c?c.push(i):l.set(o,[i])}}};Lc.Aggregator=Fg});var Bg=T(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});Mc.Document=void 0;var Hn=Yt(),iO=pe(),Rk=Jr(),Pk=Ng(),Ak=us(),Ok=yg(),$g=class t{get root(){return this._root}get container(){return this._container}get intrinsics(){return this._intrinscis}get globals(){return this._globals}get api(){return this._api}constructor(e){var n,r,i,s;this._root=e.root,this._container=e.container,this._scopeMapping=(n=e.scopeMapping)!=null?n:new WeakMap,this._intrinscis=(r=e.intrinsics)!=null?r:this.createIntrinscis(),this._api=(i=e.api)!=null?i:this.initApi(),this._globals=(s=e.globals)!=null?s:this.initGlobals()}createIntrinscis(){return{map:this._container.primitives.get(Hn.SignatureDefinitionBaseType.Map),funcRef:this._container.primitives.get(Hn.SignatureDefinitionBaseType.Function),number:this._container.primitives.get(Hn.SignatureDefinitionBaseType.Number),string:this._container.primitives.get(Hn.SignatureDefinitionBaseType.String),list:this._container.primitives.get(Hn.SignatureDefinitionBaseType.List)}}initApi(){let e=this._container.primitives.get(Hn.SignatureDefinitionBaseType.General);return e.resolveProperty("map",!0).setReturnEntity(this._intrinscis.map),e.resolveProperty("funcRef",!0).setReturnEntity(this._intrinscis.funcRef),e.resolveProperty("number",!0).setReturnEntity(this._intrinscis.number),e.resolveProperty("string",!0).setReturnEntity(this._intrinscis.string),e.resolveProperty("list",!0).setReturnEntity(this._intrinscis.list),e}initGlobals(){return new Ak.Entity({kind:Rk.CompletionItemKind.Constant,container:this._container,label:"globals"}).addType(Hn.SignatureDefinitionBaseType.Map)}analyzeScope(e){let n=this._scopeMapping.get(e.scope),r=new Ok.Scope({container:this._container,parent:n==null?void 0:n.scope,globals:this._globals}),i=new Pk.Aggregator({scope:r,root:e,document:this,parent:n==null?void 0:n.aggregator});this._scopeMapping.set(e,{scope:r,aggregator:i});let s=e.assignment instanceof iO.ASTAssignmentStatement?this.resolveNamespace(e.assignment.variable,!0):null;if(s!==null){let o=s==null?void 0:s.context;o!=null&&o.types.has(Hn.SignatureDefinitionBaseType.Map)&&o!==this._globals&&r.setContext(o)}if(i.analyze(),s!==null){let o=s.signatureDefinitions.last();if(o!=null){let l=o.getArguments();for(let c=0;c<l.length;c++){let a=l[c],u=r.resolveProperty(a.getLabel(),!0),p=a.getTypes().map(d=>d.type);u===null?r.setProperty(a.getLabel(),new Ak.Entity({kind:Rk.CompletionItemKind.Variable,container:this._container}).addType(...p)):(u.types.delete(Hn.SignatureDefinitionBaseType.Any),u.addType(...p))}}}}analyze(){let e=new Ok.Scope({container:this._container,globals:this._globals,locals:this._globals}),n=new Pk.Aggregator({scope:e,root:this._root,document:this});this._scopeMapping.set(this._root,{scope:e,aggregator:n}),n.analyze();for(let r=0;r<this._root.scopes.length;r++){let i=this._root.scopes[r];this.analyzeScope(i)}}getRootScopeContext(){return this._scopeMapping.get(this._root)}getAllScopeContexts(){return[this._root,...this._root.scopes].map(e=>this._scopeMapping.get(e))}getScopeContext(e){var n;return(n=this._scopeMapping.get(e))!=null?n:null}getLastASTItemOfLine(e){let n=this._root.lines[e];return n&&n.length>0?n[n.length-1]:null}findASTItemInLine(e,n){let r=this._root.lines[e];if(r&&r.length>0){let i=r.find(s=>s.type===n);if(i)return i}return null}resolveAllAssignmentsWithQuery(e){let n=[],r=[this._root,...this._root.scopes];for(let i=0;i<r.length;i++){let o=this._scopeMapping.get(r[i]).aggregator.definitions;for(let l of o.keys())if(l.includes(e)){let c=o.get(l);n.push(...c)}}return n}resolveAvailableAssignments(e){var n,r;return(r=(n=this._scopeMapping.get(e.scope))==null?void 0:n.aggregator.resolveAvailableAssignments(e))!=null?r:[]}resolveType(e,n){var r,i;return(i=(r=this._scopeMapping.get(e.scope))==null?void 0:r.aggregator.resolveType(e,n))!=null?i:null}resolveTypeWithDefault(e,n){var r;return(r=this._scopeMapping.get(e.scope))==null?void 0:r.aggregator.resolveTypeWithDefault(e,n)}resolveNamespace(e,n=!1){var r,i;return(i=(r=this._scopeMapping.get(e.scope))==null?void 0:r.aggregator.resolveNamespace(e,n))!=null?i:null}merge(...e){let n=new t({root:this._root,container:this._container.copy()});for(let r of e)n._globals.extend(r._globals.copy({line:-1})),n._intrinscis.map.extend(r._intrinscis.map.copy({line:-1})),n._intrinscis.funcRef.extend(r._intrinscis.funcRef.copy({line:-1})),n._intrinscis.number.extend(r._intrinscis.number.copy({line:-1})),n._intrinscis.string.extend(r._intrinscis.string.copy({line:-1})),n._intrinscis.list.extend(r._intrinscis.list.copy({line:-1}));return n.analyze(),n}};Mc.Document=$g});var Vg=T(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.ContainerProxy=void 0;var Ln=Yt(),Rr=us(),Dk=Jr(),jk=Ro(),Ug=Tc(),Wg=class t{get primitives(){return this._primitives}get types(){return this._types}constructor(e){var n,r;this._container=e.container,this._primitives=(n=e.primitives)!=null?n:this.createPrimitives(),this._types=(r=e.types)!=null?r:this.createTypes()}createPrimitives(){let e=new Map;for(let[n,r]of this._container.getPrimitives()){let i=new Rr.Entity({kind:Dk.CompletionItemKind.Constant,container:this,isAPI:n===Ln.SignatureDefinitionBaseType.General}).addType(Ln.SignatureDefinitionBaseType.Map).insertSignature(r);e.set(n,i)}return e}createTypes(){let e=new Map;for(let[n,r]of this._container.getTypes()){let i=new Rr.Entity({kind:Dk.CompletionItemKind.Constant,container:this}).addType(Ln.SignatureDefinitionBaseType.Map).insertSignature(r);e.set(n,i)}return e}getTypeSignature(e){var n,r;return(r=(n=this._primitives.get(e))!=null?n:this._types.get(e))!=null?r:null}searchDefinitionMatches(e,n){if(typeof e=="string")return this.searchDefinitionMatches([e],n);let r=e.includes(Ln.SignatureDefinitionBaseType.Any)?new Set(this._container.getAllVisibleTypes()):new Set(e),i=new Map;for(let s of r){let o=this.getTypeSignature(s);if(o===null)continue;let l=(0,Ug.lookupProperty)(o,n);l!==null&&i.set(s,l)}return i}getDefinition(e,n,r=!1){if(typeof e=="string")return this.getDefinition([e],n);let i=(0,Ug.lookupProperty)(this._primitives.get(Ln.SignatureDefinitionBaseType.Any),n);if(e.includes(Ln.SignatureDefinitionBaseType.Any)&&i)return(0,Rr.resolveEntity)(this,i,r);let s=this.searchDefinitionMatches(e,n);return s.size===0?null:s.size===1?(0,Rr.resolveEntity)(this,s.values().next().value,r):s.has(Ln.SignatureDefinitionBaseType.Any)?(0,Rr.resolveEntity)(this,s.get(Ln.SignatureDefinitionBaseType.Any),r):i!==null?(0,Rr.resolveEntity)(this,i,r):(0,Rr.resolveEntity)(this,s.values().next().value,r)}getGeneralDefinition(e,n=!1){let r=(0,Ug.lookupProperty)(this._primitives.get(Ln.SignatureDefinitionBaseType.General),e);return r==null?null:(0,Rr.resolveEntity)(this,r,n)}getAllIdentifier(e){let n=new Map;if(e===Ln.SignatureDefinitionBaseType.Any){for(let i of this._container.getAllVisibleTypes()){let s=this.getTypeSignature(i);s!=null&&(0,jk.injectIdentifers)(n,s)}return n}let r=this.getTypeSignature(e);return r!=null&&(0,jk.injectIdentifers)(n,r),n}copy(){return new t({container:this._container})}};qc.ContainerProxy=Wg});var Lk=T(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.TypeManager=void 0;var sO=Bg(),oO=Vg(),Hg=class{constructor(e){this._container=new oO.ContainerProxy({container:e.container}),this._types=new Map}analyze(e,n){let r=new sO.Document({container:this._container.copy(),root:n});try{r.analyze()}catch(i){console.error(i)}return this._types.set(e,r),r}get(e){var n;return(n=this._types.get(e))!=null?n:null}};Fc.TypeManager=Hg});var Uo=T(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.TypeManager=X.ContainerProxy=X.Document=X.Aggregator=X.Scope=X.Entity=X.lookupProperty=X.isEligibleForProperties=X.injectIdentifers=X.isSignatureDefinitionFunction=X.isResolveChainItemWithValue=X.isResolveChainItemWithMember=X.isResolveChainItemWithIndex=X.isResolveChainItemWithIdentifier=X.CompletionItemKind=X.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION=X.ObjectSetIterator=X.ObjectSet=X.rotateBits=X.getStringHashCode=X.getHashCode=X.createResolveChain=X.enrichWithMetaInformation=X.createExpressionId=X.createExpressionHash=X.isValidIdentifierLiteral=void 0;var aO=bo();Object.defineProperty(X,"isValidIdentifierLiteral",{enumerable:!0,get:function(){return aO.isValidIdentifierLiteral}});var lO=NS();Object.defineProperty(X,"createExpressionHash",{enumerable:!0,get:function(){return lO.createExpressionHash}});var cO=Om();Object.defineProperty(X,"createExpressionId",{enumerable:!0,get:function(){return cO.createExpressionId}});var uO=rg();Object.defineProperty(X,"enrichWithMetaInformation",{enumerable:!0,get:function(){return uO.enrichWithMetaInformation}});var dO=ig();Object.defineProperty(X,"createResolveChain",{enumerable:!0,get:function(){return dO.createResolveChain}});var zg=Am();Object.defineProperty(X,"getHashCode",{enumerable:!0,get:function(){return zg.getHashCode}});Object.defineProperty(X,"getStringHashCode",{enumerable:!0,get:function(){return zg.getStringHashCode}});Object.defineProperty(X,"rotateBits",{enumerable:!0,get:function(){return zg.rotateBits}});var Mk=lg();Object.defineProperty(X,"ObjectSet",{enumerable:!0,get:function(){return Mk.ObjectSet}});Object.defineProperty(X,"ObjectSetIterator",{enumerable:!0,get:function(){return Mk.ObjectSetIterator}});var pO=cg();Object.defineProperty(X,"DEFAULT_CUSTOM_FUNCTION_DESCRIPTION",{enumerable:!0,get:function(){return pO.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION}});var hO=Jr();Object.defineProperty(X,"CompletionItemKind",{enumerable:!0,get:function(){return hO.CompletionItemKind}});var Nc=ug();Object.defineProperty(X,"isResolveChainItemWithIdentifier",{enumerable:!0,get:function(){return Nc.isResolveChainItemWithIdentifier}});Object.defineProperty(X,"isResolveChainItemWithIndex",{enumerable:!0,get:function(){return Nc.isResolveChainItemWithIndex}});Object.defineProperty(X,"isResolveChainItemWithMember",{enumerable:!0,get:function(){return Nc.isResolveChainItemWithMember}});Object.defineProperty(X,"isResolveChainItemWithValue",{enumerable:!0,get:function(){return Nc.isResolveChainItemWithValue}});var fO=dg();Object.defineProperty(X,"isSignatureDefinitionFunction",{enumerable:!0,get:function(){return fO.isSignatureDefinitionFunction}});var mO=Ro();Object.defineProperty(X,"injectIdentifers",{enumerable:!0,get:function(){return mO.injectIdentifers}});var gO=Sc();Object.defineProperty(X,"isEligibleForProperties",{enumerable:!0,get:function(){return gO.isEligibleForProperties}});var yO=Tc();Object.defineProperty(X,"lookupProperty",{enumerable:!0,get:function(){return yO.lookupProperty}});var bO=us();Object.defineProperty(X,"Entity",{enumerable:!0,get:function(){return bO.Entity}});var vO=yg();Object.defineProperty(X,"Scope",{enumerable:!0,get:function(){return vO.Scope}});var _O=Ng();Object.defineProperty(X,"Aggregator",{enumerable:!0,get:function(){return _O.Aggregator}});var wO=Bg();Object.defineProperty(X,"Document",{enumerable:!0,get:function(){return wO.Document}});var xO=Vg();Object.defineProperty(X,"ContainerProxy",{enumerable:!0,get:function(){return xO.ContainerProxy}});var SO=Lk();Object.defineProperty(X,"TypeManager",{enumerable:!0,get:function(){return SO.TypeManager}})});var Gg=T(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.getSymbolItemKind=hs.getCompletionItemKind=void 0;var It=Uo(),kO=t=>{switch(t){case It.CompletionItemKind.Constant:return 21;case It.CompletionItemKind.Variable:return 6;case It.CompletionItemKind.Expression:return 6;case It.CompletionItemKind.Function:return 3;case It.CompletionItemKind.ListConstructor:case It.CompletionItemKind.MapConstructor:case It.CompletionItemKind.Literal:case It.CompletionItemKind.Unknown:return 12}};hs.getCompletionItemKind=kO;var TO=t=>{switch(t){case It.CompletionItemKind.Constant:return 14;case It.CompletionItemKind.Variable:return 13;case It.CompletionItemKind.Expression:return 13;case It.CompletionItemKind.Function:return 12;case It.CompletionItemKind.ListConstructor:return 18;case It.CompletionItemKind.MapConstructor:return 19;case It.CompletionItemKind.Literal:case It.CompletionItemKind.Unknown:return 13}};hs.getSymbolItemKind=TO});var Yg=T($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.findEx=void 0;var IO=pe(),EO=function(t){return{ParenthesisExpression:(e,n)=>{t(e.expression,n)},AssignmentStatement:function(e,n){t(e.init,n),t(e.variable,n)},MemberExpression:function(e,n){t(e.base,n),t(e.identifier,n)},FunctionDeclaration:function(e,n){for(let r=0;r<e.parameters.length;r++)t(e.parameters[r],n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},MapConstructorExpression:function(e,n){for(let r=0;r<e.fields.length;r++)t(e.fields[r],n)},ReturnStatement:function(e,n){e.argument&&t(e.argument,n)},WhileStatement:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},IndexExpression:function(e,n){t(e.base,n),t(e.index,n)},SliceExpression:function(e,n){t(e.base,n),t(e.left,n),t(e.right,n)},ListValue:function(e,n){t(e.value,n)},MapKeyString:function(e,n){t(e.key,n),t(e.value,n)},IfShortcutStatement:function(e,n){for(let r=0;r<e.clauses.length;r++)t(e.clauses[r],n)},IfShortcutClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseifShortcutClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseShortcutClause:function(e,n){for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ForGenericStatement:function(e,n){t(e.variable,n),t(e.iterator,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},IfStatement:function(e,n){for(let r=0;r<e.clauses.length;r++)t(e.clauses[r],n)},IfClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseifClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseClause:function(e,n){for(let r=0;r<e.body.length;r++)t(e.body[r],n)},NegationExpression:function(e,n){t(e.argument,n)},CallExpression:function(e,n){t(e.base,n);for(let r=0;r<e.arguments.length;r++)t(e.arguments[r],n)},CallStatement:function(e,n){t(e.expression,n)},ListConstructorExpression:function(e,n){for(let r=0;r<e.fields.length;r++)t(e.fields[r],n)},BinaryExpression:function(e,n){t(e.left,n),t(e.right,n)},BinaryNegatedExpression:function(e,n){t(e.argument,n)},IsaExpression:function(e,n){t(e.left,n),t(e.right,n)},LogicalExpression:function(e,n){t(e.left,n),t(e.right,n)},ComparisonGroupExpression:function(e,n){for(let r=0;r<e.expressions.length;r++)t(e.expressions[r],n)},UnaryExpression:function(e,n){t(e.argument,n)},Chunk:function(e,n){for(let r=0;r<e.body.length;r++)t(e.body[r],n)},InvalidCodeExpression:()=>{}}},Kg=class{constructor(e){this.map=EO(this.visit.bind(this)),this.callback=e,this.state={exit:!1}}visit(e,n=0){let r=this;if(e==null)return;if(e.type==null)throw console.error("Error ast type:",e),new Error("Unexpected as type");if(r.state=r.callback(e,n),r.state.exit||r.state.skip)return;let i=r.map[e.type];i!=null&&i.call(r,e,n+1)}};function CO(t,e){let n=[];return new Kg((i,s)=>{let o=t(i,s)||{};return o.valid&&i.type!==IO.ASTType.InvalidCodeExpression&&n.push(i),{exit:!!o.exit,skip:!!o.skip}}).visit(e),n}$c.findEx=CO});var Fk=T(qk=>{"use strict";Object.defineProperty(qk,"__esModule",{value:!0});var ye=Yt();ye.VariationRegistry.add("GreyInterpreter.CheckScpUpload",["unknown error","Invalid path","${filepath} not found","permission denied","permission denied. ${filename} is protected","The copy can not be made. Reached maximum number of files in a folder","The copy can not be made. Reached maximum limit"]);ye.VariationRegistry.add("PlayerUtils.ConnectComputer",["ip address not found","can't connect: the remote server has been temporarily disabled due to non-payment","can't connect: port ${port} not found","can't connect: port closed","can't connect: There is no active machine behind the port ${port}","can't connect: service not found behind the port ${port}"]);ye.VariationRegistry.add("PlayerUtils.RenameFichero",["Unknown error","${filepath} not found","Error: name cannot exceed the limit of 128 characters.","permission denied","permission denied. File protected","There is already a file with that name, please choose another one."]);ye.VariationRegistry.add("PlayerUtils.FirewallPingStatus",["Connection refused. Address unreachable","Connection refused. The target is behind a firewall."]);ye.VariationRegistry.add("Computer.CheckInicio",["Fatal error: ${filepath} corrupted!","Kernel panic: missing ${filepath} file!","Graphics error: ${filepath} not found!","Fatal error: ${filepath} not found!"]);ye.VariationRegistry.add("Networking.CheckServiceOnline",["No internet access.","Remote host is down","Unable to find service ${service}","Invalid target service port configuration.","connection rejected: port forward removed by admin","Unable to connect: missing ${library}","Unable to connect: invalid ${library}","Unexpected library found. Not a valid ${library} library.","Unknown error"]);ye.VariationRegistry.add("Networking.IsRouterAvailable",["can't connect: invalid or missing kernel_router.so in the target router","can't connect: unexpected library found. Not a valid kernel_router.so library in the target router.","can't connect: invalid or missing kernel_router.so in the target router"]);ye.VariationRegistry.add("BlockchainSystem.AddWallet",["Error: Wallet user already exists.","Error: Only one wallet per player allowed."]);ye.VariationRegistry.add("BlockchainSystem.RemoveCurrency",["Error: ${coinname} does not exist","Error: incorrect user/password"]);ye.VariationRegistry.add("BlockchainSystem.AddSubWallet",["Error: Wallet does not exists.","Error: Coin does not exist.","Error: This username already exists","Error: Incorrect PIN","Error: only a maximum of 10 subwallets per coin is allowed."]);ye.VariationRegistry.add("BlockchainSystem.Transaction",["Error: coin does not exist","Error: ${subWalletOrig} not found","Error: ${subWalletDest} not found","Error: wallet ${subWalletOrig} does not exist","Error: target wallet does not exist","${subWalletOrig} need to be registered in ${coinName} to be able to receive this coin.","Error: subwallet ${subWalletDest} does not have coins in the selected currency","Error: insufficient funds to complete the transaction"]);ye.VariationRegistry.add("BlockchainSystem.SetAddress",["Error: ${coinName} does not exist"]);ye.VariationRegistry.add("BlockchainSystem.GetAddress",["Error: ${coinName} does not exist"]);ye.VariationRegistry.add("BlockchainSystem.ResetCoinPass",["Error: coin does not exist","Error: Only the account owner can change the password"]);ye.VariationRegistry.add("PlayerUtils.CrearCarpeta",["Unknown error.","Error: empty destination path","Error: only alphanumeric allowed as folder name.","Error: name cannot exceed the limit of 128 characters.","permission denied","${filename} file exists","Can't create folder. Reached maximum limit","The copy can not be made. Reached maximum number of files in a folder","The maximum number of subfolders has been exceeded"]);ye.VariationRegistry.add("PlayerUtils.CrearArchivo",["Can't create file. Unknown error","Can't create file. Reached maximum limit","Invalid path","Can't create file ${pathFolderDest}/${filename}. Permission denied","There is not enough free space on the hard disk.","The copy can not be made. Reached maximum number of files in a folder"]);ye.VariationRegistry.add("Computer.ValidateNewUser",["Error: root user already exists.","Error: can't create guest user. Reserved user.","Error: can't create user. ${username} already exists."]);ye.VariationRegistry.add("NetworkLan.ConnectEthernet",["Error: Ethernet card not connected to the network","Unable to find ISP network to connect using Ethernet card","can't connect: the home network has been temporarily disabled due to non-payment","Error: the gateway cannot be the same device to connect","Error: gateway ${gateway} does not exist in the network","Error: address ${address} is already in use.","Unknown error: The current IP ${localIp} does not exist in this network","Error: unable to run command on routers/switches"]);ye.VariationRegistry.add("PlayerUtils.GetSmtpServer",["invalid IP address","host is down","host doesn't exist","ip address not found","port ${port} not found","host doesn't exist","invalid target service","service not found"]);ye.VariationRegistry.add("FileSystem.UpdatePermisos",["permission denied","permission denied. File protected.","Wrong format."]);ye.VariationRegistry.add("PlayerUtils.MoverFichero",["Unknown error","Error: Invalid path","${sourceFilepath} not found","${destinationParentPath} not found","permission denied","There is not enough free space on the hard disk.","permission denied. ${filename} is protected.","A file cannot overwrite a folder or vice versa","The copy can not be made. Reached maximum number of files in a folder","The copy can not be made. Reached maximum limit"]);ye.VariationRegistry.add("PlayerUtils.RemoveFile",["file not found: ${path}","permission denied","permission denied. File protected.","unknown error :/"]);ye.VariationRegistry.add("Database.GetMailAccount",["Unable to login into account. Wrong password.","${user} user not found","Unknown error: This email account cannot be obtained.","Unable to login into account. Wrong password."]);ye.VariationRegistry.add("PlayerUtils.SendMail",["Invalid email address","Mail subject too large","Mail message too large","Unknown error: attachment failed","Error: attachment not found","Unable to attach file: permission denied","The email couldn't be sent. The recipient has blocked this email address.","The email couldn't be sent. The recipient has blocked emails sent by other players.","The email couldn't be sent. The recipient has blocked emails sent by other players using npcs accounts."]);ye.VariationRegistry.add("PlayerUtils.ConnectToService",["Invalid service ID","can't connect: incorrect user/password"]);ye.VariationRegistry.add("BlockchainSystem.SetInfoSubWallet",["Error: ${coinName} does not exist","Error: ${subWalletUser} does not exist","Error: main wallet linked to ${subWalletUser} does not exist anymore"]);ye.VariationRegistry.add("BlockchainSystem.GetInfoSubWallet",["Error: ${coinName} does not exist","Error: ${subWalletUser} does not exist","Error: main wallet linked to ${subWalletUser} does not exist anymore","Error: Coin ${coinName}does not exist in the Wallet user"]);ye.VariationRegistry.add("BlockchainSystem.ResetWalletPass",["Error: Wallet does not exist.","Error: Only the account owner can change the password","Error: The password can only be reset once a day"]);ye.VariationRegistry.add("BlockchainSystem.SellCoin",["Error: Coin ${coinName} does not exist","Error: Wallet does not exist","Subwallet ${subwalletID} does not exist","Error: subwallet does not contain enough coins to sell","Error: exceeded maximum of 21 million coins","Purchase failed: It is necessary to create a bank account to make transactions","Error: You already have a pending sale. Cancel it to create a new sale.","Error: You already have a pending purchase. Cancel it to create a new sale.","Not enough buyers found. Transaction is pending until a buyer is found.","A partial transaction has occurred. The data of your offer has been updated"]);ye.VariationRegistry.add("BlockchainSystem.BuyCoin",["Error: Coin ${coinName} does not exist","Error: Wallet does not exist","You need to be registered in ${coinName} to be able to buy this coin.","Subwallet ${subwalletID} does not exist","Purchase failed: It is necessary to create a bank account to make transactions","Purchase failed: Insufficient money in the bank. Required $${price}","Error: You already have a pending sale. Cancel it to create a new purchase.","Error: You already have a pending purchase. Cancel it to create a new purchase.","Not enough sellers found. Transaction is pending until a seller is found.","A partial transaction has occurred. The data of your offer has been updated"])});var Nk=T((S5,RO)=>{RO.exports={insert:{description:"Inserts a value into either a `list` or a `string`. If the passed index is not a `number`, this method throws an error, preventing further script execution.",example:["list = [2, 3, 4]","list.insert(2, 42)",'print("List with inserted item: " + list.join(", "))']},indexOf:{description:"Lookups index of value within `map`s, `list`s, or `string`s. For `list`s and `string`s, the behavior is very similar. On success, you'll receive a `number` representing the found index. On failure, it will return `null`. For `map`s, it's a bit different since the returned value could be of any type. On failure, it will return `null` as well.",example:['index = "test".indexOf("e")','print("e is at: " + index)']},hasIndex:{description:"Verifies if an index is available within an object. In case of success this method will return a `number` with the value one. In case of failure the value will be a zero. This method supports `map`s, `list`s and `string`s. Each passed type may result in different behavior therefore it is advisable to take a look at each of their specific signatures.",example:['print("List has index: " + [1, 2, 3].hasIndex(2)']},remove:{description:"Depending on the data type, this function will remove a value in the provided object, potentially mutating the object. This method works with `map`s, `list`s, and `string`s. Each passed type may support different types for the `key` argument. For example, using this method on a string would treat the key as a character index. Therefore, it is advised to review the signatures of each type. Passing a key with the type `null` may cause an error to be thrown, preventing further script execution.",example:["list = [9, 3, 5, 7]","list.remove(5)",'print("List after removal: " + list.join(", "))']},push:{description:"Allows pushing a value into an object, supporting `map`s and `list`s. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution.",example:["list = [0, 1, 2, 3, 4, 5]","list.push(42)",'print("The answer to everything is: " + list.pop)']},pull:{description:"When passing a `list` to this method, it will return the value at the first index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution.",example:["myList = [42, 1, 3]","answer = myList.pull",'print("Answer to everything: " + answer)']},pop:{description:"When passing a `list` to this method, it will return the value at the last index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution.",example:["list = [0, 1, 2, 3, 4, 5]",'print("The last item is: " + list.pop)']},shuffle:{description:"Randomizes content of an object. Valid data types for this method are `list` and `map`. In case a map-like object such as a `file` or `computer` a runtime exception will be thrown.",example:["list = [0, 1, 2, 3, 4, 5]","list.shuffle",'print("And the winner is: " + list[0])']},sum:{description:"Returns a `number` representing the sum of all items within a `map` or a `list`.",example:["list = [0, 1, 2, 3, 4, 5]",'print("Sum of all items is: " + list.sum)']},indexes:{description:"Returns a `list` containing all indexes or keys of the passed object. This method supports `map`s, `list`s, and `string`s. The type of each item may vary when using this method on a `map` since keys could be any type. The other types will return a `list` where each item is a `number`.",example:['indexesOfStr = "test".indexes','print("Following indexes are available: " + indexesOfStr.join(", "))']},len:{description:"Returns `number` indicating what size the object is.",example:['length = "test".len','print("Length of string is: " + length)']},values:{description:"Returns a `list` containing all values of an object.",example:['indexesOfStr = "test".values','print("Following values are available: " + indexesOfStr.join(", "))']}}});var $k=T((k5,PO)=>{PO.exports={$meta:{description:'A `aptClient` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"aptclientLib"`.'},show:{description:'Show displays all the packages available in a repository. The repository must be listed in the `"/etc/apt/sources.txt"` file. If the provided repository value is anything other than a `string`, this method will return `null`. If it cannot find a repository, it will return various error messages. On success, it will return a `string` containing all packages and their descriptions, with each entry separated by a newline.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = aptClient.show("177.202.15.132")',"packageList = packages.split(char(10) + char(10))","packageList.pop // remove last empty item","for packageItem in packageList"," entry = packageItem.split(char(10))"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},search:{description:'Search specifically looks for a package in any of the repositories listed in `"/etc/apt/sources.txt"`. If the provided search value is anything other than a `string`, this method will return `null`. On success, it will return a `string` containing all packages that partially match the provided search value. On failure, it will return a `string` with various error messages.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = aptClient.search(".so")',"packageList = packages.split(char(10) + char(10))","for packageItem in packageList"," entry = packageItem.split(char(10))"," if entry.len != 2 then",' print "something wrong in: " + entry'," continue"," end if"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},update:{description:'Update refreshes the list of available packages after adding a new repository in `"/etc/apt/sources.txt"`, or if the remote repository has updated its information in `"/server/conf/repod.conf"`. If the update is successful, an empty `string` will be returned. In case of failure, a `string` with an error message will be returned. If for some reason the `"/etc/apt/sources.txt"` is malformed this method will return a number with the value zero.',example:['aptClient = include_lib("/lib/aptclient.so")',"result = aptClient.update",'if result == "" then',' print "Update successful!"',"else",' print "Error while updating: " + result',"end if"]},add_repo:{description:'Inserts a repository address into the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.add_repo("177.202.15.132")','if result == "" then',' print "Addition successful!"',"else",' print "Error while adding: " + result',"end if"]},del_repo:{description:'Deletes a repository address from the `"/etc/apt/sources.txt"` file. If the provided repository value is anything other than a `string`, this method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.del_repo("177.202.15.132")','if result == "" then',' print "Deletion successful!"',"else",' print "Error while deleting: " + result',"end if"]},install:{description:'Installs a program or library from a remote repository listed in `"/etc/apt/sources.txt"`. If no path is specified, the program installs in `"/lib"` if it is a library or in `"/bin"` otherwise. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, this method will return a `number` with the value one. In case of failure, it will return a `string` containing an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.install("rshell_interface")',"if result == 1 then",' print "Installed program successful!"',"else",' print "Error while installing: " + result',"end if"]},check_upgrade:{description:"Checks if there is a newer version of the program or library in the repository. If the provided filepath value is anything other than a `string`, this method will return `null`. On success, it will return a `number`, which can be either zero or one. Zero indicates that there is no new version, while one indicates that there is a new version available. In case of failure, it will return a string containing an error message.",example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.check_upgrade("/bin/rshell_interface")',"if result == 0 then",' print "Program doesnt need an update!"',"else if result == 1 then",' print "Program does need an update!"',"else",' print "Error while checking version: " + result',"end if"]}}});var Bk=T((T5,AO)=>{AO.exports={$meta:{description:'A `blockchain` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"blockchainLib"`.'},coin_price:{description:"Returns a `number` representing the current unit value of the cryptocurrency. In case of an error, a `string` with the error details will be returned. If the provided `coinName` is anything other than a `string`, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','price = blockchain.coin_price("test")','if typeof(price) == "string" then',' exit "Couldnt get coin price due to: " + price',"end if",'print "Your coin price is " + price']},show_history:{description:"Returns a `map` with the latest changes in the value of a specific cryptocurrency. The key of the `map` is an index represented by a `number`. The value is a `list`, where index 0 is the historical price of the coin and index 1 is the date when the price change occurred. If the provided `coinName` is anything other than a `string` or if no coin exists with this name, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','history = blockchain.show_history("test")','if typeof(history) == "string" then',' exit "Couldnt fetch history due to: " + history',"else if history == null then",' exit "There doesnt seem to be a coin"',"end if","for entry in history.values"," price = entry[0]"," date = entry[1]",' print "The price on " + date + " was " + price',"end for"]},amount_mined:{description:"Returns a `number` representing the total amount of mined coins. In case of an error, it will return a `string` with the details. If the provided coinName is anything other than a `string`, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','mined = blockchain.amount_mined("test")','if typeof(mined) == "string" then',' exit "Couldnt get amount mined due to: " + mined',"end if",'print "Your mined amount is " + mined']},get_coin:{description:"Returns a `coin` object used to manage the currency. In case of an error, it will return a `string` with the details. If any of the provided parameters are `null`, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','if typeof(coin) != "coin" then',' exit "Couldnt get coin object due to: " + coin',"end if",'print "Your coin address is " + coin.get_address']},login_wallet:{description:"Returns a `wallet` object on success. In case of an error, it will return a `string` indicating the reason. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','if typeof(wallet) == "string" then',' print "Login failed due to: " + wallet',"else",' print "Login was successful!"',"end if"]},create_wallet:{description:"Creates a `wallet` and returns a `wallet` object on success, which can be used to manage cryptocurrencies. In case of an error, it will return a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.create_wallet("test", "test")','if typeof(wallet) == "string" then',' print "Wallet creation failed due to: " + wallet',"else",' print "Wallet creation was successful!"',"end if"]},delete_coin:{description:"Removes a cryptocurrency from the world. The credentials used in the creation of the cryptocurrency are required. On success, it will return a `number` with the value one. On failure, it will return a `string` containing details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','result = blockchain.delete_coin("test", "test", "test")','if typeof(result) == "string" then',' exit "Couldnt delete coin due to: " + result',"end if",'print "Coin got deleted"']}}});var Uk=T((I5,OO)=>{OO.exports={$meta:{description:"A class or object is a `map` with a special `__isa` entry that points to the parent. This is set automatically when you use the `new` operator.",example:['Shape = { "sides": 0 }',"Square = new Shape","Square.sides = 4","x = new Square","print(x.sides) // 4"]}}});var Wk=T((E5,DO)=>{DO.exports={$meta:{description:'A `coin` object can be obtained by using [get_coin](#BLOCKCHAIN_GET_COIN). The `classID` used for this object is `"coin"`.'},set_cycle_mining:{description:"Defines the interval (in-game hours) in which each user receives a coin reward when mining. The interval cannot be lower than 1 and not higher than 2160. If the provided `rateHours` is not a `number`, this method will return `null`. On success, it will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.set_cycle_mining(20)","if result == 1 then",' print "Successful updated mining interval"',"else",' print "Failed updating mining interval"',"end if"]},get_cycle_mining:{description:"Returns a `number` representing the defined interval in which each user receives a coin reward when mining. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_cycle_mining",'if typeof(result) == "string" then',' exit "Failed getting cyclic mining value due to: " + result',"end if",'print "cyclic mining value: " + result']},get_reward:{description:"Returns a `number` representing the amount of coins that will be received as a reward after each mining cycle. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_reward",'if typeof(result) == "string" then',' exit "Failed getting reward value due to: " + result',"end if",'print "reward value: " + result']},set_reward:{description:"Assigns the reward that miners will receive after each mining cycle. The reward value has to be above one. If the provided `coinAmount` is not a `number`, this method will return `null`. On success, it will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.set_reward(-1)",'if typeof(result) == "string" then',' exit "Failed setting reward due to: " + result',"end if",'print "Successfully set reward!"']},transaction:{description:"Facilitates a transaction of the currency between the indicated subwallets. In case of an error, a `string` with the details is returned. In case of success, a `number` with a value of one will be returned. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.transaction("test", "test2", 20)','if typeof(result) == "string" then',' exit "Failed transaction due to: " + result',"end if",'print "Successfully transfered!"']},create_subwallet:{description:"Registers a new account in the `coin` that can be used to manage services such as stores. It is necessary to provide the PIN of the owner's `wallet` that wants to register. In case of success, the method will return a `number` with the value one. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. In case of an error, a `string` with the details is returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','wallet = blockchain.login_wallet("test", "test")','result = coin.create_subwallet("test", wallet.get_pin, "test", "test")','if typeof(result) == "string" then',' exit "Failed to create subwallet due to: " + result',"end if",'print "Successfully created subwallet!"']},get_subwallet:{description:"Returns a `subWallet` object on success. In case of error, it returns a `string` with the details. If the provided `subWalletUser` is not a `string`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.get_subwallet("test")','if typeof(result) == "string" then',' exit "Failed to get subwallet due to: " + result',"end if",'print "Successfully received subwallet!"']},get_subwallets:{description:"Returns a `list` where each item is a `subWallet` object, including all the accounts registered in the cryptocurrency. In case of error, it returns a `string` with the details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_subwallets",'if typeof(result) == "string" then',' exit "Failed to get subwallets due to: " + result',"end if","for subwallet in result",' print subwallet.get_user + " has " + subwallet.get_balance + " coins"',"end for"]},set_address:{description:"Configures a valid address that will be shown to users who do not have the currency, indicating where to register. In case of an error, it returns a `string` with the details. In case of success, a `number` with a value of one will be returned. If the provided address is not a `string`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.set_address("12.12.12.12")','if typeof(result) == "string" then',' exit "Failed to set address due to: " + result',"end if",'print "Successfully set address!"']},get_address:{description:"Returns the configured address that will be shown to users who do not have the currency, indicating where they have to register. In case of an error, it returns a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_address","if not is_valid_ip(result) then",' exit "Failed to get address due to: " + result',"end if",'print "address: " + result']},get_mined_coins:{description:"Returns a `number` representing the amount of coins that have been mined so far. In case of an error, it returns a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_mined_coins",'if typeof(result) == "string" then',' exit "Failed to get mined coins due to: " + result',"end if",'print "mined coins: " + result']},reset_password:{description:"Resets the password of the coin. It returns a `number` with the value one if resetting was successful; otherwise, it will return a `string`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.reset_password("test")','if typeof(result) == "string" then',' exit "Failed to reset password due to: " + result',"end if",'print "Successfully reset password"']}}});var Vk=T((C5,jO)=>{jO.exports={$meta:{description:'A `computer` object can be obtained by either using [host_computer](#SHELL_HOST_COMPUTER) or [overflow](#METALIB_OVERFLOW). The `classID` used for this object is `"computer"`.'},get_ports:{description:"Returns a `list` of `port`s on the `computer` that are active.",example:["router = get_router","ports = get_shell.host_computer.get_ports","for port in ports",' print("Info: " + router.port_info(port))',"end for"]},get_name:{description:"Returns the hostname of the machine.",example:["computerName = get_shell.host_computer.get_name",'print("The name of your machine is " + computerName)']},local_ip:{description:"Returns a `string` with the local IP address of the `computer`.",example:["localIp = get_shell.host_computer.local_ip",'print("Local ip:" + localIp)']},public_ip:{description:"Returns a `string` with the public IP address of the `computer`.",example:["publicIp = get_shell.host_computer.public_ip",'print("Public ip:" + publicIp)']},File:{description:"Returns a `file` located at the path provided in the arguments. The path can be either relative or absolute. It's important to note that any `file` object can represent a folder as well. If the provided path cannot be resolved, meaning that no file or folder exists, this method will return `null`. Providing any other type than `string` or an empty value for the path will result in an error, interrupting the script execution.",example:['filePath = "/etc/passwd"',"file = get_shell.host_computer.File(filePath)","if file != null then"," print(file.get_content)","else",' print("File at given path " + filePath + " does not exist.")',"end if"]},create_folder:{description:"Creates a folder at the path provided in the arguments. There are certain limitations to creating a folder: the folder name has to be alphanumeric and below 128 characters. Creation will fail if there is already a folder in place or if there are lacking permissions. Additionally, there is a folder limit of about 250 in each folder and 3125 folders in the computer overall. In case the folder creation fails, the method will return a `string` with details. In case of success, it will return a `number` with the value one. Providing any type that deviates from the signature or using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution.",example:['path = "/home/" + active_user + "/Desktop"',"hostComputer = get_shell.host_computer",'createResult = hostComputer.create_folder(path, "myfolder")','if typeof(createResult) == "string" then',' print("There was an error when creating the folder: " + createResult)',"else",' print("Folder got created at given path " + path)',"end if"]},is_network_active:{description:"Returns a `number` with either the value one or zero. If the `computer` has internet access, the value will be one. If there is no internet access, it will return zero instead.",example:["hostComputer = get_shell.host_computer","if hostComputer.is_network_active then",` print("You're connected.")`,"else",` print("You're not connected.")`,"end if"]},touch:{description:"Creates an empty text `file` at the provided path. Certain limitations apply to file creation: the `file` name must be alphanumeric and below 128 characters. Creation will fail if there is already a `file` in place or if permissions are lacking. Additionally, there is a file limit of about 250 in each folder and 3125 files in the computer overall. In case of success, it returns a `number` with the value one. In case of failure, it returns a `string` with details. Using this method in an SSH encryption process will cause an error to be thrown, preventing any further script execution.",example:['path = "/home/" + active_user + "/Desktop"',"hostComputer = get_shell.host_computer",'createResult = hostComputer.touch(path, "myFile.txt")','if typeof(createResult) == "string" then',' print("There was an error when creating the file: " + createResult)',"else",' print("File got created at given path " + path)',"end if"]},show_procs:{description:"Returns a `string` with an overview of all active processes on the `computer`, including information about the user, PID, CPU, memory, and command. Using this method in an SSH encryption process will cause an error to be thrown, preventing any further script execution.",example:["hostComputer = get_shell.host_computer","procs = hostComputer.show_procs","list = procs.split(char(10))[1:]","processes = []","for item in list",' parsedItem = item.split(" ")'," process = {}"," process.user = parsedItem[0]"," process.pid = parsedItem[1]"," process.cpu = parsedItem[2]"," process.mem = parsedItem[3]"," process.command = parsedItem[4]"," processes.push(process)","end for","print(processes)"]},network_devices:{description:"Returns a `string` containing information about all network devices available on the `computer`. Each item includes details about the interface name, chipset, and whether monitoring support is enabled.",example:["hostComputer = get_shell.host_computer","devices = hostComputer.network_devices","deviceList = devices.split(char(10))","for item in deviceList"," print(item)","end for"]},change_password:{description:"Changes the password of an existing user on the `computer`. Root access is necessary to successfully change the password. Passwords can only include alphanumeric characters and cannot exceed 15 characters. If the password change fails, this method will return a `string` containing information on why it failed. If the change succeeds, it will return a `number` with the value one. If the provided username is empty, an error will be thrown, preventing any further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','changeResult = hostComputer.change_password("test", "newPassword")','if typeof(changeResult) == "string" then',' print("There was an error when changing the password: " + changeResult)',"else",' print("Password got successfully changed.")',"end if"]},create_user:{description:"Creates a user on the `computer` with the specified name and password. Root access is necessary to successfully create a user. Both the username and password cannot exceed more than 15 characters and must be alphanumeric. There cannot be more than 15 users created on the same `computer`. If the creation fails, this method will return a `string` containing the reason for the failure. On success, it will return a `number` with the value one. If the provided username is empty or either of the values exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','creationResult = hostComputer.create_user("newUser", "123")','if typeof(creationResult) == "string" then',' print("There was an error when creating an user: " + creationResult)',"else",' print("User got successfully created.")',"end if"]},delete_user:{description:"Deletes the indicated user from the `computer`. It can optionally delete the user's home folder as well, although by default the home folder will not be deleted. Root access is necessary to successfully delete a user. Keep in mind that you cannot delete the root user. If the deletion fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. If the provided username is empty, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','deletionResult = hostComputer.delete_user("test", true)','if typeof(deletionResult) == "string" then',' print("There was an error when deleting an user: " + deletionResult)',"else",' print("User got successfully deleted.")',"end if"]},create_group:{description:"Creates a new group associated with an existing user on the `computer`. Root access is necessary to successfully create a group. There are limitations when creating a group, such as a character limit of 15 and that the group name may only contain alphanumeric characters. If the group creation fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. If the provided arguments are empty or the username exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','creationResult = hostComputer.create_group("test", "staff")','if typeof(creationResult) == "string" then',' print("There was an error when creating a group: " + creationResult)',"else",' print("Group got successfully created.")',"end if"]},delete_group:{description:"Deletes an existing group associated with an existing user on the `computer`. Root access is necessary to successfully delete a group. If the group deletion fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. If either of the provided values is empty, an error will be thrown, preventing further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','deletionResult = hostComputer.delete_group("test", "staff")','if typeof(deletionResult) == "string" then',' print("There was an error when deleting a group: " + deletionResult)',"else",' print("Group got successfully deleted.")',"end if"]},groups:{description:"Returns a `string` containing groups associated with an existing user on the `computer`. If the user does not exist, a `string` with an error message will be returned. If the provided username is empty, an error will be thrown, preventing further script execution. If the provided username is anything other than a `string`, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','hostComputer.create_group("root", "staff")','groups = hostComputer.groups("root")',"listOfGroups = groups.split(char(10))","print(listOfGroups)"]},close_program:{description:"Closes a program associated with the provided PID. You can see the `list` of active programs by either using `show_procs` or typing ps into your terminal. To close a program, you need to either be the owner of the running process or root. If closing the program fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. If there is no process with the provided PID, this method will return a `number` with the value zero. If the provided PID is anything other than a `number`, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer',"processes = hostComputer.show_procs.split(char(10))[1:]",'pid = processes[1].split(" ")[1]',"closeResult = hostComputer.close_program(pid.to_int)",'if typeof(closeResult) == "string" then',' print("There was an error when closing a program: " + closeResult)',"else",' print("Program with pid " + pid + " got successfully closed.")',"end if"]},wifi_networks:{description:"Returns a `list` of the Wi-Fi networks that are available for the provided interface. Each item in the `list` is a `string` containing information on the BSSID, PWR, and ESSID. If no matching netDevice can be found, this method will return `null`. If the active network card is not a Wi-Fi card, an error will be thrown, preventing any further script execution.",example:['hostComputer = get_shell("root", "test").host_computer','networks = hostComputer.wifi_networks("wlan0")',"result = []","for network in networks",' parsedItem = network.split(" ")'," item = {}"," item.BSSID = parsedItem[0]"," item.PWR = parsedItem[1]"," item.ESSID = parsedItem[2]"," result.push(item)","end for","print(result)"]},connect_wifi:{description:"Connects to the indicated Wi-Fi network. It's not possible to connect to a new Wi-Fi while being logged in as a guest. If connecting to a new Wi-Fi fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. Wi-Fi networks can be found via `wifi_networks` or by typing iwlist as a command in the terminal. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:["hostComputer = get_shell.host_computer","networks = hostComputer.wifi_networks",'firstNetwork = networks[0].split(" ")',"BSSID = firstNetwork[0]","ESSID = firstNetwork[2]",'connectionResult = hostComputer.connect_wifi("wlan0", BSSID, ESSID, "wifi-password")','if typeof(connectionResult) == "string" then',' print("There was an error while connecting to new Wifi: " + connectionResult)',"else",' print("Connected to new Wifi successfully.")',"end if"]},connect_ethernet:{description:"Sets up a new IP address on the computer through the Ethernet connection. It's not possible to set up a new IP address while being logged in as a guest. On failure, this method will either return a `string` with details or `null`. On success, it will return an empty `string`. If any of the provided parameters have a type that deviates from the defined signature or the computer is not connected to the internet, an error will be thrown, preventing any further script execution.",example:["hostComputer = get_shell.host_computer",'connectionResult = hostComputer.connect_ethernet("eth0", "192.168.0.4", get_router.local_ip)','if typeof(connectionResult) == "string" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected successfully.")',"end if"]},network_gateway:{description:"Returns a `string` with the gateway IP address configured on the computer.",example:["hostComputer = get_shell.host_computer","gatewayIp = hostComputer.network_gateway",'print("Gateway IP: " + gatewayIp)']},active_net_card:{description:'Returns a `string` which contains either the keyword `"WIFI"` or `"ETHERNET"` depending on the connection type your computer is currently using.',example:["hostComputer = get_shell.host_computer","netCard = hostComputer.active_net_card",'print("Connected by: " + netCard)']}}});var Hk=T((R5,LO)=>{LO.exports={$meta:{description:'A `crypto` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"cryptoLib"`.'},aircrack:{description:"Returns a `string` containing the password based on the file which was generated via aireplay. In case of failure, it will return `null` instead. If the provided path is empty, an error will be thrown, interrupting the script execution.",example:['crypto = include_lib("/lib/crypto.so")','networks = get_shell.host_computer.wifi_networks("wlan0")','firstNetwork = networks[1].split(" ")',"bssid = firstNetwork[0]","pwr = firstNetwork[1][:-1].to_int","essid = firstNetwork[2]","aireplayResult = crypto.aireplay(bssid, essid, 300000 / pwr)","if (aireplayResult == null) then",' result = crypto.aircrack(home_dir + "/file.cap")'," print(result)","end if"]},airmon:{description:'Enables or disables the monitor mode of a network device. The `options` parameter can only be `"start"` or `"stop"`. Monitor mode can only be enabled on Wifi cards. If it wasn\'t possible to enable or disable the monitor mode, this method will return either a `number` with the value zero or a `string` with details. In case of success, it will return a `number` with the value one.',example:['crypto = include_lib("/lib/crypto.so")','airmonResult = crypto.airmon("start", "wlan0")','if typeof(airmonResult) == "string" then',' print("There was an error while switching monitoring mode: " + airmonResult)',"else",' print("Monitoring mode switched successfully.")',"end if"]},aireplay:{description:'Used to inject frames on wireless interfaces. Once the command with `"Control+C"` is stopped, it will save the captured information in a text file called `"file.cap"` in the path where the terminal is currently located. Alternatively, a maximum of captured `acks` can be specified for the command to stop automatically, saving the `"file.cap"` file as described above. To figure out how many ACKs are required, you can use the following formula: `"300000 / [Wifi PWR]"`. If there is an error, a `string` will be returned with the message indicating the problem. On success, it will return `null`, it is advised though to verify that the capture file actually exists. In case any of the provided values deviate from the signature types or bssid/essid is empty, an error will be thrown preventing any further script execution.',example:['crypto = include_lib("/lib/crypto.so")','networks = get_shell.host_computer.wifi_networks("wlan0")',"for index in range(0, networks.len - 1)",' print(index + ".) " + networks[index])',"end for",'selectedIndex = user_input("Select Wifi: ").to_int','if (typeof(selectedIndex) == "string" or selectedIndex < 0 or selectedIndex > networks.len - 1) then',' exit("Wrong index!")',"end if",'parsed = networks[selectedIndex].split(" ")',"bssid = parsed[0]","pwr = parsed[1][:-1].to_int","essid = parsed[2]","potentialAcks = 300000 / pwr","crypto.aireplay(bssid, essid, potentialAcks)",'wifiPassword = crypto.aircrack("/home/" + active_user + "/file.cap")','print("Wifi password for " + essid + " is " + wifiPassword)']},decipher:{description:"Returns a decrypted password via the provided password MD5 hash. Keep in mind that this method is not decrypting a password but rather checking for existing passwords within the game world with a matching MD5 hash. So in case a password does not exist in the game world, the decryption will fail. On failure, this method will return `null`. Using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution.",example:['crypto = include_lib("/lib/crypto.so")','hostComputer = get_shell("root", "test").host_computer','passwdContent = hostComputer.File("/etc/passwd").get_content',"firstAccount = passwdContent.split(char(10))[0]",'parsed = firstAccount.split(":")',"username = parsed[0]","passwordHash = parsed[1]","password = crypto.decipher(passwordHash)",'print("User: " + username)','print("Password: " + password)']},smtp_user_list:{description:"Returns a `list` of the existing users on the `computer` where the SMTP service is running. If these users also have an email account registered on the SMTP server, it will be indicated in the `list`. SMTP services are usually running on port `25`. In case of failure, this method will return a `string` containing the cause. If any of the provided values deviate from the signature types, this method will return `null`.",example:['crypto = include_lib("/lib/crypto.so")','print(crypto.smtp_user_list("192.168.0.4", 25))']}}});var zk=T((P5,MO)=>{MO.exports={$meta:{description:'A `ctfEvent` object can be obtained by using [get_ctf](#GENERAL_GET_CTF). The `classID` used for this object is `"ctfEvent"`.'},get_description:{description:"Returns `string` with the CTF event description."},get_template:{description:"Returns `string` with the CTF event template."},player_success:{description:"Returns `number` with the value one if the CTF event got completed successfully. Otherwise this method will return a `number` with the value zero."},get_creator_name:{description:"Returns `string` with the name of the CTF event creator."},get_mail_content:{description:"Returns `string` with the mail content of the CTF event."}}});var Gk=T((A5,qO)=>{qO.exports={$meta:{description:'A `file` object can be acquired by either using [File](#COMPUTER_FILE) or [overflow](#METALIB_OVERFLOW). The `classID` used for this object is `"file"`.'},chmod:{description:'Modifies the `file` permissions. Optionally, these permissions can also be applied recursively. The format for applying permissions is as follows: `"[references][operator][modes]"`. The references type is defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. The operator is used to define if permissions get added `"+"` or removed `"-"`. There are three different modes that can be modified: read `"r"`, write `"w"`, and execute `"x"`. So, for example, `"o-wrx"` would remove all possible permissions for others. To add all permissions for others again, `"o+wrx"` would be used. In case the modification fails, this method will return a `string` containing information about the reason. Otherwise, an empty `string` is returned. In case any type other than `number` is used for the `isRecursive` parameter, an error will be thrown preventing further script execution.',example:['hostComputer = get_shell("root", "test").host_computer','rootFolder = hostComputer.File("/bin")',"oldPermissions = rootFolder.permissions",'rootFolder.chmod("o-wrx", true)',"newPermissions = rootFolder.permissions",'print("Old permissions: " + oldPermissions)','print("New permissions: " + newPermissions)']},copy:{description:"Copies the `file` to the provided path. Files can only be copied if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, it will return a `string` containing information about the reason for failure. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','copyResult = passwdFile.copy("/etc/", "duplicate")','if typeof(copyResult) == "string" then',' print("There was an error while copying file: " + copyResult)',"else",' print("File got copied successfully.")',"end if"]},move:{description:"Moves the `file` to the provided path. Files can only be moved if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, this method will return a `string` with details. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','moveResult = passwdFile.move("/etc/", "/moved/")','if typeof(moveResult) == "string" then',' print("There was an error while moving file: " + moveResult)',"else",' print("File got moved successfully.")',"end if"]},rename:{description:"Rename the file with the name provided. Files can only be renamed if the user has write permissions or is root. The new filename has to be below 128 characters and alphanumeric. On failure, this method will return a `string` with details. Otherwise, this method will return an empty string. If this method is used within an SSH encryption process, an error will be thrown, causing the script execution to be interrupted. In case the provided name is `null`, this method will return a `number` with the value zero.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','renameResult = passwdFile.rename("renamed")','if typeof(renameResult) == "string" then',' print("There was an error while renaming file: " + renameResult)',"else",' print("File got renamed successfully.")',"end if"]},path:{description:"Returns a `string` with the path of the file. In case the file gets deleted it will still returns it's path prior to deletion.",example:["hostComputer = get_shell.host_computer",'passwdFile = hostComputer.File("/etc/passwd")','print("File location: " + passwdFile.path)']},is_folder:{description:"Returns a `number`. The value is one if the file is a folder, zero otherwise. In case the file gets deleted this method will return `null` instead.",example:["hostComputer = get_shell.host_computer",'etcFolder = hostComputer.File("/etc")','print("Is a folder: " + etcFolder.is_folder)']},parent:{description:"Returns the parent folder of the current file or folder. In case there is no parent folder `null` will be returned instead. In case the file gets deleted this method will return `null` as well.",example:["hostComputer = get_shell.host_computer",'etcFolder = hostComputer.File("/etc")','print("Parent path: " + etcFolder.parent.path)']},name:{description:"Returns a `string` with the name of the file. In case the file gets deleted this method will return `null` instead.",example:["hostComputer = get_shell.host_computer",'passwdFile = hostComputer.File("/etc/passwd")','print("Filename: " + passwdFile.name)']},allow_import:{description:"Returns a `number`. If the file is binary and can be imported by other scripts, the value will be one; otherwise, the value will be zero. In case the file gets deleted, this method will cause a crash.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("File can be imported: " + lsBinary.allow_import)']},get_content:{description:"Returns a `string` representing the content of the file. To read a file, the user requires read access or being root. Note that you cannot read a binary file. In case of failure, `null` will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','print("File content: " + passwdFile.get_content)']},set_content:{description:"Saves text into a `file`. The content will not get appended to the `file`; therefore, existing content will be overridden. To set new content, the user requires write permissions or being root. Keep in mind that text files cannot exceed the character limit of 160,000. In case setting the content was successful, a `number` with the value one will be returned. Otherwise, a `string` with details will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution. If the provided content is `null`, this method will return a `number` with the value zero. In case the file gets deleted this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','setResult = passwdFile.set_content("moo")','if typeof(setResult) == "string" then',' print("There was an error while setting file content: " + setResult)',"else",' print("File content got changed successfully.")',"end if"]},is_binary:{description:"Returns a `number`. If the file is binary, the value will be one; otherwise, it will be zero. In case the file gets deleted, this method will return `null` instead.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("File is a binary: " + lsBinary.is_binary)']},has_permission:{description:'Returns a `number` indicating if the user who launched the script has the requested permissions. One will indicate that the user has the correct permissions. In case permissions are lacking, the value will be zero. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. In case the file gets deleted, this method will return `null` instead.',example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("Is able to execute ls: " + lsBinary.has_permission("x"))']},delete:{description:"Delete the current file. To delete files, write permissions are required or being root. In case of failure, a `string` with details will be returned. Otherwise, an empty `string` gets returned. Please note that deleting a file will leave a log entry.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")',"deletionResult = lsBinary.delete",'if typeof(deletionResult) == "string" and deletionResult.len > 0 then',' print("There was an error while deleting a file: " + deletionResult)',"else",' print("File got deleted successfully.")',"end if"]},get_folders:{description:"Returns a `list` of folders. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted this method will return `null` as well.",example:["hostComputer = get_shell.host_computer",'binFolder = hostComputer.File("/home")',"folders = binFolder.get_folders","for folder in folders"," print(folder.path)","end for"]},get_files:{description:"Returns a `list` of files. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted this method will return `null` as well.",example:["hostComputer = get_shell.host_computer",'binFolder = hostComputer.File("/bin")',"files = binFolder.get_files","for file in files"," print(file.path)","end for"]},permissions:{description:'Returns a `string` with the current file permissions. In case the current file gets deleted, this method will return `null`. The format for this permissions `string` is as follows: `"[fileType][wrx](u)[wrx](g)[wrx](o)"`. The file type is either `"d"` in case it\'s a directory or `"-"`. The user type gets defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. An example of a `string` returned by this method would be `"-rwxr-xr-x"`. Taking the latter as an example, the following things become clear:\n* The provided file is not a directory.\n* The user has full access.\n* The group and others have almost all permissions besides writing.\n',example:["hostComputer = get_shell.host_computer",'binFolder = hostComputer.File("/bin")',"permissions = binFolder.permissions","fileType = permissions[0]","permissionsForUser = permissions[1:4]","permissionsForGroup = permissions[4:7]","permissionsForOther = permissions[7:10]",'print("File type: " + fileType)','print("User permissions: " + permissionsForUser)','print("Group permissions: " + permissionsForGroup)','print("Other permissions: " + permissionsForOther)']},owner:{description:"Returns a `string` with the name of the file owner. User permissions get applied to whoever is the owner of a file. In case the current file gets deleted, this method will return `null`.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("Owner of ls is: " + lsBinary.owner)']},set_owner:{description:"Change the owner of this file. Optionally the owner can get applied recursively. The owner's name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure a `string` gets returned containing the cause. Otherwise an empty `string` gets returned. In case the current file gets deleted or the passed owner value is not a `string`, this method will return `null`. If the passed owner value is empty, the owner value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, interrupting further script execution.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','ownerResult = lsBinary.set_owner("root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing owner: " + ownerResult)',"else",' print("File owner changed successfully.")',"end if"]},group:{description:"Returns a `string` with the name of the group to which this file belongs. Group permissions get applied to whoever is the owner of a file. In case the current file gets deleted, this method will return `null`.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("File is related to following group: " + lsBinary.group)']},set_group:{description:"Change the group related to this file. Optionally the group can get applied recursively. The group name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure, a `string` with details. On success, an empty `string` gets returned. In case the current file gets deleted or the passed group is not a `string`, this method will return `null`. If the passed group value is empty, the group value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, preventing further script execution.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','ownerResult = lsBinary.set_group("root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing group: " + ownerResult)',"else",' print("File group changed successfully.")',"end if"]},size:{description:"Returns a `string` with the size of the file in bytes. There is no correlation between file size and actual file content. Instead, the file size is depending on the name of the file. In case the current file gets deleted, this method will return `null`.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")',"size = lsBinary.size","if size.to_int > 1000 then",' print("File size is bigger than 1000 bytes.")',"else",' print("File size is below 1000 bytes.")',"end if"]}}});var Kk=T((O5,FO)=>{FO.exports={$meta:{description:'The FTP `shell` behaves just like the ssh `shell` and can be acquired by using [connect_service](#SHELL_CONNECT_SERVICE) and using the service type `"ftp"`. The `classID` used for this object is `"ftpshell"`. The port used for FTP is usually `21`.'},host_computer:{description:"Returns a `computer` related to the `shell`.",example:["shell = get_shell",'ftpShell = shell.connect_service("172.8.0.5", 21, "test", "test", "ftp")',"ftpComputer = ftpShell.host_computer",'print("FTP public ip: " + ftpComputer.public_ip)']},start_terminal:{description:"Launches an active terminal. The terminal's color will change, displaying the IP of the connected shell. Script execution will be stopped upon starting a new terminal, unless this is called from another script that was executed via `shell.launch`. In that case, you will enter the shell after closing your root-level script within that terminal window. Using this method within an SSH encryption process will cause an error to be thrown, preventing further script execution.",example:["shell = get_shell",'ftpShell = shell.connect_service("172.8.0.5", 21, "test", "test", "ftp")',"ftpShell.start_terminal"]},put:{description:"Send a `file` to the `computer` related to the provided `shell`. You require permission to read the `file` on the `computer` from which you are uploading and write permissions in the folder of the `computer` you are trying to upload to. In case of failure, this method will return a `string` with the cause. Otherwise, a `number` with the value one gets returned. If any of the passed arguments deviates from the types of the method signature, `null` will be returned. In case the `string` for sourceFile or destinationFolder is empty, an error will be thrown, preventing further script execution.",example:["shell = get_shell",'ftpShell = shell.connect_service("172.8.0.5", 21, "test", "test", "ftp")','putResult = ftpShell.put("/bin/ls", "/etc/", shell)','if typeof(putResult) == "string" then',' print("There was an error while sending file: " + putResult)',"else",' print("File got sent successfully.")',"end if"]}}});var Yk=T((D5,NO)=>{NO.exports={$meta:{description:'Create a `function` with `"function()"`, including parameters with optional default values. Assign the result to a variable. Invoke by using that variable. Use `@` to reference a function without invoking.',example:["triple = function(n=1)"," return n * 3","end function","print triple // 3","print triple(5) // 15","f = @triple","print f(5)"]}}});var Qk=T((j5,$O)=>{$O.exports={$meta:{description:"Use `if` blocks to do different things depending on some condition. Include zero or more `else if` blocks and one optional `else` block. Use a `while` block to loop as long as a condition is true. A `for` loop can loop over any `list`, including ones easily created with the `range` function. The `break` statement jumps out of a `while` or `for` loop. The `continue` statement jumps to the top of the loop, skipping the rest of the current iteration.",example:["// if block","if 2+2 == 4 then",' print "math works!"',"else if pi > 3 then",' print "pi is tasty"','else if "a" < "b" then',' print "I can sort"',"else",' print "last chance"',"end if","","// while loop",'s = "Spam"',"while s.len < 50",' s = s + ", spam"',"end while",'print s + " and spam!"',"","// for loop","for i in range(10, 1)",' print i + "..."',"end for",'print "Liftoff!"']},mail_login:{description:"Returns a `MetaMail` entity if the login was successful. On failure a `string` with details gets returned. In case any of the provided values deviate from the types defined in the signature this method will return `null`.",example:['metaMail = mail_login("test@test.com", "test")',"if metaMail == null then",' print("Loggin failed.")',"else",` print("You've got mail.")`,"end if"]},parent_path:{description:"Returns a `string` which is the parent path of the provided path. The path provided needs to be properly formatted. If the path is any other type than a `string` or is empty, this method will throw an error interrupting further script execution.",example:['print("Is proper parent path: " + (parent_path("/my/test/path") == "/my/test"))']},hasIndex:{description:"Verifies if an index is available within an object. In case of success this method will return a `number` with the value one. In case of failure the value will be a zero. This method supports `map`s, `list`s and `string`s. Each passed type may result in different behavior therefore it is advisable to take a look at each of their specific signatures. In case an unsupported value gets passed this method will return `null`.",example:['print("List has index: " + hasIndex([1, 2, 3], 2)']},typeof:{description:'Returns a `string` containing the type of the entity provided. There are following types by default: `"aptclientLib"`, `"blockchainLib"`, `"ctfEvent"`, `"coin"`, `"computer"`, `"cryptoLib"`, `"file"`, `"function"`, `"list"`, `"map"`, `"MetaLib"`, `"MetaMail"`, `"MetaxploitLib"`, `"NetSession"`, `"null"`, `"number"`, `"port"`, `"router"`, `"service"`, `"shell"`, `"ftpshell"`, `"string"`, `"subwallet"`, `"wallet"`. Custom types can be added as well by using the `classID` property in a `map`.',example:['myObj = { "classID": "myType" }','if typeof(myObj) == "myType" then',' print("Object is myType.")',"else",' print("Object is not myType.")',"end if"]},get_router:{description:"Returns by default the `router` to which the executing computer is connected to. Optionally an IP address can be provided. In case of failure `null` is returned. If there is no active internet connection, this method will throw an error, interrupting further script execution.",example:["router = get_router","if router.local_ip == get_shell.host_computer.network_gateway then",' print("Router is equal to network gateway.")',"else",' print("Router is not equal to network gateway.")',"end if"]},get_switch:{description:"Returns the switch on the local network whose IP address matches, otherwise it returns `null`.",example:['router = get_switch("192.168.0.2)','print("IP address of switch: " + router.local_ip)']},nslookup:{description:'Returns the IP address for the provided web address. In case the web address cannot be found a `string` gets returned containing the following message: `"Not found"`. If the provided web address is not a `string` or empty this method will throw an error preventing further script execution.',example:["url = params[0]",'print("IP for website is: " + nslookup(url))']},print:{description:"Print a message on the Terminal. Optionally replacing can be enabled which will replace all previous prints. This can be useful for creating a loading bar for example. There is also the possibility of styling output by using TextMeshPro rich-text tags.",example:["for i in range(9)",' print(("#" * (9 - i)) + ("-" * i) , true)'," wait(0.2)","end for"]},clear_screen:{description:"Removes any text existing in a Terminal prior to this point. Utilizing this method in an SSH encryption process will trigger an error, halting further script execution.",example:["for i in range(9)"," clear_screen",' print(("#" * (9 - i)) + ("-" * i))'," wait(0.2)","end for"]},active_user:{description:"Returns a `string` with the name of the user who is executing the current script.",example:['print("Current active user: " + active_user)']},home_dir:{description:"Returns a `string` with the home folder path of the user who is executing the current script.",example:['print("Home dir of current user: " + home_dir)']},get_shell:{description:"Returns the `shell` that is executing the current script. Optionally, a username and password can be provided, allowing the use of a shell with other user privileges. If the username or password does not match an existing user or if the provided values deviate from the defined signature, this method will return `null`.",example:['shell = get_shell("root", "test")',"if shell == null then",` print("Couldn't obtain root shell.")`,"else",' print("Obtained root shell.")',"end if"]},indexes:{description:"Returns a `list` containing all indexes or keys of the passed object. This method supports `map`s, `list`s, and `string`s. The type of each item may vary when using this method on a `map` since keys could be any type. The other types will return a `list` where each item is a `number`. In case a type is passed that is not supported, this method will return `null`.",example:['indexesOfStr = indexes("test")','print("Following indexes are available: " + indexesOfStr.join(", "))']},values:{description:"Returns a `list` containing all values of an object. Supported types are `map`s and `string`s. In case the passed type deviates from these two, it will return the passed value itself.",example:['indexesOfStr = values("test")','print("Following values are available: " + indexesOfStr.join(", "))']},indexOf:{description:"Lookups index of value within `map`s, `list`s, or `string`s. For `list`s and `string`s, the behavior is very similar. On success, you'll receive a `number` representing the found index. On failure, it will return `null`. For `map`s, it's a bit different since the returned value could be of any type. On failure, it will return `null` as well. If a value gets passed that is not supported, this method returns `null`.",example:['index = indexOf("test", "e")','print("e is at: " + index)']},len:{description:"Returns `number` indicating what size the passed object is. In case anything other than a `map`, `list` or `string` gets passed this method will return `null`.",example:['length = len("test")','print("Length of string is: " + length)']},shuffle:{description:"Randomizes content of an object. Valid data types for this method are `list` and `map`. In case a map-like object such as a `file` or `computer` a runtime exception will be thrown.",example:["list = [0, 1, 2, 3, 4, 5]","shuffle(list)",'print("And the winner is: " + list[0])']},val:{description:"Casts a `string` to a `number`. If the provided `string` does not represent a valid `number`, the `number` zero will be returned. If any type other than `string` or `number` is passed, this method will return `null`.",example:['num = val("1.25")','print("Number in string is: " + num)']},lower:{description:"Returns a `string` which is the lowercase transformed version of the provided `string`. In case anything other than a `string` gets passed this method will return the passed value again.",example:['myString = lower("HELLO WORLD")',"print(myString)"]},upper:{description:"Returns a `string` which is the uppercase transformed version of the provided `string`. In case anything other than a `string` gets passed this method will return the passed value again.",example:['myString = upper("hello world")',"print(myString)"]},sum:{description:"Returns a `number` representing the sum of all items within a `map` or a `list`. If any non-supported type is passed, this method will return a `number` with the value zero.",example:["list = [0, 1, 2, 3, 4, 5]",'print("Sum of all items is: " + sum(list))']},pop:{description:"When passing a `list` to this method, it will return the value at the last index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the passed object is empty or is anything other than a `map` or `list`, the method will return `null`.",example:["list = [0, 1, 2, 3, 4, 5]",'print("The last item is: " + pop(list))']},pull:{description:"When passing a `list` to this method, it will return the value at the first index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the passed object is empty or is anything other than a `map` or `list`, the method will return `null`.",example:["list = [0, 1, 2, 3, 4, 5]",'print("The first item is: " + pull(list))']},push:{description:"Allows pushing a value into an object, supporting `map`s and `list`s. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution. If you try to push a value into an object that isn't a `map` or `list`, it returns `null`.",example:["list = [0, 1, 2, 3, 4, 5]","push(list, 42)",'print("The answer to everything is: " + pop(list))']},sort:{description:"Sorts the values of a `list` alphanumerically. This operation mutates the original `list`. Optionally, a key can be provided, which is used if the items are `map`s or `list`s. Finally, this method returns the updated `list`. If a type other than `list` is passed, the method returns the passed value without any changes.",example:["list = [9, 3, 5, 7]","sort(list)",'print("Sorted list: " + list.join(", "))']},remove:{description:"Depending on the data type, this function will remove a value in the provided object, potentially mutating the object. This method works with `map`s, `list`s, and `string`s. Each passed type may support different types for the `key` argument. For example, using this method on a string would treat the key as a character index. Therefore, it is advised to review the signatures of each type. Passing a key with the type `null` may cause an error to be thrown, preventing further script execution. The same will happen if the passed self value deviates from being a `map`, `list`, or `string`.",example:["list = [9, 3, 5, 7]","remove(list, 5)",'print("List after removal: " + list.join(", "))']},user_input:{description:"Puts script execution on hold to receive input from the user. Input can be submitted by pressing Enter. You can style the output message using TextMeshPro rich-text tags. Two optional arguments are available: `isPassword`, which defines whether input should be masked by asterisk signs, and `anyKey`, which enables capturing of keys individually. Using this method within an SSH encryption process or passing values deviating from the defined method signature will cause an error to be thrown, interrupting further script execution.",example:["num = 0",'aboveIncludingZeroTag = "<color=yellow>"','belowZeroTag = "<color=red>"',"while (true)"," clear_screen"," output = aboveIncludingZeroTag + num"," if (num < 0) then"," output = belowZeroTag + num"," end if"," print(output)",' key = user_input("Press arrow up/down to change value.", false, true)',' if (key == "UpArrow") then'," num = num + 1",' else if (key == "DownArrow") then'," num = num - 1"," else",' exit("Bye!")'," end if","end while"]},include_lib:{description:"Enables the inclusion of library binaries, which can be used inside your script. If successful, an object related to the provided library will be returned; otherwise, `null` is returned. This function is exclusively for importing library binaries. If you want to import custom scripts or binaries into your project, use `import_code` instead. Passing anything other than a `string` for the path, or leaving the path empty, will cause an error to be thrown, interrupting further script execution.",example:['crypto = include_lib("/lib/crypto.so")',"if crypto == null then",` print("Crypto library couldn't get imported.")`,"else",' print("Crypto library got imported.")',"end if"]},import_code:{description:'Enables to import code from different sources into one file. This is useful in case you want to split code into different files and also to avoid any limitation in regards to text file character limits. Note that `import_code` requires an absolute path and is called while compiling the file into a binary instead of during runtime. Additionally `import_code` cannot be nested. Code can be either imported from plain text files or binaries that have `"allow import"` enabled. `import_code` is also parsed wherever it is found, not even a `//` comment will prevent it being evaluated.',example:["//Content of main.src",'import_code("/home/user/my_module.src")','print("bye")',"//Content of my_module.src",'print("hello!")']},exit:{description:"Stops execution of the currently running script. Optionally a message can be provided which will be shown in the Terminal. There is also the possibility of styling output by using TextMeshPro rich-text tags.",example:["while (true)",' shouldExit = lower(user_input("Want to exit? (Y/N)"))',' if (shouldExit == "y") then',' exit("See you!")'," end if","end while"]},user_mail_address:{description:"Returns a `string` containing the email address of the player who is executing the script. If the user does not have an email address this method will return `null`.",example:['print("My EMail address is: " + user_mail_address)']},user_bank_number:{description:"Returns a `string` containing the bank account number of the player who is executing the script. If the user does not have a bank this method will return `null`.",example:['print("My Bank number is: " + user_bank_number)']},whois:{description:"Returns a `string` containing the administrator information behind an IP address provided. In case of failure the returned `string` will contain an error message instead. If the provided ip is not a `string` or is empty this method will throw an error causing the script to stop.",example:['adminInfo = whos("1.1.1.1")',"infoLines = adminInfo.split(char(10))","infoObject = {}",'infoObject.domainName = infoLines[0].split(":")[1].trim','infoObject.administrativeContact = infoLines[1].split(":")[1].trim','infoObject.emailAddress = infoLines[2].split(":")[1].trim','infoObject.phone = infoLines[3].split(":")[1].trim','print("Phone number: " + infoObject.phone)']},wait:{description:"Pauses the script execution. Optionally, the duration can be provided via the `time` argument. By default, the duration will be 1 second. The duration cannot be below 0.01 or above 300; otherwise, this method will throw a runtime exception.",example:["start = time","wait(5)","elapsed = time - start",'print("Waited: " + elapsed)']},command_info:{description:"Returns a `string` value of a translation. Translations include commands, documentation and other game-related things. Checkout [Grey-Texts](https://github.com/LoadingHome/Grey-Texts/blob/main/EnglishLang.json) for an overview of all available keys. If the provided command name is not a `string` or is empty this method will throw an error causing the script to stop.",example:['print(command_info("LS_USAGE"))']},program_path:{description:"Returns a `string` containing the path of the script that is currently executing. It will update when using `launch`, which makes it different from `launch_path`.",example:["path = program_path",'print("Script gets executed within: " + parent_path(path))']},current_path:{description:"Returns a `string` containing the path in which script that is currently executed from.",example:["path = current_path",'print("PWD: " + path)']},format_columns:{description:"Returns a `string` which is the formatted version of the provided text. Keep in mind that TextMeshPro rich-text tags might screw up the output. When using tags consider applying these after formatting. Passing anything other than a `string` will result in an empty `string`.",example:['text = "FIRST SECOND THIRD','1 2 3"',"print(format_columns(text))"]},current_date:{description:'Returns a `string` containing the current date and time. Ingame time passes 15 times as fast as real-time - 4 seconds per in-game minute. The initial time after every wipe will be the 1st of January 2000 at 6:00 AM. Additionally, the game time will not proceed while the server is offline.\n* Output schema: `"[day]/[month]/[year] - [hours]:[minutes]"`\n* Example output: `"27/Jan/2000 - 08:19"`\n',example:["dateStr = current_date",'dateSegments = dateStr.split(" - ")','date = dateSegments[0].split("/")',"day = date[0]","month = date[1]","year = date[2]",'dateTime = dateSegments[1].split(":")',"hours = dateTime[0]","minutes = dateTime[1]",'print("Current day: " + day)']},is_lan_ip:{description:"Returns a `number`. One indicates that the provided IP address is a valid LAN IP address. Otherwise, zero will be returned.",example:['print("Is Lan IP: " + is_lan_ip("192.168.0.1"))']},is_valid_ip:{description:"Returns a `number`. If the provided IP address is valid, its value will be one. Otherwise, its value is zero.",example:['print("Is valid IP: " + is_valid_ip("1.1.1.1"))']},bitwise:{description:'Returns a `number` by performing bitwise operations. Supported operators are: `"~"`, `"&"`, `"|"`, `"^"`, `"<<"`, `">>"`, `">>>"`. In case you want to use the tilde operator you only need to provide the operator and the left argument. If any of the required arguments is `null` this method will return `null`. Warning: If either operand is >= `0x80000000`, it\'ll always returns 0.',example:["num = params[0].to_int",'isOdd = bitwise("&", num, 1) == 1',"if isOdd then",' print("Number is odd.")',"else",' print("Number is even.")',"end if"]},abs:{description:"Returns the absolute value of `number`.",example:["a = 1","b = 5","difference = abs(a - b)",'print("Difference between a and b is: " + difference)']},acos:{description:"Returns the inverse cosine (in radians) of a `number`.",example:["adjacent = 8","hypotenuse = 10","calcAngle = acos(adjacent / hypotenuse)",'print("Angle: " + calcAngle)']},asin:{description:"Returns the inverse sine (in radians) of a `number`.",example:["opposite = 6","hypotenuse = 10","calcAngle = acos(opposite / hypotenuse)",'print("Angle: " + calcAngle)']},atan:{description:"Returns the inverse tangent (in radians) of a `number`.",example:["opposite = 8","hypotenuse = 10","calcAngle = atan(opposite / hypotenuse)",'print("Angle: " + calcAngle)']},tan:{description:"Returns the tangent of a `number` in radians.",example:["degrees = 90","tanFromDegrees = tan(degress * pi / 180)",'print("Tan from degrees: " + tanFromDegrees)']},cos:{description:"Returns the cosine of a `number` in radians.",example:["radians = 1","radius = 10","circleX = cos(radians) * radius","print(circleX)"]},code:{description:"Returns the Unicode `number` of the first character of the string. In case an empty `string` is provided the script execution will crash.",example:['key = user_input("Press a key!", false, true)',"isA = key.code == 97","if isA then",' print("You pressed A.")',"else",' print("You did not press A.")',"end if"]},char:{description:"Returns the UTF-16 character `string` related to the provided unicode `number`. The provided `number` needs to be between 0 and 65535. Any `number` which is outside this range will cause the script to throw a runtime error. Beware when passing non-ASCII values to intrinsics as they will likely get re-encoded as UTF-8. For example, `md5(char(255))` will actually return the hash of the two-byte sequence `0xC3` `0xBF`.",example:['key = user_input("Press a key!", false, true)',"isA = key == char(97)","if isA then",' print("You pressed A.")',"else",' print("You did not press A.")',"end if"]},sin:{description:"Returns the sine of a `number` in radians.",example:["radians = 1","radius = 10","circleY = sin(radians) * radius","print(circleY)"]},floor:{description:"Returns `number` rounded down to the integer value of the provided `number`.",example:["price = 25.43467","floored = floor(price * 100) / 100",'print("Floored price: " + floored)']},range:{description:"Generates a `list` where each item is a `number`. By default, the list starts with zero and increments by one for each item. You can optionally define a start and end value, as well as customize the incremental value. However, if the incremental value is zero, or if the list exceeds `16777215L` items, or if start/end is `null`, the function will throw a runtime error.",example:['print("Countdown:")',"for num in range(10)"," print(num)","end for",'print("Done!")']},round:{description:"Returns `number` rounded to the integer value of the provided `number`.",example:["price = 25.43467","rounded = round(price * 100) / 100",'print("Price: " + rounded)']},rnd:{description:"Returns a random `number` between 0 and 1. Optionally a seed `number` can be provided.",example:["min = 10","max = 20","output = floor(rnd * (max - min + 1) + min)",'input = user_input("Guess a number between 10 and 20!").to_int',"if (input == output) then",' print("You guessed right!")',"else",' print("You failed! The number was " + output)',"end if"]},sign:{description:"Returns a one or minus one, indicating the sign of the number passed as argument. If the input is zero, it will be returned as-is.",example:["print(sign(40))","print(sign(-40))","print(sign(0))"]},sqrt:{description:"Returns the square root of a `number`.",example:["a = 3","b = 4","calcHypotenuse = sqrt((a * a) + (b * b))",'print("Hypotenuse: " + calcHypotenuse)']},str:{description:"Returns the `string` value of provided data. Can be used to turn a `number` into a `string` or to get the signature of a `function`.",example:["signature = str(@user_input)","argSegment = signature[9:signature.len - 1]",'args = argSegment.split(",")','print("Function has " + args.len + " arguments.")']},ceil:{description:"Returns `number` rounded up to the integer value of the provided `number`.",example:["price = 25.43467","upperPrice = ceil(price * 100) / 100",'print("Upper price: " + upperPrice)']},pi:{description:"Returns the `number` PI to the precision of six.",example:["radius = 10","circumference = 2 * pi * radius",'print("Circumference: " + circumference)']},launch:{description:"Launches the binary located at the provided path. Optionally, parameters can be passed. Returns a `number`. If the launch was successful, the value will be one; otherwise, it will be zero. In some cases, a `string` will be returned containing an error message. If you need to share variables between a launched script and the current process, consider using `get_custom_object`. Note that launching a script is not asynchronous, meaning that the current script will pause its execution until the launched script finishes. This method cannot be used to execute binaries with an EXE extension (GUI interface). If any provided values deviate from the method signature, a runtime exception will be thrown.",example:['shell = get_shell("root", "test")','launch(shell, "/bin/cat", "/etc/passwd")']},launch_path:{description:"Returns a `string` containing the path of the script that was initially executed, meaning that even when using `launch`, it will still return the path of the initially executed script.",example:["path = launch_path",'print("Script gets executed within: " + parent_path(path))']},slice:{description:"Returns a sliced version of the passed object. Valid data types for slicing are `string` and `list`. The returned object will contain all elements related to the provided start and end index. If no start or end index is provided this method will essentially return a shallow copy of the passed object. If an invalid data type is passed, `null` is returned.",example:['myString = "not your text"','print("my " + slice(myString, 9))']},md5:{description:"Returns the MD5 hash `string` of the provided `string`. Using this method within an SSH encryption process or passing anything other than a `string` will cause an error to be thrown, stopping any further script execution.",example:['passwordHash = md5("test")',`print("Hash for the password 'test' is " + passwordHash)`]},hash:{description:"Returns numeric hash for the provided data. Using this method within a SSH encryption process will cause an error to be thrown causing the script execution to stop.",example:['hashA = hash({ "a": 2, "b": 1 })','hashB = hash({ "b": 1, "a": 2 })',"if (hashA == hashB) then",' print("Objects are alike!")',"else",' print("Objects are different!")',"end if"]},time:{description:"Returns a `number` of seconds representing the elapsed time since the script started.",example:["start = time","for i in range(10000)"," var = i * 100","end for","endTime = time - start",'print("Script execution done within: " + endTime)']},bitAnd:{description:"Performs a bitwise AND for the provided values. Returns a `number`. Warning: If either operand is >= `0x80000000`, it'll always return 0.",example:['print("Result of bitwise AND: " + bitAnd(1, 2))']},bitOr:{description:"Performs a bitwise OR for the provided values. Returns a `number`. Warning: If either operand is >= `0x80000000`, it'll always return 0.",example:['print("Result of bitwise OR: " + bitOr(1, 2))']},bitXor:{description:"Performs a bitwise XOR for the provided values. Returns a `number`. Warning: If either operand is >= `0x80000000`, it'll always return 0.",example:['print("Result of bitwise XOR: " + bitXor(1, 2))']},log:{description:"Returns the natural logarithm of a `number`. By default, the base is 10. Optionally the base can be changed.",example:["a = 2","b = 8","baseLog = log(a) / log(b)",'print("Base log is: " + baseLog)']},yield:{description:"Waits for the next tick.",example:["while (true)"," yield",' print("tick")',"end while"]},get_custom_object:{description:"Returns `map` which is shared throughout script execution. Can be helpful if it desired to pass or receive values when using `launch`. Using this method in a SSH encryption process will cause an error to be thrown preventing further script execution.",example:["get_custom_object.shouldEndScript = false","while (get_custom_object.shouldEndScript)",' print("Waiting...")'," wait(2)","end while"]},insert:{description:"Inserts a value into either a `list` or a `string`. If the method is used on any other data type or the passed index is not a `number`, this method throws an error, preventing further script execution.",example:["list = [2, 3, 4]","insert(list, 2, 42)",'print("List with inserted item: " + list.join(", "))']},to_int:{description:"Returns a `number` which is parsed from the `string` as an integer. In case the `string` is not numeric it will return the original `string`. If the passed value is not a `string` this method will return `null`.",example:['myString = "1"',"print(to_int(myString) + 41)"]},join:{description:"Returns a concatenated `string` containing all stringified values inside the `list`. These values will be separated via the provided separator. Passing anything other than a `list` will result in the original value being returned. In case the passed `list` exceeds `16777215L` items or the delimiter exceeds 128 characters, this method will throw an error, interrupting further script execution.",example:["myList = [42, 1, 3]",`print(join(myList, " .-*'*-. "))`]},split:{description:"Returns a `list` where each item is a segment of the `string`, separated by the provided separator `string`. This method uses regular expressions for matching, so remember to escape special characters such as dots. If any of the provided arguments deviate from the method signature types, this method will return `null`. In case the pattern is empty, the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','segments = split(myString, " ")','if segments[0] != "42" then',' print("Invalid information spotted!")',"else",' print("Information seems valid!")',"end if"]},replace:{description:"This function replaces a value within an object and returns the mutated object. Currently, it only supports `map`s and `list`s. Previously, it also supported `string`s, but that functionality has been replaced by `replace_regex`. If you use anything other than the supported types, a runtime error will be thrown.",example:["list = [1,2,3,42]","newList = replace(list, 42, 4)","print(newList)"]},replace_regex:{description:"Returns a `string` with the replaced content by using regular expressions. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','newString = replace_regex(myString, "\\w+$", "right")',"print(newString)"]},is_match:{description:"Uses regular expression to check if a string matches a certain pattern. If it matches, it will return a `number` with the value one. If it does not match, the value of the `number` will be zero. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','hasWordAtTheEnd = is_match(myString, "\\w+$")',"print(hasWordAtTheEnd)"]},matches:{description:"Returns a `map` with all search results for the provided regular expression. Each key contains the index and the value contains the matching `string`. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','result = matches(myString, "w")',"print(result)"]},get_ctf:{description:"Returns `ctfEvent` object if there is one available. In case of failure this method will return a `string` with details."},show:{description:'Displays all the packages available in a repository. The repository must be listed in the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. If it cannot find a repository, it will return a string with an error message. On success, it will return a `string` containing all packages and their descriptions, with each entry separated by a newline.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = show(aptClient, "177.202.15.132")',"packageList = split(packages, char(10) + char(10))","pop(packageList) // remove last empty item","for packageItem in packageList"," entry = split(packageItem, char(10))"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},search:{description:'The `search` method specifically looks for a package in any of the repositories listed in `"/etc/apt/sources.txt"`. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `string` containing all packages that partially match the provided search value. On failure, it will return a `string` with various error messages.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = search(aptClient, ".so")',"packageList = split(packages, char(10) + char(10))","for packageItem in packageList"," entry = split(packageItem, char(10))"," if len(entry) != 2 then",' print "something wrong in: " + entry'," continue"," end if"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},update:{description:'Refreshes the list of available packages after adding a new repository in `"/etc/apt/sources.txt"`, or if the remote repository has updated its information in `"/server/conf/repod.conf"`. If either the `"/etc/apt/sources.txt"` file has an invalid format or an invalid `aptClient` object is passed, this method will return a `number` with the value zero. On a successful update, an empty `string` will be returned. In case of failure, a `string` with an error message will be returned.',example:['aptClient = include_lib("/lib/aptclient.so")',"result = update(aptClient)",'if result == "" then',' print "Update successful!"',"else",' print "Error while updating: " + result',"end if"]},add_repo:{description:'Adds a repository address to the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = add_repo(aptClient, "177.202.15.132")','if result == "" then',' print "Addition successful!"',"else",' print "Error while adding: " + result',"end if"]},del_repo:{description:'Removes a repository address from the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = del_repo(aptClient, "177.202.15.132")','if result == "" then',' print "Deletion successful!"',"else",' print "Error while deleting: " + result',"end if"]},install:{description:'Installs a program or library from a remote repository listed in `"/etc/apt/sources.txt"`. If no path is specified, the program installs in `"/lib"` if it is a library or in `"/bin"` otherwise. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `number` with the value one. In case of failure, it will return a `string` containing an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = install(aptClient, "rshell_interface")',"if result == 1 then",' print "Installed program successful!"',"else",' print "Error while installing: " + result',"end if"]},check_upgrade:{description:"Verifies if there is a newer version of the program or library in the repository. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `number`, which can be either zero or one. Zero indicates that there is no new version available, while one indicates that there is a new version. In case of failure, it will return a string containing an error message.",example:['aptClient = include_lib("/lib/aptclient.so")','result = check_upgrade(aptClient, "/bin/rshell_interface")',"if result == 0 then",' print "Program doesnt need an update!"',"else if result == 1 then",' print "Program does need an update!"',"else",' print "Error while checking version: " + result',"end if"]},coin_price:{description:"Returns a `number` representing the current unit value of the cryptocurrency. In case of an error, it will return a `string` with the error details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','price = coin_price(blockchain, "test8")','if typeof(price) == "string" then',' exit "Couldnt get coin price due to: " + price',"end if",'print "Your coin price is " + price']},show_history:{description:"Returns a `map` with the latest changes in the value of a specific cryptocurrency. The key of the `map` is an index represented by a `number`. The value is a `list`, where index 0 is the historical price of the coin and index 1 is the date when the price change occurred. If any of the provided parameters have a type that deviates from the defined signature, or if no coin exists with this name, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','history = show_history(blockchain, "test")','if typeof(history) == "string" then',' exit "Couldnt fetch history due to: " + history',"end if","for entry in values(history)"," price = entry[0]"," date = entry[1]",' print "The price on " + date + " was " + price',"end for"]},amount_mined:{description:"Returns a `number` representing the total amount of mined coins. In case of an error, it will return a string with details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','mined = amount_mined(blockchain, "test")','if typeof(mined) == "string" then',' exit "Couldnt get amount mined due to: " + mined',"end if",'print "Your mined amount is " + mined']},get_coin:{description:"Returns a `coin` object used to manage the currency. In case of an error, it will return a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','if typeof(coin) != "coin" then',' exit "Couldnt get coin object due to: " + coin',"end if",'print "Your coin address is " + get_address(coin)']},login_wallet:{description:"Returns a `wallet` object on success. In case of an error, it will return a `string` indicating the reason. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','if typeof(wallet) == "string" then',' print "Login failed due to: " + wallet',"else",' print "Login was successful!"',"end if"]},create_wallet:{description:"Creates a `wallet` and returns a `wallet` object on success, which can be used to manage cryptocurrencies. In case of an error, it will return a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = create_wallet(blockchain, "test", "test")','if typeof(wallet) == "string" then',' print "Wallet creation failed due to: " + wallet',"else",' print "Wallet creation was successful!"',"end if"]},delete_coin:{description:"Removes a cryptocurrency from the world. It is required to provide the credentials used in the creation of the cryptocurrency. On success, it will return a `number` with the value one. On failure, it will return a `string` containing details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','result = delete_coin(blockchain, "test", "test", "test")','if typeof(result) == "string" then',' exit "Couldnt delete coin due to: " + result',"end if",'print "Coin got deleted"']},set_cycle_mining:{description:"Defines the interval (in-game hours) in which each user receives a coin reward when mining. The interval cannot be lower than 1 and not be higher than 2160. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = set_cycle_mining(coin, 20)","if result == 1 then",' print "Successful updated mining interval"',"else",' print "Failed updating mining interval"',"end if"]},get_cycle_mining:{description:"Returns a `number` representing the defined interval in which each user receives a coin reward when mining. In case of failure, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_cycle_mining(coin)",'if typeof(result) == "string" then',' exit "Failed getting cyclic mining value due to: " + result',"end if",'print "cyclic mining value: " + result']},get_reward:{description:"Returns a `number` representing the amount of coins that will be received as a reward after each mining cycle. In case of failure, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_reward(coin)",'if typeof(result) == "string" then',' exit "Failed getting reward value due to: " + result',"end if",'print "reward value: " + result']},set_reward:{description:"Assigns the reward that miners will receive after each mining cycle. The reward value has to be above one. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, the method will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = set_reward(coin, -1)",'if typeof(result) == "string" then',' exit "Failed setting reward due to: " + result',"end if",'print "Successfully set reward!"']},transaction:{description:"Makes a transaction of the currency between the indicated subwallets. In case of an error, a `string` with the details is returned. In case of success, a `number` with a value of one will be returned. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = transaction(coin, "test", "test2", 20)','if typeof(result) == "string" then',' exit "Failed transaction due to: " + result',"end if",'print "Successfully transfered!"']},create_subwallet:{description:"Registers a new account in the `coin` that can be used to manage services such as stores. It is necessary to provide the PIN of the owner's `wallet` that wants to register. In case of success, the method will return a `number` with the value one. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. In case of an error, a `string` with the details is returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','wallet = login_wallet(blockchain, "test", "test")','result = create_subwallet(coin, "test", wallet.get_pin, "test", "test")','if typeof(result) == "string" then',' exit "Failed to create subwallet due to: " + result',"end if",'print "Successfully created subwallet!"']},get_subwallet:{description:"Returns a `subWallet` object on success. In case of error, it returns a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = get_subwallet(coin, "test")','if typeof(result) == "string" then',' exit "Failed to get subwallet due to: " + result',"end if",'print "Successfully received subwallet!"']},get_subwallets:{description:"Returns a `list` where each item is a `subWallet` object, including all the accounts registered in the cryptocurrency. In case of error, it returns a `string` with the details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_subwallets(coin)",'if typeof(result) == "string" then',' exit "Failed to get subwallets due to: " + result',"end if","for subwallet in result",' print get_user(subwallet) + " has " + get_balance_subwallet(subwallet) + " coins"',"end for"]},set_address:{description:"Configures a valid address that will be shown to users who do not have the currency, indicating where to register. In case of an error, a `string` with the details is returned. In case of success, a `number` with a value of one will be returned. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = set_address(coin, "12.12.12.12")','if typeof(result) == "string" then',' exit "Failed to set address due to: " + result',"end if",'print "Successfully set address!"']},get_address:{description:"Returns the configured address that will be shown to users who do not have the currency, indicating where they have to register. In case of an error, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_address(coin)","if not is_valid_ip(result) then",' exit "Failed to get address due to: " + result',"end if",'print "address: " + result']},get_mined_coins:{description:"Returns a `number` representing the amount of coins that have been mined so far. In case of an error, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_mined_coins(coin)",'if typeof(result) == "string" then',' exit "Failed to get mined coins due to: " + result',"end if",'print "mined coins: " + result']},reset_password_coin:{description:"Resets the password of the coin. It returns a `number` with the value one if resetting was successful; otherwise, it will return a `string`. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = reset_password(coin, "test")','if typeof(result) == "string" then',' exit "Failed to reset password due to: " + result',"end if",'print "Successfully reset password"']},get_ports:{description:"Returns a `list` of `port`s on the `computer` which are active. If an invalid `computer` object is passed, this method will return `null`.",example:["router = get_router","ports = get_ports(host_computer(get_shell))","for port in ports",' print("Info: " + router.port_info(port))',"end for"]},get_name:{description:'Returns the hostname of the machine. If an invalid `computer` object is passed, this method will return a `string` containing `"Unknown"`.',example:["computerName = get_name(host_computer(get_shell))",'print("The name of your machine is " + computerName)']},lan_ip:{description:"Returns a `string` with the local IP address of the `computer`. If an invalid `computer` object is passed, this method will return `null`.",example:["localIp = lan_ip(host_computer(get_shell))",'print("Public ip:" + localIp)']},public_ip_pc:{description:"Returns a `string` with the public IP address of the `computer`. If an invalid `computer` object is passed, this method will return `null`.",example:["publicIp = public_ip_pc(host_computer(get_shell))",'print("Public ip:" + publicIp)']},File:{description:"Returns a `file` located at the path provided in the arguments. The path can be either relative or absolute. Keep in mind that any `file` object can be a folder as well. If the provided path cannot be resolved, meaning that no file or folder exists, this method will return `null`. Providing any other type than `string` or the value being empty for the path will result in an error thrown interrupting the script execution. If an invalid `computer` object is passed, this method will return `null`.",example:['filePath = "/etc/passwd"',"file = File(host_computer(get_shell), filePath)","if file != null then"," print(file.get_content)","else",' print("File at given path " + filePath + " does not exist.")',"end if"]},create_folder:{description:"Creates a folder at the path provided in the arguments. There are certain limitations when it comes to creating a folder. The folder name has to be alphanumeric and below 128 characters. Creation will fail as well when there is already a folder in place or if there are lacking permissions. Additionally, there is a folder limit of about 250 in each folder and 3125 folders in the computer overall. In case the folder creation fails, the method will return a `string` with details. In case of success, it will return a `number` with the value one. Providing any type that deviates from the signature or using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution. If an invalid `computer` object is passed, this method will return `null`.",example:['path = "/home/" + active_user + "/Desktop"',"computer = host_computer(get_shell)",'createResult = create_folder(computer, path, "myfolder")','if typeof(createResult) == "string" then',' print("There was an error when creating the folder: " + createResult)',"else",' print("Folder got created at given path " + path)',"end if"]},is_network_active:{description:"Returns a `number` with either the value one or zero. The value will be one if the `computer` has internet access. If there is no internet access, it will return zero instead. In case an invalid `computer` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)","if is_network_active(computer) then",` print("You're connected.")`,"else",` print("You're not connected.")`,"end if"]},touch:{description:"Creates an empty text `file` at the provided path. Certain limitations apply to file creation: the `file` name must be alphanumeric and below 128 characters. Creation will fail if a `file` already exists at the specified path or if there are insufficient permissions. Additionally, there is a file limit of about 250 per folder and 3125 files overall on the computer. If successful, it returns a `number` with the value one. On failure, it returns a `string` with details. Using this method in an SSH encryption process will cause an error to be thrown, preventing further script execution. If an invalid `computer` object is passed, this method will return `null`.",example:['path = "/home/" + active_user + "/Desktop"',"computer = host_computer(get_shell)",'createResult = touch(computer, path, "myFile.txt")','if typeof(createResult) == "string" then',' print("There was an error when creating the file: " + createResult)',"else",' print("File got created at given path " + path)',"end if"]},show_procs:{description:"Returns a `string` providing an overview of all active processes on the `computer`. This includes information about the username, PID, CPU usage, memory consumption, and command name. Using this method in an SSH encryption process will throw an error, preventing further script execution. If an invalid `computer` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)","procs = show_procs(computer)","list = procs.split(char(10))[1:]","processes = []","for item in list",' parsedItem = item.split(" ")'," process = {}"," process.user = parsedItem[0]"," process.pid = parsedItem[1]"," process.cpu = parsedItem[2]"," process.mem = parsedItem[3]"," process.command = parsedItem[4]"," processes.push(process)","end for","print(processes)"]},network_devices:{description:"Returns a `string` containing all network devices available on the `computer`, with each item providing information about the interface name, chipset, and whether monitoring support is enabled. If an invalid `computer` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)","devices = network_devices(computer)","deviceList = devices.split(char(10))","for item in deviceList"," print(item)","end for"]},change_password:{description:"Changes the password of an existing user on the `computer`. Root permissions are necessary for successful password changes. Passwords can only include alphanumeric characters and cannot exceed 15 characters. If the password change fails, this method will return a `string` containing information on why it failed. If the change succeeds, it will return a `number` with the value one. If the provided username is empty, an error will be thrown, preventing any further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','changeResult = change_password(computer, "test", "newPassword")','if typeof(changeResult) == "string" then',' print("There was an error when changing the password: " + changeResult)',"else",' print("Password got successfully changed.")',"end if"]},create_user:{description:"Creates a user on the `computer`, with the specified name and password. Root permissions are necessary for successful user creation. Neither username nor password can exceed more than 15 characters and both need to be alphanumeric. There cannot be more than 15 users created on the same `computer`. In case the creation fails, this method will return a `string` containing the reason for the failure. On success, it will return a `number` with the value one. If the provided username is empty or either of the values exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','creationResult = create_user(computer, "newUser", "123")','if typeof(creationResult) == "string" then',' print("There was an error when creating an user: " + creationResult)',"else",' print("User got successfully created.")',"end if"]},delete_user:{description:"Deletes the indicated user from the `computer`. It can optionally also delete the home folder related to the user. By default, the home folder will not be deleted. Root permissions are necessary to successfully delete a user. Keep in mind that you cannot delete the root user. In case the deletion fails, this method will return a `string` containing the cause of failure. On success, this method will return a `number` with the value one. If the provided username is empty, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','deletionResult = delete_user(computer, "test", true)','if typeof(deletionResult) == "string" then',' print("There was an error when deleting an user: " + deletionResult)',"else",' print("User got successfully deleted.")',"end if"]},create_group:{description:"Creates a new group associated with an existing user on the `computer`. It is necessary to be root to be able to successfully create a group. There are a few limitations when creating a group such as a character limit of 15 and that the group name may only contain alphanumeric characters. In case the group creation fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. In case the provided arguments are empty or the username exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','creationResult = create_group(computer, "test", "staff")','if typeof(creationResult) == "string" then',' print("There was an error when creating a group: " + creationResult)',"else",' print("Group got successfully created.")',"end if"]},delete_group:{description:"Deletes an existing group associated with an existing user on the `computer`. It is necessary to be root to be able to successfully delete a group. In case the group deletion fails, this method will return a `string` containing the cause of failure. On success, it will return `number` with the value one. If either of the provided values is empty, an error will be thrown preventing further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','deletionResult = delete_group(computer, "test", "staff")','if typeof(deletionResult) == "string" then',' print("There was an error when deleting a group: " + deletionResult)',"else",' print("Group got successfully deleted.")',"end if"]},groups:{description:"Returns a `string` containing groups associated with an existing user on the `computer`. In case the user does not exist, a `string` will be returned with an error message. If the provided username is empty, an error will be thrown preventing further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','create_group(computer, "root", "staff")','groups = groups(computer, "root")',"listOfGroups = groups.split(char(10))","print(listOfGroups)"]},close_program:{description:"Closes a program associated with the provided PID. You can see the list of active programs by either using `show_procs` or typing `ps` into your terminal. To close a program, you need to be either the owner of the running process or root. In case the closing of a program fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. If there is no process with the provided PID, this method will return a `number` with the value zero. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))',"processes = split(show_procs(computer), char(10))[1:]",'pid = split(processes[1], " ")[1]',"closeResult = close_program(computer, to_int(pid))",'if typeof(closeResult) == "string" then',' print("There was an error when closing a program: " + closeResult)',"else",' print("Program with pid " + pid + " got successfully closed.")',"end if"]},wifi_networks:{description:"Returns a list of the Wi-Fi networks that are available for the provided interface. Each item in the `list` is a `string` containing information on the BSSID, PWR, and ESSID. If no matching netDevice can be found or an invalid `computer` object is passed, this method will return `null`. In case the active network card is not a Wi-Fi card, an error will be thrown, preventing any further script execution.",example:['computer = host_computer(get_shell("root", "test"))','networks = wifi_networks(computer, "wlan0")',"result = []","for network in networks",' parsedItem = network.split(" ")'," item = {}"," item.BSSID = parsedItem[0]"," item.PWR = parsedItem[1]"," item.ESSID = parsedItem[2]"," result.push(item)","end for","print(result)"]},connect_wifi:{description:"Connects to the indicated Wi-Fi network. It is not possible to connect to a new Wi-Fi while being logged in as a guest. If connecting to a new Wi-Fi fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. Wi-Fi networks can be found via `wifi_networks` or by typing `iwlist` as a command in the terminal. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:["computer = host_computer(get_shell)","networks = wifi_networks(computer)",'firstNetwork = networks[0].split(" ")',"BSSID = firstNetwork[0]","ESSID = firstNetwork[2]",'connectionResult = connect_wifi(host_computer, "wlan0", BSSID, ESSID, "wifi-password")','if typeof(connectionResult) == "string" then',' print("There was an error while connecting to new Wifi: " + connectionResult)',"else",' print("Connected to new Wifi successfully.")',"end if"]},connect_ethernet:{description:"Sets up a new IP address on the `computer` through the ethernet connection. It is not possible to set up a new IP address while being logged in as a guest. On failure, this method will either return a `string` with details or `null`. On success, it will return an empty `string`. If any of the provided parameters have a type that deviates from the defined signature or the computer is not connected to the internet, an error will be thrown preventing any further script execution.",example:["computer = host_computer(get_shell)",'connectionResult = connect_ethernet(computer, "eth0", "192.168.0.4", local_ip(get_router))','if typeof(connectionResult) == "string" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected successfully.")',"end if"]},network_gateway:{description:'Returns a `string` with the gateway IP address configured on the `computer`. If an invalid `computer` object gets passed, this method returns a `string` with the value `"0.0.0.0"`.',example:["computer = host_computer(get_shell)","gatewayIp = network_gateway(computer)",'print("Gateway IP: " + gatewayIp)']},active_net_card:{description:'Returns a `string` which contains either the keyword `"WIFI"` or `"ETHERNET"` depending on which connection type your `computer` is connected by. In case an invalid `computer` object gets passed, this method will return `null`.',example:["computer = host_computer(get_shell)","netCard = active_net_card(computer)",'print("Connected by: " + netCard)']},aircrack:{description:"Returns a `string` containing the password based on the file which was generated via aireplay. In case of failure, it will return `null` instead. If the provided path is empty, an error will be thrown, interrupting the script execution.",example:['crypto = include_lib("/lib/crypto.so")','networks = wifi_networks(host_computer(get_shell), "wlan0")','firstNetwork = networks[1].split(" ")',"bssid = firstNetwork[0]","pwr = firstNetwork[1][:-1].to_int","essid = firstNetwork[2]","aireplayResult = aireplay(crypto, bssid, essid, 300000 / pwr)","if (aireplayResult == null) then",' result = aircrack(crypto, home_dir + "/file.cap")'," print(result)","end if"]},airmon:{description:'Enables or disables the monitor mode of a network device. The `options` parameter can only be `"start"` or `"stop"`. Monitor mode can only be enabled on Wifi cards. If it wasn\'t possible to enable or disable the monitor mode, this method will return either a `number` with the value zero or a `string` with details. In case of success, it will return a `number` with the value one.',example:['crypto = include_lib("/lib/crypto.so")','airmonResult = airmon(crypto, "start", "wlan0")','if typeof(airmonResult) == "string" then',' print("There was an error while switching monitoring mode: " + airmonResult)',"else",' print("Monitoring mode switched successfully.")',"end if"]},aireplay:{description:'Used to inject frames on wireless interfaces. Once the command with `"Control+C"` is stopped, it will save the captured information in a text file called `"file.cap"` in the path where the terminal is currently located. Alternatively, a maximum of captured `acks` can be specified for the command to stop automatically, saving the `"file.cap"` file as described above. To figure out how many ACKs are required, you can use the following formula: `"300000 / [Wifi PWR]"`. If there is an error, a `string` will be returned with the message indicating the problem. On success, it will return `null`. It is advised though to verify that the capture file actually exists. If the passed `crypto` object is invalid, it will return `null` as well. In case any of the provided values deviate from the signature types or bssid/essid is empty, an error will be thrown preventing any further script execution.',example:['crypto = include_lib("/lib/crypto.so")','networks = wifi_networks(host_computer(get_shell), "wlan0")',"for index in range(0, networks.len - 1)",' print(index + ".) " + networks[index])',"end for",'selectedIndex = user_input("Select Wifi: ").to_int','if (typeof(selectedIndex) == "string" or selectedIndex < 0 or selectedIndex > networks.len - 1) then',' exit("Wrong index!")',"end if",'parsed = networks[selectedIndex].split(" ")',"bssid = parsed[0]","pwr = parsed[1][:-1].to_int","essid = parsed[2]","potentialAcks = 300000 / pwr","aireplaycrypto, bssid, essid, potentialAcks)",'wifiPassword = aircrack(crypto, "/home/" + active_user + "/file.cap")','print("Wifi password for " + essid + " is " + wifiPassword)']},decipher:{description:"Returns a decrypted password via the provided password MD5 hash. Keep in mind that this method is not decrypting a password but rather checking for existing passwords within the game world with a matching MD5 hash. So in case a password does not exist in the game world, the decryption will fail. On failure, this method will return `null`. Using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution.",example:['crypto = include_lib("/lib/crypto.so")','computer = host_computer(get_shell("root", "test"))','passwdContent = get_content(File(computer, "/etc/passwd"))',"firstAccount = passwdContent.split(char(10))[0]",'parsed = firstAccount.split(":")',"username = parsed[0]","passwordHash = parsed[1]","password = decipher(crypto, passwordHash)",'print("User: " + username)','print("Password: " + password)']},smtp_user_list:{description:"Returns a `list` of the existing users on the `computer` where the SMTP service is running. If these users also have an email account registered on the SMTP server, it will be indicated in the `list`. SMTP services are usually running on port `25`. In case of failure, this method will return a `string` containing the cause. If any of the provided values deviate from the signature types, this method will return `null`.",example:['crypto = include_lib("/lib/crypto.so")','print(smtp_user_list(crypto, "192.168.0.4", 25))']},get_description:{description:"Returns a `string` with the CTF event description. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},get_template:{description:"Returns a `string` with the CTF event template. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},player_success:{description:"Returns a `number` with the value one if the CTF event was completed successfully. Otherwise, this method will return a `number` with the value zero. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},get_creator_name:{description:"Returns a `string` with the name of the CTF event creator. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},get_mail_content:{description:"Returns a `string` with the mail content of the CTF event. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},chmod:{description:'Modifies the `file` permissions. Optionally, these permissions can also be applied recursively. The format for applying permissions is as follows: `"[references][operator][modes]"`. The references type is defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. The operator is used to define if permissions get added `"+"` or removed `"-"`. There are three different modes that can be modified: read `"r"`, write `"w"`, and execute `"x"`. So, for example, `"o-wrx"` would remove all possible permissions for others. To add all permissions for others again, `"o+wrx"` would be used. In case the modification fails, this method will return a `string` containing information about the reason. Otherwise, an empty `string` is returned. In case any type other than `number` is used for the `isRecursive` parameter, an error will be thrown preventing further script execution. If an invalid `file` object is passed, this method will return `null`.',example:['hostComputer = host_computer(get_shell("root", "test"))','rootFolder = File(hostComputer, "/bin")',"oldPermissions = permissions(rootFolder)",'chmod(rootFolder, "o-wrx", true)',"newPermissions = permissions(rootFolder)",'print("Old permissions: " + oldPermissions)','print("New permissions: " + newPermissions)']},copy:{description:"Copies the `file` to the provided path. Files can only be copied if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, it will return a `string` containing information about the reason for failure. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted or an invalid `file` object is passed, this method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','copyResult = copy(passwdFile, "/etc/", "duplicate")','if typeof(copyResult) == "string" then',' print("There was an error while copying file: " + copyResult)',"else",' print("File got copied successfully.")',"end if"]},move:{description:"Moves the `file` to the provided path. Files can only be moved if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, this method will return a `string` with details. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted or an invalid `file` object is passed, this method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','moveResult = move(passwdFile, "/etc/", "/moved/")','if typeof(moveResult) == "string" then',' print("There was an error while moving file: " + moveResult)',"else",' print("File got moved successfully.")',"end if"]},rename:{description:"Rename the file with the name provided. Files can only be renamed if the user has write permissions or is root. The new filename has to be below 128 characters and alphanumeric. On failure, this method will return a `string` with details. Otherwise, this method will return an empty string. If this method is used within an SSH encryption process, an error will be thrown, causing the script execution to be interrupted. In case the provided name is `null` or an invalid `file` object is passed, this method will return a `number` with the value zero.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','renameResult = rename(passwdFile, "renamed")','if typeof(renameResult) == "string" then',' print("There was an error while renaming file: " + renameResult)',"else",' print("File got renamed successfully.")',"end if"]},path:{description:"Returns a `string` with the path of the file. In case the file gets deleted, it will still return its path prior to deletion. If an invalid `file` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'passwdFile = File(computer, "/etc/passwd")','print("File location: " + path(passwdFile))']},is_folder:{description:"Returns a `number`. The value is one if the file is a folder, zero otherwise. In case the file gets deleted or an invalid `file` object is passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'etcFolder = File(computer, "/etc")','print("Is a folder: " + is_folder(etcFolder))']},parent:{description:"Returns the parent folder of the current file or folder. In case there is no parent folder `null` will be returned instead. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` as well.",example:["computer = host_computer(get_shell)",'etcFolder = File(computer, "/etc")','print("Parent path: " + path(parent(etcFolder)))']},name:{description:"Returns a `string` with the name of the file. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'passwdFile = File(computer, "/etc/passwd")','print("Filename: " + name(passwdFile))']},allow_import:{description:"Returns a `number`. If the file is binary and can be imported by other scripts, the value will be one; otherwise, the value will be zero. In case the file gets deleted, this method will cause a crash. If an invalid `file` object gets passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("File can be imported: " + allow_import(lsBinary))']},get_content:{description:"Returns a `string` representing the content of the file. To read a file, the user requires read access or being root. Note that you cannot read a binary file. In case of failure, `null` will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','print("File content: " + get_content(passwdFile))']},set_content:{description:"Saves text into a `file`. The content will not get appended to the `file`; therefore, existing content will be overridden. To set new content, the user requires write permissions or being root. Keep in mind that text files cannot exceed the character limit of 160,000. In case setting the content was successful, a `number` with the value one will be returned. Otherwise, a `string` with details will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution. If the provided content is `null`, this method will return a `number` with the value zero. In case the file gets deleted this method will return `null`. In case an invalid `file` object gets passed this method will return a `number` with the value zero.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','setResult = set_content(passwdFile, "moo")','if typeof(setResult) == "string" then',' print("There was an error while setting file content: " + setResult)',"else",' print("File content got changed successfully.")',"end if"]},is_binary:{description:"Returns a `number`. If the file is binary, the value will be one; otherwise, it will be zero. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("File is a binary: " + is_binary(lsBinary))']},has_permission:{description:'Returns a `number` indicating if the user who launched the script has the requested permissions. One will indicate that the user has the correct permissions. In case permissions are lacking, the value will be zero. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` instead.',example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("Is able to execute ls: " + has_permission(lsBinary, "x"))']},delete:{description:"Delete the current file. To delete files, write permissions are required or being root. In case of failure, a `string` with details will be returned. Otherwise, an empty `string` gets returned. Please note that deleting a file will leave a log entry. In case an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")',"deletionResult = delete(lsBinary)",'if typeof(deletionResult) == "string" and len(deletionResult) > 0 then',' print("There was an error while deleting a file: " + deletionResult)',"else",' print("File got deleted successfully.")',"end if"]},get_folders:{description:"Returns a `list` of folders. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted or an invalid `file` object gets passed, this method will return `null` as well.",example:["computer = host_computer(get_shell)",'binFolder = File(computer, "/home")',"folders = get_folders(binFolder)","for folder in folders"," print(folder.path)","end for"]},get_files:{description:"Returns a `list` of files. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted or an invalid `file` object gets passed, this method will return `null` as well.",example:["computer = host_computer(get_shell)",'binFolder = File(computer, "/bin")',"files = get_files(binFolder)","for file in files"," print(file.path)","end for"]},permissions:{description:'Returns a `string` with the current file permissions. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`. The format for this permissions `string` is as follows: `"[fileType][wrx](u)[wrx](g)[wrx](o)"`. The file type is either `"d"` in case it\'s a directory or `"-"`. The user type gets defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. An example of a `string` returned by this method would be `"-rwxr-xr-x"`. Taking the latter as an example, the following things become clear:\n* The provided file is not a directory.\n* The user has full access.\n* The group and others have almost all permissions besides writing.\n',example:["computer = host_computer(get_shell)",'binFolder = File(computer, "/bin")',"perms = permissions(binFolder)","fileType = perms[0]","permissionsForUser = perms[1:4]","permissionsForGroup = perms[4:7]","permissionsForOther = perms[7:10]",'print("File type: " + fileType)','print("User permissions: " + permissionsForUser)','print("Group permissions: " + permissionsForGroup)','print("Other permissions: " + permissionsForOther)']},owner:{description:"Returns a `string` with the name of the file owner. User permissions get applied to whoever is the owner of a file. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("Owner of ls is: " + owner(lsBinary))']},set_owner:{description:"Change the owner of this file. Optionally the owner can get applied recursively. The owner's name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure a `string` gets returned containing the cause. Otherwise an empty `string` gets returned. In case the current file gets deleted, an invalid `file` object gets passed or the passed owner value is not a `string`, this method will return `null`. If the passed owner value is empty, the owner value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, interrupting further script execution.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','ownerResult = set_owner(lsBinary, "root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing owner: " + ownerResult)',"else",' print("File owner changed successfully.")',"end if"]},group:{description:"Returns a `string` with the name of the group to which this file belongs. Group permissions get applied to whoever is the owner of a file. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("File is related to following group: " + group(lsBinary))']},set_group:{description:"Change the group related to this file. Optionally the group can get applied recursively. The group name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure, a `string` with details. On success, an empty `string` gets returned. In case the current file gets deleted, an invalid `file` object gets passed or the passed group is not a `string`, this method will return `null`. If the passed group value is empty, the group value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, preventing further script execution.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','ownerResult = set_group(lsBinary, "root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing group: " + ownerResult)',"else",' print("File group changed successfully.")',"end if"]},size:{description:"Returns a `string` with the size of the file in bytes. There is no correlation between file size and actual file content. Instead, the file size is depending on the name of the file. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")',"size = size(lsBinary)","if size.to_int > 1000 then",' print("File size is bigger than 1000 bytes.")',"else",' print("File size is below 1000 bytes.")',"end if"]},load:{description:"Returns a `metaLib` object for the provided path to the library binary. Keep in mind that this can only be used on library files. On failure, this method will return `null`. If the provided path is empty, this method will throw a runtime exception, preventing further script execution.",example:['metax = include_lib("/lib/metaxploit.so")','libFolder = File(host_computer(get_shell), "/lib")',"for file in get_files(libFolder)"," metaLib = load(metax, file.path)",' print("Library: " + lib_name(metaLib) + " - " + version(metaLib))',"end for"]},net_use:{description:"Returns a `netSession` object for the provided IP address and port. Note that if the port is set to zero, it will return a `netSession` related to the kernel router. The main purpose of this method is to gain a `netSession` and then use `dump_lib` to receive a `metaLib` object to exploit vulnerabilities. In case of failure, this method will return `null`. If this method is used within an SSH encryption process or with disabled internet, or if an invalid target IP is provided, this method will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))',"for port in ports",' netSession = net_use(metax, "1.1.1.1", port_number(port))'," metaLib = dump_lib(netSession)",' print("Library: " + lib_name(metaLib) + " - " + version(metaLib) + " on port " + port_number(port))',"end for"]},rshell_client:{description:"Launches a process on the victim's `computer`, silently attempting to continuously connect in the background to the specified address and port. For the reverse shell to run successfully, the `rshell` service must be installed, and the port forward must be configured correctly on the machine where the server is waiting for the victim's connection. If the launch was successful, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned.",example:['metax = include_lib("/lib/metaxploit.so")','rshell_client(metax, "1.1.1.1", 1222, "bgprocess")']},rshell_server:{description:"This method returns a `list` of `shell` objects that have been reverse shell connected to this computer. To manage the connections received, the `rshell` service must be installed on the machine that receives the victims' connections. In case of failure a `string` will be returned with details. If the provided object is anything other than `metaxploit` this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")',"shells = rshell_server(metax)","firstShell = shells[0]",'chmod(File(host_computer(firstShell), "/"), "o-wrx", true)']},scan:{description:'Returns a `list` where each item is a `string` representing a memory area which has vulnerabilities related to the provided library. These memory areas can be used to make further scans via `scan_address`. In case of failure, this method returns `null` instead. An example of a memory area would be "0x7BFC1EAA". Using this method within a SSH encryption process will throw a runtime exception.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")',"scanResult = scan(metax, metaLib)","for area in scanResult",' print("Memory area containg vulnerability: " + area)',"end for"]},scan_address:{description:"Returns a `string` containing information about each vulnerability in the provided library and memory area. In case the scanning fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")',"scanResult = scan(metax, metaLib)","scanAddress = scan_address(metax, metaLib, scanResult[0])",'segments = split(scanAddress, "Unsafe check: ")[1:]',"exploits = []","for segment in segments",' labelStart = indexOf(segment, "<b>")',' labelEnd = indexOf(segment, "</b>")'," push(exploits, segment[labelStart + 3: labelEnd])","end for",'print("Available vulnerabilities: " + join(exploits, ", "))']},sniffer:{description:"The terminal listens to the network packets of any connection that passes through the computer. When any connection information gets captured, it will print a `string` with the obtained data. In case saving of encryption source is enabled it will download the source code of the script responsible for encryption. In case the operation fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")',"result = sniffer(metax)","print(result)"]},overflow:{description:"Exploits vulnerabilities. The returned value can be of various data types. Therefore, using `typeof` is advisable. `optArgs` are required when changing a password or obtaining a `computer` via a router. It should be the desired password or LAN IP, respectively. Change password and firewall disable exploits will return a `number`, where the value is either one or zero. One indicates success while zero indicates failure. Shell, computer, and file exploits either return an instance of their type or `null`. Providing values that deviate from the defined signature will cause a runtime exception to be thrown.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")',"scanResult = scan(metax, metaLib)","target = scanResult[0]","scanAddress = scan_address(metax, metaLib, target)",'segments = split(scanAddress, "Unsafe check: ")',"exploit = null"," for segment in segments",' hasRequirement = indexOf(segment, "*") != null'," if (not hasRequirement) then",' labelStart = indexOf(segment, "<b>")',' labelEnd = indexOf(segment, "</b>")'," exploit = segment[labelStart + 3: labelEnd]"," end if","end for","if (exploit) then",' print("Exploiting... " + target + ":" + exploit)'," print(overflow(metaLib, target, exploit))","else",' print("No exploit found with zero requirements")',"end if"]},version:{description:'Returns a `string` containing the version number of the library. An example of a version number would be `"1.0.0"`. In case an invalid `metaLib` object gets passed this method will return `null`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','print("Init.so version: " + version(metaLib))']},lib_name:{description:'Returns a `string` containing the name of the library. An example of a name would be `"init.so"`. In case an invalid `metaLib` object gets passed this method will return `null`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','print("Name for library is: " + lib_name(metaLib))']},dump_lib:{description:"Returns the `metaLib` associated with the remote service. For example if the `metaxpoit` method `net_use` was used on a ssh port it will return the `metaLib` related to the ssh service. In case the port was zero is will return a `metaLib` related to the kernel router. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))',"metaLib = dump_lib(netSession)",'print("Library: " + lib_name(metaLib) + " - " + version(metaLib) + " on port " + port_number(ports[0]))']},get_num_conn_gateway:{description:"Returns the number of devices using this router as a gateway. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("Gateway clients: " + get_num_conn_gateway(netSession))']},get_num_portforward:{description:"Returns the number of ports forwarded by this router. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("Port forwards: " + get_num_portforward(netSession))']},get_num_users:{description:"Returns the number of user accounts on the system. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("User accounts: " + get_num_users(netSession))']},is_any_active_user:{description:"Returns a `number`. If there is an active user on the system it will be one. Otherwise, it will be zero. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("User Active?: " + is_any_active_user(netSession))']},is_root_active_user:{description:"Returns a `number`. If there is an active root on the system it will be one. Otherwise, it will be zero. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("Root Active?: " + is_root_active_user(netSession))']},device_ports:{description:"Returns a `list` where each item is an open `port` related to the device of the provided LAN IP address. The device needs to be within the network of the `router`. In case of failure, this method will return `null` or a `string` with details. In case an empty ip is provided this method will throw a runtime exception.",example:["router = get_router","devices = devices_lan_ip(router)","for ip in devices"," ports = device_ports(router, ip)"," openPorts = []"," for port in ports"," if is_closed(port) then continue"," push(openPorts, port)"," end for",""," if (len(openPorts) == 0) then",' print(ip + " has no open ports")'," else",' print(ip + " contains following open ports:")'," for port in openPorts",' print("|-" + port.port_number)'," end for"," end if","end for"]},devices_lan_ip:{description:"Returns a `list` where each item is a `string` representing a LAN IP address. All devices are within the network of the router and can be reached by using the `ping` method. Some of the devices might be behind a firewall. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","devices = devices_lan_ip(router)","for ip in devices",' print(ip + " found!")',"end for"]},bssid_name:{description:"Returns a `string` with the BSSID value of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","bssid = bssid_name(router)",'print("BSSID: " + bssid)']},essid_name:{description:"Returns a `string` with the ESSID value of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","essid = essid_name(router)",'print("ESSID: " + essid)']},firewall_rules:{description:"Returns a `list` where each item is a `string` containing a firewall rule. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","rules = firewall_rules(router)",'print("Firewall rules: " + join(rules, ", "))']},kernel_version:{description:"Returns a `string` with the version of the `kernel_router.so` library. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","version = kernel_version(router)",'print("Kernel router version: " + version)']},local_ip:{description:"Returns a `string` with the local IP address of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","localIp = local_ip(router)",'print("Local IP: " + localIp)']},public_ip:{description:"Returns a `string` with the public IP address of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","publicIp = public_ip(router)",'print("Public IP: " + publicIp)']},used_ports:{description:"Returns a `list` where each item is a `port` used inside the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' print("Port " + port_number(port) + " is available!")',"end for"]},ping_port:{description:"Returns a `port` that is behind the port `number` provided. In case the `port` does not exist `null` gets returned.",example:["router = get_router","ports = used_ports(router)","for port in ports"," pingedPort = ping_port(router, port.port_number)"," if (pingedPort == null) then continue",' print("Pinged " + port_number(pingedPort))',"end for"]},port_info:{description:'Returns a `string` with information about the provided port, including details about the running service and its version. For example, the output could be `"http 1.0.0"`. If the operation fails, `null` will be returned.',example:["router = get_router","ports = used_ports(router)","for port in ports"," info = port_info(router, port)"," print(info)","end for"]},install_service:{description:"Installs the necessary files for the correct functioning of the service and starts it. If the installation is completed successfully, it returns a `number` with the value one. In case of an error, it returns a `string` with details. If the passed object is not a `service` this method will cause a crash.",example:['service = include_lib("/lib/libhttp.so")',"result = install_service(service)","if result == 1 then",' print "Successfully installed service"',"else",' print "Service installation failed: " + result',"end if"]},start_service:{description:"Starts the service and opens its associated `port` on the local machine. The service requires a port forwarded to the router to be accessible from the outside. If the service starts correctly, it returns a `number` with the value one. In case of an error, it returns a `string` with details. If the passed object is not a `service` this method will cause a crash.",example:['service = include_lib("/lib/libhttp.so")',"result = start_service(service)","if result == 1 then",' print "Successfully started service"',"else",' print "Starting service failed: " + result',"end if"]},stop_service:{description:"Stops the service and closes its associated `port` on the local machine. If the service is stopped successfully, it returns a `number` with the value one. If an error occurs during the process, it returns a `string` with details. In some cases, the returned `number` might be zero, indicating that the service removal failed. If the passed object is not a `service` this method will cause a crash.",example:['service = include_lib("/lib/libhttp.so")',"result = stop_service(service)","if result == 1 then",' print "Successfully stopped service"',"else",' print "Stopping service failed: " + result',"end if"]},host_computer:{description:"Returns a `computer` related to the `shell`. If an invalid `shell` object gets passed this method will return `null`.",example:["shell = get_shell","computer = host_computer(shell)",'print("Computer public IP is: " + public_ip(computer))']},start_terminal:{description:"Launches an active terminal. The terminal's color will change, displaying the IP of the connected shell. Script execution will be stopped upon starting a new terminal, unless this is called from another script that was executed via `shell.launch`. In that case, you will enter the shell after closing your root-level script within that terminal window. Using this method within an SSH encryption process will cause an error to be thrown, preventing further script execution.",example:["start_terminal(get_shell)"]},build:{description:"Compiles a plain code file provided in the arguments to a binary. On success, the new binary will be available under the provided build folder. The binary name will be the same as the source file just without the file extension. Optionally, an allowImport flag can be set which enables the use of `import_code` on the binary. All provided paths must be absolute. Returns an empty string on success. On failure, it will return a string containing details about the reason for failure. In case any provided values deviate from the defined signature a runtime exception will be thrown.",example:["shell = get_shell","computer = host_computer(shell)",'touch(computer, home_dir, "test.src")','set_content(File(computer, home_dir + "/test.src"), "print(""hello world"")")','buildResult = build(shell, home_dir + "/test.src", home_dir + "/Desktop")','if buildResult != "" then',' print("There was an error while compiling: " + buildResult)',"else",' print("File has been compiled.")',"end if"]},connect_service:{description:"Returns a `shell` if the connection attempt to the provided IP was successful. This method can only connect to ports running an SSH or FTP service. SSH services usually run on port 22 and FTP services usually on port 21. Keep in mind to pass the right service value depending on which service is going to be used. By default, it will use SSH as the service. Please note that connecting will leave a log entry. In case of failure, a string is returned containing details. If any provided arguments deviate from the method signature, if this method is run in an SSH encryption process, or if the computer is not connected to the internet, a runtime exception will be thrown.",example:["shell = get_shell",'connectionResult = connect_service(shell, "1.1.1.1", 22, "test", "test")','if typeof(connectionResult) != "shell" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected!")',"end if"]},ping:{description:"Returns a `number`. If the remote address could be reached the value will be one, zero otherwise. Firewalls do not block ping requests. Passing an invalid ip will cause the method to return a `string` with an error message. If any provided arguments deviate from the method signature a runtime exception will be thrown. If the passed object is a map-like object such as `computer` or `file` but not `shell` this method will return `null`.",example:["shell = get_shell",'isPingable = ping(shell, "1.1.1.1")',"if isPingable then",' print("Ping was successful!")',"else",' print("Ping failed!")',"end if"]},scp:{description:"Send a `file` to the `computer` related to the provided `shell`. You require permission to read the `file` on the `computer` from which you are uploading and write permissions in the folder of the `computer` you are trying to upload to. In case of failure, this method will return a `string` with the cause. Otherwise, a `number` with the value one gets returned. If any of the passed arguments deviates from the types of the method signature, `null` will be returned. In case the `string` for sourceFile or destinationFolder is empty, an error will be thrown, preventing further script execution.",example:["shell = get_shell",'remoteShell = connect_service(shell, "1.1.1.1", 22, "test", "test")','result = scp(remoteShell, "/bin/ls", "/etc/", shell)','if typeof(result) == "string" then',' print("There was an error while sending file: " + result)',"else",' print("File got sent successfully.")',"end if"]},get_balance_subwallet:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. In case an object gets passed which is not a `subWallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Balance: " + get_balance_subwallet(subWallet)']},set_info:{description:"Stores optional information in the Subwallet for any use. Upon success, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','subWallet = coin.get_subwallet("test")','result = subWallet.set_info("test")',"if result == 1 then",' print "Subwallet info got set!"',"end if"]},get_info:{description:"Returns a `string` with the information stored by the coin creator. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet info: " + subWallet.get_info']},delete_subwallet:{description:"Deletes the account registered in the cryptocurrency. Returns a `number` where one indicates successful deletion and zero indicates failure. In case of certain failures, this method may return a `string` with details. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"result = subWallet.delete","if result == 1 then",' print "Subwallet got deleted!"',"end if"]},get_user:{description:"Returns a `string` with the username associated with this subwallet. On failure, this method returns a `string` with an error message. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet user: " + subWallet.get_user']},last_transaction:{description:"Returns a `list` with the information of the last transaction. Index 0 is a `string` with the other subWallet. Index 1 is an integer with the amount. Index 2 is a `number` indicating the direction of the transaction (0 for Deposit, 1 for Withdrawal). Index 3 is a `string` indicating the date of the transaction. On failure, this method will either return a `number` with the value zero or a `string` with an error message. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"transactionItem = subWallet.last_transaction","destinationAccount = transactionItem[0]","amount = transactionItem[1]","direction = transactionItem[2]","completeDate = transactionItem[3]","if direction == 0 then",' print "Received " + amount + " from " + destinationAccount + " got completed at the " + completeDate',"else",' print "Send " + amount + " to " + destinationAccount + " got completed at the " + completeDate',"end if "]},mining:{description:"Starts the process of mining the cryptocurrency. The process leaves the terminal busy until a coin is mined. On success, this method will return a `number` with the value one. On failure, this method will return a `string` with details. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"while subWallet.mining == 1",' print "Mining...", true',' print "Balance " + subWallet.get_balance',"end while"]},check_password:{description:"Returns a `number` with the value one if the credentials are correct, otherwise, the value is zero. For some cases, this method will return a `string` with an error message. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','password = user_input("SubWallet password:", true)',"if subWallet.check_password(password) == 1 then",' print "Password is correct!"',"end if"]},wallet_username:{description:"Returns a `string` with the name of the `wallet` to which this subwallet belongs. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "SubWallet username: " + subWallet.wallet_username']},list_coins:{description:"Returns a `list` where each item is a `string` with the names of the coins available in the `wallet`. On failure this method returns a `string` with an error message. If the passed value is not a `wallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "My wallet is connected to: " + join(list_coins(wallet), ", ")']},get_balance:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")',"for coinName in list_coins(wallet)",' print "You have " + get_balance(wallet, coinName) + " coins of the currency """ + coinName + """"',"end for"]},buy_coin:{description:"Publishes a purchase offer indicating the number of coins you wish to buy and the price ($) per unit you are willing to pay. The purchase will be finalized if there is any sale offer with a price less than or equal to the one proposed in the purchase. If there is no eligible offer to sell at that time, the offer to buy will remain publicly visible until a new offer to sell satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = buy_coin(wallet, "test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created purchase offer!"',"else",' print "Failed: " + result',"end if"]},sell_coin:{description:"Publishes a sale offer indicating the amount of coins you want to sell and the price ($) per unit you want to assign. The sale will be finalized if there is any purchase offer with a price greater than or equal to that proposed in the sale. If there is no existing offer to buy that matches the requirements at that time, the offer to sell will remain publicly visible until a new offer to buy satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = sell_coin(wallet, "test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created sell offer!"',"else",' print "Failed: " + result',"end if"]},get_pending_trade:{description:"Returns a `list` with the pending sale or purchase offer of this wallet for a certain currency. Index 0 of the `list` represents the type of offer with a `string` (Buy/Sell), index 1 represents the quantity to be sold or bought, and index 2 represents the price per unit. On failure, this method will return a `string` with details. Any deviation from the method signature will result in a `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = get_pending_trade(wallet, "test")','isBuying = result[0] == "Buy"',"quantity = result[1]","unitPrice = result[2]",'currentBalance = get_balance(wallet, "test")',"if isBuying then",' print "After buying was successful your balance will be " + (quantity * unitPrice + currentBalance)',"else",' print "After selling was successful your balance will be " + (currentBalance - quantity * unitPrice)',"end if"]},cancel_pending_trade:{description:"Cancel any pending offer of a certain coin. On success, an empty `string` will be returned. On failure, a `string` with an error message will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','if cancel_pending_trade(wallet, "test") == "" then',' print "Trade got canceled!"',"end if"]},get_global_offers:{description:"Returns a `map` with all the offers made by any player of a given currency. The key of the `map` represents the WalletID of the player who has made the offer, and the value of the `map` is a `list` where index 0 represents the type of offer with a `string` (Buy/Sell), index 1 represents the amount to sell or buy, and index 2 represents the price per unit. In case of failure, this method returns a `string` with details. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','for item in get_global_offers(wallet, "test")'," walletId = item.key"," trade = item.value",' isBuying = trade[0] == "Buy"'," quantity = trade[1]"," unitPrice = trade[2]",' print "-" * 10',' print "<b>" + walletId + "</b>"'," if isBuying then",' print "<color=green>Is buying</color>"'," else",' print "<color=yellow>Is selling</color>"'," end if",' print quantity + " coins with a unit price of " + unitPrice',"end for"]},list_global_coins:{description:"Returns a `list` where each item is a `string` containing the names of all the currencies that exist. In case of failure, this method returns a `string` with details. If the passed value is not a `wallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "All existing coins: " join(list_global_coins(wallet), ", ")']},show_nodes:{description:"Returns a `number` representing the count of devices mining a specific coin for the same `wallet`. In case of an error, a `string` with details is returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "Active miners: " show_nodes(wallet, "test")']},reset_password:{description:"Change the password of the wallet. Only the account owner can perform this action. If the process is completed successfully, a `number` with the value one will be returned. In case of an error, a `string` with details will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','if reset_password(wallet, "test") == 1 then',' print "You got a new password!"',"end if"]},get_pin:{description:"Returns a `string` with a PIN that refreshes every few minutes. This PIN is used to obtain an account in cryptocurrency services. If the passed value is not a `wallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")',"myShell = get_shell","myComputer = host_computer(myShell)",'wallet = login_wallet(blockchain, "test", "test")','touch(myComputer, "/root", "pin_launch.src")','myFile = File(myComputer, "/root/pin_launch.src")','set_content(myFile, "',' blockchain = include_lib(""/lib/blockchain.so"")'," myShell = get_shell"," myComputer = host_computer(myShell)",' wallet = login_wallet(blockchain, ""test"", ""test"")'," if params[0] == get_pin(wallet) then",' get_custom_object.secret = ""The answer is 42""'," else",' get_custom_object.secret = ""The answer is 10053""'," end if",'")','build(myShell, "/root/pin_launch.src", "/root")',"delete(myFile)",'launch(myShell, "/root/pin_launch", get_pin(wallet))','print "The secret: " + get_custom_object.secret']},delete_mail:{description:"Delete the email corresponding to the provided email ID. Returns a `number` with the value one if the email removal was successful. Otherwise, a `string` with an error message will be returned. If any of the provided values deviate from the method signature, it will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = fetch(metaMail)","results = []","for mail in mails"," segments = split(mail, char(10))"," mailId = segments[2][8:]"," print(delete_mail(metaMail, mailId))","end for",'print("Deleted every mail!")']},fetch:{description:"Returns a `list` where each item is a `string` containing mail id, from, subject and a small preview of the content consisting of the first 125 characters. In case of failure a `string` with details will be returned. If an invalid `metaMail` object gets passed this method will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = fetch(metaMail)","results = []","for mail in mails"," segments = split(mail, char(10))"," item = {}"," item.mailId = segments[2][8:]"," item.from = segments[3][6:]"," item.subject = segments[4][9:]"," item.preview = segments[5:]"," push(results, item)","end for","print(results)"]},read:{description:'Returns a `string` containing the content of a mail related to the provided mail id. The mail id argument can be obtained with `fetch`. In case the mail cannot be found this method will return "Mail not found". If any of the provided values deviate from the method signature, it will return `null`.',example:['metaMail = mail_login(user_mail_address, "test")',"mails = fetch(metaMail)","results = []","for mail in mails"," segments = split(mail, char(10))"," mailId = segments[2][8:]"," print(read(metaMail, mailId))","end for"]},send:{description:"Send a new mail to the provided email address. Keep in mind that the subject can not exceed 128 characters and the message size should not exceed 2500 characters. Returns a `number` with the value one if the mail has been sent correctly, otherwise returns a `string` with an error. If any of the provided values deviate from the method signature, it will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")','result = send(metaMail, user_mail_address, "test subject", "test message")','if typeof(result) == "string" then',' print("There was an error while sending mail: " + result)',"else",' print("Mail got send successfully.")',"end if"]},port_number:{description:"Returns the `number` which is used for the port. In case the passed object is not a `port` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' print("Port " + port_number(port) + " is in use!")',"end for"]},is_closed:{description:"Returns a `number`, where one indicates that the specified `port` is open and zero indicates that the port is closed. In case the passed object is not a `port` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' state = "open"',' if (is_closed(port)) then state = "closed"',' print("Port " + port_number(port) + " is " + state + "!")',"end for"]},get_lan_ip:{description:"Returns a `string` containing the local IP address of the computer to which the port is pointing. In case the passed object is not a `port` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' print("Port " + port_number(port) + " is pointed to " + get_lan_ip(port) + "!")',"end for"]},reset_ctf_password:{description:"Resets the password of your CTF account. Returns a `number` with the value one if resetting was successful; otherwise, it will return a `string` containing the reason for failure.",example:['reset_ctf_password("mysafepassword")']},reverse:{description:"Reverses the order of all values in the `list`. This operation will mutate the `list`.",example:["myList = [42, 1, 3]","reverse(myList)",'print("Reversed list: " + myList.split(", "))']},trim:{description:"Returns a new `string` stripped of any spacing at the beginning and ending. If any value gets passed that is not a `string` this method will return `null`.",example:['myString = " 42 "',"print(trim(myString))"]},lastIndexOf:{description:"Returns a `number` indicating the last matching index of the provided value inside the `string`. If the value does not exist inside the `string`, `-1` is returned. If any of the provided values deviates from the defined types in the method signature, this method will return `null`.",example:['myString = "42 as an answer is wrong"','index = lastIndexOf(myString, "wrong")',"if index != -1 then",' print("Invalid information spotted at: " + index)',"else",' print("Information seems valid.")',"end if"]},funcRef:{description:"Returns a `map` which enables to extend function references with custom methods.",example:["funcRef.signature = function"," return str(@self)","end function","print (@print).signature"]},list:{description:"Returns a `map` which enables to extend list types with custom methods.",example:["list.map = function(callback)"," newList = []"," for item in self"," newList.push(callback(item, __item_idx))"," end for"," return newList","end function","myMapFunction = function(item, index)",' print "Mapping value at index: " + index'," return item.myValue","end function",'print [{ "myValue": 24 }].map(@myMapFunction)']},number:{description:"Returns a `map` which enables to extend number types with custom methods.",example:["number.bitwise = function(operator, right)"," return bitwise(operator, self, right)","end function",'print (1234).bitwise(">>", 1)']},string:{description:"Returns a `map` which enables to extend string types with custom methods.",example:['string.color = function(colorValue = "red")',' return "<color=" + colorValue + ">" + self + "</color>"',"end function",'print "My text: ".color + "Hello world".color("yellow")']},map:{description:"Returns a `map` which enables to extend map types with custom methods.",example:["map.extend = function(value)"," for item in value"," self[item.key] = item.value"," end for"," return self","end function",'test = {"123":123}','test.extend({"bar": "foo"})','print "My extended value: " + test.bar']}}});var Jk=T((L5,BO)=>{BO.exports={$meta:{description:"Create a `list` with square brackets. Then iterate over the `list` with for, or pull out individual items with a 0-based index in square brackets. A negative index counts from the end. Get a slice (subset) of a `list` with two indices, separated by a colon.",example:["x = [2, 4, 6, 8]","print(x[0]) // get first item from list","print(x[-1]) // get last item from list","print(x[1:3]) // slice items from index 1 to 3","x[2] = 5 // set item at index 2 to 5","print(x)","print(x + [42]) // concatenate two lists"]},remove:{description:"Removes an item from the `list` with the provided index. Due to the removal the `list` will get mutated. If the passed index is `null` this method will throw an error preventing further script execution.",example:["myList = [1, 42, 3]","myList.remove(1)",'print("This list does not contain the answer to everything: " + myList.split(", "))']},insert:{description:"Inserts a value into the `list` at the index provided. Due to the insertion the `list` will get mutated. Returns the mutated `list`. If the passed index is not a `number`, this method throws an error, preventing further script execution.",example:["myList = [1, 3]","myList.insert(1, 42)",'print("This list does contain the answer to everything: " + myList.split(", "))']},push:{description:"Appends a value to the end of the `list`. This operation will mutate the `list`. Additionally, this method will return the updated `list`. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution.",example:["myList = [1, 3]","myList.push(42)",'print("This list does contain the answer to everything: " + myList.split(", "))']},pop:{description:"Returns and removes the last item in the `list`. This operation will mutate the `list`. If the `map` is empty, this method will return `null`.",example:["myList = [1, 3, 42]","answer = myList.pop",'print("Answer to everything: " + answer)']},pull:{description:"Returns and removes the first item in the `list`. This operation will mutate the `list`. If the `map` is empty, this method will return `null`.",example:["myList = [42, 1, 3]","answer = myList.pull",'print("Answer to everything: " + answer)']},shuffle:{description:"Shuffles all values in the `list`. This operation will mutate the `list`.",example:["myList = [42, 1, 3]","myList.shuffle",'print("New list order: " + myList.split(", "))']},reverse:{description:"Reverses the order of all values in the `list`. This operation will mutate the `list`.",example:["myList = [42, 1, 3]","myList.reverse",'print("Reversed list: " + myList.split(", "))']},sum:{description:"Returns sum of all values inside the `list`. Any non-numeric values will be considered a zero.",example:["myList = [42, 1, 3]","sum = myList.sum",'print("Sum of all items in list: " + sum)']},hasIndex:{description:"Returns a `number`. If the provided index is available in the `list`, the value will be one. Otherwise, the value will be zero.",example:["myList = [42, 1, 3]","containsIndex = myList.hasIndex(1)","if containsIndex then",' print("List contains index of 1.")',"else",' print("List does not contain index of 1.")',"end if"]},indexOf:{description:"Returns a `number` which indicates the first matching index of the provided value inside the `list`. Optionally a start index can be provided. In case the value does not exist inside the `list` a `null` gets returned.",example:["myList = [42, 1, 3]","index = myList.indexOf(42)","if index != null then",' print("The answer for everything is at the following index: " + index)',"else",' print("No answer for everything found.")',"end if"]},sort:{description:"Sorts the values of a `list` alphanumerically. This operation mutates the original `list`. Optionally, a key can be provided, which is used if the items are `map`s or `list`s. Finally, this method returns the updated `list`.",example:['myList = [{ "key": 42 }, { "key": 2 }, { "key": 1 }]','myList.sort("key")',"print(myList)"]},join:{description:"Returns a concatenated `string` containing all stringified values inside the `list`. These values will be separated via the provided separator. In case the `list` exceeds `16777215L` items or the delimiter exceeds 128 characters, this method will throw an error, interrupting further script execution.",example:["myList = [42, 1, 3]",`print(myList.join(" .-*'*-. "))`]},indexes:{description:"Returns a `list` containing all available indexes.",example:["myList = [42, 1, 3]","for i in myList.indexes"," print(myList[i])","end for"]},len:{description:"Returns a `number` representing the count of values inside the `list`.",example:["myList = [42, 1, 3]",'print("myList contains " + myList.len + " items")']},values:{description:"Returns a `list` containing all available values. Note that this will not create a copy of the original `list`. The returned instance will the same as original `list`, so any mutations made to the returned `list` will also affect the original one.",example:["myList = [42, 1, 3]","for v in myList.values"," print(v)","end for"]},replace:{description:"Returns updated `list` where each value matching with the provided replace argument gets replaced. This operation will mutate the `list`.",example:["myList = [1, 2, 2, 7]","myList.replace(2, 3)",'print(myList.join(""))']}}});var Xk=T((M5,UO)=>{UO.exports={$meta:{description:"A `map` is a set of values associated with unique keys. Create a `map` with curly braces; get or set a single value with square brackets. Keys and values may be any type.",example:['x = { "test": 123 }',"x.foo = 42 // set property foo to 42","print(x.foo) // get value of property foo",'print(x + { "bar": 2 }) // concatenate two maps']},remove:{description:"Removes an item from the `map` with the provided key. Due to the removal, the `map` will get mutated. If the value is removed successfully, this method will return a `number` with the value one. If the removal fails, the value will be zero. Passing any map-like object, such as a file or computer, will cause an error to be thrown, stopping further script execution.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','myMap.remove("answer")',"print(myMap)"]},push:{description:"Adds the value 1 to the provided key. This operation will mutate the `map`. The updated `map` will be returned. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution. If the passed key is `null` an error will be thrown as well.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','myMap.push("answer")',"print(myMap.answer)"]},pull:{description:"Returns and removes the first item in the `map`. This operation will mutate the `map`. Passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the `map` is empty, this method will return `null`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"print(myMap.pull)"]},pop:{description:"Returns and removes the first item in the `map`. This operation will mutate the `map`. Passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the `map` is empty, this method will return `null`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"print(myMap.pop)"]},shuffle:{description:"Shuffles all values in the `map`. This operation will mutate the `map`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"myMap.shuffle","print(myMap)"]},sum:{description:"Returns sum of all values inside the `map`. Any non-numeric values will be considered a zero.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"sum = myMap.sum",'print("Sum of all items in map: " + sum)']},hasIndex:{description:"Returns a `number`. If the provided key is available in the `map`, the value will be one. Otherwise, the value will be zero.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','containsIndex = myList.hasIndex("answer")',"if containsIndex then",' print("Map contains the answer.")',"else",' print("Map does not contain the answer.")',"end if"]},indexOf:{description:"Returns a value which can be of any type since `map` keys can be of any type. In case the value does not exist inside the `map`, `null` is returned.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"key = myList.indexOf(42)","if key != null then",' print("Map contains the answer.")',"else",' print("Map does not contain the answer.")',"end if"]},indexes:{description:"Returns a `list` containing all available keys. Keys can be of any type.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"for key in myMap.indexes"," print(myMap[key])","end for"]},len:{description:"Returns a `number` representing the count of items inside the `map`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','print("myMap contains " + myMap.len + " items")']},values:{description:"Returns a `list` containing all available values within `map`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"for value in myMap.values"," print(value)","end for"]},replace:{description:"Returns updated `map` where each value matching with the provided replace argument gets replaced. This operation will mutate the `map`. In case this method gets used on a map-like object such as `file` this method will throw a runtime error.",example:['myObject = { "answer": 45 }',"myObject.replace(45, 42)","print(myObject.answer)"]}}});var Zk=T((q5,WO)=>{WO.exports={$meta:{description:'A `metaLib` object can be obtained by either using [load](#METAXPLOIT_LOAD) or [dump_lib](#NETSESSION_DUMP_LIB). The `classID` used for this object is `"MetaLib"`.'},overflow:{description:"Exploits vulnerabilities. The returned value can be of various data types. Therefore, using `typeof` is advisable. `optArgs` are required when changing a password or obtaining a `computer` via a router. It should be the desired password or LAN IP, respectively. Change password and firewall disable exploits will return a `number`, where the value is either one or zero. One indicates success while zero indicates failure. Shell, computer, and file exploits either return an instance of their type or `null`. Providing values that deviate from the defined signature will cause a runtime exception to be thrown.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")',"scanResult = metax.scan(metaLib)","target = scanResult[0]","scanAddress = metax.scan_address(metaLib, target)",'segments = scanAddress.split("Unsafe check: ")',"exploit = null"," for segment in segments",' hasRequirement = segment.indexOf("*") != null'," if (not hasRequirement) then",' labelStart = segment.indexOf("<b>")',' labelEnd = segment.indexOf("</b>")'," exploit = segment[labelStart + 3: labelEnd]"," end if","end for","if (exploit) then",' print("Exploiting... " + target + ":" + exploit)'," print(metaLib.overflow(target, exploit))","else",' print("No exploit found with zero requirements")',"end if"]},version:{description:'Returns a `string` containing the version number of the library. An example of a version number would be `"1.0.0"`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','print("Init.so version: " + metaLib.version)']},lib_name:{description:'Returns a `string` containing the name of the library. An example of a name would be `"init.so"`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','print("Name for library is: " + metaLib.lib_name)']}}});var e0=T((F5,VO)=>{VO.exports={$meta:{description:'A `MetaMail` object can be obtained by using [mail_login](#GENERAL_MAIL_LOGIN). The `classID` used for this object is `"MetaMail"`.'},delete:{description:"Delete the email corresponding to the provided email ID. Returns a `number` with the value one if the email removal was successful. Otherwise, a `string` with an error message will be returned. If the provided mailId is anything other than a `string` this method will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = metaMail.fetch","results = []","for mail in mails"," segments = mail.split(char(10))"," mailId = segments[2][8:]"," print(metaMail.delete(mailId))","end for",'print("Deleted every mail!")']},fetch:{description:"Returns a `list` where each item is a `string` containing mail id, from, subject and a small preview of the content consisting of the first 125 characters. If there is any issue a `string` will be returned with details.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = metaMail.fetch","results = []","for mail in mails"," segments = mail.split(char(10))"," item = {}"," item.mailId = segments[2][8:]"," item.from = segments[3][6:]"," item.subject = segments[4][9:]"," item.preview = segments[5:]"," results.push(item)","end for","print(results)"]},read:{description:'Returns a `string` containing the content of a mail related to the provided mail id. The mail id argument can be obtained with `fetch`. In case the mail cannot be found this method will return "Mail not found". If the provided mailId is not a `string`, this method will return `null`.',example:['metaMail = mail_login(user_mail_address, "test")',"mails = metaMail.fetch","results = []","for mail in mails"," segments = mail.split(char(10))"," mailId = segments[2][8:]"," print(metaMail.read(mailId))","end for"]},send:{description:"Send a new mail to the provided email address. Keep in mind that the subject can not exceed 128 characters and the message size should not exceed 2500 characters. Returns a `number` with the value one if the mail has been sent correctly, otherwise returns a `string` with an error. If any of the provided values deviate from the method signature, it will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")','result = metaMail.send(user_mail_address, "test subject", "test message")','if typeof(result) == "string" then',' print("There was an error while sending mail: " + result)',"else",' print("Mail got send successfully.")',"end if"]}}});var t0=T((N5,HO)=>{HO.exports={$meta:{description:'A `metaxploit` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"MetaxploitLib"`.'},load:{description:"Returns a `metaLib` object for the provided path to the library binary. Keep in mind that this can only be used on library files. On failure, this method will return `null`. If the provided path is empty, this method will throw a runtime exception, preventing further script execution.",example:['metax = include_lib("/lib/metaxploit.so")','libFolder = get_shell.host_computer.File("/lib")',"for file in libFolder.get_files"," metaLib = metax.load(file.path)",' print("Library: " + metaLib.lib_name + " - " + metaLib.version)',"end for"]},net_use:{description:"Returns a `netSession` object for the provided IP address and port. Note that if the port is set to zero, it will return a `netSession` related to the kernel router. The main purpose of this method is to gain a `netSession` and then use `dump_lib` to receive a `metaLib` object to exploit vulnerabilities. In case of failure, this method will return `null`. If this method is used within an SSH encryption process or with disabled internet, or if an invalid target IP is provided, this method will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports',"for port in ports",' netSession = metax.net_use("1.1.1.1", port.port_number)'," metaLib = netSession.dump_lib",' print("Library: " + metaLib.lib_name + " - " + metaLib.version + " on port " + port.port_number)',"end for"]},rshell_client:{description:"Launches a process on the victim's `computer`, silently attempting to continuously connect in the background to the specified address and port. For the reverse shell to run successfully, the `rshell` service must be installed, and the port forward must be configured correctly on the machine where the server is waiting for the victim's connection. If the launch was successful, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned.",example:['metax = include_lib("/lib/metaxploit.so")','metax.rshell_client("1.1.1.1", 1222, "bgprocess")']},rshell_server:{description:"This method returns a `list` of `shell` objects that have been reverse shell connected to this computer. To manage the connections received, the `rshell` service must be installed on the machine that receives the victims' connections. In case of failure a `string` will be returned with details.",example:['metax = include_lib("/lib/metaxploit.so")',"shells = metax.rshell_server","firstShell = shells[0]",'firstShell.host_computer.File("/").chmod("o-wrx", true)']},scan:{description:'Returns a `list` where each item is a `string` representing a memory area which has vulnerabilities related to the provided library. These memory areas can be used to make further scans via `scan_address`. In case of failure, this method returns `null` instead. An example of a memory area would be "0x7BFC1EAA". Using this method within a SSH encryption process will throw a runtime exception.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")',"scanResult = metax.scan(metaLib)","for area in scanResult",' print("Memory area containg vulnerability: " + area)',"end for"]},scan_address:{description:"Returns a `string` containing information about each vulnerability in the provided library and memory area. In case the scanning fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")',"scanResult = metax.scan(metaLib)","scanAddress = metax.scan_address(metaLib, scanResult[0])",'segments = scanAddress.split("Unsafe check: ")[1:]',"exploits = []","for segment in segments",' labelStart = segment.indexOf("<b>")',' labelEnd = segment.indexOf("</b>")'," exploits.push(segment[labelStart + 3: labelEnd])","end for",'print("Available vulnerabilities: " + exploits.join(", "))']},sniffer:{description:"The terminal listens to the network packets of any connection that passes through the computer. When any connection information gets captured, it will print a `string` with the obtained data. In case saving of encryption source is enabled it will download the source code of the script responsible for encryption. In case the operation fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")',"result = metax.sniffer","print(result)"]}}});var n0=T(($5,zO)=>{zO.exports={$meta:{description:'A `netSession` object can be obtained by using [net_use](#METAXPLOIT_NET_USE). The `classID` used for this object is `"NetSession"`.'},dump_lib:{description:"Returns the `metaLib` associated with the remote service. For example if the `metaxpoit` method `net_use` was used on a ssh port it will return the `metaLib` related to the ssh service. In case the port was zero is will return a `metaLib` related to the kernel router.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)',"metaLib = netSession.dump_lib",'print("Library: " + metaLib.lib_name + " - " + metaLib.version + " on port " + ports[0].port_number)']},get_num_conn_gateway:{description:"Returns the number of devices using this router as a gateway. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("Gateway clients: " + netSession.get_num_conn_gateway)']},get_num_portforward:{description:"Returns the number of ports forwarded by this router. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("Port forwards: " + netSession.get_num_portforward)']},get_num_users:{description:"Returns the number of user accounts on the system.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("User accounts: " + netSession.get_num_users)']},is_any_active_user:{description:"Returns a `number`. If there is an active user on the system it will be one. Otherwise, it will be zero.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("User Active?: " + netSession.is_any_active_user)']},is_root_active_user:{description:"Returns a `number`. If there is an active root on the system it will be one. Otherwise, it will be zero.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("Root Active?: " + netSession.is_root_active_user)']}}});var r0=T((B5,GO)=>{GO.exports={$meta:{description:"All numbers are stored in full-precision format. Numbers also represent `true == 1` and `false == 0`.",example:["a = 20","b = 22","print(a + b) // addition","print(a - b) // substraction","print(a / b) // division","print(a * b) // multiply","print(a % b) // modulo","print(a - b) // substraction","print(a ^ b) // power","print(a and b) // logical and","print(a or b) // logical or","print(not a) // logical not","print(a == b) // comparison equal","print(a != b) // comparison unequal","print(a > b) // comparison greater than","print(a < b) // comparison lower than","print(a >= b) // comparison greater equal than","print(a <= b) // comparison lower equal than"]}}});var i0=T((U5,KO)=>{KO.exports={$meta:{description:'A `port` object can be obtained by using [get_ports](#COMPUTER_GET_PORTS), [ping_port](#ROUTER_PING_PORT), [used_ports](#ROUTER_USED_PORTS) or [device_ports](#ROUTER_DEVICE_PORTS). The `classID` used for this object is `"port"`. Generally there are no restrictions in regards to which service runs on which port but there are some default ports for each service. List of the most common ports: `21` (FTP), `22` (SSH), `25` (SMTP), `80` (HTTP), `141` (SQL), `8080` (HTTP), `1222` (RSHELL), `1542` (Repository), `3306` (SQL), `3307` (SQL), `3308` (SQL), `6667` (Chat), `37777` (CCTV)'},port_number:{description:"Returns the `number` which is used for the port.",example:["router = get_router","ports = router.used_ports","for port in ports",' print("Port " + port.port_number + " is in use!")',"end for"]},is_closed:{description:"Returns a `number`, where one indicates that the specified `port` is open and zero indicates that the port is closed.",example:["router = get_router","ports = router.used_ports","for port in ports",' state = "open"',' if (port.is_closed) then state = "closed"',' print("Port " + port.port_number + " is " + state + "!")',"end for"]},get_lan_ip:{description:"Returns a `string` containing the local IP address of the computer to which the port is pointing.",example:["router = get_router","ports = router.used_ports","for port in ports",' print("Port " + port.port_number + " is pointed to " + port.get_lan_ip + "!")',"end for"]}}});var s0=T((W5,YO)=>{YO.exports={$meta:{description:'A `router` object can be obtained by either using [get_router](#GENERAL_GET_ROUTER) or [get_switch](#GENERAL_GET_SWITCH). The `classID` used for this object is `"router"`.'},device_ports:{description:"Returns a `list` where each item is an open `port` related to the device of the provided LAN IP address. The device needs to be within the network of the `router`. In case of failure, this method will return `null` or a `string` with details. In case an empty ip is provided this method will throw a runtime exception.",example:["router = get_router","devices = router.devices_lan_ip","for ip in devices"," ports = router.device_ports(ip)"," openPorts = []"," for port in ports"," if port.is_closed then continue"," openPorts.push(port)"," end for",""," if (openPorts.len == 0) then",' print(ip + " has no open ports")'," else",' print(ip + " contains following open ports:")'," for port in openPorts",' print("|-" + port.port_number)'," end for"," end if","end for"]},devices_lan_ip:{description:"Returns a `list` where each item is a `string` representing a LAN IP address. All devices are within the network of the router and can be reached by using the `ping` method. Some of the devices might be behind a firewall.",example:["router = get_router","devices = router.devices_lan_ip","for ip in devices",' print(ip + " found!")',"end for"]},bssid_name:{description:"Returns a `string` with the BSSID value of the router.",example:["router = get_router","bssid = router.bssid_name",'print("BSSID: " + bssid)']},essid_name:{description:"Returns a `string` with the ESSID value of the router.",example:["router = get_router","essid = router.essid_name",'print("ESSID: " + essid)']},firewall_rules:{description:"Returns a `list` where each item is a `string` containing a firewall rule.",example:["router = get_router","rules = router.firewall_rules",'print("Firewall rules: " + rules.join(", "))']},kernel_version:{description:"Returns a `string` with the version of the `kernel_router.so` library.",example:["router = get_router","version = router.kernel_version",'print("Kernel router version: " + version)']},local_ip:{description:"Returns a `string` with the local IP address of the router.",example:["router = get_router","localIp = router.local_ip",'print("Local IP: " + localIp)']},public_ip:{description:"Returns a `string` with the public IP address of the router.",example:["router = get_router","publicIp = router.public_ip",'print("Public IP: " + publicIp)']},used_ports:{description:"Returns a `list` where each item is a `port` used inside the router.",example:["router = get_router","ports = router.used_ports","for port in ports",' print("Port " + port.port_number + " is available!")',"end for"]},ping_port:{description:"Returns a `port` that is behind the port `number` provided. In case the `port` does not exist `null` gets returned.",example:["router = get_router","ports = router.used_ports","for port in ports"," pingedPort = router.ping_port(port.port_number)"," if (pingedPort == null) then continue",' print("Pinged " + pingedPort.port_number)',"end for"]},port_info:{description:'Returns a `string` with information about the provided port, including details about the running service and its version. For example, the output could be `"http 1.0.0"`. If the operation fails, `null` will be returned.',example:["router = get_router","ports = router.used_ports","for port in ports"," info = router.port_info(port)"," print(info)","end for"]}}});var o0=T((V5,QO)=>{QO.exports={$meta:{description:'The service object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"service"`. List of all installable services: `"FTP"`, `"SSH"`, `"HTTP"`, `"Repository"`, `"Chat"`'},install_service:{description:"Installs the necessary files for the correct functioning of the service and starts it. If the installation is completed successfully, it returns a `number` with the value one. In case of an error, it returns a `string` with details.",example:['service = include_lib("/lib/libhttp.so")',"result = service.install_service","if result == 1 then",' print "Successfully installed service"',"else",' print "Service installation failed: " + result',"end if"]},start_service:{description:"Starts the service and opens its associated `port` on the local machine. The service requires a port forwarded to the router to be accessible from the outside. If the service starts correctly, it returns a `number` with the value one. In case of an error, it returns a `string` with details.",example:['service = include_lib("/lib/libhttp.so")',"result = service.start_service","if result == 1 then",' print "Successfully started service"',"else",' print "Starting service failed: " + result',"end if"]},stop_service:{description:"Stops the service and closes its associated `port` on the local machine. If the service is stopped successfully, it returns a `number` with the value one. If an error occurs during the process, it returns a `string` with details. In some cases, the returned `number` might be zero, indicating that the service removal failed.",example:['service = include_lib("/lib/libhttp.so")',"result = service.stop_service","if result == 1 then",' print "Successfully stopped service"',"else",' print "Stopping service failed: " + result',"end if"]}}});var a0=T((H5,JO)=>{JO.exports={$meta:{description:'A `shell` object can be acquired by either using [get_shell](#GENERAL_GET_SHELL), [connect_service](#SHELL_CONNECT_SERVICE) or [overflow](#META_LIB_OVERFLOW). The `classID` used for this object is `"shell"`. In case you want to use [connect_service](#SHELL_CONNECT_SERVICE) to connect to a SSH port it will be usually at port `22`.'},host_computer:{description:"Returns a `computer` related to the `shell`.",example:["shell = get_shell","computer = shell.host_computer",'print("Computer public IP is: " + computer.public_ip)']},start_terminal:{description:"Launches an active terminal. The terminal's color will change, displaying the IP of the connected shell. Script execution will be stopped upon starting a new terminal, unless this is called from another script that was executed via `shell.launch`. In that case, you will enter the shell after closing your root-level script within that terminal window. Using this method within an SSH encryption process will cause an error to be thrown, preventing further script execution.",example:["shell = get_shell","shell.start_terminal"]},build:{description:"Compiles a plain code file provided in the arguments to a binary. On success, the new binary will be available under the provided build folder. The binary name will be the same as the source file just without the file extension. Optionally, an allowImport flag can be set which enables the use of `import_code` on the binary. All provided paths must be absolute. Returns an empty string on success. On failure, it will return a string containing details about the reason for failure. In case any provided values deviate from the defined signature a runtime exception will be thrown.",example:["shell = get_shell","computer = shell.host_computer",'computer.touch(home_dir, "test.src")','computer.File(home_dir + "/test.src").set_content("print(""hello world"")")','buildResult = shell.build(home_dir + "/test.src", home_dir + "/Desktop")','if buildResult != "" then',' print("There was an error while compiling: " + buildResult)',"else",' print("File has been compiled.")',"end if"]},connect_service:{description:"Returns a `shell` if the connection attempt to the provided IP was successful. This method can only connect to ports running an SSH or FTP service. SSH services usually run on port 22 and FTP services usually on port 21. Keep in mind to pass the right service value depending on which service is going to be used. By default, it will use SSH as the service. Please note that connecting will leave a log entry. In case of failure, a string is returned containing details. If any provided arguments deviate from the method signature, if this method is run in an SSH encryption process, or if the computer is not connected to the internet, a runtime exception will be thrown.",example:["shell = get_shell",'connectionResult = shell.connect_service("1.1.1.1", 22, "test", "test")','if typeof(connectionResult) != "shell" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected!")',"end if"]},launch:{description:"Launches the binary located at the provided path. Optionally, parameters can be passed. Returns a `number`. If the launch was successful, the value will be one; otherwise, it will be zero. In some cases, a `string` will be returned containing an error message. If you need to share variables between a launched script and the current process, consider using `get_custom_object`. Note that launching a script is not asynchronous, meaning that the current script will pause its execution until the launched script finishes. This method cannot be used to execute binaries with an EXE extension (GUI interface). If any provided values deviate from the method signature, a runtime exception will be thrown.",example:['shell = get_shell("root", "test")','shell.launch("/bin/cat", "/etc/passwd")']},ping:{description:"Returns a `number`. If the remote address could be reached the value will be one, zero otherwise. Firewalls do not block ping requests. Passing an invalid ip will cause the method to return a `string` with an error message. If any provided arguments deviate from the method signature a runtime exception will be thrown.",example:["shell = get_shell",'isPingable = shell.ping("1.1.1.1")',"if isPingable then",' print("Ping was successful!")',"else",' print("Ping failed!")',"end if"]},scp:{description:"Send a `file` to the `computer` related to the provided `shell`. You require permission to read the `file` on the `computer` from which you are uploading and write permissions in the folder of the `computer` you are trying to upload to. In case of failure, this method will return a `string` with the cause. Otherwise, a `number` with the value one gets returned. If any of the passed arguments deviates from the types of the method signature, `null` will be returned. In case the `string` for sourceFile or destinationFolder is empty, an error will be thrown, preventing further script execution",example:["shell = get_shell",'remoteShell = shell.connect_service("1.1.1.1", 22, "test", "test")','result = remoteShell.scp("/bin/ls", "/etc/", shell)','if typeof(result) == "string" then',' print("There was an error while sending file: " + result)',"else",' print("File got sent successfully.")',"end if"]}}});var l0=T((z5,XO)=>{XO.exports={$meta:{description:"Text is stored in strings of Unicode characters. Write strings by surrounding them with quotes. If you need to include a quotation mark in the string, write it twice.",example:['a = "hello"','b = "world"',"print(a + b) // concatinate a and b","print(a * 10) // repeat hello ten times","print(a[0]) // prints h","print(a[1:3]) // prints ell"]},remove:{description:"Returns a new `string` with the provided value removed. Any value other than `null` can be passed, but note that it will be cast to a string. If `null` is passed, this method will throw an error, preventing further script execution.",example:['myString = "42 as an answer is wrong"','newString = myString.remove("wrong")','print(newString + "right")']},hasIndex:{description:"Returns a `number`. If the provided index is available in the `string`, the value will be one. Otherwise, the value will be zero.",example:['myString = "42 as an answer is wrong"',"containsIndex = myString.hasIndex(1)","if containsIndex then",' print("String contains index of 1.")',"else",' print("String does not contain index of 1.")',"end if"]},insert:{description:"Returns a `string` with the newly inserted `string` at the provided index. If the passed index is not a `number`, this method throws an error, preventing further script execution.",example:['myString = "42 as an answer is wrong"','index = myString.lastIndexOf("w") - 1','newString = myString.insert(index, "not ")',"print(newString)"]},indexOf:{description:"Returns a `number` which indicates the first matching index of the provided value inside the `list`. Optionally a start index can be provided. In case the value does not exist inside the `string` a `null` gets returned.",example:['myString = "42 as an answer is wrong"','index = myString.indexOf("wrong")',"if index != null then",' print("Invalid information spotted at: " + index)',"else",' print("Information seems valid.")',"end if"]},lastIndexOf:{description:"Returns a `number` which indicates the last matching index of the provided value inside the `list`. In case the value does not exist inside the `string` a `-1` gets returned. If the provided searchStr is not a `string`, this method will return `null`.",example:['myString = "42 as an answer is wrong"','index = myString.lastIndexOf("wrong")',"if index != -1 then",' print("Invalid information spotted at: " + index)',"else",' print("Information seems valid.")',"end if"]},split:{description:"Returns a `list` where each item is a segment of the `string`, separated by the provided separator `string`. This method uses regular expressions for matching, so remember to escape special characters such as dots. If any of the provided arguments deviate from the method signature types, this method will return `null`. In case the pattern is empty, the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','segments = myString.split(" ")','if segments[0] != "42" then',' print("Invalid information spotted!")',"else",' print("Information seems valid!")',"end if"]},replace:{description:"Returns a `string` with the replaced content by using regular expressions. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','newString = myString.replace("wrong", "right")',"print(newString)"]},trim:{description:"Returns a new `string` stripped of any spacing at the beginning and ending.",example:['myString = " 42 "',"print(myString.trim)"]},indexes:{description:"Returns a `list` where each item is a `number` representing all available indexes in the `string`.",example:['myString = "42"',"print(myString.indexes)"]},code:{description:"Returns a `number` representing the Unicode code of the first character of the `string`.",example:['myString = "HELLO WORLD"',"print(myString.code)"]},len:{description:"Returns a `number` representing the length of the `string`.",example:['myString = "HELLO WORLD"','print("Size of string is: " + myString.len)']},lower:{description:"Returns a new `string` in which all characters are transformed into lowercase.",example:['myString = "HELLO WORLD"',"print(myString.lower)"]},upper:{description:"Returns a new `string` in which all characters are transformed into uppercase.",example:['myString = "hello world"',"print(myString.upper)"]},val:{description:"Returns a `number` which is parsed from the `string`. In case the `string` is not numeric it will return a zero.",example:['myString = "1.25"',"print(myString.val + 40.75)"]},values:{description:"Returns a `list` where each item is a `string` representing all available characters in the `string`. Could be compared to using `split` but without any separator.",example:['myString = "hello world"',"print(myString.values)"]},to_int:{description:"Returns a `number` which is parsed from the `string` as an integer. In case the `string` is not numeric it will return the original `string`.",example:['myString = "1"',"print(myString.to_int + 41)"]},is_match:{description:"Uses regular expression to check if a string matches a certain pattern. If it matches, it will return a `number` with the value one. If it does not match, the value of the `number` will be zero. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','hasWordAtTheEnd = myString.is_match("\\w+$")',"print(hasWordAtTheEnd)"]},matches:{description:"Returns a `map` with all search results for the provided regular expression. Each key contains the index and the value contains the matching `string`. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','result = myString.matches("w")',"print(result)"]}}});var c0=T((G5,ZO)=>{ZO.exports={$meta:{description:'A `subWallet` object can be obtained by either using [get_subwallet](#COIN_GET_SUBWALLET) or [get_subwallets](#COIN_GET_SUBWALLETS). The `classID` used for this object is `"subwallet"`.'},get_balance:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','subWallet = coin.get_subwallet("test")','print "Balance: " + subWallet.get_balance']},set_info:{description:"Stores optional information in the Subwallet for any use. Upon success, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','result = set_info(subWallet, "test")',"if result == 1 then",' print "Subwallet info got set!"',"end if"]},get_info:{description:"Returns a `string` with the information stored by the coin creator.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet info: " + get_info(subWallet)']},delete:{description:"Deletes the account registered in the cryptocurrency. Returns a `number` where one indicates successful deletion and zero indicates failure. In case of certain failures, this method may return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"result = delete_subwallet(subWallet)","if result == 1 then",' print "Subwallet got deleted!"',"end if"]},get_user:{description:"Returns a `string` with the username associated with this subwallet. On failure, this method returns a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet user: " + get_user(subWallet)']},last_transaction:{description:"Returns a `list` with the information of the last transaction. Index 0 is a `string` with the other subWallet. Index 1 is an integer with the amount. Index 2 is a `number` indicating the direction of the transaction (0 for Deposit, 1 for Withdrawal). Index 3 is a `string` indicating the date of the transaction. On failure, this method will either return a `number` with the value zero or a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"transactionItem = last_transaction(subWallet)","destinationAccount = transactionItem[0]","amount = transactionItem[1]","direction = transactionItem[2]","completeDate = transactionItem[3]","if direction == 0 then",' print "Received " + amount + " from " + destinationAccount + " got completed at the " + completeDate',"else",' print "Send " + amount + " to " + destinationAccount + " got completed at the " + completeDate',"end if "]},mining:{description:"Starts the process of mining the cryptocurrency. The process leaves the terminal busy until a coin is mined. On success, this method will return a `number` with the value one. On failure, this method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"while mining(subWallet) == 1",' print "Mining...", true',' print "Balance " + get_balance_subwallet(subWallet)',"end while"]},check_password:{description:"Returns a `number` with the value one if the credentials are correct, otherwise, the value is zero. For some cases, this method will return a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','password = user_input("SubWallet password:", true)',"if check_password(subWallet, password) == 1 then",' print "Password is correct!"',"end if"]},wallet_username:{description:"Returns a `string` with the name of the `wallet` to which this subwallet belongs.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "SubWallet username: " + wallet_username(subWallet)']}}});var u0=T((K5,eD)=>{eD.exports={$meta:{description:'A `wallet` object can be obtained by either using [create_wallet](#BLOCKCHAIN_CREATE_WALLET) or [login_wallet](#BLOCKCHAIN_LOGIN_WALLET). The `classID` used for this object is `"wallet"`.'},list_coins:{description:"Returns a `list` where each item is a `string` with the names of the coins available in the `wallet`. On failure this method returns a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','print "My wallet is connected to: " + wallet.list_coins.join(", ")']},get_balance:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. If the passed coinName is anything other than a `string` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")',"for coinName in wallet.list_coins",' print "You have " + wallet.get_balance(coinName) + " coins of the currency """ + coinName + """"',"end for"]},buy_coin:{description:"Publishes a purchase offer indicating the number of coins you wish to buy and the price ($) per unit you are willing to pay. The purchase will be finalized if there is any sale offer with a price less than or equal to the one proposed in the purchase. If there is no eligible offer to sell at that time, the offer to buy will remain publicly visible until a new offer to sell satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = wallet.buy_coin("test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created purchase offer!"',"else",' print "Failed: " + result',"end if"]},sell_coin:{description:"Publishes a sale offer indicating the amount of coins you want to sell and the price ($) per unit you want to assign. The sale will be finalized if there is any purchase offer with a price greater than or equal to that proposed in the sale. If there is no existing offer to buy that matches the requirements at that time, the offer to sell will remain publicly visible until a new offer to buy satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = wallet.sell_coin("test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created sell offer!"',"else",' print "Failed: " + result',"end if"]},get_pending_trade:{description:"Returns a `list` with the pending sale or purchase offer of this wallet for a certain currency. Index 0 of the `list` represents the type of offer with a `string` (Buy/Sell), index 1 represents the quantity to be sold or bought, and index 2 represents the price per unit. On failure, this method will return a `string` with details. Any deviation from the method signature will result in a `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','result = wallet.get_pending_trade("test")','isBuying = result[0] == "Buy"',"quantity = result[1]","unitPrice = result[2]",'currentBalance = wallet.get_balance("test")',"if isBuying then",' print "After buying was successful your balance will be " + (quantity * unitPrice + currentBalance)',"else",' print "After selling was successful your balance will be " + (currentBalance - quantity * unitPrice)',"end if"]},cancel_pending_trade:{description:"Cancel any pending offer of a certain coin. On success, an empty `string` will be returned. On failure, a `string` with an error message will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','if wallet.cancel_pending_trade("test") == "" then',' print "Trade got canceled!"',"end if"]},get_global_offers:{description:"Returns a `map` with all the offers made by any player of a given currency. The key of the `map` represents the WalletID of the player who has made the offer, and the value of the `map` is a `list` where index 0 represents the type of offer with a `string` (Buy/Sell), index 1 represents the amount to sell or buy, and index 2 represents the price per unit. In case of failure, this method returns a `string` with details. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','for item in wallet.get_global_offers("test")'," walletId = item.key"," trade = item.value",' isBuying = trade[0] == "Buy"'," quantity = trade[1]"," unitPrice = trade[2]",' print "-" * 10',' print "<b>" + walletId + "</b>"'," if isBuying then",' print "<color=green>Is buying</color>"'," else",' print "<color=yellow>Is selling</color>"'," end if",' print quantity + " coins with a unit price of " + unitPrice',"end for"]},list_global_coins:{description:"Returns a `list` where each item is a `string` containing the names of all the currencies that exist. In case of failure, this method returns a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','print "All existing coins: " wallet.list_global_coins.join(", ")']},show_nodes:{description:"Returns a `number` representing the count of devices mining a specific coin for the same `wallet`. In case of an error, a `string` with details is returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "Active miners: " show_nodes(wallet, "test")']},reset_password:{description:"Change the password of the wallet. Only the account owner can perform this action. If the process is completed successfully, a `number` with the value one will be returned. In case of an error, a `string` with details will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','if wallet.reset_password("test") == 1 then',' print "You got a new password!"',"end if"]},get_pin:{description:"Returns a `string` with a PIN that refreshes every few minutes. This PIN is used to obtain an account in cryptocurrency services.",example:['blockchain = include_lib("/lib/blockchain.so")',"myShell = get_shell","myComputer = myShell.host_computer",'wallet = blockchain.login_wallet("test", "test")','myComputer.touch("/root", "pin_launch.src")','myFile = myComputer.File("/root/pin_launch.src")','myFile.set_content("',' blockchain = include_lib(""/lib/blockchain.so"")'," myShell = get_shell"," myComputer = myShell.host_computer",' wallet = blockchain.login_wallet(""test"", ""test"")'," if params[0] == wallet.get_pin then",' get_custom_object.secret = ""The answer is 42""'," else",' get_custom_object.secret = ""The answer is 10053""'," end if",'")','myShell.build("/root/pin_launch.src", "/root")',"myFile.delete",'myShell.launch("/root/pin_launch", wallet.get_pin)','print "The secret: " + get_custom_object.secret']}}});var d0=T(Wo=>{"use strict";var Pe=Wo&&Wo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Wo,"__esModule",{value:!0});var tD=Pe(Nk()),nD=Pe($k()),rD=Pe(Bk()),iD=Pe(Uk()),sD=Pe(Wk()),oD=Pe(Vk()),aD=Pe(Hk()),lD=Pe(zk()),cD=Pe(Gk()),uD=Pe(Kk()),dD=Pe(Yk()),pD=Pe(Qk()),hD=Pe(Jk()),fD=Pe(Xk()),mD=Pe(Zk()),gD=Pe(e0()),yD=Pe(t0()),bD=Pe(n0()),vD=Pe(r0()),_D=Pe(i0()),wD=Pe(s0()),xD=Pe(o0()),SD=Pe(a0()),kD=Pe(l0()),TD=Pe(c0()),ID=Pe(u0()),ED={any:tD.default,aptClient:nD.default,blockchain:rD.default,class:iD.default,ctfEvent:lD.default,coin:sD.default,computer:oD.default,crypto:aD.default,function:dD.default,file:cD.default,ftpShell:uD.default,general:pD.default,list:hD.default,map:fD.default,metaLib:mD.default,metaMail:gD.default,metaxploit:yD.default,netSession:bD.default,port:_D.default,router:wD.default,service:xD.default,shell:SD.default,string:kD.default,subWallet:TD.default,wallet:ID.default,number:vD.default};Wo.default=ED});var p0=T((Q5,CD)=>{CD.exports={WELCOME_TITLE:"GreyScript API \u2013 Unofficial Documentation",WELCOME_TEXT:'<p>Grey Hack enables players to create their own programs inside the game via the integrated scripting language called GreyScript. GreyScript is a fork of <a href="https://miniscript.org/" target="_blank">MiniScript</a> and can be compared to another language such as JavaScript or Lua.</p><p>Programs can be created within Grey Hack via the in-game CodeEditor. Alternatively you can also use <a href="https://code.visualstudio.com/" target="_blank">Visual Studio Code</a> with <a href="https://marketplace.visualstudio.com/items?itemName=ayecue.greybel-vs" target="_blank">greybel-vs</a> which includes syntax highlighting and other helpful features. Another alternative is to use the <a href="https://editor.greyscript.org" target="_blank">online editor</a> provided by <a href="https://github.com/ayecue/greybel-js" target="_blank">greybel-js</a>. The latter also provides a CLI which can be used for script execution outside the game and bundling of code files.</p><p>The best sources for Grey Hack scripts to get inspiration from are <a href="https://www.greyrepo.xyz/" target="_blank">greyrepo.xyz</a> and <a href="https://github.com/search?q=grey+hack" target="_blank">github.com</a>.</p>',DEFINITIONS_COPY:"copy",DEFINITIONS_OR:"or"}});var h0=T((J5,RD)=>{RD.exports={type:"any",definitions:{insert:{type:"function",arguments:[{label:"index",type:"number"},{label:"value",type:"any"}],returns:["list","string"]},indexOf:{type:"function",arguments:[{label:"value",type:"any"},{label:"value",type:"any"},{label:"after",type:"any",opt:!0}],returns:["any"]},hasIndex:{type:"function",arguments:[{label:"value",type:"any"}],returnVariations:[0,1],returns:["number"]},remove:{type:"function",arguments:[{label:"value",type:"any"}],returnVariations:[0,1],returns:["number","null","string"]},push:{type:"function",arguments:[{label:"value",type:"any"}],returns:["list","map"]},pull:{type:"function",returns:["any"]},pop:{type:"function",returns:["any"]},shuffle:{type:"function",returns:["null"]},sum:{type:"function",returns:["number"]},indexes:{type:"function",returns:["list"]},len:{type:"function",returns:["number"]},values:{type:"function",returns:["list"]}}}});var f0=T((X5,PD)=>{PD.exports={type:"aptClient",extends:"map",definitions:{show:{type:"function",arguments:[{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${repository} repository not found","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},search:{type:"function",arguments:[{label:"search",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${search} not found in any repository","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},update:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","apt_update: No internet access.","${source} repository not found","/etc/apt/sources.txt content is malformed",0],returns:["string","number"]},add_repo:{type:"function",arguments:[{label:"repository",type:"string"},{label:"port",type:"number",default:{type:"number",value:1542}}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} it is already added to sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},del_repo:{type:"function",arguments:[{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} not found in sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},install:{type:"function",arguments:[{label:"package",type:"string"},{label:"customPath",type:"string",default:{type:"string",value:""}}],returnVariations:["Unknown error: Unable to access to local computer","apt_install: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","There is not enough free space on the hard disk.","!PlayerUtils.ConnectComputer","!Computer.CheckInicio","!PlayerUtils.FirewallPingStatus","!Networking.IsRouterAvailable","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${package} does not exist in the server","!GreyInterpreter.CheckScpUpload","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${package} not found in the server",1],returns:["string","number","null"]},check_upgrade:{type:"function",arguments:[{label:"filepath",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","apt_check_upgrade: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","${filepath} does not exist in this filesystem","!PlayerUtils.ConnectComputer","!PlayerUtils.FirewallPingStatus","!Computer.CheckInicio","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${filepath} does not exist in the server","${filepath} does not exist in this filesystem","${serviceDBFile} file content is malformed in the server","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${filepath} not found in the server",1,0],returns:["string","number","null"]}}}});var m0=T((Z5,AD)=>{AD.exports={type:"blockchain",definitions:{coin_price:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","coin_price: No internet access.","coin_price: Coin does not exist."],returns:["null","string","number"]},show_history:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","show_history: No internet access."],returns:[{type:"map",keyType:"number",valueType:"list"},"string","null"]},amount_mined:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","amount_mined: No internet access.","amount_mined: Coin does not exist."],returns:["string","number","null"]},get_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","get_coin: No internet access.","get_coin: Incorrect user/password"],returns:["string","coin","null"]},login_wallet:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","login_wallet: No internet access.","login_wallet: Account not found or incorrect password"],returns:["string","wallet","null"]},create_wallet:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","create_wallet: No internet access.","Error: only alphanumeric allowed as name and password","create_wallet: name and password cannot exceed the 16 character limit.","Error: It is necessary to have a bank account to be able to create a wallet.","!BlockchainSystem.AddWallet"],returns:["string","wallet","null"]},delete_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","delete_coin: No internet access.","!BlockchainSystem.RemoveCurrency",1],returns:["number","string","null"]}}}});var g0=T((eU,OD)=>{OD.exports={type:"class",hidden:!0,definitions:{}}});var y0=T((tU,DD)=>{DD.exports={type:"coin",extends:"map",definitions:{set_cycle_mining:{type:"function",arguments:[{label:"rateHours",type:"number",default:{type:"number",value:3}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","the mining cycle cannot exceed the maximum of 2160 hours","the mining cycle cannot be less than 1 hour",1],returns:["string","number","null"]},get_cycle_mining:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number"]},get_reward:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number"]},set_reward:{type:"function",arguments:[{label:"coinAmount",type:"number",default:{type:"number",value:1}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: The reward cannot be less than 1 coin","Error: Coin does not exist",1],returns:["number","string","null"]},transaction:{type:"function",arguments:[{label:"subWalletOrig",type:"string"},{label:"subWalletDest",type:"string"},{label:"valAmount",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: amount value cannot be less than 1","!BlockchainSystem.Transaction",1],returns:["string","number","null"]},create_subwallet:{type:"function",arguments:[{label:"walletID",type:"string"},{label:"pin",type:"string"},{label:"subWalletUser",type:"string"},{label:"subWalletPass",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.AddSubWallet",1],returns:["string","number","null"]},get_subwallet:{type:"function",arguments:[{label:"subWalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","get_subwallet: The account does not exist"],returns:["string","subWallet","null"]},get_subwallets:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string",{type:"list",valueType:"subWallet"}]},set_address:{type:"function",arguments:[{label:"address",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","set_address: address ${address}not found","!BlockchainSystem.SetAddress",1],returns:["number","string","null"]},get_address:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.GetAddress"],returns:["string"]},get_mined_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number"]},reset_password:{type:"function",arguments:[{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetCoinPass",1],returns:["number","string"]}}}});var b0=T((nU,jD)=>{jD.exports={type:"computer",extends:"map",definitions:{get_ports:{type:"function",returns:[{type:"list",valueType:"port"}]},get_name:{type:"function",returns:["string"]},local_ip:{type:"function",returns:["string"]},public_ip:{type:"function",returns:["string"]},File:{type:"function",arguments:[{label:"path",type:"string"}],returns:["file","null"]},create_folder:{type:"function",arguments:[{label:"path",type:"string"},{label:"folder",type:"string",default:{type:"string",value:"newFolder"}}],returnVariations:["Error: only alphanumeric allowed as folder name.","Error: name cannot exceed the limit of 128 characters.","create_folder: path too large","Error: invalid path","!PlayerUtils.CrearCarpeta",1],returns:["string","number"]},is_network_active:{type:"function",returnVariations:[0,1],returns:["number"]},touch:{type:"function",arguments:[{label:"path",type:"string"},{label:"fileName",type:"string"}],returnVariations:["Error: invalid path","Error: nameFile must be string","Error: only alphanumeric allowed as file name.","Error: name cannot exceed the limit of 128 characters.","touch: path too large","The file already exists","!PlayerUtils.CrearArchivo",1],returns:["number","string"]},show_procs:{type:"function",returns:["string"]},network_devices:{type:"function",returns:["string"]},change_password:{type:"function",arguments:[{label:"username",type:"string"},{label:"password",type:"string"}],returnVariations:["Error: only alphanumeric allowed as password.","Error: the password cannot exceed the limit of 15 characters.","Denied. Only root user can execute this command.","user ${username} does not exist",1],returns:["number","string","null"]},create_user:{type:"function",arguments:[{label:"usename",type:"string"},{label:"password",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user name and password.","Denied. Only root user can execute this command.","!Computer.ValidateNewUser","Denied. Maximum number of registered users reached.",1],returns:["number","string","null"]},delete_user:{type:"function",arguments:[{label:"username",type:"string"},{label:"removeHome",type:"number",default:{type:"number",value:0}}],returnVariations:["Denied. Only root user can execute this command.","can't delete user. ${username} does not exist","the root user can't be deleted.","sorry, at the moment that account can't be deleted.","user ${username} not found.",1],returns:["number","string","null"]},create_group:{type:"function",arguments:[{label:"username",type:"string"},{label:"group",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user and group names.","Denied. Only root user can execute this command.","Error: user ${username} does not exist.",1],returns:["number","string","null"]},delete_group:{type:"function",arguments:[{label:"username",type:"string"},{label:"group",type:"string"}],returnVariations:["Denied. Only root user can execute this command.","Error: user ${username} does not exist.","Error: group ${group} not found in user ${username}",1],returns:["number","string","null"]},groups:{type:"function",arguments:[{label:"username",type:"string"}],returnVariations:["Error: user ${username} does not exist."],returns:["string","null"]},close_program:{type:"function",arguments:[{label:"pid",type:"number"}],returnVariations:["Permission denied. PID ${pid} belongs to user <b>${username}</b>","Permission denied. Process protected.","Unable to close this process. The process belongs to this script.",1,0],returns:["number","string","null"]},wifi_networks:{type:"function",arguments:[{label:"netDevice",type:"string"}],returns:[{type:"list",valueType:"string"},"null"]},connect_wifi:{type:"function",arguments:[{label:"netDevice",type:"string"},{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"password",type:"string"}],returnVariations:["connect_wifi: permission denied. Guest users can not execute this method","connect_wifi: Network device not found","connect_wifi: Only wifi cards are supported","Can't connect. Incorrect password.","Can't connect. Router not found.","can't connect: the remote server has been temporarily disabled due to non-payment","Can't connect. Target is out of reach.","Can't connect. Incorrect password.",1],returns:["number","string","null"]},connect_ethernet:{type:"function",arguments:[{label:"netDevice",type:"string"},{label:"address",type:"string"},{label:"gateway",type:"string"}],returnVariations:["connect_ethernet: permission denied. Guest users can not execute this method","Error: Invalid IP address","Error: invalid gateway","Error: the IP address and the gateway must belong to the same subnet","connect_ethernet: Network device not found","connect_ethernet: Only ethernet cards are supported","!NetworkLan.ConnectEthernet"],returns:["string","null"]},network_gateway:{type:"function",returns:["string"]},active_net_card:{type:"function",returns:["string"]}}}});var v0=T((rU,LD)=>{LD.exports={type:"crypto",extends:"map",definitions:{aircrack:{type:"function",arguments:[{label:"path",type:"string"}],returns:["string","null"]},airmon:{type:"function",arguments:[{label:"option",type:"string"},{label:"device",type:"string"}],returnVariations:["Error: wifi card is disabled","airmon: monitor mode can only be activated on wifi cards","airmon: monitor mode is not supported by the chipset of this network card.",0,1],returns:["number","string"]},aireplay:{type:"function",arguments:[{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"maxAcks",type:"number",default:{type:"number",value:-1}}],returnVariations:["Error: wifi card is disabled","router not found!","Can't connect. Target is out of reach.","aireplay: no wifi card found with monitor mode enabled"],returns:["string","null"]},decipher:{type:"function",arguments:[{label:"encPass",type:"string"}],returns:["string","null"]},smtp_user_list:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number"}],returnVariations:["Error: Invalid ip address","!PlayerUtils.GetSmtpServer"],returns:[{type:"list",valueType:"string"},"string","null"]}}}});var _0=T((iU,MD)=>{MD.exports={type:"ctfEvent",extends:"map",definitions:{get_description:{type:"function",returns:["string"]},get_template:{type:"function",returns:["string"]},player_success:{type:"function",returnVariations:[0,1],returns:["number"]},get_creator_name:{type:"function",returns:["string"]},get_mail_content:{type:"function",returns:["string"]}}}});var w0=T((sU,qD)=>{qD.exports={type:"file",extends:"map",definitions:{chmod:{type:"function",arguments:[{label:"perms",type:"string",default:{type:"string",value:""}},{label:"isRecursive",type:"number",default:{type:"number",value:0}}],returnVariations:["${path} not found","!FileSystem.UpdatePermisos"],returns:["string"]},copy:{type:"function",arguments:[{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},move:{type:"function",arguments:[{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},rename:{type:"function",arguments:[{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","Error: name cannot exceed the limit of 128 characters.","!PlayerUtils.RenameFichero",0],returns:["string","number"]},path:{type:"function",returns:["string"]},is_folder:{type:"function",returnVariations:[1,0],returns:["number","null"]},parent:{type:"function",returns:["file","null"]},name:{type:"function",returns:["string","null"]},allow_import:{type:"function",returns:["number"]},get_content:{type:"function",returnVariations:["Error: can't find the computer of this file","can't open ${filepath}. Binary file."],returns:["string","null"]},set_content:{type:"function",arguments:[{label:"content",type:"string",default:{type:"string",value:""}}],returnVariations:["I can't save the file. The maximum of 160,000 characters has been exceeded.","set_content: unable to use this method in encryption configuration","can't open ${filepath}. Binary file.",1],returns:["string","number","null"]},is_binary:{type:"function",returnVariations:[1,0],returns:["number","null"]},has_permission:{type:"function",arguments:[{label:"perms",type:"string",default:{type:"string",value:""}}],returnVariations:[1,0],returns:["number","null"]},delete:{type:"function",returnVariations:["!PlayerUtils.RemoveFile"],returns:["string"]},get_folders:{type:"function",returns:[{type:"list",valueType:"file"},"null"]},get_files:{type:"function",returns:[{type:"list",valueType:"file"},"null"]},permissions:{type:"function",returns:["string","null"]},owner:{type:"function",returns:["string","null"]},set_owner:{type:"function",arguments:[{label:"owner",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},group:{type:"function",returns:["string","null"]},set_group:{type:"function",arguments:[{label:"group",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},size:{type:"function",returns:["string","null"]}}}});var x0=T((oU,FD)=>{FD.exports={type:"ftpShell",extends:"map",definitions:{host_computer:{type:"function",returns:["computer"]},start_terminal:{type:"function",returns:["null"]},put:{type:"function",arguments:[{label:"sourceFile",type:"string"},{label:"destinationFolder",type:"string"},{label:"remoteShell",type:"shell"}],returnVariations:["${sourceFile} not found","${destinationFolder} not found","${destinationFolder} it's not a folder","!GreyInterpreter.CheckScpUpload",1],returns:["number","string","null"]}}}});var S0=T((aU,ND)=>{ND.exports={type:"function",hidden:!0,definitions:{}}});var k0=T((lU,$D)=>{$D.exports={type:"general",definitions:{mail_login:{type:"function",arguments:[{label:"user",type:"string"},{label:"pass",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","login: No internet access.","!Database.GetMailAccount"],returns:["metaMail","string","null"]},parent_path:{type:"function",arguments:[{label:"directory",type:"string"}],returns:["string"]},trim:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string","null"]},hasIndex:{type:"function",arguments:[{label:"value",types:["map","list","string"]},{label:"index",type:"any"}],returnVariations:[0,1],returns:["number","null"]},typeof:{type:"function",arguments:[{label:"value",type:"any"}],returns:["string"]},get_router:{type:"function",arguments:[{label:"ipAddress",type:"string",default:{type:"string",value:""}}],returns:["router","null"]},get_switch:{type:"function",arguments:[{label:"ipAddress",type:"string"}],returns:["router","null"]},nslookup:{type:"function",arguments:[{label:"webAddress",type:"string"}],returnVariations:["Not found"],returns:["string"]},print:{type:"function",arguments:[{label:"value",type:"any",default:{type:"string",value:""}},{label:"replaceText",type:"number",default:{type:"number",value:0}}],returns:["null"]},clear_screen:{type:"function",returns:["null"]},active_user:{type:"function",returns:["string"]},home_dir:{type:"function",returns:["string"]},get_shell:{type:"function",arguments:[{label:"user",type:"string",default:{type:"string",value:""}},{label:"pass",type:"string",default:{type:"string",value:""}}],returns:["shell","null"]},indexes:{type:"function",arguments:[{label:"self",types:["map","list","string"]}],returns:["list","null"]},values:{type:"function",arguments:[{label:"self",types:["map","string"]}],returns:["list"]},indexOf:{type:"function",arguments:[{label:"self",types:["list","map","string"]},{label:"value",type:"any"},{label:"after",type:"any",opt:!0}],returns:["any"]},len:{type:"function",arguments:[{label:"self",types:["list","map","string"]}],returns:["number","null"]},shuffle:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["null"]},val:{type:"function",arguments:[{label:"self",types:["number","string"],default:{type:"number",value:0}}],returns:["number","null"]},lower:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string"]},upper:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string"]},sum:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["number"]},pop:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["any"]},pull:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["any"]},push:{type:"function",arguments:[{label:"self",types:["list","map"]},{label:"value",type:"any"}],returns:["list","map","null"]},sort:{type:"function",arguments:[{label:"self",type:"list"},{label:"byKey",type:"any"},{label:"ascending",type:"number",default:{type:"number",value:1}}],returns:["list"]},remove:{type:"function",arguments:[{label:"self",types:["map","list","string"]},{label:"key",type:"any"}],returnVariations:[0,1],returns:["number","null","string"]},user_input:{type:"function",arguments:[{label:"message",type:"string",default:{type:"string",value:""}},{label:"isPassword",type:"number",default:{type:"number",value:0}},{label:"anyKey",type:"number",default:{type:"number",value:0}}],returns:["string"]},include_lib:{type:"function",arguments:[{label:"path",type:"string"}],returns:["crypto","metaxploit","service","blockchain","aptClient","null"]},import_code:{type:"function",arguments:[{label:"path",type:"string"}],returns:["null"]},exit:{type:"function",arguments:[{label:"message",type:"string",default:{type:"string",value:""}}],returns:["null"]},user_mail_address:{type:"function",returns:["string","null"]},user_bank_number:{type:"function",returns:["string","null"]},whois:{type:"function",arguments:[{label:"ip",type:"string"}],returnVariations:["Invalid IP address: ${ip}","Error: the IP address must be public","No Info available","Address not found"],returns:["string"]},wait:{type:"function",arguments:[{label:"delay",type:"number",default:{type:"number",value:1}}],returns:["null"]},command_info:{type:"function",arguments:[{label:"commandName",type:"string"}],returnVariations:["Unknown info"],returns:["string"]},program_path:{type:"function",returns:["string"]},current_path:{type:"function",returns:["string"]},format_columns:{type:"function",arguments:[{label:"columns",type:"string"}],returns:["string"]},current_date:{type:"function",returns:["string"]},is_lan_ip:{type:"function",arguments:[{label:"ip",type:"string"}],returns:["number"]},is_valid_ip:{type:"function",arguments:[{label:"ip",type:"string"}],returns:["number"]},bitwise:{type:"function",arguments:[{label:"operator",type:"string"},{label:"left",type:"number"},{label:"right",type:"number"}],returns:["number","null"]},abs:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},acos:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},asin:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},atan:{type:"function",arguments:[{label:"y",type:"number",default:{type:"number",value:0}},{label:"x",type:"number",default:{type:"number",value:1}}],returns:["number"]},tan:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:1}}],returns:["number"]},cos:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},code:{type:"function",arguments:[{label:"value",type:"string"}],returns:["number"]},char:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:65}}],returns:["string"]},sin:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},floor:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},range:{type:"function",arguments:[{label:"start",type:"number",default:{type:"number",value:0}},{label:"end",type:"number",default:{type:"number",value:0}},{label:"inc",type:"number",opt:!0}],returns:[{type:"list",valueType:"number"}]},round:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}},{label:"fixed",type:"number",default:{type:"number",value:0}}],returns:["number"]},rnd:{type:"function",arguments:[{label:"seed",type:"number",opt:!0}],returns:["number"]},sign:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},sqrt:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},str:{type:"function",arguments:[{label:"value",type:"any"}],returns:["string"]},ceil:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},pi:{type:"function",returns:["number"]},launch:{type:"function",arguments:[{label:"shell",type:"shell"},{label:"program",type:"string"},{label:"params",type:"string",default:{type:"string",value:""}}],returnVariations:["Invalid shell","Can't find computer",1,0],returns:["string","number"]},launch_path:{type:"function",returns:["string"]},slice:{type:"function",arguments:[{label:"value",types:["list","string"]},{label:"startIndex",type:"number",default:{type:"number",value:0}},{label:"endIndex",type:"number",opt:!0}],returns:["list","string","null"]},md5:{type:"function",arguments:[{label:"value",type:"string"}],returns:["string"]},hash:{type:"function",arguments:[{label:"value",type:"any"}],returns:["number"]},time:{type:"function",returns:["number"]},bitAnd:{type:"function",arguments:[{label:"a",type:"number",default:{type:"number",value:0}},{label:"b",type:"number",default:{type:"number",value:0}}],returns:["number"]},bitOr:{type:"function",arguments:[{label:"a",type:"number",default:{type:"number",value:0}},{label:"b",type:"number",default:{type:"number",value:0}}],returns:["number"]},bitXor:{type:"function",arguments:[{label:"a",type:"number",default:{type:"number",value:0}},{label:"b",type:"number",default:{type:"number",value:0}}],returns:["number"]},log:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}},{label:"base",type:"number",default:{type:"number",value:10}}],returns:["number"]},yield:{type:"function",returns:["null"]},get_custom_object:{type:"function",returns:["map"]},insert:{type:"function",arguments:[{label:"object",types:["list","string"]},{label:"index",type:"number"},{label:"value",type:"any"}],returns:["list","string"]},to_int:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string","number","null"]},join:{type:"function",arguments:[{label:"value",type:"list"},{label:"delimiter",type:"string",default:{type:"string",value:" "}}],returns:["string"]},split:{type:"function",arguments:[{label:"self",type:"string"},{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"list",valueType:"string"},"null"]},reverse:{type:"function",arguments:[{label:"value",type:"list"}],returns:["null"]},replace:{type:"function",arguments:[{label:"value",types:["map","list"]},{label:"oldVal",type:"any"},{label:"newVal",type:"any"},{label:"maxCount",type:"number",opt:!0}],returns:["any"]},replace_regex:{type:"function",arguments:[{label:"self",type:"string"},{label:"pattern",type:"string"},{label:"newValue",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:["string"]},is_match:{type:"function",arguments:[{label:"value",type:"string"},{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returnVariations:[1,0],returns:["number"]},lastIndexOf:{type:"function",arguments:[{label:"self",type:"string"},{label:"searchStr",type:"string"}],returns:["number","null"]},matches:{type:"function",arguments:[{label:"value",type:"string"},{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"map",keyType:"number",valueType:"string"}]},get_ctf:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"},{label:"eventName",type:"string"}],returnVariations:["get_ctf: user and password cannot be null","get_ctf: user or password incorrect"],returns:["ctfEvent","string"]},show:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${repository} repository not found","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},search:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"search",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${search} not found in any repository","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},update:{type:"function",arguments:[{label:"self",type:"aptClient"}],returnVariations:["Unknown error: Unable to access to local computer","apt_update: No internet access.","${source} repository not found","/etc/apt/sources.txt content is malformed",0],returns:["string","number"]},add_repo:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"repository",type:"string"},{label:"port",type:"number",default:{type:"number",value:1542}}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} it is already added to sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},del_repo:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} not found in sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},install:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"package",type:"string"},{label:"customPath",type:"string",default:{type:"string",value:""}}],returnVariations:["Unknown error: Unable to access to local computer","apt_install: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","There is not enough free space on the hard disk.","!PlayerUtils.ConnectComputer","!Computer.CheckInicio","!PlayerUtils.FirewallPingStatus","!Networking.IsRouterAvailable","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${package} does not exist in the server","!GreyInterpreter.CheckScpUpload","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${package} not found in the server",1],returns:["string","number","null"]},check_upgrade:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"filePath",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","apt_check_upgrade: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","${filepath} does not exist in this filesystem","!PlayerUtils.ConnectComputer","!PlayerUtils.FirewallPingStatus","!Computer.CheckInicio","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${filepath} does not exist in the server","${filepath} does not exist in this filesystem","${serviceDBFile} file content is malformed in the server","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${filepath} not found in the server",1,0],returns:["string","number","null"]},coin_price:{type:"function",arguments:[{label:"self",type:"blockchain"}],returnVariations:["Unknown error: Unable to access to local computer","coin_price: No internet access.","coin_price: Coin does not exist."],returns:["null","string","number"]},show_history:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","show_history: No internet access."],returns:[{type:"map",keyType:"number",valueType:"list"},"string","null"]},amount_mined:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","amount_mined: No internet access.","amount_mined: Coin does not exist."],returns:["string","number","null"]},get_coin:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","get_coin: No internet access.","get_coin: Incorrect user/password"],returns:["string","coin","null"]},login_wallet:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","login_wallet: No internet access.","login_wallet: Account not found or incorrect password"],returns:["string","wallet","null"]},create_wallet:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","create_wallet: No internet access.","Error: only alphanumeric allowed as name and password","create_wallet: name and password cannot exceed the 16 character limit.","Error: It is necessary to have a bank account to be able to create a wallet.","!BlockchainSystem.AddWallet"],returns:["string","wallet","null"]},delete_coin:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","delete_coin: No internet access.","!BlockchainSystem.RemoveCurrency",1],returns:["number","string","null"]},set_cycle_mining:{type:"function",arguments:[{label:"self",type:"coin"},{label:"rateHours",type:"number",default:{type:"number",value:3}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","the mining cycle cannot exceed the maximum of 2160 hours","the mining cycle cannot be less than 1 hour",1],returns:["string","number","null"]},get_cycle_mining:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number","null"]},get_reward:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number","null"]},set_reward:{type:"function",arguments:[{label:"self",type:"coin"},{label:"coinAmount",type:"number",default:{type:"number",value:1}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: The reward cannot be less than 1 coin","Error: Coin does not exist",1],returns:["number","string","null"]},transaction:{type:"function",arguments:[{label:"self",type:"coin"},{label:"subWalletOrig",type:"string"},{label:"subWalletDest",type:"string"},{label:"valAmount",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: amount value cannot be less than 1","!BlockchainSystem.Transaction",1],returns:["string","number","null"]},create_subwallet:{type:"function",arguments:[{label:"self",type:"coin"},{label:"walletID",type:"string"},{label:"pin",type:"string"},{label:"subWalletUser",type:"string"},{label:"subWalletPass",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.AddSubWallet",1],returns:["string","number","null"]},get_subwallet:{type:"function",arguments:[{label:"self",type:"coin"},{label:"subWalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","get_subwallet: The account does not exist"],returns:["string","subWallet","null"]},get_subwallets:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string",{type:"list",valueType:"subWallet"},"null"]},set_address:{type:"function",arguments:[{label:"self",type:"coin"},{label:"address",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","set_address: address ${address}not found","!BlockchainSystem.SetAddress",1],returns:["number","string","null"]},get_address:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.GetAddress"],returns:["string","null"]},get_mined_coins:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number","null"]},reset_password_coin:{type:"function",arguments:[{label:"self",type:"coin"},{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetCoinPass",1],returns:["number","string","null"]},get_ports:{type:"function",arguments:[{label:"self",type:"computer"}],returns:[{type:"list",valueType:"port"},"null"]},get_name:{type:"function",arguments:[{label:"self",type:"computer"}],returnVariations:["Unknown"],returns:["string"]},lan_ip:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},public_ip_pc:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},File:{type:"function",arguments:[{label:"self",type:"computer"},{label:"path",type:"string"}],returns:["file","null"]},create_folder:{type:"function",arguments:[{label:"self",type:"computer"},{label:"path",type:"string"},{label:"folder",type:"string",default:{type:"string",value:"newFolder"}}],returnVariations:["Error: only alphanumeric allowed as folder name.","Error: name cannot exceed the limit of 128 characters.","create_folder: path too large","Error: invalid path","!PlayerUtils.CrearCarpeta",1],returns:["string","number","null"]},is_network_active:{type:"function",arguments:[{label:"self",type:"computer"}],returnVariations:[0,1],returns:["number","null"]},touch:{type:"function",arguments:[{label:"self",type:"computer"},{label:"path",type:"string"},{label:"fileName",type:"string"}],returnVariations:["Error: invalid path","Error: nameFile must be string","Error: only alphanumeric allowed as file name.","Error: name cannot exceed the limit of 128 characters.","touch: path too large","The file already exists","!PlayerUtils.CrearArchivo",1],returns:["number","string","null"]},show_procs:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},network_devices:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},change_password:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"pass",type:"string"}],returnVariations:["Error: only alphanumeric allowed as password.","Error: the password cannot exceed the limit of 15 characters.","Denied. Only root user can execute this command.","user ${username} does not exist",1],returns:["number","string","null"]},create_user:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"pass",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user name and password.","Denied. Only root user can execute this command.","!Computer.ValidateNewUser","Denied. Maximum number of registered users reached.",1],returns:["number","string","null"]},delete_user:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"removeHome",type:"number",default:{type:"number",value:0}}],returnVariations:["Denied. Only root user can execute this command.","can't delete user. ${username} does not exist","the root user can't be deleted.","sorry, at the moment that account can't be deleted.","user ${username} not found.",1],returns:["number","string","null"]},create_group:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"group",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user and group names.","Denied. Only root user can execute this command.","Error: user ${username} does not exist.",1],returns:["number","string","null"]},delete_group:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"group",type:"string"}],returnVariations:["Denied. Only root user can execute this command.","Error: user ${username} does not exist.","Error: group ${group} not found in user ${username}",1],returns:["number","string","null"]},groups:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"}],returns:["string","null"]},close_program:{type:"function",arguments:[{label:"self",type:"computer"},{label:"pid",type:"number"}],returnVariations:["Permission denied. PID ${pid} belongs to user <b>${username}</b>","Permission denied. Process protected.","Unable to close this process. The process belongs to this script.",1,0],returns:["number","string","null"]},wifi_networks:{type:"function",arguments:[{label:"self",type:"computer"},{label:"netDevice",type:"string"}],returns:[{type:"list",valueType:"string"},"null"]},connect_wifi:{type:"function",arguments:[{label:"self",type:"computer"},{label:"netDevice",type:"string"},{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"pass",type:"string"}],returnVariations:["connect_wifi: permission denied. Guest users can not execute this method","connect_wifi: Network device not found","connect_wifi: Only wifi cards are supported","Can't connect. Incorrect password.","Can't connect. Router not found.","can't connect: the remote server has been temporarily disabled due to non-payment","Can't connect. Target is out of reach.","Can't connect. Incorrect password.",1],returns:["number","string","null"]},connect_ethernet:{type:"function",arguments:[{label:"self",type:"computer"},{label:"netDevice",type:"string"},{label:"localIp",type:"string"},{label:"gateway",type:"string"}],returnVariations:["connect_ethernet: permission denied. Guest users can not execute this method","Error: Invalid IP address","Error: invalid gateway","Error: the IP address and the gateway must belong to the same subnet","connect_ethernet: Network device not found","connect_ethernet: Only ethernet cards are supported","!NetworkLan.ConnectEthernet"],returns:["string","null"]},network_gateway:{type:"function",arguments:[{label:"self",type:"computer"}],returnVariations:["0.0.0.0"],returns:["string"]},active_net_card:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},aircrack:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"path",type:"string"}],returns:["string","null"]},airmon:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"option",type:"string"},{label:"device",type:"string"}],returnVariations:["Error: wifi card is disabled","airmon: monitor mode can only be activated on wifi cards","airmon: monitor mode is not supported by the chipset of this network card.",0,1],returns:["number","string"]},aireplay:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"maxAcks",type:"number",default:{type:"number",value:-1}}],returnVariations:["Error: wifi card is disabled","router not found!","Can't connect. Target is out of reach.","aireplay: no wifi card found with monitor mode enabled"],returns:["string","null"]},decipher:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"encPass",type:"string"}],returns:["string","null"]},smtp_user_list:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"ip",type:"string"},{label:"port",type:"number"}],returnVariations:["Error: Invalid ip address","!PlayerUtils.GetSmtpServer"],returns:[{type:"list",valueType:"string"},"string","null"]},get_description:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},get_template:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},player_success:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returnVariations:[0,1],returns:["number","null"]},get_creator_name:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},get_mail_content:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},chmod:{type:"function",arguments:[{label:"self",type:"file"},{label:"perms",type:"string",default:{type:"string",value:""}},{label:"isRecursive",type:"number",default:{type:"number",value:0}}],returnVariations:["${path} not found","!FileSystem.UpdatePermisos"],returns:["string","null"]},copy:{type:"function",arguments:[{label:"self",type:"file"},{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},move:{type:"function",arguments:[{label:"self",type:"file"},{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},rename:{type:"function",arguments:[{label:"self",type:"file"},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","Error: name cannot exceed the limit of 128 characters.","!PlayerUtils.RenameFichero",0],returns:["string","number"]},path:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},is_folder:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:[1,0],returns:["number","null"]},parent:{type:"function",arguments:[{label:"self",type:"file"}],returns:["file","null"]},name:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},allow_import:{type:"function",arguments:[{label:"self",type:"file"}],returns:["number","null"]},get_content:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:["Error: can't find the computer of this file","can't open ${filepath}. Binary file."],returns:["string","null"]},set_content:{type:"function",arguments:[{label:"self",type:"file"},{label:"content",type:"string",default:{type:"string",value:""}}],returnVariations:["I can't save the file. The maximum of 160,000 characters has been exceeded.","set_content: unable to use this method in encryption configuration","can't open ${filepath}. Binary file.",1,0],returns:["string","number","null"]},is_binary:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:[1,0],returns:["number","null"]},has_permission:{type:"function",arguments:[{label:"self",type:"file"},{label:"perms",type:"string",default:{type:"string",value:""}}],returnVariations:[1,0],returns:["number","null"]},delete:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:["!PlayerUtils.RemoveFile"],returns:["string","null"]},get_folders:{type:"function",arguments:[{label:"self",type:"file"}],returns:[{type:"list",valueType:"file"},"null"]},get_files:{type:"function",arguments:[{label:"self",type:"file"}],returns:[{type:"list",valueType:"file"},"null"]},permissions:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},owner:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},set_owner:{type:"function",arguments:[{label:"self",type:"file"},{label:"owner",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},group:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},set_group:{type:"function",arguments:[{label:"self",type:"file"},{label:"group",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},size:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},load:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"path",type:"string"}],returns:["metaLib","null"]},net_use:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:0}}],returns:["netSession","null"]},rshell_client:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:1222}},{label:"processName",type:"string",default:{type:"string",value:"rshell_client"}}],returnVariations:["rshell_client: Invalid IP address","Error: only alphanumeric allowed as proccess name.","Error: proccess name cannot exceed the limit of 28 characters.","Error: ${programName} is a reserved process name","rshell_client: IP address not found: ${ip}","rshell_client: unable to find remote server at port ${port}","!Networking.CheckServiceOnline",1],returns:["string","number","null"]},rshell_server:{type:"function",arguments:[{label:"self",type:"metaxploit"}],returnVariations:["rshell_server: No internet connection","rshell_server: The service cannot be started on this network.","error: service rshelld is not running","error: rshell portforward is not configured correctly"],returns:["string",{type:"list",valueType:"shell"},"null"]},scan:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"metaLib",type:"metaLib"}],returns:[{type:"list",valueType:"string"},"null"]},scan_address:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"metaLib",type:"metaLib"},{label:"memoryAddress",type:"string"}],returns:["string","null"]},sniffer:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"saveEncSource",type:"number",default:{type:"number",value:0}}],returns:["string","null"]},overflow:{type:"function",arguments:[{label:"self",type:"metaLib"},{label:"memoryAddress",type:"string"},{label:"unsecZone",type:"string"},{label:"optArgs",type:"string",default:{type:"string",value:""}}],returnVariations:["Exploit failed: the remote server has been temporarily disabled due to non-payment",0,1],returns:["string","number","shell","computer","file","null"]},version:{type:"function",arguments:[{label:"self",type:"metaLib"}],returns:["string","null"]},lib_name:{type:"function",arguments:[{label:"self",type:"metaLib"}],returns:["string","null"]},dump_lib:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["metaLib","null"]},get_num_conn_gateway:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["number","null"]},get_num_portforward:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["number","null"]},get_num_users:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["number","null"]},is_any_active_user:{type:"function",arguments:[{label:"self",type:"netSession"}],returnVariations:[0,1],returns:["number","null"]},is_root_active_user:{type:"function",arguments:[{label:"self",type:"netSession"}],returnVariations:[0,1],returns:["number","null"]},device_ports:{type:"function",arguments:[{label:"self",type:"router"},{label:"ip",type:"string"}],returnVariations:["device_ports: ${ip} is unreachable"],returns:["string",{type:"list",valueType:"port"},"null"]},devices_lan_ip:{type:"function",arguments:[{label:"self",type:"router"}],returns:[{type:"list",valueType:"string"},"null"]},bssid_name:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},essid_name:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},firewall_rules:{type:"function",arguments:[{label:"self",type:"router"}],returns:[{type:"list",valueType:"string"},"null"]},kernel_version:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},local_ip:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},public_ip:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},used_ports:{type:"function",arguments:[{label:"self",type:"router"}],returns:[{type:"list",valueType:"port"},"null"]},ping_port:{type:"function",arguments:[{label:"self",type:"router"},{label:"port",type:"number"}],returns:["port","null"]},port_info:{type:"function",arguments:[{label:"self",type:"router"},{label:"port",type:"port"}],returns:["string","null"]},install_service:{type:"function",arguments:[{label:"self",type:"service"}],returnVariations:["Denied. Only root user can install this service.",1],returns:["number","string","null"]},start_service:{type:"function",arguments:[{label:"self",type:"service"}],returnVariations:["Denied. Only root user can install this service.","<color=yellow>${reason} The chat service can't be accessed.</color>",1],returns:["number","string","null"]},stop_service:{type:"function",arguments:[{label:"self",type:"service"}],returnVariations:["Denied. Only root user can install this service.",1,0],returns:["number","string","null"]},host_computer:{type:"function",arguments:[{label:"self",type:"shell"}],returns:["computer","null"]},start_terminal:{type:"function",arguments:[{label:"self",type:"shell"}],returns:["null"]},build:{type:"function",arguments:[{label:"self",type:"shell"},{label:"pathSource",type:"string"},{label:"pathBinary",type:"string"},{label:"allowImport",type:"number",default:{type:"number",value:0}}],returnVariations:["pathSource and programName can't be empty","Invalid shell","Unknown error: Unable to access to local computer","Can't find ${pathSource}","Can't find ${pathBinary}","Can't access to ${pathSource}. Permission denied.","Can't build ${pathSource}. Binary file","Can't create binary in ${pathBinary}. Permission denied.","Can't build ${pathSource}. Invalid extension.","Can't compile. Source code is empty"],returns:["string"]},connect_service:{type:"function",arguments:[{label:"self",type:"shell"},{label:"ip",type:"string"},{label:"port",type:"number"},{label:"user",type:"string"},{label:"password",type:"string"},{label:"service",type:"string",default:{type:"string",value:"ssh"}}],returnVariations:["Unknown error: Unable to access to local computer","Direct connections cannot be made outside of this network","!PlayerUtils.ConnectToService","!PlayerUtils.ConnectComputer","!Networking.CheckServiceOnline"],returns:["shell","ftpShell","string","null"]},launch:{type:"function",arguments:[{label:"self",type:"shell"},{label:"program",type:"string"},{label:"params",type:"string",default:{type:"string",value:""}}],returns:["string","number"]},ping:{type:"function",arguments:[{label:"self",type:"shell"},{label:"ip",type:"string"}],returnVariations:["ping: invalid ip address",1,0],returns:["string","number","null"]},scp:{type:"function",arguments:[{label:"self",type:"shell"},{label:"sourceFile",type:"string"},{label:"destinationFolder",type:"string"},{label:"remoteShell",type:"shell"}],returnVariations:["${sourceFile} not found","${destinationFolder} not found","${destinationFolder} it's not a folder","!GreyInterpreter.CheckScpUpload",1],returns:["number","string","null"]},get_balance_subwallet:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["get_balance: The account does not exist.","Unknown error: Unable to access to local computer","No internet access."],returns:["number","string","null"]},set_info:{type:"function",arguments:[{label:"self",type:"subWallet"},{label:"info",type:"string"}],returnVariations:["Error: exceeded maximum of 256 characters","Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.SetInfoSubWallet",1],returns:["number","string","null"]},get_info:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.GetInfoSubWallet"],returns:["string","null"]},delete_subwallet:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.",1,0],returns:["string","number","null"]},get_user:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},last_transaction:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.",0],returns:[{type:"list",valueType:"list"},"number","string","null"]},mining:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","all existing coins of ${coinName} have been mined.","Only one mining process is allowed.","Error: GPU is damaged. Unable to start the mining process.","Error: GPU returned corrupted data while performing floating point tests. Unable to start the mining process.","Hardware error",1],returns:["number","string","null"]},check_password:{type:"function",arguments:[{label:"self",type:"subWallet"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","login_subwallet: the account does not exist.",1,0],returns:["number","string","null"]},wallet_username:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},list_coins:{type:"function",arguments:[{label:"self",type:"wallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials."],returns:[{type:"list",valueType:"string"},"string","null"]},get_balance:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials.","get_balance: wallet does not have coins in the selected currency"],returns:["number","string","null"]},buy_coin:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.","!BlockchainSystem.BuyCoin",1],returns:["number","string"]},sell_coin:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.","!BlockchainSystem.SellCoin",1],returns:["number","string"]},get_pending_trade:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","No pending trades found"],returns:["string","list","null"]},cancel_pending_trade:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","No pending trades found"],returns:["string","null"]},get_global_offers:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"map",keyType:"string",valueType:"list"},"null"]},list_global_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"list",valueType:"string"},"null"]},show_nodes:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","show_nodes: wallet does not exist","show_nodes: coin does not exist"],returns:["string","number","null"]},reset_password:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetWalletPass",1],returns:["number","string","null"]},get_pin:{type:"function",arguments:[{label:"self",type:"wallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},delete_mail:{type:"function",arguments:[{label:"self",type:"metaMail"},{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","read: No internet access.",1],returns:["number","string","null"]},fetch:{type:"function",arguments:[{label:"self",type:"metaMail"}],returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access."],returns:[{type:"list",valueType:"string"},"string","null"]},read:{type:"function",arguments:[{label:"self",type:"metaMail"},{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access.","Mail not found"],returns:["string","null"]},send:{type:"function",arguments:[{label:"self",type:"metaMail"},{label:"emailAddress",type:"string"},{label:"subject",type:"string"},{label:"message",type:"string"}],returnVariations:["The mail could not be sent. Wait a moment before sending another email.","Unknown error: Unable to access to local computer","read: No internet access.","read: No email account registered","!PlayerUtils.SendMail","!Database.GetMailAccount","Mail not delivered",1],returns:["string","number","null"]},port_number:{type:"function",arguments:[{label:"self",type:"port"}],returns:["number","null"]},is_closed:{type:"function",arguments:[{label:"self",type:"port"}],returnVariations:[0,1],returns:["number","null"]},get_lan_ip:{type:"function",arguments:[{label:"self",type:"port"}],returns:["string","null"]},reset_ctf_password:{type:"function",arguments:[{label:"newPassword",type:"string"}],returnVariations:["reset_ctf_password: password cannot be null","reset_ctf_password: password can't exceed the maximum limit of 32 characters","reset_ctf_password: password must be alphanumeric","reset_ctf_password: you do not have a registered CTF account",1],returns:["number","string"]},funcRef:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},list:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},map:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},number:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},string:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]}}}});var T0=T((cU,BD)=>{BD.exports={type:"list",definitions:{remove:{type:"function",arguments:[{label:"index",type:"number"}],returns:["null"]},insert:{type:"function",arguments:[{label:"index",type:"number"},{label:"value",type:"any"}],returns:["list"]},push:{type:"function",arguments:[{label:"value",type:"any"}],returns:["list"]},pop:{type:"function",returns:["any"]},pull:{type:"function",returns:["any"]},shuffle:{type:"function",returns:["null"]},reverse:{type:"function",returns:["null"]},sum:{type:"function",returns:["number"]},hasIndex:{type:"function",arguments:[{label:"index",type:"number"}],returnVariations:[0,1],returns:["number"]},indexOf:{type:"function",arguments:[{label:"value",type:"any"},{label:"offset",type:"number",opt:!0}],returns:["number","null"]},sort:{type:"function",arguments:[{label:"key",type:"any"},{label:"ascending",type:"number",default:{type:"number",value:1}}],returns:["list"]},join:{type:"function",arguments:[{label:"delimiter",type:"string"}],returns:["string"]},indexes:{type:"function",returns:[{type:"list",valueType:"number"}]},len:{type:"function",returns:["number"]},values:{type:"function",returns:["list"]},replace:{type:"function",arguments:[{label:"oldVal",type:"any"},{label:"newVal",type:"any"},{label:"maxCount",type:"number",opt:!0}],returns:["list"]}}}});var I0=T((uU,UD)=>{UD.exports={type:"map",definitions:{remove:{type:"function",arguments:[{label:"key",type:"string"}],returnVariations:[0,1],returns:["number"]},push:{type:"function",arguments:[{label:"key",type:"any"}],returns:["map"]},pull:{type:"function",returns:["any"]},pop:{type:"function",returns:["any"]},shuffle:{type:"function",returns:["null"]},sum:{type:"function",returns:["number"]},hasIndex:{type:"function",arguments:[{label:"key",type:"any"}],returnVariations:[0,1],returns:["number"]},indexOf:{type:"function",arguments:[{label:"value",type:"any"}],returns:["any"]},indexes:{type:"function",returns:["list"]},len:{type:"function",returns:["number"]},values:{type:"function",returns:["list"]},replace:{type:"function",arguments:[{label:"oldVal",type:"any"},{label:"newVal",type:"any"},{label:"maxCount",type:"number",opt:!0}],returns:["map"]}}}});var E0=T((dU,WD)=>{WD.exports={type:"metaLib",extends:"map",definitions:{overflow:{type:"function",arguments:[{label:"memoryAddress",type:"string"},{label:"unsecZone",type:"string"},{label:"optArgs",type:"string",default:{type:"string",value:""}}],returnVariations:["Exploit failed: the remote server has been temporarily disabled due to non-payment",0,1],returns:["string","number","shell","computer","file","null"]},version:{type:"function",returns:["string"]},lib_name:{type:"function",returns:["string"]}}}});var C0=T((pU,VD)=>{VD.exports={type:"metaMail",extends:"map",definitions:{delete:{type:"function",arguments:[{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","read: No internet access.",1],returns:["number","string","null"]},fetch:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access."],returns:[{type:"list",valueType:"string"},"string"]},read:{type:"function",arguments:[{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access.","Mail not found"],returns:["string","null"]},send:{type:"function",arguments:[{label:"emailAddress",type:"string"},{label:"subject",type:"string"},{label:"message",type:"string"}],returnVariations:["The mail could not be sent. Wait a moment before sending another email.","Unknown error: Unable to access to local computer","read: No internet access.","read: No email account registered","!PlayerUtils.SendMail","!Database.GetMailAccount","Mail not delivered",1],returns:["string","number","null"]}}}});var R0=T((hU,HD)=>{HD.exports={type:"metaxploit",extends:"map",definitions:{load:{type:"function",arguments:[{label:"path",type:"string"}],returns:["metaLib","null"]},net_use:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:0}}],returns:["netSession","null"]},rshell_client:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:1222}},{label:"processName",type:"string",default:{type:"string",value:"rshell_client"}}],returnVariations:["rshell_client: Invalid IP address","Error: only alphanumeric allowed as proccess name.","Error: proccess name cannot exceed the limit of 28 characters.","Error: ${programName} is a reserved process name","rshell_client: IP address not found: ${ip}","rshell_client: unable to find remote server at port ${port}","!Networking.CheckServiceOnline",1],returns:["string","number","null"]},rshell_server:{type:"function",returnVariations:["rshell_server: No internet connection","rshell_server: The service cannot be started on this network.","error: service rshelld is not running","error: rshell portforward is not configured correctly"],returns:["string",{type:"list",valueType:"shell"}]},scan:{type:"function",arguments:[{label:"metaLib",type:"metaLib"}],returns:[{type:"list",valueType:"string"},"null"]},scan_address:{type:"function",arguments:[{label:"metaLib",type:"metaLib"},{label:"memoryAddress",type:"string"}],returns:["string","null"]},sniffer:{type:"function",arguments:[{label:"saveEncSource",type:"number",default:{type:"number",value:0}}],returns:["string","null"]}}}});var P0=T((fU,zD)=>{zD.exports={type:"netSession",extends:"map",definitions:{dump_lib:{type:"function",returns:["metaLib"]},get_num_conn_gateway:{type:"function",returns:["number"]},get_num_portforward:{type:"function",returns:["number"]},get_num_users:{type:"function",returns:["number"]},is_any_active_user:{type:"function",returnVariations:[0,1],returns:["number"]},is_root_active_user:{type:"function",returnVariations:[0,1],returns:["number"]}}}});var A0=T((mU,GD)=>{GD.exports={type:"number",definitions:{}}});var O0=T((gU,KD)=>{KD.exports={type:"port",extends:"map",definitions:{port_number:{type:"function",returns:["number"]},is_closed:{type:"function",returnVariations:[0,1],returns:["number"]},get_lan_ip:{type:"function",returns:["string"]}}}});var D0=T((yU,YD)=>{YD.exports={type:"router",extends:"map",definitions:{device_ports:{type:"function",arguments:[{label:"ip",type:"string"}],returns:["string",{type:"list",valueType:"port"},"null"]},devices_lan_ip:{type:"function",returns:[{type:"list",valueType:"string"}]},bssid_name:{type:"function",returns:["string"]},essid_name:{type:"function",returns:["string"]},firewall_rules:{type:"function",returns:[{type:"list",valueType:"string"}]},kernel_version:{type:"function",returns:["string"]},local_ip:{type:"function",returns:["string"]},public_ip:{type:"function",returns:["string"]},used_ports:{type:"function",returns:[{type:"list",valueType:"port"}]},ping_port:{type:"function",arguments:[{label:"port",type:"number"}],returns:["port","null"]},port_info:{type:"function",arguments:[{label:"port",type:"port"}],returns:["string","null"]}}}});var j0=T((bU,QD)=>{QD.exports={type:"service",extends:"map",definitions:{install_service:{type:"function",returnVariations:["Denied. Only root user can install this service.",1],returns:["number","string"]},start_service:{type:"function",returnVariations:["Denied. Only root user can install this service.","<color=yellow>${reason} The chat service can't be accessed.</color>",1],returns:["number","string"]},stop_service:{type:"function",returnVariations:["Denied. Only root user can install this service.",1,0],returns:["number","string"]}}}});var L0=T((vU,JD)=>{JD.exports={type:"shell",extends:"map",definitions:{host_computer:{type:"function",returns:["computer"]},start_terminal:{type:"function",returns:["null"]},build:{type:"function",arguments:[{label:"pathSource",type:"string"},{label:"pathBinary",type:"string"},{label:"allowImport",type:"number",default:{type:"number",value:0}}],returnVariations:["pathSource and programName can't be empty","Invalid shell","Unknown error: Unable to access to local computer","Can't find ${pathSource}","Can't find ${pathBinary}","Can't access to ${pathSource}. Permission denied.","Can't build ${pathSource}. Binary file","Can't create binary in ${pathBinary}. Permission denied.","Can't build ${pathSource}. Invalid extension.","Can't compile. Source code is empty"],returns:["string"]},connect_service:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number"},{label:"user",type:"string"},{label:"password",type:"string"},{label:"service",type:"string",default:{type:"string",value:"ssh"}}],returnVariations:["Unknown error: Unable to access to local computer","Direct connections cannot be made outside of this network","!PlayerUtils.ConnectToService","!PlayerUtils.ConnectComputer","!Networking.CheckServiceOnline"],returns:["shell","ftpShell","string","null"]},launch:{type:"function",arguments:[{label:"program",type:"string"},{label:"params",type:"string",default:{type:"string",value:""}}],returnVariations:["Invalid shell","Can't find computer",1,0],returns:["string","number"]},ping:{type:"function",arguments:[{label:"ip",type:"string"}],returnVariations:["ping: invalid ip address",1,0],returns:["string","number"]},scp:{type:"function",arguments:[{label:"file",type:"string"},{label:"folder",type:"string"},{label:"remoteShell",type:"shell"}],returnVariations:["${sourceFile} not found","${destinationFolder} not found","${destinationFolder} it's not a folder","!GreyInterpreter.CheckScpUpload",1],returns:["number","string","null"]}}}});var M0=T((_U,XD)=>{XD.exports={type:"string",definitions:{remove:{type:"function",arguments:[{label:"value",type:"string"}],returns:["string"]},hasIndex:{type:"function",arguments:[{label:"index",type:"number"}],returnVariations:[0,1],returns:["number"]},insert:{type:"function",arguments:[{label:"index",type:"number"},{label:"value",type:"string"}],returns:["string"]},indexOf:{type:"function",arguments:[{label:"value",type:"string"},{label:"offset",type:"number",opt:!0}],returns:["number","null"]},lastIndexOf:{type:"function",arguments:[{label:"searchStr",type:"string"}],returns:["number"]},split:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"list",valueType:"string"},"null"]},replace:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"newValue",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:["string"]},trim:{type:"function",returns:["string"]},indexes:{type:"function",returns:[{type:"list",valueType:"number"}]},code:{type:"function",returns:["number"]},len:{type:"function",returns:["number"]},lower:{type:"function",returns:["string"]},upper:{type:"function",returns:["string"]},val:{type:"function",returns:["number"]},values:{type:"function",returns:[{type:"list",valueType:"string"}]},to_int:{type:"function",returns:["string","number"]},is_match:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returnVariations:[1,0],returns:["number"]},matches:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"map",keyType:"number",valueType:"string"}]}}}});var q0=T((wU,ZD)=>{ZD.exports={type:"subWallet",extends:"map",definitions:{get_balance:{type:"function",returnVariations:["get_balance: The account does not exist.","Unknown error: Unable to access to local computer","No internet access."],returns:["number","string"]},set_info:{type:"function",arguments:[{label:"info",type:"string"}],returnVariations:["Error: exceeded maximum of 256 characters","Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.SetInfoSubWallet",1],returns:["number","string"]},get_info:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.GetInfoSubWallet"],returns:["string"]},delete:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.",1,0],returns:["string","number"]},get_user:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string"]},last_transaction:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.",0],returns:["list","number","string"]},mining:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.","all existing coins of ${coinName} have been mined.","Only one mining process is allowed.","Error: GPU is damaged. Unable to start the mining process.","Error: GPU returned corrupted data while performing floating point tests. Unable to start the mining process.","Hardware error",1],returns:["number","string"]},check_password:{type:"function",arguments:[{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","login_subwallet: the account does not exist.",1,0],returns:["number","string"]},wallet_username:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string"]}}}});var F0=T((xU,ej)=>{ej.exports={type:"wallet",extends:"map",definitions:{list_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials."],returns:[{type:"list",valueType:"string"},"string"]},get_balance:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials.","get_balance: wallet does not have coins in the selected currency"],returns:["number","string","null"]},buy_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.",1],returns:["number","string"]},sell_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.",1],returns:["number","string"]},get_pending_trade:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","list","null"]},cancel_pending_trade:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},get_global_offers:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"map",keyType:"string",valueType:"list"},"null"]},list_global_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"list",valueType:"string"}]},show_nodes:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","show_nodes: wallet does not exist","show_nodes: coin does not exist"],returns:["string","number","null"]},reset_password:{type:"function",arguments:[{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetWalletPass",1],returns:["number","string","null"]},get_pin:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string"]}}}});var N0=T(ce=>{"use strict";var xe=ce&&ce.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ce,"__esModule",{value:!0});ce.getSiteDescription=ce.getSiteLanguageFile=ce.isNative=ce.greyscriptMeta=void 0;Fk();var tj=Yt(),nj=xe(d0()),rj=xe(p0()),ij=xe(h0()),sj=xe(f0()),oj=xe(m0()),aj=xe(g0()),lj=xe(y0()),cj=xe(b0()),uj=xe(v0()),dj=xe(_0()),pj=xe(w0()),hj=xe(x0()),fj=xe(S0()),mj=xe(k0()),gj=xe(T0()),yj=xe(I0()),bj=xe(E0()),vj=xe(C0()),_j=xe(R0()),wj=xe(P0()),xj=xe(A0()),Sj=xe(O0()),kj=xe(D0()),Tj=xe(j0()),Ij=xe(L0()),Ej=xe(M0()),Cj=xe(q0()),Rj=xe(F0());ce.greyscriptMeta=new tj.Container;ce.greyscriptMeta.addTypeSignatureFromPayload(ij.default);ce.greyscriptMeta.addTypeSignatureFromPayload(sj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(oj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(dj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(aj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(lj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(cj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(uj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(pj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(hj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(fj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(mj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(gj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(yj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(bj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(vj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(_j.default);ce.greyscriptMeta.addTypeSignatureFromPayload(wj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(xj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Sj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(kj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Tj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Ij.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Ej.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Cj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Rj.default);ce.greyscriptMeta.addMetaFromPayload("en",nj.default);var Pj=function(t,e){return!!ce.greyscriptMeta.getDefinition(t,e)};ce.isNative=Pj;var Aj=function(t){switch(t===void 0&&(t="en"),t){case"en":return rj.default;default:throw new Error('Language "'.concat(t,'" is unknown.'))}};ce.getSiteLanguageFile=Aj;var Oj=function(t,e){var n=(0,ce.getSiteLanguageFile)(e);return n==null?void 0:n[t]};ce.getSiteDescription=Oj});var $0=T(ri=>{"use strict";var Dj=ri&&ri.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),jj=ri&&ri.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Dj(e,t,n)};Object.defineProperty(ri,"__esModule",{value:!0});jj(N0(),ri)});var Vo=T(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.lookupBase=gn.lookupIdentifier=void 0;var Lj=$0(),zn=pe(),Mj=Uo(),qj=t=>{switch(t.type){case zn.ASTType.CallStatement:return(0,gn.lookupIdentifier)(t.expression);case zn.ASTType.CallExpression:return(0,gn.lookupIdentifier)(t.base);case zn.ASTType.Identifier:return t;case zn.ASTType.MemberExpression:return(0,gn.lookupIdentifier)(t.identifier);case zn.ASTType.IndexExpression:return(0,gn.lookupIdentifier)(t.index);default:return null}};gn.lookupIdentifier=qj;var Fj=(t=null)=>{switch(t==null?void 0:t.type){case zn.ASTType.MemberExpression:return t.base;case zn.ASTType.IndexExpression:return t.base;case zn.ASTType.CallExpression:return t.base;case zn.ASTType.SliceExpression:return t.base;default:return null}};gn.lookupBase=Fj;gn.default=new Mj.TypeManager({container:Lj.greyscriptMeta})});var ms=T(ln=>{"use strict";var Nj=ln&&ln.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),$j=ln&&ln.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),U0=ln&&ln.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Nj(e,t,n);return $j(e,t),e};Object.defineProperty(ln,"__esModule",{value:!0});ln.LookupHelper=ln.buildTypeDocument=void 0;var Bj=Yt(),B0=pe(),fs=Uo(),Uj=U0(Yg()),ii=U0(Vo());function Jg(r,i){return V(this,arguments,function*(t,e,n=new Map){let s=t.uri;if(n.has(s))return n.get(s);let o=ii.default.get(s);if(n.set(s,null),!o)return null;let l=[],c=yield e.documentManager.get(t).getImports();yield Promise.all(c.map(u=>V(this,null,function*(){let{document:p,textDocument:d}=u;if(!p)return;let h=yield Jg(d,e,n);h!==null&&l.push(h)})));let a=o.merge(...l);return n.set(s,a),a})}ln.buildTypeDocument=Jg;var Qg=class{constructor(e,n){this.document=e,this.context=n}findAllAssignmentsOfIdentifier(e,n){return ii.default.get(this.document.uri).getScopeContext(n).aggregator.resolveAvailableAssignmentsWithQuery(e)}findAllAssignmentsOfItem(e,n){return ii.default.get(this.document.uri).getScopeContext(n).aggregator.resolveAvailableAssignments(e)}findAllAvailableIdentifierInRoot(){return ii.default.get(this.document.uri).getRootScopeContext().scope.getAllIdentifier()}findAllAvailableIdentifier(e){return ii.default.get(this.document.uri).getScopeContext(e).scope.getAllIdentifier()}findAllAvailableIdentifierRelatedToPosition(e){let n=ii.default.get(this.document.uri),r=new Map,i=n.getScopeContext(e.scope);i.scope.isSelfAvailable()&&r.set("self",{kind:fs.CompletionItemKind.Constant,line:-1}),i.scope.isSuperAvailable()&&r.set("super",{kind:fs.CompletionItemKind.Constant,line:-1});let s=new Map;(0,fs.injectIdentifers)(s,i.scope);let o=Array.from(s.entries()).map(([l,c])=>st({identifier:l},c)).sort((l,c)=>l.line-c.line);for(let l=0;l<o.length;l++){let c=o[l];if(c.line>=e.end.line)break;r.set(c.identifier,{kind:c.kind,line:c.line})}i.scope.locals!==i.scope.globals&&(0,fs.injectIdentifers)(r,i.scope.globals),i.scope.outer&&(0,fs.injectIdentifers)(r,i.scope.outer);for(let l of n.container.getAllIdentifier(Bj.SignatureDefinitionBaseType.General))r.set(...l);return r}lookupAST(e){let n=this,i=this.context.documentManager.get(n.document).document.lines[e.line+1];if(!i)return null;for(let s=0;s<i.length;s++){let o=i[s],l=Uj.findEx((a,u)=>{let p=a.start.line-1,d=a.start.character-1,h=a.end.line-1,m=a.end.character-1;return p>e.line?{exit:!0}:p<h?{valid:e.line>p&&e.line<h||e.line===p&&d<=e.character||e.line===h&&m>=e.character}:{valid:p<=e.line&&d<=e.character&&h>=e.line&&m>=e.character}},o),c=l.pop();if(c)return{closest:c,outer:l}}return null}lookupBasePath(e){return V(this,null,function*(){let n=yield this.buildTypeMap();if(n===null)return null;let r=(0,ii.lookupBase)(e);return r?n.resolveNamespace(r):null})}buildTypeMap(){return V(this,null,function*(){return yield Jg(this.document,this.context)})}lookupTypeInfo(r){return V(this,arguments,function*({closest:e,outer:n}){let i=yield this.buildTypeMap();if(i===null)return null;let s=n.length>0?n[n.length-1]:void 0;return(s==null?void 0:s.type)===B0.ASTType.MemberExpression&&e===s.identifier||(s==null?void 0:s.type)===B0.ASTType.IndexExpression&&e===s.index&&(0,fs.isValidIdentifierLiteral)(e)?i.resolveType(s,!0):i.resolveType(e,!0)})}lookupType(e){let n=this,r=n.lookupAST(e);return r?n.lookupTypeInfo(r):null}};ln.LookupHelper=Qg});var W0=T(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});Bc.AVAILABLE_CONSTANTS=void 0;Bc.AVAILABLE_CONSTANTS=["true","false","null","params","globals","locals","outer"].map(t=>({label:t,kind:21}))});var Uc=T(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.GreyScriptKeyword=void 0;var Wj;(function(t){t.ImportCode="import_code"})(Wj=Ho.GreyScriptKeyword||(Ho.GreyScriptKeyword={}))});var ey=T(Zg=>{"use strict";Object.defineProperty(Zg,"__esModule",{value:!0});var Vj=pe(),V0=Bt(),Hj=Uc(),Xg=class extends V0.LexerValidator{constructor(){super(...arguments),this.isKeyword=Set.prototype.has.bind(new Set([...Object.values(Vj.Keyword),...Object.values(V0.GreybelKeyword),...Object.values(Hj.GreyScriptKeyword)]))}};Zg.default=Xg});var ny=T(zo=>{"use strict";var zj=zo&&zo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zo,"__esModule",{value:!0});var Gj=Bt(),Kj=zj(ey()),ty=class extends Gj.Lexer{constructor(e,n={}){n.validator=n.validator||new Kj.default,super(e,n)}};zo.default=ty});var iy=T(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});Wc.ASTChunkGreyScript=void 0;var Yj=Bt(),ry=class t extends Yj.ASTChunkAdvanced{constructor(e){super(e),this.nativeImports=e.nativeImports||[]}clone(){return new t({nativeImports:this.nativeImports.map(e=>e.clone()),imports:this.imports.map(e=>e.clone()),includes:this.includes.map(e=>e.clone()),literals:this.literals.map(e=>e.clone()),scopes:this.scopes.map(e=>e.clone()),lines:this.lines,start:this.start,end:this.end,scope:this.scope})}};Wc.ASTChunkGreyScript=ry});var sy=T(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.ASTType=void 0;var Qj;(function(t){t.ImportCodeExpression="ImportCodeExpression"})(Qj=Go.ASTType||(Go.ASTType={}))});var ay=T(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.ASTImportCodeExpression=void 0;var Jj=pe(),Xj=sy(),oy=class t extends Jj.ASTBase{constructor(e){super(Xj.ASTType.ImportCodeExpression,e),this.directory=e.directory}toString(){return`ImportCode[${this.start}-${this.end}][${this.directory}]`}clone(){return new t({directory:this.directory,start:this.start,end:this.end,scope:this.scope})}};Vc.ASTImportCodeExpression=oy});var cy=T(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.ASTImportCodeExpression=Mn.ASTChunkGreyScript=Mn.ASTType=Mn.ASTProvider=void 0;var Zj=Bt(),eL=iy(),tL=ay(),ly=class extends Zj.ASTProvider{chunkAdvanced(e){return new eL.ASTChunkGreyScript(e)}importCodeExpression(e){return new tL.ASTImportCodeExpression(e)}};Mn.ASTProvider=ly;var nL=sy();Object.defineProperty(Mn,"ASTType",{enumerable:!0,get:function(){return nL.ASTType}});var rL=iy();Object.defineProperty(Mn,"ASTChunkGreyScript",{enumerable:!0,get:function(){return rL.ASTChunkGreyScript}});var iL=ay();Object.defineProperty(Mn,"ASTImportCodeExpression",{enumerable:!0,get:function(){return iL.ASTImportCodeExpression}})});var H0=T(Ko=>{"use strict";var sL=Ko&&Ko.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ko,"__esModule",{value:!0});var gs=pe(),Ot=Bt(),Hc=Gi(),ys=Ji(),oL=cy(),aL=sL(ny()),lL=Uc(),uy=class extends Ot.Parser{constructor(e,n={}){n.lexer=n.lexer||new aL.default(e,{unsafe:n.unsafe,tabWidth:n.tabWidth}),n.astProvider=n.astProvider||new oL.ASTProvider,super(e,n);let r=this;r.nativeImports=[]}parseStatement(){let e=this;if(e.isType(gs.TokenType.Keyword))switch(e.token.value){case lL.GreyScriptKeyword.ImportCode:e.next();let r=e.parseNativeImportCodeStatement();e.addItemToLines(r),e.backpatches.peek().body.push(r);return;default:break}return super.parseStatement()}parseFunctionDeclaration(e,n=!1,r=!1){let i=this;if(!Ot.Selectors.Function(i.token))return i.parseOr(n,r);i.next();let s=i.previousToken.start,o=i.astProvider.functionStatement({start:s,end:null,scope:i.currentScope,parent:i.outerScopes[i.outerScopes.length-1],assignment:i.currentAssignment}),l=[];if(i.pushScope(o),!Ot.SelectorGroups.BlockEndOfLine(i.token)){for(i.requireToken(Ot.Selectors.LParenthesis,s);!Ot.SelectorGroups.FunctionDeclarationArgEnd(i.token);){let a=i.parseIdentifier(),u=a.start;if(i.consume(Ot.Selectors.Assign)){let p=i.parseExpr(null),d=i.astProvider.assignmentStatement({variable:a,init:p,start:u,end:i.previousToken.end,scope:i.currentScope});i.currentScope.assignments.push(d),l.push(d)}else{let p=i.astProvider.assignmentStatement({variable:a,init:i.astProvider.unknown({start:u,end:i.previousToken.end,scope:i.currentScope}),start:u,end:i.previousToken.end,scope:i.currentScope});i.currentScope.assignments.push(p),l.push(a)}if(Ot.Selectors.RParenthesis(i.token))break;if(i.requireToken(Ot.Selectors.ArgumentSeperator,s),Ot.Selectors.RParenthesis(i.token)){i.raise("expected argument instead received right parenthesis",new ys.Range(i.previousToken.end,i.previousToken.end));break}}i.requireToken(Ot.Selectors.RParenthesis,s)}o.parameters=l;let c=new gs.PendingFunction(o);return i.backpatches.push(c),c.onComplete=a=>{e!==null?(e.end=a.block.end,i.addItemToLines(e)):i.addItemToLines(a.block)},o}parseNativeImportCodeStatement(){var e,n,r,i;let s=this,o=s.previousToken.start;if(!s.consume(Ot.Selectors.LParenthesis))return s.raise("expected import_code to have opening parenthesis",new ys.Range(o,new Hc.Position((e=s.token.lastLine)!==null&&e!==void 0?e:s.token.line,s.token.end.character))),s.parseInvalidCode();let l;if(gs.TokenType.StringLiteral===s.token.type)l=s.token.value,s.next();else return s.raise("expected import_code argument to be string literal",new ys.Range(o,new Hc.Position((n=s.token.lastLine)!==null&&n!==void 0?n:s.token.line,s.token.end.character))),s.parseInvalidCode();if(s.consume(Ot.Selectors.ImportCodeSeperator)){if(!s.isType(gs.TokenType.StringLiteral))return s.raise("expected import_code argument to be string literal",new ys.Range(o,new Hc.Position((r=s.token.lastLine)!==null&&r!==void 0?r:s.token.line,s.token.end.character))),s.parseInvalidCode();l=s.token.value,console.warn("Warning: Second import_code argument is deprecated. Use the first argument for the file system path instead."),s.next()}if(!s.consume(Ot.Selectors.RParenthesis))return s.raise("expected import_code to have closing parenthesis",new ys.Range(o,new Hc.Position((i=s.token.lastLine)!==null&&i!==void 0?i:s.token.line,s.token.end.character))),s.parseInvalidCode();let c=s.astProvider.importCodeExpression({directory:l,start:o,end:s.previousToken.end,scope:s.currentScope});return s.nativeImports.push(c),c}parseChunk(){let e=this;e.next();let n=e.token.start,r=e.astProvider.chunkAdvanced({start:n,end:null}),i=new gs.PendingChunk(r);for(e.backpatches.setDefault(i),e.pushScope(r);!Ot.Selectors.EndOfFile(e.token)&&(e.skipNewlines(),!Ot.Selectors.EndOfFile(e.token));)e.lexer.recordSnapshot(),e.statementErrors=[],e.parseStatement(),e.statementErrors.length>0&&e.tryToRecover();let s=e.backpatches.pop();for(;!(0,gs.isPendingChunk)(s);){let o=e.raise(`found open block ${s.block.type}`,new ys.Range(s.block.start,s.block.start));if(s.complete(e.previousToken),e.errors.push(o),!e.unsafe)throw o;s=e.backpatches.pop()}return e.finishRemaingScopes(),e.popScope(),i.complete(e.token),r.literals=e.literals,r.scopes=e.scopes,r.lines=e.lines,r.nativeImports=e.nativeImports,r.imports=e.imports,r.includes=e.includes,r.injects=e.injects,r}};Ko.default=uy});var Gn=T(Et=>{"use strict";var cL=Et&&Et.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),z0=Et&&Et.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&cL(e,t,n)},dy=Et&&Et.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Et,"__esModule",{value:!0});Et.Parser=Et.LexerValidator=Et.Lexer=void 0;var uL=ny();Object.defineProperty(Et,"Lexer",{enumerable:!0,get:function(){return dy(uL).default}});var dL=ey();Object.defineProperty(Et,"LexerValidator",{enumerable:!0,get:function(){return dy(dL).default}});var pL=H0();Object.defineProperty(Et,"Parser",{enumerable:!0,get:function(){return dy(pL).default}});z0(cy(),Et);z0(Uc(),Et)});var G0=T(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.AVAILABLE_KEYWORDS=void 0;var bs=Bt(),hL=Gn(),Ct=pe();zc.AVAILABLE_KEYWORDS=[Ct.Keyword.If,Ct.Keyword.In,Ct.Keyword.Or,Ct.Keyword.And,Ct.Keyword.Isa,Ct.Keyword.For,Ct.Keyword.New,Ct.Keyword.Not,Ct.Keyword.End,Ct.Keyword.Then,Ct.Keyword.Else,Ct.Keyword.Break,Ct.Keyword.While,Ct.Keyword.Return,Ct.Keyword.Function,Ct.Keyword.Continue,hL.GreyScriptKeyword.ImportCode,bs.GreybelKeyword.Envar,bs.GreybelKeyword.Import,bs.GreybelKeyword.Include,bs.GreybelKeyword.Debugger,bs.GreybelKeyword.Line,bs.GreybelKeyword.File].map(t=>({label:t,kind:14}))});var K0=T(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.AVAILABLE_OPERATORS=void 0;var Yo=ps(),mt=pe();Gc.AVAILABLE_OPERATORS=[mt.Operator.Plus,mt.Operator.Asterik,mt.Operator.Minus,mt.Operator.Slash,mt.Operator.Power,mt.Operator.Modulo,mt.Operator.LessThan,mt.Operator.GreaterThan,mt.Operator.LessThanOrEqual,mt.Operator.GreaterThanOrEqual,mt.Operator.NotEqual,mt.Operator.Equal,mt.Operator.AddShorthand,mt.Operator.SubtractShorthand,mt.Operator.MultiplyShorthand,mt.Operator.DivideShorthand,Yo.Operator.BitwiseAnd,Yo.Operator.BitwiseOr,Yo.Operator.LeftShift,Yo.Operator.RightShift,Yo.Operator.UnsignedRightShift,mt.Operator.Assign,mt.Operator.Reference].map(t=>({label:t,kind:24}))});var J0=T(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.activate=ut.getDefaultCompletionList=ut.getPropertyCompletionList=ut.transformToCompletionItems=void 0;var Y0=pe(),fL=Gg(),Q0=ms(),mL=W0(),gL=G0(),yL=K0(),bL=t=>{let e=[];for(let[n,r]of t)e.push({label:n,kind:(0,fL.getCompletionItemKind)(r.kind)});return e};ut.transformToCompletionItems=bL;var vL=(t,e)=>V(ut,null,function*(){let n=yield t.lookupBasePath(e);return n===null?[]:(0,ut.transformToCompletionItems)(n.getAllIdentifier())});ut.getPropertyCompletionList=vL;var _L=()=>[...gL.AVAILABLE_KEYWORDS,...yL.AVAILABLE_OPERATORS,...mL.AVAILABLE_CONSTANTS];ut.getDefaultCompletionList=_L;function wL(t){t.connection.onCompletion(e=>V(this,null,function*(){if(!t.getConfiguration().autocomplete)return;let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;let r=yield t.documentManager.getLatest(n),i=new Q0.LookupHelper(r.textDocument,t),s=i.lookupAST(e.position),o=[],l=!1;if(s){let{closest:u}=s;u instanceof Y0.ASTMemberExpression?(o.push(...yield(0,ut.getPropertyCompletionList)(i,u)),l=!0):u instanceof Y0.ASTIndexExpression?(o.push(...yield(0,ut.getPropertyCompletionList)(i,u)),l=!0):o.push(...(0,ut.getDefaultCompletionList)())}else o.push(...(0,ut.getDefaultCompletionList)()),o.push(...(0,ut.transformToCompletionItems)(i.findAllAvailableIdentifierInRoot()));if(!s||l)return o;let c=new Set([...o.map(u=>u.label)]),a=yield r.getImports();for(let u of a){let{document:p}=u;if(!p)continue;let d=new Q0.LookupHelper(u.textDocument,t);o.push(...(0,ut.transformToCompletionItems)(d.findAllAvailableIdentifier(p)).filter(h=>!c.has(h.label)).map(h=>(c.add(h.label),h)))}return o.push(...(0,ut.transformToCompletionItems)(i.findAllAvailableIdentifierRelatedToPosition(s.closest)).filter(u=>!c.has(u.label))),o})),t.connection.onCompletionResolve(e=>e)}ut.activate=wL});var Z0=T((UU,X0)=>{"use strict";X0.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var py=T((WU,tT)=>{var Qo=Z0(),eT={};for(let t of Object.keys(Qo))eT[Qo[t]]=t;var z={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};tT.exports=z;for(let t of Object.keys(z)){if(!("channels"in z[t]))throw new Error("missing channels property: "+t);if(!("labels"in z[t]))throw new Error("missing channel labels property: "+t);if(z[t].labels.length!==z[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:n}=z[t];delete z[t].channels,delete z[t].labels,Object.defineProperty(z[t],"channels",{value:e}),Object.defineProperty(z[t],"labels",{value:n})}z.rgb.hsl=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=s-i,l,c;s===i?l=0:e===s?l=(n-r)/o:n===s?l=2+(r-e)/o:r===s&&(l=4+(e-n)/o),l=Math.min(l*60,360),l<0&&(l+=360);let a=(i+s)/2;return s===i?c=0:a<=.5?c=o/(s+i):c=o/(2-s-i),[l,c*100,a*100]};z.rgb.hsv=function(t){let e,n,r,i,s,o=t[0]/255,l=t[1]/255,c=t[2]/255,a=Math.max(o,l,c),u=a-Math.min(o,l,c),p=function(d){return(a-d)/6/u+1/2};return u===0?(i=0,s=0):(s=u/a,e=p(o),n=p(l),r=p(c),o===a?i=r-n:l===a?i=1/3+e-r:c===a&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,a*100]};z.rgb.hwb=function(t){let e=t[0],n=t[1],r=t[2],i=z.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[i,s*100,r*100]};z.rgb.cmyk=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(1-e,1-n,1-r),s=(1-e-i)/(1-i)||0,o=(1-n-i)/(1-i)||0,l=(1-r-i)/(1-i)||0;return[s*100,o*100,l*100,i*100]};function xL(t,e){return it(t[0]-e[0],2)+it(t[1]-e[1],2)+it(t[2]-e[2],2)}z.rgb.keyword=function(t){let e=eT[t];if(e)return e;let n=1/0,r;for(let i of Object.keys(Qo)){let s=Qo[i],o=xL(t,s);o<n&&(n=o,r=i)}return r};z.keyword.rgb=function(t){return Qo[t]};z.rgb.xyz=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255;e=e>.04045?it((e+.055)/1.055,2.4):e/12.92,n=n>.04045?it((n+.055)/1.055,2.4):n/12.92,r=r>.04045?it((r+.055)/1.055,2.4):r/12.92;let i=e*.4124+n*.3576+r*.1805,s=e*.2126+n*.7152+r*.0722,o=e*.0193+n*.1192+r*.9505;return[i*100,s*100,o*100]};z.rgb.lab=function(t){let e=z.rgb.xyz(t),n=e[0],r=e[1],i=e[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?it(n,1/3):7.787*n+16/116,r=r>.008856?it(r,1/3):7.787*r+16/116,i=i>.008856?it(i,1/3):7.787*i+16/116;let s=116*r-16,o=500*(n-r),l=200*(r-i);return[s,o,l]};z.hsl.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i,s,o;if(n===0)return o=r*255,[o,o,o];r<.5?i=r*(1+n):i=r+n-r*n;let l=2*r-i,c=[0,0,0];for(let a=0;a<3;a++)s=e+1/3*-(a-1),s<0&&s++,s>1&&s--,6*s<1?o=l+(i-l)*6*s:2*s<1?o=i:3*s<2?o=l+(i-l)*(2/3-s)*6:o=l,c[a]=o*255;return c};z.hsl.hsv=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,i=n,s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=s<=1?s:2-s;let o=(r+n)/2,l=r===0?2*i/(s+i):2*n/(r+n);return[e,l*100,o*100]};z.hsv.rgb=function(t){let e=t[0]/60,n=t[1]/100,r=t[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*r*(1-n),l=255*r*(1-n*s),c=255*r*(1-n*(1-s));switch(r*=255,i){case 0:return[r,c,o];case 1:return[l,r,o];case 2:return[o,r,c];case 3:return[o,l,r];case 4:return[c,o,r];case 5:return[r,o,l]}};z.hsv.hsl=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,i=Math.max(r,.01),s,o;o=(2-n)*r;let l=(2-n)*i;return s=n*i,s/=l<=1?l:2-l,s=s||0,o/=2,[e,s*100,o*100]};z.hwb.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=n+r,s;i>1&&(n/=i,r/=i);let o=Math.floor(6*e),l=1-r;s=6*e-o,o&1&&(s=1-s);let c=n+s*(l-n),a,u,p;switch(o){default:case 6:case 0:a=l,u=c,p=n;break;case 1:a=c,u=l,p=n;break;case 2:a=n,u=l,p=c;break;case 3:a=n,u=c,p=l;break;case 4:a=c,u=n,p=l;break;case 5:a=l,u=n,p=c;break}return[a*255,u*255,p*255]};z.cmyk.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100,s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),l=1-Math.min(1,r*(1-i)+i);return[s*255,o*255,l*255]};z.xyz.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,i,s,o;return i=e*3.2406+n*-1.5372+r*-.4986,s=e*-.9689+n*1.8758+r*.0415,o=e*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*it(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*it(s,1/2.4)-.055:s*12.92,o=o>.0031308?1.055*it(o,1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};z.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];e/=95.047,n/=100,r/=108.883,e=e>.008856?it(e,1/3):7.787*e+16/116,n=n>.008856?it(n,1/3):7.787*n+16/116,r=r>.008856?it(r,1/3):7.787*r+16/116;let i=116*n-16,s=500*(e-n),o=200*(n-r);return[i,s,o]};z.lab.xyz=function(t){let e=t[0],n=t[1],r=t[2],i,s,o;s=(e+16)/116,i=n/500+s,o=s-r/200;let l=it(s,3),c=it(i,3),a=it(o,3);return s=l>.008856?l:(s-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=a>.008856?a:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};z.lab.lch=function(t){let e=t[0],n=t[1],r=t[2],i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);let o=Math.sqrt(n*n+r*r);return[e,o,i]};z.lch.lab=function(t){let e=t[0],n=t[1],i=t[2]/360*2*Math.PI,s=n*Math.cos(i),o=n*Math.sin(i);return[e,s,o]};z.rgb.ansi16=function(t,e=null){let[n,r,i]=t,s=e===null?z.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return s===2&&(o+=60),o};z.hsv.ansi16=function(t){return z.rgb.ansi16(z.hsv.rgb(t),t[2])};z.rgb.ansi256=function(t){let e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};z.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let n=(~~(t>50)+1)*.5,r=(e&1)*n*255,i=(e>>1&1)*n*255,s=(e>>2&1)*n*255;return[r,i,s]};z.ansi256.rgb=function(t){if(t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,n=Math.floor(t/36)/5*255,r=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[n,r,i]};z.rgb.hex=function(t){let n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};z.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let n=e[0];e[0].length===3&&(n=n.split("").map(l=>l+l).join(""));let r=parseInt(n,16),i=r>>16&255,s=r>>8&255,o=r&255;return[i,s,o]};z.rgb.hcg=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.max(Math.max(e,n),r),s=Math.min(Math.min(e,n),r),o=i-s,l,c;return o<1?l=s/(1-o):l=0,o<=0?c=0:i===e?c=(n-r)/o%6:i===n?c=2+(r-e)/o:c=4+(e-n)/o,c/=6,c%=1,[c*360,o*100,l*100]};z.hsl.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[t[0],r*100,i*100]};z.hsv.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=e*n,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],r*100,i*100]};z.hcg.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];let i=[0,0,0],s=e%1*6,o=s%1,l=1-o,c=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=l,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=l,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=l}return c=(1-n)*r,[(n*i[0]+c)*255,(n*i[1]+c)*255,(n*i[2]+c)*255]};z.hcg.hsv=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e),i=0;return r>0&&(i=e/r),[t[0],i*100,r*100]};z.hcg.hsl=function(t){let e=t[1]/100,r=t[2]/100*(1-e)+.5*e,i=0;return r>0&&r<.5?i=e/(2*r):r>=.5&&r<1&&(i=e/(2*(1-r))),[t[0],i*100,r*100]};z.hcg.hwb=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]};z.hwb.hcg=function(t){let e=t[1]/100,r=1-t[2]/100,i=r-e,s=0;return i<1&&(s=(r-i)/(1-i)),[t[0],i*100,s*100]};z.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};z.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};z.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};z.gray.hsl=function(t){return[0,0,t[0]]};z.gray.hsv=z.gray.hsl;z.gray.hwb=function(t){return[0,100,t[0]]};z.gray.cmyk=function(t){return[0,0,0,t[0]]};z.gray.lab=function(t){return[t[0],0,0]};z.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(r.length)+r};z.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var rT=T((HU,nT)=>{var Kc=py();function SL(){let t={},e=Object.keys(Kc);for(let n=e.length,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}function kL(t){let e=SL(),n=[t];for(e[t].distance=0;n.length;){let r=n.pop(),i=Object.keys(Kc[r]);for(let s=i.length,o=0;o<s;o++){let l=i[o],c=e[l];c.distance===-1&&(c.distance=e[r].distance+1,c.parent=r,n.unshift(l))}}return e}function TL(t,e){return function(n){return e(t(n))}}function IL(t,e){let n=[e[t].parent,t],r=Kc[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),r=TL(Kc[e[i].parent][i],r),i=e[i].parent;return r.conversion=n,r}nT.exports=function(t){let e=kL(t),n={},r=Object.keys(e);for(let i=r.length,s=0;s<i;s++){let o=r[s];e[o].parent!==null&&(n[o]=IL(o,e))}return n}});var sT=T((zU,iT)=>{var hy=py(),EL=rT(),vs={},CL=Object.keys(hy);function RL(t){let e=function(...n){let r=n[0];return r==null?r:(r.length>1&&(n=r),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function PL(t){let e=function(...n){let r=n[0];if(r==null)return r;r.length>1&&(n=r);let i=t(n);if(typeof i=="object")for(let s=i.length,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}CL.forEach(t=>{vs[t]={},Object.defineProperty(vs[t],"channels",{value:hy[t].channels}),Object.defineProperty(vs[t],"labels",{value:hy[t].labels});let e=EL(t);Object.keys(e).forEach(r=>{let i=e[r];vs[t][r]=PL(i),vs[t][r].raw=RL(i)})});iT.exports=vs});var aT=T(_s=>{"use strict";var AL=_s&&_s.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_s,"__esModule",{value:!0});_s.activate=void 0;var fy=AL(sT()),OL=pe(),oT;(function(t){t.Black="black",t.Blue="blue",t.Green="green",t.Orange="orange",t.Purple="purple",t.Red="red",t.White="white",t.Yellow="yellow"})(oT||(oT={}));var my={black:"#000000",blue:"#0000FF",green:"#00FF00",orange:"#FF8800",purple:"#CC8899",red:"#FF0000",white:"#FFFFFF",yellow:"#FFFF00"},DL=()=>new RegExp(`(?:mark|color)=(${Object.keys(my).join("|")}|(?:#[0-9a-f]{6}|#[0-9a-f]{3}))`,"ig"),jL=Object.prototype.hasOwnProperty;function LL(t){t.connection.onColorPresentation(e=>[{label:`#${fy.default.rgb.hex(e.color.red*255,e.color.green*255,e.color.blue*255)}`}]),t.connection.onDocumentColor(e=>V(this,null,function*(){let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;let s=(yield t.documentManager.getLatest(n)).document.literals.filter(c=>c.type===OL.ASTType.StringLiteral),o=[],l=({match:c,markup:a,value:u,astPosition:p,lineIndex:d})=>{let h=c.index+a.indexOf("=")+1,m=h+u.length,f=p.line-1+d,g=h,b=m;return d===0&&(g+=p.character,b+=p.character),{start:{line:f,character:g},end:{line:f,character:b}}};for(let c=0;c<s.length;c++){let a=s[c];if(!a.start)continue;let u=a.start,p=a.value.toString().split(`
106
+ `)}else if(i instanceof we.ASTComment)return i.value;return n}resolveFunctionStatement(e){let n=me.SignatureDefinitionFunction.parse({type:me.SignatureDefinitionBaseType.Function,description:this.createFunctionDescription(e),arguments:e.parameters.map(r=>{var s,o,l;if(r.type===we.ASTType.Identifier)return{label:(s=r.name)!=null?s:"unknown",type:me.SignatureDefinitionBaseType.Any};let i=r;return{label:(l=(o=i.variable)==null?void 0:o.name)!=null?l:"unknown",types:Array.from(this.resolveTypeWithDefault(i.init).types)}}),returns:["any"]});return this.factory(ue.CompletionItemKind.Function).addType(me.SignatureDefinitionBaseType.Function).addSignatureType((0,nO.enrichWithMetaInformation)(n)).setLine(e.start.line)}resolveParenthesisExpression(e){return this.resolveTypeWithDefault(e.expression)}resolveBinaryExpression(e){let n=this.factory(ue.CompletionItemKind.Expression).setLabel("Binary Expr").setLine(e.start.line),r=this.resolveTypeWithDefault(e.left),i=this.resolveTypeWithDefault(e.right);return n.extend(r),n.extend(i),n}resolveLogicalExpression(e){return this.factory(ue.CompletionItemKind.Expression).setLabel("Logical Expr").addType(me.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveComparisonGroupExpression(e){return this.factory(ue.CompletionItemKind.Expression).setLabel("Comparison Group Expr").addType(me.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveIsaExpression(e){return this.factory(ue.CompletionItemKind.Expression).setLabel("Isa Expr").addType(me.SignatureDefinitionBaseType.Number).setLine(e.start.line)}resolveCallStatement(e){let n=this.resolveNamespace(e);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveCallExpression(e){let n=this.resolveNamespace(e);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveUnaryExpression(e){let n=this.resolveNamespace(e);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveMapConstructorExpression(e){let n=this.factory(ue.CompletionItemKind.MapConstructor).addType(me.SignatureDefinitionBaseType.Map);for(let r=0;r<e.fields.length;r++){let i=e.fields[r],s=this.resolveTypeWithDefault(i.value).setLine(i.start.line);if(i.key.type===we.ASTType.StringLiteral)n.setProperty(i.key.value.toString(),s);else{let o=this.resolveTypeWithDefault(i.key).setLine(i.start.line);n.setProperty(o,s)}}return n.setLabel("{}").setLine(e.start.line)}resolveListConstructorExpression(e){let n=this.factory(ue.CompletionItemKind.ListConstructor).addType(me.SignatureDefinitionBaseType.List);for(let r=0;r<e.fields.length;r++){let i=e.fields[r],s=this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Number).setLine(i.start.line),o=this.resolveTypeWithDefault(i.value).setLine(i.start.line);n.setProperty(s,o)}return n.setLabel("[]").setLine(e.start.line)}resolveSliceExpression(e){let n=this.resolveNamespace(e).setLine(e.start.line);return n===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):n}resolveIndexExpression(e,n=!1){let r=this.resolveNamespace(e,n);return r===null?this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line):r}resolveMemberExpression(e,n=!1){let r=this.resolveNamespace(e,n);return r===null?this.factory(ue.CompletionItemKind.Property).addType(me.SignatureDefinitionBaseType.Any).setLabel(e.identifier.name).setLine(e.start.line):r}resolveIdentifier(e,n=!1){let r=this.resolveNamespace(e,n);return r===null?this.factory(ue.CompletionItemKind.Property).addType(me.SignatureDefinitionBaseType.Any).setLabel(e.name).setLine(e.start.line):r}resolveType(e,n=!1){if(e==null)return null;switch(e.type){case we.ASTType.ParenthesisExpression:return this.resolveParenthesisExpression(e);case we.ASTType.CallStatement:return this.resolveCallStatement(e);case we.ASTType.CallExpression:return this.resolveCallExpression(e);case we.ASTType.BinaryExpression:return this.resolveBinaryExpression(e);case we.ASTType.LogicalExpression:return this.resolveLogicalExpression(e);case we.ASTType.IsaExpression:return this.resolveIsaExpression(e);case we.ASTType.ComparisonGroupExpression:return this.resolveComparisonGroupExpression(e);case we.ASTType.FunctionDeclaration:return this.resolveFunctionStatement(e);case we.ASTType.SliceExpression:return this.resolveSliceExpression(e);case we.ASTType.IndexExpression:return this.resolveIndexExpression(e,n);case we.ASTType.MemberExpression:return this.resolveMemberExpression(e,n);case we.ASTType.Identifier:return this.resolveIdentifier(e,n);case we.ASTType.MapConstructorExpression:return this.resolveMapConstructorExpression(e);case we.ASTType.ListConstructorExpression:return this.resolveListConstructorExpression(e);case we.ASTType.NegationExpression:case we.ASTType.BinaryNegatedExpression:case we.ASTType.UnaryExpression:return this.resolveUnaryExpression(e);case we.ASTType.NilLiteral:return this.factory(ue.CompletionItemKind.Literal).addType("null").setLabel("null").setLine(e.start.line);case we.ASTType.StringLiteral:{let r=e.value.toString();return this.factory(ue.CompletionItemKind.Literal).addType(me.SignatureDefinitionBaseType.String).setLabel(`"${r.length>20?r.substr(0,20)+"...":r}"`).setLine(e.start.line)}case we.ASTType.NumericLiteral:case we.ASTType.BooleanLiteral:{let r=e.value.toString();return this.factory(ue.CompletionItemKind.Literal).addType(me.SignatureDefinitionBaseType.Number).setLabel(r).setLine(e.start.line)}case jc.ASTType.FeatureFileExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.String).setLabel("File Expr").setLine(e.start.line);case jc.ASTType.FeatureLineExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.Number).setLabel("Line Expr").setLine(e.start.line);case jc.ASTType.FeatureEnvarExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.String).setLabel("Envar Expr").setLine(e.start.line);case jc.ASTType.FeatureInjectExpression:return this.factory(ue.CompletionItemKind.Expression).addType(me.SignatureDefinitionBaseType.String).setLabel("Inject Expr").setLine(e.start.line);default:return null}}resolveTypeWithDefault(e,n=!1){var r;return(r=this.resolveType(e,n))!=null?r:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(e.start.line)}resolveChain(e,n=!1){var l,c,a,u,p,d,h,m,f,g,b;if(e.length===0)return null;let r=null,i=e[0],s=((l=i.unary)==null?void 0:l.operator)==="@"&&!i.isInCallExpression||n&&e.length===1;if((0,ni.isResolveChainItemWithIdentifier)(i))if(i.getter.name==="globals")r=this._scope.globals;else if(i.getter.name==="outer")r=this._scope.outer;else if(i.getter.name==="locals")r=this._scope.locals;else if(i.getter.name==="super"){let v=(a=(c=this._document.getScopeContext(i.ref.scope))==null?void 0:c.scope.context)==null?void 0:a.values.get("i:__isa");v==null?r=this.factory(ue.CompletionItemKind.Constant).addType("null").setLabel("super"):r=v.copy({kind:ue.CompletionItemKind.Constant,label:"super",values:v.values})}else if(i.getter.name==="self"){let v=(u=this._document.getScopeContext(i.ref.scope))==null?void 0:u.scope.context;v==null?r=this.factory(ue.CompletionItemKind.Constant).addType("null").setLabel("self"):r=v.copy({kind:ue.CompletionItemKind.Constant,label:"self",values:v.values})}else r=(p=this._scope.resolveNamespace(i.getter.name,s))!=null?p:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLabel(i.getter.name);else if((0,ni.isResolveChainItemWithValue)(i))r=this.resolveTypeWithDefault(i.value,s);else return null;if(((d=i.unary)==null?void 0:d.operator)==="new"&&r!==null){let v=this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Map).setLabel(r.label);v.setProperty("__isa",r),r=v}let o=e.length;for(let v=1;v<o&&r!==null;v++){let _=e[v],w=((h=_.unary)==null?void 0:h.operator)==="@"&&!_.isInCallExpression||n&&e.length-1===v;if((0,ni.isResolveChainItemWithMember)(_))r=(m=r.resolveProperty(_.getter.name,w))!=null?m:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLabel(_.getter.name);else if((0,ni.isResolveChainItemWithIndex)(_))if((0,Ck.isValidIdentifierLiteral)(_.getter)){let S=_.getter.value.toString();r=(f=r.resolveProperty(S,_.isInCallExpression))!=null?f:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLabel(S)}else{let S=this.resolveTypeWithDefault(_.getter);r=(g=r.resolveProperty(S,_.isInCallExpression))!=null?g:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any)}else if(_.ref.type===we.ASTType.SliceExpression)r=r.copy();else return null;if(((b=_.unary)==null?void 0:b.operator)==="new"&&r!==null){let S=this.factory(ue.CompletionItemKind.Property).addType(me.SignatureDefinitionBaseType.Map).setLabel(r.label);S.setProperty("__isa",r),r=S}}return r}resolveNamespace(e,n=!1){let r=(0,Ek.createResolveChain)(e);return this.resolveChain(r,n)}defineNamespace(e,n){let r=(0,Ek.createResolveChain)(e),i=r.pop();if(r.length>0){let o=this.resolveChain(r);if(o===null)return!1;if((0,ni.isResolveChainItemWithMember)(i))return o.setProperty(i.getter.name,n);if((0,ni.isResolveChainItemWithIndex)(i)){if((0,Ck.isValidIdentifierLiteral)(i.getter))return o.setProperty(i.getter.value.toString(),n);{let l=this.resolveTypeWithDefault(i.getter);return o.setProperty(l,n)}}return!1}let s=this._scope;return(0,ni.isResolveChainItemWithIdentifier)(i)?s.setProperty(i.getter.name,n):!1}resolveAvailableAssignmentsWithQuery(e){let n=[],r=new Set([this,this._parent,this._document.getRootScopeContext().aggregator]);for(let i of r){let s=i.definitions;for(let o of s.keys())if(o.includes(e)){let l=s.get(o);n.push(...l)}}return n}resolveAvailableAssignments(e){let n=(0,Ik.createExpressionId)(e),r=this;n.startsWith("globals.")?(r=this._document.getRootScopeContext().aggregator,n=n.slice(8)):n.startsWith("locals.")?(r=this,n=n.slice(7)):n.startsWith("outer.")&&(r=this.parent,n=n.slice(6));let i=[],s=new Set([r,r._parent,r._document.getRootScopeContext().aggregator]);for(let o of s){if(o==null)continue;let l=o._definitions.get(n);l!=null&&i.push(...l)}return i}analyze(){var e,n;for(let r=0;r<this._root.assignments.length;r++){let i=this._root.assignments[r],s=(n=(e=this.resolveType(i.init))==null?void 0:e.copy().setLine(i.start.line))!=null?n:this.factory(ue.CompletionItemKind.Variable).addType(me.SignatureDefinitionBaseType.Any).setLine(i.start.line);this.defineNamespace(i.variable,s);let o=(0,Ik.createExpressionId)(i.variable),l=this._definitions;o.startsWith("globals.")?(l=this._document.getRootScopeContext().aggregator.definitions,o=o.slice(8)):o.startsWith("locals.")?(l=this._definitions,o=o.slice(7)):o.startsWith("outer.")&&(l=this.parent.definitions,o=o.slice(6));let c=l.get(o);c?c.push(i):l.set(o,[i])}}};Lc.Aggregator=Fg});var Bg=T(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});Mc.Document=void 0;var Hn=Yt(),iO=pe(),Rk=Jr(),Pk=Ng(),Ak=us(),Ok=yg(),$g=class t{get root(){return this._root}get container(){return this._container}get intrinsics(){return this._intrinscis}get globals(){return this._globals}get api(){return this._api}constructor(e){var n,r,i,s;this._root=e.root,this._container=e.container,this._scopeMapping=(n=e.scopeMapping)!=null?n:new WeakMap,this._intrinscis=(r=e.intrinsics)!=null?r:this.createIntrinscis(),this._api=(i=e.api)!=null?i:this.initApi(),this._globals=(s=e.globals)!=null?s:this.initGlobals()}createIntrinscis(){return{map:this._container.primitives.get(Hn.SignatureDefinitionBaseType.Map),funcRef:this._container.primitives.get(Hn.SignatureDefinitionBaseType.Function),number:this._container.primitives.get(Hn.SignatureDefinitionBaseType.Number),string:this._container.primitives.get(Hn.SignatureDefinitionBaseType.String),list:this._container.primitives.get(Hn.SignatureDefinitionBaseType.List)}}initApi(){let e=this._container.primitives.get(Hn.SignatureDefinitionBaseType.General);return e.resolveProperty("map",!0).setReturnEntity(this._intrinscis.map),e.resolveProperty("funcRef",!0).setReturnEntity(this._intrinscis.funcRef),e.resolveProperty("number",!0).setReturnEntity(this._intrinscis.number),e.resolveProperty("string",!0).setReturnEntity(this._intrinscis.string),e.resolveProperty("list",!0).setReturnEntity(this._intrinscis.list),e}initGlobals(){return new Ak.Entity({kind:Rk.CompletionItemKind.Constant,container:this._container,label:"globals"}).addType(Hn.SignatureDefinitionBaseType.Map)}analyzeScope(e){let n=this._scopeMapping.get(e.scope),r=new Ok.Scope({container:this._container,parent:n==null?void 0:n.scope,globals:this._globals}),i=new Pk.Aggregator({scope:r,root:e,document:this,parent:n==null?void 0:n.aggregator});this._scopeMapping.set(e,{scope:r,aggregator:i});let s=e.assignment instanceof iO.ASTAssignmentStatement?this.resolveNamespace(e.assignment.variable,!0):null;if(s!==null){let o=s==null?void 0:s.context;o!=null&&o.types.has(Hn.SignatureDefinitionBaseType.Map)&&o!==this._globals&&r.setContext(o)}if(i.analyze(),s!==null){let o=s.signatureDefinitions.last();if(o!=null){let l=o.getArguments();for(let c=0;c<l.length;c++){let a=l[c],u=r.resolveProperty(a.getLabel(),!0),p=a.getTypes().map(d=>d.type);u===null?r.setProperty(a.getLabel(),new Ak.Entity({kind:Rk.CompletionItemKind.Variable,container:this._container}).addType(...p)):(u.types.delete(Hn.SignatureDefinitionBaseType.Any),u.addType(...p))}}}}analyze(){let e=new Ok.Scope({container:this._container,globals:this._globals,locals:this._globals}),n=new Pk.Aggregator({scope:e,root:this._root,document:this});this._scopeMapping.set(this._root,{scope:e,aggregator:n}),n.analyze();for(let r=0;r<this._root.scopes.length;r++){let i=this._root.scopes[r];this.analyzeScope(i)}}getRootScopeContext(){return this._scopeMapping.get(this._root)}getAllScopeContexts(){return[this._root,...this._root.scopes].map(e=>this._scopeMapping.get(e))}getScopeContext(e){var n;return(n=this._scopeMapping.get(e))!=null?n:null}getLastASTItemOfLine(e){let n=this._root.lines[e];return n&&n.length>0?n[n.length-1]:null}findASTItemInLine(e,n){let r=this._root.lines[e];if(r&&r.length>0){let i=r.find(s=>s.type===n);if(i)return i}return null}resolveAllAssignmentsWithQuery(e){let n=[],r=[this._root,...this._root.scopes];for(let i=0;i<r.length;i++){let o=this._scopeMapping.get(r[i]).aggregator.definitions;for(let l of o.keys())if(l.includes(e)){let c=o.get(l);n.push(...c)}}return n}resolveAvailableAssignments(e){var n,r;return(r=(n=this._scopeMapping.get(e.scope))==null?void 0:n.aggregator.resolveAvailableAssignments(e))!=null?r:[]}resolveType(e,n){var r,i;return(i=(r=this._scopeMapping.get(e.scope))==null?void 0:r.aggregator.resolveType(e,n))!=null?i:null}resolveTypeWithDefault(e,n){var r;return(r=this._scopeMapping.get(e.scope))==null?void 0:r.aggregator.resolveTypeWithDefault(e,n)}resolveNamespace(e,n=!1){var r,i;return(i=(r=this._scopeMapping.get(e.scope))==null?void 0:r.aggregator.resolveNamespace(e,n))!=null?i:null}merge(...e){let n=new t({root:this._root,container:this._container.copy()});for(let r of e)n._globals.extend(r._globals.copy({line:-1})),n._intrinscis.map.extend(r._intrinscis.map.copy({line:-1})),n._intrinscis.funcRef.extend(r._intrinscis.funcRef.copy({line:-1})),n._intrinscis.number.extend(r._intrinscis.number.copy({line:-1})),n._intrinscis.string.extend(r._intrinscis.string.copy({line:-1})),n._intrinscis.list.extend(r._intrinscis.list.copy({line:-1}));return n.analyze(),n}};Mc.Document=$g});var Vg=T(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.ContainerProxy=void 0;var Ln=Yt(),Rr=us(),Dk=Jr(),jk=Ro(),Ug=Tc(),Wg=class t{get primitives(){return this._primitives}get types(){return this._types}constructor(e){var n,r;this._container=e.container,this._primitives=(n=e.primitives)!=null?n:this.createPrimitives(),this._types=(r=e.types)!=null?r:this.createTypes()}createPrimitives(){let e=new Map;for(let[n,r]of this._container.getPrimitives()){let i=new Rr.Entity({kind:Dk.CompletionItemKind.Constant,container:this,isAPI:n===Ln.SignatureDefinitionBaseType.General}).addType(Ln.SignatureDefinitionBaseType.Map).insertSignature(r);e.set(n,i)}return e}createTypes(){let e=new Map;for(let[n,r]of this._container.getTypes()){let i=new Rr.Entity({kind:Dk.CompletionItemKind.Constant,container:this}).addType(Ln.SignatureDefinitionBaseType.Map).insertSignature(r);e.set(n,i)}return e}getTypeSignature(e){var n,r;return(r=(n=this._primitives.get(e))!=null?n:this._types.get(e))!=null?r:null}searchDefinitionMatches(e,n){if(typeof e=="string")return this.searchDefinitionMatches([e],n);let r=e.includes(Ln.SignatureDefinitionBaseType.Any)?new Set(this._container.getAllVisibleTypes()):new Set(e),i=new Map;for(let s of r){let o=this.getTypeSignature(s);if(o===null)continue;let l=(0,Ug.lookupProperty)(o,n);l!==null&&i.set(s,l)}return i}getDefinition(e,n,r=!1){if(typeof e=="string")return this.getDefinition([e],n);let i=(0,Ug.lookupProperty)(this._primitives.get(Ln.SignatureDefinitionBaseType.Any),n);if(e.includes(Ln.SignatureDefinitionBaseType.Any)&&i)return(0,Rr.resolveEntity)(this,i,r);let s=this.searchDefinitionMatches(e,n);return s.size===0?null:s.size===1?(0,Rr.resolveEntity)(this,s.values().next().value,r):s.has(Ln.SignatureDefinitionBaseType.Any)?(0,Rr.resolveEntity)(this,s.get(Ln.SignatureDefinitionBaseType.Any),r):i!==null?(0,Rr.resolveEntity)(this,i,r):(0,Rr.resolveEntity)(this,s.values().next().value,r)}getGeneralDefinition(e,n=!1){let r=(0,Ug.lookupProperty)(this._primitives.get(Ln.SignatureDefinitionBaseType.General),e);return r==null?null:(0,Rr.resolveEntity)(this,r,n)}getAllIdentifier(e){let n=new Map;if(e===Ln.SignatureDefinitionBaseType.Any){for(let i of this._container.getAllVisibleTypes()){let s=this.getTypeSignature(i);s!=null&&(0,jk.injectIdentifers)(n,s)}return n}let r=this.getTypeSignature(e);return r!=null&&(0,jk.injectIdentifers)(n,r),n}copy(){return new t({container:this._container})}};qc.ContainerProxy=Wg});var Lk=T(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.TypeManager=void 0;var sO=Bg(),oO=Vg(),Hg=class{constructor(e){this._container=new oO.ContainerProxy({container:e.container}),this._types=new Map}analyze(e,n){let r=new sO.Document({container:this._container.copy(),root:n});try{r.analyze()}catch(i){console.error(i)}return this._types.set(e,r),r}get(e){var n;return(n=this._types.get(e))!=null?n:null}};Fc.TypeManager=Hg});var Uo=T(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.TypeManager=X.ContainerProxy=X.Document=X.Aggregator=X.Scope=X.Entity=X.lookupProperty=X.isEligibleForProperties=X.injectIdentifers=X.isSignatureDefinitionFunction=X.isResolveChainItemWithValue=X.isResolveChainItemWithMember=X.isResolveChainItemWithIndex=X.isResolveChainItemWithIdentifier=X.CompletionItemKind=X.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION=X.ObjectSetIterator=X.ObjectSet=X.rotateBits=X.getStringHashCode=X.getHashCode=X.createResolveChain=X.enrichWithMetaInformation=X.createExpressionId=X.createExpressionHash=X.isValidIdentifierLiteral=void 0;var aO=bo();Object.defineProperty(X,"isValidIdentifierLiteral",{enumerable:!0,get:function(){return aO.isValidIdentifierLiteral}});var lO=NS();Object.defineProperty(X,"createExpressionHash",{enumerable:!0,get:function(){return lO.createExpressionHash}});var cO=Om();Object.defineProperty(X,"createExpressionId",{enumerable:!0,get:function(){return cO.createExpressionId}});var uO=rg();Object.defineProperty(X,"enrichWithMetaInformation",{enumerable:!0,get:function(){return uO.enrichWithMetaInformation}});var dO=ig();Object.defineProperty(X,"createResolveChain",{enumerable:!0,get:function(){return dO.createResolveChain}});var zg=Am();Object.defineProperty(X,"getHashCode",{enumerable:!0,get:function(){return zg.getHashCode}});Object.defineProperty(X,"getStringHashCode",{enumerable:!0,get:function(){return zg.getStringHashCode}});Object.defineProperty(X,"rotateBits",{enumerable:!0,get:function(){return zg.rotateBits}});var Mk=lg();Object.defineProperty(X,"ObjectSet",{enumerable:!0,get:function(){return Mk.ObjectSet}});Object.defineProperty(X,"ObjectSetIterator",{enumerable:!0,get:function(){return Mk.ObjectSetIterator}});var pO=cg();Object.defineProperty(X,"DEFAULT_CUSTOM_FUNCTION_DESCRIPTION",{enumerable:!0,get:function(){return pO.DEFAULT_CUSTOM_FUNCTION_DESCRIPTION}});var hO=Jr();Object.defineProperty(X,"CompletionItemKind",{enumerable:!0,get:function(){return hO.CompletionItemKind}});var Nc=ug();Object.defineProperty(X,"isResolveChainItemWithIdentifier",{enumerable:!0,get:function(){return Nc.isResolveChainItemWithIdentifier}});Object.defineProperty(X,"isResolveChainItemWithIndex",{enumerable:!0,get:function(){return Nc.isResolveChainItemWithIndex}});Object.defineProperty(X,"isResolveChainItemWithMember",{enumerable:!0,get:function(){return Nc.isResolveChainItemWithMember}});Object.defineProperty(X,"isResolveChainItemWithValue",{enumerable:!0,get:function(){return Nc.isResolveChainItemWithValue}});var fO=dg();Object.defineProperty(X,"isSignatureDefinitionFunction",{enumerable:!0,get:function(){return fO.isSignatureDefinitionFunction}});var mO=Ro();Object.defineProperty(X,"injectIdentifers",{enumerable:!0,get:function(){return mO.injectIdentifers}});var gO=Sc();Object.defineProperty(X,"isEligibleForProperties",{enumerable:!0,get:function(){return gO.isEligibleForProperties}});var yO=Tc();Object.defineProperty(X,"lookupProperty",{enumerable:!0,get:function(){return yO.lookupProperty}});var bO=us();Object.defineProperty(X,"Entity",{enumerable:!0,get:function(){return bO.Entity}});var vO=yg();Object.defineProperty(X,"Scope",{enumerable:!0,get:function(){return vO.Scope}});var _O=Ng();Object.defineProperty(X,"Aggregator",{enumerable:!0,get:function(){return _O.Aggregator}});var wO=Bg();Object.defineProperty(X,"Document",{enumerable:!0,get:function(){return wO.Document}});var xO=Vg();Object.defineProperty(X,"ContainerProxy",{enumerable:!0,get:function(){return xO.ContainerProxy}});var SO=Lk();Object.defineProperty(X,"TypeManager",{enumerable:!0,get:function(){return SO.TypeManager}})});var Gg=T(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.getSymbolItemKind=hs.getCompletionItemKind=void 0;var It=Uo(),kO=t=>{switch(t){case It.CompletionItemKind.Constant:return 21;case It.CompletionItemKind.Variable:return 6;case It.CompletionItemKind.Expression:return 6;case It.CompletionItemKind.Function:return 3;case It.CompletionItemKind.ListConstructor:case It.CompletionItemKind.MapConstructor:case It.CompletionItemKind.Literal:case It.CompletionItemKind.Unknown:return 12}};hs.getCompletionItemKind=kO;var TO=t=>{switch(t){case It.CompletionItemKind.Constant:return 14;case It.CompletionItemKind.Variable:return 13;case It.CompletionItemKind.Expression:return 13;case It.CompletionItemKind.Function:return 12;case It.CompletionItemKind.ListConstructor:return 18;case It.CompletionItemKind.MapConstructor:return 19;case It.CompletionItemKind.Literal:case It.CompletionItemKind.Unknown:return 13}};hs.getSymbolItemKind=TO});var Yg=T($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.findEx=void 0;var IO=pe(),EO=function(t){return{ParenthesisExpression:(e,n)=>{t(e.expression,n)},AssignmentStatement:function(e,n){t(e.init,n),t(e.variable,n)},MemberExpression:function(e,n){t(e.base,n),t(e.identifier,n)},FunctionDeclaration:function(e,n){for(let r=0;r<e.parameters.length;r++)t(e.parameters[r],n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},MapConstructorExpression:function(e,n){for(let r=0;r<e.fields.length;r++)t(e.fields[r],n)},ReturnStatement:function(e,n){e.argument&&t(e.argument,n)},WhileStatement:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},IndexExpression:function(e,n){t(e.base,n),t(e.index,n)},SliceExpression:function(e,n){t(e.base,n),t(e.left,n),t(e.right,n)},ListValue:function(e,n){t(e.value,n)},MapKeyString:function(e,n){t(e.key,n),t(e.value,n)},IfShortcutStatement:function(e,n){for(let r=0;r<e.clauses.length;r++)t(e.clauses[r],n)},IfShortcutClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseifShortcutClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseShortcutClause:function(e,n){for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ForGenericStatement:function(e,n){t(e.variable,n),t(e.iterator,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},IfStatement:function(e,n){for(let r=0;r<e.clauses.length;r++)t(e.clauses[r],n)},IfClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseifClause:function(e,n){t(e.condition,n);for(let r=0;r<e.body.length;r++)t(e.body[r],n)},ElseClause:function(e,n){for(let r=0;r<e.body.length;r++)t(e.body[r],n)},NegationExpression:function(e,n){t(e.argument,n)},CallExpression:function(e,n){t(e.base,n);for(let r=0;r<e.arguments.length;r++)t(e.arguments[r],n)},CallStatement:function(e,n){t(e.expression,n)},ListConstructorExpression:function(e,n){for(let r=0;r<e.fields.length;r++)t(e.fields[r],n)},BinaryExpression:function(e,n){t(e.left,n),t(e.right,n)},BinaryNegatedExpression:function(e,n){t(e.argument,n)},IsaExpression:function(e,n){t(e.left,n),t(e.right,n)},LogicalExpression:function(e,n){t(e.left,n),t(e.right,n)},ComparisonGroupExpression:function(e,n){for(let r=0;r<e.expressions.length;r++)t(e.expressions[r],n)},UnaryExpression:function(e,n){t(e.argument,n)},Chunk:function(e,n){for(let r=0;r<e.body.length;r++)t(e.body[r],n)},InvalidCodeExpression:()=>{}}},Kg=class{constructor(e){this.map=EO(this.visit.bind(this)),this.callback=e,this.state={exit:!1}}visit(e,n=0){let r=this;if(e==null)return;if(e.type==null)throw console.error("Error ast type:",e),new Error("Unexpected as type");if(r.state=r.callback(e,n),r.state.exit||r.state.skip)return;let i=r.map[e.type];i!=null&&i.call(r,e,n+1)}};function CO(t,e){let n=[];return new Kg((i,s)=>{let o=t(i,s)||{};return o.valid&&i.type!==IO.ASTType.InvalidCodeExpression&&n.push(i),{exit:!!o.exit,skip:!!o.skip}}).visit(e),n}$c.findEx=CO});var Fk=T(qk=>{"use strict";Object.defineProperty(qk,"__esModule",{value:!0});var ye=Yt();ye.VariationRegistry.add("GreyInterpreter.CheckScpUpload",["unknown error","Invalid path","${filepath} not found","permission denied","permission denied. ${filename} is protected","The copy can not be made. Reached maximum number of files in a folder","The copy can not be made. Reached maximum limit"]);ye.VariationRegistry.add("PlayerUtils.ConnectComputer",["ip address not found","can't connect: the remote server has been temporarily disabled due to non-payment","can't connect: port ${port} not found","can't connect: port closed","can't connect: There is no active machine behind the port ${port}","can't connect: service not found behind the port ${port}"]);ye.VariationRegistry.add("PlayerUtils.RenameFichero",["Unknown error","${filepath} not found","Error: name cannot exceed the limit of 128 characters.","permission denied","permission denied. File protected","There is already a file with that name, please choose another one."]);ye.VariationRegistry.add("PlayerUtils.FirewallPingStatus",["Connection refused. Address unreachable","Connection refused. The target is behind a firewall."]);ye.VariationRegistry.add("Computer.CheckInicio",["Fatal error: ${filepath} corrupted!","Kernel panic: missing ${filepath} file!","Graphics error: ${filepath} not found!","Fatal error: ${filepath} not found!"]);ye.VariationRegistry.add("Networking.CheckServiceOnline",["No internet access.","Remote host is down","Unable to find service ${service}","Invalid target service port configuration.","connection rejected: port forward removed by admin","Unable to connect: missing ${library}","Unable to connect: invalid ${library}","Unexpected library found. Not a valid ${library} library.","Unknown error"]);ye.VariationRegistry.add("Networking.IsRouterAvailable",["can't connect: invalid or missing kernel_router.so in the target router","can't connect: unexpected library found. Not a valid kernel_router.so library in the target router.","can't connect: invalid or missing kernel_router.so in the target router"]);ye.VariationRegistry.add("BlockchainSystem.AddWallet",["Error: Wallet user already exists.","Error: Only one wallet per player allowed."]);ye.VariationRegistry.add("BlockchainSystem.RemoveCurrency",["Error: ${coinname} does not exist","Error: incorrect user/password"]);ye.VariationRegistry.add("BlockchainSystem.AddSubWallet",["Error: Wallet does not exists.","Error: Coin does not exist.","Error: This username already exists","Error: Incorrect PIN","Error: only a maximum of 10 subwallets per coin is allowed."]);ye.VariationRegistry.add("BlockchainSystem.Transaction",["Error: coin does not exist","Error: ${subWalletOrig} not found","Error: ${subWalletDest} not found","Error: wallet ${subWalletOrig} does not exist","Error: target wallet does not exist","${subWalletOrig} need to be registered in ${coinName} to be able to receive this coin.","Error: subwallet ${subWalletDest} does not have coins in the selected currency","Error: insufficient funds to complete the transaction"]);ye.VariationRegistry.add("BlockchainSystem.SetAddress",["Error: ${coinName} does not exist"]);ye.VariationRegistry.add("BlockchainSystem.GetAddress",["Error: ${coinName} does not exist"]);ye.VariationRegistry.add("BlockchainSystem.ResetCoinPass",["Error: coin does not exist","Error: Only the account owner can change the password"]);ye.VariationRegistry.add("PlayerUtils.CrearCarpeta",["Unknown error.","Error: empty destination path","Error: only alphanumeric allowed as folder name.","Error: name cannot exceed the limit of 128 characters.","permission denied","${filename} file exists","Can't create folder. Reached maximum limit","The copy can not be made. Reached maximum number of files in a folder","The maximum number of subfolders has been exceeded"]);ye.VariationRegistry.add("PlayerUtils.CrearArchivo",["Can't create file. Unknown error","Can't create file. Reached maximum limit","Invalid path","Can't create file ${pathFolderDest}/${filename}. Permission denied","There is not enough free space on the hard disk.","The copy can not be made. Reached maximum number of files in a folder"]);ye.VariationRegistry.add("Computer.ValidateNewUser",["Error: root user already exists.","Error: can't create guest user. Reserved user.","Error: can't create user. ${username} already exists."]);ye.VariationRegistry.add("NetworkLan.ConnectEthernet",["Error: Ethernet card not connected to the network","Unable to find ISP network to connect using Ethernet card","can't connect: the home network has been temporarily disabled due to non-payment","Error: the gateway cannot be the same device to connect","Error: gateway ${gateway} does not exist in the network","Error: address ${address} is already in use.","Unknown error: The current IP ${localIp} does not exist in this network","Error: unable to run command on routers/switches"]);ye.VariationRegistry.add("PlayerUtils.GetSmtpServer",["invalid IP address","host is down","host doesn't exist","ip address not found","port ${port} not found","host doesn't exist","invalid target service","service not found"]);ye.VariationRegistry.add("FileSystem.UpdatePermisos",["permission denied","permission denied. File protected.","Wrong format."]);ye.VariationRegistry.add("PlayerUtils.MoverFichero",["Unknown error","Error: Invalid path","${sourceFilepath} not found","${destinationParentPath} not found","permission denied","There is not enough free space on the hard disk.","permission denied. ${filename} is protected.","A file cannot overwrite a folder or vice versa","The copy can not be made. Reached maximum number of files in a folder","The copy can not be made. Reached maximum limit"]);ye.VariationRegistry.add("PlayerUtils.RemoveFile",["file not found: ${path}","permission denied","permission denied. File protected.","unknown error :/"]);ye.VariationRegistry.add("Database.GetMailAccount",["Unable to login into account. Wrong password.","${user} user not found","Unknown error: This email account cannot be obtained.","Unable to login into account. Wrong password."]);ye.VariationRegistry.add("PlayerUtils.SendMail",["Invalid email address","Mail subject too large","Mail message too large","Unknown error: attachment failed","Error: attachment not found","Unable to attach file: permission denied","The email couldn't be sent. The recipient has blocked this email address.","The email couldn't be sent. The recipient has blocked emails sent by other players.","The email couldn't be sent. The recipient has blocked emails sent by other players using npcs accounts."]);ye.VariationRegistry.add("PlayerUtils.ConnectToService",["Invalid service ID","can't connect: incorrect user/password"]);ye.VariationRegistry.add("BlockchainSystem.SetInfoSubWallet",["Error: ${coinName} does not exist","Error: ${subWalletUser} does not exist","Error: main wallet linked to ${subWalletUser} does not exist anymore"]);ye.VariationRegistry.add("BlockchainSystem.GetInfoSubWallet",["Error: ${coinName} does not exist","Error: ${subWalletUser} does not exist","Error: main wallet linked to ${subWalletUser} does not exist anymore","Error: Coin ${coinName}does not exist in the Wallet user"]);ye.VariationRegistry.add("BlockchainSystem.ResetWalletPass",["Error: Wallet does not exist.","Error: Only the account owner can change the password","Error: The password can only be reset once a day"]);ye.VariationRegistry.add("BlockchainSystem.SellCoin",["Error: Coin ${coinName} does not exist","Error: Wallet does not exist","Subwallet ${subwalletID} does not exist","Error: subwallet does not contain enough coins to sell","Error: exceeded maximum of 21 million coins","Purchase failed: It is necessary to create a bank account to make transactions","Error: You already have a pending sale. Cancel it to create a new sale.","Error: You already have a pending purchase. Cancel it to create a new sale.","Not enough buyers found. Transaction is pending until a buyer is found.","A partial transaction has occurred. The data of your offer has been updated"]);ye.VariationRegistry.add("BlockchainSystem.BuyCoin",["Error: Coin ${coinName} does not exist","Error: Wallet does not exist","You need to be registered in ${coinName} to be able to buy this coin.","Subwallet ${subwalletID} does not exist","Purchase failed: It is necessary to create a bank account to make transactions","Purchase failed: Insufficient money in the bank. Required $${price}","Error: You already have a pending sale. Cancel it to create a new purchase.","Error: You already have a pending purchase. Cancel it to create a new purchase.","Not enough sellers found. Transaction is pending until a seller is found.","A partial transaction has occurred. The data of your offer has been updated"])});var Nk=T((S5,RO)=>{RO.exports={insert:{description:"Inserts a value into either a `list` or a `string`. If the passed index is not a `number`, this method throws an error, preventing further script execution.",example:["list = [2, 3, 4]","list.insert(2, 42)",'print("List with inserted item: " + list.join(", "))']},indexOf:{description:"Lookups index of value within `map`s, `list`s, or `string`s. For `list`s and `string`s, the behavior is very similar. On success, you'll receive a `number` representing the found index. On failure, it will return `null`. For `map`s, it's a bit different since the returned value could be of any type. On failure, it will return `null` as well.",example:['index = "test".indexOf("e")','print("e is at: " + index)']},hasIndex:{description:"Verifies if an index is available within an object. In case of success this method will return a `number` with the value one. In case of failure the value will be a zero. This method supports `map`s, `list`s and `string`s. Each passed type may result in different behavior therefore it is advisable to take a look at each of their specific signatures.",example:['print("List has index: " + [1, 2, 3].hasIndex(2)']},remove:{description:"Depending on the data type, this function will remove a value in the provided object, potentially mutating the object. This method works with `map`s, `list`s, and `string`s. Each passed type may support different types for the `key` argument. For example, using this method on a string would treat the key as a character index. Therefore, it is advised to review the signatures of each type. Passing a key with the type `null` may cause an error to be thrown, preventing further script execution.",example:["list = [9, 3, 5, 7]","list.remove(5)",'print("List after removal: " + list.join(", "))']},push:{description:"Allows pushing a value into an object, supporting `map`s and `list`s. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution.",example:["list = [0, 1, 2, 3, 4, 5]","list.push(42)",'print("The answer to everything is: " + list.pop)']},pull:{description:"When passing a `list` to this method, it will return the value at the first index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution.",example:["myList = [42, 1, 3]","answer = myList.pull",'print("Answer to everything: " + answer)']},pop:{description:"When passing a `list` to this method, it will return the value at the last index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution.",example:["list = [0, 1, 2, 3, 4, 5]",'print("The last item is: " + list.pop)']},shuffle:{description:"Randomizes content of an object. Valid data types for this method are `list` and `map`. In case a map-like object such as a `file` or `computer` a runtime exception will be thrown.",example:["list = [0, 1, 2, 3, 4, 5]","list.shuffle",'print("And the winner is: " + list[0])']},sum:{description:"Returns a `number` representing the sum of all items within a `map` or a `list`.",example:["list = [0, 1, 2, 3, 4, 5]",'print("Sum of all items is: " + list.sum)']},indexes:{description:"Returns a `list` containing all indexes or keys of the passed object. This method supports `map`s, `list`s, and `string`s. The type of each item may vary when using this method on a `map` since keys could be any type. The other types will return a `list` where each item is a `number`.",example:['indexesOfStr = "test".indexes','print("Following indexes are available: " + indexesOfStr.join(", "))']},len:{description:"Returns `number` indicating what size the object is.",example:['length = "test".len','print("Length of string is: " + length)']},values:{description:"Returns a `list` containing all values of an object.",example:['indexesOfStr = "test".values','print("Following values are available: " + indexesOfStr.join(", "))']}}});var $k=T((k5,PO)=>{PO.exports={$meta:{description:'A `aptClient` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"aptclientLib"`.'},show:{description:'Show displays all the packages available in a repository. The repository must be listed in the `"/etc/apt/sources.txt"` file. If the provided repository value is anything other than a `string`, this method will return `null`. If it cannot find a repository, it will return various error messages. On success, it will return a `string` containing all packages and their descriptions, with each entry separated by a newline.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = aptClient.show("177.202.15.132")',"packageList = packages.split(char(10) + char(10))","packageList.pop // remove last empty item","for packageItem in packageList"," entry = packageItem.split(char(10))"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},search:{description:'Search specifically looks for a package in any of the repositories listed in `"/etc/apt/sources.txt"`. If the provided search value is anything other than a `string`, this method will return `null`. On success, it will return a `string` containing all packages that partially match the provided search value. On failure, it will return a `string` with various error messages.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = aptClient.search(".so")',"packageList = packages.split(char(10) + char(10))","for packageItem in packageList"," entry = packageItem.split(char(10))"," if entry.len != 2 then",' print "something wrong in: " + entry'," continue"," end if"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},update:{description:'Update refreshes the list of available packages after adding a new repository in `"/etc/apt/sources.txt"`, or if the remote repository has updated its information in `"/server/conf/repod.conf"`. If the update is successful, an empty `string` will be returned. In case of failure, a `string` with an error message will be returned. If for some reason the `"/etc/apt/sources.txt"` is malformed this method will return a number with the value zero.',example:['aptClient = include_lib("/lib/aptclient.so")',"result = aptClient.update",'if result == "" then',' print "Update successful!"',"else",' print "Error while updating: " + result',"end if"]},add_repo:{description:'Inserts a repository address into the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.add_repo("177.202.15.132")','if result == "" then',' print "Addition successful!"',"else",' print "Error while adding: " + result',"end if"]},del_repo:{description:'Deletes a repository address from the `"/etc/apt/sources.txt"` file. If the provided repository value is anything other than a `string`, this method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.del_repo("177.202.15.132")','if result == "" then',' print "Deletion successful!"',"else",' print "Error while deleting: " + result',"end if"]},install:{description:'Installs a program or library from a remote repository listed in `"/etc/apt/sources.txt"`. If no path is specified, the program installs in `"/lib"` if it is a library or in `"/bin"` otherwise. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, this method will return a `number` with the value one. In case of failure, it will return a `string` containing an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.install("rshell_interface")',"if result == 1 then",' print "Installed program successful!"',"else",' print "Error while installing: " + result',"end if"]},check_upgrade:{description:"Checks if there is a newer version of the program or library in the repository. If the provided filepath value is anything other than a `string`, this method will return `null`. On success, it will return a `number`, which can be either zero or one. Zero indicates that there is no new version, while one indicates that there is a new version available. In case of failure, it will return a string containing an error message.",example:['aptClient = include_lib("/lib/aptclient.so")','result = aptClient.check_upgrade("/bin/rshell_interface")',"if result == 0 then",' print "Program doesnt need an update!"',"else if result == 1 then",' print "Program does need an update!"',"else",' print "Error while checking version: " + result',"end if"]}}});var Bk=T((T5,AO)=>{AO.exports={$meta:{description:'A `blockchain` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"blockchainLib"`.'},coin_price:{description:"Returns a `number` representing the current unit value of the cryptocurrency. In case of an error, a `string` with the error details will be returned. If the provided `coinName` is anything other than a `string`, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','price = blockchain.coin_price("test")','if typeof(price) == "string" then',' exit "Couldnt get coin price due to: " + price',"end if",'print "Your coin price is " + price']},show_history:{description:"Returns a `map` with the latest changes in the value of a specific cryptocurrency. The key of the `map` is an index represented by a `number`. The value is a `list`, where index 0 is the historical price of the coin and index 1 is the date when the price change occurred. If the provided `coinName` is anything other than a `string` or if no coin exists with this name, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','history = blockchain.show_history("test")','if typeof(history) == "string" then',' exit "Couldnt fetch history due to: " + history',"else if history == null then",' exit "There doesnt seem to be a coin"',"end if","for entry in history.values"," price = entry[0]"," date = entry[1]",' print "The price on " + date + " was " + price',"end for"]},amount_mined:{description:"Returns a `number` representing the total amount of mined coins. In case of an error, it will return a `string` with the details. If the provided coinName is anything other than a `string`, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','mined = blockchain.amount_mined("test")','if typeof(mined) == "string" then',' exit "Couldnt get amount mined due to: " + mined',"end if",'print "Your mined amount is " + mined']},get_coin:{description:"Returns a `coin` object used to manage the currency. In case of an error, it will return a `string` with the details. If any of the provided parameters are `null`, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','if typeof(coin) != "coin" then',' exit "Couldnt get coin object due to: " + coin',"end if",'print "Your coin address is " + coin.get_address']},login_wallet:{description:"Returns a `wallet` object on success. In case of an error, it will return a `string` indicating the reason. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','if typeof(wallet) == "string" then',' print "Login failed due to: " + wallet',"else",' print "Login was successful!"',"end if"]},create_wallet:{description:"Creates a `wallet` and returns a `wallet` object on success, which can be used to manage cryptocurrencies. In case of an error, it will return a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.create_wallet("test", "test")','if typeof(wallet) == "string" then',' print "Wallet creation failed due to: " + wallet',"else",' print "Wallet creation was successful!"',"end if"]},delete_coin:{description:"Removes a cryptocurrency from the world. The credentials used in the creation of the cryptocurrency are required. On success, it will return a `number` with the value one. On failure, it will return a `string` containing details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','result = blockchain.delete_coin("test", "test", "test")','if typeof(result) == "string" then',' exit "Couldnt delete coin due to: " + result',"end if",'print "Coin got deleted"']}}});var Uk=T((I5,OO)=>{OO.exports={$meta:{description:"A class or object is a `map` with a special `__isa` entry that points to the parent. This is set automatically when you use the `new` operator.",example:['Shape = { "sides": 0 }',"Square = new Shape","Square.sides = 4","x = new Square","print(x.sides) // 4"]}}});var Wk=T((E5,DO)=>{DO.exports={$meta:{description:'A `coin` object can be obtained by using [get_coin](#BLOCKCHAIN_GET_COIN). The `classID` used for this object is `"coin"`.'},set_cycle_mining:{description:"Defines the interval (in-game hours) in which each user receives a coin reward when mining. The interval cannot be lower than 1 and not higher than 2160. If the provided `rateHours` is not a `number`, this method will return `null`. On success, it will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.set_cycle_mining(20)","if result == 1 then",' print "Successful updated mining interval"',"else",' print "Failed updating mining interval"',"end if"]},get_cycle_mining:{description:"Returns a `number` representing the defined interval in which each user receives a coin reward when mining. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_cycle_mining",'if typeof(result) == "string" then',' exit "Failed getting cyclic mining value due to: " + result',"end if",'print "cyclic mining value: " + result']},get_reward:{description:"Returns a `number` representing the amount of coins that will be received as a reward after each mining cycle. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_reward",'if typeof(result) == "string" then',' exit "Failed getting reward value due to: " + result',"end if",'print "reward value: " + result']},set_reward:{description:"Assigns the reward that miners will receive after each mining cycle. The reward value has to be above one. If the provided `coinAmount` is not a `number`, this method will return `null`. On success, it will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.set_reward(-1)",'if typeof(result) == "string" then',' exit "Failed setting reward due to: " + result',"end if",'print "Successfully set reward!"']},transaction:{description:"Facilitates a transaction of the currency between the indicated subwallets. In case of an error, a `string` with the details is returned. In case of success, a `number` with a value of one will be returned. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.transaction("test", "test2", 20)','if typeof(result) == "string" then',' exit "Failed transaction due to: " + result',"end if",'print "Successfully transfered!"']},create_subwallet:{description:"Registers a new account in the `coin` that can be used to manage services such as stores. It is necessary to provide the PIN of the owner's `wallet` that wants to register. In case of success, the method will return a `number` with the value one. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. In case of an error, a `string` with the details is returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','wallet = blockchain.login_wallet("test", "test")','result = coin.create_subwallet("test", wallet.get_pin, "test", "test")','if typeof(result) == "string" then',' exit "Failed to create subwallet due to: " + result',"end if",'print "Successfully created subwallet!"']},get_subwallet:{description:"Returns a `subWallet` object on success. In case of error, it returns a `string` with the details. If the provided `subWalletUser` is not a `string`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.get_subwallet("test")','if typeof(result) == "string" then',' exit "Failed to get subwallet due to: " + result',"end if",'print "Successfully received subwallet!"']},get_subwallets:{description:"Returns a `list` where each item is a `subWallet` object, including all the accounts registered in the cryptocurrency. In case of error, it returns a `string` with the details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_subwallets",'if typeof(result) == "string" then',' exit "Failed to get subwallets due to: " + result',"end if","for subwallet in result",' print subwallet.get_user + " has " + subwallet.get_balance + " coins"',"end for"]},set_address:{description:"Configures a valid address that will be shown to users who do not have the currency, indicating where to register. In case of an error, it returns a `string` with the details. In case of success, a `number` with a value of one will be returned. If the provided address is not a `string`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.set_address("12.12.12.12")','if typeof(result) == "string" then',' exit "Failed to set address due to: " + result',"end if",'print "Successfully set address!"']},get_address:{description:"Returns the configured address that will be shown to users who do not have the currency, indicating where they have to register. In case of an error, it returns a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_address","if not is_valid_ip(result) then",' exit "Failed to get address due to: " + result',"end if",'print "address: " + result']},get_mined_coins:{description:"Returns a `number` representing the amount of coins that have been mined so far. In case of an error, it returns a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")',"result = coin.get_mined_coins",'if typeof(result) == "string" then',' exit "Failed to get mined coins due to: " + result',"end if",'print "mined coins: " + result']},reset_password:{description:"Resets the password of the coin. It returns a `number` with the value one if resetting was successful; otherwise, it will return a `string`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','result = coin.reset_password("test")','if typeof(result) == "string" then',' exit "Failed to reset password due to: " + result',"end if",'print "Successfully reset password"']}}});var Vk=T((C5,jO)=>{jO.exports={$meta:{description:'A `computer` object can be obtained by either using [host_computer](#SHELL_HOST_COMPUTER) or [overflow](#METALIB_OVERFLOW). The `classID` used for this object is `"computer"`.'},get_ports:{description:"Returns a `list` of `port`s on the `computer` that are active.",example:["router = get_router","ports = get_shell.host_computer.get_ports","for port in ports",' print("Info: " + router.port_info(port))',"end for"]},get_name:{description:"Returns the hostname of the machine.",example:["computerName = get_shell.host_computer.get_name",'print("The name of your machine is " + computerName)']},local_ip:{description:"Returns a `string` with the local IP address of the `computer`.",example:["localIp = get_shell.host_computer.local_ip",'print("Local ip:" + localIp)']},public_ip:{description:"Returns a `string` with the public IP address of the `computer`.",example:["publicIp = get_shell.host_computer.public_ip",'print("Public ip:" + publicIp)']},File:{description:"Returns a `file` located at the path provided in the arguments. The path can be either relative or absolute. It's important to note that any `file` object can represent a folder as well. If the provided path cannot be resolved, meaning that no file or folder exists, this method will return `null`. Providing any other type than `string` or an empty value for the path will result in an error, interrupting the script execution.",example:['filePath = "/etc/passwd"',"file = get_shell.host_computer.File(filePath)","if file != null then"," print(file.get_content)","else",' print("File at given path " + filePath + " does not exist.")',"end if"]},create_folder:{description:"Creates a folder at the path provided in the arguments. There are certain limitations to creating a folder: the folder name has to be alphanumeric and below 128 characters. Creation will fail if there is already a folder in place or if there are lacking permissions. Additionally, there is a folder limit of about 250 in each folder and 3125 folders in the computer overall. In case the folder creation fails, the method will return a `string` with details. In case of success, it will return a `number` with the value one. Providing any type that deviates from the signature or using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution.",example:['path = "/home/" + active_user + "/Desktop"',"hostComputer = get_shell.host_computer",'createResult = hostComputer.create_folder(path, "myfolder")','if typeof(createResult) == "string" then',' print("There was an error when creating the folder: " + createResult)',"else",' print("Folder got created at given path " + path)',"end if"]},is_network_active:{description:"Returns a `number` with either the value one or zero. If the `computer` has internet access, the value will be one. If there is no internet access, it will return zero instead.",example:["hostComputer = get_shell.host_computer","if hostComputer.is_network_active then",` print("You're connected.")`,"else",` print("You're not connected.")`,"end if"]},touch:{description:"Creates an empty text `file` at the provided path. Certain limitations apply to file creation: the `file` name must be alphanumeric and below 128 characters. Creation will fail if there is already a `file` in place or if permissions are lacking. Additionally, there is a file limit of about 250 in each folder and 3125 files in the computer overall. In case of success, it returns a `number` with the value one. In case of failure, it returns a `string` with details. Using this method in an SSH encryption process will cause an error to be thrown, preventing any further script execution.",example:['path = "/home/" + active_user + "/Desktop"',"hostComputer = get_shell.host_computer",'createResult = hostComputer.touch(path, "myFile.txt")','if typeof(createResult) == "string" then',' print("There was an error when creating the file: " + createResult)',"else",' print("File got created at given path " + path)',"end if"]},show_procs:{description:"Returns a `string` with an overview of all active processes on the `computer`, including information about the user, PID, CPU, memory, and command. Using this method in an SSH encryption process will cause an error to be thrown, preventing any further script execution.",example:["hostComputer = get_shell.host_computer","procs = hostComputer.show_procs","list = procs.split(char(10))[1:]","processes = []","for item in list",' parsedItem = item.split(" ")'," process = {}"," process.user = parsedItem[0]"," process.pid = parsedItem[1]"," process.cpu = parsedItem[2]"," process.mem = parsedItem[3]"," process.command = parsedItem[4]"," processes.push(process)","end for","print(processes)"]},network_devices:{description:"Returns a `string` containing information about all network devices available on the `computer`. Each item includes details about the interface name, chipset, and whether monitoring support is enabled.",example:["hostComputer = get_shell.host_computer","devices = hostComputer.network_devices","deviceList = devices.split(char(10))","for item in deviceList"," print(item)","end for"]},change_password:{description:"Changes the password of an existing user on the `computer`. Root access is necessary to successfully change the password. Passwords can only include alphanumeric characters and cannot exceed 15 characters. If the password change fails, this method will return a `string` containing information on why it failed. If the change succeeds, it will return a `number` with the value one. If the provided username is empty, an error will be thrown, preventing any further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','changeResult = hostComputer.change_password("test", "newPassword")','if typeof(changeResult) == "string" then',' print("There was an error when changing the password: " + changeResult)',"else",' print("Password got successfully changed.")',"end if"]},create_user:{description:"Creates a user on the `computer` with the specified name and password. Root access is necessary to successfully create a user. Both the username and password cannot exceed more than 15 characters and must be alphanumeric. There cannot be more than 15 users created on the same `computer`. If the creation fails, this method will return a `string` containing the reason for the failure. On success, it will return a `number` with the value one. If the provided username is empty or either of the values exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','creationResult = hostComputer.create_user("newUser", "123")','if typeof(creationResult) == "string" then',' print("There was an error when creating an user: " + creationResult)',"else",' print("User got successfully created.")',"end if"]},delete_user:{description:"Deletes the indicated user from the `computer`. It can optionally delete the user's home folder as well, although by default the home folder will not be deleted. Root access is necessary to successfully delete a user. Keep in mind that you cannot delete the root user. If the deletion fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. If the provided username is empty, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','deletionResult = hostComputer.delete_user("test", true)','if typeof(deletionResult) == "string" then',' print("There was an error when deleting an user: " + deletionResult)',"else",' print("User got successfully deleted.")',"end if"]},create_group:{description:"Creates a new group associated with an existing user on the `computer`. Root access is necessary to successfully create a group. There are limitations when creating a group, such as a character limit of 15 and that the group name may only contain alphanumeric characters. If the group creation fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. If the provided arguments are empty or the username exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','creationResult = hostComputer.create_group("test", "staff")','if typeof(creationResult) == "string" then',' print("There was an error when creating a group: " + creationResult)',"else",' print("Group got successfully created.")',"end if"]},delete_group:{description:"Deletes an existing group associated with an existing user on the `computer`. Root access is necessary to successfully delete a group. If the group deletion fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. If either of the provided values is empty, an error will be thrown, preventing further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','deletionResult = hostComputer.delete_group("test", "staff")','if typeof(deletionResult) == "string" then',' print("There was an error when deleting a group: " + deletionResult)',"else",' print("Group got successfully deleted.")',"end if"]},groups:{description:"Returns a `string` containing groups associated with an existing user on the `computer`. If the user does not exist, a `string` with an error message will be returned. If the provided username is empty, an error will be thrown, preventing further script execution. If the provided username is anything other than a `string`, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','hostComputer.create_group("root", "staff")','groups = hostComputer.groups("root")',"listOfGroups = groups.split(char(10))","print(listOfGroups)"]},close_program:{description:"Closes a program associated with the provided PID. You can see the `list` of active programs by either using `show_procs` or typing ps into your terminal. To close a program, you need to either be the owner of the running process or root. If closing the program fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. If there is no process with the provided PID, this method will return a `number` with the value zero. If the provided PID is anything other than a `number`, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer',"processes = hostComputer.show_procs.split(char(10))[1:]",'pid = processes[1].split(" ")[1]',"closeResult = hostComputer.close_program(pid.to_int)",'if typeof(closeResult) == "string" then',' print("There was an error when closing a program: " + closeResult)',"else",' print("Program with pid " + pid + " got successfully closed.")',"end if"]},wifi_networks:{description:"Returns a `list` of the Wi-Fi networks that are available for the provided interface. Each item in the `list` is a `string` containing information on the BSSID, PWR, and ESSID. If no matching netDevice can be found, this method will return `null`. If the active network card is not a Wi-Fi card, an error will be thrown, preventing any further script execution.",example:['hostComputer = get_shell("root", "test").host_computer','networks = hostComputer.wifi_networks("wlan0")',"result = []","for network in networks",' parsedItem = network.split(" ")'," item = {}"," item.BSSID = parsedItem[0]"," item.PWR = parsedItem[1]"," item.ESSID = parsedItem[2]"," result.push(item)","end for","print(result)"]},connect_wifi:{description:"Connects to the indicated Wi-Fi network. It's not possible to connect to a new Wi-Fi while being logged in as a guest. If connecting to a new Wi-Fi fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. Wi-Fi networks can be found via `wifi_networks` or by typing iwlist as a command in the terminal. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:["hostComputer = get_shell.host_computer","networks = hostComputer.wifi_networks",'firstNetwork = networks[0].split(" ")',"BSSID = firstNetwork[0]","ESSID = firstNetwork[2]",'connectionResult = hostComputer.connect_wifi("wlan0", BSSID, ESSID, "wifi-password")','if typeof(connectionResult) == "string" then',' print("There was an error while connecting to new Wifi: " + connectionResult)',"else",' print("Connected to new Wifi successfully.")',"end if"]},connect_ethernet:{description:"Sets up a new IP address on the computer through the Ethernet connection. It's not possible to set up a new IP address while being logged in as a guest. On failure, this method will either return a `string` with details or `null`. On success, it will return an empty `string`. If any of the provided parameters have a type that deviates from the defined signature or the computer is not connected to the internet, an error will be thrown, preventing any further script execution.",example:["hostComputer = get_shell.host_computer",'connectionResult = hostComputer.connect_ethernet("eth0", "192.168.0.4", get_router.local_ip)','if typeof(connectionResult) == "string" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected successfully.")',"end if"]},network_gateway:{description:"Returns a `string` with the gateway IP address configured on the computer.",example:["hostComputer = get_shell.host_computer","gatewayIp = hostComputer.network_gateway",'print("Gateway IP: " + gatewayIp)']},active_net_card:{description:'Returns a `string` which contains either the keyword `"WIFI"` or `"ETHERNET"` depending on the connection type your computer is currently using.',example:["hostComputer = get_shell.host_computer","netCard = hostComputer.active_net_card",'print("Connected by: " + netCard)']}}});var Hk=T((R5,LO)=>{LO.exports={$meta:{description:'A `crypto` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"cryptoLib"`.'},aircrack:{description:"Returns a `string` containing the password based on the file which was generated via aireplay. In case of failure, it will return `null` instead. If the provided path is empty, an error will be thrown, interrupting the script execution.",example:['crypto = include_lib("/lib/crypto.so")','networks = get_shell.host_computer.wifi_networks("wlan0")','firstNetwork = networks[1].split(" ")',"bssid = firstNetwork[0]","pwr = firstNetwork[1][:-1].to_int","essid = firstNetwork[2]","aireplayResult = crypto.aireplay(bssid, essid, 300000 / pwr)","if (aireplayResult == null) then",' result = crypto.aircrack(home_dir + "/file.cap")'," print(result)","end if"]},airmon:{description:'Enables or disables the monitor mode of a network device. The `options` parameter can only be `"start"` or `"stop"`. Monitor mode can only be enabled on Wifi cards. If it wasn\'t possible to enable or disable the monitor mode, this method will return either a `number` with the value zero or a `string` with details. In case of success, it will return a `number` with the value one.',example:['crypto = include_lib("/lib/crypto.so")','airmonResult = crypto.airmon("start", "wlan0")','if typeof(airmonResult) == "string" then',' print("There was an error while switching monitoring mode: " + airmonResult)',"else",' print("Monitoring mode switched successfully.")',"end if"]},aireplay:{description:'Used to inject frames on wireless interfaces. Once the command with `"Control+C"` is stopped, it will save the captured information in a text file called `"file.cap"` in the path where the terminal is currently located. Alternatively, a maximum of captured `acks` can be specified for the command to stop automatically, saving the `"file.cap"` file as described above. To figure out how many ACKs are required, you can use the following formula: `"300000 / [Wifi PWR]"`. If there is an error, a `string` will be returned with the message indicating the problem. On success, it will return `null`, it is advised though to verify that the capture file actually exists. In case any of the provided values deviate from the signature types or bssid/essid is empty, an error will be thrown preventing any further script execution.',example:['crypto = include_lib("/lib/crypto.so")','networks = get_shell.host_computer.wifi_networks("wlan0")',"for index in range(0, networks.len - 1)",' print(index + ".) " + networks[index])',"end for",'selectedIndex = user_input("Select Wifi: ").to_int','if (typeof(selectedIndex) == "string" or selectedIndex < 0 or selectedIndex > networks.len - 1) then',' exit("Wrong index!")',"end if",'parsed = networks[selectedIndex].split(" ")',"bssid = parsed[0]","pwr = parsed[1][:-1].to_int","essid = parsed[2]","potentialAcks = 300000 / pwr","crypto.aireplay(bssid, essid, potentialAcks)",'wifiPassword = crypto.aircrack("/home/" + active_user + "/file.cap")','print("Wifi password for " + essid + " is " + wifiPassword)']},decipher:{description:"Returns a decrypted password via the provided password MD5 hash. Keep in mind that this method is not decrypting a password but rather checking for existing passwords within the game world with a matching MD5 hash. So in case a password does not exist in the game world, the decryption will fail. On failure, this method will return `null`. Using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution.",example:['crypto = include_lib("/lib/crypto.so")','hostComputer = get_shell("root", "test").host_computer','passwdContent = hostComputer.File("/etc/passwd").get_content',"firstAccount = passwdContent.split(char(10))[0]",'parsed = firstAccount.split(":")',"username = parsed[0]","passwordHash = parsed[1]","password = crypto.decipher(passwordHash)",'print("User: " + username)','print("Password: " + password)']},smtp_user_list:{description:"Returns a `list` of the existing users on the `computer` where the SMTP service is running. If these users also have an email account registered on the SMTP server, it will be indicated in the `list`. SMTP services are usually running on port `25`. In case of failure, this method will return a `string` containing the cause. If any of the provided values deviate from the signature types, this method will return `null`.",example:['crypto = include_lib("/lib/crypto.so")','print(crypto.smtp_user_list("192.168.0.4", 25))']}}});var zk=T((P5,MO)=>{MO.exports={$meta:{description:'A `ctfEvent` object can be obtained by using [get_ctf](#GENERAL_GET_CTF). The `classID` used for this object is `"ctfEvent"`.'},get_description:{description:"Returns `string` with the CTF event description."},get_template:{description:"Returns `string` with the CTF event template."},player_success:{description:"Returns `number` with the value one if the CTF event got completed successfully. Otherwise this method will return a `number` with the value zero."},get_creator_name:{description:"Returns `string` with the name of the CTF event creator."},get_mail_content:{description:"Returns `string` with the mail content of the CTF event."}}});var Gk=T((A5,qO)=>{qO.exports={$meta:{description:'A `file` object can be acquired by either using [File](#COMPUTER_FILE) or [overflow](#METALIB_OVERFLOW). The `classID` used for this object is `"file"`.'},chmod:{description:'Modifies the `file` permissions. Optionally, these permissions can also be applied recursively. The format for applying permissions is as follows: `"[references][operator][modes]"`. The references type is defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. The operator is used to define if permissions get added `"+"` or removed `"-"`. There are three different modes that can be modified: read `"r"`, write `"w"`, and execute `"x"`. So, for example, `"o-wrx"` would remove all possible permissions for others. To add all permissions for others again, `"o+wrx"` would be used. In case the modification fails, this method will return a `string` containing information about the reason. Otherwise, an empty `string` is returned. In case any type other than `number` is used for the `isRecursive` parameter, an error will be thrown preventing further script execution.',example:['hostComputer = get_shell("root", "test").host_computer','rootFolder = hostComputer.File("/bin")',"oldPermissions = rootFolder.permissions",'rootFolder.chmod("o-wrx", true)',"newPermissions = rootFolder.permissions",'print("Old permissions: " + oldPermissions)','print("New permissions: " + newPermissions)']},copy:{description:"Copies the `file` to the provided path. Files can only be copied if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, it will return a `string` containing information about the reason for failure. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','copyResult = passwdFile.copy("/etc/", "duplicate")','if typeof(copyResult) == "string" then',' print("There was an error while copying file: " + copyResult)',"else",' print("File got copied successfully.")',"end if"]},move:{description:"Moves the `file` to the provided path. Files can only be moved if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, this method will return a `string` with details. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted, this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','moveResult = passwdFile.move("/etc/", "/moved/")','if typeof(moveResult) == "string" then',' print("There was an error while moving file: " + moveResult)',"else",' print("File got moved successfully.")',"end if"]},rename:{description:"Rename the file with the name provided. Files can only be renamed if the user has write permissions or is root. The new filename has to be below 128 characters and alphanumeric. On failure, this method will return a `string` with details. Otherwise, this method will return an empty string. If this method is used within an SSH encryption process, an error will be thrown, causing the script execution to be interrupted. In case the provided name is `null`, this method will return a `number` with the value zero.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','renameResult = passwdFile.rename("renamed")','if typeof(renameResult) == "string" then',' print("There was an error while renaming file: " + renameResult)',"else",' print("File got renamed successfully.")',"end if"]},path:{description:"Returns a `string` with the path of the file. In case the file gets deleted it will still returns it's path prior to deletion.",example:["hostComputer = get_shell.host_computer",'passwdFile = hostComputer.File("/etc/passwd")','print("File location: " + passwdFile.path)']},is_folder:{description:"Returns a `number`. The value is one if the file is a folder, zero otherwise. In case the file gets deleted this method will return `null` instead.",example:["hostComputer = get_shell.host_computer",'etcFolder = hostComputer.File("/etc")','print("Is a folder: " + etcFolder.is_folder)']},parent:{description:"Returns the parent folder of the current file or folder. In case there is no parent folder `null` will be returned instead. In case the file gets deleted this method will return `null` as well.",example:["hostComputer = get_shell.host_computer",'etcFolder = hostComputer.File("/etc")','print("Parent path: " + etcFolder.parent.path)']},name:{description:"Returns a `string` with the name of the file. In case the file gets deleted this method will return `null` instead.",example:["hostComputer = get_shell.host_computer",'passwdFile = hostComputer.File("/etc/passwd")','print("Filename: " + passwdFile.name)']},allow_import:{description:"Returns a `number`. If the file is binary and can be imported by other scripts, the value will be one; otherwise, the value will be zero. In case the file gets deleted, this method will cause a crash.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("File can be imported: " + lsBinary.allow_import)']},get_content:{description:"Returns a `string` representing the content of the file. To read a file, the user requires read access or being root. Note that you cannot read a binary file. In case of failure, `null` will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','print("File content: " + passwdFile.get_content)']},set_content:{description:"Saves text into a `file`. The content will not get appended to the `file`; therefore, existing content will be overridden. To set new content, the user requires write permissions or being root. Keep in mind that text files cannot exceed the character limit of 160,000. In case setting the content was successful, a `number` with the value one will be returned. Otherwise, a `string` with details will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution. If the provided content is `null` or permissions are lacking, this method will return a `number` with the value zero. In case the file gets deleted this method will return `null`.",example:['hostComputer = get_shell("root", "test").host_computer','passwdFile = hostComputer.File("/etc/passwd")','setResult = passwdFile.set_content("moo")','if typeof(setResult) == "string" then',' print("There was an error while setting file content: " + setResult)',"else if setResult == 0 then",' print("Unable to set content of file!")',"else",' print("File content got changed successfully.")',"end if"]},is_binary:{description:"Returns a `number`. If the file is binary, the value will be one; otherwise, it will be zero. In case the file gets deleted, this method will return `null` instead.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("File is a binary: " + lsBinary.is_binary)']},has_permission:{description:'Returns a `number` indicating if the user who launched the script has the requested permissions. One will indicate that the user has the correct permissions. In case permissions are lacking, the value will be zero. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. In case the file gets deleted, this method will return `null` instead.',example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("Is able to execute ls: " + lsBinary.has_permission("x"))']},delete:{description:"Delete the current file. To delete files, write permissions are required or being root. In case of failure, a `string` with details will be returned. Otherwise, an empty `string` gets returned. Please note that deleting a file will leave a log entry.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")',"deletionResult = lsBinary.delete",'if typeof(deletionResult) == "string" and deletionResult.len > 0 then',' print("There was an error while deleting a file: " + deletionResult)',"else",' print("File got deleted successfully.")',"end if"]},get_folders:{description:"Returns a `list` of folders. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted this method will return `null` as well.",example:["hostComputer = get_shell.host_computer",'binFolder = hostComputer.File("/home")',"folders = binFolder.get_folders","for folder in folders"," print(folder.path)","end for"]},get_files:{description:"Returns a `list` of files. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted this method will return `null` as well.",example:["hostComputer = get_shell.host_computer",'binFolder = hostComputer.File("/bin")',"files = binFolder.get_files","for file in files"," print(file.path)","end for"]},permissions:{description:'Returns a `string` with the current file permissions. In case the current file gets deleted, this method will return `null`. The format for this permissions `string` is as follows: `"[fileType][wrx](u)[wrx](g)[wrx](o)"`. The file type is either `"d"` in case it\'s a directory or `"-"`. The user type gets defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. An example of a `string` returned by this method would be `"-rwxr-xr-x"`. Taking the latter as an example, the following things become clear:\n* The provided file is not a directory.\n* The user has full access.\n* The group and others have almost all permissions besides writing.\n',example:["hostComputer = get_shell.host_computer",'binFolder = hostComputer.File("/bin")',"permissions = binFolder.permissions","fileType = permissions[0]","permissionsForUser = permissions[1:4]","permissionsForGroup = permissions[4:7]","permissionsForOther = permissions[7:10]",'print("File type: " + fileType)','print("User permissions: " + permissionsForUser)','print("Group permissions: " + permissionsForGroup)','print("Other permissions: " + permissionsForOther)']},owner:{description:"Returns a `string` with the name of the file owner. User permissions get applied to whoever is the owner of a file. In case the current file gets deleted, this method will return `null`.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("Owner of ls is: " + lsBinary.owner)']},set_owner:{description:"Change the owner of this file. Optionally the owner can get applied recursively. The owner's name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure a `string` gets returned containing the cause. Otherwise an empty `string` gets returned. In case the current file gets deleted or the passed owner value is not a `string`, this method will return `null`. If the passed owner value is empty, the owner value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, interrupting further script execution.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','ownerResult = lsBinary.set_owner("root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing owner: " + ownerResult)',"else",' print("File owner changed successfully.")',"end if"]},group:{description:"Returns a `string` with the name of the group to which this file belongs. Group permissions get applied to whoever is the owner of a file. In case the current file gets deleted, this method will return `null`.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','print("File is related to following group: " + lsBinary.group)']},set_group:{description:"Change the group related to this file. Optionally the group can get applied recursively. The group name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure, a `string` with details. On success, an empty `string` gets returned. In case the current file gets deleted or the passed group is not a `string`, this method will return `null`. If the passed group value is empty, the group value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, preventing further script execution.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")','ownerResult = lsBinary.set_group("root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing group: " + ownerResult)',"else",' print("File group changed successfully.")',"end if"]},size:{description:"Returns a `string` with the size of the file in bytes. There is no correlation between file size and actual file content. Instead, the file size is depending on the name of the file. In case the current file gets deleted, this method will return `null`.",example:["hostComputer = get_shell.host_computer",'lsBinary = hostComputer.File("/bin/ls")',"size = lsBinary.size","if size.to_int > 1000 then",' print("File size is bigger than 1000 bytes.")',"else",' print("File size is below 1000 bytes.")',"end if"]}}});var Kk=T((O5,FO)=>{FO.exports={$meta:{description:'The FTP `shell` behaves just like the ssh `shell` and can be acquired by using [connect_service](#SHELL_CONNECT_SERVICE) and using the service type `"ftp"`. The `classID` used for this object is `"ftpshell"`. The port used for FTP is usually `21`.'},host_computer:{description:"Returns a `computer` related to the `shell`.",example:["shell = get_shell",'ftpShell = shell.connect_service("172.8.0.5", 21, "test", "test", "ftp")',"ftpComputer = ftpShell.host_computer",'print("FTP public ip: " + ftpComputer.public_ip)']},start_terminal:{description:"Launches an active terminal. The terminal's color will change, displaying the IP of the connected shell. Script execution will be stopped upon starting a new terminal, unless this is called from another script that was executed via `shell.launch`. In that case, you will enter the shell after closing your root-level script within that terminal window. Using this method within an SSH encryption process will cause an error to be thrown, preventing further script execution.",example:["shell = get_shell",'ftpShell = shell.connect_service("172.8.0.5", 21, "test", "test", "ftp")',"ftpShell.start_terminal"]},put:{description:"Send a `file` to the `computer` related to the provided `shell`. You require permission to read the `file` on the `computer` from which you are uploading and write permissions in the folder of the `computer` you are trying to upload to. In case of failure, this method will return a `string` with the cause. Otherwise, a `number` with the value one gets returned. If any of the passed arguments deviates from the types of the method signature, `null` will be returned. In case the `string` for sourceFile or destinationFolder is empty, an error will be thrown, preventing further script execution.",example:["shell = get_shell",'ftpShell = shell.connect_service("172.8.0.5", 21, "test", "test", "ftp")','putResult = ftpShell.put("/bin/ls", "/etc/", shell)','if typeof(putResult) == "string" then',' print("There was an error while sending file: " + putResult)',"else",' print("File got sent successfully.")',"end if"]}}});var Yk=T((D5,NO)=>{NO.exports={$meta:{description:'Create a `function` with `"function()"`, including parameters with optional default values. Assign the result to a variable. Invoke by using that variable. Use `@` to reference a function without invoking.',example:["triple = function(n=1)"," return n * 3","end function","print triple // 3","print triple(5) // 15","f = @triple","print f(5)"]}}});var Qk=T((j5,$O)=>{$O.exports={$meta:{description:"Use `if` blocks to do different things depending on some condition. Include zero or more `else if` blocks and one optional `else` block. Use a `while` block to loop as long as a condition is true. A `for` loop can loop over any `list`, including ones easily created with the `range` function. The `break` statement jumps out of a `while` or `for` loop. The `continue` statement jumps to the top of the loop, skipping the rest of the current iteration.",example:["// if block","if 2+2 == 4 then",' print "math works!"',"else if pi > 3 then",' print "pi is tasty"','else if "a" < "b" then',' print "I can sort"',"else",' print "last chance"',"end if","","// while loop",'s = "Spam"',"while s.len < 50",' s = s + ", spam"',"end while",'print s + " and spam!"',"","// for loop","for i in range(10, 1)",' print i + "..."',"end for",'print "Liftoff!"']},mail_login:{description:"Returns a `MetaMail` entity if the login was successful. On failure a `string` with details gets returned. In case any of the provided values deviate from the types defined in the signature this method will return `null`.",example:['metaMail = mail_login("test@test.com", "test")',"if metaMail == null then",' print("Loggin failed.")',"else",` print("You've got mail.")`,"end if"]},parent_path:{description:"Returns a `string` which is the parent path of the provided path. The path provided needs to be properly formatted. If the path is any other type than a `string` or is empty, this method will throw an error interrupting further script execution.",example:['print("Is proper parent path: " + (parent_path("/my/test/path") == "/my/test"))']},hasIndex:{description:"Verifies if an index is available within an object. In case of success this method will return a `number` with the value one. In case of failure the value will be a zero. This method supports `map`s, `list`s and `string`s. Each passed type may result in different behavior therefore it is advisable to take a look at each of their specific signatures. In case an unsupported value gets passed this method will return `null`.",example:['print("List has index: " + hasIndex([1, 2, 3], 2)']},typeof:{description:'Returns a `string` containing the type of the entity provided. There are following types by default: `"aptclientLib"`, `"blockchainLib"`, `"ctfEvent"`, `"coin"`, `"computer"`, `"cryptoLib"`, `"file"`, `"function"`, `"list"`, `"map"`, `"MetaLib"`, `"MetaMail"`, `"MetaxploitLib"`, `"NetSession"`, `"null"`, `"number"`, `"port"`, `"router"`, `"service"`, `"shell"`, `"ftpshell"`, `"string"`, `"subwallet"`, `"wallet"`. Custom types can be added as well by using the `classID` property in a `map`.',example:['myObj = { "classID": "myType" }','if typeof(myObj) == "myType" then',' print("Object is myType.")',"else",' print("Object is not myType.")',"end if"]},get_router:{description:"Returns by default the `router` to which the executing computer is connected to. Optionally an IP address can be provided. In case of failure `null` is returned. If there is no active internet connection, this method will throw an error, interrupting further script execution.",example:["router = get_router","if router.local_ip == get_shell.host_computer.network_gateway then",' print("Router is equal to network gateway.")',"else",' print("Router is not equal to network gateway.")',"end if"]},get_switch:{description:"Returns the switch on the local network whose IP address matches, otherwise it returns `null`.",example:['router = get_switch("192.168.0.2)','print("IP address of switch: " + router.local_ip)']},nslookup:{description:'Returns the IP address for the provided web address. In case the web address cannot be found a `string` gets returned containing the following message: `"Not found"`. If the provided web address is not a `string` or empty this method will throw an error preventing further script execution.',example:["url = params[0]",'print("IP for website is: " + nslookup(url))']},print:{description:"Print a message on the Terminal. Optionally replacing can be enabled which will replace all previous prints. This can be useful for creating a loading bar for example. There is also the possibility of styling output by using TextMeshPro rich-text tags.",example:["for i in range(9)",' print(("#" * (9 - i)) + ("-" * i) , true)'," wait(0.2)","end for"]},clear_screen:{description:"Removes any text existing in a Terminal prior to this point. Utilizing this method in an SSH encryption process will trigger an error, halting further script execution.",example:["for i in range(9)"," clear_screen",' print(("#" * (9 - i)) + ("-" * i))'," wait(0.2)","end for"]},active_user:{description:"Returns a `string` with the name of the user who is executing the current script.",example:['print("Current active user: " + active_user)']},home_dir:{description:"Returns a `string` with the home folder path of the user who is executing the current script.",example:['print("Home dir of current user: " + home_dir)']},get_shell:{description:"Returns the `shell` that is executing the current script. Optionally, a username and password can be provided, allowing the use of a shell with other user privileges. If the username or password does not match an existing user or if the provided values deviate from the defined signature, this method will return `null`.",example:['shell = get_shell("root", "test")',"if shell == null then",` print("Couldn't obtain root shell.")`,"else",' print("Obtained root shell.")',"end if"]},indexes:{description:"Returns a `list` containing all indexes or keys of the passed object. This method supports `map`s, `list`s, and `string`s. The type of each item may vary when using this method on a `map` since keys could be any type. The other types will return a `list` where each item is a `number`. In case a type is passed that is not supported, this method will return `null`.",example:['indexesOfStr = indexes("test")','print("Following indexes are available: " + indexesOfStr.join(", "))']},values:{description:"Returns a `list` containing all values of an object. Supported types are `map`s and `string`s. In case the passed type deviates from these two, it will return the passed value itself.",example:['indexesOfStr = values("test")','print("Following values are available: " + indexesOfStr.join(", "))']},indexOf:{description:"Lookups index of value within `map`s, `list`s, or `string`s. For `list`s and `string`s, the behavior is very similar. On success, you'll receive a `number` representing the found index. On failure, it will return `null`. For `map`s, it's a bit different since the returned value could be of any type. On failure, it will return `null` as well. If a value gets passed that is not supported, this method returns `null`.",example:['index = indexOf("test", "e")','print("e is at: " + index)']},len:{description:"Returns `number` indicating what size the passed object is. In case anything other than a `map`, `list` or `string` gets passed this method will return `null`.",example:['length = len("test")','print("Length of string is: " + length)']},shuffle:{description:"Randomizes content of an object. Valid data types for this method are `list` and `map`. In case a map-like object such as a `file` or `computer` a runtime exception will be thrown.",example:["list = [0, 1, 2, 3, 4, 5]","shuffle(list)",'print("And the winner is: " + list[0])']},val:{description:"Casts a `string` to a `number`. If the provided `string` does not represent a valid `number`, the `number` zero will be returned. If any type other than `string` or `number` is passed, this method will return `null`.",example:['num = val("1.25")','print("Number in string is: " + num)']},lower:{description:"Returns a `string` which is the lowercase transformed version of the provided `string`. In case anything other than a `string` gets passed this method will return the passed value again.",example:['myString = lower("HELLO WORLD")',"print(myString)"]},upper:{description:"Returns a `string` which is the uppercase transformed version of the provided `string`. In case anything other than a `string` gets passed this method will return the passed value again.",example:['myString = upper("hello world")',"print(myString)"]},sum:{description:"Returns a `number` representing the sum of all items within a `map` or a `list`. If any non-supported type is passed, this method will return a `number` with the value zero.",example:["list = [0, 1, 2, 3, 4, 5]",'print("Sum of all items is: " + sum(list))']},pop:{description:"When passing a `list` to this method, it will return the value at the last index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the passed object is empty or is anything other than a `map` or `list`, the method will return `null`.",example:["list = [0, 1, 2, 3, 4, 5]",'print("The last item is: " + pop(list))']},pull:{description:"When passing a `list` to this method, it will return the value at the first index and remove it from the `list`. Additionally, if a `map` is passed, it will always return the value corresponding to the first matching key and mutate the `map` object accordingly. However, passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the passed object is empty or is anything other than a `map` or `list`, the method will return `null`.",example:["list = [0, 1, 2, 3, 4, 5]",'print("The first item is: " + pull(list))']},push:{description:"Allows pushing a value into an object, supporting `map`s and `list`s. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution. If you try to push a value into an object that isn't a `map` or `list`, it returns `null`.",example:["list = [0, 1, 2, 3, 4, 5]","push(list, 42)",'print("The answer to everything is: " + pop(list))']},sort:{description:"Sorts the values of a `list` alphanumerically. This operation mutates the original `list`. Optionally, a key can be provided, which is used if the items are `map`s or `list`s. Finally, this method returns the updated `list`. If a type other than `list` is passed, the method returns the passed value without any changes.",example:["list = [9, 3, 5, 7]","sort(list)",'print("Sorted list: " + list.join(", "))']},remove:{description:"Depending on the data type, this function will remove a value in the provided object, potentially mutating the object. This method works with `map`s, `list`s, and `string`s. Each passed type may support different types for the `key` argument. For example, using this method on a string would treat the key as a character index. Therefore, it is advised to review the signatures of each type. Passing a key with the type `null` may cause an error to be thrown, preventing further script execution. The same will happen if the passed self value deviates from being a `map`, `list`, or `string`.",example:["list = [9, 3, 5, 7]","remove(list, 5)",'print("List after removal: " + list.join(", "))']},user_input:{description:"Puts script execution on hold to receive input from the user. Input can be submitted by pressing Enter. You can style the output message using TextMeshPro rich-text tags. Two optional arguments are available: `isPassword`, which defines whether input should be masked by asterisk signs, and `anyKey`, which enables capturing of keys individually. Using this method within an SSH encryption process or passing values deviating from the defined method signature will cause an error to be thrown, interrupting further script execution.",example:["num = 0",'aboveIncludingZeroTag = "<color=yellow>"','belowZeroTag = "<color=red>"',"while (true)"," clear_screen"," output = aboveIncludingZeroTag + num"," if (num < 0) then"," output = belowZeroTag + num"," end if"," print(output)",' key = user_input("Press arrow up/down to change value.", false, true)',' if (key == "UpArrow") then'," num = num + 1",' else if (key == "DownArrow") then'," num = num - 1"," else",' exit("Bye!")'," end if","end while"]},include_lib:{description:"Enables the inclusion of library binaries, which can be used inside your script. If successful, an object related to the provided library will be returned; otherwise, `null` is returned. This function is exclusively for importing library binaries. If you want to import custom scripts or binaries into your project, use `import_code` instead. Passing anything other than a `string` for the path, or leaving the path empty, will cause an error to be thrown, interrupting further script execution.",example:['crypto = include_lib("/lib/crypto.so")',"if crypto == null then",` print("Crypto library couldn't get imported.")`,"else",' print("Crypto library got imported.")',"end if"]},import_code:{description:'Enables to import code from different sources into one file. This is useful in case you want to split code into different files and also to avoid any limitation in regards to text file character limits. Note that `import_code` requires an absolute path and is called while compiling the file into a binary instead of during runtime. Additionally `import_code` cannot be nested. Code can be either imported from plain text files or binaries that have `"allow import"` enabled. `import_code` is also parsed wherever it is found, not even a `//` comment will prevent it being evaluated.',example:["//Content of main.src",'import_code("/home/user/my_module.src")','print("bye")',"//Content of my_module.src",'print("hello!")']},exit:{description:"Stops execution of the currently running script. Optionally a message can be provided which will be shown in the Terminal. There is also the possibility of styling output by using TextMeshPro rich-text tags.",example:["while (true)",' shouldExit = lower(user_input("Want to exit? (Y/N)"))',' if (shouldExit == "y") then',' exit("See you!")'," end if","end while"]},user_mail_address:{description:"Returns a `string` containing the email address of the player who is executing the script. If the user does not have an email address this method will return `null`.",example:['print("My EMail address is: " + user_mail_address)']},user_bank_number:{description:"Returns a `string` containing the bank account number of the player who is executing the script. If the user does not have a bank this method will return `null`.",example:['print("My Bank number is: " + user_bank_number)']},whois:{description:"Returns a `string` containing the administrator information behind an IP address provided. In case of failure the returned `string` will contain an error message instead. If the provided ip is not a `string` or is empty this method will throw an error causing the script to stop.",example:['adminInfo = whos("1.1.1.1")',"infoLines = adminInfo.split(char(10))","infoObject = {}",'infoObject.domainName = infoLines[0].split(":")[1].trim','infoObject.administrativeContact = infoLines[1].split(":")[1].trim','infoObject.emailAddress = infoLines[2].split(":")[1].trim','infoObject.phone = infoLines[3].split(":")[1].trim','print("Phone number: " + infoObject.phone)']},wait:{description:"Pauses the script execution. Optionally, the duration can be provided via the `time` argument. By default, the duration will be 1 second. The duration cannot be below 0.01 or above 300; otherwise, this method will throw a runtime exception.",example:["start = time","wait(5)","elapsed = time - start",'print("Waited: " + elapsed)']},command_info:{description:"Returns a `string` value of a translation. Translations include commands, documentation and other game-related things. Checkout [Grey-Texts](https://github.com/LoadingHome/Grey-Texts/blob/main/EnglishLang.json) for an overview of all available keys. If the provided command name is not a `string` or is empty this method will throw an error causing the script to stop.",example:['print(command_info("LS_USAGE"))']},program_path:{description:"Returns a `string` containing the path of the script that is currently executing. It will update when using `launch`, which makes it different from `launch_path`.",example:["path = program_path",'print("Script gets executed within: " + parent_path(path))']},current_path:{description:"Returns a `string` containing the path in which script that is currently executed from.",example:["path = current_path",'print("PWD: " + path)']},format_columns:{description:"Returns a `string` which is the formatted version of the provided text. Keep in mind that TextMeshPro rich-text tags might screw up the output. When using tags consider applying these after formatting. Passing anything other than a `string` will result in an empty `string`.",example:['text = "FIRST SECOND THIRD','1 2 3"',"print(format_columns(text))"]},current_date:{description:'Returns a `string` containing the current date and time. Ingame time passes 15 times as fast as real-time - 4 seconds per in-game minute. The initial time after every wipe will be the 1st of January 2000 at 6:00 AM. Additionally, the game time will not proceed while the server is offline.\n* Output schema: `"[day]/[month]/[year] - [hours]:[minutes]"`\n* Example output: `"27/Jan/2000 - 08:19"`\n',example:["dateStr = current_date",'dateSegments = dateStr.split(" - ")','date = dateSegments[0].split("/")',"day = date[0]","month = date[1]","year = date[2]",'dateTime = dateSegments[1].split(":")',"hours = dateTime[0]","minutes = dateTime[1]",'print("Current day: " + day)']},is_lan_ip:{description:"Returns a `number`. One indicates that the provided IP address is a valid LAN IP address. Otherwise, zero will be returned.",example:['print("Is Lan IP: " + is_lan_ip("192.168.0.1"))']},is_valid_ip:{description:"Returns a `number`. If the provided IP address is valid, its value will be one. Otherwise, its value is zero.",example:['print("Is valid IP: " + is_valid_ip("1.1.1.1"))']},bitwise:{description:'Returns a `number` by performing bitwise operations. Supported operators are: `"~"`, `"&"`, `"|"`, `"^"`, `"<<"`, `">>"`, `">>>"`. In case you want to use the tilde operator you only need to provide the operator and the left argument. If any of the required arguments is `null` this method will return `null`. Warning: If either operand is >= `0x80000000`, it\'ll always returns 0.',example:["num = params[0].to_int",'isOdd = bitwise("&", num, 1) == 1',"if isOdd then",' print("Number is odd.")',"else",' print("Number is even.")',"end if"]},abs:{description:"Returns the absolute value of `number`.",example:["a = 1","b = 5","difference = abs(a - b)",'print("Difference between a and b is: " + difference)']},acos:{description:"Returns the inverse cosine (in radians) of a `number`.",example:["adjacent = 8","hypotenuse = 10","calcAngle = acos(adjacent / hypotenuse)",'print("Angle: " + calcAngle)']},asin:{description:"Returns the inverse sine (in radians) of a `number`.",example:["opposite = 6","hypotenuse = 10","calcAngle = acos(opposite / hypotenuse)",'print("Angle: " + calcAngle)']},atan:{description:"Returns the inverse tangent (in radians) of a `number`.",example:["opposite = 8","hypotenuse = 10","calcAngle = atan(opposite / hypotenuse)",'print("Angle: " + calcAngle)']},tan:{description:"Returns the tangent of a `number` in radians.",example:["degrees = 90","tanFromDegrees = tan(degress * pi / 180)",'print("Tan from degrees: " + tanFromDegrees)']},cos:{description:"Returns the cosine of a `number` in radians.",example:["radians = 1","radius = 10","circleX = cos(radians) * radius","print(circleX)"]},code:{description:"Returns the Unicode `number` of the first character of the string. In case an empty `string` is provided the script execution will crash.",example:['key = user_input("Press a key!", false, true)',"isA = key.code == 97","if isA then",' print("You pressed A.")',"else",' print("You did not press A.")',"end if"]},char:{description:"Returns the UTF-16 character `string` related to the provided unicode `number`. The provided `number` needs to be between 0 and 65535. Any `number` which is outside this range will cause the script to throw a runtime error. Beware when passing non-ASCII values to intrinsics as they will likely get re-encoded as UTF-8. For example, `md5(char(255))` will actually return the hash of the two-byte sequence `0xC3` `0xBF`.",example:['key = user_input("Press a key!", false, true)',"isA = key == char(97)","if isA then",' print("You pressed A.")',"else",' print("You did not press A.")',"end if"]},sin:{description:"Returns the sine of a `number` in radians.",example:["radians = 1","radius = 10","circleY = sin(radians) * radius","print(circleY)"]},floor:{description:"Returns `number` rounded down to the integer value of the provided `number`.",example:["price = 25.43467","floored = floor(price * 100) / 100",'print("Floored price: " + floored)']},range:{description:"Generates a `list` where each item is a `number`. By default, the list starts with zero and increments by one for each item. You can optionally define a start and end value, as well as customize the incremental value. However, if the incremental value is zero, or if the list exceeds `16777215L` items, or if start/end is `null`, the function will throw a runtime error.",example:['print("Countdown:")',"for num in range(10)"," print(num)","end for",'print("Done!")']},round:{description:"Returns `number` rounded to the integer value of the provided `number`.",example:["price = 25.43467","rounded = round(price * 100) / 100",'print("Price: " + rounded)']},rnd:{description:"Returns a random `number` between 0 and 1. Optionally a seed `number` can be provided.",example:["min = 10","max = 20","output = floor(rnd * (max - min + 1) + min)",'input = user_input("Guess a number between 10 and 20!").to_int',"if (input == output) then",' print("You guessed right!")',"else",' print("You failed! The number was " + output)',"end if"]},sign:{description:"Returns a one or minus one, indicating the sign of the number passed as argument. If the input is zero, it will be returned as-is.",example:["print(sign(40))","print(sign(-40))","print(sign(0))"]},sqrt:{description:"Returns the square root of a `number`.",example:["a = 3","b = 4","calcHypotenuse = sqrt((a * a) + (b * b))",'print("Hypotenuse: " + calcHypotenuse)']},str:{description:"Returns the `string` value of provided data. Can be used to turn a `number` into a `string` or to get the signature of a `function`.",example:["signature = str(@user_input)","argSegment = signature[9:signature.len - 1]",'args = argSegment.split(",")','print("Function has " + args.len + " arguments.")']},ceil:{description:"Returns `number` rounded up to the integer value of the provided `number`.",example:["price = 25.43467","upperPrice = ceil(price * 100) / 100",'print("Upper price: " + upperPrice)']},pi:{description:"Returns the `number` PI to the precision of six.",example:["radius = 10","circumference = 2 * pi * radius",'print("Circumference: " + circumference)']},launch:{description:"Launches the binary located at the provided path. Optionally, parameters can be passed. Returns a `number`. If the launch was successful, the value will be one; otherwise, it will be zero. In some cases, a `string` will be returned containing an error message. If you need to share variables between a launched script and the current process, consider using `get_custom_object`. Note that launching a script is not asynchronous, meaning that the current script will pause its execution until the launched script finishes. This method cannot be used to execute binaries with an EXE extension (GUI interface). If any provided values deviate from the method signature, a runtime exception will be thrown.",example:['shell = get_shell("root", "test")','launch(shell, "/bin/cat", "/etc/passwd")']},launch_path:{description:"Returns a `string` containing the path of the script that was initially executed, meaning that even when using `launch`, it will still return the path of the initially executed script.",example:["path = launch_path",'print("Script gets executed within: " + parent_path(path))']},slice:{description:"Returns a sliced version of the passed object. Valid data types for slicing are `string` and `list`. The returned object will contain all elements related to the provided start and end index. If no start or end index is provided this method will essentially return a shallow copy of the passed object. If an invalid data type is passed, `null` is returned.",example:['myString = "not your text"','print("my " + slice(myString, 9))']},md5:{description:"Returns the MD5 hash `string` of the provided `string`. Using this method within an SSH encryption process or passing anything other than a `string` will cause an error to be thrown, stopping any further script execution.",example:['passwordHash = md5("test")',`print("Hash for the password 'test' is " + passwordHash)`]},hash:{description:"Returns numeric hash for the provided data. Using this method within a SSH encryption process will cause an error to be thrown causing the script execution to stop.",example:['hashA = hash({ "a": 2, "b": 1 })','hashB = hash({ "b": 1, "a": 2 })',"if (hashA == hashB) then",' print("Objects are alike!")',"else",' print("Objects are different!")',"end if"]},time:{description:"Returns a `number` of seconds representing the elapsed time since the script started.",example:["start = time","for i in range(10000)"," var = i * 100","end for","endTime = time - start",'print("Script execution done within: " + endTime)']},bitAnd:{description:"Performs a bitwise AND for the provided values. Returns a `number`. Warning: If either operand is >= `0x80000000`, it'll always return 0.",example:['print("Result of bitwise AND: " + bitAnd(1, 2))']},bitOr:{description:"Performs a bitwise OR for the provided values. Returns a `number`. Warning: If either operand is >= `0x80000000`, it'll always return 0.",example:['print("Result of bitwise OR: " + bitOr(1, 2))']},bitXor:{description:"Performs a bitwise XOR for the provided values. Returns a `number`. Warning: If either operand is >= `0x80000000`, it'll always return 0.",example:['print("Result of bitwise XOR: " + bitXor(1, 2))']},log:{description:"Returns the natural logarithm of a `number`. By default, the base is 10. Optionally the base can be changed.",example:["a = 2","b = 8","baseLog = log(a) / log(b)",'print("Base log is: " + baseLog)']},yield:{description:"Waits for the next tick.",example:["while (true)"," yield",' print("tick")',"end while"]},get_custom_object:{description:"Returns `map` which is shared throughout script execution. Can be helpful if it desired to pass or receive values when using `launch`. Using this method in a SSH encryption process will cause an error to be thrown preventing further script execution.",example:["get_custom_object.shouldEndScript = false","while (get_custom_object.shouldEndScript)",' print("Waiting...")'," wait(2)","end while"]},insert:{description:"Inserts a value into either a `list` or a `string`. If the method is used on any other data type or the passed index is not a `number`, this method throws an error, preventing further script execution.",example:["list = [2, 3, 4]","insert(list, 2, 42)",'print("List with inserted item: " + list.join(", "))']},to_int:{description:"Returns a `number` which is parsed from the `string` as an integer. In case the `string` is not numeric it will return the original `string`. If the passed value is not a `string` this method will return `null`.",example:['myString = "1"',"print(to_int(myString) + 41)"]},join:{description:"Returns a concatenated `string` containing all stringified values inside the `list`. These values will be separated via the provided separator. Passing anything other than a `list` will result in the original value being returned. In case the passed `list` exceeds `16777215L` items or the delimiter exceeds 128 characters, this method will throw an error, interrupting further script execution.",example:["myList = [42, 1, 3]",`print(join(myList, " .-*'*-. "))`]},split:{description:"Returns a `list` where each item is a segment of the `string`, separated by the provided separator `string`. This method uses regular expressions for matching, so remember to escape special characters such as dots. If any of the provided arguments deviate from the method signature types, this method will return `null`. In case the pattern is empty, the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','segments = split(myString, " ")','if segments[0] != "42" then',' print("Invalid information spotted!")',"else",' print("Information seems valid!")',"end if"]},replace:{description:"This function replaces a value within an object and returns the mutated object. Currently, it only supports `map`s and `list`s. Previously, it also supported `string`s, but that functionality has been replaced by `replace_regex`. If you use anything other than the supported types, a runtime error will be thrown.",example:["list = [1,2,3,42]","newList = replace(list, 42, 4)","print(newList)"]},replace_regex:{description:"Returns a `string` with the replaced content by using regular expressions. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','newString = replace_regex(myString, "\\w+$", "right")',"print(newString)"]},is_match:{description:"Uses regular expression to check if a string matches a certain pattern. If it matches, it will return a `number` with the value one. If it does not match, the value of the `number` will be zero. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','hasWordAtTheEnd = is_match(myString, "\\w+$")',"print(hasWordAtTheEnd)"]},matches:{description:"Returns a `map` with all search results for the provided regular expression. Each key contains the index and the value contains the matching `string`. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','result = matches(myString, "w")',"print(result)"]},get_ctf:{description:"Returns `ctfEvent` object if there is one available. In case of failure this method will return a `string` with details."},show:{description:'Displays all the packages available in a repository. The repository must be listed in the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. If it cannot find a repository, it will return a string with an error message. On success, it will return a `string` containing all packages and their descriptions, with each entry separated by a newline.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = show(aptClient, "177.202.15.132")',"packageList = split(packages, char(10) + char(10))","pop(packageList) // remove last empty item","for packageItem in packageList"," entry = split(packageItem, char(10))"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},search:{description:'The `search` method specifically looks for a package in any of the repositories listed in `"/etc/apt/sources.txt"`. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `string` containing all packages that partially match the provided search value. On failure, it will return a `string` with various error messages.',example:['aptClient = include_lib("/lib/aptclient.so")','packages = search(aptClient, ".so")',"packageList = split(packages, char(10) + char(10))","for packageItem in packageList"," entry = split(packageItem, char(10))"," if len(entry) != 2 then",' print "something wrong in: " + entry'," continue"," end if"," packageName = entry[0]"," packageDescription = entry[1]",' print "Title: <b>" + packageName + "</b>"',' print "Description: <i>" + packageDescription + "</i>"',' print "----------------------------"',"end for"]},update:{description:'Refreshes the list of available packages after adding a new repository in `"/etc/apt/sources.txt"`, or if the remote repository has updated its information in `"/server/conf/repod.conf"`. If either the `"/etc/apt/sources.txt"` file has an invalid format or an invalid `aptClient` object is passed, this method will return a `number` with the value zero. On a successful update, an empty `string` will be returned. In case of failure, a `string` with an error message will be returned.',example:['aptClient = include_lib("/lib/aptclient.so")',"result = update(aptClient)",'if result == "" then',' print "Update successful!"',"else",' print "Error while updating: " + result',"end if"]},add_repo:{description:'Adds a repository address to the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = add_repo(aptClient, "177.202.15.132")','if result == "" then',' print "Addition successful!"',"else",' print "Error while adding: " + result',"end if"]},del_repo:{description:'Removes a repository address from the `"/etc/apt/sources.txt"` file. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return an empty `string`. In case of failure, it will return a `string` with an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = del_repo(aptClient, "177.202.15.132")','if result == "" then',' print "Deletion successful!"',"else",' print "Error while deleting: " + result',"end if"]},install:{description:'Installs a program or library from a remote repository listed in `"/etc/apt/sources.txt"`. If no path is specified, the program installs in `"/lib"` if it is a library or in `"/bin"` otherwise. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `number` with the value one. In case of failure, it will return a `string` containing an error message.',example:['aptClient = include_lib("/lib/aptclient.so")','result = install(aptClient, "rshell_interface")',"if result == 1 then",' print "Installed program successful!"',"else",' print "Error while installing: " + result',"end if"]},check_upgrade:{description:"Verifies if there is a newer version of the program or library in the repository. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `number`, which can be either zero or one. Zero indicates that there is no new version available, while one indicates that there is a new version. In case of failure, it will return a string containing an error message.",example:['aptClient = include_lib("/lib/aptclient.so")','result = check_upgrade(aptClient, "/bin/rshell_interface")',"if result == 0 then",' print "Program doesnt need an update!"',"else if result == 1 then",' print "Program does need an update!"',"else",' print "Error while checking version: " + result',"end if"]},coin_price:{description:"Returns a `number` representing the current unit value of the cryptocurrency. In case of an error, it will return a `string` with the error details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','price = coin_price(blockchain, "test8")','if typeof(price) == "string" then',' exit "Couldnt get coin price due to: " + price',"end if",'print "Your coin price is " + price']},show_history:{description:"Returns a `map` with the latest changes in the value of a specific cryptocurrency. The key of the `map` is an index represented by a `number`. The value is a `list`, where index 0 is the historical price of the coin and index 1 is the date when the price change occurred. If any of the provided parameters have a type that deviates from the defined signature, or if no coin exists with this name, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','history = show_history(blockchain, "test")','if typeof(history) == "string" then',' exit "Couldnt fetch history due to: " + history',"end if","for entry in values(history)"," price = entry[0]"," date = entry[1]",' print "The price on " + date + " was " + price',"end for"]},amount_mined:{description:"Returns a `number` representing the total amount of mined coins. In case of an error, it will return a string with details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','mined = amount_mined(blockchain, "test")','if typeof(mined) == "string" then',' exit "Couldnt get amount mined due to: " + mined',"end if",'print "Your mined amount is " + mined']},get_coin:{description:"Returns a `coin` object used to manage the currency. In case of an error, it will return a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','if typeof(coin) != "coin" then',' exit "Couldnt get coin object due to: " + coin',"end if",'print "Your coin address is " + get_address(coin)']},login_wallet:{description:"Returns a `wallet` object on success. In case of an error, it will return a `string` indicating the reason. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','if typeof(wallet) == "string" then',' print "Login failed due to: " + wallet',"else",' print "Login was successful!"',"end if"]},create_wallet:{description:"Creates a `wallet` and returns a `wallet` object on success, which can be used to manage cryptocurrencies. In case of an error, it will return a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = create_wallet(blockchain, "test", "test")','if typeof(wallet) == "string" then',' print "Wallet creation failed due to: " + wallet',"else",' print "Wallet creation was successful!"',"end if"]},delete_coin:{description:"Removes a cryptocurrency from the world. It is required to provide the credentials used in the creation of the cryptocurrency. On success, it will return a `number` with the value one. On failure, it will return a `string` containing details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','result = delete_coin(blockchain, "test", "test", "test")','if typeof(result) == "string" then',' exit "Couldnt delete coin due to: " + result',"end if",'print "Coin got deleted"']},set_cycle_mining:{description:"Defines the interval (in-game hours) in which each user receives a coin reward when mining. The interval cannot be lower than 1 and not be higher than 2160. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, it will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = set_cycle_mining(coin, 20)","if result == 1 then",' print "Successful updated mining interval"',"else",' print "Failed updating mining interval"',"end if"]},get_cycle_mining:{description:"Returns a `number` representing the defined interval in which each user receives a coin reward when mining. In case of failure, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_cycle_mining(coin)",'if typeof(result) == "string" then',' exit "Failed getting cyclic mining value due to: " + result',"end if",'print "cyclic mining value: " + result']},get_reward:{description:"Returns a `number` representing the amount of coins that will be received as a reward after each mining cycle. In case of failure, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_reward(coin)",'if typeof(result) == "string" then',' exit "Failed getting reward value due to: " + result',"end if",'print "reward value: " + result']},set_reward:{description:"Assigns the reward that miners will receive after each mining cycle. The reward value has to be above one. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. On success, the method will return a `number` with the value one. In case of failure, the method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = set_reward(coin, -1)",'if typeof(result) == "string" then',' exit "Failed setting reward due to: " + result',"end if",'print "Successfully set reward!"']},transaction:{description:"Makes a transaction of the currency between the indicated subwallets. In case of an error, a `string` with the details is returned. In case of success, a `number` with a value of one will be returned. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = transaction(coin, "test", "test2", 20)','if typeof(result) == "string" then',' exit "Failed transaction due to: " + result',"end if",'print "Successfully transfered!"']},create_subwallet:{description:"Registers a new account in the `coin` that can be used to manage services such as stores. It is necessary to provide the PIN of the owner's `wallet` that wants to register. In case of success, the method will return a `number` with the value one. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`. In case of an error, a `string` with the details is returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','wallet = login_wallet(blockchain, "test", "test")','result = create_subwallet(coin, "test", wallet.get_pin, "test", "test")','if typeof(result) == "string" then',' exit "Failed to create subwallet due to: " + result',"end if",'print "Successfully created subwallet!"']},get_subwallet:{description:"Returns a `subWallet` object on success. In case of error, it returns a `string` with the details. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = get_subwallet(coin, "test")','if typeof(result) == "string" then',' exit "Failed to get subwallet due to: " + result',"end if",'print "Successfully received subwallet!"']},get_subwallets:{description:"Returns a `list` where each item is a `subWallet` object, including all the accounts registered in the cryptocurrency. In case of error, it returns a `string` with the details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_subwallets(coin)",'if typeof(result) == "string" then',' exit "Failed to get subwallets due to: " + result',"end if","for subwallet in result",' print get_user(subwallet) + " has " + get_balance_subwallet(subwallet) + " coins"',"end for"]},set_address:{description:"Configures a valid address that will be shown to users who do not have the currency, indicating where to register. In case of an error, a `string` with the details is returned. In case of success, a `number` with a value of one will be returned. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = set_address(coin, "12.12.12.12")','if typeof(result) == "string" then',' exit "Failed to set address due to: " + result',"end if",'print "Successfully set address!"']},get_address:{description:"Returns the configured address that will be shown to users who do not have the currency, indicating where they have to register. In case of an error, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_address(coin)","if not is_valid_ip(result) then",' exit "Failed to get address due to: " + result',"end if",'print "address: " + result']},get_mined_coins:{description:"Returns a `number` representing the amount of coins that have been mined so far. In case of an error, the method will return a `string` with details. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")',"result = get_mined_coins(coin)",'if typeof(result) == "string" then',' exit "Failed to get mined coins due to: " + result',"end if",'print "mined coins: " + result']},reset_password_coin:{description:"Resets the password of the coin. It returns a `number` with the value one if resetting was successful; otherwise, it will return a `string`. If an invalid coin object is provided, the method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','result = reset_password(coin, "test")','if typeof(result) == "string" then',' exit "Failed to reset password due to: " + result',"end if",'print "Successfully reset password"']},get_ports:{description:"Returns a `list` of `port`s on the `computer` which are active. If an invalid `computer` object is passed, this method will return `null`.",example:["router = get_router","ports = get_ports(host_computer(get_shell))","for port in ports",' print("Info: " + router.port_info(port))',"end for"]},get_name:{description:'Returns the hostname of the machine. If an invalid `computer` object is passed, this method will return a `string` containing `"Unknown"`.',example:["computerName = get_name(host_computer(get_shell))",'print("The name of your machine is " + computerName)']},lan_ip:{description:"Returns a `string` with the local IP address of the `computer`. If an invalid `computer` object is passed, this method will return `null`.",example:["localIp = lan_ip(host_computer(get_shell))",'print("Public ip:" + localIp)']},public_ip_pc:{description:"Returns a `string` with the public IP address of the `computer`. If an invalid `computer` object is passed, this method will return `null`.",example:["publicIp = public_ip_pc(host_computer(get_shell))",'print("Public ip:" + publicIp)']},File:{description:"Returns a `file` located at the path provided in the arguments. The path can be either relative or absolute. Keep in mind that any `file` object can be a folder as well. If the provided path cannot be resolved, meaning that no file or folder exists, this method will return `null`. Providing any other type than `string` or the value being empty for the path will result in an error thrown interrupting the script execution. If an invalid `computer` object is passed, this method will return `null`.",example:['filePath = "/etc/passwd"',"file = File(host_computer(get_shell), filePath)","if file != null then"," print(file.get_content)","else",' print("File at given path " + filePath + " does not exist.")',"end if"]},create_folder:{description:"Creates a folder at the path provided in the arguments. There are certain limitations when it comes to creating a folder. The folder name has to be alphanumeric and below 128 characters. Creation will fail as well when there is already a folder in place or if there are lacking permissions. Additionally, there is a folder limit of about 250 in each folder and 3125 folders in the computer overall. In case the folder creation fails, the method will return a `string` with details. In case of success, it will return a `number` with the value one. Providing any type that deviates from the signature or using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution. If an invalid `computer` object is passed, this method will return `null`.",example:['path = "/home/" + active_user + "/Desktop"',"computer = host_computer(get_shell)",'createResult = create_folder(computer, path, "myfolder")','if typeof(createResult) == "string" then',' print("There was an error when creating the folder: " + createResult)',"else",' print("Folder got created at given path " + path)',"end if"]},is_network_active:{description:"Returns a `number` with either the value one or zero. The value will be one if the `computer` has internet access. If there is no internet access, it will return zero instead. In case an invalid `computer` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)","if is_network_active(computer) then",` print("You're connected.")`,"else",` print("You're not connected.")`,"end if"]},touch:{description:"Creates an empty text `file` at the provided path. Certain limitations apply to file creation: the `file` name must be alphanumeric and below 128 characters. Creation will fail if a `file` already exists at the specified path or if there are insufficient permissions. Additionally, there is a file limit of about 250 per folder and 3125 files overall on the computer. If successful, it returns a `number` with the value one. On failure, it returns a `string` with details. Using this method in an SSH encryption process will cause an error to be thrown, preventing further script execution. If an invalid `computer` object is passed, this method will return `null`.",example:['path = "/home/" + active_user + "/Desktop"',"computer = host_computer(get_shell)",'createResult = touch(computer, path, "myFile.txt")','if typeof(createResult) == "string" then',' print("There was an error when creating the file: " + createResult)',"else",' print("File got created at given path " + path)',"end if"]},show_procs:{description:"Returns a `string` providing an overview of all active processes on the `computer`. This includes information about the username, PID, CPU usage, memory consumption, and command name. Using this method in an SSH encryption process will throw an error, preventing further script execution. If an invalid `computer` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)","procs = show_procs(computer)","list = procs.split(char(10))[1:]","processes = []","for item in list",' parsedItem = item.split(" ")'," process = {}"," process.user = parsedItem[0]"," process.pid = parsedItem[1]"," process.cpu = parsedItem[2]"," process.mem = parsedItem[3]"," process.command = parsedItem[4]"," processes.push(process)","end for","print(processes)"]},network_devices:{description:"Returns a `string` containing all network devices available on the `computer`, with each item providing information about the interface name, chipset, and whether monitoring support is enabled. If an invalid `computer` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)","devices = network_devices(computer)","deviceList = devices.split(char(10))","for item in deviceList"," print(item)","end for"]},change_password:{description:"Changes the password of an existing user on the `computer`. Root permissions are necessary for successful password changes. Passwords can only include alphanumeric characters and cannot exceed 15 characters. If the password change fails, this method will return a `string` containing information on why it failed. If the change succeeds, it will return a `number` with the value one. If the provided username is empty, an error will be thrown, preventing any further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','changeResult = change_password(computer, "test", "newPassword")','if typeof(changeResult) == "string" then',' print("There was an error when changing the password: " + changeResult)',"else",' print("Password got successfully changed.")',"end if"]},create_user:{description:"Creates a user on the `computer`, with the specified name and password. Root permissions are necessary for successful user creation. Neither username nor password can exceed more than 15 characters and both need to be alphanumeric. There cannot be more than 15 users created on the same `computer`. In case the creation fails, this method will return a `string` containing the reason for the failure. On success, it will return a `number` with the value one. If the provided username is empty or either of the values exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','creationResult = create_user(computer, "newUser", "123")','if typeof(creationResult) == "string" then',' print("There was an error when creating an user: " + creationResult)',"else",' print("User got successfully created.")',"end if"]},delete_user:{description:"Deletes the indicated user from the `computer`. It can optionally also delete the home folder related to the user. By default, the home folder will not be deleted. Root permissions are necessary to successfully delete a user. Keep in mind that you cannot delete the root user. In case the deletion fails, this method will return a `string` containing the cause of failure. On success, this method will return a `number` with the value one. If the provided username is empty, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','deletionResult = delete_user(computer, "test", true)','if typeof(deletionResult) == "string" then',' print("There was an error when deleting an user: " + deletionResult)',"else",' print("User got successfully deleted.")',"end if"]},create_group:{description:"Creates a new group associated with an existing user on the `computer`. It is necessary to be root to be able to successfully create a group. There are a few limitations when creating a group such as a character limit of 15 and that the group name may only contain alphanumeric characters. In case the group creation fails, this method will return a `string` containing the cause of failure. On success, it will return a `number` with the value one. In case the provided arguments are empty or the username exceeds 15 characters, an error will be thrown, interrupting further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','creationResult = create_group(computer, "test", "staff")','if typeof(creationResult) == "string" then',' print("There was an error when creating a group: " + creationResult)',"else",' print("Group got successfully created.")',"end if"]},delete_group:{description:"Deletes an existing group associated with an existing user on the `computer`. It is necessary to be root to be able to successfully delete a group. In case the group deletion fails, this method will return a `string` containing the cause of failure. On success, it will return `number` with the value one. If either of the provided values is empty, an error will be thrown preventing further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','deletionResult = delete_group(computer, "test", "staff")','if typeof(deletionResult) == "string" then',' print("There was an error when deleting a group: " + deletionResult)',"else",' print("Group got successfully deleted.")',"end if"]},groups:{description:"Returns a `string` containing groups associated with an existing user on the `computer`. In case the user does not exist, a `string` will be returned with an error message. If the provided username is empty, an error will be thrown preventing further script execution. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','create_group(computer, "root", "staff")','groups = groups(computer, "root")',"listOfGroups = groups.split(char(10))","print(listOfGroups)"]},close_program:{description:"Closes a program associated with the provided PID. You can see the list of active programs by either using `show_procs` or typing `ps` into your terminal. To close a program, you need to be either the owner of the running process or root. In case the closing of a program fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. If there is no process with the provided PID, this method will return a `number` with the value zero. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))',"processes = split(show_procs(computer), char(10))[1:]",'pid = split(processes[1], " ")[1]',"closeResult = close_program(computer, to_int(pid))",'if typeof(closeResult) == "string" then',' print("There was an error when closing a program: " + closeResult)',"else",' print("Program with pid " + pid + " got successfully closed.")',"end if"]},wifi_networks:{description:"Returns a list of the Wi-Fi networks that are available for the provided interface. Each item in the `list` is a `string` containing information on the BSSID, PWR, and ESSID. If no matching netDevice can be found or an invalid `computer` object is passed, this method will return `null`. In case the active network card is not a Wi-Fi card, an error will be thrown, preventing any further script execution.",example:['computer = host_computer(get_shell("root", "test"))','networks = wifi_networks(computer, "wlan0")',"result = []","for network in networks",' parsedItem = network.split(" ")'," item = {}"," item.BSSID = parsedItem[0]"," item.PWR = parsedItem[1]"," item.ESSID = parsedItem[2]"," result.push(item)","end for","print(result)"]},connect_wifi:{description:"Connects to the indicated Wi-Fi network. It is not possible to connect to a new Wi-Fi while being logged in as a guest. If connecting to a new Wi-Fi fails, this method will return a `string` containing details. On success, it will return a `number` with the value one. Wi-Fi networks can be found via `wifi_networks` or by typing `iwlist` as a command in the terminal. If any of the provided parameters have a type that deviates from the defined signature, the method will return `null`.",example:["computer = host_computer(get_shell)","networks = wifi_networks(computer)",'firstNetwork = networks[0].split(" ")',"BSSID = firstNetwork[0]","ESSID = firstNetwork[2]",'connectionResult = connect_wifi(host_computer, "wlan0", BSSID, ESSID, "wifi-password")','if typeof(connectionResult) == "string" then',' print("There was an error while connecting to new Wifi: " + connectionResult)',"else",' print("Connected to new Wifi successfully.")',"end if"]},connect_ethernet:{description:"Sets up a new IP address on the `computer` through the ethernet connection. It is not possible to set up a new IP address while being logged in as a guest. On failure, this method will either return a `string` with details or `null`. On success, it will return an empty `string`. If any of the provided parameters have a type that deviates from the defined signature or the computer is not connected to the internet, an error will be thrown preventing any further script execution.",example:["computer = host_computer(get_shell)",'connectionResult = connect_ethernet(computer, "eth0", "192.168.0.4", local_ip(get_router))','if typeof(connectionResult) == "string" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected successfully.")',"end if"]},network_gateway:{description:'Returns a `string` with the gateway IP address configured on the `computer`. If an invalid `computer` object gets passed, this method returns a `string` with the value `"0.0.0.0"`.',example:["computer = host_computer(get_shell)","gatewayIp = network_gateway(computer)",'print("Gateway IP: " + gatewayIp)']},active_net_card:{description:'Returns a `string` which contains either the keyword `"WIFI"` or `"ETHERNET"` depending on which connection type your `computer` is connected by. In case an invalid `computer` object gets passed, this method will return `null`.',example:["computer = host_computer(get_shell)","netCard = active_net_card(computer)",'print("Connected by: " + netCard)']},aircrack:{description:"Returns a `string` containing the password based on the file which was generated via aireplay. In case of failure, it will return `null` instead. If the provided path is empty, an error will be thrown, interrupting the script execution.",example:['crypto = include_lib("/lib/crypto.so")','networks = wifi_networks(host_computer(get_shell), "wlan0")','firstNetwork = networks[1].split(" ")',"bssid = firstNetwork[0]","pwr = firstNetwork[1][:-1].to_int","essid = firstNetwork[2]","aireplayResult = aireplay(crypto, bssid, essid, 300000 / pwr)","if (aireplayResult == null) then",' result = aircrack(crypto, home_dir + "/file.cap")'," print(result)","end if"]},airmon:{description:'Enables or disables the monitor mode of a network device. The `options` parameter can only be `"start"` or `"stop"`. Monitor mode can only be enabled on Wifi cards. If it wasn\'t possible to enable or disable the monitor mode, this method will return either a `number` with the value zero or a `string` with details. In case of success, it will return a `number` with the value one.',example:['crypto = include_lib("/lib/crypto.so")','airmonResult = airmon(crypto, "start", "wlan0")','if typeof(airmonResult) == "string" then',' print("There was an error while switching monitoring mode: " + airmonResult)',"else",' print("Monitoring mode switched successfully.")',"end if"]},aireplay:{description:'Used to inject frames on wireless interfaces. Once the command with `"Control+C"` is stopped, it will save the captured information in a text file called `"file.cap"` in the path where the terminal is currently located. Alternatively, a maximum of captured `acks` can be specified for the command to stop automatically, saving the `"file.cap"` file as described above. To figure out how many ACKs are required, you can use the following formula: `"300000 / [Wifi PWR]"`. If there is an error, a `string` will be returned with the message indicating the problem. On success, it will return `null`. It is advised though to verify that the capture file actually exists. If the passed `crypto` object is invalid, it will return `null` as well. In case any of the provided values deviate from the signature types or bssid/essid is empty, an error will be thrown preventing any further script execution.',example:['crypto = include_lib("/lib/crypto.so")','networks = wifi_networks(host_computer(get_shell), "wlan0")',"for index in range(0, networks.len - 1)",' print(index + ".) " + networks[index])',"end for",'selectedIndex = user_input("Select Wifi: ").to_int','if (typeof(selectedIndex) == "string" or selectedIndex < 0 or selectedIndex > networks.len - 1) then',' exit("Wrong index!")',"end if",'parsed = networks[selectedIndex].split(" ")',"bssid = parsed[0]","pwr = parsed[1][:-1].to_int","essid = parsed[2]","potentialAcks = 300000 / pwr","aireplaycrypto, bssid, essid, potentialAcks)",'wifiPassword = aircrack(crypto, "/home/" + active_user + "/file.cap")','print("Wifi password for " + essid + " is " + wifiPassword)']},decipher:{description:"Returns a decrypted password via the provided password MD5 hash. Keep in mind that this method is not decrypting a password but rather checking for existing passwords within the game world with a matching MD5 hash. So in case a password does not exist in the game world, the decryption will fail. On failure, this method will return `null`. Using this method in an SSH encryption process will cause an error to be thrown, aborting further script execution.",example:['crypto = include_lib("/lib/crypto.so")','computer = host_computer(get_shell("root", "test"))','passwdContent = get_content(File(computer, "/etc/passwd"))',"firstAccount = passwdContent.split(char(10))[0]",'parsed = firstAccount.split(":")',"username = parsed[0]","passwordHash = parsed[1]","password = decipher(crypto, passwordHash)",'print("User: " + username)','print("Password: " + password)']},smtp_user_list:{description:"Returns a `list` of the existing users on the `computer` where the SMTP service is running. If these users also have an email account registered on the SMTP server, it will be indicated in the `list`. SMTP services are usually running on port `25`. In case of failure, this method will return a `string` containing the cause. If any of the provided values deviate from the signature types, this method will return `null`.",example:['crypto = include_lib("/lib/crypto.so")','print(smtp_user_list(crypto, "192.168.0.4", 25))']},get_description:{description:"Returns a `string` with the CTF event description. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},get_template:{description:"Returns a `string` with the CTF event template. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},player_success:{description:"Returns a `number` with the value one if the CTF event was completed successfully. Otherwise, this method will return a `number` with the value zero. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},get_creator_name:{description:"Returns a `string` with the name of the CTF event creator. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},get_mail_content:{description:"Returns a `string` with the mail content of the CTF event. If the provided `ctfEvent` object is invalid or missing, this method will return `null`."},chmod:{description:'Modifies the `file` permissions. Optionally, these permissions can also be applied recursively. The format for applying permissions is as follows: `"[references][operator][modes]"`. The references type is defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. The operator is used to define if permissions get added `"+"` or removed `"-"`. There are three different modes that can be modified: read `"r"`, write `"w"`, and execute `"x"`. So, for example, `"o-wrx"` would remove all possible permissions for others. To add all permissions for others again, `"o+wrx"` would be used. In case the modification fails, this method will return a `string` containing information about the reason. Otherwise, an empty `string` is returned. In case any type other than `number` is used for the `isRecursive` parameter, an error will be thrown preventing further script execution. If an invalid `file` object is passed, this method will return `null`.',example:['hostComputer = host_computer(get_shell("root", "test"))','rootFolder = File(hostComputer, "/bin")',"oldPermissions = permissions(rootFolder)",'chmod(rootFolder, "o-wrx", true)',"newPermissions = permissions(rootFolder)",'print("Old permissions: " + oldPermissions)','print("New permissions: " + newPermissions)']},copy:{description:"Copies the `file` to the provided path. Files can only be copied if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, it will return a `string` containing information about the reason for failure. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted or an invalid `file` object is passed, this method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','copyResult = copy(passwdFile, "/etc/", "duplicate")','if typeof(copyResult) == "string" then',' print("There was an error while copying file: " + copyResult)',"else",' print("File got copied successfully.")',"end if"]},move:{description:"Moves the `file` to the provided path. Files can only be moved if the user has read and write permissions or is root. The new filename has to be below 128 characters and alphanumeric. After success, this method will return a `number` with the value one. Otherwise, this method will return a `string` with details. If any of the parameter types deviate from the method signature, this method is used within an SSH encryption process, the new name exceeds 128 characters, or the path is too long, an error will be thrown, causing an interruption of script execution. In case the current file gets deleted or an invalid `file` object is passed, this method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','moveResult = move(passwdFile, "/etc/", "/moved/")','if typeof(moveResult) == "string" then',' print("There was an error while moving file: " + moveResult)',"else",' print("File got moved successfully.")',"end if"]},rename:{description:"Rename the file with the name provided. Files can only be renamed if the user has write permissions or is root. The new filename has to be below 128 characters and alphanumeric. On failure, this method will return a `string` with details. Otherwise, this method will return an empty string. If this method is used within an SSH encryption process, an error will be thrown, causing the script execution to be interrupted. In case the provided name is `null` or an invalid `file` object is passed, this method will return a `number` with the value zero.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','renameResult = rename(passwdFile, "renamed")','if typeof(renameResult) == "string" then',' print("There was an error while renaming file: " + renameResult)',"else",' print("File got renamed successfully.")',"end if"]},path:{description:"Returns a `string` with the path of the file. In case the file gets deleted, it will still return its path prior to deletion. If an invalid `file` object is passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'passwdFile = File(computer, "/etc/passwd")','print("File location: " + path(passwdFile))']},is_folder:{description:"Returns a `number`. The value is one if the file is a folder, zero otherwise. In case the file gets deleted or an invalid `file` object is passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'etcFolder = File(computer, "/etc")','print("Is a folder: " + is_folder(etcFolder))']},parent:{description:"Returns the parent folder of the current file or folder. In case there is no parent folder `null` will be returned instead. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` as well.",example:["computer = host_computer(get_shell)",'etcFolder = File(computer, "/etc")','print("Parent path: " + path(parent(etcFolder)))']},name:{description:"Returns a `string` with the name of the file. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'passwdFile = File(computer, "/etc/passwd")','print("Filename: " + name(passwdFile))']},allow_import:{description:"Returns a `number`. If the file is binary and can be imported by other scripts, the value will be one; otherwise, the value will be zero. In case the file gets deleted, this method will cause a crash. If an invalid `file` object gets passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("File can be imported: " + allow_import(lsBinary))']},get_content:{description:"Returns a `string` representing the content of the file. To read a file, the user requires read access or being root. Note that you cannot read a binary file. In case of failure, `null` will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','print("File content: " + get_content(passwdFile))']},set_content:{description:"Saves text into a `file`. The content will not get appended to the `file`; therefore, existing content will be overridden. To set new content, the user requires write permissions or being root. Keep in mind that text files cannot exceed the character limit of 160,000. In case setting the content was successful, a `number` with the value one will be returned. Otherwise, a `string` with details will be returned. If this method is used within an SSH encryption process, an error will be thrown, preventing any further script execution. If the provided content is `null`, an invalid `file` object gets passed or permissions are lacking, this method will return a `number` with the value zero. In case the file gets deleted this method will return `null`.",example:['computer = host_computer(get_shell("root", "test"))','passwdFile = File(computer, "/etc/passwd")','setResult = set_content(passwdFile, "moo")','if typeof(setResult) == "string" then',' print("There was an error while setting file content: " + setResult)',"else if setResult == 0 then",' print("Unable to set content of file!")',"else",' print("File content got changed successfully.")',"end if"]},is_binary:{description:"Returns a `number`. If the file is binary, the value will be one; otherwise, it will be zero. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` instead.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("File is a binary: " + is_binary(lsBinary))']},has_permission:{description:'Returns a `number` indicating if the user who launched the script has the requested permissions. One will indicate that the user has the correct permissions. In case permissions are lacking, the value will be zero. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. In case the file gets deleted or an invalid `file` object gets passed, this method will return `null` instead.',example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("Is able to execute ls: " + has_permission(lsBinary, "x"))']},delete:{description:"Delete the current file. To delete files, write permissions are required or being root. In case of failure, a `string` with details will be returned. Otherwise, an empty `string` gets returned. Please note that deleting a file will leave a log entry. In case an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")',"deletionResult = delete(lsBinary)",'if typeof(deletionResult) == "string" and len(deletionResult) > 0 then',' print("There was an error while deleting a file: " + deletionResult)',"else",' print("File got deleted successfully.")',"end if"]},get_folders:{description:"Returns a `list` of folders. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted or an invalid `file` object gets passed, this method will return `null` as well.",example:["computer = host_computer(get_shell)",'binFolder = File(computer, "/home")',"folders = get_folders(binFolder)","for folder in folders"," print(folder.path)","end for"]},get_files:{description:"Returns a `list` of files. In case the current entity is a file instead of a folder this method will return `null`, so it is advisable to first use the `is_folder` function before calling this method. In case the current folder gets deleted or an invalid `file` object gets passed, this method will return `null` as well.",example:["computer = host_computer(get_shell)",'binFolder = File(computer, "/bin")',"files = get_files(binFolder)","for file in files"," print(file.path)","end for"]},permissions:{description:'Returns a `string` with the current file permissions. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`. The format for this permissions `string` is as follows: `"[fileType][wrx](u)[wrx](g)[wrx](o)"`. The file type is either `"d"` in case it\'s a directory or `"-"`. The user type gets defined through three possible types: user `"u"`, group `"g"`, and other `"o"`. There are three different permission types: read `"r"`, write `"w"`, and execute `"x"`. An example of a `string` returned by this method would be `"-rwxr-xr-x"`. Taking the latter as an example, the following things become clear:\n* The provided file is not a directory.\n* The user has full access.\n* The group and others have almost all permissions besides writing.\n',example:["computer = host_computer(get_shell)",'binFolder = File(computer, "/bin")',"perms = permissions(binFolder)","fileType = perms[0]","permissionsForUser = perms[1:4]","permissionsForGroup = perms[4:7]","permissionsForOther = perms[7:10]",'print("File type: " + fileType)','print("User permissions: " + permissionsForUser)','print("Group permissions: " + permissionsForGroup)','print("Other permissions: " + permissionsForOther)']},owner:{description:"Returns a `string` with the name of the file owner. User permissions get applied to whoever is the owner of a file. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("Owner of ls is: " + owner(lsBinary))']},set_owner:{description:"Change the owner of this file. Optionally the owner can get applied recursively. The owner's name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure a `string` gets returned containing the cause. Otherwise an empty `string` gets returned. In case the current file gets deleted, an invalid `file` object gets passed or the passed owner value is not a `string`, this method will return `null`. If the passed owner value is empty, the owner value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, interrupting further script execution.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','ownerResult = set_owner(lsBinary, "root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing owner: " + ownerResult)',"else",' print("File owner changed successfully.")',"end if"]},group:{description:"Returns a `string` with the name of the group to which this file belongs. Group permissions get applied to whoever is the owner of a file. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','print("File is related to following group: " + group(lsBinary))']},set_group:{description:"Change the group related to this file. Optionally the group can get applied recursively. The group name cannot exceed 15 characters. Additionally either write permissions or being root is required. In case of failure, a `string` with details. On success, an empty `string` gets returned. In case the current file gets deleted, an invalid `file` object gets passed or the passed group is not a `string`, this method will return `null`. If the passed group value is empty, the group value is longer than 15 characters, or the passed recursive value deviates from its original type, an error will be thrown, preventing further script execution.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")','ownerResult = set_group(lsBinary, "root")','if typeof(ownerResult) == "string" then',' print("There was an error while changing group: " + ownerResult)',"else",' print("File group changed successfully.")',"end if"]},size:{description:"Returns a `string` with the size of the file in bytes. There is no correlation between file size and actual file content. Instead, the file size is depending on the name of the file. In case the current file gets deleted or an invalid `file` object gets passed, this method will return `null`.",example:["computer = host_computer(get_shell)",'lsBinary = File(computer, "/bin/ls")',"size = size(lsBinary)","if size.to_int > 1000 then",' print("File size is bigger than 1000 bytes.")',"else",' print("File size is below 1000 bytes.")',"end if"]},load:{description:"Returns a `metaLib` object for the provided path to the library binary. Keep in mind that this can only be used on library files. On failure, this method will return `null`. If the provided path is empty, this method will throw a runtime exception, preventing further script execution.",example:['metax = include_lib("/lib/metaxploit.so")','libFolder = File(host_computer(get_shell), "/lib")',"for file in get_files(libFolder)"," metaLib = load(metax, file.path)",' print("Library: " + lib_name(metaLib) + " - " + version(metaLib))',"end for"]},net_use:{description:"Returns a `netSession` object for the provided IP address and port. Note that if the port is set to zero, it will return a `netSession` related to the kernel router. The main purpose of this method is to gain a `netSession` and then use `dump_lib` to receive a `metaLib` object to exploit vulnerabilities. In case of failure, this method will return `null`. If this method is used within an SSH encryption process or with disabled internet, or if an invalid target IP is provided, this method will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))',"for port in ports",' netSession = net_use(metax, "1.1.1.1", port_number(port))'," metaLib = dump_lib(netSession)",' print("Library: " + lib_name(metaLib) + " - " + version(metaLib) + " on port " + port_number(port))',"end for"]},rshell_client:{description:"Launches a process on the victim's `computer`, silently attempting to continuously connect in the background to the specified address and port. For the reverse shell to run successfully, the `rshell` service must be installed, and the port forward must be configured correctly on the machine where the server is waiting for the victim's connection. If the launch was successful, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned.",example:['metax = include_lib("/lib/metaxploit.so")','rshell_client(metax, "1.1.1.1", 1222, "bgprocess")']},rshell_server:{description:"This method returns a `list` of `shell` objects that have been reverse shell connected to this computer. To manage the connections received, the `rshell` service must be installed on the machine that receives the victims' connections. In case of failure a `string` will be returned with details. If the provided object is anything other than `metaxploit` this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")',"shells = rshell_server(metax)","firstShell = shells[0]",'chmod(File(host_computer(firstShell), "/"), "o-wrx", true)']},scan:{description:'Returns a `list` where each item is a `string` representing a memory area which has vulnerabilities related to the provided library. These memory areas can be used to make further scans via `scan_address`. In case of failure, this method returns `null` instead. An example of a memory area would be "0x7BFC1EAA". Using this method within a SSH encryption process will throw a runtime exception.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")',"scanResult = scan(metax, metaLib)","for area in scanResult",' print("Memory area containg vulnerability: " + area)',"end for"]},scan_address:{description:"Returns a `string` containing information about each vulnerability in the provided library and memory area. In case the scanning fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")',"scanResult = scan(metax, metaLib)","scanAddress = scan_address(metax, metaLib, scanResult[0])",'segments = split(scanAddress, "Unsafe check: ")[1:]',"exploits = []","for segment in segments",' labelStart = indexOf(segment, "<b>")',' labelEnd = indexOf(segment, "</b>")'," push(exploits, segment[labelStart + 3: labelEnd])","end for",'print("Available vulnerabilities: " + join(exploits, ", "))']},sniffer:{description:"The terminal listens to the network packets of any connection that passes through the computer. When any connection information gets captured, it will print a `string` with the obtained data. In case saving of encryption source is enabled it will download the source code of the script responsible for encryption. In case the operation fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")',"result = sniffer(metax)","print(result)"]},overflow:{description:"Exploits vulnerabilities. The returned value can be of various data types. Therefore, using `typeof` is advisable. `optArgs` are required when changing a password or obtaining a `computer` via a router. It should be the desired password or LAN IP, respectively. Change password and firewall disable exploits will return a `number`, where the value is either one or zero. One indicates success while zero indicates failure. Shell, computer, and file exploits either return an instance of their type or `null`. Providing values that deviate from the defined signature will cause a runtime exception to be thrown.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")',"scanResult = scan(metax, metaLib)","target = scanResult[0]","scanAddress = scan_address(metax, metaLib, target)",'segments = split(scanAddress, "Unsafe check: ")',"exploit = null"," for segment in segments",' hasRequirement = indexOf(segment, "*") != null'," if (not hasRequirement) then",' labelStart = indexOf(segment, "<b>")',' labelEnd = indexOf(segment, "</b>")'," exploit = segment[labelStart + 3: labelEnd]"," end if","end for","if (exploit) then",' print("Exploiting... " + target + ":" + exploit)'," print(overflow(metaLib, target, exploit))","else",' print("No exploit found with zero requirements")',"end if"]},version:{description:'Returns a `string` containing the version number of the library. An example of a version number would be `"1.0.0"`. In case an invalid `metaLib` object gets passed this method will return `null`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','print("Init.so version: " + version(metaLib))']},lib_name:{description:'Returns a `string` containing the name of the library. An example of a name would be `"init.so"`. In case an invalid `metaLib` object gets passed this method will return `null`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = load(metax, "/lib/init.so")','print("Name for library is: " + lib_name(metaLib))']},dump_lib:{description:"Returns the `metaLib` associated with the remote service. For example if the `metaxpoit` method `net_use` was used on a ssh port it will return the `metaLib` related to the ssh service. In case the port was zero is will return a `metaLib` related to the kernel router. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))',"metaLib = dump_lib(netSession)",'print("Library: " + lib_name(metaLib) + " - " + version(metaLib) + " on port " + port_number(ports[0]))']},get_num_conn_gateway:{description:"Returns the number of devices using this router as a gateway. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("Gateway clients: " + get_num_conn_gateway(netSession))']},get_num_portforward:{description:"Returns the number of ports forwarded by this router. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("Port forwards: " + get_num_portforward(netSession))']},get_num_users:{description:"Returns the number of user accounts on the system. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("User accounts: " + get_num_users(netSession))']},is_any_active_user:{description:"Returns a `number`. If there is an active user on the system it will be one. Otherwise, it will be zero. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("User Active?: " + is_any_active_user(netSession))']},is_root_active_user:{description:"Returns a `number`. If there is an active root on the system it will be one. Otherwise, it will be zero. If an invalid `netSession` gets passed this method will return `null`.",example:['metax = include_lib("/lib/metaxploit.so")','ports = used_ports(get_router("1.1.1.1"))','netSession = net_use(metax, "1.1.1.1", port_number(ports[0]))','print("Root Active?: " + is_root_active_user(netSession))']},device_ports:{description:"Returns a `list` where each item is an open `port` related to the device of the provided LAN IP address. The device needs to be within the network of the `router`. In case of failure, this method will return `null` or a `string` with details. In case an empty ip is provided this method will throw a runtime exception.",example:["router = get_router","devices = devices_lan_ip(router)","for ip in devices"," ports = device_ports(router, ip)"," openPorts = []"," for port in ports"," if is_closed(port) then continue"," push(openPorts, port)"," end for",""," if (len(openPorts) == 0) then",' print(ip + " has no open ports")'," else",' print(ip + " contains following open ports:")'," for port in openPorts",' print("|-" + port.port_number)'," end for"," end if","end for"]},devices_lan_ip:{description:"Returns a `list` where each item is a `string` representing a LAN IP address. All devices are within the network of the router and can be reached by using the `ping` method. Some of the devices might be behind a firewall. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","devices = devices_lan_ip(router)","for ip in devices",' print(ip + " found!")',"end for"]},bssid_name:{description:"Returns a `string` with the BSSID value of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","bssid = bssid_name(router)",'print("BSSID: " + bssid)']},essid_name:{description:"Returns a `string` with the ESSID value of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","essid = essid_name(router)",'print("ESSID: " + essid)']},firewall_rules:{description:"Returns a `list` where each item is a `string` containing a firewall rule. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","rules = firewall_rules(router)",'print("Firewall rules: " + join(rules, ", "))']},kernel_version:{description:"Returns a `string` with the version of the `kernel_router.so` library. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","version = kernel_version(router)",'print("Kernel router version: " + version)']},local_ip:{description:"Returns a `string` with the local IP address of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","localIp = local_ip(router)",'print("Local IP: " + localIp)']},public_ip:{description:"Returns a `string` with the public IP address of the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","publicIp = public_ip(router)",'print("Public IP: " + publicIp)']},used_ports:{description:"Returns a `list` where each item is a `port` used inside the router. In case the passed object is not a `router` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' print("Port " + port_number(port) + " is available!")',"end for"]},ping_port:{description:"Returns a `port` that is behind the port `number` provided. In case the `port` does not exist `null` gets returned.",example:["router = get_router","ports = used_ports(router)","for port in ports"," pingedPort = ping_port(router, port.port_number)"," if (pingedPort == null) then continue",' print("Pinged " + port_number(pingedPort))',"end for"]},port_info:{description:'Returns a `string` with information about the provided port, including details about the running service and its version. For example, the output could be `"http 1.0.0"`. If the operation fails, `null` will be returned.',example:["router = get_router","ports = used_ports(router)","for port in ports"," info = port_info(router, port)"," print(info)","end for"]},install_service:{description:"Installs the necessary files for the correct functioning of the service and starts it. If the installation is completed successfully, it returns a `number` with the value one. In case of an error, it returns a `string` with details. If the passed object is not a `service` this method will cause a crash.",example:['service = include_lib("/lib/libhttp.so")',"result = install_service(service)","if result == 1 then",' print "Successfully installed service"',"else",' print "Service installation failed: " + result',"end if"]},start_service:{description:"Starts the service and opens its associated `port` on the local machine. The service requires a port forwarded to the router to be accessible from the outside. If the service starts correctly, it returns a `number` with the value one. In case of an error, it returns a `string` with details. If the passed object is not a `service` this method will cause a crash.",example:['service = include_lib("/lib/libhttp.so")',"result = start_service(service)","if result == 1 then",' print "Successfully started service"',"else",' print "Starting service failed: " + result',"end if"]},stop_service:{description:"Stops the service and closes its associated `port` on the local machine. If the service is stopped successfully, it returns a `number` with the value one. If an error occurs during the process, it returns a `string` with details. In some cases, the returned `number` might be zero, indicating that the service removal failed. If the passed object is not a `service` this method will cause a crash.",example:['service = include_lib("/lib/libhttp.so")',"result = stop_service(service)","if result == 1 then",' print "Successfully stopped service"',"else",' print "Stopping service failed: " + result',"end if"]},host_computer:{description:"Returns a `computer` related to the `shell`. If an invalid `shell` object gets passed this method will return `null`.",example:["shell = get_shell","computer = host_computer(shell)",'print("Computer public IP is: " + public_ip(computer))']},start_terminal:{description:"Launches an active terminal. The terminal's color will change, displaying the IP of the connected shell. Script execution will be stopped upon starting a new terminal, unless this is called from another script that was executed via `shell.launch`. In that case, you will enter the shell after closing your root-level script within that terminal window. Using this method within an SSH encryption process will cause an error to be thrown, preventing further script execution.",example:["start_terminal(get_shell)"]},build:{description:"Compiles a plain code file provided in the arguments to a binary. On success, the new binary will be available under the provided build folder. The binary name will be the same as the source file just without the file extension. Optionally, an allowImport flag can be set which enables the use of `import_code` on the binary. All provided paths must be absolute. Returns an empty string on success. On failure, it will return a string containing details about the reason for failure. In case any provided values deviate from the defined signature a runtime exception will be thrown.",example:["shell = get_shell","computer = host_computer(shell)",'touch(computer, home_dir, "test.src")','set_content(File(computer, home_dir + "/test.src"), "print(""hello world"")")','buildResult = build(shell, home_dir + "/test.src", home_dir + "/Desktop")','if buildResult != "" then',' print("There was an error while compiling: " + buildResult)',"else",' print("File has been compiled.")',"end if"]},connect_service:{description:"Returns a `shell` if the connection attempt to the provided IP was successful. This method can only connect to ports running an SSH or FTP service. SSH services usually run on port 22 and FTP services usually on port 21. Keep in mind to pass the right service value depending on which service is going to be used. By default, it will use SSH as the service. Please note that connecting will leave a log entry. In case of failure, a string is returned containing details. If any provided arguments deviate from the method signature, if this method is run in an SSH encryption process, or if the computer is not connected to the internet, a runtime exception will be thrown.",example:["shell = get_shell",'connectionResult = connect_service(shell, "1.1.1.1", 22, "test", "test")','if typeof(connectionResult) != "shell" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected!")',"end if"]},ping:{description:"Returns a `number`. If the remote address could be reached the value will be one, zero otherwise. Firewalls do not block ping requests. Passing an invalid ip will cause the method to return a `string` with an error message. If any provided arguments deviate from the method signature a runtime exception will be thrown. If the passed object is a map-like object such as `computer` or `file` but not `shell` this method will return `null`.",example:["shell = get_shell",'isPingable = ping(shell, "1.1.1.1")',"if isPingable then",' print("Ping was successful!")',"else",' print("Ping failed!")',"end if"]},scp:{description:"Send a `file` to the `computer` related to the provided `shell`. You require permission to read the `file` on the `computer` from which you are uploading and write permissions in the folder of the `computer` you are trying to upload to. In case of failure, this method will return a `string` with the cause. Otherwise, a `number` with the value one gets returned. If any of the passed arguments deviates from the types of the method signature, `null` will be returned. In case the `string` for sourceFile or destinationFolder is empty, an error will be thrown, preventing further script execution.",example:["shell = get_shell",'remoteShell = connect_service(shell, "1.1.1.1", 22, "test", "test")','result = scp(remoteShell, "/bin/ls", "/etc/", shell)','if typeof(result) == "string" then',' print("There was an error while sending file: " + result)',"else",' print("File got sent successfully.")',"end if"]},get_balance_subwallet:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. In case an object gets passed which is not a `subWallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Balance: " + get_balance_subwallet(subWallet)']},set_info:{description:"Stores optional information in the Subwallet for any use. Upon success, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','subWallet = coin.get_subwallet("test")','result = subWallet.set_info("test")',"if result == 1 then",' print "Subwallet info got set!"',"end if"]},get_info:{description:"Returns a `string` with the information stored by the coin creator. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet info: " + subWallet.get_info']},delete_subwallet:{description:"Deletes the account registered in the cryptocurrency. Returns a `number` where one indicates successful deletion and zero indicates failure. In case of certain failures, this method may return a `string` with details. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"result = subWallet.delete","if result == 1 then",' print "Subwallet got deleted!"',"end if"]},get_user:{description:"Returns a `string` with the username associated with this subwallet. On failure, this method returns a `string` with an error message. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet user: " + subWallet.get_user']},last_transaction:{description:"Returns a `list` with the information of the last transaction. Index 0 is a `string` with the other subWallet. Index 1 is an integer with the amount. Index 2 is a `number` indicating the direction of the transaction (0 for Deposit, 1 for Withdrawal). Index 3 is a `string` indicating the date of the transaction. On failure, this method will either return a `number` with the value zero or a `string` with an error message. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"transactionItem = subWallet.last_transaction","destinationAccount = transactionItem[0]","amount = transactionItem[1]","direction = transactionItem[2]","completeDate = transactionItem[3]","if direction == 0 then",' print "Received " + amount + " from " + destinationAccount + " got completed at the " + completeDate',"else",' print "Send " + amount + " to " + destinationAccount + " got completed at the " + completeDate',"end if "]},mining:{description:"Starts the process of mining the cryptocurrency. The process leaves the terminal busy until a coin is mined. On success, this method will return a `number` with the value one. On failure, this method will return a `string` with details. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"while subWallet.mining == 1",' print "Mining...", true',' print "Balance " + subWallet.get_balance',"end while"]},check_password:{description:"Returns a `number` with the value one if the credentials are correct, otherwise, the value is zero. For some cases, this method will return a `string` with an error message. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','password = user_input("SubWallet password:", true)',"if subWallet.check_password(password) == 1 then",' print "Password is correct!"',"end if"]},wallet_username:{description:"Returns a `string` with the name of the `wallet` to which this subwallet belongs. If an object is passed that is not a `subWallet`, this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "SubWallet username: " + subWallet.wallet_username']},list_coins:{description:"Returns a `list` where each item is a `string` with the names of the coins available in the `wallet`. On failure this method returns a `string` with an error message. If the passed value is not a `wallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "My wallet is connected to: " + join(list_coins(wallet), ", ")']},get_balance:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")',"for coinName in list_coins(wallet)",' print "You have " + get_balance(wallet, coinName) + " coins of the currency """ + coinName + """"',"end for"]},buy_coin:{description:"Publishes a purchase offer indicating the number of coins you wish to buy and the price ($) per unit you are willing to pay. The purchase will be finalized if there is any sale offer with a price less than or equal to the one proposed in the purchase. If there is no eligible offer to sell at that time, the offer to buy will remain publicly visible until a new offer to sell satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = buy_coin(wallet, "test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created purchase offer!"',"else",' print "Failed: " + result',"end if"]},sell_coin:{description:"Publishes a sale offer indicating the amount of coins you want to sell and the price ($) per unit you want to assign. The sale will be finalized if there is any purchase offer with a price greater than or equal to that proposed in the sale. If there is no existing offer to buy that matches the requirements at that time, the offer to sell will remain publicly visible until a new offer to buy satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = sell_coin(wallet, "test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created sell offer!"',"else",' print "Failed: " + result',"end if"]},get_pending_trade:{description:"Returns a `list` with the pending sale or purchase offer of this wallet for a certain currency. Index 0 of the `list` represents the type of offer with a `string` (Buy/Sell), index 1 represents the quantity to be sold or bought, and index 2 represents the price per unit. On failure, this method will return a `string` with details. Any deviation from the method signature will result in a `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = get_pending_trade(wallet, "test")','isBuying = result[0] == "Buy"',"quantity = result[1]","unitPrice = result[2]",'currentBalance = get_balance(wallet, "test")',"if isBuying then",' print "After buying was successful your balance will be " + (quantity * unitPrice + currentBalance)',"else",' print "After selling was successful your balance will be " + (currentBalance - quantity * unitPrice)',"end if"]},cancel_pending_trade:{description:"Cancel any pending offer of a certain coin. On success, an empty `string` will be returned. On failure, a `string` with an error message will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','if cancel_pending_trade(wallet, "test") == "" then',' print "Trade got canceled!"',"end if"]},get_global_offers:{description:"Returns a `map` with all the offers made by any player of a given currency. The key of the `map` represents the WalletID of the player who has made the offer, and the value of the `map` is a `list` where index 0 represents the type of offer with a `string` (Buy/Sell), index 1 represents the amount to sell or buy, and index 2 represents the price per unit. In case of failure, this method returns a `string` with details. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','for item in get_global_offers(wallet, "test")'," walletId = item.key"," trade = item.value",' isBuying = trade[0] == "Buy"'," quantity = trade[1]"," unitPrice = trade[2]",' print "-" * 10',' print "<b>" + walletId + "</b>"'," if isBuying then",' print "<color=green>Is buying</color>"'," else",' print "<color=yellow>Is selling</color>"'," end if",' print quantity + " coins with a unit price of " + unitPrice',"end for"]},list_global_coins:{description:"Returns a `list` where each item is a `string` containing the names of all the currencies that exist. In case of failure, this method returns a `string` with details. If the passed value is not a `wallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "All existing coins: " join(list_global_coins(wallet), ", ")']},show_nodes:{description:"Returns a `number` representing the count of devices mining a specific coin for the same `wallet`. In case of an error, a `string` with details is returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "Active miners: " show_nodes(wallet, "test")']},reset_password:{description:"Change the password of the wallet. Only the account owner can perform this action. If the process is completed successfully, a `number` with the value one will be returned. In case of an error, a `string` with details will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','if reset_password(wallet, "test") == 1 then',' print "You got a new password!"',"end if"]},get_pin:{description:"Returns a `string` with a PIN that refreshes every few minutes. This PIN is used to obtain an account in cryptocurrency services. If the passed value is not a `wallet` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")',"myShell = get_shell","myComputer = host_computer(myShell)",'wallet = login_wallet(blockchain, "test", "test")','touch(myComputer, "/root", "pin_launch.src")','myFile = File(myComputer, "/root/pin_launch.src")','set_content(myFile, "',' blockchain = include_lib(""/lib/blockchain.so"")'," myShell = get_shell"," myComputer = host_computer(myShell)",' wallet = login_wallet(blockchain, ""test"", ""test"")'," if params[0] == get_pin(wallet) then",' get_custom_object.secret = ""The answer is 42""'," else",' get_custom_object.secret = ""The answer is 10053""'," end if",'")','build(myShell, "/root/pin_launch.src", "/root")',"delete(myFile)",'launch(myShell, "/root/pin_launch", get_pin(wallet))','print "The secret: " + get_custom_object.secret']},delete_mail:{description:"Delete the email corresponding to the provided email ID. Returns a `number` with the value one if the email removal was successful. Otherwise, a `string` with an error message will be returned. If any of the provided values deviate from the method signature, it will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = fetch(metaMail)","results = []","for mail in mails"," segments = split(mail, char(10))"," mailId = segments[2][8:]"," print(delete_mail(metaMail, mailId))","end for",'print("Deleted every mail!")']},fetch:{description:"Returns a `list` where each item is a `string` containing mail id, from, subject and a small preview of the content consisting of the first 125 characters. In case of failure a `string` with details will be returned. If an invalid `metaMail` object gets passed this method will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = fetch(metaMail)","results = []","for mail in mails"," segments = split(mail, char(10))"," item = {}"," item.mailId = segments[2][8:]"," item.from = segments[3][6:]"," item.subject = segments[4][9:]"," item.preview = segments[5:]"," push(results, item)","end for","print(results)"]},read:{description:'Returns a `string` containing the content of a mail related to the provided mail id. The mail id argument can be obtained with `fetch`. In case the mail cannot be found this method will return "Mail not found". If any of the provided values deviate from the method signature, it will return `null`.',example:['metaMail = mail_login(user_mail_address, "test")',"mails = fetch(metaMail)","results = []","for mail in mails"," segments = split(mail, char(10))"," mailId = segments[2][8:]"," print(read(metaMail, mailId))","end for"]},send:{description:"Send a new mail to the provided email address. Keep in mind that the subject can not exceed 128 characters and the message size should not exceed 2500 characters. Returns a `number` with the value one if the mail has been sent correctly, otherwise returns a `string` with an error. If any of the provided values deviate from the method signature, it will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")','result = send(metaMail, user_mail_address, "test subject", "test message")','if typeof(result) == "string" then',' print("There was an error while sending mail: " + result)',"else",' print("Mail got send successfully.")',"end if"]},port_number:{description:"Returns the `number` which is used for the port. In case the passed object is not a `port` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' print("Port " + port_number(port) + " is in use!")',"end for"]},is_closed:{description:"Returns a `number`, where one indicates that the specified `port` is open and zero indicates that the port is closed. In case the passed object is not a `port` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' state = "open"',' if (is_closed(port)) then state = "closed"',' print("Port " + port_number(port) + " is " + state + "!")',"end for"]},get_lan_ip:{description:"Returns a `string` containing the local IP address of the computer to which the port is pointing. In case the passed object is not a `port` this method will return `null`.",example:["router = get_router","ports = used_ports(router)","for port in ports",' print("Port " + port_number(port) + " is pointed to " + get_lan_ip(port) + "!")',"end for"]},reset_ctf_password:{description:"Resets the password of your CTF account. Returns a `number` with the value one if resetting was successful; otherwise, it will return a `string` containing the reason for failure.",example:['reset_ctf_password("mysafepassword")']},reverse:{description:"Reverses the order of all values in the `list`. This operation will mutate the `list`.",example:["myList = [42, 1, 3]","reverse(myList)",'print("Reversed list: " + myList.split(", "))']},trim:{description:"Returns a new `string` stripped of any spacing at the beginning and ending. If any value gets passed that is not a `string` this method will return `null`.",example:['myString = " 42 "',"print(trim(myString))"]},lastIndexOf:{description:"Returns a `number` indicating the last matching index of the provided value inside the `string`. If the value does not exist inside the `string`, `-1` is returned. If any of the provided values deviates from the defined types in the method signature, this method will return `null`.",example:['myString = "42 as an answer is wrong"','index = lastIndexOf(myString, "wrong")',"if index != -1 then",' print("Invalid information spotted at: " + index)',"else",' print("Information seems valid.")',"end if"]},funcRef:{description:"Returns a `map` which enables to extend function references with custom methods.",example:["funcRef.signature = function"," return str(@self)","end function","print (@print).signature"]},list:{description:"Returns a `map` which enables to extend list types with custom methods.",example:["list.map = function(callback)"," newList = []"," for item in self"," newList.push(callback(item, __item_idx))"," end for"," return newList","end function","myMapFunction = function(item, index)",' print "Mapping value at index: " + index'," return item.myValue","end function",'print [{ "myValue": 24 }].map(@myMapFunction)']},number:{description:"Returns a `map` which enables to extend number types with custom methods.",example:["number.bitwise = function(operator, right)"," return bitwise(operator, self, right)","end function",'print (1234).bitwise(">>", 1)']},string:{description:"Returns a `map` which enables to extend string types with custom methods.",example:['string.color = function(colorValue = "red")',' return "<color=" + colorValue + ">" + self + "</color>"',"end function",'print "My text: ".color + "Hello world".color("yellow")']},map:{description:"Returns a `map` which enables to extend map types with custom methods.",example:["map.extend = function(value)"," for item in value"," self[item.key] = item.value"," end for"," return self","end function",'test = {"123":123}','test.extend({"bar": "foo"})','print "My extended value: " + test.bar']}}});var Jk=T((L5,BO)=>{BO.exports={$meta:{description:"Create a `list` with square brackets. Then iterate over the `list` with for, or pull out individual items with a 0-based index in square brackets. A negative index counts from the end. Get a slice (subset) of a `list` with two indices, separated by a colon.",example:["x = [2, 4, 6, 8]","print(x[0]) // get first item from list","print(x[-1]) // get last item from list","print(x[1:3]) // slice items from index 1 to 3","x[2] = 5 // set item at index 2 to 5","print(x)","print(x + [42]) // concatenate two lists"]},remove:{description:"Removes an item from the `list` with the provided index. Due to the removal the `list` will get mutated. If the passed index is `null` this method will throw an error preventing further script execution.",example:["myList = [1, 42, 3]","myList.remove(1)",'print("This list does not contain the answer to everything: " + myList.split(", "))']},insert:{description:"Inserts a value into the `list` at the index provided. Due to the insertion the `list` will get mutated. Returns the mutated `list`. If the passed index is not a `number`, this method throws an error, preventing further script execution.",example:["myList = [1, 3]","myList.insert(1, 42)",'print("This list does contain the answer to everything: " + myList.split(", "))']},push:{description:"Appends a value to the end of the `list`. This operation will mutate the `list`. Additionally, this method will return the updated `list`. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution.",example:["myList = [1, 3]","myList.push(42)",'print("This list does contain the answer to everything: " + myList.split(", "))']},pop:{description:"Returns and removes the last item in the `list`. This operation will mutate the `list`. If the `map` is empty, this method will return `null`.",example:["myList = [1, 3, 42]","answer = myList.pop",'print("Answer to everything: " + answer)']},pull:{description:"Returns and removes the first item in the `list`. This operation will mutate the `list`. If the `map` is empty, this method will return `null`.",example:["myList = [42, 1, 3]","answer = myList.pull",'print("Answer to everything: " + answer)']},shuffle:{description:"Shuffles all values in the `list`. This operation will mutate the `list`.",example:["myList = [42, 1, 3]","myList.shuffle",'print("New list order: " + myList.split(", "))']},reverse:{description:"Reverses the order of all values in the `list`. This operation will mutate the `list`.",example:["myList = [42, 1, 3]","myList.reverse",'print("Reversed list: " + myList.split(", "))']},sum:{description:"Returns sum of all values inside the `list`. Any non-numeric values will be considered a zero.",example:["myList = [42, 1, 3]","sum = myList.sum",'print("Sum of all items in list: " + sum)']},hasIndex:{description:"Returns a `number`. If the provided index is available in the `list`, the value will be one. Otherwise, the value will be zero.",example:["myList = [42, 1, 3]","containsIndex = myList.hasIndex(1)","if containsIndex then",' print("List contains index of 1.")',"else",' print("List does not contain index of 1.")',"end if"]},indexOf:{description:"Returns a `number` which indicates the first matching index of the provided value inside the `list`. Optionally a start index can be provided. In case the value does not exist inside the `list` a `null` gets returned.",example:["myList = [42, 1, 3]","index = myList.indexOf(42)","if index != null then",' print("The answer for everything is at the following index: " + index)',"else",' print("No answer for everything found.")',"end if"]},sort:{description:"Sorts the values of a `list` alphanumerically. This operation mutates the original `list`. Optionally, a key can be provided, which is used if the items are `map`s or `list`s. Finally, this method returns the updated `list`.",example:['myList = [{ "key": 42 }, { "key": 2 }, { "key": 1 }]','myList.sort("key")',"print(myList)"]},join:{description:"Returns a concatenated `string` containing all stringified values inside the `list`. These values will be separated via the provided separator. In case the `list` exceeds `16777215L` items or the delimiter exceeds 128 characters, this method will throw an error, interrupting further script execution.",example:["myList = [42, 1, 3]",`print(myList.join(" .-*'*-. "))`]},indexes:{description:"Returns a `list` containing all available indexes.",example:["myList = [42, 1, 3]","for i in myList.indexes"," print(myList[i])","end for"]},len:{description:"Returns a `number` representing the count of values inside the `list`.",example:["myList = [42, 1, 3]",'print("myList contains " + myList.len + " items")']},values:{description:"Returns a `list` containing all available values. Note that this will not create a copy of the original `list`. The returned instance will the same as original `list`, so any mutations made to the returned `list` will also affect the original one.",example:["myList = [42, 1, 3]","for v in myList.values"," print(v)","end for"]},replace:{description:"Returns updated `list` where each value matching with the provided replace argument gets replaced. This operation will mutate the `list`.",example:["myList = [1, 2, 2, 7]","myList.replace(2, 3)",'print(myList.join(""))']}}});var Xk=T((M5,UO)=>{UO.exports={$meta:{description:"A `map` is a set of values associated with unique keys. Create a `map` with curly braces; get or set a single value with square brackets. Keys and values may be any type.",example:['x = { "test": 123 }',"x.foo = 42 // set property foo to 42","print(x.foo) // get value of property foo",'print(x + { "bar": 2 }) // concatenate two maps']},remove:{description:"Removes an item from the `map` with the provided key. Due to the removal, the `map` will get mutated. If the value is removed successfully, this method will return a `number` with the value one. If the removal fails, the value will be zero. Passing any map-like object, such as a file or computer, will cause an error to be thrown, stopping further script execution.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','myMap.remove("answer")',"print(myMap)"]},push:{description:"Adds the value 1 to the provided key. This operation will mutate the `map`. The updated `map` will be returned. However, it throws an error if you attempt to push a value into itself or into a map-like object such as a `file`, halting further script execution. If the passed key is `null` an error will be thrown as well.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','myMap.push("answer")',"print(myMap.answer)"]},pull:{description:"Returns and removes the first item in the `map`. This operation will mutate the `map`. Passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the `map` is empty, this method will return `null`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"print(myMap.pull)"]},pop:{description:"Returns and removes the first item in the `map`. This operation will mutate the `map`. Passing a map-like object such as `file` or `computer` will result in an error, interrupting further script execution. If the `map` is empty, this method will return `null`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"print(myMap.pop)"]},shuffle:{description:"Shuffles all values in the `map`. This operation will mutate the `map`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"myMap.shuffle","print(myMap)"]},sum:{description:"Returns sum of all values inside the `map`. Any non-numeric values will be considered a zero.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"sum = myMap.sum",'print("Sum of all items in map: " + sum)']},hasIndex:{description:"Returns a `number`. If the provided key is available in the `map`, the value will be one. Otherwise, the value will be zero.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','containsIndex = myList.hasIndex("answer")',"if containsIndex then",' print("Map contains the answer.")',"else",' print("Map does not contain the answer.")',"end if"]},indexOf:{description:"Returns a value which can be of any type since `map` keys can be of any type. In case the value does not exist inside the `map`, `null` is returned.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"key = myList.indexOf(42)","if key != null then",' print("Map contains the answer.")',"else",' print("Map does not contain the answer.")',"end if"]},indexes:{description:"Returns a `list` containing all available keys. Keys can be of any type.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"for key in myMap.indexes"," print(myMap[key])","end for"]},len:{description:"Returns a `number` representing the count of items inside the `map`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }','print("myMap contains " + myMap.len + " items")']},values:{description:"Returns a `list` containing all available values within `map`.",example:['myMap = { "answer": 42, "bar": 23, "foo": "moo" }',"for value in myMap.values"," print(value)","end for"]},replace:{description:"Returns updated `map` where each value matching with the provided replace argument gets replaced. This operation will mutate the `map`. In case this method gets used on a map-like object such as `file` this method will throw a runtime error.",example:['myObject = { "answer": 45 }',"myObject.replace(45, 42)","print(myObject.answer)"]}}});var Zk=T((q5,WO)=>{WO.exports={$meta:{description:'A `metaLib` object can be obtained by either using [load](#METAXPLOIT_LOAD) or [dump_lib](#NETSESSION_DUMP_LIB). The `classID` used for this object is `"MetaLib"`.'},overflow:{description:"Exploits vulnerabilities. The returned value can be of various data types. Therefore, using `typeof` is advisable. `optArgs` are required when changing a password or obtaining a `computer` via a router. It should be the desired password or LAN IP, respectively. Change password and firewall disable exploits will return a `number`, where the value is either one or zero. One indicates success while zero indicates failure. Shell, computer, and file exploits either return an instance of their type or `null`. Providing values that deviate from the defined signature will cause a runtime exception to be thrown.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")',"scanResult = metax.scan(metaLib)","target = scanResult[0]","scanAddress = metax.scan_address(metaLib, target)",'segments = scanAddress.split("Unsafe check: ")',"exploit = null"," for segment in segments",' hasRequirement = segment.indexOf("*") != null'," if (not hasRequirement) then",' labelStart = segment.indexOf("<b>")',' labelEnd = segment.indexOf("</b>")'," exploit = segment[labelStart + 3: labelEnd]"," end if","end for","if (exploit) then",' print("Exploiting... " + target + ":" + exploit)'," print(metaLib.overflow(target, exploit))","else",' print("No exploit found with zero requirements")',"end if"]},version:{description:'Returns a `string` containing the version number of the library. An example of a version number would be `"1.0.0"`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','print("Init.so version: " + metaLib.version)']},lib_name:{description:'Returns a `string` containing the name of the library. An example of a name would be `"init.so"`.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")','print("Name for library is: " + metaLib.lib_name)']}}});var e0=T((F5,VO)=>{VO.exports={$meta:{description:'A `MetaMail` object can be obtained by using [mail_login](#GENERAL_MAIL_LOGIN). The `classID` used for this object is `"MetaMail"`.'},delete:{description:"Delete the email corresponding to the provided email ID. Returns a `number` with the value one if the email removal was successful. Otherwise, a `string` with an error message will be returned. If the provided mailId is anything other than a `string` this method will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = metaMail.fetch","results = []","for mail in mails"," segments = mail.split(char(10))"," mailId = segments[2][8:]"," print(metaMail.delete(mailId))","end for",'print("Deleted every mail!")']},fetch:{description:"Returns a `list` where each item is a `string` containing mail id, from, subject and a small preview of the content consisting of the first 125 characters. If there is any issue a `string` will be returned with details.",example:['metaMail = mail_login(user_mail_address, "test")',"mails = metaMail.fetch","results = []","for mail in mails"," segments = mail.split(char(10))"," item = {}"," item.mailId = segments[2][8:]"," item.from = segments[3][6:]"," item.subject = segments[4][9:]"," item.preview = segments[5:]"," results.push(item)","end for","print(results)"]},read:{description:'Returns a `string` containing the content of a mail related to the provided mail id. The mail id argument can be obtained with `fetch`. In case the mail cannot be found this method will return "Mail not found". If the provided mailId is not a `string`, this method will return `null`.',example:['metaMail = mail_login(user_mail_address, "test")',"mails = metaMail.fetch","results = []","for mail in mails"," segments = mail.split(char(10))"," mailId = segments[2][8:]"," print(metaMail.read(mailId))","end for"]},send:{description:"Send a new mail to the provided email address. Keep in mind that the subject can not exceed 128 characters and the message size should not exceed 2500 characters. Returns a `number` with the value one if the mail has been sent correctly, otherwise returns a `string` with an error. If any of the provided values deviate from the method signature, it will return `null`.",example:['metaMail = mail_login(user_mail_address, "test")','result = metaMail.send(user_mail_address, "test subject", "test message")','if typeof(result) == "string" then',' print("There was an error while sending mail: " + result)',"else",' print("Mail got send successfully.")',"end if"]}}});var t0=T((N5,HO)=>{HO.exports={$meta:{description:'A `metaxploit` object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"MetaxploitLib"`.'},load:{description:"Returns a `metaLib` object for the provided path to the library binary. Keep in mind that this can only be used on library files. On failure, this method will return `null`. If the provided path is empty, this method will throw a runtime exception, preventing further script execution.",example:['metax = include_lib("/lib/metaxploit.so")','libFolder = get_shell.host_computer.File("/lib")',"for file in libFolder.get_files"," metaLib = metax.load(file.path)",' print("Library: " + metaLib.lib_name + " - " + metaLib.version)',"end for"]},net_use:{description:"Returns a `netSession` object for the provided IP address and port. Note that if the port is set to zero, it will return a `netSession` related to the kernel router. The main purpose of this method is to gain a `netSession` and then use `dump_lib` to receive a `metaLib` object to exploit vulnerabilities. In case of failure, this method will return `null`. If this method is used within an SSH encryption process or with disabled internet, or if an invalid target IP is provided, this method will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports',"for port in ports",' netSession = metax.net_use("1.1.1.1", port.port_number)'," metaLib = netSession.dump_lib",' print("Library: " + metaLib.lib_name + " - " + metaLib.version + " on port " + port.port_number)',"end for"]},rshell_client:{description:"Launches a process on the victim's `computer`, silently attempting to continuously connect in the background to the specified address and port. For the reverse shell to run successfully, the `rshell` service must be installed, and the port forward must be configured correctly on the machine where the server is waiting for the victim's connection. If the launch was successful, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned.",example:['metax = include_lib("/lib/metaxploit.so")','metax.rshell_client("1.1.1.1", 1222, "bgprocess")']},rshell_server:{description:"This method returns a `list` of `shell` objects that have been reverse shell connected to this computer. To manage the connections received, the `rshell` service must be installed on the machine that receives the victims' connections. In case of failure a `string` will be returned with details.",example:['metax = include_lib("/lib/metaxploit.so")',"shells = metax.rshell_server","firstShell = shells[0]",'firstShell.host_computer.File("/").chmod("o-wrx", true)']},scan:{description:'Returns a `list` where each item is a `string` representing a memory area which has vulnerabilities related to the provided library. These memory areas can be used to make further scans via `scan_address`. In case of failure, this method returns `null` instead. An example of a memory area would be "0x7BFC1EAA". Using this method within a SSH encryption process will throw a runtime exception.',example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")',"scanResult = metax.scan(metaLib)","for area in scanResult",' print("Memory area containg vulnerability: " + area)',"end for"]},scan_address:{description:"Returns a `string` containing information about each vulnerability in the provided library and memory area. In case the scanning fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")','metaLib = metax.load("/lib/init.so")',"scanResult = metax.scan(metaLib)","scanAddress = metax.scan_address(metaLib, scanResult[0])",'segments = scanAddress.split("Unsafe check: ")[1:]',"exploits = []","for segment in segments",' labelStart = segment.indexOf("<b>")',' labelEnd = segment.indexOf("</b>")'," exploits.push(segment[labelStart + 3: labelEnd])","end for",'print("Available vulnerabilities: " + exploits.join(", "))']},sniffer:{description:"The terminal listens to the network packets of any connection that passes through the computer. When any connection information gets captured, it will print a `string` with the obtained data. In case saving of encryption source is enabled it will download the source code of the script responsible for encryption. In case the operation fails this method will return `null`. Using this method within a SSH encryption process will throw a runtime exception.",example:['metax = include_lib("/lib/metaxploit.so")',"result = metax.sniffer","print(result)"]}}});var n0=T(($5,zO)=>{zO.exports={$meta:{description:'A `netSession` object can be obtained by using [net_use](#METAXPLOIT_NET_USE). The `classID` used for this object is `"NetSession"`.'},dump_lib:{description:"Returns the `metaLib` associated with the remote service. For example if the `metaxpoit` method `net_use` was used on a ssh port it will return the `metaLib` related to the ssh service. In case the port was zero is will return a `metaLib` related to the kernel router.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)',"metaLib = netSession.dump_lib",'print("Library: " + metaLib.lib_name + " - " + metaLib.version + " on port " + ports[0].port_number)']},get_num_conn_gateway:{description:"Returns the number of devices using this router as a gateway. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("Gateway clients: " + netSession.get_num_conn_gateway)']},get_num_portforward:{description:"Returns the number of ports forwarded by this router. If you obtained your `netSession` from a computer, it will fetch and return the value from its gateway router.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("Port forwards: " + netSession.get_num_portforward)']},get_num_users:{description:"Returns the number of user accounts on the system.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("User accounts: " + netSession.get_num_users)']},is_any_active_user:{description:"Returns a `number`. If there is an active user on the system it will be one. Otherwise, it will be zero.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("User Active?: " + netSession.is_any_active_user)']},is_root_active_user:{description:"Returns a `number`. If there is an active root on the system it will be one. Otherwise, it will be zero.",example:['metax = include_lib("/lib/metaxploit.so")','ports = get_router("1.1.1.1").used_ports','netSession = metax.net_use("1.1.1.1", ports[0].port_number)','print("Root Active?: " + netSession.is_root_active_user)']}}});var r0=T((B5,GO)=>{GO.exports={$meta:{description:"All numbers are stored in full-precision format. Numbers also represent `true == 1` and `false == 0`.",example:["a = 20","b = 22","print(a + b) // addition","print(a - b) // substraction","print(a / b) // division","print(a * b) // multiply","print(a % b) // modulo","print(a - b) // substraction","print(a ^ b) // power","print(a and b) // logical and","print(a or b) // logical or","print(not a) // logical not","print(a == b) // comparison equal","print(a != b) // comparison unequal","print(a > b) // comparison greater than","print(a < b) // comparison lower than","print(a >= b) // comparison greater equal than","print(a <= b) // comparison lower equal than"]}}});var i0=T((U5,KO)=>{KO.exports={$meta:{description:'A `port` object can be obtained by using [get_ports](#COMPUTER_GET_PORTS), [ping_port](#ROUTER_PING_PORT), [used_ports](#ROUTER_USED_PORTS) or [device_ports](#ROUTER_DEVICE_PORTS). The `classID` used for this object is `"port"`. Generally there are no restrictions in regards to which service runs on which port but there are some default ports for each service. List of the most common ports: `21` (FTP), `22` (SSH), `25` (SMTP), `80` (HTTP), `141` (SQL), `8080` (HTTP), `1222` (RSHELL), `1542` (Repository), `3306` (SQL), `3307` (SQL), `3308` (SQL), `6667` (Chat), `37777` (CCTV)'},port_number:{description:"Returns the `number` which is used for the port.",example:["router = get_router","ports = router.used_ports","for port in ports",' print("Port " + port.port_number + " is in use!")',"end for"]},is_closed:{description:"Returns a `number`, where one indicates that the specified `port` is open and zero indicates that the port is closed.",example:["router = get_router","ports = router.used_ports","for port in ports",' state = "open"',' if (port.is_closed) then state = "closed"',' print("Port " + port.port_number + " is " + state + "!")',"end for"]},get_lan_ip:{description:"Returns a `string` containing the local IP address of the computer to which the port is pointing.",example:["router = get_router","ports = router.used_ports","for port in ports",' print("Port " + port.port_number + " is pointed to " + port.get_lan_ip + "!")',"end for"]}}});var s0=T((W5,YO)=>{YO.exports={$meta:{description:'A `router` object can be obtained by either using [get_router](#GENERAL_GET_ROUTER) or [get_switch](#GENERAL_GET_SWITCH). The `classID` used for this object is `"router"`.'},device_ports:{description:"Returns a `list` where each item is an open `port` related to the device of the provided LAN IP address. The device needs to be within the network of the `router`. In case of failure, this method will return `null` or a `string` with details. In case an empty ip is provided this method will throw a runtime exception.",example:["router = get_router","devices = router.devices_lan_ip","for ip in devices"," ports = router.device_ports(ip)"," openPorts = []"," for port in ports"," if port.is_closed then continue"," openPorts.push(port)"," end for",""," if (openPorts.len == 0) then",' print(ip + " has no open ports")'," else",' print(ip + " contains following open ports:")'," for port in openPorts",' print("|-" + port.port_number)'," end for"," end if","end for"]},devices_lan_ip:{description:"Returns a `list` where each item is a `string` representing a LAN IP address. All devices are within the network of the router and can be reached by using the `ping` method. Some of the devices might be behind a firewall.",example:["router = get_router","devices = router.devices_lan_ip","for ip in devices",' print(ip + " found!")',"end for"]},bssid_name:{description:"Returns a `string` with the BSSID value of the router.",example:["router = get_router","bssid = router.bssid_name",'print("BSSID: " + bssid)']},essid_name:{description:"Returns a `string` with the ESSID value of the router.",example:["router = get_router","essid = router.essid_name",'print("ESSID: " + essid)']},firewall_rules:{description:"Returns a `list` where each item is a `string` containing a firewall rule.",example:["router = get_router","rules = router.firewall_rules",'print("Firewall rules: " + rules.join(", "))']},kernel_version:{description:"Returns a `string` with the version of the `kernel_router.so` library.",example:["router = get_router","version = router.kernel_version",'print("Kernel router version: " + version)']},local_ip:{description:"Returns a `string` with the local IP address of the router.",example:["router = get_router","localIp = router.local_ip",'print("Local IP: " + localIp)']},public_ip:{description:"Returns a `string` with the public IP address of the router.",example:["router = get_router","publicIp = router.public_ip",'print("Public IP: " + publicIp)']},used_ports:{description:"Returns a `list` where each item is a `port` used inside the router.",example:["router = get_router","ports = router.used_ports","for port in ports",' print("Port " + port.port_number + " is available!")',"end for"]},ping_port:{description:"Returns a `port` that is behind the port `number` provided. In case the `port` does not exist `null` gets returned.",example:["router = get_router","ports = router.used_ports","for port in ports"," pingedPort = router.ping_port(port.port_number)"," if (pingedPort == null) then continue",' print("Pinged " + pingedPort.port_number)',"end for"]},port_info:{description:'Returns a `string` with information about the provided port, including details about the running service and its version. For example, the output could be `"http 1.0.0"`. If the operation fails, `null` will be returned.',example:["router = get_router","ports = router.used_ports","for port in ports"," info = router.port_info(port)"," print(info)","end for"]}}});var o0=T((V5,QO)=>{QO.exports={$meta:{description:'The service object can be obtained by using [include_lib](#GENERAL_INCLUDE_LIB). The `classID` used for this object is `"service"`. List of all installable services: `"FTP"`, `"SSH"`, `"HTTP"`, `"Repository"`, `"Chat"`'},install_service:{description:"Installs the necessary files for the correct functioning of the service and starts it. If the installation is completed successfully, it returns a `number` with the value one. In case of an error, it returns a `string` with details.",example:['service = include_lib("/lib/libhttp.so")',"result = service.install_service","if result == 1 then",' print "Successfully installed service"',"else",' print "Service installation failed: " + result',"end if"]},start_service:{description:"Starts the service and opens its associated `port` on the local machine. The service requires a port forwarded to the router to be accessible from the outside. If the service starts correctly, it returns a `number` with the value one. In case of an error, it returns a `string` with details.",example:['service = include_lib("/lib/libhttp.so")',"result = service.start_service","if result == 1 then",' print "Successfully started service"',"else",' print "Starting service failed: " + result',"end if"]},stop_service:{description:"Stops the service and closes its associated `port` on the local machine. If the service is stopped successfully, it returns a `number` with the value one. If an error occurs during the process, it returns a `string` with details. In some cases, the returned `number` might be zero, indicating that the service removal failed.",example:['service = include_lib("/lib/libhttp.so")',"result = service.stop_service","if result == 1 then",' print "Successfully stopped service"',"else",' print "Stopping service failed: " + result',"end if"]}}});var a0=T((H5,JO)=>{JO.exports={$meta:{description:'A `shell` object can be acquired by either using [get_shell](#GENERAL_GET_SHELL), [connect_service](#SHELL_CONNECT_SERVICE) or [overflow](#META_LIB_OVERFLOW). The `classID` used for this object is `"shell"`. In case you want to use [connect_service](#SHELL_CONNECT_SERVICE) to connect to a SSH port it will be usually at port `22`.'},host_computer:{description:"Returns a `computer` related to the `shell`.",example:["shell = get_shell","computer = shell.host_computer",'print("Computer public IP is: " + computer.public_ip)']},start_terminal:{description:"Launches an active terminal. The terminal's color will change, displaying the IP of the connected shell. Script execution will be stopped upon starting a new terminal, unless this is called from another script that was executed via `shell.launch`. In that case, you will enter the shell after closing your root-level script within that terminal window. Using this method within an SSH encryption process will cause an error to be thrown, preventing further script execution.",example:["shell = get_shell","shell.start_terminal"]},build:{description:"Compiles a plain code file provided in the arguments to a binary. On success, the new binary will be available under the provided build folder. The binary name will be the same as the source file just without the file extension. Optionally, an allowImport flag can be set which enables the use of `import_code` on the binary. All provided paths must be absolute. Returns an empty string on success. On failure, it will return a string containing details about the reason for failure. In case any provided values deviate from the defined signature a runtime exception will be thrown.",example:["shell = get_shell","computer = shell.host_computer",'computer.touch(home_dir, "test.src")','computer.File(home_dir + "/test.src").set_content("print(""hello world"")")','buildResult = shell.build(home_dir + "/test.src", home_dir + "/Desktop")','if buildResult != "" then',' print("There was an error while compiling: " + buildResult)',"else",' print("File has been compiled.")',"end if"]},connect_service:{description:"Returns a `shell` if the connection attempt to the provided IP was successful. This method can only connect to ports running an SSH or FTP service. SSH services usually run on port 22 and FTP services usually on port 21. Keep in mind to pass the right service value depending on which service is going to be used. By default, it will use SSH as the service. Please note that connecting will leave a log entry. In case of failure, a string is returned containing details. If any provided arguments deviate from the method signature, if this method is run in an SSH encryption process, or if the computer is not connected to the internet, a runtime exception will be thrown.",example:["shell = get_shell",'connectionResult = shell.connect_service("1.1.1.1", 22, "test", "test")','if typeof(connectionResult) != "shell" then',' print("There was an error while connecting: " + connectionResult)',"else",' print("Connected!")',"end if"]},launch:{description:"Launches the binary located at the provided path. Optionally, parameters can be passed. Returns a `number`. If the launch was successful, the value will be one; otherwise, it will be zero. In some cases, a `string` will be returned containing an error message. If you need to share variables between a launched script and the current process, consider using `get_custom_object`. Note that launching a script is not asynchronous, meaning that the current script will pause its execution until the launched script finishes. This method cannot be used to execute binaries with an EXE extension (GUI interface). If any provided values deviate from the method signature, a runtime exception will be thrown.",example:['shell = get_shell("root", "test")','shell.launch("/bin/cat", "/etc/passwd")']},ping:{description:"Returns a `number`. If the remote address could be reached the value will be one, zero otherwise. Firewalls do not block ping requests. Passing an invalid ip will cause the method to return a `string` with an error message. If any provided arguments deviate from the method signature a runtime exception will be thrown.",example:["shell = get_shell",'isPingable = shell.ping("1.1.1.1")',"if isPingable then",' print("Ping was successful!")',"else",' print("Ping failed!")',"end if"]},scp:{description:"Send a `file` to the `computer` related to the provided `shell`. You require permission to read the `file` on the `computer` from which you are uploading and write permissions in the folder of the `computer` you are trying to upload to. In case of failure, this method will return a `string` with the cause. Otherwise, a `number` with the value one gets returned. If any of the passed arguments deviates from the types of the method signature, `null` will be returned. In case the `string` for sourceFile or destinationFolder is empty, an error will be thrown, preventing further script execution",example:["shell = get_shell",'remoteShell = shell.connect_service("1.1.1.1", 22, "test", "test")','result = remoteShell.scp("/bin/ls", "/etc/", shell)','if typeof(result) == "string" then',' print("There was an error while sending file: " + result)',"else",' print("File got sent successfully.")',"end if"]}}});var l0=T((z5,XO)=>{XO.exports={$meta:{description:"Text is stored in strings of Unicode characters. Write strings by surrounding them with quotes. If you need to include a quotation mark in the string, write it twice.",example:['a = "hello"','b = "world"',"print(a + b) // concatinate a and b","print(a * 10) // repeat hello ten times","print(a[0]) // prints h","print(a[1:3]) // prints ell"]},remove:{description:"Returns a new `string` with the provided value removed. Any value other than `null` can be passed, but note that it will be cast to a string. If `null` is passed, this method will throw an error, preventing further script execution.",example:['myString = "42 as an answer is wrong"','newString = myString.remove("wrong")','print(newString + "right")']},hasIndex:{description:"Returns a `number`. If the provided index is available in the `string`, the value will be one. Otherwise, the value will be zero.",example:['myString = "42 as an answer is wrong"',"containsIndex = myString.hasIndex(1)","if containsIndex then",' print("String contains index of 1.")',"else",' print("String does not contain index of 1.")',"end if"]},insert:{description:"Returns a `string` with the newly inserted `string` at the provided index. If the passed index is not a `number`, this method throws an error, preventing further script execution.",example:['myString = "42 as an answer is wrong"','index = myString.lastIndexOf("w") - 1','newString = myString.insert(index, "not ")',"print(newString)"]},indexOf:{description:"Returns a `number` which indicates the first matching index of the provided value inside the `list`. Optionally a start index can be provided. In case the value does not exist inside the `string` a `null` gets returned.",example:['myString = "42 as an answer is wrong"','index = myString.indexOf("wrong")',"if index != null then",' print("Invalid information spotted at: " + index)',"else",' print("Information seems valid.")',"end if"]},lastIndexOf:{description:"Returns a `number` which indicates the last matching index of the provided value inside the `list`. In case the value does not exist inside the `string` a `-1` gets returned. If the provided searchStr is not a `string`, this method will return `null`.",example:['myString = "42 as an answer is wrong"','index = myString.lastIndexOf("wrong")',"if index != -1 then",' print("Invalid information spotted at: " + index)',"else",' print("Information seems valid.")',"end if"]},split:{description:"Returns a `list` where each item is a segment of the `string`, separated by the provided separator `string`. This method uses regular expressions for matching, so remember to escape special characters such as dots. If any of the provided arguments deviate from the method signature types, this method will return `null`. In case the pattern is empty, the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','segments = myString.split(" ")','if segments[0] != "42" then',' print("Invalid information spotted!")',"else",' print("Information seems valid!")',"end if"]},replace:{description:"Returns a `string` with the replaced content by using regular expressions. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','newString = myString.replace("wrong", "right")',"print(newString)"]},trim:{description:"Returns a new `string` stripped of any spacing at the beginning and ending.",example:['myString = " 42 "',"print(myString.trim)"]},indexes:{description:"Returns a `list` where each item is a `number` representing all available indexes in the `string`.",example:['myString = "42"',"print(myString.indexes)"]},code:{description:"Returns a `number` representing the Unicode code of the first character of the `string`.",example:['myString = "HELLO WORLD"',"print(myString.code)"]},len:{description:"Returns a `number` representing the length of the `string`.",example:['myString = "HELLO WORLD"','print("Size of string is: " + myString.len)']},lower:{description:"Returns a new `string` in which all characters are transformed into lowercase.",example:['myString = "HELLO WORLD"',"print(myString.lower)"]},upper:{description:"Returns a new `string` in which all characters are transformed into uppercase.",example:['myString = "hello world"',"print(myString.upper)"]},val:{description:"Returns a `number` which is parsed from the `string`. In case the `string` is not numeric it will return a zero.",example:['myString = "1.25"',"print(myString.val + 40.75)"]},values:{description:"Returns a `list` where each item is a `string` representing all available characters in the `string`. Could be compared to using `split` but without any separator.",example:['myString = "hello world"',"print(myString.values)"]},to_int:{description:"Returns a `number` which is parsed from the `string` as an integer. In case the `string` is not numeric it will return the original `string`.",example:['myString = "1"',"print(myString.to_int + 41)"]},is_match:{description:"Uses regular expression to check if a string matches a certain pattern. If it matches, it will return a `number` with the value one. If it does not match, the value of the `number` will be zero. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','hasWordAtTheEnd = myString.is_match("\\w+$")',"print(hasWordAtTheEnd)"]},matches:{description:"Returns a `map` with all search results for the provided regular expression. Each key contains the index and the value contains the matching `string`. If any provided arguments deviate from the method signature types, if the pattern is empty, if the provided [regexOptions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options) are invalid, or if the regular expression times out, an error will be thrown, preventing further script execution.",example:['myString = "42 as an answer is wrong"','result = myString.matches("w")',"print(result)"]}}});var c0=T((G5,ZO)=>{ZO.exports={$meta:{description:'A `subWallet` object can be obtained by either using [get_subwallet](#COIN_GET_SUBWALLET) or [get_subwallets](#COIN_GET_SUBWALLETS). The `classID` used for this object is `"subwallet"`.'},get_balance:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = blockchain.get_coin("test", "test", "test")','subWallet = coin.get_subwallet("test")','print "Balance: " + subWallet.get_balance']},set_info:{description:"Stores optional information in the Subwallet for any use. Upon success, a `number` with the value one will be returned. In case of failure, a `string` with details will be returned.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','result = set_info(subWallet, "test")',"if result == 1 then",' print "Subwallet info got set!"',"end if"]},get_info:{description:"Returns a `string` with the information stored by the coin creator.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet info: " + get_info(subWallet)']},delete:{description:"Deletes the account registered in the cryptocurrency. Returns a `number` where one indicates successful deletion and zero indicates failure. In case of certain failures, this method may return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"result = delete_subwallet(subWallet)","if result == 1 then",' print "Subwallet got deleted!"',"end if"]},get_user:{description:"Returns a `string` with the username associated with this subwallet. On failure, this method returns a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "Subwallet user: " + get_user(subWallet)']},last_transaction:{description:"Returns a `list` with the information of the last transaction. Index 0 is a `string` with the other subWallet. Index 1 is an integer with the amount. Index 2 is a `number` indicating the direction of the transaction (0 for Deposit, 1 for Withdrawal). Index 3 is a `string` indicating the date of the transaction. On failure, this method will either return a `number` with the value zero or a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"transactionItem = last_transaction(subWallet)","destinationAccount = transactionItem[0]","amount = transactionItem[1]","direction = transactionItem[2]","completeDate = transactionItem[3]","if direction == 0 then",' print "Received " + amount + " from " + destinationAccount + " got completed at the " + completeDate',"else",' print "Send " + amount + " to " + destinationAccount + " got completed at the " + completeDate',"end if "]},mining:{description:"Starts the process of mining the cryptocurrency. The process leaves the terminal busy until a coin is mined. On success, this method will return a `number` with the value one. On failure, this method will return a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")',"while mining(subWallet) == 1",' print "Mining...", true',' print "Balance " + get_balance_subwallet(subWallet)',"end while"]},check_password:{description:"Returns a `number` with the value one if the credentials are correct, otherwise, the value is zero. For some cases, this method will return a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','password = user_input("SubWallet password:", true)',"if check_password(subWallet, password) == 1 then",' print "Password is correct!"',"end if"]},wallet_username:{description:"Returns a `string` with the name of the `wallet` to which this subwallet belongs.",example:['blockchain = include_lib("/lib/blockchain.so")','coin = get_coin(blockchain, "test", "test", "test")','subWallet = get_subwallet(coin, "test")','print "SubWallet username: " + wallet_username(subWallet)']}}});var u0=T((K5,eD)=>{eD.exports={$meta:{description:'A `wallet` object can be obtained by either using [create_wallet](#BLOCKCHAIN_CREATE_WALLET) or [login_wallet](#BLOCKCHAIN_LOGIN_WALLET). The `classID` used for this object is `"wallet"`.'},list_coins:{description:"Returns a `list` where each item is a `string` with the names of the coins available in the `wallet`. On failure this method returns a `string` with an error message.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','print "My wallet is connected to: " + wallet.list_coins.join(", ")']},get_balance:{description:"Returns a `number` of coins of a given currency. In case of error, a `string` with the details is returned. If the passed coinName is anything other than a `string` this method will return `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")',"for coinName in wallet.list_coins",' print "You have " + wallet.get_balance(coinName) + " coins of the currency """ + coinName + """"',"end for"]},buy_coin:{description:"Publishes a purchase offer indicating the number of coins you wish to buy and the price ($) per unit you are willing to pay. The purchase will be finalized if there is any sale offer with a price less than or equal to the one proposed in the purchase. If there is no eligible offer to sell at that time, the offer to buy will remain publicly visible until a new offer to sell satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = wallet.buy_coin("test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created purchase offer!"',"else",' print "Failed: " + result',"end if"]},sell_coin:{description:"Publishes a sale offer indicating the amount of coins you want to sell and the price ($) per unit you want to assign. The sale will be finalized if there is any purchase offer with a price greater than or equal to that proposed in the sale. If there is no existing offer to buy that matches the requirements at that time, the offer to sell will remain publicly visible until a new offer to buy satisfies the requirements. If the publication has been successful, a `number` with the value one is returned. In case of error, a `string` with the details is returned. Any deviation from the method signature will result in a runtime exception preventing further script execution.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','result = wallet.sell_coin("test", 100, 20, "test")',"if result == 1 then",' print "Sucessfully created sell offer!"',"else",' print "Failed: " + result',"end if"]},get_pending_trade:{description:"Returns a `list` with the pending sale or purchase offer of this wallet for a certain currency. Index 0 of the `list` represents the type of offer with a `string` (Buy/Sell), index 1 represents the quantity to be sold or bought, and index 2 represents the price per unit. On failure, this method will return a `string` with details. Any deviation from the method signature will result in a `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','result = wallet.get_pending_trade("test")','isBuying = result[0] == "Buy"',"quantity = result[1]","unitPrice = result[2]",'currentBalance = wallet.get_balance("test")',"if isBuying then",' print "After buying was successful your balance will be " + (quantity * unitPrice + currentBalance)',"else",' print "After selling was successful your balance will be " + (currentBalance - quantity * unitPrice)',"end if"]},cancel_pending_trade:{description:"Cancel any pending offer of a certain coin. On success, an empty `string` will be returned. On failure, a `string` with an error message will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','if wallet.cancel_pending_trade("test") == "" then',' print "Trade got canceled!"',"end if"]},get_global_offers:{description:"Returns a `map` with all the offers made by any player of a given currency. The key of the `map` represents the WalletID of the player who has made the offer, and the value of the `map` is a `list` where index 0 represents the type of offer with a `string` (Buy/Sell), index 1 represents the amount to sell or buy, and index 2 represents the price per unit. In case of failure, this method returns a `string` with details. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','for item in wallet.get_global_offers("test")'," walletId = item.key"," trade = item.value",' isBuying = trade[0] == "Buy"'," quantity = trade[1]"," unitPrice = trade[2]",' print "-" * 10',' print "<b>" + walletId + "</b>"'," if isBuying then",' print "<color=green>Is buying</color>"'," else",' print "<color=yellow>Is selling</color>"'," end if",' print quantity + " coins with a unit price of " + unitPrice',"end for"]},list_global_coins:{description:"Returns a `list` where each item is a `string` containing the names of all the currencies that exist. In case of failure, this method returns a `string` with details.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','print "All existing coins: " wallet.list_global_coins.join(", ")']},show_nodes:{description:"Returns a `number` representing the count of devices mining a specific coin for the same `wallet`. In case of an error, a `string` with details is returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = login_wallet(blockchain, "test", "test")','print "Active miners: " show_nodes(wallet, "test")']},reset_password:{description:"Change the password of the wallet. Only the account owner can perform this action. If the process is completed successfully, a `number` with the value one will be returned. In case of an error, a `string` with details will be returned. Any deviation from the method signature will result in `null`.",example:['blockchain = include_lib("/lib/blockchain.so")','wallet = blockchain.login_wallet("test", "test")','if wallet.reset_password("test") == 1 then',' print "You got a new password!"',"end if"]},get_pin:{description:"Returns a `string` with a PIN that refreshes every few minutes. This PIN is used to obtain an account in cryptocurrency services.",example:['blockchain = include_lib("/lib/blockchain.so")',"myShell = get_shell","myComputer = myShell.host_computer",'wallet = blockchain.login_wallet("test", "test")','myComputer.touch("/root", "pin_launch.src")','myFile = myComputer.File("/root/pin_launch.src")','myFile.set_content("',' blockchain = include_lib(""/lib/blockchain.so"")'," myShell = get_shell"," myComputer = myShell.host_computer",' wallet = blockchain.login_wallet(""test"", ""test"")'," if params[0] == wallet.get_pin then",' get_custom_object.secret = ""The answer is 42""'," else",' get_custom_object.secret = ""The answer is 10053""'," end if",'")','myShell.build("/root/pin_launch.src", "/root")',"myFile.delete",'myShell.launch("/root/pin_launch", wallet.get_pin)','print "The secret: " + get_custom_object.secret']}}});var d0=T(Wo=>{"use strict";var Pe=Wo&&Wo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Wo,"__esModule",{value:!0});var tD=Pe(Nk()),nD=Pe($k()),rD=Pe(Bk()),iD=Pe(Uk()),sD=Pe(Wk()),oD=Pe(Vk()),aD=Pe(Hk()),lD=Pe(zk()),cD=Pe(Gk()),uD=Pe(Kk()),dD=Pe(Yk()),pD=Pe(Qk()),hD=Pe(Jk()),fD=Pe(Xk()),mD=Pe(Zk()),gD=Pe(e0()),yD=Pe(t0()),bD=Pe(n0()),vD=Pe(r0()),_D=Pe(i0()),wD=Pe(s0()),xD=Pe(o0()),SD=Pe(a0()),kD=Pe(l0()),TD=Pe(c0()),ID=Pe(u0()),ED={any:tD.default,aptClient:nD.default,blockchain:rD.default,class:iD.default,ctfEvent:lD.default,coin:sD.default,computer:oD.default,crypto:aD.default,function:dD.default,file:cD.default,ftpShell:uD.default,general:pD.default,list:hD.default,map:fD.default,metaLib:mD.default,metaMail:gD.default,metaxploit:yD.default,netSession:bD.default,port:_D.default,router:wD.default,service:xD.default,shell:SD.default,string:kD.default,subWallet:TD.default,wallet:ID.default,number:vD.default};Wo.default=ED});var p0=T((Q5,CD)=>{CD.exports={WELCOME_TITLE:"GreyScript API \u2013 Unofficial Documentation",WELCOME_TEXT:'<p>Grey Hack enables players to create their own programs inside the game via the integrated scripting language called GreyScript. GreyScript is a fork of <a href="https://miniscript.org/" target="_blank">MiniScript</a> and can be compared to another language such as JavaScript or Lua.</p><p>Programs can be created within Grey Hack via the in-game CodeEditor. Alternatively you can also use <a href="https://code.visualstudio.com/" target="_blank">Visual Studio Code</a> with <a href="https://marketplace.visualstudio.com/items?itemName=ayecue.greybel-vs" target="_blank">greybel-vs</a> which includes syntax highlighting and other helpful features. Another alternative is to use the <a href="https://editor.greyscript.org" target="_blank">online editor</a> provided by <a href="https://github.com/ayecue/greybel-js" target="_blank">greybel-js</a>. The latter also provides a CLI which can be used for script execution outside the game and bundling of code files.</p><p>The best sources for Grey Hack scripts to get inspiration from are <a href="https://www.greyrepo.xyz/" target="_blank">greyrepo.xyz</a> and <a href="https://github.com/search?q=grey+hack" target="_blank">github.com</a>.</p>',DEFINITIONS_COPY:"copy",DEFINITIONS_OR:"or"}});var h0=T((J5,RD)=>{RD.exports={type:"any",definitions:{insert:{type:"function",arguments:[{label:"index",type:"number"},{label:"value",type:"any"}],returns:["list","string"]},indexOf:{type:"function",arguments:[{label:"value",type:"any"},{label:"value",type:"any"},{label:"after",type:"any",opt:!0}],returns:["any"]},hasIndex:{type:"function",arguments:[{label:"value",type:"any"}],returnVariations:[0,1],returns:["number"]},remove:{type:"function",arguments:[{label:"value",type:"any"}],returnVariations:[0,1],returns:["number","null","string"]},push:{type:"function",arguments:[{label:"value",type:"any"}],returns:["list","map"]},pull:{type:"function",returns:["any"]},pop:{type:"function",returns:["any"]},shuffle:{type:"function",returns:["null"]},sum:{type:"function",returns:["number"]},indexes:{type:"function",returns:["list"]},len:{type:"function",returns:["number"]},values:{type:"function",returns:["list"]}}}});var f0=T((X5,PD)=>{PD.exports={type:"aptClient",extends:"map",definitions:{show:{type:"function",arguments:[{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${repository} repository not found","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},search:{type:"function",arguments:[{label:"search",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${search} not found in any repository","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},update:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","apt_update: No internet access.","${source} repository not found","/etc/apt/sources.txt content is malformed",0],returns:["string","number"]},add_repo:{type:"function",arguments:[{label:"repository",type:"string"},{label:"port",type:"number",default:{type:"number",value:1542}}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} it is already added to sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},del_repo:{type:"function",arguments:[{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} not found in sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},install:{type:"function",arguments:[{label:"package",type:"string"},{label:"customPath",type:"string",default:{type:"string",value:""}}],returnVariations:["Unknown error: Unable to access to local computer","apt_install: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","There is not enough free space on the hard disk.","!PlayerUtils.ConnectComputer","!Computer.CheckInicio","!PlayerUtils.FirewallPingStatus","!Networking.IsRouterAvailable","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${package} does not exist in the server","!GreyInterpreter.CheckScpUpload","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${package} not found in the server",1],returns:["string","number","null"]},check_upgrade:{type:"function",arguments:[{label:"filepath",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","apt_check_upgrade: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","${filepath} does not exist in this filesystem","!PlayerUtils.ConnectComputer","!PlayerUtils.FirewallPingStatus","!Computer.CheckInicio","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${filepath} does not exist in the server","${filepath} does not exist in this filesystem","${serviceDBFile} file content is malformed in the server","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${filepath} not found in the server",1,0],returns:["string","number","null"]}}}});var m0=T((Z5,AD)=>{AD.exports={type:"blockchain",definitions:{coin_price:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","coin_price: No internet access.","coin_price: Coin does not exist."],returns:["null","string","number"]},show_history:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","show_history: No internet access."],returns:[{type:"map",keyType:"number",valueType:"list"},"string","null"]},amount_mined:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","amount_mined: No internet access.","amount_mined: Coin does not exist."],returns:["string","number","null"]},get_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","get_coin: No internet access.","get_coin: Incorrect user/password"],returns:["string","coin","null"]},login_wallet:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","login_wallet: No internet access.","login_wallet: Account not found or incorrect password"],returns:["string","wallet","null"]},create_wallet:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","create_wallet: No internet access.","Error: only alphanumeric allowed as name and password","create_wallet: name and password cannot exceed the 16 character limit.","Error: It is necessary to have a bank account to be able to create a wallet.","!BlockchainSystem.AddWallet"],returns:["string","wallet","null"]},delete_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","delete_coin: No internet access.","!BlockchainSystem.RemoveCurrency",1],returns:["number","string","null"]}}}});var g0=T((eU,OD)=>{OD.exports={type:"class",hidden:!0,definitions:{}}});var y0=T((tU,DD)=>{DD.exports={type:"coin",extends:"map",definitions:{set_cycle_mining:{type:"function",arguments:[{label:"rateHours",type:"number",default:{type:"number",value:3}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","the mining cycle cannot exceed the maximum of 2160 hours","the mining cycle cannot be less than 1 hour",1],returns:["string","number","null"]},get_cycle_mining:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number"]},get_reward:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number"]},set_reward:{type:"function",arguments:[{label:"coinAmount",type:"number",default:{type:"number",value:1}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: The reward cannot be less than 1 coin","Error: Coin does not exist",1],returns:["number","string","null"]},transaction:{type:"function",arguments:[{label:"subWalletOrig",type:"string"},{label:"subWalletDest",type:"string"},{label:"valAmount",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: amount value cannot be less than 1","!BlockchainSystem.Transaction",1],returns:["string","number","null"]},create_subwallet:{type:"function",arguments:[{label:"walletID",type:"string"},{label:"pin",type:"string"},{label:"subWalletUser",type:"string"},{label:"subWalletPass",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.AddSubWallet",1],returns:["string","number","null"]},get_subwallet:{type:"function",arguments:[{label:"subWalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","get_subwallet: The account does not exist"],returns:["string","subWallet","null"]},get_subwallets:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string",{type:"list",valueType:"subWallet"}]},set_address:{type:"function",arguments:[{label:"address",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","set_address: address ${address}not found","!BlockchainSystem.SetAddress",1],returns:["number","string","null"]},get_address:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.GetAddress"],returns:["string"]},get_mined_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number"]},reset_password:{type:"function",arguments:[{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetCoinPass",1],returns:["number","string"]}}}});var b0=T((nU,jD)=>{jD.exports={type:"computer",extends:"map",definitions:{get_ports:{type:"function",returns:[{type:"list",valueType:"port"}]},get_name:{type:"function",returns:["string"]},local_ip:{type:"function",returns:["string"]},public_ip:{type:"function",returns:["string"]},File:{type:"function",arguments:[{label:"path",type:"string"}],returns:["file","null"]},create_folder:{type:"function",arguments:[{label:"path",type:"string"},{label:"folder",type:"string",default:{type:"string",value:"newFolder"}}],returnVariations:["Error: only alphanumeric allowed as folder name.","Error: name cannot exceed the limit of 128 characters.","create_folder: path too large","Error: invalid path","!PlayerUtils.CrearCarpeta",1],returns:["string","number"]},is_network_active:{type:"function",returnVariations:[0,1],returns:["number"]},touch:{type:"function",arguments:[{label:"path",type:"string"},{label:"fileName",type:"string"}],returnVariations:["Error: invalid path","Error: nameFile must be string","Error: only alphanumeric allowed as file name.","Error: name cannot exceed the limit of 128 characters.","touch: path too large","The file already exists","!PlayerUtils.CrearArchivo",1],returns:["number","string"]},show_procs:{type:"function",returns:["string"]},network_devices:{type:"function",returns:["string"]},change_password:{type:"function",arguments:[{label:"username",type:"string"},{label:"password",type:"string"}],returnVariations:["Error: only alphanumeric allowed as password.","Error: the password cannot exceed the limit of 15 characters.","Denied. Only root user can execute this command.","user ${username} does not exist",1],returns:["number","string","null"]},create_user:{type:"function",arguments:[{label:"usename",type:"string"},{label:"password",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user name and password.","Denied. Only root user can execute this command.","!Computer.ValidateNewUser","Denied. Maximum number of registered users reached.",1],returns:["number","string","null"]},delete_user:{type:"function",arguments:[{label:"username",type:"string"},{label:"removeHome",type:"number",default:{type:"number",value:0}}],returnVariations:["Denied. Only root user can execute this command.","can't delete user. ${username} does not exist","the root user can't be deleted.","sorry, at the moment that account can't be deleted.","user ${username} not found.",1],returns:["number","string","null"]},create_group:{type:"function",arguments:[{label:"username",type:"string"},{label:"group",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user and group names.","Denied. Only root user can execute this command.","Error: user ${username} does not exist.",1],returns:["number","string","null"]},delete_group:{type:"function",arguments:[{label:"username",type:"string"},{label:"group",type:"string"}],returnVariations:["Denied. Only root user can execute this command.","Error: user ${username} does not exist.","Error: group ${group} not found in user ${username}",1],returns:["number","string","null"]},groups:{type:"function",arguments:[{label:"username",type:"string"}],returnVariations:["Error: user ${username} does not exist."],returns:["string","null"]},close_program:{type:"function",arguments:[{label:"pid",type:"number"}],returnVariations:["Permission denied. PID ${pid} belongs to user <b>${username}</b>","Permission denied. Process protected.","Unable to close this process. The process belongs to this script.",1,0],returns:["number","string","null"]},wifi_networks:{type:"function",arguments:[{label:"netDevice",type:"string"}],returns:[{type:"list",valueType:"string"},"null"]},connect_wifi:{type:"function",arguments:[{label:"netDevice",type:"string"},{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"password",type:"string"}],returnVariations:["connect_wifi: permission denied. Guest users can not execute this method","connect_wifi: Network device not found","connect_wifi: Only wifi cards are supported","Can't connect. Incorrect password.","Can't connect. Router not found.","can't connect: the remote server has been temporarily disabled due to non-payment","Can't connect. Target is out of reach.","Can't connect. Incorrect password.",1],returns:["number","string","null"]},connect_ethernet:{type:"function",arguments:[{label:"netDevice",type:"string"},{label:"address",type:"string"},{label:"gateway",type:"string"}],returnVariations:["connect_ethernet: permission denied. Guest users can not execute this method","Error: Invalid IP address","Error: invalid gateway","Error: the IP address and the gateway must belong to the same subnet","connect_ethernet: Network device not found","connect_ethernet: Only ethernet cards are supported","!NetworkLan.ConnectEthernet"],returns:["string","null"]},network_gateway:{type:"function",returns:["string"]},active_net_card:{type:"function",returns:["string"]}}}});var v0=T((rU,LD)=>{LD.exports={type:"crypto",extends:"map",definitions:{aircrack:{type:"function",arguments:[{label:"path",type:"string"}],returns:["string","null"]},airmon:{type:"function",arguments:[{label:"option",type:"string"},{label:"device",type:"string"}],returnVariations:["Error: wifi card is disabled","airmon: monitor mode can only be activated on wifi cards","airmon: monitor mode is not supported by the chipset of this network card.",0,1],returns:["number","string"]},aireplay:{type:"function",arguments:[{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"maxAcks",type:"number",default:{type:"number",value:-1}}],returnVariations:["Error: wifi card is disabled","router not found!","Can't connect. Target is out of reach.","aireplay: no wifi card found with monitor mode enabled"],returns:["string","null"]},decipher:{type:"function",arguments:[{label:"encPass",type:"string"}],returns:["string","null"]},smtp_user_list:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number"}],returnVariations:["Error: Invalid ip address","!PlayerUtils.GetSmtpServer"],returns:[{type:"list",valueType:"string"},"string","null"]}}}});var _0=T((iU,MD)=>{MD.exports={type:"ctfEvent",extends:"map",definitions:{get_description:{type:"function",returns:["string"]},get_template:{type:"function",returns:["string"]},player_success:{type:"function",returnVariations:[0,1],returns:["number"]},get_creator_name:{type:"function",returns:["string"]},get_mail_content:{type:"function",returns:["string"]}}}});var w0=T((sU,qD)=>{qD.exports={type:"file",extends:"map",definitions:{chmod:{type:"function",arguments:[{label:"perms",type:"string",default:{type:"string",value:""}},{label:"isRecursive",type:"number",default:{type:"number",value:0}}],returnVariations:["${path} not found","!FileSystem.UpdatePermisos"],returns:["string"]},copy:{type:"function",arguments:[{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},move:{type:"function",arguments:[{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},rename:{type:"function",arguments:[{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","Error: name cannot exceed the limit of 128 characters.","!PlayerUtils.RenameFichero",0],returns:["string","number"]},path:{type:"function",returns:["string"]},is_folder:{type:"function",returnVariations:[1,0],returns:["number","null"]},parent:{type:"function",returns:["file","null"]},name:{type:"function",returns:["string","null"]},allow_import:{type:"function",returns:["number"]},get_content:{type:"function",returnVariations:["Error: can't find the computer of this file","can't open ${filepath}. Binary file."],returns:["string","null"]},set_content:{type:"function",arguments:[{label:"content",type:"string",default:{type:"string",value:""}}],returnVariations:["I can't save the file. The maximum of 160,000 characters has been exceeded.","set_content: unable to use this method in encryption configuration","can't open ${filepath}. Binary file.",1],returns:["string","number","null"]},is_binary:{type:"function",returnVariations:[1,0],returns:["number","null"]},has_permission:{type:"function",arguments:[{label:"perms",type:"string",default:{type:"string",value:""}}],returnVariations:[1,0],returns:["number","null"]},delete:{type:"function",returnVariations:["!PlayerUtils.RemoveFile"],returns:["string"]},get_folders:{type:"function",returns:[{type:"list",valueType:"file"},"null"]},get_files:{type:"function",returns:[{type:"list",valueType:"file"},"null"]},permissions:{type:"function",returns:["string","null"]},owner:{type:"function",returns:["string","null"]},set_owner:{type:"function",arguments:[{label:"owner",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},group:{type:"function",returns:["string","null"]},set_group:{type:"function",arguments:[{label:"group",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},size:{type:"function",returns:["string","null"]}}}});var x0=T((oU,FD)=>{FD.exports={type:"ftpShell",extends:"map",definitions:{host_computer:{type:"function",returns:["computer"]},start_terminal:{type:"function",returns:["null"]},put:{type:"function",arguments:[{label:"sourceFile",type:"string"},{label:"destinationFolder",type:"string"},{label:"remoteShell",type:"shell"}],returnVariations:["${sourceFile} not found","${destinationFolder} not found","${destinationFolder} it's not a folder","!GreyInterpreter.CheckScpUpload",1],returns:["number","string","null"]}}}});var S0=T((aU,ND)=>{ND.exports={type:"function",hidden:!0,definitions:{}}});var k0=T((lU,$D)=>{$D.exports={type:"general",definitions:{mail_login:{type:"function",arguments:[{label:"user",type:"string"},{label:"pass",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","login: No internet access.","!Database.GetMailAccount"],returns:["metaMail","string","null"]},parent_path:{type:"function",arguments:[{label:"directory",type:"string"}],returns:["string"]},trim:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string","null"]},hasIndex:{type:"function",arguments:[{label:"value",types:["map","list","string"]},{label:"index",type:"any"}],returnVariations:[0,1],returns:["number","null"]},typeof:{type:"function",arguments:[{label:"value",type:"any"}],returns:["string"]},get_router:{type:"function",arguments:[{label:"ipAddress",type:"string",default:{type:"string",value:""}}],returns:["router","null"]},get_switch:{type:"function",arguments:[{label:"ipAddress",type:"string"}],returns:["router","null"]},nslookup:{type:"function",arguments:[{label:"webAddress",type:"string"}],returnVariations:["Not found"],returns:["string"]},print:{type:"function",arguments:[{label:"value",type:"any",default:{type:"string",value:""}},{label:"replaceText",type:"number",default:{type:"number",value:0}}],returns:["null"]},clear_screen:{type:"function",returns:["null"]},active_user:{type:"function",returns:["string"]},home_dir:{type:"function",returns:["string"]},get_shell:{type:"function",arguments:[{label:"user",type:"string",default:{type:"string",value:""}},{label:"pass",type:"string",default:{type:"string",value:""}}],returns:["shell","null"]},indexes:{type:"function",arguments:[{label:"self",types:["map","list","string"]}],returns:["list","null"]},values:{type:"function",arguments:[{label:"self",types:["map","string"]}],returns:["list"]},indexOf:{type:"function",arguments:[{label:"self",types:["list","map","string"]},{label:"value",type:"any"},{label:"after",type:"any",opt:!0}],returns:["any"]},len:{type:"function",arguments:[{label:"self",types:["list","map","string"]}],returns:["number","null"]},shuffle:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["null"]},val:{type:"function",arguments:[{label:"self",types:["number","string"],default:{type:"number",value:0}}],returns:["number","null"]},lower:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string"]},upper:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string"]},sum:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["number"]},pop:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["any"]},pull:{type:"function",arguments:[{label:"self",types:["list","map"]}],returns:["any"]},push:{type:"function",arguments:[{label:"self",types:["list","map"]},{label:"value",type:"any"}],returns:["list","map","null"]},sort:{type:"function",arguments:[{label:"self",type:"list"},{label:"byKey",type:"any"},{label:"ascending",type:"number",default:{type:"number",value:1}}],returns:["list"]},remove:{type:"function",arguments:[{label:"self",types:["map","list","string"]},{label:"key",type:"any"}],returnVariations:[0,1],returns:["number","null","string"]},user_input:{type:"function",arguments:[{label:"message",type:"string",default:{type:"string",value:""}},{label:"isPassword",type:"number",default:{type:"number",value:0}},{label:"anyKey",type:"number",default:{type:"number",value:0}}],returns:["string"]},include_lib:{type:"function",arguments:[{label:"path",type:"string"}],returns:["crypto","metaxploit","service","blockchain","aptClient","null"]},import_code:{type:"function",arguments:[{label:"path",type:"string"}],returns:["null"]},exit:{type:"function",arguments:[{label:"message",type:"string",default:{type:"string",value:""}}],returns:["null"]},user_mail_address:{type:"function",returns:["string","null"]},user_bank_number:{type:"function",returns:["string","null"]},whois:{type:"function",arguments:[{label:"ip",type:"string"}],returnVariations:["Invalid IP address: ${ip}","Error: the IP address must be public","No Info available","Address not found"],returns:["string"]},wait:{type:"function",arguments:[{label:"delay",type:"number",default:{type:"number",value:1}}],returns:["null"]},command_info:{type:"function",arguments:[{label:"commandName",type:"string"}],returnVariations:["Unknown info"],returns:["string"]},program_path:{type:"function",returns:["string"]},current_path:{type:"function",returns:["string"]},format_columns:{type:"function",arguments:[{label:"columns",type:"string"}],returns:["string"]},current_date:{type:"function",returns:["string"]},is_lan_ip:{type:"function",arguments:[{label:"ip",type:"string"}],returns:["number"]},is_valid_ip:{type:"function",arguments:[{label:"ip",type:"string"}],returns:["number"]},bitwise:{type:"function",arguments:[{label:"operator",type:"string"},{label:"left",type:"number"},{label:"right",type:"number"}],returns:["number","null"]},abs:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},acos:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},asin:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},atan:{type:"function",arguments:[{label:"y",type:"number",default:{type:"number",value:0}},{label:"x",type:"number",default:{type:"number",value:1}}],returns:["number"]},tan:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:1}}],returns:["number"]},cos:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},code:{type:"function",arguments:[{label:"value",type:"string"}],returns:["number"]},char:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:65}}],returns:["string"]},sin:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},floor:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},range:{type:"function",arguments:[{label:"start",type:"number",default:{type:"number",value:0}},{label:"end",type:"number",default:{type:"number",value:0}},{label:"inc",type:"number",opt:!0}],returns:[{type:"list",valueType:"number"}]},round:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}},{label:"fixed",type:"number",default:{type:"number",value:0}}],returns:["number"]},rnd:{type:"function",arguments:[{label:"seed",type:"number",opt:!0}],returns:["number"]},sign:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},sqrt:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},str:{type:"function",arguments:[{label:"value",type:"any"}],returns:["string"]},ceil:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}}],returns:["number"]},pi:{type:"function",returns:["number"]},launch:{type:"function",arguments:[{label:"shell",type:"shell"},{label:"program",type:"string"},{label:"params",type:"string",default:{type:"string",value:""}}],returnVariations:["Invalid shell","Can't find computer",1,0],returns:["string","number"]},launch_path:{type:"function",returns:["string"]},slice:{type:"function",arguments:[{label:"value",types:["list","string"]},{label:"startIndex",type:"number",default:{type:"number",value:0}},{label:"endIndex",type:"number",opt:!0}],returns:["list","string","null"]},md5:{type:"function",arguments:[{label:"value",type:"string"}],returns:["string"]},hash:{type:"function",arguments:[{label:"value",type:"any"}],returns:["number"]},time:{type:"function",returns:["number"]},bitAnd:{type:"function",arguments:[{label:"a",type:"number",default:{type:"number",value:0}},{label:"b",type:"number",default:{type:"number",value:0}}],returns:["number"]},bitOr:{type:"function",arguments:[{label:"a",type:"number",default:{type:"number",value:0}},{label:"b",type:"number",default:{type:"number",value:0}}],returns:["number"]},bitXor:{type:"function",arguments:[{label:"a",type:"number",default:{type:"number",value:0}},{label:"b",type:"number",default:{type:"number",value:0}}],returns:["number"]},log:{type:"function",arguments:[{label:"value",type:"number",default:{type:"number",value:0}},{label:"base",type:"number",default:{type:"number",value:10}}],returns:["number"]},yield:{type:"function",returns:["null"]},get_custom_object:{type:"function",returns:["map"]},insert:{type:"function",arguments:[{label:"object",types:["list","string"]},{label:"index",type:"number"},{label:"value",type:"any"}],returns:["list","string"]},to_int:{type:"function",arguments:[{label:"self",type:"string"}],returns:["string","number","null"]},join:{type:"function",arguments:[{label:"value",type:"list"},{label:"delimiter",type:"string",default:{type:"string",value:" "}}],returns:["string"]},split:{type:"function",arguments:[{label:"self",type:"string"},{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"list",valueType:"string"},"null"]},reverse:{type:"function",arguments:[{label:"value",type:"list"}],returns:["null"]},replace:{type:"function",arguments:[{label:"value",types:["map","list"]},{label:"oldVal",type:"any"},{label:"newVal",type:"any"},{label:"maxCount",type:"number",opt:!0}],returns:["any"]},replace_regex:{type:"function",arguments:[{label:"self",type:"string"},{label:"pattern",type:"string"},{label:"newValue",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:["string"]},is_match:{type:"function",arguments:[{label:"value",type:"string"},{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returnVariations:[1,0],returns:["number"]},lastIndexOf:{type:"function",arguments:[{label:"self",type:"string"},{label:"searchStr",type:"string"}],returns:["number","null"]},matches:{type:"function",arguments:[{label:"value",type:"string"},{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"map",keyType:"number",valueType:"string"}]},get_ctf:{type:"function",arguments:[{label:"user",type:"string"},{label:"password",type:"string"},{label:"eventName",type:"string"}],returnVariations:["get_ctf: user and password cannot be null","get_ctf: user or password incorrect"],returns:["ctfEvent","string"]},show:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${repository} repository not found","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},search:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"search",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","${search} not found in any repository","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file"],returns:["string","null"]},update:{type:"function",arguments:[{label:"self",type:"aptClient"}],returnVariations:["Unknown error: Unable to access to local computer","apt_update: No internet access.","${source} repository not found","/etc/apt/sources.txt content is malformed",0],returns:["string","number"]},add_repo:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"repository",type:"string"},{label:"port",type:"number",default:{type:"number",value:1542}}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} it is already added to sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},del_repo:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"repository",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","/etc/apt/sources.txt does not exist","${repository} not found in sources.txt","/etc/apt/sources.txt content is malformed."],returns:["string","null"]},install:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"package",type:"string"},{label:"customPath",type:"string",default:{type:"string",value:""}}],returnVariations:["Unknown error: Unable to access to local computer","apt_install: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","There is not enough free space on the hard disk.","!PlayerUtils.ConnectComputer","!Computer.CheckInicio","!PlayerUtils.FirewallPingStatus","!Networking.IsRouterAvailable","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${package} does not exist in the server","!GreyInterpreter.CheckScpUpload","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${package} not found in the server",1],returns:["string","number","null"]},check_upgrade:{type:"function",arguments:[{label:"self",type:"aptClient"},{label:"filePath",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","apt_check_upgrade: No internet access.","/etc/apt/aptcache.bin not found. Launch apt with the update option to refresh the file","package name can not be empty","${filepath} does not exist in this filesystem","!PlayerUtils.ConnectComputer","!PlayerUtils.FirewallPingStatus","!Computer.CheckInicio","!Networking.CheckServiceOnline","${serviceDBFile} does not exist in the server","apt folder content does not exist in the server","${filepath} does not exist in the server","${filepath} does not exist in this filesystem","${serviceDBFile} file content is malformed in the server","/etc/apt/aptcache.bin content is malformed. Launch apt with the update option to refresh the file","${filepath} not found in the server",1,0],returns:["string","number","null"]},coin_price:{type:"function",arguments:[{label:"self",type:"blockchain"}],returnVariations:["Unknown error: Unable to access to local computer","coin_price: No internet access.","coin_price: Coin does not exist."],returns:["null","string","number"]},show_history:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","show_history: No internet access."],returns:[{type:"map",keyType:"number",valueType:"list"},"string","null"]},amount_mined:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","amount_mined: No internet access.","amount_mined: Coin does not exist."],returns:["string","number","null"]},get_coin:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","get_coin: No internet access.","get_coin: Incorrect user/password"],returns:["string","coin","null"]},login_wallet:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","login_wallet: No internet access.","login_wallet: Account not found or incorrect password"],returns:["string","wallet","null"]},create_wallet:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","create_wallet: No internet access.","Error: only alphanumeric allowed as name and password","create_wallet: name and password cannot exceed the 16 character limit.","Error: It is necessary to have a bank account to be able to create a wallet.","!BlockchainSystem.AddWallet"],returns:["string","wallet","null"]},delete_coin:{type:"function",arguments:[{label:"self",type:"blockchain"},{label:"coinName",type:"string"},{label:"user",type:"string"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","delete_coin: No internet access.","!BlockchainSystem.RemoveCurrency",1],returns:["number","string","null"]},set_cycle_mining:{type:"function",arguments:[{label:"self",type:"coin"},{label:"rateHours",type:"number",default:{type:"number",value:3}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","the mining cycle cannot exceed the maximum of 2160 hours","the mining cycle cannot be less than 1 hour",1],returns:["string","number","null"]},get_cycle_mining:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number","null"]},get_reward:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number","null"]},set_reward:{type:"function",arguments:[{label:"self",type:"coin"},{label:"coinAmount",type:"number",default:{type:"number",value:1}}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: The reward cannot be less than 1 coin","Error: Coin does not exist",1],returns:["number","string","null"]},transaction:{type:"function",arguments:[{label:"self",type:"coin"},{label:"subWalletOrig",type:"string"},{label:"subWalletDest",type:"string"},{label:"valAmount",type:"number"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","Error: amount value cannot be less than 1","!BlockchainSystem.Transaction",1],returns:["string","number","null"]},create_subwallet:{type:"function",arguments:[{label:"self",type:"coin"},{label:"walletID",type:"string"},{label:"pin",type:"string"},{label:"subWalletUser",type:"string"},{label:"subWalletPass",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.AddSubWallet",1],returns:["string","number","null"]},get_subwallet:{type:"function",arguments:[{label:"self",type:"coin"},{label:"subWalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","get_subwallet: The account does not exist"],returns:["string","subWallet","null"]},get_subwallets:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string",{type:"list",valueType:"subWallet"},"null"]},set_address:{type:"function",arguments:[{label:"self",type:"coin"},{label:"address",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","set_address: address ${address}not found","!BlockchainSystem.SetAddress",1],returns:["number","string","null"]},get_address:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","!BlockchainSystem.GetAddress"],returns:["string","null"]},get_mined_coins:{type:"function",arguments:[{label:"self",type:"coin"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access."],returns:["string","number","null"]},reset_password_coin:{type:"function",arguments:[{label:"self",type:"coin"},{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","error: No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetCoinPass",1],returns:["number","string","null"]},get_ports:{type:"function",arguments:[{label:"self",type:"computer"}],returns:[{type:"list",valueType:"port"},"null"]},get_name:{type:"function",arguments:[{label:"self",type:"computer"}],returnVariations:["Unknown"],returns:["string"]},lan_ip:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},public_ip_pc:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},File:{type:"function",arguments:[{label:"self",type:"computer"},{label:"path",type:"string"}],returns:["file","null"]},create_folder:{type:"function",arguments:[{label:"self",type:"computer"},{label:"path",type:"string"},{label:"folder",type:"string",default:{type:"string",value:"newFolder"}}],returnVariations:["Error: only alphanumeric allowed as folder name.","Error: name cannot exceed the limit of 128 characters.","create_folder: path too large","Error: invalid path","!PlayerUtils.CrearCarpeta",1],returns:["string","number","null"]},is_network_active:{type:"function",arguments:[{label:"self",type:"computer"}],returnVariations:[0,1],returns:["number","null"]},touch:{type:"function",arguments:[{label:"self",type:"computer"},{label:"path",type:"string"},{label:"fileName",type:"string"}],returnVariations:["Error: invalid path","Error: nameFile must be string","Error: only alphanumeric allowed as file name.","Error: name cannot exceed the limit of 128 characters.","touch: path too large","The file already exists","!PlayerUtils.CrearArchivo",1],returns:["number","string","null"]},show_procs:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},network_devices:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},change_password:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"pass",type:"string"}],returnVariations:["Error: only alphanumeric allowed as password.","Error: the password cannot exceed the limit of 15 characters.","Denied. Only root user can execute this command.","user ${username} does not exist",1],returns:["number","string","null"]},create_user:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"pass",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user name and password.","Denied. Only root user can execute this command.","!Computer.ValidateNewUser","Denied. Maximum number of registered users reached.",1],returns:["number","string","null"]},delete_user:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"removeHome",type:"number",default:{type:"number",value:0}}],returnVariations:["Denied. Only root user can execute this command.","can't delete user. ${username} does not exist","the root user can't be deleted.","sorry, at the moment that account can't be deleted.","user ${username} not found.",1],returns:["number","string","null"]},create_group:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"group",type:"string"}],returnVariations:["Error: only alphanumeric allowed as user and group names.","Denied. Only root user can execute this command.","Error: user ${username} does not exist.",1],returns:["number","string","null"]},delete_group:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"},{label:"group",type:"string"}],returnVariations:["Denied. Only root user can execute this command.","Error: user ${username} does not exist.","Error: group ${group} not found in user ${username}",1],returns:["number","string","null"]},groups:{type:"function",arguments:[{label:"self",type:"computer"},{label:"user",type:"string"}],returns:["string","null"]},close_program:{type:"function",arguments:[{label:"self",type:"computer"},{label:"pid",type:"number"}],returnVariations:["Permission denied. PID ${pid} belongs to user <b>${username}</b>","Permission denied. Process protected.","Unable to close this process. The process belongs to this script.",1,0],returns:["number","string","null"]},wifi_networks:{type:"function",arguments:[{label:"self",type:"computer"},{label:"netDevice",type:"string"}],returns:[{type:"list",valueType:"string"},"null"]},connect_wifi:{type:"function",arguments:[{label:"self",type:"computer"},{label:"netDevice",type:"string"},{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"pass",type:"string"}],returnVariations:["connect_wifi: permission denied. Guest users can not execute this method","connect_wifi: Network device not found","connect_wifi: Only wifi cards are supported","Can't connect. Incorrect password.","Can't connect. Router not found.","can't connect: the remote server has been temporarily disabled due to non-payment","Can't connect. Target is out of reach.","Can't connect. Incorrect password.",1],returns:["number","string","null"]},connect_ethernet:{type:"function",arguments:[{label:"self",type:"computer"},{label:"netDevice",type:"string"},{label:"localIp",type:"string"},{label:"gateway",type:"string"}],returnVariations:["connect_ethernet: permission denied. Guest users can not execute this method","Error: Invalid IP address","Error: invalid gateway","Error: the IP address and the gateway must belong to the same subnet","connect_ethernet: Network device not found","connect_ethernet: Only ethernet cards are supported","!NetworkLan.ConnectEthernet"],returns:["string","null"]},network_gateway:{type:"function",arguments:[{label:"self",type:"computer"}],returnVariations:["0.0.0.0"],returns:["string"]},active_net_card:{type:"function",arguments:[{label:"self",type:"computer"}],returns:["string","null"]},aircrack:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"path",type:"string"}],returns:["string","null"]},airmon:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"option",type:"string"},{label:"device",type:"string"}],returnVariations:["Error: wifi card is disabled","airmon: monitor mode can only be activated on wifi cards","airmon: monitor mode is not supported by the chipset of this network card.",0,1],returns:["number","string"]},aireplay:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"bssid",type:"string"},{label:"essid",type:"string"},{label:"maxAcks",type:"number",default:{type:"number",value:-1}}],returnVariations:["Error: wifi card is disabled","router not found!","Can't connect. Target is out of reach.","aireplay: no wifi card found with monitor mode enabled"],returns:["string","null"]},decipher:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"encPass",type:"string"}],returns:["string","null"]},smtp_user_list:{type:"function",arguments:[{label:"self",type:"crypto"},{label:"ip",type:"string"},{label:"port",type:"number"}],returnVariations:["Error: Invalid ip address","!PlayerUtils.GetSmtpServer"],returns:[{type:"list",valueType:"string"},"string","null"]},get_description:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},get_template:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},player_success:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returnVariations:[0,1],returns:["number","null"]},get_creator_name:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},get_mail_content:{type:"function",arguments:[{label:"self",type:"ctfEvent"}],returns:["string","null"]},chmod:{type:"function",arguments:[{label:"self",type:"file"},{label:"perms",type:"string",default:{type:"string",value:""}},{label:"isRecursive",type:"number",default:{type:"number",value:0}}],returnVariations:["${path} not found","!FileSystem.UpdatePermisos"],returns:["string","null"]},copy:{type:"function",arguments:[{label:"self",type:"file"},{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},move:{type:"function",arguments:[{label:"self",type:"file"},{label:"path",type:"string",default:{type:"string",value:""}},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","!PlayerUtils.MoverFichero",1],returns:["string","number","null"]},rename:{type:"function",arguments:[{label:"self",type:"file"},{label:"name",type:"string",default:{type:"string",value:""}}],returnVariations:["Error: only alphanumeric allowed as newname","Error: name cannot exceed the limit of 128 characters.","!PlayerUtils.RenameFichero",0],returns:["string","number"]},path:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},is_folder:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:[1,0],returns:["number","null"]},parent:{type:"function",arguments:[{label:"self",type:"file"}],returns:["file","null"]},name:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},allow_import:{type:"function",arguments:[{label:"self",type:"file"}],returns:["number","null"]},get_content:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:["Error: can't find the computer of this file","can't open ${filepath}. Binary file."],returns:["string","null"]},set_content:{type:"function",arguments:[{label:"self",type:"file"},{label:"content",type:"string",default:{type:"string",value:""}}],returnVariations:["I can't save the file. The maximum of 160,000 characters has been exceeded.","set_content: unable to use this method in encryption configuration","can't open ${filepath}. Binary file.",1,0],returns:["string","number","null"]},is_binary:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:[1,0],returns:["number","null"]},has_permission:{type:"function",arguments:[{label:"self",type:"file"},{label:"perms",type:"string",default:{type:"string",value:""}}],returnVariations:[1,0],returns:["number","null"]},delete:{type:"function",arguments:[{label:"self",type:"file"}],returnVariations:["!PlayerUtils.RemoveFile"],returns:["string","null"]},get_folders:{type:"function",arguments:[{label:"self",type:"file"}],returns:[{type:"list",valueType:"file"},"null"]},get_files:{type:"function",arguments:[{label:"self",type:"file"}],returns:[{type:"list",valueType:"file"},"null"]},permissions:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},owner:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},set_owner:{type:"function",arguments:[{label:"self",type:"file"},{label:"owner",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},group:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},set_group:{type:"function",arguments:[{label:"self",type:"file"},{label:"group",type:"string",default:{type:"string",value:""}},{label:"recursive",type:"number",default:{type:"number",value:0}}],returnVariations:["Permission denied"],returns:["string","null"]},size:{type:"function",arguments:[{label:"self",type:"file"}],returns:["string","null"]},load:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"path",type:"string"}],returns:["metaLib","null"]},net_use:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:0}}],returns:["netSession","null"]},rshell_client:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:1222}},{label:"processName",type:"string",default:{type:"string",value:"rshell_client"}}],returnVariations:["rshell_client: Invalid IP address","Error: only alphanumeric allowed as proccess name.","Error: proccess name cannot exceed the limit of 28 characters.","Error: ${programName} is a reserved process name","rshell_client: IP address not found: ${ip}","rshell_client: unable to find remote server at port ${port}","!Networking.CheckServiceOnline",1],returns:["string","number","null"]},rshell_server:{type:"function",arguments:[{label:"self",type:"metaxploit"}],returnVariations:["rshell_server: No internet connection","rshell_server: The service cannot be started on this network.","error: service rshelld is not running","error: rshell portforward is not configured correctly"],returns:["string",{type:"list",valueType:"shell"},"null"]},scan:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"metaLib",type:"metaLib"}],returns:[{type:"list",valueType:"string"},"null"]},scan_address:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"metaLib",type:"metaLib"},{label:"memoryAddress",type:"string"}],returns:["string","null"]},sniffer:{type:"function",arguments:[{label:"self",type:"metaxploit"},{label:"saveEncSource",type:"number",default:{type:"number",value:0}}],returns:["string","null"]},overflow:{type:"function",arguments:[{label:"self",type:"metaLib"},{label:"memoryAddress",type:"string"},{label:"unsecZone",type:"string"},{label:"optArgs",type:"string",default:{type:"string",value:""}}],returnVariations:["Exploit failed: the remote server has been temporarily disabled due to non-payment",0,1],returns:["string","number","shell","computer","file","null"]},version:{type:"function",arguments:[{label:"self",type:"metaLib"}],returns:["string","null"]},lib_name:{type:"function",arguments:[{label:"self",type:"metaLib"}],returns:["string","null"]},dump_lib:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["metaLib","null"]},get_num_conn_gateway:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["number","null"]},get_num_portforward:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["number","null"]},get_num_users:{type:"function",arguments:[{label:"self",type:"netSession"}],returns:["number","null"]},is_any_active_user:{type:"function",arguments:[{label:"self",type:"netSession"}],returnVariations:[0,1],returns:["number","null"]},is_root_active_user:{type:"function",arguments:[{label:"self",type:"netSession"}],returnVariations:[0,1],returns:["number","null"]},device_ports:{type:"function",arguments:[{label:"self",type:"router"},{label:"ip",type:"string"}],returnVariations:["device_ports: ${ip} is unreachable"],returns:["string",{type:"list",valueType:"port"},"null"]},devices_lan_ip:{type:"function",arguments:[{label:"self",type:"router"}],returns:[{type:"list",valueType:"string"},"null"]},bssid_name:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},essid_name:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},firewall_rules:{type:"function",arguments:[{label:"self",type:"router"}],returns:[{type:"list",valueType:"string"},"null"]},kernel_version:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},local_ip:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},public_ip:{type:"function",arguments:[{label:"self",type:"router"}],returns:["string","null"]},used_ports:{type:"function",arguments:[{label:"self",type:"router"}],returns:[{type:"list",valueType:"port"},"null"]},ping_port:{type:"function",arguments:[{label:"self",type:"router"},{label:"port",type:"number"}],returns:["port","null"]},port_info:{type:"function",arguments:[{label:"self",type:"router"},{label:"port",type:"port"}],returns:["string","null"]},install_service:{type:"function",arguments:[{label:"self",type:"service"}],returnVariations:["Denied. Only root user can install this service.",1],returns:["number","string","null"]},start_service:{type:"function",arguments:[{label:"self",type:"service"}],returnVariations:["Denied. Only root user can install this service.","<color=yellow>${reason} The chat service can't be accessed.</color>",1],returns:["number","string","null"]},stop_service:{type:"function",arguments:[{label:"self",type:"service"}],returnVariations:["Denied. Only root user can install this service.",1,0],returns:["number","string","null"]},host_computer:{type:"function",arguments:[{label:"self",type:"shell"}],returns:["computer","null"]},start_terminal:{type:"function",arguments:[{label:"self",type:"shell"}],returns:["null"]},build:{type:"function",arguments:[{label:"self",type:"shell"},{label:"pathSource",type:"string"},{label:"pathBinary",type:"string"},{label:"allowImport",type:"number",default:{type:"number",value:0}}],returnVariations:["pathSource and programName can't be empty","Invalid shell","Unknown error: Unable to access to local computer","Can't find ${pathSource}","Can't find ${pathBinary}","Can't access to ${pathSource}. Permission denied.","Can't build ${pathSource}. Binary file","Can't create binary in ${pathBinary}. Permission denied.","Can't build ${pathSource}. Invalid extension.","Can't compile. Source code is empty"],returns:["string"]},connect_service:{type:"function",arguments:[{label:"self",type:"shell"},{label:"ip",type:"string"},{label:"port",type:"number"},{label:"user",type:"string"},{label:"password",type:"string"},{label:"service",type:"string",default:{type:"string",value:"ssh"}}],returnVariations:["Unknown error: Unable to access to local computer","Direct connections cannot be made outside of this network","!PlayerUtils.ConnectToService","!PlayerUtils.ConnectComputer","!Networking.CheckServiceOnline"],returns:["shell","ftpShell","string","null"]},launch:{type:"function",arguments:[{label:"self",type:"shell"},{label:"program",type:"string"},{label:"params",type:"string",default:{type:"string",value:""}}],returns:["string","number"]},ping:{type:"function",arguments:[{label:"self",type:"shell"},{label:"ip",type:"string"}],returnVariations:["ping: invalid ip address",1,0],returns:["string","number","null"]},scp:{type:"function",arguments:[{label:"self",type:"shell"},{label:"sourceFile",type:"string"},{label:"destinationFolder",type:"string"},{label:"remoteShell",type:"shell"}],returnVariations:["${sourceFile} not found","${destinationFolder} not found","${destinationFolder} it's not a folder","!GreyInterpreter.CheckScpUpload",1],returns:["number","string","null"]},get_balance_subwallet:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["get_balance: The account does not exist.","Unknown error: Unable to access to local computer","No internet access."],returns:["number","string","null"]},set_info:{type:"function",arguments:[{label:"self",type:"subWallet"},{label:"info",type:"string"}],returnVariations:["Error: exceeded maximum of 256 characters","Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.SetInfoSubWallet",1],returns:["number","string","null"]},get_info:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.GetInfoSubWallet"],returns:["string","null"]},delete_subwallet:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.",1,0],returns:["string","number","null"]},get_user:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},last_transaction:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.",0],returns:[{type:"list",valueType:"list"},"number","string","null"]},mining:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","all existing coins of ${coinName} have been mined.","Only one mining process is allowed.","Error: GPU is damaged. Unable to start the mining process.","Error: GPU returned corrupted data while performing floating point tests. Unable to start the mining process.","Hardware error",1],returns:["number","string","null"]},check_password:{type:"function",arguments:[{label:"self",type:"subWallet"},{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","login_subwallet: the account does not exist.",1,0],returns:["number","string","null"]},wallet_username:{type:"function",arguments:[{label:"self",type:"subWallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},list_coins:{type:"function",arguments:[{label:"self",type:"wallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials."],returns:[{type:"list",valueType:"string"},"string","null"]},get_balance:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials.","get_balance: wallet does not have coins in the selected currency"],returns:["number","string","null"]},buy_coin:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.","!BlockchainSystem.BuyCoin",1],returns:["number","string"]},sell_coin:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.","!BlockchainSystem.SellCoin",1],returns:["number","string"]},get_pending_trade:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","No pending trades found"],returns:["string","list","null"]},cancel_pending_trade:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","No pending trades found"],returns:["string","null"]},get_global_offers:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"map",keyType:"string",valueType:"list"},"null"]},list_global_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"list",valueType:"string"},"null"]},show_nodes:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","show_nodes: wallet does not exist","show_nodes: coin does not exist"],returns:["string","number","null"]},reset_password:{type:"function",arguments:[{label:"self",type:"wallet"},{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetWalletPass",1],returns:["number","string","null"]},get_pin:{type:"function",arguments:[{label:"self",type:"wallet"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},delete_mail:{type:"function",arguments:[{label:"self",type:"metaMail"},{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","read: No internet access.",1],returns:["number","string","null"]},fetch:{type:"function",arguments:[{label:"self",type:"metaMail"}],returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access."],returns:[{type:"list",valueType:"string"},"string","null"]},read:{type:"function",arguments:[{label:"self",type:"metaMail"},{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access.","Mail not found"],returns:["string","null"]},send:{type:"function",arguments:[{label:"self",type:"metaMail"},{label:"emailAddress",type:"string"},{label:"subject",type:"string"},{label:"message",type:"string"}],returnVariations:["The mail could not be sent. Wait a moment before sending another email.","Unknown error: Unable to access to local computer","read: No internet access.","read: No email account registered","!PlayerUtils.SendMail","!Database.GetMailAccount","Mail not delivered",1],returns:["string","number","null"]},port_number:{type:"function",arguments:[{label:"self",type:"port"}],returns:["number","null"]},is_closed:{type:"function",arguments:[{label:"self",type:"port"}],returnVariations:[0,1],returns:["number","null"]},get_lan_ip:{type:"function",arguments:[{label:"self",type:"port"}],returns:["string","null"]},reset_ctf_password:{type:"function",arguments:[{label:"newPassword",type:"string"}],returnVariations:["reset_ctf_password: password cannot be null","reset_ctf_password: password can't exceed the maximum limit of 32 characters","reset_ctf_password: password must be alphanumeric","reset_ctf_password: you do not have a registered CTF account",1],returns:["number","string"]},funcRef:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},list:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},map:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},number:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]},string:{type:"function",returns:[{type:"map",keyType:"string",valueType:"function"}]}}}});var T0=T((cU,BD)=>{BD.exports={type:"list",definitions:{remove:{type:"function",arguments:[{label:"index",type:"number"}],returns:["null"]},insert:{type:"function",arguments:[{label:"index",type:"number"},{label:"value",type:"any"}],returns:["list"]},push:{type:"function",arguments:[{label:"value",type:"any"}],returns:["list"]},pop:{type:"function",returns:["any"]},pull:{type:"function",returns:["any"]},shuffle:{type:"function",returns:["null"]},reverse:{type:"function",returns:["null"]},sum:{type:"function",returns:["number"]},hasIndex:{type:"function",arguments:[{label:"index",type:"number"}],returnVariations:[0,1],returns:["number"]},indexOf:{type:"function",arguments:[{label:"value",type:"any"},{label:"offset",type:"number",opt:!0}],returns:["number","null"]},sort:{type:"function",arguments:[{label:"key",type:"any"},{label:"ascending",type:"number",default:{type:"number",value:1}}],returns:["list"]},join:{type:"function",arguments:[{label:"delimiter",type:"string"}],returns:["string"]},indexes:{type:"function",returns:[{type:"list",valueType:"number"}]},len:{type:"function",returns:["number"]},values:{type:"function",returns:["list"]},replace:{type:"function",arguments:[{label:"oldVal",type:"any"},{label:"newVal",type:"any"},{label:"maxCount",type:"number",opt:!0}],returns:["list"]}}}});var I0=T((uU,UD)=>{UD.exports={type:"map",definitions:{remove:{type:"function",arguments:[{label:"key",type:"string"}],returnVariations:[0,1],returns:["number"]},push:{type:"function",arguments:[{label:"key",type:"any"}],returns:["map"]},pull:{type:"function",returns:["any"]},pop:{type:"function",returns:["any"]},shuffle:{type:"function",returns:["null"]},sum:{type:"function",returns:["number"]},hasIndex:{type:"function",arguments:[{label:"key",type:"any"}],returnVariations:[0,1],returns:["number"]},indexOf:{type:"function",arguments:[{label:"value",type:"any"}],returns:["any"]},indexes:{type:"function",returns:["list"]},len:{type:"function",returns:["number"]},values:{type:"function",returns:["list"]},replace:{type:"function",arguments:[{label:"oldVal",type:"any"},{label:"newVal",type:"any"},{label:"maxCount",type:"number",opt:!0}],returns:["map"]}}}});var E0=T((dU,WD)=>{WD.exports={type:"metaLib",extends:"map",definitions:{overflow:{type:"function",arguments:[{label:"memoryAddress",type:"string"},{label:"unsecZone",type:"string"},{label:"optArgs",type:"string",default:{type:"string",value:""}}],returnVariations:["Exploit failed: the remote server has been temporarily disabled due to non-payment",0,1],returns:["string","number","shell","computer","file","null"]},version:{type:"function",returns:["string"]},lib_name:{type:"function",returns:["string"]}}}});var C0=T((pU,VD)=>{VD.exports={type:"metaMail",extends:"map",definitions:{delete:{type:"function",arguments:[{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","read: No internet access.",1],returns:["number","string","null"]},fetch:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access."],returns:[{type:"list",valueType:"string"},"string"]},read:{type:"function",arguments:[{label:"mailId",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","fetch: No internet access.","Mail not found"],returns:["string","null"]},send:{type:"function",arguments:[{label:"emailAddress",type:"string"},{label:"subject",type:"string"},{label:"message",type:"string"}],returnVariations:["The mail could not be sent. Wait a moment before sending another email.","Unknown error: Unable to access to local computer","read: No internet access.","read: No email account registered","!PlayerUtils.SendMail","!Database.GetMailAccount","Mail not delivered",1],returns:["string","number","null"]}}}});var R0=T((hU,HD)=>{HD.exports={type:"metaxploit",extends:"map",definitions:{load:{type:"function",arguments:[{label:"path",type:"string"}],returns:["metaLib","null"]},net_use:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:0}}],returns:["netSession","null"]},rshell_client:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number",default:{type:"number",value:1222}},{label:"processName",type:"string",default:{type:"string",value:"rshell_client"}}],returnVariations:["rshell_client: Invalid IP address","Error: only alphanumeric allowed as proccess name.","Error: proccess name cannot exceed the limit of 28 characters.","Error: ${programName} is a reserved process name","rshell_client: IP address not found: ${ip}","rshell_client: unable to find remote server at port ${port}","!Networking.CheckServiceOnline",1],returns:["string","number","null"]},rshell_server:{type:"function",returnVariations:["rshell_server: No internet connection","rshell_server: The service cannot be started on this network.","error: service rshelld is not running","error: rshell portforward is not configured correctly"],returns:["string",{type:"list",valueType:"shell"}]},scan:{type:"function",arguments:[{label:"metaLib",type:"metaLib"}],returns:[{type:"list",valueType:"string"},"null"]},scan_address:{type:"function",arguments:[{label:"metaLib",type:"metaLib"},{label:"memoryAddress",type:"string"}],returns:["string","null"]},sniffer:{type:"function",arguments:[{label:"saveEncSource",type:"number",default:{type:"number",value:0}}],returns:["string","null"]}}}});var P0=T((fU,zD)=>{zD.exports={type:"netSession",extends:"map",definitions:{dump_lib:{type:"function",returns:["metaLib"]},get_num_conn_gateway:{type:"function",returns:["number"]},get_num_portforward:{type:"function",returns:["number"]},get_num_users:{type:"function",returns:["number"]},is_any_active_user:{type:"function",returnVariations:[0,1],returns:["number"]},is_root_active_user:{type:"function",returnVariations:[0,1],returns:["number"]}}}});var A0=T((mU,GD)=>{GD.exports={type:"number",definitions:{}}});var O0=T((gU,KD)=>{KD.exports={type:"port",extends:"map",definitions:{port_number:{type:"function",returns:["number"]},is_closed:{type:"function",returnVariations:[0,1],returns:["number"]},get_lan_ip:{type:"function",returns:["string"]}}}});var D0=T((yU,YD)=>{YD.exports={type:"router",extends:"map",definitions:{device_ports:{type:"function",arguments:[{label:"ip",type:"string"}],returns:["string",{type:"list",valueType:"port"},"null"]},devices_lan_ip:{type:"function",returns:[{type:"list",valueType:"string"}]},bssid_name:{type:"function",returns:["string"]},essid_name:{type:"function",returns:["string"]},firewall_rules:{type:"function",returns:[{type:"list",valueType:"string"}]},kernel_version:{type:"function",returns:["string"]},local_ip:{type:"function",returns:["string"]},public_ip:{type:"function",returns:["string"]},used_ports:{type:"function",returns:[{type:"list",valueType:"port"}]},ping_port:{type:"function",arguments:[{label:"port",type:"number"}],returns:["port","null"]},port_info:{type:"function",arguments:[{label:"port",type:"port"}],returns:["string","null"]}}}});var j0=T((bU,QD)=>{QD.exports={type:"service",extends:"map",definitions:{install_service:{type:"function",returnVariations:["Denied. Only root user can install this service.",1],returns:["number","string"]},start_service:{type:"function",returnVariations:["Denied. Only root user can install this service.","<color=yellow>${reason} The chat service can't be accessed.</color>",1],returns:["number","string"]},stop_service:{type:"function",returnVariations:["Denied. Only root user can install this service.",1,0],returns:["number","string"]}}}});var L0=T((vU,JD)=>{JD.exports={type:"shell",extends:"map",definitions:{host_computer:{type:"function",returns:["computer"]},start_terminal:{type:"function",returns:["null"]},build:{type:"function",arguments:[{label:"pathSource",type:"string"},{label:"pathBinary",type:"string"},{label:"allowImport",type:"number",default:{type:"number",value:0}}],returnVariations:["pathSource and programName can't be empty","Invalid shell","Unknown error: Unable to access to local computer","Can't find ${pathSource}","Can't find ${pathBinary}","Can't access to ${pathSource}. Permission denied.","Can't build ${pathSource}. Binary file","Can't create binary in ${pathBinary}. Permission denied.","Can't build ${pathSource}. Invalid extension.","Can't compile. Source code is empty"],returns:["string"]},connect_service:{type:"function",arguments:[{label:"ip",type:"string"},{label:"port",type:"number"},{label:"user",type:"string"},{label:"password",type:"string"},{label:"service",type:"string",default:{type:"string",value:"ssh"}}],returnVariations:["Unknown error: Unable to access to local computer","Direct connections cannot be made outside of this network","!PlayerUtils.ConnectToService","!PlayerUtils.ConnectComputer","!Networking.CheckServiceOnline"],returns:["shell","ftpShell","string","null"]},launch:{type:"function",arguments:[{label:"program",type:"string"},{label:"params",type:"string",default:{type:"string",value:""}}],returnVariations:["Invalid shell","Can't find computer",1,0],returns:["string","number"]},ping:{type:"function",arguments:[{label:"ip",type:"string"}],returnVariations:["ping: invalid ip address",1,0],returns:["string","number"]},scp:{type:"function",arguments:[{label:"file",type:"string"},{label:"folder",type:"string"},{label:"remoteShell",type:"shell"}],returnVariations:["${sourceFile} not found","${destinationFolder} not found","${destinationFolder} it's not a folder","!GreyInterpreter.CheckScpUpload",1],returns:["number","string","null"]}}}});var M0=T((_U,XD)=>{XD.exports={type:"string",definitions:{remove:{type:"function",arguments:[{label:"value",type:"string"}],returns:["string"]},hasIndex:{type:"function",arguments:[{label:"index",type:"number"}],returnVariations:[0,1],returns:["number"]},insert:{type:"function",arguments:[{label:"index",type:"number"},{label:"value",type:"string"}],returns:["string"]},indexOf:{type:"function",arguments:[{label:"value",type:"string"},{label:"offset",type:"number",opt:!0}],returns:["number","null"]},lastIndexOf:{type:"function",arguments:[{label:"searchStr",type:"string"}],returns:["number"]},split:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"list",valueType:"string"},"null"]},replace:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"newValue",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:["string"]},trim:{type:"function",returns:["string"]},indexes:{type:"function",returns:[{type:"list",valueType:"number"}]},code:{type:"function",returns:["number"]},len:{type:"function",returns:["number"]},lower:{type:"function",returns:["string"]},upper:{type:"function",returns:["string"]},val:{type:"function",returns:["number"]},values:{type:"function",returns:[{type:"list",valueType:"string"}]},to_int:{type:"function",returns:["string","number"]},is_match:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returnVariations:[1,0],returns:["number"]},matches:{type:"function",arguments:[{label:"pattern",type:"string"},{label:"regexOptions",type:"string",default:{type:"string",value:"none"}}],returns:[{type:"map",keyType:"number",valueType:"string"}]}}}});var q0=T((wU,ZD)=>{ZD.exports={type:"subWallet",extends:"map",definitions:{get_balance:{type:"function",returnVariations:["get_balance: The account does not exist.","Unknown error: Unable to access to local computer","No internet access."],returns:["number","string"]},set_info:{type:"function",arguments:[{label:"info",type:"string"}],returnVariations:["Error: exceeded maximum of 256 characters","Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.SetInfoSubWallet",1],returns:["number","string"]},get_info:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.","!BlockchainSystem.GetInfoSubWallet"],returns:["string"]},delete:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.",1,0],returns:["string","number"]},get_user:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string"]},last_transaction:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.",0],returns:["list","number","string"]},mining:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.","all existing coins of ${coinName} have been mined.","Only one mining process is allowed.","Error: GPU is damaged. Unable to start the mining process.","Error: GPU returned corrupted data while performing floating point tests. Unable to start the mining process.","Hardware error",1],returns:["number","string"]},check_password:{type:"function",arguments:[{label:"password",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","login_subwallet: the account does not exist.",1,0],returns:["number","string"]},wallet_username:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string"]}}}});var F0=T((xU,ej)=>{ej.exports={type:"wallet",extends:"map",definitions:{list_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials."],returns:[{type:"list",valueType:"string"},"string"]},get_balance:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","Error: wallet does not exist/incorrect credentials.","get_balance: wallet does not have coins in the selected currency"],returns:["number","string","null"]},buy_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.",1],returns:["number","string"]},sell_coin:{type:"function",arguments:[{label:"coinName",type:"string"},{label:"coinAmount",type:"number"},{label:"unitPrice",type:"number"},{label:"subwalletUser",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","sell_coin: coin amount and proposed price cannot be 0.",1],returns:["number","string"]},get_pending_trade:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","list","null"]},cancel_pending_trade:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string","null"]},get_global_offers:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"map",keyType:"string",valueType:"list"},"null"]},list_global_coins:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string",{type:"list",valueType:"string"}]},show_nodes:{type:"function",arguments:[{label:"coinName",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","show_nodes: wallet does not exist","show_nodes: coin does not exist"],returns:["string","number","null"]},reset_password:{type:"function",arguments:[{label:"newPassword",type:"string"}],returnVariations:["Unknown error: Unable to access to local computer","No internet access.","reset_password: only alphanumeric characters are allowed as password","reset_password: name and password cannot exceed the 16 character limit.","!BlockchainSystem.ResetWalletPass",1],returns:["number","string","null"]},get_pin:{type:"function",returnVariations:["Unknown error: Unable to access to local computer","No internet access."],returns:["string"]}}}});var N0=T(ce=>{"use strict";var xe=ce&&ce.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ce,"__esModule",{value:!0});ce.getSiteDescription=ce.getSiteLanguageFile=ce.isNative=ce.greyscriptMeta=void 0;Fk();var tj=Yt(),nj=xe(d0()),rj=xe(p0()),ij=xe(h0()),sj=xe(f0()),oj=xe(m0()),aj=xe(g0()),lj=xe(y0()),cj=xe(b0()),uj=xe(v0()),dj=xe(_0()),pj=xe(w0()),hj=xe(x0()),fj=xe(S0()),mj=xe(k0()),gj=xe(T0()),yj=xe(I0()),bj=xe(E0()),vj=xe(C0()),_j=xe(R0()),wj=xe(P0()),xj=xe(A0()),Sj=xe(O0()),kj=xe(D0()),Tj=xe(j0()),Ij=xe(L0()),Ej=xe(M0()),Cj=xe(q0()),Rj=xe(F0());ce.greyscriptMeta=new tj.Container;ce.greyscriptMeta.addTypeSignatureFromPayload(ij.default);ce.greyscriptMeta.addTypeSignatureFromPayload(sj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(oj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(dj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(aj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(lj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(cj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(uj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(pj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(hj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(fj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(mj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(gj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(yj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(bj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(vj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(_j.default);ce.greyscriptMeta.addTypeSignatureFromPayload(wj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(xj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Sj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(kj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Tj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Ij.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Ej.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Cj.default);ce.greyscriptMeta.addTypeSignatureFromPayload(Rj.default);ce.greyscriptMeta.addMetaFromPayload("en",nj.default);var Pj=function(t,e){return!!ce.greyscriptMeta.getDefinition(t,e)};ce.isNative=Pj;var Aj=function(t){switch(t===void 0&&(t="en"),t){case"en":return rj.default;default:throw new Error('Language "'.concat(t,'" is unknown.'))}};ce.getSiteLanguageFile=Aj;var Oj=function(t,e){var n=(0,ce.getSiteLanguageFile)(e);return n==null?void 0:n[t]};ce.getSiteDescription=Oj});var $0=T(ri=>{"use strict";var Dj=ri&&ri.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),jj=ri&&ri.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Dj(e,t,n)};Object.defineProperty(ri,"__esModule",{value:!0});jj(N0(),ri)});var Vo=T(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.lookupBase=gn.lookupIdentifier=void 0;var Lj=$0(),zn=pe(),Mj=Uo(),qj=t=>{switch(t.type){case zn.ASTType.CallStatement:return(0,gn.lookupIdentifier)(t.expression);case zn.ASTType.CallExpression:return(0,gn.lookupIdentifier)(t.base);case zn.ASTType.Identifier:return t;case zn.ASTType.MemberExpression:return(0,gn.lookupIdentifier)(t.identifier);case zn.ASTType.IndexExpression:return(0,gn.lookupIdentifier)(t.index);default:return null}};gn.lookupIdentifier=qj;var Fj=(t=null)=>{switch(t==null?void 0:t.type){case zn.ASTType.MemberExpression:return t.base;case zn.ASTType.IndexExpression:return t.base;case zn.ASTType.CallExpression:return t.base;case zn.ASTType.SliceExpression:return t.base;default:return null}};gn.lookupBase=Fj;gn.default=new Mj.TypeManager({container:Lj.greyscriptMeta})});var ms=T(ln=>{"use strict";var Nj=ln&&ln.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),$j=ln&&ln.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),U0=ln&&ln.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Nj(e,t,n);return $j(e,t),e};Object.defineProperty(ln,"__esModule",{value:!0});ln.LookupHelper=ln.buildTypeDocument=void 0;var Bj=Yt(),B0=pe(),fs=Uo(),Uj=U0(Yg()),ii=U0(Vo());function Jg(r,i){return V(this,arguments,function*(t,e,n=new Map){let s=t.uri;if(n.has(s))return n.get(s);let o=ii.default.get(s);if(n.set(s,null),!o)return null;let l=[],c=yield e.documentManager.get(t).getImports();yield Promise.all(c.map(u=>V(this,null,function*(){let{document:p,textDocument:d}=u;if(!p)return;let h=yield Jg(d,e,n);h!==null&&l.push(h)})));let a=o.merge(...l);return n.set(s,a),a})}ln.buildTypeDocument=Jg;var Qg=class{constructor(e,n){this.document=e,this.context=n}findAllAssignmentsOfIdentifier(e,n){return ii.default.get(this.document.uri).getScopeContext(n).aggregator.resolveAvailableAssignmentsWithQuery(e)}findAllAssignmentsOfItem(e,n){return ii.default.get(this.document.uri).getScopeContext(n).aggregator.resolveAvailableAssignments(e)}findAllAvailableIdentifierInRoot(){return ii.default.get(this.document.uri).getRootScopeContext().scope.getAllIdentifier()}findAllAvailableIdentifier(e){return ii.default.get(this.document.uri).getScopeContext(e).scope.getAllIdentifier()}findAllAvailableIdentifierRelatedToPosition(e){let n=ii.default.get(this.document.uri),r=new Map,i=n.getScopeContext(e.scope);i.scope.isSelfAvailable()&&r.set("self",{kind:fs.CompletionItemKind.Constant,line:-1}),i.scope.isSuperAvailable()&&r.set("super",{kind:fs.CompletionItemKind.Constant,line:-1});let s=new Map;(0,fs.injectIdentifers)(s,i.scope);let o=Array.from(s.entries()).map(([l,c])=>st({identifier:l},c)).sort((l,c)=>l.line-c.line);for(let l=0;l<o.length;l++){let c=o[l];if(c.line>=e.end.line)break;r.set(c.identifier,{kind:c.kind,line:c.line})}i.scope.locals!==i.scope.globals&&(0,fs.injectIdentifers)(r,i.scope.globals),i.scope.outer&&(0,fs.injectIdentifers)(r,i.scope.outer);for(let l of n.container.getAllIdentifier(Bj.SignatureDefinitionBaseType.General))r.set(...l);return r}lookupAST(e){let n=this,i=this.context.documentManager.get(n.document).document.lines[e.line+1];if(!i)return null;for(let s=0;s<i.length;s++){let o=i[s],l=Uj.findEx((a,u)=>{let p=a.start.line-1,d=a.start.character-1,h=a.end.line-1,m=a.end.character-1;return p>e.line?{exit:!0}:p<h?{valid:e.line>p&&e.line<h||e.line===p&&d<=e.character||e.line===h&&m>=e.character}:{valid:p<=e.line&&d<=e.character&&h>=e.line&&m>=e.character}},o),c=l.pop();if(c)return{closest:c,outer:l}}return null}lookupBasePath(e){return V(this,null,function*(){let n=yield this.buildTypeMap();if(n===null)return null;let r=(0,ii.lookupBase)(e);return r?n.resolveNamespace(r):null})}buildTypeMap(){return V(this,null,function*(){return yield Jg(this.document,this.context)})}lookupTypeInfo(r){return V(this,arguments,function*({closest:e,outer:n}){let i=yield this.buildTypeMap();if(i===null)return null;let s=n.length>0?n[n.length-1]:void 0;return(s==null?void 0:s.type)===B0.ASTType.MemberExpression&&e===s.identifier||(s==null?void 0:s.type)===B0.ASTType.IndexExpression&&e===s.index&&(0,fs.isValidIdentifierLiteral)(e)?i.resolveType(s,!0):i.resolveType(e,!0)})}lookupType(e){let n=this,r=n.lookupAST(e);return r?n.lookupTypeInfo(r):null}};ln.LookupHelper=Qg});var W0=T(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});Bc.AVAILABLE_CONSTANTS=void 0;Bc.AVAILABLE_CONSTANTS=["true","false","null","params","globals","locals","outer"].map(t=>({label:t,kind:21}))});var Uc=T(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.GreyScriptKeyword=void 0;var Wj;(function(t){t.ImportCode="import_code"})(Wj=Ho.GreyScriptKeyword||(Ho.GreyScriptKeyword={}))});var ey=T(Zg=>{"use strict";Object.defineProperty(Zg,"__esModule",{value:!0});var Vj=pe(),V0=Bt(),Hj=Uc(),Xg=class extends V0.LexerValidator{constructor(){super(...arguments),this.isKeyword=Set.prototype.has.bind(new Set([...Object.values(Vj.Keyword),...Object.values(V0.GreybelKeyword),...Object.values(Hj.GreyScriptKeyword)]))}};Zg.default=Xg});var ny=T(zo=>{"use strict";var zj=zo&&zo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zo,"__esModule",{value:!0});var Gj=Bt(),Kj=zj(ey()),ty=class extends Gj.Lexer{constructor(e,n={}){n.validator=n.validator||new Kj.default,super(e,n)}};zo.default=ty});var iy=T(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});Wc.ASTChunkGreyScript=void 0;var Yj=Bt(),ry=class t extends Yj.ASTChunkAdvanced{constructor(e){super(e),this.nativeImports=e.nativeImports||[]}clone(){return new t({nativeImports:this.nativeImports.map(e=>e.clone()),imports:this.imports.map(e=>e.clone()),includes:this.includes.map(e=>e.clone()),literals:this.literals.map(e=>e.clone()),scopes:this.scopes.map(e=>e.clone()),lines:this.lines,start:this.start,end:this.end,scope:this.scope})}};Wc.ASTChunkGreyScript=ry});var sy=T(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.ASTType=void 0;var Qj;(function(t){t.ImportCodeExpression="ImportCodeExpression"})(Qj=Go.ASTType||(Go.ASTType={}))});var ay=T(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.ASTImportCodeExpression=void 0;var Jj=pe(),Xj=sy(),oy=class t extends Jj.ASTBase{constructor(e){super(Xj.ASTType.ImportCodeExpression,e),this.directory=e.directory}toString(){return`ImportCode[${this.start}-${this.end}][${this.directory}]`}clone(){return new t({directory:this.directory,start:this.start,end:this.end,scope:this.scope})}};Vc.ASTImportCodeExpression=oy});var cy=T(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.ASTImportCodeExpression=Mn.ASTChunkGreyScript=Mn.ASTType=Mn.ASTProvider=void 0;var Zj=Bt(),eL=iy(),tL=ay(),ly=class extends Zj.ASTProvider{chunkAdvanced(e){return new eL.ASTChunkGreyScript(e)}importCodeExpression(e){return new tL.ASTImportCodeExpression(e)}};Mn.ASTProvider=ly;var nL=sy();Object.defineProperty(Mn,"ASTType",{enumerable:!0,get:function(){return nL.ASTType}});var rL=iy();Object.defineProperty(Mn,"ASTChunkGreyScript",{enumerable:!0,get:function(){return rL.ASTChunkGreyScript}});var iL=ay();Object.defineProperty(Mn,"ASTImportCodeExpression",{enumerable:!0,get:function(){return iL.ASTImportCodeExpression}})});var H0=T(Ko=>{"use strict";var sL=Ko&&Ko.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ko,"__esModule",{value:!0});var gs=pe(),Ot=Bt(),Hc=Gi(),ys=Ji(),oL=cy(),aL=sL(ny()),lL=Uc(),uy=class extends Ot.Parser{constructor(e,n={}){n.lexer=n.lexer||new aL.default(e,{unsafe:n.unsafe,tabWidth:n.tabWidth}),n.astProvider=n.astProvider||new oL.ASTProvider,super(e,n);let r=this;r.nativeImports=[]}parseStatement(){let e=this;if(e.isType(gs.TokenType.Keyword))switch(e.token.value){case lL.GreyScriptKeyword.ImportCode:e.next();let r=e.parseNativeImportCodeStatement();e.addItemToLines(r),e.backpatches.peek().body.push(r);return;default:break}return super.parseStatement()}parseFunctionDeclaration(e,n=!1,r=!1){let i=this;if(!Ot.Selectors.Function(i.token))return i.parseOr(n,r);i.next();let s=i.previousToken.start,o=i.astProvider.functionStatement({start:s,end:null,scope:i.currentScope,parent:i.outerScopes[i.outerScopes.length-1],assignment:i.currentAssignment}),l=[];if(i.pushScope(o),!Ot.SelectorGroups.BlockEndOfLine(i.token)){for(i.requireToken(Ot.Selectors.LParenthesis,s);!Ot.SelectorGroups.FunctionDeclarationArgEnd(i.token);){let a=i.parseIdentifier(),u=a.start;if(i.consume(Ot.Selectors.Assign)){let p=i.parseExpr(null),d=i.astProvider.assignmentStatement({variable:a,init:p,start:u,end:i.previousToken.end,scope:i.currentScope});i.currentScope.assignments.push(d),l.push(d)}else{let p=i.astProvider.assignmentStatement({variable:a,init:i.astProvider.unknown({start:u,end:i.previousToken.end,scope:i.currentScope}),start:u,end:i.previousToken.end,scope:i.currentScope});i.currentScope.assignments.push(p),l.push(a)}if(Ot.Selectors.RParenthesis(i.token))break;if(i.requireToken(Ot.Selectors.ArgumentSeperator,s),Ot.Selectors.RParenthesis(i.token)){i.raise("expected argument instead received right parenthesis",new ys.Range(i.previousToken.end,i.previousToken.end));break}}i.requireToken(Ot.Selectors.RParenthesis,s)}o.parameters=l;let c=new gs.PendingFunction(o);return i.backpatches.push(c),c.onComplete=a=>{e!==null?(e.end=a.block.end,i.addItemToLines(e)):i.addItemToLines(a.block)},o}parseNativeImportCodeStatement(){var e,n,r,i;let s=this,o=s.previousToken.start;if(!s.consume(Ot.Selectors.LParenthesis))return s.raise("expected import_code to have opening parenthesis",new ys.Range(o,new Hc.Position((e=s.token.lastLine)!==null&&e!==void 0?e:s.token.line,s.token.end.character))),s.parseInvalidCode();let l;if(gs.TokenType.StringLiteral===s.token.type)l=s.token.value,s.next();else return s.raise("expected import_code argument to be string literal",new ys.Range(o,new Hc.Position((n=s.token.lastLine)!==null&&n!==void 0?n:s.token.line,s.token.end.character))),s.parseInvalidCode();if(s.consume(Ot.Selectors.ImportCodeSeperator)){if(!s.isType(gs.TokenType.StringLiteral))return s.raise("expected import_code argument to be string literal",new ys.Range(o,new Hc.Position((r=s.token.lastLine)!==null&&r!==void 0?r:s.token.line,s.token.end.character))),s.parseInvalidCode();l=s.token.value,console.warn("Warning: Second import_code argument is deprecated. Use the first argument for the file system path instead."),s.next()}if(!s.consume(Ot.Selectors.RParenthesis))return s.raise("expected import_code to have closing parenthesis",new ys.Range(o,new Hc.Position((i=s.token.lastLine)!==null&&i!==void 0?i:s.token.line,s.token.end.character))),s.parseInvalidCode();let c=s.astProvider.importCodeExpression({directory:l,start:o,end:s.previousToken.end,scope:s.currentScope});return s.nativeImports.push(c),c}parseChunk(){let e=this;e.next();let n=e.token.start,r=e.astProvider.chunkAdvanced({start:n,end:null}),i=new gs.PendingChunk(r);for(e.backpatches.setDefault(i),e.pushScope(r);!Ot.Selectors.EndOfFile(e.token)&&(e.skipNewlines(),!Ot.Selectors.EndOfFile(e.token));)e.lexer.recordSnapshot(),e.statementErrors=[],e.parseStatement(),e.statementErrors.length>0&&e.tryToRecover();let s=e.backpatches.pop();for(;!(0,gs.isPendingChunk)(s);){let o=e.raise(`found open block ${s.block.type}`,new ys.Range(s.block.start,s.block.start));if(s.complete(e.previousToken),e.errors.push(o),!e.unsafe)throw o;s=e.backpatches.pop()}return e.finishRemaingScopes(),e.popScope(),i.complete(e.token),r.literals=e.literals,r.scopes=e.scopes,r.lines=e.lines,r.nativeImports=e.nativeImports,r.imports=e.imports,r.includes=e.includes,r.injects=e.injects,r}};Ko.default=uy});var Gn=T(Et=>{"use strict";var cL=Et&&Et.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),z0=Et&&Et.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&cL(e,t,n)},dy=Et&&Et.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Et,"__esModule",{value:!0});Et.Parser=Et.LexerValidator=Et.Lexer=void 0;var uL=ny();Object.defineProperty(Et,"Lexer",{enumerable:!0,get:function(){return dy(uL).default}});var dL=ey();Object.defineProperty(Et,"LexerValidator",{enumerable:!0,get:function(){return dy(dL).default}});var pL=H0();Object.defineProperty(Et,"Parser",{enumerable:!0,get:function(){return dy(pL).default}});z0(cy(),Et);z0(Uc(),Et)});var G0=T(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.AVAILABLE_KEYWORDS=void 0;var bs=Bt(),hL=Gn(),Ct=pe();zc.AVAILABLE_KEYWORDS=[Ct.Keyword.If,Ct.Keyword.In,Ct.Keyword.Or,Ct.Keyword.And,Ct.Keyword.Isa,Ct.Keyword.For,Ct.Keyword.New,Ct.Keyword.Not,Ct.Keyword.End,Ct.Keyword.Then,Ct.Keyword.Else,Ct.Keyword.Break,Ct.Keyword.While,Ct.Keyword.Return,Ct.Keyword.Function,Ct.Keyword.Continue,hL.GreyScriptKeyword.ImportCode,bs.GreybelKeyword.Envar,bs.GreybelKeyword.Import,bs.GreybelKeyword.Include,bs.GreybelKeyword.Debugger,bs.GreybelKeyword.Line,bs.GreybelKeyword.File].map(t=>({label:t,kind:14}))});var K0=T(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.AVAILABLE_OPERATORS=void 0;var Yo=ps(),mt=pe();Gc.AVAILABLE_OPERATORS=[mt.Operator.Plus,mt.Operator.Asterik,mt.Operator.Minus,mt.Operator.Slash,mt.Operator.Power,mt.Operator.Modulo,mt.Operator.LessThan,mt.Operator.GreaterThan,mt.Operator.LessThanOrEqual,mt.Operator.GreaterThanOrEqual,mt.Operator.NotEqual,mt.Operator.Equal,mt.Operator.AddShorthand,mt.Operator.SubtractShorthand,mt.Operator.MultiplyShorthand,mt.Operator.DivideShorthand,Yo.Operator.BitwiseAnd,Yo.Operator.BitwiseOr,Yo.Operator.LeftShift,Yo.Operator.RightShift,Yo.Operator.UnsignedRightShift,mt.Operator.Assign,mt.Operator.Reference].map(t=>({label:t,kind:24}))});var J0=T(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.activate=ut.getDefaultCompletionList=ut.getPropertyCompletionList=ut.transformToCompletionItems=void 0;var Y0=pe(),fL=Gg(),Q0=ms(),mL=W0(),gL=G0(),yL=K0(),bL=t=>{let e=[];for(let[n,r]of t)e.push({label:n,kind:(0,fL.getCompletionItemKind)(r.kind)});return e};ut.transformToCompletionItems=bL;var vL=(t,e)=>V(ut,null,function*(){let n=yield t.lookupBasePath(e);return n===null?[]:(0,ut.transformToCompletionItems)(n.getAllIdentifier())});ut.getPropertyCompletionList=vL;var _L=()=>[...gL.AVAILABLE_KEYWORDS,...yL.AVAILABLE_OPERATORS,...mL.AVAILABLE_CONSTANTS];ut.getDefaultCompletionList=_L;function wL(t){t.connection.onCompletion(e=>V(this,null,function*(){if(!t.getConfiguration().autocomplete)return;let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;let r=yield t.documentManager.getLatest(n),i=new Q0.LookupHelper(r.textDocument,t),s=i.lookupAST(e.position),o=[],l=!1;if(s){let{closest:u}=s;u instanceof Y0.ASTMemberExpression?(o.push(...yield(0,ut.getPropertyCompletionList)(i,u)),l=!0):u instanceof Y0.ASTIndexExpression?(o.push(...yield(0,ut.getPropertyCompletionList)(i,u)),l=!0):o.push(...(0,ut.getDefaultCompletionList)())}else o.push(...(0,ut.getDefaultCompletionList)()),o.push(...(0,ut.transformToCompletionItems)(i.findAllAvailableIdentifierInRoot()));if(!s||l)return o;let c=new Set([...o.map(u=>u.label)]),a=yield r.getImports();for(let u of a){let{document:p}=u;if(!p)continue;let d=new Q0.LookupHelper(u.textDocument,t);o.push(...(0,ut.transformToCompletionItems)(d.findAllAvailableIdentifier(p)).filter(h=>!c.has(h.label)).map(h=>(c.add(h.label),h)))}return o.push(...(0,ut.transformToCompletionItems)(i.findAllAvailableIdentifierRelatedToPosition(s.closest)).filter(u=>!c.has(u.label))),o})),t.connection.onCompletionResolve(e=>e)}ut.activate=wL});var Z0=T((UU,X0)=>{"use strict";X0.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var py=T((WU,tT)=>{var Qo=Z0(),eT={};for(let t of Object.keys(Qo))eT[Qo[t]]=t;var z={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};tT.exports=z;for(let t of Object.keys(z)){if(!("channels"in z[t]))throw new Error("missing channels property: "+t);if(!("labels"in z[t]))throw new Error("missing channel labels property: "+t);if(z[t].labels.length!==z[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:n}=z[t];delete z[t].channels,delete z[t].labels,Object.defineProperty(z[t],"channels",{value:e}),Object.defineProperty(z[t],"labels",{value:n})}z.rgb.hsl=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=s-i,l,c;s===i?l=0:e===s?l=(n-r)/o:n===s?l=2+(r-e)/o:r===s&&(l=4+(e-n)/o),l=Math.min(l*60,360),l<0&&(l+=360);let a=(i+s)/2;return s===i?c=0:a<=.5?c=o/(s+i):c=o/(2-s-i),[l,c*100,a*100]};z.rgb.hsv=function(t){let e,n,r,i,s,o=t[0]/255,l=t[1]/255,c=t[2]/255,a=Math.max(o,l,c),u=a-Math.min(o,l,c),p=function(d){return(a-d)/6/u+1/2};return u===0?(i=0,s=0):(s=u/a,e=p(o),n=p(l),r=p(c),o===a?i=r-n:l===a?i=1/3+e-r:c===a&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,a*100]};z.rgb.hwb=function(t){let e=t[0],n=t[1],r=t[2],i=z.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[i,s*100,r*100]};z.rgb.cmyk=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(1-e,1-n,1-r),s=(1-e-i)/(1-i)||0,o=(1-n-i)/(1-i)||0,l=(1-r-i)/(1-i)||0;return[s*100,o*100,l*100,i*100]};function xL(t,e){return it(t[0]-e[0],2)+it(t[1]-e[1],2)+it(t[2]-e[2],2)}z.rgb.keyword=function(t){let e=eT[t];if(e)return e;let n=1/0,r;for(let i of Object.keys(Qo)){let s=Qo[i],o=xL(t,s);o<n&&(n=o,r=i)}return r};z.keyword.rgb=function(t){return Qo[t]};z.rgb.xyz=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255;e=e>.04045?it((e+.055)/1.055,2.4):e/12.92,n=n>.04045?it((n+.055)/1.055,2.4):n/12.92,r=r>.04045?it((r+.055)/1.055,2.4):r/12.92;let i=e*.4124+n*.3576+r*.1805,s=e*.2126+n*.7152+r*.0722,o=e*.0193+n*.1192+r*.9505;return[i*100,s*100,o*100]};z.rgb.lab=function(t){let e=z.rgb.xyz(t),n=e[0],r=e[1],i=e[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?it(n,1/3):7.787*n+16/116,r=r>.008856?it(r,1/3):7.787*r+16/116,i=i>.008856?it(i,1/3):7.787*i+16/116;let s=116*r-16,o=500*(n-r),l=200*(r-i);return[s,o,l]};z.hsl.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i,s,o;if(n===0)return o=r*255,[o,o,o];r<.5?i=r*(1+n):i=r+n-r*n;let l=2*r-i,c=[0,0,0];for(let a=0;a<3;a++)s=e+1/3*-(a-1),s<0&&s++,s>1&&s--,6*s<1?o=l+(i-l)*6*s:2*s<1?o=i:3*s<2?o=l+(i-l)*(2/3-s)*6:o=l,c[a]=o*255;return c};z.hsl.hsv=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,i=n,s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=s<=1?s:2-s;let o=(r+n)/2,l=r===0?2*i/(s+i):2*n/(r+n);return[e,l*100,o*100]};z.hsv.rgb=function(t){let e=t[0]/60,n=t[1]/100,r=t[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*r*(1-n),l=255*r*(1-n*s),c=255*r*(1-n*(1-s));switch(r*=255,i){case 0:return[r,c,o];case 1:return[l,r,o];case 2:return[o,r,c];case 3:return[o,l,r];case 4:return[c,o,r];case 5:return[r,o,l]}};z.hsv.hsl=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,i=Math.max(r,.01),s,o;o=(2-n)*r;let l=(2-n)*i;return s=n*i,s/=l<=1?l:2-l,s=s||0,o/=2,[e,s*100,o*100]};z.hwb.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=n+r,s;i>1&&(n/=i,r/=i);let o=Math.floor(6*e),l=1-r;s=6*e-o,o&1&&(s=1-s);let c=n+s*(l-n),a,u,p;switch(o){default:case 6:case 0:a=l,u=c,p=n;break;case 1:a=c,u=l,p=n;break;case 2:a=n,u=l,p=c;break;case 3:a=n,u=c,p=l;break;case 4:a=c,u=n,p=l;break;case 5:a=l,u=n,p=c;break}return[a*255,u*255,p*255]};z.cmyk.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100,s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),l=1-Math.min(1,r*(1-i)+i);return[s*255,o*255,l*255]};z.xyz.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,i,s,o;return i=e*3.2406+n*-1.5372+r*-.4986,s=e*-.9689+n*1.8758+r*.0415,o=e*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*it(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*it(s,1/2.4)-.055:s*12.92,o=o>.0031308?1.055*it(o,1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};z.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];e/=95.047,n/=100,r/=108.883,e=e>.008856?it(e,1/3):7.787*e+16/116,n=n>.008856?it(n,1/3):7.787*n+16/116,r=r>.008856?it(r,1/3):7.787*r+16/116;let i=116*n-16,s=500*(e-n),o=200*(n-r);return[i,s,o]};z.lab.xyz=function(t){let e=t[0],n=t[1],r=t[2],i,s,o;s=(e+16)/116,i=n/500+s,o=s-r/200;let l=it(s,3),c=it(i,3),a=it(o,3);return s=l>.008856?l:(s-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=a>.008856?a:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};z.lab.lch=function(t){let e=t[0],n=t[1],r=t[2],i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);let o=Math.sqrt(n*n+r*r);return[e,o,i]};z.lch.lab=function(t){let e=t[0],n=t[1],i=t[2]/360*2*Math.PI,s=n*Math.cos(i),o=n*Math.sin(i);return[e,s,o]};z.rgb.ansi16=function(t,e=null){let[n,r,i]=t,s=e===null?z.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return s===2&&(o+=60),o};z.hsv.ansi16=function(t){return z.rgb.ansi16(z.hsv.rgb(t),t[2])};z.rgb.ansi256=function(t){let e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};z.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let n=(~~(t>50)+1)*.5,r=(e&1)*n*255,i=(e>>1&1)*n*255,s=(e>>2&1)*n*255;return[r,i,s]};z.ansi256.rgb=function(t){if(t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,n=Math.floor(t/36)/5*255,r=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[n,r,i]};z.rgb.hex=function(t){let n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};z.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let n=e[0];e[0].length===3&&(n=n.split("").map(l=>l+l).join(""));let r=parseInt(n,16),i=r>>16&255,s=r>>8&255,o=r&255;return[i,s,o]};z.rgb.hcg=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.max(Math.max(e,n),r),s=Math.min(Math.min(e,n),r),o=i-s,l,c;return o<1?l=s/(1-o):l=0,o<=0?c=0:i===e?c=(n-r)/o%6:i===n?c=2+(r-e)/o:c=4+(e-n)/o,c/=6,c%=1,[c*360,o*100,l*100]};z.hsl.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[t[0],r*100,i*100]};z.hsv.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=e*n,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],r*100,i*100]};z.hcg.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];let i=[0,0,0],s=e%1*6,o=s%1,l=1-o,c=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=l,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=l,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=l}return c=(1-n)*r,[(n*i[0]+c)*255,(n*i[1]+c)*255,(n*i[2]+c)*255]};z.hcg.hsv=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e),i=0;return r>0&&(i=e/r),[t[0],i*100,r*100]};z.hcg.hsl=function(t){let e=t[1]/100,r=t[2]/100*(1-e)+.5*e,i=0;return r>0&&r<.5?i=e/(2*r):r>=.5&&r<1&&(i=e/(2*(1-r))),[t[0],i*100,r*100]};z.hcg.hwb=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]};z.hwb.hcg=function(t){let e=t[1]/100,r=1-t[2]/100,i=r-e,s=0;return i<1&&(s=(r-i)/(1-i)),[t[0],i*100,s*100]};z.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};z.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};z.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};z.gray.hsl=function(t){return[0,0,t[0]]};z.gray.hsv=z.gray.hsl;z.gray.hwb=function(t){return[0,100,t[0]]};z.gray.cmyk=function(t){return[0,0,0,t[0]]};z.gray.lab=function(t){return[t[0],0,0]};z.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(r.length)+r};z.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var rT=T((HU,nT)=>{var Kc=py();function SL(){let t={},e=Object.keys(Kc);for(let n=e.length,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}function kL(t){let e=SL(),n=[t];for(e[t].distance=0;n.length;){let r=n.pop(),i=Object.keys(Kc[r]);for(let s=i.length,o=0;o<s;o++){let l=i[o],c=e[l];c.distance===-1&&(c.distance=e[r].distance+1,c.parent=r,n.unshift(l))}}return e}function TL(t,e){return function(n){return e(t(n))}}function IL(t,e){let n=[e[t].parent,t],r=Kc[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),r=TL(Kc[e[i].parent][i],r),i=e[i].parent;return r.conversion=n,r}nT.exports=function(t){let e=kL(t),n={},r=Object.keys(e);for(let i=r.length,s=0;s<i;s++){let o=r[s];e[o].parent!==null&&(n[o]=IL(o,e))}return n}});var sT=T((zU,iT)=>{var hy=py(),EL=rT(),vs={},CL=Object.keys(hy);function RL(t){let e=function(...n){let r=n[0];return r==null?r:(r.length>1&&(n=r),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function PL(t){let e=function(...n){let r=n[0];if(r==null)return r;r.length>1&&(n=r);let i=t(n);if(typeof i=="object")for(let s=i.length,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}CL.forEach(t=>{vs[t]={},Object.defineProperty(vs[t],"channels",{value:hy[t].channels}),Object.defineProperty(vs[t],"labels",{value:hy[t].labels});let e=EL(t);Object.keys(e).forEach(r=>{let i=e[r];vs[t][r]=PL(i),vs[t][r].raw=RL(i)})});iT.exports=vs});var aT=T(_s=>{"use strict";var AL=_s&&_s.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_s,"__esModule",{value:!0});_s.activate=void 0;var fy=AL(sT()),OL=pe(),oT;(function(t){t.Black="black",t.Blue="blue",t.Green="green",t.Orange="orange",t.Purple="purple",t.Red="red",t.White="white",t.Yellow="yellow"})(oT||(oT={}));var my={black:"#000000",blue:"#0000FF",green:"#00FF00",orange:"#FF8800",purple:"#CC8899",red:"#FF0000",white:"#FFFFFF",yellow:"#FFFF00"},DL=()=>new RegExp(`(?:mark|color)=(${Object.keys(my).join("|")}|(?:#[0-9a-f]{6}|#[0-9a-f]{3}))`,"ig"),jL=Object.prototype.hasOwnProperty;function LL(t){t.connection.onColorPresentation(e=>[{label:`#${fy.default.rgb.hex(e.color.red*255,e.color.green*255,e.color.blue*255)}`}]),t.connection.onDocumentColor(e=>V(this,null,function*(){let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;let s=(yield t.documentManager.getLatest(n)).document.literals.filter(c=>c.type===OL.ASTType.StringLiteral),o=[],l=({match:c,markup:a,value:u,astPosition:p,lineIndex:d})=>{let h=c.index+a.indexOf("=")+1,m=h+u.length,f=p.line-1+d,g=h,b=m;return d===0&&(g+=p.character,b+=p.character),{start:{line:f,character:g},end:{line:f,character:b}}};for(let c=0;c<s.length;c++){let a=s[c];if(!a.start)continue;let u=a.start,p=a.value.toString().split(`
107
107
  `);for(let d=0;d<p.length;d++){let h=p[d],m=DL(),f;for(;f=m.exec(h);){let[g,b]=f,v=l({match:f,markup:g,value:b,astPosition:u,lineIndex:d});if(b.startsWith("#")){let[_,w,S]=fy.default.hex.rgb(b.slice(1));o.push({range:v,color:{red:_/255,green:w/255,blue:S/255,alpha:1}})}else if(jL.call(my,b)){let[_,w,S]=fy.default.hex.rgb(my[b].slice(1));o.push({range:v,color:{red:_/255,green:w/255,blue:S/255,alpha:1}})}else o.push({range:v,color:{red:0,green:0,blue:0,alpha:1}})}}}return o}))}_s.activate=LL});var uT=T(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.activate=void 0;var ML=pe(),lT=ms(),cT=(t,e,n)=>{let r=t.findAllAssignmentsOfItem(e,n),i=[];for(let s of r){if(!s.start||!s.end)continue;let o={line:s.start.line-1,character:s.start.character-1},l={line:s.end.line-1,character:s.end.character-1},c={targetUri:t.document.uri,targetRange:{start:o,end:l},targetSelectionRange:{start:o,end:l}};i.push(c)}return i};function qL(t){t.connection.onDefinition(e=>V(this,null,function*(){let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;let r=new lT.LookupHelper(n,t),i=r.lookupAST(e.position);if(!i)return;let{outer:s,closest:o}=i,l=s.length>0?s[s.length-1]:void 0,c=o;l&&l instanceof ML.ASTMemberExpression&&l.identifier===o&&(c=l);let a=cT(r,c,c.scope),u=yield t.documentManager.get(n).getImports();for(let p of u){let{document:d,textDocument:h}=p;if(!d)continue;let m=new lT.LookupHelper(h,t),f=cT(m,c,d);a.push(...f)}return a}))}Yc.activate=qL});var dT=T(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.activate=void 0;function FL(t,e){return V(this,null,function*(){let n=yield e.documentManager.getLatest(t);return n.errors.map(r=>{if(r!=null&&r.range){let i=r.range;return{range:{start:{line:i.start.line-1,character:i.start.character-1},end:{line:i.end.line-1,character:i.end.character-1}},message:r.message,severity:1}}return{range:{start:n.document.start,end:n.document.end},message:r.message,severity:1}})})}function NL(t){t.connection.languages.diagnostics.on(e=>V(this,null,function*(){if(!t.getConfiguration().diagnostic)return;let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;let r=yield FL(n,t);return r.length===0?{kind:"full",items:[]}:{kind:"full",items:r}}))}Qc.activate=NL});function $L(){if(pT)return gy;pT=!0;var t=gy={},e,n;function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?e=setTimeout:e=r}catch(f){e=r}try{typeof clearTimeout=="function"?n=clearTimeout:n=i}catch(f){n=i}})();function s(f){if(e===setTimeout)return setTimeout(f,0);if((e===r||!e)&&setTimeout)return e=setTimeout,setTimeout(f,0);try{return e(f,0)}catch(g){try{return e.call(null,f,0)}catch(b){return e.call(this||ws,f,0)}}}function o(f){if(n===clearTimeout)return clearTimeout(f);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(f);try{return n(f)}catch(g){try{return n.call(null,f)}catch(b){return n.call(this||ws,f)}}}var l=[],c=!1,a,u=-1;function p(){!c||!a||(c=!1,a.length?l=a.concat(l):u=-1,l.length&&d())}function d(){if(!c){var f=s(p);c=!0;for(var g=l.length;g;){for(a=l,l=[];++u<g;)a&&a[u].run();u=-1,g=l.length}a=null,c=!1,o(f)}}t.nextTick=function(f){var g=new Array(arguments.length-1);if(arguments.length>1)for(var b=1;b<arguments.length;b++)g[b-1]=arguments[b];l.push(new h(f,g)),l.length===1&&!c&&s(d)};function h(f,g){(this||ws).fun=f,(this||ws).array=g}h.prototype.run=function(){(this||ws).fun.apply(null,(this||ws).array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={};function m(){}return t.on=m,t.addListener=m,t.once=m,t.off=m,t.removeListener=m,t.removeAllListeners=m,t.emit=m,t.prependListener=m,t.prependOnceListener=m,t.listeners=function(f){return[]},t.binding=function(f){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(f){throw new Error("process.chdir is not supported")},t.umask=function(){return 0},gy}var gy,pT,ws,Ne,yy=er(()=>{gy={},pT=!1,ws=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:global;Ne=$L();Ne.platform="browser";Ne.addListener;Ne.argv;Ne.binding;Ne.browser;Ne.chdir;Ne.cwd;Ne.emit;Ne.env;Ne.listeners;Ne.nextTick;Ne.off;Ne.on;Ne.once;Ne.prependListener;Ne.prependOnceListener;Ne.removeAllListeners;Ne.removeListener;Ne.title;Ne.umask;Ne.version;Ne.versions});function BL(){if(hT)return by;hT=!0;var t=Ne;function e(s){if(typeof s!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(s))}function n(s,o){for(var l="",c=0,a=-1,u=0,p,d=0;d<=s.length;++d){if(d<s.length)p=s.charCodeAt(d);else{if(p===47)break;p=47}if(p===47){if(!(a===d-1||u===1))if(a!==d-1&&u===2){if(l.length<2||c!==2||l.charCodeAt(l.length-1)!==46||l.charCodeAt(l.length-2)!==46){if(l.length>2){var h=l.lastIndexOf("/");if(h!==l.length-1){h===-1?(l="",c=0):(l=l.slice(0,h),c=l.length-1-l.lastIndexOf("/")),a=d,u=0;continue}}else if(l.length===2||l.length===1){l="",c=0,a=d,u=0;continue}}o&&(l.length>0?l+="/..":l="..",c=2)}else l.length>0?l+="/"+s.slice(a+1,d):l=s.slice(a+1,d),c=d-a-1;a=d,u=0}else p===46&&u!==-1?++u:u=-1}return l}function r(s,o){var l=o.dir||o.root,c=o.base||(o.name||"")+(o.ext||"");return l?l===o.root?l+c:l+s+c:c}var i={resolve:function(){for(var o="",l=!1,c,a=arguments.length-1;a>=-1&&!l;a--){var u;a>=0?u=arguments[a]:(c===void 0&&(c=t.cwd()),u=c),e(u),u.length!==0&&(o=u+"/"+o,l=u.charCodeAt(0)===47)}return o=n(o,!l),l?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(o){if(e(o),o.length===0)return".";var l=o.charCodeAt(0)===47,c=o.charCodeAt(o.length-1)===47;return o=n(o,!l),o.length===0&&!l&&(o="."),o.length>0&&c&&(o+="/"),l?"/"+o:o},isAbsolute:function(o){return e(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,l=0;l<arguments.length;++l){var c=arguments[l];e(c),c.length>0&&(o===void 0?o=c:o+="/"+c)}return o===void 0?".":i.normalize(o)},relative:function(o,l){if(e(o),e(l),o===l||(o=i.resolve(o),l=i.resolve(l),o===l))return"";for(var c=1;c<o.length&&o.charCodeAt(c)===47;++c);for(var a=o.length,u=a-c,p=1;p<l.length&&l.charCodeAt(p)===47;++p);for(var d=l.length,h=d-p,m=u<h?u:h,f=-1,g=0;g<=m;++g){if(g===m){if(h>m){if(l.charCodeAt(p+g)===47)return l.slice(p+g+1);if(g===0)return l.slice(p+g)}else u>m&&(o.charCodeAt(c+g)===47?f=g:g===0&&(f=0));break}var b=o.charCodeAt(c+g),v=l.charCodeAt(p+g);if(b!==v)break;b===47&&(f=g)}var _="";for(g=c+f+1;g<=a;++g)(g===a||o.charCodeAt(g)===47)&&(_.length===0?_+="..":_+="/..");return _.length>0?_+l.slice(p+f):(p+=f,l.charCodeAt(p)===47&&++p,l.slice(p))},_makeLong:function(o){return o},dirname:function(o){if(e(o),o.length===0)return".";for(var l=o.charCodeAt(0),c=l===47,a=-1,u=!0,p=o.length-1;p>=1;--p)if(l=o.charCodeAt(p),l===47){if(!u){a=p;break}}else u=!1;return a===-1?c?"/":".":c&&a===1?"//":o.slice(0,a)},basename:function(o,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');e(o);var c=0,a=-1,u=!0,p;if(l!==void 0&&l.length>0&&l.length<=o.length){if(l.length===o.length&&l===o)return"";var d=l.length-1,h=-1;for(p=o.length-1;p>=0;--p){var m=o.charCodeAt(p);if(m===47){if(!u){c=p+1;break}}else h===-1&&(u=!1,h=p+1),d>=0&&(m===l.charCodeAt(d)?--d===-1&&(a=p):(d=-1,a=h))}return c===a?a=h:a===-1&&(a=o.length),o.slice(c,a)}else{for(p=o.length-1;p>=0;--p)if(o.charCodeAt(p)===47){if(!u){c=p+1;break}}else a===-1&&(u=!1,a=p+1);return a===-1?"":o.slice(c,a)}},extname:function(o){e(o);for(var l=-1,c=0,a=-1,u=!0,p=0,d=o.length-1;d>=0;--d){var h=o.charCodeAt(d);if(h===47){if(!u){c=d+1;break}continue}a===-1&&(u=!1,a=d+1),h===46?l===-1?l=d:p!==1&&(p=1):l!==-1&&(p=-1)}return l===-1||a===-1||p===0||p===1&&l===a-1&&l===c+1?"":o.slice(l,a)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return r("/",o)},parse:function(o){e(o);var l={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return l;var c=o.charCodeAt(0),a=c===47,u;a?(l.root="/",u=1):u=0;for(var p=-1,d=0,h=-1,m=!0,f=o.length-1,g=0;f>=u;--f){if(c=o.charCodeAt(f),c===47){if(!m){d=f+1;break}continue}h===-1&&(m=!1,h=f+1),c===46?p===-1?p=f:g!==1&&(g=1):p!==-1&&(g=-1)}return p===-1||h===-1||g===0||g===1&&p===h-1&&p===d+1?h!==-1&&(d===0&&a?l.base=l.name=o.slice(1,h):l.base=l.name=o.slice(d,h)):(d===0&&a?(l.name=o.slice(1,p),l.base=o.slice(1,h)):(l.name=o.slice(d,p),l.base=o.slice(d,h)),l.ext=o.slice(p,h)),d>0?l.dir=o.slice(0,d-1):a&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};return i.posix=i,by=i,by}var by,hT,gt,vy=er(()=>{yy();by={},hT=!1;gt=BL()});var Kn={};Ls(Kn,{_makeLong:()=>UL,basename:()=>WL,default:()=>gt,delimiter:()=>VL,dirname:()=>HL,extname:()=>zL,format:()=>GL,isAbsolute:()=>KL,join:()=>YL,normalize:()=>QL,parse:()=>JL,posix:()=>XL,relative:()=>ZL,resolve:()=>eM,sep:()=>tM,win32:()=>nM});var UL,WL,VL,HL,zL,GL,KL,YL,QL,JL,XL,ZL,eM,tM,nM,Yn=er(()=>{vy();vy();yy();UL=gt._makeLong,WL=gt.basename,VL=gt.delimiter,HL=gt.dirname,zL=gt.extname,GL=gt.format,KL=gt.isAbsolute,YL=gt.join,QL=gt.normalize,JL=gt.parse,XL=gt.posix,ZL=gt.relative,eM=gt.resolve,tM=gt.sep,nM=gt.win32});var fT=T(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.getStringHashCode=void 0;Jc.getStringHashCode=function(){let t=new Map,e=n=>{let r,i;for(r=0,i=0;r<n.length;r++)i=Math.imul(31,i)+n.charCodeAt(r)|0;return i};return n=>{if(n.length===0)return 0;let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),i}}()});var _y=T(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.createExpressionHash=void 0;var Xc=pe(),mT=fT(),Zc=(t,e)=>t.$$hash=e,rM=t=>{var e;return(e=t.$$hash)!==null&&e!==void 0?e:null};function xs(t){let e=rM(t);if(e!==null)return e;let n=(0,mT.getStringHashCode)(t.type);switch(t.type){case Xc.ASTType.ParenthesisExpression:return xs(t.expression);case Xc.ASTType.MemberExpression:{let r=t;return n^=xs(r.base),n^=xs(r.identifier),Zc(t,n)}case Xc.ASTType.IndexExpression:{let r=t;return n^=xs(r.base),n^=xs(r.index),Zc(t,n)}case Xc.ASTType.Identifier:{let r=t;return n^=(0,mT.getStringHashCode)(r.name),Zc(t,n)}}return Zc(t,n)}function iM(t){return xs(t)}eu.createExpressionHash=iM});var tu=T(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.hasEmptyBody=dt.containsMultilineItemInShortcutClauses=dt.getLastComment=dt.unwrap=dt.transformBitOperation=dt.countRightBinaryExpressions=dt.SHORTHAND_OPERATORS=void 0;var Ut=pe();dt.SHORTHAND_OPERATORS=[Ut.Operator.Plus,Ut.Operator.Minus,Ut.Operator.Asterik,Ut.Operator.Slash,Ut.Operator.Modulo,Ut.Operator.Power];var sM=t=>{if(t=(0,dt.unwrap)(t),t instanceof Ut.ASTComparisonGroupExpression)return t.expressions.length;let e=[t],n=0;for(;e.length>0;){let r=e.pop();r instanceof Ut.ASTBinaryExpression&&n++,(r instanceof Ut.ASTBinaryExpression||r instanceof Ut.ASTLogicalExpression||r instanceof Ut.ASTIsaExpression)&&(e.push((0,dt.unwrap)(r.left)),e.push((0,dt.unwrap)(r.right)))}return n};dt.countRightBinaryExpressions=sM;var oM=(t,e,n,r)=>{if(r==="|")return"bitOr("+[e,n].join(", ")+")";if(r==="&")return"bitAnd("+[e,n].join(", ")+")";if(r==="<<"||r===">>"||r===">>>")throw new Error("Operators in binary expression are not supported");return t};dt.transformBitOperation=oM;var aM=t=>{for(;t instanceof Ut.ASTParenthesisExpression;)t=t.expression;return t};dt.unwrap=aM;var lM=t=>{for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.type===Ut.ASTType.Comment)return n}return null};dt.getLastComment=lM;var cM=(t,e)=>e.some(n=>t.line<n.body[0].end.line);dt.containsMultilineItemInShortcutClauses=cM;var uM=t=>!t.some(e=>!(e instanceof Ut.ASTComment));dt.hasEmptyBody=uM});var xy=T(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.BeautifyContext=oi.IndentationType=void 0;var si=pe(),dM=tu(),gT;(function(t){t[t.Tab=0]="Tab",t[t.Whitespace=1]="Whitespace"})(gT=oi.IndentationType||(oi.IndentationType={}));var wy=class{get indent(){return this._indent}get isMultilineAllowed(){return this._isMultilineAllowed}constructor(e,n){this.transformer=e,this.options=n,this._indent=0,this._isMultilineAllowed=!0,this.chunks=[],this.usedComments=new Set,this.putIndent=n.indentation===gT.Tab?(r,i=0)=>`${" ".repeat(this._indent+i)}${r}`:(r,i=0)=>`${" ".repeat(n.indentationSpaces).repeat(this._indent+i)}${r}`}pushLines(e){this.chunks.push(e)}popLines(){return this.chunks.pop()}getLines(){return this.chunks[this.chunks.length-1]}useComment(e,n=" "){let r=this.getLines()[e.line];if(r==null)return"";let i=(0,dM.getLastComment)(r);return i!=null&&!this.usedComments.has(i)?(this.usedComments.add(i),n+this.transformer.make(i)):""}appendComment(e,n){return n+this.useComment(e)}disableMultiline(){this._isMultilineAllowed=!1}enableMultiline(){this._isMultilineAllowed=!0}incIndent(){this._indent++}decIndent(){this._indent--}getBlockOpenerEndLine(e){return e instanceof si.ASTIfClause||e instanceof si.ASTWhileStatement?e.condition.end.line:e instanceof si.ASTForGenericStatement?e.iterator.end.line:e.start.line}getPreviousEndLine(e){if(e==null)return 0;if(e.type===si.ASTType.IfShortcutStatement){let n=e;return n.clauses[n.clauses.length-1].body[0].end.line}return e.end.line}buildBlock(e){var n;if(e.body.length===0)return[];let r=[...e.body].sort((c,a)=>c.start.line-a.start.line),i=[],s=null;for(let c=0;c<r.length;c++){let a=r[c],u=(n=r[c+1])!==null&&n!==void 0?n:null;if(a.type!==si.ASTType.Comment&&(s==null?void 0:s.end.line)===a.start.line){let d=this.transformer.make(a,{isCommand:!0});i.push(this.putIndent(this.appendComment(a.end,d))),s=a;continue}if(this.usedComments.has(a)){a.isMultiline&&(s=a);continue}if(a.type===si.ASTType.Comment&&a.start.line===(u==null?void 0:u.start.line))continue;let p=Math.max(s?a.start.line-this.getPreviousEndLine(s)-1:a.start.line-this.getBlockOpenerEndLine(e)-1,0);if(p>0&&i.push(...new Array(p).fill("")),a instanceof si.ASTComment){this.usedComments.add(a);let d=this.transformer.make(a,{isCommand:!0});i.push(this.putIndent(d))}else{let d=this.transformer.make(a,{isCommand:!0});i.push(this.putIndent(this.appendComment(a.end,d)))}s=a}let o=e.body[e.body.length-1],l=Math.max(e.end.line-this.getPreviousEndLine(o)-1,0);return l>0&&i.push(...new Array(l).fill("")),i}};oi.BeautifyContext=wy});var Sy=T(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.beautifyFactory=void 0;var Jo=pe(),pM=(Yn(),Qe(Kn)),yT=_y(),bT=xy(),Dt=tu(),hM=t=>{let{keepParentheses:e=!1,indentation:n=bT.IndentationType.Tab,indentationSpaces:r=2,isDevMode:i=!1}=t.buildOptions,s=new bT.BeautifyContext(t,{keepParentheses:e,indentation:n,indentationSpaces:r,isDevMode:i});return{ParenthesisExpression:(o,l)=>"("+t.make(o.expression,{hasLogicalIndentActive:l.hasLogicalIndentActive})+")",Comment:(o,l)=>o.isMultiline?i?`/*${o.value}*/`:o.value.split(`
108
108
  `).map(c=>`//${c}`).join(`
109
109
  `):"// "+o.value.trimStart(),AssignmentStatement:(o,l)=>{let c=o.variable,a=o.init,u=t.make(c);if((c instanceof Jo.ASTIdentifier||c instanceof Jo.ASTMemberExpression)&&a instanceof Jo.ASTBinaryExpression&&(a.left instanceof Jo.ASTIdentifier||a.left instanceof Jo.ASTMemberExpression)&&Dt.SHORTHAND_OPERATORS.includes(a.operator)&&(0,yT.createExpressionHash)(c)===(0,yT.createExpressionHash)(a.left)){let d=t.make((0,Dt.unwrap)(a.right));return u+" "+a.operator+"= "+d}let p=t.make(a);return u+" = "+p},MemberExpression:(o,l)=>{let c=t.make(o.identifier);return[t.make(o.base),c].join(o.indexer)},FunctionDeclaration:(o,l)=>{s.disableMultiline();let c=o.parameters.map(d=>t.make(d));s.enableMultiline();let a=s.appendComment(o.start,c.length===0?"function":"function("+c.join(", ")+")"),u=s.putIndent("end function");if((0,Dt.hasEmptyBody)(o.body))return a+`
@@ -319,4 +319,4 @@ end if`},IfClause:(n,r)=>{let i=t.make(n.condition),s=[],o;for(o of n.body){let
319
319
  `),t.appendCodeblock(XT.LanguageId,n.join(`
320
320
  `)))};et.appendTooltipBody=mF;var gF=t=>{var n;let e=[];for(let r of t.signatureDefinitions){let i=r,o={label:(0,et.createTooltipHeader)(t,i)},l=(n=i.getArguments())!=null?n:[],c=new ZT.MarkdownString("");(0,et.appendTooltipBody)(c,i),o.parameters=l.map(a=>({label:`${a.getLabel()}${a.isOptional()?"?":""}: ${a.getTypes().join(" or ")}`})),o.documentation=c.toString(),e.push(o)}return e};et.createSignatureInfo=gF;var yF=t=>{let e=[];for(let n of t.signatureDefinitions){let r=new ZT.MarkdownString(""),i=n;(0,et.appendTooltipHeader)(r,t,i),(0,et.appendTooltipBody)(r,i),e.push(r)}return{contents:e.map(n=>n.toString())}};et.createHover=yF});var r1=T(Rs=>{"use strict";var bF=Rs&&Rs.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Rs,"__esModule",{value:!0});Rs.activate=void 0;var t1=Bt(),vF=Gn(),cb=Yt(),n1=bF((Yn(),Qe(Kn))),pi=Rl(),_F=ms(),ub=Mu(),db=qu(),wF=zi();function xF(t){function e(r,i){return V(this,null,function*(){let s=new ub.MarkdownString(""),o=i.closest,l=yield t.fs.getWorkspaceFolderUris(),c=o.directory.startsWith("/")?l[0]:pi.Utils.joinPath(pi.URI.parse(r.uri),".."),a=pi.Utils.joinPath(c,o.directory),u=[`[Imports file "${n1.default.basename(a.path)}" inside this code](${a.toString()})`,"***","Click the link above to open the file.","","Use the build command to create an installer","file which will bundle all dependencies."];return s.appendMarkdown(u.join(`
321
321
  `)),{contents:s.toString()}})}function n(r,i){return V(this,null,function*(){let s=new ub.MarkdownString(""),l=i.closest.path,c=yield t.fs.getWorkspaceFolderUris(),a=l.startsWith("/")?c[0]:pi.Utils.joinPath(pi.URI.parse(r.uri),".."),u=pi.Utils.joinPath(a,l),p=pi.Utils.joinPath(a,`${l}`),d=yield t.fs.findExistingPath(u.toString(),p.toString()),h=[`[Inserts file "${n1.default.basename(d)}" inside this code when building](${d.toString()})`,"***","Click the link above to open the file."];return s.appendMarkdown(h.join(`
322
- `)),{contents:s.toString()}})}t.connection.onHover(r=>V(this,null,function*(){if(!t.getConfiguration().hoverdocs)return;let i=yield t.fs.getTextDocument(r.textDocument.uri);if(i==null)return;let s=new _F.LookupHelper(i,t),o=s.lookupAST(r.position);if(!o)return;if(o.closest.type===vF.ASTType.ImportCodeExpression)return yield e(i,o);if(o.closest.type===t1.ASTType.FeatureImportExpression||o.closest.type===t1.ASTType.FeatureIncludeExpression)return yield n(i,o);let l=yield s.lookupTypeInfo(o);if(!l)return;if(l.isCallable())return(0,db.createHover)(l);let c=new ub.MarkdownString(""),a=Array.from(l.types).map(cb.SignatureDefinitionTypeMeta.parse),u=`(${l.kind}) ${l.label}: ${(0,db.formatTypes)(a)}`;if(l.types.has(cb.SignatureDefinitionBaseType.Map)){let p={};for(let[d,h]of l.values){let m=Array.from(h.types).map(cb.SignatureDefinitionTypeMeta.parse);p[d.slice(2)]=(0,db.formatTypes)(m)}u+=" "+JSON.stringify(p,null,2)}return c.appendCodeblock(wF.LanguageId,u),{contents:c.toString()}}))}Rs.activate=xF});var s1=T(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});Fu.activate=void 0;var i1=pe(),SF=ms(),kF=qu(),TF=t=>{if(t.closest.type===i1.ASTType.CallExpression)return t.closest;for(let e=t.outer.length-1;e>=0;e--){let n=t.outer[e];if(n.type===i1.ASTType.CallExpression)return n}return null};function IF(t){t.connection.onSignatureHelp(e=>V(this,null,function*(){if(!t.getConfiguration().autocomplete)return;let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;yield t.documentManager.getLatest(n);let r=new SF.LookupHelper(n,t),i=r.lookupAST(e.position);if(!i)return;let{closest:s}=i,o=TF(i);if(o===null)return;let l=yield r.lookupTypeInfo({closest:o.base,outer:s.scope?[s.scope]:[]});if(!l||!l.isCallable())return;let a=o.arguments.findIndex(p=>{let d=p.start.character-1,h=p.end.character;return d<=e.position.character&&h>=e.position.character}),u={activeParameter:a===-1?0:a,signatures:[],activeSignature:0};return u.signatures.push(...(0,kF.createSignatureInfo)(l)),u}))}Fu.activate=IF});var a1=T(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.activate=void 0;var o1=zi();function EF(t){let e=r=>r.languageId!==o1.LanguageId?!1:t.documentManager.schedule(r),n=r=>{r.languageId===o1.LanguageId&&t.documentManager.clear(r)};t.fs.on("text-document-open",e),t.fs.on("text-document-change",e),t.fs.on("text-document-close",n)}Nu.activate=EF});var c1=T(Ps=>{"use strict";var CF=Ps&&Ps.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ps,"__esModule",{value:!0});Ps.activate=void 0;var RF=Uo(),PF=Gg(),AF=CF(Vo()),l1=(t,e)=>{var s;let n=AF.default.get(t.uri),r=n.resolveAllAssignmentsWithQuery(e),i=[];for(let o of r){let l=o,c=n.resolveNamespace(l.variable,!0),a=(s=c==null?void 0:c.label)!=null?s:(0,RF.createExpressionId)(o.variable),u=c!=null&&c.kind?(0,PF.getSymbolItemKind)(c.kind):13,p={line:l.variable.start.line-1,character:l.variable.start.character-1},d={line:l.variable.end.line-1,character:l.variable.end.character-1};i.push({name:a,containerName:a,kind:u,location:{uri:t.uri,range:{start:p,end:d}}})}return i};function OF(t){t.connection.onDocumentSymbol(e=>V(this,null,function*(){let n=yield t.fs.getTextDocument(e.textDocument.uri);if(!(n==null||!t.documentManager.get(n).document))return l1(n,"")})),t.connection.onWorkspaceSymbol(e=>{let n=[];for(let r of t.fs.getAllTextDocuments())t.documentManager.get(r).document&&n.push(...l1(r,e.query));return n})}Ps.activate=OF});var g1=T((e3,m1)=>{var mb=Object.defineProperty,DF=Object.getOwnPropertyDescriptor,jF=Object.getOwnPropertyNames,LF=Object.prototype.hasOwnProperty,MF=(t,e)=>{for(var n in e)mb(t,n,{get:e[n],enumerable:!0})},qF=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of jF(e))!LF.call(t,i)&&i!==n&&mb(t,i,{get:()=>e[i],enumerable:!(r=DF(e,i))||r.enumerable});return t},FF=t=>qF(mb({},"__esModule",{value:!0}),t),u1={};MF(u1,{ScheduleIntervalHelper:()=>pb,SchedulePostMessageHelper:()=>hb,ScheduleSetImmmediateHelper:()=>fb,schedule:()=>BF,scheduleProvider:()=>f1});m1.exports=FF(u1);var NF=Promise.prototype.then.bind(Promise.resolve()),qn,gb=(qn=class{constructor(){this.queue=[],this.sleep=0}static isApplicable(){return!1}static createCallback(){throw new Error("Cannot create callback from base schedule helper!")}tick(){let e=this.queue,n=Math.min(e.length,qn.QUEUE_LIMIT);this.queue=this.queue.slice(qn.QUEUE_LIMIT);for(let r=0;r<n;NF(e[r++]));if(this.queue.length>0&&(this.sleep=0),this.sleep++<=qn.SLEEP_LIMIT){this.nextTick();return}this.endTick()}start(){this.isTickActive()||(this.sleep=0,this.startTick())}add(e){this.queue.push(e),this.start()}},qn.SLEEP_LIMIT=512,qn.QUEUE_LIMIT=1024,qn),pb=class d1 extends gb{constructor(){super(...arguments),this.timer=null,this.boundTick=this.tick.bind(this)}static isApplicable(){return!!globalThis.setInterval}static createCallback(){let e=new d1;return e.add.bind(e)}isTickActive(){return this.timer!==null}startTick(){this.timer=setInterval(this.boundTick,0)}nextTick(){}endTick(){clearInterval(this.timer),this.timer=null}},$F=()=>{try{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}catch(t){}return!1},hb=class p1 extends gb{constructor(){super(),this.id=(Math.random()+1).toString(36).substring(7),this.active=!1,self.addEventListener("message",this.onMessage.bind(this))}static isApplicable(){return!$F()&&!!self.postMessage&&!!self.addEventListener}static createCallback(){let e=new p1;return e.add.bind(e)}onMessage(e){e.source!==self||e.data!==this.id||this.tick()}isTickActive(){return this.active}startTick(){this.active=!0,self.postMessage(this.id)}nextTick(){self.postMessage(this.id)}endTick(){this.active=!1}},fb=class h1 extends gb{constructor(){super(...arguments),this.immediate=null,this.boundTick=this.tick.bind(this)}static isApplicable(){return!!globalThis.setImmediate}static createCallback(){let e=new h1;return e.add.bind(e)}isTickActive(){return this.immediate!==null}startTick(){this.immediate=setImmediate(this.boundTick)}nextTick(){this.immediate=setImmediate(this.boundTick)}endTick(){clearImmediate(this.immediate),this.immediate=null}};function f1(){if(fb.isApplicable())return fb.createCallback();if(hb.isApplicable())return hb.createCallback();if(pb.isApplicable())return pb.createCallback();throw new Error("No schedule helper fulfills requirements!")}var BF=f1()});var _1=T(Qt=>{"use strict";var bb=Qt&&Qt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qt,"__esModule",{value:!0});Qt.DocumentManager=Qt.PROCESSING_TIMEOUT=Qt.ActiveDocument=Qt.DocumentURIBuilder=void 0;var UF=bb((Bn(),Qe($n))),y1=Gn(),WF=bb(Qh()),b1=g1(),$u=Rl(),v1=bb(Vo()),ia=class{constructor(e,n=null){this.workspaceFolderUri=n,this.rootPath=e}getFromWorkspaceFolder(e){if(this.workspaceFolderUri==null)throw new Error("Workspace folder is not defined!");return $u.Utils.joinPath(this.workspaceFolderUri,e).toString()}getFromRootPath(e){return $u.Utils.joinPath(this.rootPath,e).toString()}};Qt.DocumentURIBuilder=ia;var As=class{constructor(e){this.documentManager=e.documentManager,this.content=e.content,this.textDocument=e.textDocument,this.document=e.document,this.errors=e.errors}getDirectory(){return $u.Utils.joinPath($u.URI.parse(this.textDocument.uri),"..")}getNativeImports(e=null){if(this.document==null)return[];let n=this.document,r=this.getDirectory(),i=new ia(r,e);return n.nativeImports.filter(s=>s.directory).map(s=>s.directory.startsWith("/")?i.getFromWorkspaceFolder(s.directory):i.getFromRootPath(s.directory))}getImportsAndIncludes(e=null){if(this.document==null)return[];let n=this.document,r=this.getDirectory(),i=this.documentManager.context,s=new ia(r,e),o=l=>l.startsWith("/")?i.fs.findExistingPath(s.getFromWorkspaceFolder(l),s.getFromWorkspaceFolder(`${l}.src`)):i.fs.findExistingPath(s.getFromRootPath(l),s.getFromRootPath(`${l}.src`));return[...n.imports.filter(l=>l.path).map(l=>o(l.path)),...n.includes.filter(l=>l.path).map(l=>o(l.path))]}getDependencies(){return V(this,null,function*(){if(this.document==null)return[];if(this.dependencies)return this.dependencies;let e=yield this.documentManager.context.fs.getWorkspaceFolderUris(),n=this.getNativeImports(e[0]),r=this.getImportsAndIncludes(e[0]),i=new Set([...n,...r]);return this.dependencies=Array.from(i),this.dependencies})}getImports(){return V(this,null,function*(){if(this.document==null)return[];let e=new Set,n=new Set([this.textDocument.uri]),r=i=>V(this,null,function*(){let s=yield i.getDependencies();for(let o of s){if(n.has(o))continue;let l=yield this.documentManager.open(o);n.add(o),l!==null&&(e.add(l),l.document!==null&&(yield r(l)))}});return yield r(this),Array.from(e)})}};Qt.ActiveDocument=As;Qt.PROCESSING_TIMEOUT=100;var yb=class extends UF.default{get context(){return this._context}setContext(e){return this._context=e,this}constructor(e=Qt.PROCESSING_TIMEOUT){super(),this._context=null,this._timer=null,this.results=new WF.default({ttl:1e3*60*20,ttlAutopurge:!0}),this.scheduledItems=new Map,this.tickRef=this.tick.bind(this),this.processingTimeout=e}tick(){if(this.scheduledItems.size===0){this._timer=null;return}let e=Date.now(),n=Array.from(this.scheduledItems.values());for(let r=0;r<n.length;r++){let i=n[r];e-i.createdAt>this.processingTimeout&&(0,b1.schedule)(()=>this.refresh(i.document))}this._timer=setTimeout(this.tickRef,0)}refresh(e){let n=e.uri;if(!this.scheduledItems.has(n)&&this.results.has(n))return this.results.get(n);let r=this.create(e);return this.results.set(n,r),this.emit("parsed",e,r),this.scheduledItems.delete(n),r}create(e){var s;let n=e.getText(),r=new y1.Parser(n,{unsafe:!0}),i=r.parseChunk();if(((s=i.body)==null?void 0:s.length)>0)return v1.default.analyze(e.uri,i),new As({documentManager:this,content:n,textDocument:e,document:i,errors:[...r.lexer.errors,...r.errors]});try{let l=new y1.Parser(e.getText()).parseChunk();return v1.default.analyze(e.uri,l),new As({documentManager:this,content:n,textDocument:e,document:l,errors:[]})}catch(o){return new As({documentManager:this,content:n,textDocument:e,document:null,errors:[o]})}}schedule(e){var i;let n=e.uri,r=e.getText();return((i=this.results.get(n))==null?void 0:i.content)===r?!1:(this.scheduledItems.set(n,{document:e,createdAt:Date.now()}),this._timer===null&&(this._timer=setTimeout(this.tickRef,0)),!0)}open(e){return V(this,null,function*(){try{let n=yield this.context.fs.getTextDocument(e);return n==null?null:this.get(n)}catch(n){return null}})}get(e){return this.results.get(e.uri)||this.refresh(e)}getLatest(e,n=5e3){return new Promise(r=>{(0,b1.schedule)(()=>{if(!this.scheduledItems.has(e.uri))return r(this.get(e));let i=()=>{this.removeListener("parsed",s),r(this.get(e))},s=l=>{l.uri===e.uri&&(this.removeListener("parsed",s),clearTimeout(o),r(this.get(e)))},o=setTimeout(i,n);this.addListener("parsed",s)})})}clear(e){this.results.delete(e.uri),this.emit("cleared",e)}};Qt.DocumentManager=yb});var x1=T(Os=>{"use strict";var VF=Os&&Os.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Os,"__esModule",{value:!0});Os.CoreContext=void 0;var HF=VF((Bn(),Qe($n))),vb=zi();function w1(t){var e,n,r,i,s,o,l,c,a,u,p,d,h;return{formatter:(e=t==null?void 0:t.formatter)!=null?e:!0,autocomplete:(n=t==null?void 0:t.autocomplete)!=null?n:!0,hoverdocs:(r=t==null?void 0:t.hoverdocs)!=null?r:!0,diagnostic:(i=t==null?void 0:t.diagnostic)!=null?i:!0,transpiler:{beautify:{keepParentheses:(l=(o=(s=t==null?void 0:t.transpiler)==null?void 0:s.beautify)==null?void 0:o.keepParentheses)!=null?l:!0,indentation:(u=(a=(c=t==null?void 0:t.transpiler)==null?void 0:c.beautify)==null?void 0:a.indentation)!=null?u:vb.IndentationType.Tab,indentationSpaces:(h=(d=(p=t==null?void 0:t.transpiler)==null?void 0:p.beautify)==null?void 0:d.indentationSpaces)!=null?h:2}}}}var _b=class extends HF.default{constructor(){super(),this._configuration=w1(),this._features={configuration:!1,workspaceFolder:!1}}get features(){return this._features}getConfiguration(){return this._configuration}syncConfiguraton(){return V(this,null,function*(){let e=yield this.connection.workspace.getConfiguration(vb.ConfigurationNamespace);this._configuration=w1(e)})}configureCapabilties(e){this._features.configuration=!!(e.workspace&&e.workspace.configuration),this._features.workspaceFolder=!!(e.workspace&&e.workspace.workspaceFolders)}onInitialize(e){return V(this,null,function*(){this.configureCapabilties(e.capabilities);let n={capabilities:{completionProvider:{triggerCharacters:["."],resolveProvider:!0},hoverProvider:!0,colorProvider:!0,definitionProvider:!0,documentFormattingProvider:!0,signatureHelpProvider:{triggerCharacters:[",","("]},documentSymbolProvider:!0,workspaceSymbolProvider:!0,diagnosticProvider:{identifier:vb.LanguageId,interFileDependencies:!1,workspaceDiagnostics:!1},textDocumentSync:2}};return this._features.workspaceFolder&&(n.capabilities.workspace={workspaceFolders:{supported:!0}}),this.emit("ready",this),n})}onInitialized(e){return V(this,null,function*(){this._features.configuration&&(yield this.syncConfiguraton(),this.connection.onDidChangeConfiguration(()=>V(this,null,function*(){let n=this._configuration;yield this.syncConfiguraton(),this.emit("configuration-change",this,this._configuration,n)}))),this.emit("loaded",this)})}listen(){return V(this,null,function*(){this.fs.listen(this.connection),this.connection.onInitialize(this.onInitialize.bind(this)),this.connection.onInitialized(this.onInitialized.bind(this)),this.connection.listen()})}};Os.CoreContext=_b});var Bu=T(U=>{"use strict";var zF=U&&U.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),GF=U&&U.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KF=U&&U.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&zF(e,t,n);return GF(e,t),e},YF=U&&U.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(U,"__esModule",{value:!0});U.CoreContext=U.typeAnalyzer=U.lookupBase=U.lookupIdentifier=U.appendTooltipHeader=U.appendTooltipBody=U.formatTypes=U.formatDefaultValue=U.createTooltipHeader=U.createSignatureInfo=U.createHover=U.MarkdownString=U.LookupHelper=U.DocumentManager=U.ActiveDocument=U.ASTScraper=U.activateSymbol=U.activateSubscriptions=U.activateSignature=U.activateHover=U.activateFormatter=U.activateDiagnostic=U.activateDefinition=U.activateColor=U.activateAutocomplete=U.ConfigurationNamespace=U.LanguageId=U.IndentationType=void 0;var wb=zi();Object.defineProperty(U,"IndentationType",{enumerable:!0,get:function(){return wb.IndentationType}});Object.defineProperty(U,"LanguageId",{enumerable:!0,get:function(){return wb.LanguageId}});Object.defineProperty(U,"ConfigurationNamespace",{enumerable:!0,get:function(){return wb.ConfigurationNamespace}});var QF=J0();Object.defineProperty(U,"activateAutocomplete",{enumerable:!0,get:function(){return QF.activate}});var JF=aT();Object.defineProperty(U,"activateColor",{enumerable:!0,get:function(){return JF.activate}});var XF=uT();Object.defineProperty(U,"activateDefinition",{enumerable:!0,get:function(){return XF.activate}});var ZF=dT();Object.defineProperty(U,"activateDiagnostic",{enumerable:!0,get:function(){return ZF.activate}});var eN=JT();Object.defineProperty(U,"activateFormatter",{enumerable:!0,get:function(){return eN.activate}});var tN=r1();Object.defineProperty(U,"activateHover",{enumerable:!0,get:function(){return tN.activate}});var nN=s1();Object.defineProperty(U,"activateSignature",{enumerable:!0,get:function(){return nN.activate}});var rN=a1();Object.defineProperty(U,"activateSubscriptions",{enumerable:!0,get:function(){return rN.activate}});var iN=c1();Object.defineProperty(U,"activateSymbol",{enumerable:!0,get:function(){return iN.activate}});U.ASTScraper=KF(Yg());var S1=_1();Object.defineProperty(U,"ActiveDocument",{enumerable:!0,get:function(){return S1.ActiveDocument}});Object.defineProperty(U,"DocumentManager",{enumerable:!0,get:function(){return S1.DocumentManager}});var sN=ms();Object.defineProperty(U,"LookupHelper",{enumerable:!0,get:function(){return sN.LookupHelper}});var oN=Mu();Object.defineProperty(U,"MarkdownString",{enumerable:!0,get:function(){return oN.MarkdownString}});var hi=qu();Object.defineProperty(U,"createHover",{enumerable:!0,get:function(){return hi.createHover}});Object.defineProperty(U,"createSignatureInfo",{enumerable:!0,get:function(){return hi.createSignatureInfo}});Object.defineProperty(U,"createTooltipHeader",{enumerable:!0,get:function(){return hi.createTooltipHeader}});Object.defineProperty(U,"formatDefaultValue",{enumerable:!0,get:function(){return hi.formatDefaultValue}});Object.defineProperty(U,"formatTypes",{enumerable:!0,get:function(){return hi.formatTypes}});Object.defineProperty(U,"appendTooltipBody",{enumerable:!0,get:function(){return hi.appendTooltipBody}});Object.defineProperty(U,"appendTooltipHeader",{enumerable:!0,get:function(){return hi.appendTooltipHeader}});var xb=Vo();Object.defineProperty(U,"lookupIdentifier",{enumerable:!0,get:function(){return xb.lookupIdentifier}});Object.defineProperty(U,"lookupBase",{enumerable:!0,get:function(){return xb.lookupBase}});Object.defineProperty(U,"typeAnalyzer",{enumerable:!0,get:function(){return YF(xb).default}});var aN=x1();Object.defineProperty(U,"CoreContext",{enumerable:!0,get:function(){return aN.CoreContext}})});var E1=T(Qn=>{"use strict";var T1=Qn&&Qn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.FileSystem=Qn.FileSystemRequest=void 0;var lN=$h(),k1=(Jx(),Qe(Qx)),cN=T1((Bn(),Qe($n))),Sb=Rl(),uN=T1(Qh()),dN=Bu(),I1;(function(t){t.FileContent="read-file"})(I1=Qn.FileSystemRequest||(Qn.FileSystemRequest={}));var kb=class extends cN.default{constructor(e){super(),this._context=e,this._textDocumentManager=new lN.TextDocuments(k1.TextDocument),this._tempTextDocumentCache=new uN.default({ttl:1e3,max:100})}getWorkspaceFolderUris(){return V(this,null,function*(){if(!this._context.features.workspaceFolder)return[];let e=yield this._workspace.getWorkspaceFolders();return Array.from(new Set(e.map(n=>n.uri))).map(n=>Sb.URI.parse(n))})}findExistingPath(...e){if(e.length===0)return"";for(let n=0;n<e.length;n++)if(this.getTextDocument(e[n])!=null)return e[n];return e[0]}getAllTextDocuments(){return this._textDocumentManager.all()}requestFileContent(e){return V(this,null,function*(){let n=`custom/${I1.FileContent}`;try{return yield this._context.connection.sendRequest(n,e.toString())}catch(r){return console.error(`Cannot fetch text document! Maybe the client does not support ${n}`,r),null}})}fetchTextDocument(e){return V(this,null,function*(){let n=Sb.URI.parse(e),r=this._tempTextDocumentCache.get(e);if(r!=null)return r;let i=null,s=yield this.requestFileContent(n);return s!=null&&(i=k1.TextDocument.create(e,dN.LanguageId,0,s)),this._tempTextDocumentCache.set(e,i),i})}getTextDocument(e){return V(this,null,function*(){let n=this._textDocumentManager.get(e);return n||(Sb.URI.parse(e).scheme=="file"?yield this.fetchTextDocument(e):null)})}readFile(e){return V(this,null,function*(){return(yield this.getTextDocument(e)).getText()})}listen(e){this._workspace=e.workspace,this._textDocumentManager.listen(e),this._textDocumentManager.onDidOpen(n=>{this.emit("text-document-open",n.document)}),this._textDocumentManager.onDidChangeContent(n=>{this.emit("text-document-change",n.document)}),this._textDocumentManager.onDidClose(n=>{this.emit("text-document-close",n.document)})}};Qn.FileSystem=kb});var R1=T(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});Wu.BrowserContext=void 0;var Uu=$h(),pN=E1(),C1=Bu(),Tb=class extends C1.CoreContext{constructor(){super(),this.documentManager=new C1.DocumentManager().setContext(this),this._messageReader=new Uu.BrowserMessageReader(self),this._messageWriter=new Uu.BrowserMessageWriter(self),this.connection=(0,Uu.createConnection)(Uu.ProposedFeatures.all,this._messageReader,this._messageWriter),this.fs=new pN.FileSystem(this)}};Wu.BrowserContext=Tb});var fN=T(A1=>{Object.defineProperty(A1,"__esModule",{value:!0});var hN=R1(),Jn=Bu(),P1=new hN.BrowserContext;P1.on("ready",t=>{(0,Jn.activateAutocomplete)(t),(0,Jn.activateColor)(t),(0,Jn.activateDefinition)(t),(0,Jn.activateDiagnostic)(t),(0,Jn.activateFormatter)(t),(0,Jn.activateHover)(t),(0,Jn.activateSignature)(t),(0,Jn.activateSubscriptions)(t),(0,Jn.activateSymbol)(t)});P1.listen()});fN();})();
322
+ `)),{contents:s.toString()}})}t.connection.onHover(r=>V(this,null,function*(){if(!t.getConfiguration().hoverdocs)return;let i=yield t.fs.getTextDocument(r.textDocument.uri);if(i==null)return;let s=new _F.LookupHelper(i,t),o=s.lookupAST(r.position);if(!o)return;if(o.closest.type===vF.ASTType.ImportCodeExpression)return yield e(i,o);if(o.closest.type===t1.ASTType.FeatureImportExpression||o.closest.type===t1.ASTType.FeatureIncludeExpression)return yield n(i,o);let l=yield s.lookupTypeInfo(o);if(!l)return;if(l.isCallable())return(0,db.createHover)(l);let c=new ub.MarkdownString(""),a=Array.from(l.types).map(cb.SignatureDefinitionTypeMeta.parse),u=`(${l.kind}) ${l.label}: ${(0,db.formatTypes)(a)}`;if(l.types.has(cb.SignatureDefinitionBaseType.Map)){let p={};for(let[d,h]of l.values){let m=Array.from(h.types).map(cb.SignatureDefinitionTypeMeta.parse);p[d.slice(2)]=(0,db.formatTypes)(m)}u+=" "+JSON.stringify(p,null,2)}return c.appendCodeblock(wF.LanguageId,u),{contents:c.toString()}}))}Rs.activate=xF});var s1=T(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});Fu.activate=void 0;var i1=pe(),SF=ms(),kF=qu(),TF=t=>{if(t.closest.type===i1.ASTType.CallExpression)return t.closest;for(let e=t.outer.length-1;e>=0;e--){let n=t.outer[e];if(n.type===i1.ASTType.CallExpression)return n}return null};function IF(t){t.connection.onSignatureHelp(e=>V(this,null,function*(){if(!t.getConfiguration().autocomplete)return;let n=yield t.fs.getTextDocument(e.textDocument.uri);if(n==null)return;yield t.documentManager.getLatest(n);let r=new SF.LookupHelper(n,t),i=r.lookupAST(e.position);if(!i)return;let{closest:s}=i,o=TF(i);if(o===null)return;let l=yield r.lookupTypeInfo({closest:o.base,outer:s.scope?[s.scope]:[]});if(!l||!l.isCallable())return;let a=o.arguments.findIndex(p=>{let d=p.start.character-1,h=p.end.character;return d<=e.position.character&&h>=e.position.character}),u={activeParameter:a===-1?0:a,signatures:[],activeSignature:0};return u.signatures.push(...(0,kF.createSignatureInfo)(l)),u}))}Fu.activate=IF});var a1=T(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.activate=void 0;var o1=zi();function EF(t){let e=r=>r.languageId!==o1.LanguageId?!1:t.documentManager.schedule(r),n=r=>{r.languageId===o1.LanguageId&&t.documentManager.clear(r)};t.fs.on("text-document-open",e),t.fs.on("text-document-change",e),t.fs.on("text-document-close",n)}Nu.activate=EF});var c1=T(Ps=>{"use strict";var CF=Ps&&Ps.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ps,"__esModule",{value:!0});Ps.activate=void 0;var RF=Uo(),PF=Gg(),AF=CF(Vo()),l1=(t,e)=>{var s;let n=AF.default.get(t.uri),r=n.resolveAllAssignmentsWithQuery(e),i=[];for(let o of r){let l=o,c=n.resolveNamespace(l.variable,!0);if(c==null)continue;let a=(s=c==null?void 0:c.label)!=null?s:(0,RF.createExpressionId)(o.variable),u=c!=null&&c.kind?(0,PF.getSymbolItemKind)(c.kind):13,p={line:l.variable.start.line-1,character:l.variable.start.character-1},d={line:l.variable.end.line-1,character:l.variable.end.character-1};i.push({name:a,containerName:a,kind:u,location:{uri:t.uri,range:{start:p,end:d}}})}return i};function OF(t){t.connection.onDocumentSymbol(e=>V(this,null,function*(){let n=yield t.fs.getTextDocument(e.textDocument.uri);if(!(n==null||!t.documentManager.get(n).document))return l1(n,"")})),t.connection.onWorkspaceSymbol(e=>{let n=[];for(let r of t.fs.getAllTextDocuments())t.documentManager.get(r).document&&n.push(...l1(r,e.query));return n})}Ps.activate=OF});var g1=T((e3,m1)=>{var mb=Object.defineProperty,DF=Object.getOwnPropertyDescriptor,jF=Object.getOwnPropertyNames,LF=Object.prototype.hasOwnProperty,MF=(t,e)=>{for(var n in e)mb(t,n,{get:e[n],enumerable:!0})},qF=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of jF(e))!LF.call(t,i)&&i!==n&&mb(t,i,{get:()=>e[i],enumerable:!(r=DF(e,i))||r.enumerable});return t},FF=t=>qF(mb({},"__esModule",{value:!0}),t),u1={};MF(u1,{ScheduleIntervalHelper:()=>pb,SchedulePostMessageHelper:()=>hb,ScheduleSetImmmediateHelper:()=>fb,schedule:()=>BF,scheduleProvider:()=>f1});m1.exports=FF(u1);var NF=Promise.prototype.then.bind(Promise.resolve()),qn,gb=(qn=class{constructor(){this.queue=[],this.sleep=0}static isApplicable(){return!1}static createCallback(){throw new Error("Cannot create callback from base schedule helper!")}tick(){let e=this.queue,n=Math.min(e.length,qn.QUEUE_LIMIT);this.queue=this.queue.slice(qn.QUEUE_LIMIT);for(let r=0;r<n;NF(e[r++]));if(this.queue.length>0&&(this.sleep=0),this.sleep++<=qn.SLEEP_LIMIT){this.nextTick();return}this.endTick()}start(){this.isTickActive()||(this.sleep=0,this.startTick())}add(e){this.queue.push(e),this.start()}},qn.SLEEP_LIMIT=512,qn.QUEUE_LIMIT=1024,qn),pb=class d1 extends gb{constructor(){super(...arguments),this.timer=null,this.boundTick=this.tick.bind(this)}static isApplicable(){return!!globalThis.setInterval}static createCallback(){let e=new d1;return e.add.bind(e)}isTickActive(){return this.timer!==null}startTick(){this.timer=setInterval(this.boundTick,0)}nextTick(){}endTick(){clearInterval(this.timer),this.timer=null}},$F=()=>{try{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}catch(t){}return!1},hb=class p1 extends gb{constructor(){super(),this.id=(Math.random()+1).toString(36).substring(7),this.active=!1,self.addEventListener("message",this.onMessage.bind(this))}static isApplicable(){return!$F()&&!!self.postMessage&&!!self.addEventListener}static createCallback(){let e=new p1;return e.add.bind(e)}onMessage(e){e.source!==self||e.data!==this.id||this.tick()}isTickActive(){return this.active}startTick(){this.active=!0,self.postMessage(this.id)}nextTick(){self.postMessage(this.id)}endTick(){this.active=!1}},fb=class h1 extends gb{constructor(){super(...arguments),this.immediate=null,this.boundTick=this.tick.bind(this)}static isApplicable(){return!!globalThis.setImmediate}static createCallback(){let e=new h1;return e.add.bind(e)}isTickActive(){return this.immediate!==null}startTick(){this.immediate=setImmediate(this.boundTick)}nextTick(){this.immediate=setImmediate(this.boundTick)}endTick(){clearImmediate(this.immediate),this.immediate=null}};function f1(){if(fb.isApplicable())return fb.createCallback();if(hb.isApplicable())return hb.createCallback();if(pb.isApplicable())return pb.createCallback();throw new Error("No schedule helper fulfills requirements!")}var BF=f1()});var _1=T(Qt=>{"use strict";var bb=Qt&&Qt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qt,"__esModule",{value:!0});Qt.DocumentManager=Qt.PROCESSING_TIMEOUT=Qt.ActiveDocument=Qt.DocumentURIBuilder=void 0;var UF=bb((Bn(),Qe($n))),y1=Gn(),WF=bb(Qh()),b1=g1(),$u=Rl(),v1=bb(Vo()),ia=class{constructor(e,n=null){this.workspaceFolderUri=n,this.rootPath=e}getFromWorkspaceFolder(e){if(this.workspaceFolderUri==null)throw new Error("Workspace folder is not defined!");return $u.Utils.joinPath(this.workspaceFolderUri,e).toString()}getFromRootPath(e){return $u.Utils.joinPath(this.rootPath,e).toString()}};Qt.DocumentURIBuilder=ia;var As=class{constructor(e){this.documentManager=e.documentManager,this.content=e.content,this.textDocument=e.textDocument,this.document=e.document,this.errors=e.errors}getDirectory(){return $u.Utils.joinPath($u.URI.parse(this.textDocument.uri),"..")}getNativeImports(e=null){if(this.document==null)return[];let n=this.document,r=this.getDirectory(),i=new ia(r,e);return n.nativeImports.filter(s=>s.directory).map(s=>s.directory.startsWith("/")?i.getFromWorkspaceFolder(s.directory):i.getFromRootPath(s.directory))}getImportsAndIncludes(e=null){if(this.document==null)return[];let n=this.document,r=this.getDirectory(),i=this.documentManager.context,s=new ia(r,e),o=l=>l.startsWith("/")?i.fs.findExistingPath(s.getFromWorkspaceFolder(l),s.getFromWorkspaceFolder(`${l}.src`)):i.fs.findExistingPath(s.getFromRootPath(l),s.getFromRootPath(`${l}.src`));return[...n.imports.filter(l=>l.path).map(l=>o(l.path)),...n.includes.filter(l=>l.path).map(l=>o(l.path))]}getDependencies(){return V(this,null,function*(){if(this.document==null)return[];if(this.dependencies)return this.dependencies;let e=yield this.documentManager.context.fs.getWorkspaceFolderUris(),n=this.getNativeImports(e[0]),r=this.getImportsAndIncludes(e[0]),i=new Set([...n,...r]);return this.dependencies=Array.from(i),this.dependencies})}getImports(){return V(this,null,function*(){if(this.document==null)return[];let e=new Set,n=new Set([this.textDocument.uri]),r=i=>V(this,null,function*(){let s=yield i.getDependencies();for(let o of s){if(n.has(o))continue;let l=yield this.documentManager.open(o);n.add(o),l!==null&&(e.add(l),l.document!==null&&(yield r(l)))}});return yield r(this),Array.from(e)})}};Qt.ActiveDocument=As;Qt.PROCESSING_TIMEOUT=100;var yb=class extends UF.default{get context(){return this._context}setContext(e){return this._context=e,this}constructor(e=Qt.PROCESSING_TIMEOUT){super(),this._context=null,this._timer=null,this.results=new WF.default({ttl:1e3*60*20,ttlAutopurge:!0}),this.scheduledItems=new Map,this.tickRef=this.tick.bind(this),this.processingTimeout=e}tick(){if(this.scheduledItems.size===0){this._timer=null;return}let e=Date.now(),n=Array.from(this.scheduledItems.values());for(let r=0;r<n.length;r++){let i=n[r];e-i.createdAt>this.processingTimeout&&(0,b1.schedule)(()=>this.refresh(i.document))}this._timer=setTimeout(this.tickRef,0)}refresh(e){let n=e.uri;if(!this.scheduledItems.has(n)&&this.results.has(n))return this.results.get(n);let r=this.create(e);return this.results.set(n,r),this.emit("parsed",e,r),this.scheduledItems.delete(n),r}create(e){var s;let n=e.getText(),r=new y1.Parser(n,{unsafe:!0}),i=r.parseChunk();if(((s=i.body)==null?void 0:s.length)>0)return v1.default.analyze(e.uri,i),new As({documentManager:this,content:n,textDocument:e,document:i,errors:[...r.lexer.errors,...r.errors]});try{let l=new y1.Parser(e.getText()).parseChunk();return v1.default.analyze(e.uri,l),new As({documentManager:this,content:n,textDocument:e,document:l,errors:[]})}catch(o){return new As({documentManager:this,content:n,textDocument:e,document:null,errors:[o]})}}schedule(e){var i;let n=e.uri,r=e.getText();return((i=this.results.get(n))==null?void 0:i.content)===r?!1:(this.scheduledItems.set(n,{document:e,createdAt:Date.now()}),this._timer===null&&(this._timer=setTimeout(this.tickRef,0)),!0)}open(e){return V(this,null,function*(){try{let n=yield this.context.fs.getTextDocument(e);return n==null?null:this.get(n)}catch(n){return null}})}get(e){return this.results.get(e.uri)||this.refresh(e)}getLatest(e,n=5e3){return new Promise(r=>{(0,b1.schedule)(()=>{if(!this.scheduledItems.has(e.uri))return r(this.get(e));let i=()=>{this.removeListener("parsed",s),r(this.get(e))},s=l=>{l.uri===e.uri&&(this.removeListener("parsed",s),clearTimeout(o),r(this.get(e)))},o=setTimeout(i,n);this.addListener("parsed",s)})})}clear(e){this.results.delete(e.uri),this.emit("cleared",e)}};Qt.DocumentManager=yb});var x1=T(Os=>{"use strict";var VF=Os&&Os.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Os,"__esModule",{value:!0});Os.CoreContext=void 0;var HF=VF((Bn(),Qe($n))),vb=zi();function w1(t){var e,n,r,i,s,o,l,c,a,u,p,d,h;return{formatter:(e=t==null?void 0:t.formatter)!=null?e:!0,autocomplete:(n=t==null?void 0:t.autocomplete)!=null?n:!0,hoverdocs:(r=t==null?void 0:t.hoverdocs)!=null?r:!0,diagnostic:(i=t==null?void 0:t.diagnostic)!=null?i:!0,transpiler:{beautify:{keepParentheses:(l=(o=(s=t==null?void 0:t.transpiler)==null?void 0:s.beautify)==null?void 0:o.keepParentheses)!=null?l:!0,indentation:(u=(a=(c=t==null?void 0:t.transpiler)==null?void 0:c.beautify)==null?void 0:a.indentation)!=null?u:vb.IndentationType.Tab,indentationSpaces:(h=(d=(p=t==null?void 0:t.transpiler)==null?void 0:p.beautify)==null?void 0:d.indentationSpaces)!=null?h:2}}}}var _b=class extends HF.default{constructor(){super(),this._configuration=w1(),this._features={configuration:!1,workspaceFolder:!1}}get features(){return this._features}getConfiguration(){return this._configuration}syncConfiguraton(){return V(this,null,function*(){let e=yield this.connection.workspace.getConfiguration(vb.ConfigurationNamespace);this._configuration=w1(e)})}configureCapabilties(e){this._features.configuration=!!(e.workspace&&e.workspace.configuration),this._features.workspaceFolder=!!(e.workspace&&e.workspace.workspaceFolders)}onInitialize(e){return V(this,null,function*(){this.configureCapabilties(e.capabilities);let n={capabilities:{completionProvider:{triggerCharacters:["."],resolveProvider:!0},hoverProvider:!0,colorProvider:!0,definitionProvider:!0,documentFormattingProvider:!0,signatureHelpProvider:{triggerCharacters:[",","("]},documentSymbolProvider:!0,workspaceSymbolProvider:!0,diagnosticProvider:{identifier:vb.LanguageId,interFileDependencies:!1,workspaceDiagnostics:!1},textDocumentSync:2}};return this._features.workspaceFolder&&(n.capabilities.workspace={workspaceFolders:{supported:!0}}),this.emit("ready",this),n})}onInitialized(e){return V(this,null,function*(){this._features.configuration&&(yield this.syncConfiguraton(),this.connection.onDidChangeConfiguration(()=>V(this,null,function*(){let n=this._configuration;yield this.syncConfiguraton(),this.emit("configuration-change",this,this._configuration,n)}))),this.emit("loaded",this)})}listen(){return V(this,null,function*(){this.fs.listen(this.connection),this.connection.onInitialize(this.onInitialize.bind(this)),this.connection.onInitialized(this.onInitialized.bind(this)),this.connection.listen()})}};Os.CoreContext=_b});var Bu=T(U=>{"use strict";var zF=U&&U.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),GF=U&&U.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KF=U&&U.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&zF(e,t,n);return GF(e,t),e},YF=U&&U.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(U,"__esModule",{value:!0});U.CoreContext=U.typeAnalyzer=U.lookupBase=U.lookupIdentifier=U.appendTooltipHeader=U.appendTooltipBody=U.formatTypes=U.formatDefaultValue=U.createTooltipHeader=U.createSignatureInfo=U.createHover=U.MarkdownString=U.LookupHelper=U.DocumentManager=U.ActiveDocument=U.ASTScraper=U.activateSymbol=U.activateSubscriptions=U.activateSignature=U.activateHover=U.activateFormatter=U.activateDiagnostic=U.activateDefinition=U.activateColor=U.activateAutocomplete=U.ConfigurationNamespace=U.LanguageId=U.IndentationType=void 0;var wb=zi();Object.defineProperty(U,"IndentationType",{enumerable:!0,get:function(){return wb.IndentationType}});Object.defineProperty(U,"LanguageId",{enumerable:!0,get:function(){return wb.LanguageId}});Object.defineProperty(U,"ConfigurationNamespace",{enumerable:!0,get:function(){return wb.ConfigurationNamespace}});var QF=J0();Object.defineProperty(U,"activateAutocomplete",{enumerable:!0,get:function(){return QF.activate}});var JF=aT();Object.defineProperty(U,"activateColor",{enumerable:!0,get:function(){return JF.activate}});var XF=uT();Object.defineProperty(U,"activateDefinition",{enumerable:!0,get:function(){return XF.activate}});var ZF=dT();Object.defineProperty(U,"activateDiagnostic",{enumerable:!0,get:function(){return ZF.activate}});var eN=JT();Object.defineProperty(U,"activateFormatter",{enumerable:!0,get:function(){return eN.activate}});var tN=r1();Object.defineProperty(U,"activateHover",{enumerable:!0,get:function(){return tN.activate}});var nN=s1();Object.defineProperty(U,"activateSignature",{enumerable:!0,get:function(){return nN.activate}});var rN=a1();Object.defineProperty(U,"activateSubscriptions",{enumerable:!0,get:function(){return rN.activate}});var iN=c1();Object.defineProperty(U,"activateSymbol",{enumerable:!0,get:function(){return iN.activate}});U.ASTScraper=KF(Yg());var S1=_1();Object.defineProperty(U,"ActiveDocument",{enumerable:!0,get:function(){return S1.ActiveDocument}});Object.defineProperty(U,"DocumentManager",{enumerable:!0,get:function(){return S1.DocumentManager}});var sN=ms();Object.defineProperty(U,"LookupHelper",{enumerable:!0,get:function(){return sN.LookupHelper}});var oN=Mu();Object.defineProperty(U,"MarkdownString",{enumerable:!0,get:function(){return oN.MarkdownString}});var hi=qu();Object.defineProperty(U,"createHover",{enumerable:!0,get:function(){return hi.createHover}});Object.defineProperty(U,"createSignatureInfo",{enumerable:!0,get:function(){return hi.createSignatureInfo}});Object.defineProperty(U,"createTooltipHeader",{enumerable:!0,get:function(){return hi.createTooltipHeader}});Object.defineProperty(U,"formatDefaultValue",{enumerable:!0,get:function(){return hi.formatDefaultValue}});Object.defineProperty(U,"formatTypes",{enumerable:!0,get:function(){return hi.formatTypes}});Object.defineProperty(U,"appendTooltipBody",{enumerable:!0,get:function(){return hi.appendTooltipBody}});Object.defineProperty(U,"appendTooltipHeader",{enumerable:!0,get:function(){return hi.appendTooltipHeader}});var xb=Vo();Object.defineProperty(U,"lookupIdentifier",{enumerable:!0,get:function(){return xb.lookupIdentifier}});Object.defineProperty(U,"lookupBase",{enumerable:!0,get:function(){return xb.lookupBase}});Object.defineProperty(U,"typeAnalyzer",{enumerable:!0,get:function(){return YF(xb).default}});var aN=x1();Object.defineProperty(U,"CoreContext",{enumerable:!0,get:function(){return aN.CoreContext}})});var E1=T(Qn=>{"use strict";var T1=Qn&&Qn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.FileSystem=Qn.FileSystemRequest=void 0;var lN=$h(),k1=(Jx(),Qe(Qx)),cN=T1((Bn(),Qe($n))),Sb=Rl(),uN=T1(Qh()),dN=Bu(),I1;(function(t){t.FileContent="read-file"})(I1=Qn.FileSystemRequest||(Qn.FileSystemRequest={}));var kb=class extends cN.default{constructor(e){super(),this._context=e,this._textDocumentManager=new lN.TextDocuments(k1.TextDocument),this._tempTextDocumentCache=new uN.default({ttl:1e3,max:100})}getWorkspaceFolderUris(){return V(this,null,function*(){if(!this._context.features.workspaceFolder)return[];let e=yield this._workspace.getWorkspaceFolders();return Array.from(new Set(e.map(n=>n.uri))).map(n=>Sb.URI.parse(n))})}findExistingPath(...e){if(e.length===0)return"";for(let n=0;n<e.length;n++)if(this.getTextDocument(e[n])!=null)return e[n];return e[0]}getAllTextDocuments(){return this._textDocumentManager.all()}requestFileContent(e){return V(this,null,function*(){let n=`custom/${I1.FileContent}`;try{return yield this._context.connection.sendRequest(n,e.toString())}catch(r){return console.error(`Cannot fetch text document! Maybe the client does not support ${n}`,r),null}})}fetchTextDocument(e){return V(this,null,function*(){let n=Sb.URI.parse(e),r=this._tempTextDocumentCache.get(e);if(r!=null)return r;let i=null,s=yield this.requestFileContent(n);return s!=null&&(i=k1.TextDocument.create(e,dN.LanguageId,0,s)),this._tempTextDocumentCache.set(e,i),i})}getTextDocument(e){return V(this,null,function*(){let n=this._textDocumentManager.get(e);return n||(Sb.URI.parse(e).scheme=="file"?yield this.fetchTextDocument(e):null)})}readFile(e){return V(this,null,function*(){return(yield this.getTextDocument(e)).getText()})}listen(e){this._workspace=e.workspace,this._textDocumentManager.listen(e),this._textDocumentManager.onDidOpen(n=>{this.emit("text-document-open",n.document)}),this._textDocumentManager.onDidChangeContent(n=>{this.emit("text-document-change",n.document)}),this._textDocumentManager.onDidClose(n=>{this.emit("text-document-close",n.document)})}};Qn.FileSystem=kb});var R1=T(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});Wu.BrowserContext=void 0;var Uu=$h(),pN=E1(),C1=Bu(),Tb=class extends C1.CoreContext{constructor(){super(),this.documentManager=new C1.DocumentManager().setContext(this),this._messageReader=new Uu.BrowserMessageReader(self),this._messageWriter=new Uu.BrowserMessageWriter(self),this.connection=(0,Uu.createConnection)(Uu.ProposedFeatures.all,this._messageReader,this._messageWriter),this.fs=new pN.FileSystem(this)}};Wu.BrowserContext=Tb});var fN=T(A1=>{Object.defineProperty(A1,"__esModule",{value:!0});var hN=R1(),Jn=Bu(),P1=new hN.BrowserContext;P1.on("ready",t=>{(0,Jn.activateAutocomplete)(t),(0,Jn.activateColor)(t),(0,Jn.activateDefinition)(t),(0,Jn.activateDiagnostic)(t),(0,Jn.activateFormatter)(t),(0,Jn.activateHover)(t),(0,Jn.activateSignature)(t),(0,Jn.activateSubscriptions)(t),(0,Jn.activateSymbol)(t)});P1.listen()});fN();})();