!function(e){function t(i){if(r[i])return r[i].exports;var o=r[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,i){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=28)}([function(e,t,r){"use strict";function i(e){var t=this;if(!(this instanceof i))return new i(arguments[0],arguments[1],arguments[2]);t.browser=S,t.cancel=i.cancel,u.EventEmitter.call(this),"number"==typeof e&&(e={cols:arguments[0],rows:arguments[1],handler:arguments[2]}),e=e||{},Object.keys(i.defaults).forEach(function(r){null==e[r]&&(e[r]=i.options[r],i[r]!==i.defaults[r]&&(e[r]=i[r])),t[r]=e[r]}),8===e.colors.length?e.colors=e.colors.concat(i._colors.slice(8)):16===e.colors.length?e.colors=e.colors.concat(i._colors.slice(16)):10===e.colors.length?e.colors=e.colors.slice(0,-2).concat(i._colors.slice(8,-2),e.colors.slice(-2)):18===e.colors.length&&(e.colors=e.colors.concat(i._colors.slice(16,-2),e.colors.slice(-2))),this.colors=e.colors,this.options=e,this.parent=e.body||e.parent||(A?A.getElementsByTagName("body")[0]:null),this.cols=e.cols||e.geometry[0],this.rows=e.rows||e.geometry[1],this.geometry=[this.cols,this.rows],e.handler&&this.on("data",e.handler),this.ybase=0,this.ydisp=0,this.x=0,this.y=0,this.cursorState=0,this.cursorHidden=!1,this.convertEol,this.queue="",this.scrollTop=0,this.scrollBottom=this.rows-1,this.customKeyEventHandler=null,this.cursorBlinkInterval=null,this.applicationKeypad=!1,this.applicationCursor=!1,this.originMode=!1,this.insertMode=!1,this.wraparoundMode=!0,this.normal=null,this.charset=null,this.gcharset=null,this.glevel=0,this.charsets=[null],this.decLocator,this.x10Mouse,this.vt200Mouse,this.vt300Mouse,this.normalMouse,this.mouseEvents,this.sendFocus,this.utfMouse,this.sgrMouse,this.urxvtMouse,this.element,this.children,this.refreshStart,this.refreshEnd,this.savedX,this.savedY,this.savedCols,this.readable=!0,this.writable=!0,this.defAttr=131840,this.curAttr=this.defAttr,this.params=[],this.currentParam=0,this.prefix="",this.postfix="",this.inputHandler=new m.InputHandler(this),this.parser=new y.Parser(this.inputHandler,this),this.renderer=this.renderer||null,this.selectionManager=this.selectionManager||null,this.linkifier=this.linkifier||new _.Linkifier,this.writeBuffer=[],this.writeInProgress=!1,this.xoffSentToCatchUp=!1,this.writeStopped=!1,this.surrogate_high="",this.lines=new f.CircularList(this.scrollback);for(var r=this.rows;r--;)this.lines.push(this.blankLine());this.selectionManager&&this.selectionManager.setBuffer(this.lines),this.tabs,this.setupStops(),this.userScrolling=!1}function o(e,t,r,i){Array.isArray(e)||(e=[e]),e.forEach(function(e){e.addEventListener(t,r,i||!1)})}function s(e,t,r,i){e.removeEventListener(t,r,i||!1)}function n(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function a(e,t){var r=e.browser.isMac&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.browser.isMSWindows&&t.altKey&&t.ctrlKey&&!t.metaKey;return"keypress"==t.type?r:r&&(!t.keyCode||t.keyCode>47)}function l(e,t,r){var o=e<<16|t<<8|r;if(null!=l._cache[o])return l._cache[o];for(var s,n,a,h,c,u=1/0,p=-1,d=0;d>16&255,e>>8&255,255&e]);return t}(),i.defaults={colors:i.colors,theme:"default",convertEol:!1,termName:"xterm",geometry:[80,24],cursorBlink:!1,cursorStyle:"block",visualBell:!1,popOnBell:!1,scrollback:1e3,screenKeys:!1,debug:!1,cancelEvents:!1,disableStdin:!1,useFlowControl:!1,tabStopWidth:8},i.options={},i.focus=null,function(e,t,r){if(e.forEach)return e.forEach(t,r);for(var i=0;it){var o=this.lines.length-t,s=this.ydisp-o<0;this.lines.trimStart(o),this.ybase=Math.max(this.ybase-o,0),this.ydisp=Math.max(this.ydisp-o,0),s&&this.refresh(0,this.rows-1)}this.lines.maxLength=t,this.viewport.syncScrollArea()}}switch(this[e]=t,this.options[e]=t,e){case"cursorBlink":this.setCursorBlinking(t);break;case"cursorStyle":this.element.classList.toggle("xterm-cursor-style-underline","underline"===t),this.element.classList.toggle("xterm-cursor-style-bar","bar"===t);break;case"tabStopWidth":this.setupStops()}},i.prototype.restartCursorBlinking=function(){this.setCursorBlinking(this.options.cursorBlink)},i.prototype.setCursorBlinking=function(e){if(this.element.classList.toggle("xterm-cursor-blink",e),this.clearCursorBlinkingInterval(),e){var t=this;this.cursorBlinkInterval=setInterval(function(){t.element.classList.toggle("xterm-cursor-blink-on")},600)}},i.prototype.clearCursorBlinkingInterval=function(){this.element.classList.remove("xterm-cursor-blink-on"),this.cursorBlinkInterval&&(clearInterval(this.cursorBlinkInterval),this.cursorBlinkInterval=null)},i.bindFocus=function(e){o(e.textarea,"focus",function(t){e.sendFocus&&e.send(g.C0.ESC+"[I"),e.element.classList.add("focus"),e.showCursor(),e.restartCursorBlinking.apply(e),i.focus=e,e.emit("focus",{terminal:e})})},i.prototype.blur=function(){return this.textarea.blur()},i.bindBlur=function(e){o(e.textarea,"blur",function(t){e.refresh(e.y,e.y),e.sendFocus&&e.send(g.C0.ESC+"[O"),e.element.classList.remove("focus"),e.clearCursorBlinkingInterval.apply(e),i.focus=null,e.emit("blur",{terminal:e})})},i.prototype.initGlobal=function(){var e=this,t=this;i.bindKeys(this),i.bindFocus(this),i.bindBlur(this),o(this.element,"copy",function(r){e.mouseEvents||d.copyHandler(r,t,e.selectionManager)});var r=function(e){return d.pasteHandler(e,t)};o(this.textarea,"paste",r),o(this.element,"paste",r),t.browser.isFirefox?o(this.element,"mousedown",function(t){2==t.button&&d.rightClickHandler(t,e.textarea,e.selectionManager)}):o(this.element,"contextmenu",function(t){d.rightClickHandler(t,e.textarea,e.selectionManager)}),t.browser.isLinux&&o(this.element,"auxclick",function(t){1===t.button&&d.moveTextAreaUnderMouseCursor(t,e.textarea,e.selectionManager)})},i.bindKeys=function(e){o(e.element,"keydown",function(t){A.activeElement==this&&e.keyDown(t)},!0),o(e.element,"keypress",function(t){A.activeElement==this&&e.keyPress(t)},!0),o(e.element,"keyup",function(t){h(t)||e.focus(e)},!0),o(e.textarea,"keydown",function(t){e.keyDown(t)},!0),o(e.textarea,"keypress",function(t){e.keyPress(t),this.value=""},!0),o(e.textarea,"compositionstart",e.compositionHelper.compositionstart.bind(e.compositionHelper)),o(e.textarea,"compositionupdate",e.compositionHelper.compositionupdate.bind(e.compositionHelper)),o(e.textarea,"compositionend",e.compositionHelper.compositionend.bind(e.compositionHelper)),e.on("refresh",e.compositionHelper.updateCompositionElements.bind(e.compositionHelper)),e.on("refresh",function(t){e.queueLinkification(t.start,t.end)})},i.prototype.insertRow=function(e){return"object"!=typeof e&&(e=A.createElement("div")),this.rowContainer.appendChild(e),this.children.push(e),e},i.prototype.open=function(e,t){var r=this,i=this,s=0;if(this.parent=e||this.parent,!this.parent)throw new Error("Terminal requires a parent element.");for(this.context=this.parent.ownerDocument.defaultView,this.document=this.parent.ownerDocument,this.body=this.document.getElementsByTagName("body")[0],this.element=this.document.createElement("div"),this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.classList.add("xterm-theme-"+this.theme),this.setCursorBlinking(this.options.cursorBlink),this.element.setAttribute("tabindex",0),this.viewportElement=A.createElement("div"),this.viewportElement.classList.add("xterm-viewport"),this.element.appendChild(this.viewportElement),this.viewportScrollArea=A.createElement("div"),this.viewportScrollArea.classList.add("xterm-scroll-area"),this.viewportElement.appendChild(this.viewportScrollArea),this.selectionContainer=A.createElement("div"),this.selectionContainer.classList.add("xterm-selection"),this.element.appendChild(this.selectionContainer),this.rowContainer=A.createElement("div"),this.rowContainer.classList.add("xterm-rows"),this.element.appendChild(this.rowContainer),this.children=[],this.linkifier.attachToDom(A,this.children),this.helperContainer=A.createElement("div"),this.helperContainer.classList.add("xterm-helpers"),this.element.appendChild(this.helperContainer),this.textarea=A.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.textarea.addEventListener("focus",function(){i.emit("focus",{terminal:i})}),this.textarea.addEventListener("blur",function(){i.emit("blur",{terminal:i})}),this.helperContainer.appendChild(this.textarea),this.compositionView=A.createElement("div"),this.compositionView.classList.add("composition-view"),this.compositionHelper=new c.CompositionHelper(this.textarea,this.compositionView,this),this.helperContainer.appendChild(this.compositionView),this.charSizeStyleElement=A.createElement("style"),this.helperContainer.appendChild(this.charSizeStyleElement);s div{height:"+this.charMeasure.height+"px;}"},i.prototype.bindMouse=function(){function e(e){var t,r;if(t=n(e),r=v.getRawByteCoords(e,l.rowContainer,l.charMeasure,l.cols,l.rows))switch(i(t,r),e.overrideType||e.type){case"mousedown":h=t;break;case"mouseup":h=32}}function t(e){var t,r=h;(t=v.getRawByteCoords(e,l.rowContainer,l.charMeasure,l.cols,l.rows))&&i(r+=32,t)}function r(e,t){if(l.utfMouse){if(2047===t)return e.push(0);t<127?e.push(t):(t>2047&&(t=2047),e.push(192|t>>6),e.push(128|63&t))}else{if(255===t)return e.push(0);t>127&&(t=127),e.push(t)}}function i(e,t){if(l.vt300Mouse){e&=3,t.x-=32,t.y-=32;var i=g.C0.ESC+"[24";if(0===e)i+="1";else if(1===e)i+="3";else if(2===e)i+="5";else{if(3===e)return;i+="0"}return i+="~["+t.x+","+t.y+"]\r",void l.send(i)}return l.decLocator?(e&=3,t.x-=32,t.y-=32,0===e?e=2:1===e?e=4:2===e?e=6:3===e&&(e=3),void l.send(g.C0.ESC+"["+e+";"+(3===e?4:0)+";"+t.y+";"+t.x+";"+(t.page||0)+"&w")):l.urxvtMouse?(t.x-=32,t.y-=32,t.x++,t.y++,void l.send(g.C0.ESC+"["+e+";"+t.x+";"+t.y+"M")):l.sgrMouse?(t.x-=32,t.y-=32,void l.send(g.C0.ESC+"[<"+((3==(3&e)?-4&e:e)-32)+";"+t.x+";"+t.y+(3==(3&e)?"m":"M"))):(r(i=[],e),r(i,t.x),r(i,t.y),void l.send(g.C0.ESC+"[M"+String.fromCharCode.apply(String,i)))}function n(e){var t,r,i,o,s;switch(e.overrideType||e.type){case"mousedown":t=null!=e.button?+e.button:null!=e.which?e.which-1:null,l.browser.isMSIE&&(t=1===t?0:4===t?1:t);break;case"mouseup":t=3;break;case"DOMMouseScroll":t=e.detail<0?64:65;break;case"wheel":t=e.wheelDeltaY>0?64:65}return r=e.shiftKey?4:0,i=e.metaKey?8:0,o=e.ctrlKey?16:0,s=r|i|o,l.vt200Mouse?s&=o:l.normalMouse||(s=0),t=32+(s<<2)+t}var a=this.element,l=this,h=32;o(a,"mousedown",function(r){if(l.mouseEvents)return e(r),l.focus(),l.vt200Mouse?(r.overrideType="mouseup",e(r),l.cancel(r)):(l.normalMouse&&o(l.document,"mousemove",t),l.x10Mouse||o(l.document,"mouseup",function r(i){return e(i),l.normalMouse&&s(l.document,"mousemove",t),s(l.document,"mouseup",r),l.cancel(i)}),l.cancel(r))}),o(a,"wheel",function(t){if(l.mouseEvents&&!(l.x10Mouse||l.vt300Mouse||l.decLocator))return e(t),l.cancel(t)}),o(a,"wheel",function(e){if(!l.mouseEvents)return l.viewport.onWheel(e),l.cancel(e)}),o(a,"touchstart",function(e){if(!l.mouseEvents)return l.viewport.onTouchStart(e),l.cancel(e)}),o(a,"touchmove",function(e){if(!l.mouseEvents)return l.viewport.onTouchMove(e),l.cancel(e)})},i.prototype.destroy=function(){this.readable=!1,this.writable=!1,this._events={},this.handler=function(){},this.write=function(){},this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},i.prototype.refresh=function(e,t){this.renderer&&this.renderer.queueRefresh(e,t)},i.prototype.queueLinkification=function(e,t){if(this.linkifier)for(var r=e;r<=t;r++)this.linkifier.linkifyRow(r)},i.prototype.showCursor=function(){this.cursorState||(this.cursorState=1,this.refresh(this.y,this.y))},i.prototype.scroll=function(e){var t;this.lines.length===this.lines.maxLength&&(this.lines.trimStart(1),this.ybase--,0!==this.ydisp&&this.ydisp--),this.ybase++,this.userScrolling||(this.ydisp=this.ybase),t=this.ybase+this.rows-1,(t-=this.rows-1-this.scrollBottom)===this.lines.length?this.lines.push(this.blankLine(void 0,e)):this.lines.splice(t,0,this.blankLine(void 0,e)),0!==this.scrollTop&&(0!==this.ybase&&(this.ybase--,this.userScrolling||(this.ydisp=this.ybase)),this.lines.splice(this.ybase+this.scrollTop,1)),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom),this.emit("scroll",this.ydisp)},i.prototype.scrollDisp=function(e,t){if(e<0){if(0===this.ydisp)return;this.userScrolling=!0}else e+this.ydisp>=this.ybase&&(this.userScrolling=!1);this.ydisp+=e,this.ydisp>this.ybase?this.ydisp=this.ybase:this.ydisp<0&&(this.ydisp=0),t||this.emit("scroll",this.ydisp),this.refresh(0,this.rows-1)},i.prototype.scrollPages=function(e){this.scrollDisp(e*(this.rows-1))},i.prototype.scrollToTop=function(){this.scrollDisp(-this.ydisp)},i.prototype.scrollToBottom=function(){this.scrollDisp(this.ybase-this.ydisp)},i.prototype.write=function(e){if(this.writeBuffer.push(e),this.options.useFlowControl&&!this.xoffSentToCatchUp&&this.writeBuffer.length>=5&&(this.send(g.C0.DC3),this.xoffSentToCatchUp=!0),!this.writeInProgress&&this.writeBuffer.length>0){this.writeInProgress=!0;var t=this;setTimeout(function(){t.innerWrite()})}},i.prototype.innerWrite=function(){for(var e=this.writeBuffer.splice(0,300);e.length>0;){var t=e.shift();t.length;this.xoffSentToCatchUp&&0===e.length&&0===this.writeBuffer.length&&(this.send(g.C0.DC1),this.xoffSentToCatchUp=!1),this.refreshStart=this.y,this.refreshEnd=this.y;var r=this.parser.parse(t);this.parser.setState(r),this.updateRange(this.y),this.refresh(this.refreshStart,this.refreshEnd)}if(this.writeBuffer.length>0){var i=this;setTimeout(function(){i.innerWrite()},0)}else this.writeInProgress=!1},i.prototype.writeln=function(e){this.write(e+"\r\n")},i.prototype.attachCustomKeydownHandler=function(e){console.warn("attachCustomKeydownHandler() is DEPRECATED and will be removed soon. Please use attachCustomKeyEventHandler() instead."),this.attachCustomKeyEventHandler(e)},i.prototype.attachCustomKeyEventHandler=function(e){this.customKeyEventHandler=e},i.prototype.setHypertextLinkHandler=function(e){if(!this.linkifier)throw new Error("Cannot attach a hypertext link handler before Terminal.open is called");this.linkifier.setHypertextLinkHandler(e),this.refresh(0,this.rows-1)},i.prototype.setHypertextValidationCallback=function(e){if(!this.linkifier)throw new Error("Cannot attach a hypertext validation callback before Terminal.open is called");this.linkifier.setHypertextValidationCallback(e),this.refresh(0,this.rows-1)},i.prototype.registerLinkMatcher=function(e,t,r){if(this.linkifier){var i=this.linkifier.registerLinkMatcher(e,t,r);return this.refresh(0,this.rows-1),i}},i.prototype.deregisterLinkMatcher=function(e){this.linkifier&&this.linkifier.deregisterLinkMatcher(e)&&this.refresh(0,this.rows-1)},i.prototype.hasSelection=function(){return this.selectionManager.hasSelection},i.prototype.getSelection=function(){return this.selectionManager.selectionText},i.prototype.clearSelection=function(){this.selectionManager.clearSelection()},i.prototype.selectAll=function(){this.selectionManager.selectAll()},i.prototype.keyDown=function(e){if(this.customKeyEventHandler&&!1===this.customKeyEventHandler(e))return!1;if(this.restartCursorBlinking(),!this.compositionHelper.keydown.bind(this.compositionHelper)(e))return this.ybase!==this.ydisp&&this.scrollToBottom(),!1;var t=this.evaluateKeyEscapeSequence(e);return t.key===g.C0.DC3?this.writeStopped=!0:t.key===g.C0.DC1&&(this.writeStopped=!1),t.scrollDisp?(this.scrollDisp(t.scrollDisp),this.cancel(e,!0)):!!a(this,e)||(t.cancel&&this.cancel(e,!0),!t.key||(this.emit("keydown",e),this.emit("key",t.key,e),this.showCursor(),this.handler(t.key),this.cancel(e,!0)))},i.prototype.evaluateKeyEscapeSequence=function(e){var t={cancel:!1,key:void 0,scrollDisp:void 0},r=e.shiftKey<<0|e.altKey<<1|e.ctrlKey<<2|e.metaKey<<3;switch(e.keyCode){case 8:if(e.shiftKey){t.key=g.C0.BS;break}t.key=g.C0.DEL;break;case 9:if(e.shiftKey){t.key=g.C0.ESC+"[Z";break}t.key=g.C0.HT,t.cancel=!0;break;case 13:t.key=g.C0.CR,t.cancel=!0;break;case 27:t.key=g.C0.ESC,t.cancel=!0;break;case 37:r?(t.key=g.C0.ESC+"[1;"+(r+1)+"D",t.key==g.C0.ESC+"[1;3D"&&(t.key=this.browser.isMac?g.C0.ESC+"b":g.C0.ESC+"[1;5D")):this.applicationCursor?t.key=g.C0.ESC+"OD":t.key=g.C0.ESC+"[D";break;case 39:r?(t.key=g.C0.ESC+"[1;"+(r+1)+"C",t.key==g.C0.ESC+"[1;3C"&&(t.key=this.browser.isMac?g.C0.ESC+"f":g.C0.ESC+"[1;5C")):this.applicationCursor?t.key=g.C0.ESC+"OC":t.key=g.C0.ESC+"[C";break;case 38:r?(t.key=g.C0.ESC+"[1;"+(r+1)+"A",t.key==g.C0.ESC+"[1;3A"&&(t.key=g.C0.ESC+"[1;5A")):this.applicationCursor?t.key=g.C0.ESC+"OA":t.key=g.C0.ESC+"[A";break;case 40:r?(t.key=g.C0.ESC+"[1;"+(r+1)+"B",t.key==g.C0.ESC+"[1;3B"&&(t.key=g.C0.ESC+"[1;5B")):this.applicationCursor?t.key=g.C0.ESC+"OB":t.key=g.C0.ESC+"[B";break;case 45:e.shiftKey||e.ctrlKey||(t.key=g.C0.ESC+"[2~");break;case 46:t.key=r?g.C0.ESC+"[3;"+(r+1)+"~":g.C0.ESC+"[3~";break;case 36:r?t.key=g.C0.ESC+"[1;"+(r+1)+"H":this.applicationCursor?t.key=g.C0.ESC+"OH":t.key=g.C0.ESC+"[H";break;case 35:r?t.key=g.C0.ESC+"[1;"+(r+1)+"F":this.applicationCursor?t.key=g.C0.ESC+"OF":t.key=g.C0.ESC+"[F";break;case 33:e.shiftKey?t.scrollDisp=-(this.rows-1):t.key=g.C0.ESC+"[5~";break;case 34:e.shiftKey?t.scrollDisp=this.rows-1:t.key=g.C0.ESC+"[6~";break;case 112:t.key=r?g.C0.ESC+"[1;"+(r+1)+"P":g.C0.ESC+"OP";break;case 113:t.key=r?g.C0.ESC+"[1;"+(r+1)+"Q":g.C0.ESC+"OQ";break;case 114:t.key=r?g.C0.ESC+"[1;"+(r+1)+"R":g.C0.ESC+"OR";break;case 115:t.key=r?g.C0.ESC+"[1;"+(r+1)+"S":g.C0.ESC+"OS";break;case 116:t.key=r?g.C0.ESC+"[15;"+(r+1)+"~":g.C0.ESC+"[15~";break;case 117:t.key=r?g.C0.ESC+"[17;"+(r+1)+"~":g.C0.ESC+"[17~";break;case 118:t.key=r?g.C0.ESC+"[18;"+(r+1)+"~":g.C0.ESC+"[18~";break;case 119:t.key=r?g.C0.ESC+"[19;"+(r+1)+"~":g.C0.ESC+"[19~";break;case 120:t.key=r?g.C0.ESC+"[20;"+(r+1)+"~":g.C0.ESC+"[20~";break;case 121:t.key=r?g.C0.ESC+"[21;"+(r+1)+"~":g.C0.ESC+"[21~";break;case 122:t.key=r?g.C0.ESC+"[23;"+(r+1)+"~":g.C0.ESC+"[23~";break;case 123:t.key=r?g.C0.ESC+"[24;"+(r+1)+"~":g.C0.ESC+"[24~";break;default:!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?this.browser.isMac||!e.altKey||e.ctrlKey||e.metaKey?this.browser.isMac&&!e.altKey&&!e.ctrlKey&&e.metaKey&&65===e.keyCode&&this.selectAll():e.keyCode>=65&&e.keyCode<=90?t.key=g.C0.ESC+String.fromCharCode(e.keyCode+32):192===e.keyCode?t.key=g.C0.ESC+"`":e.keyCode>=48&&e.keyCode<=57&&(t.key=g.C0.ESC+(e.keyCode-48)):e.keyCode>=65&&e.keyCode<=90?t.key=String.fromCharCode(e.keyCode-64):32===e.keyCode?t.key=String.fromCharCode(0):e.keyCode>=51&&e.keyCode<=55?t.key=String.fromCharCode(e.keyCode-51+27):56===e.keyCode?t.key=String.fromCharCode(127):219===e.keyCode?t.key=String.fromCharCode(27):220===e.keyCode?t.key=String.fromCharCode(28):221===e.keyCode&&(t.key=String.fromCharCode(29))}return t},i.prototype.setgLevel=function(e){this.glevel=e,this.charset=this.charsets[e]},i.prototype.setgCharset=function(e,t){this.charsets[e]=t,this.glevel===e&&(this.charset=t)},i.prototype.keyPress=function(e){var t;if(this.customKeyEventHandler&&!1===this.customKeyEventHandler(e))return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(null==e.which)t=e.keyCode;else{if(0===e.which||0===e.charCode)return!1;t=e.which}return!(!t||(e.altKey||e.ctrlKey||e.metaKey)&&!a(this,e))&&(t=String.fromCharCode(t),this.emit("keypress",t,e),this.emit("key",t,e),this.showCursor(),this.handler(t),!0)},i.prototype.send=function(e){var t=this;this.queue||setTimeout(function(){t.handler(t.queue),t.queue=""},1),this.queue+=e},i.prototype.bell=function(){if(this.visualBell){var e=this;this.element.style.borderColor="white",setTimeout(function(){e.element.style.borderColor=""},10),this.popOnBell&&this.focus()}},i.prototype.log=function(){if(this.debug&&this.context.console&&this.context.console.log){var e=Array.prototype.slice.call(arguments);this.context.console.log.apply(this.context.console,e)}},i.prototype.error=function(){if(this.debug&&this.context.console&&this.context.console.error){var e=Array.prototype.slice.call(arguments);this.context.console.error.apply(this.context.console,e)}},i.prototype.resize=function(e,t){if(!isNaN(e)&&!isNaN(t)){t>this.getOption("scrollback")&&this.setOption("scrollback",t);var r,i,o,s,n;if(e!==this.cols||t!==this.rows){if(e<1&&(e=1),t<1&&(t=1),(o=this.cols)0&&this.lines.length<=this.ybase+this.y+n+1?(this.ybase--,n++,this.ydisp>0&&this.ydisp--):this.lines.push(this.blankLine())),this.children.lengtht;)if(this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++)),this.children.length>t){if(!(r=this.children.shift()))continue;r.parentNode.removeChild(r)}this.rows=t,this.y>=t&&(this.y=t-1),n&&(this.y+=n),this.x>=e&&(this.x=e-1),this.scrollTop=0,this.scrollBottom=t-1,this.charMeasure.measure(),this.refresh(0,this.rows-1),this.normal=null,this.geometry=[this.cols,this.rows],this.emit("resize",{terminal:this,cols:e,rows:t})}}},i.prototype.updateRange=function(e){ethis.refreshEnd&&(this.refreshEnd=e)},i.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1},i.prototype.setupStops=function(e){for(null!=e?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e0;);return e>=this.cols?this.cols-1:e<0?0:e},i.prototype.nextStop=function(e){for(null==e&&(e=this.x);!this.tabs[++e]&&e=this.cols?this.cols-1:e<0?0:e},i.prototype.eraseRight=function(e,t){var r=this.lines.get(this.ybase+t);if(r){for(var i=[this.eraseAttr()," ",1];ethis.scrollBottom&&(this.y--,this.scroll()),this.x>=this.cols&&this.x--},i.prototype.reverseIndex=function(){this.y===this.scrollTop?(this.lines.shiftElements(this.y+this.ybase,this.rows-1,1),this.lines.set(this.y+this.ybase,this.blankLine(!0)),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)):this.y--},i.prototype.reset=function(){this.options.rows=this.rows,this.options.cols=this.cols;var e=this.customKeyEventHandler,t=this.cursorBlinkInterval;i.call(this,this.options),this.customKeyEventHandler=e,this.cursorBlinkInterval=t,this.refresh(0,this.rows-1),this.viewport.syncScrollArea()},i.prototype.tabSet=function(){this.tabs[this.x]=!0},i.prototype.matchColor=l,l._cache={},l.distance=function(e,t,r,i,o,s){return Math.pow(30*(e-i),2)+Math.pow(59*(t-o),2)+Math.pow(11*(r-s),2)},i.EventEmitter=u.EventEmitter,i.inherits=n,i.on=o,i.off=s,i.cancel=function(e,t){if(this.cancelEvents||t)return e.preventDefault(),e.stopPropagation(),!1},e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this._events=this._events||{}}return e.prototype.on=function(e,t){this._events[e]=this._events[e]||[],this._events[e].push(t)},e.prototype.off=function(e,t){if(this._events[e])for(var r=this._events[e],i=r.length;i--;)if(r[i]===t||r[i].listener===t)return void r.splice(i,1)},e.prototype.removeAllListeners=function(e){this._events[e]&&delete this._events[e]},e.prototype.once=function(e,t){function r(){var i=Array.prototype.slice.call(arguments);return this.off(e,r),t.apply(this,i)}return r.listener=t,this.on(e,r)},e.prototype.emit=function(e){for(var t=[],r=1;r=0},function(e,t,r){"use strict";function i(e,t){if(null==e.pageX)return null;for(var r=e.pageX,i=e.pageY;t&&t!==self.document.documentElement;)r-=t.offsetLeft,i-=t.offsetTop,t="offsetParent"in t?t.offsetParent:t.parentElement;return[r,i]}function o(e,t,r,o,s,n){var a=i(e,t);return a[0]=Math.ceil((a[0]+(n?r.width/2:0))/r.width),a[1]=Math.ceil(a[1]/r.height),a[0]=Math.min(Math.max(a[0],1),o+1),a[1]=Math.min(Math.max(a[1],1),s+1),a}Object.defineProperty(t,"__esModule",{value:!0}),t.getCoordsRelativeToElement=i,t.getCoords=o,t.getRawByteCoords=function(e,t,r,i,s){var n=o(e,t,r,i,s),a=n[0],l=n[1];return a+=32,l+=32,{x:a,y:l}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(14),o=function(){function e(e){this.elem=e,i.hterm.defaultStorage=new i.lib.Storage.Memory,this.term=new i.hterm.Terminal,this.term.getPrefs().set("send-encoding","raw"),this.term.decorate(this.elem),this.io=this.term.io.push(),this.term.installKeyboard()}return e.prototype.info=function(){return{columns:this.columns,rows:this.rows}},e.prototype.output=function(e){null!=this.term.io&&this.term.io.writeUTF16(e)},e.prototype.showMessage=function(e,t){this.message=e,t>0?this.term.io.showOverlay(e,t):this.term.io.showOverlay(e,null)},e.prototype.removeMessage=function(){this.term.io.showOverlay(this.message,0)},e.prototype.setWindowTitle=function(e){this.term.setWindowTitle(e)},e.prototype.setPreferences=function(e){var t=this;Object.keys(e).forEach(function(r){t.term.getPrefs().set(r,e[r])})},e.prototype.onInput=function(e){this.io.onVTKeystroke=function(t){e(t)},this.io.sendString=function(t){e(t)}},e.prototype.onResize=function(e){var t=this;this.io.onTerminalResize=function(r,i){t.columns=r,t.rows=i,e(r,i)}},e.prototype.deactivate=function(){this.io.onVTKeystroke=null,this.io.sendString=null,this.io.onTerminalResize=null,this.term.uninstallKeyboard()},e.prototype.reset=function(){this.removeMessage(),this.term.installKeyboard()},e.prototype.close=function(){this.term.uninstallKeyboard()},e}();t.Hterm=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this.url=e,this.protocols=t}return e.prototype.create=function(){return new o(this.url,this.protocols)},e}();t.ConnectionFactory=i;var o=function(){function e(e,t){this.bare=new WebSocket(e,t)}return e.prototype.open=function(){},e.prototype.close=function(){this.bare.close()},e.prototype.send=function(e){this.bare.send(e)},e.prototype.isOpen=function(){return this.bare.readyState==WebSocket.CONNECTING||this.bare.readyState==WebSocket.OPEN},e.prototype.onOpen=function(e){this.bare.onopen=function(t){e()}},e.prototype.onReceive=function(e){this.bare.onmessage=function(t){e(t.data)}},e.prototype.onClose=function(e){this.bare.onclose=function(t){e()}},e}();t.Connection=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.protocols=["webtty"],t.msgInputUnknown="0",t.msgInput="1",t.msgPing="2",t.msgResizeTerminal="3",t.msgUnknownOutput="0",t.msgOutput="1",t.msgPong="2",t.msgSetWindowTitle="3",t.msgSetPreferences="4",t.msgSetReconnect="5";var i=function(){function e(e,t,r,i){this.term=e,this.connectionFactory=t,this.args=r,this.authToken=i,this.reconnect=-1}return e.prototype.open=function(){var e,r,i=this,o=this.connectionFactory.create(),s=function(){o.onOpen(function(){var r=i.term.info();o.send(JSON.stringify({Arguments:i.args,AuthToken:i.authToken}));var s=function(e,r){o.send(t.msgResizeTerminal+JSON.stringify({columns:e,rows:r}))};i.term.onResize(s),s(r.columns,r.rows),i.term.onInput(function(e){o.send(t.msgInput+e)}),e=setInterval(function(){o.send(t.msgPing)},3e4)}),o.onReceive(function(e){var r=e.slice(1);switch(e[0]){case t.msgOutput:i.term.output(decodeURIComponent(Array.prototype.map.call(atob(r),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join("")));break;case t.msgPong:break;case t.msgSetWindowTitle:i.term.setWindowTitle(r);break;case t.msgSetPreferences:var o=JSON.parse(r);i.term.setPreferences(o);break;case t.msgSetReconnect:var s=JSON.parse(r);console.log("Enabling reconnect: "+s+" seconds"),i.reconnect=s}}),o.onClose(function(){clearInterval(e),i.term.deactivate(),i.term.showMessage("Connection Closed",0),i.reconnect>0&&(r=setTimeout(function(){o=i.connectionFactory.create(),i.term.reset(),s()},1e3*i.reconnect))}),o.open()};return s(),function(){clearTimeout(r),o.close()}},e}();t.WebTTY=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(0);i.loadAddon("fit");var o=function(){function e(e){var t=this;this.elem=e,this.term=new i,this.message=e.ownerDocument.createElement("div"),this.message.className="xterm-overlay",this.messageTimeout=2e3,this.resizeListener=function(){t.term.fit(),t.term.scrollToBottom(),t.showMessage(String(t.term.cols)+"x"+String(t.term.rows),t.messageTimeout)},this.term.on("open",function(){t.resizeListener(),window.addEventListener("resize",function(){t.resizeListener()})}),this.term.open(e,!0)}return e.prototype.info=function(){return{columns:this.term.cols,rows:this.term.rows}},e.prototype.output=function(e){this.term.write(e)},e.prototype.showMessage=function(e,t){var r=this;this.message.textContent=e,this.elem.appendChild(this.message),this.messageTimer&&clearTimeout(this.messageTimer),t>0&&(this.messageTimer=setTimeout(function(){r.elem.removeChild(r.message)},t))},e.prototype.removeMessage=function(){this.message.parentNode==this.elem&&this.elem.removeChild(this.message)},e.prototype.setWindowTitle=function(e){document.title=e},e.prototype.setPreferences=function(e){},e.prototype.onInput=function(e){this.term.on("data",function(t){e(t)})},e.prototype.onResize=function(e){this.term.on("resize",function(t){e(t.cols,t.rows)})},e.prototype.deactivate=function(){this.term.off("data"),this.term.off("resize"),this.term.blur()},e.prototype.reset=function(){this.removeMessage(),this.term.clear()},e.prototype.close=function(){window.removeEventListener("resize",this.resizeListener),this.term.destroy()},e}();t.Xterm=o},function(e,t,r){"use strict";/*! * libapps (https://npmjs.com/package/libapps) * @license BSD-3-Clause * @version 1.70.0 * ==libapps/LICENSE== * // Copyright (c) 2006-2009 The Chromium OS Authors. All rights reserved. * // * // Redistribution and use in source and binary forms, with or without * // modification, are permitted provided that the following conditions are * // met: * // * // * Redistributions of source code must retain the above copyright * // notice, this list of conditions and the following disclaimer. * // * Redistributions in binary form must reproduce the above * // copyright notice, this list of conditions and the following disclaimer * // in the documentation and/or other materials provided with the * // distribution. * // * Neither the name of Google Inc. nor the names of its * // contributors may be used to endorse or promote products derived from * // this software without specific prior written permission. * // * // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ if(void 0!==i)throw new Error('Global "lib" object already exists.');var i={};i.runtimeDependencies_={},i.initCallbacks_=[],i.rtdep=function(e){var t;try{throw new Error}catch(e){var r=e.stack.split("\n");t=r.length>=3?r[2].replace(/^\s*at\s+/,""):r[1].replace(/^\s*global code@/,"")}for(var o=0;ot.length&&(t=t.repeat(e/t.length+1)),t.slice(0,e)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(e,t){return(e-=this.length)<=0?String(this):(void 0===t&&(t=" "),e>t.length&&(t=t.repeat(e/t.length+1)),String(this)+t.slice(0,e))}),i.colors={},i.colors.re_={hex16:/#([a-f0-9])([a-f0-9])([a-f0-9])/i,hex24:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/i,rgb:new RegExp("^/s*rgb/s*/(/s*(/d{1,3})/s*,/s*(/d{1,3})/s*,/s*(/d{1,3})/s*/)/s*$".replace(/\//g,"\\"),"i"),rgba:new RegExp("^/s*rgba/s*/(/s*(/d{1,3})/s*,/s*(/d{1,3})/s*,/s*(/d{1,3})/s*(?:,/s*(/d+(?:/./d+)?)/s*)/)/s*$".replace(/\//g,"\\"),"i"),rgbx:new RegExp("^/s*rgba?/s*/(/s*(/d{1,3})/s*,/s*(/d{1,3})/s*,/s*(/d{1,3})/s*(?:,/s*(/d+(?:/./d+)?)/s*)?/)/s*$".replace(/\//g,"\\"),"i"),x11rgb:/^\s*rgb:([a-f0-9]{1,4})\/([a-f0-9]{1,4})\/([a-f0-9]{1,4})\s*$/i,name:/[a-z][a-z0-9\s]+/},i.colors.rgbToX11=function(e){function t(e){return e=(257*Math.min(e,255)).toString(16),i.f.zpad(e,4)}var r=e.match(i.colors.re_.rgbx);return r?"rgb:"+t(r[1])+"/"+t(r[2])+"/"+t(r[3]):null},i.colors.x11HexToCSS=function(e){if(!e.startsWith("#"))return null;if(e=e.substr(1),-1==[3,6,9,12].indexOf(e.length))return null;if(e.match(/[^a-f0-9]/i))return null;var t=e.length/3,r=e.substr(0,t),o=e.substr(t,t),s=e.substr(t+t,t);return i.colors.arrayToRGBA([r,o,s].map(function(e){return e=parseInt(e,16),2==t?e:1==t?e<<4:e>>4*(t-2)}))},i.colors.x11ToCSS=function(e){var t=e.match(i.colors.re_.x11rgb);return t?(t.splice(0,1),i.colors.arrayToRGBA(t.map(function(e){return 1==e.length?parseInt(e+e,16):2==e.length?parseInt(e,16):(3==e.length&&(e+=e.substr(2)),Math.round(parseInt(e,16)/257))}))):e.startsWith("#")?i.colors.x11HexToCSS(e):i.colors.nameToRGB(e)},i.colors.hexToRGB=function(e){function t(e){4==e.length&&(e=e.replace(r,function(e,t,r,i){return"#"+t+t+r+r+i+i}));var t=e.match(o);return t?"rgb("+parseInt(t[1],16)+", "+parseInt(t[2],16)+", "+parseInt(t[3],16)+")":null}var r=i.colors.re_.hex16,o=i.colors.re_.hex24;if(e instanceof Array)for(var s=0;s3?e[3]:1;return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"},i.colors.setAlpha=function(e,t){var r=i.colors.crackRGB(e);return r[3]=t,i.colors.arrayToRGBA(r)},i.colors.mix=function(e,t,r){for(var o=i.colors.crackRGB(e),s=i.colors.crackRGB(t),n=0;n<4;++n){var a=s[n]-o[n];o[n]=Math.round(parseInt(o[n])+a*r)}return i.colors.arrayToRGBA(o)},i.colors.crackRGB=function(e){if(e.startsWith("rgba")){if(t=e.match(i.colors.re_.rgba))return t.shift(),t}else{var t=e.match(i.colors.re_.rgb);if(t)return t.shift(),t.push(1),t}return console.error("Couldn't crack: "+e),null},i.colors.nameToRGB=function(e){return e in i.colors.colorNames?i.colors.colorNames[e]:(e=e.toLowerCase())in i.colors.colorNames?i.colors.colorNames[e]:(e=e.replace(/\s+/g,""))in i.colors.colorNames?i.colors.colorNames[e]:null},i.colors.stockColorPalette=i.colors.hexToRGB(["#000000","#CC0000","#4E9A06","#C4A000","#3465A4","#75507B","#06989A","#D3D7CF","#555753","#EF2929","#00BA13","#FCE94F","#729FCF","#F200CB","#00B5BD","#EEEEEC","#000000","#00005F","#000087","#0000AF","#0000D7","#0000FF","#005F00","#005F5F","#005F87","#005FAF","#005FD7","#005FFF","#008700","#00875F","#008787","#0087AF","#0087D7","#0087FF","#00AF00","#00AF5F","#00AF87","#00AFAF","#00AFD7","#00AFFF","#00D700","#00D75F","#00D787","#00D7AF","#00D7D7","#00D7FF","#00FF00","#00FF5F","#00FF87","#00FFAF","#00FFD7","#00FFFF","#5F0000","#5F005F","#5F0087","#5F00AF","#5F00D7","#5F00FF","#5F5F00","#5F5F5F","#5F5F87","#5F5FAF","#5F5FD7","#5F5FFF","#5F8700","#5F875F","#5F8787","#5F87AF","#5F87D7","#5F87FF","#5FAF00","#5FAF5F","#5FAF87","#5FAFAF","#5FAFD7","#5FAFFF","#5FD700","#5FD75F","#5FD787","#5FD7AF","#5FD7D7","#5FD7FF","#5FFF00","#5FFF5F","#5FFF87","#5FFFAF","#5FFFD7","#5FFFFF","#870000","#87005F","#870087","#8700AF","#8700D7","#8700FF","#875F00","#875F5F","#875F87","#875FAF","#875FD7","#875FFF","#878700","#87875F","#878787","#8787AF","#8787D7","#8787FF","#87AF00","#87AF5F","#87AF87","#87AFAF","#87AFD7","#87AFFF","#87D700","#87D75F","#87D787","#87D7AF","#87D7D7","#87D7FF","#87FF00","#87FF5F","#87FF87","#87FFAF","#87FFD7","#87FFFF","#AF0000","#AF005F","#AF0087","#AF00AF","#AF00D7","#AF00FF","#AF5F00","#AF5F5F","#AF5F87","#AF5FAF","#AF5FD7","#AF5FFF","#AF8700","#AF875F","#AF8787","#AF87AF","#AF87D7","#AF87FF","#AFAF00","#AFAF5F","#AFAF87","#AFAFAF","#AFAFD7","#AFAFFF","#AFD700","#AFD75F","#AFD787","#AFD7AF","#AFD7D7","#AFD7FF","#AFFF00","#AFFF5F","#AFFF87","#AFFFAF","#AFFFD7","#AFFFFF","#D70000","#D7005F","#D70087","#D700AF","#D700D7","#D700FF","#D75F00","#D75F5F","#D75F87","#D75FAF","#D75FD7","#D75FFF","#D78700","#D7875F","#D78787","#D787AF","#D787D7","#D787FF","#D7AF00","#D7AF5F","#D7AF87","#D7AFAF","#D7AFD7","#D7AFFF","#D7D700","#D7D75F","#D7D787","#D7D7AF","#D7D7D7","#D7D7FF","#D7FF00","#D7FF5F","#D7FF87","#D7FFAF","#D7FFD7","#D7FFFF","#FF0000","#FF005F","#FF0087","#FF00AF","#FF00D7","#FF00FF","#FF5F00","#FF5F5F","#FF5F87","#FF5FAF","#FF5FD7","#FF5FFF","#FF8700","#FF875F","#FF8787","#FF87AF","#FF87D7","#FF87FF","#FFAF00","#FFAF5F","#FFAF87","#FFAFAF","#FFAFD7","#FFAFFF","#FFD700","#FFD75F","#FFD787","#FFD7AF","#FFD7D7","#FFD7FF","#FFFF00","#FFFF5F","#FFFF87","#FFFFAF","#FFFFD7","#FFFFFF","#080808","#121212","#1C1C1C","#262626","#303030","#3A3A3A","#444444","#4E4E4E","#585858","#626262","#6C6C6C","#767676","#808080","#8A8A8A","#949494","#9E9E9E","#A8A8A8","#B2B2B2","#BCBCBC","#C6C6C6","#D0D0D0","#DADADA","#E4E4E4","#EEEEEE"]),i.colors.colorPalette=i.colors.stockColorPalette,i.colors.colorNames={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",antiquewhite1:"rgb(255, 239, 219)",antiquewhite2:"rgb(238, 223, 204)",antiquewhite3:"rgb(205, 192, 176)",antiquewhite4:"rgb(139, 131, 120)",aquamarine:"rgb(127, 255, 212)",aquamarine1:"rgb(127, 255, 212)",aquamarine2:"rgb(118, 238, 198)",aquamarine3:"rgb(102, 205, 170)",aquamarine4:"rgb(69, 139, 116)",azure:"rgb(240, 255, 255)",azure1:"rgb(240, 255, 255)",azure2:"rgb(224, 238, 238)",azure3:"rgb(193, 205, 205)",azure4:"rgb(131, 139, 139)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",bisque1:"rgb(255, 228, 196)",bisque2:"rgb(238, 213, 183)",bisque3:"rgb(205, 183, 158)",bisque4:"rgb(139, 125, 107)",black:"rgb(0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb(0, 0, 255)",blue1:"rgb(0, 0, 255)",blue2:"rgb(0, 0, 238)",blue3:"rgb(0, 0, 205)",blue4:"rgb(0, 0, 139)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",brown1:"rgb(255, 64, 64)",brown2:"rgb(238, 59, 59)",brown3:"rgb(205, 51, 51)",brown4:"rgb(139, 35, 35)",burlywood:"rgb(222, 184, 135)",burlywood1:"rgb(255, 211, 155)",burlywood2:"rgb(238, 197, 145)",burlywood3:"rgb(205, 170, 125)",burlywood4:"rgb(139, 115, 85)",cadetblue:"rgb(95, 158, 160)",cadetblue1:"rgb(152, 245, 255)",cadetblue2:"rgb(142, 229, 238)",cadetblue3:"rgb(122, 197, 205)",cadetblue4:"rgb(83, 134, 139)",chartreuse:"rgb(127, 255, 0)",chartreuse1:"rgb(127, 255, 0)",chartreuse2:"rgb(118, 238, 0)",chartreuse3:"rgb(102, 205, 0)",chartreuse4:"rgb(69, 139, 0)",chocolate:"rgb(210, 105, 30)",chocolate1:"rgb(255, 127, 36)",chocolate2:"rgb(238, 118, 33)",chocolate3:"rgb(205, 102, 29)",chocolate4:"rgb(139, 69, 19)",coral:"rgb(255, 127, 80)",coral1:"rgb(255, 114, 86)",coral2:"rgb(238, 106, 80)",coral3:"rgb(205, 91, 69)",coral4:"rgb(139, 62, 47)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",cornsilk1:"rgb(255, 248, 220)",cornsilk2:"rgb(238, 232, 205)",cornsilk3:"rgb(205, 200, 177)",cornsilk4:"rgb(139, 136, 120)",cyan:"rgb(0, 255, 255)",cyan1:"rgb(0, 255, 255)",cyan2:"rgb(0, 238, 238)",cyan3:"rgb(0, 205, 205)",cyan4:"rgb(0, 139, 139)",darkblue:"rgb(0, 0, 139)",darkcyan:"rgb(0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgoldenrod1:"rgb(255, 185, 15)",darkgoldenrod2:"rgb(238, 173, 14)",darkgoldenrod3:"rgb(205, 149, 12)",darkgoldenrod4:"rgb(139, 101, 8)",darkgray:"rgb(169, 169, 169)",darkgreen:"rgb(0, 100, 0)",darkgrey:"rgb(169, 169, 169)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb(85, 107, 47)",darkolivegreen1:"rgb(202, 255, 112)",darkolivegreen2:"rgb(188, 238, 104)",darkolivegreen3:"rgb(162, 205, 90)",darkolivegreen4:"rgb(110, 139, 61)",darkorange:"rgb(255, 140, 0)",darkorange1:"rgb(255, 127, 0)",darkorange2:"rgb(238, 118, 0)",darkorange3:"rgb(205, 102, 0)",darkorange4:"rgb(139, 69, 0)",darkorchid:"rgb(153, 50, 204)",darkorchid1:"rgb(191, 62, 255)",darkorchid2:"rgb(178, 58, 238)",darkorchid3:"rgb(154, 50, 205)",darkorchid4:"rgb(104, 34, 139)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkseagreen1:"rgb(193, 255, 193)",darkseagreen2:"rgb(180, 238, 180)",darkseagreen3:"rgb(155, 205, 155)",darkseagreen4:"rgb(105, 139, 105)",darkslateblue:"rgb(72, 61, 139)",darkslategray:"rgb(47, 79, 79)",darkslategray1:"rgb(151, 255, 255)",darkslategray2:"rgb(141, 238, 238)",darkslategray3:"rgb(121, 205, 205)",darkslategray4:"rgb(82, 139, 139)",darkslategrey:"rgb(47, 79, 79)",darkturquoise:"rgb(0, 206, 209)",darkviolet:"rgb(148, 0, 211)",debianred:"rgb(215, 7, 81)",deeppink:"rgb(255, 20, 147)",deeppink1:"rgb(255, 20, 147)",deeppink2:"rgb(238, 18, 137)",deeppink3:"rgb(205, 16, 118)",deeppink4:"rgb(139, 10, 80)",deepskyblue:"rgb(0, 191, 255)",deepskyblue1:"rgb(0, 191, 255)",deepskyblue2:"rgb(0, 178, 238)",deepskyblue3:"rgb(0, 154, 205)",deepskyblue4:"rgb(0, 104, 139)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb(30, 144, 255)",dodgerblue1:"rgb(30, 144, 255)",dodgerblue2:"rgb(28, 134, 238)",dodgerblue3:"rgb(24, 116, 205)",dodgerblue4:"rgb(16, 78, 139)",firebrick:"rgb(178, 34, 34)",firebrick1:"rgb(255, 48, 48)",firebrick2:"rgb(238, 44, 44)",firebrick3:"rgb(205, 38, 38)",firebrick4:"rgb(139, 26, 26)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb(34, 139, 34)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",gold1:"rgb(255, 215, 0)",gold2:"rgb(238, 201, 0)",gold3:"rgb(205, 173, 0)",gold4:"rgb(139, 117, 0)",goldenrod:"rgb(218, 165, 32)",goldenrod1:"rgb(255, 193, 37)",goldenrod2:"rgb(238, 180, 34)",goldenrod3:"rgb(205, 155, 29)",goldenrod4:"rgb(139, 105, 20)",gray:"rgb(190, 190, 190)",gray0:"rgb(0, 0, 0)",gray1:"rgb(3, 3, 3)",gray10:"rgb(26, 26, 26)",gray100:"rgb(255, 255, 255)",gray11:"rgb(28, 28, 28)",gray12:"rgb(31, 31, 31)",gray13:"rgb(33, 33, 33)",gray14:"rgb(36, 36, 36)",gray15:"rgb(38, 38, 38)",gray16:"rgb(41, 41, 41)",gray17:"rgb(43, 43, 43)",gray18:"rgb(46, 46, 46)",gray19:"rgb(48, 48, 48)",gray2:"rgb(5, 5, 5)",gray20:"rgb(51, 51, 51)",gray21:"rgb(54, 54, 54)",gray22:"rgb(56, 56, 56)",gray23:"rgb(59, 59, 59)",gray24:"rgb(61, 61, 61)",gray25:"rgb(64, 64, 64)",gray26:"rgb(66, 66, 66)",gray27:"rgb(69, 69, 69)",gray28:"rgb(71, 71, 71)",gray29:"rgb(74, 74, 74)",gray3:"rgb(8, 8, 8)",gray30:"rgb(77, 77, 77)",gray31:"rgb(79, 79, 79)",gray32:"rgb(82, 82, 82)",gray33:"rgb(84, 84, 84)",gray34:"rgb(87, 87, 87)",gray35:"rgb(89, 89, 89)",gray36:"rgb(92, 92, 92)",gray37:"rgb(94, 94, 94)",gray38:"rgb(97, 97, 97)",gray39:"rgb(99, 99, 99)",gray4:"rgb(10, 10, 10)",gray40:"rgb(102, 102, 102)",gray41:"rgb(105, 105, 105)",gray42:"rgb(107, 107, 107)",gray43:"rgb(110, 110, 110)",gray44:"rgb(112, 112, 112)",gray45:"rgb(115, 115, 115)",gray46:"rgb(117, 117, 117)",gray47:"rgb(120, 120, 120)",gray48:"rgb(122, 122, 122)",gray49:"rgb(125, 125, 125)",gray5:"rgb(13, 13, 13)",gray50:"rgb(127, 127, 127)",gray51:"rgb(130, 130, 130)",gray52:"rgb(133, 133, 133)",gray53:"rgb(135, 135, 135)",gray54:"rgb(138, 138, 138)",gray55:"rgb(140, 140, 140)",gray56:"rgb(143, 143, 143)",gray57:"rgb(145, 145, 145)",gray58:"rgb(148, 148, 148)",gray59:"rgb(150, 150, 150)",gray6:"rgb(15, 15, 15)",gray60:"rgb(153, 153, 153)",gray61:"rgb(156, 156, 156)",gray62:"rgb(158, 158, 158)",gray63:"rgb(161, 161, 161)",gray64:"rgb(163, 163, 163)",gray65:"rgb(166, 166, 166)",gray66:"rgb(168, 168, 168)",gray67:"rgb(171, 171, 171)",gray68:"rgb(173, 173, 173)",gray69:"rgb(176, 176, 176)",gray7:"rgb(18, 18, 18)",gray70:"rgb(179, 179, 179)",gray71:"rgb(181, 181, 181)",gray72:"rgb(184, 184, 184)",gray73:"rgb(186, 186, 186)",gray74:"rgb(189, 189, 189)",gray75:"rgb(191, 191, 191)",gray76:"rgb(194, 194, 194)",gray77:"rgb(196, 196, 196)",gray78:"rgb(199, 199, 199)",gray79:"rgb(201, 201, 201)",gray8:"rgb(20, 20, 20)",gray80:"rgb(204, 204, 204)",gray81:"rgb(207, 207, 207)",gray82:"rgb(209, 209, 209)",gray83:"rgb(212, 212, 212)",gray84:"rgb(214, 214, 214)",gray85:"rgb(217, 217, 217)",gray86:"rgb(219, 219, 219)",gray87:"rgb(222, 222, 222)",gray88:"rgb(224, 224, 224)",gray89:"rgb(227, 227, 227)",gray9:"rgb(23, 23, 23)",gray90:"rgb(229, 229, 229)",gray91:"rgb(232, 232, 232)",gray92:"rgb(235, 235, 235)",gray93:"rgb(237, 237, 237)",gray94:"rgb(240, 240, 240)",gray95:"rgb(242, 242, 242)",gray96:"rgb(245, 245, 245)",gray97:"rgb(247, 247, 247)",gray98:"rgb(250, 250, 250)",gray99:"rgb(252, 252, 252)",green:"rgb(0, 255, 0)",green1:"rgb(0, 255, 0)",green2:"rgb(0, 238, 0)",green3:"rgb(0, 205, 0)",green4:"rgb(0, 139, 0)",greenyellow:"rgb(173, 255, 47)",grey:"rgb(190, 190, 190)",grey0:"rgb(0, 0, 0)",grey1:"rgb(3, 3, 3)",grey10:"rgb(26, 26, 26)",grey100:"rgb(255, 255, 255)",grey11:"rgb(28, 28, 28)",grey12:"rgb(31, 31, 31)",grey13:"rgb(33, 33, 33)",grey14:"rgb(36, 36, 36)",grey15:"rgb(38, 38, 38)",grey16:"rgb(41, 41, 41)",grey17:"rgb(43, 43, 43)",grey18:"rgb(46, 46, 46)",grey19:"rgb(48, 48, 48)",grey2:"rgb(5, 5, 5)",grey20:"rgb(51, 51, 51)",grey21:"rgb(54, 54, 54)",grey22:"rgb(56, 56, 56)",grey23:"rgb(59, 59, 59)",grey24:"rgb(61, 61, 61)",grey25:"rgb(64, 64, 64)",grey26:"rgb(66, 66, 66)",grey27:"rgb(69, 69, 69)",grey28:"rgb(71, 71, 71)",grey29:"rgb(74, 74, 74)",grey3:"rgb(8, 8, 8)",grey30:"rgb(77, 77, 77)",grey31:"rgb(79, 79, 79)",grey32:"rgb(82, 82, 82)",grey33:"rgb(84, 84, 84)",grey34:"rgb(87, 87, 87)",grey35:"rgb(89, 89, 89)",grey36:"rgb(92, 92, 92)",grey37:"rgb(94, 94, 94)",grey38:"rgb(97, 97, 97)",grey39:"rgb(99, 99, 99)",grey4:"rgb(10, 10, 10)",grey40:"rgb(102, 102, 102)",grey41:"rgb(105, 105, 105)",grey42:"rgb(107, 107, 107)",grey43:"rgb(110, 110, 110)",grey44:"rgb(112, 112, 112)",grey45:"rgb(115, 115, 115)",grey46:"rgb(117, 117, 117)",grey47:"rgb(120, 120, 120)",grey48:"rgb(122, 122, 122)",grey49:"rgb(125, 125, 125)",grey5:"rgb(13, 13, 13)",grey50:"rgb(127, 127, 127)",grey51:"rgb(130, 130, 130)",grey52:"rgb(133, 133, 133)",grey53:"rgb(135, 135, 135)",grey54:"rgb(138, 138, 138)",grey55:"rgb(140, 140, 140)",grey56:"rgb(143, 143, 143)",grey57:"rgb(145, 145, 145)",grey58:"rgb(148, 148, 148)",grey59:"rgb(150, 150, 150)",grey6:"rgb(15, 15, 15)",grey60:"rgb(153, 153, 153)",grey61:"rgb(156, 156, 156)",grey62:"rgb(158, 158, 158)",grey63:"rgb(161, 161, 161)",grey64:"rgb(163, 163, 163)",grey65:"rgb(166, 166, 166)",grey66:"rgb(168, 168, 168)",grey67:"rgb(171, 171, 171)",grey68:"rgb(173, 173, 173)",grey69:"rgb(176, 176, 176)",grey7:"rgb(18, 18, 18)",grey70:"rgb(179, 179, 179)",grey71:"rgb(181, 181, 181)",grey72:"rgb(184, 184, 184)",grey73:"rgb(186, 186, 186)",grey74:"rgb(189, 189, 189)",grey75:"rgb(191, 191, 191)",grey76:"rgb(194, 194, 194)",grey77:"rgb(196, 196, 196)",grey78:"rgb(199, 199, 199)",grey79:"rgb(201, 201, 201)",grey8:"rgb(20, 20, 20)",grey80:"rgb(204, 204, 204)",grey81:"rgb(207, 207, 207)",grey82:"rgb(209, 209, 209)",grey83:"rgb(212, 212, 212)",grey84:"rgb(214, 214, 214)",grey85:"rgb(217, 217, 217)",grey86:"rgb(219, 219, 219)",grey87:"rgb(222, 222, 222)",grey88:"rgb(224, 224, 224)",grey89:"rgb(227, 227, 227)",grey9:"rgb(23, 23, 23)",grey90:"rgb(229, 229, 229)",grey91:"rgb(232, 232, 232)",grey92:"rgb(235, 235, 235)",grey93:"rgb(237, 237, 237)",grey94:"rgb(240, 240, 240)",grey95:"rgb(242, 242, 242)",grey96:"rgb(245, 245, 245)",grey97:"rgb(247, 247, 247)",grey98:"rgb(250, 250, 250)",grey99:"rgb(252, 252, 252)",honeydew:"rgb(240, 255, 240)",honeydew1:"rgb(240, 255, 240)",honeydew2:"rgb(224, 238, 224)",honeydew3:"rgb(193, 205, 193)",honeydew4:"rgb(131, 139, 131)",hotpink:"rgb(255, 105, 180)",hotpink1:"rgb(255, 110, 180)",hotpink2:"rgb(238, 106, 167)",hotpink3:"rgb(205, 96, 144)",hotpink4:"rgb(139, 58, 98)",indianred:"rgb(205, 92, 92)",indianred1:"rgb(255, 106, 106)",indianred2:"rgb(238, 99, 99)",indianred3:"rgb(205, 85, 85)",indianred4:"rgb(139, 58, 58)",ivory:"rgb(255, 255, 240)",ivory1:"rgb(255, 255, 240)",ivory2:"rgb(238, 238, 224)",ivory3:"rgb(205, 205, 193)",ivory4:"rgb(139, 139, 131)",khaki:"rgb(240, 230, 140)",khaki1:"rgb(255, 246, 143)",khaki2:"rgb(238, 230, 133)",khaki3:"rgb(205, 198, 115)",khaki4:"rgb(139, 134, 78)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lavenderblush1:"rgb(255, 240, 245)",lavenderblush2:"rgb(238, 224, 229)",lavenderblush3:"rgb(205, 193, 197)",lavenderblush4:"rgb(139, 131, 134)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lemonchiffon1:"rgb(255, 250, 205)",lemonchiffon2:"rgb(238, 233, 191)",lemonchiffon3:"rgb(205, 201, 165)",lemonchiffon4:"rgb(139, 137, 112)",lightblue:"rgb(173, 216, 230)",lightblue1:"rgb(191, 239, 255)",lightblue2:"rgb(178, 223, 238)",lightblue3:"rgb(154, 192, 205)",lightblue4:"rgb(104, 131, 139)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightcyan1:"rgb(224, 255, 255)",lightcyan2:"rgb(209, 238, 238)",lightcyan3:"rgb(180, 205, 205)",lightcyan4:"rgb(122, 139, 139)",lightgoldenrod:"rgb(238, 221, 130)",lightgoldenrod1:"rgb(255, 236, 139)",lightgoldenrod2:"rgb(238, 220, 130)",lightgoldenrod3:"rgb(205, 190, 112)",lightgoldenrod4:"rgb(139, 129, 76)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgray:"rgb(211, 211, 211)",lightgreen:"rgb(144, 238, 144)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightpink1:"rgb(255, 174, 185)",lightpink2:"rgb(238, 162, 173)",lightpink3:"rgb(205, 140, 149)",lightpink4:"rgb(139, 95, 101)",lightsalmon:"rgb(255, 160, 122)",lightsalmon1:"rgb(255, 160, 122)",lightsalmon2:"rgb(238, 149, 114)",lightsalmon3:"rgb(205, 129, 98)",lightsalmon4:"rgb(139, 87, 66)",lightseagreen:"rgb(32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightskyblue1:"rgb(176, 226, 255)",lightskyblue2:"rgb(164, 211, 238)",lightskyblue3:"rgb(141, 182, 205)",lightskyblue4:"rgb(96, 123, 139)",lightslateblue:"rgb(132, 112, 255)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightsteelblue1:"rgb(202, 225, 255)",lightsteelblue2:"rgb(188, 210, 238)",lightsteelblue3:"rgb(162, 181, 205)",lightsteelblue4:"rgb(110, 123, 139)",lightyellow:"rgb(255, 255, 224)",lightyellow1:"rgb(255, 255, 224)",lightyellow2:"rgb(238, 238, 209)",lightyellow3:"rgb(205, 205, 180)",lightyellow4:"rgb(139, 139, 122)",limegreen:"rgb(50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",magenta1:"rgb(255, 0, 255)",magenta2:"rgb(238, 0, 238)",magenta3:"rgb(205, 0, 205)",magenta4:"rgb(139, 0, 139)",maroon:"rgb(176, 48, 96)",maroon1:"rgb(255, 52, 179)",maroon2:"rgb(238, 48, 167)",maroon3:"rgb(205, 41, 144)",maroon4:"rgb(139, 28, 98)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb(0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumorchid1:"rgb(224, 102, 255)",mediumorchid2:"rgb(209, 95, 238)",mediumorchid3:"rgb(180, 82, 205)",mediumorchid4:"rgb(122, 55, 139)",mediumpurple:"rgb(147, 112, 219)",mediumpurple1:"rgb(171, 130, 255)",mediumpurple2:"rgb(159, 121, 238)",mediumpurple3:"rgb(137, 104, 205)",mediumpurple4:"rgb(93, 71, 139)",mediumseagreen:"rgb(60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb(0, 250, 154)",mediumturquoise:"rgb(72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb(25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",mistyrose1:"rgb(255, 228, 225)",mistyrose2:"rgb(238, 213, 210)",mistyrose3:"rgb(205, 183, 181)",mistyrose4:"rgb(139, 125, 123)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navajowhite1:"rgb(255, 222, 173)",navajowhite2:"rgb(238, 207, 161)",navajowhite3:"rgb(205, 179, 139)",navajowhite4:"rgb(139, 121, 94)",navy:"rgb(0, 0, 128)",navyblue:"rgb(0, 0, 128)",oldlace:"rgb(253, 245, 230)",olivedrab:"rgb(107, 142, 35)",olivedrab1:"rgb(192, 255, 62)",olivedrab2:"rgb(179, 238, 58)",olivedrab3:"rgb(154, 205, 50)",olivedrab4:"rgb(105, 139, 34)",orange:"rgb(255, 165, 0)",orange1:"rgb(255, 165, 0)",orange2:"rgb(238, 154, 0)",orange3:"rgb(205, 133, 0)",orange4:"rgb(139, 90, 0)",orangered:"rgb(255, 69, 0)",orangered1:"rgb(255, 69, 0)",orangered2:"rgb(238, 64, 0)",orangered3:"rgb(205, 55, 0)",orangered4:"rgb(139, 37, 0)",orchid:"rgb(218, 112, 214)",orchid1:"rgb(255, 131, 250)",orchid2:"rgb(238, 122, 233)",orchid3:"rgb(205, 105, 201)",orchid4:"rgb(139, 71, 137)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",palegreen1:"rgb(154, 255, 154)",palegreen2:"rgb(144, 238, 144)",palegreen3:"rgb(124, 205, 124)",palegreen4:"rgb(84, 139, 84)",paleturquoise:"rgb(175, 238, 238)",paleturquoise1:"rgb(187, 255, 255)",paleturquoise2:"rgb(174, 238, 238)",paleturquoise3:"rgb(150, 205, 205)",paleturquoise4:"rgb(102, 139, 139)",palevioletred:"rgb(219, 112, 147)",palevioletred1:"rgb(255, 130, 171)",palevioletred2:"rgb(238, 121, 159)",palevioletred3:"rgb(205, 104, 137)",palevioletred4:"rgb(139, 71, 93)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peachpuff1:"rgb(255, 218, 185)",peachpuff2:"rgb(238, 203, 173)",peachpuff3:"rgb(205, 175, 149)",peachpuff4:"rgb(139, 119, 101)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",pink1:"rgb(255, 181, 197)",pink2:"rgb(238, 169, 184)",pink3:"rgb(205, 145, 158)",pink4:"rgb(139, 99, 108)",plum:"rgb(221, 160, 221)",plum1:"rgb(255, 187, 255)",plum2:"rgb(238, 174, 238)",plum3:"rgb(205, 150, 205)",plum4:"rgb(139, 102, 139)",powderblue:"rgb(176, 224, 230)",purple:"rgb(160, 32, 240)",purple1:"rgb(155, 48, 255)",purple2:"rgb(145, 44, 238)",purple3:"rgb(125, 38, 205)",purple4:"rgb(85, 26, 139)",red:"rgb(255, 0, 0)",red1:"rgb(255, 0, 0)",red2:"rgb(238, 0, 0)",red3:"rgb(205, 0, 0)",red4:"rgb(139, 0, 0)",rosybrown:"rgb(188, 143, 143)",rosybrown1:"rgb(255, 193, 193)",rosybrown2:"rgb(238, 180, 180)",rosybrown3:"rgb(205, 155, 155)",rosybrown4:"rgb(139, 105, 105)",royalblue:"rgb(65, 105, 225)",royalblue1:"rgb(72, 118, 255)",royalblue2:"rgb(67, 110, 238)",royalblue3:"rgb(58, 95, 205)",royalblue4:"rgb(39, 64, 139)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",salmon1:"rgb(255, 140, 105)",salmon2:"rgb(238, 130, 98)",salmon3:"rgb(205, 112, 84)",salmon4:"rgb(139, 76, 57)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb(46, 139, 87)",seagreen1:"rgb(84, 255, 159)",seagreen2:"rgb(78, 238, 148)",seagreen3:"rgb(67, 205, 128)",seagreen4:"rgb(46, 139, 87)",seashell:"rgb(255, 245, 238)",seashell1:"rgb(255, 245, 238)",seashell2:"rgb(238, 229, 222)",seashell3:"rgb(205, 197, 191)",seashell4:"rgb(139, 134, 130)",sienna:"rgb(160, 82, 45)",sienna1:"rgb(255, 130, 71)",sienna2:"rgb(238, 121, 66)",sienna3:"rgb(205, 104, 57)",sienna4:"rgb(139, 71, 38)",skyblue:"rgb(135, 206, 235)",skyblue1:"rgb(135, 206, 255)",skyblue2:"rgb(126, 192, 238)",skyblue3:"rgb(108, 166, 205)",skyblue4:"rgb(74, 112, 139)",slateblue:"rgb(106, 90, 205)",slateblue1:"rgb(131, 111, 255)",slateblue2:"rgb(122, 103, 238)",slateblue3:"rgb(105, 89, 205)",slateblue4:"rgb(71, 60, 139)",slategray:"rgb(112, 128, 144)",slategray1:"rgb(198, 226, 255)",slategray2:"rgb(185, 211, 238)",slategray3:"rgb(159, 182, 205)",slategray4:"rgb(108, 123, 139)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",snow1:"rgb(255, 250, 250)",snow2:"rgb(238, 233, 233)",snow3:"rgb(205, 201, 201)",snow4:"rgb(139, 137, 137)",springgreen:"rgb(0, 255, 127)",springgreen1:"rgb(0, 255, 127)",springgreen2:"rgb(0, 238, 118)",springgreen3:"rgb(0, 205, 102)",springgreen4:"rgb(0, 139, 69)",steelblue:"rgb(70, 130, 180)",steelblue1:"rgb(99, 184, 255)",steelblue2:"rgb(92, 172, 238)",steelblue3:"rgb(79, 148, 205)",steelblue4:"rgb(54, 100, 139)",tan:"rgb(210, 180, 140)",tan1:"rgb(255, 165, 79)",tan2:"rgb(238, 154, 73)",tan3:"rgb(205, 133, 63)",tan4:"rgb(139, 90, 43)",thistle:"rgb(216, 191, 216)",thistle1:"rgb(255, 225, 255)",thistle2:"rgb(238, 210, 238)",thistle3:"rgb(205, 181, 205)",thistle4:"rgb(139, 123, 139)",tomato:"rgb(255, 99, 71)",tomato1:"rgb(255, 99, 71)",tomato2:"rgb(238, 92, 66)",tomato3:"rgb(205, 79, 57)",tomato4:"rgb(139, 54, 38)",turquoise:"rgb(64, 224, 208)",turquoise1:"rgb(0, 245, 255)",turquoise2:"rgb(0, 229, 238)",turquoise3:"rgb(0, 197, 205)",turquoise4:"rgb(0, 134, 139)",violet:"rgb(238, 130, 238)",violetred:"rgb(208, 32, 144)",violetred1:"rgb(255, 62, 150)",violetred2:"rgb(238, 58, 140)",violetred3:"rgb(205, 50, 120)",violetred4:"rgb(139, 34, 82)",wheat:"rgb(245, 222, 179)",wheat1:"rgb(255, 231, 186)",wheat2:"rgb(238, 216, 174)",wheat3:"rgb(205, 186, 150)",wheat4:"rgb(139, 126, 102)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellow1:"rgb(255, 255, 0)",yellow2:"rgb(238, 238, 0)",yellow3:"rgb(205, 205, 0)",yellow4:"rgb(139, 139, 0)",yellowgreen:"rgb(154, 205, 50)"},i.f={},i.f.createEnum=function(e){return new String(e)},i.f.replaceVars=function(e,t){return e.replace(/%([a-z]*)\(([^\)]+)\)/gi,function(e,r,o){if(void 0===t[o])throw"Unknown variable: "+o;var s=t[o];if(r in i.f.replaceVars.functions)s=i.f.replaceVars.functions[r](s);else if(r)throw"Unknown escape function: "+r;return s})},i.f.replaceVars.functions={encodeURI:encodeURI,encodeURIComponent:encodeURIComponent,escapeHTML:function(e){var t={"<":"<",">":">","&":"&",'"':""","'":"'"};return e.replace(/[<>&\"\']/g,function(e){return t[e]})}},i.f.getAcceptLanguages=function(e){i.f.getAcceptLanguages.chromeSupported()?chrome.i18n.getAcceptLanguages(e):setTimeout(function(){e([navigator.language.replace(/-/g,"_")])},0)},i.f.getAcceptLanguages.chromeSupported=function(){return window.chrome&&chrome.i18n},i.f.parseQuery=function(e){e.startsWith("?")&&(e=e.substr(1));for(var t={},r=e.split("&"),i=0;ir?r:e},i.f.zpad=function(e,t){return String(e).padStart(t,"0")},i.f.getWhitespace=function(e){if(e<=0)return"";var t=this.getWhitespace;for(t.whitespace||(t.whitespace=" ");e>t.whitespace.length;)t.whitespace+=t.whitespace;return t.whitespace.substr(0,e)},i.f.alarm=function(e,t){var r=t||5e3,o=i.f.getStack(1);return function(){var t=setTimeout(function(){var i="string"==typeof e?i:e.name;i=i?": "+i:"",console.warn("lib.f.alarm: timeout expired: "+r/1e3+"s"+i),console.log(o),t=null},r),i=function(e){return function(){return t&&(clearTimeout(t),t=null),e.apply(null,arguments)}};return"string"==typeof e?i:i(e)}()},i.f.getStack=function(e){var t,r=e?e+2:2;try{throw new Error}catch(e){t=e.stack.split("\n")}for(var i={},o=r;o=0&&this.observers.splice(t,1)},i.PreferenceManager.Record.prototype.get=function(){return this.currentValue===this.DEFAULT_VALUE?/^(string|number)$/.test(typeof this.defaultValue)?this.defaultValue:"object"==typeof this.defaultValue?JSON.parse(JSON.stringify(this.defaultValue)):this.defaultValue:this.currentValue},i.PreferenceManager.prototype.deactivate=function(){if(!this.isActive_)throw new Error("Not activated");this.isActive_=!1,this.storage.removeObserver(this.storageObserver_)},i.PreferenceManager.prototype.activate=function(){if(this.isActive_)throw new Error("Already activated");this.isActive_=!0,this.storage.addObserver(this.storageObserver_)},i.PreferenceManager.prototype.readStorage=function(e){function t(){0==--r&&e&&e()}var r=0,i=Object.keys(this.prefRecords_).map(function(e){return this.prefix+e}.bind(this));this.trace&&console.log("Preferences read: "+this.prefix),this.storage.getItems(i,function(i){var o=this.prefix.length;for(var s in i){var n=i[s],a=s.substr(o),l=a in this.childLists_&&JSON.stringify(n)!=JSON.stringify(this.prefRecords_[a].currentValue);this.prefRecords_[a].currentValue=n,l&&(r++,this.syncChildList(a,t))}0==r&&e&&setTimeout(e)}.bind(this))},i.PreferenceManager.prototype.definePreference=function(e,t,r){var o=this.prefRecords_[e];o?this.changeDefault(e,t):o=this.prefRecords_[e]=new i.PreferenceManager.Record(e,t),r&&o.addObserver(r)},i.PreferenceManager.prototype.definePreferences=function(e){for(var t=0;t=0&&s.splice(l,1),!this.childLists_[e][a]){var h=this.childFactories_[e](this,a);if(!h){console.warn("Unable to restore child: "+e+": "+a);continue}h.trace=this.trace,this.childLists_[e][a]=h,r++,h.readStorage(function(){0==--r&&t&&t()})}}for(n=0;n=0;i--){var o=e[i],s=this.storage_.getItem(o);if("string"==typeof s)try{r[o]=JSON.parse(s)}catch(e){r[o]=s}else e.splice(i,1)}setTimeout(t.bind(null,r),0)},i.Storage.Local.prototype.setItem=function(e,t,r){this.storage_.setItem(e,JSON.stringify(t)),r&&setTimeout(r,0)},i.Storage.Local.prototype.setItems=function(e,t){for(var r in e)this.storage_.setItem(r,JSON.stringify(e[r]));t&&setTimeout(t,0)},i.Storage.Local.prototype.removeItem=function(e,t){this.storage_.removeItem(e),t&&setTimeout(t,0)},i.Storage.Local.prototype.removeItems=function(e,t){for(var r=0;r=0;i--){var o=e[i],s=this.storage_[o];if("string"==typeof s)try{r[o]=JSON.parse(s)}catch(e){r[o]=s}else e.splice(i,1)}setTimeout(t.bind(null,r),0)},i.Storage.Memory.prototype.setItem=function(e,t,r){var i=this.storage_[e];this.storage_[e]=JSON.stringify(t);var o={};o[e]={oldValue:i,newValue:t},setTimeout(function(){for(var e=0;e{let t="";switch(e){case"debug":case"warn":case"error":t=e.toUpperCase()+": "}const r=this.console_[e];this[e]=this.console_[e]=((...e)=>{this.save&&(this.data+=this.prefix_+t+e.join(" ")+"\n"),r.apply(this.console_,e)})}),["group","groupCollapsed"].forEach(e=>{const t=this.console_[e];this[e]=this.console_[e]=((e="")=>{t(e),this.save&&(this.data+=this.prefix_+e+"\n"),this.prefix_=" ".repeat(++this.prefixStack_)})});const t=this.console_.groupEnd;this.groupEnd=this.console_.groupEnd=(()=>{t(),this.prefix_=" ".repeat(--this.prefixStack_)})},i.TestManager.Suite=function(e){function t(t,r){this.testManager_=t,this.suiteName=e,this.setup(r)}return t.suiteName=e,t.addTest=i.TestManager.Suite.addTest,t.disableTest=i.TestManager.Suite.disableTest,t.getTest=i.TestManager.Suite.getTest,t.getTestList=i.TestManager.Suite.getTestList,t.testList_=[],t.testMap_={},t.prototype=Object.create(i.TestManager.Suite.prototype),t.constructor=i.TestManager.Suite,i.TestManager.Suite.subclasses.push(t),t},i.TestManager.Suite.subclasses=[],i.TestManager.Suite.addTest=function(e,t){if(e in this.testMap_)throw"Duplicate test name: "+e;var r=new i.TestManager.Test(this,e,t);this.testMap_[e]=r,this.testList_.push(r)},i.TestManager.Suite.disableTest=function(e,t){if(e in this.testMap_)throw"Duplicate test name: "+e;var r=new i.TestManager.Test(this,e,t);console.log("Disabled test: "+r.fullName)},i.TestManager.Suite.getTest=function(e){return this.testMap_[e]},i.TestManager.Suite.getTestList=function(){return this.testList_},i.TestManager.Suite.prototype.setDefaults=function(e,t){for(var r in t)this[r]=r in e?e[r]:t[r]},i.TestManager.Suite.prototype.setup=function(e){},i.TestManager.Suite.prototype.preamble=function(e,t){},i.TestManager.Suite.prototype.postamble=function(e,t){},i.TestManager.Test=function(e,t,r){this.suiteClass=e,this.testName=t,this.fullName=e.suiteName+"["+t+"]",this.testFunction_=r},i.TestManager.Test.prototype.run=function(e){try{this.testFunction_.apply(e.suite,[e,e.testRun.cx])}catch(t){if(t instanceof i.TestManager.Result.TestComplete)return;e.println("Test raised an exception: "+t),t.stack&&(t.stack instanceof Array?e.println(t.stack.join("\n")):e.println(t.stack)),e.completeTest_(e.FAILED,!1)}},i.TestManager.TestRun=function(e,t){this.testManager=e,this.log=e.log,this.cx=t||{},this.failures=[],this.passes=[],this.startDate=null,this.duration=null,this.currentResult=null,this.maxFailures=0,this.panic=!1,this.testQueue_=[]},i.TestManager.TestRun.prototype.ALL_TESTS=i.f.createEnum(""),i.TestManager.TestRun.prototype.selectTest=function(e){this.testQueue_.push(e)},i.TestManager.TestRun.prototype.selectSuite=function(e,t){for(var r=t||this.ALL_TESTS,i=0,o=e.getTestList(),s=0;s500&&this.log.warn("Slow test took "+this.msToSeconds_(e.duration)),this.log.groupEnd(),e.status==e.FAILED)this.failures.push(e),this.currentSuite=null;else{if(e.status!=e.PASSED)return this.log.error("Unknown result status: "+e.test.fullName+": "+e.status),this.panic=!0;this.passes.push(e)}this.runNextTest_()},i.TestManager.TestRun.prototype.onResultReComplete=function(e,t){this.log.error("Late complete for test: "+e.test.fullName+": "+t);var r=this.passes.indexOf(e);r>=0&&(this.passes.splice(r,1),this.failures.push(e))},i.TestManager.TestRun.prototype.runNextTest_=function(){if(this.panic||!this.testQueue_.length)return this.onTestRunComplete_();if(this.maxFailures&&this.failures.length>=this.maxFailures)return this.log.error("Maximum failure count reached, aborting test run."),this.onTestRunComplete_();var e=this.testQueue_[0],t=this.currentResult?this.currentResult.suite:null;try{t&&t instanceof e.suiteClass||(t&&this.log.groupEnd(),this.log.group(e.suiteClass.suiteName),t=new e.suiteClass(this.testManager,this.cx))}catch(e){return this.log.error("Exception during setup: "+(e.stack?e.stack:e)),this.panic=!0,void this.onTestRunComplete_()}try{this.log.group(e.testName),this.currentResult=new i.TestManager.Result(this,t,e),this.testManager.testPreamble(this.currentResult,this.cx),t.preamble(this.currentResult,this.cx),this.testQueue_.shift()}catch(e){return this.log.error("Unexpected exception during test preamble: "+(e.stack?e.stack:e)),this.log.groupEnd(),this.panic=!0,void this.onTestRunComplete_()}try{this.currentResult.run()}catch(e){this.log.error("Unexpected exception during test run: "+(e.stack?e.stack:e)),this.panic=!0}},i.TestManager.TestRun.prototype.run=function(){this.log.info("Running "+this.testQueue_.length+" test(s)"),window.onerror=this.onUncaughtException_.bind(this),this.startDate=new Date,this.runNextTest_()},i.TestManager.TestRun.prototype.msToSeconds_=function(e){return(e/1e3).toFixed(2)+"s"},i.TestManager.TestRun.prototype.summarize=function(){if(this.failures.length)for(var e=0;e1?"\n"+t.join("\n"):t.join("\n")}if(e!==t&&!(t instanceof Array&&this.arrayEQ_(e,t))){var o=r?"["+r+"]":"";this.fail("assertEQ"+o+": "+this.getCallerLocation_(1)+": "+i(e)+" !== "+i(t))}},i.TestManager.Result.prototype.assert=function(e,t){if(!0!==e){var r=t?"["+t+"]":"";this.fail("assert"+r+": "+this.getCallerLocation_(1)+": "+String(e))}},i.TestManager.Result.prototype.getCallerLocation_=function(e){try{throw new Error}catch(r){var t=r.stack.split("\n")[e+2].match(/([^/]+:\d+):\d+\)?$/);return t?t[1]:"???"}},i.TestManager.Result.prototype.println=function(e){this.testRun.log.info(e)},i.TestManager.Result.prototype.fail=function(e){arguments.length&&this.println(e),this.completeTest_(this.FAILED,!0)},i.TestManager.Result.prototype.pass=function(){this.completeTest_(this.PASSED,!0)},i.UTF8Decoder=function(){this.bytesLeft=0,this.codePoint=0,this.lowerBound=0},i.UTF8Decoder.prototype.decode=function(e){for(var t="",r=0;r1114111?t+="�":o<65536?t+=String.fromCharCode(o):(o-=65536,t+=String.fromCharCode(55296+(o>>>10&1023),56320+(1023&o)))}}else t+="�",this.bytesLeft=0,r--}return t},i.decodeUTF8=function(e){return(new i.UTF8Decoder).decode(e)},i.encodeUTF8=function(e){for(var t="",r=0;r>>6),s=1):i<=65535?(t+=String.fromCharCode(224|i>>>12),s=2):(t+=String.fromCharCode(240|i>>>18),s=3);s>0;)s--,t+=String.fromCharCode(128|i>>>6*s&63)}return t},i.wc={},i.wc.nulWidth=0,i.wc.controlWidth=0,i.wc.regardCjkAmbiguous=!1,i.wc.cjkAmbiguousWidth=2,i.wc.combining=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],i.wc.ambiguous=[[161,161],[164,164],[167,168],[170,170],[174,174],[176,180],[182,186],[188,191],[198,198],[208,208],[215,216],[222,225],[230,230],[232,234],[236,237],[240,240],[242,243],[247,250],[252,252],[254,254],[257,257],[273,273],[275,275],[283,283],[294,295],[299,299],[305,307],[312,312],[319,322],[324,324],[328,331],[333,333],[338,339],[358,359],[363,363],[462,462],[464,464],[466,466],[468,468],[470,470],[472,472],[474,474],[476,476],[593,593],[609,609],[708,708],[711,711],[713,715],[717,717],[720,720],[728,731],[733,733],[735,735],[913,929],[931,937],[945,961],[963,969],[1025,1025],[1040,1103],[1105,1105],[8208,8208],[8211,8214],[8216,8217],[8220,8221],[8224,8226],[8228,8231],[8240,8240],[8242,8243],[8245,8245],[8251,8251],[8254,8254],[8308,8308],[8319,8319],[8321,8324],[8364,8364],[8451,8451],[8453,8453],[8457,8457],[8467,8467],[8470,8470],[8481,8482],[8486,8486],[8491,8491],[8531,8532],[8539,8542],[8544,8555],[8560,8569],[8592,8601],[8632,8633],[8658,8658],[8660,8660],[8679,8679],[8704,8704],[8706,8707],[8711,8712],[8715,8715],[8719,8719],[8721,8721],[8725,8725],[8730,8730],[8733,8736],[8739,8739],[8741,8741],[8743,8748],[8750,8750],[8756,8759],[8764,8765],[8776,8776],[8780,8780],[8786,8786],[8800,8801],[8804,8807],[8810,8811],[8814,8815],[8834,8835],[8838,8839],[8853,8853],[8857,8857],[8869,8869],[8895,8895],[8978,8978],[9312,9449],[9451,9547],[9552,9587],[9600,9615],[9618,9621],[9632,9633],[9635,9641],[9650,9651],[9654,9655],[9660,9661],[9664,9665],[9670,9672],[9675,9675],[9678,9681],[9698,9701],[9711,9711],[9733,9734],[9737,9737],[9742,9743],[9748,9749],[9756,9756],[9758,9758],[9792,9792],[9794,9794],[9824,9825],[9827,9829],[9831,9834],[9836,9837],[9839,9839],[10045,10045],[10102,10111],[57344,63743],[65533,65533],[983040,1048573],[1048576,1114109]],i.wc.isSpace=function(e){var t,r=0,o=i.wc.combining.length-1;if(ei.wc.combining[o][1])return!1;for(;o>=r;)if(t=Math.floor((r+o)/2),e>i.wc.combining[t][1])r=t+1;else{if(!(ei.wc.ambiguous[o][1])return!1;for(;o>=r;)if(t=Math.floor((r+o)/2),e>i.wc.ambiguous[t][1])r=t+1;else{if(!(e=127&&e<160?i.wc.controlWidth:e<127?1:i.wc.isSpace(e)?0:1+(e>=4352&&(e<=4447||9001==e||9002==e||e>=11904&&e<=42191&&12351!=e||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141))},i.wc.charWidthRegardAmbiguous=function(e){return i.wc.isCjkAmbiguous(e)?i.wc.cjkAmbiguousWidth:i.wc.charWidthDisregardAmbiguous(e)},i.wc.strWidth=function(e){for(var t,r=0,o=0;ot);o++);if(void 0!=r){for(s=o,n=0;sr&&s--,e.substring(o,s)}return e.substr(o)},i.wc.substring=function(e,t,r){return i.wc.substr(e,t,r-t)},i.resource.add("libdot/changelog/version","text/plain","1.16"),i.resource.add("libdot/changelog/date","text/plain","2017-08-16"),i.rtdep("lib.Storage");var o={};o.windowType=null,o.zoomWarningMessage="ZOOM != 100%",o.notifyCopyMessage="✂",o.desktopNotificationTitle="♪ %(title) ♪",o.testDeps=["hterm.ScrollPort.Tests","hterm.Screen.Tests","hterm.Terminal.Tests","hterm.VT.Tests","hterm.VT.CannedTests"],i.registerInit("hterm",function(e){function t(t){o.windowType=t.type,setTimeout(e,0)}o.defaultStorage||(window.chrome&&chrome.storage&&chrome.storage.sync?o.defaultStorage=new i.Storage.Chrome(chrome.storage.sync):o.defaultStorage=new i.Storage.Local);var r=!1;if(window.chrome&&chrome.runtime&&chrome.runtime.getManifest){var s=chrome.runtime.getManifest();r=s.app&&s.app.background}r?setTimeout(t.bind(null,{type:"popup"}),0):window.chrome&&chrome.tabs?chrome.tabs.getCurrent(function(r){r&&window.chrome?chrome.windows.get(r.windowId,null,t):(o.windowType="normal",setTimeout(e,0))}):setTimeout(t.bind(null,{type:"normal"}),0)}),o.getClientSize=function(e){return e.getBoundingClientRect()},o.getClientWidth=function(e){return e.getBoundingClientRect().width},o.getClientHeight=function(e){return e.getBoundingClientRect().height},o.copySelectionToClipboard=function(e){try{e.execCommand("copy")}catch(e){}},o.pasteFromClipboard=function(e){try{return e.execCommand("paste")}catch(e){return!1}},o.notify=function(e){var t=(e,t)=>void 0!==e?e:t;void 0!==e&&null!==e||(e={});var r={body:e.body,icon:t(e.icon,i.resource.getDataUrl("hterm/images/icon-96"))},s=t(e.title,window.document.title);s||(s="hterm"),s=i.f.replaceVars(o.desktopNotificationTitle,{title:s});var n=new Notification(s,r);return n.onclick=function(){window.focus(),this.close()},n},o.Size=function(e,t){this.width=e,this.height=t},o.Size.prototype.resize=function(e,t){this.width=e,this.height=t},o.Size.prototype.clone=function(){return new o.Size(this.width,this.height)},o.Size.prototype.setTo=function(e){this.width=e.width,this.height=e.height},o.Size.prototype.equals=function(e){return this.width==e.width&&this.height==e.height},o.Size.prototype.toString=function(){return"[hterm.Size: "+this.width+", "+this.height+"]"},o.RowCol=function(e,t,r){this.row=e,this.column=t,this.overflow=!!r},o.RowCol.prototype.move=function(e,t,r){this.row=e,this.column=t,this.overflow=!!r},o.RowCol.prototype.clone=function(){return new o.RowCol(this.row,this.column,this.overflow)},o.RowCol.prototype.setTo=function(e){this.row=e.row,this.column=e.column,this.overflow=e.overflow},o.RowCol.prototype.equals=function(e){return this.row==e.row&&this.column==e.column&&this.overflow==e.overflow},o.RowCol.prototype.toString=function(){return"[hterm.RowCol: "+this.row+", "+this.column+", "+this.overflow+"]"},i.rtdep("lib.f"),o.Frame=function(e,t,r){this.terminal_=e,this.div_=e.div_,this.url=t,this.options=r||{},this.iframe_=null,this.container_=null,this.messageChannel_=null},o.Frame.prototype.onMessage_=function(e){switch(e.data.name){case"ipc-init-ok":return void this.sendTerminalInfo_();case"terminal-info-ok":return this.container_.style.display="flex",this.messageChannel_.port1.onmessage=this.onMessage.bind(this),void this.onLoad();default:return void console.log("Unknown message from frame:",e.data)}},o.Frame.prototype.onMessage=function(){},o.Frame.prototype.onLoad_=function(){this.messageChannel_=new MessageChannel,this.messageChannel_.port1.onmessage=this.onMessage_.bind(this),this.messageChannel_.port1.start(),this.iframe_.contentWindow.postMessage({name:"ipc-init",argv:[{messagePort:this.messageChannel_.port2}]},this.url,[this.messageChannel_.port2])},o.Frame.prototype.onLoad=function(){},o.Frame.prototype.sendTerminalInfo_=function(){i.f.getAcceptLanguages(function(e){this.postMessage("terminal-info",[{acceptLanguages:e,foregroundColor:this.terminal_.getForegroundColor(),backgroundColor:this.terminal_.getBackgroundColor(),cursorColor:this.terminal_.getCursorColor(),fontSize:this.terminal_.getFontSize(),fontFamily:this.terminal_.getFontFamily(),baseURL:i.f.getURL("/")}])}.bind(this))},o.Frame.prototype.onCloseClicked_=function(){this.close()},o.Frame.prototype.close=function(){this.container_&&this.container_.parentNode&&(this.container_.parentNode.removeChild(this.container_),this.onClose())},o.Frame.prototype.onClose=function(){},o.Frame.prototype.postMessage=function(e,t){if(!this.messageChannel_)throw new Error("Message channel is not set up.");this.messageChannel_.port1.postMessage({name:e,argv:t})},o.Frame.prototype.show=function(){function e(e,r){return e in t.options?t.options[e]:r}var t=this,t=this;if(this.container_&&this.container_.parentNode)console.error("Frame already visible");else{var r=o.getClientSize(this.div_),i=e("width",640),s=e("height",480),n=(r.width,r.height,this.terminal_.document_),a=this.container_=n.createElement("div");a.style.cssText="position: absolute;display: none;flex-direction: column;top: 10%;left: 4%;width: 90%;height: 80%;min-height: 20%;max-height: 80%;box-shadow: 0 0 2px "+this.terminal_.getForegroundColor()+";border: 2px "+this.terminal_.getForegroundColor()+" solid;";var l=this.iframe_=n.createElement("iframe");l.onload=this.onLoad_.bind(this),l.style.cssText="display: flex;flex: 1;width: 100%",l.setAttribute("src",this.url),l.setAttribute("seamless",!0),a.appendChild(l),this.div_.appendChild(a)}},i.rtdep("hterm.Keyboard.KeyMap"),o.Keyboard=function(e){this.terminal=e,this.keyboardElement_=null,this.handlers_=[["focusout",this.onFocusOut_.bind(this)],["keydown",this.onKeyDown_.bind(this)],["keypress",this.onKeyPress_.bind(this)],["keyup",this.onKeyUp_.bind(this)],["textInput",this.onTextInput_.bind(this)]],this.keyMap=new o.Keyboard.KeyMap(this),this.bindings=new o.Keyboard.Bindings(this),this.altGrMode="none",this.shiftInsertPaste=!0,this.homeKeysScroll=!1,this.pageKeysScroll=!1,this.ctrlPlusMinusZeroZoom=!0,this.ctrlCCopy=!1,this.ctrlVPaste=!1,this.applicationKeypad=!1,this.applicationCursor=!1,this.backspaceSendsBackspace=!1,this.characterEncoding="utf-8",this.metaSendsEscape=!0,this.passMetaV=!0,this.altSendsWhat="escape",this.altIsMeta=!1,this.altBackspaceIsMetaBackspace=!1,this.altKeyPressed=0,this.mediaKeysAreFKeys=!1,this.previousAltSendsWhat_=null},o.Keyboard.KeyActions={CANCEL:i.f.createEnum("CANCEL"),DEFAULT:i.f.createEnum("DEFAULT"),PASS:i.f.createEnum("PASS"),STRIP:i.f.createEnum("STRIP")},o.Keyboard.prototype.encode=function(e){return"utf-8"==this.characterEncoding?this.terminal.vt.encodeUTF8(e):e},o.Keyboard.prototype.installKeyboard=function(e){if(e!=this.keyboardElement_){e&&this.keyboardElement_&&this.installKeyboard(null);for(var t=0;t=32&&(r=e.charCode);r&&this.terminal.onVTKeystroke(String.fromCharCode(r)),e.preventDefault(),e.stopPropagation()}},o.Keyboard.prototype.preventChromeAppNonCtrlShiftDefault_=function(e){window.chrome&&window.chrome.app&&window.chrome.app.window&&(e.ctrlKey&&e.shiftKey||e.preventDefault())},o.Keyboard.prototype.onFocusOut_=function(e){this.altKeyPressed=0},o.Keyboard.prototype.onKeyUp_=function(e){18==e.keyCode&&(this.altKeyPressed=this.altKeyPressed&~(1<=64&&_<=95&&(f=String.fromCharCode(_-64))),u&&"8-bit"==this.altSendsWhat&&1==f.length){var _=f.charCodeAt(0)+128;f=String.fromCharCode(_)}(u&&"escape"==this.altSendsWhat||p&&this.metaSendsEscape)&&(f=""+f)}this.terminal.onVTKeystroke(f)}else console.warn("Invalid action: "+JSON.stringify(f))}else console.warn("No definition for keyCode: "+e.keyCode)},o.Keyboard.Bindings=function(){this.bindings_={}},o.Keyboard.Bindings.prototype.clear=function(){this.bindings_={}},o.Keyboard.Bindings.prototype.addBinding_=function(e,t){var r=null,i=this.bindings_[e.keyCode];if(i)for(var s=0;s",p,s(f,d),p,p],[191,"/?",p,i(a("_"),a("?")),p,p],[17,"[CTRL]",d,d,d,d],[18,"[ALT]",d,d,d,d],[91,"[LAPL]",d,d,d,d],[32," ",p,a("@"),p,p],[92,"[RAPL]",d,d,d,d],[93,"[RMENU]",d,d,d,d],[42,"[PRTSCR]",d,d,d,d],[145,"[SCRLK]",d,d,d,d],[19,"[BREAK]",d,d,d,d],[45,"[INSERT]",l("onKeyInsert_"),p,p,p],[36,"[HOME]",l("onKeyHome_"),p,p,p],[33,"[PGUP]",l("onKeyPageUp_"),p,p,p],[46,"[DEL]",l("onKeyDel_"),p,p,p],[35,"[END]",l("onKeyEnd_"),p,p,p],[34,"[PGDOWN]",l("onKeyPageDown_"),p,p,p],[38,"[UP]",l("onKeyArrowUp_"),p,p,p],[40,"[DOWN]",l("onKeyArrowDown_"),p,p,p],[39,"[RIGHT]",t("","OC"),p,p,p],[37,"[LEFT]",t("","OD"),p,p,p],[144,"[NUMLOCK]",d,d,d,d],[96,"[KP0]",p,p,p,p],[97,"[KP1]",p,p,p,p],[98,"[KP2]",p,p,p,p],[99,"[KP3]",p,p,p,p],[100,"[KP4]",p,p,p,p],[101,"[KP5]",p,p,p,p],[102,"[KP6]",p,p,p,p],[103,"[KP7]",p,p,p,p],[104,"[KP8]",p,p,p,p],[105,"[KP9]",p,p,p,p],[107,"[KP+]",p,l("onPlusMinusZero_"),p,l("onPlusMinusZero_")],[109,"[KP-]",p,l("onPlusMinusZero_"),p,l("onPlusMinusZero_")],[106,"[KP*]",p,p,p,p],[111,"[KP/]",p,p,p,p],[110,"[KP.]",p,p,p,p],[166,"[BACK]",h(n("OP","")),p,"[23~",p],[167,"[FWD]",h(n("OQ","")),p,"[24~",p],[168,"[RELOAD]",h(n("OR","")),p,"[25~",p],[183,"[FSCR]",h(n("OS","")),p,"[26~",p],[182,"[WINS]",h("[15~"),p,"[28~",p],[216,"[BRIT-]",h("[17~"),p,"[29~",p],[217,"[BRIT+]",h("[18~"),p,"[31~",p])},o.Keyboard.KeyMap.prototype.onKeyInsert_=function(e){return this.keyboard.shiftInsertPaste&&e.shiftKey?o.Keyboard.KeyActions.PASS:"[2~"},o.Keyboard.KeyMap.prototype.onKeyHome_=function(e){return!this.keyboard.homeKeysScroll^e.shiftKey?e.altey||e.ctrlKey||e.shiftKey||!this.keyboard.applicationCursor?"":"OH":(this.keyboard.terminal.scrollHome(),o.Keyboard.KeyActions.CANCEL)},o.Keyboard.KeyMap.prototype.onKeyEnd_=function(e){return!this.keyboard.homeKeysScroll^e.shiftKey?e.altKey||e.ctrlKey||e.shiftKey||!this.keyboard.applicationCursor?"":"OF":(this.keyboard.terminal.scrollEnd(),o.Keyboard.KeyActions.CANCEL)},o.Keyboard.KeyMap.prototype.onKeyPageUp_=function(e){return!this.keyboard.pageKeysScroll^e.shiftKey?"[5~":(this.keyboard.terminal.scrollPageUp(),o.Keyboard.KeyActions.CANCEL)},o.Keyboard.KeyMap.prototype.onKeyDel_=function(e){return this.keyboard.altBackspaceIsMetaBackspace&&this.keyboard.altKeyPressed&&!e.altKey?"":"[3~"},o.Keyboard.KeyMap.prototype.onKeyPageDown_=function(e){return!this.keyboard.pageKeysScroll^e.shiftKey?"[6~":(this.keyboard.terminal.scrollPageDown(),o.Keyboard.KeyActions.CANCEL)},o.Keyboard.KeyMap.prototype.onKeyArrowUp_=function(e){return!this.keyboard.applicationCursor&&e.shiftKey?(this.keyboard.terminal.scrollLineUp(),o.Keyboard.KeyActions.CANCEL):e.shiftKey||e.ctrlKey||e.altKey||e.metaKey||!this.keyboard.applicationCursor?"":"OA"},o.Keyboard.KeyMap.prototype.onKeyArrowDown_=function(e){return!this.keyboard.applicationCursor&&e.shiftKey?(this.keyboard.terminal.scrollLineDown(),o.Keyboard.KeyActions.CANCEL):e.shiftKey||e.ctrlKey||e.altKey||e.metaKey||!this.keyboard.applicationCursor?"":"OB"},o.Keyboard.KeyMap.prototype.onClear_=function(e,t){return this.keyboard.terminal.wipeContents(),o.Keyboard.KeyActions.CANCEL},o.Keyboard.KeyMap.prototype.onCtrlNum_=function(e,t){function r(e){return String.fromCharCode(e.charCodeAt(0)-64)}if(this.keyboard.terminal.passCtrlNumber&&!e.shiftKey)return o.Keyboard.KeyActions.PASS;switch(t.keyCap.substr(0,1)){case"1":return"1";case"2":return r("@");case"3":return r("[");case"4":return r("\\");case"5":return r("]");case"6":return r("^");case"7":return r("_");case"8":return"";case"9":return"9"}},o.Keyboard.KeyMap.prototype.onAltNum_=function(e,t){return this.keyboard.terminal.passAltNumber&&!e.shiftKey?o.Keyboard.KeyActions.PASS:o.Keyboard.KeyActions.DEFAULT},o.Keyboard.KeyMap.prototype.onMetaNum_=function(e,t){return this.keyboard.terminal.passMetaNumber&&!e.shiftKey?o.Keyboard.KeyActions.PASS:o.Keyboard.KeyActions.DEFAULT},o.Keyboard.KeyMap.prototype.onCtrlC_=function(e,t){var r=this.keyboard.terminal.getDocument().getSelection();if(!r.isCollapsed){if(this.keyboard.ctrlCCopy&&!e.shiftKey)return this.keyboard.terminal.clearSelectionAfterCopy&&setTimeout(r.collapseToEnd.bind(r),50),o.Keyboard.KeyActions.PASS;if(!this.keyboard.ctrlCCopy&&e.shiftKey)return this.keyboard.terminal.clearSelectionAfterCopy&&setTimeout(r.collapseToEnd.bind(r),50),this.keyboard.terminal.copySelectionToClipboard(),o.Keyboard.KeyActions.CANCEL}return""},o.Keyboard.KeyMap.prototype.onCtrlN_=function(e,t){return e.shiftKey?(window.open(document.location.href,"","chrome=no,close=yes,resize=yes,scrollbars=yes,minimizable=yes,width="+window.innerWidth+",height="+window.innerHeight),o.Keyboard.KeyActions.CANCEL):""},o.Keyboard.KeyMap.prototype.onCtrlV_=function(e,t){return!e.shiftKey&&this.keyboard.ctrlVPaste||e.shiftKey&&!this.keyboard.ctrlVPaste?this.keyboard.terminal.paste()?o.Keyboard.KeyActions.CANCEL:o.Keyboard.KeyActions.PASS:""},o.Keyboard.KeyMap.prototype.onMetaN_=function(e,t){return e.shiftKey?(window.open(document.location.href,"","chrome=no,close=yes,resize=yes,scrollbars=yes,minimizable=yes,width="+window.outerWidth+",height="+window.outerHeight),o.Keyboard.KeyActions.CANCEL):o.Keyboard.KeyActions.DEFAULT},o.Keyboard.KeyMap.prototype.onMetaC_=function(e,t){var r=this.keyboard.terminal.getDocument();return e.shiftKey||r.getSelection().isCollapsed?t.keyCap.substr(e.shiftKey?1:0,1):(this.keyboard.terminal.clearSelectionAfterCopy&&setTimeout(function(){r.getSelection().collapseToEnd()},50),o.Keyboard.KeyActions.PASS)},o.Keyboard.KeyMap.prototype.onMetaV_=function(e,t){return e.shiftKey?o.Keyboard.KeyActions.PASS:this.keyboard.passMetaV?o.Keyboard.KeyActions.PASS:o.Keyboard.KeyActions.DEFAULT},o.Keyboard.KeyMap.prototype.onPlusMinusZero_=function(e,t){if(!(this.keyboard.ctrlPlusMinusZeroZoom^e.shiftKey))return"-_"==t.keyCap?"":o.Keyboard.KeyActions.CANCEL;if(1!=this.keyboard.terminal.getZoomFactor())return o.Keyboard.KeyActions.PASS;var r=t.keyCap.substr(0,1);if("0"==r)this.keyboard.terminal.setFontSize(0);else{var i=this.keyboard.terminal.getFontSize();"-"==r||"[KP-]"==t.keyCap?i-=1:i+=1,this.keyboard.terminal.setFontSize(i)}return o.Keyboard.KeyActions.CANCEL},o.Keyboard.KeyPattern=function(e){this.wildcardCount=0,this.keyCode=e.keyCode,o.Keyboard.KeyPattern.modifiers.forEach(function(t){this[t]=e[t]||!1,"*"==this[t]&&this.wildcardCount++}.bind(this))},o.Keyboard.KeyPattern.modifiers=["shift","ctrl","alt","meta"],o.Keyboard.KeyPattern.sortCompare=function(e,t){return e.wildcardCountt.wildcardCount?1:0},o.Keyboard.KeyPattern.prototype.match_=function(e,t){if(this.keyCode!=e.keyCode)return!1;var r=!0;return o.Keyboard.KeyPattern.modifiers.forEach(function(i){var o=i in e&&e[i];r&&(t||"*"!=this[i])&&this[i]!=o&&(r=!1)}.bind(this)),r},o.Keyboard.KeyPattern.prototype.matchKeyDown=function(e){return this.match_(e,!1)},o.Keyboard.KeyPattern.prototype.matchKeyPattern=function(e){return this.match_(e,!0)},o.Options=function(e){this.wraparound=!e||e.wraparound,this.reverseWraparound=!!e&&e.reverseWraparound,this.originMode=!!e&&e.originMode,this.autoCarriageReturn=!!e&&e.autoCarriageReturn,this.cursorVisible=!!e&&e.cursorVisible,this.cursorBlink=!!e&&e.cursorBlink,this.insertMode=!!e&&e.insertMode,this.reverseVideo=!!e&&e.reverseVideo,this.bracketedPaste=!!e&&e.bracketedPaste},i.rtdep("hterm.Keyboard.KeyActions"),o.Parser=function(){this.source="",this.pos=0,this.ch=null},o.Parser.prototype.error=function(e){return new Error("Parse error at "+this.pos+": "+e)},o.Parser.prototype.isComplete=function(){return this.pos==this.source.length},o.Parser.prototype.reset=function(e,t){this.source=e,this.pos=t||0,this.ch=e.substr(0,1)},o.Parser.prototype.parseKeySequence=function(){var e={keyCode:null};for(var t in o.Parser.identifiers.modifierKeys)e[o.Parser.identifiers.modifierKeys[t]]=!1;for(;this.pos 'none', else => 'right-alt'\n'none': Disable any AltGr related munging.\n'ctrl-alt': Assume Ctrl+Alt means AltGr.\n'left-alt': Assume left Alt means AltGr.\n'right-alt': Assume right Alt means AltGr.\n"],"alt-backspace-is-meta-backspace":[o.PreferenceManager.categories.Keyboard,!1,"bool","If set, undoes the Chrome OS Alt-Backspace->DEL remap, so that alt-backspace indeed is alt-backspace."],"alt-is-meta":[o.PreferenceManager.categories.Keyboard,!1,"bool","Set whether the alt key acts as a meta key or as a distinct alt key."],"alt-sends-what":[o.PreferenceManager.categories.Keyboard,"escape",["escape","8-bit","browser-key"],"Controls how the alt key is handled.\n\n escape....... Send an ESC prefix.\n 8-bit........ Add 128 to the unshifted character as in xterm.\n browser-key.. Wait for the keypress event and see what the browser \n says. (This won't work well on platforms where the \n browser performs a default action for some alt sequences.)"],"audible-bell-sound":[o.PreferenceManager.categories.Sounds,"lib-resource:hterm/audio/bell","url","URL of the terminal bell sound. Empty string for no audible bell."],"desktop-notification-bell":[o.PreferenceManager.categories.Sounds,!1,"bool",'If true, terminal bells in the background will create a Web Notification. https://www.w3.org/TR/notifications/\n\nDisplaying notifications requires permission from the user. When this option is set to true, hterm will attempt to ask the user for permission if necessary. Note browsers may not show this permission request if it did not originate from a user action.\n\nChrome extensions with the "notifications" permission have permission to display notifications.'],"background-color":[o.PreferenceManager.categories.Appearance,"rgb(16, 16, 16)","color","The background color for text with no other color attributes."],"background-image":[o.PreferenceManager.categories.Appearance,"","string","CSS value of the background image. Empty string for no image.\n\nFor example:\n url(https://goo.gl/anedTK)\n linear-gradient(top bottom, blue, red)"],"background-size":[o.PreferenceManager.categories.Appearance,"","string","CSS value of the background image size. Defaults to none."],"background-position":[o.PreferenceManager.categories.Appearance,"","string","CSS value of the background image position.\n\nFor example:\n 10% 10%\n center"],"backspace-sends-backspace":[o.PreferenceManager.categories.Keyboard,!1,"bool","If true, the backspace should send BS ('\\x08', aka ^H). Otherwise the backspace key should send '\\x7f'."],"character-map-overrides":[o.PreferenceManager.categories.Appearance,null,"value",'This is specified as an object. It is a sparse array, where each property is the character set code and the value is an object that is a sparse array itself. In that sparse array, each property is the received character and the value is the displayed character.\n\nFor example:\n {"0":{"+":"\\u2192",",":"\\u2190","-":"\\u2191",".":"\\u2193", "0":"\\u2588"}}'],"close-on-exit":[o.PreferenceManager.categories.Miscellaneous,!0,"bool","Whether or not to close the window when the command exits."],"cursor-blink":[o.PreferenceManager.categories.Appearance,!1,"bool","Whether or not to blink the cursor by default."],"cursor-blink-cycle":[o.PreferenceManager.categories.Appearance,[1e3,500],"value","The cursor blink rate in milliseconds.\n\nA two element array, the first of which is how long the cursor should be on, second is how long it should be off."],"cursor-color":[o.PreferenceManager.categories.Appearance,"rgba(255, 0, 0, 0.5)","color","The color of the visible cursor."],"color-palette-overrides":[o.PreferenceManager.categories.Appearance,null,"value","Override colors in the default palette.\n\nThis can be specified as an array or an object. If specified as an object it is assumed to be a sparse array, where each property is a numeric index into the color palette.\n\nValues can be specified as almost any css color value. This includes #RGB, #RRGGBB, rgb(...), rgba(...), and any color names that are also part of the stock X11 rgb.txt file.\n\nYou can use 'null' to specify that the default value should be not be changed. This is useful for skipping a small number of indices when the value is specified as an array."],"copy-on-select":[o.PreferenceManager.categories.CopyPaste,!0,"bool","Automatically copy mouse selection to the clipboard."],"use-default-window-copy":[o.PreferenceManager.categories.CopyPaste,!1,"bool","Whether to use the default window copy behavior"],"clear-selection-after-copy":[o.PreferenceManager.categories.CopyPaste,!0,"bool","Whether to clear the selection after copying."],"ctrl-plus-minus-zero-zoom":[o.PreferenceManager.categories.Keyboard,!0,"bool","If true, Ctrl-Plus/Minus/Zero controls zoom.\nIf false, Ctrl-Shift-Plus/Minus/Zero controls zoom, Ctrl-Minus sends ^_, Ctrl-Plus/Zero do nothing."],"ctrl-c-copy":[o.PreferenceManager.categories.Keyboard,!1,"bool","Ctrl+C copies if true, send ^C to host if false.\nCtrl+Shift+C sends ^C to host if true, copies if false."],"ctrl-v-paste":[o.PreferenceManager.categories.Keyboard,!1,"bool","Ctrl+V pastes if true, send ^V to host if false.\nCtrl+Shift+V sends ^V to host if true, pastes if false."],"east-asian-ambiguous-as-two-column":[o.PreferenceManager.categories.Keyboard,!1,"bool","Set whether East Asian Ambiguous characters have two column width."],"enable-8-bit-control":[o.PreferenceManager.categories.Keyboard,!1,"bool","True to enable 8-bit control characters, false to ignore them.\n\nWe'll respect the two-byte versions of these control characters regardless of this setting."],"enable-bold":[o.PreferenceManager.categories.Appearance,null,"tristate","True if we should use bold weight font for text with the bold/bright attribute. False to use the normal weight font. Null to autodetect."],"enable-bold-as-bright":[o.PreferenceManager.categories.Appearance,!0,"bool","True if we should use bright colors (8-15 on a 16 color palette) for any text with the bold attribute. False otherwise."],"enable-blink":[o.PreferenceManager.categories.Appearance,!0,"bool","True if we should respect the blink attribute. False to ignore it. "],"enable-clipboard-notice":[o.PreferenceManager.categories.CopyPaste,!0,"bool","Show a message in the terminal when the host writes to the clipboard."],"enable-clipboard-write":[o.PreferenceManager.categories.CopyPaste,!0,"bool","Allow the host to write directly to the system clipboard."],"enable-dec12":[o.PreferenceManager.categories.Miscellaneous,!1,"bool","Respect the host's attempt to change the cursor blink status using DEC Private Mode 12."],environment:[o.PreferenceManager.categories.Miscellaneous,{TERM:"xterm-256color"},"value","The default environment variables, as an object."],"font-family":[o.PreferenceManager.categories.Appearance,'"DejaVu Sans Mono", "Everson Mono", FreeMono, "Menlo", "Terminal", monospace',"string","Default font family for the terminal text."],"font-size":[o.PreferenceManager.categories.Appearance,15,"int","The default font size in pixels."],"font-smoothing":[o.PreferenceManager.categories.Appearance,"antialiased","string","CSS font-smoothing property."],"foreground-color":[o.PreferenceManager.categories.Appearance,"rgb(240, 240, 240)","color","The foreground color for text with no other color attributes."],"home-keys-scroll":[o.PreferenceManager.categories.Keyboard,!1,"bool","If true, home/end will control the terminal scrollbar and shift home/end will send the VT keycodes. If false then home/end sends VT codes and shift home/end scrolls."],keybindings:[o.PreferenceManager.categories.Keyboard,null,"value",'A map of key sequence to key actions. Key sequences include zero or more modifier keys followed by a key code. Key codes can be decimal or hexadecimal numbers, or a key identifier. Key actions can be specified a string to send to the host, or an action identifier. For a full explanation of the format, see https://goo.gl/LWRndr.\n\nSample keybindings:\n{\n "Ctrl-Alt-K": "clearScrollback",\n "Ctrl-Shift-L": "PASS",\n "Ctrl-H": "\'HELLO\\n\'"\n}'],"max-string-sequence":[o.PreferenceManager.categories.Encoding,1e5,"int","Max length of a DCS, OSC, PM, or APS sequence before we give up and ignore the code."],"media-keys-are-fkeys":[o.PreferenceManager.categories.Keyboard,!1,"bool","If true, convert media keys to their Fkey equivalent. If false, let the browser handle the keys."],"meta-sends-escape":[o.PreferenceManager.categories.Keyboard,!0,"bool","Set whether the meta key sends a leading escape or not."],"mouse-right-click-paste":[o.PreferenceManager.categories.CopyPaste,!0,"bool",'Paste on right mouse button clicks.\n\nThis option is activate independent of the "mouse-paste-button" setting.\n\nNote: This will handle left & right handed mice correctly.'],"mouse-paste-button":[o.PreferenceManager.categories.CopyPaste,null,[null,0,1,2,3,4,5,6],"Mouse paste button, or null to autodetect.\n\nFor autodetect, we'll use the middle mouse button for non-X11 platforms (including Chrome OS). On X11, we'll use the right mouse button (since the native window manager should paste via the middle mouse button).\n\n0 == left (primary) button.\n1 == middle (auxiliary) button.\n2 == right (secondary) button.\n\nThis option is activate independent of the \"mouse-right-click-paste\" setting.\n\nNote: This will handle left & right handed mice correctly."],"word-break-match-left":[o.PreferenceManager.categories.CopyPaste,"[^\\s\\[\\](){}<>\"'\\^!@#$%&*,;:`]","string",'Regular expression to halt matching to the left (start) of a selection.\n\nNormally this is a character class to reject specific characters.\nWe allow "~" and "." by default as paths frequently start with those.'],"word-break-match-right":[o.PreferenceManager.categories.CopyPaste,"[^\\s\\[\\](){}<>\"'\\^!@#$%&*,;:~.`]","string","Regular expression to halt matching to the right (end) of a selection.\n\nNormally this is a character class to reject specific characters."],"word-break-match-middle":[o.PreferenceManager.categories.CopyPaste,"[^\\s\\[\\](){}<>\"'\\^]*","string","Regular expression to match all the characters in the middle.\n\nNormally this is a character class to reject specific characters.\n\nUsed to expand the selection surrounding the starting point."],"page-keys-scroll":[o.PreferenceManager.categories.Keyboard,!1,"bool","If true, page up/down will control the terminal scrollbar and shift page up/down will send the VT keycodes. If false then page up/down sends VT codes and shift page up/down scrolls."],"pass-alt-number":[o.PreferenceManager.categories.Keyboard,null,"tristate","Set whether we should pass Alt-1..9 to the browser.\n\nThis is handy when running hterm in a browser tab, so that you don't lose Chrome's \"switch to tab\" keyboard accelerators. When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs.\n\nIf true, Alt-1..9 will be handled by the browser. If false, Alt-1..9 will be sent to the host. If null, autodetect based on browser platform and window type."],"pass-ctrl-number":[o.PreferenceManager.categories.Keyboard,null,"tristate","Set whether we should pass Ctrl-1..9 to the browser.\n\nThis is handy when running hterm in a browser tab, so that you don't lose Chrome's \"switch to tab\" keyboard accelerators. When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs.\n\nIf true, Ctrl-1..9 will be handled by the browser. If false, Ctrl-1..9 will be sent to the host. If null, autodetect based on browser platform and window type."],"pass-meta-number":[o.PreferenceManager.categories.Keyboard,null,"tristate","Set whether we should pass Meta-1..9 to the browser.\n\nThis is handy when running hterm in a browser tab, so that you don't lose Chrome's \"switch to tab\" keyboard accelerators. When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs.\n\nIf true, Meta-1..9 will be handled by the browser. If false, Meta-1..9 will be sent to the host. If null, autodetect based on browser platform and window type."],"pass-meta-v":[o.PreferenceManager.categories.Keyboard,!0,"bool","Set whether meta-V gets passed to host."],"receive-encoding":[o.PreferenceManager.categories.Encoding,"utf-8",["utf-8","raw"],"Set the expected encoding for data received from the host.\n\nValid values are 'utf-8' and 'raw'."],"scroll-on-keystroke":[o.PreferenceManager.categories.Scrolling,!0,"bool","If true, scroll to the bottom on any keystroke."],"scroll-on-output":[o.PreferenceManager.categories.Scrolling,!1,"bool","If true, scroll to the bottom on terminal output."],"scrollbar-visible":[o.PreferenceManager.categories.Scrolling,!0,"bool","The vertical scrollbar mode."],"scroll-wheel-may-send-arrow-keys":[o.PreferenceManager.categories.Scrolling,!1,"bool","When using the alternative screen buffer, and DECCKM (Application Cursor Keys) is active, mouse wheel scroll events will emulate arrow keys.\n\nIt can be temporarily disabled by holding the shift key.\n\nThis frequently comes up when using pagers (less) or reading man pages or text editors (vi/nano) or using screen/tmux."],"scroll-wheel-move-multiplier":[o.PreferenceManager.categories.Scrolling,1,"int","The multiplier for the pixel delta in wheel events caused by the scroll wheel. Alters how fast the page scrolls."],"send-encoding":[o.PreferenceManager.categories.Encoding,"utf-8",["utf-8","raw"],"Set the encoding for data sent to host."],"terminal-encoding":[o.PreferenceManager.categories.Encoding,"iso-2022",["iso-2022","utf-8","utf-8-locked"],"The default terminal encoding (DOCS).\n\nISO-2022 enables character map translations (like graphics maps).\nUTF-8 disables support for those.\n\nThe locked variant means the encoding cannot be changed at runtime via terminal escape sequences.\n\nYou should stick with UTF-8 unless you notice broken rendering with legacy applications."],"shift-insert-paste":[o.PreferenceManager.categories.Keyboard,!0,"bool","Shift + Insert pastes if true, sent to host if false."],"user-css":[o.PreferenceManager.categories.Appearance,"","url","URL of user stylesheet to include in the terminal document."],"user-css-text":[o.PreferenceManager.categories.Appearance,"","multiline-string","Custom CSS text for styling the terminal."]},o.PreferenceManager.prototype=Object.create(i.PreferenceManager.prototype),o.PreferenceManager.constructor=o.PreferenceManager,o.PubSub=function(){this.observers_={}},o.PubSub.addBehavior=function(e){var t=new o.PubSub;for(var r in o.PubSub.prototype)e[r]=o.PubSub.prototype[r].bind(t)},o.PubSub.prototype.subscribe=function(e,t){e in this.observers_||(this.observers_[e]=[]),this.observers_[e].push(t)},o.PubSub.prototype.unsubscribe=function(e,t){var r=this.observers_[e];if(!r)throw"Invalid subject: "+e;var i=r.indexOf(t);if(i<0)throw"Not subscribed: "+e;r.splice(i,1)},o.PubSub.prototype.publish=function(e,t,r){function i(e){e=e&&this.setCursorPosition(this.cursorPosition.row,e-1)},o.Screen.prototype.shiftRow=function(){return this.shiftRows(1)[0]},o.Screen.prototype.shiftRows=function(e){return this.rowsArray.splice(0,e)},o.Screen.prototype.unshiftRow=function(e){this.rowsArray.splice(0,0,e)},o.Screen.prototype.unshiftRows=function(e){this.rowsArray.unshift.apply(this.rowsArray,e)},o.Screen.prototype.popRow=function(){return this.popRows(1)[0]},o.Screen.prototype.popRows=function(e){return this.rowsArray.splice(this.rowsArray.length-e,e)},o.Screen.prototype.pushRow=function(e){this.rowsArray.push(e)},o.Screen.prototype.pushRows=function(e){e.push.apply(this.rowsArray,e)},o.Screen.prototype.insertRow=function(e,t){this.rowsArray.splice(e,0,t)},o.Screen.prototype.insertRows=function(e,t){for(var r=0;r=this.rowsArray.length?(console.error("Row out of bounds: "+e),e=this.rowsArray.length-1):e<0&&(console.error("Row out of bounds: "+e),e=0),t>=this.columnCount_?(console.error("Column out of bounds: "+t),t=this.columnCount_-1):t<0&&(console.error("Column out of bounds: "+t),t=0),this.cursorPosition.overflow=!1;var r=this.rowsArray[e],i=r.firstChild;i||(i=r.ownerDocument.createTextNode(""),r.appendChild(i));var s=0;for(r==this.cursorRowNode_?t>=this.cursorPosition.column-this.cursorOffset_&&(i=this.cursorNode_,s=this.cursorPosition.column-this.cursorOffset_):this.cursorRowNode_=r,this.cursorPosition.move(e,t);i;){var n=t-s,a=o.TextAttributes.nodeWidth(i);if(!i.nextSibling||a>n)return this.cursorNode_=i,void(this.cursorOffset_=n);s+=a,i=i.nextSibling}}else console.warn("Attempt to set cursor position on empty screen.")},o.Screen.prototype.syncSelectionCaret=function(e){try{e.collapse(this.cursorNode_,this.cursorOffset_)}catch(e){}},o.Screen.prototype.splitNode_=function(e,t){var r=e.cloneNode(!1),s=e.textContent;e.textContent=o.TextAttributes.nodeSubstr(e,0,t),r.textContent=i.wc.substr(s,t),r.textContent&&e.parentNode.insertBefore(r,e.nextSibling),e.textContent||e.parentNode.removeChild(e)},o.Screen.prototype.maybeClipCurrentRow=function(){var e=o.TextAttributes.nodeWidth(this.cursorRowNode_);if(e<=this.columnCount_)this.cursorPosition.column>=this.columnCount_&&(this.setCursorPosition(this.cursorPosition.row,this.columnCount_-1),this.cursorPosition.overflow=!0);else{var t=this.cursorPosition.column;this.setCursorPosition(this.cursorPosition.row,this.columnCount_-1),e=o.TextAttributes.nodeWidth(this.cursorNode_),this.cursorOffset_o.TextAttributes.nodeWidth(e);){if(!e.hasAttribute("line-overflow")||!e.nextSibling)return-1;t-=o.TextAttributes.nodeWidth(e),e=e.nextSibling}return this.getNodeAndOffsetWithinRow_(e,t)},o.Screen.prototype.getNodeAndOffsetWithinRow_=function(e,t){for(var r=0;ro)){var d=i.wc.substring(h,o,i.wc.strWidth(h)),f=new RegExp("^"+l+a),g=d.match(f);if(g){var m=o+i.wc.strWidth(g[0]);-1==m||ms.rowIndex)t();else if(i.focusNode==i.anchorNode)i.anchorOffset=this.lastRowCount_},o.ScrollPort.prototype.drawTopFold_=function(e){if(!this.selection.startRow||this.selection.startRow.rowIndex>=e)this.rowNodes_.firstChild!=this.topFold_&&this.rowNodes_.insertBefore(this.topFold_,this.rowNodes_.firstChild);else{if(!this.selection.isMultiline||this.selection.endRow.rowIndex>=e)this.selection.startRow.nextSibling!=this.topFold_&&this.rowNodes_.insertBefore(this.topFold_,this.selection.startRow.nextSibling);else for(this.selection.endRow.nextSibling!=this.topFold_&&this.rowNodes_.insertBefore(this.topFold_,this.selection.endRow.nextSibling);this.selection.startRow.nextSibling!=this.selection.endRow;)this.rowNodes_.removeChild(this.selection.startRow.nextSibling);for(;this.rowNodes_.firstChild!=this.selection.startRow;)this.rowNodes_.removeChild(this.rowNodes_.firstChild)}},o.ScrollPort.prototype.drawBottomFold_=function(e){if(!this.selection.endRow||this.selection.endRow.rowIndex<=e)this.rowNodes_.lastChild!=this.bottomFold_&&this.rowNodes_.appendChild(this.bottomFold_);else{if(!this.selection.isMultiline||this.selection.startRow.rowIndex<=e)this.bottomFold_.nextSibling!=this.selection.endRow&&this.rowNodes_.insertBefore(this.bottomFold_,this.selection.endRow);else for(this.bottomFold_.nextSibling!=this.selection.startRow&&this.rowNodes_.insertBefore(this.bottomFold_,this.selection.startRow);this.selection.startRow.nextSibling!=this.selection.endRow;)this.rowNodes_.removeChild(this.selection.startRow.nextSibling);for(;this.rowNodes_.lastChild!=this.selection.endRow;)this.rowNodes_.removeChild(this.rowNodes_.lastChild)}},o.ScrollPort.prototype.drawVisibleRows_=function(e,t){function r(e,t){for(;e!=t;){if(!e)throw"Did not encounter target node";if(e==i.bottomFold_)throw"Encountered bottom fold before target node";var r=e;e=e.nextSibling,r.parentNode.removeChild(r)}}for(var i=this,o=this.selection.startRow,s=this.selection.endRow,n=this.bottomFold_,a=this.topFold_.nextSibling,l=Math.min(this.visibleRowCount,this.rowProvider_.getRowCount()),h=0;h=this.lastRowCount_;var t=e*this.characterSize.height+this.visibleRowTopMargin,r=this.getScrollMax_();t>r&&(t=r),this.screen_.scrollTop!=t&&(this.screen_.scrollTop=t,this.scheduleRedraw())},o.ScrollPort.prototype.scrollRowToBottom=function(e){this.syncScrollHeight(),this.isScrolledEnd=e+this.visibleRowCount>=this.lastRowCount_;var t=e*this.characterSize.height+this.visibleRowTopMargin+this.visibleRowBottomMargin;(t-=this.visibleRowCount*this.characterSize.height)<0&&(t=0),this.screen_.scrollTop!=t&&(this.screen_.scrollTop=t)},o.ScrollPort.prototype.getTopRowIndex=function(){return Math.round(this.screen_.scrollTop/this.characterSize.height)},o.ScrollPort.prototype.getBottomRowIndex=function(e){return e+this.visibleRowCount-1},o.ScrollPort.prototype.onScroll_=function(e){var t=this.getScreenSize();t.width==this.lastScreenWidth_&&t.height==this.lastScreenHeight_?(this.redraw_(),this.publish("scroll",{scrollPort:this})):this.resize()},o.ScrollPort.prototype.onScrollWheel=function(e){},o.ScrollPort.prototype.onScrollWheel_=function(e){if(this.onScrollWheel(e),!e.defaultPrevented){var t=this.scrollWheelDelta(e),r=this.screen_.scrollTop-t;r<0&&(r=0);var i=this.getScrollMax_();r>i&&(r=i),r!=this.screen_.scrollTop&&(this.screen_.scrollTop=r,e.preventDefault())}},o.ScrollPort.prototype.scrollWheelDelta=function(e){var t;switch(e.deltaMode){case WheelEvent.DOM_DELTA_PIXEL:t=e.deltaY*this.scrollWheelMultiplier_;break;case WheelEvent.DOM_DELTA_LINE:t=e.deltaY*this.characterSize.height;break;case WheelEvent.DOM_DELTA_PAGE:t=e.deltaY*this.characterSize.height*this.screen_.getHeight()}return-1*t},o.ScrollPort.prototype.onTouch=function(e){},o.ScrollPort.prototype.onTouch_=function(e){if(this.onTouch(e),!e.defaultPrevented){var t,r,i=function(e){return{id:e.identifier,y:e.clientY,x:e.clientX}};switch(e.type){case"touchstart":for(t=0;tn&&(s=n),s!=this.screen_.scrollTop&&(this.screen_.scrollTop=s)}e.preventDefault()}},o.ScrollPort.prototype.onResize_=function(e){this.syncCharacterSize(),this.resize()},o.ScrollPort.prototype.onCopy=function(e){},o.ScrollPort.prototype.onCopy_=function(e){if(this.onCopy(e),!e.defaultPrevented&&(this.resetSelectBags_(),this.selection.sync(),this.selection.startRow&&!(this.selection.endRow.rowIndex-this.selection.startRow.rowIndex<2))){var t=this.getTopRowIndex(),r=this.getBottomRowIndex(t);if(this.selection.startRow.rowIndexr){var o;o=this.selection.startRow.rowIndex>r?this.selection.startRow.rowIndex+1:this.bottomFold_.previousSibling.rowIndex+1,this.bottomSelectBag_.textContent=this.rowProvider_.getRowsText(o,this.selection.endRow.rowIndex),this.rowNodes_.insertBefore(this.bottomSelectBag_,this.selection.endRow)}}},o.ScrollPort.prototype.onBodyKeyDown_=function(e){if(this.ctrlVPaste){var t=String.fromCharCode(e.which).toLowerCase();(e.ctrlKey||e.metaKey)&&"v"==t&&this.pasteTarget_.focus()}},o.ScrollPort.prototype.onPaste_=function(e){this.pasteTarget_.focus();var t=this;setTimeout(function(){t.publish("paste",{text:t.pasteTarget_.value}),t.pasteTarget_.value="",t.screen_.focus()},0)},o.ScrollPort.prototype.handlePasteTargetTextInput_=function(e){e.stopPropagation()},o.ScrollPort.prototype.setScrollbarVisible=function(e){this.screen_.style.overflowY=e?"scroll":"hidden"},o.ScrollPort.prototype.setScrollWheelMoveMultipler=function(e){this.scrollWheelMultiplier_=e},i.rtdep("lib.colors","lib.PreferenceManager","lib.resource","lib.wc","lib.f","hterm.Keyboard","hterm.Options","hterm.PreferenceManager","hterm.Screen","hterm.ScrollPort","hterm.Size","hterm.TextAttributes","hterm.VT"),o.Terminal=function(e){this.profileId_=null,this.primaryScreen_=new o.Screen,this.alternateScreen_=new o.Screen,this.screen_=this.primaryScreen_,this.screenSize=new o.Size(0,0),this.scrollPort_=new o.ScrollPort(this),this.scrollPort_.subscribe("resize",this.onResize_.bind(this)),this.scrollPort_.subscribe("scroll",this.onScroll_.bind(this)),this.scrollPort_.subscribe("paste",this.onPaste_.bind(this)),this.scrollPort_.onCopy=this.onCopy_.bind(this),this.div_=null,this.document_=window.document,this.scrollbackRows_=[],this.tabStops_=[],this.defaultTabStops=!0,this.vtScrollTop_=null,this.vtScrollBottom_=null,this.cursorNode_=null,this.cursorShape_=o.Terminal.cursorShape.BLOCK,this.cursorColor_=null,this.cursorBlinkCycle_=[100,100],this.myOnCursorBlink_=this.onCursorBlink_.bind(this),this.backgroundColor_=null,this.foregroundColor_=null,this.scrollOnOutput_=null,this.scrollOnKeystroke_=null,this.scrollWheelArrowKeys_=null,this.defeatMouseReports_=!1,this.bellAudio_=this.document_.createElement("audio"),this.bellAudio_.id="hterm:bell-audio",this.bellAudio_.setAttribute("preload","auto"),this.bellNotificationList_=[],this.desktopNotificationBell_=!1,this.savedOptions_={},this.options_=new o.Options,this.timeouts_={},this.vt=new o.VT(this),this.keyboard=new o.Keyboard(this),this.io=new o.Terminal.IO(this),this.enableMouseDragScroll=!0,this.copyOnSelect=null,this.mouseRightClickPaste=null,this.mousePasteButton=null,this.useDefaultWindowCopy=!1,this.clearSelectionAfterCopy=!0,this.realizeSize_(80,24),this.setDefaultTabStops(),this.setProfile(e||"default",function(){this.onTerminalReady()}.bind(this))},o.Terminal.cursorShape={BLOCK:"BLOCK",BEAM:"BEAM",UNDERLINE:"UNDERLINE"},o.Terminal.prototype.onTerminalReady=function(){},o.Terminal.prototype.tabWidth=8,o.Terminal.prototype.setProfile=function(e,t){this.profileId_=e.replace(/\//g,"");var r=this;this.prefs_&&this.prefs_.deactivate(),this.prefs_=new o.PreferenceManager(this.profileId_),this.prefs_.addObservers(null,{"alt-gr-mode":function(e){e=null==e?"en-us"==navigator.language.toLowerCase()?"none":"right-alt":"string"==typeof e?e.toLowerCase():"none",/^(none|ctrl-alt|left-alt|right-alt)$/.test(e)||(e="none"),r.keyboard.altGrMode=e},"alt-backspace-is-meta-backspace":function(e){r.keyboard.altBackspaceIsMetaBackspace=e},"alt-is-meta":function(e){r.keyboard.altIsMeta=e},"alt-sends-what":function(e){/^(escape|8-bit|browser-key)$/.test(e)||(e="escape"),r.keyboard.altSendsWhat=e},"audible-bell-sound":function(e){var t=e.match(/^lib-resource:(\S+)/);t?r.bellAudio_.setAttribute("src",i.resource.getDataUrl(t[1])):r.bellAudio_.setAttribute("src",e)},"desktop-notification-bell":function(e){e&&Notification?(r.desktopNotificationBell_="granted"===Notification.permission,r.desktopNotificationBell_||console.warn("desktop-notification-bell is true but we do not have permission to display notifications.")):r.desktopNotificationBell_=!1},"background-color":function(e){r.setBackgroundColor(e)},"background-image":function(e){r.scrollPort_.setBackgroundImage(e)},"background-size":function(e){r.scrollPort_.setBackgroundSize(e)},"background-position":function(e){r.scrollPort_.setBackgroundPosition(e)},"backspace-sends-backspace":function(e){r.keyboard.backspaceSendsBackspace=e},"character-map-overrides":function(e){null==e||e instanceof Object?(r.vt.characterMaps.reset(),r.vt.characterMaps.setOverrides(e)):console.warn("Preference character-map-modifications is not an object: "+e)},"cursor-blink":function(e){r.setCursorBlink(!!e)},"cursor-blink-cycle":function(e){e instanceof Array&&"number"==typeof e[0]&&"number"==typeof e[1]?r.cursorBlinkCycle_=e:r.cursorBlinkCycle_="number"==typeof e?[e,e]:[100,100]},"cursor-color":function(e){r.setCursorColor(e)},"color-palette-overrides":function(e){if(null==e||e instanceof Object||e instanceof Array){if(i.colors.colorPalette=i.colors.stockColorPalette.concat(),e)for(var t in e){var o=parseInt(t);if(isNaN(o)||o<0||o>255)console.log("Invalid value in palette: "+t+": "+e[t]);else if(e[o]){var s=i.colors.normalizeCSS(e[o]);s&&(i.colors.colorPalette[o]=s)}}r.primaryScreen_.textAttributes.resetColorPalette(),r.alternateScreen_.textAttributes.resetColorPalette()}else console.warn("Preference color-palette-overrides is not an array or object: "+e)},"copy-on-select":function(e){r.copyOnSelect=!!e},"use-default-window-copy":function(e){r.useDefaultWindowCopy=!!e},"clear-selection-after-copy":function(e){r.clearSelectionAfterCopy=!!e},"ctrl-plus-minus-zero-zoom":function(e){r.keyboard.ctrlPlusMinusZeroZoom=e},"ctrl-c-copy":function(e){r.keyboard.ctrlCCopy=e},"ctrl-v-paste":function(e){r.keyboard.ctrlVPaste=e,r.scrollPort_.setCtrlVPaste(e)},"east-asian-ambiguous-as-two-column":function(e){i.wc.regardCjkAmbiguous=e},"enable-8-bit-control":function(e){r.vt.enable8BitControl=!!e},"enable-bold":function(e){r.syncBoldSafeState()},"enable-bold-as-bright":function(e){r.primaryScreen_.textAttributes.enableBoldAsBright=!!e,r.alternateScreen_.textAttributes.enableBoldAsBright=!!e},"enable-blink":function(e){r.syncBlinkState()},"enable-clipboard-write":function(e){r.vt.enableClipboardWrite=!!e},"enable-dec12":function(e){r.vt.enableDec12=!!e},"font-family":function(e){r.syncFontFamily()},"font-size":function(e){r.setFontSize(e)},"font-smoothing":function(e){r.syncFontFamily()},"foreground-color":function(e){r.setForegroundColor(e)},"home-keys-scroll":function(e){r.keyboard.homeKeysScroll=e},keybindings:function(e){if(r.keyboard.bindings.clear(),e)if(e instanceof Object)try{r.keyboard.bindings.addBindings(e)}catch(e){console.error("Error in keybindings preference: "+e)}else console.error("Error in keybindings preference: Expected object")},"max-string-sequence":function(e){r.vt.maxStringSequence=e},"media-keys-are-fkeys":function(e){r.keyboard.mediaKeysAreFKeys=e},"meta-sends-escape":function(e){r.keyboard.metaSendsEscape=e},"mouse-right-click-paste":function(e){r.mouseRightClickPaste=e},"mouse-paste-button":function(e){r.syncMousePasteButton()},"page-keys-scroll":function(e){r.keyboard.pageKeysScroll=e},"pass-alt-number":function(e){null==e&&(e=!window.navigator.userAgent.match(/Mac OS X/)&&"popup"!=o.windowType),r.passAltNumber=e},"pass-ctrl-number":function(e){null==e&&(e=!window.navigator.userAgent.match(/Mac OS X/)&&"popup"!=o.windowType),r.passCtrlNumber=e},"pass-meta-number":function(e){null==e&&(e=window.navigator.userAgent.match(/Mac OS X/)&&"popup"!=o.windowType),r.passMetaNumber=e},"pass-meta-v":function(e){r.keyboard.passMetaV=e},"receive-encoding":function(e){/^(utf-8|raw)$/.test(e)||(console.warn('Invalid value for "receive-encoding": '+e),e="utf-8"),r.vt.characterEncoding=e},"scroll-on-keystroke":function(e){r.scrollOnKeystroke_=e},"scroll-on-output":function(e){r.scrollOnOutput_=e},"scrollbar-visible":function(e){r.setScrollbarVisible(e)},"scroll-wheel-may-send-arrow-keys":function(e){r.scrollWheelArrowKeys_=e},"scroll-wheel-move-multiplier":function(e){r.setScrollWheelMoveMultipler(e)},"send-encoding":function(e){/^(utf-8|raw)$/.test(e)||(console.warn('Invalid value for "send-encoding": '+e),e="utf-8"),r.keyboard.characterEncoding=e},"shift-insert-paste":function(e){r.keyboard.shiftInsertPaste=e},"terminal-encoding":function(e){r.vt.setEncoding(e)},"user-css":function(e){r.scrollPort_.setUserCssUrl(e)},"user-css-text":function(e){r.scrollPort_.setUserCssText(e)},"word-break-match-left":function(e){r.primaryScreen_.wordBreakMatchLeft=e,r.alternateScreen_.wordBreakMatchLeft=e},"word-break-match-right":function(e){r.primaryScreen_.wordBreakMatchRight=e,r.alternateScreen_.wordBreakMatchRight=e},"word-break-match-middle":function(e){r.primaryScreen_.wordBreakMatchMiddle=e,r.alternateScreen_.wordBreakMatchMiddle=e}}),this.prefs_.readStorage(function(){this.prefs_.notifyAll(),t&&t()}.bind(this))},o.Terminal.prototype.getPrefs=function(){return this.prefs_},o.Terminal.prototype.setBracketedPaste=function(e){this.options_.bracketedPaste=e},o.Terminal.prototype.setCursorColor=function(e){this.cursorColor_=e,this.cursorNode_.style.backgroundColor=e,this.cursorNode_.style.borderColor=e},o.Terminal.prototype.getCursorColor=function(){return this.cursorColor_},o.Terminal.prototype.setSelectionEnabled=function(e){this.enableMouseDragScroll=e},o.Terminal.prototype.setBackgroundColor=function(e){this.backgroundColor_=i.colors.normalizeCSS(e),this.primaryScreen_.textAttributes.setDefaults(this.foregroundColor_,this.backgroundColor_),this.alternateScreen_.textAttributes.setDefaults(this.foregroundColor_,this.backgroundColor_),this.scrollPort_.setBackgroundColor(e)},o.Terminal.prototype.getBackgroundColor=function(){return this.backgroundColor_},o.Terminal.prototype.setForegroundColor=function(e){this.foregroundColor_=i.colors.normalizeCSS(e),this.primaryScreen_.textAttributes.setDefaults(this.foregroundColor_,this.backgroundColor_),this.alternateScreen_.textAttributes.setDefaults(this.foregroundColor_,this.backgroundColor_),this.scrollPort_.setForegroundColor(e)},o.Terminal.prototype.getForegroundColor=function(){return this.foregroundColor_},o.Terminal.prototype.runCommandClass=function(e,t){var r=this.prefs_.get("environment");"object"==typeof r&&null!=r||(r={});var i=this;this.command=new e({argString:t||"",io:this.io.push(),environment:r,onExit:function(e){i.io.pop(),i.uninstallKeyboard(),i.prefs_.get("close-on-exit")&&window.close()}}),this.installKeyboard(),this.command.run()},o.Terminal.prototype.isPrimaryScreen=function(){return this.screen_==this.primaryScreen_},o.Terminal.prototype.installKeyboard=function(){this.keyboard.installKeyboard(this.scrollPort_.getDocument().body)},o.Terminal.prototype.uninstallKeyboard=function(){this.keyboard.installKeyboard(null)},o.Terminal.prototype.setCssVar=function(e,t,r="--hterm-"){this.document_.documentElement.style.setProperty(`${r}${e}`,t)},o.Terminal.prototype.setFontSize=function(e){0===e&&(e=this.prefs_.get("font-size")),this.scrollPort_.setFontSize(e),this.setCssVar("charsize-width",this.scrollPort_.characterSize.width+"px"),this.setCssVar("charsize-height",this.scrollPort_.characterSize.height+"px")},o.Terminal.prototype.getFontSize=function(){return this.scrollPort_.getFontSize()},o.Terminal.prototype.getFontFamily=function(){return this.scrollPort_.getFontFamily()},o.Terminal.prototype.syncFontFamily=function(){this.scrollPort_.setFontFamily(this.prefs_.get("font-family"),this.prefs_.get("font-smoothing")),this.syncBoldSafeState()},o.Terminal.prototype.syncMousePasteButton=function(){var e=this.prefs_.get("mouse-paste-button");if("number"!=typeof e){var t=navigator.userAgent.match(/\(X11;\s+(\S+)/);t&&"CrOS"!=t[1]?this.mousePasteButton=2:this.mousePasteButton=1}else this.mousePasteButton=e},o.Terminal.prototype.syncBoldSafeState=function(){var e=this.prefs_.get("enable-bold");if(null!==e)return this.primaryScreen_.textAttributes.enableBold=e,void(this.alternateScreen_.textAttributes.enableBold=e);var t=this.scrollPort_.measureCharacterSize(),r=this.scrollPort_.measureCharacterSize("bold"),i=t.equals(r);i||console.warn("Bold characters disabled: Size of bold weight differs from normal. Font family is: "+this.scrollPort_.getFontFamily()),this.primaryScreen_.textAttributes.enableBold=i,this.alternateScreen_.textAttributes.enableBold=i},o.Terminal.prototype.syncBlinkState=function(){this.setCssVar("node-duration",this.prefs_.get("enable-blink")?"0.7s":"0")},o.Terminal.prototype.syncMouseStyle=function(){this.setCssVar("mouse-cursor-style",this.vt.mouseReport==this.vt.MOUSE_REPORT_DISABLED?"var(--hterm-mouse-cursor-text)":"var(--hterm-mouse-cursor-pointer)")},o.Terminal.prototype.saveCursor=function(){return this.screen_.cursorPosition.clone()},o.Terminal.prototype.getTextAttributes=function(){return this.screen_.textAttributes},o.Terminal.prototype.setTextAttributes=function(e){this.screen_.textAttributes=e},o.Terminal.prototype.getZoomFactor=function(){return this.scrollPort_.characterSize.zoomFactor},o.Terminal.prototype.setWindowTitle=function(e){window.document.title=e},o.Terminal.prototype.restoreCursor=function(e){var t=i.f.clamp(e.row,0,this.screenSize.height-1),r=i.f.clamp(e.column,0,this.screenSize.width-1);this.screen_.setCursorPosition(t,r),(e.column>r||e.column==r&&e.overflow)&&(this.screen_.cursorPosition.overflow=!0)},o.Terminal.prototype.clearCursorOverflow=function(){this.screen_.cursorPosition.overflow=!1},o.Terminal.prototype.setCursorShape=function(e){this.cursorShape_=e,this.restyleCursor_()},o.Terminal.prototype.getCursorShape=function(){return this.cursorShape_},o.Terminal.prototype.setWidth=function(e){null!=e?(this.div_.style.width=Math.ceil(this.scrollPort_.characterSize.width*e+this.scrollPort_.currentScrollbarWidthPx)+"px",this.realizeSize_(e,this.screenSize.height),this.scheduleSyncCursorPosition_()):this.div_.style.width="100%"},o.Terminal.prototype.setHeight=function(e){null!=e?(this.div_.style.height=this.scrollPort_.characterSize.height*e+"px",this.realizeSize_(this.screenSize.width,e),this.scheduleSyncCursorPosition_()):this.div_.style.height="100%"},o.Terminal.prototype.realizeSize_=function(e,t){e!=this.screenSize.width&&this.realizeWidth_(e),t!=this.screenSize.height&&this.realizeHeight_(t),this.io.onTerminalResize_(e,t)},o.Terminal.prototype.realizeWidth_=function(e){if(e<=0)throw new Error("Attempt to realize bad width: "+e);var t=e-this.screen_.getWidth();if(this.screenSize.width=e,this.screen_.setColumnCount(e),t>0)this.defaultTabStops&&this.setDefaultTabStops(this.screenSize.width-t);else for(var r=this.tabStops_.length-1;r>=0&&!(this.tabStops_[r]0){if(t<=this.scrollbackRows_.length){var s=Math.min(t,this.scrollbackRows_.length),n=this.scrollbackRows_.splice(this.scrollbackRows_.length-s,s);this.screen_.unshiftRows(n),t-=s,r.row+=s}t&&this.appendRows_(t)}this.setVTScrollRegion(null,null),this.restoreCursor(r)},o.Terminal.prototype.scrollHome=function(){this.scrollPort_.scrollRowToTop(0)},o.Terminal.prototype.scrollEnd=function(){this.scrollPort_.scrollRowToBottom(this.getRowCount())},o.Terminal.prototype.scrollPageUp=function(){var e=this.scrollPort_.getTopRowIndex();this.scrollPort_.scrollRowToTop(e-this.screenSize.height+1)},o.Terminal.prototype.scrollPageDown=function(){var e=this.scrollPort_.getTopRowIndex();this.scrollPort_.scrollRowToTop(e+this.screenSize.height-1)},o.Terminal.prototype.scrollLineUp=function(){var e=this.scrollPort_.getTopRowIndex();this.scrollPort_.scrollRowToTop(e-1)},o.Terminal.prototype.scrollLineDown=function(){var e=this.scrollPort_.getTopRowIndex();this.scrollPort_.scrollRowToTop(e+1)},o.Terminal.prototype.wipeContents=function(){this.scrollbackRows_.length=0,this.scrollPort_.resetCache(),[this.primaryScreen_,this.alternateScreen_].forEach(function(e){var t=e.getHeight();t>0&&(this.renumberRows_(0,t),this.clearHome(e))}.bind(this)),this.syncCursorPosition_(),this.scrollPort_.invalidate()},o.Terminal.prototype.reset=function(){this.clearAllTabStops(),this.setDefaultTabStops(),this.clearHome(this.primaryScreen_),this.primaryScreen_.textAttributes.reset(),this.clearHome(this.alternateScreen_),this.alternateScreen_.textAttributes.reset(),this.setCursorBlink(!!this.prefs_.get("cursor-blink")),this.vt.reset(),this.softReset()},o.Terminal.prototype.softReset=function(){this.options_=new o.Options,this.options_.cursorBlink=!!this.timeouts_.cursorBlink,this.primaryScreen_.textAttributes.resetColorPalette(),this.alternateScreen_.textAttributes.resetColorPalette(),this.setVTScrollRegion(null,null),this.setCursorVisible(!0)},o.Terminal.prototype.forwardTabStop=function(){for(var e=this.screen_.cursorPosition.column,t=0;te)return void this.setCursorColumn(this.tabStops_[t]);var r=this.screen_.cursorPosition.overflow;this.setCursorColumn(this.screenSize.width-1),this.screen_.cursorPosition.overflow=r},o.Terminal.prototype.backwardTabStop=function(){for(var e=this.screen_.cursorPosition.column,t=this.tabStops_.length-1;t>=0;t--)if(this.tabStops_[t]=0;t--){if(this.tabStops_[t]==e)return;if(this.tabStops_[t]0){var n=this.screen_.shiftRows(s);Array.prototype.push.apply(this.scrollbackRows_,n),this.scrollPort_.isScrolledEnd&&this.scheduleScrollDown_()}t>=this.screen_.rowsArray.length&&(t=this.screen_.rowsArray.length-1),this.setAbsoluteCursorPosition(t,0)},o.Terminal.prototype.moveRows_=function(e,t,r){var i=this.screen_.removeRows(e,t);this.screen_.insertRows(r,i);var o,s;e=this.screenSize.width&&(a=!0,n=this.screenSize.width-this.screen_.cursorPosition.column),a&&!this.options_.wraparound?(s=i.wc.substr(e,t,n-1)+i.wc.substr(e,r-1),n=r):s=i.wc.substr(e,t,n);for(var l=o.TextAttributes.splitWidecharString(s),h=0;h=0;o--)this.setAbsoluteCursorPosition(t+o,0),this.screen_.clearCursorRow()},o.Terminal.prototype.deleteLines=function(e){var t=this.saveCursor(),r=t.row,i=this.getVTScrollBottom(),o=i-r+1,s=i-(e=Math.min(e,o))+1;e!=o&&this.moveRows_(r,e,s);for(var n=0;nt)this.setCssVar("cursor-offset-row","-1");else{this.options_.cursorVisible&&"none"==this.cursorNode_.style.display&&(this.cursorNode_.style.display=""),this.setCssVar("cursor-offset-row",`${r-e} + `+`${this.scrollPort_.visibleRowTopMargin}px`),this.setCssVar("cursor-offset-col",this.screen_.cursorPosition.column),this.cursorNode_.setAttribute("title","("+this.screen_.cursorPosition.column+", "+this.screen_.cursorPosition.row+")");var i=this.document_.getSelection();i&&i.isCollapsed&&this.screen_.syncSelectionCaret(i)}},o.Terminal.prototype.restyleCursor_=function(){var e=this.cursorShape_;"false"==this.cursorNode_.getAttribute("focus")&&(e=o.Terminal.cursorShape.BLOCK);var t=this.cursorNode_.style;switch(e){case o.Terminal.cursorShape.BEAM:t.height="var(--hterm-charsize-height)",t.backgroundColor="transparent",t.borderBottomStyle=null,t.borderLeftStyle="solid";break;case o.Terminal.cursorShape.UNDERLINE:t.height=this.scrollPort_.characterSize.baseline+"px",t.backgroundColor="transparent",t.borderBottomStyle="solid",t.borderLeftStyle=null;break;default:t.height="var(--hterm-charsize-height)",t.backgroundColor=this.cursorColor_,t.borderBottomStyle=null,t.borderLeftStyle=null}},o.Terminal.prototype.scheduleSyncCursorPosition_=function(){if(!this.timeouts_.syncCursor){var e=this;this.timeouts_.syncCursor=setTimeout(function(){e.syncCursorPosition_(),delete e.timeouts_.syncCursor},0)}},o.Terminal.prototype.showZoomWarning_=function(e){if(!this.zoomWarningNode_){if(!e)return;this.zoomWarningNode_=this.document_.createElement("div"),this.zoomWarningNode_.id="hterm:zoom-warning",this.zoomWarningNode_.style.cssText="color: black;background-color: #ff2222;font-size: large;border-radius: 8px;opacity: 0.75;padding: 0.2em 0.5em 0.2em 0.5em;top: 0.5em;right: 1.2em;position: absolute;-webkit-text-size-adjust: none;-webkit-user-select: none;-moz-text-size-adjust: none;-moz-user-select: none;",this.zoomWarningNode_.addEventListener("click",function(e){this.parentNode.removeChild(this)})}this.zoomWarningNode_.textContent=i.MessageManager.replaceReferences(o.zoomWarningMessage,[parseInt(100*this.scrollPort_.characterSize.zoomFactor)]),this.zoomWarningNode_.style.fontFamily=this.prefs_.get("font-family"),e?this.zoomWarningNode_.parentNode||this.div_.parentNode.appendChild(this.zoomWarningNode_):this.zoomWarningNode_.parentNode&&this.zoomWarningNode_.parentNode.removeChild(this.zoomWarningNode_)},o.Terminal.prototype.showOverlay=function(e,t){if(!this.overlayNode_){if(!this.div_)return;this.overlayNode_=this.document_.createElement("div"),this.overlayNode_.style.cssText="border-radius: 15px;font-size: xx-large;opacity: 0.75;padding: 0.2em 0.5em 0.2em 0.5em;position: absolute;-webkit-user-select: none;-webkit-transition: opacity 180ms ease-in;-moz-user-select: none;-moz-transition: opacity 180ms ease-in;",this.overlayNode_.addEventListener("mousedown",function(e){e.preventDefault(),e.stopPropagation()},!0)}this.overlayNode_.style.color=this.prefs_.get("background-color"),this.overlayNode_.style.backgroundColor=this.prefs_.get("foreground-color"),this.overlayNode_.style.fontFamily=this.prefs_.get("font-family"),this.overlayNode_.textContent=e,this.overlayNode_.style.opacity="0.75",this.overlayNode_.parentNode||this.div_.appendChild(this.overlayNode_);var r=o.getClientSize(this.div_),i=o.getClientSize(this.overlayNode_);this.overlayNode_.style.top=(r.height-i.height)/2+"px",this.overlayNode_.style.left=(r.width-i.width-this.scrollPort_.currentScrollbarWidthPx)/2+"px";var s=this;this.overlayTimeout_&&clearTimeout(this.overlayTimeout_),null!==t&&(this.overlayTimeout_=setTimeout(function(){s.overlayNode_.style.opacity="0",s.overlayTimeout_=setTimeout(function(){s.overlayNode_.parentNode&&s.overlayNode_.parentNode.removeChild(s.overlayNode_),s.overlayTimeout_=null,s.overlayNode_.style.opacity="0.75"},200)},t||1500))},o.Terminal.prototype.paste=function(){return o.pasteFromClipboard(this.document_)},o.Terminal.prototype.copyStringToClipboard=function(e){this.prefs_.get("enable-clipboard-notice")&&setTimeout(this.showOverlay.bind(this,o.notifyCopyMessage,500),200);var t=this.document_.createElement("pre");t.id="hterm:copy-to-clipboard-source",t.textContent=e,t.style.cssText="-webkit-user-select: text;-moz-user-select: text;position: absolute;top: -99px",this.document_.body.appendChild(t);var r=this.document_.getSelection(),i=r.anchorNode,s=r.anchorOffset,n=r.focusNode,a=r.focusOffset;r.selectAllChildren(t),o.copySelectionToClipboard(this.document_),r.extend&&(r.collapse(i,s),r.extend(n,a)),t.parentNode.removeChild(t)},o.Terminal.prototype.getSelectionText=function(){var e=this.scrollPort_.selection;if(e.sync(),e.isCollapsed)return null;var t=e.startOffset,r=e.startNode;if("X-ROW"!=r.nodeName)for("#text"==r.nodeName&&"SPAN"==r.parentNode.nodeName&&(r=r.parentNode);r.previousSibling;)r=r.previousSibling,t+=o.TextAttributes.nodeWidth(r);var s=o.TextAttributes.nodeWidth(e.endNode)-e.endOffset;if("X-ROW"!=(r=e.endNode).nodeName)for("#text"==r.nodeName&&"SPAN"==r.parentNode.nodeName&&(r=r.parentNode);r.nextSibling;)r=r.nextSibling,s+=o.TextAttributes.nodeWidth(r);var n=this.getRowsText(e.startRow.rowIndex,e.endRow.rowIndex+1);return i.wc.substring(n,t,i.wc.strWidth(n)-s)},o.Terminal.prototype.copySelectionToClipboard=function(){var e=this.getSelectionText();null!=e&&this.copyStringToClipboard(e)},o.Terminal.prototype.overlaySize=function(){this.showOverlay(this.screenSize.width+"x"+this.screenSize.height)},o.Terminal.prototype.onVTKeystroke=function(e){this.scrollOnKeystroke_&&this.scrollPort_.scrollRowToBottom(this.getRowCount()),this.io.onVTKeystroke(this.keyboard.encode(e))},o.Terminal.prototype.openUrl=function(e){window.chrome&&window.chrome.browser?chrome.browser.openTab({url:e}):window.open(e,"_blank").focus()},o.Terminal.prototype.openSelectedUrl_=function(){var e=this.getSelectionText();if((null!=e||(this.screen_.expandSelection(this.document_.getSelection()),null!=(e=this.getSelectionText())))&&!(e.length>2048||e.search(/[\s\[\](){}<>"'\\^`]/)>=0)){if(e.search("^[a-zA-Z][a-zA-Z0-9+.-]*://")<0)switch(e.split(":",1)[0]){case"mailto":break;default:e="http://"+e}this.openUrl(e)}},o.Terminal.prototype.onMouse_=function(e){if(!e.processedByTerminalHandler_){var t=!this.defeatMouseReports_&&this.vt.mouseReport!=this.vt.MOUSE_REPORT_DISABLED;if(e.processedByTerminalHandler_=!0,e.terminalRow=parseInt((e.clientY-this.scrollPort_.visibleRowTopMargin)/this.scrollPort_.characterSize.height)+1,e.terminalColumn=parseInt(e.clientX/this.scrollPort_.characterSize.width)+1,!("mousedown"==e.type&&e.terminalColumn>this.screenSize.width)){if(this.options_.cursorVisible&&!t&&(e.terminalRow-1==this.screen_.cursorPosition.row&&e.terminalColumn-1==this.screen_.cursorPosition.column?this.cursorNode_.style.display="none":"none"==this.cursorNode_.style.display&&(this.cursorNode_.style.display="")),"mousedown"==e.type&&(e.altKey||!t?(this.defeatMouseReports_=!0,this.setSelectionEnabled(!0)):(this.defeatMouseReports_=!1,this.document_.getSelection().collapseToEnd(),this.setSelectionEnabled(!1),e.preventDefault())),t)this.scrollBlockerNode_.engaged||("mousedown"==e.type?(this.scrollBlockerNode_.engaged=!0,this.scrollBlockerNode_.style.top=e.clientY-5+"px",this.scrollBlockerNode_.style.left=e.clientX-5+"px"):"mousemove"==e.type&&(this.document_.getSelection().collapseToEnd(),e.preventDefault())),this.onMouse(e);else{if("dblclick"==e.type&&this.copyOnSelect&&(this.screen_.expandSelection(this.document_.getSelection()),this.copySelectionToClipboard(this.document_)),"click"==e.type&&!e.shiftKey&&(e.ctrlKey||e.metaKey))return clearTimeout(this.timeouts_.openUrl),void(this.timeouts_.openUrl=setTimeout(this.openSelectedUrl_.bind(this),500));if("mousedown"==e.type&&(this.mouseRightClickPaste&&2==e.button||e.button==this.mousePasteButton)&&(this.paste()||console.warning("Could not paste manually due to web restrictions")),"mouseup"==e.type&&0==e.button&&this.copyOnSelect&&!this.document_.getSelection().isCollapsed&&this.copySelectionToClipboard(this.document_),"mousemove"!=e.type&&"mouseup"!=e.type||!this.scrollBlockerNode_.engaged||(this.scrollBlockerNode_.engaged=!1,this.scrollBlockerNode_.style.top="-99px"),this.scrollWheelArrowKeys_&&!e.shiftKey&&this.keyboard.applicationCursor&&!this.isPrimaryScreen()&&"wheel"==e.type){var r=this.scrollPort_.scrollWheelDelta(e),o=i.f.smartFloorDivide(Math.abs(r),this.scrollPort_.characterSize.height),s="O"+(r<0?"B":"A");this.io.sendString(s.repeat(o)),e.preventDefault()}}"mouseup"==e.type&&this.document_.getSelection().isCollapsed&&(this.defeatMouseReports_=!1)}}},o.Terminal.prototype.onMouse=function(e){},o.Terminal.prototype.onFocusChange_=function(e){this.cursorNode_.setAttribute("focus",e),this.restyleCursor_(),!0===e&&this.closeBellNotifications_()},o.Terminal.prototype.onScroll_=function(){this.scheduleSyncCursorPosition_()},o.Terminal.prototype.onPaste_=function(e){var t=e.text.replace(/\n/gm,"\r");t=this.keyboard.encode(t),this.options_.bracketedPaste&&(t="[200~"+t+"[201~"),this.io.sendString(t)},o.Terminal.prototype.onCopy_=function(e){this.useDefaultWindowCopy||(e.preventDefault(),setTimeout(this.copySelectionToClipboard.bind(this),0))},o.Terminal.prototype.onResize_=function(){var e=Math.floor(this.scrollPort_.getScreenWidth()/this.scrollPort_.characterSize.width)||0,t=i.f.smartFloorDivide(this.scrollPort_.getScreenHeight(),this.scrollPort_.characterSize.height)||0;if(!(e<=0||t<=0)){var r=e!=this.screenSize.width||t!=this.screenSize.height;this.realizeSize_(e,t),this.showZoomWarning_(1!=this.scrollPort_.characterSize.zoomFactor),r&&this.overlaySize(),this.restyleCursor_(),this.scheduleSyncCursorPosition_()}},o.Terminal.prototype.onCursorBlink_=function(){this.options_.cursorBlink?"false"==this.cursorNode_.getAttribute("focus")||"0"==this.cursorNode_.style.opacity?(this.cursorNode_.style.opacity="1",this.timeouts_.cursorBlink=setTimeout(this.myOnCursorBlink_,this.cursorBlinkCycle_[0])):(this.cursorNode_.style.opacity="0",this.timeouts_.cursorBlink=setTimeout(this.myOnCursorBlink_,this.cursorBlinkCycle_[1])):delete this.timeouts_.cursorBlink},o.Terminal.prototype.setScrollbarVisible=function(e){this.scrollPort_.setScrollbarVisible(e)},o.Terminal.prototype.setScrollWheelMoveMultipler=function(e){this.scrollPort_.setScrollWheelMoveMultipler(e)},o.Terminal.prototype.closeBellNotifications_=function(){this.bellNotificationList_.forEach(function(e){e.close()}),this.bellNotificationList_.length=0},i.rtdep("lib.encodeUTF8"),o.Terminal.IO=function(e){this.terminal_=e,this.previousIO_=null},o.Terminal.IO.prototype.showOverlay=function(e,t){this.terminal_.showOverlay(e,t)},o.Terminal.IO.prototype.createFrame=function(e,t){return new o.Frame(this.terminal_,e,t)},o.Terminal.IO.prototype.setTerminalProfile=function(e){this.terminal_.setProfile(e)},o.Terminal.IO.prototype.push=function(){var e=new o.Terminal.IO(this.terminal_);return e.keyboardCaptured_=this.keyboardCaptured_,e.columnCount=this.columnCount,e.rowCount=this.rowCount,e.previousIO_=this.terminal_.io,this.terminal_.io=e,e},o.Terminal.IO.prototype.pop=function(){this.terminal_.io=this.previousIO_},o.Terminal.IO.prototype.sendString=function(e){console.log("Unhandled sendString: "+e)},o.Terminal.IO.prototype.onVTKeystroke=function(e){console.log("Unobserverd VT keystroke: "+JSON.stringify(e))},o.Terminal.IO.prototype.onTerminalResize_=function(e,t){for(var r=this;r;)r.columnCount=e,r.rowCount=t,r=r.previousIO_;this.onTerminalResize(e,t)},o.Terminal.IO.prototype.onTerminalResize=function(e,t){},o.Terminal.IO.prototype.writeUTF8=function(e){if(this.terminal_.io!=this)throw"Attempt to print from inactive IO object.";this.terminal_.interpret(e)},o.Terminal.IO.prototype.writelnUTF8=function(e){if(this.terminal_.io!=this)throw"Attempt to print from inactive IO object.";this.terminal_.interpret(e+"\r\n")},o.Terminal.IO.prototype.print=o.Terminal.IO.prototype.writeUTF16=function(e){this.writeUTF8(i.encodeUTF8(e))},o.Terminal.IO.prototype.println=o.Terminal.IO.prototype.writelnUTF16=function(e){this.writelnUTF8(i.encodeUTF8(e))},i.rtdep("lib.colors"),o.TextAttributes=function(e){this.document_=e,this.foregroundSource=this.SRC_DEFAULT,this.backgroundSource=this.SRC_DEFAULT,this.foreground=this.DEFAULT_COLOR,this.background=this.DEFAULT_COLOR,this.defaultForeground="rgb(255, 255, 255)",this.defaultBackground="rgb(0, 0, 0)",this.bold=!1,this.faint=!1,this.italic=!1,this.blink=!1,this.underline=!1,this.strikethrough=!1,this.inverse=!1,this.invisible=!1,this.wcNode=!1,this.asciiNode=!0,this.tileData=null,this.colorPalette=null,this.resetColorPalette()},o.TextAttributes.prototype.enableBold=!0,o.TextAttributes.prototype.enableBoldAsBright=!0,o.TextAttributes.prototype.DEFAULT_COLOR=i.f.createEnum(""),o.TextAttributes.prototype.SRC_DEFAULT="default",o.TextAttributes.prototype.SRC_RGB="rgb",o.TextAttributes.prototype.setDocument=function(e){this.document_=e},o.TextAttributes.prototype.clone=function(){var e=new o.TextAttributes(null);for(var t in this)e[t]=this[t];return e.colorPalette=this.colorPalette.concat(),e},o.TextAttributes.prototype.reset=function(){this.foregroundSource=this.SRC_DEFAULT,this.backgroundSource=this.SRC_DEFAULT,this.foreground=this.DEFAULT_COLOR,this.background=this.DEFAULT_COLOR,this.bold=!1,this.faint=!1,this.italic=!1,this.blink=!1,this.underline=!1,this.strikethrough=!1,this.inverse=!1,this.invisible=!1,this.wcNode=!1,this.asciiNode=!0},o.TextAttributes.prototype.resetColorPalette=function(){this.colorPalette=i.colors.colorPalette.concat(),this.syncColors()},o.TextAttributes.prototype.isDefault=function(){return this.foregroundSource==this.SRC_DEFAULT&&this.backgroundSource==this.SRC_DEFAULT&&!this.bold&&!this.faint&&!this.italic&&!this.blink&&!this.underline&&!this.strikethrough&&!this.inverse&&!this.invisible&&!this.wcNode&&this.asciiNode&&null==this.tileData},o.TextAttributes.prototype.createContainer=function(e){if(this.isDefault())return this.document_.createTextNode(e);var t=this.document_.createElement("span"),r=t.style,i=[];this.foreground!=this.DEFAULT_COLOR&&(r.color=this.foreground),this.background!=this.DEFAULT_COLOR&&(r.backgroundColor=this.background),this.enableBold&&this.bold&&(r.fontWeight="bold"),this.faint&&(t.faint=!0),this.italic&&(r.fontStyle="italic"),this.blink&&(i.push("blink-node"),t.blinkNode=!0);var o="";return this.underline&&(o+=" underline",t.underline=!0),this.strikethrough&&(o+=" line-through",t.strikethrough=!0),o&&(r.textDecoration=o),this.wcNode&&(i.push("wc-node"),t.wcNode=!0,t.asciiNode=!1),null!=this.tileData&&(i.push("tile"),i.push("tile_"+this.tileData),t.tileNode=!0),e&&(t.textContent=e),i.length&&(t.className=i.join(" ")),t},o.TextAttributes.prototype.matchesContainer=function(e){if("string"==typeof e||3==e.nodeType)return this.isDefault();var t=e.style;return!(this.wcNode||e.wcNode||this.asciiNode!=this.asciiNode||null!=this.tileData||e.tileNode||this.foreground!=t.color||this.background!=t.backgroundColor||(this.enableBold&&this.bold)!=!!t.fontWeight||this.blink!=e.blinkNode||this.italic!=!!t.fontStyle||!!this.underline!=!!e.underline||!!this.strikethrough!=!!e.strikethrough)},o.TextAttributes.prototype.setDefaults=function(e,t){this.defaultForeground=e,this.defaultBackground=t,this.syncColors()},o.TextAttributes.prototype.syncColors=function(){var e=this.foregroundSource,t=this.backgroundSource,r=this.DEFAULT_COLOR,o=this.DEFAULT_COLOR;if(this.inverse&&(e=this.backgroundSource,t=this.foregroundSource,r=this.defaultBackground,o=this.defaultForeground),this.enableBoldAsBright&&this.bold&&e!=this.SRC_DEFAULT&&e!=this.SRC_RGB&&(e=function(e){return e<8?e+8:e}(e)),this.invisible&&(e=t,r=this.defaultBackground),e!=this.SRC_RGB&&(this.foreground=e==this.SRC_DEFAULT?r:this.colorPalette[e]),this.faint&&!this.invisible){var s=this.foreground==this.DEFAULT_COLOR?this.defaultForeground:this.foreground;this.foreground=i.colors.mix(s,"rgb(0, 0, 0)",.3333)}t!=this.SRC_RGB&&(this.background=t==this.SRC_DEFAULT?o:this.colorPalette[t])},o.TextAttributes.containersMatch=function(e,t){if("string"==typeof e)return o.TextAttributes.containerIsDefault(t);if(e.nodeType!=t.nodeType)return!1;if(3==e.nodeType)return!0;var r=e.style,i=t.style;return r.color==i.color&&r.backgroundColor==i.backgroundColor&&r.fontWeight==i.fontWeight&&r.fontStyle==i.fontStyle&&r.textDecoration==i.textDecoration},o.TextAttributes.containerIsDefault=function(e){return"string"==typeof e||3==e.nodeType},o.TextAttributes.nodeWidth=function(e){return e.asciiNode?e.textContent.length:i.wc.strWidth(e.textContent)},o.TextAttributes.nodeSubstr=function(e,t,r){return e.asciiNode?e.textContent.substr(t,r):i.wc.substr(e.textContent,t,r)},o.TextAttributes.nodeSubstring=function(e,t,r){return e.asciiNode?e.textContent.substring(t,r):i.wc.substring(e.textContent,t,r)},o.TextAttributes.splitWidecharString=function(e){for(var t=[],r=0,o=0,s=!0,n=0;n0?0:1),n|=r,t=""+String.fromCharCode(n)+o+s,e.preventDefault();break;case"mousedown":var n=Math.min(e.button,2)+32;n|=r,t=""+String.fromCharCode(n)+o+s;break;case"mouseup":t="#"+o+s;break;case"mousemove":this.mouseReport==this.MOUSE_REPORT_DRAG&&e.buttons&&(n=32,1&e.buttons?n+=0:4&e.buttons?n+=1:2&e.buttons?n+=2:n+=3,n+=32,n|=r,t=""+String.fromCharCode(n)+o+s);break;case"click":case"dblclick":break;default:console.error("Unknown mouse event: "+e.type,e)}t&&this.terminal.io.sendString(t)}},o.VT.prototype.interpret=function(e){for(this.parseState_.resetBuf(this.decode(e));!this.parseState_.isComplete();){var t=this.parseState_.func,r=this.parseState_.pos,e=this.parseState_.buf;if(this.parseState_.func.call(this,this.parseState_),this.parseState_.func==t&&this.parseState_.pos==r&&this.parseState_.buf==e)throw"Parser did not alter the state!"}},o.VT.prototype.decode=function(e){return"utf-8"==this.characterEncoding?this.decodeUTF8(e):e},o.VT.prototype.encodeUTF8=function(e){return i.encodeUTF8(e)},o.VT.prototype.decodeUTF8=function(e){return this.utf8Decoder_.decode(e)},o.VT.prototype.setEncoding=function(e){switch(e){default:console.warn('Invalid value for "terminal-encoding": '+e);case"iso-2022":this.codingSystemUtf8_=!1,this.codingSystemLocked_=!1;break;case"utf-8-locked":this.codingSystemUtf8_=!0,this.codingSystemLocked_=!0;break;case"utf-8":this.codingSystemUtf8_=!0,this.codingSystemLocked_=!1}this.updateEncodingState_()},o.VT.prototype.updateEncodingState_=function(){var e=Object.keys(o.VT.CC1).filter(e=>!this.codingSystemUtf8_||e.charCodeAt()<128).map(e=>"\\x"+i.f.zpad(e.charCodeAt().toString(16),2)).join("");this.cc1Pattern_=new RegExp(`[${e}]`)},o.VT.prototype.parseUnknown_=function(e){function t(e){!r.codingSystemUtf8_&&r[r.GL].GL&&(e=r[r.GL].GL(e)),r.terminal.print(e)}var r=this,i=e.peekRemainingBuf(),o=i.search(this.cc1Pattern_);return 0==o?(this.dispatch("CC1",i.substr(0,1),e),void e.advance(1)):-1==o?(t(i),void e.reset()):(t(i.substr(0,o)),this.dispatch("CC1",i.substr(o,1),e),void e.advance(o+1))},o.VT.prototype.parseCSI_=function(e){var t=e.peekChar(),r=e.args;t>="@"&&t<="~"?(this.dispatch("CSI",this.leadingModifier_+this.trailingModifier_+t,e),e.resetParseFunction()):";"==t?this.trailingModifier_?e.resetParseFunction():(r.length||r.push(""),r.push("")):t>="0"&&t<="9"?this.trailingModifier_?e.resetParseFunction():r.length?r[r.length-1]+=t:r[0]=t:t>=" "&&t<="?"&&":"!=t?r.length?this.trailingModifier_+=t:this.leadingModifier_+=t:this.cc1Pattern_.test(t)?this.dispatch("CC1",t,e):e.resetParseFunction(),e.advance(1)},o.VT.prototype.parseUntilStringTerminator_=function(e){var t=e.peekRemainingBuf(),r=t.search(/(\x1b\\|\x07)/),i=e.args;if(i.length||(i[0]="",i[1]=new Date),-1==r){i[0]+=t;var o;return i[0].length>this.maxStringSequence&&(o="too long: "+i[0].length),-1!=i[0].indexOf("")&&(o="embedded escape: "+i[0].indexOf("")),new Date-i[1]>this.oscTimeLimit_&&(o="timeout expired: "+new Date-i[1]),o?(console.log("parseUntilStringTerminator_: aborting: "+o,i[0]),e.reset(i[0]),!1):(e.advance(t.length),!0)}return i[0].length+r>this.maxStringSequence?(e.reset(i[0]+t),!1):(i[0]+=t.substr(0,r),e.resetParseFunction(),e.advance(r+(""==t.substr(r,1)?2:1)),!0)},o.VT.prototype.dispatch=function(e,t,r){var i=o.VT[e][t];i?i!=o.VT.ignore?"CC1"==e&&t>""&&!this.enable8BitControl?console.warn("Ignoring 8-bit control code: 0x"+t.charCodeAt(0).toString(16)):i.apply(this,[r,t]):this.warnUnimplemented&&console.warn("Ignored "+e+" code: "+JSON.stringify(t)):this.warnUnimplemented&&console.warn("Unknown "+e+" code: "+JSON.stringify(t))},o.VT.prototype.setANSIMode=function(e,t){4==e?this.terminal.setInsertMode(t):20==e?this.terminal.setAutoCarriageReturn(t):this.warnUnimplemented&&console.warn("Unimplemented ANSI Mode: "+e)},o.VT.prototype.setDECMode=function(e,t){switch(parseInt(e,10)){case 1:this.terminal.keyboard.applicationCursor=t;break;case 3:this.allowColumnWidthChanges_&&(this.terminal.setWidth(t?132:80),this.terminal.clearHome(),this.terminal.setVTScrollRegion(null,null));break;case 5:this.terminal.setReverseVideo(t);break;case 6:this.terminal.setOriginMode(t);break;case 7:this.terminal.setWraparound(t);break;case 12:this.enableDec12&&this.terminal.setCursorBlink(t);break;case 25:this.terminal.setCursorVisible(t);break;case 30:this.terminal.setScrollbarVisible(t);break;case 40:this.terminal.allowColumnWidthChanges_=t;break;case 45:this.terminal.setReverseWraparound(t);break;case 67:this.terminal.keyboard.backspaceSendsBackspace=t;break;case 1e3:this.mouseReport=t?this.MOUSE_REPORT_CLICK:this.MOUSE_REPORT_DISABLED,this.terminal.syncMouseStyle();break;case 1002:this.mouseReport=t?this.MOUSE_REPORT_DRAG:this.MOUSE_REPORT_DISABLED,this.terminal.syncMouseStyle();break;case 1010:this.terminal.scrollOnOutput=t;break;case 1011:this.terminal.scrollOnKeystroke=t;break;case 1036:this.terminal.keyboard.metaSendsEscape=t;break;case 1039:t?this.terminal.keyboard.previousAltSendsWhat_||(this.terminal.keyboard.previousAltSendsWhat_=this.terminal.keyboard.altSendsWhat,this.terminal.keyboard.altSendsWhat="escape"):this.terminal.keyboard.previousAltSendsWhat_&&(this.terminal.keyboard.altSendsWhat=this.terminal.keyboard.previousAltSendsWhat_,this.terminal.keyboard.previousAltSendsWhat_=null);break;case 47:case 1047:this.terminal.setAlternateMode(t);break;case 1048:this.savedState_.save();case 1049:t?(this.savedState_.save(),this.terminal.setAlternateMode(t),this.terminal.clear()):(this.terminal.setAlternateMode(t),this.savedState_.restore());break;case 2004:this.terminal.setBracketedPaste(t);break;default:this.warnUnimplemented&&console.warn("Unimplemented DEC Private Mode: "+e)}},o.VT.ignore=function(){},o.VT.CC1={},o.VT.ESC={},o.VT.CSI={},o.VT.OSC={},o.VT.VT52={},o.VT.CC1["\0"]=o.VT.ignore,o.VT.CC1[""]=o.VT.ignore,o.VT.CC1[""]=function(){this.terminal.ringBell()},o.VT.CC1["\b"]=function(){this.terminal.cursorLeft(1)},o.VT.CC1["\t"]=function(){this.terminal.forwardTabStop()},o.VT.CC1["\n"]=function(){this.terminal.formFeed()},o.VT.CC1["\v"]=o.VT.CC1["\n"],o.VT.CC1["\f"]=o.VT.CC1["\n"],o.VT.CC1["\r"]=function(){this.terminal.setCursorColumn(0)},o.VT.CC1[""]=function(){this.GL="G1"},o.VT.CC1[""]=function(){this.GL="G0"},o.VT.CC1[""]=o.VT.ignore,o.VT.CC1[""]=o.VT.ignore,o.VT.CC1[""]=function(e){"G1"==this.GL&&(this.GL="G0"),e.resetParseFunction(),this.terminal.print("?")},o.VT.CC1[""]=o.VT.CC1[""],o.VT.CC1[""]=function(e){function t(e){var r=e.consumeChar();""!=r&&(this.dispatch("ESC",r,e),e.func==t&&e.resetParseFunction())}e.func=t},o.VT.CC1[""]=o.VT.ignore,o.VT.CC1["„"]=o.VT.ESC.D=function(){this.terminal.lineFeed()},o.VT.CC1["…"]=o.VT.ESC.E=function(){this.terminal.setCursorColumn(0),this.terminal.cursorDown(1)},o.VT.CC1["ˆ"]=o.VT.ESC.H=function(){this.terminal.setTabStop(this.terminal.getCursorColumn())},o.VT.CC1[""]=o.VT.ESC.M=function(){this.terminal.reverseLineFeed()},o.VT.CC1["Ž"]=o.VT.ESC.N=o.VT.ignore,o.VT.CC1[""]=o.VT.ESC.O=o.VT.ignore,o.VT.CC1[""]=o.VT.ESC.P=function(e){e.resetArguments(),e.func=this.parseUntilStringTerminator_},o.VT.CC1["–"]=o.VT.ESC.V=o.VT.ignore,o.VT.CC1["—"]=o.VT.ESC.W=o.VT.ignore,o.VT.CC1["˜"]=o.VT.ESC.X=o.VT.ignore,o.VT.CC1["š"]=o.VT.ESC.Z=function(){this.terminal.io.sendString("[?1;2c")},o.VT.CC1["›"]=o.VT.ESC["["]=function(e){e.resetArguments(),this.leadingModifier_="",this.trailingModifier_="",e.func=this.parseCSI_},o.VT.CC1["œ"]=o.VT.ESC["\\"]=o.VT.ignore,o.VT.CC1[""]=o.VT.ESC["]"]=function(e){function t(e){if(this.parseUntilStringTerminator_(e)&&e.func!=t){var r=e.args[0].match(/^(\d+);(.*)$/);r?(e.args[0]=r[2],this.dispatch("OSC",r[1],e)):console.warn("Invalid OSC: "+JSON.stringify(e.args[0]))}}e.resetArguments(),e.func=t},o.VT.CC1["ž"]=o.VT.ESC["^"]=function(e){e.resetArguments(),e.func=this.parseUntilStringTerminator_},o.VT.CC1["Ÿ"]=o.VT.ESC._=function(e){e.resetArguments(),e.func=this.parseUntilStringTerminator_},o.VT.ESC[" "]=function(e){e.func=function(e){var t=e.consumeChar();this.warnUnimplemented&&console.warn("Unimplemented sequence: ESC 0x20 "+t),e.resetParseFunction()}},o.VT.ESC["#"]=function(e){e.func=function(e){"8"==e.consumeChar()&&this.terminal.fill("E"),e.resetParseFunction()}},o.VT.ESC["%"]=function(e){e.func=function(e){var t=e.consumeChar();if(this.codingSystemLocked_)return"/"==t&&e.consumeChar(),void e.resetParseFunction();switch(t){case"@":this.setEncoding("iso-2022");break;case"G":this.setEncoding("utf-8");break;case"/":switch(t=e.consumeChar()){case"G":case"H":case"I":this.setEncoding("utf-8-locked");break;default:this.warnUnimplemented&&console.warn("Unknown ESC % / argument: "+JSON.stringify(t))}break;default:this.warnUnimplemented&&console.warn("Unknown ESC % argument: "+JSON.stringify(t))}e.resetParseFunction()}},o.VT.ESC["("]=o.VT.ESC[")"]=o.VT.ESC["*"]=o.VT.ESC["+"]=o.VT.ESC["-"]=o.VT.ESC["."]=o.VT.ESC["/"]=function(e,t){e.func=function(e){var r=e.consumeChar();if(""==r)return e.resetParseFunction(),void e.func();var i=this.characterMaps.getMap(r);void 0!==i?"("==t?this.G0=i:")"==t||"-"==t?this.G1=i:"*"==t||"."==t?this.G2=i:"+"!=t&&"/"!=t||(this.G3=i):this.warnUnimplemented&&console.log('Invalid character set for "'+t+'": '+r),e.resetParseFunction()}},o.VT.ESC[6]=o.VT.ignore,o.VT.ESC[7]=function(){this.savedState_.save()},o.VT.ESC[8]=function(){this.savedState_.restore()},o.VT.ESC[9]=o.VT.ignore,o.VT.ESC["="]=function(){this.terminal.keyboard.applicationKeypad=!0},o.VT.ESC[">"]=function(){this.terminal.keyboard.applicationKeypad=!1},o.VT.ESC.F=o.VT.ignore,o.VT.ESC.c=function(){this.reset(),this.terminal.reset()},o.VT.ESC.l=o.VT.ESC.m=o.VT.ignore,o.VT.ESC.n=function(){this.GL="G2"},o.VT.ESC.o=function(){this.GL="G3"},o.VT.ESC["|"]=function(){this.GR="G3"},o.VT.ESC["}"]=function(){this.GR="G2"},o.VT.ESC["~"]=function(){this.GR="G1"},o.VT.OSC[0]=function(e){this.terminal.setWindowTitle(e.args[0])},o.VT.OSC[2]=o.VT.OSC[0],o.VT.OSC[4]=function(e){for(var t=e.args[0].split(";"),r=parseInt(t.length/2),o=this.terminal.getTextAttributes().colorPalette,s=[],n=0;n=o.length||("?"!=l?(l=i.colors.x11ToCSS(l))&&(o[a]=l):(l=i.colors.rgbToX11(o[a]))&&s.push(a+";"+l))}s.length&&this.terminal.io.sendString("]4;"+s.join(";")+"")},o.VT.OSC[9]=function(e){o.notify({body:e.args[0]})},o.VT.OSC[10]=function(e){var t=e.args[0].split(";");if(t){var r=i.colors.x11ToCSS(t.shift());r&&this.terminal.setForegroundColor(r),t.length>0&&(e.args[0]=t.join(";"),o.VT.OSC[11].apply(this,[e]))}},o.VT.OSC[11]=function(e){var t=e.args[0].split(";");if(t){var r=i.colors.x11ToCSS(t.shift());r&&this.terminal.setBackgroundColor(r)}},o.VT.OSC[50]=function(e){var t=e.args[0].match(/CursorShape=(.)/i);if(t)switch(t[1]){case"1":this.terminal.setCursorShape(o.Terminal.cursorShape.BEAM);break;case"2":this.terminal.setCursorShape(o.Terminal.cursorShape.UNDERLINE);break;default:this.terminal.setCursorShape(o.Terminal.cursorShape.BLOCK)}else console.warn("Could not parse OSC 50 args: "+e.args[0])},o.VT.OSC[52]=function(e){var t=e.args[0].match(/^[cps01234567]*;(.*)/);if(t){var r=window.atob(t[1]);r&&this.terminal.copyStringToClipboard(this.decode(r))}},o.VT.OSC[777]=function(e){var t;switch(e.args[0].split(";",1)[0]){case"notify":var r,i;(t=e.args[0].match(/^[^;]+;([^;]*)(;([\s\S]*))?$/))&&(r=t[1],i=t[3]),o.notify({title:r,body:i});break;default:console.warn("Unknown urxvt module: "+e.args[0])}},o.VT.CSI["@"]=function(e){this.terminal.insertSpace(e.iarg(0,1))},o.VT.CSI.A=function(e){this.terminal.cursorUp(e.iarg(0,1))},o.VT.CSI.B=function(e){this.terminal.cursorDown(e.iarg(0,1))},o.VT.CSI.C=function(e){this.terminal.cursorRight(e.iarg(0,1))},o.VT.CSI.D=function(e){this.terminal.cursorLeft(e.iarg(0,1))},o.VT.CSI.E=function(e){this.terminal.cursorDown(e.iarg(0,1)),this.terminal.setCursorColumn(0)},o.VT.CSI.F=function(e){this.terminal.cursorUp(e.iarg(0,1)),this.terminal.setCursorColumn(0)},o.VT.CSI.G=function(e){this.terminal.setCursorColumn(e.iarg(0,1)-1)},o.VT.CSI.H=function(e){this.terminal.setCursorPosition(e.iarg(0,1)-1,e.iarg(1,1)-1)},o.VT.CSI.I=function(e){var t=e.iarg(0,1);t=i.f.clamp(t,1,this.terminal.screenSize.width);for(var r=0;rT"]=o.VT.ignore,o.VT.CSI.X=function(e){this.terminal.eraseToRight(e.iarg(0,1))},o.VT.CSI.Z=function(e){var t=e.iarg(0,1);t=i.f.clamp(t,1,this.terminal.screenSize.width);for(var r=0;rc"]=function(e){this.terminal.io.sendString("[>0;256;0c")},o.VT.CSI.d=function(e){this.terminal.setAbsoluteCursorRow(e.iarg(0,1)-1)},o.VT.CSI.f=o.VT.CSI.H,o.VT.CSI.g=function(e){e.args[0]&&0!=e.args[0]?3==e.args[0]&&this.terminal.clearAllTabStops():this.terminal.clearTabStopAtCursor(!1)},o.VT.CSI.h=function(e){for(var t=0;t=i.colorPalette.length)continue;i.foregroundSource=a}else if(39==s)i.foregroundSource=i.SRC_DEFAULT;else if(s<48)i.backgroundSource=s-40;else if(48==s){var n=r(o);if(null!=n)i.backgroundSource=i.SRC_RGB,i.background=n,o+=5;else{var a=t(o);if(null==a)break;if(o+=2,a>=i.colorPalette.length)continue;i.backgroundSource=a}}else i.backgroundSource=i.SRC_DEFAULT;else s>=90&&s<=97?i.foregroundSource=s-90+8:s>=100&&s<=107&&(i.backgroundSource=s-100+8)}i.setDefaults(this.terminal.getForegroundColor(),this.terminal.getBackgroundColor())}else i.reset()},o.VT.CSI[">m"]=o.VT.ignore,o.VT.CSI.n=function(e){if(5==e.args[0])this.terminal.io.sendString("0n");else if(6==e.args[0]){var t=this.terminal.getCursorRow()+1,r=this.terminal.getCursorColumn()+1;this.terminal.io.sendString("["+t+";"+r+"R")}},o.VT.CSI[">n"]=o.VT.ignore,o.VT.CSI["?n"]=function(e){if(6==e.args[0]){var t=this.terminal.getCursorRow()+1,r=this.terminal.getCursorColumn()+1;this.terminal.io.sendString("["+t+";"+r+"R")}else 15==e.args[0]?this.terminal.io.sendString("[?11n"):25==e.args[0]?this.terminal.io.sendString("[?21n"):26==e.args[0]?this.terminal.io.sendString("[?12;1;0;0n"):53==e.args[0]&&this.terminal.io.sendString("[?50n")},o.VT.CSI[">p"]=o.VT.ignore,o.VT.CSI["!p"]=function(){this.reset(),this.terminal.softReset()},o.VT.CSI.$p=o.VT.ignore,o.VT.CSI["?$p"]=o.VT.ignore,o.VT.CSI['"p']=o.VT.ignore,o.VT.CSI.q=o.VT.ignore,o.VT.CSI[" q"]=function(e){var t=e.args[0];0==t||1==t?(this.terminal.setCursorShape(o.Terminal.cursorShape.BLOCK),this.terminal.setCursorBlink(!0)):2==t?(this.terminal.setCursorShape(o.Terminal.cursorShape.BLOCK),this.terminal.setCursorBlink(!1)):3==t?(this.terminal.setCursorShape(o.Terminal.cursorShape.UNDERLINE),this.terminal.setCursorBlink(!0)):4==t?(this.terminal.setCursorShape(o.Terminal.cursorShape.UNDERLINE),this.terminal.setCursorBlink(!1)):5==t?(this.terminal.setCursorShape(o.Terminal.cursorShape.BEAM),this.terminal.setCursorBlink(!0)):6==t?(this.terminal.setCursorShape(o.Terminal.cursorShape.BEAM),this.terminal.setCursorBlink(!1)):console.warn("Unknown cursor style: "+t)},o.VT.CSI['"q']=o.VT.ignore,o.VT.CSI.r=function(e){var t=e.args,r=t[0]?parseInt(t[0],10)-1:null,i=t[1]?parseInt(t[1],10)-1:null;this.terminal.setVTScrollRegion(r,i),this.terminal.setCursorPosition(0,0)},o.VT.CSI["?r"]=o.VT.ignore,o.VT.CSI.$r=o.VT.ignore,o.VT.CSI.s=function(){this.savedState_.save()},o.VT.CSI["?s"]=o.VT.ignore,o.VT.CSI.t=o.VT.ignore,o.VT.CSI.$t=o.VT.ignore,o.VT.CSI[">t"]=o.VT.ignore,o.VT.CSI[" t"]=o.VT.ignore,o.VT.CSI.u=function(){this.savedState_.restore()},o.VT.CSI[" u"]=o.VT.ignore,o.VT.CSI.$v=o.VT.ignore,o.VT.CSI["'w"]=o.VT.ignore,o.VT.CSI.x=o.VT.ignore,o.VT.CSI["*x"]=o.VT.ignore,o.VT.CSI.$x=o.VT.ignore,o.VT.CSI.z=function(e){if(!(e.args.length<1)){var t=e.args[0];if(0==t){if(e.args.length<2)return;this.terminal.getTextAttributes().tileData=e.args[1]}else 1==t&&(this.terminal.getTextAttributes().tileData=null)}},o.VT.CSI["'z"]=o.VT.ignore,o.VT.CSI.$z=o.VT.ignore,o.VT.CSI["'{"]=o.VT.ignore,o.VT.CSI["'|"]=o.VT.ignore,o.VT.CSI["'}"]=o.VT.ignore,o.VT.CSI["'~"]=o.VT.ignore,i.rtdep("lib.f"),o.VT.CharacterMap=function(e,t){this.description=e,this.GL=null,this.glmapBase_=t,this.sync_()},o.VT.CharacterMap.prototype.sync_=function(e){if(!this.glmapBase_&&!e)return this.GL=null,delete this.glmap_,void delete this.glre_;this.glmap_=e?Object.assign({},this.glmapBase_,e):this.glmapBase_;var t=Object.keys(this.glmap_).map(e=>"\\x"+i.f.zpad(e.charCodeAt(0).toString(16)));this.glre_=new RegExp("["+t.join("")+"]","g"),this.GL=(e=>e.replace(this.glre_,e=>this.glmap_[e]))},o.VT.CharacterMap.prototype.reset=function(){this.glmap_!==this.glmapBase_&&this.sync_()},o.VT.CharacterMap.prototype.setOverrides=function(e){this.sync_(e)},o.VT.CharacterMap.prototype.clone=function(){var e=new o.VT.CharacterMap(this.description,this.glmapBase_);return this.glmap_!==this.glmapBase_&&e.setOverrides(this.glmap_),e},o.VT.CharacterMaps=function(){this.maps_=o.VT.CharacterMaps.DefaultMaps,this.mapsBase_=this.maps_},o.VT.CharacterMaps.prototype.getMap=function(e){return this.maps_.hasOwnProperty(e)?this.maps_[e]:void 0},o.VT.CharacterMaps.prototype.addMap=function(e,t){this.maps_===this.mapsBase_&&(this.maps_=Object.assign({},this.mapsBase_)),this.maps_[e]=t},o.VT.CharacterMaps.prototype.reset=function(){this.maps_!==o.VT.CharacterMaps.DefaultMaps&&(this.maps_=o.VT.CharacterMaps.DefaultMaps)},o.VT.CharacterMaps.prototype.setOverrides=function(e){this.maps_===this.mapsBase_&&(this.maps_=Object.assign({},this.mapsBase_));for(var t in e){var r=this.getMap(t);void 0!==r?(this.maps_[t]=r.clone(),this.maps_[t].setOverrides(e[t])):this.addMap(t,new o.VT.CharacterMap("user "+t,e[t]))}},o.VT.CharacterMaps.DefaultMaps={},o.VT.CharacterMaps.DefaultMaps[0]=new o.VT.CharacterMap("graphic",{"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"}),o.VT.CharacterMaps.DefaultMaps.A=new o.VT.CharacterMap("british",{"#":"£"}),o.VT.CharacterMaps.DefaultMaps.B=new o.VT.CharacterMap("us",null),o.VT.CharacterMaps.DefaultMaps[4]=new o.VT.CharacterMap("dutch",{"#":"£","@":"¾","[":"IJ","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"}),o.VT.CharacterMaps.DefaultMaps.C=o.VT.CharacterMaps.DefaultMaps[5]=new o.VT.CharacterMap("finnish",{"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"}),o.VT.CharacterMaps.DefaultMaps.R=new o.VT.CharacterMap("french",{"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"}),o.VT.CharacterMaps.DefaultMaps.Q=new o.VT.CharacterMap("french canadian",{"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"}),o.VT.CharacterMaps.DefaultMaps.K=new o.VT.CharacterMap("german",{"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"}),o.VT.CharacterMaps.DefaultMaps.Y=new o.VT.CharacterMap("italian",{"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"}),o.VT.CharacterMaps.DefaultMaps.E=o.VT.CharacterMaps.DefaultMaps[6]=new o.VT.CharacterMap("norwegian/danish",{"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"}),o.VT.CharacterMaps.DefaultMaps.Z=new o.VT.CharacterMap("spanish",{"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"}),o.VT.CharacterMaps.DefaultMaps[7]=o.VT.CharacterMaps.DefaultMaps.H=new o.VT.CharacterMap("swedish",{"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"}),o.VT.CharacterMaps.DefaultMaps["="]=new o.VT.CharacterMap("swiss",{"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}),i.resource.add("hterm/audio/bell","audio/ogg;base64","T2dnUwACAAAAAAAAAADhqW5KAAAAAMFvEjYBHgF2b3JiaXMAAAAAAYC7AAAAAAAAAHcBAAAAAAC4AU9nZ1MAAAAAAAAAAAAA4aluSgEAAAAAesI3EC3//////////////////8kDdm9yYmlzHQAAAFhpcGguT3JnIGxpYlZvcmJpcyBJIDIwMDkwNzA5AAAAAAEFdm9yYmlzKUJDVgEACAAAADFMIMWA0JBVAAA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+ABPoY8Jj5y2wje81jsXc/1TOQWTDYZBmAkNDiqVwuA2NJ9AQAAEBKAt9Vrsfs/2N19MO91S9rd8EHTZHnzC5MYmfQEACy/FBcAAADA5c4gi4z8RANs/m6FNXVo9DV46JG1BBDukqlw/Va5G7QbuGVSI+2aZaoLXJrdVj2zlC9Z5QEAEFz/5QzgVZwAAAAA/oXcxyC6WfTu+09Ve/c766J4VTAGUFmA51+VANKi/QPoPwYgYAkA715OH4S0s5KDHvj99MMq8TPFc3roKZnGOoT1bmIhVgc7XAMBAAAAAMAW1VbQw3gapzOpJd+Kd2fc4iSO62fJv9+movui1wUNPAj059N3OVxzk4gV73PmE8FIA2F5mRq37Evc76vLXfF4rD5UJJAw46hW6LZCb5sNLdx+kzMCAAB+hfy95+965ZCLP7B3/VlTHCvDEKtQhTm4KiCgAEAbrfbWTPssAAAAXpee1tVrozYYn41wD1aeYtkKfswN5/SXPO0JDnhO/4laUortv/s412fybe/nONdncoCHnBVliu0CQGBWlPY/5Kwom2L/kruPM6Q7oz4tvDQy+bZ3HzOi+gNHA4DZEgA="),i.resource.add("hterm/images/icon-96","image/png;base64","iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAFKhJREFUeNrtXXlsXMd5/30z8649uDzEmxRFibIsOXZ8VInTJFYSW3actE1ctWkctEF6I0VRFEWAoihQoAjQFmiBogWaIEADFCmQXklto04TO0ndWI4bxZalWHJinTYtkRJFkctzl9zd977+8c49+UjuipbCD1y+9+ae75vvmJlv3gO2YRu2YRu2YRu2YUuAtroBN3nfeKsaSXWurarvRvUrTnlccV/5a3lDReRKFdc4Za6nzvW2b7OIpwZh7N37iHYiPztyvy4iqA00Tng/WXH1f3GQsF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9cLWm4cbxMUpD2vkqQzzkVwEUIC7Gb/iXQvez3fSYlWR0YZLuUUvkYHw453+JGK9EKdTrdT0Db2TW9CO6DeGSyhHetWXVqOfvXAq7m0vY9xvBW+28RvJ3ygP4ca3KcpJUU7wER/VAQBqK2H/DRZ+hspDe81EYKsQsZV1Vg7oKNKjyGegsXNuFOE302Ywr/G8Fe2pq4fqIfZmQvjbHbZ6AGzDNmzDNmzD2xT+H+5UT7Tyxc2HAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE2LTA2LTMwVDExOjUwOjAyLTA0OjAwOaSkCgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxMy0xMS0wMVQxMDozODoyNC0wNDowMNba8BsAAAAASUVORK5CYII="),i.resource.add("hterm/concat/date","text/plain","Tue, 22 Aug 2017 06:42:31 +0000"),i.resource.add("hterm/changelog/version","text/plain","1.70"),i.resource.add("hterm/changelog/date","text/plain","2017-08-16"),i.resource.add("hterm/git/HEAD","text/plain","git rev-parse HEAD"),e.exports={hterm:o,lib:i}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,r){this.textarea=e,this.compositionView=t,this.terminal=r,this.isComposing=!1,this.isSendingComposition=!1,this.compositionPosition={start:null,end:null}}return e.prototype.compositionstart=function(){this.isComposing=!0,this.compositionPosition.start=this.textarea.value.length,this.compositionView.textContent="",this.compositionView.classList.add("active")},e.prototype.compositionupdate=function(e){var t=this;this.compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(function(){t.compositionPosition.end=t.textarea.value.length},0)},e.prototype.compositionend=function(){this.finalizeComposition(!0)},e.prototype.keydown=function(e){if(this.isComposing||this.isSendingComposition){if(229===e.keyCode)return!1;if(16===e.keyCode||17===e.keyCode||18===e.keyCode)return!1;this.finalizeComposition(!1)}return 229!==e.keyCode||(this.handleAnyTextareaChanges(),!1)},e.prototype.finalizeComposition=function(e){var t=this;if(this.compositionView.classList.remove("active"),this.isComposing=!1,this.clearTextareaPosition(),e){var r={start:this.compositionPosition.start,end:this.compositionPosition.end};this.isSendingComposition=!0,setTimeout(function(){if(t.isSendingComposition){t.isSendingComposition=!1;var e=void 0;e=t.isComposing?t.textarea.value.substring(r.start,r.end):t.textarea.value.substring(r.start),t.terminal.handler(e)}},0)}else{this.isSendingComposition=!1;var i=this.textarea.value.substring(this.compositionPosition.start,this.compositionPosition.end);this.terminal.handler(i)}},e.prototype.handleAnyTextareaChanges=function(){var e=this,t=this.textarea.value;setTimeout(function(){if(!e.isComposing){var r=e.textarea.value.replace(t,"");r.length>0&&e.terminal.handler(r)}},0)},e.prototype.updateCompositionElements=function(e){var t=this;if(this.isComposing){var r=this.terminal.element.querySelector(".terminal-cursor");if(r){var i=this.terminal.element.querySelector(".xterm-rows").offsetTop+r.offsetTop;this.compositionView.style.left=r.offsetLeft+"px",this.compositionView.style.top=i+"px",this.compositionView.style.height=r.offsetHeight+"px",this.compositionView.style.lineHeight=r.offsetHeight+"px";var o=this.compositionView.getBoundingClientRect();this.textarea.style.left=r.offsetLeft+"px",this.textarea.style.top=i+"px",this.textarea.style.width=o.width+"px",this.textarea.style.height=o.height+"px",this.textarea.style.lineHeight=o.height+"px"}e||setTimeout(function(){return t.updateCompositionElements(!0)},0)}},e.prototype.clearTextareaPosition=function(){this.textarea.style.left="",this.textarea.style.top=""},e}();t.CompositionHelper=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=r(3),s=function(){function e(e){this._terminal=e}return e.prototype.addChar=function(e,t){if(e>=" "){var r=n(t);this._terminal.charset&&this._terminal.charset[e]&&(e=this._terminal.charset[e]);var i=this._terminal.y+this._terminal.ybase;if(!r&&this._terminal.x)return void(this._terminal.lines.get(i)[this._terminal.x-1]&&(this._terminal.lines.get(i)[this._terminal.x-1][2]?this._terminal.lines.get(i)[this._terminal.x-1][1]+=e:this._terminal.lines.get(i)[this._terminal.x-2]&&(this._terminal.lines.get(i)[this._terminal.x-2][1]+=e),this._terminal.updateRange(this._terminal.y)));if(this._terminal.x+r-1>=this._terminal.cols)if(this._terminal.wraparoundMode)this._terminal.x=0,++this._terminal.y>this._terminal.scrollBottom?(this._terminal.y--,this._terminal.scroll(!0)):this._terminal.lines.get(this._terminal.y).isWrapped=!0;else if(2===r)return;if(i=this._terminal.y+this._terminal.ybase,this._terminal.insertMode)for(var o=0;othis._terminal.scrollBottom&&(this._terminal.y--,this._terminal.scroll()),this._terminal.x>=this._terminal.cols&&this._terminal.x--},e.prototype.carriageReturn=function(){this._terminal.x=0},e.prototype.backspace=function(){this._terminal.x>0&&this._terminal.x--},e.prototype.tab=function(){this._terminal.x=this._terminal.nextStop()},e.prototype.shiftOut=function(){this._terminal.setgLevel(1)},e.prototype.shiftIn=function(){this._terminal.setgLevel(0)},e.prototype.insertChars=function(e){var t,r,i,o;for((t=e[0])<1&&(t=1),r=this._terminal.y+this._terminal.ybase,i=this._terminal.x,o=[this._terminal.eraseAttr()," ",1];t--&&i=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x>=this._terminal.cols&&this._terminal.x--},e.prototype.cursorForward=function(e){var t=e[0];t<1&&(t=1),this._terminal.x+=t,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},e.prototype.cursorBackward=function(e){var t=e[0];t<1&&(t=1),this._terminal.x>=this._terminal.cols&&this._terminal.x--,this._terminal.x-=t,this._terminal.x<0&&(this._terminal.x=0)},e.prototype.cursorNextLine=function(e){var t=e[0];t<1&&(t=1),this._terminal.y+=t,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x=0},e.prototype.cursorPrecedingLine=function(e){var t=e[0];t<1&&(t=1),this._terminal.y-=t,this._terminal.y<0&&(this._terminal.y=0),this._terminal.x=0},e.prototype.cursorCharAbsolute=function(e){var t=e[0];t<1&&(t=1),this._terminal.x=t-1},e.prototype.cursorPosition=function(e){var t,r;t=e[0]-1,r=e.length>=2?e[1]-1:0,t<0?t=0:t>=this._terminal.rows&&(t=this._terminal.rows-1),r<0?r=0:r>=this._terminal.cols&&(r=this._terminal.cols-1),this._terminal.x=r,this._terminal.y=t},e.prototype.cursorForwardTab=function(e){for(var t=e[0]||1;t--;)this._terminal.x=this._terminal.nextStop()},e.prototype.eraseInDisplay=function(e){var t;switch(e[0]){case 0:for(this._terminal.eraseRight(this._terminal.x,this._terminal.y),t=this._terminal.y+1;t0&&(this._terminal.lines.trimStart(r),this._terminal.ybase=Math.max(this._terminal.ybase-r,0),this._terminal.ydisp=Math.max(this._terminal.ydisp-r,0))}},e.prototype.eraseInLine=function(e){switch(e[0]){case 0:this._terminal.eraseRight(this._terminal.x,this._terminal.y);break;case 1:this._terminal.eraseLeft(this._terminal.x,this._terminal.y);break;case 2:this._terminal.eraseLine(this._terminal.y)}},e.prototype.insertLines=function(e){var t,r,i;for((t=e[0])<1&&(t=1),r=this._terminal.y+this._terminal.ybase,i=this._terminal.rows-1-this._terminal.scrollBottom,i=this._terminal.rows-1+this._terminal.ybase-i+1;t--;)this._terminal.lines.length===this._terminal.lines.maxLength&&(this._terminal.lines.trimStart(1),this._terminal.ybase--,this._terminal.ydisp--,r--,i--),this._terminal.lines.splice(r,0,this._terminal.blankLine(!0)),this._terminal.lines.splice(i,1);this._terminal.updateRange(this._terminal.y),this._terminal.updateRange(this._terminal.scrollBottom)},e.prototype.deleteLines=function(e){var t,r,i;for((t=e[0])<1&&(t=1),r=this._terminal.y+this._terminal.ybase,i=this._terminal.rows-1-this._terminal.scrollBottom,i=this._terminal.rows-1+this._terminal.ybase-i;t--;)this._terminal.lines.length===this._terminal.lines.maxLength&&(this._terminal.lines.trimStart(1),this._terminal.ybase-=1,this._terminal.ydisp-=1),this._terminal.lines.splice(i+1,0,this._terminal.blankLine(!0)),this._terminal.lines.splice(r,1);this._terminal.updateRange(this._terminal.y),this._terminal.updateRange(this._terminal.scrollBottom)},e.prototype.deleteChars=function(e){var t,r,i;for((t=e[0])<1&&(t=1),r=this._terminal.y+this._terminal.ybase,i=[this._terminal.eraseAttr()," ",1];t--;)this._terminal.lines.get(r).splice(this._terminal.x,1),this._terminal.lines.get(r).push(i)},e.prototype.scrollUp=function(e){for(var t=e[0]||1;t--;)this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollTop,1),this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollBottom,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.scrollTop),this._terminal.updateRange(this._terminal.scrollBottom)},e.prototype.scrollDown=function(e){for(var t=e[0]||1;t--;)this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollBottom,1),this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollTop,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.scrollTop),this._terminal.updateRange(this._terminal.scrollBottom)},e.prototype.eraseChars=function(e){var t,r,i,o;for((t=e[0])<1&&(t=1),r=this._terminal.y+this._terminal.ybase,i=this._terminal.x,o=[this._terminal.eraseAttr()," ",1];t--&&i=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},e.prototype.HPositionRelative=function(e){var t=e[0];t<1&&(t=1),this._terminal.x+=t,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},e.prototype.repeatPrecedingCharacter=function(e){for(var t=e[0]||1,r=this._terminal.lines.get(this._terminal.ybase+this._terminal.y),i=r[this._terminal.x-1]||[this._terminal.defAttr," ",1];t--;)r[this._terminal.x++]=i},e.prototype.sendDeviceAttributes=function(e){e[0]>0||(this._terminal.prefix?">"===this._terminal.prefix&&(this._terminal.is("xterm")?this._terminal.send(i.C0.ESC+"[>0;276;0c"):this._terminal.is("rxvt-unicode")?this._terminal.send(i.C0.ESC+"[>85;95;0c"):this._terminal.is("linux")?this._terminal.send(e[0]+"c"):this._terminal.is("screen")&&this._terminal.send(i.C0.ESC+"[>83;40003;0c")):this._terminal.is("xterm")||this._terminal.is("rxvt-unicode")||this._terminal.is("screen")?this._terminal.send(i.C0.ESC+"[?1;2c"):this._terminal.is("linux")&&this._terminal.send(i.C0.ESC+"[?6c"))},e.prototype.linePosAbsolute=function(e){var t=e[0];t<1&&(t=1),this._terminal.y=t-1,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1)},e.prototype.VPositionRelative=function(e){var t=e[0];t<1&&(t=1),this._terminal.y+=t,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x>=this._terminal.cols&&this._terminal.x--},e.prototype.HVPosition=function(e){e[0]<1&&(e[0]=1),e[1]<1&&(e[1]=1),this._terminal.y=e[0]-1,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x=e[1]-1,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},e.prototype.tabClear=function(e){var t=e[0];t<=0?delete this._terminal.tabs[this._terminal.x]:3===t&&(this._terminal.tabs={})},e.prototype.setMode=function(e){if(e.length>1)for(var t=0;t1e3,this._terminal.mouseEvents=!0,this._terminal.element.classList.add("enable-mouse-events"),this._terminal.selectionManager.disable(),this._terminal.log("Binding to mouse events.");break;case 1004:this._terminal.sendFocus=!0;break;case 1005:this._terminal.utfMouse=!0;break;case 1006:this._terminal.sgrMouse=!0;break;case 1015:this._terminal.urxvtMouse=!0;break;case 25:this._terminal.cursorHidden=!1;break;case 1049:case 47:case 1047:if(!this._terminal.normal){var r={lines:this._terminal.lines,ybase:this._terminal.ybase,ydisp:this._terminal.ydisp,x:this._terminal.x,y:this._terminal.y,scrollTop:this._terminal.scrollTop,scrollBottom:this._terminal.scrollBottom,tabs:this._terminal.tabs};this._terminal.reset(),this._terminal.viewport.syncScrollArea(),this._terminal.normal=r,this._terminal.showCursor()}}}else switch(e[0]){case 4:this._terminal.insertMode=!0}},e.prototype.resetMode=function(e){if(e.length>1)for(var t=0;t>18,s=this._terminal.curAttr>>9&511,n=511&this._terminal.curAttr;i=30&&t<=37?s=t-30:t>=40&&t<=47?n=t-40:t>=90&&t<=97?s=(t+=8)-90:t>=100&&t<=107?n=(t+=8)-100:0===t?(o=this._terminal.defAttr>>18,s=this._terminal.defAttr>>9&511,n=511&this._terminal.defAttr):1===t?o|=1:4===t?o|=2:5===t?o|=4:7===t?o|=8:8===t?o|=16:22===t?o&=-2:24===t?o&=-3:25===t?o&=-5:27===t?o&=-9:28===t?o&=-17:39===t?s=this._terminal.defAttr>>9&511:49===t?n=511&this._terminal.defAttr:38===t?2===e[i+1]?(i+=2,-1===(s=this._terminal.matchColor(255&e[i],255&e[i+1],255&e[i+2]))&&(s=511),i+=2):5===e[i+1]&&(s=t=255&e[i+=2]):48===t?2===e[i+1]?(i+=2,-1===(n=this._terminal.matchColor(255&e[i],255&e[i+1],255&e[i+2]))&&(n=511),i+=2):5===e[i+1]&&(n=t=255&e[i+=2]):100===t?(s=this._terminal.defAttr>>9&511,n=511&this._terminal.defAttr):this._terminal.error("Unknown SGR attribute: %d.",t);this._terminal.curAttr=o<<18|s<<9|n}else this._terminal.curAttr=this._terminal.defAttr},e.prototype.deviceStatus=function(e){if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(e[0]){case 6:this._terminal.send(i.C0.ESC+"[?"+(this._terminal.y+1)+";"+(this._terminal.x+1)+"R")}}else switch(e[0]){case 5:this._terminal.send(i.C0.ESC+"[0n");break;case 6:this._terminal.send(i.C0.ESC+"["+(this._terminal.y+1)+";"+(this._terminal.x+1)+"R")}},e.prototype.softReset=function(e){this._terminal.cursorHidden=!1,this._terminal.insertMode=!1,this._terminal.originMode=!1,this._terminal.wraparoundMode=!0,this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea(),this._terminal.applicationCursor=!1,this._terminal.scrollTop=0,this._terminal.scrollBottom=this._terminal.rows-1,this._terminal.curAttr=this._terminal.defAttr,this._terminal.x=this._terminal.y=0,this._terminal.charset=null,this._terminal.glevel=0,this._terminal.charsets=[null]},e.prototype.setCursorStyle=function(e){var t=e[0]<1?1:e[0];switch(t){case 1:case 2:this._terminal.setOption("cursorStyle","block");break;case 3:case 4:this._terminal.setOption("cursorStyle","underline");break;case 5:case 6:this._terminal.setOption("cursorStyle","bar")}var r=t%2==1;this._terminal.setOption("cursorBlink",r)},e.prototype.setScrollRegion=function(e){this._terminal.prefix||(this._terminal.scrollTop=(e[0]||1)-1,this._terminal.scrollBottom=(e[1]&&e[1]<=this._terminal.rows?e[1]:this._terminal.rows)-1,this._terminal.x=0,this._terminal.y=0)},e.prototype.saveCursor=function(e){this._terminal.savedX=this._terminal.x,this._terminal.savedY=this._terminal.y},e.prototype.restoreCursor=function(e){this._terminal.x=this._terminal.savedX||0,this._terminal.y=this._terminal.savedY||0},e}();t.InputHandler=s;var n=function(e){function t(e){var t,r=0,o=i.length-1;if(ei[o][1])return!1;for(;o>=r;)if(t=Math.floor((r+o)/2),e>i[t][1])r=t+1;else{if(!(e=4352&&(e<=4447||9001===e||9002===e||e>=11904&&e<=42191&&12351!==e||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141)}var i=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];return function(i){return 0===i?e.nul:i<32||i>=127&&i<160?e.control:t(i)?0:r(i)?2:1}}({nul:0,control:0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=new RegExp("(?:^|[^\\da-z\\.-]+)((https?:\\/\\/)((([\\da-z\\.-]+)\\.([a-z\\.]{2,6}))|((\\d{1,3}\\.){3}\\d{1,3})|(localhost))(:\\d{1,5})?(\\/[\\/\\w\\.\\-%~]*)*(\\?[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?(#[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?)($|[^\\/\\w\\.\\-%]+)"),o=0,s=function(){function e(){this._nextLinkMatcherId=o,this._rowTimeoutIds=[],this._linkMatchers=[],this.registerLinkMatcher(i,null,{matchIndex:1})}return e.prototype.attachToDom=function(e,t){this._document=e,this._rows=t},e.prototype.linkifyRow=function(t){if(this._document){var r=this._rowTimeoutIds[t];r&&clearTimeout(r),this._rowTimeoutIds[t]=setTimeout(this._linkifyRow.bind(this,t),e.TIME_BEFORE_LINKIFY)}},e.prototype.setHypertextLinkHandler=function(e){this._linkMatchers[o].handler=e},e.prototype.setHypertextValidationCallback=function(e){this._linkMatchers[o].validationCallback=e},e.prototype.registerLinkMatcher=function(e,t,r){if(void 0===r&&(r={}),this._nextLinkMatcherId!==o&&!t)throw new Error("handler must be defined");var i={id:this._nextLinkMatcherId++,regex:e,handler:t,matchIndex:r.matchIndex,validationCallback:r.validationCallback,priority:r.priority||0};return this._addLinkMatcherToList(i),i.id},e.prototype._addLinkMatcherToList=function(e){if(0!==this._linkMatchers.length){for(var t=this._linkMatchers.length-1;t>=0;t--)if(e.priority<=this._linkMatchers[t].priority)return void this._linkMatchers.splice(t+1,0,e);this._linkMatchers.splice(0,0,e)}else this._linkMatchers.push(e)},e.prototype.deregisterLinkMatcher=function(e){for(var t=1;t0){if(i.validationCallback)for(var s=function(e){var t=o[e];i.validationCallback(t.textContent,t,function(e){e||t.classList.add("xterm-invalid-link")})},n=0;n=0){var p=this._createAnchorElement(a,t.handler,i);if(c.textContent.length===a.length)if(3===c.nodeType)this._replaceNode(c,p);else{var d=c;if("A"===d.nodeName)return r;d.innerHTML="",d.appendChild(p)}else if(c.childNodes.length>1)for(var f=0;f"]=function(e){return e.setPrefix(">")},a["!"]=function(e){return e.setPrefix("!")},a[0]=function(e){return e.setParam(10*e.getParam())},a[1]=function(e){return e.setParam(10*e.getParam()+1)},a[2]=function(e){return e.setParam(10*e.getParam()+2)},a[3]=function(e){return e.setParam(10*e.getParam()+3)},a[4]=function(e){return e.setParam(10*e.getParam()+4)},a[5]=function(e){return e.setParam(10*e.getParam()+5)},a[6]=function(e){return e.setParam(10*e.getParam()+6)},a[7]=function(e){return e.setParam(10*e.getParam()+7)},a[8]=function(e){return e.setParam(10*e.getParam()+8)},a[9]=function(e){return e.setParam(10*e.getParam()+9)},a.$=function(e){return e.setPostfix("$")},a['"']=function(e){return e.setPostfix('"')},a[" "]=function(e){return e.setPostfix(" ")},a["'"]=function(e){return e.setPostfix("'")},a[";"]=function(e){return e.finalizeParam()},a[i.C0.CAN]=function(e){return e.setState(h.NORMAL)};var l={};l["@"]=function(e,t,r){return e.insertChars(t)},l.A=function(e,t,r){return e.cursorUp(t)},l.B=function(e,t,r){return e.cursorDown(t)},l.C=function(e,t,r){return e.cursorForward(t)},l.D=function(e,t,r){return e.cursorBackward(t)},l.E=function(e,t,r){return e.cursorNextLine(t)},l.F=function(e,t,r){return e.cursorPrecedingLine(t)},l.G=function(e,t,r){return e.cursorCharAbsolute(t)},l.H=function(e,t,r){return e.cursorPosition(t)},l.I=function(e,t,r){return e.cursorForwardTab(t)},l.J=function(e,t,r){return e.eraseInDisplay(t)},l.K=function(e,t,r){return e.eraseInLine(t)},l.L=function(e,t,r){return e.insertLines(t)},l.M=function(e,t,r){return e.deleteLines(t)},l.P=function(e,t,r){return e.deleteChars(t)},l.S=function(e,t,r){return e.scrollUp(t)},l.T=function(e,t,r){t.length<2&&!r&&e.scrollDown(t)},l.X=function(e,t,r){return e.eraseChars(t)},l.Z=function(e,t,r){return e.cursorBackwardTab(t)},l["`"]=function(e,t,r){return e.charPosAbsolute(t)},l.a=function(e,t,r){return e.HPositionRelative(t)},l.b=function(e,t,r){return e.repeatPrecedingCharacter(t)},l.c=function(e,t,r){return e.sendDeviceAttributes(t)},l.d=function(e,t,r){return e.linePosAbsolute(t)},l.e=function(e,t,r){return e.VPositionRelative(t)},l.f=function(e,t,r){return e.HVPosition(t)},l.g=function(e,t,r){return e.tabClear(t)},l.h=function(e,t,r){return e.setMode(t)},l.l=function(e,t,r){return e.resetMode(t)},l.m=function(e,t,r){return e.charAttributes(t)},l.n=function(e,t,r){return e.deviceStatus(t)},l.p=function(e,t,r){switch(r){case"!":e.softReset(t)}},l.q=function(e,t,r,i){" "===i&&e.setCursorStyle(t)},l.r=function(e,t){return e.setScrollRegion(t)},l.s=function(e,t){return e.saveCursor(t)},l.u=function(e,t){return e.restoreCursor(t)},l[i.C0.CAN]=function(e,t,r,i,o){return o.setState(h.NORMAL)};var h;!function(e){e[e.NORMAL=0]="NORMAL",e[e.ESCAPED=1]="ESCAPED",e[e.CSI_PARAM=2]="CSI_PARAM",e[e.CSI=3]="CSI",e[e.OSC=4]="OSC",e[e.CHARSET=5]="CHARSET",e[e.DCS=6]="DCS",e[e.IGNORE=7]="IGNORE"}(h||(h={}));var c=function(){function e(e,t){this._inputHandler=e,this._terminal=t,this._state=h.NORMAL}return e.prototype.parse=function(e){var t,r,c,u,p=e.length;for(this._position=0,this._terminal.surrogate_high&&(e=this._terminal.surrogate_high+e,this._terminal.surrogate_high="");this._position":this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea(),this._state=h.NORMAL;break;default:this._state=h.NORMAL,this._terminal.error("Unknown ESC control: %s.",r)}break;case h.CHARSET:r in o.CHARSETS?(t=o.CHARSETS[r],"/"===r&&this.skipNextChar()):t=o.DEFAULT_CHARSET,this._terminal.setgCharset(this._terminal.gcharset,t),this._terminal.gcharset=null,this._state=h.NORMAL;break;case h.OSC:if(r===i.C0.ESC||r===i.C0.BEL){switch(r===i.C0.ESC&&this._position++,this._terminal.params.push(this._terminal.currentParam),this._terminal.params[0]){case 0:case 1:case 2:this._terminal.params[1]&&(this._terminal.title=this._terminal.params[1],this._terminal.handleTitle(this._terminal.title))}this._terminal.params=[],this._terminal.currentParam=0,this._state=h.NORMAL}else this._terminal.params.length?this._terminal.currentParam+=r:r>="0"&&r<="9"?this._terminal.currentParam=10*this._terminal.currentParam+r.charCodeAt(0)-48:";"===r&&(this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam="");break;case h.CSI_PARAM:if(r in a){a[r](this);break}this.finalizeParam(),this._state=h.CSI;case h.CSI:r in l?l[r](this._inputHandler,this._terminal.params,this._terminal.prefix,this._terminal.postfix,this):this._terminal.error("Unknown CSI code: %s.",r),this._state=h.NORMAL,this._terminal.prefix="",this._terminal.postfix="";break;case h.DCS:if(r===i.C0.ESC||r===i.C0.BEL){r===i.C0.ESC&&this._position++;var d=void 0,f=void 0;switch(this._terminal.prefix){case"":break;case"$q":switch(d=this._terminal.currentParam,f=!1,d){case'"q':d='0"q';break;case'"p':d='61"p';break;case"r":d=this._terminal.scrollTop+1+";"+(this._terminal.scrollBottom+1)+"r";break;case"m":d="0m";break;default:this._terminal.error("Unknown DCS Pt: %s.",d),d=""}this._terminal.send(i.C0.ESC+"P"+ +f+"$r"+d+i.C0.ESC+"\\");break;case"+p":break;case"+q":d=this._terminal.currentParam,f=!1,this._terminal.send(i.C0.ESC+"P"+ +f+"+r"+d+i.C0.ESC+"\\");break;default:this._terminal.error("Unknown DCS prefix: %s.",this._terminal.prefix)}this._terminal.currentParam=0,this._terminal.prefix="",this._state=h.NORMAL}else this._terminal.currentParam?this._terminal.currentParam+=r:this._terminal.prefix||"$"===r||"+"===r?2===this._terminal.prefix.length?this._terminal.currentParam=r:this._terminal.prefix+=r:this._terminal.currentParam=r;break;case h.IGNORE:r!==i.C0.ESC&&r!==i.C0.BEL||(r===i.C0.ESC&&this._position++,this._state=h.NORMAL)}}return this._state},e.prototype.setState=function(e){this._state=e},e.prototype.setPrefix=function(e){this._terminal.prefix=e},e.prototype.setPostfix=function(e){this._terminal.postfix=e},e.prototype.setParam=function(e){this._terminal.currentParam=e},e.prototype.getParam=function(){return this._terminal.currentParam},e.prototype.finalizeParam=function(){this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam=0},e.prototype.skipNextChar=function(){this._position++},e}();t.Parser=c},function(e,t,r){"use strict";function i(e){var t=e.ownerDocument.createElement("span");t.innerHTML="hello world",e.appendChild(t);var r=t.offsetWidth,i=t.offsetHeight;t.style.fontWeight="bold";var o=t.offsetWidth,s=t.offsetHeight;return e.removeChild(t),r!==o||i!==s}Object.defineProperty(t,"__esModule",{value:!0});var o,s=r(26);!function(e){e[e.BOLD=1]="BOLD",e[e.UNDERLINE=2]="UNDERLINE",e[e.BLINK=4]="BLINK",e[e.INVERSE=8]="INVERSE",e[e.INVISIBLE=16]="INVISIBLE"}(o||(o={}));var n=null,a=function(){function e(e){this._terminal=e,this._refreshRowsQueue=[],this._refreshFramesSkipped=0,this._refreshAnimationFrame=null,this._spanElementObjectPool=new s.DomElementObjectPool("span"),null===n&&(n=i(this._terminal.element)),this._spanElementObjectPool=new s.DomElementObjectPool("span")}return e.prototype.queueRefresh=function(e,t){this._refreshRowsQueue.push({start:e,end:t}),this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this)))},e.prototype._refreshLoop=function(){if(this._terminal.writeBuffer.length>0&&this._refreshFramesSkipped++<=5)this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this));else{this._refreshFramesSkipped=0;var e,t;if(this._refreshRowsQueue.length>4)e=0,t=this._terminal.rows-1;else{e=this._refreshRowsQueue[0].start,t=this._refreshRowsQueue[0].end;for(var r=1;rt&&(t=this._refreshRowsQueue[r].end)}this._refreshRowsQueue=[],this._refreshAnimationFrame=null,this._refresh(e,t)}},e.prototype._refresh=function(e,t){var r;t-e>=this._terminal.rows/2&&(r=this._terminal.element.parentNode)&&this._terminal.element.removeChild(this._terminal.rowContainer);var i=this._terminal.cols,s=e;for(t>=this._terminal.rows&&(this._terminal.log("`end` is too large. Most likely a bad CSR."),t=this._terminal.rows-1);s<=t;s++){var a=s+this._terminal.ydisp,l=this._terminal.lines.get(a),h=void 0;h=this._terminal.y===s-(this._terminal.ybase-this._terminal.ydisp)&&this._terminal.cursorState&&!this._terminal.cursorHidden?this._terminal.x:-1;for(var c=this._terminal.defAttr,u=document.createDocumentFragment(),p="",d=void 0;this._terminal.children[s].children.length;){var f=this._terminal.children[s].children[0];this._terminal.children[s].removeChild(f),this._spanElementObjectPool.release(f)}for(var g=0;g>9&511,w=m>>18;if(w&o.BOLD&&(n||d.classList.add("xterm-bold"),C<8&&(C+=8)),w&o.UNDERLINE&&d.classList.add("xterm-underline"),w&o.BLINK&&d.classList.add("xterm-blink"),w&o.INVERSE){var S=_;_=C,C=S,1&w&&C<8&&(C+=8)}w&o.INVISIBLE&&d.classList.add("xterm-hidden"),w&o.INVERSE&&(257===_&&(_=15),256===C&&(C=0)),_<256&&d.classList.add("xterm-bg-color-"+_),C<256&&d.classList.add("xterm-color-"+C)}if(2===b)p+=''+y+"";else if(y.charCodeAt(0)>255)p+=''+y+"";else switch(y){case"&":p+="&";break;case"<":p+="<";break;case">":p+=">";break;default:p+=y<=" "?" ":y}c=m}}p&&!d&&(d=this._spanElementObjectPool.acquire()),d&&(p&&(d.innerHTML=p,p=""),u.appendChild(d),d=null),this._terminal.children[s].appendChild(u)}r&&this._terminal.element.appendChild(this._terminal.rowContainer),this._terminal.emit("refresh",{element:this._terminal.element,start:e,end:t})},e.prototype.refreshSelection=function(e,t){for(;this._terminal.selectionContainer.children.length;)this._terminal.selectionContainer.removeChild(this._terminal.selectionContainer.children[0]);if(e&&t){var r=e[1]-this._terminal.ydisp,i=t[1]-this._terminal.ydisp,o=Math.max(r,0),s=Math.min(i,this._terminal.rows-1);if(!(o>=this._terminal.rows||s<0)){var n=document.createDocumentFragment(),a=r===o?e[0]:0,l=o===s?t[0]:this._terminal.cols;n.appendChild(this._createSelectionElement(o,a,l));var h=s-o-1;if(n.appendChild(this._createSelectionElement(o+1,0,this._terminal.cols,h)),o!==s){var c=i===s?t[0]:this._terminal.cols;n.appendChild(this._createSelectionElement(s,0,c))}this._terminal.selectionContainer.appendChild(n)}}},e.prototype._createSelectionElement=function(e,t,r,i){void 0===i&&(i=1);var o=document.createElement("div");return o.style.height=i*this._terminal.charMeasure.height+"px",o.style.top=e*this._terminal.charMeasure.height+"px",o.style.left=t*this._terminal.charMeasure.width+"px",o.style.width=this._terminal.charMeasure.width*(r-t)+"px",o},e}();t.Renderer=a},function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o,s=r(9),n=r(8),a=r(1),l=r(21),h=String.fromCharCode(160),c=new RegExp(h,"g");!function(e){e[e.NORMAL=0]="NORMAL",e[e.WORD=1]="WORD",e[e.LINE=2]="LINE"}(o||(o={}));var u=function(e){function t(t,r,i,s){var n=e.call(this)||this;return n._terminal=t,n._buffer=r,n._rowContainer=i,n._charMeasure=s,n._initListeners(),n.enable(),n._model=new l.SelectionModel(t),n._lastMouseDownTime=0,n._activeSelectionMode=o.NORMAL,n}return i(t,e),t.prototype._initListeners=function(){var e=this;this._bufferTrimListener=function(t){return e._onTrim(t)},this._mouseMoveListener=function(t){return e._onMouseMove(t)},this._mouseDownListener=function(t){return e._onMouseDown(t)},this._mouseUpListener=function(t){return e._onMouseUp(t)}},t.prototype.disable=function(){this.clearSelection(),this._buffer.off("trim",this._bufferTrimListener),this._rowContainer.removeEventListener("mousedown",this._mouseDownListener)},t.prototype.enable=function(){this._buffer.on("trim",this._bufferTrimListener),this._rowContainer.addEventListener("mousedown",this._mouseDownListener)},t.prototype.setBuffer=function(e){this._buffer=e,this.clearSelection()},Object.defineProperty(t.prototype,"hasSelection",{get:function(){var e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!(!e||!t)&&(e[0]!==t[0]||e[1]!==t[1])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectionText",{get:function(){var e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";var r=e[1]===t[1]?t[0]:null,i=[];i.push(this._translateBufferLineToString(this._buffer.get(e[1]),!0,e[0],r));for(var o=e[1]+1;o<=t[1]-1;o++){var s=this._buffer.get(o),a=this._translateBufferLineToString(s,!0);s.isWrapped?i[i.length-1]+=a:i.push(a)}if(e[1]!==t[1]){var s=this._buffer.get(t[1]),a=this._translateBufferLineToString(s,!0,0,t[0]);s.isWrapped?i[i.length-1]+=a:i.push(a)}return i.map(function(e){return e.replace(c," ")}).join(n.isMSWindows?"\r\n":"\n")},enumerable:!0,configurable:!0}),t.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh()},t.prototype._translateBufferLineToString=function(e,t,r,i){void 0===r&&(r=0),void 0===i&&(i=null);for(var o="",s=r,n=i,a=0;a=a&&s--,i>=a&&n--)}var h=n||e.length;if(t){var c=o.search(/\s+$/);if(-1!==c&&(h=Math.min(h,c)),h<=s)return""}return o.substring(s,h)},t.prototype.refresh=function(e){var t=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return t._refresh()})),n.isLinux&&e&&this.selectionText.length&&this.emit("newselection",this.selectionText)},t.prototype._refresh=function(){this._refreshAnimationFrame=null,this.emit("refresh",{start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd})},t.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh()},t.prototype._onTrim=function(e){this._model.onTrim(e)&&this.refresh()},t.prototype._getMouseBufferCoords=function(e){var t=s.getCoords(e,this._rowContainer,this._charMeasure,this._terminal.cols,this._terminal.rows,!0);return t[0]--,t[1]--,t[1]+=this._terminal.ydisp,t},t.prototype._getMouseEventScrollAmount=function(e){var t=s.getCoordsRelativeToElement(e,this._rowContainer)[1],r=this._terminal.rows*this._charMeasure.height;return t>=0&&t<=r?0:(t>r&&(t-=r),t=Math.min(Math.max(t,-50),50),(t/=50)/Math.abs(t)+Math.round(14*t))},t.prototype._onMouseDown=function(e){0===e.button&&(e.preventDefault(),this._dragScrollAmount=0,this._setMouseClickCount(e),e.shiftKey?this._onShiftClick(e):1===this._clickCount?this._onSingleClick(e):2===this._clickCount?this._onDoubleClick(e):3===this._clickCount&&this._onTripleClick(e),this._addMouseDownListeners(),this.refresh(!0))},t.prototype._addMouseDownListeners=function(){var e=this;this._rowContainer.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._rowContainer.ownerDocument.addEventListener("mouseup",this._mouseUpListener),this._dragScrollIntervalTimer=setInterval(function(){return e._dragScroll()},50)},t.prototype._removeMouseDownListeners=function(){this._rowContainer.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._rowContainer.ownerDocument.removeEventListener("mouseup",this._mouseUpListener),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=null},t.prototype._onShiftClick=function(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))},t.prototype._onSingleClick=function(e){this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=o.NORMAL,this._model.selectionStart=this._getMouseBufferCoords(e),this._model.selectionStart&&(this._model.selectionEnd=null,0===this._buffer.get(this._model.selectionStart[1])[this._model.selectionStart[0]][2]&&this._model.selectionStart[0]++)},t.prototype._onDoubleClick=function(e){var t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=o.WORD,this._selectWordAt(t))},t.prototype._onTripleClick=function(e){var t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=o.LINE,this._selectLineAt(t[1]))},t.prototype._setMouseClickCount=function(e){var t=(new Date).getTime();(t-this._lastMouseDownTime>400||this._distanceFromLastMousePosition(e)>10)&&(this._clickCount=0),this._lastMouseDownTime=t,this._lastMousePosition=[e.pageX,e.pageY],this._clickCount++},t.prototype._distanceFromLastMousePosition=function(e){return Math.max(Math.abs(this._lastMousePosition[0]-e.pageX),Math.abs(this._lastMousePosition[1]-e.pageY))},t.prototype._onMouseMove=function(e){var t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),this._activeSelectionMode===o.LINE?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._terminal.cols-1:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]0?this._model.selectionEnd=[this._terminal.cols-1,this._terminal.ydisp+this._terminal.rows]:this._model.selectionEnd=[0,this._terminal.ydisp],this.refresh())},t.prototype._onMouseUp=function(e){this._removeMouseDownListeners()},t.prototype._convertViewportColToCharacterIndex=function(e,t){for(var r=t[0],i=0;t[0]>=i;i++)0===e[i][2]&&r--;return r},t.prototype._getWordAt=function(e){var t=this._buffer.get(e[1]),r=this._translateBufferLineToString(t,!1),i=this._convertViewportColToCharacterIndex(t,e),o=i,s=e[0]-o,n=0,a=0;if(" "===r.charAt(o)){for(;o>0&&" "===r.charAt(o-1);)o--;for(;i0&&!this._isCharWordSeparator(r.charAt(o-1));)0===t[l-1][2]&&(n++,l--),o--,l--;for(;i+1=0},t.prototype._selectLineAt=function(e){this._model.selectionStart=[0,e],this._model.selectionStartLength=this._terminal.cols},t}(a.EventEmitter);t.SelectionManager=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this._terminal=e,this.clearSelection()}return e.prototype.clearSelection=function(){this.selectionStart=null,this.selectionEnd=null,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(e.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"finalSelectionEnd",{get:function(){return this.isSelectAllActive?[this._terminal.cols,this._terminal.ybase+this._terminal.rows-1]:this.selectionStart?!this.selectionEnd||this.areSelectionValuesReversed()?[this.selectionStart[0]+this.selectionStartLength,this.selectionStart[1]]:this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd:null},enumerable:!0,configurable:!0}),e.prototype.areSelectionValuesReversed=function(){var e=this.selectionStart,t=this.selectionEnd;return e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]},e.prototype.onTrim=function(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},e}();t.SelectionModel=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,r,i){var o=this;this.terminal=e,this.viewportElement=t,this.scrollArea=r,this.charMeasure=i,this.currentRowHeight=0,this.lastRecordedBufferLength=0,this.lastRecordedViewportHeight=0,this.terminal.on("scroll",this.syncScrollArea.bind(this)),this.terminal.on("resize",this.syncScrollArea.bind(this)),this.viewportElement.addEventListener("scroll",this.onScroll.bind(this)),setTimeout(function(){return o.syncScrollArea()},0)}return e.prototype.refresh=function(){if(this.charMeasure.height>0){var e=this.charMeasure.height!==this.currentRowHeight;e&&(this.currentRowHeight=this.charMeasure.height,this.viewportElement.style.lineHeight=this.charMeasure.height+"px",this.terminal.rowContainer.style.lineHeight=this.charMeasure.height+"px");var t=this.lastRecordedViewportHeight!==this.terminal.rows;(e||t)&&(this.lastRecordedViewportHeight=this.terminal.rows,this.viewportElement.style.height=this.charMeasure.height*this.terminal.rows+"px",this.terminal.selectionContainer.style.height=this.viewportElement.style.height),this.scrollArea.style.height=this.charMeasure.height*this.lastRecordedBufferLength+"px"}},e.prototype.syncScrollArea=function(){this.lastRecordedBufferLength!==this.terminal.lines.length?(this.lastRecordedBufferLength=this.terminal.lines.length,this.refresh()):this.lastRecordedViewportHeight!==this.terminal.rows?this.refresh():this.charMeasure.height!==this.currentRowHeight&&this.refresh();var e=this.terminal.ydisp*this.currentRowHeight;this.viewportElement.scrollTop!==e&&(this.viewportElement.scrollTop=e)},e.prototype.onScroll=function(e){var t=Math.round(this.viewportElement.scrollTop/this.currentRowHeight)-this.terminal.ydisp;this.terminal.scrollDisp(t,!0)},e.prototype.onWheel=function(e){if(0!==e.deltaY){var t=1;e.deltaMode===WheelEvent.DOM_DELTA_LINE?t=this.currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t=this.currentRowHeight*this.terminal.rows),this.viewportElement.scrollTop+=e.deltaY*t,e.preventDefault()}},e.prototype.onTouchStart=function(e){this.lastTouchY=e.touches[0].pageY},e.prototype.onTouchMove=function(e){var t=this.lastTouchY-e.touches[0].pageY;this.lastTouchY=e.touches[0].pageY,0!==t&&(this.viewportElement.scrollTop+=t,e.preventDefault())},e}();t.Viewport=i},function(e,t,r){"use strict";function i(e,t){return t?e.replace(/\r?\n/g,"\r"):e}function o(e,t){t.style.position="fixed",t.style.width="20px",t.style.height="20px",t.style.left=e.clientX-10+"px",t.style.top=e.clientY-10+"px",t.style.zIndex="1000",t.focus(),setTimeout(function(){t.style.position=null,t.style.width=null,t.style.height=null,t.style.left=null,t.style.top=null,t.style.zIndex=null},4)}Object.defineProperty(t,"__esModule",{value:!0}),t.prepareTextForTerminal=i,t.copyHandler=function(e,t,r){t.browser.isMSIE?window.clipboardData.setData("Text",r.selectionText):e.clipboardData.setData("text/plain",r.selectionText),e.preventDefault()},t.pasteHandler=function(e,t){e.stopPropagation();var r=function(r){return r=i(r,t.browser.isMSWindows),t.handler(r),t.textarea.value="",t.emit("paste",r),t.cancel(e)};t.browser.isMSIE?window.clipboardData&&r(window.clipboardData.getData("Text")):e.clipboardData&&r(e.clipboardData.getData("text/plain"))},t.moveTextAreaUnderMouseCursor=o,t.rightClickHandler=function(e,t,r){o(e,t),t.value=r.selectionText,t.select()}},function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,r){var i=e.call(this)||this;return i._document=t,i._parentElement=r,i}return i(t,e),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),t.prototype.measure=function(){var e=this;this._measureElement?this._doMeasure():(this._measureElement=this._document.createElement("span"),this._measureElement.style.position="absolute",this._measureElement.style.top="0",this._measureElement.style.left="-9999em",this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement),setTimeout(function(){return e._doMeasure()},0))},t.prototype._doMeasure=function(){var e=this._measureElement.getBoundingClientRect();0!==e.width&&0!==e.height&&(this._width===e.width&&this._height===e.height||(this._width=e.width,this._height=e.height,this.emit("charsizechanged")))},t}(r(1).EventEmitter);t.CharMeasure=o},function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var r=e.call(this)||this;return r._array=new Array(t),r._startIndex=0,r._length=0,r}return i(t,e),Object.defineProperty(t.prototype,"maxLength",{get:function(){return this._array.length},set:function(e){for(var t=new Array(e),r=0;rthis._length)for(var t=this._length;t=e;o--)this._array[this._getCyclicIndex(o+r.length)]=this._array[this._getCyclicIndex(o)];for(var o=0;othis.maxLength){var s=this._length+r.length-this.maxLength;this._startIndex+=s,this._length=this.maxLength,this.emit("trim",s)}else this._length+=r.length}},t.prototype.trimStart=function(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.emit("trim",e)},t.prototype.shiftElements=function(e,t,r){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+r<0)throw new Error("Cannot shift elements in list beyond index 0");if(r>0){for(o=t-1;o>=0;o--)this.set(e+o+r,this.get(e+o));var i=e+t+r-this._length;if(i>0)for(this._length+=i;this._length>this.maxLength;)this._length--,this._startIndex++,this.emit("trim",1)}else for(var o=0;o=0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(10),o=r(13),s=r(12),n=r(11),a=document.getElementById("terminal");if(null!==a){var l;l="hterm"==gotty_term?new i.Hterm(a):new o.Xterm(a);var h=("https:"==window.location.protocol?"wss://":"ws://")+window.location.host+window.location.pathname+"ws",c=window.location.search,u=new n.ConnectionFactory(h,s.protocols),p=new s.WebTTY(l,u,c,gotty_auth_token).open();window.addEventListener("unload",function(){p(),l.close()})}},function(e,t,r){function i(e){return r(o(e))}function o(e){var t=s[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}var s={"./attach/attach":4,"./attach/attach.js":4,"./attach/package.json":30,"./fit/fit":5,"./fit/fit.js":5,"./fit/package.json":31,"./fullscreen/fullscreen":6,"./fullscreen/fullscreen.css":32,"./fullscreen/fullscreen.js":6,"./fullscreen/package.json":33,"./terminado/package.json":34,"./terminado/terminado":7,"./terminado/terminado.js":7};i.keys=function(){return Object.keys(s)},i.resolve=o,e.exports=i,i.id=29},function(e,t){e.exports={name:"xterm.attach",main:"attach.js",private:!0}},function(e,t){e.exports={name:"xterm.fit",main:"fit.js",private:!0}},function(e,t){throw new Error("Module parse failed: /home/yudai/archive/products/2015/gotty/src/github.com/yudai/gotty/js/node_modules/xterm/lib/addons/fullscreen/fullscreen.css Unexpected token (1:0)\nYou may need an appropriate loader to handle this file type.\n| .xterm.fullscreen {\n| position: fixed;\n| top: 0;")},function(e,t){e.exports={name:"xterm.fullscreen",main:"fullscreen.js",private:!0}},function(e,t){e.exports={name:"xterm.terminado",main:"terminado.js",private:!0}}]);