meshcentral
Version:
Web based remote computer management and file server
1 lines • 269 kB
JavaScript
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(window,function(){return r={},n.m=i=[function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(14);t.IBufferService=r.createDecorator("BufferService"),t.ICoreMouseService=r.createDecorator("CoreMouseService"),t.ICoreService=r.createDecorator("CoreService"),t.ICharsetService=r.createDecorator("CharsetService"),t.IDirtyRowService=r.createDecorator("DirtyRowService"),t.IInstantiationService=r.createDecorator("InstantiationService"),t.ILogService=r.createDecorator("LogService"),t.IOptionsService=r.createDecorator("OptionsService"),t.IUnicodeService=r.createDecorator("UnicodeService")},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(Object.defineProperty(n.prototype,"event",{get:function(){var i=this;return this._event||(this._event=function(t){return i._listeners.push(t),{dispose:function(){if(!i._disposed)for(var e=0;e<i._listeners.length;e++)if(i._listeners[e]===t)return void i._listeners.splice(e,1)}}}),this._event},enumerable:!0,configurable:!0}),n.prototype.fire=function(e,t){for(var i=[],r=0;r<this._listeners.length;r++)i.push(this._listeners[r]);for(r=0;r<i.length;r++)i[r].call(void 0,e,t)},n.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},n);function n(){this._listeners=[],this._disposed=!1}t.EventEmitter=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.prototype.dispose=function(){this._isDisposed=!0,this._disposables.forEach(function(e){return e.dispose()}),this._disposables.length=0},n.prototype.register=function(e){this._disposables.push(e)},n.prototype.unregister=function(e){var t=this._disposables.indexOf(e);-1!==t&&this._disposables.splice(t,1)},n);function n(){this._disposables=[],this._isDisposed=!1}t.Disposable=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_COLOR=256,t.DEFAULT_ATTR=256|t.DEFAULT_COLOR<<9,t.CHAR_DATA_ATTR_INDEX=0,t.CHAR_DATA_CHAR_INDEX=1,t.CHAR_DATA_WIDTH_INDEX=2,t.CHAR_DATA_CODE_INDEX=3,t.NULL_CELL_CHAR="",t.NULL_CELL_WIDTH=1,t.NULL_CELL_CODE=0,t.WHITESPACE_CELL_CHAR=" ",t.WHITESPACE_CELL_WIDTH=1,t.WHITESPACE_CELL_CODE=32},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(14);t.ICharSizeService=r.createDecorator("CharSizeService"),t.ICoreBrowserService=r.createDecorator("CoreBrowserService"),t.IMouseService=r.createDecorator("MouseService"),t.IRenderService=r.createDecorator("RenderService"),t.ISelectionService=r.createDecorator("SelectionService"),t.ISoundService=r.createDecorator("SoundService")},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=i(7),a=i(3),c=(o=i(6).AttributeData,n(l,o),l.fromCharData=function(e){var t=new l;return t.setFromCharData(e),t},l.prototype.isCombined=function(){return 2097152&this.content},l.prototype.getWidth=function(){return this.content>>22},l.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?s.stringFromCodePoint(2097151&this.content):""},l.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},l.prototype.setFromCharData=function(e){this.fg=e[a.CHAR_DATA_ATTR_INDEX],this.bg=0;var t=!1;if(2<e[a.CHAR_DATA_CHAR_INDEX].length)t=!0;else if(2===e[a.CHAR_DATA_CHAR_INDEX].length){var i=e[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=i&&i<=56319){var r=e[a.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=r&&r<=57343?this.content=1024*(i-55296)+r-56320+65536|e[a.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=e[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|e[a.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=e[a.CHAR_DATA_CHAR_INDEX],this.content=2097152|e[a.CHAR_DATA_WIDTH_INDEX]<<22)},l.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},l);function l(){var e=null!==o&&o.apply(this,arguments)||this;return e.content=0,e.fg=0,e.bg=0,e.combinedData="",e}t.CellData=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.toColorRGB=function(e){return[e>>>16&255,e>>>8&255,255&e]},n.fromColorRGB=function(e){return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},n.prototype.clone=function(){var e=new n;return e.fg=this.fg,e.bg=this.bg,e},n.prototype.isInverse=function(){return 67108864&this.fg},n.prototype.isBold=function(){return 134217728&this.fg},n.prototype.isUnderline=function(){return 268435456&this.fg},n.prototype.isBlink=function(){return 536870912&this.fg},n.prototype.isInvisible=function(){return 1073741824&this.fg},n.prototype.isItalic=function(){return 67108864&this.bg},n.prototype.isDim=function(){return 134217728&this.bg},n.prototype.getFgColorMode=function(){return 50331648&this.fg},n.prototype.getBgColorMode=function(){return 50331648&this.bg},n.prototype.isFgRGB=function(){return 50331648==(50331648&this.fg)},n.prototype.isBgRGB=function(){return 50331648==(50331648&this.bg)},n.prototype.isFgPalette=function(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)},n.prototype.isBgPalette=function(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)},n.prototype.isFgDefault=function(){return 0==(50331648&this.fg)},n.prototype.isBgDefault=function(){return 0==(50331648&this.bg)},n.prototype.isAttributeDefault=function(){return 0===this.fg&&0===this.bg},n.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},n.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},n);function n(){this.fg=0,this.bg=0}t.AttributeData=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringFromCodePoint=function(e){return 65535<e?(e-=65536,String.fromCharCode(55296+(e>>10))+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)},t.utf32ToString=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=e.length);for(var r="",n=t;n<i;++n){var o=e[n];65535<o?(o-=65536,r+=String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):r+=String.fromCharCode(o)}return r};var r=(n.prototype.clear=function(){this._interim=0},n.prototype.decode=function(e,t){var i=e.length;if(!i)return 0;var r=0,n=0;this._interim&&(56320<=(a=e.charCodeAt(n++))&&a<=57343?t[r++]=1024*(this._interim-55296)+a-56320+65536:(t[r++]=this._interim,t[r++]=a),this._interim=0);for(var o=n;o<i;++o){var s=e.charCodeAt(o);if(55296<=s&&s<=56319){if(++o>=i)return this._interim=s,r;var a;56320<=(a=e.charCodeAt(o))&&a<=57343?t[r++]=1024*(s-55296)+a-56320+65536:(t[r++]=s,t[r++]=a)}else t[r++]=s}return r},n);function n(){this._interim=0}t.StringToUtf32=r;var o=(s.prototype.clear=function(){this.interim.fill(0)},s.prototype.decode=function(e,t){var i=e.length;if(!i)return 0;var r,n,o,s,a=0,c=0,l=0;if(this.interim[0]){var h=!1,u=this.interim[0];u&=192==(224&u)?31:224==(240&u)?15:7;for(var f=0,_=void 0;(_=63&this.interim[++f])&&f<4;)u<<=6,u|=_;for(var d=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,p=d-f;l<p;){if(i<=l)return 0;if(128!=(192&(_=e[l++]))){l--,h=!0;break}u<<=6,u|=63&(this.interim[f++]=_)}h||(2==d?u<128?l--:t[a++]=u:3==d?u<2048||55296<=u&&u<=57343||(t[a++]=u):u<65536||1114111<u||(t[a++]=u)),this.interim.fill(0)}for(var v=i-4,g=l;g<i;){for(;!(!(g<v)||128&(r=e[g])||128&(n=e[g+1])||128&(o=e[g+2])||128&(s=e[g+3]));)t[a++]=r,t[a++]=n,t[a++]=o,t[a++]=s,g+=4;if((r=e[g++])<128)t[a++]=r;else if(192==(224&r)){if(i<=g)return this.interim[0]=r,a;if(128!=(192&(n=e[g++]))){g--;continue}if((c=(31&r)<<6|63&n)<128){g--;continue}t[a++]=c}else if(224==(240&r)){if(i<=g)return this.interim[0]=r,a;if(128!=(192&(n=e[g++]))){g--;continue}if(i<=g)return this.interim[0]=r,this.interim[1]=n,a;if(128!=(192&(o=e[g++]))){g--;continue}if((c=(15&r)<<12|(63&n)<<6|63&o)<2048||55296<=c&&c<=57343)continue;t[a++]=c}else if(240==(248&r)){if(i<=g)return this.interim[0]=r,a;if(128!=(192&(n=e[g++]))){g--;continue}if(i<=g)return this.interim[0]=r,this.interim[1]=n,a;if(128!=(192&(o=e[g++]))){g--;continue}if(i<=g)return this.interim[0]=r,this.interim[1]=n,this.interim[2]=o,a;if(128!=(192&(s=e[g++]))){g--;continue}if((c=(7&r)<<18|(63&n)<<12|(63&o)<<6|63&s)<65536||1114111<c)continue;t[a++]=c}}return a},s);function s(){this.interim=new Uint8Array(3)}t.Utf8ToUtf32=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addDisposableDomListener=function(e,t,i,r){e.addEventListener(t,i,r);var n=!1;return{dispose:function(){n&&(n=!0,e.removeEventListener(t,i,r))}}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.CHAR_ATLAS_CELL_SPACING=1},function(e,t,i){"use strict";var f,r,h,s,n,o,a;function c(e){var t=e.toString(16);return t.length<2?"0"+t:t}function u(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}function l(e,t,i){for(var r=e>>24&255,n=e>>16&255,o=e>>8&255,s=t>>24&255,a=t>>16&255,c=t>>8&255,l=u(h.relativeLuminance2(s,c,a),h.relativeLuminance2(r,n,o));l<i&&(0<s||0<a||0<c);)s-=Math.max(0,Math.ceil(.1*s)),a-=Math.max(0,Math.ceil(.1*a)),c-=Math.max(0,Math.ceil(.1*c)),l=u(h.relativeLuminance2(s,c,a),h.relativeLuminance2(r,n,o));return(s<<24|a<<16|c<<8|255)>>>0}function _(e,t,i){for(var r=e>>24&255,n=e>>16&255,o=e>>8&255,s=t>>24&255,a=t>>16&255,c=t>>8&255,l=u(h.relativeLuminance2(s,c,a),h.relativeLuminance2(r,n,o));l<i&&(s<255||a<255||c<255);)s=Math.min(255,s+Math.ceil(.1*(255-s))),a=Math.min(255,a+Math.ceil(.1*(255-a))),c=Math.min(255,c+Math.ceil(.1*(255-c))),l=u(h.relativeLuminance2(s,c,a),h.relativeLuminance2(r,n,o));return(s<<24|a<<16|c<<8|255)>>>0}function d(e,t,i){var r=e/255,n=t/255,o=i/255;return.2126*(r<=.03928?r/12.92:Math.pow((.055+r)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((.055+n)/1.055,2.4))+.0722*(o<=.03928?o/12.92:Math.pow((.055+o)/1.055,2.4))}Object.defineProperty(t,"__esModule",{value:!0}),(a=f=t.channels||(t.channels={})).toCss=function(e,t,i,r){return void 0!==r?"#"+c(e)+c(t)+c(i)+c(r):"#"+c(e)+c(t)+c(i)},a.toRgba=function(e,t,i,r){return void 0===r&&(r=255),(e<<24|t<<16|i<<8|r)>>>0},(r=t.color||(t.color={})).blend=function(e,t){var i=(255&t.rgba)/255;if(1==i)return{css:t.css,rgba:t.rgba};var r=t.rgba>>24&255,n=t.rgba>>16&255,o=t.rgba>>8&255,s=e.rgba>>24&255,a=e.rgba>>16&255,c=e.rgba>>8&255,l=s+Math.round((r-s)*i),h=a+Math.round((n-a)*i),u=c+Math.round((o-c)*i);return{css:f.toCss(l,h,u),rgba:f.toRgba(l,h,u)}},r.ensureContrastRatio=function(e,t,i){var r=s.ensureContrastRatio(e.rgba,t.rgba,i);if(r)return s.toColor(r>>24&255,r>>16&255,r>>8&255)},r.opaque=function(e){var t=(255|e.rgba)>>>0,i=s.toChannels(t),r=i[0],n=i[1],o=i[2];return{css:f.toCss(r,n,o),rgba:t}},(t.css||(t.css={})).toColor=function(e){return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0}},(o=h=t.rgb||(t.rgb={})).relativeLuminance=function(e){return d(e>>16&255,e>>8&255,255&e)},o.relativeLuminance2=d,(n=s=t.rgba||(t.rgba={})).ensureContrastRatio=function(e,t,i){var r=h.relativeLuminance(e>>8),n=h.relativeLuminance(t>>8);if(u(r,n)<i)return n<r?l(e,t,i):_(e,t,i)},n.reduceLuminance=l,n.increaseLuminance=_,n.toChannels=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},n.toColor=function(e,t,i){return{css:f.toCss(e,t,i),rgba:f.toRgba(e,t,i)}},t.toPaddedHex=c,t.contrastRatio=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="undefined"==typeof navigator,n=r?"node":navigator.userAgent,o=r?"node":navigator.platform;function s(e,t){return 0<=e.indexOf(t)}t.isFirefox=!!~n.indexOf("Firefox"),t.isSafari=/^((?!chrome|android).)*safari/i.test(n),t.isMac=s(["Macintosh","MacIntel","MacPPC","Mac68K"],o),t.isIpad="iPad"===o,t.isIphone="iPhone"===o,t.isWindows=s(["Windows","Win16","Win32","WinCE"],o),t.isLinux=0<=o.indexOf("Linux")},function(e,t,i){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),(n=t.C0||(t.C0={})).NUL="\0",n.SOH="",n.STX="",n.ETX="",n.EOT="",n.ENQ="",n.ACK="",n.BEL="",n.BS="\b",n.HT="\t",n.LF="\n",n.VT="\v",n.FF="\f",n.CR="\r",n.SO="",n.SI="",n.DLE="",n.DC1="",n.DC2="",n.DC3="",n.DC4="",n.NAK="",n.SYN="",n.ETB="",n.CAN="",n.EM="",n.SUB="",n.ESC="",n.FS="",n.GS="",n.RS="",n.US="",n.SP=" ",n.DEL="",(r=t.C1||(t.C1={})).PAD="",r.HOP="",r.BPH="",r.NBH="",r.IND="",r.NEL="
",r.SSA="",r.ESA="",r.HTS="",r.HTJ="",r.VTS="",r.PLD="",r.PLU="",r.RI="",r.SS2="",r.SS3="",r.DCS="",r.PU1="",r.PU2="",r.STS="",r.CCH="",r.MW="",r.SPA="",r.EPA="",r.SOS="",r.SGCI="",r.SCI="",r.CSI="",r.ST="",r.OSC="",r.PM="",r.APC=""},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(3),a=i(9),r=i(23),c=i(6),n=i(26),d=i(10),o=(l.prototype.dispose=function(){var e;this._container.removeChild(this._canvas),null===(e=this._charAtlas)||void 0===e||e.dispose()},l.prototype._initCanvas=function(){this._ctx=n.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},l.prototype.onOptionsChanged=function(){},l.prototype.onBlur=function(){},l.prototype.onFocus=function(){},l.prototype.onCursorMove=function(){},l.prototype.onGridChanged=function(e,t){},l.prototype.onSelectionChanged=function(e,t,i){void 0===i&&(i=!1)},l.prototype.setColors=function(e){this._refreshCharAtlas(e)},l.prototype._setTransparency=function(e){if(e!==this._alpha){var t=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,t),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},l.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=r.acquireCharAtlas(this._optionsService.options,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},l.prototype.resize=function(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(this._colors)},l.prototype._fillCells=function(e,t,i,r){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight)},l.prototype._fillBottomLineAtCells=function(e,t,i){void 0===i&&(i=1),this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-window.devicePixelRatio-1,i*this._scaledCellWidth,window.devicePixelRatio)},l.prototype._fillLeftLineAtCell=function(e,t,i){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,window.devicePixelRatio*i,this._scaledCellHeight)},l.prototype._strokeRectAtCell=function(e,t,i,r){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,t*this._scaledCellHeight+window.devicePixelRatio/2,i*this._scaledCellWidth-window.devicePixelRatio,r*this._scaledCellHeight-window.devicePixelRatio)},l.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))},l.prototype._clearCells=function(e,t,i,r){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight))},l.prototype._fillCharTrueColor=function(e,t,i){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(i),this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},l.prototype._drawChars=function(e,t,i){var r,n,o=this._getContrastColor(e);o||e.isFgRGB()||e.isBgRGB()?this._drawUncachedChars(e,t,i,o):(e.isInverse()?(r=e.isBgDefault()?a.INVERTED_DEFAULT_COLOR:e.getBgColor(),n=e.isFgDefault()?a.INVERTED_DEFAULT_COLOR:e.getFgColor()):(n=e.isBgDefault()?s.DEFAULT_COLOR:e.getBgColor(),r=e.isFgDefault()?s.DEFAULT_COLOR:e.getFgColor()),r+=this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&r<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||s.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||s.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=n,this._currentGlyphIdentifier.fg=r,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(e,t,i))},l.prototype._drawUncachedChars=function(e,t,i,r){if(this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline="middle",e.isInverse())if(r)this._ctx.fillStyle=r.css;else if(e.isBgDefault())this._ctx.fillStyle=d.color.opaque(this._colors.background).css;else if(e.isBgRGB())this._ctx.fillStyle="rgb("+c.AttributeData.toColorRGB(e.getBgColor()).join(",")+")";else{var n=e.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&n<8&&(n+=8),this._ctx.fillStyle=this._colors.ansi[n].css}else if(r)this._ctx.fillStyle=r.css;else if(e.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(e.isFgRGB())this._ctx.fillStyle="rgb("+c.AttributeData.toColorRGB(e.getFgColor()).join(",")+")";else{var o=e.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&o<8&&(o+=8),this._ctx.fillStyle=this._colors.ansi[o].css}this._clipRow(i),e.isDim()&&(this._ctx.globalAlpha=a.DIM_OPACITY),this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},l.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},l.prototype._getFont=function(e,t){return(t?"italic":"")+" "+(e?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},l.prototype._getContrastColor=function(e){if(1!==this._optionsService.options.minimumContrastRatio){var t=this._colors.contrastCache.getColor(e.bg,e.fg);if(void 0!==t)return t||void 0;var i=e.getFgColor(),r=e.getFgColorMode(),n=e.getBgColor(),o=e.getBgColorMode(),s=!!e.isInverse(),a=!!e.isInverse();if(s){var c=i;i=n,n=c;var l=r;r=o,o=l}var h=this._resolveBackgroundRgba(o,n,s),u=this._resolveForegroundRgba(r,i,s,a),f=d.rgba.ensureContrastRatio(h,u,this._optionsService.options.minimumContrastRatio);if(f){var _={css:d.channels.toCss(f>>24&255,f>>16&255,f>>8&255),rgba:f};return this._colors.contrastCache.setColor(e.bg,e.fg,_),_}this._colors.contrastCache.setColor(e.bg,e.fg,null)}},l.prototype._resolveBackgroundRgba=function(e,t,i){switch(e){case 16777216:case 33554432:return this._colors.ansi[t].rgba;case 50331648:return t<<8;case 0:default:return i?this._colors.foreground.rgba:this._colors.background.rgba}},l.prototype._resolveForegroundRgba=function(e,t,i,r){switch(e){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&r&&t<8&&(t+=8),this._colors.ansi[t].rgba;case 50331648:return t<<8;case 0:default:return i?this._colors.background.rgba:this._colors.foreground.rgba}},l);function l(e,t,i,r,n,o,s,a){this._container=e,this._alpha=r,this._colors=n,this._rendererId=o,this._bufferService=s,this._optionsService=a,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+t+"-layer"),this._canvas.style.zIndex=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}t.BaseRenderLayer=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="di$target",o="di$dependencies";t.serviceRegistry=new Map,t.getServiceDependencies=function(e){return e[o]||[]},t.createDecorator=function(e){if(t.serviceRegistry.has(e))return t.serviceRegistry.get(e);var r=function(e,t,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,i){t[n]===t?t[o].push({id:e,index:i}):(t[o]=[{id:e,index:i}],t[n]=t)}(r,e,i)};return r.toString=function(){return e},t.serviceRegistry.set(e,r),r}},function(e,t,i){"use strict";function n(e,t,i,r){if(void 0===i&&(i=0),void 0===r&&(r=e.length),i>=e.length)return e;i=(e.length+i)%e.length,r=r>=e.length?e.length:(e.length+r)%e.length;for(var n=i;n<r;++n)e[n]=t;return e}Object.defineProperty(t,"__esModule",{value:!0}),t.fill=function(e,t,i,r){return e.fill?e.fill(t,i,r):n(e,t,i,r)},t.fillFallback=n,t.concat=function(e,t){var i=new e.constructor(e.length+t.length);return i.set(e),i.set(t,e.length),i}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(7),a=i(3),h=i(5),r=i(6);t.DEFAULT_ATTR_DATA=Object.freeze(new r.AttributeData);var n=(o.prototype.get=function(e){var t=this._data[3*e+0],i=2097151&t;return[this._data[3*e+1],2097152&t?this._combined[e]:i?s.stringFromCodePoint(i):"",t>>22,2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):i]},o.prototype.set=function(e,t){this._data[3*e+1]=t[a.CHAR_DATA_ATTR_INDEX],1<t[a.CHAR_DATA_CHAR_INDEX].length?(this._combined[e]=t[1],this._data[3*e+0]=2097152|e|t[a.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*e+0]=t[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|t[a.CHAR_DATA_WIDTH_INDEX]<<22},o.prototype.getWidth=function(e){return this._data[3*e+0]>>22},o.prototype.hasWidth=function(e){return 12582912&this._data[3*e+0]},o.prototype.getFg=function(e){return this._data[3*e+1]},o.prototype.getBg=function(e){return this._data[3*e+2]},o.prototype.hasContent=function(e){return 4194303&this._data[3*e+0]},o.prototype.getCodePoint=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&t},o.prototype.isCombined=function(e){return 2097152&this._data[3*e+0]},o.prototype.getString=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e]:2097151&t?s.stringFromCodePoint(2097151&t):""},o.prototype.loadCell=function(e,t){var i=3*e;return t.content=this._data[0+i],t.fg=this._data[1+i],t.bg=this._data[2+i],2097152&t.content&&(t.combinedData=this._combined[e]),t},o.prototype.setCell=function(e,t){2097152&t.content&&(this._combined[e]=t.combinedData),this._data[3*e+0]=t.content,this._data[3*e+1]=t.fg,this._data[3*e+2]=t.bg},o.prototype.setCellFromCodePoint=function(e,t,i,r,n){this._data[3*e+0]=t|i<<22,this._data[3*e+1]=r,this._data[3*e+2]=n},o.prototype.addCodepointToCell=function(e,t){var i=this._data[3*e+0];2097152&i?this._combined[e]+=s.stringFromCodePoint(t):(2097151&i?(this._combined[e]=s.stringFromCodePoint(2097151&i)+s.stringFromCodePoint(t),i&=-2097152,i|=2097152):i=t|1<<22,this._data[3*e+0]=i)},o.prototype.insertCells=function(e,t,i,r){var n,o,s,a;if((e%=this.length)&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null===(n=r)||void 0===n?void 0:n.fg)||0,(null===(o=r)||void 0===o?void 0:o.bg)||0),t<this.length-e){for(var c=new h.CellData,l=this.length-e-t-1;0<=l;--l)this.setCell(e+t+l,this.loadCell(e+l,c));for(l=0;l<t;++l)this.setCell(e+l,i)}else for(l=e;l<this.length;++l)this.setCell(l,i);2===this.getWidth(this.length-1)&&this.setCellFromCodePoint(this.length-1,0,1,(null===(s=r)||void 0===s?void 0:s.fg)||0,(null===(a=r)||void 0===a?void 0:a.bg)||0)},o.prototype.deleteCells=function(e,t,i,r){var n,o,s,a;if(e%=this.length,t<this.length-e){for(var c=new h.CellData,l=0;l<this.length-e-t;++l)this.setCell(e+l,this.loadCell(e+t+l,c));for(l=this.length-t;l<this.length;++l)this.setCell(l,i)}else for(l=e;l<this.length;++l)this.setCell(l,i);e&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null===(n=r)||void 0===n?void 0:n.fg)||0,(null===(o=r)||void 0===o?void 0:o.bg)||0),0!==this.getWidth(e)||this.hasContent(e)||this.setCellFromCodePoint(e,0,1,(null===(s=r)||void 0===s?void 0:s.fg)||0,(null===(a=r)||void 0===a?void 0:a.bg)||0)},o.prototype.replaceCells=function(e,t,i,r){var n,o,s,a;for(e&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null===(n=r)||void 0===n?void 0:n.fg)||0,(null===(o=r)||void 0===o?void 0:o.bg)||0),t<this.length&&2===this.getWidth(t-1)&&this.setCellFromCodePoint(t,0,1,(null===(s=r)||void 0===s?void 0:s.fg)||0,(null===(a=r)||void 0===a?void 0:a.bg)||0);e<t&&e<this.length;)this.setCell(e++,i)},o.prototype.resize=function(e,t){if(e!==this.length){if(e>this.length){var i=new Uint32Array(3*e);this.length&&(3*e<this._data.length?i.set(this._data.subarray(0,3*e)):i.set(this._data)),this._data=i;for(var r=this.length;r<e;++r)this.setCell(r,t)}else if(e){(i=new Uint32Array(3*e)).set(this._data.subarray(0,3*e)),this._data=i;var n=Object.keys(this._combined);for(r=0;r<n.length;r++){var o=parseInt(n[r],10);e<=o&&delete this._combined[o]}}else this._data=new Uint32Array(0),this._combined={};this.length=e}},o.prototype.fill=function(e){this._combined={};for(var t=0;t<this.length;++t)this.setCell(t,e)},o.prototype.copyFrom=function(e){for(var t in this.length!==e.length?this._data=new Uint32Array(e._data):this._data.set(e._data),this.length=e.length,this._combined={},e._combined)this._combined[t]=e._combined[t];this.isWrapped=e.isWrapped},o.prototype.clone=function(){var e=new o(0);for(var t in e._data=new Uint32Array(this._data),e.length=this.length,this._combined)e._combined[t]=this._combined[t];return e.isWrapped=this.isWrapped,e},o.prototype.getTrimmedLength=function(){for(var e=this.length-1;0<=e;--e)if(4194303&this._data[3*e+0])return e+(this._data[3*e+0]>>22);return 0},o.prototype.copyCellsFrom=function(e,t,i,r,n){var o=e._data;if(n)for(var s=r-1;0<=s;s--)for(var a=0;a<3;a++)this._data[3*(i+s)+a]=o[3*(t+s)+a];else for(s=0;s<r;s++)for(a=0;a<3;a++)this._data[3*(i+s)+a]=o[3*(t+s)+a];var c=Object.keys(e._combined);for(a=0;a<c.length;a++){var l=parseInt(c[a],10);t<=l&&(this._combined[l-t+i]=e._combined[l])}},o.prototype.translateToString=function(e,t,i){void 0===e&&(e=!1),void 0===t&&(t=0),void 0===i&&(i=this.length),e&&(i=Math.min(i,this.getTrimmedLength()));for(var r="";t<i;){var n=this._data[3*t+0],o=2097151&n;r+=2097152&n?this._combined[t]:o?s.stringFromCodePoint(o):a.WHITESPACE_CELL_CHAR,t+=n>>22||1}return r},o);function o(e,t,i){void 0===i&&(i=!1),this.isWrapped=i,this._combined={},this._data=new Uint32Array(3*e);for(var r=t||h.CellData.fromCharData([0,a.NULL_CELL_CHAR,a.NULL_CELL_WIDTH,a.NULL_CELL_CODE]),n=0;n<e;++n)this.setCell(n,r);this.length=e}t.BufferLine=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promptLabel="Terminal input",t.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CHARSETS={},t.DEFAULT_CHARSET=t.CHARSETS.B,t.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},t.CHARSETS.A={"#":"£"},t.CHARSETS.B=null,t.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},t.CHARSETS.C=t.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},t.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},t.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},t.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},t.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},t.CHARSETS.E=t.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},t.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},t.CHARSETS.H=t.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},t.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(o.fromArray=function(e){var t=new o;if(!e.length)return t;for(var i=e[0]instanceof Array?1:0;i<e.length;++i){var r=e[i];if(r instanceof Array)for(var n=0;n<r.length;++n)t.addSubParam(r[n]);else t.addParam(r)}return t},o.prototype.clone=function(){var e=new o(this.maxLength,this.maxSubParamsLength);return e.params.set(this.params),e.length=this.length,e._subParams.set(this._subParams),e._subParamsLength=this._subParamsLength,e._subParamsIdx.set(this._subParamsIdx),e._rejectDigits=this._rejectDigits,e._rejectSubDigits=this._rejectSubDigits,e._digitIsSub=this._digitIsSub,e},o.prototype.toArray=function(){for(var e=[],t=0;t<this.length;++t){e.push(this.params[t]);var i=this._subParamsIdx[t]>>8,r=255&this._subParamsIdx[t];0<r-i&&e.push(Array.prototype.slice.call(this._subParams,i,r))}return e},o.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},o.prototype.addParam=function(e){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=2147483647<e?2147483647:e}},o.prototype.addSubParam=function(e){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=2147483647<e?2147483647:e,this._subParamsIdx[this.length-1]++}},o.prototype.hasSubParams=function(e){return 0<(255&this._subParamsIdx[e])-(this._subParamsIdx[e]>>8)},o.prototype.getSubParams=function(e){var t=this._subParamsIdx[e]>>8,i=255&this._subParamsIdx[e];return 0<i-t?this._subParams.subarray(t,i):null},o.prototype.getSubParamsAll=function(){for(var e={},t=0;t<this.length;++t){var i=this._subParamsIdx[t]>>8,r=255&this._subParamsIdx[t];0<r-i&&(e[t]=this._subParams.slice(i,r))}return e},o.prototype.addDigit=function(e){var t;if(!(this._rejectDigits||!(t=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var i=this._digitIsSub?this._subParams:this.params,r=i[t-1];i[t-1]=~r?Math.min(10*r+e,2147483647):e}},o);function o(e,t){if(void 0===e&&(e=32),void 0===t&&(t=32),this.maxLength=e,256<(this.maxSubParamsLength=t))throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(e),this.length=0,this._subParams=new Int32Array(t),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(e),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}t.Params=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(21),o=i(7),n=(s.prototype.addHandler=function(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);var i=this._handlers[e];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},s.prototype.setHandler=function(e,t){this._handlers[e]=[t]},s.prototype.clearHandler=function(e){this._handlers[e]&&delete this._handlers[e]},s.prototype.setHandlerFallback=function(e){this._handlerFb=e},s.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},s.prototype.reset=function(){2===this._state&&this.end(!1),this._id=-1,this._state=0},s.prototype._start=function(){var e=this._handlers[this._id];if(e)for(var t=e.length-1;0<=t;t--)e[t].start();else this._handlerFb(this._id,"START")},s.prototype._put=function(e,t,i){var r=this._handlers[this._id];if(r)for(var n=r.length-1;0<=n;n--)r[n].put(e,t,i);else this._handlerFb(this._id,"PUT",o.utf32ToString(e,t,i))},s.prototype._end=function(e){var t=this._handlers[this._id];if(t){for(var i=t.length-1;0<=i&&!1===t[i].end(e);i--);for(i--;0<=i;i--)t[i].end(!1)}else this._handlerFb(this._id,"END",e)},s.prototype.start=function(){this.reset(),this._id=-1,this._state=1},s.prototype.put=function(e,t,i){if(3!==this._state){if(1===this._state)for(;t<i;){var r=e[t++];if(59===r){this._state=2,this._start();break}if(r<48||57<r)return void(this._state=3);-1===this._id&&(this._id=0),this._id=10*this._id+r-48}2===this._state&&0<i-t&&this._put(e,t,i)}},s.prototype.end=function(e){0!==this._state&&(3!==this._state&&(1===this._state&&this._start(),this._end(e)),this._id=-1,this._state=0)},s);function s(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}t.OscParser=n;var a=(c.prototype.start=function(){this._data="",this._hitLimit=!1},c.prototype.put=function(e,t,i){this._hitLimit||(this._data+=o.utf32ToString(e,t,i),this._data.length>r.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},c.prototype.end=function(e){var t;return this._hitLimit?t=!1:e&&(t=this._handler(this._data)),this._data="",this._hitLimit=!1,t},c);function c(e){this._handler=e,this._data="",this._hitLimit=!1}t.OscHandler=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PAYLOAD_LIMIT=1e7},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(7),r=i(19),o=i(21),s=[],a=(c.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},c.prototype.addHandler=function(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);var i=this._handlers[e];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},c.prototype.setHandler=function(e,t){this._handlers[e]=[t]},c.prototype.clearHandler=function(e){this._handlers[e]&&delete this._handlers[e]},c.prototype.setHandlerFallback=function(e){this._handlerFb=e},c.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=s,this._ident=0},c.prototype.hook=function(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||s,this._active.length)for(var i=this._active.length-1;0<=i;i--)this._active[i].hook(t);else this._handlerFb(this._ident,"HOOK",t)},c.prototype.put=function(e,t,i){if(this._active.length)for(var r=this._active.length-1;0<=r;r--)this._active[r].put(e,t,i);else this._handlerFb(this._ident,"PUT",n.utf32ToString(e,t,i))},c.prototype.unhook=function(e){if(this._active.length){for(var t=this._active.length-1;0<=t&&!1===this._active[t].unhook(e);t--);for(t--;0<=t;t--)this._active[t].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",e);this._active=s,this._ident=0},c);function c(){this._handlers=Object.create(null),this._active=s,this._ident=0,this._handlerFb=function(){}}t.DcsParser=a;var l=(h.prototype.hook=function(e){this._params=e.clone(),this._data="",this._hitLimit=!1},h.prototype.put=function(e,t,i){this._hitLimit||(this._data+=n.utf32ToString(e,t,i),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},h.prototype.unhook=function(e){var t;return this._hitLimit?t=!1:e&&(t=this._handler(this._data,this._params?this._params:new r.Params)),this._params=void 0,this._data="",this._hitLimit=!1,t},h);function h(e){this._handler=e,this._data="",this._hitLimit=!1}t.DcsHandler=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=i(24),u=i(42),f=[];t.acquireCharAtlas=function(e,t,i,r,n){for(var o=h.generateConfig(r,n,e,i),s=0;s<f.length;s++){var a=(c=f[s]).ownedBy.indexOf(t);if(0<=a){if(h.configEquals(c.config,o))return c.atlas;1===c.ownedBy.length?(c.atlas.dispose(),f.splice(s,1)):c.ownedBy.splice(a,1);break}}for(s=0;s<f.length;s++){var c=f[s];if(h.configEquals(c.config,o))return c.ownedBy.push(t),c.atlas}var l={atlas:new u.DynamicCharAtlas(document,o),config:o,ownedBy:[t]};return f.push(l),l.atlas},t.removeTerminalFromCache=function(e){for(var t=0;t<f.length;t++){var i=f[t].ownedBy.indexOf(e);if(-1!==i){1===f[t].ownedBy.length?(f[t].atlas.dispose(),f.splice(t,1)):f[t].ownedBy.splice(i,1);break}}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(3);t.generateConfig=function(e,t,i,r){var n={foreground:r.foreground,background:r.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:r.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:e,scaledCharHeight:t,fontFamily:i.fontFamily,fontSize:i.fontSize,fontWeight:i.fontWeight,fontWeightBold:i.fontWeightBold,allowTransparency:i.allowTransparency,colors:n}},t.configEquals=function(e,t){for(var i=0;i<e.colors.ansi.length;i++)if(e.colors.ansi[i].rgba!==t.colors.ansi[i].rgba)return!1;return e.devicePixelRatio===t.devicePixelRatio&&e.fontFamily===t.fontFamily&&e.fontSize===t.fontSize&&e.fontWeight===t.fontWeight&&e.fontWeightBold===t.fontWeightBold&&e.allowTransparency===t.allowTransparency&&e.scaledCharWidth===t.scaledCharWidth&&e.scaledCharHeight===t.scaledCharHeight&&e.colors.foreground===t.colors.foreground&&e.colors.background===t.colors.background},t.is256Color=function(e){return e<r.DEFAULT_COLOR}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var h=t(10),o=t(44),s=h.css.toColor("#ffffff"),a=h.css.toColor("#000000"),c=h.css.toColor("#ffffff"),l=h.css.toColor("#000000"),u={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=function(){for(var e=[h.css.toColor("#2e3436"),h.css.toColor("#cc0000"),h.css.toColor("#4e9a06"),h.css.toColor("#c4a000"),h.css.toColor("#3465a4"),h.css.toColor("#75507b"),h.css.toColor("#06989a"),h.css.toColor("#d3d7cf"),h.css.toColor("#555753"),h.css.toColor("#ef2929"),h.css.toColor("#8ae234"),h.css.toColor("#fce94f"),h.css.toColor("#729fcf"),h.css.toColor("#ad7fa8"),h.css.toColor("#34e2e2"),h.css.toColor("#eeeeec")],t=[0,95,135,175,215,255],i=0;i<216;i++){var r=t[i/36%6|0],n=t[i/6%6|0],o=t[i%6];e.push({css:h.channels.toCss(r,n,o),rgba:h.channels.toRgba(r,n,o)})}for(i=0;i<24;i++){var s=8+10*i;e.push({css:h.channels.toCss(s,s,s),rgba:h.channels.toRgba(s,s,s)})}return e}();var i=(r.prototype.onOptionsChange=function(e){"minimumContrastRatio"===e&&this._contrastCache.clear()},r.prototype.setTheme=function(e){void 0===e&&(e={}),this.colors.foreground=this._parseColor(e.foreground,s),this.colors.background=this._parseColor(e.background,a),this.colors.cursor=this._parseColor(e.cursor,c,!0),this.colors.cursorAccent=this._parseColor(e.cursorAccent,l,!0),this.colors.selection=this._parseColor(e.selection,u,!0),this.colors.selectionOpaque=h.color.blend(this.colors.background,this.colors.selection),this.colors.ansi[0]=this._parseColor(e.black,n.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(e.red,n.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(e.green,n.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(e.yellow,n.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(e.blue,n.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(e.magenta,n.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(e.cyan,n.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(e.white,n.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(e.brightBlack,n.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(e.brightRed,n.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(e.brightGreen,n.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(e.brightYellow,n.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(e.brightBlue,n.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(e.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(e.brightCyan,n.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(e.brightWhite,n.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},r.prototype._parseColor=function(e,t,i){if(void 0===i&&(i=this.allowTransparency),void 0===e)return t;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=e,"string"!=typeof this._ctx.fillStyle)return console.warn("Color: "+e+" is invalid using fallback "+t.css),t;this._ctx.fillRect(0,0,1,1);var r=this._ctx.getImageData(0,0,1,1).data;if(255===r[3])return{css:this._ctx.fillStyle,rgba:h.channels.toRgba(r[0],r[1],r[2],r[3])};if(!i)return console.warn("Color: "+e+" is using transparency, but allowTransparency is false. Using fallback "+t.css+"."),t;var n=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(e){return Number(e)}),o=n[0],s=n[1],a=n[2],c=n[3],l=Math.round(255*c);return{rgba:h.channels.toRgba(o,s,a,l),css:h.channels.toCss(o,s,a,l)}},r);function r(e,t){this.allowTransparency=t;var i=e.createElement("canvas");i.width=1,i.height=1;var r=i.getContext("2d");if(!r)throw new Error("Could not get rendering context");this._ctx=r,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new o.ColorContrastCache,this.colors={foreground:s,background:a,cursor:c,cursorAccent:l,selection:u,selectionOpaque:h.color.blend(a,u),ansi:n.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}n.ColorManager=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfFalsy=function(e){if(!e)throw new Error("value must not be falsy");return e}},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=i(6),f=i(3),a=i(5),c=(o=s.AttributeData,n(l,o),l.prototype.isCombined=function(){return 2097152},l.prototype.getWidth=function(){return this._width},l.prototype.getChars=function(){return this.combinedData},l.prototype.getCode=function(){return 2097151},l.prototype.setFromCharData=function(e){throw new Error("not implemented")},l.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},l);function l(e,t,i){var r=o.call(this)||this;return r.content=0,r.combinedData="",r.fg=e.fg,r.bg=e.bg,r.combinedData=t,r._width=i,r}t.JoinedCellData=c;var h=(u.prototype.registerCharacterJoiner=function(e){var t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id},u.prototype.deregisterCharacterJoiner=function(e){for(var t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1},u.prototype.getJoinedCharacters=function(e){if(0===this._characterJoiners.length)return[];var t=this._bufferService.buffer.lines.get(e);if(!t||0===t.length)return[];for(var i=[],r=t.translateToString(!0),n=0,o=0,s=0,a=t.getFg(0),c=t.getBg(0),l=0;l<t.getTrimmedLength();l++)if(t.loadCell(l,this._workCell),0!==this._workCell.getWidth()){if(this._workCell.fg!==a||this._workCell.bg!==c){if(1<l-n)for(var h=this._getJoinedRanges(r,s,o,t,n),u=0;u<h.length;u++)i.push(h[u]);n=l,s=o,a=this._workCell.fg,c=this._workCell.bg}o+=this._workCell.getChars().length||f.WHITESPACE_CELL_CHAR.length}if(1<this._bufferService.cols-n)for(h=this._getJoinedRanges(r,s,o,t,n),u=0;u<h.length;u++)i.push(h[u]);return i},u.prototype._getJoinedRanges=function(e,t,i,r,n){for(var o=e.substring(t,i),s=this._characterJoiners[0].handler(o),a=1;a<this._characterJoiners.length;a++)for(var c=this._characterJoiners[a].handler(o),l=0;l<c.length;l++)u._mergeRanges(s,c[l]);return this._stringRangesToCellRanges(s,r,n),s},u.prototype._stringRangesToCellRanges=function(e,t,i){var r=0,n=!1,o=0,s=e[r];if(s){for(var a=i;a<this._bufferService.cols;a++){var c=t.getWidth(a),l=t.getString(a).length||f.WHITESPACE_CELL_CHAR.length;if(0!==c){if(!n&&s[0]<=o&&(s[0]=a,n=!0),s[1]<=o){if(s[1]=a,!(s=e[++r]))break;n=s[0]<=o&&(s[0]=a,!0)}o+=l}}s&&(s[1]=this._bufferService.cols)}},u._mergeRanges=function(e,t){for(var i=!1,r=0;r<e.length;r++){var n=e[r];if(i){if(t[1]<=n[0])return e[r-1][1]=t[1],e;if(t[1]<=n[1])return e[r-1][1]=Math.max(t[1],n[1]),e.splice(r,1),e;e.splice(r,1),r--}else{if(t[1]<=n[0])return e.splice(r,0,t),e;if(t[1]<=n[1])return n[0]=Math.min(t[0],n[0]),e;t[0]<n[1]&&(n[0]=Math.min(t[0],n[0]),i=!0)}}return i?e[e.length-1][1]=t[1]:e.push(t),e},u);function u(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new a.CellData}t.CharacterJoinerRegistry=h},function(e,t,i){"use strict";function l(e,t){var i=t.getBoundingClientRect();return[e.clientX-i.left,e.clientY-i.top]}Object.defineProperty(t,"__esModule",{value:!0}),t.getCoordsRelativeToElement=l,t.getCoords=function(e,t,i,r,n,o,s,a){if(n){var c=l(e,t);if(c)return c[0]=Math.ceil((c[0]+(a?o/2:0))/o),c[1]=Math.ceil(c[1]/s),c[0]=Math.min(Math.max(c[0],1),i+(a?1:0)),c[1]=Math.min(Math.max(c[1],1),r),c}},t.getRawByteCoords=function(e){if(e)return{x:e[0]+32,y:e[1]+32}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},n.prototype.refresh=function(e,t,i){var r=this;this._rowCount=i,e=void 0!==e?e:0,t=void 0!==t?t:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,e):e,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,t):t,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return r._innerRefresh()}))},n.prototype._innerRefresh=function(){void 0!==this._rowStart&&void 0!==this._rowEnd&&void 0!==this._rowCount&&(this._rowStart=Math.max(this._rowStart,0),this._rowEnd=Math.min(this._rowEnd,this._rowCount-1),this._renderCallback(this._rowStart,this._rowEnd),this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0)},n);function n(e){this._renderCallback=e}t.RenderDebouncer=r},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=(o=i(2).Disposable,n(a,o),a.prototype.setListener=function(e){var t=this;this._listener&&this.clearListener(),this._listener=e,this._outerListener=function(){t._listener&&(t._listener(window.devicePixelRatio,t._currentDevicePixelRatio),t._updateDpr())},this._updateDpr()},a.prototype.dispose=function(){o.prototype.dispose.call(this),this.clearListener()},a.prototype._updateDpr=function(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},a.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},a);function a(){var e=null!==o&&o.apply(this,arguments)||this;return e._currentDevicePixelRatio=window.devicePixelRatio,e}t.ScreenDprMonitor=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clone=function e(t,i){if(void 0===i&&(i=5),"object"!=typeof t)return t;var r=Array.isArray(t)?[]:{};for(var n in t)r[n]=i<=1?t[n]:t[n]?e(t[n],i-1):t[n];return r}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(5),n=i(33),o=i(17),s=i(80),a=(Object.defineProperty(c.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"onData",{get:function(){return this._core.onData},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"onKey