>10))+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)},i.utf32ToString=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=e.length);for(var r="",n=t;n>10))+String.fromCharCode(s%1024+56320)):r+=String.fromCharCode(s)}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 s=n;s=i)return this._interim=o,r;var a;56320<=(a=e.charCodeAt(s))&&a<=57343?t[r++]=1024*(o-55296)+a-56320+65536:(t[r++]=o,t[r++]=a)}else t[r++]=o}return r},n);function n(){this._interim=0}i.StringToUtf32=r;var s=(o.prototype.clear=function(){this.interim.fill(0)},o.prototype.decode=function(e,t){var i=e.length;if(!i)return 0;var r,n,s,o,a=0,l=0,h=0;if(this.interim[0]){var c=!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;h=this._endCol&ðis._endRow?"A":"B"},s.prototype._bufferLine=function(e,t,i,r,n){for(var s=e,o=t,a="";s!==i||o!==r;)s+=n?1:-1,n&&s>this._terminal.cols-1?(a+=this._terminal.buffer.translateBufferLineToString(o,!1,e,s),e=s=0,o++):!n&&s<0&&(a+=this._terminal.buffer.translateBufferLineToString(o,!1,0,e+1),e=s=this._terminal.cols-1,o--);return a+this._terminal.buffer.translateBufferLineToString(o,!1,e,s)},s.prototype._sequence=function(e){var t=this._terminal.applicationCursor?"O":"[";return r.C0.ESC+t+e},s);function s(e,t){var i;this._mouseEvent=e,this._terminal=t,this._lines=this._terminal.buffer.lines,this._startCol=this._terminal.buffer.x,this._startRow=this._terminal.buffer.y;var r=this._terminal.mouseHelper.getCoords(this._mouseEvent,this._terminal.element,this._terminal.charMeasure,this._terminal.cols,this._terminal.rows,!1);r&&(i=r.map(function(e){return e-1}),this._endCol=i[0],this._endRow=i[1])}function o(e,t){e=Math.floor(e);for(var i="",r=0;r=this._line.length))return new f(this._line,e)},u.prototype.translateToString=function(e,t,i){return this._line.translateToString(e,t,i)},u);function u(e){this._line=e}var f=(Object.defineProperty(_.prototype,"char",{get:function(){return this._line.getString(this._x)},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"width",{get:function(){return this._line.getWidth(this._x)},enumerable:!0,configurable:!0}),_);function _(e,t){this._line=e,this._x=t}},{"../Strings":16,"../Terminal":17,"./AddonManager":36}],38:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=e("../common/Types"),a=e("./atlas/Types"),r=e("./atlas/CharAtlasCache"),l=e("../core/buffer/BufferLine"),n=(s.prototype.dispose=function(){this._container.removeChild(this._canvas),this._charAtlas&&this._charAtlas.dispose()},s.prototype._initCanvas=function(){this._ctx=this._canvas.getContext("2d",{alpha:this._alpha}),this._alpha||this.clearAll()},s.prototype.onOptionsChanged=function(e){},s.prototype.onBlur=function(e){},s.prototype.onFocus=function(e){},s.prototype.onCursorMove=function(e){},s.prototype.onGridChanged=function(e,t,i){},s.prototype.onSelectionChanged=function(e,t,i,r){void 0===r&&(r=!1)},s.prototype.setColors=function(e,t){this._refreshCharAtlas(e,t)},s.prototype.setTransparency=function(e,t){if(t!==this._alpha){var i=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,i),this._refreshCharAtlas(e,this._colors),this.onGridChanged(e,0,e.rows-1)}},s.prototype._refreshCharAtlas=function(e,t){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=r.acquireCharAtlas(e,t,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},s.prototype.resize=function(e,t){this._scaledCellWidth=t.scaledCellWidth,this._scaledCellHeight=t.scaledCellHeight,this._scaledCharWidth=t.scaledCharWidth,this._scaledCharHeight=t.scaledCharHeight,this._scaledCharLeft=t.scaledCharLeft,this._scaledCharTop=t.scaledCharTop,this._canvas.width=t.scaledCanvasWidth,this._canvas.height=t.scaledCanvasHeight,this._canvas.style.width=t.canvasWidth+"px",this._canvas.style.height=t.canvasHeight+"px",this._alpha||this.clearAll(),this._refreshCharAtlas(e,this._colors)},s.prototype.fillCells=function(e,t,i,r){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight)},s.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)},s.prototype.fillLeftLineAtCell=function(e,t){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,window.devicePixelRatio,this._scaledCellHeight)},s.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)},s.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))},s.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))},s.prototype.fillCharTrueColor=function(e,t,i,r){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline="middle",this._clipRow(e,r),this._ctx.fillText(t.getChars(),i*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},s.prototype.drawChars=function(e,t,i,r){var n,s;t.isFgRGB()||t.isBgRGB()?this._drawUncachedChars(e,t,i,r):(t.isInverse()?(n=t.isBgDefault()?a.INVERTED_DEFAULT_COLOR:t.getBgColor(),s=t.isFgDefault()?a.INVERTED_DEFAULT_COLOR:t.getFgColor()):(s=t.isBgDefault()?o.DEFAULT_COLOR:t.getBgColor(),n=t.isFgDefault()?o.DEFAULT_COLOR:t.getFgColor()),n+=e.options.drawBoldTextInBrightColors&&t.isBold()&&n<8&&n!==a.INVERTED_DEFAULT_COLOR?8:0,this._currentGlyphIdentifier.chars=t.getChars()||l.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=t.getCode()||l.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=s,this._currentGlyphIdentifier.fg=n,this._currentGlyphIdentifier.bold=t.isBold()&&e.options.enableBold,this._currentGlyphIdentifier.dim=!!t.isDim(),this._currentGlyphIdentifier.italic=!!t.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,i*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(e,t,i,r))},s.prototype._drawUncachedChars=function(e,t,i,r){if(this._ctx.save(),this._ctx.font=this._getFont(e,t.isBold()&&e.options.enableBold,!!t.isItalic()),this._ctx.textBaseline="middle",t.isInverse())t.isBgDefault()?this._ctx.fillStyle=this._colors.background.css:t.isBgRGB()?this._ctx.fillStyle="rgb("+l.AttributeData.toColorRGB(t.getBgColor()).join(",")+")":this._ctx.fillStyle=this._colors.ansi[t.getBgColor()].css;else if(t.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(t.isFgRGB())this._ctx.fillStyle="rgb("+l.AttributeData.toColorRGB(t.getFgColor()).join(",")+")";else{var n=t.getFgColor();e.options.drawBoldTextInBrightColors&&t.isBold()&&n<8&&(n+=8),this._ctx.fillStyle=this._colors.ansi[n].css}this._clipRow(e,r),t.isDim()&&(this._ctx.globalAlpha=a.DIM_OPACITY),this._ctx.fillText(t.getChars(),i*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},s.prototype._clipRow=function(e,t){this._ctx.beginPath(),this._ctx.rect(0,t*this._scaledCellHeight,e.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},s.prototype._getFont=function(e,t,i){return(i?"italic":"")+" "+(t?e.options.fontWeightBold:e.options.fontWeight)+" "+e.options.fontSize*window.devicePixelRatio+"px "+e.options.fontFamily},s);function s(e,t,i,r,n){this._container=e,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._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)}i.BaseRenderLayer=n},{"../common/Types":27,"../core/buffer/BufferLine":29,"./atlas/CharAtlasCache":48,"./atlas/Types":55}],39:[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(i,"__esModule",{value:!0});var s,f=e("../core/buffer/BufferLine"),o=(s=f.AttributeData,n(a,s),a.prototype.isCombined=function(){return 2097152},a.prototype.getWidth=function(){return this._width},a.prototype.getChars=function(){return this.combinedData},a.prototype.getCode=function(){return 2097151},a.prototype.setFromCharData=function(e){throw new Error("not implemented")},a.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},a);function a(e,t,i){var r=s.call(this)||this;return r.content=0,r.combinedData="",r.fg=e.fg,r.bg=e.bg,r.combinedData=t,r._width=i,r}i.JoinedCellData=o;var l=(c.prototype.registerCharacterJoiner=function(e){var t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id},c.prototype.deregisterCharacterJoiner=function(e){for(var t=0;t=e.rows)this._clearCursor();else if(e.buffer.lines.get(i).loadCell(e.buffer.x,this._cell),void 0!==this._cell.content){if(!e.isFocused)return this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._renderBlurCursor(e,e.buffer.x,r,this._cell),this._ctx.restore(),this._state.x=e.buffer.x,this._state.y=r,this._state.isFocused=!1,this._state.style=e.options.cursorStyle,void(this._state.width=this._cell.getWidth());if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===e.buffer.x&&this._state.y===r&&this._state.isFocused===e.isFocused&&this._state.style===e.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[e.options.cursorStyle||"block"](e,e.buffer.x,r,this._cell),this._ctx.restore(),this._state.x=e.buffer.x,this._state.y=r,this._state.isFocused=!1,this._state.style=e.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}else this._clearCursor()},h.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})},h.prototype._renderBarCursor=function(e,t,i,r){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this.fillLeftLineAtCell(t,i),this._ctx.restore()},h.prototype._renderBlockCursor=function(e,t,i,r){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this.fillCells(t,i,r.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this.fillCharTrueColor(e,r,t,i),this._ctx.restore()},h.prototype._renderUnderlineCursor=function(e,t,i,r){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this.fillBottomLineAtCells(t,i),this._ctx.restore()},h.prototype._renderBlurCursor=function(e,t,i,r){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this.strokeRectAtCell(t,i,r.getWidth(),1),this._ctx.restore()},h);function h(e,t,i){var r=s.call(this,e,"cursor",t,!0,i)||this;return r._cell=new a.CellData,r._state={x:null,y:null,isFocused:null,style:null,width:null},r._cursorRenderers={bar:r._renderBarCursor.bind(r),block:r._renderBlockCursor.bind(r),underline:r._renderUnderlineCursor.bind(r)},r}i.CursorRenderLayer=l;var c=(Object.defineProperty(u.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!0,configurable:!0}),u.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)},u.prototype.restartBlinkAnimation=function(e){var t=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){t._renderCallback(),t._animationFrame=null})))},u.prototype._restartInterval=function(e){var t=this;void 0===e&&(e=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=setTimeout(function(){if(t._animationTimeRestarted){var e=600-(Date.now()-t._animationTimeRestarted);if(t._animationTimeRestarted=null,0=e.rows||a<0)){if(this._ctx.fillStyle=this._colors.selection.css,r){var l=t[0],h=i[0]-l,c=a-o+1;this.fillCells(l,o,h,c)}else{l=n===o?t[0]:0;var u=o===a?i[0]:e.cols;this.fillCells(l,o,u-l,1);var f=Math.max(a-o-1,0);if(this.fillCells(0,o+1,e.cols,f),o!==a){var _=s===a?i[0]:e.cols;this.fillCells(0,a,_,1)}}this._state.start=[t[0],t[1]],this._state.end=[i[0],i[1]],this._state.columnSelectMode=r,this._state.ydisp=e.buffer.ydisp}}else this._clearState()},l.prototype._didStateChange=function(e,t,i,r){return!this._areCoordinatesEqual(e,this._state.start)||!this._areCoordinatesEqual(t,this._state.end)||i!==this._state.columnSelectMode||r!==this._state.ydisp},l.prototype._areCoordinatesEqual=function(e,t){return!(!e||!t)&&e[0]===t[0]&&e[1]===t[1]},l);function l(e,t,i){var r=s.call(this,e,"selection",t,!0,i)||this;return r._clearState(),r}i.SelectionRenderLayer=a},{"./BaseRenderLayer":38}],46:[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(i,"__esModule",{value:!0});var o,a=e("./GridCache"),s=e("./BaseRenderLayer"),d=e("../core/buffer/BufferLine"),p=e("./CharacterJoinerRegistry"),l=(o=s.BaseRenderLayer,n(h,o),h.prototype.resize=function(e,t){o.prototype.resize.call(this,e,t);var i=this._getFont(e,!1,!1);this._characterWidth===t.scaledCharWidth&&this._characterFont===i||(this._characterWidth=t.scaledCharWidth,this._characterFont=i,this._characterOverlapCache={}),this._state.clear(),this._state.resize(e.cols,e.rows)},h.prototype.reset=function(e){this._state.clear(),this.clearAll()},h.prototype._forEachCell=function(e,t,i,r,n){for(var s=t;s<=i;s++)for(var o=s+e.buffer.ydisp,a=e.buffer.lines.get(o),l=r?r.getJoinedCharacters(o):[],h=0;hthis._characterWidth;return this._ctx.restore(),this._characterOverlapCache[t]=i},h);function h(e,t,i,r,n){var s=o.call(this,e,"text",t,n,i)||this;return s._characterOverlapCache={},s._workCell=new d.CellData,s._state=new a.GridCache,s._characterJoinerRegistry=r,s}i.TextRenderLayer=l},{"../core/buffer/BufferLine":29,"./BaseRenderLayer":38,"./CharacterJoinerRegistry":39,"./GridCache":41}],47:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=(n.prototype.dispose=function(){},n.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},n.prototype._doWarmUp=function(){},n.prototype.beginFrame=function(){},n);function n(){this._didWarmUp=!1}i.default=r},{}],48:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var h=e("./CharAtlasUtils"),r=e("./DynamicCharAtlas"),n=e("./NoneCharAtlas"),s=e("./StaticCharAtlas"),c={none:n.default,static:s.default,dynamic:r.default},u=[];i.acquireCharAtlas=function(e,t,i,r){for(var n=h.generateConfig(i,r,e,t),s=0;s>>24,n=t.rgba>>>16&255,s=t.rgba>>>8&255,o=0;o=this.capacity)i=this._head,this._unlinkNode(i),delete this._map[i.key],i.key=e,i.value=t,this._map[e]=i;else{var r=this._nodePool;0t;)this._rowContainer.removeChild(this._rowElements.pop())},y.prototype.onResize=function(e,t){this._refreshRowElements(e,t),this._updateDimensions()},y.prototype.onCharSizeChanged=function(){this._updateDimensions()},y.prototype.onBlur=function(){this._rowContainer.classList.remove(_)},y.prototype.onFocus=function(){this._rowContainer.classList.add(_)},y.prototype.onSelectionChanged=function(e,t,i){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(e&&t){var r=e[1]-this._terminal.buffer.ydisp,n=t[1]-this._terminal.buffer.ydisp,s=Math.max(r,0),o=Math.min(n,this._terminal.rows-1);if(!(s>=this._terminal.rows||o<0)){var a=document.createDocumentFragment();if(i)a.appendChild(this._createSelectionElement(s,e[0],t[0],o-s+1));else{var l=r===s?e[0]:0,h=s===o?t[0]:this._terminal.cols;a.appendChild(this._createSelectionElement(s,l,h));var c=o-s-1;if(a.appendChild(this._createSelectionElement(s+1,0,this._terminal.cols,c)),s!==o){var u=n===o?t[0]:this._terminal.cols;a.appendChild(this._createSelectionElement(o,0,u))}}this._selectionContainer.appendChild(a)}}},y.prototype._createSelectionElement=function(e,t,i,r){void 0===r&&(r=1);var n=document.createElement("div");return n.style.height=r*this.dimensions.actualCellHeight+"px",n.style.top=e*this.dimensions.actualCellHeight+"px",n.style.left=t*this.dimensions.actualCellWidth+"px",n.style.width=this.dimensions.actualCellWidth*(i-t)+"px",n},y.prototype.onCursorMove=function(){},y.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss(),this._terminal.refresh(0,this._terminal.rows-1)},y.prototype.clear=function(){this._rowElements.forEach(function(e){return e.innerHTML=""})},y.prototype.renderRows=function(e,t){for(var i=this._terminal,r=i.buffer.ybase+i.buffer.y,n=this._terminal.buffer.x,s=this._terminal.options.cursorBlink,o=e;o<=t;o++){var a=this._rowElements[o];a.innerHTML="";var l=o+i.buffer.ydisp,h=i.buffer.lines.get(l),c=i.options.cursorStyle;a.appendChild(this._rowFactory.createRow(h,l===r,c,n,s,this.dimensions.actualCellWidth,i.cols))}},Object.defineProperty(y.prototype,"_terminalSelector",{get:function(){return"."+h+this._terminalClass},enumerable:!0,configurable:!0}),y.prototype.registerCharacterJoiner=function(e){return-1},y.prototype.deregisterCharacterJoiner=function(e){return!1},y.prototype._onLinkHover=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)},y.prototype._onLinkLeave=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)},y.prototype._setCellUnderline=function(e,t,i,r,n,s){for(;e!==t||i!==r;){var o=this._rowElements[i];if(!o)return;var a=o.children[e];a&&(a.style.textDecoration=s?"underline":"none"),++e>=n&&(e=0,i++)}},y);function y(e,t){var i=s.call(this)||this;return i._terminal=e,i._colors=t,i._terminalClass=p++,i._rowElements=[],i._rowContainer=document.createElement("div"),i._rowContainer.classList.add(c),i._rowContainer.style.lineHeight="normal",i._rowContainer.setAttribute("aria-hidden","true"),i._refreshRowElements(i._terminal.cols,i._terminal.rows),i._selectionContainer=document.createElement("div"),i._selectionContainer.classList.add(d),i._selectionContainer.setAttribute("aria-hidden","true"),i.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},i._updateDimensions(),i._injectCss(),i._rowFactory=new o.DomRendererRowFactory(e.options,document),i._terminal.element.classList.add(h+i._terminalClass),i._terminal.screenElement.appendChild(i._rowContainer),i._terminal.screenElement.appendChild(i._selectionContainer),i._terminal.linkifier.onLinkHover(function(e){return i._onLinkHover(e)}),i._terminal.linkifier.onLinkLeave(function(e){return i._onLinkLeave(e)}),i}i.DomRenderer=m},{"../../common/Lifecycle":24,"../atlas/Types":55,"./DomRendererRowFactory":57}],57:[function(e,t,p){"use strict";Object.defineProperty(p,"__esModule",{value:!0});var m=e("../atlas/Types"),y=e("../../core/buffer/BufferLine");p.BOLD_CLASS="xterm-bold",p.DIM_CLASS="xterm-dim",p.ITALIC_CLASS="xterm-italic",p.UNDERLINE_CLASS="xterm-underline",p.CURSOR_CLASS="xterm-cursor",p.CURSOR_BLINK_CLASS="xterm-cursor-blink",p.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",p.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",p.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var i=(r.prototype.createRow=function(e,t,i,r,n,s,o){for(var a=this._document.createDocumentFragment(),l=0,h=Math.min(e.length,o)-1;0<=h;h--)if(e.loadCell(h,this._workCell).getCode()!==y.NULL_CELL_CODE||t&&h===r){l=h+1;break}for(h=0;h>>0})}for(i=0;i<24;i++){var o=8+10*i,a=u(o);e.push({css:"#"+a+a+a,rgba:(o<<24|o<<16|o<<8|255)>>>0})}return e}();var i=(r.prototype.setTheme=function(e){void 0===e&&(e={}),this.colors.foreground=this._parseColor(e.foreground,s),this.colors.background=this._parseColor(e.background,o),this.colors.cursor=this._parseColor(e.cursor,a,!0),this.colors.cursorAccent=this._parseColor(e.cursorAccent,l,!0),this.colors.selection=this._parseColor(e.selection,h,!0),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])},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;return i||255===r[3]?{css:e,rgba:(r[0]<<24|r[1]<<16|r[2]<<8|r[3])>>>0}:(console.warn("Color: "+e+" is using transparency, but allowTransparency is false. Using fallback "+t.css+"."),t)},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.colors={foreground:s,background:o,cursor:a,cursorAccent:l,selection:h,ansi:n.DEFAULT_ANSI_COLORS.slice()}}n.ColorManager=i},{}],59:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.addDisposableDomListener=function(e,t,i,r){return e.addEventListener(t,i,r),{dispose:function(){i&&e.removeEventListener(t,i,r)}}}},{}],60:[function(e,t,i){"use strict";Object.defineProperty(i,"__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}i.RenderDebouncer=r},{}],61:[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(i,"__esModule",{value:!0});var s,o=e("../common/Lifecycle"),a=(s=o.Disposable,n(l,s),l.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()},l.prototype.dispose=function(){s.prototype.dispose.call(this),this.clearListener()},l.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))},l.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)},l);function l(){var e=null!==s&&s.apply(this,arguments)||this;return e._currentDevicePixelRatio=window.devicePixelRatio,e}i.ScreenDprMonitor=a},{"../common/Lifecycle":24}],62:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=e("./public/Terminal");t.exports=r.Terminal},{"./public/Terminal":37}]},{},[62])(62)});