Cache WEB Terminal version 3.1.4 core.
This class is the server-side core of the terminal application.%CSP.WebSocket,%Library.Routine63891,56786.028532
How long to wait for authorization key when connection established5%CharEXEC%CharSQL%CharAC%CharTRACE%CharSTOP_TRACE_ALL%CharCT%CharR%CharE%CharCU%CharU%StringPROMPT#%StringEST#%StringEND#%StringO#%StringOL#%StringNS#%StringAC#%StringR#%StringRC#%StringAUTH#%StringTRACE#%StringSTOP_TRACE#%StringI#%StringCLRSCR#%StringPROMPT_UPDATE#
SharedConnection=0 - The WebSocket server communicates with the client via a dedicated Gateway connection. In this mode of operation the hosting connection is effectively 'private' to the application session.
SharedConnection=1 - The WebSocket server communicates asynchronously with the client via a fixed number of shared Gateway connections.
]]>%Boolean0%String%String%String
Property is used to store watching files/globals. %List
Watch position in file on global%Numeric1
Public point entries, using when redirecting i/o10 len {
Set size=len
Set BytesAvailable=BytesAvailable-len
}
else {
Set size=BytesAvailable
Set BytesAvailable=0
}
If 'BytesAvailable Set AtEnd=1
If size=0 Set len=0 Quit ""
Read data#size
Set len=size
//Set sc=$$$OK
Try { Set data1=$zconvert(data,"I","UTF8") } Catch { Set data1=data }
Set len=$Length(data1)
Quit data1
ReadError
#; No interrupts during cleanup or error processing
$$$SetExternalInterrupts(0)
Set $ZTrap="ReadHalt"
Hang 5
Close 0
ReadHalt
Halt
/// Workaround for Cache 2015
#define WSProtocol (##class(%Dictionary.CompiledProperty).%OpenId("%CSP.WebSocket||WSClassProtocolVersion"))
WriteMessage(data, data1, head)
if ($$$WSProtocol) && ($$$WSProtocol.InitialExpression > 1) {
try { set data1 = $zconvert(data, "O", "UTF8") } catch { set data1 = data }
set head = $ZLChar($Length(data1))
set head = head _ "7"
write head _ data1, *-3
} else {
write $$PrepareOutput(data), *-3
}
quit
//////////////////////////////////////////////
wstr(s)
do ##class(%Device).ReDirectIO($$$NO)
do WriteMessage("O#"_s)
do ##class(%Device).ReDirectIO($$$YES)
set $X = $X + $LENGTH(s)
set $Y = $Y - 1
quit
wchr(c)
do ##class(%Device).ReDirectIO($$$NO)
do WriteMessage("O#"_$c(c))
do ##class(%Device).ReDirectIO($$$YES)
set $X = $X + 1
set $Y = $Y - 1
quit
wnl
do ##class(%Device).ReDirectIO($$$NO)
do WriteMessage("O#"_$c(13, 10))
do ##class(%Device).ReDirectIO($$$YES)
set $X = 0
quit
wff
do ##class(%Device).ReDirectIO($$$NO)
do WriteMessage("CLRSCR#")
do ##class(%Device).ReDirectIO($$$YES)
set $Y = 0
set $X = 0
quit
wtab(s)
do ##class(%Device).ReDirectIO($$$NO)
do WriteMessage("O#" _ $C(27) _ "[" _ (s + 1) _ "G")
do ##class(%Device).ReDirectIO($$$YES)
set $X = s
quit
rstr(len = 32656, timeout = 86400, data)
do ##class(%Device).ReDirectIO($$$NO)
do WriteMessage("R#" _ len)
s data = $$ReadMessage(len, timeout)
do ##class(%Device).ReDirectIO($$$YES)
quit data
rchr(timeout = 86400, data)
do ##class(%Device).ReDirectIO($$$NO)
do WriteMessage("RC#")
set data = $$ReadMessage(, timeout)
set data = data * 1 // $ASCII($EXTRACT(data,1,1))
do ##class(%Device).ReDirectIO($$$YES)
quit data
]]>%Status
Chechs for correct watch source and sets watch target to ..Watches
Returns status of this operationname%Status
Removes watch from watches list
Returns success statusname%Status
Returns a list current watches%String
Return null string if global hadn't been updated
This method watches only for tail of global and detects if global still alivewatch%Stringwatch%String ..WatchesCaret(watch, 0)) {
set output = "updated" _ $CHAR(13, 10)
set stream=##class(%Stream.FileBinary).%New()
set sc=stream.LinkToFile(watch)
do stream.MoveTo(..WatchesCaret(watch, 0) + 1)
set readed = stream.Read(size - ..WatchesCaret(watch, 0))
set output=output_readed
set ..WatchesCaret(watch, 0) = size
set ..WatchesCaret(watch, 1) = file.DateModified
} elseif ((size < ..WatchesCaret(watch, 0)) || (file.DateModified '= ..WatchesCaret(watch, 1))) {
set output = "modified" _ $CHAR(13, 10)
set output = output _ "Bytes changed: " _ (size - ..WatchesCaret(watch, 0))
set ..WatchesCaret(watch, 0) = size
set ..WatchesCaret(watch, 1) = file.DateModified
} // else file not changed
q output
]]>%String%Status1filename:%String,data:%String%Status1namespace:%String%Stringnamespace:%String%Boolean
Generates autocomplete for namespace. Second parameter decides if
it will be regenerated again. But if namespace equals to "%" - generates
autocomplete for system classes. Make sure that autocomplete for
system classes generates one time and forever.
@param genSystem - Shows if system classes need to be generated. namespace:%String,genSystem:%Boolean%String
Returns terminal to default state1%Status
Function sends data derectly to server with specified actionquery:%String="",action:%String=""%Statusquery:%String=""%Status
Sends to client new namespace if last was changed
Starts clear I/O mode
Ends clear I/O mode
This method transforms error 1string:%String%String", "<"), ".Engine.", "<")
quit "ERROR: " _ $PIECE(string, "<", 2) _
$EXTRACT($PIECE(string, "<", 4), 2, *)
]]>version%Status%Status
The heart of terminal applicationquery:%String=""%Status
This method holds process and expects only one package from
the client - it includes authorization key.%Status 100) { // if older than 100 sec
kill ^%WebTerminal.AuthUser(key)
}
SET key = $ORDER(^%WebTerminal.AuthUser(key))
}
if (namespace '= "") {
try { // in case user may specify namespace that does not exists
znspace namespace
} catch (e) { }
}
quit ok
]]>
Main method for every new client.%Status
New connection established: require auth key, login and start client loop.%Status
Importing this class will install Cache WEB Terminal properly.Engine,Router,StaticContent%Projection.AbstractProjection63898,2021.68561163890,71053.144208WebTerminal.RouterInstaller
This method is invoked when a class is compiled.1%Status
This method is invoked when a class is 'uncompiled'.1%Status
The REST interface: class that routes HTTP requestsStaticContent%CSP.REST63890,69646.001045
]]>
Method returns autocomplete data in JSON format1%Status
Calls StaticContent.Write method or sends not modified header. Type have to be "css" or "js"1type:%String,Auth:%String="",ContentType:%String=""1
Method writes application CSS.1%Status
Method writes application theme.1Theme:%String%Status
Method writes application JavaScript.1%Status
Method writes application HTML.1%Status
This class holds whole application static content like scripts and styles.
Do not edit this file - use external tool to generate it.63890,69938.115592
Write the contents of xData tag1Const:%String,Auth:%String%Status
]]>
Caché WEB Terminal
]]]]>
]]>
div{display:table-cell;text-align:center;vertical-align:middle}.terminalContainer .terminalOutputCentralizer>div>div{display:inline-block;text-align:left;position:relative;overflow-y:scroll}.terminalContainer .terminalInput{width:100%;margin:0;padding:0;opacity:0;position:absolute;height:1em;top:-1.5em}.terminalContainer .terminalOutput{white-space:pre;word-wrap:break-word;word-break:break-all;overflow-x:hidden}.terminalContainer .terminalOutput>div{position:relative;overflow:hidden}.terminalContainer .terminalCaret{position:absolute!important;left:0;top:0;animation:blink infinite 1s;-o-animation:blink infinite 1s;-ms-animation:blink infinite 1s;-moz-animation:blink infinite 1s;-webkit-animation:blink infinite 1s}.terminalContainer .terminalCaret:after{position:relative;top:-1px;content:"_"}.terminalContainer .terminalHint{position:absolute!important;left:0;top:0;color:inherit;opacity:.6;text-shadow:1px 1px 4px #000;z-index:10}.terminalContainer .terminalIndicator{position:fixed!important;right:13px;top:7px;border:3px solid #fff;border-radius:30px;height:30px;margin:-15px 0 0 -15px;opacity:0;width:30px;animation:pulsate infinite 1s;-o-animation:pulsate infinite 1s;-ms-animation:pulsate infinite 1s;-moz-animation:pulsate infinite 1s;-webkit-animation:pulsate infinite 1s}]]]]>
]]>
o?(r={},o=this.TYPES[e].priority,this._appendEndings(r,n,this.TYPES[e])):(this.TYPES[e].priority||0)===o&&this._appendEndings(r,n,this.TYPES[e]));for(e in r)s.push(e);return s.sort(function(t,e){return r[t]-r[e]}),s},TerminalAutocomplete.prototype.register=function(t,e,i,n){var r,s=i?this._namespaceTries[i]||(this._namespaceTries[i]={}):this._trie;for(n&&(e=(n||[]).join("\n")+"\n"+e),r=0;r ")},EST:function(){this.EXECUTION_IN_PROGRESS=!0},END:function(){this.EXECUTION_IN_PROGRESS=!1},O:function(t){this.TERMINAL.output.print(t)},OL:function(t){this.TERMINAL.output.print(this._lc.get(t))},NS:function(t){this.setNamespace(t)},AC:function(t){this.mergeAutocompleteFile(t)},R:function(t){this.TERMINAL.input.prompt("",t)},RC:function(){var t=this;this.TERMINAL.input.getChar(function(e){t.server.send(e)})},AUTH:function(t){"1"===t?this.authorized():this.TERMINAL.output.printSync(this._lc.get(22)+"\r\n")},TRACE:function(t){this.trace.start(t)},STOP_TRACE:function(t){this.trace.stop(t)},I:function(t){this.TERMINAL.output.print(t+"\r\n")},CLRSCR:function(){this.TERMINAL.output.clear()},PROMPT_UPDATE:function(t){var e=this,i=t.split("#"),n=i[1],r=parseInt(i[0]),s=i[2]||"";return n&&r?void(r>this.TERMINAL.RELEASE_NUMBER?(this.TERMINAL.output.print(this._lc.get(23)+"\r\n"),this.TERMINAL.input.prompt("",1,function(t){""===t||"y"===t.toLowerCase()?(e.TERMINAL.output.print(" "+e._lc.get(24)+"\r\n"),s&&e.TERMINAL.output.print("\r\n"+s+"\r\n\r\n"),e.server.send(e.SERVER_ACTION.UPDATE+n)):e.clientAction.PROMPT.call(e,e.NAMESPACE)})):(this.TERMINAL.output.print(this._lc.get(25)+"\r\n"),this.clientAction.PROMPT.call(this,this.NAMESPACE))):void console.error("Unable to parse version data: ",t)}},TerminalController.prototype.serverData=function(t){var e=t.split("#",1)[0],i=t.substr(e.length+1);this.clientAction.hasOwnProperty(e)?this.clientAction[e].call(this,i):(this.TERMINAL.output.print(t),console.error("Server response unrecognised:",t))};var TerminalDefinitions=function(t){this.TERMINAL=t,this._storage={},this.initialize()};TerminalDefinitions.prototype.STORAGE_NAME="terminal-definitions",TerminalDefinitions.prototype.initialize=function(){var t=this,e=this.TERMINAL.storage.get(this.STORAGE_NAME);window.addEventListener("beforeunload",function(){t.TERMINAL.storage.set(t.STORAGE_NAME,t.exportJSON())}),e&&this.importJSON(e)},TerminalDefinitions.prototype.define=function(t,e){this._storage[t]=e},TerminalDefinitions.prototype.clear=function(){this._storage={}},TerminalDefinitions.prototype.getList=function(){var t,e=[];for(t in this._storage)e.push(t);return e},TerminalDefinitions.prototype.replace=function(t){var e;for(e in this._storage)t=t.replace(e,this._storage[e]);return t},TerminalDefinitions.prototype.importJSON=function(t){var e,i;try{e=JSON.parse(t);for(i in this)this.hasOwnProperty(i)&&(this[i]=e[i]||this[i])}catch(n){console.error(n)}},TerminalDefinitions.prototype.exportJSON=function(){return JSON.stringify({_storage:this._storage})};var TerminalElements=function(t){this.terminal=document.createElement("div"),this.output=document.createElement("div"),this.input=document.createElement("input"),this.themeLink=document.createElement("link"),this._initialize(t)};TerminalElements.prototype._initialize=function(t){var e=document.createElement("div"),i=document.createElement("div");this.terminal.className="terminalContainer",e.className="terminalOutputCentralizer",this.input.className="terminalInput",this.output.className="terminalOutput",this.terminal.appendChild(this.input),i.appendChild(this.output),e.appendChild(i),this.terminal.appendChild(e),t.appendChild(this.terminal),this.themeLink.id="terminal-theme",this.themeLink.setAttribute("rel","stylesheet"),this.terminal.appendChild(this.themeLink)};var TerminalFavorites=function(t){this.TERMINAL=t,this._storage={},this.initialize()};TerminalFavorites.prototype.STORAGE_NAME="terminal-favorites",TerminalFavorites.prototype.initialize=function(){var t=this,e=this.TERMINAL.storage.get(this.STORAGE_NAME);window.addEventListener("beforeunload",function(){t.TERMINAL.storage.set(t.STORAGE_NAME,t.exportJSON())}),e&&this.importJSON(e)},TerminalFavorites.prototype.set=function(t,e){this._storage[t]=e},TerminalFavorites.prototype.get=function(t){return this._storage[t]||""},TerminalFavorites.prototype.getList=function(){var t,e=[];for(t in this._storage)e.push(t);return e},TerminalFavorites.prototype.importJSON=function(t){var e,i;try{e=JSON.parse(t);for(i in this)this.hasOwnProperty(i)&&(this[i]=e[i]||this[i])}catch(n){console.error(n)}},TerminalFavorites.prototype.exportJSON=function(){return JSON.stringify({_storage:this._storage})};var TerminalHint=function(t){this.TERMINAL=t,this.element=document.createElement("div"),this.initialize()};TerminalHint.prototype.initialize=function(){this.element.className="terminalHint"},TerminalHint.prototype.show=function(t,e,i){this.element.innerHTML=i,this.element.style.top=this.TERMINAL.output.getLineByIndex(e).getElement().offsetTop+"px",this.element.style.left=(t-1)*this.TERMINAL.output.SYMBOL_PIXEL_WIDTH+"px",this.TERMINAL.elements.output.appendChild(this.element)},TerminalHint.prototype.hide=function(){this.element.parentNode&&this.element.parentNode.removeChild(this.element)};var TerminalIndicator=function(t){this.TERMINAL=t,this.element=document.createElement("div"),this.initialize()};TerminalIndicator.prototype.initialize=function(){this.element.className="terminalIndicator"},TerminalIndicator.prototype.show=function(){this.TERMINAL.elements.output.appendChild(this.element)},TerminalIndicator.prototype.hide=function(){this.element.parentNode&&this.element.parentNode.removeChild(this.element)};var TerminalInitialDictionary=function(){this.KEYWORDS={"break":0,"catch":0,close:0,"continue":0,"do":0,d:0,"else":0,elseif:0,"for":0,"goto":0,halt:0,hang:0,h:0,"if":0,job:0,j:0,kill:0,k:0,lock:0,l:0,merge:0,"new":0,open:0,quit:0,q:0,read:0,r:0,"return":0,set:0,s:0,tcommit:0,"throw":0,trollback:0,"try":0,tstart:0,use:0,view:0,"while":0,write:0,w:0,xecute:0,x:0,zkill:0,znspace:0,zn:0,ztrap:0,zwrite:0,zw:0,zzdump:0,zzwrite:0,print:0,zbreak:0,zinsert:0,zload:0,zprint:0,zremove:0,zsave:0,zzprint:0,mv:0,mvcall:0,mvcrt:0,mvdim:0,mvprint:0,zquit:0,zsync:0,ascii:0,$bit:0,$bitcount:0,$bitfind:0,$bitlogic:0,$case:0,$char:0,$classmethod:0,$classname:0,$compile:0,$data:0,$decimal:0,$double:0,$extract:0,$factor:0,$find:0,$fnumber:0,$get:0,$increment:0,$inumber:0,$isobject:0,$isvaliddouble:0,$isvalidnum:0,$justify:0,$length:0,$list:0,$listbuild:0,$listdata:0,$listfind:0,$listfromstring:0,$listget:0,$listlength:0,$listnext:0,$listsame:0,$listtostring:0,$listvalid:0,$locate:0,$match:0,$method:0,$name:0,$nconvert:0,$next:0,$normalize:0,$now:0,$number:0,$order:0,$parameter:0,$piece:0,$prefetchoff:0,$prefetchon:0,$property:0,$qlength:0,$qsubscript:0,$query:0,$random:0,$replace:0,$reverse:0,$sconvert:0,$select:0,$sortbegin:0,$sortend:0,$stack:0,$text:0,$translate:0,$view:0,$wascii:0,$wchar:0,$wextract:0,$wfind:0,$wiswide:0,$wlength:0,$wreverse:0,$xecute:0,$zabs:0,$zarccos:0,$zarcsin:0,$zarctan:0,$zcos:0,$zcot:0,$zcsc:0,$zdate:0,$zdateh:0,$zdatetime:0,$zdatetimeh:0,$zexp:0,$zhex:0,$zln:0,$zlog:0,$zpower:0,$zsec:0,$zsin:0,$zsqr:0,$ztan:0,$ztime:0,$ztimeh:0,$zboolean:0,$zconvert:0,$zcrc:0,$zcyc:0,$zdascii:0,$zdchar:0,$zf:0,$ziswide:0,$zlascii:0,$zlchar:0,$zname:0,$zposition:0,$zqascii:0,$zqchar:0,$zsearch:0,$zseek:0,$zstrip:0,$zwascii:0,$zwchar:0,$zwidth:0,$zwpack:0,$zwbpack:0,$zwunpack:0,$zwbunpack:0,$zzenkaku:0,$change:0,$mv:0,$mvat:0,$mvfmt:0,$mvfmts:0,$mviconv:0,$mviconvs:0,$mvinmat:0,$mvlover:0,$mvoconv:0,$mvoconvs:0,$mvraise:0,$mvtrans:0,$mvv:0,$mvname:0,$zbitand:0,$zbitcount:0,$zbitfind:0,$zbitget:0,$zbitlen:0,$zbitnot:0,$zbitor:0,$zbitset:0,$zbitstr:0,$zbitxor:0,$zincrement:0,$znext:0,$zorder:0,$zprevious:0,$zsort:0,device:0,$ecode:0,$estack:0,$etrap:0,$halt:0,$horolog:0,$io:0,$job:0,$key:0,$namespace:0,$principal:0,$quit:0,$roles:0,$storage:0,$system:0,$test:0,$this:0,$tlevel:0,$username:0,$x:0,$y:0,$za:0,$zb:0,$zchild:0,$zeof:0,$zeos:0,$zerror:0,$zhorolog:0,$zio:0,$zjob:0,$zmode:0,$znspace:0,$zparent:0,$zpi:0,$zpos:0,$zreference:0,$zstorage:0,$ztimestamp:0,$ztimezone:0,$ztrap:0,$zversion:0,"##class":0}},TerminalInput=function(t){this.TERMINAL=t,this.ENABLED=!1,this.history=new TerminalInputHistory(this),this.caret=new TerminalInputCaret(this),this._autocompleteVariants=[],this._currentAutocompleteVariant=0,this._autocompleteHint=new TerminalHint(this.TERMINAL),this.__inputLastLength=0,this._handler=null,this.__readingChar=!1,this.INITIAL_POSITION={line:0,position:0},this.initialize()};TerminalInput.prototype.initialize=function(){var t=this;window.addEventListener("keypress",function(){t.ENABLED&&document.activeElement!==t.TERMINAL.elements.input&&t.focus()}),this.TERMINAL.elements.terminal.addEventListener("touchend",function(e){t.ENABLED&&document.getSelection().isCollapsed&&(e.preventDefault(),t.focus())}),this.TERMINAL.elements.input.addEventListener("input",function(){t.ENABLED&&t._onInput();
}),this.TERMINAL.elements.input.addEventListener("keydown",function(e){t.ENABLED&&t.keyDown(e)})},TerminalInput.prototype.focus=function(){this.TERMINAL.elements.input.blur(),this.TERMINAL.elements.input.focus()},TerminalInput.prototype.set=function(t){var e=this.TERMINAL.elements.input;e.value=t,this.setCaretPosition(e.value.length),this._onInput()},TerminalInput.prototype._enable=function(){this.ENABLED=!0,this.TERMINAL.elements.input.removeAttribute("disabled"),this.focus(),this.caret.update()},TerminalInput.prototype._disable=function(){this.TERMINAL.elements.input.setAttribute("disabled",""),this.ENABLED=!1,this.caret.hide()},TerminalInput.prototype.getCaretPosition=function(){return"undefined"!=typeof this.TERMINAL.elements.input.selectionStart?this.TERMINAL.elements.input.selectionStart:this.TERMINAL.elements.input.value.length},TerminalInput.prototype.get=function(){return this.TERMINAL.elements.input.value},TerminalInput.prototype.setCaretPosition=function(t){this.TERMINAL.elements.input.selectionStart=this.TERMINAL.elements.input.selectionEnd=t},TerminalInput.prototype.complete=function(){var t=this.getCurrentAutocompleteVariant(),e=this.getCaretPosition();t&&(this.set(this.get().splice(e,0,t)),this.setCaretPosition(e+t.length),this._onInput())},TerminalInput.prototype.getCurrentAutocompleteVariant=function(){return this._autocompleteVariants[this._currentAutocompleteVariant]||""},TerminalInput.prototype._changeAutocompleteVariant=function(t){this._currentAutocompleteVariant=(this._currentAutocompleteVariant+t)%this._autocompleteVariants.length||0,this._currentAutocompleteVariant<0&&(this._currentAutocompleteVariant+=this._autocompleteVariants.length||0),this._updateAutocompleteView()},TerminalInput.prototype._updateAutocompleteView=function(){var t=this.getCurrentAutocompleteVariant();return t?void this._autocompleteHint.show((this.INITIAL_POSITION.position+this.getCaretPosition())%this.TERMINAL.output.WIDTH+1,this.INITIAL_POSITION.line+Math.floor((this.INITIAL_POSITION.position+this.getCaretPosition())/this.TERMINAL.output.WIDTH),t):void this._autocompleteHint.hide()},TerminalInput.prototype.clearAutocompleteVariants=function(){this._autocompleteVariants=[],this._currentAutocompleteVariant=0},TerminalInput.prototype._onInput=function(){var t,e,i,n="",r=this.TERMINAL.elements.input.value,s=r.length;for(this.TERMINAL.settings.AUTOCOMPLETE&&(this._autocompleteVariants=this.TERMINAL.autocomplete.getEndings(r.substring(0,this.getCaretPosition())),this._changeAutocompleteVariant(0)),this.TERMINAL.output.printAtLine(this.TERMINAL.settings.HIGHLIGHT_INPUT?this.TERMINAL.parser.highlightSyntax(r,this.TERMINAL.theme.getCurrentTheme()):r,this.INITIAL_POSITION.line,this.INITIAL_POSITION.position,!1),t=0;tthis.MAX_STACK_SIZE&&this._history.splice(0,1),void(this._currentPosition=this._history.length-1))},TerminalInputHistory.prototype.getCurrent=function(){return this._history[this._currentPosition]||""},TerminalInputHistory.prototype.load=function(t){return this._currentPosition+=t,this._currentPosition<0&&(this._currentPosition=history.length-1),this._currentPosition>=history.length&&(this._currentPosition=0),this.getCurrent()};var TerminalLocalization=function(t){var e=this._TERMINAL=t;this.AVAILABLE_LOCALIZATIONS={en:"en",ru:"ru"},this._currentLocalization=this.AVAILABLE_LOCALIZATIONS.en,this._LOCALIZATION_BASE={1:{en:"Cach\xe9 WEB Terminal v"+e.VERSION+"\r\n\r\n\x1B[4mAvailable commands:\x1B[0m\r\n\x1B[33m/help\x1B[0m\x1B[32GShow the help information you are reading now.\r\n\x1B[33m/autocomplete\x1B[0m [sys]\x1B[32GPerforms autocomplete data loading. The system autocomplete file will be generated only the first time command execute. To generate system autocomplete again, use \x1B[1msys\x1B[0m parameter.\r\n\x1B[33m/echo\x1B[0m [param1] [param2] ...\x1B[32GEcho each argument of this command.\r\n\x1B[33m/trace\x1B[0m [global/filePath]\x1B[32GStart tracing global or file. To stop tracing, enter command without arguments. To stop tracing particular file or global, enter trace command again.\r\n\x1B[33m/sql\x1B[0m\x1B[32GEnter or exit SQL mode.\r\n\x1B[33m/reset\x1B[0m\x1B[32GReset terminal application to defaults.\r\n{command} \x1B[33m/favorite\x1B[0m {phrase}\x1B[32GSave command for future use.\r\n\x1B[33m/favorite\x1B[0m {phrase}\x1B[32GLoad previously saved command.\r\n{definition} \x1B[33m/define\x1B[0m {phrase}\x1B[32GReplace each next {phrase} with {definition}. To get more information, call command without parameters.\r\n\x1B[33m/version\x1B[0m\x1B[32GOutput terminal application version.\r\n\x1B[33m/update\x1B[0m\x1B[32GCheck for updates and prompt to update if new version available.\r\n\x1B[33m/settings\x1B[0m\x1B[32GShow or change terminal settings.\r\n\x1B[33m/about\x1B[0m\x1B[32GProject information.\r\n\r\n\x1B[4mControl keys:\x1B[0m\r\n\x1B[33mTAB\x1B[0m\x1B[32GComplete input if autocomplete variant available.\r\n\x1B[33mCTRL\x1B[0m\x1B[32GLeft/right control will switch next/previous available autocomplete variant.\r\n",ru:"Cach\xe9 WEB Terminal v"+e.VERSION+"\r\n\r\n\x1B[4m\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:\x1B[0m\r\n\x1B[33m/help\x1B[0m\x1B[32G\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u043f\u043e\u043c\u0430\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0447\u0438\u0442\u0430\u0435\u0442\u0435.\r\n\x1B[33m/autocomplete\x1B[0m [sys]\x1B[32G\u041f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0424\u0430\u0439\u043b\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u043d\u0435\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0432\u0430\u0448 \u043a\u043e\u0434 \u0438\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \x1B[1msys\x1B[0m.\r\n\x1B[33m/echo\x1B[0m [\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u04401] [\u0432\u0442\u043e\u0440\u043e\u0439] ...\x1B[32G\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.\r\n\x1B[33m/trace\x1B[0m [\u0433\u043b\u043e\u0431\u0430\u043b/\u043f\u0443\u0442\u044c]\x1B[32G\u041d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0437\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \u0438\u043b\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u0435. \u0427\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0442\u044c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0437\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0435\u0449\u0451 \u0440\u0430\u0437. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0431\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0437\u0430 \u0432\u0441\u0435\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u0430\u043c\u0438.\r\n\x1B[33m/sql\x1B[0m\x1B[32G\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u0438\u043b\u0438 \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 SQL-\u0440\u0435\u0436\u0438\u043c\u0430.\r\n\x1B[33m/reset\x1B[0m\x1B[32G\u0412\u0435\u0440\u043d\u0443\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0432 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435.\r\n{\u043a\u043e\u043c\u0430\u043d\u0434\u0430} \x1B[33m/favorite\x1B[0m {\u0444\u0440\u0430\u0437\u0430}\x1B[32G\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.\r\n\x1B[33m/favorite\x1B[0m {\u0444\u0440\u0430\u0437\u0430}\x1B[32G\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u0440\u0430\u043d\u0435\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443.\r\n{\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435} \x1B[33m/define\x1B[0m {\u0444\u0440\u0430\u0437\u0430}\x1B[32G\u0417\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u0443\u0436\u0434\u0443\u044e {\u0444\u0440\u0430\u0437\u0443} {\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c}. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0432\u044b\u0437\u043e\u0432\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0431\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432.\r\n\x1B[33m/version\x1B[0m\x1B[32G\u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0432\u0435\u0440\u0441\u0438\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430.\r\n\x1B[33m/update\x1B[0m\x1B[32G\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 \u0438 \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f.\r\n\x1B[33m/settings\x1B[0m\x1B[32G\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430.\r\n\x1B[33m/about\x1B[0m\x1B[32G\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0435.\r\n\r\n\x1B[4m\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438:\x1B[0m\r\n\x1B[33mTAB\x1B[0m\x1B[32G\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0432\u0432\u043e\u0434, \u0435\u0441\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.\r\n\x1B[33mCTRL\x1B[0m\x1B[32G\u041b\u0435\u0432\u044b\u0439/\u043f\u0440\u0430\u0432\u044b\u0439 CTRL \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u0442 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443/\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u043c\u0443 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0443 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.\r\n"},2:{en:"Connection to Cach\xe9 Server established.",ru:"\u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c Cach\xe9 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e."},3:{en:"Unable to send data to server.",ru:"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440."},4:{en:"WebSocket connection closed. Code %n, reason: %s.",ru:"\u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 WebSocket \u0437\u0430\u043a\u0440\u044b\u0442\u043e. \u041a\u043e\u0434 %n, \u043f\u0440\u0438\u0447\u0438\u043d\u0430: %s."},5:{en:"Unable to trace %s.",ru:"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0437\u0430 %s."},6:{en:"WebSocket connection error (%s). Trying to connect again in %n seconds...",ru:"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f WebSocket (%s). \u041f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 %n \u0441\u0435\u043a\u0443\u043d\u0434..."},7:{en:"Start tracing %s.",ru:"\u041d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0437\u0430 %s \u043d\u0430\u0447\u0430\u0442\u043e."},8:{en:"Stop tracing %s.",ru:"\u041d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0437\u0430 %s \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u043e."},9:{en:"Refresh page to apply reset.",ru:"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0431\u0440\u043e\u0441."},10:{en:"Authorization successful.",ru:"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e."},11:{en:"Usage:\r\n{your command} \x1B[1m/favorite\x1B[0m {name}\x1B[35GTo save command.\r\n\x1B[1m/favorite\x1B[0m {name} \x1B[35GTo load command.\r\nPreviously saved names: %s.",ru:"\u0423\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435:\r\n{\u043a\u043e\u043c\u0430\u043d\u0434\u0430} \x1B[1m/favorite\x1B[0m {\u0438\u043c\u044f}\x1B[35G\u0414\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b.\r\n\x1B[1m/favorite\x1B[0m {\u0438\u043c\u044f} \x1B[35G\u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.\r\n\u0420\u0430\u043d\u0435\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e\u0434 \u0438\u043c\u0435\u043d\u0430\u043c\u0438: %s."},12:{en:'No command saved for "%s".\r\nPreviously saved: %s.',ru:'\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c "%s" \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0430.\r\n\u0420\u0430\u043d\u0435\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435: %s.'},13:{en:"%s\x1B[1m defined as \x1B[0m%s",ru:"%s\x1B[1m \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u043a\u0430\u043a \x1B[0m%s"},14:{en:"Definitions removed.",ru:"\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u044b."},15:{en:'\x1B[4mUsage:\x1B[0m\r\n\x1B[1m/define\x1B[0m {everything} {phrase}\x1B[35GTo define {phrase} as {everything}.\r\n\x1B[1m/define\x1B[0m clear\x1B[35GClears all definitions.\r\n\x1B[4mExample:\x1B[0m \x1B[2m##class(%Library.File).Exists( \x1B[0m\x1B[1m/define\x1B[0m \x1B[2m?f(\x1B[0m \r\nThis will set shorten expression for checking if file exists. Then, commands like \x1B[2mw ?f("C:")\x1B[0m will be automatically replaced with \x1B[2mw ##class(%Library.File).Exists("C:")\x1B[0m when submitting. To clear definitions, give "clear" parameter.\r\n\x1B[4mList of definitions:\x1B[0m %s.',ru:'\x1B[4m\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435:\x1B[0m\r\n\x1B[1m/define\x1B[0m {\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435} {\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435}\x1B[35G\u041a\u0430\u0436\u0434\u043e\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 {\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f} \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432\u0432\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u043e \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 {\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435}.\r\n\x1B[1m/define\x1B[0m clear\x1B[35G\u0423\u0434\u0430\u043b\u0438\u0442 \u0432\u0441\u0435 \u0440\u0430\u043d\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f.\r\n\x1B[4m\u041f\u0440\u0438\u043c\u0435\u0440:\x1B[0m \x1B[2m##class(%Library.File).Exists( \x1B[0m\x1B[1m/define\x1B[0m \x1B[2m?f(\x1B[0m \r\n\u042d\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430. \u041f\u043e\u0441\u043b\u0435, \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u0438\u0434\u0430 \x1B[2mw ?f("C:")\x1B[0m \u0431\u0443\u0434\u0443\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \x1B[2mw ##class(%Library.File).Exists("C:")\x1B[0m \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435. \u0427\u0442\u043e\u0431\u044b \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u043f\u0435\u0440\u0435\u0434\u0430\u0439\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 "clear".\r\n\x1B[4m\u0421\u043f\u0438\u0441\u043e\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439:\x1B[0m %s.'},16:{en:"Cach\xe9 WEB Terminal v%s\r\nChecking for updates...",ru:"Cach\xe9 WEB Terminal v%s\r\n\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439..."},17:{en:"",ru:""},18:{en:"Merging autocomplete database for %s...",ru:"\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f %s..."},19:{en:"Classes merged: %n",ru:"\u041a\u043b\u0430\u0441\u0441\u043e\u0432 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u043e: %n"},20:{en:"Globals merged: %n",ru:"\u0413\u043b\u043e\u0431\u0430\u043b\u043e\u0432 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u043e: %n"},21:{en:"No autocomplete file found on server. Requesting...",ru:"\u0424\u0430\u0439\u043b \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d. \u0417\u0430\u043f\u0440\u043e\u0441 \u0444\u0430\u0439\u043b\u0430..."},22:{en:"Authorization failed.",ru:"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435 \u0443\u0434\u0430\u043b\u0430\u0441\u044c."
},23:{en:"A new version of Cach\xe9 WEB Terminal available. Would you like to install it? (Y/n)",ru:"\u041d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Cach\xe9 WEB Terminal \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430. \u0425\u043e\u0442\u0438\u0442\u0435 \u043b\u0438 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0451? (Y/n)"},24:{en:"Updating...",ru:"\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435..."},25:{en:"Cach\xe9 WEB Terminal is up-to-date.",ru:"\u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f Cach\xe9 WEB Terminal."},26:{en:"\x1B[4mCurrent settings:\x1B[0m\r\n%s \x1B[25G= %s (available: %s)\r\n%s \x1B[25G= %s (available: %s)\r\n%s \x1B[25G= %s\r\n%s \x1B[25G= %s\r\n%s \x1B[25G= %s\r\nTo change values, enter command with argument \x1B[3m{NAME}={VALUE}\x1B[0m.",ru:"\x1B[4m\u0422\u0435\u043a\u0443\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:\x1B[0m\r\n%s \x1B[25G= %s (\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b: %s)\r\n%s \x1B[25G= %s (\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b: %s)\r\n%s \x1B[25G= %s\r\n%s \x1B[25G= %s\r\n%s \x1B[25G= %s\r\n\u0427\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \x1B[3m{\u0418\u041c\u042f}={\u0417\u041d\u0410\u0427\u0415\u041d\u0418\u0415}\x1B[0m."},27:{en:"Terminal locale changed to %s.",ru:"\u042f\u0437\u044b\u043a \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0438\u0437\u043c\u0435\u043d\u0451\u043d \u043d\u0430 %s."},28:{en:"Unable to change locale to %s.",ru:"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044f\u0437\u044b\u043a \u043d\u0430 %s."},29:{en:"Start generating autocomplete",ru:"\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f"},30:{en:"Wrong namespace:",ru:"\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c:"},31:{en:"Unable to create directory csp/WebTerminal/js/autocomplete.",ru:"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e csp/WebTerminal/js/autocomplete."},32:{en:"Classes scanned:",ru:"\u0421\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432:"},33:{en:"Generation complete.",ru:"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430."},34:{en:"Request",ru:"\u0417\u0430\u043f\u0440\u043e\u0441"},35:{en:"Updating terminal... Connection will be lost, so just reload terminal.",ru:"\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430... \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043e\u0440\u0432\u0430\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b."},36:{en:"Importing and compiling files...",ru:"\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432..."},37:{en:"Clearing temporary files...",ru:"\u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432..."},38:{en:"Client query unrecognized:",ru:"\u0417\u0430\u043f\u0440\u043e\u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0435 \u043e\u043f\u043e\u0437\u043d\u0430\u043d:"},39:{en:"Please, refresh the page to apply updates.",ru:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u0432 \u0441\u0438\u043b\u0443."},40:{en:"An error occurred when reading data.",ru:"\u0412\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445."},41:{en:"Theme changed to %s.",ru:"\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0438\u0437\u043c\u0435\u043d\u0451\u043d \u043d\u0430 %s."},42:{en:"Unable to change theme to %s.",ru:"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u0435\u043c\u0443 \u043d\u0430 %s."},43:{en:"Cach\xe9 WEB Terminal v"+e.VERSION+"\r\nAuthor:\x1B[20GZitRo (+NikitaSavchenko)\r\nProject:\x1B[20Ghttp://intersystems-ru.github.io/webterminal\r\nRepository:\x1B[20Ghttps://github.com/intersystems-ru/webterminal\r\n2013-2016 \xa9",ru:"Cach\xe9 WEB Terminal v"+e.VERSION+"\r\n\u0410\u0432\u0442\u043e\u0440:\x1B[20GZitRo (+NikitaSavchenko)\r\n\u041f\u0440\u043e\u0435\u043a\u0442:\x1B[20Ghttp://intersystems-ru.github.io/webterminal\r\n\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:\x1B[20Ghttps://github.com/intersystems-ru/webterminal\r\n2013-2016 \xa9"},44:{en:"Syntax highlighting enabled.",ru:"\u041f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430."},45:{en:"Syntax highlighting disabled.",ru:"\u041f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0430."},46:{en:"Progress indicator enabled.",ru:"\u0418\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u043a\u043b\u044e\u0447\u0451\u043d."},47:{en:"Progress indicator disabled.",ru:"\u0418\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d."},48:{en:"Autocomplete enabled.",ru:"\u0410\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e."},49:{en:"Autocomplete disabled.",ru:"\u0410\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043e."},50:{en:"Useless :)\r\nEnable autocomplete first.",ru:"\u0411\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e :)\r\n\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0441\u043f\u0435\u0440\u0432\u0430 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435."},51:{en:"Unknown option: %s.",ru:"\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043e\u043f\u0446\u0438\u044f: %s."},52:{en:"Loading autocomplete from local storage...",ru:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438\u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430..."},53:{en:"Loaded.",ru:"\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043e."}},this.initialize()};TerminalLocalization.prototype.STORAGE_NAME="terminal-localization",TerminalLocalization.prototype.initialize=function(){var t=this._TERMINAL.storage.get(this.STORAGE_NAME);t&&this.AVAILABLE_LOCALIZATIONS.hasOwnProperty(t)||(t=navigator.language,this.AVAILABLE_LOCALIZATIONS.hasOwnProperty(t)||(t="en")),this.setLocale(t)},TerminalLocalization.prototype.getAvailableList=function(){var t,e=[];for(t in this.AVAILABLE_LOCALIZATIONS)e.push(t);return e},TerminalLocalization.prototype.get=function(t){var e=0,i=arguments;return(this._LOCALIZATION_BASE[t]?this._LOCALIZATION_BASE[t][this._currentLocalization]||"[no available localization of ["+t+'] for "'+this._currentLocalization+'"]':"[translation ["+t+"] not found]").replace(/%[sn]/g,function(t){return"undefined"!=typeof i[++e]?"s"===t.charAt(1)?i[e].toString():parseFloat(i[e])+"":t})},TerminalLocalization.prototype.setLocale=function(t){return this.AVAILABLE_LOCALIZATIONS.hasOwnProperty(t)?(this._currentLocalization=t,this._TERMINAL.storage.set(this.STORAGE_NAME,t),!0):(console.error('No available translations for "'+t+'". Please, check available languages at TerminalLocalization file.'),!1)},TerminalLocalization.prototype.getLocale=function(){return this._currentLocalization};var TerminalOutput=function(t){this.TERMINAL=t,this._stack="",this._TOP_LINE_INDEX=0,this.SYMBOL_PIXEL_WIDTH=0,this.SYMBOL_PIXEL_HEIGHT=0,this.CONTROL_SEQUENCE_PATTERN=/[\x00-\x1A]|\x1b\[?[^@-~]*[@-~]/g,this.CURRENT_GRAPHIC_RENDITION={},this._lines=[],this._caret={x:1,y:1},this._scrolling={enabled:!1,lineStart:0,lineEnd:0},this._tabs={},this.$CARET_RESTRICTION_ON=!0,this.WIDTH=0,this.HEIGHT=0,this.STACK_REFRESH_INTERVAL=25,this.initialize()};TerminalOutput.prototype.COLOR_8BIT={0:"#000000",1:"#800000",2:"#008000",3:"#808000",4:"#000080",5:"#800080",6:"#008080",7:"#c0c0c0",8:"#808080",9:"#ff0000",10:"#00ff00",11:"#ffff00",12:"#0000ff",13:"#ff00ff",14:"#00ffff",15:"#ffffff",16:"#000000",17:"#00005f",18:"#000087",19:"#0000af",20:"#0000df",21:"#0000ff",22:"#005f00",23:"#005f5f",24:"#005f87",25:"#005faf",26:"#005fdf",27:"#005fff",28:"#008700",29:"#00875f",30:"#008787",31:"#0087af",32:"#0087df",33:"#0087ff",34:"#00af00",35:"#00af5f",36:"#00af87",37:"#00afaf",38:"#00afdf",39:"#00afff",40:"#00df00",41:"#00df5f",42:"#00df87",43:"#00dfaf",44:"#00dfdf",45:"#00dfff",46:"#00ff00",47:"#00ff5f",48:"#00ff87",49:"#00ffaf",50:"#00ffdf",51:"#00ffff",52:"#5f0000",53:"#5f005f",54:"#5f0087",55:"#5f00af",56:"#5f00df",57:"#5f00ff",58:"#5f5f00",59:"#5f5f5f",60:"#5f5f87",61:"#5f5faf",62:"#5f5fdf",63:"#5f5fff",64:"#5f8700",65:"#5f875f",66:"#5f8787",67:"#5f87af",68:"#5f87df",69:"#5f87ff",70:"#5faf00",71:"#5faf5f",72:"#5faf87",73:"#5fafaf",74:"#5fafdf",75:"#5fafff",76:"#5fdf00",77:"#5fdf5f",78:"#5fdf87",79:"#5fdfaf",80:"#5fdfdf",81:"#5fdfff",82:"#5fff00",83:"#5fff5f",84:"#5fff87",85:"#5fffaf",86:"#5fffdf",87:"#5fffff",88:"#870000",89:"#87005f",90:"#870087",91:"#8700af",92:"#8700df",93:"#8700ff",94:"#875f00",95:"#875f5f",96:"#875f87",97:"#875faf",98:"#875fdf",99:"#875fff",100:"#878700",101:"#87875f",102:"#878787",103:"#8787af",104:"#8787df",105:"#8787ff",106:"#87af00",107:"#87af5f",108:"#87af87",109:"#87afaf",110:"#87afdf",111:"#87afff",112:"#87df00",113:"#87df5f",114:"#87df87",115:"#87dfaf",116:"#87dfdf",117:"#87dfff",118:"#87ff00",119:"#87ff5f",120:"#87ff87",121:"#87ffaf",122:"#87ffdf",123:"#87ffff",124:"#af0000",125:"#af005f",126:"#af0087",127:"#af00af",128:"#af00df",129:"#af00ff",130:"#af5f00",131:"#af5f5f",132:"#af5f87",133:"#af5faf",134:"#af5fdf",135:"#af5fff",136:"#af8700",137:"#af875f",138:"#af8787",139:"#af87af",140:"#af87df",141:"#af87ff",142:"#afaf00",143:"#afaf5f",144:"#afaf87",145:"#afafaf",146:"#afafdf",147:"#afafff",148:"#afdf00",149:"#afdf5f",150:"#afdf87",151:"#afdfaf",152:"#afdfdf",153:"#afdfff",154:"#afff00",155:"#afff5f",156:"#afff87",157:"#afffaf",158:"#afffdf",159:"#afffff",160:"#df0000",161:"#df005f",162:"#df0087",163:"#df00af",164:"#df00df",165:"#df00ff",166:"#df5f00",167:"#df5f5f",168:"#df5f87",169:"#df5faf",170:"#df5fdf",171:"#df5fff",172:"#df8700",173:"#df875f",174:"#df8787",175:"#df87af",176:"#df87df",177:"#df87ff",178:"#dfaf00",179:"#dfaf5f",180:"#dfaf87",181:"#dfafaf",182:"#dfafdf",183:"#dfafff",184:"#dfdf00",185:"#dfdf5f",186:"#dfdf87",187:"#dfdfaf",188:"#dfdfdf",189:"#dfdfff",190:"#dfff00",191:"#dfff5f",192:"#dfff87",193:"#dfffaf",194:"#dfffdf",195:"#dfffff",196:"#ff0000",197:"#ff005f",198:"#ff0087",199:"#ff00af",200:"#ff00df",201:"#ff00ff",202:"#ff5f00",203:"#ff5f5f",204:"#ff5f87",205:"#ff5faf",206:"#ff5fdf",207:"#ff5fff",208:"#ff8700",209:"#ff875f",210:"#ff8787",211:"#ff87af",212:"#ff87df",213:"#ff87ff",214:"#ffaf00",215:"#ffaf5f",216:"#ffaf87",217:"#ffafaf",218:"#ffafdf",219:"#ffafff",220:"#ffdf00",221:"#ffdf5f",222:"#ffdf87",223:"#ffdfaf",224:"#ffdfdf",225:"#ffdfff",226:"#ffff00",227:"#ffff5f",228:"#ffff87",229:"#ffffaf",230:"#ffffdf",231:"#ffffff",232:"#080808",233:"#121212",234:"#1c1c1c",235:"#262626",236:"#303030",237:"#3a3a3a",238:"#444444",239:"#4e4e4e",240:"#585858",241:"#606060",242:"#666666",243:"#767676",244:"#808080",245:"#8a8a8a",246:"#949494",247:"#9e9e9e",248:"#a8a8a8",249:"#b2b2b2",250:"#bcbcbc",251:"#c6c6c6",252:"#d0d0d0",253:"#dadada",254:"#e4e4e4",255:"#eeeeee"},TerminalOutput.prototype.initialize=function(){var t,e=this;for(setInterval(function(){e.freeStack()},this.STACK_REFRESH_INTERVAL),window.addEventListener("resize",function(){e.sizeChanged()}),this.sizeChanged(),t=9;tthis.HEIGHT||1>t||t>e?void console.warn("Wrong scrolling borders: ",t,e):(this._scrolling.enabled=!0,this._scrolling.lineStart=t,this._scrolling.lineEnd=e,this.setCaretX(1),void this.setCaretY(1))},TerminalOutput.prototype.disableScrolling=function(){this._scrolling.enabled=!1},TerminalOutput.prototype.scrollDisplayPart=function(t,e,i){var n,r=this.getLineByIndex(this._TOP_LINE_INDEX+e),s=this._lines.slice(this._TOP_LINE_INDEX+t-1,this._TOP_LINE_INDEX+e),o={getElement:function(){return null}},a=s.length,l=s.slice(Math.min(Math.max(0,i),a),Math.max(Math.min(a,a+i),0)),h=i>0?(r||o).getElement()||null:(l[0]||o).getElement()||(r||o).getElement()||null,u=s.length-l.length;for(n=0;u>n;n++)s[i>0?"shift":"pop"]().remove();for(n=0;u>n;n++)l[i>0?"push":"unshift"].apply(l,[new TerminalOutputLine(this,h)]);this._lines.splice.apply(this._lines,[this._TOP_LINE_INDEX+t-1,l.length].concat(l))},TerminalOutput.prototype.getCaretX=function(){return this._caret.x},TerminalOutput.prototype.getCaretY=function(){return this._caret.y},TerminalOutput.prototype._controlCharacters={"\x00":function(){}," ":function(){for(var t=this.getCaretX();t1&&this.enableScrolling(i[0],i[1])):this.disableScrolling()},K:function(t,e){1==e?this.getCurrentLine().writePlain(new Array(this.getCaretX()).join(" "),0):2==e?this.getCurrentLine().writePlain(new Array(this.WIDTH+1).join(" "),0):this.getCurrentLine().writePlain(new Array(this.WIDTH-this.getCaretX()+2).join(" "),this.getCaretX()-1)},J:function(t,e){var i;if(1==e)for(i=this.getCaretY();i>0;i--)this.getLineByCursorY(i).clear();else if(2==e)for(i=1;i0?this._TOP_LINE_INDEX+=t:console.warn("Todo: scroll up")},TerminalOutput.prototype.anyGraphicRenditionSet=function(){var t;for(t in this.CURRENT_GRAPHIC_RENDITION)if(this.CURRENT_GRAPHIC_RENDITION.hasOwnProperty(t))return!0;return!1},TerminalOutput.prototype.setGraphicRendition=function(t,e){0===t?this.CURRENT_GRAPHIC_RENDITION={}:this.CURRENT_GRAPHIC_RENDITION[t]=e?{style:e}:t},TerminalOutput.prototype.applyControlSequence=function(t){var e,i;(e=t.match(/[\x00-\x1A]/))?this._controlCharacters.hasOwnProperty(e[0])&&this._controlCharacters[e[0]].call(this):(e=t.match(/\x1b\[?([^@-~]*)([@-~])/))&&(i=e[2],this._controlSequences.hasOwnProperty(i)&&this._controlSequences[i].call(this,e[0],e[1]))},TerminalOutput.prototype.getTopLine=function(){var t;for(t=this._lines.length;t<=this._TOP_LINE_INDEX;t++)this._lines[t]=new TerminalOutputLine(this);return this._lines[this._TOP_LINE_INDEX]},TerminalOutput.prototype.getCurrentLine=function(){return this.getLineByCursorY(this.getCaretY())},TerminalOutput.prototype.newLineSequence=function(){this.applyControlSequence("\r"),this.applyControlSequence("\n")},TerminalOutput.prototype.getLineNumber=function(){return this._TOP_LINE_INDEX+this._caret.y-1},TerminalOutput.prototype._spawnLines=function(t){for(;t>0;t--)this._lines.push(new TerminalOutputLine(this))},TerminalOutput.prototype._printPlainText=function(t){var e,i;do e=this.getCurrentLine(),i=t.length,t=e.writePlain(t,this._caret.x-1),i-=t.length,t?this.newLineSequence():this.setCaretX(this._caret.x+i)||this.newLineSequence();while(t)},TerminalOutput.prototype._output=function(t){var e,i=t||"",n=0,r=this;t=t||"",t.replace(this.CONTROL_SEQUENCE_PATTERN,function(t,e,s){var o=s.substring(n,e);return n||(i=s),n=e+t.length,o&&r._printPlainText(o),r.applyControlSequence(t),""}),e=i.substring(n,i.length),e&&this._printPlainText(e)},TerminalOutput.prototype.print=function(t){this._stack+=t},TerminalOutput.prototype.getLineByIndex=function(t){var e;for(e=this._lines.length;t>=e;e++)this._lines[e]=new TerminalOutputLine(this);return this._lines[t]},TerminalOutput.prototype.getLineByCursorY=function(t){return this.getLineByIndex(this._TOP_LINE_INDEX+(t-1))},TerminalOutput.prototype.printAtLine=function(t,e,i,n){var r=this.$CARET_RESTRICTION_ON;"undefined"==typeof n&&(n=!0),this.$CARET_RESTRICTION_ON=!1,this._caret.x=i+1,this._caret.y=e-this._TOP_LINE_INDEX+1,this.printSync(t),n&&(this.$CARET_RESTRICTION_ON=!0,this.setCaretX(this.getCaretX()),this.setCaretY(this.getCaretY())),this.$CARET_RESTRICTION_ON=r},TerminalOutput.prototype.printSync=function(t){this.freeStack(),this.print(t||""),this.freeStack()},TerminalOutput.prototype.freeStack=function(){var t,e;this._stack&&(-1!==(t=this._stack.lastIndexOf(String.fromCharCode(27)))&&(e=(t=this._stack.substring(t,this._stack.length)).match(this.CONTROL_SEQUENCE_PATTERN))&&"\x1B["!==e[0]?(this._output(this._stack),this._stack=""):(this._output(this._stack.substring(0,this._stack.length-(t.length||0))),this._stack=-1===t?"":t),this.scrollToActualLine())},TerminalOutput.prototype.clear=function(){this.printSync(),this._TOP_LINE_INDEX=this._lines.length,this._spawnLines(this.HEIGHT),this.scrollToActualLine(),this.setCaretX(1),this.setCaretY(1)},TerminalOutput.prototype.scrollToActualLine=function(){this.TERMINAL.elements.output.scrollTop=this.getTopLine().getElement().offsetTop},TerminalOutput.prototype.sizeChanged=function(){var t,e=document.createElement("span"),i=document.createElement("div"),n=this.TERMINAL.elements.output.style.overflowY,r=6;this.TERMINAL.elements.output.style.overflowY="scroll",this.TERMINAL.elements.output.appendChild(i),t=this.TERMINAL.elements.output.offsetWidth-i.offsetWidth,this.TERMINAL.elements.output.style.overflowY=n,e.className=this.LINE_CLASSNAME,e.innerHTML="XXXXXXXXXX",this.TERMINAL.elements.output.appendChild(e),this.SYMBOL_PIXEL_WIDTH=e.offsetWidth/10,this.SYMBOL_PIXEL_HEIGHT=e.offsetHeight,this.WIDTH=Math.floor((this.TERMINAL.elements.terminal.offsetWidth-t-r)/this.SYMBOL_PIXEL_WIDTH),this.HEIGHT=Math.floor(this.TERMINAL.elements.terminal.offsetHeight/this.SYMBOL_PIXEL_HEIGHT),this.TERMINAL.elements.output.style.width=this.WIDTH*this.SYMBOL_PIXEL_WIDTH+t+"px",this.TERMINAL.elements.output.style.height=this.HEIGHT*this.SYMBOL_PIXEL_HEIGHT+"px",this.TERMINAL.elements.output.removeChild(i),this.TERMINAL.elements.output.removeChild(e)};var TerminalOutputLine=function(t,e){this.TERMINAL=t.TERMINAL,this.TERMINAL_OUTPUT=t,this._lineElement=document.createElement("div"),this._linePlainText="",this.graphicRenditionIndex={},this.renderTimeout=0,this.initialize(e)};TerminalOutputLine.prototype.initialize=function(t){this._lineElement.style.height=this.TERMINAL_OUTPUT.SYMBOL_PIXEL_HEIGHT+"px",t?this.TERMINAL.elements.output.insertBefore(this._lineElement,t):this.TERMINAL.elements.output.appendChild(this._lineElement)},TerminalOutputLine.prototype.getElement=function(){return this._lineElement},TerminalOutputLine.prototype.render=function(){var t,e,i,n=[],r="";for(t in this.graphicRenditionIndex)n.push(parseInt(t));for(n.sort(function(t,e){return t-e}),0!==n[0]&&n.unshift(0),t=0;t"),r+=e+this._linePlainText.substring(n[t]||0,n[t+1]||this._linePlainText.length).replace(/&/g,"&").replace(/";r||(r=this._linePlainText.replace(/&/g,"&").replace(/this._linePlainText.length&&(this._linePlainText+=new Array(e-this._linePlainText.length+1).join(" ")),this._linePlainText=this._linePlainText.splice(e,n.length,n),i=e;ii;i++)if(n[e].index===n[i].index)return!1;return!0})}if(this.TERMINAL_OUTPUT.anyGraphicRenditionSet()){this.graphicRenditionIndex[e]=[];for(i in this.TERMINAL_OUTPUT.CURRENT_GRAPHIC_RENDITION)this.graphicRenditionIndex[e].push({index:parseInt(i)||i,style:this.TERMINAL_OUTPUT.CURRENT_GRAPHIC_RENDITION[i].style})}else this.graphicRenditionIndex[e]=[{index:0}];return this.renderTimeout||(this.renderTimeout=setTimeout(function(){r.render(),r.renderTimeout=0},25)),t.substr(n.length,t.length)},TerminalOutputLine.prototype.clear=function(){this._linePlainText="",this.graphicRenditionIndex={},this.render()},TerminalOutputLine.prototype.remove=function(){this._lineElement.parentNode&&this._lineElement.parentNode.removeChild(this._lineElement)};var TerminalParser=function(t){
this.TERMINAL=t,this.THEMES={"default":["\x1B[38;5;226m","\x1B[38;5;226m","\x1B[38;5;76m","\x1B[38;5;51m","\x1B[38;5;111m","\x1B[38;5;9m","\x1B[38;5;180m","\x1B[38;5;51m","\x1B[0m","\x1B[38;5;39m"],cache:["\x1B[38;5;166m","\x1B[38;5;16m","\x1B[38;5;28m","\x1B[38;5;16m","\x1B[38;5;12m","\x1B[38;5;9m","\x1B[38;5;20m","\x1B[38;5;12m","\x1B[0m","\x1B[38;5;12m"]},this._SPEC_ETC_POS=8,this._SPEC_KEYWORD_POS=9,this.SYNTAX_REGULAR_EXPRESSION=new RegExp('(\\/[a-z]+)|([\\[\\]\\{\\}\\(\\)\\-\\+\\*\\/_=])|("[^"]*")|([0-9]\\.?[0-9]*)|(\\${1,3}[\\w]+)|(\\^[\\w]+)|(#{2,3}[\\w]+)|(\\.{2}[\\w]+)|([\\w]+)',"g")};TerminalParser.prototype.highlightSyntax=function(t,e){var i=this;return i.THEMES[e]||(e="default"),t.replace(this.SYNTAX_REGULAR_EXPRESSION,function(t){var n;for(n=1;n
]]>