From c9a82bd2e85d5a552e108cb3cc491c15d4eeec9c Mon Sep 17 00:00:00 2001 From: Bill Church <wmchurch@gmail.com> Date: Mon, 30 Jul 2018 09:54:36 -0400 Subject: [PATCH] reauth feature fixes #75 and potentially #51 thanks to both @vbeskrovny and @vvalchev --- client/public/webssh2.bundle.js | 2 +- client/public/webssh2.css | 2 +- client/src/css/style.css | 6 ++---- client/src/js/index.js | 22 +++++++++++++++++++++- config.json | 3 ++- package.json | 5 +++-- server/app.js | 15 ++++----------- server/socket.js | 4 ++-- 8 files changed, 36 insertions(+), 23 deletions(-) diff --git a/client/public/webssh2.bundle.js b/client/public/webssh2.bundle.js index b2362ee3..ce529acb 100644 --- a/client/public/webssh2.bundle.js +++ b/client/public/webssh2.bundle.js @@ -1 +1 @@ -!function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=29)}([function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){(function(r){function n(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=i(48)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var i=this.useColors;if(t[0]=(i?"%c":"")+this.namespace+(i?" %c":" ")+t[0]+(i?"%c ":" ")+"+"+e.humanize(this.diff),i){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,s=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(s=++n)}),t.splice(s,0,r)}},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=n,e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(n())}).call(this,i(49))},function(t,e,i){(function(t){var r,n=i(41),s=i(17),o=i(40),a=i(39),l=i(38);t&&t.ArrayBuffer&&(r=i(36));var c="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),h="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),u=c||h;e.protocol=3;var f=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},p=n(f),d={type:"error",data:"parser error"},_=i(35);function m(t,e,i){for(var r=new Array(t.length),n=a(t.length,i),s=function(t,i,n){e(i,function(e,i){r[t]=i,n(e,r)})},o=0;o<t.length;o++)s(o,t[o],n)}e.encodePacket=function(i,r,n,s){"function"==typeof r&&(s=r,r=!1),"function"==typeof n&&(s=n,n=null);var o=void 0===i.data?void 0:i.data.buffer||i.data;if(t.ArrayBuffer&&o instanceof ArrayBuffer)return function(t,i,r){if(!i)return e.encodeBase64Packet(t,r);var n=t.data,s=new Uint8Array(n),o=new Uint8Array(1+n.byteLength);o[0]=f[t.type];for(var a=0;a<s.length;a++)o[a+1]=s[a];return r(o.buffer)}(i,r,s);if(_&&o instanceof t.Blob)return function(t,i,r){if(!i)return e.encodeBase64Packet(t,r);if(u)return function(t,i,r){if(!i)return e.encodeBase64Packet(t,r);var n=new FileReader;return n.onload=function(){t.data=n.result,e.encodePacket(t,i,!0,r)},n.readAsArrayBuffer(t.data)}(t,i,r);var n=new Uint8Array(1);return n[0]=f[t.type],r(new _([n.buffer,t.data]))}(i,r,s);if(o&&o.base64)return function(t,i){return s("b"+e.packets[t.type]+t.data.data)}(i);var a=f[i.type];return void 0!==i.data&&(a+=n?l.encode(String(i.data),{strict:!1}):String(i.data)),s(""+a)},e.encodeBase64Packet=function(i,r){var n,s="b"+e.packets[i.type];if(_&&i.data instanceof t.Blob){var o=new FileReader;return o.onload=function(){var t=o.result.split(",")[1];r(s+t)},o.readAsDataURL(i.data)}try{n=String.fromCharCode.apply(null,new Uint8Array(i.data))}catch(t){for(var a=new Uint8Array(i.data),l=new Array(a.length),c=0;c<a.length;c++)l[c]=a[c];n=String.fromCharCode.apply(null,l)}return s+=t.btoa(n),r(s)},e.decodePacket=function(t,i,r){if(void 0===t)return d;if("string"==typeof t){if("b"===t.charAt(0))return e.decodeBase64Packet(t.substr(1),i);if(r&&!1===(t=function(t){try{t=l.decode(t,{strict:!1})}catch(t){return!1}return t}(t)))return d;var n=t.charAt(0);return Number(n)==n&&p[n]?t.length>1?{type:p[n],data:t.substring(1)}:{type:p[n]}:d}n=new Uint8Array(t)[0];var s=o(t,1);return _&&"blob"===i&&(s=new _([s])),{type:p[n],data:s}},e.decodeBase64Packet=function(t,e){var i=p[t.charAt(0)];if(!r)return{type:i,data:{base64:!0,data:t.substr(1)}};var n=r.decode(t.substr(1));return"blob"===e&&_&&(n=new _([n])),{type:i,data:n}},e.encodePayload=function(t,i,r){"function"==typeof i&&(r=i,i=null);var n=s(t);return i&&n?_&&!u?e.encodePayloadAsBlob(t,r):e.encodePayloadAsArrayBuffer(t,r):t.length?void m(t,function(t,r){e.encodePacket(t,!!n&&i,!1,function(t){r(null,function(t){return t.length+":"+t}(t))})},function(t,e){return r(e.join(""))}):r("0:")},e.decodePayload=function(t,i,r){if("string"!=typeof t)return e.decodePayloadAsBinary(t,i,r);var n;if("function"==typeof i&&(r=i,i=null),""===t)return r(d,0,1);for(var s,o,a="",l=0,c=t.length;l<c;l++){var h=t.charAt(l);if(":"===h){if(""===a||a!=(s=Number(a)))return r(d,0,1);if(a!=(o=t.substr(l+1,s)).length)return r(d,0,1);if(o.length){if(n=e.decodePacket(o,i,!1),d.type===n.type&&d.data===n.data)return r(d,0,1);if(!1===r(n,l+s,c))return}l+=s,a=""}else a+=h}return""!==a?r(d,0,1):void 0},e.encodePayloadAsArrayBuffer=function(t,i){if(!t.length)return i(new ArrayBuffer(0));m(t,function(t,i){e.encodePacket(t,!0,!0,function(t){return i(null,t)})},function(t,e){var r=e.reduce(function(t,e){var i;return t+(i="string"==typeof e?e.length:e.byteLength).toString().length+i+2},0),n=new Uint8Array(r),s=0;return e.forEach(function(t){var e="string"==typeof t,i=t;if(e){for(var r=new Uint8Array(t.length),o=0;o<t.length;o++)r[o]=t.charCodeAt(o);i=r.buffer}n[s++]=e?0:1;var a=i.byteLength.toString();for(o=0;o<a.length;o++)n[s++]=parseInt(a[o]);for(n[s++]=255,r=new Uint8Array(i),o=0;o<r.length;o++)n[s++]=r[o]}),i(n.buffer)})},e.encodePayloadAsBlob=function(t,i){m(t,function(t,i){e.encodePacket(t,!0,!0,function(t){var e=new Uint8Array(1);if(e[0]=1,"string"==typeof t){for(var r=new Uint8Array(t.length),n=0;n<t.length;n++)r[n]=t.charCodeAt(n);t=r.buffer,e[0]=0}var s=(t instanceof ArrayBuffer?t.byteLength:t.size).toString(),o=new Uint8Array(s.length+1);for(n=0;n<s.length;n++)o[n]=parseInt(s[n]);if(o[s.length]=255,_){var a=new _([e.buffer,o.buffer,t]);i(null,a)}})},function(t,e){return i(new _(e))})},e.decodePayloadAsBinary=function(t,i,r){"function"==typeof i&&(r=i,i=null);for(var n=t,s=[];n.byteLength>0;){for(var a=new Uint8Array(n),l=0===a[0],c="",h=1;255!==a[h];h++){if(c.length>310)return r(d,0,1);c+=a[h]}n=o(n,2+c.length),c=parseInt(c);var u=o(n,0,c);if(l)try{u=String.fromCharCode.apply(null,new Uint8Array(u))}catch(t){var f=new Uint8Array(u);for(u="",h=0;h<f.length;h++)u+=String.fromCharCode(f[h])}s.push(u),n=o(n,c)}var p=s.length;s.forEach(function(t,n){r(e.decodePacket(t,i,!0),n,p)})}}).call(this,i(0))},function(t,e,i){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var n=0;n<r.length;n++)if((i=r[n])===e||i.fn===e){r.splice(n,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),i=this._callbacks["$"+t];if(i)for(var r=0,n=(i=i.slice(0)).length;r<n;++r)i[r].apply(this,e);return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){t.exports=function(t,e){var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}},function(t,e){e.encode=function(t){var e="";for(var i in t)t.hasOwnProperty(i)&&(e.length&&(e+="&"),e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return e},e.decode=function(t){for(var e={},i=t.split("&"),r=0,n=i.length;r<n;r++){var s=i[r].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}},function(t,e,i){var r=i(2),n=i(3);function s(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.forceNode=t.forceNode,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}t.exports=s,n(s.prototype),s.prototype.onError=function(t,e){var i=new Error(t);return i.type="TransportError",i.description=e,this.emit("error",i),this},s.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},s.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},s.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},s.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},s.prototype.onData=function(t){var e=r.decodePacket(t,this.socket.binaryType);this.onPacket(e)},s.prototype.onPacket=function(t){this.emit("packet",t)},s.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(t,e,i){(function(e){var r=i(43);t.exports=function(t){var i=t.xdomain,n=t.xscheme,s=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!i||r))return new XMLHttpRequest}catch(t){}try{if("undefined"!=typeof XDomainRequest&&!n&&s)return new XDomainRequest}catch(t){}if(!i)try{return new(e[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}}).call(this,i(0))},function(t,e){var i={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},function(t,e,i){var r=i(1)("socket.io-parser"),n=i(3),s=i(46),o=i(8),a=i(21);function l(){}e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=l,e.Decoder=u;var c=e.ERROR+'"encode error"';function h(t){var i=""+t.type;if(e.BINARY_EVENT!==t.type&&e.BINARY_ACK!==t.type||(i+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(i+=t.nsp+","),null!=t.id&&(i+=t.id),null!=t.data){var n=function(t){try{return JSON.stringify(t)}catch(t){return!1}}(t.data);if(!1===n)return c;i+=n}return r("encoded %j as %s",t,i),i}function u(){this.reconstructor=null}function f(t){this.reconPack=t,this.buffers=[]}function p(t){return{type:e.ERROR,data:"parser error: "+t}}l.prototype.encode=function(t,i){r("encoding packet %j",t),e.BINARY_EVENT===t.type||e.BINARY_ACK===t.type?function(t,e){s.removeBlobs(t,function(t){var i=s.deconstructPacket(t),r=h(i.packet),n=i.buffers;n.unshift(r),e(n)})}(t,i):i([h(t)])},n(u.prototype),u.prototype.add=function(t){var i;if("string"==typeof t)i=function(t){var i=0,n={type:Number(t.charAt(0))};if(null==e.types[n.type])return p("unknown packet type "+n.type);if(e.BINARY_EVENT===n.type||e.BINARY_ACK===n.type){for(var s="";"-"!==t.charAt(++i)&&(s+=t.charAt(i),i!=t.length););if(s!=Number(s)||"-"!==t.charAt(i))throw new Error("Illegal attachments");n.attachments=Number(s)}if("/"===t.charAt(i+1))for(n.nsp="";++i;){if(","===(l=t.charAt(i)))break;if(n.nsp+=l,i===t.length)break}else n.nsp="/";var a=t.charAt(i+1);if(""!==a&&Number(a)==a){for(n.id="";++i;){var l;if(null==(l=t.charAt(i))||Number(l)!=l){--i;break}if(n.id+=t.charAt(i),i===t.length)break}n.id=Number(n.id)}if(t.charAt(++i)){var c=function(t){try{return JSON.parse(t)}catch(t){return!1}}(t.substr(i));if(!(!1!==c&&(n.type===e.ERROR||o(c))))return p("invalid payload");n.data=c}return r("decoded %s as %j",t,n),n}(t),e.BINARY_EVENT===i.type||e.BINARY_ACK===i.type?(this.reconstructor=new f(i),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",i)):this.emit("decoded",i);else{if(!a(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(i=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,this.emit("decoded",i))}},u.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},f.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e=s.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},f.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(t,e,i){var r;t.exports=function t(e,i,n){function s(a,l){if(!i[a]){if(!e[a]){if(!l&&("function"==typeof r&&r))return r(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var h=i[a]={exports:{}};e[a][0].call(h.exports,function(t){return s(e[a][1][t]||t)},h,h.exports,t,e,i,n)}return i[a].exports}for(var o="function"==typeof r&&r,a=0;a<n.length;a++)s(n[a]);return s}({1:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r,n=t("./Strings"),s=t("./shared/utils/Browser"),o=t("./utils/RenderDebouncer"),a=t("./utils/Dom");!function(t){t[t.Top=0]="Top",t[t.Bottom=1]="Bottom"}(r||(r={}));var l=function(){function t(t){var e=this;this._terminal=t,this._liveRegionLineCount=0,this._disposables=[],this._charsToConsume=[],this._accessibilityTreeRoot=document.createElement("div"),this._accessibilityTreeRoot.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(var i=0;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);this._topBoundaryFocusListener=function(t){return e._onBoundaryFocus(t,r.Top)},this._bottomBoundaryFocusListener=function(t){return e._onBoundaryFocus(t,r.Bottom)},this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityTreeRoot.appendChild(this._rowContainer),this._renderRowsDebouncer=new o.RenderDebouncer(this._terminal,this._renderRows.bind(this)),this._refreshRows(),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityTreeRoot.appendChild(this._liveRegion),this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityTreeRoot),this._disposables.push(this._renderRowsDebouncer),this._disposables.push(this._terminal.addDisposableListener("resize",function(t){return e._onResize(t.cols,t.rows)})),this._disposables.push(this._terminal.addDisposableListener("refresh",function(t){return e._refreshRows(t.start,t.end)})),this._disposables.push(this._terminal.addDisposableListener("scroll",function(t){return e._refreshRows()})),this._disposables.push(this._terminal.addDisposableListener("a11y.char",function(t){return e._onChar(t)})),this._disposables.push(this._terminal.addDisposableListener("linefeed",function(){return e._onChar("\n")})),this._disposables.push(this._terminal.addDisposableListener("a11y.tab",function(t){return e._onTab(t)})),this._disposables.push(this._terminal.addDisposableListener("key",function(t){return e._onKey(t)})),this._disposables.push(this._terminal.addDisposableListener("blur",function(){return e._clearLiveRegion()})),this._disposables.push(this._terminal.addDisposableListener("dprchange",function(){return e._refreshRowsDimensions()})),this._disposables.push(this._terminal.renderer.addDisposableListener("resize",function(){return e._refreshRowsDimensions()})),this._disposables.push(a.addDisposableListener(window,"resize",function(){return e._refreshRowsDimensions()}))}return t.prototype.dispose=function(){this._disposables.forEach(function(t){return t.dispose()}),this._disposables.length=0,this._terminal.element.removeChild(this._accessibilityTreeRoot),this._rowElements.length=0},t.prototype._onBoundaryFocus=function(t,e){var i=t.target,n=this._rowElements[e===r.Top?1:this._rowElements.length-2];if(i.getAttribute("aria-posinset")!==(e===r.Top?"1":""+this._terminal.buffer.lines.length)&&t.relatedTarget===n){var s,o;if(e===r.Top?(s=i,o=this._rowElements.pop(),this._rowContainer.removeChild(o)):(s=this._rowElements.shift(),o=i,this._rowContainer.removeChild(s)),s.removeEventListener("focus",this._topBoundaryFocusListener),o.removeEventListener("focus",this._bottomBoundaryFocusListener),e===r.Top){var a=this._createAccessibilityTreeNode();this._rowElements.unshift(a),this._rowContainer.insertAdjacentElement("afterbegin",a)}else{a=this._createAccessibilityTreeNode();this._rowElements.push(a),this._rowContainer.appendChild(a)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(e===r.Top?-1:1),this._rowElements[e===r.Top?1:this._rowElements.length-2].focus(),t.preventDefault(),t.stopImmediatePropagation()}},t.prototype._onResize=function(t,e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var i=this._rowContainer.children.length;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},t.prototype._createAccessibilityTreeNode=function(){var t=document.createElement("div");return t.setAttribute("role","listitem"),t.tabIndex=-1,this._refreshRowDimensions(t),t},t.prototype._onTab=function(t){for(var e=0;e<t;e++)this._onChar(" ")},t.prototype._onChar=function(t){var e=this;if(this._liveRegionLineCount<21){if(this._charsToConsume.length>0)this._charsToConsume.shift()!==t&&this._announceCharacter(t);else this._announceCharacter(t);"\n"===t&&(this._liveRegionLineCount++,21===this._liveRegionLineCount&&(this._liveRegion.textContent+=n.tooMuchOutput)),s.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){e._accessibilityTreeRoot.appendChild(e._liveRegion)},0)}},t.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,s.isMac&&this._liveRegion.parentNode&&this._accessibilityTreeRoot.removeChild(this._liveRegion)},t.prototype._onKey=function(t){this._clearLiveRegion(),this._charsToConsume.push(t)},t.prototype._refreshRows=function(t,e){this._renderRowsDebouncer.refresh(t,e)},t.prototype._renderRows=function(t,e){for(var i=this._terminal.buffer,r=i.lines.length.toString(),s=t;s<=e;s++){var o=i.translateBufferLineToString(i.ydisp+s,!0),a=(i.ydisp+s+1).toString(),l=this._rowElements[s];l.textContent=0===o.length?n.blankLine:o,l.setAttribute("aria-posinset",a),l.setAttribute("aria-setsize",r)}},t.prototype._refreshRowsDimensions=function(){if(this._terminal.renderer.dimensions.actualCellHeight)for(var t=0;t<this._terminal.rows;t++)this._refreshRowDimensions(this._rowElements[t])},t.prototype._refreshRowDimensions=function(t){t.style.height=this._terminal.renderer.dimensions.actualCellHeight+"px"},t.prototype._announceCharacter=function(t){" "===t?this._liveRegion.innerHTML+=" ":this._liveRegion.textContent+=t},t}();i.AccessibilityManager=l},{"./Strings":15,"./shared/utils/Browser":36,"./utils/Dom":40,"./utils/RenderDebouncer":42}],2:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("./utils/CircularList"),o=t("./EventEmitter");i.CHAR_DATA_ATTR_INDEX=0,i.CHAR_DATA_CHAR_INDEX=1,i.CHAR_DATA_WIDTH_INDEX=2,i.CHAR_DATA_CODE_INDEX=3,i.MAX_BUFFER_SIZE=4294967295;var a=function(){function t(t,e){this._terminal=t,this._hasScrollback=e,this.markers=[],this.clear()}return Object.defineProperty(t.prototype,"lines",{get:function(){return this._lines},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._terminal.rows},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCursorInViewport",{get:function(){var t=this.ybase+this.y-this.ydisp;return t>=0&&t<this._terminal.rows},enumerable:!0,configurable:!0}),t.prototype._getCorrectBufferLength=function(t){if(!this._hasScrollback)return t;var e=t+this._terminal.options.scrollback;return e>i.MAX_BUFFER_SIZE?i.MAX_BUFFER_SIZE:e},t.prototype.fillViewportRows=function(){if(0===this._lines.length)for(var t=this._terminal.rows;t--;)this.lines.push(this._terminal.blankLine())},t.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this._lines=new s.CircularList(this._getCorrectBufferLength(this._terminal.rows)),this.scrollTop=0,this.scrollBottom=this._terminal.rows-1,this.setupTabStops()},t.prototype.resize=function(t,e){var i=this._getCorrectBufferLength(e);if(i>this._lines.maxLength&&(this._lines.maxLength=i),this._lines.length>0){if(this._terminal.cols<t)for(var r=[this._terminal.defAttr," ",1,32],n=0;n<this._lines.length;n++)for(;this._lines.get(n).length<t;)this._lines.get(n).push(r);var s=0;if(this._terminal.rows<e)for(var o=this._terminal.rows;o<e;o++)this._lines.length<e+this.ybase&&(this.ybase>0&&this._lines.length<=this.ybase+this.y+s+1?(this.ybase--,s++,this.ydisp>0&&this.ydisp--):this._lines.push(this._terminal.blankLine(void 0,void 0,t)));else for(o=this._terminal.rows;o>e;o--)this._lines.length>e+this.ybase&&(this._lines.length>this.ybase+this.y+1?this._lines.pop():(this.ybase++,this.ydisp++));if(i<this._lines.maxLength){var a=this._lines.length-i;a>0&&(this._lines.trimStart(a),this.ybase=Math.max(this.ybase-a,0),this.ydisp=Math.max(this.ydisp-a,0)),this._lines.maxLength=i}this.x=Math.min(this.x,t-1),this.y=Math.min(this.y,e-1),s&&(this.y+=s),this.savedY=Math.min(this.savedY,e-1),this.savedX=Math.min(this.savedX,t-1),this.scrollTop=0}this.scrollBottom=e-1},t.prototype.translateBufferLineToString=function(t,e,r,n){void 0===r&&(r=0),void 0===n&&(n=null);var s="",o=this.lines.get(t);if(!o)return"";var a=r;null===n&&(n=o.length);for(var l=n,c=0;c<o.length;c++){var h=o[c];s+=h[i.CHAR_DATA_CHAR_INDEX],0===h[i.CHAR_DATA_WIDTH_INDEX]?(r>=c&&a--,n>=c&&l--):h[i.CHAR_DATA_CHAR_INDEX].length>1&&(r>c&&(a+=h[i.CHAR_DATA_CHAR_INDEX].length-1),n>c&&(l+=h[i.CHAR_DATA_CHAR_INDEX].length-1))}if(e){var u=s.search(/\s+$/);if(-1!==u&&(l=Math.min(l,u)),l<=a)return""}return s.substring(a,l)},t.prototype.setupTabStops=function(t){for(null!=t?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this._terminal.cols;t+=this._terminal.options.tabStopWidth)this.tabs[t]=!0},t.prototype.prevStop=function(t){for(null==t&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this._terminal.cols?this._terminal.cols-1:t<0?0:t},t.prototype.nextStop=function(t){for(null==t&&(t=this.x);!this.tabs[++t]&&t<this._terminal.cols;);return t>=this._terminal.cols?this._terminal.cols-1:t<0?0:t},t.prototype.addMarker=function(t){var e=this,i=new l(t);return this.markers.push(i),i.disposables.push(this._lines.addDisposableListener("trim",function(t){i.line-=t,i.line<0&&i.dispose()})),i.on("dispose",function(){return e._removeMarker(i)}),i},t.prototype._removeMarker=function(t){this.markers.splice(this.markers.indexOf(t),1)},t}();i.Buffer=a;var l=function(t){function e(i){var r=t.call(this)||this;return r.line=i,r._id=e.NEXT_ID++,r.isDisposed=!1,r.disposables=[],r}return n(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.disposables.forEach(function(t){return t.dispose()}),this.disposables.length=0,this.emit("dispose"))},e.NEXT_ID=1,e}(o.EventEmitter);i.Marker=l},{"./EventEmitter":8,"./utils/CircularList":38}],3:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("./Buffer"),o=function(t){function e(e){var i=t.call(this)||this;return i._terminal=e,i._normal=new s.Buffer(i._terminal,!0),i._normal.fillViewportRows(),i._alt=new s.Buffer(i._terminal,!1),i._activeBuffer=i._normal,i.setupTabStops(),i}return n(e,t),Object.defineProperty(e.prototype,"alt",{get:function(){return this._alt},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},enumerable:!0,configurable:!0}),e.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._alt.clear(),this._activeBuffer=this._normal,this.emit("activate",{activeBuffer:this._normal,inactiveBuffer:this._alt}))},e.prototype.activateAltBuffer=function(){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(),this._activeBuffer=this._alt,this.emit("activate",{activeBuffer:this._alt,inactiveBuffer:this._normal}))},e.prototype.resize=function(t,e){this._normal.resize(t,e),this._alt.resize(t,e)},e.prototype.setupTabStops=function(t){this._normal.setupTabStops(t),this._alt.setupTabStops(t)},e}(t("./EventEmitter").EventEmitter);i.BufferSet=o},{"./Buffer":2,"./EventEmitter":8}],4:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.wcwidth=function(t){var e=[[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]],i=[[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]];function r(t,e){var i,r=0,n=e.length-1;if(t<e[0][0]||t>e[n][1])return!1;for(;n>=r;)if(t>e[i=r+n>>1][1])r=i+1;else{if(!(t<e[i][0]))return!0;n=i-1}return!1}var n=0|t.control,s=null;return function(o){if((o|=0)<32)return 0|n;if(o<127)return 1;var a,l=s||function(){s="undefined"==typeof Uint32Array?new Array(4096):new Uint32Array(4096);for(var i=0;i<4096;++i){for(var n=0,o=16;o--;)n=n<<2|(0===(a=16*i+o)?t.nul:a<32||a>=127&&a<160?t.control:r(a,e)?0:a>=4352&&(a<=4447||9001===a||9002===a||a>=11904&&a<=42191&&12351!==a||a>=44032&&a<=55203||a>=63744&&a<=64255||a>=65040&&a<=65049||a>=65072&&a<=65135||a>=65280&&a<=65376||a>=65504&&a<=65510)?2:1);s[i]=n}var a;return s}();return o<65536?l[o>>4]>>((15&o)<<1)&3:r(a=o,i)?0:a>=131072&&a<=196605||a>=196608&&a<=262141?2:1}}({nul:0,control:0})},{}],5:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.CHARSETS={},i.DEFAULT_CHARSET=i.CHARSETS.B,i.CHARSETS[0]={"`":"◆",a:"▒",b:"\t",c:"\f",d:"\r",e:"\n",f:"°",g:"±",h:"",i:"\v",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},i.CHARSETS.A={"#":"£"},i.CHARSETS.B=null,i.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},i.CHARSETS.C=i.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},i.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},i.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},i.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},i.CHARSETS.E=i.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},i.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},i.CHARSETS.H=i.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},{}],6:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t,e,i){this._textarea=t,this._compositionView=e,this._terminal=i,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:null,end:null}}return t.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},t.prototype.compositionupdate=function(t){var e=this;this._compositionView.textContent=t.data,this.updateCompositionElements(),setTimeout(function(){e._compositionPosition.end=e._textarea.value.length},0)},t.prototype.compositionend=function(){this._finalizeComposition(!0)},t.prototype.keydown=function(t){if(this._isComposing||this._isSendingComposition){if(229===t.keyCode)return!1;if(16===t.keyCode||17===t.keyCode||18===t.keyCode)return!1;this._finalizeComposition(!1)}return 229!==t.keyCode||(this._handleAnyTextareaChanges(),!1)},t.prototype._finalizeComposition=function(t){var e=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,this._clearTextareaPosition(),t){var i={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(e._isSendingComposition){e._isSendingComposition=!1;var t;t=e._isComposing?e._textarea.value.substring(i.start,i.end):e._textarea.value.substring(i.start),e._terminal.handler(t)}},0)}else{this._isSendingComposition=!1;var r=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._terminal.handler(r)}},t.prototype._handleAnyTextareaChanges=function(){var t=this,e=this._textarea.value;setTimeout(function(){if(!t._isComposing){var i=t._textarea.value.replace(e,"");i.length>0&&t._terminal.handler(i)}},0)},t.prototype.updateCompositionElements=function(t){var e=this;if(this._isComposing){if(this._terminal.buffer.isCursorInViewport){var i=Math.ceil(this._terminal.charMeasure.height*this._terminal.options.lineHeight),r=this._terminal.buffer.y*i,n=this._terminal.buffer.x*this._terminal.charMeasure.width;this._compositionView.style.left=n+"px",this._compositionView.style.top=r+"px",this._compositionView.style.height=i+"px",this._compositionView.style.lineHeight=i+"px";var s=this._compositionView.getBoundingClientRect();this._textarea.style.left=n+"px",this._textarea.style.top=r+"px",this._textarea.style.width=s.width+"px",this._textarea.style.height=s.height+"px",this._textarea.style.lineHeight=s.height+"px"}t||setTimeout(function(){return e.updateCompositionElements(!0)},0)}},t.prototype._clearTextareaPosition=function(){this._textarea.style.left="",this._textarea.style.top=""},t}();i.CompositionHelper=r},{}],7:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(t){t.NUL="\0",t.SOH="",t.STX="",t.ETX="",t.EOT="",t.ENQ="",t.ACK="",t.BEL="",t.BS="\b",t.HT="\t",t.LF="\n",t.VT="\v",t.FF="\f",t.CR="\r",t.SO="",t.SI="",t.DLE="",t.DC1="",t.DC2="",t.DC3="",t.DC4="",t.NAK="",t.SYN="",t.ETB="",t.CAN="",t.EM="",t.SUB="",t.ESC="",t.FS="",t.GS="",t.RS="",t.US="",t.SP=" ",t.DEL=""}(i.C0||(i.C0={}))},{}],8:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(){this._events=this._events||{}}return t.prototype.on=function(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)},t.prototype.addDisposableListener=function(t,e){var i=this;return this.on(t,e),{dispose:function(){e&&(i.off(t,e),e=null)}}},t.prototype.off=function(t,e){if(this._events[t])for(var i=this._events[t],r=i.length;r--;)if(i[r]===e)return void i.splice(r,1)},t.prototype.removeAllListeners=function(t){this._events[t]&&delete this._events[t]},t.prototype.emit=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(this._events[t])for(var r=this._events[t],n=0;n<r.length;n++)r[n].apply(this,e)},t.prototype.listeners=function(t){return this._events[t]||[]},t.prototype.destroy=function(){this._events={}},t}();i.EventEmitter=r},{}],9:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./EscapeSequences"),n=t("./Charsets"),s=t("./Buffer"),o=t("./renderer/Types"),a=t("./CharWidth"),l=function(){function t(t){this._terminal=t}return t.prototype.addChar=function(t,e){if(t>=" "){var i=a.wcwidth(e);this._terminal.charset&&this._terminal.charset[t]&&(t=this._terminal.charset[t]),this._terminal.options.screenReaderMode&&this._terminal.emit("a11y.char",t);var r=this._terminal.buffer.y+this._terminal.buffer.ybase;if(!i&&this._terminal.buffer.x)return void(this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-1]&&(this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-1][s.CHAR_DATA_WIDTH_INDEX]?(this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-1][s.CHAR_DATA_CHAR_INDEX]+=t,this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-1][3]=t.charCodeAt(0)):this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-2]&&(this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-2][s.CHAR_DATA_CHAR_INDEX]+=t,this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-2][3]=t.charCodeAt(0)),this._terminal.updateRange(this._terminal.buffer.y)));if(this._terminal.buffer.x+i-1>=this._terminal.cols)if(this._terminal.wraparoundMode)this._terminal.buffer.x=0,this._terminal.buffer.y++,this._terminal.buffer.y>this._terminal.buffer.scrollBottom?(this._terminal.buffer.y--,this._terminal.scroll(!0)):this._terminal.buffer.lines.get(this._terminal.buffer.y).isWrapped=!0;else if(2===i)return;if(r=this._terminal.buffer.y+this._terminal.buffer.ybase,this._terminal.insertMode)for(var n=0;n<i;++n){0===this._terminal.buffer.lines.get(this._terminal.buffer.y+this._terminal.buffer.ybase).pop()[s.CHAR_DATA_WIDTH_INDEX]&&this._terminal.buffer.lines.get(r)[this._terminal.cols-2]&&2===this._terminal.buffer.lines.get(r)[this._terminal.cols-2][s.CHAR_DATA_WIDTH_INDEX]&&(this._terminal.buffer.lines.get(r)[this._terminal.cols-2]=[this._terminal.curAttr," ",1," ".charCodeAt(0)]),this._terminal.buffer.lines.get(r).splice(this._terminal.buffer.x,0,[this._terminal.curAttr," ",1," ".charCodeAt(0)])}this._terminal.buffer.lines.get(r)[this._terminal.buffer.x]=[this._terminal.curAttr,t,i,t.charCodeAt(0)],this._terminal.buffer.x++,this._terminal.updateRange(this._terminal.buffer.y),2===i&&(this._terminal.buffer.lines.get(r)[this._terminal.buffer.x]=[this._terminal.curAttr,"",0,void 0],this._terminal.buffer.x++)}},t.prototype.bell=function(){this._terminal.bell()},t.prototype.lineFeed=function(){this._terminal.convertEol&&(this._terminal.buffer.x=0),this._terminal.buffer.y++,this._terminal.buffer.y>this._terminal.buffer.scrollBottom&&(this._terminal.buffer.y--,this._terminal.scroll()),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--,this._terminal.emit("linefeed")},t.prototype.carriageReturn=function(){this._terminal.buffer.x=0},t.prototype.backspace=function(){this._terminal.buffer.x>0&&this._terminal.buffer.x--},t.prototype.tab=function(){var t=this._terminal.buffer.x;this._terminal.buffer.x=this._terminal.buffer.nextStop(),this._terminal.options.screenReaderMode&&this._terminal.emit("a11y.tab",this._terminal.buffer.x-t)},t.prototype.shiftOut=function(){this._terminal.setgLevel(1)},t.prototype.shiftIn=function(){this._terminal.setgLevel(0)},t.prototype.insertChars=function(t){var e=t[0];e<1&&(e=1);for(var i=this._terminal.buffer.y+this._terminal.buffer.ybase,r=this._terminal.buffer.x,n=[this._terminal.eraseAttr()," ",1,32];e--&&r<this._terminal.cols;)this._terminal.buffer.lines.get(i).splice(r++,0,n),this._terminal.buffer.lines.get(i).pop()},t.prototype.cursorUp=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y-=e,this._terminal.buffer.y<0&&(this._terminal.buffer.y=0)},t.prototype.cursorDown=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y+=e,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--},t.prototype.cursorForward=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x+=e,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.cursorBackward=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--,this._terminal.buffer.x-=e,this._terminal.buffer.x<0&&(this._terminal.buffer.x=0)},t.prototype.cursorNextLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y+=e,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x=0},t.prototype.cursorPrecedingLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y-=e,this._terminal.buffer.y<0&&(this._terminal.buffer.y=0),this._terminal.buffer.x=0},t.prototype.cursorCharAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x=e-1},t.prototype.cursorPosition=function(t){var e,i=t[0]-1;e=t.length>=2?t[1]-1:0,i<0?i=0:i>=this._terminal.rows&&(i=this._terminal.rows-1),e<0?e=0:e>=this._terminal.cols&&(e=this._terminal.cols-1),this._terminal.buffer.x=e,this._terminal.buffer.y=i},t.prototype.cursorForwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.x=this._terminal.buffer.nextStop()},t.prototype.eraseInDisplay=function(t){var e;switch(t[0]){case 0:for(this._terminal.eraseRight(this._terminal.buffer.x,this._terminal.buffer.y),e=this._terminal.buffer.y+1;e<this._terminal.rows;e++)this._terminal.eraseLine(e);break;case 1:for(this._terminal.eraseLeft(this._terminal.buffer.x,this._terminal.buffer.y),e=this._terminal.buffer.y;e--;)this._terminal.eraseLine(e);break;case 2:for(e=this._terminal.rows;e--;)this._terminal.eraseLine(e);break;case 3:var i=this._terminal.buffer.lines.length-this._terminal.rows;i>0&&(this._terminal.buffer.lines.trimStart(i),this._terminal.buffer.ybase=Math.max(this._terminal.buffer.ybase-i,0),this._terminal.buffer.ydisp=Math.max(this._terminal.buffer.ydisp-i,0),this._terminal.emit("scroll",0))}},t.prototype.eraseInLine=function(t){switch(t[0]){case 0:this._terminal.eraseRight(this._terminal.buffer.x,this._terminal.buffer.y);break;case 1:this._terminal.eraseLeft(this._terminal.buffer.x,this._terminal.buffer.y);break;case 2:this._terminal.eraseLine(this._terminal.buffer.y)}},t.prototype.insertLines=function(t){var e=t[0];e<1&&(e=1);for(var i=this._terminal.buffer.y+this._terminal.buffer.ybase,r=this._terminal.rows-1-this._terminal.buffer.scrollBottom,n=this._terminal.rows-1+this._terminal.buffer.ybase-r+1;e--;)this._terminal.buffer.lines.splice(n-1,1),this._terminal.buffer.lines.splice(i,0,this._terminal.blankLine(!0));this._terminal.updateRange(this._terminal.buffer.y),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.deleteLines=function(t){var e=t[0];e<1&&(e=1);var i,r=this._terminal.buffer.y+this._terminal.buffer.ybase;for(i=this._terminal.rows-1-this._terminal.buffer.scrollBottom,i=this._terminal.rows-1+this._terminal.buffer.ybase-i;e--;)this._terminal.buffer.lines.splice(r,1),this._terminal.buffer.lines.splice(i,0,this._terminal.blankLine(!0));this._terminal.updateRange(this._terminal.buffer.y),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.deleteChars=function(t){var e=t[0];e<1&&(e=1);for(var i=this._terminal.buffer.y+this._terminal.buffer.ybase,r=[this._terminal.eraseAttr()," ",1,32];e--;)this._terminal.buffer.lines.get(i).splice(this._terminal.buffer.x,1),this._terminal.buffer.lines.get(i).push(r);this._terminal.updateRange(this._terminal.buffer.y)},t.prototype.scrollUp=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollTop,1),this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollBottom,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.buffer.scrollTop),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.scrollDown=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollBottom,1),this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollTop,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.buffer.scrollTop),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.eraseChars=function(t){var e=t[0];e<1&&(e=1);for(var i=this._terminal.buffer.y+this._terminal.buffer.ybase,r=this._terminal.buffer.x,n=[this._terminal.eraseAttr()," ",1,32];e--&&r<this._terminal.cols;)this._terminal.buffer.lines.get(i)[r++]=n},t.prototype.cursorBackwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.x=this._terminal.buffer.prevStop()},t.prototype.charPosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x=e-1,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.HPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x+=e,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.repeatPrecedingCharacter=function(t){for(var e=t[0]||1,i=this._terminal.buffer.lines.get(this._terminal.buffer.ybase+this._terminal.buffer.y),r=i[this._terminal.buffer.x-1]||[this._terminal.defAttr," ",1,32];e--;)i[this._terminal.buffer.x++]=r},t.prototype.sendDeviceAttributes=function(t){t[0]>0||(this._terminal.prefix?">"===this._terminal.prefix&&(this._terminal.is("xterm")?this._terminal.send(r.C0.ESC+"[>0;276;0c"):this._terminal.is("rxvt-unicode")?this._terminal.send(r.C0.ESC+"[>85;95;0c"):this._terminal.is("linux")?this._terminal.send(t[0]+"c"):this._terminal.is("screen")&&this._terminal.send(r.C0.ESC+"[>83;40003;0c")):this._terminal.is("xterm")||this._terminal.is("rxvt-unicode")||this._terminal.is("screen")?this._terminal.send(r.C0.ESC+"[?1;2c"):this._terminal.is("linux")&&this._terminal.send(r.C0.ESC+"[?6c"))},t.prototype.linePosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y=e-1,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1)},t.prototype.VPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y+=e,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--},t.prototype.HVPosition=function(t){t[0]<1&&(t[0]=1),t[1]<1&&(t[1]=1),this._terminal.buffer.y=t[0]-1,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x=t[1]-1,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.tabClear=function(t){var e=t[0];e<=0?delete this._terminal.buffer.tabs[this._terminal.buffer.x]:3===e&&(this._terminal.buffer.tabs={})},t.prototype.setMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.setMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!0;break;case 2:this._terminal.setgCharset(0,n.DEFAULT_CHARSET),this._terminal.setgCharset(1,n.DEFAULT_CHARSET),this._terminal.setgCharset(2,n.DEFAULT_CHARSET),this._terminal.setgCharset(3,n.DEFAULT_CHARSET);break;case 3:this._terminal.savedCols=this._terminal.cols,this._terminal.resize(132,this._terminal.rows);break;case 6:this._terminal.originMode=!0;break;case 7:this._terminal.wraparoundMode=!0;break;case 12:break;case 66:this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=9===t[0],this._terminal.vt200Mouse=1e3===t[0],this._terminal.normalMouse=t[0]>1e3,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:this._terminal.buffers.activateAltBuffer(),this._terminal.viewport.syncScrollArea(),this._terminal.showCursor();break;case 2004:this._terminal.bracketedPasteMode=!0}}else switch(t[0]){case 4:this._terminal.insertMode=!0}},t.prototype.resetMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.resetMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!1;break;case 3:132===this._terminal.cols&&this._terminal.savedCols&&this._terminal.resize(this._terminal.savedCols,this._terminal.rows),delete this._terminal.savedCols;break;case 6:this._terminal.originMode=!1;break;case 7:this._terminal.wraparoundMode=!1;break;case 12:break;case 66:this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=!1,this._terminal.vt200Mouse=!1,this._terminal.normalMouse=!1,this._terminal.mouseEvents=!1,this._terminal.element.classList.remove("enable-mouse-events"),this._terminal.selectionManager.enable();break;case 1004:this._terminal.sendFocus=!1;break;case 1005:this._terminal.utfMouse=!1;break;case 1006:this._terminal.sgrMouse=!1;break;case 1015:this._terminal.urxvtMouse=!1;break;case 25:this._terminal.cursorHidden=!0;break;case 1049:case 47:case 1047:this._terminal.buffers.activateNormalBuffer(),this._terminal.refresh(0,this._terminal.rows-1),this._terminal.viewport.syncScrollArea(),this._terminal.showCursor();break;case 2004:this._terminal.bracketedPasteMode=!1}}else switch(t[0]){case 4:this._terminal.insertMode=!1}},t.prototype.charAttributes=function(t){if(1!==t.length||0!==t[0]){for(var e,i=t.length,r=this._terminal.curAttr>>18,n=this._terminal.curAttr>>9&511,s=511&this._terminal.curAttr,a=0;a<i;a++)(e=t[a])>=30&&e<=37?n=e-30:e>=40&&e<=47?s=e-40:e>=90&&e<=97?n=(e+=8)-90:e>=100&&e<=107?s=(e+=8)-100:0===e?(r=this._terminal.defAttr>>18,n=this._terminal.defAttr>>9&511,s=511&this._terminal.defAttr):1===e?r|=o.FLAGS.BOLD:4===e?r|=o.FLAGS.UNDERLINE:5===e?r|=o.FLAGS.BLINK:7===e?r|=o.FLAGS.INVERSE:8===e?r|=o.FLAGS.INVISIBLE:2===e?r|=o.FLAGS.DIM:22===e?(r&=~o.FLAGS.BOLD,r&=~o.FLAGS.DIM):24===e?r&=~o.FLAGS.UNDERLINE:25===e?r&=~o.FLAGS.BLINK:27===e?r&=~o.FLAGS.INVERSE:28===e?r&=~o.FLAGS.INVISIBLE:39===e?n=this._terminal.defAttr>>9&511:49===e?s=511&this._terminal.defAttr:38===e?2===t[a+1]?(a+=2,-1===(n=this._terminal.matchColor(255&t[a],255&t[a+1],255&t[a+2]))&&(n=511),a+=2):5===t[a+1]&&(n=e=255&t[a+=2]):48===e?2===t[a+1]?(a+=2,-1===(s=this._terminal.matchColor(255&t[a],255&t[a+1],255&t[a+2]))&&(s=511),a+=2):5===t[a+1]&&(s=e=255&t[a+=2]):100===e?(n=this._terminal.defAttr>>9&511,s=511&this._terminal.defAttr):this._terminal.error("Unknown SGR attribute: %d.",e);this._terminal.curAttr=r<<18|n<<9|s}else this._terminal.curAttr=this._terminal.defAttr},t.prototype.deviceStatus=function(t){if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 6:this._terminal.send(r.C0.ESC+"[?"+(this._terminal.buffer.y+1)+";"+(this._terminal.buffer.x+1)+"R")}}else switch(t[0]){case 5:this._terminal.send(r.C0.ESC+"[0n");break;case 6:this._terminal.send(r.C0.ESC+"["+(this._terminal.buffer.y+1)+";"+(this._terminal.buffer.x+1)+"R")}},t.prototype.softReset=function(t){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.buffer.scrollTop=0,this._terminal.buffer.scrollBottom=this._terminal.rows-1,this._terminal.curAttr=this._terminal.defAttr,this._terminal.buffer.x=this._terminal.buffer.y=0,this._terminal.charset=null,this._terminal.glevel=0,this._terminal.charsets=[null]},t.prototype.setCursorStyle=function(t){var e=t[0]<1?1:t[0];switch(e){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 i=e%2==1;this._terminal.setOption("cursorBlink",i)},t.prototype.setScrollRegion=function(t){this._terminal.prefix||(this._terminal.buffer.scrollTop=(t[0]||1)-1,this._terminal.buffer.scrollBottom=(t[1]&&t[1]<=this._terminal.rows?t[1]:this._terminal.rows)-1,this._terminal.buffer.x=0,this._terminal.buffer.y=0)},t.prototype.saveCursor=function(t){this._terminal.buffer.savedX=this._terminal.buffer.x,this._terminal.buffer.savedY=this._terminal.buffer.y},t.prototype.restoreCursor=function(t){this._terminal.buffer.x=this._terminal.buffer.savedX||0,this._terminal.buffer.y=this._terminal.buffer.savedY||0},t}();i.InputHandler=l},{"./Buffer":2,"./CharWidth":4,"./Charsets":5,"./EscapeSequences":7,"./renderer/Types":30}],10:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("./Types"),o=t("./input/MouseZoneManager"),a=function(t){function e(e){var i=t.call(this)||this;return i._terminal=e,i._linkMatchers=[],i._nextLinkMatcherId=0,i._rowsToLinkify={start:null,end:null},i}return n(e,t),e.prototype.attachToDom=function(t){this._mouseZoneManager=t},e.prototype.linkifyRows=function(t,i){var r=this;this._mouseZoneManager&&(null===this._rowsToLinkify.start?(this._rowsToLinkify.start=t,this._rowsToLinkify.end=i):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,t),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,i)),this._mouseZoneManager.clearAll(t,i),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return r._linkifyRows()},e.TIME_BEFORE_LINKIFY))},e.prototype._linkifyRows=function(){this._rowsTimeoutId=null;for(var t=this._rowsToLinkify.start;t<=this._rowsToLinkify.end;t++)this._linkifyRow(t);this._rowsToLinkify.start=null,this._rowsToLinkify.end=null},e.prototype.registerLinkMatcher=function(t,e,i){if(void 0===i&&(i={}),!e)throw new Error("handler must be defined");var r={id:this._nextLinkMatcherId++,regex:t,handler:e,matchIndex:i.matchIndex,validationCallback:i.validationCallback,hoverTooltipCallback:i.tooltipCallback,hoverLeaveCallback:i.leaveCallback,willLinkActivate:i.willLinkActivate,priority:i.priority||0};return this._addLinkMatcherToList(r),r.id},e.prototype._addLinkMatcherToList=function(t){if(0!==this._linkMatchers.length){for(var e=this._linkMatchers.length-1;e>=0;e--)if(t.priority<=this._linkMatchers[e].priority)return void this._linkMatchers.splice(e+1,0,t);this._linkMatchers.splice(0,0,t)}else this._linkMatchers.push(t)},e.prototype.deregisterLinkMatcher=function(t){for(var e=0;e<this._linkMatchers.length;e++)if(this._linkMatchers[e].id===t)return this._linkMatchers.splice(e,1),!0;return!1},e.prototype._linkifyRow=function(t){var e=this._terminal.buffer.ydisp+t;if(!(e>=this._terminal.buffer.lines.length)){if(this._terminal.buffer.lines.get(e).isWrapped){if(0!==t)return;do{t--,e--}while(this._terminal.buffer.lines.get(e).isWrapped)}for(var i=this._terminal.buffer.translateBufferLineToString(e,!1),r=e+1;r<this._terminal.buffer.lines.length&&this._terminal.buffer.lines.get(r).isWrapped;)i+=this._terminal.buffer.translateBufferLineToString(r++,!1);for(var n=0;n<this._linkMatchers.length;n++)this._doLinkifyRow(t,i,this._linkMatchers[n])}},e.prototype._doLinkifyRow=function(t,e,i,r){var n=this;void 0===r&&(r=0);var s=e.match(i.regex);if(s&&0!==s.length){var o=s["number"!=typeof i.matchIndex?0:i.matchIndex],a=e.indexOf(o);i.validationCallback?i.validationCallback(o,function(e){n._rowsTimeoutId||e&&n._addLink(r+a,t,o,i)}):this._addLink(r+a,t,o,i);var l=a+o.length,c=e.substr(l);c.length>0&&this._doLinkifyRow(t,c,i,r+l)}},e.prototype._addLink=function(t,e,i,r){var n=this,a=t%this._terminal.cols,l=e+Math.floor(t/this._terminal.cols),c=(a+i.length)%this._terminal.cols,h=l+Math.floor((a+i.length)/this._terminal.cols);0===c&&(c=this._terminal.cols,h--),this._mouseZoneManager.add(new o.MouseZone(a+1,l+1,c+1,h+1,function(t){if(r.handler)return r.handler(t,i);window.open(i,"_blank")},function(t){n.emit(s.LinkHoverEventTypes.HOVER,n._createLinkHoverEvent(a,l,c,h)),n._terminal.element.classList.add("xterm-cursor-pointer")},function(t){n.emit(s.LinkHoverEventTypes.TOOLTIP,n._createLinkHoverEvent(a,l,c,h)),r.hoverTooltipCallback&&r.hoverTooltipCallback(t,i)},function(){n.emit(s.LinkHoverEventTypes.LEAVE,n._createLinkHoverEvent(a,l,c,h)),n._terminal.element.classList.remove("xterm-cursor-pointer"),r.hoverLeaveCallback&&r.hoverLeaveCallback()},function(t){return!r.willLinkActivate||r.willLinkActivate(t,i)}))},e.prototype._createLinkHoverEvent=function(t,e,i,r){return{x1:t,y1:e,x2:i,y2:r,cols:this._terminal.cols}},e.TIME_BEFORE_LINKIFY=200,e}(t("./EventEmitter").EventEmitter);i.Linkifier=a},{"./EventEmitter":8,"./Types":17,"./input/MouseZoneManager":21}],11:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./EscapeSequences"),n=t("./Charsets"),s={};s[r.C0.BEL]=function(t,e){return e.bell()},s[r.C0.LF]=function(t,e){return e.lineFeed()},s[r.C0.VT]=s[r.C0.LF],s[r.C0.FF]=s[r.C0.LF],s[r.C0.CR]=function(t,e){return e.carriageReturn()},s[r.C0.BS]=function(t,e){return e.backspace()},s[r.C0.HT]=function(t,e){return e.tab()},s[r.C0.SO]=function(t,e){return e.shiftOut()},s[r.C0.SI]=function(t,e){return e.shiftIn()},s[r.C0.ESC]=function(t,e){return t.setState(l.ESCAPED)};var o={"[":function(t,e){e.params=[],e.currentParam=0,t.setState(l.CSI_PARAM)},"]":function(t,e){e.params=[],e.currentParam=0,t.setState(l.OSC)},P:function(t,e){e.params=[],e.currentParam=0,t.setState(l.DCS)},_:function(t,e){t.setState(l.IGNORE)},"^":function(t,e){t.setState(l.IGNORE)},c:function(t,e){e.reset()},E:function(t,e){e.buffer.x=0,e.index(),t.setState(l.NORMAL)},D:function(t,e){e.index(),t.setState(l.NORMAL)},M:function(t,e){e.reverseIndex(),t.setState(l.NORMAL)},"%":function(t,e){e.setgLevel(0),e.setgCharset(0,n.DEFAULT_CHARSET),t.setState(l.NORMAL),t.skipNextChar()}};o[r.C0.CAN]=function(t){return t.setState(l.NORMAL)};var a={"?":function(t){return t.setPrefix("?")},">":function(t){return t.setPrefix(">")},"!":function(t){return t.setPrefix("!")},0:function(t){return t.setParam(10*t.getParam())},1:function(t){return t.setParam(10*t.getParam()+1)},2:function(t){return t.setParam(10*t.getParam()+2)},3:function(t){return t.setParam(10*t.getParam()+3)},4:function(t){return t.setParam(10*t.getParam()+4)},5:function(t){return t.setParam(10*t.getParam()+5)},6:function(t){return t.setParam(10*t.getParam()+6)},7:function(t){return t.setParam(10*t.getParam()+7)},8:function(t){return t.setParam(10*t.getParam()+8)},9:function(t){return t.setParam(10*t.getParam()+9)},$:function(t){return t.setPostfix("$")},'"':function(t){return t.setPostfix('"')}," ":function(t){return t.setPostfix(" ")},"'":function(t){return t.setPostfix("'")},";":function(t){return t.finalizeParam()}};a[r.C0.CAN]=function(t){return t.setState(l.NORMAL)};var l,c={"@":function(t,e,i){return t.insertChars(e)},A:function(t,e,i){return t.cursorUp(e)},B:function(t,e,i){return t.cursorDown(e)},C:function(t,e,i){return t.cursorForward(e)},D:function(t,e,i){return t.cursorBackward(e)},E:function(t,e,i){return t.cursorNextLine(e)},F:function(t,e,i){return t.cursorPrecedingLine(e)},G:function(t,e,i){return t.cursorCharAbsolute(e)},H:function(t,e,i){return t.cursorPosition(e)},I:function(t,e,i){return t.cursorForwardTab(e)},J:function(t,e,i){return t.eraseInDisplay(e)},K:function(t,e,i){return t.eraseInLine(e)},L:function(t,e,i){return t.insertLines(e)},M:function(t,e,i){return t.deleteLines(e)},P:function(t,e,i){return t.deleteChars(e)},S:function(t,e,i){return t.scrollUp(e)},T:function(t,e,i){e.length<2&&!i&&t.scrollDown(e)},X:function(t,e,i){return t.eraseChars(e)},Z:function(t,e,i){return t.cursorBackwardTab(e)},"`":function(t,e,i){return t.charPosAbsolute(e)},a:function(t,e,i){return t.HPositionRelative(e)},b:function(t,e,i){return t.repeatPrecedingCharacter(e)},c:function(t,e,i){return t.sendDeviceAttributes(e)},d:function(t,e,i){return t.linePosAbsolute(e)},e:function(t,e,i){return t.VPositionRelative(e)},f:function(t,e,i){return t.HVPosition(e)},g:function(t,e,i){return t.tabClear(e)},h:function(t,e,i){return t.setMode(e)},l:function(t,e,i){return t.resetMode(e)},m:function(t,e,i){return t.charAttributes(e)},n:function(t,e,i){return t.deviceStatus(e)},p:function(t,e,i){switch(i){case"!":t.softReset(e)}},q:function(t,e,i,r){" "===r&&t.setCursorStyle(e)},r:function(t,e){return t.setScrollRegion(e)},s:function(t,e){return t.saveCursor(e)},u:function(t,e){return t.restoreCursor(e)}};c[r.C0.CAN]=function(t,e,i,r,n){return n.setState(l.NORMAL)},function(t){t[t.NORMAL=0]="NORMAL",t[t.ESCAPED=1]="ESCAPED",t[t.CSI_PARAM=2]="CSI_PARAM",t[t.CSI=3]="CSI",t[t.OSC=4]="OSC",t[t.CHARSET=5]="CHARSET",t[t.DCS=6]="DCS",t[t.IGNORE=7]="IGNORE"}(l=i.ParserState||(i.ParserState={}));var h=function(){function t(t,e){this._inputHandler=t,this._terminal=e,this._state=l.NORMAL}return t.prototype.parse=function(t){var e,i,h,u,f=t.length,p=this._terminal.buffer.x,d=this._terminal.buffer.y;for(this._terminal.debug&&this._terminal.log("data: "+t),this._position=0,this._terminal.surrogate_high&&(t=this._terminal.surrogate_high+t,this._terminal.surrogate_high="");this._position<f;this._position++){if(i=t[this._position],55296<=(h=t.charCodeAt(this._position))&&h<=56319){if(u=t.charCodeAt(this._position+1),isNaN(u)){this._terminal.surrogate_high=i;continue}h=1024*(h-55296)+(u-56320)+65536,i+=t.charAt(this._position+1)}if(!(56320<=h&&h<=57343))switch(this._state){case l.NORMAL:i in s?s[i](this,this._inputHandler):this._inputHandler.addChar(i,h);break;case l.ESCAPED:if(i in o){o[i](this,this._terminal);break}switch(i){case"(":case")":case"*":case"+":case"-":case".":switch(i){case"(":this._terminal.gcharset=0;break;case")":this._terminal.gcharset=1;break;case"*":this._terminal.gcharset=2;break;case"+":this._terminal.gcharset=3;break;case"-":this._terminal.gcharset=1;break;case".":this._terminal.gcharset=2}this._state=l.CHARSET;break;case"/":this._terminal.gcharset=3,this._state=l.CHARSET,this._position--;break;case"N":case"O":this._state=l.NORMAL;break;case"n":this._terminal.setgLevel(2),this._state=l.NORMAL;break;case"o":case"|":this._terminal.setgLevel(3),this._state=l.NORMAL;break;case"}":this._terminal.setgLevel(2),this._state=l.NORMAL;break;case"~":this._terminal.setgLevel(1),this._state=l.NORMAL;break;case"7":this._inputHandler.saveCursor(),this._state=l.NORMAL;break;case"8":this._inputHandler.restoreCursor(),this._state=l.NORMAL;break;case"#":this._state=l.NORMAL,this._position++;break;case"H":this._terminal.tabSet(),this._state=l.NORMAL;break;case"=":this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport&&this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;case">":this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport&&this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;default:this._state=l.NORMAL,this._terminal.error("Unknown ESC control: %s.",i)}break;case l.CHARSET:i in n.CHARSETS?(e=n.CHARSETS[i],"/"===i&&this.skipNextChar()):e=n.DEFAULT_CHARSET,this._terminal.setgCharset(this._terminal.gcharset,e),this._terminal.gcharset=null,this._state=l.NORMAL;break;case l.OSC:if(i===r.C0.ESC||i===r.C0.BEL){switch(i===r.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=l.NORMAL}else this._terminal.params.length?this._terminal.currentParam+=i:i>="0"&&i<="9"?this._terminal.currentParam=10*this._terminal.currentParam+i.charCodeAt(0)-48:";"===i&&(this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam="");break;case l.CSI_PARAM:if(i in a){a[i](this);break}this.finalizeParam(),this._state=l.CSI;case l.CSI:i in c?(this._terminal.debug&&this._terminal.log("CSI "+(this._terminal.prefix?this._terminal.prefix:"")+" "+(this._terminal.params?this._terminal.params.join(";"):"")+" "+(this._terminal.postfix?this._terminal.postfix:"")+" "+i),c[i](this._inputHandler,this._terminal.params,this._terminal.prefix,this._terminal.postfix,this)):this._terminal.error("Unknown CSI code: %s.",i),this._state=l.NORMAL,this._terminal.prefix="",this._terminal.postfix="";break;case l.DCS:if(i===r.C0.ESC||i===r.C0.BEL){i===r.C0.ESC&&this._position++;var _=void 0,m=void 0;switch(this._terminal.prefix){case"":break;case"$q":switch(m=!1,_=this._terminal.currentParam){case'"q':_='0"q';break;case'"p':_='61"p';break;case"r":_=this._terminal.buffer.scrollTop+1+";"+(this._terminal.buffer.scrollBottom+1)+"r";break;case"m":_="0m";break;default:this._terminal.error("Unknown DCS Pt: %s.",_),_=""}this._terminal.send(r.C0.ESC+"P"+ +m+"$r"+_+r.C0.ESC+"\\");break;case"+p":break;case"+q":_=this._terminal.currentParam,m=!1,this._terminal.send(r.C0.ESC+"P"+ +m+"+r"+_+r.C0.ESC+"\\");break;default:this._terminal.error("Unknown DCS prefix: %s.",this._terminal.prefix)}this._terminal.currentParam=0,this._terminal.prefix="",this._state=l.NORMAL}else this._terminal.currentParam?this._terminal.currentParam+=i:this._terminal.prefix||"$"===i||"+"===i?2===this._terminal.prefix.length?this._terminal.currentParam=i:this._terminal.prefix+=i:this._terminal.currentParam=i;break;case l.IGNORE:i!==r.C0.ESC&&i!==r.C0.BEL||(i===r.C0.ESC&&this._position++,this._state=l.NORMAL)}}return this._terminal.buffer.x===p&&this._terminal.buffer.y===d||this._terminal.emit("cursormove"),this._state},t.prototype.setState=function(t){this._state=t},t.prototype.setPrefix=function(t){this._terminal.prefix=t},t.prototype.setPostfix=function(t){this._terminal.postfix=t},t.prototype.setParam=function(t){this._terminal.currentParam=t},t.prototype.getParam=function(){return this._terminal.currentParam},t.prototype.finalizeParam=function(){this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam=0},t.prototype.skipNextChar=function(){this._position++},t}();i.Parser=h},{"./Charsets":5,"./EscapeSequences":7}],12:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s,o=t("./utils/MouseHelper"),a=t("./shared/utils/Browser"),l=t("./EventEmitter"),c=t("./SelectionModel"),h=t("./Buffer"),u=t("./handlers/AltClickHandler"),f=String.fromCharCode(160),p=new RegExp(f,"g");!function(t){t[t.NORMAL=0]="NORMAL",t[t.WORD=1]="WORD",t[t.LINE=2]="LINE"}(s||(s={}));var d=function(t){function e(e,i){var r=t.call(this)||this;return r._terminal=e,r._charMeasure=i,r._enabled=!0,r._initListeners(),r.enable(),r._model=new c.SelectionModel(e),r._activeSelectionMode=s.NORMAL,r}return n(e,t),Object.defineProperty(e.prototype,"_buffer",{get:function(){return this._terminal.buffers.active},enumerable:!0,configurable:!0}),e.prototype._initListeners=function(){var t=this;this._mouseMoveListener=function(e){return t._onMouseMove(e)},this._mouseUpListener=function(e){return t._onMouseUp(e)},this._trimListener=function(e){return t._onTrim(e)},this.initBuffersListeners()},e.prototype.initBuffersListeners=function(){var t=this;this._terminal.buffer.lines.on("trim",this._trimListener),this._terminal.buffers.on("activate",function(e){return t._onBufferActivate(e)})},e.prototype.disable=function(){this.clearSelection(),this._enabled=!1},e.prototype.enable=function(){this._enabled=!0},Object.defineProperty(e.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasSelection",{get:function(){var t=this._model.finalSelectionStart,e=this._model.finalSelectionEnd;return!(!t||!e||t[0]===e[0]&&t[1]===e[1])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectionText",{get:function(){var t=this._model.finalSelectionStart,e=this._model.finalSelectionEnd;if(!t||!e)return"";var i=t[1]===e[1]?e[0]:null,r=[];r.push(this._buffer.translateBufferLineToString(t[1],!0,t[0],i));for(var n=t[1]+1;n<=e[1]-1;n++){var s=this._buffer.lines.get(n),o=this._buffer.translateBufferLineToString(n,!0);s.isWrapped?r[r.length-1]+=o:r.push(o)}if(t[1]!==e[1]){s=this._buffer.lines.get(e[1]),o=this._buffer.translateBufferLineToString(e[1],!0,0,e[0]);s.isWrapped?r[r.length-1]+=o:r.push(o)}return r.map(function(t){return t.replace(p," ")}).join(a.isMSWindows?"\r\n":"\n")},enumerable:!0,configurable:!0}),e.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh()},e.prototype.refresh=function(t){var e=this;(this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return e._refresh()})),a.isLinux&&t)&&(this.selectionText.length&&this.emit("newselection",this.selectionText))},e.prototype._refresh=function(){this._refreshAnimationFrame=null,this.emit("refresh",{start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd})},e.prototype.isClickInSelection=function(t){var e=this._getMouseBufferCoords(t),i=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!(!i||!r)&&(e[1]>i[1]&&e[1]<r[1]||i[1]===r[1]&&e[1]===i[1]&&e[0]>i[0]&&e[0]<r[0]||i[1]<r[1]&&e[1]===r[1]&&e[0]<r[0])},e.prototype.selectWordAtCursor=function(t){var e=this._getMouseBufferCoords(t);e&&(this._selectWordAt(e,!1),this._model.selectionEnd=null,this.refresh(!0))},e.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._terminal.emit("selection")},e.prototype.selectLines=function(t,e){this._model.clearSelection(),t=Math.max(t,0),e=Math.min(e,this._terminal.buffer.lines.length-1),this._model.selectionStart=[0,t],this._model.selectionEnd=[this._terminal.cols,e],this.refresh(),this._terminal.emit("selection")},e.prototype._onTrim=function(t){this._model.onTrim(t)&&this.refresh()},e.prototype._getMouseBufferCoords=function(t){var e=this._terminal.mouseHelper.getCoords(t,this._terminal.screenElement,this._charMeasure,this._terminal.options.lineHeight,this._terminal.cols,this._terminal.rows,!0);return e?(e[0]--,e[1]--,e[1]+=this._terminal.buffer.ydisp,e):null},e.prototype._getMouseEventScrollAmount=function(t){var e=o.MouseHelper.getCoordsRelativeToElement(t,this._terminal.screenElement)[1],i=this._terminal.rows*Math.ceil(this._charMeasure.height*this._terminal.options.lineHeight);return e>=0&&e<=i?0:(e>i&&(e-=i),e=Math.min(Math.max(e,-50),50),(e/=50)/Math.abs(e)+Math.round(14*e))},e.prototype.shouldForceSelection=function(t){return a.isMac?t.altKey:t.shiftKey},e.prototype.onMouseDown=function(t){if(this._mouseDownTimeStamp=t.timeStamp,(2!==t.button||!this.hasSelection)&&0===t.button){if(!this._enabled){if(!this.shouldForceSelection(t))return;t.stopPropagation()}t.preventDefault(),this._dragScrollAmount=0,this._enabled&&t.shiftKey?this._onIncrementalClick(t):1===t.detail?this._onSingleClick(t):2===t.detail?this._onDoubleClick(t):3===t.detail&&this._onTripleClick(t),this._addMouseDownListeners(),this.refresh(!0)}},e.prototype._addMouseDownListeners=function(){var t=this;this._terminal.element.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._terminal.element.ownerDocument.addEventListener("mouseup",this._mouseUpListener),this._dragScrollIntervalTimer=setInterval(function(){return t._dragScroll()},50)},e.prototype._removeMouseDownListeners=function(){this._terminal.element.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._terminal.element.ownerDocument.removeEventListener("mouseup",this._mouseUpListener),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=null},e.prototype._onIncrementalClick=function(t){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(t))},e.prototype._onSingleClick=function(t){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=s.NORMAL,this._model.selectionStart=this._getMouseBufferCoords(t),this._model.selectionStart){this._model.selectionEnd=null;var e=this._buffer.lines.get(this._model.selectionStart[1]);if(e&&!(e.length>=this._model.selectionStart[0]))0===e[this._model.selectionStart[0]][h.CHAR_DATA_WIDTH_INDEX]&&this._model.selectionStart[0]++}},e.prototype._onDoubleClick=function(t){var e=this._getMouseBufferCoords(t);e&&(this._activeSelectionMode=s.WORD,this._selectWordAt(e,!0))},e.prototype._onTripleClick=function(t){var e=this._getMouseBufferCoords(t);e&&(this._activeSelectionMode=s.LINE,this._selectLineAt(e[1]))},e.prototype._onMouseMove=function(t){t.stopImmediatePropagation();var e=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(t),this._model.selectionEnd){if(this._activeSelectionMode===s.LINE?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._terminal.cols:this._activeSelectionMode===s.WORD&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(t),this._dragScrollAmount>0?this._model.selectionEnd[0]=this._terminal.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]<this._buffer.lines.length){var i=this._buffer.lines.get(this._model.selectionEnd[1])[this._model.selectionEnd[0]];i&&0===i[h.CHAR_DATA_WIDTH_INDEX]&&this._model.selectionEnd[0]++}e&&e[0]===this._model.selectionEnd[0]&&e[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)},e.prototype._dragScroll=function(){this._dragScrollAmount&&(this._terminal.scrollLines(this._dragScrollAmount,!1),this._dragScrollAmount>0?this._model.selectionEnd=[this._terminal.cols-1,Math.min(this._terminal.buffer.ydisp+this._terminal.rows,this._terminal.buffer.lines.length-1)]:this._model.selectionEnd=[0,this._terminal.buffer.ydisp],this.refresh())},e.prototype._onMouseUp=function(t){var e=t.timeStamp-this._mouseDownTimeStamp;this._removeMouseDownListeners(),this.selectionText.length<=1&&e<500?new u.AltClickHandler(t,this._terminal).move():this.hasSelection&&this._terminal.emit("selection")},e.prototype._onBufferActivate=function(t){this.clearSelection(),t.inactiveBuffer.lines.off("trim",this._trimListener),t.activeBuffer.lines.on("trim",this._trimListener)},e.prototype._convertViewportColToCharacterIndex=function(t,e){for(var i=e[0],r=0;e[0]>=r;r++){var n=t[r];0===n[h.CHAR_DATA_WIDTH_INDEX]?i--:n[h.CHAR_DATA_CHAR_INDEX].length>1&&e[0]!==r&&(i+=n[h.CHAR_DATA_CHAR_INDEX].length-1)}return i},e.prototype.setSelection=function(t,e,i){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[t,e],this._model.selectionStartLength=i,this.refresh()},e.prototype._getWordAt=function(t,e){if(t[0]>=this._terminal.cols)return null;var i=this._buffer.lines.get(t[1]);if(!i)return null;var r=this._buffer.translateBufferLineToString(t[1],!1),n=this._convertViewportColToCharacterIndex(i,t),s=n,o=t[0]-n,a=0,l=0,c=0,u=0;if(" "===r.charAt(n)){for(;n>0&&" "===r.charAt(n-1);)n--;for(;s<r.length&&" "===r.charAt(s+1);)s++}else{var f=t[0],p=t[0];for(0===i[f][h.CHAR_DATA_WIDTH_INDEX]&&(a++,f--),2===i[p][h.CHAR_DATA_WIDTH_INDEX]&&(l++,p++),i[p][h.CHAR_DATA_CHAR_INDEX].length>1&&(u+=i[p][h.CHAR_DATA_CHAR_INDEX].length-1,s+=i[p][h.CHAR_DATA_CHAR_INDEX].length-1);f>0&&n>0&&!this._isCharWordSeparator(i[f-1]);){0===(d=i[f-1])[h.CHAR_DATA_WIDTH_INDEX]?(a++,f--):d[h.CHAR_DATA_CHAR_INDEX].length>1&&(c+=d[h.CHAR_DATA_CHAR_INDEX].length-1,n-=d[h.CHAR_DATA_CHAR_INDEX].length-1),n--,f--}for(;p<i.length&&s+1<r.length&&!this._isCharWordSeparator(i[p+1]);){var d;2===(d=i[p+1])[h.CHAR_DATA_WIDTH_INDEX]?(l++,p++):d[h.CHAR_DATA_CHAR_INDEX].length>1&&(u+=d[h.CHAR_DATA_CHAR_INDEX].length-1,s+=d[h.CHAR_DATA_CHAR_INDEX].length-1),s++,p++}}s++;var _=n+o-a+c,m=Math.min(this._terminal.cols,s-n+a+l-c-u);return e||""!==r.slice(n,s).trim()?{start:_,length:m}:null},e.prototype._selectWordAt=function(t,e){var i=this._getWordAt(t,e);i&&(this._model.selectionStart=[i.start,t[1]],this._model.selectionStartLength=i.length)},e.prototype._selectToWordAt=function(t){var e=this._getWordAt(t,!0);e&&(this._model.selectionEnd=[this._model.areSelectionValuesReversed()?e.start:e.start+e.length,t[1]])},e.prototype._isCharWordSeparator=function(t){return 0!==t[h.CHAR_DATA_WIDTH_INDEX]&&" ()[]{}'\"".indexOf(t[h.CHAR_DATA_CHAR_INDEX])>=0},e.prototype._selectLineAt=function(t){this._model.selectionStart=[0,t],this._model.selectionStartLength=this._terminal.cols},e}(l.EventEmitter);i.SelectionManager=d},{"./Buffer":2,"./EventEmitter":8,"./SelectionModel":13,"./handlers/AltClickHandler":19,"./shared/utils/Browser":36,"./utils/MouseHelper":41}],13:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t){this._terminal=t,this.clearSelection()}return t.prototype.clearSelection=function(){this.selectionStart=null,this.selectionEnd=null,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(t.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(t.prototype,"finalSelectionEnd",{get:function(){return this.isSelectAllActive?[this._terminal.cols,this._terminal.buffer.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}),t.prototype.areSelectionValuesReversed=function(){var t=this.selectionStart,e=this.selectionEnd;return!(!t||!e)&&(t[1]>e[1]||t[1]===e[1]&&t[0]>e[0])},t.prototype.onTrim=function(t){return this.selectionStart&&(this.selectionStart[1]-=t),this.selectionEnd&&(this.selectionEnd[1]-=t),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},t}();i.SelectionModel=r},{}],14:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_BELL_SOUND="data:audio/wav;base64,UklGRigBAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQQBAADpAFgCwAMlBZoG/wdmCcoKRAypDQ8PbRDBEQQTOxRtFYcWlBePGIUZXhoiG88bcBz7HHIdzh0WHlMeZx51HmkeUx4WHs8dah0AHXwc3hs9G4saxRnyGBIYGBcQFv8U4RPAEoYRQBACD70NWwwHC6gJOwjWBloF7gOBAhABkf8b/qv8R/ve+Xf4Ife79W/0JfPZ8Z/wde9N7ijtE+wU6xvqM+lb6H7nw+YX5mrlxuQz5Mzje+Ma49fioeKD4nXiYeJy4pHitOL04j/jn+MN5IPkFOWs5U3mDefM55/ogOl36m7rdOyE7abuyu8D8Unyj/Pg9D/2qfcb+Yn6/vuK/Qj/lAAlAg==";var r=function(){function t(t){this._terminal=t}return t.prototype.playBellSound=function(){var t=window.AudioContext||window.webkitAudioContext;if(!this._audioContext&&t&&(this._audioContext=new t),this._audioContext){var e=this._audioContext.createBufferSource(),i=this._audioContext;this._audioContext.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._terminal.options.bellSound)),function(t){e.buffer=t,e.connect(i.destination),e.start(0)})}else console.warn("Sorry, but the Web Audio API is not supported by your browser. Please, consider upgrading to the latest version")},t.prototype._base64ToArrayBuffer=function(t){for(var e=window.atob(t),i=e.length,r=new Uint8Array(i),n=0;n<i;n++)r[n]=e.charCodeAt(n);return r.buffer},t.prototype._removeMimeType=function(t){return t.split(",")[1]},t}();i.SoundManager=r},{}],15:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.blankLine="Blank line",i.promptLabel="Terminal input",i.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},{}],16:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("./BufferSet"),o=t("./Buffer"),a=t("./CompositionHelper"),l=t("./EventEmitter"),c=t("./Viewport"),h=t("./handlers/Clipboard"),u=t("./EscapeSequences"),f=t("./InputHandler"),p=t("./Parser"),d=t("./renderer/Renderer"),_=t("./Linkifier"),m=t("./SelectionManager"),y=t("./utils/CharMeasure"),g=t("./shared/utils/Browser"),v=t("./Strings"),b=t("./utils/MouseHelper"),C=t("./utils/Clone"),w=t("./SoundManager"),k=t("./renderer/ColorManager"),A=t("./input/MouseZoneManager"),x=t("./AccessibilityManager"),S=t("./utils/ScreenDprMonitor"),E={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']},L="undefined"!=typeof window?window.document:null,M={cols:80,rows:24,convertEol:!1,termName:"xterm",cursorBlink:!1,cursorStyle:"block",bellSound:w.DEFAULT_BELL_SOUND,bellStyle:"none",enableBold:!0,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,letterSpacing:0,scrollback:1e3,screenKeys:!1,screenReaderMode:!1,debug:!1,macOptionIsMeta:!1,cancelEvents:!1,disableStdin:!1,useFlowControl:!1,allowTransparency:!1,tabStopWidth:8,theme:null,rightClickSelectsWord:g.isMac},R=function(t){function e(e){void 0===e&&(e={});var i=t.call(this)||this;return i.browser=g,i.options=C.clone(e),i._setup(),i}return n(e,t),e.prototype._setup=function(){var t=this;Object.keys(M).forEach(function(e){null==t.options[e]&&(t.options[e]=M[e]),t[e]=t.options[e]}),this._parent=L?L.body:null,this.cols=this.options.cols,this.rows=this.options.rows,this.options.handler&&this.on("data",this.options.handler),this.cursorState=0,this.cursorHidden=!1,this._sendDataQueue="",this._customKeyEventHandler=null,this.applicationKeypad=!1,this.applicationCursor=!1,this.originMode=!1,this.insertMode=!1,this.wraparoundMode=!0,this.bracketedPasteMode=!1,this.charset=null,this.gcharset=null,this.glevel=0,this.charsets=[null],this.defAttr=131840,this.curAttr=131840,this.params=[],this.currentParam=0,this.prefix="",this.postfix="",this.writeBuffer=[],this._writeInProgress=!1,this._xoffSentToCatchUp=!1,this._userScrolling=!1,this._inputHandler=new f.InputHandler(this),this._parser=new p.Parser(this._inputHandler,this),this.renderer=this.renderer||null,this.selectionManager=this.selectionManager||null,this.linkifier=this.linkifier||new _.Linkifier(this),this._mouseZoneManager=this._mouseZoneManager||null,this.soundManager=this.soundManager||new w.SoundManager(this),this.buffers=new s.BufferSet(this),this.selectionManager&&(this.selectionManager.clearSelection(),this.selectionManager.initBuffersListeners())},Object.defineProperty(e.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return v},enumerable:!0,configurable:!0}),e.prototype.eraseAttr=function(){return-512&this.defAttr|511&this.curAttr},e.prototype.focus=function(){this.textarea&&this.textarea.focus()},Object.defineProperty(e.prototype,"isFocused",{get:function(){return L.activeElement===this.textarea},enumerable:!0,configurable:!0}),e.prototype.getOption=function(t){if(!(t in M))throw new Error('No option with key "'+t+'"');return void 0!==this.options[t]?this.options[t]:this[t]},e.prototype.setOption=function(t,e){if(!(t in M))throw new Error('No option with key "'+t+'"');switch(t){case"bellStyle":e||(e="none");break;case"cursorStyle":e||(e="block");break;case"fontWeight":e||(e="normal");break;case"fontWeightBold":e||(e="bold");break;case"lineHeight":if(e<1)return void console.warn(t+" cannot be less than 1, value: "+e);case"tabStopWidth":if(e<1)return void console.warn(t+" cannot be less than 1, value: "+e);break;case"theme":if(this.renderer)return void this._setTheme(e);break;case"scrollback":if((e=Math.min(e,o.MAX_BUFFER_SIZE))<0)return void console.warn(t+" cannot be less than 0, value: "+e);if(this.options[t]!==e){var i=this.rows+e;if(this.buffer.lines.length>i){var r=this.buffer.lines.length-i,n=this.buffer.ydisp-r<0;this.buffer.lines.trimStart(r),this.buffer.ybase=Math.max(this.buffer.ybase-r,0),this.buffer.ydisp=Math.max(this.buffer.ydisp-r,0),n&&this.refresh(0,this.rows-1)}}}switch(this[t]=e,this.options[t]=e,t){case"fontFamily":case"fontSize":this.renderer.clear(),this.charMeasure.measure(this.options);break;case"enableBold":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":this.renderer.clear(),this.renderer.onResize(this.cols,this.rows),this.refresh(0,this.rows-1);case"scrollback":this.buffers.resize(this.cols,this.rows),this.viewport.syncScrollArea();break;case"screenReaderMode":e?this._accessibilityManager||(this._accessibilityManager=new x.AccessibilityManager(this)):this._accessibilityManager&&(this._accessibilityManager.dispose(),this._accessibilityManager=null);break;case"tabStopWidth":this.buffers.setupTabStops()}this.renderer&&this.renderer.onOptionsChanged()},e.prototype._onTextAreaFocus=function(){this.sendFocus&&this.send(u.C0.ESC+"[I"),this.element.classList.add("focus"),this.showCursor(),this.emit("focus")},e.prototype.blur=function(){return this.textarea.blur()},e.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.sendFocus&&this.send(u.C0.ESC+"[O"),this.element.classList.remove("focus"),this.emit("blur")},e.prototype._initGlobal=function(){var t=this;this._bindKeys(),T(this.element,"copy",function(e){t.hasSelection()&&h.copyHandler(e,t,t.selectionManager)});var e=function(e){return h.pasteHandler(e,t)};T(this.textarea,"paste",e),T(this.element,"paste",e),g.isFirefox?T(this.element,"mousedown",function(e){2===e.button&&h.rightClickHandler(e,t.textarea,t.selectionManager,t.options.rightClickSelectsWord)}):T(this.element,"contextmenu",function(e){h.rightClickHandler(e,t.textarea,t.selectionManager,t.options.rightClickSelectsWord)}),g.isLinux&&T(this.element,"auxclick",function(e){1===e.button&&h.moveTextAreaUnderMouseCursor(e,t.textarea)})},e.prototype._bindKeys=function(){var t=this,e=this;T(this.element,"keydown",function(t){L.activeElement===this&&e._keyDown(t)},!0),T(this.element,"keypress",function(t){L.activeElement===this&&e._keyPress(t)},!0),T(this.element,"keyup",function(e){(function(t){return 16===t.keyCode||17===t.keyCode||18===t.keyCode})(e)||t.focus()},!0),T(this.textarea,"keydown",function(e){return t._keyDown(e)},!0),T(this.textarea,"keypress",function(e){return t._keyPress(e)},!0),T(this.textarea,"compositionstart",function(){return t._compositionHelper.compositionstart()}),T(this.textarea,"compositionupdate",function(e){return t._compositionHelper.compositionupdate(e)}),T(this.textarea,"compositionend",function(){return t._compositionHelper.compositionend()}),this.on("refresh",function(){return t._compositionHelper.updateCompositionElements()}),this.on("refresh",function(e){return t._queueLinkification(e.start,e.end)})},e.prototype.open=function(t){var e=this;if(this._parent=t||this._parent,!this._parent)throw new Error("Terminal requires a parent element.");this._context=this._parent.ownerDocument.defaultView,this._document=this._parent.ownerDocument,this._screenDprMonitor=new S.ScreenDprMonitor,this._screenDprMonitor.setListener(function(){return e.emit("dprchange",window.devicePixelRatio)}),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),this._parent.appendChild(this.element);var i=L.createDocumentFragment();this._viewportElement=L.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),i.appendChild(this._viewportElement),this._viewportScrollArea=L.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=L.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=L.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),i.appendChild(this.screenElement),this._mouseZoneManager=new A.MouseZoneManager(this),this.on("scroll",function(){return e._mouseZoneManager.clearAll()}),this.linkifier.attachToDom(this._mouseZoneManager),this.textarea=L.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",v.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.textarea.addEventListener("focus",function(){return e._onTextAreaFocus()}),this.textarea.addEventListener("blur",function(){return e._onTextAreaBlur()}),this._helperContainer.appendChild(this.textarea),this._compositionView=L.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=new a.CompositionHelper(this.textarea,this._compositionView,this),this._helperContainer.appendChild(this._compositionView),this.charMeasure=new y.CharMeasure(L,this._helperContainer),this.element.appendChild(i),this.renderer=new d.Renderer(this,this.options.theme),this.options.theme=null,this.viewport=new c.Viewport(this,this._viewportElement,this._viewportScrollArea,this.charMeasure),this.viewport.onThemeChanged(this.renderer.colorManager.colors),this.on("cursormove",function(){return e.renderer.onCursorMove()}),this.on("resize",function(){return e.renderer.onResize(e.cols,e.rows)}),this.on("blur",function(){return e.renderer.onBlur()}),this.on("focus",function(){return e.renderer.onFocus()}),this.on("dprchange",function(){return e.renderer.onWindowResize(window.devicePixelRatio)}),window.addEventListener("resize",function(){return e.renderer.onWindowResize(window.devicePixelRatio)}),this.charMeasure.on("charsizechanged",function(){return e.renderer.onResize(e.cols,e.rows)}),this.renderer.on("resize",function(t){return e.viewport.syncScrollArea()}),this.selectionManager=new m.SelectionManager(this,this.charMeasure),this.element.addEventListener("mousedown",function(t){return e.selectionManager.onMouseDown(t)}),this.selectionManager.on("refresh",function(t){return e.renderer.onSelectionChanged(t.start,t.end)}),this.selectionManager.on("newselection",function(t){e.textarea.value=t,e.textarea.focus(),e.textarea.select()}),this.on("scroll",function(){e.viewport.syncScrollArea(),e.selectionManager.refresh()}),this._viewportElement.addEventListener("scroll",function(){return e.selectionManager.refresh()}),this.mouseHelper=new b.MouseHelper(this.renderer),this.options.screenReaderMode&&(this._accessibilityManager=new x.AccessibilityManager(this)),this.charMeasure.measure(this.options),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},e.prototype._setTheme=function(t){var e=this.renderer.setTheme(t);this.viewport&&this.viewport.onThemeChanged(e)},e.applyAddon=function(t){t.apply(e)},e.prototype.bindMouse=function(){var t=this,e=this.element,i=this,r=32;function n(t){var e,n;if(e=function(t){var e,r,n;switch(t.overrideType||t.type){case"mousedown":e=null!=t.button?+t.button:null!=t.which?t.which-1:null,g.isMSIE&&(e=1===e?0:4===e?1:e);break;case"mouseup":e=3;break;case"DOMMouseScroll":e=t.detail<0?64:65;break;case"wheel":e=t.wheelDeltaY>0?64:65}return n=(t.shiftKey?4:0)|(t.metaKey?8:0)|(r=t.ctrlKey?16:0),i.vt200Mouse?n&=r:i.normalMouse||(n=0),32+(n<<2)+e}(t),n=i.mouseHelper.getRawByteCoords(t,i.screenElement,i.charMeasure,i.options.lineHeight,i.cols,i.rows))switch(a(e,n),t.overrideType||t.type){case"mousedown":r=e;break;case"mouseup":r=32}}function s(t){var e=r,n=i.mouseHelper.getRawByteCoords(t,i.screenElement,i.charMeasure,i.options.lineHeight,i.cols,i.rows);n&&a(e+=32,n)}function o(t,e){if(i.utfMouse){if(2047===e)return void t.push(0);e<127?t.push(e):(e>2047&&(e=2047),t.push(192|e>>6),t.push(128|63&e))}else{if(255===e)return void t.push(0);e>127&&(e=127),t.push(e)}}function a(t,e){if(i._vt300Mouse){t&=3,e.x-=32,e.y-=32;var r=u.C0.ESC+"[24";if(0===t)r+="1";else if(1===t)r+="3";else if(2===t)r+="5";else{if(3===t)return;r+="0"}return r+="~["+e.x+","+e.y+"]\r",void i.send(r)}if(i._decLocator)return t&=3,e.x-=32,e.y-=32,0===t?t=2:1===t?t=4:2===t?t=6:3===t&&(t=3),void i.send(u.C0.ESC+"["+t+";"+(3===t?4:0)+";"+e.y+";"+e.x+";"+e.page||"0&w");if(i.urxvtMouse)return e.x-=32,e.y-=32,e.x++,e.y++,void i.send(u.C0.ESC+"["+t+";"+e.x+";"+e.y+"M");if(i.sgrMouse)return e.x-=32,e.y-=32,void i.send(u.C0.ESC+"[<"+((3==(3&t)?-4&t:t)-32)+";"+e.x+";"+e.y+(3==(3&t)?"m":"M"));var n=[];o(n,t),o(n,e.x),o(n,e.y),i.send(u.C0.ESC+"[M"+String.fromCharCode.apply(String,n))}T(e,"mousedown",function(e){if(e.preventDefault(),t.focus(),t.mouseEvents&&!t.selectionManager.shouldForceSelection(e)){if(n(e),t.vt200Mouse)return e.overrideType="mouseup",n(e),t.cancel(e);if(t.normalMouse&&T(t._document,"mousemove",s),!t.x10Mouse){var i=function(e){return n(e),t.normalMouse&&B(t._document,"mousemove",s),B(t._document,"mouseup",i),t.cancel(e)};T(t._document,"mouseup",i)}return t.cancel(e)}}),T(e,"wheel",function(e){if(t.mouseEvents)t.x10Mouse||t._vt300Mouse||t._decLocator||(n(e),e.preventDefault());else if(!t.buffer.hasScrollback){var i=t.viewport.getLinesScrolled(e);if(0===i)return;for(var r=u.C0.ESC+(t.applicationCursor?"O":"[")+(e.deltaY<0?"A":"B"),s="",o=0;o<Math.abs(i);o++)s+=r;t.send(s)}}),T(e,"wheel",function(e){if(!t.mouseEvents)return t.viewport.onWheel(e),t.cancel(e)}),T(e,"touchstart",function(e){if(!t.mouseEvents)return t.viewport.onTouchStart(e),t.cancel(e)}),T(e,"touchmove",function(e){if(!t.mouseEvents)return t.viewport.onTouchMove(e),t.cancel(e)})},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.handler=function(){},this.write=function(){},this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},e.prototype.refresh=function(t,e){this.renderer&&this.renderer.refreshRows(t,e)},e.prototype._queueLinkification=function(t,e){this.linkifier&&this.linkifier.linkifyRows(t,e)},e.prototype.showCursor=function(){this.cursorState||(this.cursorState=1,this.refresh(this.buffer.y,this.buffer.y))},e.prototype.scroll=function(t){var e=this.blankLine(void 0,t),i=this.buffer.ybase+this.buffer.scrollTop,r=this.buffer.ybase+this.buffer.scrollBottom;if(0===this.buffer.scrollTop){var n=this.buffer.lines.length===this.buffer.lines.maxLength;r===this.buffer.lines.length-1?this.buffer.lines.push(e):this.buffer.lines.splice(r+1,0,e),n?this._userScrolling&&(this.buffer.ydisp=Math.max(this.buffer.ydisp-1,0)):(this.buffer.ybase++,this._userScrolling||this.buffer.ydisp++)}else{var s=r-i+1;this.buffer.lines.shiftElements(i+1,s-1,-1),this.buffer.lines.set(r,e)}this._userScrolling||(this.buffer.ydisp=this.buffer.ybase),this.updateRange(this.buffer.scrollTop),this.updateRange(this.buffer.scrollBottom),this.emit("scroll",this.buffer.ydisp)},e.prototype.scrollLines=function(t,e){if(t<0){if(0===this.buffer.ydisp)return;this._userScrolling=!0}else t+this.buffer.ydisp>=this.buffer.ybase&&(this._userScrolling=!1);var i=this.buffer.ydisp;this.buffer.ydisp=Math.max(Math.min(this.buffer.ydisp+t,this.buffer.ybase),0),i!==this.buffer.ydisp&&(e||this.emit("scroll",this.buffer.ydisp),this.refresh(0,this.rows-1))},e.prototype.scrollPages=function(t){this.scrollLines(t*(this.rows-1))},e.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},e.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},e.prototype.scrollToLine=function(t){var e=t-this.buffer.ydisp;0!==e&&this.scrollLines(e)},e.prototype.write=function(t){var e=this;t&&(this.writeBuffer.push(t),this.options.useFlowControl&&!this._xoffSentToCatchUp&&this.writeBuffer.length>=5&&(this.send(u.C0.DC3),this._xoffSentToCatchUp=!0),!this._writeInProgress&&this.writeBuffer.length>0&&(this._writeInProgress=!0,setTimeout(function(){e._innerWrite()})))},e.prototype._innerWrite=function(){for(var t=this,e=this.writeBuffer.splice(0,300);e.length>0;){var i=e.shift();this._xoffSentToCatchUp&&0===e.length&&0===this.writeBuffer.length&&(this.send(u.C0.DC1),this._xoffSentToCatchUp=!1),this._refreshStart=this.buffer.y,this._refreshEnd=this.buffer.y;var r=this._parser.parse(i);this._parser.setState(r),this.updateRange(this.buffer.y),this.refresh(this._refreshStart,this._refreshEnd)}this.writeBuffer.length>0?setTimeout(function(){return t._innerWrite()},0):this._writeInProgress=!1},e.prototype.writeln=function(t){this.write(t+"\r\n")},e.prototype.attachCustomKeyEventHandler=function(t){this._customKeyEventHandler=t},e.prototype.registerLinkMatcher=function(t,e,i){var r=this.linkifier.registerLinkMatcher(t,e,i);return this.refresh(0,this.rows-1),r},e.prototype.deregisterLinkMatcher=function(t){this.linkifier.deregisterLinkMatcher(t)&&this.refresh(0,this.rows-1)},Object.defineProperty(e.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!0,configurable:!0}),e.prototype.addMarker=function(t){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+t)},e.prototype.hasSelection=function(){return!!this.selectionManager&&this.selectionManager.hasSelection},e.prototype.getSelection=function(){return this.selectionManager?this.selectionManager.selectionText:""},e.prototype.clearSelection=function(){this.selectionManager&&this.selectionManager.clearSelection()},e.prototype.selectAll=function(){this.selectionManager&&this.selectionManager.selectAll()},e.prototype.selectLines=function(t,e){this.selectionManager&&this.selectionManager.selectLines(t,e)},e.prototype._keyDown=function(t){if(this._customKeyEventHandler&&!1===this._customKeyEventHandler(t))return!1;if(!this._compositionHelper.keydown(t))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var e=this._evaluateKeyEscapeSequence(t);return e.scrollLines?(this.scrollLines(e.scrollLines),this.cancel(t,!0)):!!this._isThirdLevelShift(this.browser,t)||(e.cancel&&this.cancel(t,!0),!e.key||(this.emit("keydown",t),this.emit("key",e.key,t),this.showCursor(),this.handler(e.key),this.cancel(t,!0)))},e.prototype._isThirdLevelShift=function(t,e){var i=t.isMac&&!this.options.macOptionIsMeta&&e.altKey&&!e.ctrlKey&&!e.metaKey||t.isMSWindows&&e.altKey&&e.ctrlKey&&!e.metaKey;return"keypress"===e.type?i:i&&(!e.keyCode||e.keyCode>47)},e.prototype._evaluateKeyEscapeSequence=function(t){var e={cancel:!1,key:void 0,scrollLines:void 0},i=(t.shiftKey?1:0)|(t.altKey?2:0)|(t.ctrlKey?4:0)|(t.metaKey?8:0);switch(t.keyCode){case 0:"UIKeyInputUpArrow"===t.key?this.applicationCursor?e.key=u.C0.ESC+"OA":e.key=u.C0.ESC+"[A":"UIKeyInputLeftArrow"===t.key?this.applicationCursor?e.key=u.C0.ESC+"OD":e.key=u.C0.ESC+"[D":"UIKeyInputRightArrow"===t.key?this.applicationCursor?e.key=u.C0.ESC+"OC":e.key=u.C0.ESC+"[C":"UIKeyInputDownArrow"===t.key&&(this.applicationCursor?e.key=u.C0.ESC+"OB":e.key=u.C0.ESC+"[B");break;case 8:if(t.shiftKey){e.key=u.C0.BS;break}if(t.altKey){e.key=u.C0.ESC+u.C0.DEL;break}e.key=u.C0.DEL;break;case 9:if(t.shiftKey){e.key=u.C0.ESC+"[Z";break}e.key=u.C0.HT,e.cancel=!0;break;case 13:e.key=u.C0.CR,e.cancel=!0;break;case 27:e.key=u.C0.ESC,e.cancel=!0;break;case 37:i?(e.key=u.C0.ESC+"[1;"+(i+1)+"D",e.key===u.C0.ESC+"[1;3D"&&(e.key=this.browser.isMac?u.C0.ESC+"b":u.C0.ESC+"[1;5D")):this.applicationCursor?e.key=u.C0.ESC+"OD":e.key=u.C0.ESC+"[D";break;case 39:i?(e.key=u.C0.ESC+"[1;"+(i+1)+"C",e.key===u.C0.ESC+"[1;3C"&&(e.key=this.browser.isMac?u.C0.ESC+"f":u.C0.ESC+"[1;5C")):this.applicationCursor?e.key=u.C0.ESC+"OC":e.key=u.C0.ESC+"[C";break;case 38:i?(e.key=u.C0.ESC+"[1;"+(i+1)+"A",e.key===u.C0.ESC+"[1;3A"&&(e.key=u.C0.ESC+"[1;5A")):this.applicationCursor?e.key=u.C0.ESC+"OA":e.key=u.C0.ESC+"[A";break;case 40:i?(e.key=u.C0.ESC+"[1;"+(i+1)+"B",e.key===u.C0.ESC+"[1;3B"&&(e.key=u.C0.ESC+"[1;5B")):this.applicationCursor?e.key=u.C0.ESC+"OB":e.key=u.C0.ESC+"[B";break;case 45:t.shiftKey||t.ctrlKey||(e.key=u.C0.ESC+"[2~");break;case 46:e.key=i?u.C0.ESC+"[3;"+(i+1)+"~":u.C0.ESC+"[3~";break;case 36:i?e.key=u.C0.ESC+"[1;"+(i+1)+"H":this.applicationCursor?e.key=u.C0.ESC+"OH":e.key=u.C0.ESC+"[H";break;case 35:i?e.key=u.C0.ESC+"[1;"+(i+1)+"F":this.applicationCursor?e.key=u.C0.ESC+"OF":e.key=u.C0.ESC+"[F";break;case 33:t.shiftKey?e.scrollLines=-(this.rows-1):e.key=u.C0.ESC+"[5~";break;case 34:t.shiftKey?e.scrollLines=this.rows-1:e.key=u.C0.ESC+"[6~";break;case 112:e.key=i?u.C0.ESC+"[1;"+(i+1)+"P":u.C0.ESC+"OP";break;case 113:e.key=i?u.C0.ESC+"[1;"+(i+1)+"Q":u.C0.ESC+"OQ";break;case 114:e.key=i?u.C0.ESC+"[1;"+(i+1)+"R":u.C0.ESC+"OR";break;case 115:e.key=i?u.C0.ESC+"[1;"+(i+1)+"S":u.C0.ESC+"OS";break;case 116:e.key=i?u.C0.ESC+"[15;"+(i+1)+"~":u.C0.ESC+"[15~";break;case 117:e.key=i?u.C0.ESC+"[17;"+(i+1)+"~":u.C0.ESC+"[17~";break;case 118:e.key=i?u.C0.ESC+"[18;"+(i+1)+"~":u.C0.ESC+"[18~";break;case 119:e.key=i?u.C0.ESC+"[19;"+(i+1)+"~":u.C0.ESC+"[19~";break;case 120:e.key=i?u.C0.ESC+"[20;"+(i+1)+"~":u.C0.ESC+"[20~";break;case 121:e.key=i?u.C0.ESC+"[21;"+(i+1)+"~":u.C0.ESC+"[21~";break;case 122:e.key=i?u.C0.ESC+"[23;"+(i+1)+"~":u.C0.ESC+"[23~";break;case 123:e.key=i?u.C0.ESC+"[24;"+(i+1)+"~":u.C0.ESC+"[24~";break;default:if(!t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)if(this.browser.isMac&&!this.options.macOptionIsMeta||!t.altKey||t.metaKey)this.browser.isMac&&!t.altKey&&!t.ctrlKey&&t.metaKey&&65===t.keyCode&&this.selectAll();else{var r=E[t.keyCode],n=r&&r[t.shiftKey?1:0];if(n)e.key=u.C0.ESC+n;else if(t.keyCode>=65&&t.keyCode<=90){var s=t.ctrlKey?t.keyCode-64:t.keyCode+32;e.key=u.C0.ESC+String.fromCharCode(s)}}else t.keyCode>=65&&t.keyCode<=90?e.key=String.fromCharCode(t.keyCode-64):32===t.keyCode?e.key=String.fromCharCode(0):t.keyCode>=51&&t.keyCode<=55?e.key=String.fromCharCode(t.keyCode-51+27):56===t.keyCode?e.key=String.fromCharCode(127):219===t.keyCode?e.key=String.fromCharCode(27):220===t.keyCode?e.key=String.fromCharCode(28):221===t.keyCode&&(e.key=String.fromCharCode(29))}return e},e.prototype.setgLevel=function(t){this.glevel=t,this.charset=this.charsets[t]},e.prototype.setgCharset=function(t,e){this.charsets[t]=e,this.glevel===t&&(this.charset=e)},e.prototype._keyPress=function(t){var e;if(this._customKeyEventHandler&&!1===this._customKeyEventHandler(t))return!1;if(this.cancel(t),t.charCode)e=t.charCode;else if(null==t.which)e=t.keyCode;else{if(0===t.which||0===t.charCode)return!1;e=t.which}return!(!e||(t.altKey||t.ctrlKey||t.metaKey)&&!this._isThirdLevelShift(this.browser,t)||(e=String.fromCharCode(e),this.emit("keypress",e,t),this.emit("key",e,t),this.showCursor(),this.handler(e),0))},e.prototype.send=function(t){var e=this;this._sendDataQueue||setTimeout(function(){e.handler(e._sendDataQueue),e._sendDataQueue=""},1),this._sendDataQueue+=t},e.prototype.bell=function(){var t=this;this.emit("bell"),this._soundBell()&&this.soundManager.playBellSound(),this._visualBell()&&(this.element.classList.add("visual-bell-active"),clearTimeout(this._visualBellTimer),this._visualBellTimer=window.setTimeout(function(){t.element.classList.remove("visual-bell-active")},200))},e.prototype.log=function(t,e){this.options.debug&&this._context.console&&this._context.console.log&&this._context.console.log(t,e)},e.prototype.error=function(t,e){this.options.debug&&this._context.console&&this._context.console.error&&this._context.console.error(t,e)},e.prototype.resize=function(t,e){isNaN(t)||isNaN(e)||(t!==this.cols||e!==this.rows?(t<1&&(t=1),e<1&&(e=1),this.buffers.resize(t,e),this.cols=t,this.rows=e,this.buffers.setupTabStops(this.cols),this.charMeasure&&this.charMeasure.measure(this.options),this.refresh(0,this.rows-1),this.emit("resize",{cols:t,rows:e})):this.charMeasure.width&&this.charMeasure.height||this.charMeasure.measure(this.options))},e.prototype.updateRange=function(t){t<this._refreshStart&&(this._refreshStart=t),t>this._refreshEnd&&(this._refreshEnd=t)},e.prototype.maxRange=function(){this._refreshStart=0,this._refreshEnd=this.rows-1},e.prototype.eraseRight=function(t,e){var i=this.buffer.lines.get(this.buffer.ybase+e);if(i){for(var r=[this.eraseAttr()," ",1,32];t<this.cols;t++)i[t]=r;this.updateRange(e)}},e.prototype.eraseLeft=function(t,e){var i=this.buffer.lines.get(this.buffer.ybase+e);if(i){var r=[this.eraseAttr()," ",1,32];for(t++;t--;)i[t]=r;this.updateRange(e)}},e.prototype.clear=function(){if(0!==this.buffer.ybase||0!==this.buffer.y){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var t=1;t<this.rows;t++)this.buffer.lines.push(this.blankLine());this.refresh(0,this.rows-1),this.emit("scroll",this.buffer.ydisp)}},e.prototype.eraseLine=function(t){this.eraseRight(0,t)},e.prototype.blankLine=function(t,e,i){var r=[t?this.eraseAttr():this.defAttr," ",1,32],n=[];e&&(n.isWrapped=e),i=i||this.cols;for(var s=0;s<i;s++)n[s]=r;return n},e.prototype.ch=function(t){return t?[this.eraseAttr()," ",1,32]:[this.defAttr," ",1,32]},e.prototype.is=function(t){return 0===(this.options.termName+"").indexOf(t)},e.prototype.handler=function(t){this.options.disableStdin||(this.selectionManager&&this.selectionManager.hasSelection&&this.selectionManager.clearSelection(),this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),this.emit("data",t))},e.prototype.handleTitle=function(t){this.emit("title",t)},e.prototype.index=function(){this.buffer.y++,this.buffer.y>this.buffer.scrollBottom&&(this.buffer.y--,this.scroll()),this.buffer.x>=this.cols&&this.buffer.x--},e.prototype.reverseIndex=function(){if(this.buffer.y===this.buffer.scrollTop){var t=this.buffer.scrollBottom-this.buffer.scrollTop;this.buffer.lines.shiftElements(this.buffer.y+this.buffer.ybase,t,1),this.buffer.lines.set(this.buffer.y+this.buffer.ybase,this.blankLine(!0)),this.updateRange(this.buffer.scrollTop),this.updateRange(this.buffer.scrollBottom)}else this.buffer.y--},e.prototype.reset=function(){this.options.rows=this.rows,this.options.cols=this.cols;var t=this._customKeyEventHandler,e=this._inputHandler;this._setup(),this._customKeyEventHandler=t,this._inputHandler=e,this.refresh(0,this.rows-1),this.viewport&&this.viewport.syncScrollArea()},e.prototype.tabSet=function(){this.buffer.tabs[this.buffer.x]=!0},e.prototype.cancel=function(t,e){if(this.options.cancelEvents||e)return t.preventDefault(),t.stopPropagation(),!1},e.prototype.matchColor=function(t,e,i){return function(t,e,i){var r=t<<16|e<<8|i;if(null!=O[r])return O[r];for(var n,s,o=1/0,a=-1,l=0;l<k.DEFAULT_ANSI_COLORS.length;l++){if(0===(s=D(t,e,i,(n=k.DEFAULT_ANSI_COLORS[l].rgba)>>>24,n>>>16&255,n>>>8&255))){a=l;break}s<o&&(o=s,a=l)}return O[r]=a}(t,e,i)},e.prototype._visualBell=function(){return!1},e.prototype._soundBell=function(){return"sound"===this.options.bellStyle},e}(l.EventEmitter);i.Terminal=R;var T=function(t,e,i,r){Array.isArray(t)||(t=[t]),t.forEach(function(t){t.addEventListener(e,i,r||!1)})};function B(t,e,i,r){void 0===r&&(r=!1),t.removeEventListener(e,i,r)}var O={};function D(t,e,i,r,n,s){return Math.pow(30*(t-r),2)+Math.pow(59*(e-n),2)+Math.pow(11*(i-s),2)}},{"./AccessibilityManager":1,"./Buffer":2,"./BufferSet":3,"./CompositionHelper":6,"./EscapeSequences":7,"./EventEmitter":8,"./InputHandler":9,"./Linkifier":10,"./Parser":11,"./SelectionManager":12,"./SoundManager":14,"./Strings":15,"./Viewport":18,"./handlers/Clipboard":20,"./input/MouseZoneManager":21,"./renderer/ColorManager":23,"./renderer/Renderer":27,"./shared/utils/Browser":36,"./utils/CharMeasure":37,"./utils/Clone":39,"./utils/MouseHelper":41,"./utils/ScreenDprMonitor":43}],17:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(t){t.HOVER="linkhover",t.TOOLTIP="linktooltip",t.LEAVE="linkleave"}(i.LinkHoverEventTypes||(i.LinkHoverEventTypes={}))},{}],18:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=15,n=function(){function t(t,e,i,n){var s=this;this._terminal=t,this._viewportElement=e,this._scrollArea=i,this._charMeasure=n,this.scrollBarWidth=0,this._currentRowHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._wheelPartialScroll=0,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||r,this._viewportElement.addEventListener("scroll",this._onScroll.bind(this)),setTimeout(function(){return s.syncScrollArea()},0)}return t.prototype.onThemeChanged=function(t){this._viewportElement.style.backgroundColor=t.background.css},t.prototype._refresh=function(){if(this._charMeasure.height>0){this._currentRowHeight=this._terminal.renderer.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var t=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._terminal.renderer.dimensions.canvasHeight);this._lastRecordedBufferHeight!==t&&(this._lastRecordedBufferHeight=t,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}},t.prototype.syncScrollArea=function(){this._lastRecordedBufferLength!==this._terminal.buffer.lines.length?(this._lastRecordedBufferLength=this._terminal.buffer.lines.length,this._refresh()):this._lastRecordedViewportHeight!==this._terminal.renderer.dimensions.canvasHeight?this._refresh():this._terminal.renderer.dimensions.scaledCellHeight/window.devicePixelRatio!==this._currentRowHeight&&this._refresh();var t=this._terminal.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==t&&(this._viewportElement.scrollTop=t)},t.prototype._onScroll=function(t){if(this._viewportElement.offsetParent){var e=Math.round(this._viewportElement.scrollTop/this._currentRowHeight)-this._terminal.buffer.ydisp;this._terminal.scrollLines(e,!0)}},t.prototype.onWheel=function(t){var e=this._getPixelsScrolled(t);0!==e&&(this._viewportElement.scrollTop+=e,t.preventDefault())},t.prototype._getPixelsScrolled=function(t){if(0===t.deltaY)return 0;var e=t.deltaY;return t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._currentRowHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._currentRowHeight*this._terminal.rows),e},t.prototype.getLinesScrolled=function(t){if(0===t.deltaY)return 0;var e=t.deltaY;return t.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(e/=this._currentRowHeight+0,this._wheelPartialScroll+=e,e=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._terminal.rows),e},t.prototype.onTouchStart=function(t){this._lastTouchY=t.touches[0].pageY},t.prototype.onTouchMove=function(t){var e=this._lastTouchY-t.touches[0].pageY;this._lastTouchY=t.touches[0].pageY,0!==e&&(this._viewportElement.scrollTop+=e,t.preventDefault())},t}();i.Viewport=n},{}],19:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r,n=t("../EscapeSequences");!function(t){t.Up="A",t.Down="B",t.Right="C",t.Left="D"}(r||(r={}));var s=function(){function t(t,e){var i;this._mouseEvent=t,this._terminal=e,this._lines=this._terminal.buffer.lines,this._startCol=this._terminal.buffer.x,this._startRow=this._terminal.buffer.y,i=this._terminal.mouseHelper.getCoords(this._mouseEvent,this._terminal.element,this._terminal.charMeasure,this._terminal.options.lineHeight,this._terminal.cols,this._terminal.rows,!1).map(function(t){return t-1}),this._endCol=i[0],this._endRow=i[1]}return t.prototype.move=function(){this._mouseEvent.altKey&&this._terminal.send(this._arrowSequences())},t.prototype._arrowSequences=function(){return this._terminal.buffer.hasScrollback?this._moveHorizontallyOnly():this._resetStartingRow()+this._moveToRequestedRow()+this._moveToRequestedCol()},t.prototype._resetStartingRow=function(){return 0===this._moveToRequestedRow().length?"":o(this._bufferLine(this._startCol,this._startRow,this._startCol,this._startRow-this._wrappedRowsForRow(this._startRow),!1).length,this._sequence(r.Left))},t.prototype._moveToRequestedRow=function(){var t=this._startRow-this._wrappedRowsForRow(this._startRow),e=this._endRow-this._wrappedRowsForRow(this._endRow);return o(Math.abs(t-e)-this._wrappedRowsCount(),this._sequence(this._verticalDirection()))},t.prototype._moveToRequestedCol=function(){var t;t=this._moveToRequestedRow().length>0?this._endRow-this._wrappedRowsForRow(this._endRow):this._startRow;var e=this._endRow,i=this._horizontalDirection();return o(this._bufferLine(this._startCol,t,this._endCol,e,i===r.Right).length,this._sequence(i))},t.prototype._moveHorizontallyOnly=function(){var t=this._horizontalDirection();return o(Math.abs(this._startCol-this._endCol),this._sequence(t))},t.prototype._wrappedRowsCount=function(){for(var t=0,e=this._startRow-this._wrappedRowsForRow(this._startRow),i=this._endRow-this._wrappedRowsForRow(this._endRow),n=0;n<Math.abs(e-i);n++){var s=this._verticalDirection()===r.Up?-1:1;this._lines.get(e+s*n).isWrapped&&t++}return t},t.prototype._wrappedRowsForRow=function(t){for(var e=0,i=this._lines.get(t).isWrapped;i&&t>=0&&t<this._terminal.rows;)e++,t--,i=this._lines.get(t).isWrapped;return e},t.prototype._horizontalDirection=function(){var t;return t=this._moveToRequestedRow().length>0?this._endRow-this._wrappedRowsForRow(this._endRow):this._startRow,this._startCol<this._endCol&&t<=this._endRow||this._startCol>=this._endCol&&t<this._endRow?r.Right:r.Left},t.prototype._verticalDirection=function(){return this._startRow>this._endRow?r.Up:r.Down},t.prototype._bufferLine=function(t,e,i,r,n){for(var s=t,o=e,a="";s!==i||o!==r;)s+=n?1:-1,n&&s>this._terminal.cols-1?(a+=this._terminal.buffer.translateBufferLineToString(o,!1,t,s),s=0,t=0,o++):!n&&s<0&&(a+=this._terminal.buffer.translateBufferLineToString(o,!1,0,t+1),t=s=this._terminal.cols-1,o--);return a+this._terminal.buffer.translateBufferLineToString(o,!1,t,s)},t.prototype._sequence=function(t){var e=this._terminal.applicationCursor?"O":"[";return n.C0.ESC+e+t},t}();function o(t,e){t=Math.floor(t);for(var i="",r=0;r<t;r++)i+=e;return i}i.AltClickHandler=s},{"../EscapeSequences":7}],20:[function(t,e,i){"use strict";function r(t){return t.replace(/\r?\n/g,"\r")}function n(t,e){return e?"[200~"+t+"[201~":t}function s(t,e){e.style.position="fixed",e.style.width="20px",e.style.height="20px",e.style.left=t.clientX-10+"px",e.style.top=t.clientY-10+"px",e.style.zIndex="1000",e.focus(),setTimeout(function(){e.style.position=null,e.style.width=null,e.style.height=null,e.style.left=null,e.style.top=null,e.style.zIndex=null},200)}Object.defineProperty(i,"__esModule",{value:!0}),i.prepareTextForTerminal=r,i.bracketTextForPaste=n,i.copyHandler=function(t,e,i){e.browser.isMSIE?window.clipboardData.setData("Text",i.selectionText):t.clipboardData.setData("text/plain",i.selectionText),t.preventDefault()},i.pasteHandler=function(t,e){t.stopPropagation();var i=function(i){i=n(i=r(i),e.bracketedPasteMode),e.handler(i),e.textarea.value="",e.emit("paste",i),e.cancel(t)};e.browser.isMSIE?window.clipboardData&&i(window.clipboardData.getData("Text")):t.clipboardData&&i(t.clipboardData.getData("text/plain"))},i.moveTextAreaUnderMouseCursor=s,i.rightClickHandler=function(t,e,i,r){s(t,e),r&&!i.isClickInSelection(t)&&i.selectWordAtCursor(t),e.value=i.selectionText,e.select()}},{}],21:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t){var e=this;this._terminal=t,this._zones=[],this._areZonesActive=!1,this._tooltipTimeout=null,this._currentZone=null,this._lastHoverCoords=[null,null],this._terminal.element.addEventListener("mousedown",function(t){return e._onMouseDown(t)}),this._mouseMoveListener=function(t){return e._onMouseMove(t)},this._clickListener=function(t){return e._onClick(t)}}return t.prototype.add=function(t){this._zones.push(t),1===this._zones.length&&this._activate()},t.prototype.clearAll=function(t,e){if(0!==this._zones.length){e||(t=0,e=this._terminal.rows-1);for(var i=0;i<this._zones.length;i++){var r=this._zones[i];(r.y1>t&&r.y1<=e+1||r.y2>t&&r.y2<=e+1||r.y1<t&&r.y2>e+1)&&(this._currentZone&&this._currentZone===r&&(this._currentZone.leaveCallback(),this._currentZone=null),this._zones.splice(i--,1))}0===this._zones.length&&this._deactivate()}},t.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._terminal.element.addEventListener("mousemove",this._mouseMoveListener),this._terminal.element.addEventListener("click",this._clickListener))},t.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._terminal.element.removeEventListener("mousemove",this._mouseMoveListener),this._terminal.element.removeEventListener("click",this._clickListener))},t.prototype._onMouseMove=function(t){this._lastHoverCoords[0]===t.pageX&&this._lastHoverCoords[1]===t.pageY||(this._onHover(t),this._lastHoverCoords=[t.pageX,t.pageY])},t.prototype._onHover=function(t){var e=this,i=this._findZoneEventAt(t);i!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=null,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),i&&(this._currentZone=i,i.hoverCallback&&i.hoverCallback(t),this._tooltipTimeout=setTimeout(function(){return e._onTooltip(t)},500)))},t.prototype._onTooltip=function(t){this._tooltipTimeout=null;var e=this._findZoneEventAt(t);e&&e.tooltipCallback&&e.tooltipCallback(t)},t.prototype._onMouseDown=function(t){if(this._areZonesActive){var e=this._findZoneEventAt(t);e&&e.willLinkActivate(t)&&(t.preventDefault(),t.stopImmediatePropagation())}},t.prototype._onClick=function(t){var e=this._findZoneEventAt(t);e&&(e.clickCallback(t),t.preventDefault(),t.stopImmediatePropagation())},t.prototype._findZoneEventAt=function(t){var e=this._terminal.mouseHelper.getCoords(t,this._terminal.screenElement,this._terminal.charMeasure,this._terminal.options.lineHeight,this._terminal.cols,this._terminal.rows);if(!e)return null;for(var i=e[0],r=e[1],n=0;n<this._zones.length;n++){var s=this._zones[n];if(s.y1===s.y2){if(r===s.y1&&i>=s.x1&&i<s.x2)return s}else if(r===s.y1&&i>=s.x1||r===s.y2&&i<s.x2||r>s.y1&&r<s.y2)return s}return null},t}();i.MouseZoneManager=r;i.MouseZone=function(t,e,i,r,n,s,o,a,l){this.x1=t,this.y1=e,this.x2=i,this.y2=r,this.clickCallback=n,this.hoverCallback=s,this.tooltipCallback=o,this.leaveCallback=a,this.willLinkActivate=l}},{}],22:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./atlas/Types"),n=t("../shared/atlas/Types"),s=t("./atlas/CharAtlas"),o=t("../Buffer"),a=function(){function t(t,e,i,r,n){this._container=t,this._alpha=r,this._colors=n,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+e+"-layer"),this._canvas.style.zIndex=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return t.prototype._initCanvas=function(){this._ctx=this._canvas.getContext("2d",{alpha:this._alpha}),this._alpha||this.clearAll()},t.prototype.onOptionsChanged=function(t){},t.prototype.onBlur=function(t){},t.prototype.onFocus=function(t){},t.prototype.onCursorMove=function(t){},t.prototype.onGridChanged=function(t,e,i){},t.prototype.onSelectionChanged=function(t,e,i){},t.prototype.onThemeChanged=function(t,e){this._refreshCharAtlas(t,e)},t.prototype.setTransparency=function(t,e){if(e!==this._alpha){var i=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,i),this._refreshCharAtlas(t,this._colors),this.onGridChanged(t,0,t.rows-1)}},t.prototype._refreshCharAtlas=function(t,e){var i=this;if(!(this._scaledCharWidth<=0&&this._scaledCharHeight<=0)){this._charAtlas=null;var r=s.acquireCharAtlas(t,e,this._scaledCharWidth,this._scaledCharHeight);r instanceof HTMLCanvasElement?this._charAtlas=r:r.then(function(t){return i._charAtlas=t})}},t.prototype.resize=function(t,e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this.clearAll(),this._refreshCharAtlas(t,this._colors)},t.prototype.fillCells=function(t,e,i,r){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight)},t.prototype.fillBottomLineAtCells=function(t,e,i){void 0===i&&(i=1),this._ctx.fillRect(t*this._scaledCellWidth,(e+1)*this._scaledCellHeight-window.devicePixelRatio-1,i*this._scaledCellWidth,window.devicePixelRatio)},t.prototype.fillLeftLineAtCell=function(t,e){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,window.devicePixelRatio,this._scaledCellHeight)},t.prototype.strokeRectAtCell=function(t,e,i,r){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,e*this._scaledCellHeight+window.devicePixelRatio/2,i*this._scaledCellWidth-window.devicePixelRatio,r*this._scaledCellHeight-window.devicePixelRatio)},t.prototype.clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},t.prototype.clearCells=function(t,e,i,r){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight))},t.prototype.fillCharTrueColor=function(t,e,i,r){this._ctx.font=this._getFont(t,!1),this._ctx.textBaseline="top",this._clipRow(t,r),this._ctx.fillText(e[o.CHAR_DATA_CHAR_INDEX],i*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop)},t.prototype.drawChar=function(t,e,i,s,o,a,l,c,h,u){var f=0;l<256?f=l+2:h&&t.options.enableBold&&(f=1);var p=i<256,d=f>1&&l<16&&(l<8||h),_=l>=256,m=c>=256;if(this._charAtlas&&p&&(d||_)&&m){var y=this._scaledCharWidth+n.CHAR_ATLAS_CELL_SPACING,g=this._scaledCharHeight+n.CHAR_ATLAS_CELL_SPACING;u&&(this._ctx.globalAlpha=r.DIM_OPACITY),h&&!t.options.enableBold&&f>1&&(f-=8),this._ctx.drawImage(this._charAtlas,i*y,f*g,y,this._scaledCharHeight,o*this._scaledCellWidth+this._scaledCharLeft,a*this._scaledCellHeight+this._scaledCharTop,y,this._scaledCharHeight)}else this._drawUncachedChar(t,e,s,l,o,a,h&&t.options.enableBold,u)},t.prototype._drawUncachedChar=function(t,e,i,n,s,o,a,l){this._ctx.save(),this._ctx.font=this._getFont(t,a),this._ctx.textBaseline="top",n===r.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:this._ctx.fillStyle=n<256?this._colors.ansi[n].css:this._colors.foreground.css,this._clipRow(t,o),l&&(this._ctx.globalAlpha=r.DIM_OPACITY),this._ctx.fillText(e,s*this._scaledCellWidth+this._scaledCharLeft,o*this._scaledCellHeight+this._scaledCharTop),this._ctx.restore()},t.prototype._clipRow=function(t,e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,t.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},t.prototype._getFont=function(t,e){return(e?t.options.fontWeightBold:t.options.fontWeight)+" "+t.options.fontSize*window.devicePixelRatio+"px "+t.options.fontFamily},t}();i.BaseRenderLayer=a},{"../Buffer":2,"../shared/atlas/Types":35,"./atlas/CharAtlas":31,"./atlas/Types":33}],23:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=l("#ffffff"),n=l("#000000"),s=l("#ffffff"),o=l("#000000"),a={css:"rgba(255, 255, 255, 0.3)",rgba:4294967159};function l(t){return{css:t,rgba:parseInt(t.slice(1),16)<<8|255}}function c(t){var e=t.toString(16);return e.length<2?"0"+e:e}i.DEFAULT_ANSI_COLORS=function(){for(var t=[l("#2e3436"),l("#cc0000"),l("#4e9a06"),l("#c4a000"),l("#3465a4"),l("#75507b"),l("#06989a"),l("#d3d7cf"),l("#555753"),l("#ef2929"),l("#8ae234"),l("#fce94f"),l("#729fcf"),l("#ad7fa8"),l("#34e2e2"),l("#eeeeec")],e=[0,95,135,175,215,255],i=0;i<216;i++){var r=e[i/36%6|0],n=e[i/6%6|0],s=e[i%6];t.push({css:"#"+c(r)+c(n)+c(s),rgba:(r<<24|n<<16|s<<8|255)>>>0})}for(i=0;i<24;i++){var o=8+10*i,a=c(o);t.push({css:"#"+a+a+a,rgba:(o<<24|o<<16|o<<8|255)>>>0})}return t}();var h=function(){function t(t,e){this.allowTransparency=e;var l=t.createElement("canvas");l.width=1,l.height=1,this._ctx=l.getContext("2d"),this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this.colors={foreground:r,background:n,cursor:s,cursorAccent:o,selection:a,ansi:i.DEFAULT_ANSI_COLORS.slice()}}return t.prototype.setTheme=function(t){this.colors.foreground=this._parseColor(t.foreground,r),this.colors.background=this._parseColor(t.background,n),this.colors.cursor=this._parseColor(t.cursor,s,!0),this.colors.cursorAccent=this._parseColor(t.cursorAccent,o,!0),this.colors.selection=this._parseColor(t.selection,a,!0),this.colors.ansi[0]=this._parseColor(t.black,i.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(t.red,i.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(t.green,i.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(t.yellow,i.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(t.blue,i.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(t.magenta,i.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(t.cyan,i.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(t.white,i.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(t.brightBlack,i.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(t.brightRed,i.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(t.brightGreen,i.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(t.brightYellow,i.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(t.brightBlue,i.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(t.brightMagenta,i.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(t.brightCyan,i.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(t.brightWhite,i.DEFAULT_ANSI_COLORS[15])},t.prototype._parseColor=function(t,e,i){if(void 0===i&&(i=this.allowTransparency),!t)return e;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=t,"string"!=typeof this._ctx.fillStyle)return console.warn("Color: "+t+" is invalid using fallback "+e.css),e;this._ctx.fillRect(0,0,1,1);var r=this._ctx.getImageData(0,0,1,1).data;return i||255===r[3]?{css:t,rgba:(r[0]<<24|r[1]<<16|r[2]<<8|r[3])>>>0}:(console.warn("Color: "+t+" is using transparency, but allowTransparency is false. Using fallback "+e.css+"."),e)},t}();i.ColorManager=h},{}],24:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("../Buffer"),o=function(t){function e(e,i,r){var n=t.call(this,e,"cursor",i,!0,r)||this;return n._state={x:null,y:null,isFocused:null,style:null,width:null},n._cursorRenderers={bar:n._renderBarCursor.bind(n),block:n._renderBlockCursor.bind(n),underline:n._renderUnderlineCursor.bind(n)},n}return n(e,t),e.prototype.resize=function(e,i){t.prototype.resize.call(this,e,i),this._state={x:null,y:null,isFocused:null,style:null,width:null}},e.prototype.reset=function(t){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=null,this.onOptionsChanged(t))},e.prototype.onBlur=function(t){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),t.refresh(t.buffer.y,t.buffer.y)},e.prototype.onFocus=function(t){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume(t):t.refresh(t.buffer.y,t.buffer.y)},e.prototype.onOptionsChanged=function(t){var e=this;t.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new a(t,function(){e._render(t,!0)})):(this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=null),t.refresh(t.buffer.y,t.buffer.y))},e.prototype.onCursorMove=function(t){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation(t)},e.prototype.onGridChanged=function(t,e,i){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(t,!1):this._cursorBlinkStateManager.restartBlinkAnimation(t)},e.prototype._render=function(t,e){if(t.cursorState&&!t.cursorHidden){var i=t.buffer.ybase+t.buffer.y,r=i-t.buffer.ydisp;if(r<0||r>=t.rows)this._clearCursor();else{var n=t.buffer.lines.get(i)[t.buffer.x];if(n){if(!t.isFocused)return this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._renderBlurCursor(t,t.buffer.x,r,n),this._ctx.restore(),this._state.x=t.buffer.x,this._state.y=r,this._state.isFocused=!1,this._state.style=t.options.cursorStyle,void(this._state.width=n[s.CHAR_DATA_WIDTH_INDEX]);if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===t.buffer.x&&this._state.y===r&&this._state.isFocused===t.isFocused&&this._state.style===t.options.cursorStyle&&this._state.width===n[s.CHAR_DATA_WIDTH_INDEX])return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[t.options.cursorStyle||"block"](t,t.buffer.x,r,n),this._ctx.restore(),this._state.x=t.buffer.x,this._state.y=r,this._state.isFocused=!1,this._state.style=t.options.cursorStyle,this._state.width=n[s.CHAR_DATA_WIDTH_INDEX]}else this._clearCursor()}}}else this._clearCursor()},e.prototype._clearCursor=function(){this._state&&(this.clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:null,y:null,isFocused:null,style:null,width:null})},e.prototype._renderBarCursor=function(t,e,i,r){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this.fillLeftLineAtCell(e,i),this._ctx.restore()},e.prototype._renderBlockCursor=function(t,e,i,r){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this.fillCells(e,i,r[s.CHAR_DATA_WIDTH_INDEX],1),this._ctx.fillStyle=this._colors.cursorAccent.css,this.fillCharTrueColor(t,r,e,i),this._ctx.restore()},e.prototype._renderUnderlineCursor=function(t,e,i,r){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this.fillBottomLineAtCells(e,i),this._ctx.restore()},e.prototype._renderBlurCursor=function(t,e,i,r){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this.strokeRectAtCell(e,i,r[s.CHAR_DATA_WIDTH_INDEX],1),this._ctx.restore()},e}(t("./BaseRenderLayer").BaseRenderLayer);i.CursorRenderLayer=o;var a=function(){function t(t,e){this._renderCallback=e,this.isCursorVisible=!0,t.isFocused&&this._restartInterval()}return Object.defineProperty(t.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=null),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=null),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=null)},t.prototype.restartBlinkAnimation=function(t){var e=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){e._renderCallback(),e._animationFrame=null})))},t.prototype._restartInterval=function(t){var e=this;void 0===t&&(t=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=setTimeout(function(){if(e._animationTimeRestarted){var t=600-(Date.now()-e._animationTimeRestarted);if(e._animationTimeRestarted=null,t>0)return void e._restartInterval(t)}e.isCursorVisible=!1,e._animationFrame=window.requestAnimationFrame(function(){e._renderCallback(),e._animationFrame=null}),e._blinkInterval=setInterval(function(){if(e._animationTimeRestarted){var t=600-(Date.now()-e._animationTimeRestarted);return e._animationTimeRestarted=null,void e._restartInterval(t)}e.isCursorVisible=!e.isCursorVisible,e._animationFrame=window.requestAnimationFrame(function(){e._renderCallback(),e._animationFrame=null})},600)},t)},t.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=null),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=null),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=null)},t.prototype.resume=function(t){this._animationTimeRestarted=null,this._restartInterval(),this.restartBlinkAnimation(t)},t}()},{"../Buffer":2,"./BaseRenderLayer":22}],25:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(){this.cache=[]}return t.prototype.resize=function(t,e){for(var i=0;i<t;i++){this.cache.length<=i&&this.cache.push([]);for(var r=this.cache[i].length;r<e;r++)this.cache[i].push(null);this.cache[i].length=e}this.cache.length=t},t.prototype.clear=function(){for(var t=0;t<this.cache.length;t++)for(var e=0;e<this.cache[t].length;e++)this.cache[t][e]=null},t}();i.GridCache=r},{}],26:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("../Types"),o=function(t){function e(e,i,r,n){var o=t.call(this,e,"link",i,!0,r)||this;return o._state=null,n.linkifier.on(s.LinkHoverEventTypes.HOVER,function(t){return o._onLinkHover(t)}),n.linkifier.on(s.LinkHoverEventTypes.LEAVE,function(t){return o._onLinkLeave(t)}),o}return n(e,t),e.prototype.resize=function(e,i){t.prototype.resize.call(this,e,i),this._state=null},e.prototype.reset=function(t){this._clearCurrentLink()},e.prototype._clearCurrentLink=function(){if(this._state){this.clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var t=this._state.y2-this._state.y1-1;t>0&&this.clearCells(0,this._state.y1+1,this._state.cols,t),this.clearCells(0,this._state.y2,this._state.x2,1),this._state=null}},e.prototype._onLinkHover=function(t){if(this._ctx.fillStyle=this._colors.foreground.css,t.y1===t.y2)this.fillBottomLineAtCells(t.x1,t.y1,t.x2-t.x1);else{this.fillBottomLineAtCells(t.x1,t.y1,t.cols-t.x1);for(var e=t.y1+1;e<t.y2;e++)this.fillBottomLineAtCells(0,e,t.cols);this.fillBottomLineAtCells(0,t.y2,t.x2)}this._state=t},e.prototype._onLinkLeave=function(t){this._clearCurrentLink()},e}(t("./BaseRenderLayer").BaseRenderLayer);i.LinkRenderLayer=o},{"../Types":17,"./BaseRenderLayer":22}],27:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("./TextRenderLayer"),o=t("./SelectionRenderLayer"),a=t("./CursorRenderLayer"),l=t("./ColorManager"),c=t("./LinkRenderLayer"),h=t("../EventEmitter"),u=t("../utils/RenderDebouncer"),f=t("../utils/ScreenDprMonitor"),p=function(t){function e(e,i){var r=t.call(this)||this;r._terminal=e,r._isPaused=!1,r._needsFullRefresh=!1;var n=r._terminal.options.allowTransparency;(r.colorManager=new l.ColorManager(document,n),i&&r.colorManager.setTheme(i),r._renderLayers=[new s.TextRenderLayer(r._terminal.screenElement,0,r.colorManager.colors,n),new o.SelectionRenderLayer(r._terminal.screenElement,1,r.colorManager.colors),new c.LinkRenderLayer(r._terminal.screenElement,2,r.colorManager.colors,r._terminal),new a.CursorRenderLayer(r._terminal.screenElement,3,r.colorManager.colors)],r.dimensions={scaledCharWidth:null,scaledCharHeight:null,scaledCellWidth:null,scaledCellHeight:null,scaledCharLeft:null,scaledCharTop:null,scaledCanvasWidth:null,scaledCanvasHeight:null,canvasWidth:null,canvasHeight:null,actualCellWidth:null,actualCellHeight:null},r._devicePixelRatio=window.devicePixelRatio,r._updateDimensions(),r.onOptionsChanged(),r._renderDebouncer=new u.RenderDebouncer(r._terminal,r._renderRows.bind(r)),r._screenDprMonitor=new f.ScreenDprMonitor,r._screenDprMonitor.setListener(function(){return r.onWindowResize(window.devicePixelRatio)}),"IntersectionObserver"in window)&&new IntersectionObserver(function(t){return r.onIntersectionChange(t[0])},{threshold:0}).observe(r._terminal.element);return r}return n(e,t),e.prototype.onIntersectionChange=function(t){this._isPaused=0===t.intersectionRatio,!this._isPaused&&this._needsFullRefresh&&this._terminal.refresh(0,this._terminal.rows-1)},e.prototype.onWindowResize=function(t){this._devicePixelRatio!==t&&(this._devicePixelRatio=t,this.onResize(this._terminal.cols,this._terminal.rows))},e.prototype.setTheme=function(t){var e=this;return this.colorManager.setTheme(t),this._renderLayers.forEach(function(t){t.onThemeChanged(e._terminal,e.colorManager.colors),t.reset(e._terminal)}),this._isPaused?this._needsFullRefresh=!0:this._terminal.refresh(0,this._terminal.rows-1),this.colorManager.colors},e.prototype.onResize=function(t,e){var i=this;this._updateDimensions(),this._renderLayers.forEach(function(t){return t.resize(i._terminal,i.dimensions)}),this._isPaused?this._needsFullRefresh=!0:this._terminal.refresh(0,this._terminal.rows-1),this._terminal.screenElement.style.width=this.dimensions.canvasWidth+"px",this._terminal.screenElement.style.height=this.dimensions.canvasHeight+"px",this.emit("resize",{width:this.dimensions.canvasWidth,height:this.dimensions.canvasHeight})},e.prototype.onCharSizeChanged=function(){this.onResize(this._terminal.cols,this._terminal.rows)},e.prototype.onBlur=function(){var t=this;this._runOperation(function(e){return e.onBlur(t._terminal)})},e.prototype.onFocus=function(){var t=this;this._runOperation(function(e){return e.onFocus(t._terminal)})},e.prototype.onSelectionChanged=function(t,e){var i=this;this._runOperation(function(r){return r.onSelectionChanged(i._terminal,t,e)})},e.prototype.onCursorMove=function(){var t=this;this._runOperation(function(e){return e.onCursorMove(t._terminal)})},e.prototype.onOptionsChanged=function(){var t=this;this._runOperation(function(e){return e.onOptionsChanged(t._terminal)})},e.prototype.clear=function(){var t=this;this._runOperation(function(e){return e.reset(t._terminal)})},e.prototype._runOperation=function(t){this._isPaused?this._needsFullRefresh=!0:this._renderLayers.forEach(function(e){return t(e)})},e.prototype.refreshRows=function(t,e){this._isPaused?this._needsFullRefresh=!0:this._renderDebouncer.refresh(t,e)},e.prototype._renderRows=function(t,e){var i=this;this._renderLayers.forEach(function(r){return r.onGridChanged(i._terminal,t,e)}),this._terminal.emit("refresh",{start:t,end:e})},e.prototype._updateDimensions=function(){this._terminal.charMeasure.width&&this._terminal.charMeasure.height&&(this.dimensions.scaledCharWidth=Math.floor(this._terminal.charMeasure.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._terminal.charMeasure.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._terminal.options.lineHeight),this.dimensions.scaledCharTop=1===this._terminal.options.lineHeight?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._terminal.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._terminal.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._terminal.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._terminal.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._terminal.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._terminal.cols)},e}(h.EventEmitter);i.Renderer=p},{"../EventEmitter":8,"../utils/RenderDebouncer":42,"../utils/ScreenDprMonitor":43,"./ColorManager":23,"./CursorRenderLayer":24,"./LinkRenderLayer":26,"./SelectionRenderLayer":28,"./TextRenderLayer":29}],28:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=function(t){function e(e,i,r){var n=t.call(this,e,"selection",i,!0,r)||this;return n._state={start:null,end:null},n}return n(e,t),e.prototype.resize=function(e,i){t.prototype.resize.call(this,e,i),this._state={start:null,end:null}},e.prototype.reset=function(t){this._state.start&&this._state.end&&(this._state={start:null,end:null},this.clearAll())},e.prototype.onSelectionChanged=function(t,e,i){if(this._state.start!==e&&this._state.end!==i&&(this.clearAll(),e&&i)){var r=e[1]-t.buffer.ydisp,n=i[1]-t.buffer.ydisp,s=Math.max(r,0),o=Math.min(n,t.rows-1);if(!(s>=t.rows||o<0)){var a=r===s?e[0]:0,l=s===o?i[0]:t.cols;this._ctx.fillStyle=this._colors.selection.css,this.fillCells(a,s,l-a,1);var c=Math.max(o-s-1,0);if(this.fillCells(0,s+1,t.cols,c),s!==o){var h=n===o?i[0]:t.cols;this.fillCells(0,o,h,1)}this._state.start=[e[0],e[1]],this._state.end=[i[0],i[1]]}}},e}(t("./BaseRenderLayer").BaseRenderLayer);i.SelectionRenderLayer=s},{"./BaseRenderLayer":22}],29:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("../Buffer"),o=t("./Types"),a=t("./atlas/Types"),l=t("./GridCache"),c=function(t){function e(e,i,r,n){var s=t.call(this,e,"text",i,n,r)||this;return s._characterOverlapCache={},s._state=new l.GridCache,s}return n(e,t),e.prototype.resize=function(e,i){t.prototype.resize.call(this,e,i);var r=this._getFont(e,!1);this._characterWidth===i.scaledCharWidth&&this._characterFont===r||(this._characterWidth=i.scaledCharWidth,this._characterFont=r,this._characterOverlapCache={}),this._state.clear(),this._state.resize(e.cols,e.rows)},e.prototype.reset=function(t){this._state.clear(),this.clearAll()},e.prototype.onGridChanged=function(t,e,i){if(0!==this._state.cache.length)for(var r=e;r<=i;r++){var n=r+t.buffer.ydisp,l=t.buffer.lines.get(n);this.clearCells(0,r,t.cols,1);for(var c=0;c<t.cols;c++){var h=l[c],u=h[s.CHAR_DATA_CODE_INDEX],f=h[s.CHAR_DATA_CHAR_INDEX],p=h[s.CHAR_DATA_ATTR_INDEX],d=h[s.CHAR_DATA_WIDTH_INDEX];if(0!==d){if(32===u&&c>0){var _=l[c-1];if(this._isOverlapping(_))continue}var m=p>>18,y=511&p,g=y>=256,v=m&o.FLAGS.INVISIBLE,b=m&o.FLAGS.INVERSE;if(u&&(32!==u||!g||b)&&!v){0!==d&&this._isOverlapping(h)&&c<l.length-1&&32===l[c+1][s.CHAR_DATA_CODE_INDEX]&&(d=2);var C=p>>9&511;if(b){var w=y;y=C,256===(C=w)&&(C=a.INVERTED_DEFAULT_COLOR),257===y&&(y=a.INVERTED_DEFAULT_COLOR)}y<256&&(this._ctx.save(),this._ctx.fillStyle=y===a.INVERTED_DEFAULT_COLOR?this._colors.foreground.css:this._colors.ansi[y].css,this.fillCells(c,r,d,1),this._ctx.restore()),this._ctx.save(),m&o.FLAGS.BOLD&&(this._ctx.font=this._getFont(t,!0),C<8&&(C+=8)),m&o.FLAGS.UNDERLINE&&(C===a.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:this._ctx.fillStyle=C<256?this._colors.ansi[C].css:this._colors.foreground.css,this.fillBottomLineAtCells(c,r)),this.drawChar(t,f,u,d,c,r,C,y,!!(m&o.FLAGS.BOLD),!!(m&o.FLAGS.DIM)),this._ctx.restore()}}}}},e.prototype.onOptionsChanged=function(t){this.setTransparency(t,t.options.allowTransparency)},e.prototype._isOverlapping=function(t){if(1!==t[s.CHAR_DATA_WIDTH_INDEX])return!1;if(t[s.CHAR_DATA_CODE_INDEX]<256)return!1;var e=t[s.CHAR_DATA_CHAR_INDEX];if(this._characterOverlapCache.hasOwnProperty(e))return this._characterOverlapCache[e];this._ctx.save(),this._ctx.font=this._characterFont;var i=Math.floor(this._ctx.measureText(e).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[e]=i,i},e}(t("./BaseRenderLayer").BaseRenderLayer);i.TextRenderLayer=c},{"../Buffer":2,"./BaseRenderLayer":22,"./GridCache":25,"./Types":30,"./atlas/Types":33}],30:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(t){t[t.BOLD=1]="BOLD",t[t.UNDERLINE=2]="UNDERLINE",t[t.BLINK=4]="BLINK",t[t.INVERSE=8]="INVERSE",t[t.INVISIBLE=16]="INVISIBLE",t[t.DIM=32]="DIM"}(i.FLAGS||(i.FLAGS={}))},{}],31:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("../../shared/atlas/CharAtlasGenerator"),n=t("./CharAtlasUtils"),s=[];i.acquireCharAtlas=function(t,e,i,o){for(var a=n.generateConfig(i,o,t,e),l=0;l<s.length;l++){var c=(h=s[l]).ownedBy.indexOf(t);if(c>=0){if(n.configEquals(h.config,a))return h.bitmap;1===h.ownedBy.length?s.splice(l,1):h.ownedBy.splice(c,1);break}}for(l=0;l<s.length;l++){var h=s[l];if(n.configEquals(h.config,a))return h.ownedBy.push(t),h.bitmap}var u={bitmap:r.generateCharAtlas(window,function(t,e){var i=document.createElement("canvas");return i.width=t,i.height=e,i},a),config:a,ownedBy:[t]};return s.push(u),u.bitmap}},{"../../shared/atlas/CharAtlasGenerator":34,"./CharAtlasUtils":32}],32:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.generateConfig=function(t,e,i,r){var n={foreground:r.foreground,background:r.background,cursor:null,cursorAccent:null,selection:null,ansi:r.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:t,scaledCharHeight:e,fontFamily:i.options.fontFamily,fontSize:i.options.fontSize,fontWeight:i.options.fontWeight,fontWeightBold:i.options.fontWeightBold,allowTransparency:i.options.allowTransparency,colors:n}},i.configEquals=function(t,e){for(var i=0;i<t.colors.ansi.length;i++)if(t.colors.ansi[i].rgba!==e.colors.ansi[i].rgba)return!1;return t.devicePixelRatio===e.devicePixelRatio&&t.fontFamily===e.fontFamily&&t.fontSize===e.fontSize&&t.fontWeight===e.fontWeight&&t.fontWeightBold===e.fontWeightBold&&t.allowTransparency===e.allowTransparency&&t.scaledCharWidth===e.scaledCharWidth&&t.scaledCharHeight===e.scaledCharHeight&&t.colors.foreground===e.colors.foreground&&t.colors.background===e.colors.background}},{}],33:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.INVERTED_DEFAULT_COLOR=-1,i.DIM_OPACITY=.5},{}],34:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./Types"),n=t("../utils/Browser");function s(t,e){return t+" "+e.fontSize*e.devicePixelRatio+"px "+e.fontFamily}i.generateCharAtlas=function(t,e,i){var o=i.scaledCharWidth+r.CHAR_ATLAS_CELL_SPACING,a=i.scaledCharHeight+r.CHAR_ATLAS_CELL_SPACING,l=e(255*o,18*a),c=l.getContext("2d",{alpha:i.allowTransparency});c.fillStyle=i.colors.background.css,c.fillRect(0,0,l.width,l.height),c.save(),c.fillStyle=i.colors.foreground.css,c.font=s(i.fontWeight,i),c.textBaseline="top";for(var h=0;h<256;h++)c.save(),c.beginPath(),c.rect(h*o,0,o,a),c.clip(),c.fillText(String.fromCharCode(h),h*o,0),c.restore();c.save(),c.font=s(i.fontWeightBold,i);for(h=0;h<256;h++)c.save(),c.beginPath(),c.rect(h*o,a,o,a),c.clip(),c.fillText(String.fromCharCode(h),h*o,a),c.restore();c.restore(),c.font=s(i.fontWeight,i);for(var u=0;u<16;u++){8===u&&(c.font=s(i.fontWeightBold,i));var f=(u+2)*a;for(h=0;h<256;h++)c.save(),c.beginPath(),c.rect(h*o,f,o,a),c.clip(),c.fillStyle=i.colors.ansi[u].css,c.fillText(String.fromCharCode(h),h*o,f),c.restore()}if(c.restore(),!("createImageBitmap"in t)||n.isFirefox)return l instanceof HTMLCanvasElement?l:new Promise(function(t){return t(l.transferToImageBitmap())});var p=c.getImageData(0,0,l.width,l.height);return function(t,e,i,r){for(var n=0;n<t.data.length;n+=4)t.data[n]===e&&t.data[n+1]===i&&t.data[n+2]===r&&(t.data[n+3]=0)}(p,i.colors.background.rgba>>>24,i.colors.background.rgba>>>16&255,i.colors.background.rgba>>>8&255),t.createImageBitmap(p)}},{"../utils/Browser":36,"./Types":35}],35:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.CHAR_ATLAS_CELL_SPACING=1},{}],36:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r="undefined"==typeof navigator,n=r?"node":navigator.userAgent,s=r?"node":navigator.platform;function o(t,e){return t.indexOf(e)>=0}i.isFirefox=!!~n.indexOf("Firefox"),i.isMSIE=!!~n.indexOf("MSIE")||!!~n.indexOf("Trident"),i.isMac=o(["Macintosh","MacIntel","MacPPC","Mac68K"],s),i.isIpad="iPad"===s,i.isIphone="iPhone"===s,i.isMSWindows=o(["Windows","Win16","Win32","WinCE"],s),i.isLinux=s.indexOf("Linux")>=0},{}],37:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=function(t){function e(e,i){var r=t.call(this)||this;return r._document=e,r._parentElement=i,r._measureElement=r._document.createElement("span"),r._measureElement.classList.add("xterm-char-measure-element"),r._measureElement.textContent="W",r._measureElement.setAttribute("aria-hidden","true"),r._parentElement.appendChild(r._measureElement),r}return n(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),e.prototype.measure=function(t){this._measureElement.style.fontFamily=t.fontFamily,this._measureElement.style.fontSize=t.fontSize+"px";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=Math.ceil(e.height),this.emit("charsizechanged")))},e}(t("../EventEmitter").EventEmitter);i.CharMeasure=s},{"../EventEmitter":8}],38:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=function(t){function e(e){var i=t.call(this)||this;return i._maxLength=e,i._array=new Array(i._maxLength),i._startIndex=0,i._length=0,i}return n(e,t),Object.defineProperty(e.prototype,"maxLength",{get:function(){return this._maxLength},set:function(t){if(this._maxLength!==t){for(var e=new Array(t),i=0;i<Math.min(t,this.length);i++)e[i]=this._array[this._getCyclicIndex(i)];this._array=e,this._maxLength=t,this._startIndex=0}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},set:function(t){if(t>this._length)for(var e=this._length;e<t;e++)this._array[e]=void 0;this._length=t},enumerable:!0,configurable:!0}),e.prototype.get=function(t){return this._array[this._getCyclicIndex(t)]},e.prototype.set=function(t,e){this._array[this._getCyclicIndex(t)]=e},e.prototype.push=function(t){this._array[this._getCyclicIndex(this._length)]=t,this._length===this._maxLength?(this._startIndex++,this._startIndex===this._maxLength&&(this._startIndex=0),this.emit("trim",1)):this._length++},e.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},e.prototype.splice=function(t,e){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];if(e){for(var n=t;n<this._length-e;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+e)];this._length-=e}if(i&&i.length){for(n=this._length-1;n>=t;n--)this._array[this._getCyclicIndex(n+i.length)]=this._array[this._getCyclicIndex(n)];for(n=0;n<i.length;n++)this._array[this._getCyclicIndex(t+n)]=i[n];if(this._length+i.length>this.maxLength){var s=this._length+i.length-this.maxLength;this._startIndex+=s,this._length=this.maxLength,this.emit("trim",s)}else this._length+=i.length}},e.prototype.trimStart=function(t){t>this._length&&(t=this._length),this._startIndex+=t,this._length-=t,this.emit("trim",t)},e.prototype.shiftElements=function(t,e,i){if(!(e<=0)){if(t<0||t>=this._length)throw new Error("start argument out of range");if(t+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(i>0){for(var r=e-1;r>=0;r--)this.set(t+r+i,this.get(t+r));var n=t+e+i-this._length;if(n>0)for(this._length+=n;this._length>this.maxLength;)this._length--,this._startIndex++,this.emit("trim",1)}else for(r=0;r<e;r++)this.set(t+r+i,this.get(t+r))}},e.prototype._getCyclicIndex=function(t){return(this._startIndex+t)%this.maxLength},e}(t("../EventEmitter").EventEmitter);i.CircularList=s},{"../EventEmitter":8}],39:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.clone=function(t,e){if(void 0===e&&(e=5),"object"!=typeof t)return t;if(null===t)return null;var r=Array.isArray(t)?[]:{};for(var n in t)r[n]=e<=1?t[n]:i.clone(t[n],e-1);return r}},{}],40:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.addDisposableListener=function(t,e,i,r){return t.addEventListener(e,i,r),{dispose:function(){i&&(t.removeEventListener(e,i,r),t=null,i=null)}}}},{}],41:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t){this._renderer=t}return t.getCoordsRelativeToElement=function(t,e){if(null==t.pageX)return null;for(var i=e,r=t.pageX,n=t.pageY;e;)r-=e.offsetLeft,n-=e.offsetTop,e=e.offsetParent;for(e=i;e&&e!==e.ownerDocument.body;)r+=e.scrollLeft,n+=e.scrollTop,e=e.parentElement;return[r,n]},t.prototype.getCoords=function(e,i,r,n,s,o,a){if(!r.width||!r.height)return null;var l=t.getCoordsRelativeToElement(e,i);return l?(l[0]=Math.ceil((l[0]+(a?this._renderer.dimensions.actualCellWidth/2:0))/this._renderer.dimensions.actualCellWidth),l[1]=Math.ceil(l[1]/this._renderer.dimensions.actualCellHeight),l[0]=Math.min(Math.max(l[0],1),s+(a?1:0)),l[1]=Math.min(Math.max(l[1],1),o),l):null},t.prototype.getRawByteCoords=function(t,e,i,r,n,s){var o=this.getCoords(t,e,i,r,n,s),a=o[0],l=o[1];return{x:a+=32,y:l+=32}},t}();i.MouseHelper=r},{}],42:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t,e){this._terminal=t,this._callback=e,this._animationFrame=null}return t.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=null)},t.prototype.refresh=function(t,e){var i=this;t=t||0,e=e||this._terminal.rows-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,t):t,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,e):e,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return i._innerRefresh()}))},t.prototype._innerRefresh=function(){this._rowStart=Math.max(this._rowStart,0),this._rowEnd=Math.min(this._rowEnd,this._terminal.rows-1),this._callback(this._rowStart,this._rowEnd),this._rowStart=null,this._rowEnd=null,this._animationFrame=null},t}();i.RenderDebouncer=r},{}],43:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(){}return t.prototype.setListener=function(t){var e=this;this._listener&&this.clearListener(),this._listener=t,this._outerListener=function(){e._listener(window.devicePixelRatio,e._currentDevicePixelRatio),e._updateDpr()},this._updateDpr()},t.prototype._updateDpr=function(){this._resolutionMediaMatchList&&this._resolutionMediaMatchList.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener)},t.prototype.clearListener=function(){this._listener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._listener=null,this._outerListener=null)},t}();i.ScreenDprMonitor=r},{}],44:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./Terminal");e.exports=r.Terminal},{"./Terminal":16}]},{},[44])(44)},function(t,e,i){var r=i(50),n=i(9),s=i(20),o=i(1)("socket.io-client");t.exports=e=l;var a=e.managers={};function l(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,n=r(t),l=n.source,c=n.id,h=n.path,u=a[c]&&h in a[c].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||u?(o("ignoring socket cache for %s",l),i=s(l,e)):(a[c]||(o("new io instance for %s",l),a[c]=s(l,e)),i=a[c]),n.query&&!e.query&&(e.query=n.query),i.socket(n.path,e)}e.protocol=n.protocol,e.connect=l,e.Manager=i(20),e.Socket=i(14)},function(t,e){var i=[].slice;t.exports=function(t,e){if("string"==typeof e&&(e=t[e]),"function"!=typeof e)throw new Error("bind() requires a function");var r=i.call(arguments,2);return function(){return e.apply(t,r.concat(i.call(arguments)))}}},function(t,e){t.exports=function(t,e,i){return t.on(e,i),{destroy:function(){t.removeListener(e,i)}}}},function(t,e,i){var r=i(9),n=i(3),s=i(31),o=i(13),a=i(12),l=i(1)("socket.io-client:socket"),c=i(5),h=i(17);t.exports=p;var u={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},f=n.prototype.emit;function p(t,e,i){this.io=t,this.nsp=e,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},i&&i.query&&(this.query=i.query),this.io.autoConnect&&this.open()}n(p.prototype),p.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[o(t,"open",a(this,"onopen")),o(t,"packet",a(this,"onpacket")),o(t,"close",a(this,"onclose"))]}},p.prototype.open=p.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},p.prototype.send=function(){var t=s(arguments);return t.unshift("message"),this.emit.apply(this,t),this},p.prototype.emit=function(t){if(u.hasOwnProperty(t))return f.apply(this,arguments),this;var e=s(arguments),i={type:(void 0!==this.flags.binary?this.flags.binary:h(e))?r.BINARY_EVENT:r.EVENT,data:e,options:{}};return i.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(l("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),i.id=this.ids++),this.connected?this.packet(i):this.sendBuffer.push(i),this.flags={},this},p.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},p.prototype.onopen=function(){if(l("transport is open - connecting"),"/"!==this.nsp)if(this.query){var t="object"==typeof this.query?c.encode(this.query):this.query;l("sending connect packet with query %s",t),this.packet({type:r.CONNECT,query:t})}else this.packet({type:r.CONNECT})},p.prototype.onclose=function(t){l("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},p.prototype.onpacket=function(t){if(t.nsp===this.nsp)switch(t.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(t);break;case r.ACK:case r.BINARY_ACK:this.onack(t);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",t.data)}},p.prototype.onevent=function(t){var e=t.data||[];l("emitting event %j",e),null!=t.id&&(l("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?f.apply(this,e):this.receiveBuffer.push(e)},p.prototype.ack=function(t){var e=this,i=!1;return function(){if(!i){i=!0;var n=s(arguments);l("sending ack %j",n),e.packet({type:h(n)?r.BINARY_ACK:r.ACK,id:t,data:n})}}},p.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(l("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):l("bad ack %s",t.id)},p.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},p.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)f.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},p.prototype.ondisconnect=function(){l("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},p.prototype.destroy=function(){if(this.subs){for(var t=0;t<this.subs.length;t++)this.subs[t].destroy();this.subs=null}this.io.destroy(this)},p.prototype.close=p.prototype.disconnect=function(){return this.connected&&(l("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},p.prototype.compress=function(t){return this.flags.compress=t,this},p.prototype.binary=function(t){return this.flags.binary=t,this}},function(t,e){var i=[].indexOf;t.exports=function(t,e){if(i)return t.indexOf(e);for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}},function(t,e,i){"use strict";var r,n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),s=64,o={},a=0,l=0;function c(t){var e="";do{e=n[t%s]+e,t=Math.floor(t/s)}while(t>0);return e}function h(){var t=c(+new Date);return t!==r?(a=0,r=t):t+"."+c(a++)}for(;l<s;l++)o[n[l]]=l;h.encode=c,h.decode=function(t){var e=0;for(l=0;l<t.length;l++)e=e*s+o[t.charAt(l)];return e},t.exports=h},function(t,e,i){(function(e){var r=i(8),n=Object.prototype.toString,s="function"==typeof e.Blob||"[object BlobConstructor]"===n.call(e.Blob),o="function"==typeof e.File||"[object FileConstructor]"===n.call(e.File);t.exports=function t(i){if(!i||"object"!=typeof i)return!1;if(r(i)){for(var n=0,a=i.length;n<a;n++)if(t(i[n]))return!0;return!1}if("function"==typeof e.Buffer&&e.Buffer.isBuffer&&e.Buffer.isBuffer(i)||"function"==typeof e.ArrayBuffer&&i instanceof ArrayBuffer||s&&i instanceof Blob||o&&i instanceof File)return!0;if(i.toJSON&&"function"==typeof i.toJSON&&1===arguments.length)return t(i.toJSON(),!0);for(var l in i)if(Object.prototype.hasOwnProperty.call(i,l)&&t(i[l]))return!0;return!1}}).call(this,i(0))},function(t,e,i){var r=i(6),n=i(5),s=i(2),o=i(4),a=i(16),l=i(1)("engine.io-client:polling");t.exports=h;var c=null!=new(i(7))({xdomain:!1}).responseType;function h(t){var e=t&&t.forceBase64;c&&!e||(this.supportsBinary=!1),r.call(this,t)}o(h,r),h.prototype.name="polling",h.prototype.doOpen=function(){this.poll()},h.prototype.pause=function(t){var e=this;function i(){l("paused"),e.readyState="paused",t()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(l("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){l("pre-pause polling complete"),--r||i()})),this.writable||(l("we are currently writing - waiting to pause"),r++,this.once("drain",function(){l("pre-pause writing complete"),--r||i()}))}else i()},h.prototype.poll=function(){l("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},h.prototype.onData=function(t){var e=this;l("polling got data %s",t),s.decodePayload(t,this.socket.binaryType,function(t,i,r){if("opening"===e.readyState&&e.onOpen(),"close"===t.type)return e.onClose(),!1;e.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():l('ignoring poll - transport state "%s"',this.readyState))},h.prototype.doClose=function(){var t=this;function e(){l("writing close packet"),t.write([{type:"close"}])}"open"===this.readyState?(l("transport open - closing"),e()):(l("transport not open - deferring close"),this.once("open",e))},h.prototype.write=function(t){var e=this;this.writable=!1;var i=function(){e.writable=!0,e.emit("drain")};s.encodePayload(t,this.supportsBinary,function(t){e.doWrite(t,i)})},h.prototype.uri=function(){var t=this.query||{},e=this.secure?"https":"http",i="";return!1!==this.timestampRequests&&(t[this.timestampParam]=a()),this.supportsBinary||t.sid||(t.b64=1),t=n.encode(t),this.port&&("https"===e&&443!==Number(this.port)||"http"===e&&80!==Number(this.port))&&(i=":"+this.port),t.length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+i+this.path+t}},function(t,e,i){(function(t){var r=i(7),n=i(42),s=i(34),o=i(33);e.polling=function(e){var i=!1,o=!1,a=!1!==e.jsonp;if(t.location){var l="https:"===location.protocol,c=location.port;c||(c=l?443:80),i=e.hostname!==location.hostname||c!==e.port,o=e.secure!==l}if(e.xdomain=i,e.xscheme=o,"open"in new r(e)&&!e.forceJSONP)return new n(e);if(!a)throw new Error("JSONP disabled");return new s(e)},e.websocket=o}).call(this,i(0))},function(t,e,i){var r=i(45),n=i(14),s=i(3),o=i(9),a=i(13),l=i(12),c=i(1)("socket.io-client:manager"),h=i(15),u=i(30),f=Object.prototype.hasOwnProperty;function p(t,e){if(!(this instanceof p))return new p(t,e);t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new u({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var i=e.parser||o;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this.autoConnect=!1!==e.autoConnect,this.autoConnect&&this.open()}t.exports=p,p.prototype.emitAll=function(){for(var t in this.emit.apply(this,arguments),this.nsps)f.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},p.prototype.updateSocketIds=function(){for(var t in this.nsps)f.call(this.nsps,t)&&(this.nsps[t].id=this.generateId(t))},p.prototype.generateId=function(t){return("/"===t?"":t+"#")+this.engine.id},s(p.prototype),p.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},p.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},p.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},p.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},p.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},p.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},p.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},p.prototype.open=p.prototype.connect=function(t,e){if(c("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;c("opening %s",this.uri),this.engine=r(this.uri,this.opts);var i=this.engine,n=this;this.readyState="opening",this.skipReconnect=!1;var s=a(i,"open",function(){n.onopen(),t&&t()}),o=a(i,"error",function(e){if(c("connect_error"),n.cleanup(),n.readyState="closed",n.emitAll("connect_error",e),t){var i=new Error("Connection error");i.data=e,t(i)}else n.maybeReconnectOnOpen()});if(!1!==this._timeout){var l=this._timeout;c("connect attempt will timeout after %d",l);var h=setTimeout(function(){c("connect attempt timed out after %d",l),s.destroy(),i.close(),i.emit("error","timeout"),n.emitAll("connect_timeout",l)},l);this.subs.push({destroy:function(){clearTimeout(h)}})}return this.subs.push(s),this.subs.push(o),this},p.prototype.onopen=function(){c("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(a(t,"data",l(this,"ondata"))),this.subs.push(a(t,"ping",l(this,"onping"))),this.subs.push(a(t,"pong",l(this,"onpong"))),this.subs.push(a(t,"error",l(this,"onerror"))),this.subs.push(a(t,"close",l(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",l(this,"ondecoded")))},p.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},p.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},p.prototype.ondata=function(t){this.decoder.add(t)},p.prototype.ondecoded=function(t){this.emit("packet",t)},p.prototype.onerror=function(t){c("error",t),this.emitAll("error",t)},p.prototype.socket=function(t,e){var i=this.nsps[t];if(!i){i=new n(this,t,e),this.nsps[t]=i;var r=this;i.on("connecting",s),i.on("connect",function(){i.id=r.generateId(t)}),this.autoConnect&&s()}function s(){~h(r.connecting,i)||r.connecting.push(i)}return i},p.prototype.destroy=function(t){var e=h(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},p.prototype.packet=function(t){c("writing packet %j",t);var e=this;t.query&&0===t.type&&(t.nsp+="?"+t.query),e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,function(i){for(var r=0;r<i.length;r++)e.engine.write(i[r],t.options);e.encoding=!1,e.processPacketQueue()}))},p.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},p.prototype.cleanup=function(){c("cleanup");for(var t=this.subs.length,e=0;e<t;e++)this.subs.shift().destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},p.prototype.close=p.prototype.disconnect=function(){c("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},p.prototype.onclose=function(t){c("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},p.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)c("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();c("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var i=setTimeout(function(){t.skipReconnect||(c("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(c("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(c("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(i)}})}},p.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},function(t,e,i){(function(e){t.exports=function(t){return i&&e.Buffer.isBuffer(t)||r&&(t instanceof e.ArrayBuffer||n(t))};var i="function"==typeof e.Buffer&&"function"==typeof e.Buffer.isBuffer,r="function"==typeof e.ArrayBuffer,n=r&&"function"==typeof e.ArrayBuffer.isView?e.ArrayBuffer.isView:function(t){return t.buffer instanceof e.ArrayBuffer}}).call(this,i(0))},function(t,e){var i=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var e=t,n=t.indexOf("["),s=t.indexOf("]");-1!=n&&-1!=s&&(t=t.substring(0,n)+t.substring(n,s).replace(/:/g,";")+t.substring(s,t.length));for(var o=i.exec(t||""),a={},l=14;l--;)a[r[l]]=o[l]||"";return-1!=n&&-1!=s&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},function(t,e){t.exports={prefix:"fas",iconName:"cog",icon:[512,512,[],"f013","M444.788 291.1l42.616 24.599c4.867 2.809 7.126 8.618 5.459 13.985-11.07 35.642-29.97 67.842-54.689 94.586a12.016 12.016 0 0 1-14.832 2.254l-42.584-24.595a191.577 191.577 0 0 1-60.759 35.13v49.182a12.01 12.01 0 0 1-9.377 11.718c-34.956 7.85-72.499 8.256-109.219.007-5.49-1.233-9.403-6.096-9.403-11.723v-49.184a191.555 191.555 0 0 1-60.759-35.13l-42.584 24.595a12.016 12.016 0 0 1-14.832-2.254c-24.718-26.744-43.619-58.944-54.689-94.586-1.667-5.366.592-11.175 5.459-13.985L67.212 291.1a193.48 193.48 0 0 1 0-70.199l-42.616-24.599c-4.867-2.809-7.126-8.618-5.459-13.985 11.07-35.642 29.97-67.842 54.689-94.586a12.016 12.016 0 0 1 14.832-2.254l42.584 24.595a191.577 191.577 0 0 1 60.759-35.13V25.759a12.01 12.01 0 0 1 9.377-11.718c34.956-7.85 72.499-8.256 109.219-.007 5.49 1.233 9.403 6.096 9.403 11.723v49.184a191.555 191.555 0 0 1 60.759 35.13l42.584-24.595a12.016 12.016 0 0 1 14.832 2.254c24.718 26.744 43.619 58.944 54.689 94.586 1.667 5.366-.592 11.175-5.459 13.985L444.788 220.9a193.485 193.485 0 0 1 0 70.2zM336 256c0-44.112-35.888-80-80-80s-80 35.888-80 80 35.888 80 80 80 80-35.888 80-80z"]}},function(t,e){t.exports={prefix:"fas",iconName:"key",icon:[512,512,[],"f084","M512 176.001C512 273.203 433.202 352 336 352c-11.22 0-22.19-1.062-32.827-3.069l-24.012 27.014A23.999 23.999 0 0 1 261.223 384H224v40c0 13.255-10.745 24-24 24h-40v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24v-78.059c0-6.365 2.529-12.47 7.029-16.971l161.802-161.802C163.108 213.814 160 195.271 160 176 160 78.798 238.797.001 335.999 0 433.488-.001 512 78.511 512 176.001zM336 128c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48-48 21.49-48 48z"]}},function(t,e){t.exports={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"]}},function(t,e){t.exports={prefix:"fas",iconName:"clipboard",icon:[384,512,[],"f328","M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z"]}},function(t,e){t.exports={prefix:"fas",iconName:"bars",icon:[448,512,[],"f0c9","M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"]}},function(t,e,i){var r;t.exports=function t(e,i,n){function s(a,l){if(!i[a]){if(!e[a]){if(!l&&("function"==typeof r&&r))return r(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var h=i[a]={exports:{}};e[a][0].call(h.exports,function(t){return s(e[a][1][t]||t)},h,h.exports,t,e,i,n)}return i[a].exports}for(var o="function"==typeof r&&r,a=0;a<n.length;a++)s(n[a]);return s}({1:[function(t,e,i){"use strict";function r(t){if(!t.element.parentElement)return null;var e=window.getComputedStyle(t.element.parentElement),i=parseInt(e.getPropertyValue("height")),r=Math.max(0,parseInt(e.getPropertyValue("width"))),n=window.getComputedStyle(t.element),s=i-(parseInt(n.getPropertyValue("padding-top"))+parseInt(n.getPropertyValue("padding-bottom"))),o=r-(parseInt(n.getPropertyValue("padding-right"))+parseInt(n.getPropertyValue("padding-left")))-t.viewport.scrollBarWidth;return{cols:Math.floor(o/t.renderer.dimensions.actualCellWidth),rows:Math.floor(s/t.renderer.dimensions.actualCellHeight)}}function n(t){var e=r(t);e&&(t.rows===e.rows&&t.cols===e.cols||(t.renderer.clear(),t.resize(e.cols,e.rows)))}Object.defineProperty(i,"__esModule",{value:!0}),i.proposeGeometry=r,i.fit=n,i.apply=function(t){t.prototype.proposeGeometry=function(){return r(this)},t.prototype.fit=function(){n(this)}}},{}]},{},[1])(1)},function(t,e,i){"use strict";i.r(e);var r=i(11),n=i(10),s=i(28),o=function(){},a={},l={},c=null,h={mark:o,measure:o};try{"undefined"!=typeof window&&(a=window),"undefined"!=typeof document&&(l=document),"undefined"!=typeof MutationObserver&&(c=MutationObserver),"undefined"!=typeof performance&&(h=performance)}catch(t){}var u=(a.navigator||{}).userAgent,f=void 0===u?"":u,p=a,d=l,_=c,m=h,y=!!p.document,g=!!d.documentElement&&!!d.head&&"function"==typeof d.addEventListener&&"function"==typeof d.createElement,v=~f.indexOf("MSIE")||~f.indexOf("Trident/"),b=16,C="data-fa-i2svg",w="data-fa-pseudo-element",k="fontawesome-i2svg",A=function(){try{return!0}catch(t){return!1}}(),x=[1,2,3,4,5,6,7,8,9,10],S=x.concat([11,12,13,14,15,16,17,18,19,20]),E=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],L=["xs","sm","lg","fw","ul","li","border","pull-left","pull-right","spin","pulse","rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","stack","stack-1x","stack-2x","inverse","layers","layers-text","layers-counter"].concat(x.map(function(t){return t+"x"})).concat(S.map(function(t){return"w-"+t})),M=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},R=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),T=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},B=function(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)},O=p.FontAwesomeConfig||{},D=Object.keys(O),P=T({familyPrefix:"fa",replacementClass:"svg-inline--fa",autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0},O);P.autoReplaceSvg||(P.observeMutations=!1);var H=T({},P);function I(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).asNewDefault,i=void 0!==e&&e,r=Object.keys(H),n=i?function(t){return~r.indexOf(t)&&!~D.indexOf(t)}:function(t){return~r.indexOf(t)};Object.keys(t).forEach(function(e){n(e)&&(H[e]=t[e])})}p.FontAwesomeConfig=H;var N=p||{};N.___FONT_AWESOME___||(N.___FONT_AWESOME___={}),N.___FONT_AWESOME___.styles||(N.___FONT_AWESOME___.styles={}),N.___FONT_AWESOME___.hooks||(N.___FONT_AWESOME___.hooks={}),N.___FONT_AWESOME___.shims||(N.___FONT_AWESOME___.shims=[]);var F=N.___FONT_AWESOME___,j=[],W=!1;g&&((W=(d.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(d.readyState))||d.addEventListener("DOMContentLoaded",function t(){d.removeEventListener("DOMContentLoaded",t),W=1,j.map(function(t){return t()})}));var z=b,U={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function q(t){if(t&&g){var e=d.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=t;for(var i=d.head.childNodes,r=null,n=i.length-1;n>-1;n--){var s=i[n],o=(s.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(r=s)}return d.head.insertBefore(e,r),t}}var X=0;function V(){return++X}function K(t){for(var e=[],i=(t||[]).length>>>0;i--;)e[i]=t[i];return e}function G(t){return t.classList?K(t.classList):(t.getAttribute("class")||"").split(" ").filter(function(t){return t})}function Y(t){return(""+t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Z(t){return Object.keys(t||{}).reduce(function(e,i){return e+(i+": ")+t[i]+";"},"")}function J(t){return t.size!==U.size||t.x!==U.x||t.y!==U.y||t.rotate!==U.rotate||t.flipX||t.flipY}function Q(t){var e=t.transform,i=t.containerWidth,r=t.iconWidth;return{outer:{transform:"translate("+i/2+" 256)"},inner:{transform:"translate("+32*e.x+", "+32*e.y+") scale("+e.size/16*(e.flipX?-1:1)+", "+e.size/16*(e.flipY?-1:1)+") rotate("+e.rotate+" 0 0)"},path:{transform:"translate("+r/2*-1+" -256)"}}}var $={x:0,y:0,width:"100%",height:"100%"},tt=function(t){var e=t.children,i=t.attributes,r=t.main,n=t.mask,s=t.transform,o=r.width,a=r.icon,l=n.width,c=n.icon,h=Q({transform:s,containerWidth:l,iconWidth:o}),u={tag:"rect",attributes:T({},$,{fill:"white"})},f={tag:"g",attributes:T({},h.inner),children:[{tag:"path",attributes:T({},a.attributes,h.path,{fill:"black"})}]},p={tag:"g",attributes:T({},h.outer),children:[f]},d="mask-"+V(),_="clip-"+V(),m={tag:"defs",children:[{tag:"clipPath",attributes:{id:_},children:[c]},{tag:"mask",attributes:T({},$,{id:d,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[u,p]}]};return e.push(m,{tag:"rect",attributes:T({fill:"currentColor","clip-path":"url(#"+_+")",mask:"url(#"+d+")"},$)}),{children:e,attributes:i}},et=function(t){var e=t.children,i=t.attributes,r=t.main,n=t.transform,s=Z(t.styles);if(s.length>0&&(i.style=s),J(n)){var o=Q({transform:n,containerWidth:r.width,iconWidth:r.width});e.push({tag:"g",attributes:T({},o.outer),children:[{tag:"g",attributes:T({},o.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:T({},r.icon.attributes,o.path)}]}]})}else e.push(r.icon);return{children:e,attributes:i}},it=function(t){var e=t.children,i=t.main,r=t.mask,n=t.attributes,s=t.styles,o=t.transform;if(J(o)&&i.found&&!r.found){var a={x:i.width/i.height/2,y:.5};n.style=Z(T({},s,{"transform-origin":a.x+o.x/16+"em "+(a.y+o.y/16)+"em"}))}return[{tag:"svg",attributes:n,children:e}]},rt=function(t){var e=t.prefix,i=t.iconName,r=t.children,n=t.attributes,s=t.symbol,o=!0===s?e+"-"+H.familyPrefix+"-"+i:s;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:T({},n,{id:o}),children:r}]}]};function nt(t){var e=t.icons,i=e.main,r=e.mask,n=t.prefix,s=t.iconName,o=t.transform,a=t.symbol,l=t.title,c=t.extra,h=t.watchable,u=void 0!==h&&h,f=r.found?r:i,p=f.width,d=f.height,_="fa-w-"+Math.ceil(p/d*16),m=[H.replacementClass,s?H.familyPrefix+"-"+s:"",_].concat(c.classes).join(" "),y={children:[],attributes:T({},c.attributes,{"data-prefix":n,"data-icon":s,class:m,role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 "+p+" "+d})};u&&(y.attributes[C]=""),l&&y.children.push({tag:"title",attributes:{id:y.attributes["aria-labelledby"]||"title-"+V()},children:[l]});var g=T({},y,{prefix:n,iconName:s,main:i,mask:r,transform:o,symbol:a,styles:c.styles}),v=r.found&&i.found?tt(g):et(g),b=v.children,w=v.attributes;return g.children=b,g.attributes=w,a?rt(g):it(g)}function st(t){var e=t.content,i=t.width,r=t.height,n=t.transform,s=t.title,o=t.extra,a=t.watchable,l=void 0!==a&&a,c=T({},o.attributes,s?{title:s}:{},{class:o.classes.join(" ")});l&&(c[C]="");var h=T({},o.styles);J(n)&&(h.transform=function(t){var e=t.transform,i=t.width,r=void 0===i?b:i,n=t.height,s=void 0===n?b:n,o=t.startCentered,a=void 0!==o&&o,l="";return l+=a&&v?"translate("+(e.x/z-r/2)+"em, "+(e.y/z-s/2)+"em) ":a?"translate(calc(-50% + "+e.x/z+"em), calc(-50% + "+e.y/z+"em)) ":"translate("+e.x/z+"em, "+e.y/z+"em) ",(l+="scale("+e.size/z*(e.flipX?-1:1)+", "+e.size/z*(e.flipY?-1:1)+") ")+"rotate("+e.rotate+"deg) "}({transform:n,startCentered:!0,width:i,height:r}),h["-webkit-transform"]=h.transform);var u=Z(h);u.length>0&&(c.style=u);var f=[];return f.push({tag:"span",attributes:c,children:[e]}),s&&f.push({tag:"span",attributes:{class:"sr-only"},children:[s]}),f}var ot=function(){},at=H.measurePerformance&&m&&m.mark&&m.measure?m:{mark:ot,measure:ot},lt='FA "5.0.13"',ct=function(t){at.mark(lt+" "+t+" ends"),at.measure(lt+" "+t,lt+" "+t+" begins",lt+" "+t+" ends")},ht={begin:function(t){return at.mark(lt+" "+t+" begins"),function(){return ct(t)}},end:ct},ut=function(t,e,i,r){var n,s,o,a=Object.keys(t),l=a.length,c=void 0!==r?function(t,e){return function(i,r,n,s){return t.call(e,i,r,n,s)}}(e,r):e;for(void 0===i?(n=1,o=t[a[0]]):(n=0,o=i);n<l;n++)o=c(o,t[s=a[n]],s,t);return o},ft=F.styles,pt=F.shims,dt={},_t={},mt={},yt=function(){var t=function(t){return ut(ft,function(e,i,r){return e[r]=ut(i,t,{}),e},{})};dt=t(function(t,e,i){return t[e[3]]=i,t}),_t=t(function(t,e,i){var r=e[2];return t[i]=i,r.forEach(function(e){t[e]=i}),t});var e="far"in ft;mt=ut(pt,function(t,i){var r=i[0],n=i[1],s=i[2];return"far"!==n||e||(n="fas"),t[r]={prefix:n,iconName:s},t},{})};yt();var gt=F.styles,vt=function(){return{prefix:null,iconName:null,rest:[]}};function bt(t){return t.reduce(function(t,e){var i=function(t,e){var i,r=e.split("-"),n=r[0],s=r.slice(1).join("-");return n!==t||""===s||(i=s,~L.indexOf(i))?null:s}(H.familyPrefix,e);if(gt[e])t.prefix=e;else if(i){var r="fa"===t.prefix?mt[i]||{prefix:null,iconName:null}:{};t.iconName=r.iconName||i,t.prefix=r.prefix||t.prefix}else e!==H.replacementClass&&0!==e.indexOf("fa-w-")&&t.rest.push(e);return t},vt())}function Ct(t,e,i){if(t&&t[e]&&t[e][i])return{prefix:e,iconName:i,icon:t[e][i]}}function wt(t){var e=t.tag,i=t.attributes,r=void 0===i?{}:i,n=t.children,s=void 0===n?[]:n;return"string"==typeof t?Y(t):"<"+e+" "+function(t){return Object.keys(t||{}).reduce(function(e,i){return e+(i+'="')+Y(t[i])+'" '},"").trim()}(r)+">"+s.map(wt).join("")+"</"+e+">"}var kt=function(){};function At(t){return"string"==typeof(t.getAttribute?t.getAttribute(C):null)}var xt={replace:function(t){var e=t[0],i=t[1].map(function(t){return wt(t)}).join("\n");if(e.parentNode&&e.outerHTML)e.outerHTML=i+(H.keepOriginalSource&&"svg"!==e.tagName.toLowerCase()?"\x3c!-- "+e.outerHTML+" --\x3e":"");else if(e.parentNode){var r=document.createElement("span");e.parentNode.replaceChild(r,e),r.outerHTML=i}},nest:function(t){var e=t[0],i=t[1];if(~G(e).indexOf(H.replacementClass))return xt.replace(t);var r=new RegExp(H.familyPrefix+"-.*");delete i[0].attributes.style;var n=i[0].attributes.class.split(" ").reduce(function(t,e){return e===H.replacementClass||e.match(r)?t.toSvg.push(e):t.toNode.push(e),t},{toNode:[],toSvg:[]});i[0].attributes.class=n.toSvg.join(" ");var s=i.map(function(t){return wt(t)}).join("\n");e.setAttribute("class",n.toNode.join(" ")),e.setAttribute(C,""),e.innerHTML=s}};function St(t,e){var i="function"==typeof e?e:kt;0===t.length?i():(p.requestAnimationFrame||function(t){return t()})(function(){var e=!0===H.autoReplaceSvg?xt.replace:xt[H.autoReplaceSvg]||xt.replace,r=ht.begin("mutate");t.map(e),r(),i()})}var Et=!1,Lt=null,Mt=function(t){var e=t.getAttribute("style"),i=[];return e&&(i=e.split(";").reduce(function(t,e){var i=e.split(":"),r=i[0],n=i.slice(1);return r&&n.length>0&&(t[r]=n.join(":").trim()),t},{})),i},Rt=function(t){var e,i,r=t.getAttribute("data-prefix"),n=t.getAttribute("data-icon"),s=void 0!==t.innerText?t.innerText.trim():"",o=bt(G(t));return r&&n&&(o.prefix=r,o.iconName=n),o.prefix&&s.length>1?o.iconName=(e=o.prefix,i=t.innerText,_t[e][i]):o.prefix&&1===s.length&&(o.iconName=function(t,e){return dt[t][e]}(o.prefix,function(t){for(var e="",i=0;i<t.length;i++)e+=("000"+t.charCodeAt(i).toString(16)).slice(-4);return e}(t.innerText))),o},Tt=function(t){var e={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t?t.toLowerCase().split(" ").reduce(function(t,e){var i=e.toLowerCase().split("-"),r=i[0],n=i.slice(1).join("-");if(r&&"h"===n)return t.flipX=!0,t;if(r&&"v"===n)return t.flipY=!0,t;if(n=parseFloat(n),isNaN(n))return t;switch(r){case"grow":t.size=t.size+n;break;case"shrink":t.size=t.size-n;break;case"left":t.x=t.x-n;break;case"right":t.x=t.x+n;break;case"up":t.y=t.y-n;break;case"down":t.y=t.y+n;break;case"rotate":t.rotate=t.rotate+n}return t},e):e},Bt=function(t){return Tt(t.getAttribute("data-fa-transform"))},Ot=function(t){var e=t.getAttribute("data-fa-symbol");return null!==e&&(""===e||e)},Dt=function(t){var e=K(t.attributes).reduce(function(t,e){return"class"!==t.name&&"style"!==t.name&&(t[e.name]=e.value),t},{}),i=t.getAttribute("title");return H.autoA11y&&(i?e["aria-labelledby"]=H.replacementClass+"-title-"+V():e["aria-hidden"]="true"),e},Pt=function(t){var e=t.getAttribute("data-fa-mask");return e?bt(e.split(" ").map(function(t){return t.trim()})):vt()};function Ht(t){this.name="MissingIcon",this.message=t||"Icon unavailable",this.stack=(new Error).stack}Ht.prototype=Object.create(Error.prototype),Ht.prototype.constructor=Ht;var It={fill:"currentColor"},Nt={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},Ft={tag:"path",attributes:T({},It,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})},jt=T({},Nt,{attributeName:"opacity"}),Wt={tag:"g",children:[Ft,{tag:"circle",attributes:T({},It,{cx:"256",cy:"364",r:"28"}),children:[{tag:"animate",attributes:T({},Nt,{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:T({},jt,{values:"1;0;1;1;0;1;"})}]},{tag:"path",attributes:T({},It,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:[{tag:"animate",attributes:T({},jt,{values:"1;0;0;0;0;1;"})}]},{tag:"path",attributes:T({},It,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:T({},jt,{values:"0;0;1;1;0;0;"})}]}]},zt=F.styles,Ut="fa-layers-text",qt=/Font Awesome 5 (Solid|Regular|Light|Brands)/,Xt={Solid:"fas",Regular:"far",Light:"fal",Brands:"fab"};function Vt(t,e){var i={found:!1,width:512,height:512,icon:Wt};if(t&&e&&zt[e]&&zt[e][t]){var r=zt[e][t];i={found:!0,width:r[0],height:r[1],icon:{tag:"path",attributes:{fill:"currentColor",d:r.slice(4)[0]}}}}else if(t&&e&&!H.showMissingIcons)throw new Ht("Icon is missing for prefix "+e+" with icon name "+t);return i}function Kt(t){var e=function(t){var e=Rt(t),i=e.iconName,r=e.prefix,n=e.rest,s=Mt(t),o=Bt(t),a=Ot(t),l=Dt(t),c=Pt(t);return{iconName:i,title:t.getAttribute("title"),prefix:r,transform:o,symbol:a,mask:c,extra:{classes:n,styles:s,attributes:l}}}(t);return~e.extra.classes.indexOf(Ut)?function(t,e){var i=e.title,r=e.transform,n=e.extra,s=null,o=null;if(v){var a=parseInt(getComputedStyle(t).fontSize,10),l=t.getBoundingClientRect();s=l.width/a,o=l.height/a}return H.autoA11y&&!i&&(n.attributes["aria-hidden"]="true"),[t,st({content:t.innerHTML,width:s,height:o,transform:r,title:i,extra:n,watchable:!0})]}(t,e):function(t,e){var i=e.iconName,r=e.title,n=e.prefix,s=e.transform,o=e.symbol,a=e.mask,l=e.extra;return[t,nt({icons:{main:Vt(i,n),mask:Vt(a.iconName,a.prefix)},prefix:n,iconName:i,transform:s,symbol:o,mask:a,title:r,extra:l,watchable:!0})]}(t,e)}function Gt(t){"function"==typeof t.remove?t.remove():t&&t.parentNode&&t.parentNode.removeChild(t)}function Yt(t){if(g){var e=ht.begin("searchPseudoElements");Et=!0,K(t.querySelectorAll("*")).forEach(function(t){[":before",":after"].forEach(function(e){var i=p.getComputedStyle(t,e),r=i.getPropertyValue("font-family").match(qt),n=K(t.children).filter(function(t){return t.getAttribute(w)===e})[0];if(n&&(n.nextSibling&&n.nextSibling.textContent.indexOf(w)>-1&&Gt(n.nextSibling),Gt(n),n=null),r&&!n){var s=i.getPropertyValue("content"),o=d.createElement("i");o.setAttribute("class",""+Xt[r[1]]),o.setAttribute(w,e),o.innerText=3===s.length?s.substr(1,1):s,":before"===e?t.insertBefore(o,t.firstChild):t.appendChild(o)}})}),Et=!1,e()}}function Zt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(g){var i=d.documentElement.classList,r=function(t){return i.add(k+"-"+t)},n=function(t){return i.remove(k+"-"+t)},s=Object.keys(zt),o=["."+Ut+":not(["+C+"])"].concat(s.map(function(t){return"."+t+":not(["+C+"])"})).join(", ");if(0!==o.length){var a=K(t.querySelectorAll(o));if(a.length>0){r("pending"),n("complete");var l=ht.begin("onTree"),c=a.reduce(function(t,e){try{var i=Kt(e);i&&t.push(i)}catch(t){A||t instanceof Ht&&console.error(t)}return t},[]);l(),St(c,function(){r("active"),r("complete"),n("pending"),"function"==typeof e&&e()})}}}}function Jt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=Kt(t);i&&St([i],e)}var Qt=function(){var t="svg-inline--fa",e=H.familyPrefix,i=H.replacementClass,r='svg:not(:root).svg-inline--fa {\n overflow: visible; }\n\n.svg-inline--fa {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -.125em; }\n .svg-inline--fa.fa-lg {\n vertical-align: -.225em; }\n .svg-inline--fa.fa-w-1 {\n width: 0.0625em; }\n .svg-inline--fa.fa-w-2 {\n width: 0.125em; }\n .svg-inline--fa.fa-w-3 {\n width: 0.1875em; }\n .svg-inline--fa.fa-w-4 {\n width: 0.25em; }\n .svg-inline--fa.fa-w-5 {\n width: 0.3125em; }\n .svg-inline--fa.fa-w-6 {\n width: 0.375em; }\n .svg-inline--fa.fa-w-7 {\n width: 0.4375em; }\n .svg-inline--fa.fa-w-8 {\n width: 0.5em; }\n .svg-inline--fa.fa-w-9 {\n width: 0.5625em; }\n .svg-inline--fa.fa-w-10 {\n width: 0.625em; }\n .svg-inline--fa.fa-w-11 {\n width: 0.6875em; }\n .svg-inline--fa.fa-w-12 {\n width: 0.75em; }\n .svg-inline--fa.fa-w-13 {\n width: 0.8125em; }\n .svg-inline--fa.fa-w-14 {\n width: 0.875em; }\n .svg-inline--fa.fa-w-15 {\n width: 0.9375em; }\n .svg-inline--fa.fa-w-16 {\n width: 1em; }\n .svg-inline--fa.fa-w-17 {\n width: 1.0625em; }\n .svg-inline--fa.fa-w-18 {\n width: 1.125em; }\n .svg-inline--fa.fa-w-19 {\n width: 1.1875em; }\n .svg-inline--fa.fa-w-20 {\n width: 1.25em; }\n .svg-inline--fa.fa-pull-left {\n margin-right: .3em;\n width: auto; }\n .svg-inline--fa.fa-pull-right {\n margin-left: .3em;\n width: auto; }\n .svg-inline--fa.fa-border {\n height: 1.5em; }\n .svg-inline--fa.fa-li {\n width: 2em; }\n .svg-inline--fa.fa-fw {\n width: 1.25em; }\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -.125em;\n width: 1em; }\n .fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa-layers-text, .fa-layers-counter {\n display: inline-block;\n position: absolute;\n text-align: center; }\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: .25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right; }\n\n.fa-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left; }\n\n.fa-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left; }\n\n.fa-lg {\n font-size: 1.33333em;\n line-height: 0.75em;\n vertical-align: -.0667em; }\n\n.fa-xs {\n font-size: .75em; }\n\n.fa-sm {\n font-size: .875em; }\n\n.fa-1x {\n font-size: 1em; }\n\n.fa-2x {\n font-size: 2em; }\n\n.fa-3x {\n font-size: 3em; }\n\n.fa-4x {\n font-size: 4em; }\n\n.fa-5x {\n font-size: 5em; }\n\n.fa-6x {\n font-size: 6em; }\n\n.fa-7x {\n font-size: 7em; }\n\n.fa-8x {\n font-size: 8em; }\n\n.fa-9x {\n font-size: 9em; }\n\n.fa-10x {\n font-size: 10em; }\n\n.fa-fw {\n text-align: center;\n width: 1.25em; }\n\n.fa-ul {\n list-style-type: none;\n margin-left: 2.5em;\n padding-left: 0; }\n .fa-ul > li {\n position: relative; }\n\n.fa-li {\n left: -2em;\n position: absolute;\n text-align: center;\n width: 2em;\n line-height: inherit; }\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: .1em;\n padding: .2em .25em .15em; }\n\n.fa-pull-left {\n float: left; }\n\n.fa-pull-right {\n float: right; }\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: .3em; }\n\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: .3em; }\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear; }\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8); }\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n.fa-rotate-90 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg); }\n\n.fa-rotate-180 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg); }\n\n.fa-rotate-270 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg); }\n\n.fa-flip-horizontal {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1); }\n\n.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1); }\n\n.fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1); }\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical {\n -webkit-filter: none;\n filter: none; }\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2em; }\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1em; }\n\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2em; }\n\n.fa-inverse {\n color: #fff; }\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px; }\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto; }\n';if("fa"!==e||i!==t){var n=new RegExp("\\.fa\\-","g"),s=new RegExp("\\."+t,"g");r=r.replace(n,"."+e+"-").replace(s,"."+i)}return r};function $t(t){return{found:!0,width:t[0],height:t[1],icon:{tag:"path",attributes:{fill:"currentColor",d:t.slice(4)[0]}}}}var te=!1;function ee(){H.autoAddCss&&(te||q(Qt()),te=!0)}function ie(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map(function(t){return wt(t)})}}),Object.defineProperty(t,"node",{get:function(){if(g){var e=d.createElement("div");return e.innerHTML=t.html,e.children}}}),t}function re(t){var e=t.prefix,i=void 0===e?"fa":e,r=t.iconName;if(r)return Ct(se.definitions,i,r)||Ct(F.styles,i,r)}var ne,se=new(function(){function t(){M(this,t),this.definitions={}}return R(t,[{key:"add",value:function(){for(var t=this,e=arguments.length,i=Array(e),r=0;r<e;r++)i[r]=arguments[r];var n=i.reduce(this._pullDefinitions,{});Object.keys(n).forEach(function(e){t.definitions[e]=T({},t.definitions[e]||{},n[e]),function t(e,i){var r=Object.keys(i).reduce(function(t,e){var r=i[e];return r.icon?t[r.iconName]=r.icon:t[e]=r,t},{});"function"==typeof F.hooks.addPack?F.hooks.addPack(e,r):F.styles[e]=T({},F.styles[e]||{},r),"fas"===e&&t("fa",i)}(e,n[e])})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(t,e){var i=e.prefix&&e.iconName&&e.icon?{0:e}:e;return Object.keys(i).map(function(e){var r=i[e],n=r.prefix,s=r.iconName,o=r.icon;t[n]||(t[n]={}),t[n][s]=o}),t}}]),t}()),oe=(ne=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.transform,r=void 0===i?U:i,n=e.symbol,s=void 0!==n&&n,o=e.mask,a=void 0===o?null:o,l=e.title,c=void 0===l?null:l,h=e.classes,u=void 0===h?[]:h,f=e.attributes,p=void 0===f?{}:f,d=e.styles,_=void 0===d?{}:d;if(t){var m=t.prefix,y=t.iconName,g=t.icon;return ie(T({type:"icon"},t),function(){return ee(),H.autoA11y&&(c?p["aria-labelledby"]=H.replacementClass+"-title-"+V():p["aria-hidden"]="true"),nt({icons:{main:$t(g),mask:a?$t(a.icon):{found:!1,width:null,height:null,icon:{}}},prefix:m,iconName:y,transform:T({},U,r),symbol:s,title:c,extra:{attributes:p,styles:_,classes:u}})})}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(t||{}).icon?t:re(t||{}),r=e.mask;return r&&(r=(r||{}).icon?r:re(r||{})),ne(i,T({},e,{mask:r}))}),ae={noAuto:function(){I({autoReplaceSvg:!1,observeMutations:!1}),Lt&&Lt.disconnect()},dom:{i2svg:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(g){ee();var e=t.node,i=void 0===e?d:e,r=t.callback,n=void 0===r?function(){}:r;H.searchPseudoElements&&Yt(i),Zt(i,n)}},css:Qt,insertCss:function(){q(Qt())}},library:se,parse:{transform:function(t){return Tt(t)}},findIconDefinition:re,icon:oe,text:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.transform,r=void 0===i?U:i,n=e.title,s=void 0===n?null:n,o=e.classes,a=void 0===o?[]:o,l=e.attributes,c=void 0===l?{}:l,h=e.styles,u=void 0===h?{}:h;return ie({type:"text",content:t},function(){return ee(),st({content:t,transform:T({},U,r),title:s,extra:{attributes:c,styles:u,classes:[H.familyPrefix+"-layers-text"].concat(B(a))}})})},layer:function(t){return ie({type:"layer"},function(){ee();var e=[];return t(function(t){Array.isArray(t)?t.map(function(t){e=e.concat(t.abstract)}):e=e.concat(t.abstract)}),[{tag:"span",attributes:{class:H.familyPrefix+"-layers"},children:e}]})}},le=function(){g&&H.autoReplaceSvg&&ae.dom.i2svg({node:d})};Object.defineProperty(ae,"config",{get:function(){return H},set:function(t){I(t)}}),g&&function(t){try{!function(){y&&(p.FontAwesome||(p.FontAwesome=ae),t=function(){Object.keys(F.styles).length>0&&le(),H.observeMutations&&"function"==typeof MutationObserver&&function(t){if(_){var e=t.treeCallback,i=t.nodeCallback,r=t.pseudoElementsCallback;Lt=new _(function(t){Et||K(t).forEach(function(t){if("childList"===t.type&&t.addedNodes.length>0&&!At(t.addedNodes[0])&&(H.searchPseudoElements&&r(t.target),e(t.target)),"attributes"===t.type&&t.target.parentNode&&H.searchPseudoElements&&r(t.target.parentNode),"attributes"===t.type&&At(t.target)&&~E.indexOf(t.attributeName))if("class"===t.attributeName){var n=bt(G(t.target)),s=n.prefix,o=n.iconName;s&&t.target.setAttribute("data-prefix",s),o&&t.target.setAttribute("data-icon",o)}else i(t.target)})}),g&&Lt.observe(d.getElementsByTagName("body")[0],{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}({treeCallback:Zt,nodeCallback:Jt,pseudoElementsCallback:Yt})},g&&(W?setTimeout(t,0):j.push(t))),F.hooks=T({},F.hooks,{addPack:function(t,e){F.styles[t]=T({},F.styles[t]||{},e),yt(),le()},addShims:function(t){var e;(e=F.shims).push.apply(e,B(t)),yt(),le()}});var t}()}catch(t){if(!A)throw t}}(function(){y&&(p.FontAwesome||(p.FontAwesome=ae),t=function(){Object.keys(F.styles).length>0&&le(),H.observeMutations&&"function"==typeof MutationObserver&&function(t){if(_){var e=t.treeCallback,i=t.nodeCallback,r=t.pseudoElementsCallback;Lt=new _(function(t){Et||K(t).forEach(function(t){if("childList"===t.type&&t.addedNodes.length>0&&!At(t.addedNodes[0])&&(H.searchPseudoElements&&r(t.target),e(t.target)),"attributes"===t.type&&t.target.parentNode&&H.searchPseudoElements&&r(t.target.parentNode),"attributes"===t.type&&At(t.target)&&~E.indexOf(t.attributeName))if("class"===t.attributeName){var n=bt(G(t.target)),s=n.prefix,o=n.iconName;s&&t.target.setAttribute("data-prefix",s),o&&t.target.setAttribute("data-icon",o)}else i(t.target)})}),g&&Lt.observe(d.getElementsByTagName("body")[0],{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}({treeCallback:Zt,nodeCallback:Jt,pseudoElementsCallback:Yt})},g&&(W?setTimeout(t,0):j.push(t))),F.hooks=T({},F.hooks,{addPack:function(t,e){F.styles[t]=T({},F.styles[t]||{},e),yt(),le()},addShims:function(t){var e;(e=F.shims).push.apply(e,B(t)),yt(),le()}});var t});var ce=ae,he=i(27),ue=i.n(he),fe=i(26),pe=i.n(fe),de=i(25),_e=i.n(de),me=i(24),ye=i.n(me),ge=i(23),ve=i.n(ge);ce.library.add(ue.a,pe.a,_e.a,ye.a,ve.a),i(57),i(52),n.applyAddon(s);var be,Ce,we,ke,Ae,xe,Se,Ee=!1,Le=!1,Me=!1,Re=new n,Te=document.getElementById("status"),Be=document.getElementById("header"),Oe=document.getElementById("dropupContent"),De=document.getElementById("footer"),Pe=document.getElementById("terminal-container");function He(){Re.fit(),Se.emit("resize",{cols:Re.cols,rows:Re.rows})}if(Re.open(Pe),Re.focus(),Re.fit(),window.addEventListener("resize",He,!1),document.location.pathname){var Ie=document.location.pathname.split("/"),Ne=(Ie.slice(0,Ie.length-1).join("/")+"/").substring(1)+"socket.io";Se=r.connect(null,{resource:Ne})}else Se=r.connect();function Fe(t){Oe.innerHTML=t,logBtn.addEventListener("click",We),Me&&credentialsBtn.addEventListener("click",je),Le&&downloadLogBtn.addEventListener("click",ze)}function je(){return Se.emit("control","replayCredentials"),console.log("replaying credentials"),Re.focus(),!1}function We(){return!0===Ee?(Ee=!1,Le=!0,logBtn.innerHTML='<i class="fas fa-clipboard fa-fw"></i> Start Log',console.log("stopping log, "+Ee),ke=new Date,be=be+"\r\n\r\nLog End for "+Ce+": "+ke.getFullYear()+"/"+(ke.getMonth()+1)+"/"+ke.getDate()+" @ "+ke.getHours()+":"+ke.getMinutes()+":"+ke.getSeconds()+"\r\n",we=ke,Re.focus(),!1):(Ee=!0,Le=!0,logBtn.innerHTML='<i class="fas fa-cog fa-spin fa-fw"></i> Stop Log',downloadLogBtn.style.color="#000",downloadLogBtn.addEventListener("click",ze),console.log("starting log, "+Ee),ke=new Date,be="Log Start for "+Ce+": "+ke.getFullYear()+"/"+(ke.getMonth()+1)+"/"+ke.getDate()+" @ "+ke.getHours()+":"+ke.getMinutes()+":"+ke.getSeconds()+"\r\n\r\n",we=ke,Re.focus(),!1)}function ze(){if(!0===Le){Ae="WebSSH2-"+we.getFullYear()+(we.getMonth()+1)+we.getDate()+"_"+we.getHours()+we.getMinutes()+we.getSeconds()+".log";var t=new Blob([be.replace(/[\u001b\u009b][[\]()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><;]/g,"")],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveBlob(t,Ae);else{var e=window.document.createElement("a");e.href=window.URL.createObjectURL(t),e.download=Ae,document.body.appendChild(e),e.click(),document.body.removeChild(e)}}Re.focus()}Re.on("data",function(t){Se.emit("data",t)}),Se.on("data",function(t){Re.write(t),Ee&&(be+=t)}),Se.on("connect",function(){Se.emit("geometry",Re.cols,Re.rows)}),Se.on("setTerminalOpts",function(t){Re.setOption("cursorBlink",t.cursorBlink),Re.setOption("scrollback",t.scrollback),Re.setOption("tabStopWidth",t.tabStopWidth),Re.setOption("bellStyle",t.bellStyle)}),Se.on("title",function(t){document.title=t}),Se.on("menu",function(t){Fe(t)}),Se.on("status",function(t){Te.innerHTML=t}),Se.on("ssherror",function(t){Te.innerHTML=t,Te.style.backgroundColor="red",xe=!0}),Se.on("headerBackground",function(t){Be.style.backgroundColor=t}),Se.on("header",function(t){t&&(Be.innerHTML=t,Be.style.display="block",Pe.style.height="calc(100% - 38px)",He())}),Se.on("footer",function(t){Ce=t,De.innerHTML=t}),Se.on("statusBackground",function(t){Te.style.backgroundColor=t}),Se.on("allowreplay",function(t){!0===t?(console.log("allowreplay: "+t),Me=!0,Fe(Oe.innerHTML+'<a id="credentialsBtn"><i class="fas fa-key fa-fw"></i> Credentials</a>')):(Me=!1,console.log("allowreplay: "+t))}),Se.on("disconnect",function(t){xe||(Te.style.backgroundColor="red",Te.innerHTML="WEBSOCKET SERVER DISCONNECTED: "+t),Se.io.reconnection(!1)}),Se.on("error",function(t){xe||(Te.style.backgroundColor="red",Te.innerHTML="ERROR: "+t)}),Re.on("title",function(t){document.title=t})},function(t,e){function i(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=i,i.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),i=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-i:t+i}return 0|Math.min(t,this.max)},i.prototype.reset=function(){this.attempts=0},i.prototype.setMin=function(t){this.ms=t},i.prototype.setMax=function(t){this.max=t},i.prototype.setJitter=function(t){this.jitter=t}},function(t,e){t.exports=function(t,e){for(var i=[],r=(e=e||0)||0;r<t.length;r++)i[r-e]=t[r];return i}},function(t,e){},function(t,e,i){(function(e){var r,n=i(6),s=i(2),o=i(5),a=i(4),l=i(16),c=i(1)("engine.io-client:websocket"),h=e.WebSocket||e.MozWebSocket;if("undefined"==typeof window)try{r=i(32)}catch(t){}var u=h;function f(t){t&&t.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=h&&!t.forceNode,this.protocols=t.protocols,this.usingBrowserWebSocket||(u=r),n.call(this,t)}u||"undefined"!=typeof window||(u=r),t.exports=f,a(f,n),f.prototype.name="websocket",f.prototype.supportsBinary=!0,f.prototype.doOpen=function(){if(this.check()){var t=this.uri(),e=this.protocols,i={agent:this.agent,perMessageDeflate:this.perMessageDeflate};i.pfx=this.pfx,i.key=this.key,i.passphrase=this.passphrase,i.cert=this.cert,i.ca=this.ca,i.ciphers=this.ciphers,i.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(i.headers=this.extraHeaders),this.localAddress&&(i.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?e?new u(t,e):new u(t):new u(t,e,i)}catch(t){return this.emit("error",t)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},f.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},f.prototype.write=function(t){var i=this;this.writable=!1;for(var r=t.length,n=0,o=r;n<o;n++)!function(t){s.encodePacket(t,i.supportsBinary,function(n){if(!i.usingBrowserWebSocket){var s={};t.options&&(s.compress=t.options.compress),i.perMessageDeflate&&("string"==typeof n?e.Buffer.byteLength(n):n.length)<i.perMessageDeflate.threshold&&(s.compress=!1)}try{i.usingBrowserWebSocket?i.ws.send(n):i.ws.send(n,s)}catch(t){c("websocket closed before onclose event")}--r||(i.emit("flush"),setTimeout(function(){i.writable=!0,i.emit("drain")},0))})}(t[n])},f.prototype.onClose=function(){n.prototype.onClose.call(this)},f.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},f.prototype.uri=function(){var t=this.query||{},e=this.secure?"wss":"ws",i="";return this.port&&("wss"===e&&443!==Number(this.port)||"ws"===e&&80!==Number(this.port))&&(i=":"+this.port),this.timestampRequests&&(t[this.timestampParam]=l()),this.supportsBinary||(t.b64=1),(t=o.encode(t)).length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+i+this.path+t},f.prototype.check=function(){return!(!u||"__initialize"in u&&this.name===f.prototype.name)}}).call(this,i(0))},function(t,e,i){(function(e){var r=i(18),n=i(4);t.exports=c;var s,o=/\n/g,a=/\\n/g;function l(){}function c(t){r.call(this,t),this.query=this.query||{},s||(e.___eio||(e.___eio=[]),s=e.___eio),this.index=s.length;var i=this;s.push(function(t){i.onData(t)}),this.query.j=this.index,e.document&&e.addEventListener&&e.addEventListener("beforeunload",function(){i.script&&(i.script.onerror=l)},!1)}n(c,r),c.prototype.supportsBinary=!1,c.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},c.prototype.doPoll=function(){var t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};var i=document.getElementsByTagName("script")[0];i?i.parentNode.insertBefore(e,i):(document.head||document.body).appendChild(e),this.script=e,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)},100)},c.prototype.doWrite=function(t,e){var i=this;if(!this.form){var r,n=document.createElement("form"),s=document.createElement("textarea"),l=this.iframeId="eio_iframe_"+this.index;n.className="socketio",n.style.position="absolute",n.style.top="-1000px",n.style.left="-1000px",n.target=l,n.method="POST",n.setAttribute("accept-charset","utf-8"),s.name="d",n.appendChild(s),document.body.appendChild(n),this.form=n,this.area=s}function c(){h(),e()}function h(){if(i.iframe)try{i.form.removeChild(i.iframe)}catch(t){i.onError("jsonp polling iframe removal error",t)}try{var t='<iframe src="javascript:0" name="'+i.iframeId+'">';r=document.createElement(t)}catch(t){(r=document.createElement("iframe")).name=i.iframeId,r.src="javascript:0"}r.id=i.iframeId,i.form.appendChild(r),i.iframe=r}this.form.action=this.uri(),h(),t=t.replace(a,"\\\n"),this.area.value=t.replace(o,"\\n");try{this.form.submit()}catch(t){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===i.iframe.readyState&&c()}:this.iframe.onload=c}}).call(this,i(0))},function(t,e,i){(function(e){var i=e.BlobBuilder||e.WebKitBlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder,r=function(){try{return 2===new Blob(["hi"]).size}catch(t){return!1}}(),n=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(t){return!1}}(),s=i&&i.prototype.append&&i.prototype.getBlob;function o(t){for(var e=0;e<t.length;e++){var i=t[e];if(i.buffer instanceof ArrayBuffer){var r=i.buffer;if(i.byteLength!==r.byteLength){var n=new Uint8Array(i.byteLength);n.set(new Uint8Array(r,i.byteOffset,i.byteLength)),r=n.buffer}t[e]=r}}}t.exports=r?n?e.Blob:function(t,e){return o(t),new Blob(t,e||{})}:s?function(t,e){e=e||{};var r=new i;o(t);for(var n=0;n<t.length;n++)r.append(t[n]);return e.type?r.getBlob(e.type):r.getBlob()}:void 0}).call(this,i(0))},function(t,e){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(256),r=0;r<t.length;r++)i[t.charCodeAt(r)]=r;e.encode=function(e){var i,r=new Uint8Array(e),n=r.length,s="";for(i=0;i<n;i+=3)s+=t[r[i]>>2],s+=t[(3&r[i])<<4|r[i+1]>>4],s+=t[(15&r[i+1])<<2|r[i+2]>>6],s+=t[63&r[i+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s},e.decode=function(t){var e,r,n,s,o,a=.75*t.length,l=t.length,c=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var h=new ArrayBuffer(a),u=new Uint8Array(h);for(e=0;e<l;e+=4)r=i[t.charCodeAt(e)],n=i[t.charCodeAt(e+1)],s=i[t.charCodeAt(e+2)],o=i[t.charCodeAt(e+3)],u[c++]=r<<2|n>>4,u[c++]=(15&n)<<4|s>>2,u[c++]=(3&s)<<6|63&o;return h}}()},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){(function(t,r){var n;!function(s){var o=("object"==typeof t&&t&&t.exports,"object"==typeof r&&r);o.global!==o&&o.window;var a,l,c,h=String.fromCharCode;function u(t){for(var e,i,r=[],n=0,s=t.length;n<s;)(e=t.charCodeAt(n++))>=55296&&e<=56319&&n<s?56320==(64512&(i=t.charCodeAt(n++)))?r.push(((1023&e)<<10)+(1023&i)+65536):(r.push(e),n--):r.push(e);return r}function f(t,e){if(t>=55296&&t<=57343){if(e)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function p(t,e){return h(t>>e&63|128)}function d(t,e){if(0==(4294967168&t))return h(t);var i="";return 0==(4294965248&t)?i=h(t>>6&31|192):0==(4294901760&t)?(f(t,e)||(t=65533),i=h(t>>12&15|224),i+=p(t,6)):0==(4292870144&t)&&(i=h(t>>18&7|240),i+=p(t,12),i+=p(t,6)),i+h(63&t|128)}function _(){if(c>=l)throw Error("Invalid byte index");var t=255&a[c];if(c++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function m(t){var e,i;if(c>l)throw Error("Invalid byte index");if(c==l)return!1;if(e=255&a[c],c++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|_())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|_()<<6|_())>=2048)return f(i,t)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|_()<<12|_()<<6|_())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}var y={version:"2.1.2",encode:function(t,e){for(var i=!1!==(e=e||{}).strict,r=u(t),n=r.length,s=-1,o="";++s<n;)o+=d(r[s],i);return o},decode:function(t,e){var i=!1!==(e=e||{}).strict;a=u(t),l=a.length,c=0;for(var r,n=[];!1!==(r=m(i));)n.push(r);return function(t){for(var e,i=t.length,r=-1,n="";++r<i;)(e=t[r])>65535&&(n+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),n+=h(e);return n}(n)}};void 0===(n=function(){return y}.call(e,i,e,t))||(t.exports=n)}()}).call(this,i(37)(t),i(0))},function(t,e){function i(){}t.exports=function(t,e,r){var n=!1;return r=r||i,s.count=t,0===t?e():s;function s(t,i){if(s.count<=0)throw new Error("after called too many times");--s.count,t?(n=!0,e(t),e=r):0!==s.count||n||e(null,i)}}},function(t,e){t.exports=function(t,e,i){var r=t.byteLength;if(e=e||0,i=i||r,t.slice)return t.slice(e,i);if(e<0&&(e+=r),i<0&&(i+=r),i>r&&(i=r),e>=r||e>=i||0===r)return new ArrayBuffer(0);for(var n=new Uint8Array(t),s=new Uint8Array(i-e),o=e,a=0;o<i;o++,a++)s[a]=n[o];return s.buffer}},function(t,e){t.exports=Object.keys||function(t){var e=[],i=Object.prototype.hasOwnProperty;for(var r in t)i.call(t,r)&&e.push(r);return e}},function(t,e,i){(function(e){var r=i(7),n=i(18),s=i(3),o=i(4),a=i(1)("engine.io-client:polling-xhr");function l(){}function c(t){if(n.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,e.location){var i="https:"===location.protocol,r=location.port;r||(r=i?443:80),this.xd=t.hostname!==e.location.hostname||r!==t.port,this.xs=t.secure!==i}}function h(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.requestTimeout=t.requestTimeout,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders,this.create()}function u(){for(var t in h.requests)h.requests.hasOwnProperty(t)&&h.requests[t].abort()}t.exports=c,t.exports.Request=h,o(c,n),c.prototype.supportsBinary=!0,c.prototype.request=function(t){return(t=t||{}).uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,t.requestTimeout=this.requestTimeout,t.extraHeaders=this.extraHeaders,new h(t)},c.prototype.doWrite=function(t,e){var i="string"!=typeof t&&void 0!==t,r=this.request({method:"POST",data:t,isBinary:i}),n=this;r.on("success",e),r.on("error",function(t){n.onError("xhr post error",t)}),this.sendXhr=r},c.prototype.doPoll=function(){a("xhr poll");var t=this.request(),e=this;t.on("data",function(t){e.onData(t)}),t.on("error",function(t){e.onError("xhr poll error",t)}),this.pollXhr=t},s(h.prototype),h.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized;var i=this.xhr=new r(t),n=this;try{a("xhr open %s: %s",this.method,this.uri),i.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var s in i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(s)&&i.setRequestHeader(s,this.extraHeaders[s])}catch(t){}if("POST"===this.method)try{this.isBinary?i.setRequestHeader("Content-type","application/octet-stream"):i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{i.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in i&&(i.withCredentials=!0),this.requestTimeout&&(i.timeout=this.requestTimeout),this.hasXDR()?(i.onload=function(){n.onLoad()},i.onerror=function(){n.onError(i.responseText)}):i.onreadystatechange=function(){if(2===i.readyState)try{var t=i.getResponseHeader("Content-Type");n.supportsBinary&&"application/octet-stream"===t&&(i.responseType="arraybuffer")}catch(t){}4===i.readyState&&(200===i.status||1223===i.status?n.onLoad():setTimeout(function(){n.onError(i.status)},0))},a("xhr data %s",this.data),i.send(this.data)}catch(t){return void setTimeout(function(){n.onError(t)},0)}e.document&&(this.index=h.requestsCount++,h.requests[this.index]=this)},h.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},h.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},h.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},h.prototype.cleanup=function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=l:this.xhr.onreadystatechange=l,t)try{this.xhr.abort()}catch(t){}e.document&&delete h.requests[this.index],this.xhr=null}},h.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type")}catch(t){}t="application/octet-stream"===e&&this.xhr.response||this.xhr.responseText}catch(t){this.onError(t)}null!=t&&this.onData(t)},h.prototype.hasXDR=function(){return void 0!==e.XDomainRequest&&!this.xs&&this.enablesXDR},h.prototype.abort=function(){this.cleanup()},h.requestsCount=0,h.requests={},e.document&&(e.attachEvent?e.attachEvent("onunload",u):e.addEventListener&&e.addEventListener("beforeunload",u,!1))}).call(this,i(0))},function(t,e){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){t.exports=!1}},function(t,e,i){(function(e){var r=i(19),n=i(3),s=i(1)("engine.io-client:socket"),o=i(15),a=i(2),l=i(22),c=i(5);function h(t,i){if(!(this instanceof h))return new h(t,i);i=i||{},t&&"object"==typeof t&&(i=t,t=null),t?(t=l(t),i.hostname=t.host,i.secure="https"===t.protocol||"wss"===t.protocol,i.port=t.port,t.query&&(i.query=t.query)):i.host&&(i.hostname=l(i.host).host),this.secure=null!=i.secure?i.secure:e.location&&"https:"===location.protocol,i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.agent=i.agent||!1,this.hostname=i.hostname||(e.location?location.hostname:"localhost"),this.port=i.port||(e.location&&location.port?location.port:this.secure?443:80),this.query=i.query||{},"string"==typeof this.query&&(this.query=c.decode(this.query)),this.upgrade=!1!==i.upgrade,this.path=(i.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!i.forceJSONP,this.jsonp=!1!==i.jsonp,this.forceBase64=!!i.forceBase64,this.enablesXDR=!!i.enablesXDR,this.timestampParam=i.timestampParam||"t",this.timestampRequests=i.timestampRequests,this.transports=i.transports||["polling","websocket"],this.transportOptions=i.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=i.policyPort||843,this.rememberUpgrade=i.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=i.onlyBinaryUpgrades,this.perMessageDeflate=!1!==i.perMessageDeflate&&(i.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=i.pfx||null,this.key=i.key||null,this.passphrase=i.passphrase||null,this.cert=i.cert||null,this.ca=i.ca||null,this.ciphers=i.ciphers||null,this.rejectUnauthorized=void 0===i.rejectUnauthorized||i.rejectUnauthorized,this.forceNode=!!i.forceNode;var r="object"==typeof e&&e;r.global===r&&(i.extraHeaders&&Object.keys(i.extraHeaders).length>0&&(this.extraHeaders=i.extraHeaders),i.localAddress&&(this.localAddress=i.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}t.exports=h,h.priorWebsocketSuccess=!1,n(h.prototype),h.protocol=a.protocol,h.Socket=h,h.Transport=i(6),h.transports=i(19),h.parser=i(2),h.prototype.createTransport=function(t){s('creating transport "%s"',t);var e=function(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}(this.query);e.EIO=a.protocol,e.transport=t;var i=this.transportOptions[t]||{};return this.id&&(e.sid=this.id),new r[t]({query:e,socket:this,agent:i.agent||this.agent,hostname:i.hostname||this.hostname,port:i.port||this.port,secure:i.secure||this.secure,path:i.path||this.path,forceJSONP:i.forceJSONP||this.forceJSONP,jsonp:i.jsonp||this.jsonp,forceBase64:i.forceBase64||this.forceBase64,enablesXDR:i.enablesXDR||this.enablesXDR,timestampRequests:i.timestampRequests||this.timestampRequests,timestampParam:i.timestampParam||this.timestampParam,policyPort:i.policyPort||this.policyPort,pfx:i.pfx||this.pfx,key:i.key||this.key,passphrase:i.passphrase||this.passphrase,cert:i.cert||this.cert,ca:i.ca||this.ca,ciphers:i.ciphers||this.ciphers,rejectUnauthorized:i.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:i.perMessageDeflate||this.perMessageDeflate,extraHeaders:i.extraHeaders||this.extraHeaders,forceNode:i.forceNode||this.forceNode,localAddress:i.localAddress||this.localAddress,requestTimeout:i.requestTimeout||this.requestTimeout,protocols:i.protocols||void 0})},h.prototype.open=function(){var t;if(this.rememberUpgrade&&h.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length){var e=this;return void setTimeout(function(){e.emit("error","No transports available")},0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},h.prototype.setTransport=function(t){s("setting transport %s",t.name);var e=this;this.transport&&(s("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",function(){e.onDrain()}).on("packet",function(t){e.onPacket(t)}).on("error",function(t){e.onError(t)}).on("close",function(){e.onClose("transport close")})},h.prototype.probe=function(t){s('probing transport "%s"',t);var e=this.createTransport(t,{probe:1}),i=!1,r=this;function n(){if(r.onlyBinaryUpgrades){var n=!this.supportsBinary&&r.transport.supportsBinary;i=i||n}i||(s('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",function(n){if(!i)if("pong"===n.type&&"probe"===n.data){if(s('probe transport "%s" pong',t),r.upgrading=!0,r.emit("upgrading",e),!e)return;h.priorWebsocketSuccess="websocket"===e.name,s('pausing current transport "%s"',r.transport.name),r.transport.pause(function(){i||"closed"!==r.readyState&&(s("changing transport and sending upgrade packet"),f(),r.setTransport(e),e.send([{type:"upgrade"}]),r.emit("upgrade",e),e=null,r.upgrading=!1,r.flush())})}else{s('probe transport "%s" failed',t);var o=new Error("probe error");o.transport=e.name,r.emit("upgradeError",o)}}))}function o(){i||(i=!0,f(),e.close(),e=null)}function a(i){var n=new Error("probe error: "+i);n.transport=e.name,o(),s('probe transport "%s" failed because of error: %s',t,i),r.emit("upgradeError",n)}function l(){a("transport closed")}function c(){a("socket closed")}function u(t){e&&t.name!==e.name&&(s('"%s" works - aborting "%s"',t.name,e.name),o())}function f(){e.removeListener("open",n),e.removeListener("error",a),e.removeListener("close",l),r.removeListener("close",c),r.removeListener("upgrading",u)}h.priorWebsocketSuccess=!1,e.once("open",n),e.once("error",a),e.once("close",l),this.once("close",c),this.once("upgrading",u),e.open()},h.prototype.onOpen=function(){if(s("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){s("starting upgrade probes");for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},h.prototype.onPacket=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(s('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else s('packet received with socket readyState "%s"',this.readyState)},h.prototype.onHandshake=function(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},h.prototype.onHeartbeat=function(t){clearTimeout(this.pingTimeoutTimer);var e=this;e.pingTimeoutTimer=setTimeout(function(){"closed"!==e.readyState&&e.onClose("ping timeout")},t||e.pingInterval+e.pingTimeout)},h.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout(function(){s("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)},t.pingInterval)},h.prototype.ping=function(){var t=this;this.sendPacket("ping",function(){t.emit("ping")})},h.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},h.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(s("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},h.prototype.write=h.prototype.send=function(t,e,i){return this.sendPacket("message",t,e,i),this},h.prototype.sendPacket=function(t,e,i,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof i&&(r=i,i=null),"closing"!==this.readyState&&"closed"!==this.readyState){(i=i||{}).compress=!1!==i.compress;var n={type:t,data:e,options:i};this.emit("packetCreate",n),this.writeBuffer.push(n),r&&this.once("flush",r),this.flush()}},h.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var t=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?r():e()}):this.upgrading?r():e()}function e(){t.onClose("forced close"),s("socket closing - telling transport to close"),t.transport.close()}function i(){t.removeListener("upgrade",i),t.removeListener("upgradeError",i),e()}function r(){t.once("upgrade",i),t.once("upgradeError",i)}return this},h.prototype.onError=function(t){s("socket error %j",t),h.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},h.prototype.onClose=function(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(s('socket close with reason: "%s"',t),clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)},h.prototype.filterUpgrades=function(t){for(var e=[],i=0,r=t.length;i<r;i++)~o(this.transports,t[i])&&e.push(t[i]);return e}}).call(this,i(0))},function(t,e,i){t.exports=i(44),t.exports.parser=i(2)},function(t,e,i){(function(t){var r=i(8),n=i(21),s=Object.prototype.toString,o="function"==typeof t.Blob||"[object BlobConstructor]"===s.call(t.Blob),a="function"==typeof t.File||"[object FileConstructor]"===s.call(t.File);e.deconstructPacket=function(t){var e=[],i=t.data,s=t;return s.data=function t(e,i){if(!e)return e;if(n(e)){var s={_placeholder:!0,num:i.length};return i.push(e),s}if(r(e)){for(var o=new Array(e.length),a=0;a<e.length;a++)o[a]=t(e[a],i);return o}if("object"==typeof e&&!(e instanceof Date)){o={};for(var l in e)o[l]=t(e[l],i);return o}return e}(i,e),s.attachments=e.length,{packet:s,buffers:e}},e.reconstructPacket=function(t,e){return t.data=function t(e,i){if(!e)return e;if(e&&e._placeholder)return i[e.num];if(r(e))for(var n=0;n<e.length;n++)e[n]=t(e[n],i);else if("object"==typeof e)for(var s in e)e[s]=t(e[s],i);return e}(t.data,e),t.attachments=void 0,t},e.removeBlobs=function(t,e){var i=0,s=t;!function t(l,c,h){if(!l)return l;if(o&&l instanceof Blob||a&&l instanceof File){i++;var u=new FileReader;u.onload=function(){h?h[c]=this.result:s=this.result,--i||e(s)},u.readAsArrayBuffer(l)}else if(r(l))for(var f=0;f<l.length;f++)t(l[f],f,l);else if("object"==typeof l&&!n(l))for(var p in l)t(l[p],p,l)}(s),i||e(s)}}).call(this,i(0))},function(t,e){var i=1e3,r=6e4,n=36e5,s=24*n;function o(t,e,i){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+i:Math.ceil(t/e)+" "+i+"s"}t.exports=function(t,e){e=e||{};var a,l=typeof t;if("string"===l&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var o=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"days":case"day":case"d":return o*s;case"hours":case"hour":case"hrs":case"hr":case"h":return o*n;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(t);if("number"===l&&!1===isNaN(t))return e.long?o(a=t,s,"day")||o(a,n,"hour")||o(a,r,"minute")||o(a,i,"second")||a+" ms":function(t){return t>=s?Math.round(t/s)+"d":t>=n?Math.round(t/n)+"h":t>=r?Math.round(t/r)+"m":t>=i?Math.round(t/i)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,i){function r(t){var i;function r(){if(r.enabled){var t=r,n=+new Date,s=n-(i||n);t.diff=s,t.prev=i,t.curr=n,i=n;for(var o=new Array(arguments.length),a=0;a<o.length;a++)o[a]=arguments[a];o[0]=e.coerce(o[0]),"string"!=typeof o[0]&&o.unshift("%O");var l=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,function(i,r){if("%%"===i)return i;l++;var n=e.formatters[r];if("function"==typeof n){var s=o[l];i=n.call(t,s),o.splice(l,1),l--}return i}),e.formatArgs.call(t,o),(r.log||e.log||console.log.bind(console)).apply(t,o)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var i,r=0;for(i in t)r=(r<<5)-r+t.charCodeAt(i),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=n,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function n(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var i;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\s,]+/),n=r.length;for(i=0;i<n;i++)r[i]&&("-"===(t=r[i].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(i=0;i<e.instances.length;i++){var s=e.instances[i];s.enabled=e.enabled(s.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var i,r;for(i=0,r=e.skips.length;i<r;i++)if(e.skips[i].test(t))return!1;for(i=0,r=e.names.length;i<r;i++)if(e.names[i].test(t))return!0;return!1},e.humanize=i(47),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e){var i,r,n=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(t){i=s}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var l,c=[],h=!1,u=-1;function f(){h&&l&&(h=!1,l.length?c=l.concat(c):u=-1,c.length&&p())}function p(){if(!h){var t=a(f);h=!0;for(var e=c.length;e;){for(l=c,c=[];++u<e;)l&&l[u].run();u=-1,e=c.length}l=null,h=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function _(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];c.push(new d(t,e)),1!==c.length||h||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=_,n.addListener=_,n.once=_,n.off=_,n.removeListener=_,n.removeAllListeners=_,n.emit=_,n.prependListener=_,n.prependOnceListener=_,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(t,e,i){(function(e){var r=i(22),n=i(1)("socket.io-client:url");t.exports=function(t,i){var s=t;i=i||e.location,null==t&&(t=i.protocol+"//"+i.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?i.protocol+t:i.host+t),/^(https?|wss?):\/\//.test(t)||(n("protocol-less url %s",t),t=void 0!==i?i.protocol+"//"+t:"https://"+t),n("parse %s",t),s=r(t)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";var o=-1!==s.host.indexOf(":")?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+o+":"+s.port,s.href=s.protocol+"://"+o+(i&&i.port===s.port?"":":"+s.port),s}}).call(this,i(0))},,function(t,e){},,,,,function(t,e){}]); \ No newline at end of file +!function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=29)}([function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){(function(r){function n(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=i(48)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var i=this.useColors;if(t[0]=(i?"%c":"")+this.namespace+(i?" %c":" ")+t[0]+(i?"%c ":" ")+"+"+e.humanize(this.diff),i){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,s=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(s=++n)}),t.splice(s,0,r)}},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=n,e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(n())}).call(this,i(49))},function(t,e,i){(function(t){var r,n=i(41),s=i(17),o=i(40),a=i(39),l=i(38);t&&t.ArrayBuffer&&(r=i(36));var c="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),h="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),u=c||h;e.protocol=3;var f=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},p=n(f),d={type:"error",data:"parser error"},_=i(35);function m(t,e,i){for(var r=new Array(t.length),n=a(t.length,i),s=function(t,i,n){e(i,function(e,i){r[t]=i,n(e,r)})},o=0;o<t.length;o++)s(o,t[o],n)}e.encodePacket=function(i,r,n,s){"function"==typeof r&&(s=r,r=!1),"function"==typeof n&&(s=n,n=null);var o=void 0===i.data?void 0:i.data.buffer||i.data;if(t.ArrayBuffer&&o instanceof ArrayBuffer)return function(t,i,r){if(!i)return e.encodeBase64Packet(t,r);var n=t.data,s=new Uint8Array(n),o=new Uint8Array(1+n.byteLength);o[0]=f[t.type];for(var a=0;a<s.length;a++)o[a+1]=s[a];return r(o.buffer)}(i,r,s);if(_&&o instanceof t.Blob)return function(t,i,r){if(!i)return e.encodeBase64Packet(t,r);if(u)return function(t,i,r){if(!i)return e.encodeBase64Packet(t,r);var n=new FileReader;return n.onload=function(){t.data=n.result,e.encodePacket(t,i,!0,r)},n.readAsArrayBuffer(t.data)}(t,i,r);var n=new Uint8Array(1);return n[0]=f[t.type],r(new _([n.buffer,t.data]))}(i,r,s);if(o&&o.base64)return function(t,i){return s("b"+e.packets[t.type]+t.data.data)}(i);var a=f[i.type];return void 0!==i.data&&(a+=n?l.encode(String(i.data),{strict:!1}):String(i.data)),s(""+a)},e.encodeBase64Packet=function(i,r){var n,s="b"+e.packets[i.type];if(_&&i.data instanceof t.Blob){var o=new FileReader;return o.onload=function(){var t=o.result.split(",")[1];r(s+t)},o.readAsDataURL(i.data)}try{n=String.fromCharCode.apply(null,new Uint8Array(i.data))}catch(t){for(var a=new Uint8Array(i.data),l=new Array(a.length),c=0;c<a.length;c++)l[c]=a[c];n=String.fromCharCode.apply(null,l)}return s+=t.btoa(n),r(s)},e.decodePacket=function(t,i,r){if(void 0===t)return d;if("string"==typeof t){if("b"===t.charAt(0))return e.decodeBase64Packet(t.substr(1),i);if(r&&!1===(t=function(t){try{t=l.decode(t,{strict:!1})}catch(t){return!1}return t}(t)))return d;var n=t.charAt(0);return Number(n)==n&&p[n]?t.length>1?{type:p[n],data:t.substring(1)}:{type:p[n]}:d}n=new Uint8Array(t)[0];var s=o(t,1);return _&&"blob"===i&&(s=new _([s])),{type:p[n],data:s}},e.decodeBase64Packet=function(t,e){var i=p[t.charAt(0)];if(!r)return{type:i,data:{base64:!0,data:t.substr(1)}};var n=r.decode(t.substr(1));return"blob"===e&&_&&(n=new _([n])),{type:i,data:n}},e.encodePayload=function(t,i,r){"function"==typeof i&&(r=i,i=null);var n=s(t);return i&&n?_&&!u?e.encodePayloadAsBlob(t,r):e.encodePayloadAsArrayBuffer(t,r):t.length?void m(t,function(t,r){e.encodePacket(t,!!n&&i,!1,function(t){r(null,function(t){return t.length+":"+t}(t))})},function(t,e){return r(e.join(""))}):r("0:")},e.decodePayload=function(t,i,r){if("string"!=typeof t)return e.decodePayloadAsBinary(t,i,r);var n;if("function"==typeof i&&(r=i,i=null),""===t)return r(d,0,1);for(var s,o,a="",l=0,c=t.length;l<c;l++){var h=t.charAt(l);if(":"===h){if(""===a||a!=(s=Number(a)))return r(d,0,1);if(a!=(o=t.substr(l+1,s)).length)return r(d,0,1);if(o.length){if(n=e.decodePacket(o,i,!1),d.type===n.type&&d.data===n.data)return r(d,0,1);if(!1===r(n,l+s,c))return}l+=s,a=""}else a+=h}return""!==a?r(d,0,1):void 0},e.encodePayloadAsArrayBuffer=function(t,i){if(!t.length)return i(new ArrayBuffer(0));m(t,function(t,i){e.encodePacket(t,!0,!0,function(t){return i(null,t)})},function(t,e){var r=e.reduce(function(t,e){var i;return t+(i="string"==typeof e?e.length:e.byteLength).toString().length+i+2},0),n=new Uint8Array(r),s=0;return e.forEach(function(t){var e="string"==typeof t,i=t;if(e){for(var r=new Uint8Array(t.length),o=0;o<t.length;o++)r[o]=t.charCodeAt(o);i=r.buffer}n[s++]=e?0:1;var a=i.byteLength.toString();for(o=0;o<a.length;o++)n[s++]=parseInt(a[o]);for(n[s++]=255,r=new Uint8Array(i),o=0;o<r.length;o++)n[s++]=r[o]}),i(n.buffer)})},e.encodePayloadAsBlob=function(t,i){m(t,function(t,i){e.encodePacket(t,!0,!0,function(t){var e=new Uint8Array(1);if(e[0]=1,"string"==typeof t){for(var r=new Uint8Array(t.length),n=0;n<t.length;n++)r[n]=t.charCodeAt(n);t=r.buffer,e[0]=0}var s=(t instanceof ArrayBuffer?t.byteLength:t.size).toString(),o=new Uint8Array(s.length+1);for(n=0;n<s.length;n++)o[n]=parseInt(s[n]);if(o[s.length]=255,_){var a=new _([e.buffer,o.buffer,t]);i(null,a)}})},function(t,e){return i(new _(e))})},e.decodePayloadAsBinary=function(t,i,r){"function"==typeof i&&(r=i,i=null);for(var n=t,s=[];n.byteLength>0;){for(var a=new Uint8Array(n),l=0===a[0],c="",h=1;255!==a[h];h++){if(c.length>310)return r(d,0,1);c+=a[h]}n=o(n,2+c.length),c=parseInt(c);var u=o(n,0,c);if(l)try{u=String.fromCharCode.apply(null,new Uint8Array(u))}catch(t){var f=new Uint8Array(u);for(u="",h=0;h<f.length;h++)u+=String.fromCharCode(f[h])}s.push(u),n=o(n,c)}var p=s.length;s.forEach(function(t,n){r(e.decodePacket(t,i,!0),n,p)})}}).call(this,i(0))},function(t,e,i){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var n=0;n<r.length;n++)if((i=r[n])===e||i.fn===e){r.splice(n,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),i=this._callbacks["$"+t];if(i)for(var r=0,n=(i=i.slice(0)).length;r<n;++r)i[r].apply(this,e);return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){t.exports=function(t,e){var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}},function(t,e){e.encode=function(t){var e="";for(var i in t)t.hasOwnProperty(i)&&(e.length&&(e+="&"),e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return e},e.decode=function(t){for(var e={},i=t.split("&"),r=0,n=i.length;r<n;r++){var s=i[r].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}},function(t,e,i){var r=i(2),n=i(3);function s(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.forceNode=t.forceNode,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}t.exports=s,n(s.prototype),s.prototype.onError=function(t,e){var i=new Error(t);return i.type="TransportError",i.description=e,this.emit("error",i),this},s.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},s.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},s.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},s.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},s.prototype.onData=function(t){var e=r.decodePacket(t,this.socket.binaryType);this.onPacket(e)},s.prototype.onPacket=function(t){this.emit("packet",t)},s.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(t,e,i){(function(e){var r=i(43);t.exports=function(t){var i=t.xdomain,n=t.xscheme,s=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!i||r))return new XMLHttpRequest}catch(t){}try{if("undefined"!=typeof XDomainRequest&&!n&&s)return new XDomainRequest}catch(t){}if(!i)try{return new(e[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}}).call(this,i(0))},function(t,e){var i={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},function(t,e,i){var r=i(1)("socket.io-parser"),n=i(3),s=i(46),o=i(8),a=i(21);function l(){}e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=l,e.Decoder=u;var c=e.ERROR+'"encode error"';function h(t){var i=""+t.type;if(e.BINARY_EVENT!==t.type&&e.BINARY_ACK!==t.type||(i+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(i+=t.nsp+","),null!=t.id&&(i+=t.id),null!=t.data){var n=function(t){try{return JSON.stringify(t)}catch(t){return!1}}(t.data);if(!1===n)return c;i+=n}return r("encoded %j as %s",t,i),i}function u(){this.reconstructor=null}function f(t){this.reconPack=t,this.buffers=[]}function p(t){return{type:e.ERROR,data:"parser error: "+t}}l.prototype.encode=function(t,i){r("encoding packet %j",t),e.BINARY_EVENT===t.type||e.BINARY_ACK===t.type?function(t,e){s.removeBlobs(t,function(t){var i=s.deconstructPacket(t),r=h(i.packet),n=i.buffers;n.unshift(r),e(n)})}(t,i):i([h(t)])},n(u.prototype),u.prototype.add=function(t){var i;if("string"==typeof t)i=function(t){var i=0,n={type:Number(t.charAt(0))};if(null==e.types[n.type])return p("unknown packet type "+n.type);if(e.BINARY_EVENT===n.type||e.BINARY_ACK===n.type){for(var s="";"-"!==t.charAt(++i)&&(s+=t.charAt(i),i!=t.length););if(s!=Number(s)||"-"!==t.charAt(i))throw new Error("Illegal attachments");n.attachments=Number(s)}if("/"===t.charAt(i+1))for(n.nsp="";++i;){if(","===(l=t.charAt(i)))break;if(n.nsp+=l,i===t.length)break}else n.nsp="/";var a=t.charAt(i+1);if(""!==a&&Number(a)==a){for(n.id="";++i;){var l;if(null==(l=t.charAt(i))||Number(l)!=l){--i;break}if(n.id+=t.charAt(i),i===t.length)break}n.id=Number(n.id)}if(t.charAt(++i)){var c=function(t){try{return JSON.parse(t)}catch(t){return!1}}(t.substr(i));if(!(!1!==c&&(n.type===e.ERROR||o(c))))return p("invalid payload");n.data=c}return r("decoded %s as %j",t,n),n}(t),e.BINARY_EVENT===i.type||e.BINARY_ACK===i.type?(this.reconstructor=new f(i),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",i)):this.emit("decoded",i);else{if(!a(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(i=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,this.emit("decoded",i))}},u.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},f.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e=s.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},f.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(t,e,i){var r;t.exports=function t(e,i,n){function s(a,l){if(!i[a]){if(!e[a]){if(!l&&("function"==typeof r&&r))return r(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var h=i[a]={exports:{}};e[a][0].call(h.exports,function(t){return s(e[a][1][t]||t)},h,h.exports,t,e,i,n)}return i[a].exports}for(var o="function"==typeof r&&r,a=0;a<n.length;a++)s(n[a]);return s}({1:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r,n=t("./Strings"),s=t("./shared/utils/Browser"),o=t("./utils/RenderDebouncer"),a=t("./utils/Dom");!function(t){t[t.Top=0]="Top",t[t.Bottom=1]="Bottom"}(r||(r={}));var l=function(){function t(t){var e=this;this._terminal=t,this._liveRegionLineCount=0,this._disposables=[],this._charsToConsume=[],this._accessibilityTreeRoot=document.createElement("div"),this._accessibilityTreeRoot.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(var i=0;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);this._topBoundaryFocusListener=function(t){return e._onBoundaryFocus(t,r.Top)},this._bottomBoundaryFocusListener=function(t){return e._onBoundaryFocus(t,r.Bottom)},this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityTreeRoot.appendChild(this._rowContainer),this._renderRowsDebouncer=new o.RenderDebouncer(this._terminal,this._renderRows.bind(this)),this._refreshRows(),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityTreeRoot.appendChild(this._liveRegion),this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityTreeRoot),this._disposables.push(this._renderRowsDebouncer),this._disposables.push(this._terminal.addDisposableListener("resize",function(t){return e._onResize(t.cols,t.rows)})),this._disposables.push(this._terminal.addDisposableListener("refresh",function(t){return e._refreshRows(t.start,t.end)})),this._disposables.push(this._terminal.addDisposableListener("scroll",function(t){return e._refreshRows()})),this._disposables.push(this._terminal.addDisposableListener("a11y.char",function(t){return e._onChar(t)})),this._disposables.push(this._terminal.addDisposableListener("linefeed",function(){return e._onChar("\n")})),this._disposables.push(this._terminal.addDisposableListener("a11y.tab",function(t){return e._onTab(t)})),this._disposables.push(this._terminal.addDisposableListener("key",function(t){return e._onKey(t)})),this._disposables.push(this._terminal.addDisposableListener("blur",function(){return e._clearLiveRegion()})),this._disposables.push(this._terminal.addDisposableListener("dprchange",function(){return e._refreshRowsDimensions()})),this._disposables.push(this._terminal.renderer.addDisposableListener("resize",function(){return e._refreshRowsDimensions()})),this._disposables.push(a.addDisposableListener(window,"resize",function(){return e._refreshRowsDimensions()}))}return t.prototype.dispose=function(){this._disposables.forEach(function(t){return t.dispose()}),this._disposables.length=0,this._terminal.element.removeChild(this._accessibilityTreeRoot),this._rowElements.length=0},t.prototype._onBoundaryFocus=function(t,e){var i=t.target,n=this._rowElements[e===r.Top?1:this._rowElements.length-2];if(i.getAttribute("aria-posinset")!==(e===r.Top?"1":""+this._terminal.buffer.lines.length)&&t.relatedTarget===n){var s,o;if(e===r.Top?(s=i,o=this._rowElements.pop(),this._rowContainer.removeChild(o)):(s=this._rowElements.shift(),o=i,this._rowContainer.removeChild(s)),s.removeEventListener("focus",this._topBoundaryFocusListener),o.removeEventListener("focus",this._bottomBoundaryFocusListener),e===r.Top){var a=this._createAccessibilityTreeNode();this._rowElements.unshift(a),this._rowContainer.insertAdjacentElement("afterbegin",a)}else{a=this._createAccessibilityTreeNode();this._rowElements.push(a),this._rowContainer.appendChild(a)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(e===r.Top?-1:1),this._rowElements[e===r.Top?1:this._rowElements.length-2].focus(),t.preventDefault(),t.stopImmediatePropagation()}},t.prototype._onResize=function(t,e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var i=this._rowContainer.children.length;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},t.prototype._createAccessibilityTreeNode=function(){var t=document.createElement("div");return t.setAttribute("role","listitem"),t.tabIndex=-1,this._refreshRowDimensions(t),t},t.prototype._onTab=function(t){for(var e=0;e<t;e++)this._onChar(" ")},t.prototype._onChar=function(t){var e=this;if(this._liveRegionLineCount<21){if(this._charsToConsume.length>0)this._charsToConsume.shift()!==t&&this._announceCharacter(t);else this._announceCharacter(t);"\n"===t&&(this._liveRegionLineCount++,21===this._liveRegionLineCount&&(this._liveRegion.textContent+=n.tooMuchOutput)),s.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){e._accessibilityTreeRoot.appendChild(e._liveRegion)},0)}},t.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,s.isMac&&this._liveRegion.parentNode&&this._accessibilityTreeRoot.removeChild(this._liveRegion)},t.prototype._onKey=function(t){this._clearLiveRegion(),this._charsToConsume.push(t)},t.prototype._refreshRows=function(t,e){this._renderRowsDebouncer.refresh(t,e)},t.prototype._renderRows=function(t,e){for(var i=this._terminal.buffer,r=i.lines.length.toString(),s=t;s<=e;s++){var o=i.translateBufferLineToString(i.ydisp+s,!0),a=(i.ydisp+s+1).toString(),l=this._rowElements[s];l.textContent=0===o.length?n.blankLine:o,l.setAttribute("aria-posinset",a),l.setAttribute("aria-setsize",r)}},t.prototype._refreshRowsDimensions=function(){if(this._terminal.renderer.dimensions.actualCellHeight)for(var t=0;t<this._terminal.rows;t++)this._refreshRowDimensions(this._rowElements[t])},t.prototype._refreshRowDimensions=function(t){t.style.height=this._terminal.renderer.dimensions.actualCellHeight+"px"},t.prototype._announceCharacter=function(t){" "===t?this._liveRegion.innerHTML+=" ":this._liveRegion.textContent+=t},t}();i.AccessibilityManager=l},{"./Strings":15,"./shared/utils/Browser":36,"./utils/Dom":40,"./utils/RenderDebouncer":42}],2:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("./utils/CircularList"),o=t("./EventEmitter");i.CHAR_DATA_ATTR_INDEX=0,i.CHAR_DATA_CHAR_INDEX=1,i.CHAR_DATA_WIDTH_INDEX=2,i.CHAR_DATA_CODE_INDEX=3,i.MAX_BUFFER_SIZE=4294967295;var a=function(){function t(t,e){this._terminal=t,this._hasScrollback=e,this.markers=[],this.clear()}return Object.defineProperty(t.prototype,"lines",{get:function(){return this._lines},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._terminal.rows},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCursorInViewport",{get:function(){var t=this.ybase+this.y-this.ydisp;return t>=0&&t<this._terminal.rows},enumerable:!0,configurable:!0}),t.prototype._getCorrectBufferLength=function(t){if(!this._hasScrollback)return t;var e=t+this._terminal.options.scrollback;return e>i.MAX_BUFFER_SIZE?i.MAX_BUFFER_SIZE:e},t.prototype.fillViewportRows=function(){if(0===this._lines.length)for(var t=this._terminal.rows;t--;)this.lines.push(this._terminal.blankLine())},t.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this._lines=new s.CircularList(this._getCorrectBufferLength(this._terminal.rows)),this.scrollTop=0,this.scrollBottom=this._terminal.rows-1,this.setupTabStops()},t.prototype.resize=function(t,e){var i=this._getCorrectBufferLength(e);if(i>this._lines.maxLength&&(this._lines.maxLength=i),this._lines.length>0){if(this._terminal.cols<t)for(var r=[this._terminal.defAttr," ",1,32],n=0;n<this._lines.length;n++)for(;this._lines.get(n).length<t;)this._lines.get(n).push(r);var s=0;if(this._terminal.rows<e)for(var o=this._terminal.rows;o<e;o++)this._lines.length<e+this.ybase&&(this.ybase>0&&this._lines.length<=this.ybase+this.y+s+1?(this.ybase--,s++,this.ydisp>0&&this.ydisp--):this._lines.push(this._terminal.blankLine(void 0,void 0,t)));else for(o=this._terminal.rows;o>e;o--)this._lines.length>e+this.ybase&&(this._lines.length>this.ybase+this.y+1?this._lines.pop():(this.ybase++,this.ydisp++));if(i<this._lines.maxLength){var a=this._lines.length-i;a>0&&(this._lines.trimStart(a),this.ybase=Math.max(this.ybase-a,0),this.ydisp=Math.max(this.ydisp-a,0)),this._lines.maxLength=i}this.x=Math.min(this.x,t-1),this.y=Math.min(this.y,e-1),s&&(this.y+=s),this.savedY=Math.min(this.savedY,e-1),this.savedX=Math.min(this.savedX,t-1),this.scrollTop=0}this.scrollBottom=e-1},t.prototype.translateBufferLineToString=function(t,e,r,n){void 0===r&&(r=0),void 0===n&&(n=null);var s="",o=this.lines.get(t);if(!o)return"";var a=r;null===n&&(n=o.length);for(var l=n,c=0;c<o.length;c++){var h=o[c];s+=h[i.CHAR_DATA_CHAR_INDEX],0===h[i.CHAR_DATA_WIDTH_INDEX]?(r>=c&&a--,n>=c&&l--):h[i.CHAR_DATA_CHAR_INDEX].length>1&&(r>c&&(a+=h[i.CHAR_DATA_CHAR_INDEX].length-1),n>c&&(l+=h[i.CHAR_DATA_CHAR_INDEX].length-1))}if(e){var u=s.search(/\s+$/);if(-1!==u&&(l=Math.min(l,u)),l<=a)return""}return s.substring(a,l)},t.prototype.setupTabStops=function(t){for(null!=t?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this._terminal.cols;t+=this._terminal.options.tabStopWidth)this.tabs[t]=!0},t.prototype.prevStop=function(t){for(null==t&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this._terminal.cols?this._terminal.cols-1:t<0?0:t},t.prototype.nextStop=function(t){for(null==t&&(t=this.x);!this.tabs[++t]&&t<this._terminal.cols;);return t>=this._terminal.cols?this._terminal.cols-1:t<0?0:t},t.prototype.addMarker=function(t){var e=this,i=new l(t);return this.markers.push(i),i.disposables.push(this._lines.addDisposableListener("trim",function(t){i.line-=t,i.line<0&&i.dispose()})),i.on("dispose",function(){return e._removeMarker(i)}),i},t.prototype._removeMarker=function(t){this.markers.splice(this.markers.indexOf(t),1)},t}();i.Buffer=a;var l=function(t){function e(i){var r=t.call(this)||this;return r.line=i,r._id=e.NEXT_ID++,r.isDisposed=!1,r.disposables=[],r}return n(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.disposables.forEach(function(t){return t.dispose()}),this.disposables.length=0,this.emit("dispose"))},e.NEXT_ID=1,e}(o.EventEmitter);i.Marker=l},{"./EventEmitter":8,"./utils/CircularList":38}],3:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("./Buffer"),o=function(t){function e(e){var i=t.call(this)||this;return i._terminal=e,i._normal=new s.Buffer(i._terminal,!0),i._normal.fillViewportRows(),i._alt=new s.Buffer(i._terminal,!1),i._activeBuffer=i._normal,i.setupTabStops(),i}return n(e,t),Object.defineProperty(e.prototype,"alt",{get:function(){return this._alt},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},enumerable:!0,configurable:!0}),e.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._alt.clear(),this._activeBuffer=this._normal,this.emit("activate",{activeBuffer:this._normal,inactiveBuffer:this._alt}))},e.prototype.activateAltBuffer=function(){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(),this._activeBuffer=this._alt,this.emit("activate",{activeBuffer:this._alt,inactiveBuffer:this._normal}))},e.prototype.resize=function(t,e){this._normal.resize(t,e),this._alt.resize(t,e)},e.prototype.setupTabStops=function(t){this._normal.setupTabStops(t),this._alt.setupTabStops(t)},e}(t("./EventEmitter").EventEmitter);i.BufferSet=o},{"./Buffer":2,"./EventEmitter":8}],4:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.wcwidth=function(t){var e=[[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]],i=[[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]];function r(t,e){var i,r=0,n=e.length-1;if(t<e[0][0]||t>e[n][1])return!1;for(;n>=r;)if(t>e[i=r+n>>1][1])r=i+1;else{if(!(t<e[i][0]))return!0;n=i-1}return!1}var n=0|t.control,s=null;return function(o){if((o|=0)<32)return 0|n;if(o<127)return 1;var a,l=s||function(){s="undefined"==typeof Uint32Array?new Array(4096):new Uint32Array(4096);for(var i=0;i<4096;++i){for(var n=0,o=16;o--;)n=n<<2|(0===(a=16*i+o)?t.nul:a<32||a>=127&&a<160?t.control:r(a,e)?0:a>=4352&&(a<=4447||9001===a||9002===a||a>=11904&&a<=42191&&12351!==a||a>=44032&&a<=55203||a>=63744&&a<=64255||a>=65040&&a<=65049||a>=65072&&a<=65135||a>=65280&&a<=65376||a>=65504&&a<=65510)?2:1);s[i]=n}var a;return s}();return o<65536?l[o>>4]>>((15&o)<<1)&3:r(a=o,i)?0:a>=131072&&a<=196605||a>=196608&&a<=262141?2:1}}({nul:0,control:0})},{}],5:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.CHARSETS={},i.DEFAULT_CHARSET=i.CHARSETS.B,i.CHARSETS[0]={"`":"◆",a:"▒",b:"\t",c:"\f",d:"\r",e:"\n",f:"°",g:"±",h:"",i:"\v",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},i.CHARSETS.A={"#":"£"},i.CHARSETS.B=null,i.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},i.CHARSETS.C=i.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},i.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},i.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},i.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},i.CHARSETS.E=i.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},i.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},i.CHARSETS.H=i.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},{}],6:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t,e,i){this._textarea=t,this._compositionView=e,this._terminal=i,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:null,end:null}}return t.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},t.prototype.compositionupdate=function(t){var e=this;this._compositionView.textContent=t.data,this.updateCompositionElements(),setTimeout(function(){e._compositionPosition.end=e._textarea.value.length},0)},t.prototype.compositionend=function(){this._finalizeComposition(!0)},t.prototype.keydown=function(t){if(this._isComposing||this._isSendingComposition){if(229===t.keyCode)return!1;if(16===t.keyCode||17===t.keyCode||18===t.keyCode)return!1;this._finalizeComposition(!1)}return 229!==t.keyCode||(this._handleAnyTextareaChanges(),!1)},t.prototype._finalizeComposition=function(t){var e=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,this._clearTextareaPosition(),t){var i={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(e._isSendingComposition){e._isSendingComposition=!1;var t;t=e._isComposing?e._textarea.value.substring(i.start,i.end):e._textarea.value.substring(i.start),e._terminal.handler(t)}},0)}else{this._isSendingComposition=!1;var r=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._terminal.handler(r)}},t.prototype._handleAnyTextareaChanges=function(){var t=this,e=this._textarea.value;setTimeout(function(){if(!t._isComposing){var i=t._textarea.value.replace(e,"");i.length>0&&t._terminal.handler(i)}},0)},t.prototype.updateCompositionElements=function(t){var e=this;if(this._isComposing){if(this._terminal.buffer.isCursorInViewport){var i=Math.ceil(this._terminal.charMeasure.height*this._terminal.options.lineHeight),r=this._terminal.buffer.y*i,n=this._terminal.buffer.x*this._terminal.charMeasure.width;this._compositionView.style.left=n+"px",this._compositionView.style.top=r+"px",this._compositionView.style.height=i+"px",this._compositionView.style.lineHeight=i+"px";var s=this._compositionView.getBoundingClientRect();this._textarea.style.left=n+"px",this._textarea.style.top=r+"px",this._textarea.style.width=s.width+"px",this._textarea.style.height=s.height+"px",this._textarea.style.lineHeight=s.height+"px"}t||setTimeout(function(){return e.updateCompositionElements(!0)},0)}},t.prototype._clearTextareaPosition=function(){this._textarea.style.left="",this._textarea.style.top=""},t}();i.CompositionHelper=r},{}],7:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(t){t.NUL="\0",t.SOH="",t.STX="",t.ETX="",t.EOT="",t.ENQ="",t.ACK="",t.BEL="",t.BS="\b",t.HT="\t",t.LF="\n",t.VT="\v",t.FF="\f",t.CR="\r",t.SO="",t.SI="",t.DLE="",t.DC1="",t.DC2="",t.DC3="",t.DC4="",t.NAK="",t.SYN="",t.ETB="",t.CAN="",t.EM="",t.SUB="",t.ESC="",t.FS="",t.GS="",t.RS="",t.US="",t.SP=" ",t.DEL=""}(i.C0||(i.C0={}))},{}],8:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(){this._events=this._events||{}}return t.prototype.on=function(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)},t.prototype.addDisposableListener=function(t,e){var i=this;return this.on(t,e),{dispose:function(){e&&(i.off(t,e),e=null)}}},t.prototype.off=function(t,e){if(this._events[t])for(var i=this._events[t],r=i.length;r--;)if(i[r]===e)return void i.splice(r,1)},t.prototype.removeAllListeners=function(t){this._events[t]&&delete this._events[t]},t.prototype.emit=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(this._events[t])for(var r=this._events[t],n=0;n<r.length;n++)r[n].apply(this,e)},t.prototype.listeners=function(t){return this._events[t]||[]},t.prototype.destroy=function(){this._events={}},t}();i.EventEmitter=r},{}],9:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./EscapeSequences"),n=t("./Charsets"),s=t("./Buffer"),o=t("./renderer/Types"),a=t("./CharWidth"),l=function(){function t(t){this._terminal=t}return t.prototype.addChar=function(t,e){if(t>=" "){var i=a.wcwidth(e);this._terminal.charset&&this._terminal.charset[t]&&(t=this._terminal.charset[t]),this._terminal.options.screenReaderMode&&this._terminal.emit("a11y.char",t);var r=this._terminal.buffer.y+this._terminal.buffer.ybase;if(!i&&this._terminal.buffer.x)return void(this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-1]&&(this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-1][s.CHAR_DATA_WIDTH_INDEX]?(this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-1][s.CHAR_DATA_CHAR_INDEX]+=t,this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-1][3]=t.charCodeAt(0)):this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-2]&&(this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-2][s.CHAR_DATA_CHAR_INDEX]+=t,this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-2][3]=t.charCodeAt(0)),this._terminal.updateRange(this._terminal.buffer.y)));if(this._terminal.buffer.x+i-1>=this._terminal.cols)if(this._terminal.wraparoundMode)this._terminal.buffer.x=0,this._terminal.buffer.y++,this._terminal.buffer.y>this._terminal.buffer.scrollBottom?(this._terminal.buffer.y--,this._terminal.scroll(!0)):this._terminal.buffer.lines.get(this._terminal.buffer.y).isWrapped=!0;else if(2===i)return;if(r=this._terminal.buffer.y+this._terminal.buffer.ybase,this._terminal.insertMode)for(var n=0;n<i;++n){0===this._terminal.buffer.lines.get(this._terminal.buffer.y+this._terminal.buffer.ybase).pop()[s.CHAR_DATA_WIDTH_INDEX]&&this._terminal.buffer.lines.get(r)[this._terminal.cols-2]&&2===this._terminal.buffer.lines.get(r)[this._terminal.cols-2][s.CHAR_DATA_WIDTH_INDEX]&&(this._terminal.buffer.lines.get(r)[this._terminal.cols-2]=[this._terminal.curAttr," ",1," ".charCodeAt(0)]),this._terminal.buffer.lines.get(r).splice(this._terminal.buffer.x,0,[this._terminal.curAttr," ",1," ".charCodeAt(0)])}this._terminal.buffer.lines.get(r)[this._terminal.buffer.x]=[this._terminal.curAttr,t,i,t.charCodeAt(0)],this._terminal.buffer.x++,this._terminal.updateRange(this._terminal.buffer.y),2===i&&(this._terminal.buffer.lines.get(r)[this._terminal.buffer.x]=[this._terminal.curAttr,"",0,void 0],this._terminal.buffer.x++)}},t.prototype.bell=function(){this._terminal.bell()},t.prototype.lineFeed=function(){this._terminal.convertEol&&(this._terminal.buffer.x=0),this._terminal.buffer.y++,this._terminal.buffer.y>this._terminal.buffer.scrollBottom&&(this._terminal.buffer.y--,this._terminal.scroll()),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--,this._terminal.emit("linefeed")},t.prototype.carriageReturn=function(){this._terminal.buffer.x=0},t.prototype.backspace=function(){this._terminal.buffer.x>0&&this._terminal.buffer.x--},t.prototype.tab=function(){var t=this._terminal.buffer.x;this._terminal.buffer.x=this._terminal.buffer.nextStop(),this._terminal.options.screenReaderMode&&this._terminal.emit("a11y.tab",this._terminal.buffer.x-t)},t.prototype.shiftOut=function(){this._terminal.setgLevel(1)},t.prototype.shiftIn=function(){this._terminal.setgLevel(0)},t.prototype.insertChars=function(t){var e=t[0];e<1&&(e=1);for(var i=this._terminal.buffer.y+this._terminal.buffer.ybase,r=this._terminal.buffer.x,n=[this._terminal.eraseAttr()," ",1,32];e--&&r<this._terminal.cols;)this._terminal.buffer.lines.get(i).splice(r++,0,n),this._terminal.buffer.lines.get(i).pop()},t.prototype.cursorUp=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y-=e,this._terminal.buffer.y<0&&(this._terminal.buffer.y=0)},t.prototype.cursorDown=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y+=e,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--},t.prototype.cursorForward=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x+=e,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.cursorBackward=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--,this._terminal.buffer.x-=e,this._terminal.buffer.x<0&&(this._terminal.buffer.x=0)},t.prototype.cursorNextLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y+=e,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x=0},t.prototype.cursorPrecedingLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y-=e,this._terminal.buffer.y<0&&(this._terminal.buffer.y=0),this._terminal.buffer.x=0},t.prototype.cursorCharAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x=e-1},t.prototype.cursorPosition=function(t){var e,i=t[0]-1;e=t.length>=2?t[1]-1:0,i<0?i=0:i>=this._terminal.rows&&(i=this._terminal.rows-1),e<0?e=0:e>=this._terminal.cols&&(e=this._terminal.cols-1),this._terminal.buffer.x=e,this._terminal.buffer.y=i},t.prototype.cursorForwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.x=this._terminal.buffer.nextStop()},t.prototype.eraseInDisplay=function(t){var e;switch(t[0]){case 0:for(this._terminal.eraseRight(this._terminal.buffer.x,this._terminal.buffer.y),e=this._terminal.buffer.y+1;e<this._terminal.rows;e++)this._terminal.eraseLine(e);break;case 1:for(this._terminal.eraseLeft(this._terminal.buffer.x,this._terminal.buffer.y),e=this._terminal.buffer.y;e--;)this._terminal.eraseLine(e);break;case 2:for(e=this._terminal.rows;e--;)this._terminal.eraseLine(e);break;case 3:var i=this._terminal.buffer.lines.length-this._terminal.rows;i>0&&(this._terminal.buffer.lines.trimStart(i),this._terminal.buffer.ybase=Math.max(this._terminal.buffer.ybase-i,0),this._terminal.buffer.ydisp=Math.max(this._terminal.buffer.ydisp-i,0),this._terminal.emit("scroll",0))}},t.prototype.eraseInLine=function(t){switch(t[0]){case 0:this._terminal.eraseRight(this._terminal.buffer.x,this._terminal.buffer.y);break;case 1:this._terminal.eraseLeft(this._terminal.buffer.x,this._terminal.buffer.y);break;case 2:this._terminal.eraseLine(this._terminal.buffer.y)}},t.prototype.insertLines=function(t){var e=t[0];e<1&&(e=1);for(var i=this._terminal.buffer.y+this._terminal.buffer.ybase,r=this._terminal.rows-1-this._terminal.buffer.scrollBottom,n=this._terminal.rows-1+this._terminal.buffer.ybase-r+1;e--;)this._terminal.buffer.lines.splice(n-1,1),this._terminal.buffer.lines.splice(i,0,this._terminal.blankLine(!0));this._terminal.updateRange(this._terminal.buffer.y),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.deleteLines=function(t){var e=t[0];e<1&&(e=1);var i,r=this._terminal.buffer.y+this._terminal.buffer.ybase;for(i=this._terminal.rows-1-this._terminal.buffer.scrollBottom,i=this._terminal.rows-1+this._terminal.buffer.ybase-i;e--;)this._terminal.buffer.lines.splice(r,1),this._terminal.buffer.lines.splice(i,0,this._terminal.blankLine(!0));this._terminal.updateRange(this._terminal.buffer.y),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.deleteChars=function(t){var e=t[0];e<1&&(e=1);for(var i=this._terminal.buffer.y+this._terminal.buffer.ybase,r=[this._terminal.eraseAttr()," ",1,32];e--;)this._terminal.buffer.lines.get(i).splice(this._terminal.buffer.x,1),this._terminal.buffer.lines.get(i).push(r);this._terminal.updateRange(this._terminal.buffer.y)},t.prototype.scrollUp=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollTop,1),this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollBottom,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.buffer.scrollTop),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.scrollDown=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollBottom,1),this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollTop,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.buffer.scrollTop),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.eraseChars=function(t){var e=t[0];e<1&&(e=1);for(var i=this._terminal.buffer.y+this._terminal.buffer.ybase,r=this._terminal.buffer.x,n=[this._terminal.eraseAttr()," ",1,32];e--&&r<this._terminal.cols;)this._terminal.buffer.lines.get(i)[r++]=n},t.prototype.cursorBackwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.x=this._terminal.buffer.prevStop()},t.prototype.charPosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x=e-1,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.HPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x+=e,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.repeatPrecedingCharacter=function(t){for(var e=t[0]||1,i=this._terminal.buffer.lines.get(this._terminal.buffer.ybase+this._terminal.buffer.y),r=i[this._terminal.buffer.x-1]||[this._terminal.defAttr," ",1,32];e--;)i[this._terminal.buffer.x++]=r},t.prototype.sendDeviceAttributes=function(t){t[0]>0||(this._terminal.prefix?">"===this._terminal.prefix&&(this._terminal.is("xterm")?this._terminal.send(r.C0.ESC+"[>0;276;0c"):this._terminal.is("rxvt-unicode")?this._terminal.send(r.C0.ESC+"[>85;95;0c"):this._terminal.is("linux")?this._terminal.send(t[0]+"c"):this._terminal.is("screen")&&this._terminal.send(r.C0.ESC+"[>83;40003;0c")):this._terminal.is("xterm")||this._terminal.is("rxvt-unicode")||this._terminal.is("screen")?this._terminal.send(r.C0.ESC+"[?1;2c"):this._terminal.is("linux")&&this._terminal.send(r.C0.ESC+"[?6c"))},t.prototype.linePosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y=e-1,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1)},t.prototype.VPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y+=e,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--},t.prototype.HVPosition=function(t){t[0]<1&&(t[0]=1),t[1]<1&&(t[1]=1),this._terminal.buffer.y=t[0]-1,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x=t[1]-1,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.tabClear=function(t){var e=t[0];e<=0?delete this._terminal.buffer.tabs[this._terminal.buffer.x]:3===e&&(this._terminal.buffer.tabs={})},t.prototype.setMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.setMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!0;break;case 2:this._terminal.setgCharset(0,n.DEFAULT_CHARSET),this._terminal.setgCharset(1,n.DEFAULT_CHARSET),this._terminal.setgCharset(2,n.DEFAULT_CHARSET),this._terminal.setgCharset(3,n.DEFAULT_CHARSET);break;case 3:this._terminal.savedCols=this._terminal.cols,this._terminal.resize(132,this._terminal.rows);break;case 6:this._terminal.originMode=!0;break;case 7:this._terminal.wraparoundMode=!0;break;case 12:break;case 66:this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=9===t[0],this._terminal.vt200Mouse=1e3===t[0],this._terminal.normalMouse=t[0]>1e3,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:this._terminal.buffers.activateAltBuffer(),this._terminal.viewport.syncScrollArea(),this._terminal.showCursor();break;case 2004:this._terminal.bracketedPasteMode=!0}}else switch(t[0]){case 4:this._terminal.insertMode=!0}},t.prototype.resetMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.resetMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!1;break;case 3:132===this._terminal.cols&&this._terminal.savedCols&&this._terminal.resize(this._terminal.savedCols,this._terminal.rows),delete this._terminal.savedCols;break;case 6:this._terminal.originMode=!1;break;case 7:this._terminal.wraparoundMode=!1;break;case 12:break;case 66:this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=!1,this._terminal.vt200Mouse=!1,this._terminal.normalMouse=!1,this._terminal.mouseEvents=!1,this._terminal.element.classList.remove("enable-mouse-events"),this._terminal.selectionManager.enable();break;case 1004:this._terminal.sendFocus=!1;break;case 1005:this._terminal.utfMouse=!1;break;case 1006:this._terminal.sgrMouse=!1;break;case 1015:this._terminal.urxvtMouse=!1;break;case 25:this._terminal.cursorHidden=!0;break;case 1049:case 47:case 1047:this._terminal.buffers.activateNormalBuffer(),this._terminal.refresh(0,this._terminal.rows-1),this._terminal.viewport.syncScrollArea(),this._terminal.showCursor();break;case 2004:this._terminal.bracketedPasteMode=!1}}else switch(t[0]){case 4:this._terminal.insertMode=!1}},t.prototype.charAttributes=function(t){if(1!==t.length||0!==t[0]){for(var e,i=t.length,r=this._terminal.curAttr>>18,n=this._terminal.curAttr>>9&511,s=511&this._terminal.curAttr,a=0;a<i;a++)(e=t[a])>=30&&e<=37?n=e-30:e>=40&&e<=47?s=e-40:e>=90&&e<=97?n=(e+=8)-90:e>=100&&e<=107?s=(e+=8)-100:0===e?(r=this._terminal.defAttr>>18,n=this._terminal.defAttr>>9&511,s=511&this._terminal.defAttr):1===e?r|=o.FLAGS.BOLD:4===e?r|=o.FLAGS.UNDERLINE:5===e?r|=o.FLAGS.BLINK:7===e?r|=o.FLAGS.INVERSE:8===e?r|=o.FLAGS.INVISIBLE:2===e?r|=o.FLAGS.DIM:22===e?(r&=~o.FLAGS.BOLD,r&=~o.FLAGS.DIM):24===e?r&=~o.FLAGS.UNDERLINE:25===e?r&=~o.FLAGS.BLINK:27===e?r&=~o.FLAGS.INVERSE:28===e?r&=~o.FLAGS.INVISIBLE:39===e?n=this._terminal.defAttr>>9&511:49===e?s=511&this._terminal.defAttr:38===e?2===t[a+1]?(a+=2,-1===(n=this._terminal.matchColor(255&t[a],255&t[a+1],255&t[a+2]))&&(n=511),a+=2):5===t[a+1]&&(n=e=255&t[a+=2]):48===e?2===t[a+1]?(a+=2,-1===(s=this._terminal.matchColor(255&t[a],255&t[a+1],255&t[a+2]))&&(s=511),a+=2):5===t[a+1]&&(s=e=255&t[a+=2]):100===e?(n=this._terminal.defAttr>>9&511,s=511&this._terminal.defAttr):this._terminal.error("Unknown SGR attribute: %d.",e);this._terminal.curAttr=r<<18|n<<9|s}else this._terminal.curAttr=this._terminal.defAttr},t.prototype.deviceStatus=function(t){if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 6:this._terminal.send(r.C0.ESC+"[?"+(this._terminal.buffer.y+1)+";"+(this._terminal.buffer.x+1)+"R")}}else switch(t[0]){case 5:this._terminal.send(r.C0.ESC+"[0n");break;case 6:this._terminal.send(r.C0.ESC+"["+(this._terminal.buffer.y+1)+";"+(this._terminal.buffer.x+1)+"R")}},t.prototype.softReset=function(t){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.buffer.scrollTop=0,this._terminal.buffer.scrollBottom=this._terminal.rows-1,this._terminal.curAttr=this._terminal.defAttr,this._terminal.buffer.x=this._terminal.buffer.y=0,this._terminal.charset=null,this._terminal.glevel=0,this._terminal.charsets=[null]},t.prototype.setCursorStyle=function(t){var e=t[0]<1?1:t[0];switch(e){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 i=e%2==1;this._terminal.setOption("cursorBlink",i)},t.prototype.setScrollRegion=function(t){this._terminal.prefix||(this._terminal.buffer.scrollTop=(t[0]||1)-1,this._terminal.buffer.scrollBottom=(t[1]&&t[1]<=this._terminal.rows?t[1]:this._terminal.rows)-1,this._terminal.buffer.x=0,this._terminal.buffer.y=0)},t.prototype.saveCursor=function(t){this._terminal.buffer.savedX=this._terminal.buffer.x,this._terminal.buffer.savedY=this._terminal.buffer.y},t.prototype.restoreCursor=function(t){this._terminal.buffer.x=this._terminal.buffer.savedX||0,this._terminal.buffer.y=this._terminal.buffer.savedY||0},t}();i.InputHandler=l},{"./Buffer":2,"./CharWidth":4,"./Charsets":5,"./EscapeSequences":7,"./renderer/Types":30}],10:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("./Types"),o=t("./input/MouseZoneManager"),a=function(t){function e(e){var i=t.call(this)||this;return i._terminal=e,i._linkMatchers=[],i._nextLinkMatcherId=0,i._rowsToLinkify={start:null,end:null},i}return n(e,t),e.prototype.attachToDom=function(t){this._mouseZoneManager=t},e.prototype.linkifyRows=function(t,i){var r=this;this._mouseZoneManager&&(null===this._rowsToLinkify.start?(this._rowsToLinkify.start=t,this._rowsToLinkify.end=i):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,t),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,i)),this._mouseZoneManager.clearAll(t,i),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return r._linkifyRows()},e.TIME_BEFORE_LINKIFY))},e.prototype._linkifyRows=function(){this._rowsTimeoutId=null;for(var t=this._rowsToLinkify.start;t<=this._rowsToLinkify.end;t++)this._linkifyRow(t);this._rowsToLinkify.start=null,this._rowsToLinkify.end=null},e.prototype.registerLinkMatcher=function(t,e,i){if(void 0===i&&(i={}),!e)throw new Error("handler must be defined");var r={id:this._nextLinkMatcherId++,regex:t,handler:e,matchIndex:i.matchIndex,validationCallback:i.validationCallback,hoverTooltipCallback:i.tooltipCallback,hoverLeaveCallback:i.leaveCallback,willLinkActivate:i.willLinkActivate,priority:i.priority||0};return this._addLinkMatcherToList(r),r.id},e.prototype._addLinkMatcherToList=function(t){if(0!==this._linkMatchers.length){for(var e=this._linkMatchers.length-1;e>=0;e--)if(t.priority<=this._linkMatchers[e].priority)return void this._linkMatchers.splice(e+1,0,t);this._linkMatchers.splice(0,0,t)}else this._linkMatchers.push(t)},e.prototype.deregisterLinkMatcher=function(t){for(var e=0;e<this._linkMatchers.length;e++)if(this._linkMatchers[e].id===t)return this._linkMatchers.splice(e,1),!0;return!1},e.prototype._linkifyRow=function(t){var e=this._terminal.buffer.ydisp+t;if(!(e>=this._terminal.buffer.lines.length)){if(this._terminal.buffer.lines.get(e).isWrapped){if(0!==t)return;do{t--,e--}while(this._terminal.buffer.lines.get(e).isWrapped)}for(var i=this._terminal.buffer.translateBufferLineToString(e,!1),r=e+1;r<this._terminal.buffer.lines.length&&this._terminal.buffer.lines.get(r).isWrapped;)i+=this._terminal.buffer.translateBufferLineToString(r++,!1);for(var n=0;n<this._linkMatchers.length;n++)this._doLinkifyRow(t,i,this._linkMatchers[n])}},e.prototype._doLinkifyRow=function(t,e,i,r){var n=this;void 0===r&&(r=0);var s=e.match(i.regex);if(s&&0!==s.length){var o=s["number"!=typeof i.matchIndex?0:i.matchIndex],a=e.indexOf(o);i.validationCallback?i.validationCallback(o,function(e){n._rowsTimeoutId||e&&n._addLink(r+a,t,o,i)}):this._addLink(r+a,t,o,i);var l=a+o.length,c=e.substr(l);c.length>0&&this._doLinkifyRow(t,c,i,r+l)}},e.prototype._addLink=function(t,e,i,r){var n=this,a=t%this._terminal.cols,l=e+Math.floor(t/this._terminal.cols),c=(a+i.length)%this._terminal.cols,h=l+Math.floor((a+i.length)/this._terminal.cols);0===c&&(c=this._terminal.cols,h--),this._mouseZoneManager.add(new o.MouseZone(a+1,l+1,c+1,h+1,function(t){if(r.handler)return r.handler(t,i);window.open(i,"_blank")},function(t){n.emit(s.LinkHoverEventTypes.HOVER,n._createLinkHoverEvent(a,l,c,h)),n._terminal.element.classList.add("xterm-cursor-pointer")},function(t){n.emit(s.LinkHoverEventTypes.TOOLTIP,n._createLinkHoverEvent(a,l,c,h)),r.hoverTooltipCallback&&r.hoverTooltipCallback(t,i)},function(){n.emit(s.LinkHoverEventTypes.LEAVE,n._createLinkHoverEvent(a,l,c,h)),n._terminal.element.classList.remove("xterm-cursor-pointer"),r.hoverLeaveCallback&&r.hoverLeaveCallback()},function(t){return!r.willLinkActivate||r.willLinkActivate(t,i)}))},e.prototype._createLinkHoverEvent=function(t,e,i,r){return{x1:t,y1:e,x2:i,y2:r,cols:this._terminal.cols}},e.TIME_BEFORE_LINKIFY=200,e}(t("./EventEmitter").EventEmitter);i.Linkifier=a},{"./EventEmitter":8,"./Types":17,"./input/MouseZoneManager":21}],11:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./EscapeSequences"),n=t("./Charsets"),s={};s[r.C0.BEL]=function(t,e){return e.bell()},s[r.C0.LF]=function(t,e){return e.lineFeed()},s[r.C0.VT]=s[r.C0.LF],s[r.C0.FF]=s[r.C0.LF],s[r.C0.CR]=function(t,e){return e.carriageReturn()},s[r.C0.BS]=function(t,e){return e.backspace()},s[r.C0.HT]=function(t,e){return e.tab()},s[r.C0.SO]=function(t,e){return e.shiftOut()},s[r.C0.SI]=function(t,e){return e.shiftIn()},s[r.C0.ESC]=function(t,e){return t.setState(l.ESCAPED)};var o={"[":function(t,e){e.params=[],e.currentParam=0,t.setState(l.CSI_PARAM)},"]":function(t,e){e.params=[],e.currentParam=0,t.setState(l.OSC)},P:function(t,e){e.params=[],e.currentParam=0,t.setState(l.DCS)},_:function(t,e){t.setState(l.IGNORE)},"^":function(t,e){t.setState(l.IGNORE)},c:function(t,e){e.reset()},E:function(t,e){e.buffer.x=0,e.index(),t.setState(l.NORMAL)},D:function(t,e){e.index(),t.setState(l.NORMAL)},M:function(t,e){e.reverseIndex(),t.setState(l.NORMAL)},"%":function(t,e){e.setgLevel(0),e.setgCharset(0,n.DEFAULT_CHARSET),t.setState(l.NORMAL),t.skipNextChar()}};o[r.C0.CAN]=function(t){return t.setState(l.NORMAL)};var a={"?":function(t){return t.setPrefix("?")},">":function(t){return t.setPrefix(">")},"!":function(t){return t.setPrefix("!")},0:function(t){return t.setParam(10*t.getParam())},1:function(t){return t.setParam(10*t.getParam()+1)},2:function(t){return t.setParam(10*t.getParam()+2)},3:function(t){return t.setParam(10*t.getParam()+3)},4:function(t){return t.setParam(10*t.getParam()+4)},5:function(t){return t.setParam(10*t.getParam()+5)},6:function(t){return t.setParam(10*t.getParam()+6)},7:function(t){return t.setParam(10*t.getParam()+7)},8:function(t){return t.setParam(10*t.getParam()+8)},9:function(t){return t.setParam(10*t.getParam()+9)},$:function(t){return t.setPostfix("$")},'"':function(t){return t.setPostfix('"')}," ":function(t){return t.setPostfix(" ")},"'":function(t){return t.setPostfix("'")},";":function(t){return t.finalizeParam()}};a[r.C0.CAN]=function(t){return t.setState(l.NORMAL)};var l,c={"@":function(t,e,i){return t.insertChars(e)},A:function(t,e,i){return t.cursorUp(e)},B:function(t,e,i){return t.cursorDown(e)},C:function(t,e,i){return t.cursorForward(e)},D:function(t,e,i){return t.cursorBackward(e)},E:function(t,e,i){return t.cursorNextLine(e)},F:function(t,e,i){return t.cursorPrecedingLine(e)},G:function(t,e,i){return t.cursorCharAbsolute(e)},H:function(t,e,i){return t.cursorPosition(e)},I:function(t,e,i){return t.cursorForwardTab(e)},J:function(t,e,i){return t.eraseInDisplay(e)},K:function(t,e,i){return t.eraseInLine(e)},L:function(t,e,i){return t.insertLines(e)},M:function(t,e,i){return t.deleteLines(e)},P:function(t,e,i){return t.deleteChars(e)},S:function(t,e,i){return t.scrollUp(e)},T:function(t,e,i){e.length<2&&!i&&t.scrollDown(e)},X:function(t,e,i){return t.eraseChars(e)},Z:function(t,e,i){return t.cursorBackwardTab(e)},"`":function(t,e,i){return t.charPosAbsolute(e)},a:function(t,e,i){return t.HPositionRelative(e)},b:function(t,e,i){return t.repeatPrecedingCharacter(e)},c:function(t,e,i){return t.sendDeviceAttributes(e)},d:function(t,e,i){return t.linePosAbsolute(e)},e:function(t,e,i){return t.VPositionRelative(e)},f:function(t,e,i){return t.HVPosition(e)},g:function(t,e,i){return t.tabClear(e)},h:function(t,e,i){return t.setMode(e)},l:function(t,e,i){return t.resetMode(e)},m:function(t,e,i){return t.charAttributes(e)},n:function(t,e,i){return t.deviceStatus(e)},p:function(t,e,i){switch(i){case"!":t.softReset(e)}},q:function(t,e,i,r){" "===r&&t.setCursorStyle(e)},r:function(t,e){return t.setScrollRegion(e)},s:function(t,e){return t.saveCursor(e)},u:function(t,e){return t.restoreCursor(e)}};c[r.C0.CAN]=function(t,e,i,r,n){return n.setState(l.NORMAL)},function(t){t[t.NORMAL=0]="NORMAL",t[t.ESCAPED=1]="ESCAPED",t[t.CSI_PARAM=2]="CSI_PARAM",t[t.CSI=3]="CSI",t[t.OSC=4]="OSC",t[t.CHARSET=5]="CHARSET",t[t.DCS=6]="DCS",t[t.IGNORE=7]="IGNORE"}(l=i.ParserState||(i.ParserState={}));var h=function(){function t(t,e){this._inputHandler=t,this._terminal=e,this._state=l.NORMAL}return t.prototype.parse=function(t){var e,i,h,u,f=t.length,p=this._terminal.buffer.x,d=this._terminal.buffer.y;for(this._terminal.debug&&this._terminal.log("data: "+t),this._position=0,this._terminal.surrogate_high&&(t=this._terminal.surrogate_high+t,this._terminal.surrogate_high="");this._position<f;this._position++){if(i=t[this._position],55296<=(h=t.charCodeAt(this._position))&&h<=56319){if(u=t.charCodeAt(this._position+1),isNaN(u)){this._terminal.surrogate_high=i;continue}h=1024*(h-55296)+(u-56320)+65536,i+=t.charAt(this._position+1)}if(!(56320<=h&&h<=57343))switch(this._state){case l.NORMAL:i in s?s[i](this,this._inputHandler):this._inputHandler.addChar(i,h);break;case l.ESCAPED:if(i in o){o[i](this,this._terminal);break}switch(i){case"(":case")":case"*":case"+":case"-":case".":switch(i){case"(":this._terminal.gcharset=0;break;case")":this._terminal.gcharset=1;break;case"*":this._terminal.gcharset=2;break;case"+":this._terminal.gcharset=3;break;case"-":this._terminal.gcharset=1;break;case".":this._terminal.gcharset=2}this._state=l.CHARSET;break;case"/":this._terminal.gcharset=3,this._state=l.CHARSET,this._position--;break;case"N":case"O":this._state=l.NORMAL;break;case"n":this._terminal.setgLevel(2),this._state=l.NORMAL;break;case"o":case"|":this._terminal.setgLevel(3),this._state=l.NORMAL;break;case"}":this._terminal.setgLevel(2),this._state=l.NORMAL;break;case"~":this._terminal.setgLevel(1),this._state=l.NORMAL;break;case"7":this._inputHandler.saveCursor(),this._state=l.NORMAL;break;case"8":this._inputHandler.restoreCursor(),this._state=l.NORMAL;break;case"#":this._state=l.NORMAL,this._position++;break;case"H":this._terminal.tabSet(),this._state=l.NORMAL;break;case"=":this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport&&this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;case">":this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport&&this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;default:this._state=l.NORMAL,this._terminal.error("Unknown ESC control: %s.",i)}break;case l.CHARSET:i in n.CHARSETS?(e=n.CHARSETS[i],"/"===i&&this.skipNextChar()):e=n.DEFAULT_CHARSET,this._terminal.setgCharset(this._terminal.gcharset,e),this._terminal.gcharset=null,this._state=l.NORMAL;break;case l.OSC:if(i===r.C0.ESC||i===r.C0.BEL){switch(i===r.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=l.NORMAL}else this._terminal.params.length?this._terminal.currentParam+=i:i>="0"&&i<="9"?this._terminal.currentParam=10*this._terminal.currentParam+i.charCodeAt(0)-48:";"===i&&(this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam="");break;case l.CSI_PARAM:if(i in a){a[i](this);break}this.finalizeParam(),this._state=l.CSI;case l.CSI:i in c?(this._terminal.debug&&this._terminal.log("CSI "+(this._terminal.prefix?this._terminal.prefix:"")+" "+(this._terminal.params?this._terminal.params.join(";"):"")+" "+(this._terminal.postfix?this._terminal.postfix:"")+" "+i),c[i](this._inputHandler,this._terminal.params,this._terminal.prefix,this._terminal.postfix,this)):this._terminal.error("Unknown CSI code: %s.",i),this._state=l.NORMAL,this._terminal.prefix="",this._terminal.postfix="";break;case l.DCS:if(i===r.C0.ESC||i===r.C0.BEL){i===r.C0.ESC&&this._position++;var _=void 0,m=void 0;switch(this._terminal.prefix){case"":break;case"$q":switch(m=!1,_=this._terminal.currentParam){case'"q':_='0"q';break;case'"p':_='61"p';break;case"r":_=this._terminal.buffer.scrollTop+1+";"+(this._terminal.buffer.scrollBottom+1)+"r";break;case"m":_="0m";break;default:this._terminal.error("Unknown DCS Pt: %s.",_),_=""}this._terminal.send(r.C0.ESC+"P"+ +m+"$r"+_+r.C0.ESC+"\\");break;case"+p":break;case"+q":_=this._terminal.currentParam,m=!1,this._terminal.send(r.C0.ESC+"P"+ +m+"+r"+_+r.C0.ESC+"\\");break;default:this._terminal.error("Unknown DCS prefix: %s.",this._terminal.prefix)}this._terminal.currentParam=0,this._terminal.prefix="",this._state=l.NORMAL}else this._terminal.currentParam?this._terminal.currentParam+=i:this._terminal.prefix||"$"===i||"+"===i?2===this._terminal.prefix.length?this._terminal.currentParam=i:this._terminal.prefix+=i:this._terminal.currentParam=i;break;case l.IGNORE:i!==r.C0.ESC&&i!==r.C0.BEL||(i===r.C0.ESC&&this._position++,this._state=l.NORMAL)}}return this._terminal.buffer.x===p&&this._terminal.buffer.y===d||this._terminal.emit("cursormove"),this._state},t.prototype.setState=function(t){this._state=t},t.prototype.setPrefix=function(t){this._terminal.prefix=t},t.prototype.setPostfix=function(t){this._terminal.postfix=t},t.prototype.setParam=function(t){this._terminal.currentParam=t},t.prototype.getParam=function(){return this._terminal.currentParam},t.prototype.finalizeParam=function(){this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam=0},t.prototype.skipNextChar=function(){this._position++},t}();i.Parser=h},{"./Charsets":5,"./EscapeSequences":7}],12:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s,o=t("./utils/MouseHelper"),a=t("./shared/utils/Browser"),l=t("./EventEmitter"),c=t("./SelectionModel"),h=t("./Buffer"),u=t("./handlers/AltClickHandler"),f=String.fromCharCode(160),p=new RegExp(f,"g");!function(t){t[t.NORMAL=0]="NORMAL",t[t.WORD=1]="WORD",t[t.LINE=2]="LINE"}(s||(s={}));var d=function(t){function e(e,i){var r=t.call(this)||this;return r._terminal=e,r._charMeasure=i,r._enabled=!0,r._initListeners(),r.enable(),r._model=new c.SelectionModel(e),r._activeSelectionMode=s.NORMAL,r}return n(e,t),Object.defineProperty(e.prototype,"_buffer",{get:function(){return this._terminal.buffers.active},enumerable:!0,configurable:!0}),e.prototype._initListeners=function(){var t=this;this._mouseMoveListener=function(e){return t._onMouseMove(e)},this._mouseUpListener=function(e){return t._onMouseUp(e)},this._trimListener=function(e){return t._onTrim(e)},this.initBuffersListeners()},e.prototype.initBuffersListeners=function(){var t=this;this._terminal.buffer.lines.on("trim",this._trimListener),this._terminal.buffers.on("activate",function(e){return t._onBufferActivate(e)})},e.prototype.disable=function(){this.clearSelection(),this._enabled=!1},e.prototype.enable=function(){this._enabled=!0},Object.defineProperty(e.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasSelection",{get:function(){var t=this._model.finalSelectionStart,e=this._model.finalSelectionEnd;return!(!t||!e||t[0]===e[0]&&t[1]===e[1])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectionText",{get:function(){var t=this._model.finalSelectionStart,e=this._model.finalSelectionEnd;if(!t||!e)return"";var i=t[1]===e[1]?e[0]:null,r=[];r.push(this._buffer.translateBufferLineToString(t[1],!0,t[0],i));for(var n=t[1]+1;n<=e[1]-1;n++){var s=this._buffer.lines.get(n),o=this._buffer.translateBufferLineToString(n,!0);s.isWrapped?r[r.length-1]+=o:r.push(o)}if(t[1]!==e[1]){s=this._buffer.lines.get(e[1]),o=this._buffer.translateBufferLineToString(e[1],!0,0,e[0]);s.isWrapped?r[r.length-1]+=o:r.push(o)}return r.map(function(t){return t.replace(p," ")}).join(a.isMSWindows?"\r\n":"\n")},enumerable:!0,configurable:!0}),e.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh()},e.prototype.refresh=function(t){var e=this;(this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return e._refresh()})),a.isLinux&&t)&&(this.selectionText.length&&this.emit("newselection",this.selectionText))},e.prototype._refresh=function(){this._refreshAnimationFrame=null,this.emit("refresh",{start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd})},e.prototype.isClickInSelection=function(t){var e=this._getMouseBufferCoords(t),i=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!(!i||!r)&&(e[1]>i[1]&&e[1]<r[1]||i[1]===r[1]&&e[1]===i[1]&&e[0]>i[0]&&e[0]<r[0]||i[1]<r[1]&&e[1]===r[1]&&e[0]<r[0])},e.prototype.selectWordAtCursor=function(t){var e=this._getMouseBufferCoords(t);e&&(this._selectWordAt(e,!1),this._model.selectionEnd=null,this.refresh(!0))},e.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._terminal.emit("selection")},e.prototype.selectLines=function(t,e){this._model.clearSelection(),t=Math.max(t,0),e=Math.min(e,this._terminal.buffer.lines.length-1),this._model.selectionStart=[0,t],this._model.selectionEnd=[this._terminal.cols,e],this.refresh(),this._terminal.emit("selection")},e.prototype._onTrim=function(t){this._model.onTrim(t)&&this.refresh()},e.prototype._getMouseBufferCoords=function(t){var e=this._terminal.mouseHelper.getCoords(t,this._terminal.screenElement,this._charMeasure,this._terminal.options.lineHeight,this._terminal.cols,this._terminal.rows,!0);return e?(e[0]--,e[1]--,e[1]+=this._terminal.buffer.ydisp,e):null},e.prototype._getMouseEventScrollAmount=function(t){var e=o.MouseHelper.getCoordsRelativeToElement(t,this._terminal.screenElement)[1],i=this._terminal.rows*Math.ceil(this._charMeasure.height*this._terminal.options.lineHeight);return e>=0&&e<=i?0:(e>i&&(e-=i),e=Math.min(Math.max(e,-50),50),(e/=50)/Math.abs(e)+Math.round(14*e))},e.prototype.shouldForceSelection=function(t){return a.isMac?t.altKey:t.shiftKey},e.prototype.onMouseDown=function(t){if(this._mouseDownTimeStamp=t.timeStamp,(2!==t.button||!this.hasSelection)&&0===t.button){if(!this._enabled){if(!this.shouldForceSelection(t))return;t.stopPropagation()}t.preventDefault(),this._dragScrollAmount=0,this._enabled&&t.shiftKey?this._onIncrementalClick(t):1===t.detail?this._onSingleClick(t):2===t.detail?this._onDoubleClick(t):3===t.detail&&this._onTripleClick(t),this._addMouseDownListeners(),this.refresh(!0)}},e.prototype._addMouseDownListeners=function(){var t=this;this._terminal.element.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._terminal.element.ownerDocument.addEventListener("mouseup",this._mouseUpListener),this._dragScrollIntervalTimer=setInterval(function(){return t._dragScroll()},50)},e.prototype._removeMouseDownListeners=function(){this._terminal.element.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._terminal.element.ownerDocument.removeEventListener("mouseup",this._mouseUpListener),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=null},e.prototype._onIncrementalClick=function(t){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(t))},e.prototype._onSingleClick=function(t){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=s.NORMAL,this._model.selectionStart=this._getMouseBufferCoords(t),this._model.selectionStart){this._model.selectionEnd=null;var e=this._buffer.lines.get(this._model.selectionStart[1]);if(e&&!(e.length>=this._model.selectionStart[0]))0===e[this._model.selectionStart[0]][h.CHAR_DATA_WIDTH_INDEX]&&this._model.selectionStart[0]++}},e.prototype._onDoubleClick=function(t){var e=this._getMouseBufferCoords(t);e&&(this._activeSelectionMode=s.WORD,this._selectWordAt(e,!0))},e.prototype._onTripleClick=function(t){var e=this._getMouseBufferCoords(t);e&&(this._activeSelectionMode=s.LINE,this._selectLineAt(e[1]))},e.prototype._onMouseMove=function(t){t.stopImmediatePropagation();var e=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(t),this._model.selectionEnd){if(this._activeSelectionMode===s.LINE?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._terminal.cols:this._activeSelectionMode===s.WORD&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(t),this._dragScrollAmount>0?this._model.selectionEnd[0]=this._terminal.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]<this._buffer.lines.length){var i=this._buffer.lines.get(this._model.selectionEnd[1])[this._model.selectionEnd[0]];i&&0===i[h.CHAR_DATA_WIDTH_INDEX]&&this._model.selectionEnd[0]++}e&&e[0]===this._model.selectionEnd[0]&&e[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)},e.prototype._dragScroll=function(){this._dragScrollAmount&&(this._terminal.scrollLines(this._dragScrollAmount,!1),this._dragScrollAmount>0?this._model.selectionEnd=[this._terminal.cols-1,Math.min(this._terminal.buffer.ydisp+this._terminal.rows,this._terminal.buffer.lines.length-1)]:this._model.selectionEnd=[0,this._terminal.buffer.ydisp],this.refresh())},e.prototype._onMouseUp=function(t){var e=t.timeStamp-this._mouseDownTimeStamp;this._removeMouseDownListeners(),this.selectionText.length<=1&&e<500?new u.AltClickHandler(t,this._terminal).move():this.hasSelection&&this._terminal.emit("selection")},e.prototype._onBufferActivate=function(t){this.clearSelection(),t.inactiveBuffer.lines.off("trim",this._trimListener),t.activeBuffer.lines.on("trim",this._trimListener)},e.prototype._convertViewportColToCharacterIndex=function(t,e){for(var i=e[0],r=0;e[0]>=r;r++){var n=t[r];0===n[h.CHAR_DATA_WIDTH_INDEX]?i--:n[h.CHAR_DATA_CHAR_INDEX].length>1&&e[0]!==r&&(i+=n[h.CHAR_DATA_CHAR_INDEX].length-1)}return i},e.prototype.setSelection=function(t,e,i){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[t,e],this._model.selectionStartLength=i,this.refresh()},e.prototype._getWordAt=function(t,e){if(t[0]>=this._terminal.cols)return null;var i=this._buffer.lines.get(t[1]);if(!i)return null;var r=this._buffer.translateBufferLineToString(t[1],!1),n=this._convertViewportColToCharacterIndex(i,t),s=n,o=t[0]-n,a=0,l=0,c=0,u=0;if(" "===r.charAt(n)){for(;n>0&&" "===r.charAt(n-1);)n--;for(;s<r.length&&" "===r.charAt(s+1);)s++}else{var f=t[0],p=t[0];for(0===i[f][h.CHAR_DATA_WIDTH_INDEX]&&(a++,f--),2===i[p][h.CHAR_DATA_WIDTH_INDEX]&&(l++,p++),i[p][h.CHAR_DATA_CHAR_INDEX].length>1&&(u+=i[p][h.CHAR_DATA_CHAR_INDEX].length-1,s+=i[p][h.CHAR_DATA_CHAR_INDEX].length-1);f>0&&n>0&&!this._isCharWordSeparator(i[f-1]);){0===(d=i[f-1])[h.CHAR_DATA_WIDTH_INDEX]?(a++,f--):d[h.CHAR_DATA_CHAR_INDEX].length>1&&(c+=d[h.CHAR_DATA_CHAR_INDEX].length-1,n-=d[h.CHAR_DATA_CHAR_INDEX].length-1),n--,f--}for(;p<i.length&&s+1<r.length&&!this._isCharWordSeparator(i[p+1]);){var d;2===(d=i[p+1])[h.CHAR_DATA_WIDTH_INDEX]?(l++,p++):d[h.CHAR_DATA_CHAR_INDEX].length>1&&(u+=d[h.CHAR_DATA_CHAR_INDEX].length-1,s+=d[h.CHAR_DATA_CHAR_INDEX].length-1),s++,p++}}s++;var _=n+o-a+c,m=Math.min(this._terminal.cols,s-n+a+l-c-u);return e||""!==r.slice(n,s).trim()?{start:_,length:m}:null},e.prototype._selectWordAt=function(t,e){var i=this._getWordAt(t,e);i&&(this._model.selectionStart=[i.start,t[1]],this._model.selectionStartLength=i.length)},e.prototype._selectToWordAt=function(t){var e=this._getWordAt(t,!0);e&&(this._model.selectionEnd=[this._model.areSelectionValuesReversed()?e.start:e.start+e.length,t[1]])},e.prototype._isCharWordSeparator=function(t){return 0!==t[h.CHAR_DATA_WIDTH_INDEX]&&" ()[]{}'\"".indexOf(t[h.CHAR_DATA_CHAR_INDEX])>=0},e.prototype._selectLineAt=function(t){this._model.selectionStart=[0,t],this._model.selectionStartLength=this._terminal.cols},e}(l.EventEmitter);i.SelectionManager=d},{"./Buffer":2,"./EventEmitter":8,"./SelectionModel":13,"./handlers/AltClickHandler":19,"./shared/utils/Browser":36,"./utils/MouseHelper":41}],13:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t){this._terminal=t,this.clearSelection()}return t.prototype.clearSelection=function(){this.selectionStart=null,this.selectionEnd=null,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(t.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(t.prototype,"finalSelectionEnd",{get:function(){return this.isSelectAllActive?[this._terminal.cols,this._terminal.buffer.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}),t.prototype.areSelectionValuesReversed=function(){var t=this.selectionStart,e=this.selectionEnd;return!(!t||!e)&&(t[1]>e[1]||t[1]===e[1]&&t[0]>e[0])},t.prototype.onTrim=function(t){return this.selectionStart&&(this.selectionStart[1]-=t),this.selectionEnd&&(this.selectionEnd[1]-=t),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},t}();i.SelectionModel=r},{}],14:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_BELL_SOUND="data:audio/wav;base64,UklGRigBAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQQBAADpAFgCwAMlBZoG/wdmCcoKRAypDQ8PbRDBEQQTOxRtFYcWlBePGIUZXhoiG88bcBz7HHIdzh0WHlMeZx51HmkeUx4WHs8dah0AHXwc3hs9G4saxRnyGBIYGBcQFv8U4RPAEoYRQBACD70NWwwHC6gJOwjWBloF7gOBAhABkf8b/qv8R/ve+Xf4Ife79W/0JfPZ8Z/wde9N7ijtE+wU6xvqM+lb6H7nw+YX5mrlxuQz5Mzje+Ma49fioeKD4nXiYeJy4pHitOL04j/jn+MN5IPkFOWs5U3mDefM55/ogOl36m7rdOyE7abuyu8D8Unyj/Pg9D/2qfcb+Yn6/vuK/Qj/lAAlAg==";var r=function(){function t(t){this._terminal=t}return t.prototype.playBellSound=function(){var t=window.AudioContext||window.webkitAudioContext;if(!this._audioContext&&t&&(this._audioContext=new t),this._audioContext){var e=this._audioContext.createBufferSource(),i=this._audioContext;this._audioContext.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._terminal.options.bellSound)),function(t){e.buffer=t,e.connect(i.destination),e.start(0)})}else console.warn("Sorry, but the Web Audio API is not supported by your browser. Please, consider upgrading to the latest version")},t.prototype._base64ToArrayBuffer=function(t){for(var e=window.atob(t),i=e.length,r=new Uint8Array(i),n=0;n<i;n++)r[n]=e.charCodeAt(n);return r.buffer},t.prototype._removeMimeType=function(t){return t.split(",")[1]},t}();i.SoundManager=r},{}],15:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.blankLine="Blank line",i.promptLabel="Terminal input",i.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},{}],16:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("./BufferSet"),o=t("./Buffer"),a=t("./CompositionHelper"),l=t("./EventEmitter"),c=t("./Viewport"),h=t("./handlers/Clipboard"),u=t("./EscapeSequences"),f=t("./InputHandler"),p=t("./Parser"),d=t("./renderer/Renderer"),_=t("./Linkifier"),m=t("./SelectionManager"),y=t("./utils/CharMeasure"),g=t("./shared/utils/Browser"),v=t("./Strings"),b=t("./utils/MouseHelper"),C=t("./utils/Clone"),w=t("./SoundManager"),k=t("./renderer/ColorManager"),A=t("./input/MouseZoneManager"),x=t("./AccessibilityManager"),S=t("./utils/ScreenDprMonitor"),E={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']},L="undefined"!=typeof window?window.document:null,M={cols:80,rows:24,convertEol:!1,termName:"xterm",cursorBlink:!1,cursorStyle:"block",bellSound:w.DEFAULT_BELL_SOUND,bellStyle:"none",enableBold:!0,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,letterSpacing:0,scrollback:1e3,screenKeys:!1,screenReaderMode:!1,debug:!1,macOptionIsMeta:!1,cancelEvents:!1,disableStdin:!1,useFlowControl:!1,allowTransparency:!1,tabStopWidth:8,theme:null,rightClickSelectsWord:g.isMac},R=function(t){function e(e){void 0===e&&(e={});var i=t.call(this)||this;return i.browser=g,i.options=C.clone(e),i._setup(),i}return n(e,t),e.prototype._setup=function(){var t=this;Object.keys(M).forEach(function(e){null==t.options[e]&&(t.options[e]=M[e]),t[e]=t.options[e]}),this._parent=L?L.body:null,this.cols=this.options.cols,this.rows=this.options.rows,this.options.handler&&this.on("data",this.options.handler),this.cursorState=0,this.cursorHidden=!1,this._sendDataQueue="",this._customKeyEventHandler=null,this.applicationKeypad=!1,this.applicationCursor=!1,this.originMode=!1,this.insertMode=!1,this.wraparoundMode=!0,this.bracketedPasteMode=!1,this.charset=null,this.gcharset=null,this.glevel=0,this.charsets=[null],this.defAttr=131840,this.curAttr=131840,this.params=[],this.currentParam=0,this.prefix="",this.postfix="",this.writeBuffer=[],this._writeInProgress=!1,this._xoffSentToCatchUp=!1,this._userScrolling=!1,this._inputHandler=new f.InputHandler(this),this._parser=new p.Parser(this._inputHandler,this),this.renderer=this.renderer||null,this.selectionManager=this.selectionManager||null,this.linkifier=this.linkifier||new _.Linkifier(this),this._mouseZoneManager=this._mouseZoneManager||null,this.soundManager=this.soundManager||new w.SoundManager(this),this.buffers=new s.BufferSet(this),this.selectionManager&&(this.selectionManager.clearSelection(),this.selectionManager.initBuffersListeners())},Object.defineProperty(e.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return v},enumerable:!0,configurable:!0}),e.prototype.eraseAttr=function(){return-512&this.defAttr|511&this.curAttr},e.prototype.focus=function(){this.textarea&&this.textarea.focus()},Object.defineProperty(e.prototype,"isFocused",{get:function(){return L.activeElement===this.textarea},enumerable:!0,configurable:!0}),e.prototype.getOption=function(t){if(!(t in M))throw new Error('No option with key "'+t+'"');return void 0!==this.options[t]?this.options[t]:this[t]},e.prototype.setOption=function(t,e){if(!(t in M))throw new Error('No option with key "'+t+'"');switch(t){case"bellStyle":e||(e="none");break;case"cursorStyle":e||(e="block");break;case"fontWeight":e||(e="normal");break;case"fontWeightBold":e||(e="bold");break;case"lineHeight":if(e<1)return void console.warn(t+" cannot be less than 1, value: "+e);case"tabStopWidth":if(e<1)return void console.warn(t+" cannot be less than 1, value: "+e);break;case"theme":if(this.renderer)return void this._setTheme(e);break;case"scrollback":if((e=Math.min(e,o.MAX_BUFFER_SIZE))<0)return void console.warn(t+" cannot be less than 0, value: "+e);if(this.options[t]!==e){var i=this.rows+e;if(this.buffer.lines.length>i){var r=this.buffer.lines.length-i,n=this.buffer.ydisp-r<0;this.buffer.lines.trimStart(r),this.buffer.ybase=Math.max(this.buffer.ybase-r,0),this.buffer.ydisp=Math.max(this.buffer.ydisp-r,0),n&&this.refresh(0,this.rows-1)}}}switch(this[t]=e,this.options[t]=e,t){case"fontFamily":case"fontSize":this.renderer.clear(),this.charMeasure.measure(this.options);break;case"enableBold":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":this.renderer.clear(),this.renderer.onResize(this.cols,this.rows),this.refresh(0,this.rows-1);case"scrollback":this.buffers.resize(this.cols,this.rows),this.viewport.syncScrollArea();break;case"screenReaderMode":e?this._accessibilityManager||(this._accessibilityManager=new x.AccessibilityManager(this)):this._accessibilityManager&&(this._accessibilityManager.dispose(),this._accessibilityManager=null);break;case"tabStopWidth":this.buffers.setupTabStops()}this.renderer&&this.renderer.onOptionsChanged()},e.prototype._onTextAreaFocus=function(){this.sendFocus&&this.send(u.C0.ESC+"[I"),this.element.classList.add("focus"),this.showCursor(),this.emit("focus")},e.prototype.blur=function(){return this.textarea.blur()},e.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.sendFocus&&this.send(u.C0.ESC+"[O"),this.element.classList.remove("focus"),this.emit("blur")},e.prototype._initGlobal=function(){var t=this;this._bindKeys(),T(this.element,"copy",function(e){t.hasSelection()&&h.copyHandler(e,t,t.selectionManager)});var e=function(e){return h.pasteHandler(e,t)};T(this.textarea,"paste",e),T(this.element,"paste",e),g.isFirefox?T(this.element,"mousedown",function(e){2===e.button&&h.rightClickHandler(e,t.textarea,t.selectionManager,t.options.rightClickSelectsWord)}):T(this.element,"contextmenu",function(e){h.rightClickHandler(e,t.textarea,t.selectionManager,t.options.rightClickSelectsWord)}),g.isLinux&&T(this.element,"auxclick",function(e){1===e.button&&h.moveTextAreaUnderMouseCursor(e,t.textarea)})},e.prototype._bindKeys=function(){var t=this,e=this;T(this.element,"keydown",function(t){L.activeElement===this&&e._keyDown(t)},!0),T(this.element,"keypress",function(t){L.activeElement===this&&e._keyPress(t)},!0),T(this.element,"keyup",function(e){(function(t){return 16===t.keyCode||17===t.keyCode||18===t.keyCode})(e)||t.focus()},!0),T(this.textarea,"keydown",function(e){return t._keyDown(e)},!0),T(this.textarea,"keypress",function(e){return t._keyPress(e)},!0),T(this.textarea,"compositionstart",function(){return t._compositionHelper.compositionstart()}),T(this.textarea,"compositionupdate",function(e){return t._compositionHelper.compositionupdate(e)}),T(this.textarea,"compositionend",function(){return t._compositionHelper.compositionend()}),this.on("refresh",function(){return t._compositionHelper.updateCompositionElements()}),this.on("refresh",function(e){return t._queueLinkification(e.start,e.end)})},e.prototype.open=function(t){var e=this;if(this._parent=t||this._parent,!this._parent)throw new Error("Terminal requires a parent element.");this._context=this._parent.ownerDocument.defaultView,this._document=this._parent.ownerDocument,this._screenDprMonitor=new S.ScreenDprMonitor,this._screenDprMonitor.setListener(function(){return e.emit("dprchange",window.devicePixelRatio)}),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),this._parent.appendChild(this.element);var i=L.createDocumentFragment();this._viewportElement=L.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),i.appendChild(this._viewportElement),this._viewportScrollArea=L.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=L.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=L.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),i.appendChild(this.screenElement),this._mouseZoneManager=new A.MouseZoneManager(this),this.on("scroll",function(){return e._mouseZoneManager.clearAll()}),this.linkifier.attachToDom(this._mouseZoneManager),this.textarea=L.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",v.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.textarea.addEventListener("focus",function(){return e._onTextAreaFocus()}),this.textarea.addEventListener("blur",function(){return e._onTextAreaBlur()}),this._helperContainer.appendChild(this.textarea),this._compositionView=L.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=new a.CompositionHelper(this.textarea,this._compositionView,this),this._helperContainer.appendChild(this._compositionView),this.charMeasure=new y.CharMeasure(L,this._helperContainer),this.element.appendChild(i),this.renderer=new d.Renderer(this,this.options.theme),this.options.theme=null,this.viewport=new c.Viewport(this,this._viewportElement,this._viewportScrollArea,this.charMeasure),this.viewport.onThemeChanged(this.renderer.colorManager.colors),this.on("cursormove",function(){return e.renderer.onCursorMove()}),this.on("resize",function(){return e.renderer.onResize(e.cols,e.rows)}),this.on("blur",function(){return e.renderer.onBlur()}),this.on("focus",function(){return e.renderer.onFocus()}),this.on("dprchange",function(){return e.renderer.onWindowResize(window.devicePixelRatio)}),window.addEventListener("resize",function(){return e.renderer.onWindowResize(window.devicePixelRatio)}),this.charMeasure.on("charsizechanged",function(){return e.renderer.onResize(e.cols,e.rows)}),this.renderer.on("resize",function(t){return e.viewport.syncScrollArea()}),this.selectionManager=new m.SelectionManager(this,this.charMeasure),this.element.addEventListener("mousedown",function(t){return e.selectionManager.onMouseDown(t)}),this.selectionManager.on("refresh",function(t){return e.renderer.onSelectionChanged(t.start,t.end)}),this.selectionManager.on("newselection",function(t){e.textarea.value=t,e.textarea.focus(),e.textarea.select()}),this.on("scroll",function(){e.viewport.syncScrollArea(),e.selectionManager.refresh()}),this._viewportElement.addEventListener("scroll",function(){return e.selectionManager.refresh()}),this.mouseHelper=new b.MouseHelper(this.renderer),this.options.screenReaderMode&&(this._accessibilityManager=new x.AccessibilityManager(this)),this.charMeasure.measure(this.options),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},e.prototype._setTheme=function(t){var e=this.renderer.setTheme(t);this.viewport&&this.viewport.onThemeChanged(e)},e.applyAddon=function(t){t.apply(e)},e.prototype.bindMouse=function(){var t=this,e=this.element,i=this,r=32;function n(t){var e,n;if(e=function(t){var e,r,n;switch(t.overrideType||t.type){case"mousedown":e=null!=t.button?+t.button:null!=t.which?t.which-1:null,g.isMSIE&&(e=1===e?0:4===e?1:e);break;case"mouseup":e=3;break;case"DOMMouseScroll":e=t.detail<0?64:65;break;case"wheel":e=t.wheelDeltaY>0?64:65}return n=(t.shiftKey?4:0)|(t.metaKey?8:0)|(r=t.ctrlKey?16:0),i.vt200Mouse?n&=r:i.normalMouse||(n=0),32+(n<<2)+e}(t),n=i.mouseHelper.getRawByteCoords(t,i.screenElement,i.charMeasure,i.options.lineHeight,i.cols,i.rows))switch(a(e,n),t.overrideType||t.type){case"mousedown":r=e;break;case"mouseup":r=32}}function s(t){var e=r,n=i.mouseHelper.getRawByteCoords(t,i.screenElement,i.charMeasure,i.options.lineHeight,i.cols,i.rows);n&&a(e+=32,n)}function o(t,e){if(i.utfMouse){if(2047===e)return void t.push(0);e<127?t.push(e):(e>2047&&(e=2047),t.push(192|e>>6),t.push(128|63&e))}else{if(255===e)return void t.push(0);e>127&&(e=127),t.push(e)}}function a(t,e){if(i._vt300Mouse){t&=3,e.x-=32,e.y-=32;var r=u.C0.ESC+"[24";if(0===t)r+="1";else if(1===t)r+="3";else if(2===t)r+="5";else{if(3===t)return;r+="0"}return r+="~["+e.x+","+e.y+"]\r",void i.send(r)}if(i._decLocator)return t&=3,e.x-=32,e.y-=32,0===t?t=2:1===t?t=4:2===t?t=6:3===t&&(t=3),void i.send(u.C0.ESC+"["+t+";"+(3===t?4:0)+";"+e.y+";"+e.x+";"+e.page||"0&w");if(i.urxvtMouse)return e.x-=32,e.y-=32,e.x++,e.y++,void i.send(u.C0.ESC+"["+t+";"+e.x+";"+e.y+"M");if(i.sgrMouse)return e.x-=32,e.y-=32,void i.send(u.C0.ESC+"[<"+((3==(3&t)?-4&t:t)-32)+";"+e.x+";"+e.y+(3==(3&t)?"m":"M"));var n=[];o(n,t),o(n,e.x),o(n,e.y),i.send(u.C0.ESC+"[M"+String.fromCharCode.apply(String,n))}T(e,"mousedown",function(e){if(e.preventDefault(),t.focus(),t.mouseEvents&&!t.selectionManager.shouldForceSelection(e)){if(n(e),t.vt200Mouse)return e.overrideType="mouseup",n(e),t.cancel(e);if(t.normalMouse&&T(t._document,"mousemove",s),!t.x10Mouse){var i=function(e){return n(e),t.normalMouse&&B(t._document,"mousemove",s),B(t._document,"mouseup",i),t.cancel(e)};T(t._document,"mouseup",i)}return t.cancel(e)}}),T(e,"wheel",function(e){if(t.mouseEvents)t.x10Mouse||t._vt300Mouse||t._decLocator||(n(e),e.preventDefault());else if(!t.buffer.hasScrollback){var i=t.viewport.getLinesScrolled(e);if(0===i)return;for(var r=u.C0.ESC+(t.applicationCursor?"O":"[")+(e.deltaY<0?"A":"B"),s="",o=0;o<Math.abs(i);o++)s+=r;t.send(s)}}),T(e,"wheel",function(e){if(!t.mouseEvents)return t.viewport.onWheel(e),t.cancel(e)}),T(e,"touchstart",function(e){if(!t.mouseEvents)return t.viewport.onTouchStart(e),t.cancel(e)}),T(e,"touchmove",function(e){if(!t.mouseEvents)return t.viewport.onTouchMove(e),t.cancel(e)})},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.handler=function(){},this.write=function(){},this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},e.prototype.refresh=function(t,e){this.renderer&&this.renderer.refreshRows(t,e)},e.prototype._queueLinkification=function(t,e){this.linkifier&&this.linkifier.linkifyRows(t,e)},e.prototype.showCursor=function(){this.cursorState||(this.cursorState=1,this.refresh(this.buffer.y,this.buffer.y))},e.prototype.scroll=function(t){var e=this.blankLine(void 0,t),i=this.buffer.ybase+this.buffer.scrollTop,r=this.buffer.ybase+this.buffer.scrollBottom;if(0===this.buffer.scrollTop){var n=this.buffer.lines.length===this.buffer.lines.maxLength;r===this.buffer.lines.length-1?this.buffer.lines.push(e):this.buffer.lines.splice(r+1,0,e),n?this._userScrolling&&(this.buffer.ydisp=Math.max(this.buffer.ydisp-1,0)):(this.buffer.ybase++,this._userScrolling||this.buffer.ydisp++)}else{var s=r-i+1;this.buffer.lines.shiftElements(i+1,s-1,-1),this.buffer.lines.set(r,e)}this._userScrolling||(this.buffer.ydisp=this.buffer.ybase),this.updateRange(this.buffer.scrollTop),this.updateRange(this.buffer.scrollBottom),this.emit("scroll",this.buffer.ydisp)},e.prototype.scrollLines=function(t,e){if(t<0){if(0===this.buffer.ydisp)return;this._userScrolling=!0}else t+this.buffer.ydisp>=this.buffer.ybase&&(this._userScrolling=!1);var i=this.buffer.ydisp;this.buffer.ydisp=Math.max(Math.min(this.buffer.ydisp+t,this.buffer.ybase),0),i!==this.buffer.ydisp&&(e||this.emit("scroll",this.buffer.ydisp),this.refresh(0,this.rows-1))},e.prototype.scrollPages=function(t){this.scrollLines(t*(this.rows-1))},e.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},e.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},e.prototype.scrollToLine=function(t){var e=t-this.buffer.ydisp;0!==e&&this.scrollLines(e)},e.prototype.write=function(t){var e=this;t&&(this.writeBuffer.push(t),this.options.useFlowControl&&!this._xoffSentToCatchUp&&this.writeBuffer.length>=5&&(this.send(u.C0.DC3),this._xoffSentToCatchUp=!0),!this._writeInProgress&&this.writeBuffer.length>0&&(this._writeInProgress=!0,setTimeout(function(){e._innerWrite()})))},e.prototype._innerWrite=function(){for(var t=this,e=this.writeBuffer.splice(0,300);e.length>0;){var i=e.shift();this._xoffSentToCatchUp&&0===e.length&&0===this.writeBuffer.length&&(this.send(u.C0.DC1),this._xoffSentToCatchUp=!1),this._refreshStart=this.buffer.y,this._refreshEnd=this.buffer.y;var r=this._parser.parse(i);this._parser.setState(r),this.updateRange(this.buffer.y),this.refresh(this._refreshStart,this._refreshEnd)}this.writeBuffer.length>0?setTimeout(function(){return t._innerWrite()},0):this._writeInProgress=!1},e.prototype.writeln=function(t){this.write(t+"\r\n")},e.prototype.attachCustomKeyEventHandler=function(t){this._customKeyEventHandler=t},e.prototype.registerLinkMatcher=function(t,e,i){var r=this.linkifier.registerLinkMatcher(t,e,i);return this.refresh(0,this.rows-1),r},e.prototype.deregisterLinkMatcher=function(t){this.linkifier.deregisterLinkMatcher(t)&&this.refresh(0,this.rows-1)},Object.defineProperty(e.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!0,configurable:!0}),e.prototype.addMarker=function(t){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+t)},e.prototype.hasSelection=function(){return!!this.selectionManager&&this.selectionManager.hasSelection},e.prototype.getSelection=function(){return this.selectionManager?this.selectionManager.selectionText:""},e.prototype.clearSelection=function(){this.selectionManager&&this.selectionManager.clearSelection()},e.prototype.selectAll=function(){this.selectionManager&&this.selectionManager.selectAll()},e.prototype.selectLines=function(t,e){this.selectionManager&&this.selectionManager.selectLines(t,e)},e.prototype._keyDown=function(t){if(this._customKeyEventHandler&&!1===this._customKeyEventHandler(t))return!1;if(!this._compositionHelper.keydown(t))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var e=this._evaluateKeyEscapeSequence(t);return e.scrollLines?(this.scrollLines(e.scrollLines),this.cancel(t,!0)):!!this._isThirdLevelShift(this.browser,t)||(e.cancel&&this.cancel(t,!0),!e.key||(this.emit("keydown",t),this.emit("key",e.key,t),this.showCursor(),this.handler(e.key),this.cancel(t,!0)))},e.prototype._isThirdLevelShift=function(t,e){var i=t.isMac&&!this.options.macOptionIsMeta&&e.altKey&&!e.ctrlKey&&!e.metaKey||t.isMSWindows&&e.altKey&&e.ctrlKey&&!e.metaKey;return"keypress"===e.type?i:i&&(!e.keyCode||e.keyCode>47)},e.prototype._evaluateKeyEscapeSequence=function(t){var e={cancel:!1,key:void 0,scrollLines:void 0},i=(t.shiftKey?1:0)|(t.altKey?2:0)|(t.ctrlKey?4:0)|(t.metaKey?8:0);switch(t.keyCode){case 0:"UIKeyInputUpArrow"===t.key?this.applicationCursor?e.key=u.C0.ESC+"OA":e.key=u.C0.ESC+"[A":"UIKeyInputLeftArrow"===t.key?this.applicationCursor?e.key=u.C0.ESC+"OD":e.key=u.C0.ESC+"[D":"UIKeyInputRightArrow"===t.key?this.applicationCursor?e.key=u.C0.ESC+"OC":e.key=u.C0.ESC+"[C":"UIKeyInputDownArrow"===t.key&&(this.applicationCursor?e.key=u.C0.ESC+"OB":e.key=u.C0.ESC+"[B");break;case 8:if(t.shiftKey){e.key=u.C0.BS;break}if(t.altKey){e.key=u.C0.ESC+u.C0.DEL;break}e.key=u.C0.DEL;break;case 9:if(t.shiftKey){e.key=u.C0.ESC+"[Z";break}e.key=u.C0.HT,e.cancel=!0;break;case 13:e.key=u.C0.CR,e.cancel=!0;break;case 27:e.key=u.C0.ESC,e.cancel=!0;break;case 37:i?(e.key=u.C0.ESC+"[1;"+(i+1)+"D",e.key===u.C0.ESC+"[1;3D"&&(e.key=this.browser.isMac?u.C0.ESC+"b":u.C0.ESC+"[1;5D")):this.applicationCursor?e.key=u.C0.ESC+"OD":e.key=u.C0.ESC+"[D";break;case 39:i?(e.key=u.C0.ESC+"[1;"+(i+1)+"C",e.key===u.C0.ESC+"[1;3C"&&(e.key=this.browser.isMac?u.C0.ESC+"f":u.C0.ESC+"[1;5C")):this.applicationCursor?e.key=u.C0.ESC+"OC":e.key=u.C0.ESC+"[C";break;case 38:i?(e.key=u.C0.ESC+"[1;"+(i+1)+"A",e.key===u.C0.ESC+"[1;3A"&&(e.key=u.C0.ESC+"[1;5A")):this.applicationCursor?e.key=u.C0.ESC+"OA":e.key=u.C0.ESC+"[A";break;case 40:i?(e.key=u.C0.ESC+"[1;"+(i+1)+"B",e.key===u.C0.ESC+"[1;3B"&&(e.key=u.C0.ESC+"[1;5B")):this.applicationCursor?e.key=u.C0.ESC+"OB":e.key=u.C0.ESC+"[B";break;case 45:t.shiftKey||t.ctrlKey||(e.key=u.C0.ESC+"[2~");break;case 46:e.key=i?u.C0.ESC+"[3;"+(i+1)+"~":u.C0.ESC+"[3~";break;case 36:i?e.key=u.C0.ESC+"[1;"+(i+1)+"H":this.applicationCursor?e.key=u.C0.ESC+"OH":e.key=u.C0.ESC+"[H";break;case 35:i?e.key=u.C0.ESC+"[1;"+(i+1)+"F":this.applicationCursor?e.key=u.C0.ESC+"OF":e.key=u.C0.ESC+"[F";break;case 33:t.shiftKey?e.scrollLines=-(this.rows-1):e.key=u.C0.ESC+"[5~";break;case 34:t.shiftKey?e.scrollLines=this.rows-1:e.key=u.C0.ESC+"[6~";break;case 112:e.key=i?u.C0.ESC+"[1;"+(i+1)+"P":u.C0.ESC+"OP";break;case 113:e.key=i?u.C0.ESC+"[1;"+(i+1)+"Q":u.C0.ESC+"OQ";break;case 114:e.key=i?u.C0.ESC+"[1;"+(i+1)+"R":u.C0.ESC+"OR";break;case 115:e.key=i?u.C0.ESC+"[1;"+(i+1)+"S":u.C0.ESC+"OS";break;case 116:e.key=i?u.C0.ESC+"[15;"+(i+1)+"~":u.C0.ESC+"[15~";break;case 117:e.key=i?u.C0.ESC+"[17;"+(i+1)+"~":u.C0.ESC+"[17~";break;case 118:e.key=i?u.C0.ESC+"[18;"+(i+1)+"~":u.C0.ESC+"[18~";break;case 119:e.key=i?u.C0.ESC+"[19;"+(i+1)+"~":u.C0.ESC+"[19~";break;case 120:e.key=i?u.C0.ESC+"[20;"+(i+1)+"~":u.C0.ESC+"[20~";break;case 121:e.key=i?u.C0.ESC+"[21;"+(i+1)+"~":u.C0.ESC+"[21~";break;case 122:e.key=i?u.C0.ESC+"[23;"+(i+1)+"~":u.C0.ESC+"[23~";break;case 123:e.key=i?u.C0.ESC+"[24;"+(i+1)+"~":u.C0.ESC+"[24~";break;default:if(!t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)if(this.browser.isMac&&!this.options.macOptionIsMeta||!t.altKey||t.metaKey)this.browser.isMac&&!t.altKey&&!t.ctrlKey&&t.metaKey&&65===t.keyCode&&this.selectAll();else{var r=E[t.keyCode],n=r&&r[t.shiftKey?1:0];if(n)e.key=u.C0.ESC+n;else if(t.keyCode>=65&&t.keyCode<=90){var s=t.ctrlKey?t.keyCode-64:t.keyCode+32;e.key=u.C0.ESC+String.fromCharCode(s)}}else t.keyCode>=65&&t.keyCode<=90?e.key=String.fromCharCode(t.keyCode-64):32===t.keyCode?e.key=String.fromCharCode(0):t.keyCode>=51&&t.keyCode<=55?e.key=String.fromCharCode(t.keyCode-51+27):56===t.keyCode?e.key=String.fromCharCode(127):219===t.keyCode?e.key=String.fromCharCode(27):220===t.keyCode?e.key=String.fromCharCode(28):221===t.keyCode&&(e.key=String.fromCharCode(29))}return e},e.prototype.setgLevel=function(t){this.glevel=t,this.charset=this.charsets[t]},e.prototype.setgCharset=function(t,e){this.charsets[t]=e,this.glevel===t&&(this.charset=e)},e.prototype._keyPress=function(t){var e;if(this._customKeyEventHandler&&!1===this._customKeyEventHandler(t))return!1;if(this.cancel(t),t.charCode)e=t.charCode;else if(null==t.which)e=t.keyCode;else{if(0===t.which||0===t.charCode)return!1;e=t.which}return!(!e||(t.altKey||t.ctrlKey||t.metaKey)&&!this._isThirdLevelShift(this.browser,t)||(e=String.fromCharCode(e),this.emit("keypress",e,t),this.emit("key",e,t),this.showCursor(),this.handler(e),0))},e.prototype.send=function(t){var e=this;this._sendDataQueue||setTimeout(function(){e.handler(e._sendDataQueue),e._sendDataQueue=""},1),this._sendDataQueue+=t},e.prototype.bell=function(){var t=this;this.emit("bell"),this._soundBell()&&this.soundManager.playBellSound(),this._visualBell()&&(this.element.classList.add("visual-bell-active"),clearTimeout(this._visualBellTimer),this._visualBellTimer=window.setTimeout(function(){t.element.classList.remove("visual-bell-active")},200))},e.prototype.log=function(t,e){this.options.debug&&this._context.console&&this._context.console.log&&this._context.console.log(t,e)},e.prototype.error=function(t,e){this.options.debug&&this._context.console&&this._context.console.error&&this._context.console.error(t,e)},e.prototype.resize=function(t,e){isNaN(t)||isNaN(e)||(t!==this.cols||e!==this.rows?(t<1&&(t=1),e<1&&(e=1),this.buffers.resize(t,e),this.cols=t,this.rows=e,this.buffers.setupTabStops(this.cols),this.charMeasure&&this.charMeasure.measure(this.options),this.refresh(0,this.rows-1),this.emit("resize",{cols:t,rows:e})):this.charMeasure.width&&this.charMeasure.height||this.charMeasure.measure(this.options))},e.prototype.updateRange=function(t){t<this._refreshStart&&(this._refreshStart=t),t>this._refreshEnd&&(this._refreshEnd=t)},e.prototype.maxRange=function(){this._refreshStart=0,this._refreshEnd=this.rows-1},e.prototype.eraseRight=function(t,e){var i=this.buffer.lines.get(this.buffer.ybase+e);if(i){for(var r=[this.eraseAttr()," ",1,32];t<this.cols;t++)i[t]=r;this.updateRange(e)}},e.prototype.eraseLeft=function(t,e){var i=this.buffer.lines.get(this.buffer.ybase+e);if(i){var r=[this.eraseAttr()," ",1,32];for(t++;t--;)i[t]=r;this.updateRange(e)}},e.prototype.clear=function(){if(0!==this.buffer.ybase||0!==this.buffer.y){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var t=1;t<this.rows;t++)this.buffer.lines.push(this.blankLine());this.refresh(0,this.rows-1),this.emit("scroll",this.buffer.ydisp)}},e.prototype.eraseLine=function(t){this.eraseRight(0,t)},e.prototype.blankLine=function(t,e,i){var r=[t?this.eraseAttr():this.defAttr," ",1,32],n=[];e&&(n.isWrapped=e),i=i||this.cols;for(var s=0;s<i;s++)n[s]=r;return n},e.prototype.ch=function(t){return t?[this.eraseAttr()," ",1,32]:[this.defAttr," ",1,32]},e.prototype.is=function(t){return 0===(this.options.termName+"").indexOf(t)},e.prototype.handler=function(t){this.options.disableStdin||(this.selectionManager&&this.selectionManager.hasSelection&&this.selectionManager.clearSelection(),this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),this.emit("data",t))},e.prototype.handleTitle=function(t){this.emit("title",t)},e.prototype.index=function(){this.buffer.y++,this.buffer.y>this.buffer.scrollBottom&&(this.buffer.y--,this.scroll()),this.buffer.x>=this.cols&&this.buffer.x--},e.prototype.reverseIndex=function(){if(this.buffer.y===this.buffer.scrollTop){var t=this.buffer.scrollBottom-this.buffer.scrollTop;this.buffer.lines.shiftElements(this.buffer.y+this.buffer.ybase,t,1),this.buffer.lines.set(this.buffer.y+this.buffer.ybase,this.blankLine(!0)),this.updateRange(this.buffer.scrollTop),this.updateRange(this.buffer.scrollBottom)}else this.buffer.y--},e.prototype.reset=function(){this.options.rows=this.rows,this.options.cols=this.cols;var t=this._customKeyEventHandler,e=this._inputHandler;this._setup(),this._customKeyEventHandler=t,this._inputHandler=e,this.refresh(0,this.rows-1),this.viewport&&this.viewport.syncScrollArea()},e.prototype.tabSet=function(){this.buffer.tabs[this.buffer.x]=!0},e.prototype.cancel=function(t,e){if(this.options.cancelEvents||e)return t.preventDefault(),t.stopPropagation(),!1},e.prototype.matchColor=function(t,e,i){return function(t,e,i){var r=t<<16|e<<8|i;if(null!=O[r])return O[r];for(var n,s,o=1/0,a=-1,l=0;l<k.DEFAULT_ANSI_COLORS.length;l++){if(0===(s=D(t,e,i,(n=k.DEFAULT_ANSI_COLORS[l].rgba)>>>24,n>>>16&255,n>>>8&255))){a=l;break}s<o&&(o=s,a=l)}return O[r]=a}(t,e,i)},e.prototype._visualBell=function(){return!1},e.prototype._soundBell=function(){return"sound"===this.options.bellStyle},e}(l.EventEmitter);i.Terminal=R;var T=function(t,e,i,r){Array.isArray(t)||(t=[t]),t.forEach(function(t){t.addEventListener(e,i,r||!1)})};function B(t,e,i,r){void 0===r&&(r=!1),t.removeEventListener(e,i,r)}var O={};function D(t,e,i,r,n,s){return Math.pow(30*(t-r),2)+Math.pow(59*(e-n),2)+Math.pow(11*(i-s),2)}},{"./AccessibilityManager":1,"./Buffer":2,"./BufferSet":3,"./CompositionHelper":6,"./EscapeSequences":7,"./EventEmitter":8,"./InputHandler":9,"./Linkifier":10,"./Parser":11,"./SelectionManager":12,"./SoundManager":14,"./Strings":15,"./Viewport":18,"./handlers/Clipboard":20,"./input/MouseZoneManager":21,"./renderer/ColorManager":23,"./renderer/Renderer":27,"./shared/utils/Browser":36,"./utils/CharMeasure":37,"./utils/Clone":39,"./utils/MouseHelper":41,"./utils/ScreenDprMonitor":43}],17:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(t){t.HOVER="linkhover",t.TOOLTIP="linktooltip",t.LEAVE="linkleave"}(i.LinkHoverEventTypes||(i.LinkHoverEventTypes={}))},{}],18:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=15,n=function(){function t(t,e,i,n){var s=this;this._terminal=t,this._viewportElement=e,this._scrollArea=i,this._charMeasure=n,this.scrollBarWidth=0,this._currentRowHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._wheelPartialScroll=0,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||r,this._viewportElement.addEventListener("scroll",this._onScroll.bind(this)),setTimeout(function(){return s.syncScrollArea()},0)}return t.prototype.onThemeChanged=function(t){this._viewportElement.style.backgroundColor=t.background.css},t.prototype._refresh=function(){if(this._charMeasure.height>0){this._currentRowHeight=this._terminal.renderer.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var t=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._terminal.renderer.dimensions.canvasHeight);this._lastRecordedBufferHeight!==t&&(this._lastRecordedBufferHeight=t,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}},t.prototype.syncScrollArea=function(){this._lastRecordedBufferLength!==this._terminal.buffer.lines.length?(this._lastRecordedBufferLength=this._terminal.buffer.lines.length,this._refresh()):this._lastRecordedViewportHeight!==this._terminal.renderer.dimensions.canvasHeight?this._refresh():this._terminal.renderer.dimensions.scaledCellHeight/window.devicePixelRatio!==this._currentRowHeight&&this._refresh();var t=this._terminal.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==t&&(this._viewportElement.scrollTop=t)},t.prototype._onScroll=function(t){if(this._viewportElement.offsetParent){var e=Math.round(this._viewportElement.scrollTop/this._currentRowHeight)-this._terminal.buffer.ydisp;this._terminal.scrollLines(e,!0)}},t.prototype.onWheel=function(t){var e=this._getPixelsScrolled(t);0!==e&&(this._viewportElement.scrollTop+=e,t.preventDefault())},t.prototype._getPixelsScrolled=function(t){if(0===t.deltaY)return 0;var e=t.deltaY;return t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._currentRowHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._currentRowHeight*this._terminal.rows),e},t.prototype.getLinesScrolled=function(t){if(0===t.deltaY)return 0;var e=t.deltaY;return t.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(e/=this._currentRowHeight+0,this._wheelPartialScroll+=e,e=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._terminal.rows),e},t.prototype.onTouchStart=function(t){this._lastTouchY=t.touches[0].pageY},t.prototype.onTouchMove=function(t){var e=this._lastTouchY-t.touches[0].pageY;this._lastTouchY=t.touches[0].pageY,0!==e&&(this._viewportElement.scrollTop+=e,t.preventDefault())},t}();i.Viewport=n},{}],19:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r,n=t("../EscapeSequences");!function(t){t.Up="A",t.Down="B",t.Right="C",t.Left="D"}(r||(r={}));var s=function(){function t(t,e){var i;this._mouseEvent=t,this._terminal=e,this._lines=this._terminal.buffer.lines,this._startCol=this._terminal.buffer.x,this._startRow=this._terminal.buffer.y,i=this._terminal.mouseHelper.getCoords(this._mouseEvent,this._terminal.element,this._terminal.charMeasure,this._terminal.options.lineHeight,this._terminal.cols,this._terminal.rows,!1).map(function(t){return t-1}),this._endCol=i[0],this._endRow=i[1]}return t.prototype.move=function(){this._mouseEvent.altKey&&this._terminal.send(this._arrowSequences())},t.prototype._arrowSequences=function(){return this._terminal.buffer.hasScrollback?this._moveHorizontallyOnly():this._resetStartingRow()+this._moveToRequestedRow()+this._moveToRequestedCol()},t.prototype._resetStartingRow=function(){return 0===this._moveToRequestedRow().length?"":o(this._bufferLine(this._startCol,this._startRow,this._startCol,this._startRow-this._wrappedRowsForRow(this._startRow),!1).length,this._sequence(r.Left))},t.prototype._moveToRequestedRow=function(){var t=this._startRow-this._wrappedRowsForRow(this._startRow),e=this._endRow-this._wrappedRowsForRow(this._endRow);return o(Math.abs(t-e)-this._wrappedRowsCount(),this._sequence(this._verticalDirection()))},t.prototype._moveToRequestedCol=function(){var t;t=this._moveToRequestedRow().length>0?this._endRow-this._wrappedRowsForRow(this._endRow):this._startRow;var e=this._endRow,i=this._horizontalDirection();return o(this._bufferLine(this._startCol,t,this._endCol,e,i===r.Right).length,this._sequence(i))},t.prototype._moveHorizontallyOnly=function(){var t=this._horizontalDirection();return o(Math.abs(this._startCol-this._endCol),this._sequence(t))},t.prototype._wrappedRowsCount=function(){for(var t=0,e=this._startRow-this._wrappedRowsForRow(this._startRow),i=this._endRow-this._wrappedRowsForRow(this._endRow),n=0;n<Math.abs(e-i);n++){var s=this._verticalDirection()===r.Up?-1:1;this._lines.get(e+s*n).isWrapped&&t++}return t},t.prototype._wrappedRowsForRow=function(t){for(var e=0,i=this._lines.get(t).isWrapped;i&&t>=0&&t<this._terminal.rows;)e++,t--,i=this._lines.get(t).isWrapped;return e},t.prototype._horizontalDirection=function(){var t;return t=this._moveToRequestedRow().length>0?this._endRow-this._wrappedRowsForRow(this._endRow):this._startRow,this._startCol<this._endCol&&t<=this._endRow||this._startCol>=this._endCol&&t<this._endRow?r.Right:r.Left},t.prototype._verticalDirection=function(){return this._startRow>this._endRow?r.Up:r.Down},t.prototype._bufferLine=function(t,e,i,r,n){for(var s=t,o=e,a="";s!==i||o!==r;)s+=n?1:-1,n&&s>this._terminal.cols-1?(a+=this._terminal.buffer.translateBufferLineToString(o,!1,t,s),s=0,t=0,o++):!n&&s<0&&(a+=this._terminal.buffer.translateBufferLineToString(o,!1,0,t+1),t=s=this._terminal.cols-1,o--);return a+this._terminal.buffer.translateBufferLineToString(o,!1,t,s)},t.prototype._sequence=function(t){var e=this._terminal.applicationCursor?"O":"[";return n.C0.ESC+e+t},t}();function o(t,e){t=Math.floor(t);for(var i="",r=0;r<t;r++)i+=e;return i}i.AltClickHandler=s},{"../EscapeSequences":7}],20:[function(t,e,i){"use strict";function r(t){return t.replace(/\r?\n/g,"\r")}function n(t,e){return e?"[200~"+t+"[201~":t}function s(t,e){e.style.position="fixed",e.style.width="20px",e.style.height="20px",e.style.left=t.clientX-10+"px",e.style.top=t.clientY-10+"px",e.style.zIndex="1000",e.focus(),setTimeout(function(){e.style.position=null,e.style.width=null,e.style.height=null,e.style.left=null,e.style.top=null,e.style.zIndex=null},200)}Object.defineProperty(i,"__esModule",{value:!0}),i.prepareTextForTerminal=r,i.bracketTextForPaste=n,i.copyHandler=function(t,e,i){e.browser.isMSIE?window.clipboardData.setData("Text",i.selectionText):t.clipboardData.setData("text/plain",i.selectionText),t.preventDefault()},i.pasteHandler=function(t,e){t.stopPropagation();var i=function(i){i=n(i=r(i),e.bracketedPasteMode),e.handler(i),e.textarea.value="",e.emit("paste",i),e.cancel(t)};e.browser.isMSIE?window.clipboardData&&i(window.clipboardData.getData("Text")):t.clipboardData&&i(t.clipboardData.getData("text/plain"))},i.moveTextAreaUnderMouseCursor=s,i.rightClickHandler=function(t,e,i,r){s(t,e),r&&!i.isClickInSelection(t)&&i.selectWordAtCursor(t),e.value=i.selectionText,e.select()}},{}],21:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t){var e=this;this._terminal=t,this._zones=[],this._areZonesActive=!1,this._tooltipTimeout=null,this._currentZone=null,this._lastHoverCoords=[null,null],this._terminal.element.addEventListener("mousedown",function(t){return e._onMouseDown(t)}),this._mouseMoveListener=function(t){return e._onMouseMove(t)},this._clickListener=function(t){return e._onClick(t)}}return t.prototype.add=function(t){this._zones.push(t),1===this._zones.length&&this._activate()},t.prototype.clearAll=function(t,e){if(0!==this._zones.length){e||(t=0,e=this._terminal.rows-1);for(var i=0;i<this._zones.length;i++){var r=this._zones[i];(r.y1>t&&r.y1<=e+1||r.y2>t&&r.y2<=e+1||r.y1<t&&r.y2>e+1)&&(this._currentZone&&this._currentZone===r&&(this._currentZone.leaveCallback(),this._currentZone=null),this._zones.splice(i--,1))}0===this._zones.length&&this._deactivate()}},t.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._terminal.element.addEventListener("mousemove",this._mouseMoveListener),this._terminal.element.addEventListener("click",this._clickListener))},t.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._terminal.element.removeEventListener("mousemove",this._mouseMoveListener),this._terminal.element.removeEventListener("click",this._clickListener))},t.prototype._onMouseMove=function(t){this._lastHoverCoords[0]===t.pageX&&this._lastHoverCoords[1]===t.pageY||(this._onHover(t),this._lastHoverCoords=[t.pageX,t.pageY])},t.prototype._onHover=function(t){var e=this,i=this._findZoneEventAt(t);i!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=null,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),i&&(this._currentZone=i,i.hoverCallback&&i.hoverCallback(t),this._tooltipTimeout=setTimeout(function(){return e._onTooltip(t)},500)))},t.prototype._onTooltip=function(t){this._tooltipTimeout=null;var e=this._findZoneEventAt(t);e&&e.tooltipCallback&&e.tooltipCallback(t)},t.prototype._onMouseDown=function(t){if(this._areZonesActive){var e=this._findZoneEventAt(t);e&&e.willLinkActivate(t)&&(t.preventDefault(),t.stopImmediatePropagation())}},t.prototype._onClick=function(t){var e=this._findZoneEventAt(t);e&&(e.clickCallback(t),t.preventDefault(),t.stopImmediatePropagation())},t.prototype._findZoneEventAt=function(t){var e=this._terminal.mouseHelper.getCoords(t,this._terminal.screenElement,this._terminal.charMeasure,this._terminal.options.lineHeight,this._terminal.cols,this._terminal.rows);if(!e)return null;for(var i=e[0],r=e[1],n=0;n<this._zones.length;n++){var s=this._zones[n];if(s.y1===s.y2){if(r===s.y1&&i>=s.x1&&i<s.x2)return s}else if(r===s.y1&&i>=s.x1||r===s.y2&&i<s.x2||r>s.y1&&r<s.y2)return s}return null},t}();i.MouseZoneManager=r;i.MouseZone=function(t,e,i,r,n,s,o,a,l){this.x1=t,this.y1=e,this.x2=i,this.y2=r,this.clickCallback=n,this.hoverCallback=s,this.tooltipCallback=o,this.leaveCallback=a,this.willLinkActivate=l}},{}],22:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./atlas/Types"),n=t("../shared/atlas/Types"),s=t("./atlas/CharAtlas"),o=t("../Buffer"),a=function(){function t(t,e,i,r,n){this._container=t,this._alpha=r,this._colors=n,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+e+"-layer"),this._canvas.style.zIndex=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return t.prototype._initCanvas=function(){this._ctx=this._canvas.getContext("2d",{alpha:this._alpha}),this._alpha||this.clearAll()},t.prototype.onOptionsChanged=function(t){},t.prototype.onBlur=function(t){},t.prototype.onFocus=function(t){},t.prototype.onCursorMove=function(t){},t.prototype.onGridChanged=function(t,e,i){},t.prototype.onSelectionChanged=function(t,e,i){},t.prototype.onThemeChanged=function(t,e){this._refreshCharAtlas(t,e)},t.prototype.setTransparency=function(t,e){if(e!==this._alpha){var i=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,i),this._refreshCharAtlas(t,this._colors),this.onGridChanged(t,0,t.rows-1)}},t.prototype._refreshCharAtlas=function(t,e){var i=this;if(!(this._scaledCharWidth<=0&&this._scaledCharHeight<=0)){this._charAtlas=null;var r=s.acquireCharAtlas(t,e,this._scaledCharWidth,this._scaledCharHeight);r instanceof HTMLCanvasElement?this._charAtlas=r:r.then(function(t){return i._charAtlas=t})}},t.prototype.resize=function(t,e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this.clearAll(),this._refreshCharAtlas(t,this._colors)},t.prototype.fillCells=function(t,e,i,r){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight)},t.prototype.fillBottomLineAtCells=function(t,e,i){void 0===i&&(i=1),this._ctx.fillRect(t*this._scaledCellWidth,(e+1)*this._scaledCellHeight-window.devicePixelRatio-1,i*this._scaledCellWidth,window.devicePixelRatio)},t.prototype.fillLeftLineAtCell=function(t,e){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,window.devicePixelRatio,this._scaledCellHeight)},t.prototype.strokeRectAtCell=function(t,e,i,r){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,e*this._scaledCellHeight+window.devicePixelRatio/2,i*this._scaledCellWidth-window.devicePixelRatio,r*this._scaledCellHeight-window.devicePixelRatio)},t.prototype.clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},t.prototype.clearCells=function(t,e,i,r){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight))},t.prototype.fillCharTrueColor=function(t,e,i,r){this._ctx.font=this._getFont(t,!1),this._ctx.textBaseline="top",this._clipRow(t,r),this._ctx.fillText(e[o.CHAR_DATA_CHAR_INDEX],i*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop)},t.prototype.drawChar=function(t,e,i,s,o,a,l,c,h,u){var f=0;l<256?f=l+2:h&&t.options.enableBold&&(f=1);var p=i<256,d=f>1&&l<16&&(l<8||h),_=l>=256,m=c>=256;if(this._charAtlas&&p&&(d||_)&&m){var y=this._scaledCharWidth+n.CHAR_ATLAS_CELL_SPACING,g=this._scaledCharHeight+n.CHAR_ATLAS_CELL_SPACING;u&&(this._ctx.globalAlpha=r.DIM_OPACITY),h&&!t.options.enableBold&&f>1&&(f-=8),this._ctx.drawImage(this._charAtlas,i*y,f*g,y,this._scaledCharHeight,o*this._scaledCellWidth+this._scaledCharLeft,a*this._scaledCellHeight+this._scaledCharTop,y,this._scaledCharHeight)}else this._drawUncachedChar(t,e,s,l,o,a,h&&t.options.enableBold,u)},t.prototype._drawUncachedChar=function(t,e,i,n,s,o,a,l){this._ctx.save(),this._ctx.font=this._getFont(t,a),this._ctx.textBaseline="top",n===r.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:this._ctx.fillStyle=n<256?this._colors.ansi[n].css:this._colors.foreground.css,this._clipRow(t,o),l&&(this._ctx.globalAlpha=r.DIM_OPACITY),this._ctx.fillText(e,s*this._scaledCellWidth+this._scaledCharLeft,o*this._scaledCellHeight+this._scaledCharTop),this._ctx.restore()},t.prototype._clipRow=function(t,e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,t.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},t.prototype._getFont=function(t,e){return(e?t.options.fontWeightBold:t.options.fontWeight)+" "+t.options.fontSize*window.devicePixelRatio+"px "+t.options.fontFamily},t}();i.BaseRenderLayer=a},{"../Buffer":2,"../shared/atlas/Types":35,"./atlas/CharAtlas":31,"./atlas/Types":33}],23:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=l("#ffffff"),n=l("#000000"),s=l("#ffffff"),o=l("#000000"),a={css:"rgba(255, 255, 255, 0.3)",rgba:4294967159};function l(t){return{css:t,rgba:parseInt(t.slice(1),16)<<8|255}}function c(t){var e=t.toString(16);return e.length<2?"0"+e:e}i.DEFAULT_ANSI_COLORS=function(){for(var t=[l("#2e3436"),l("#cc0000"),l("#4e9a06"),l("#c4a000"),l("#3465a4"),l("#75507b"),l("#06989a"),l("#d3d7cf"),l("#555753"),l("#ef2929"),l("#8ae234"),l("#fce94f"),l("#729fcf"),l("#ad7fa8"),l("#34e2e2"),l("#eeeeec")],e=[0,95,135,175,215,255],i=0;i<216;i++){var r=e[i/36%6|0],n=e[i/6%6|0],s=e[i%6];t.push({css:"#"+c(r)+c(n)+c(s),rgba:(r<<24|n<<16|s<<8|255)>>>0})}for(i=0;i<24;i++){var o=8+10*i,a=c(o);t.push({css:"#"+a+a+a,rgba:(o<<24|o<<16|o<<8|255)>>>0})}return t}();var h=function(){function t(t,e){this.allowTransparency=e;var l=t.createElement("canvas");l.width=1,l.height=1,this._ctx=l.getContext("2d"),this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this.colors={foreground:r,background:n,cursor:s,cursorAccent:o,selection:a,ansi:i.DEFAULT_ANSI_COLORS.slice()}}return t.prototype.setTheme=function(t){this.colors.foreground=this._parseColor(t.foreground,r),this.colors.background=this._parseColor(t.background,n),this.colors.cursor=this._parseColor(t.cursor,s,!0),this.colors.cursorAccent=this._parseColor(t.cursorAccent,o,!0),this.colors.selection=this._parseColor(t.selection,a,!0),this.colors.ansi[0]=this._parseColor(t.black,i.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(t.red,i.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(t.green,i.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(t.yellow,i.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(t.blue,i.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(t.magenta,i.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(t.cyan,i.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(t.white,i.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(t.brightBlack,i.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(t.brightRed,i.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(t.brightGreen,i.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(t.brightYellow,i.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(t.brightBlue,i.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(t.brightMagenta,i.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(t.brightCyan,i.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(t.brightWhite,i.DEFAULT_ANSI_COLORS[15])},t.prototype._parseColor=function(t,e,i){if(void 0===i&&(i=this.allowTransparency),!t)return e;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=t,"string"!=typeof this._ctx.fillStyle)return console.warn("Color: "+t+" is invalid using fallback "+e.css),e;this._ctx.fillRect(0,0,1,1);var r=this._ctx.getImageData(0,0,1,1).data;return i||255===r[3]?{css:t,rgba:(r[0]<<24|r[1]<<16|r[2]<<8|r[3])>>>0}:(console.warn("Color: "+t+" is using transparency, but allowTransparency is false. Using fallback "+e.css+"."),e)},t}();i.ColorManager=h},{}],24:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("../Buffer"),o=function(t){function e(e,i,r){var n=t.call(this,e,"cursor",i,!0,r)||this;return n._state={x:null,y:null,isFocused:null,style:null,width:null},n._cursorRenderers={bar:n._renderBarCursor.bind(n),block:n._renderBlockCursor.bind(n),underline:n._renderUnderlineCursor.bind(n)},n}return n(e,t),e.prototype.resize=function(e,i){t.prototype.resize.call(this,e,i),this._state={x:null,y:null,isFocused:null,style:null,width:null}},e.prototype.reset=function(t){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=null,this.onOptionsChanged(t))},e.prototype.onBlur=function(t){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),t.refresh(t.buffer.y,t.buffer.y)},e.prototype.onFocus=function(t){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume(t):t.refresh(t.buffer.y,t.buffer.y)},e.prototype.onOptionsChanged=function(t){var e=this;t.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new a(t,function(){e._render(t,!0)})):(this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=null),t.refresh(t.buffer.y,t.buffer.y))},e.prototype.onCursorMove=function(t){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation(t)},e.prototype.onGridChanged=function(t,e,i){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(t,!1):this._cursorBlinkStateManager.restartBlinkAnimation(t)},e.prototype._render=function(t,e){if(t.cursorState&&!t.cursorHidden){var i=t.buffer.ybase+t.buffer.y,r=i-t.buffer.ydisp;if(r<0||r>=t.rows)this._clearCursor();else{var n=t.buffer.lines.get(i)[t.buffer.x];if(n){if(!t.isFocused)return this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._renderBlurCursor(t,t.buffer.x,r,n),this._ctx.restore(),this._state.x=t.buffer.x,this._state.y=r,this._state.isFocused=!1,this._state.style=t.options.cursorStyle,void(this._state.width=n[s.CHAR_DATA_WIDTH_INDEX]);if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===t.buffer.x&&this._state.y===r&&this._state.isFocused===t.isFocused&&this._state.style===t.options.cursorStyle&&this._state.width===n[s.CHAR_DATA_WIDTH_INDEX])return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[t.options.cursorStyle||"block"](t,t.buffer.x,r,n),this._ctx.restore(),this._state.x=t.buffer.x,this._state.y=r,this._state.isFocused=!1,this._state.style=t.options.cursorStyle,this._state.width=n[s.CHAR_DATA_WIDTH_INDEX]}else this._clearCursor()}}}else this._clearCursor()},e.prototype._clearCursor=function(){this._state&&(this.clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:null,y:null,isFocused:null,style:null,width:null})},e.prototype._renderBarCursor=function(t,e,i,r){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this.fillLeftLineAtCell(e,i),this._ctx.restore()},e.prototype._renderBlockCursor=function(t,e,i,r){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this.fillCells(e,i,r[s.CHAR_DATA_WIDTH_INDEX],1),this._ctx.fillStyle=this._colors.cursorAccent.css,this.fillCharTrueColor(t,r,e,i),this._ctx.restore()},e.prototype._renderUnderlineCursor=function(t,e,i,r){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this.fillBottomLineAtCells(e,i),this._ctx.restore()},e.prototype._renderBlurCursor=function(t,e,i,r){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this.strokeRectAtCell(e,i,r[s.CHAR_DATA_WIDTH_INDEX],1),this._ctx.restore()},e}(t("./BaseRenderLayer").BaseRenderLayer);i.CursorRenderLayer=o;var a=function(){function t(t,e){this._renderCallback=e,this.isCursorVisible=!0,t.isFocused&&this._restartInterval()}return Object.defineProperty(t.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=null),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=null),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=null)},t.prototype.restartBlinkAnimation=function(t){var e=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){e._renderCallback(),e._animationFrame=null})))},t.prototype._restartInterval=function(t){var e=this;void 0===t&&(t=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=setTimeout(function(){if(e._animationTimeRestarted){var t=600-(Date.now()-e._animationTimeRestarted);if(e._animationTimeRestarted=null,t>0)return void e._restartInterval(t)}e.isCursorVisible=!1,e._animationFrame=window.requestAnimationFrame(function(){e._renderCallback(),e._animationFrame=null}),e._blinkInterval=setInterval(function(){if(e._animationTimeRestarted){var t=600-(Date.now()-e._animationTimeRestarted);return e._animationTimeRestarted=null,void e._restartInterval(t)}e.isCursorVisible=!e.isCursorVisible,e._animationFrame=window.requestAnimationFrame(function(){e._renderCallback(),e._animationFrame=null})},600)},t)},t.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=null),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=null),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=null)},t.prototype.resume=function(t){this._animationTimeRestarted=null,this._restartInterval(),this.restartBlinkAnimation(t)},t}()},{"../Buffer":2,"./BaseRenderLayer":22}],25:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(){this.cache=[]}return t.prototype.resize=function(t,e){for(var i=0;i<t;i++){this.cache.length<=i&&this.cache.push([]);for(var r=this.cache[i].length;r<e;r++)this.cache[i].push(null);this.cache[i].length=e}this.cache.length=t},t.prototype.clear=function(){for(var t=0;t<this.cache.length;t++)for(var e=0;e<this.cache[t].length;e++)this.cache[t][e]=null},t}();i.GridCache=r},{}],26:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("../Types"),o=function(t){function e(e,i,r,n){var o=t.call(this,e,"link",i,!0,r)||this;return o._state=null,n.linkifier.on(s.LinkHoverEventTypes.HOVER,function(t){return o._onLinkHover(t)}),n.linkifier.on(s.LinkHoverEventTypes.LEAVE,function(t){return o._onLinkLeave(t)}),o}return n(e,t),e.prototype.resize=function(e,i){t.prototype.resize.call(this,e,i),this._state=null},e.prototype.reset=function(t){this._clearCurrentLink()},e.prototype._clearCurrentLink=function(){if(this._state){this.clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var t=this._state.y2-this._state.y1-1;t>0&&this.clearCells(0,this._state.y1+1,this._state.cols,t),this.clearCells(0,this._state.y2,this._state.x2,1),this._state=null}},e.prototype._onLinkHover=function(t){if(this._ctx.fillStyle=this._colors.foreground.css,t.y1===t.y2)this.fillBottomLineAtCells(t.x1,t.y1,t.x2-t.x1);else{this.fillBottomLineAtCells(t.x1,t.y1,t.cols-t.x1);for(var e=t.y1+1;e<t.y2;e++)this.fillBottomLineAtCells(0,e,t.cols);this.fillBottomLineAtCells(0,t.y2,t.x2)}this._state=t},e.prototype._onLinkLeave=function(t){this._clearCurrentLink()},e}(t("./BaseRenderLayer").BaseRenderLayer);i.LinkRenderLayer=o},{"../Types":17,"./BaseRenderLayer":22}],27:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("./TextRenderLayer"),o=t("./SelectionRenderLayer"),a=t("./CursorRenderLayer"),l=t("./ColorManager"),c=t("./LinkRenderLayer"),h=t("../EventEmitter"),u=t("../utils/RenderDebouncer"),f=t("../utils/ScreenDprMonitor"),p=function(t){function e(e,i){var r=t.call(this)||this;r._terminal=e,r._isPaused=!1,r._needsFullRefresh=!1;var n=r._terminal.options.allowTransparency;(r.colorManager=new l.ColorManager(document,n),i&&r.colorManager.setTheme(i),r._renderLayers=[new s.TextRenderLayer(r._terminal.screenElement,0,r.colorManager.colors,n),new o.SelectionRenderLayer(r._terminal.screenElement,1,r.colorManager.colors),new c.LinkRenderLayer(r._terminal.screenElement,2,r.colorManager.colors,r._terminal),new a.CursorRenderLayer(r._terminal.screenElement,3,r.colorManager.colors)],r.dimensions={scaledCharWidth:null,scaledCharHeight:null,scaledCellWidth:null,scaledCellHeight:null,scaledCharLeft:null,scaledCharTop:null,scaledCanvasWidth:null,scaledCanvasHeight:null,canvasWidth:null,canvasHeight:null,actualCellWidth:null,actualCellHeight:null},r._devicePixelRatio=window.devicePixelRatio,r._updateDimensions(),r.onOptionsChanged(),r._renderDebouncer=new u.RenderDebouncer(r._terminal,r._renderRows.bind(r)),r._screenDprMonitor=new f.ScreenDprMonitor,r._screenDprMonitor.setListener(function(){return r.onWindowResize(window.devicePixelRatio)}),"IntersectionObserver"in window)&&new IntersectionObserver(function(t){return r.onIntersectionChange(t[0])},{threshold:0}).observe(r._terminal.element);return r}return n(e,t),e.prototype.onIntersectionChange=function(t){this._isPaused=0===t.intersectionRatio,!this._isPaused&&this._needsFullRefresh&&this._terminal.refresh(0,this._terminal.rows-1)},e.prototype.onWindowResize=function(t){this._devicePixelRatio!==t&&(this._devicePixelRatio=t,this.onResize(this._terminal.cols,this._terminal.rows))},e.prototype.setTheme=function(t){var e=this;return this.colorManager.setTheme(t),this._renderLayers.forEach(function(t){t.onThemeChanged(e._terminal,e.colorManager.colors),t.reset(e._terminal)}),this._isPaused?this._needsFullRefresh=!0:this._terminal.refresh(0,this._terminal.rows-1),this.colorManager.colors},e.prototype.onResize=function(t,e){var i=this;this._updateDimensions(),this._renderLayers.forEach(function(t){return t.resize(i._terminal,i.dimensions)}),this._isPaused?this._needsFullRefresh=!0:this._terminal.refresh(0,this._terminal.rows-1),this._terminal.screenElement.style.width=this.dimensions.canvasWidth+"px",this._terminal.screenElement.style.height=this.dimensions.canvasHeight+"px",this.emit("resize",{width:this.dimensions.canvasWidth,height:this.dimensions.canvasHeight})},e.prototype.onCharSizeChanged=function(){this.onResize(this._terminal.cols,this._terminal.rows)},e.prototype.onBlur=function(){var t=this;this._runOperation(function(e){return e.onBlur(t._terminal)})},e.prototype.onFocus=function(){var t=this;this._runOperation(function(e){return e.onFocus(t._terminal)})},e.prototype.onSelectionChanged=function(t,e){var i=this;this._runOperation(function(r){return r.onSelectionChanged(i._terminal,t,e)})},e.prototype.onCursorMove=function(){var t=this;this._runOperation(function(e){return e.onCursorMove(t._terminal)})},e.prototype.onOptionsChanged=function(){var t=this;this._runOperation(function(e){return e.onOptionsChanged(t._terminal)})},e.prototype.clear=function(){var t=this;this._runOperation(function(e){return e.reset(t._terminal)})},e.prototype._runOperation=function(t){this._isPaused?this._needsFullRefresh=!0:this._renderLayers.forEach(function(e){return t(e)})},e.prototype.refreshRows=function(t,e){this._isPaused?this._needsFullRefresh=!0:this._renderDebouncer.refresh(t,e)},e.prototype._renderRows=function(t,e){var i=this;this._renderLayers.forEach(function(r){return r.onGridChanged(i._terminal,t,e)}),this._terminal.emit("refresh",{start:t,end:e})},e.prototype._updateDimensions=function(){this._terminal.charMeasure.width&&this._terminal.charMeasure.height&&(this.dimensions.scaledCharWidth=Math.floor(this._terminal.charMeasure.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._terminal.charMeasure.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._terminal.options.lineHeight),this.dimensions.scaledCharTop=1===this._terminal.options.lineHeight?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._terminal.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._terminal.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._terminal.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._terminal.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._terminal.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._terminal.cols)},e}(h.EventEmitter);i.Renderer=p},{"../EventEmitter":8,"../utils/RenderDebouncer":42,"../utils/ScreenDprMonitor":43,"./ColorManager":23,"./CursorRenderLayer":24,"./LinkRenderLayer":26,"./SelectionRenderLayer":28,"./TextRenderLayer":29}],28:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=function(t){function e(e,i,r){var n=t.call(this,e,"selection",i,!0,r)||this;return n._state={start:null,end:null},n}return n(e,t),e.prototype.resize=function(e,i){t.prototype.resize.call(this,e,i),this._state={start:null,end:null}},e.prototype.reset=function(t){this._state.start&&this._state.end&&(this._state={start:null,end:null},this.clearAll())},e.prototype.onSelectionChanged=function(t,e,i){if(this._state.start!==e&&this._state.end!==i&&(this.clearAll(),e&&i)){var r=e[1]-t.buffer.ydisp,n=i[1]-t.buffer.ydisp,s=Math.max(r,0),o=Math.min(n,t.rows-1);if(!(s>=t.rows||o<0)){var a=r===s?e[0]:0,l=s===o?i[0]:t.cols;this._ctx.fillStyle=this._colors.selection.css,this.fillCells(a,s,l-a,1);var c=Math.max(o-s-1,0);if(this.fillCells(0,s+1,t.cols,c),s!==o){var h=n===o?i[0]:t.cols;this.fillCells(0,o,h,1)}this._state.start=[e[0],e[1]],this._state.end=[i[0],i[1]]}}},e}(t("./BaseRenderLayer").BaseRenderLayer);i.SelectionRenderLayer=s},{"./BaseRenderLayer":22}],29:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=t("../Buffer"),o=t("./Types"),a=t("./atlas/Types"),l=t("./GridCache"),c=function(t){function e(e,i,r,n){var s=t.call(this,e,"text",i,n,r)||this;return s._characterOverlapCache={},s._state=new l.GridCache,s}return n(e,t),e.prototype.resize=function(e,i){t.prototype.resize.call(this,e,i);var r=this._getFont(e,!1);this._characterWidth===i.scaledCharWidth&&this._characterFont===r||(this._characterWidth=i.scaledCharWidth,this._characterFont=r,this._characterOverlapCache={}),this._state.clear(),this._state.resize(e.cols,e.rows)},e.prototype.reset=function(t){this._state.clear(),this.clearAll()},e.prototype.onGridChanged=function(t,e,i){if(0!==this._state.cache.length)for(var r=e;r<=i;r++){var n=r+t.buffer.ydisp,l=t.buffer.lines.get(n);this.clearCells(0,r,t.cols,1);for(var c=0;c<t.cols;c++){var h=l[c],u=h[s.CHAR_DATA_CODE_INDEX],f=h[s.CHAR_DATA_CHAR_INDEX],p=h[s.CHAR_DATA_ATTR_INDEX],d=h[s.CHAR_DATA_WIDTH_INDEX];if(0!==d){if(32===u&&c>0){var _=l[c-1];if(this._isOverlapping(_))continue}var m=p>>18,y=511&p,g=y>=256,v=m&o.FLAGS.INVISIBLE,b=m&o.FLAGS.INVERSE;if(u&&(32!==u||!g||b)&&!v){0!==d&&this._isOverlapping(h)&&c<l.length-1&&32===l[c+1][s.CHAR_DATA_CODE_INDEX]&&(d=2);var C=p>>9&511;if(b){var w=y;y=C,256===(C=w)&&(C=a.INVERTED_DEFAULT_COLOR),257===y&&(y=a.INVERTED_DEFAULT_COLOR)}y<256&&(this._ctx.save(),this._ctx.fillStyle=y===a.INVERTED_DEFAULT_COLOR?this._colors.foreground.css:this._colors.ansi[y].css,this.fillCells(c,r,d,1),this._ctx.restore()),this._ctx.save(),m&o.FLAGS.BOLD&&(this._ctx.font=this._getFont(t,!0),C<8&&(C+=8)),m&o.FLAGS.UNDERLINE&&(C===a.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:this._ctx.fillStyle=C<256?this._colors.ansi[C].css:this._colors.foreground.css,this.fillBottomLineAtCells(c,r)),this.drawChar(t,f,u,d,c,r,C,y,!!(m&o.FLAGS.BOLD),!!(m&o.FLAGS.DIM)),this._ctx.restore()}}}}},e.prototype.onOptionsChanged=function(t){this.setTransparency(t,t.options.allowTransparency)},e.prototype._isOverlapping=function(t){if(1!==t[s.CHAR_DATA_WIDTH_INDEX])return!1;if(t[s.CHAR_DATA_CODE_INDEX]<256)return!1;var e=t[s.CHAR_DATA_CHAR_INDEX];if(this._characterOverlapCache.hasOwnProperty(e))return this._characterOverlapCache[e];this._ctx.save(),this._ctx.font=this._characterFont;var i=Math.floor(this._ctx.measureText(e).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[e]=i,i},e}(t("./BaseRenderLayer").BaseRenderLayer);i.TextRenderLayer=c},{"../Buffer":2,"./BaseRenderLayer":22,"./GridCache":25,"./Types":30,"./atlas/Types":33}],30:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(t){t[t.BOLD=1]="BOLD",t[t.UNDERLINE=2]="UNDERLINE",t[t.BLINK=4]="BLINK",t[t.INVERSE=8]="INVERSE",t[t.INVISIBLE=16]="INVISIBLE",t[t.DIM=32]="DIM"}(i.FLAGS||(i.FLAGS={}))},{}],31:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("../../shared/atlas/CharAtlasGenerator"),n=t("./CharAtlasUtils"),s=[];i.acquireCharAtlas=function(t,e,i,o){for(var a=n.generateConfig(i,o,t,e),l=0;l<s.length;l++){var c=(h=s[l]).ownedBy.indexOf(t);if(c>=0){if(n.configEquals(h.config,a))return h.bitmap;1===h.ownedBy.length?s.splice(l,1):h.ownedBy.splice(c,1);break}}for(l=0;l<s.length;l++){var h=s[l];if(n.configEquals(h.config,a))return h.ownedBy.push(t),h.bitmap}var u={bitmap:r.generateCharAtlas(window,function(t,e){var i=document.createElement("canvas");return i.width=t,i.height=e,i},a),config:a,ownedBy:[t]};return s.push(u),u.bitmap}},{"../../shared/atlas/CharAtlasGenerator":34,"./CharAtlasUtils":32}],32:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.generateConfig=function(t,e,i,r){var n={foreground:r.foreground,background:r.background,cursor:null,cursorAccent:null,selection:null,ansi:r.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:t,scaledCharHeight:e,fontFamily:i.options.fontFamily,fontSize:i.options.fontSize,fontWeight:i.options.fontWeight,fontWeightBold:i.options.fontWeightBold,allowTransparency:i.options.allowTransparency,colors:n}},i.configEquals=function(t,e){for(var i=0;i<t.colors.ansi.length;i++)if(t.colors.ansi[i].rgba!==e.colors.ansi[i].rgba)return!1;return t.devicePixelRatio===e.devicePixelRatio&&t.fontFamily===e.fontFamily&&t.fontSize===e.fontSize&&t.fontWeight===e.fontWeight&&t.fontWeightBold===e.fontWeightBold&&t.allowTransparency===e.allowTransparency&&t.scaledCharWidth===e.scaledCharWidth&&t.scaledCharHeight===e.scaledCharHeight&&t.colors.foreground===e.colors.foreground&&t.colors.background===e.colors.background}},{}],33:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.INVERTED_DEFAULT_COLOR=-1,i.DIM_OPACITY=.5},{}],34:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./Types"),n=t("../utils/Browser");function s(t,e){return t+" "+e.fontSize*e.devicePixelRatio+"px "+e.fontFamily}i.generateCharAtlas=function(t,e,i){var o=i.scaledCharWidth+r.CHAR_ATLAS_CELL_SPACING,a=i.scaledCharHeight+r.CHAR_ATLAS_CELL_SPACING,l=e(255*o,18*a),c=l.getContext("2d",{alpha:i.allowTransparency});c.fillStyle=i.colors.background.css,c.fillRect(0,0,l.width,l.height),c.save(),c.fillStyle=i.colors.foreground.css,c.font=s(i.fontWeight,i),c.textBaseline="top";for(var h=0;h<256;h++)c.save(),c.beginPath(),c.rect(h*o,0,o,a),c.clip(),c.fillText(String.fromCharCode(h),h*o,0),c.restore();c.save(),c.font=s(i.fontWeightBold,i);for(h=0;h<256;h++)c.save(),c.beginPath(),c.rect(h*o,a,o,a),c.clip(),c.fillText(String.fromCharCode(h),h*o,a),c.restore();c.restore(),c.font=s(i.fontWeight,i);for(var u=0;u<16;u++){8===u&&(c.font=s(i.fontWeightBold,i));var f=(u+2)*a;for(h=0;h<256;h++)c.save(),c.beginPath(),c.rect(h*o,f,o,a),c.clip(),c.fillStyle=i.colors.ansi[u].css,c.fillText(String.fromCharCode(h),h*o,f),c.restore()}if(c.restore(),!("createImageBitmap"in t)||n.isFirefox)return l instanceof HTMLCanvasElement?l:new Promise(function(t){return t(l.transferToImageBitmap())});var p=c.getImageData(0,0,l.width,l.height);return function(t,e,i,r){for(var n=0;n<t.data.length;n+=4)t.data[n]===e&&t.data[n+1]===i&&t.data[n+2]===r&&(t.data[n+3]=0)}(p,i.colors.background.rgba>>>24,i.colors.background.rgba>>>16&255,i.colors.background.rgba>>>8&255),t.createImageBitmap(p)}},{"../utils/Browser":36,"./Types":35}],35:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.CHAR_ATLAS_CELL_SPACING=1},{}],36:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r="undefined"==typeof navigator,n=r?"node":navigator.userAgent,s=r?"node":navigator.platform;function o(t,e){return t.indexOf(e)>=0}i.isFirefox=!!~n.indexOf("Firefox"),i.isMSIE=!!~n.indexOf("MSIE")||!!~n.indexOf("Trident"),i.isMac=o(["Macintosh","MacIntel","MacPPC","Mac68K"],s),i.isIpad="iPad"===s,i.isIphone="iPhone"===s,i.isMSWindows=o(["Windows","Win16","Win32","WinCE"],s),i.isLinux=s.indexOf("Linux")>=0},{}],37:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=function(t){function e(e,i){var r=t.call(this)||this;return r._document=e,r._parentElement=i,r._measureElement=r._document.createElement("span"),r._measureElement.classList.add("xterm-char-measure-element"),r._measureElement.textContent="W",r._measureElement.setAttribute("aria-hidden","true"),r._parentElement.appendChild(r._measureElement),r}return n(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),e.prototype.measure=function(t){this._measureElement.style.fontFamily=t.fontFamily,this._measureElement.style.fontSize=t.fontSize+"px";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=Math.ceil(e.height),this.emit("charsizechanged")))},e}(t("../EventEmitter").EventEmitter);i.CharMeasure=s},{"../EventEmitter":8}],38:[function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var s=function(t){function e(e){var i=t.call(this)||this;return i._maxLength=e,i._array=new Array(i._maxLength),i._startIndex=0,i._length=0,i}return n(e,t),Object.defineProperty(e.prototype,"maxLength",{get:function(){return this._maxLength},set:function(t){if(this._maxLength!==t){for(var e=new Array(t),i=0;i<Math.min(t,this.length);i++)e[i]=this._array[this._getCyclicIndex(i)];this._array=e,this._maxLength=t,this._startIndex=0}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},set:function(t){if(t>this._length)for(var e=this._length;e<t;e++)this._array[e]=void 0;this._length=t},enumerable:!0,configurable:!0}),e.prototype.get=function(t){return this._array[this._getCyclicIndex(t)]},e.prototype.set=function(t,e){this._array[this._getCyclicIndex(t)]=e},e.prototype.push=function(t){this._array[this._getCyclicIndex(this._length)]=t,this._length===this._maxLength?(this._startIndex++,this._startIndex===this._maxLength&&(this._startIndex=0),this.emit("trim",1)):this._length++},e.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},e.prototype.splice=function(t,e){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];if(e){for(var n=t;n<this._length-e;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+e)];this._length-=e}if(i&&i.length){for(n=this._length-1;n>=t;n--)this._array[this._getCyclicIndex(n+i.length)]=this._array[this._getCyclicIndex(n)];for(n=0;n<i.length;n++)this._array[this._getCyclicIndex(t+n)]=i[n];if(this._length+i.length>this.maxLength){var s=this._length+i.length-this.maxLength;this._startIndex+=s,this._length=this.maxLength,this.emit("trim",s)}else this._length+=i.length}},e.prototype.trimStart=function(t){t>this._length&&(t=this._length),this._startIndex+=t,this._length-=t,this.emit("trim",t)},e.prototype.shiftElements=function(t,e,i){if(!(e<=0)){if(t<0||t>=this._length)throw new Error("start argument out of range");if(t+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(i>0){for(var r=e-1;r>=0;r--)this.set(t+r+i,this.get(t+r));var n=t+e+i-this._length;if(n>0)for(this._length+=n;this._length>this.maxLength;)this._length--,this._startIndex++,this.emit("trim",1)}else for(r=0;r<e;r++)this.set(t+r+i,this.get(t+r))}},e.prototype._getCyclicIndex=function(t){return(this._startIndex+t)%this.maxLength},e}(t("../EventEmitter").EventEmitter);i.CircularList=s},{"../EventEmitter":8}],39:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.clone=function(t,e){if(void 0===e&&(e=5),"object"!=typeof t)return t;if(null===t)return null;var r=Array.isArray(t)?[]:{};for(var n in t)r[n]=e<=1?t[n]:i.clone(t[n],e-1);return r}},{}],40:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.addDisposableListener=function(t,e,i,r){return t.addEventListener(e,i,r),{dispose:function(){i&&(t.removeEventListener(e,i,r),t=null,i=null)}}}},{}],41:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t){this._renderer=t}return t.getCoordsRelativeToElement=function(t,e){if(null==t.pageX)return null;for(var i=e,r=t.pageX,n=t.pageY;e;)r-=e.offsetLeft,n-=e.offsetTop,e=e.offsetParent;for(e=i;e&&e!==e.ownerDocument.body;)r+=e.scrollLeft,n+=e.scrollTop,e=e.parentElement;return[r,n]},t.prototype.getCoords=function(e,i,r,n,s,o,a){if(!r.width||!r.height)return null;var l=t.getCoordsRelativeToElement(e,i);return l?(l[0]=Math.ceil((l[0]+(a?this._renderer.dimensions.actualCellWidth/2:0))/this._renderer.dimensions.actualCellWidth),l[1]=Math.ceil(l[1]/this._renderer.dimensions.actualCellHeight),l[0]=Math.min(Math.max(l[0],1),s+(a?1:0)),l[1]=Math.min(Math.max(l[1],1),o),l):null},t.prototype.getRawByteCoords=function(t,e,i,r,n,s){var o=this.getCoords(t,e,i,r,n,s),a=o[0],l=o[1];return{x:a+=32,y:l+=32}},t}();i.MouseHelper=r},{}],42:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t,e){this._terminal=t,this._callback=e,this._animationFrame=null}return t.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=null)},t.prototype.refresh=function(t,e){var i=this;t=t||0,e=e||this._terminal.rows-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,t):t,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,e):e,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return i._innerRefresh()}))},t.prototype._innerRefresh=function(){this._rowStart=Math.max(this._rowStart,0),this._rowEnd=Math.min(this._rowEnd,this._terminal.rows-1),this._callback(this._rowStart,this._rowEnd),this._rowStart=null,this._rowEnd=null,this._animationFrame=null},t}();i.RenderDebouncer=r},{}],43:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(){}return t.prototype.setListener=function(t){var e=this;this._listener&&this.clearListener(),this._listener=t,this._outerListener=function(){e._listener(window.devicePixelRatio,e._currentDevicePixelRatio),e._updateDpr()},this._updateDpr()},t.prototype._updateDpr=function(){this._resolutionMediaMatchList&&this._resolutionMediaMatchList.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener)},t.prototype.clearListener=function(){this._listener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._listener=null,this._outerListener=null)},t}();i.ScreenDprMonitor=r},{}],44:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./Terminal");e.exports=r.Terminal},{"./Terminal":16}]},{},[44])(44)},function(t,e,i){var r=i(50),n=i(9),s=i(20),o=i(1)("socket.io-client");t.exports=e=l;var a=e.managers={};function l(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,n=r(t),l=n.source,c=n.id,h=n.path,u=a[c]&&h in a[c].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||u?(o("ignoring socket cache for %s",l),i=s(l,e)):(a[c]||(o("new io instance for %s",l),a[c]=s(l,e)),i=a[c]),n.query&&!e.query&&(e.query=n.query),i.socket(n.path,e)}e.protocol=n.protocol,e.connect=l,e.Manager=i(20),e.Socket=i(14)},function(t,e){var i=[].slice;t.exports=function(t,e){if("string"==typeof e&&(e=t[e]),"function"!=typeof e)throw new Error("bind() requires a function");var r=i.call(arguments,2);return function(){return e.apply(t,r.concat(i.call(arguments)))}}},function(t,e){t.exports=function(t,e,i){return t.on(e,i),{destroy:function(){t.removeListener(e,i)}}}},function(t,e,i){var r=i(9),n=i(3),s=i(31),o=i(13),a=i(12),l=i(1)("socket.io-client:socket"),c=i(5),h=i(17);t.exports=p;var u={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},f=n.prototype.emit;function p(t,e,i){this.io=t,this.nsp=e,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},i&&i.query&&(this.query=i.query),this.io.autoConnect&&this.open()}n(p.prototype),p.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[o(t,"open",a(this,"onopen")),o(t,"packet",a(this,"onpacket")),o(t,"close",a(this,"onclose"))]}},p.prototype.open=p.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},p.prototype.send=function(){var t=s(arguments);return t.unshift("message"),this.emit.apply(this,t),this},p.prototype.emit=function(t){if(u.hasOwnProperty(t))return f.apply(this,arguments),this;var e=s(arguments),i={type:(void 0!==this.flags.binary?this.flags.binary:h(e))?r.BINARY_EVENT:r.EVENT,data:e,options:{}};return i.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(l("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),i.id=this.ids++),this.connected?this.packet(i):this.sendBuffer.push(i),this.flags={},this},p.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},p.prototype.onopen=function(){if(l("transport is open - connecting"),"/"!==this.nsp)if(this.query){var t="object"==typeof this.query?c.encode(this.query):this.query;l("sending connect packet with query %s",t),this.packet({type:r.CONNECT,query:t})}else this.packet({type:r.CONNECT})},p.prototype.onclose=function(t){l("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},p.prototype.onpacket=function(t){if(t.nsp===this.nsp)switch(t.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(t);break;case r.ACK:case r.BINARY_ACK:this.onack(t);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",t.data)}},p.prototype.onevent=function(t){var e=t.data||[];l("emitting event %j",e),null!=t.id&&(l("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?f.apply(this,e):this.receiveBuffer.push(e)},p.prototype.ack=function(t){var e=this,i=!1;return function(){if(!i){i=!0;var n=s(arguments);l("sending ack %j",n),e.packet({type:h(n)?r.BINARY_ACK:r.ACK,id:t,data:n})}}},p.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(l("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):l("bad ack %s",t.id)},p.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},p.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)f.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},p.prototype.ondisconnect=function(){l("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},p.prototype.destroy=function(){if(this.subs){for(var t=0;t<this.subs.length;t++)this.subs[t].destroy();this.subs=null}this.io.destroy(this)},p.prototype.close=p.prototype.disconnect=function(){return this.connected&&(l("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},p.prototype.compress=function(t){return this.flags.compress=t,this},p.prototype.binary=function(t){return this.flags.binary=t,this}},function(t,e){var i=[].indexOf;t.exports=function(t,e){if(i)return t.indexOf(e);for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}},function(t,e,i){"use strict";var r,n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),s=64,o={},a=0,l=0;function c(t){var e="";do{e=n[t%s]+e,t=Math.floor(t/s)}while(t>0);return e}function h(){var t=c(+new Date);return t!==r?(a=0,r=t):t+"."+c(a++)}for(;l<s;l++)o[n[l]]=l;h.encode=c,h.decode=function(t){var e=0;for(l=0;l<t.length;l++)e=e*s+o[t.charAt(l)];return e},t.exports=h},function(t,e,i){(function(e){var r=i(8),n=Object.prototype.toString,s="function"==typeof e.Blob||"[object BlobConstructor]"===n.call(e.Blob),o="function"==typeof e.File||"[object FileConstructor]"===n.call(e.File);t.exports=function t(i){if(!i||"object"!=typeof i)return!1;if(r(i)){for(var n=0,a=i.length;n<a;n++)if(t(i[n]))return!0;return!1}if("function"==typeof e.Buffer&&e.Buffer.isBuffer&&e.Buffer.isBuffer(i)||"function"==typeof e.ArrayBuffer&&i instanceof ArrayBuffer||s&&i instanceof Blob||o&&i instanceof File)return!0;if(i.toJSON&&"function"==typeof i.toJSON&&1===arguments.length)return t(i.toJSON(),!0);for(var l in i)if(Object.prototype.hasOwnProperty.call(i,l)&&t(i[l]))return!0;return!1}}).call(this,i(0))},function(t,e,i){var r=i(6),n=i(5),s=i(2),o=i(4),a=i(16),l=i(1)("engine.io-client:polling");t.exports=h;var c=null!=new(i(7))({xdomain:!1}).responseType;function h(t){var e=t&&t.forceBase64;c&&!e||(this.supportsBinary=!1),r.call(this,t)}o(h,r),h.prototype.name="polling",h.prototype.doOpen=function(){this.poll()},h.prototype.pause=function(t){var e=this;function i(){l("paused"),e.readyState="paused",t()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(l("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){l("pre-pause polling complete"),--r||i()})),this.writable||(l("we are currently writing - waiting to pause"),r++,this.once("drain",function(){l("pre-pause writing complete"),--r||i()}))}else i()},h.prototype.poll=function(){l("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},h.prototype.onData=function(t){var e=this;l("polling got data %s",t),s.decodePayload(t,this.socket.binaryType,function(t,i,r){if("opening"===e.readyState&&e.onOpen(),"close"===t.type)return e.onClose(),!1;e.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():l('ignoring poll - transport state "%s"',this.readyState))},h.prototype.doClose=function(){var t=this;function e(){l("writing close packet"),t.write([{type:"close"}])}"open"===this.readyState?(l("transport open - closing"),e()):(l("transport not open - deferring close"),this.once("open",e))},h.prototype.write=function(t){var e=this;this.writable=!1;var i=function(){e.writable=!0,e.emit("drain")};s.encodePayload(t,this.supportsBinary,function(t){e.doWrite(t,i)})},h.prototype.uri=function(){var t=this.query||{},e=this.secure?"https":"http",i="";return!1!==this.timestampRequests&&(t[this.timestampParam]=a()),this.supportsBinary||t.sid||(t.b64=1),t=n.encode(t),this.port&&("https"===e&&443!==Number(this.port)||"http"===e&&80!==Number(this.port))&&(i=":"+this.port),t.length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+i+this.path+t}},function(t,e,i){(function(t){var r=i(7),n=i(42),s=i(34),o=i(33);e.polling=function(e){var i=!1,o=!1,a=!1!==e.jsonp;if(t.location){var l="https:"===location.protocol,c=location.port;c||(c=l?443:80),i=e.hostname!==location.hostname||c!==e.port,o=e.secure!==l}if(e.xdomain=i,e.xscheme=o,"open"in new r(e)&&!e.forceJSONP)return new n(e);if(!a)throw new Error("JSONP disabled");return new s(e)},e.websocket=o}).call(this,i(0))},function(t,e,i){var r=i(45),n=i(14),s=i(3),o=i(9),a=i(13),l=i(12),c=i(1)("socket.io-client:manager"),h=i(15),u=i(30),f=Object.prototype.hasOwnProperty;function p(t,e){if(!(this instanceof p))return new p(t,e);t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new u({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var i=e.parser||o;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this.autoConnect=!1!==e.autoConnect,this.autoConnect&&this.open()}t.exports=p,p.prototype.emitAll=function(){for(var t in this.emit.apply(this,arguments),this.nsps)f.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},p.prototype.updateSocketIds=function(){for(var t in this.nsps)f.call(this.nsps,t)&&(this.nsps[t].id=this.generateId(t))},p.prototype.generateId=function(t){return("/"===t?"":t+"#")+this.engine.id},s(p.prototype),p.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},p.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},p.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},p.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},p.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},p.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},p.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},p.prototype.open=p.prototype.connect=function(t,e){if(c("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;c("opening %s",this.uri),this.engine=r(this.uri,this.opts);var i=this.engine,n=this;this.readyState="opening",this.skipReconnect=!1;var s=a(i,"open",function(){n.onopen(),t&&t()}),o=a(i,"error",function(e){if(c("connect_error"),n.cleanup(),n.readyState="closed",n.emitAll("connect_error",e),t){var i=new Error("Connection error");i.data=e,t(i)}else n.maybeReconnectOnOpen()});if(!1!==this._timeout){var l=this._timeout;c("connect attempt will timeout after %d",l);var h=setTimeout(function(){c("connect attempt timed out after %d",l),s.destroy(),i.close(),i.emit("error","timeout"),n.emitAll("connect_timeout",l)},l);this.subs.push({destroy:function(){clearTimeout(h)}})}return this.subs.push(s),this.subs.push(o),this},p.prototype.onopen=function(){c("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(a(t,"data",l(this,"ondata"))),this.subs.push(a(t,"ping",l(this,"onping"))),this.subs.push(a(t,"pong",l(this,"onpong"))),this.subs.push(a(t,"error",l(this,"onerror"))),this.subs.push(a(t,"close",l(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",l(this,"ondecoded")))},p.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},p.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},p.prototype.ondata=function(t){this.decoder.add(t)},p.prototype.ondecoded=function(t){this.emit("packet",t)},p.prototype.onerror=function(t){c("error",t),this.emitAll("error",t)},p.prototype.socket=function(t,e){var i=this.nsps[t];if(!i){i=new n(this,t,e),this.nsps[t]=i;var r=this;i.on("connecting",s),i.on("connect",function(){i.id=r.generateId(t)}),this.autoConnect&&s()}function s(){~h(r.connecting,i)||r.connecting.push(i)}return i},p.prototype.destroy=function(t){var e=h(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},p.prototype.packet=function(t){c("writing packet %j",t);var e=this;t.query&&0===t.type&&(t.nsp+="?"+t.query),e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,function(i){for(var r=0;r<i.length;r++)e.engine.write(i[r],t.options);e.encoding=!1,e.processPacketQueue()}))},p.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},p.prototype.cleanup=function(){c("cleanup");for(var t=this.subs.length,e=0;e<t;e++)this.subs.shift().destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},p.prototype.close=p.prototype.disconnect=function(){c("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},p.prototype.onclose=function(t){c("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},p.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)c("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();c("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var i=setTimeout(function(){t.skipReconnect||(c("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(c("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(c("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(i)}})}},p.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},function(t,e,i){(function(e){t.exports=function(t){return i&&e.Buffer.isBuffer(t)||r&&(t instanceof e.ArrayBuffer||n(t))};var i="function"==typeof e.Buffer&&"function"==typeof e.Buffer.isBuffer,r="function"==typeof e.ArrayBuffer,n=r&&"function"==typeof e.ArrayBuffer.isView?e.ArrayBuffer.isView:function(t){return t.buffer instanceof e.ArrayBuffer}}).call(this,i(0))},function(t,e){var i=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var e=t,n=t.indexOf("["),s=t.indexOf("]");-1!=n&&-1!=s&&(t=t.substring(0,n)+t.substring(n,s).replace(/:/g,";")+t.substring(s,t.length));for(var o=i.exec(t||""),a={},l=14;l--;)a[r[l]]=o[l]||"";return-1!=n&&-1!=s&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},function(t,e){t.exports={prefix:"fas",iconName:"cog",icon:[512,512,[],"f013","M444.788 291.1l42.616 24.599c4.867 2.809 7.126 8.618 5.459 13.985-11.07 35.642-29.97 67.842-54.689 94.586a12.016 12.016 0 0 1-14.832 2.254l-42.584-24.595a191.577 191.577 0 0 1-60.759 35.13v49.182a12.01 12.01 0 0 1-9.377 11.718c-34.956 7.85-72.499 8.256-109.219.007-5.49-1.233-9.403-6.096-9.403-11.723v-49.184a191.555 191.555 0 0 1-60.759-35.13l-42.584 24.595a12.016 12.016 0 0 1-14.832-2.254c-24.718-26.744-43.619-58.944-54.689-94.586-1.667-5.366.592-11.175 5.459-13.985L67.212 291.1a193.48 193.48 0 0 1 0-70.199l-42.616-24.599c-4.867-2.809-7.126-8.618-5.459-13.985 11.07-35.642 29.97-67.842 54.689-94.586a12.016 12.016 0 0 1 14.832-2.254l42.584 24.595a191.577 191.577 0 0 1 60.759-35.13V25.759a12.01 12.01 0 0 1 9.377-11.718c34.956-7.85 72.499-8.256 109.219-.007 5.49 1.233 9.403 6.096 9.403 11.723v49.184a191.555 191.555 0 0 1 60.759 35.13l42.584-24.595a12.016 12.016 0 0 1 14.832 2.254c24.718 26.744 43.619 58.944 54.689 94.586 1.667 5.366-.592 11.175-5.459 13.985L444.788 220.9a193.485 193.485 0 0 1 0 70.2zM336 256c0-44.112-35.888-80-80-80s-80 35.888-80 80 35.888 80 80 80 80-35.888 80-80z"]}},function(t,e){t.exports={prefix:"fas",iconName:"key",icon:[512,512,[],"f084","M512 176.001C512 273.203 433.202 352 336 352c-11.22 0-22.19-1.062-32.827-3.069l-24.012 27.014A23.999 23.999 0 0 1 261.223 384H224v40c0 13.255-10.745 24-24 24h-40v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24v-78.059c0-6.365 2.529-12.47 7.029-16.971l161.802-161.802C163.108 213.814 160 195.271 160 176 160 78.798 238.797.001 335.999 0 433.488-.001 512 78.511 512 176.001zM336 128c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48-48 21.49-48 48z"]}},function(t,e){t.exports={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"]}},function(t,e){t.exports={prefix:"fas",iconName:"clipboard",icon:[384,512,[],"f328","M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z"]}},function(t,e){t.exports={prefix:"fas",iconName:"bars",icon:[448,512,[],"f0c9","M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"]}},function(t,e,i){var r;t.exports=function t(e,i,n){function s(a,l){if(!i[a]){if(!e[a]){if(!l&&("function"==typeof r&&r))return r(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var h=i[a]={exports:{}};e[a][0].call(h.exports,function(t){return s(e[a][1][t]||t)},h,h.exports,t,e,i,n)}return i[a].exports}for(var o="function"==typeof r&&r,a=0;a<n.length;a++)s(n[a]);return s}({1:[function(t,e,i){"use strict";function r(t){if(!t.element.parentElement)return null;var e=window.getComputedStyle(t.element.parentElement),i=parseInt(e.getPropertyValue("height")),r=Math.max(0,parseInt(e.getPropertyValue("width"))),n=window.getComputedStyle(t.element),s=i-(parseInt(n.getPropertyValue("padding-top"))+parseInt(n.getPropertyValue("padding-bottom"))),o=r-(parseInt(n.getPropertyValue("padding-right"))+parseInt(n.getPropertyValue("padding-left")))-t.viewport.scrollBarWidth;return{cols:Math.floor(o/t.renderer.dimensions.actualCellWidth),rows:Math.floor(s/t.renderer.dimensions.actualCellHeight)}}function n(t){var e=r(t);e&&(t.rows===e.rows&&t.cols===e.cols||(t.renderer.clear(),t.resize(e.cols,e.rows)))}Object.defineProperty(i,"__esModule",{value:!0}),i.proposeGeometry=r,i.fit=n,i.apply=function(t){t.prototype.proposeGeometry=function(){return r(this)},t.prototype.fit=function(){n(this)}}},{}]},{},[1])(1)},function(t,e,i){"use strict";i.r(e);var r=i(11),n=i(10),s=i(28),o=function(){},a={},l={},c=null,h={mark:o,measure:o};try{"undefined"!=typeof window&&(a=window),"undefined"!=typeof document&&(l=document),"undefined"!=typeof MutationObserver&&(c=MutationObserver),"undefined"!=typeof performance&&(h=performance)}catch(t){}var u=(a.navigator||{}).userAgent,f=void 0===u?"":u,p=a,d=l,_=c,m=h,y=!!p.document,g=!!d.documentElement&&!!d.head&&"function"==typeof d.addEventListener&&"function"==typeof d.createElement,v=~f.indexOf("MSIE")||~f.indexOf("Trident/"),b=16,C="data-fa-i2svg",w="data-fa-pseudo-element",k="fontawesome-i2svg",A=function(){try{return!0}catch(t){return!1}}(),x=[1,2,3,4,5,6,7,8,9,10],S=x.concat([11,12,13,14,15,16,17,18,19,20]),E=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],L=["xs","sm","lg","fw","ul","li","border","pull-left","pull-right","spin","pulse","rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","stack","stack-1x","stack-2x","inverse","layers","layers-text","layers-counter"].concat(x.map(function(t){return t+"x"})).concat(S.map(function(t){return"w-"+t})),M=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},R=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),T=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},B=function(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)},O=p.FontAwesomeConfig||{},D=Object.keys(O),P=T({familyPrefix:"fa",replacementClass:"svg-inline--fa",autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0},O);P.autoReplaceSvg||(P.observeMutations=!1);var H=T({},P);function I(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).asNewDefault,i=void 0!==e&&e,r=Object.keys(H),n=i?function(t){return~r.indexOf(t)&&!~D.indexOf(t)}:function(t){return~r.indexOf(t)};Object.keys(t).forEach(function(e){n(e)&&(H[e]=t[e])})}p.FontAwesomeConfig=H;var N=p||{};N.___FONT_AWESOME___||(N.___FONT_AWESOME___={}),N.___FONT_AWESOME___.styles||(N.___FONT_AWESOME___.styles={}),N.___FONT_AWESOME___.hooks||(N.___FONT_AWESOME___.hooks={}),N.___FONT_AWESOME___.shims||(N.___FONT_AWESOME___.shims=[]);var F=N.___FONT_AWESOME___,j=[],W=!1;g&&((W=(d.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(d.readyState))||d.addEventListener("DOMContentLoaded",function t(){d.removeEventListener("DOMContentLoaded",t),W=1,j.map(function(t){return t()})}));var z=b,U={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function q(t){if(t&&g){var e=d.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=t;for(var i=d.head.childNodes,r=null,n=i.length-1;n>-1;n--){var s=i[n],o=(s.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(r=s)}return d.head.insertBefore(e,r),t}}var X=0;function V(){return++X}function K(t){for(var e=[],i=(t||[]).length>>>0;i--;)e[i]=t[i];return e}function G(t){return t.classList?K(t.classList):(t.getAttribute("class")||"").split(" ").filter(function(t){return t})}function Y(t){return(""+t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Z(t){return Object.keys(t||{}).reduce(function(e,i){return e+(i+": ")+t[i]+";"},"")}function J(t){return t.size!==U.size||t.x!==U.x||t.y!==U.y||t.rotate!==U.rotate||t.flipX||t.flipY}function Q(t){var e=t.transform,i=t.containerWidth,r=t.iconWidth;return{outer:{transform:"translate("+i/2+" 256)"},inner:{transform:"translate("+32*e.x+", "+32*e.y+") scale("+e.size/16*(e.flipX?-1:1)+", "+e.size/16*(e.flipY?-1:1)+") rotate("+e.rotate+" 0 0)"},path:{transform:"translate("+r/2*-1+" -256)"}}}var $={x:0,y:0,width:"100%",height:"100%"},tt=function(t){var e=t.children,i=t.attributes,r=t.main,n=t.mask,s=t.transform,o=r.width,a=r.icon,l=n.width,c=n.icon,h=Q({transform:s,containerWidth:l,iconWidth:o}),u={tag:"rect",attributes:T({},$,{fill:"white"})},f={tag:"g",attributes:T({},h.inner),children:[{tag:"path",attributes:T({},a.attributes,h.path,{fill:"black"})}]},p={tag:"g",attributes:T({},h.outer),children:[f]},d="mask-"+V(),_="clip-"+V(),m={tag:"defs",children:[{tag:"clipPath",attributes:{id:_},children:[c]},{tag:"mask",attributes:T({},$,{id:d,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[u,p]}]};return e.push(m,{tag:"rect",attributes:T({fill:"currentColor","clip-path":"url(#"+_+")",mask:"url(#"+d+")"},$)}),{children:e,attributes:i}},et=function(t){var e=t.children,i=t.attributes,r=t.main,n=t.transform,s=Z(t.styles);if(s.length>0&&(i.style=s),J(n)){var o=Q({transform:n,containerWidth:r.width,iconWidth:r.width});e.push({tag:"g",attributes:T({},o.outer),children:[{tag:"g",attributes:T({},o.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:T({},r.icon.attributes,o.path)}]}]})}else e.push(r.icon);return{children:e,attributes:i}},it=function(t){var e=t.children,i=t.main,r=t.mask,n=t.attributes,s=t.styles,o=t.transform;if(J(o)&&i.found&&!r.found){var a={x:i.width/i.height/2,y:.5};n.style=Z(T({},s,{"transform-origin":a.x+o.x/16+"em "+(a.y+o.y/16)+"em"}))}return[{tag:"svg",attributes:n,children:e}]},rt=function(t){var e=t.prefix,i=t.iconName,r=t.children,n=t.attributes,s=t.symbol,o=!0===s?e+"-"+H.familyPrefix+"-"+i:s;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:T({},n,{id:o}),children:r}]}]};function nt(t){var e=t.icons,i=e.main,r=e.mask,n=t.prefix,s=t.iconName,o=t.transform,a=t.symbol,l=t.title,c=t.extra,h=t.watchable,u=void 0!==h&&h,f=r.found?r:i,p=f.width,d=f.height,_="fa-w-"+Math.ceil(p/d*16),m=[H.replacementClass,s?H.familyPrefix+"-"+s:"",_].concat(c.classes).join(" "),y={children:[],attributes:T({},c.attributes,{"data-prefix":n,"data-icon":s,class:m,role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 "+p+" "+d})};u&&(y.attributes[C]=""),l&&y.children.push({tag:"title",attributes:{id:y.attributes["aria-labelledby"]||"title-"+V()},children:[l]});var g=T({},y,{prefix:n,iconName:s,main:i,mask:r,transform:o,symbol:a,styles:c.styles}),v=r.found&&i.found?tt(g):et(g),b=v.children,w=v.attributes;return g.children=b,g.attributes=w,a?rt(g):it(g)}function st(t){var e=t.content,i=t.width,r=t.height,n=t.transform,s=t.title,o=t.extra,a=t.watchable,l=void 0!==a&&a,c=T({},o.attributes,s?{title:s}:{},{class:o.classes.join(" ")});l&&(c[C]="");var h=T({},o.styles);J(n)&&(h.transform=function(t){var e=t.transform,i=t.width,r=void 0===i?b:i,n=t.height,s=void 0===n?b:n,o=t.startCentered,a=void 0!==o&&o,l="";return l+=a&&v?"translate("+(e.x/z-r/2)+"em, "+(e.y/z-s/2)+"em) ":a?"translate(calc(-50% + "+e.x/z+"em), calc(-50% + "+e.y/z+"em)) ":"translate("+e.x/z+"em, "+e.y/z+"em) ",(l+="scale("+e.size/z*(e.flipX?-1:1)+", "+e.size/z*(e.flipY?-1:1)+") ")+"rotate("+e.rotate+"deg) "}({transform:n,startCentered:!0,width:i,height:r}),h["-webkit-transform"]=h.transform);var u=Z(h);u.length>0&&(c.style=u);var f=[];return f.push({tag:"span",attributes:c,children:[e]}),s&&f.push({tag:"span",attributes:{class:"sr-only"},children:[s]}),f}var ot=function(){},at=H.measurePerformance&&m&&m.mark&&m.measure?m:{mark:ot,measure:ot},lt='FA "5.0.13"',ct=function(t){at.mark(lt+" "+t+" ends"),at.measure(lt+" "+t,lt+" "+t+" begins",lt+" "+t+" ends")},ht={begin:function(t){return at.mark(lt+" "+t+" begins"),function(){return ct(t)}},end:ct},ut=function(t,e,i,r){var n,s,o,a=Object.keys(t),l=a.length,c=void 0!==r?function(t,e){return function(i,r,n,s){return t.call(e,i,r,n,s)}}(e,r):e;for(void 0===i?(n=1,o=t[a[0]]):(n=0,o=i);n<l;n++)o=c(o,t[s=a[n]],s,t);return o},ft=F.styles,pt=F.shims,dt={},_t={},mt={},yt=function(){var t=function(t){return ut(ft,function(e,i,r){return e[r]=ut(i,t,{}),e},{})};dt=t(function(t,e,i){return t[e[3]]=i,t}),_t=t(function(t,e,i){var r=e[2];return t[i]=i,r.forEach(function(e){t[e]=i}),t});var e="far"in ft;mt=ut(pt,function(t,i){var r=i[0],n=i[1],s=i[2];return"far"!==n||e||(n="fas"),t[r]={prefix:n,iconName:s},t},{})};yt();var gt=F.styles,vt=function(){return{prefix:null,iconName:null,rest:[]}};function bt(t){return t.reduce(function(t,e){var i=function(t,e){var i,r=e.split("-"),n=r[0],s=r.slice(1).join("-");return n!==t||""===s||(i=s,~L.indexOf(i))?null:s}(H.familyPrefix,e);if(gt[e])t.prefix=e;else if(i){var r="fa"===t.prefix?mt[i]||{prefix:null,iconName:null}:{};t.iconName=r.iconName||i,t.prefix=r.prefix||t.prefix}else e!==H.replacementClass&&0!==e.indexOf("fa-w-")&&t.rest.push(e);return t},vt())}function Ct(t,e,i){if(t&&t[e]&&t[e][i])return{prefix:e,iconName:i,icon:t[e][i]}}function wt(t){var e=t.tag,i=t.attributes,r=void 0===i?{}:i,n=t.children,s=void 0===n?[]:n;return"string"==typeof t?Y(t):"<"+e+" "+function(t){return Object.keys(t||{}).reduce(function(e,i){return e+(i+'="')+Y(t[i])+'" '},"").trim()}(r)+">"+s.map(wt).join("")+"</"+e+">"}var kt=function(){};function At(t){return"string"==typeof(t.getAttribute?t.getAttribute(C):null)}var xt={replace:function(t){var e=t[0],i=t[1].map(function(t){return wt(t)}).join("\n");if(e.parentNode&&e.outerHTML)e.outerHTML=i+(H.keepOriginalSource&&"svg"!==e.tagName.toLowerCase()?"\x3c!-- "+e.outerHTML+" --\x3e":"");else if(e.parentNode){var r=document.createElement("span");e.parentNode.replaceChild(r,e),r.outerHTML=i}},nest:function(t){var e=t[0],i=t[1];if(~G(e).indexOf(H.replacementClass))return xt.replace(t);var r=new RegExp(H.familyPrefix+"-.*");delete i[0].attributes.style;var n=i[0].attributes.class.split(" ").reduce(function(t,e){return e===H.replacementClass||e.match(r)?t.toSvg.push(e):t.toNode.push(e),t},{toNode:[],toSvg:[]});i[0].attributes.class=n.toSvg.join(" ");var s=i.map(function(t){return wt(t)}).join("\n");e.setAttribute("class",n.toNode.join(" ")),e.setAttribute(C,""),e.innerHTML=s}};function St(t,e){var i="function"==typeof e?e:kt;0===t.length?i():(p.requestAnimationFrame||function(t){return t()})(function(){var e=!0===H.autoReplaceSvg?xt.replace:xt[H.autoReplaceSvg]||xt.replace,r=ht.begin("mutate");t.map(e),r(),i()})}var Et=!1,Lt=null,Mt=function(t){var e=t.getAttribute("style"),i=[];return e&&(i=e.split(";").reduce(function(t,e){var i=e.split(":"),r=i[0],n=i.slice(1);return r&&n.length>0&&(t[r]=n.join(":").trim()),t},{})),i},Rt=function(t){var e,i,r=t.getAttribute("data-prefix"),n=t.getAttribute("data-icon"),s=void 0!==t.innerText?t.innerText.trim():"",o=bt(G(t));return r&&n&&(o.prefix=r,o.iconName=n),o.prefix&&s.length>1?o.iconName=(e=o.prefix,i=t.innerText,_t[e][i]):o.prefix&&1===s.length&&(o.iconName=function(t,e){return dt[t][e]}(o.prefix,function(t){for(var e="",i=0;i<t.length;i++)e+=("000"+t.charCodeAt(i).toString(16)).slice(-4);return e}(t.innerText))),o},Tt=function(t){var e={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t?t.toLowerCase().split(" ").reduce(function(t,e){var i=e.toLowerCase().split("-"),r=i[0],n=i.slice(1).join("-");if(r&&"h"===n)return t.flipX=!0,t;if(r&&"v"===n)return t.flipY=!0,t;if(n=parseFloat(n),isNaN(n))return t;switch(r){case"grow":t.size=t.size+n;break;case"shrink":t.size=t.size-n;break;case"left":t.x=t.x-n;break;case"right":t.x=t.x+n;break;case"up":t.y=t.y-n;break;case"down":t.y=t.y+n;break;case"rotate":t.rotate=t.rotate+n}return t},e):e},Bt=function(t){return Tt(t.getAttribute("data-fa-transform"))},Ot=function(t){var e=t.getAttribute("data-fa-symbol");return null!==e&&(""===e||e)},Dt=function(t){var e=K(t.attributes).reduce(function(t,e){return"class"!==t.name&&"style"!==t.name&&(t[e.name]=e.value),t},{}),i=t.getAttribute("title");return H.autoA11y&&(i?e["aria-labelledby"]=H.replacementClass+"-title-"+V():e["aria-hidden"]="true"),e},Pt=function(t){var e=t.getAttribute("data-fa-mask");return e?bt(e.split(" ").map(function(t){return t.trim()})):vt()};function Ht(t){this.name="MissingIcon",this.message=t||"Icon unavailable",this.stack=(new Error).stack}Ht.prototype=Object.create(Error.prototype),Ht.prototype.constructor=Ht;var It={fill:"currentColor"},Nt={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},Ft={tag:"path",attributes:T({},It,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})},jt=T({},Nt,{attributeName:"opacity"}),Wt={tag:"g",children:[Ft,{tag:"circle",attributes:T({},It,{cx:"256",cy:"364",r:"28"}),children:[{tag:"animate",attributes:T({},Nt,{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:T({},jt,{values:"1;0;1;1;0;1;"})}]},{tag:"path",attributes:T({},It,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:[{tag:"animate",attributes:T({},jt,{values:"1;0;0;0;0;1;"})}]},{tag:"path",attributes:T({},It,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:T({},jt,{values:"0;0;1;1;0;0;"})}]}]},zt=F.styles,Ut="fa-layers-text",qt=/Font Awesome 5 (Solid|Regular|Light|Brands)/,Xt={Solid:"fas",Regular:"far",Light:"fal",Brands:"fab"};function Vt(t,e){var i={found:!1,width:512,height:512,icon:Wt};if(t&&e&&zt[e]&&zt[e][t]){var r=zt[e][t];i={found:!0,width:r[0],height:r[1],icon:{tag:"path",attributes:{fill:"currentColor",d:r.slice(4)[0]}}}}else if(t&&e&&!H.showMissingIcons)throw new Ht("Icon is missing for prefix "+e+" with icon name "+t);return i}function Kt(t){var e=function(t){var e=Rt(t),i=e.iconName,r=e.prefix,n=e.rest,s=Mt(t),o=Bt(t),a=Ot(t),l=Dt(t),c=Pt(t);return{iconName:i,title:t.getAttribute("title"),prefix:r,transform:o,symbol:a,mask:c,extra:{classes:n,styles:s,attributes:l}}}(t);return~e.extra.classes.indexOf(Ut)?function(t,e){var i=e.title,r=e.transform,n=e.extra,s=null,o=null;if(v){var a=parseInt(getComputedStyle(t).fontSize,10),l=t.getBoundingClientRect();s=l.width/a,o=l.height/a}return H.autoA11y&&!i&&(n.attributes["aria-hidden"]="true"),[t,st({content:t.innerHTML,width:s,height:o,transform:r,title:i,extra:n,watchable:!0})]}(t,e):function(t,e){var i=e.iconName,r=e.title,n=e.prefix,s=e.transform,o=e.symbol,a=e.mask,l=e.extra;return[t,nt({icons:{main:Vt(i,n),mask:Vt(a.iconName,a.prefix)},prefix:n,iconName:i,transform:s,symbol:o,mask:a,title:r,extra:l,watchable:!0})]}(t,e)}function Gt(t){"function"==typeof t.remove?t.remove():t&&t.parentNode&&t.parentNode.removeChild(t)}function Yt(t){if(g){var e=ht.begin("searchPseudoElements");Et=!0,K(t.querySelectorAll("*")).forEach(function(t){[":before",":after"].forEach(function(e){var i=p.getComputedStyle(t,e),r=i.getPropertyValue("font-family").match(qt),n=K(t.children).filter(function(t){return t.getAttribute(w)===e})[0];if(n&&(n.nextSibling&&n.nextSibling.textContent.indexOf(w)>-1&&Gt(n.nextSibling),Gt(n),n=null),r&&!n){var s=i.getPropertyValue("content"),o=d.createElement("i");o.setAttribute("class",""+Xt[r[1]]),o.setAttribute(w,e),o.innerText=3===s.length?s.substr(1,1):s,":before"===e?t.insertBefore(o,t.firstChild):t.appendChild(o)}})}),Et=!1,e()}}function Zt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(g){var i=d.documentElement.classList,r=function(t){return i.add(k+"-"+t)},n=function(t){return i.remove(k+"-"+t)},s=Object.keys(zt),o=["."+Ut+":not(["+C+"])"].concat(s.map(function(t){return"."+t+":not(["+C+"])"})).join(", ");if(0!==o.length){var a=K(t.querySelectorAll(o));if(a.length>0){r("pending"),n("complete");var l=ht.begin("onTree"),c=a.reduce(function(t,e){try{var i=Kt(e);i&&t.push(i)}catch(t){A||t instanceof Ht&&console.error(t)}return t},[]);l(),St(c,function(){r("active"),r("complete"),n("pending"),"function"==typeof e&&e()})}}}}function Jt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=Kt(t);i&&St([i],e)}var Qt=function(){var t="svg-inline--fa",e=H.familyPrefix,i=H.replacementClass,r='svg:not(:root).svg-inline--fa {\n overflow: visible; }\n\n.svg-inline--fa {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -.125em; }\n .svg-inline--fa.fa-lg {\n vertical-align: -.225em; }\n .svg-inline--fa.fa-w-1 {\n width: 0.0625em; }\n .svg-inline--fa.fa-w-2 {\n width: 0.125em; }\n .svg-inline--fa.fa-w-3 {\n width: 0.1875em; }\n .svg-inline--fa.fa-w-4 {\n width: 0.25em; }\n .svg-inline--fa.fa-w-5 {\n width: 0.3125em; }\n .svg-inline--fa.fa-w-6 {\n width: 0.375em; }\n .svg-inline--fa.fa-w-7 {\n width: 0.4375em; }\n .svg-inline--fa.fa-w-8 {\n width: 0.5em; }\n .svg-inline--fa.fa-w-9 {\n width: 0.5625em; }\n .svg-inline--fa.fa-w-10 {\n width: 0.625em; }\n .svg-inline--fa.fa-w-11 {\n width: 0.6875em; }\n .svg-inline--fa.fa-w-12 {\n width: 0.75em; }\n .svg-inline--fa.fa-w-13 {\n width: 0.8125em; }\n .svg-inline--fa.fa-w-14 {\n width: 0.875em; }\n .svg-inline--fa.fa-w-15 {\n width: 0.9375em; }\n .svg-inline--fa.fa-w-16 {\n width: 1em; }\n .svg-inline--fa.fa-w-17 {\n width: 1.0625em; }\n .svg-inline--fa.fa-w-18 {\n width: 1.125em; }\n .svg-inline--fa.fa-w-19 {\n width: 1.1875em; }\n .svg-inline--fa.fa-w-20 {\n width: 1.25em; }\n .svg-inline--fa.fa-pull-left {\n margin-right: .3em;\n width: auto; }\n .svg-inline--fa.fa-pull-right {\n margin-left: .3em;\n width: auto; }\n .svg-inline--fa.fa-border {\n height: 1.5em; }\n .svg-inline--fa.fa-li {\n width: 2em; }\n .svg-inline--fa.fa-fw {\n width: 1.25em; }\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -.125em;\n width: 1em; }\n .fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa-layers-text, .fa-layers-counter {\n display: inline-block;\n position: absolute;\n text-align: center; }\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: .25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right; }\n\n.fa-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left; }\n\n.fa-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left; }\n\n.fa-lg {\n font-size: 1.33333em;\n line-height: 0.75em;\n vertical-align: -.0667em; }\n\n.fa-xs {\n font-size: .75em; }\n\n.fa-sm {\n font-size: .875em; }\n\n.fa-1x {\n font-size: 1em; }\n\n.fa-2x {\n font-size: 2em; }\n\n.fa-3x {\n font-size: 3em; }\n\n.fa-4x {\n font-size: 4em; }\n\n.fa-5x {\n font-size: 5em; }\n\n.fa-6x {\n font-size: 6em; }\n\n.fa-7x {\n font-size: 7em; }\n\n.fa-8x {\n font-size: 8em; }\n\n.fa-9x {\n font-size: 9em; }\n\n.fa-10x {\n font-size: 10em; }\n\n.fa-fw {\n text-align: center;\n width: 1.25em; }\n\n.fa-ul {\n list-style-type: none;\n margin-left: 2.5em;\n padding-left: 0; }\n .fa-ul > li {\n position: relative; }\n\n.fa-li {\n left: -2em;\n position: absolute;\n text-align: center;\n width: 2em;\n line-height: inherit; }\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: .1em;\n padding: .2em .25em .15em; }\n\n.fa-pull-left {\n float: left; }\n\n.fa-pull-right {\n float: right; }\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: .3em; }\n\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: .3em; }\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear; }\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8); }\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n.fa-rotate-90 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg); }\n\n.fa-rotate-180 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg); }\n\n.fa-rotate-270 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg); }\n\n.fa-flip-horizontal {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1); }\n\n.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1); }\n\n.fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1); }\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical {\n -webkit-filter: none;\n filter: none; }\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2em; }\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1em; }\n\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2em; }\n\n.fa-inverse {\n color: #fff; }\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px; }\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto; }\n';if("fa"!==e||i!==t){var n=new RegExp("\\.fa\\-","g"),s=new RegExp("\\."+t,"g");r=r.replace(n,"."+e+"-").replace(s,"."+i)}return r};function $t(t){return{found:!0,width:t[0],height:t[1],icon:{tag:"path",attributes:{fill:"currentColor",d:t.slice(4)[0]}}}}var te=!1;function ee(){H.autoAddCss&&(te||q(Qt()),te=!0)}function ie(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map(function(t){return wt(t)})}}),Object.defineProperty(t,"node",{get:function(){if(g){var e=d.createElement("div");return e.innerHTML=t.html,e.children}}}),t}function re(t){var e=t.prefix,i=void 0===e?"fa":e,r=t.iconName;if(r)return Ct(se.definitions,i,r)||Ct(F.styles,i,r)}var ne,se=new(function(){function t(){M(this,t),this.definitions={}}return R(t,[{key:"add",value:function(){for(var t=this,e=arguments.length,i=Array(e),r=0;r<e;r++)i[r]=arguments[r];var n=i.reduce(this._pullDefinitions,{});Object.keys(n).forEach(function(e){t.definitions[e]=T({},t.definitions[e]||{},n[e]),function t(e,i){var r=Object.keys(i).reduce(function(t,e){var r=i[e];return r.icon?t[r.iconName]=r.icon:t[e]=r,t},{});"function"==typeof F.hooks.addPack?F.hooks.addPack(e,r):F.styles[e]=T({},F.styles[e]||{},r),"fas"===e&&t("fa",i)}(e,n[e])})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(t,e){var i=e.prefix&&e.iconName&&e.icon?{0:e}:e;return Object.keys(i).map(function(e){var r=i[e],n=r.prefix,s=r.iconName,o=r.icon;t[n]||(t[n]={}),t[n][s]=o}),t}}]),t}()),oe=(ne=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.transform,r=void 0===i?U:i,n=e.symbol,s=void 0!==n&&n,o=e.mask,a=void 0===o?null:o,l=e.title,c=void 0===l?null:l,h=e.classes,u=void 0===h?[]:h,f=e.attributes,p=void 0===f?{}:f,d=e.styles,_=void 0===d?{}:d;if(t){var m=t.prefix,y=t.iconName,g=t.icon;return ie(T({type:"icon"},t),function(){return ee(),H.autoA11y&&(c?p["aria-labelledby"]=H.replacementClass+"-title-"+V():p["aria-hidden"]="true"),nt({icons:{main:$t(g),mask:a?$t(a.icon):{found:!1,width:null,height:null,icon:{}}},prefix:m,iconName:y,transform:T({},U,r),symbol:s,title:c,extra:{attributes:p,styles:_,classes:u}})})}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(t||{}).icon?t:re(t||{}),r=e.mask;return r&&(r=(r||{}).icon?r:re(r||{})),ne(i,T({},e,{mask:r}))}),ae={noAuto:function(){I({autoReplaceSvg:!1,observeMutations:!1}),Lt&&Lt.disconnect()},dom:{i2svg:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(g){ee();var e=t.node,i=void 0===e?d:e,r=t.callback,n=void 0===r?function(){}:r;H.searchPseudoElements&&Yt(i),Zt(i,n)}},css:Qt,insertCss:function(){q(Qt())}},library:se,parse:{transform:function(t){return Tt(t)}},findIconDefinition:re,icon:oe,text:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.transform,r=void 0===i?U:i,n=e.title,s=void 0===n?null:n,o=e.classes,a=void 0===o?[]:o,l=e.attributes,c=void 0===l?{}:l,h=e.styles,u=void 0===h?{}:h;return ie({type:"text",content:t},function(){return ee(),st({content:t,transform:T({},U,r),title:s,extra:{attributes:c,styles:u,classes:[H.familyPrefix+"-layers-text"].concat(B(a))}})})},layer:function(t){return ie({type:"layer"},function(){ee();var e=[];return t(function(t){Array.isArray(t)?t.map(function(t){e=e.concat(t.abstract)}):e=e.concat(t.abstract)}),[{tag:"span",attributes:{class:H.familyPrefix+"-layers"},children:e}]})}},le=function(){g&&H.autoReplaceSvg&&ae.dom.i2svg({node:d})};Object.defineProperty(ae,"config",{get:function(){return H},set:function(t){I(t)}}),g&&function(t){try{!function(){y&&(p.FontAwesome||(p.FontAwesome=ae),t=function(){Object.keys(F.styles).length>0&&le(),H.observeMutations&&"function"==typeof MutationObserver&&function(t){if(_){var e=t.treeCallback,i=t.nodeCallback,r=t.pseudoElementsCallback;Lt=new _(function(t){Et||K(t).forEach(function(t){if("childList"===t.type&&t.addedNodes.length>0&&!At(t.addedNodes[0])&&(H.searchPseudoElements&&r(t.target),e(t.target)),"attributes"===t.type&&t.target.parentNode&&H.searchPseudoElements&&r(t.target.parentNode),"attributes"===t.type&&At(t.target)&&~E.indexOf(t.attributeName))if("class"===t.attributeName){var n=bt(G(t.target)),s=n.prefix,o=n.iconName;s&&t.target.setAttribute("data-prefix",s),o&&t.target.setAttribute("data-icon",o)}else i(t.target)})}),g&&Lt.observe(d.getElementsByTagName("body")[0],{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}({treeCallback:Zt,nodeCallback:Jt,pseudoElementsCallback:Yt})},g&&(W?setTimeout(t,0):j.push(t))),F.hooks=T({},F.hooks,{addPack:function(t,e){F.styles[t]=T({},F.styles[t]||{},e),yt(),le()},addShims:function(t){var e;(e=F.shims).push.apply(e,B(t)),yt(),le()}});var t}()}catch(t){if(!A)throw t}}(function(){y&&(p.FontAwesome||(p.FontAwesome=ae),t=function(){Object.keys(F.styles).length>0&&le(),H.observeMutations&&"function"==typeof MutationObserver&&function(t){if(_){var e=t.treeCallback,i=t.nodeCallback,r=t.pseudoElementsCallback;Lt=new _(function(t){Et||K(t).forEach(function(t){if("childList"===t.type&&t.addedNodes.length>0&&!At(t.addedNodes[0])&&(H.searchPseudoElements&&r(t.target),e(t.target)),"attributes"===t.type&&t.target.parentNode&&H.searchPseudoElements&&r(t.target.parentNode),"attributes"===t.type&&At(t.target)&&~E.indexOf(t.attributeName))if("class"===t.attributeName){var n=bt(G(t.target)),s=n.prefix,o=n.iconName;s&&t.target.setAttribute("data-prefix",s),o&&t.target.setAttribute("data-icon",o)}else i(t.target)})}),g&&Lt.observe(d.getElementsByTagName("body")[0],{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}({treeCallback:Zt,nodeCallback:Jt,pseudoElementsCallback:Yt})},g&&(W?setTimeout(t,0):j.push(t))),F.hooks=T({},F.hooks,{addPack:function(t,e){F.styles[t]=T({},F.styles[t]||{},e),yt(),le()},addShims:function(t){var e;(e=F.shims).push.apply(e,B(t)),yt(),le()}});var t});var ce=ae,he=i(27),ue=i.n(he),fe=i(26),pe=i.n(fe),de=i(25),_e=i.n(de),me=i(24),ye=i.n(me),ge=i(23),ve=i.n(ge);ce.library.add(ue.a,pe.a,_e.a,ye.a,ve.a),i(57),i(52),n.applyAddon(s);var be,Ce,we,ke,Ae,xe,Se,Ee=!1,Le=!1,Me=!1,Re=!1,Te=new n,Be=document.getElementById("status"),Oe=document.getElementById("header"),De=document.getElementById("dropupContent"),Pe=document.getElementById("footer"),He=document.getElementById("terminal-container");function Ie(){Te.fit(),Se.emit("resize",{cols:Te.cols,rows:Te.rows})}if(Te.open(He),Te.focus(),Te.fit(),window.addEventListener("resize",Ie,!1),document.location.pathname){var Ne=document.location.pathname.split("/"),Fe=(Ne.slice(0,Ne.length-1).join("/")+"/").substring(1)+"socket.io";Se=r.connect(null,{resource:Fe})}else Se=r.connect();function je(t){De.innerHTML=t,logBtn.addEventListener("click",Ue),Re&&reauthBtn.addEventListener("click",We),Me&&credentialsBtn.addEventListener("click",ze),Le&&downloadLogBtn.addEventListener("click",qe)}function We(){return console.log("re-authenticating"),window.location.href="/reauth",!1}function ze(){return Se.emit("control","replayCredentials"),console.log("replaying credentials"),Te.focus(),!1}function Ue(){return!0===Ee?(Ee=!1,Le=!0,logBtn.innerHTML='<i class="fas fa-clipboard fa-fw"></i> Start Log',console.log("stopping log, "+Ee),ke=new Date,be=be+"\r\n\r\nLog End for "+Ce+": "+ke.getFullYear()+"/"+(ke.getMonth()+1)+"/"+ke.getDate()+" @ "+ke.getHours()+":"+ke.getMinutes()+":"+ke.getSeconds()+"\r\n",we=ke,Te.focus(),!1):(Ee=!0,Le=!0,logBtn.innerHTML='<i class="fas fa-cog fa-spin fa-fw"></i> Stop Log',downloadLogBtn.style.color="#000",downloadLogBtn.addEventListener("click",qe),console.log("starting log, "+Ee),ke=new Date,be="Log Start for "+Ce+": "+ke.getFullYear()+"/"+(ke.getMonth()+1)+"/"+ke.getDate()+" @ "+ke.getHours()+":"+ke.getMinutes()+":"+ke.getSeconds()+"\r\n\r\n",we=ke,Te.focus(),!1)}function qe(){if(!0===Le){Ae="WebSSH2-"+we.getFullYear()+(we.getMonth()+1)+we.getDate()+"_"+we.getHours()+we.getMinutes()+we.getSeconds()+".log";var t=new Blob([be.replace(/[\u001b\u009b][[\]()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><;]/g,"")],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveBlob(t,Ae);else{var e=window.document.createElement("a");e.href=window.URL.createObjectURL(t),e.download=Ae,document.body.appendChild(e),e.click(),document.body.removeChild(e)}}Te.focus()}Te.on("data",function(t){Se.emit("data",t)}),Se.on("data",function(t){Te.write(t),Ee&&(be+=t)}),Se.on("connect",function(){Se.emit("geometry",Te.cols,Te.rows)}),Se.on("setTerminalOpts",function(t){Te.setOption("cursorBlink",t.cursorBlink),Te.setOption("scrollback",t.scrollback),Te.setOption("tabStopWidth",t.tabStopWidth),Te.setOption("bellStyle",t.bellStyle)}),Se.on("title",function(t){document.title=t}),Se.on("menu",function(t){je(t)}),Se.on("status",function(t){Be.innerHTML=t}),Se.on("ssherror",function(t){Be.innerHTML=t,Be.style.backgroundColor="red",xe=!0}),Se.on("headerBackground",function(t){Oe.style.backgroundColor=t}),Se.on("header",function(t){t&&(Oe.innerHTML=t,Oe.style.display="block",He.style.height="calc(100% - 38px)",Ie())}),Se.on("footer",function(t){Ce=t,Pe.innerHTML=t}),Se.on("statusBackground",function(t){Be.style.backgroundColor=t}),Se.on("allowreplay",function(t){!0===t?(console.log("allowreplay: "+t),Me=!0,je(De.innerHTML+'<a id="credentialsBtn"><i class="fas fa-key fa-fw"></i> Credentials</a>')):(Me=!1,console.log("allowreplay: "+t))}),Se.on("allowreauth",function(t){!0===t?(console.log("allowreauth: "+t),Re=!0,je(De.innerHTML+'<a id="reauthBtn"><i class="fas fa-key fa-fw"></i> Switch User</a>')):(Re=!1,console.log("allowreauth: "+t))}),Se.on("disconnect",function(t){xe||(Be.style.backgroundColor="red",Be.innerHTML="WEBSOCKET SERVER DISCONNECTED: "+t),Se.io.reconnection(!1)}),Se.on("error",function(t){xe||(Be.style.backgroundColor="red",Be.innerHTML="ERROR: "+t)}),Te.on("title",function(t){document.title=t})},function(t,e){function i(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=i,i.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),i=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-i:t+i}return 0|Math.min(t,this.max)},i.prototype.reset=function(){this.attempts=0},i.prototype.setMin=function(t){this.ms=t},i.prototype.setMax=function(t){this.max=t},i.prototype.setJitter=function(t){this.jitter=t}},function(t,e){t.exports=function(t,e){for(var i=[],r=(e=e||0)||0;r<t.length;r++)i[r-e]=t[r];return i}},function(t,e){},function(t,e,i){(function(e){var r,n=i(6),s=i(2),o=i(5),a=i(4),l=i(16),c=i(1)("engine.io-client:websocket"),h=e.WebSocket||e.MozWebSocket;if("undefined"==typeof window)try{r=i(32)}catch(t){}var u=h;function f(t){t&&t.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=h&&!t.forceNode,this.protocols=t.protocols,this.usingBrowserWebSocket||(u=r),n.call(this,t)}u||"undefined"!=typeof window||(u=r),t.exports=f,a(f,n),f.prototype.name="websocket",f.prototype.supportsBinary=!0,f.prototype.doOpen=function(){if(this.check()){var t=this.uri(),e=this.protocols,i={agent:this.agent,perMessageDeflate:this.perMessageDeflate};i.pfx=this.pfx,i.key=this.key,i.passphrase=this.passphrase,i.cert=this.cert,i.ca=this.ca,i.ciphers=this.ciphers,i.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(i.headers=this.extraHeaders),this.localAddress&&(i.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?e?new u(t,e):new u(t):new u(t,e,i)}catch(t){return this.emit("error",t)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},f.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},f.prototype.write=function(t){var i=this;this.writable=!1;for(var r=t.length,n=0,o=r;n<o;n++)!function(t){s.encodePacket(t,i.supportsBinary,function(n){if(!i.usingBrowserWebSocket){var s={};t.options&&(s.compress=t.options.compress),i.perMessageDeflate&&("string"==typeof n?e.Buffer.byteLength(n):n.length)<i.perMessageDeflate.threshold&&(s.compress=!1)}try{i.usingBrowserWebSocket?i.ws.send(n):i.ws.send(n,s)}catch(t){c("websocket closed before onclose event")}--r||(i.emit("flush"),setTimeout(function(){i.writable=!0,i.emit("drain")},0))})}(t[n])},f.prototype.onClose=function(){n.prototype.onClose.call(this)},f.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},f.prototype.uri=function(){var t=this.query||{},e=this.secure?"wss":"ws",i="";return this.port&&("wss"===e&&443!==Number(this.port)||"ws"===e&&80!==Number(this.port))&&(i=":"+this.port),this.timestampRequests&&(t[this.timestampParam]=l()),this.supportsBinary||(t.b64=1),(t=o.encode(t)).length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+i+this.path+t},f.prototype.check=function(){return!(!u||"__initialize"in u&&this.name===f.prototype.name)}}).call(this,i(0))},function(t,e,i){(function(e){var r=i(18),n=i(4);t.exports=c;var s,o=/\n/g,a=/\\n/g;function l(){}function c(t){r.call(this,t),this.query=this.query||{},s||(e.___eio||(e.___eio=[]),s=e.___eio),this.index=s.length;var i=this;s.push(function(t){i.onData(t)}),this.query.j=this.index,e.document&&e.addEventListener&&e.addEventListener("beforeunload",function(){i.script&&(i.script.onerror=l)},!1)}n(c,r),c.prototype.supportsBinary=!1,c.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},c.prototype.doPoll=function(){var t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};var i=document.getElementsByTagName("script")[0];i?i.parentNode.insertBefore(e,i):(document.head||document.body).appendChild(e),this.script=e,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)},100)},c.prototype.doWrite=function(t,e){var i=this;if(!this.form){var r,n=document.createElement("form"),s=document.createElement("textarea"),l=this.iframeId="eio_iframe_"+this.index;n.className="socketio",n.style.position="absolute",n.style.top="-1000px",n.style.left="-1000px",n.target=l,n.method="POST",n.setAttribute("accept-charset","utf-8"),s.name="d",n.appendChild(s),document.body.appendChild(n),this.form=n,this.area=s}function c(){h(),e()}function h(){if(i.iframe)try{i.form.removeChild(i.iframe)}catch(t){i.onError("jsonp polling iframe removal error",t)}try{var t='<iframe src="javascript:0" name="'+i.iframeId+'">';r=document.createElement(t)}catch(t){(r=document.createElement("iframe")).name=i.iframeId,r.src="javascript:0"}r.id=i.iframeId,i.form.appendChild(r),i.iframe=r}this.form.action=this.uri(),h(),t=t.replace(a,"\\\n"),this.area.value=t.replace(o,"\\n");try{this.form.submit()}catch(t){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===i.iframe.readyState&&c()}:this.iframe.onload=c}}).call(this,i(0))},function(t,e,i){(function(e){var i=e.BlobBuilder||e.WebKitBlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder,r=function(){try{return 2===new Blob(["hi"]).size}catch(t){return!1}}(),n=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(t){return!1}}(),s=i&&i.prototype.append&&i.prototype.getBlob;function o(t){for(var e=0;e<t.length;e++){var i=t[e];if(i.buffer instanceof ArrayBuffer){var r=i.buffer;if(i.byteLength!==r.byteLength){var n=new Uint8Array(i.byteLength);n.set(new Uint8Array(r,i.byteOffset,i.byteLength)),r=n.buffer}t[e]=r}}}t.exports=r?n?e.Blob:function(t,e){return o(t),new Blob(t,e||{})}:s?function(t,e){e=e||{};var r=new i;o(t);for(var n=0;n<t.length;n++)r.append(t[n]);return e.type?r.getBlob(e.type):r.getBlob()}:void 0}).call(this,i(0))},function(t,e){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(256),r=0;r<t.length;r++)i[t.charCodeAt(r)]=r;e.encode=function(e){var i,r=new Uint8Array(e),n=r.length,s="";for(i=0;i<n;i+=3)s+=t[r[i]>>2],s+=t[(3&r[i])<<4|r[i+1]>>4],s+=t[(15&r[i+1])<<2|r[i+2]>>6],s+=t[63&r[i+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s},e.decode=function(t){var e,r,n,s,o,a=.75*t.length,l=t.length,c=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var h=new ArrayBuffer(a),u=new Uint8Array(h);for(e=0;e<l;e+=4)r=i[t.charCodeAt(e)],n=i[t.charCodeAt(e+1)],s=i[t.charCodeAt(e+2)],o=i[t.charCodeAt(e+3)],u[c++]=r<<2|n>>4,u[c++]=(15&n)<<4|s>>2,u[c++]=(3&s)<<6|63&o;return h}}()},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){(function(t,r){var n;!function(s){var o=("object"==typeof t&&t&&t.exports,"object"==typeof r&&r);o.global!==o&&o.window;var a,l,c,h=String.fromCharCode;function u(t){for(var e,i,r=[],n=0,s=t.length;n<s;)(e=t.charCodeAt(n++))>=55296&&e<=56319&&n<s?56320==(64512&(i=t.charCodeAt(n++)))?r.push(((1023&e)<<10)+(1023&i)+65536):(r.push(e),n--):r.push(e);return r}function f(t,e){if(t>=55296&&t<=57343){if(e)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function p(t,e){return h(t>>e&63|128)}function d(t,e){if(0==(4294967168&t))return h(t);var i="";return 0==(4294965248&t)?i=h(t>>6&31|192):0==(4294901760&t)?(f(t,e)||(t=65533),i=h(t>>12&15|224),i+=p(t,6)):0==(4292870144&t)&&(i=h(t>>18&7|240),i+=p(t,12),i+=p(t,6)),i+h(63&t|128)}function _(){if(c>=l)throw Error("Invalid byte index");var t=255&a[c];if(c++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function m(t){var e,i;if(c>l)throw Error("Invalid byte index");if(c==l)return!1;if(e=255&a[c],c++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|_())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|_()<<6|_())>=2048)return f(i,t)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|_()<<12|_()<<6|_())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}var y={version:"2.1.2",encode:function(t,e){for(var i=!1!==(e=e||{}).strict,r=u(t),n=r.length,s=-1,o="";++s<n;)o+=d(r[s],i);return o},decode:function(t,e){var i=!1!==(e=e||{}).strict;a=u(t),l=a.length,c=0;for(var r,n=[];!1!==(r=m(i));)n.push(r);return function(t){for(var e,i=t.length,r=-1,n="";++r<i;)(e=t[r])>65535&&(n+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),n+=h(e);return n}(n)}};void 0===(n=function(){return y}.call(e,i,e,t))||(t.exports=n)}()}).call(this,i(37)(t),i(0))},function(t,e){function i(){}t.exports=function(t,e,r){var n=!1;return r=r||i,s.count=t,0===t?e():s;function s(t,i){if(s.count<=0)throw new Error("after called too many times");--s.count,t?(n=!0,e(t),e=r):0!==s.count||n||e(null,i)}}},function(t,e){t.exports=function(t,e,i){var r=t.byteLength;if(e=e||0,i=i||r,t.slice)return t.slice(e,i);if(e<0&&(e+=r),i<0&&(i+=r),i>r&&(i=r),e>=r||e>=i||0===r)return new ArrayBuffer(0);for(var n=new Uint8Array(t),s=new Uint8Array(i-e),o=e,a=0;o<i;o++,a++)s[a]=n[o];return s.buffer}},function(t,e){t.exports=Object.keys||function(t){var e=[],i=Object.prototype.hasOwnProperty;for(var r in t)i.call(t,r)&&e.push(r);return e}},function(t,e,i){(function(e){var r=i(7),n=i(18),s=i(3),o=i(4),a=i(1)("engine.io-client:polling-xhr");function l(){}function c(t){if(n.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,e.location){var i="https:"===location.protocol,r=location.port;r||(r=i?443:80),this.xd=t.hostname!==e.location.hostname||r!==t.port,this.xs=t.secure!==i}}function h(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.requestTimeout=t.requestTimeout,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders,this.create()}function u(){for(var t in h.requests)h.requests.hasOwnProperty(t)&&h.requests[t].abort()}t.exports=c,t.exports.Request=h,o(c,n),c.prototype.supportsBinary=!0,c.prototype.request=function(t){return(t=t||{}).uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,t.requestTimeout=this.requestTimeout,t.extraHeaders=this.extraHeaders,new h(t)},c.prototype.doWrite=function(t,e){var i="string"!=typeof t&&void 0!==t,r=this.request({method:"POST",data:t,isBinary:i}),n=this;r.on("success",e),r.on("error",function(t){n.onError("xhr post error",t)}),this.sendXhr=r},c.prototype.doPoll=function(){a("xhr poll");var t=this.request(),e=this;t.on("data",function(t){e.onData(t)}),t.on("error",function(t){e.onError("xhr poll error",t)}),this.pollXhr=t},s(h.prototype),h.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized;var i=this.xhr=new r(t),n=this;try{a("xhr open %s: %s",this.method,this.uri),i.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var s in i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(s)&&i.setRequestHeader(s,this.extraHeaders[s])}catch(t){}if("POST"===this.method)try{this.isBinary?i.setRequestHeader("Content-type","application/octet-stream"):i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{i.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in i&&(i.withCredentials=!0),this.requestTimeout&&(i.timeout=this.requestTimeout),this.hasXDR()?(i.onload=function(){n.onLoad()},i.onerror=function(){n.onError(i.responseText)}):i.onreadystatechange=function(){if(2===i.readyState)try{var t=i.getResponseHeader("Content-Type");n.supportsBinary&&"application/octet-stream"===t&&(i.responseType="arraybuffer")}catch(t){}4===i.readyState&&(200===i.status||1223===i.status?n.onLoad():setTimeout(function(){n.onError(i.status)},0))},a("xhr data %s",this.data),i.send(this.data)}catch(t){return void setTimeout(function(){n.onError(t)},0)}e.document&&(this.index=h.requestsCount++,h.requests[this.index]=this)},h.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},h.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},h.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},h.prototype.cleanup=function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=l:this.xhr.onreadystatechange=l,t)try{this.xhr.abort()}catch(t){}e.document&&delete h.requests[this.index],this.xhr=null}},h.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type")}catch(t){}t="application/octet-stream"===e&&this.xhr.response||this.xhr.responseText}catch(t){this.onError(t)}null!=t&&this.onData(t)},h.prototype.hasXDR=function(){return void 0!==e.XDomainRequest&&!this.xs&&this.enablesXDR},h.prototype.abort=function(){this.cleanup()},h.requestsCount=0,h.requests={},e.document&&(e.attachEvent?e.attachEvent("onunload",u):e.addEventListener&&e.addEventListener("beforeunload",u,!1))}).call(this,i(0))},function(t,e){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){t.exports=!1}},function(t,e,i){(function(e){var r=i(19),n=i(3),s=i(1)("engine.io-client:socket"),o=i(15),a=i(2),l=i(22),c=i(5);function h(t,i){if(!(this instanceof h))return new h(t,i);i=i||{},t&&"object"==typeof t&&(i=t,t=null),t?(t=l(t),i.hostname=t.host,i.secure="https"===t.protocol||"wss"===t.protocol,i.port=t.port,t.query&&(i.query=t.query)):i.host&&(i.hostname=l(i.host).host),this.secure=null!=i.secure?i.secure:e.location&&"https:"===location.protocol,i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.agent=i.agent||!1,this.hostname=i.hostname||(e.location?location.hostname:"localhost"),this.port=i.port||(e.location&&location.port?location.port:this.secure?443:80),this.query=i.query||{},"string"==typeof this.query&&(this.query=c.decode(this.query)),this.upgrade=!1!==i.upgrade,this.path=(i.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!i.forceJSONP,this.jsonp=!1!==i.jsonp,this.forceBase64=!!i.forceBase64,this.enablesXDR=!!i.enablesXDR,this.timestampParam=i.timestampParam||"t",this.timestampRequests=i.timestampRequests,this.transports=i.transports||["polling","websocket"],this.transportOptions=i.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=i.policyPort||843,this.rememberUpgrade=i.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=i.onlyBinaryUpgrades,this.perMessageDeflate=!1!==i.perMessageDeflate&&(i.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=i.pfx||null,this.key=i.key||null,this.passphrase=i.passphrase||null,this.cert=i.cert||null,this.ca=i.ca||null,this.ciphers=i.ciphers||null,this.rejectUnauthorized=void 0===i.rejectUnauthorized||i.rejectUnauthorized,this.forceNode=!!i.forceNode;var r="object"==typeof e&&e;r.global===r&&(i.extraHeaders&&Object.keys(i.extraHeaders).length>0&&(this.extraHeaders=i.extraHeaders),i.localAddress&&(this.localAddress=i.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}t.exports=h,h.priorWebsocketSuccess=!1,n(h.prototype),h.protocol=a.protocol,h.Socket=h,h.Transport=i(6),h.transports=i(19),h.parser=i(2),h.prototype.createTransport=function(t){s('creating transport "%s"',t);var e=function(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}(this.query);e.EIO=a.protocol,e.transport=t;var i=this.transportOptions[t]||{};return this.id&&(e.sid=this.id),new r[t]({query:e,socket:this,agent:i.agent||this.agent,hostname:i.hostname||this.hostname,port:i.port||this.port,secure:i.secure||this.secure,path:i.path||this.path,forceJSONP:i.forceJSONP||this.forceJSONP,jsonp:i.jsonp||this.jsonp,forceBase64:i.forceBase64||this.forceBase64,enablesXDR:i.enablesXDR||this.enablesXDR,timestampRequests:i.timestampRequests||this.timestampRequests,timestampParam:i.timestampParam||this.timestampParam,policyPort:i.policyPort||this.policyPort,pfx:i.pfx||this.pfx,key:i.key||this.key,passphrase:i.passphrase||this.passphrase,cert:i.cert||this.cert,ca:i.ca||this.ca,ciphers:i.ciphers||this.ciphers,rejectUnauthorized:i.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:i.perMessageDeflate||this.perMessageDeflate,extraHeaders:i.extraHeaders||this.extraHeaders,forceNode:i.forceNode||this.forceNode,localAddress:i.localAddress||this.localAddress,requestTimeout:i.requestTimeout||this.requestTimeout,protocols:i.protocols||void 0})},h.prototype.open=function(){var t;if(this.rememberUpgrade&&h.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length){var e=this;return void setTimeout(function(){e.emit("error","No transports available")},0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},h.prototype.setTransport=function(t){s("setting transport %s",t.name);var e=this;this.transport&&(s("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",function(){e.onDrain()}).on("packet",function(t){e.onPacket(t)}).on("error",function(t){e.onError(t)}).on("close",function(){e.onClose("transport close")})},h.prototype.probe=function(t){s('probing transport "%s"',t);var e=this.createTransport(t,{probe:1}),i=!1,r=this;function n(){if(r.onlyBinaryUpgrades){var n=!this.supportsBinary&&r.transport.supportsBinary;i=i||n}i||(s('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",function(n){if(!i)if("pong"===n.type&&"probe"===n.data){if(s('probe transport "%s" pong',t),r.upgrading=!0,r.emit("upgrading",e),!e)return;h.priorWebsocketSuccess="websocket"===e.name,s('pausing current transport "%s"',r.transport.name),r.transport.pause(function(){i||"closed"!==r.readyState&&(s("changing transport and sending upgrade packet"),f(),r.setTransport(e),e.send([{type:"upgrade"}]),r.emit("upgrade",e),e=null,r.upgrading=!1,r.flush())})}else{s('probe transport "%s" failed',t);var o=new Error("probe error");o.transport=e.name,r.emit("upgradeError",o)}}))}function o(){i||(i=!0,f(),e.close(),e=null)}function a(i){var n=new Error("probe error: "+i);n.transport=e.name,o(),s('probe transport "%s" failed because of error: %s',t,i),r.emit("upgradeError",n)}function l(){a("transport closed")}function c(){a("socket closed")}function u(t){e&&t.name!==e.name&&(s('"%s" works - aborting "%s"',t.name,e.name),o())}function f(){e.removeListener("open",n),e.removeListener("error",a),e.removeListener("close",l),r.removeListener("close",c),r.removeListener("upgrading",u)}h.priorWebsocketSuccess=!1,e.once("open",n),e.once("error",a),e.once("close",l),this.once("close",c),this.once("upgrading",u),e.open()},h.prototype.onOpen=function(){if(s("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){s("starting upgrade probes");for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},h.prototype.onPacket=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(s('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else s('packet received with socket readyState "%s"',this.readyState)},h.prototype.onHandshake=function(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},h.prototype.onHeartbeat=function(t){clearTimeout(this.pingTimeoutTimer);var e=this;e.pingTimeoutTimer=setTimeout(function(){"closed"!==e.readyState&&e.onClose("ping timeout")},t||e.pingInterval+e.pingTimeout)},h.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout(function(){s("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)},t.pingInterval)},h.prototype.ping=function(){var t=this;this.sendPacket("ping",function(){t.emit("ping")})},h.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},h.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(s("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},h.prototype.write=h.prototype.send=function(t,e,i){return this.sendPacket("message",t,e,i),this},h.prototype.sendPacket=function(t,e,i,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof i&&(r=i,i=null),"closing"!==this.readyState&&"closed"!==this.readyState){(i=i||{}).compress=!1!==i.compress;var n={type:t,data:e,options:i};this.emit("packetCreate",n),this.writeBuffer.push(n),r&&this.once("flush",r),this.flush()}},h.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var t=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?r():e()}):this.upgrading?r():e()}function e(){t.onClose("forced close"),s("socket closing - telling transport to close"),t.transport.close()}function i(){t.removeListener("upgrade",i),t.removeListener("upgradeError",i),e()}function r(){t.once("upgrade",i),t.once("upgradeError",i)}return this},h.prototype.onError=function(t){s("socket error %j",t),h.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},h.prototype.onClose=function(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(s('socket close with reason: "%s"',t),clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)},h.prototype.filterUpgrades=function(t){for(var e=[],i=0,r=t.length;i<r;i++)~o(this.transports,t[i])&&e.push(t[i]);return e}}).call(this,i(0))},function(t,e,i){t.exports=i(44),t.exports.parser=i(2)},function(t,e,i){(function(t){var r=i(8),n=i(21),s=Object.prototype.toString,o="function"==typeof t.Blob||"[object BlobConstructor]"===s.call(t.Blob),a="function"==typeof t.File||"[object FileConstructor]"===s.call(t.File);e.deconstructPacket=function(t){var e=[],i=t.data,s=t;return s.data=function t(e,i){if(!e)return e;if(n(e)){var s={_placeholder:!0,num:i.length};return i.push(e),s}if(r(e)){for(var o=new Array(e.length),a=0;a<e.length;a++)o[a]=t(e[a],i);return o}if("object"==typeof e&&!(e instanceof Date)){o={};for(var l in e)o[l]=t(e[l],i);return o}return e}(i,e),s.attachments=e.length,{packet:s,buffers:e}},e.reconstructPacket=function(t,e){return t.data=function t(e,i){if(!e)return e;if(e&&e._placeholder)return i[e.num];if(r(e))for(var n=0;n<e.length;n++)e[n]=t(e[n],i);else if("object"==typeof e)for(var s in e)e[s]=t(e[s],i);return e}(t.data,e),t.attachments=void 0,t},e.removeBlobs=function(t,e){var i=0,s=t;!function t(l,c,h){if(!l)return l;if(o&&l instanceof Blob||a&&l instanceof File){i++;var u=new FileReader;u.onload=function(){h?h[c]=this.result:s=this.result,--i||e(s)},u.readAsArrayBuffer(l)}else if(r(l))for(var f=0;f<l.length;f++)t(l[f],f,l);else if("object"==typeof l&&!n(l))for(var p in l)t(l[p],p,l)}(s),i||e(s)}}).call(this,i(0))},function(t,e){var i=1e3,r=6e4,n=36e5,s=24*n;function o(t,e,i){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+i:Math.ceil(t/e)+" "+i+"s"}t.exports=function(t,e){e=e||{};var a,l=typeof t;if("string"===l&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var o=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"days":case"day":case"d":return o*s;case"hours":case"hour":case"hrs":case"hr":case"h":return o*n;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(t);if("number"===l&&!1===isNaN(t))return e.long?o(a=t,s,"day")||o(a,n,"hour")||o(a,r,"minute")||o(a,i,"second")||a+" ms":function(t){return t>=s?Math.round(t/s)+"d":t>=n?Math.round(t/n)+"h":t>=r?Math.round(t/r)+"m":t>=i?Math.round(t/i)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,i){function r(t){var i;function r(){if(r.enabled){var t=r,n=+new Date,s=n-(i||n);t.diff=s,t.prev=i,t.curr=n,i=n;for(var o=new Array(arguments.length),a=0;a<o.length;a++)o[a]=arguments[a];o[0]=e.coerce(o[0]),"string"!=typeof o[0]&&o.unshift("%O");var l=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,function(i,r){if("%%"===i)return i;l++;var n=e.formatters[r];if("function"==typeof n){var s=o[l];i=n.call(t,s),o.splice(l,1),l--}return i}),e.formatArgs.call(t,o),(r.log||e.log||console.log.bind(console)).apply(t,o)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var i,r=0;for(i in t)r=(r<<5)-r+t.charCodeAt(i),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=n,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function n(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var i;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\s,]+/),n=r.length;for(i=0;i<n;i++)r[i]&&("-"===(t=r[i].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(i=0;i<e.instances.length;i++){var s=e.instances[i];s.enabled=e.enabled(s.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var i,r;for(i=0,r=e.skips.length;i<r;i++)if(e.skips[i].test(t))return!1;for(i=0,r=e.names.length;i<r;i++)if(e.names[i].test(t))return!0;return!1},e.humanize=i(47),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e){var i,r,n=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(t){i=s}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var l,c=[],h=!1,u=-1;function f(){h&&l&&(h=!1,l.length?c=l.concat(c):u=-1,c.length&&p())}function p(){if(!h){var t=a(f);h=!0;for(var e=c.length;e;){for(l=c,c=[];++u<e;)l&&l[u].run();u=-1,e=c.length}l=null,h=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function _(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];c.push(new d(t,e)),1!==c.length||h||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=_,n.addListener=_,n.once=_,n.off=_,n.removeListener=_,n.removeAllListeners=_,n.emit=_,n.prependListener=_,n.prependOnceListener=_,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(t,e,i){(function(e){var r=i(22),n=i(1)("socket.io-client:url");t.exports=function(t,i){var s=t;i=i||e.location,null==t&&(t=i.protocol+"//"+i.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?i.protocol+t:i.host+t),/^(https?|wss?):\/\//.test(t)||(n("protocol-less url %s",t),t=void 0!==i?i.protocol+"//"+t:"https://"+t),n("parse %s",t),s=r(t)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";var o=-1!==s.host.indexOf(":")?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+o+":"+s.port,s.href=s.protocol+"://"+o+(i&&i.port===s.port?"":":"+s.port),s}}).call(this,i(0))},,function(t,e){},,,,,function(t,e){}]); \ No newline at end of file diff --git a/client/public/webssh2.css b/client/public/webssh2.css index 82dc5bce..f866acd3 100644 --- a/client/public/webssh2.css +++ b/client/public/webssh2.css @@ -1 +1 @@ -.xterm{font-family:courier-new,courier,monospace;font-feature-settings:"liga" 0;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:10}.xterm .xterm-helper-textarea{position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-10;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm:not(.enable-mouse-events){cursor:text}.xterm .xterm-accessibility,.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:100;color:transparent}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-cursor-pointer{cursor:pointer}body,html{font-family:helvetica,sans-serif;font-size:1em;color:#111;background-color:#000;color:#f0f0f0;height:100%;margin:0}#header{color:#f0f0f0;background-color:green;width:100%;border-color:#fff;border-style:none none solid;border-width:1px;text-align:center;flex:0 1 auto;z-index:99;height:19px;display:none}.box{display:block;height:100%}#terminal-container{display:block;width:calc(1 - 1 px);margin:0 auto;padding:2px;height:calc(100% - 19px)}#terminal-container .terminal{background-color:#000;color:#fafafa;padding:2px;height:calc(100% - 19px)}#terminal-container .terminal:focus .terminal-cursor{background-color:#fafafa}#bottomdiv{position:fixed;left:0;bottom:0;width:100%;background-color:#323232;border-color:#fff;border-style:solid none none;border-width:1px;z-index:99;height:19px}#footer{padding-left:5px;padding-right:5px;border-style:none none none solid}#footer,#status{display:inline-block;color:#f0f0f0;background-color:#323232;border-color:#fff;border-width:1px;text-align:left}#status{padding-right:10px;border-style:none solid}#menu,#status{padding-left:10px;z-index:100}#menu{display:inline-block;font-size:16px;color:#fff}#menu:hover .dropup-content{display:block}#credentialsBtn,#logBtn{color:#000}.dropup{position:relative;display:inline-block;cursor:pointer}.dropup-content{display:none;position:absolute;background-color:#f1f1f1;font-size:16px;min-width:160px;bottom:18px;z-index:101}.dropup-content a{color:#777;padding:12px 16px;text-decoration:none;display:block}.dropup-content a:hover{background-color:#ccc}.dropup:click .dropup-content,.dropup:hover .dropup-content{display:block}.dropup:hover .dropbtn{background-color:#3e8e41} \ No newline at end of file +.xterm{font-family:courier-new,courier,monospace;font-feature-settings:"liga" 0;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:10}.xterm .xterm-helper-textarea{position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-10;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm:not(.enable-mouse-events){cursor:text}.xterm .xterm-accessibility,.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:100;color:transparent}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-cursor-pointer{cursor:pointer}body,html{font-family:helvetica,sans-serif;font-size:1em;color:#111;background-color:#000;color:#f0f0f0;height:100%;margin:0}#header{color:#f0f0f0;background-color:green;width:100%;border-color:#fff;border-style:none none solid;border-width:1px;text-align:center;flex:0 1 auto;z-index:99;height:19px;display:none}.box{display:block;height:100%}#terminal-container{display:block;width:calc(1 - 1 px);margin:0 auto;padding:2px;height:calc(100% - 19px)}#terminal-container .terminal{background-color:#000;color:#fafafa;padding:2px;height:calc(100% - 19px)}#terminal-container .terminal:focus .terminal-cursor{background-color:#fafafa}#bottomdiv{position:fixed;left:0;bottom:0;width:100%;background-color:#323232;border-color:#fff;border-style:solid none none;border-width:1px;z-index:99;height:19px}#footer{padding-left:5px;padding-right:5px;border-style:none none none solid}#footer,#status{display:inline-block;color:#f0f0f0;background-color:#323232;border-color:#fff;border-width:1px;text-align:left}#status{padding-right:10px;border-style:none solid}#menu,#status{padding-left:10px;z-index:100}#menu{display:inline-block;font-size:16px;color:#fff}#menu:hover .dropup-content{display:block}#credentialsBtn,#logBtn,#reauthBtn{color:#000}.dropup{position:relative;display:inline-block;cursor:pointer}.dropup-content{display:none;position:absolute;background-color:#f1f1f1;font-size:16px;min-width:160px;bottom:18px;z-index:101}.dropup-content a{color:#777;padding:12px 16px;text-decoration:none;display:block}.dropup-content a:hover{background-color:#ccc}.dropup:click .dropup-content,.dropup:hover .dropup-content{display:block}.dropup:hover .dropbtn{background-color:#3e8e41} \ No newline at end of file diff --git a/client/src/css/style.css b/client/src/css/style.css index 82be6e6f..49337803 100644 --- a/client/src/css/style.css +++ b/client/src/css/style.css @@ -85,12 +85,10 @@ html, body { #menu:hover .dropup-content { display: block; } -#logBtn { - color: #000; -} -#credentialsBtn { +#logBtn, #credentialsBtn, #reauthBtn { color: #000; } + .dropup { position: relative; display: inline-block; diff --git a/client/src/js/index.js b/client/src/js/index.js index c0468a7b..7adeea7d 100644 --- a/client/src/js/index.js +++ b/client/src/js/index.js @@ -19,10 +19,11 @@ require('../css/style.css') Terminal.applyAddon(fit) -/* global Blob, logBtn, credentialsBtn, downloadLogBtn */ +/* global Blob, logBtn, credentialsBtn, reauthBtn, downloadLogBtn */ var sessionLogEnable = false var loggedData = false var allowreplay = false +var allowreauth = false var sessionLog, sessionFooter, logDate, currentDate, myFile, errorExists var socket, termid // eslint-disable-line var term = new Terminal() @@ -128,6 +129,17 @@ socket.on('allowreplay', function (data) { } }) +socket.on('allowreauth', function (data) { + if (data === true) { + console.log('allowreauth: ' + data) + allowreauth = true + drawMenu(dropupContent.innerHTML + '<a id="reauthBtn"><i class="fas fa-key fa-fw"></i> Switch User</a>') + } else { + allowreauth = false + console.log('allowreauth: ' + data) + } +}) + socket.on('disconnect', function (err) { if (!errorExists) { status.style.backgroundColor = 'red' @@ -153,10 +165,18 @@ term.on('title', function (title) { function drawMenu (data) { dropupContent.innerHTML = data logBtn.addEventListener('click', toggleLog) + allowreauth && reauthBtn.addEventListener('click', reauthSession) allowreplay && credentialsBtn.addEventListener('click', replayCredentials) loggedData && downloadLogBtn.addEventListener('click', downloadLog) } +// reauthenticate +function reauthSession () { // eslint-disable-line + console.log('re-authenticating') + window.location.href = '/reauth' + return false +} + // replay password to server, requires function replayCredentials () { // eslint-disable-line socket.emit('control', 'replayCredentials') diff --git a/config.json b/config.json index 917bab98..d069d0c0 100644 --- a/config.json +++ b/config.json @@ -30,7 +30,8 @@ "secret": "mysecret" }, "options": { - "challengeButton": true + "challengeButton": true, + "allowreauth": true }, "algorithms": { "kex": [ diff --git a/package.json b/package.json index 0c9960de..dba3c9ed 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "builddev": "webpack --progress --colors --config scripts/webpack.dev.js", "test": "snyk test", "watch": "nodemon index.js", - "standard": "standard --verbose | snazzy", + "standard": "standard --verbose --fix | snazzy", "cleanmac": "find . -name '.DS_Store' -type f -delete" }, "devDependencies": { @@ -78,7 +78,8 @@ "bigip/*", "screenshots/*", "bin/*", - "build/*" + "build/*", + "workspace/*" ] } } diff --git a/server/app.js b/server/app.js index 140c398f..92d7801f 100644 --- a/server/app.js +++ b/server/app.js @@ -36,16 +36,8 @@ app.disable('x-powered-by') app.use(express.static(publicPath, expressOptions)) app.get('/reauth', function (req, res, next) { - var r = req.headers.referer || '/'; - res.status(401).send( - '<html>' + - ' <head>' + - ' <meta http-equiv="refresh" content="1; url=' + r + '" />' + - ' </head>' + - ' <body>' + - ' <a href="' + r + '">Go Back</a>' + - ' </body>' + - '</html>'); + var r = req.headers.referer || '/' + res.status(401).send('<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=' + r + '"></head><body bgcolor="#000"></body></html>'); }) app.get('/ssh/host/:host?', function (req, res, next) { @@ -73,7 +65,8 @@ app.get('/ssh/host/:host?', function (req, res, next) { tabStopWidth: (validator.isInt(req.query.tabStopWidth + '', {min: 1, max: 100}) && req.query.tabStopWidth) ? req.query.tabStopWidth : config.terminal.tabStopWidth, bellStyle: ((req.query.bellStyle) && (['sound', 'none'].indexOf(req.query.bellStyle) > -1)) ? req.query.bellStyle : config.terminal.bellStyle }, - allowreplay: (validator.isBoolean(req.headers.allowreplay + '') ? myutil.parseBool(req.headers.allowreplay) : false), + allowreplay: config.options.challengeButton || (validator.isBoolean(req.headers.allowreplay + '') ? myutil.parseBool(req.headers.allowreplay) : false), + allowreauth: config.options.allowreauth || false, mrhsession: ((validator.isAlphanumeric(req.headers.mrhsession + '') && req.headers.mrhsession) ? req.headers.mrhsession : 'none'), serverlog: { client: config.serverlog.client || false, diff --git a/server/socket.js b/server/socket.js index 4ea8ac53..d788b056 100644 --- a/server/socket.js +++ b/server/socket.js @@ -8,8 +8,7 @@ var SSH = require('ssh2').Client // var hostkeys = JSON.parse(fs.readFileSync('./hostkeyhashes.json', 'utf8')) var termCols, termRows var menuData = '<a id="logBtn"><i class="fas fa-clipboard fa-fw"></i> Start Log</a>' + - '<a id="downloadLogBtn"><i class="fas fa-download fa-fw"></i> Download Log</a>' + - '<a style="color:black" href="/reauth"><i class="fas fa-key fa-fw"></i> Switch User</a>'; + '<a id="downloadLogBtn"><i class="fas fa-download fa-fw"></i> Download Log</a>' // public module.exports = function socket (socket) { @@ -42,6 +41,7 @@ module.exports = function socket (socket) { socket.emit('status', 'SSH CONNECTION ESTABLISHED') socket.emit('statusBackground', 'green') socket.emit('allowreplay', socket.request.session.ssh.allowreplay) + socket.emit('allowreauth', socket.request.session.ssh.allowreauth) conn.shell({ term: socket.request.session.ssh.term, cols: termCols,