| 
															
																@@ -3,7 +3,6 @@ import * as Utils from "./../util/utils"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 import { Config } from "./../util/config"; 
															 | 
															
															 | 
															
																 import { Config } from "./../util/config"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																 export class DOMConsole { 
															 | 
															
															 | 
															
																 export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   static get BASH_TEMPLATE () { 
															 | 
															
															 | 
															
																   static get BASH_TEMPLATE () { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     return ` 
															 | 
															
															 | 
															
																     return ` 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     <div class="bash-title"> 
															 | 
															
															 | 
															
																     <div class="bash-title"> 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -54,11 +53,11 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.showBtn = null; 
															 | 
															
															 | 
															
																     this.showBtn = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.termDiv = null; 
															 | 
															
															 | 
															
																     this.termDiv = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.anyKey = false; 
															 | 
															
															 | 
															
																     this.anyKey = false; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    let actualID = elementID 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    if (elementID[0] === '#') { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    let actualID = elementID; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    if (elementID[0] === "#") { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       actualID = elementID.substring(1); 
															 | 
															
															 | 
															
																       actualID = elementID.substring(1); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     } 
															 | 
															
															 | 
															
																     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.parent = document.getElementById(actualID) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.parent = document.getElementById(actualID); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.setup(); 
															 | 
															
															 | 
															
																     this.setup(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.inputListeners = []; 
															 | 
															
															 | 
															
																     this.inputListeners = []; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.hideInput(); 
															 | 
															
															 | 
															
																     this.hideInput(); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -72,10 +71,10 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   _setupEvents () { 
															 | 
															
															 | 
															
																   _setupEvents () { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.input.addEventListener('keydown', this.registerInput.bind(this)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.clearBtn.addEventListener('click', this.clearBtnClick.bind(this)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.hideBtn.addEventListener('click', this.hideBtnClick.bind(this)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.showBtn.addEventListener('click', this.showBtnClick.bind(this)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.input.addEventListener("keydown", this.registerInput.bind(this)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.clearBtn.addEventListener("click", this.clearBtnClick.bind(this)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.hideBtn.addEventListener("click", this.hideBtnClick.bind(this)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.showBtn.addEventListener("click", this.showBtnClick.bind(this)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   registerInput (event) { 
															 | 
															
															 | 
															
																   registerInput (event) { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -89,18 +88,18 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         this.idleInterval = null; 
															 | 
															
															 | 
															
																         this.idleInterval = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       } 
															 | 
															
															 | 
															
																       } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       let text = this.input.value; 
															 | 
															
															 | 
															
																       let text = this.input.value; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      text = text.replace('[\n\r]+', ''); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      text = text.replace("[\n\r]+", ""); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       this.notifyListeners(text); 
															 | 
															
															 | 
															
																       this.notifyListeners(text); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       this._appendUserInput(text); 
															 | 
															
															 | 
															
																       this._appendUserInput(text); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      this.input.value = ''; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      this.inputSpan.innerHTML = ''; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      this.input.value = ""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      this.inputSpan.innerHTML = ""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       this.currentLine = null; 
															 | 
															
															 | 
															
																       this.currentLine = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     } 
															 | 
															
															 | 
															
																     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   _setupDom () { 
															 | 
															
															 | 
															
																   _setupDom () { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    const bashNode = document.createElement('div'); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    bashNode.classList.add('bash'); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    const bashNode = document.createElement("div"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    bashNode.classList.add("bash"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     bashNode.innerHTML = DOMConsole.BASH_TEMPLATE; 
															 | 
															
															 | 
															
																     bashNode.innerHTML = DOMConsole.BASH_TEMPLATE; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.termDiv = bashNode.querySelector("#ivprog-term"); 
															 | 
															
															 | 
															
																     this.termDiv = bashNode.querySelector("#ivprog-term"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.termDiv.classList.add("ivprog-term-div"); 
															 | 
															
															 | 
															
																     this.termDiv.classList.add("ivprog-term-div"); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -117,23 +116,29 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.parent.append(bashNode); 
															 | 
															
															 | 
															
																     this.parent.append(bashNode); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.inputCMD = this.inputDiv.querySelector("#cmd"); 
															 | 
															
															 | 
															
																     this.inputCMD = this.inputDiv.querySelector("#cmd"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.cursorRef = this.inputCMD.querySelector("#cursor"); 
															 | 
															
															 | 
															
																     this.cursorRef = this.inputCMD.querySelector("#cursor"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.inputSpan = this.inputCMD.querySelector('span'); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.clearBtn = bashNode.querySelector('#ivprog-console-clearbtn'); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.hideBtn = bashNode.querySelector('#ivprog-console-hidebtn'); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.showBtn = bashNode.querySelector('#ivprog-console-showbtn'); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.inputSpan = this.inputCMD.querySelector("span"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.clearBtn = bashNode.querySelector("#ivprog-console-clearbtn"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.hideBtn = bashNode.querySelector("#ivprog-console-hidebtn"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.showBtn = bashNode.querySelector("#ivprog-console-showbtn"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this._setupCursor(); 
															 | 
															
															 | 
															
																     this._setupCursor(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     //Jquery tooltips.... 
															 | 
															
															 | 
															
																     //Jquery tooltips.... 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    window.$(this.clearBtn).popup({content:LocalizedStrings.getUI("tooltip_terminal_clear")}); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    window.$(this.showBtn).popup({content:LocalizedStrings.getUI("tooltip_terminal_show")}); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    window.$(this.hideBtn).popup({content:LocalizedStrings.getUI("tooltip_terminal_hide")}); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    window 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      .$(this.clearBtn) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      .popup({ content: LocalizedStrings.getUI("tooltip_terminal_clear") }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    window 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      .$(this.showBtn) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      .popup({ content: LocalizedStrings.getUI("tooltip_terminal_show") }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    window 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      .$(this.hideBtn) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      .popup({ content: LocalizedStrings.getUI("tooltip_terminal_hide") }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   _setupCursor () { 
															 | 
															
															 | 
															
																   _setupCursor () { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.inputCMD.addEventListener('click', this.blinkCaretAndFocus.bind(this)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.inputCMD.addEventListener("click", this.blinkCaretAndFocus.bind(this)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     //this.inputCMD.click(); 
															 | 
															
															 | 
															
																     //this.inputCMD.click(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.input.addEventListener('keyup', this.updateSpanText.bind(this)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.input.addEventListener('blur', this.stopBlinkCaret.bind(this)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.input.addEventListener("keyup", this.updateSpanText.bind(this)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.input.addEventListener("blur", this.stopBlinkCaret.bind(this)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   blinkCaretAndFocus () { 
															 | 
															
															 | 
															
																   blinkCaretAndFocus () { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -142,34 +147,37 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     } 
															 | 
															
															 | 
															
																     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.input.focus(); 
															 | 
															
															 | 
															
																     this.input.focus(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.cursorInterval = window.setInterval(() => { 
															 | 
															
															 | 
															
																     this.cursorInterval = window.setInterval(() => { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      if (this.cursorRef.style.visibility === 'visible') { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        this.cursorRef.style.visibility = 'hidden'; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      if (this.cursorRef.style.visibility === "visible") { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        this.cursorRef.style.visibility = "hidden"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       } else { 
															 | 
															
															 | 
															
																       } else { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        this.cursorRef.style.visibility = 'visible'; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        this.cursorRef.style.visibility = "visible"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       } 
															 | 
															
															 | 
															
																       } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     }, 500); 
															 | 
															
															 | 
															
																     }, 500); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   updateSpanText () { 
															 | 
															
															 | 
															
																   updateSpanText () { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.inputSpan.innerHTML = this.input.value; 
															 | 
															
															 | 
															
																     this.inputSpan.innerHTML = this.input.value; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    if (this.idleInterval != null) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      window.clearInterval(this.idleInterval); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.scheduleNotify() 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    if (this.idleInterval != null) window.clearInterval(this.idleInterval); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.scheduleNotify(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   stopBlinkCaret () { 
															 | 
															
															 | 
															
																   stopBlinkCaret () { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     clearInterval(this.cursorInterval); 
															 | 
															
															 | 
															
																     clearInterval(this.cursorInterval); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.cursorInterval = null; 
															 | 
															
															 | 
															
																     this.cursorInterval = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.cursorRef.style.visibility = 'visible'; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.cursorRef.style.visibility = "visible"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   notifyListeners (text) { 
															 | 
															
															 | 
															
																   notifyListeners (text) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.inputListeners.forEach(resolve => resolve(text)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.inputListeners.forEach((resolve) => resolve(text)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.inputListeners.splice(0, this.inputListeners.length); 
															 | 
															
															 | 
															
																     this.inputListeners.splice(0, this.inputListeners.length); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.hideInput(); 
															 | 
															
															 | 
															
																     this.hideInput(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.anyKey = false; 
															 | 
															
															 | 
															
																     this.anyKey = false; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+  writeRawHTML (text, channel) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this._appendTextLn(text, channel, false); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+  } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   write (text, newLine = false) { 
															 | 
															
															 | 
															
																   write (text, newLine = false) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this._appendText(text, DOMConsole.USER, newLine); 
															 | 
															
															 | 
															
																     this._appendText(text, DOMConsole.USER, newLine); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -183,6 +191,7 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   async _appendText (text, type, newLine = false) { 
															 | 
															
															 | 
															
																   async _appendText (text, type, newLine = false) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    console.debug("Caling appendText"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     const write_time = Date.now(); 
															 | 
															
															 | 
															
																     const write_time = Date.now(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.pending_writes.push(0); 
															 | 
															
															 | 
															
																     this.pending_writes.push(0); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     await Utils.sleep(5); 
															 | 
															
															 | 
															
																     await Utils.sleep(5); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -190,13 +199,13 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     if (this.last_clear >= write_time) { 
															 | 
															
															 | 
															
																     if (this.last_clear >= write_time) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       return; 
															 | 
															
															 | 
															
																       return; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     } 
															 | 
															
															 | 
															
																     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-     
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     if (this.currentLine == null) { 
															 | 
															
															 | 
															
																     if (this.currentLine == null) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       const divClass = this.getClassForType(type); 
															 | 
															
															 | 
															
																       const divClass = this.getClassForType(type); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      const textDiv = document.createElement('div'); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      const textDiv = document.createElement("div"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       textDiv.classList.add(divClass); 
															 | 
															
															 | 
															
																       textDiv.classList.add(divClass); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       this.termDiv.insertBefore(textDiv, this.inputDiv); 
															 | 
															
															 | 
															
																       this.termDiv.insertBefore(textDiv, this.inputDiv); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      this.currentLine = textDiv 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      this.currentLine = textDiv; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     } 
															 | 
															
															 | 
															
																     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.currentLine.innerHTML += this.getOutputText(text); 
															 | 
															
															 | 
															
																     this.currentLine.innerHTML += this.getOutputText(text); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     if (newLine) { 
															 | 
															
															 | 
															
																     if (newLine) { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -215,12 +224,10 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       return; 
															 | 
															
															 | 
															
																       return; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     } 
															 | 
															
															 | 
															
																     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     const divClass = this.getClassForType(type); 
															 | 
															
															 | 
															
																     const divClass = this.getClassForType(type); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    const textDiv = document.createElement('div'); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    const textDiv = document.createElement("div"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     textDiv.classList.add(divClass); 
															 | 
															
															 | 
															
																     textDiv.classList.add(divClass); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    if (filter) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      textDiv.innerHTML = this.getOutputText(text); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    else 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      textDiv.innerHTML = `<span>${text}</span>`; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    if (filter) textDiv.innerHTML = this.getOutputText(text); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    else textDiv.innerHTML = `<span>${text}</span>`; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.termDiv.insertBefore(textDiv, this.inputDiv); 
															 | 
															
															 | 
															
																     this.termDiv.insertBefore(textDiv, this.inputDiv); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.currentLine = null; 
															 | 
															
															 | 
															
																     this.currentLine = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.scrollTerm(); 
															 | 
															
															 | 
															
																     this.scrollTerm(); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -235,7 +242,7 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       return; 
															 | 
															
															 | 
															
																       return; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     } 
															 | 
															
															 | 
															
																     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     const divClass = this.getClassForType(DOMConsole.INPUT); 
															 | 
															
															 | 
															
																     const divClass = this.getClassForType(DOMConsole.INPUT); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    const textDiv = document.createElement('div'); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    const textDiv = document.createElement("div"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     textDiv.innerHTML = this.getUserInputText(text); 
															 | 
															
															 | 
															
																     textDiv.innerHTML = this.getUserInputText(text); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     textDiv.classList.add(divClass); 
															 | 
															
															 | 
															
																     textDiv.classList.add(divClass); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.termDiv.insertBefore(textDiv, this.inputDiv); 
															 | 
															
															 | 
															
																     this.termDiv.insertBefore(textDiv, this.inputDiv); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -261,7 +268,7 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   focus () { 
															 | 
															
															 | 
															
																   focus () { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.termDiv.style.display = 'block'; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.termDiv.style.display = "block"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     // Is in draggable mode? 
															 | 
															
															 | 
															
																     // Is in draggable mode? 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     if (!this.disableMarginTop && this.parent.style.top.length == 0) { 
															 | 
															
															 | 
															
																     if (!this.disableMarginTop && this.parent.style.top.length == 0) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       this.parent.style.marginTop = "-160px"; 
															 | 
															
															 | 
															
																       this.parent.style.marginTop = "-160px"; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -285,7 +292,7 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     if (!this.disableMarginTop && this.parent.style.top.length == 0) { 
															 | 
															
															 | 
															
																     if (!this.disableMarginTop && this.parent.style.top.length == 0) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       this.parent.style.marginTop = "0"; 
															 | 
															
															 | 
															
																       this.parent.style.marginTop = "0"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     } 
															 | 
															
															 | 
															
																     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.termDiv.style.display = 'none'; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.termDiv.style.display = "none"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   getClassForType (type) { 
															 | 
															
															 | 
															
																   getClassForType (type) { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -302,15 +309,18 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   dispose () { 
															 | 
															
															 | 
															
																   dispose () { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.input.removeEventListener('keyup', this.updateSpanText.bind(this)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.input.removeEventListener('blur', this.stopBlinkCaret.bind(this)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.input.removeEventListener('keydown', this.registerInput.bind(this)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.inputCMD.removeEventListener('click', this.blinkCaretAndFocus.bind(this)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.clearBtn.removeEventListener('click', this.clearBtnClick.bind(this)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.hideBtn.removeEventListener('click', this.hideBtnClick.bind(this)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.showBtn.removeEventListener('click', this.showBtnClick.bind(this)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.input.removeEventListener("keyup", this.updateSpanText.bind(this)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.input.removeEventListener("blur", this.stopBlinkCaret.bind(this)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.input.removeEventListener("keydown", this.registerInput.bind(this)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.inputCMD.removeEventListener( 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      "click", 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      this.blinkCaretAndFocus.bind(this) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    ); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.clearBtn.removeEventListener("click", this.clearBtnClick.bind(this)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.hideBtn.removeEventListener("click", this.hideBtnClick.bind(this)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.showBtn.removeEventListener("click", this.showBtnClick.bind(this)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.input = null; 
															 | 
															
															 | 
															
																     this.input = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.inputCMD =  null; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.inputCMD = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.inputDiv = null; 
															 | 
															
															 | 
															
																     this.inputDiv = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.termDiv = null; 
															 | 
															
															 | 
															
																     this.termDiv = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.inputSpan = null; 
															 | 
															
															 | 
															
																     this.inputSpan = null; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -331,7 +341,7 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   showInput () { 
															 | 
															
															 | 
															
																   showInput () { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.needInput = true; 
															 | 
															
															 | 
															
																     this.needInput = true; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.inputDiv.style.display = 'block'; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.inputDiv.style.display = "block"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.inputCMD.click(); 
															 | 
															
															 | 
															
																     this.inputCMD.click(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     //this.inputCMD.scrollIntoView(); 
															 | 
															
															 | 
															
																     //this.inputCMD.scrollIntoView(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.scrollTerm(); 
															 | 
															
															 | 
															
																     this.scrollTerm(); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -339,50 +349,49 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   hideInput () { 
															 | 
															
															 | 
															
																   hideInput () { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.needInput = false; 
															 | 
															
															 | 
															
																     this.needInput = false; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.inputDiv.style.display = ' none'; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.inputDiv.style.display = " none"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     clearInterval(this.cursorInterval); 
															 | 
															
															 | 
															
																     clearInterval(this.cursorInterval); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.cursorInterval = null; 
															 | 
															
															 | 
															
																     this.cursorInterval = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   requestInput (anyKey = false) { 
															 | 
															
															 | 
															
																   requestInput (anyKey = false) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    const promise = new Promise( (resolve, _) => { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    const promise = new Promise((resolve, _) => { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       this.inputListeners.push(resolve); 
															 | 
															
															 | 
															
																       this.inputListeners.push(resolve); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       this.anyKey = anyKey; 
															 | 
															
															 | 
															
																       this.anyKey = anyKey; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      if (this.idleInterval == null) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        this.scheduleNotify(); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      if (this.idleInterval == null) this.scheduleNotify(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       this.showInput(); 
															 | 
															
															 | 
															
																       this.showInput(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     }); 
															 | 
															
															 | 
															
																     }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     return promise; 
															 | 
															
															 | 
															
																     return promise; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   sendOutput (text) { 
															 | 
															
															 | 
															
																   sendOutput (text) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    console.debug(text); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    let output = ""+text; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    if (output.indexOf('\n') !== -1) { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      console.debug("newline"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      const outputList = output.split('\n'); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    // console.debug(text); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    let output = "" + text; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    if (output.indexOf("\n") !== -1) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      // console.debug("newline"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      const outputList = output.split("\n"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       let i = 0; 
															 | 
															
															 | 
															
																       let i = 0; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      for ( ; i < outputList.length - 1; i += 1) { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        console.debug("newline write"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      for (; i < outputList.length - 1; i += 1) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        // console.debug("newline write"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         let t = outputList[i]; 
															 | 
															
															 | 
															
																         let t = outputList[i]; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        t = t.replace(/\t/g,'  '); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        t = t.replace(/\s/g," "); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        if (t.length == 0) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-          t = " " 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        this.write(t, true); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        t = t.replace(/\t/g, "  "); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        t = t.replace(/\s/g, " "); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        if (t.length == 0) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+          // t = " "; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+          // console.debug('Empty string'); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+          this.currentLine = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } else this.write(t, true); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       } 
															 | 
															
															 | 
															
																       } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       let t = outputList[i]; 
															 | 
															
															 | 
															
																       let t = outputList[i]; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      t = t.replace(/\t/g,'  '); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      t = t.replace(/\s/g," "); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      if (t.length != 0) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        this.write(t); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      t = t.replace(/\t/g, "  "); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      t = t.replace(/\s/g, " "); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      if (t.length != 0) this.write(t); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     } else { 
															 | 
															
															 | 
															
																     } else { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      console.debug("no newline"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      output = output.replace(/\t/g,'  '); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      output = output.replace(/\s/g," "); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      // console.debug("no newline"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      output = output.replace(/\t/g, "  "); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      output = output.replace(/\s/g, " "); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       this.write(output); 
															 | 
															
															 | 
															
																       this.write(output); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     } 
															 | 
															
															 | 
															
																     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-     
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   clearPendingWrites () { 
															 | 
															
															 | 
															
																   clearPendingWrites () { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -390,12 +399,14 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   clear () { 
															 | 
															
															 | 
															
																   clear () { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.clearPendingWrites() 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.clearPendingWrites(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     while (this.inputDiv.parentElement.childNodes.length > 1) { 
															 | 
															
															 | 
															
																     while (this.inputDiv.parentElement.childNodes.length > 1) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      this.inputDiv.parentElement.removeChild(this.inputDiv.parentElement.firstChild); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      this.inputDiv.parentElement.removeChild( 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        this.inputDiv.parentElement.firstChild 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      ); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     } 
															 | 
															
															 | 
															
																     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.input.value = ''; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.inputSpan.innerHTML = ''; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.input.value = ""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.inputSpan.innerHTML = ""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.currentLine = null; 
															 | 
															
															 | 
															
																     this.currentLine = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -412,23 +423,26 @@ export class DOMConsole { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   notifyIdle () { 
															 | 
															
															 | 
															
																   notifyIdle () { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.info(LocalizedStrings.getMessage('awaiting_input_message')); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.info(LocalizedStrings.getMessage("awaiting_input_message")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.inputCMD.click(); 
															 | 
															
															 | 
															
																     this.inputCMD.click(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   scheduleNotify () { 
															 | 
															
															 | 
															
																   scheduleNotify () { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.idleInterval = window.setInterval(this.notifyIdle.bind(this), Config.idle_input_interval); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.idleInterval = window.setInterval( 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      this.notifyIdle.bind(this), 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      Config.idle_input_interval 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    ); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   } 
															 | 
															
															 | 
															
																   } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																   cancelPendingInputRequests () { 
															 | 
															
															 | 
															
																   cancelPendingInputRequests () { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.inputListeners.forEach(resolve => resolve('')); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.inputListeners.forEach((resolve) => resolve("")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.inputListeners.splice(0, this.inputListeners.length); 
															 | 
															
															 | 
															
																     this.inputListeners.splice(0, this.inputListeners.length); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     if (this.idleInterval != null) { 
															 | 
															
															 | 
															
																     if (this.idleInterval != null) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       clearInterval(this.idleInterval); 
															 | 
															
															 | 
															
																       clearInterval(this.idleInterval); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       this.idleInterval = null; 
															 | 
															
															 | 
															
																       this.idleInterval = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     } 
															 | 
															
															 | 
															
																     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.input.value = ''; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    this.inputSpan.innerHTML = ''; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.input.value = ""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    this.inputSpan.innerHTML = ""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.currentLine = null; 
															 | 
															
															 | 
															
																     this.currentLine = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.hideInput(); 
															 | 
															
															 | 
															
																     this.hideInput(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     this.anyKey = false; 
															 | 
															
															 | 
															
																     this.anyKey = false; 
															 |