Files
yakpanel-core/YakPanel/static/vite/js/xterm-addon-canvas-DELv9KNm.js
2026-04-07 02:04:22 +05:30

2 lines
92 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var ce={exports:{}},ve;function we(){return ve||(ve=1,(function(pe,be){(function(de,se){pe.exports=se()})(self,(()=>(()=>{var de={903:(k,e,l)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BaseRenderLayer=void 0;const _=l(274),a=l(627),r=l(237),c=l(860),C=l(374),f=l(296),i=l(345),t=l(859),u=l(399),d=l(855);class n extends t.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var s;return(s=this._charAtlas)===null||s===void 0?void 0:s.pages[0].canvas}constructor(s,g,o,p,M,h,v,w,L,S){super(),this._terminal=s,this._container=g,this._alpha=M,this._themeService=h,this._bufferService=v,this._optionsService=w,this._decorationService=L,this._coreBrowserService=S,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,f.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new t.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new i.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new _.CellColorResolver(this._terminal,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-".concat(o,"-layer")),this._canvas.style.zIndex=p.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors((b=>{this._refreshCharAtlas(b),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}))),this.register((0,t.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,C.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(s,g){}handleSelectionChanged(s,g,o=!1){this._selectionModel.update(this._terminal,s,g,o)}_setTransparency(s){if(s===this._alpha)return;const g=this._canvas;this._alpha=s,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,g),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(s){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,a.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,s,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,i.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let g=0;g<this._charAtlas.pages.length;g++)this._bitmapGenerator[g]=new x(this._charAtlas.pages[g].canvas)}}resize(s){this._deviceCellWidth=s.device.cell.width,this._deviceCellHeight=s.device.cell.height,this._deviceCharWidth=s.device.char.width,this._deviceCharHeight=s.device.char.height,this._deviceCharLeft=s.device.char.left,this._deviceCharTop=s.device.char.top,this._canvas.width=s.device.canvas.width,this._canvas.height=s.device.canvas.height,this._canvas.style.width="".concat(s.css.canvas.width,"px"),this._canvas.style.height="".concat(s.css.canvas.height,"px"),this._alpha||this._clearAll(),this._refreshCharAtlas(this._themeService.colors)}clearTextureAtlas(){var s;(s=this._charAtlas)===null||s===void 0||s.clearTexture()}_fillCells(s,g,o,p){this._ctx.fillRect(s*this._deviceCellWidth,g*this._deviceCellHeight,o*this._deviceCellWidth,p*this._deviceCellHeight)}_fillMiddleLineAtCells(s,g,o=1){const p=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(s*this._deviceCellWidth,(g+1)*this._deviceCellHeight-p-this._coreBrowserService.dpr,o*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(s,g,o=1,p=0){this._ctx.fillRect(s*this._deviceCellWidth,(g+1)*this._deviceCellHeight+p-this._coreBrowserService.dpr-1,o*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(s,g,o=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const p=this._coreBrowserService.dpr;this._ctx.lineWidth=p;for(let M=0;M<o;M++){const h=(s+M)*this._deviceCellWidth,v=(s+M+.5)*this._deviceCellWidth,w=(s+M+1)*this._deviceCellWidth,L=(g+1)*this._deviceCellHeight-p-1,S=L-p,b=L+p;this._ctx.moveTo(h,L),this._ctx.bezierCurveTo(h,S,v,S,v,L),this._ctx.bezierCurveTo(v,b,w,b,w,L)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(s,g,o=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const p=this._coreBrowserService.dpr;this._ctx.lineWidth=p,this._ctx.setLineDash([2*p,p]);const M=s*this._deviceCellWidth,h=(g+1)*this._deviceCellHeight-p-1;this._ctx.moveTo(M,h);for(let v=0;v<o;v++){const w=(s+o+v)*this._deviceCellWidth;this._ctx.lineTo(w,h)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(s,g,o=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const p=this._coreBrowserService.dpr;this._ctx.lineWidth=p,this._ctx.setLineDash([4*p,3*p]);const M=s*this._deviceCellWidth,h=(s+o)*this._deviceCellWidth,v=(g+1)*this._deviceCellHeight-p-1;this._ctx.moveTo(M,v),this._ctx.lineTo(h,v),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(s,g,o){this._ctx.fillRect(s*this._deviceCellWidth,g*this._deviceCellHeight,this._coreBrowserService.dpr*o,this._deviceCellHeight)}_strokeRectAtCell(s,g,o,p){const M=this._coreBrowserService.dpr;this._ctx.lineWidth=M,this._ctx.strokeRect(s*this._deviceCellWidth+M/2,g*this._deviceCellHeight+M/2,o*this._deviceCellWidth-M,p*this._deviceCellHeight-M)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(s,g,o,p){this._alpha?this._ctx.clearRect(s*this._deviceCellWidth,g*this._deviceCellHeight,o*this._deviceCellWidth,p*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(s*this._deviceCellWidth,g*this._deviceCellHeight,o*this._deviceCellWidth,p*this._deviceCellHeight))}_fillCharTrueColor(s,g,o){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=r.TEXT_BASELINE,this._clipRow(o);let p=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(p=(0,c.tryDrawCustomChar)(this._ctx,s.getChars(),g*this._deviceCellWidth,o*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),p||this._ctx.fillText(s.getChars(),g*this._deviceCellWidth+this._deviceCharLeft,o*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(s,g,o){var p,M,h,v;const w=s.getChars();if(this._cellColorResolver.resolve(s,g,this._bufferService.buffer.ydisp+o),!this._charAtlas)return;let L;L=w&&w.length>1?this._charAtlas.getRasterizedGlyphCombinedChar(w,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(s.getCode()||d.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),L.size.x&&L.size.y&&(this._ctx.save(),this._clipRow(o),this._bitmapGenerator[L.texturePage]&&this._charAtlas.pages[L.texturePage].canvas!==this._bitmapGenerator[L.texturePage].canvas&&((M=(p=this._bitmapGenerator[L.texturePage])===null||p===void 0?void 0:p.bitmap)===null||M===void 0||M.close(),delete this._bitmapGenerator[L.texturePage]),this._charAtlas.pages[L.texturePage].version!==((h=this._bitmapGenerator[L.texturePage])===null||h===void 0?void 0:h.version)&&(this._bitmapGenerator[L.texturePage]||(this._bitmapGenerator[L.texturePage]=new x(this._charAtlas.pages[L.texturePage].canvas)),this._bitmapGenerator[L.texturePage].refresh(),this._bitmapGenerator[L.texturePage].version=this._charAtlas.pages[L.texturePage].version),this._ctx.drawImage(((v=this._bitmapGenerator[L.texturePage])===null||v===void 0?void 0:v.bitmap)||this._charAtlas.pages[L.texturePage].canvas,L.texturePosition.x,L.texturePosition.y,L.size.x,L.size.y,g*this._deviceCellWidth+this._deviceCharLeft-L.offset.x,o*this._deviceCellHeight+this._deviceCharTop-L.offset.y,L.size.x,L.size.y),this._ctx.restore())}_clipRow(s){this._ctx.beginPath(),this._ctx.rect(0,s*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(s,g){return"".concat(g?"italic":""," ").concat(s?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight," ").concat(this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr,"px ").concat(this._optionsService.rawOptions.fontFamily)}}e.BaseRenderLayer=n;class x{get bitmap(){return this._bitmap}constructor(s){this.canvas=s,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var s;(s=this._bitmap)===null||s===void 0||s.close(),this._bitmap=void 0,u.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout((()=>this._generate()),100)),this._state===1&&(this._state=2))}_generate(){var s;this._state===0&&((s=this._bitmap)===null||s===void 0||s.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then((g=>{this._state===2?this.refresh():this._bitmap=g,this._state=0})),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(k,e,l)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CanvasRenderer=void 0;const _=l(627),a=l(56),r=l(374),c=l(345),C=l(859),f=l(873),i=l(43),t=l(630),u=l(744);class d extends C.Disposable{constructor(x,m,s,g,o,p,M,h,v,w,L){super(),this._terminal=x,this._screenElement=m,this._bufferService=g,this._charSizeService=o,this._optionsService=p,this._coreBrowserService=v,this._themeService=L,this._onRequestRedraw=this.register(new c.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new c.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new c.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const S=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new u.TextRenderLayer(this._terminal,this._screenElement,0,S,this._bufferService,this._optionsService,M,w,this._coreBrowserService,L),new t.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,w,this._optionsService,L),new i.LinkRenderLayer(this._terminal,this._screenElement,2,s,this._bufferService,this._optionsService,w,this._coreBrowserService,L),new f.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,h,this._coreBrowserService,w,L)];for(const b of this._renderLayers)(0,c.forwardEvent)(b.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,r.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this.register((0,a.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,((b,A)=>this._setCanvasDevicePixelDimensions(b,A)))),this.register((0,C.toDisposable)((()=>{for(const b of this._renderLayers)b.dispose();(0,_.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){return this._renderLayers[0].cacheCanvas}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._bufferService.cols,this._bufferService.rows))}handleResize(x,m){this._updateDimensions();for(const s of this._renderLayers)s.resize(this.dimensions);this._screenElement.style.width="".concat(this.dimensions.css.canvas.width,"px"),this._screenElement.style.height="".concat(this.dimensions.css.canvas.height,"px")}handleCharSizeChanged(){this.handleResize(this._bufferService.cols,this._bufferService.rows)}handleBlur(){this._runOperation((x=>x.handleBlur()))}handleFocus(){this._runOperation((x=>x.handleFocus()))}handleSelectionChanged(x,m,s=!1){this._runOperation((g=>g.handleSelectionChanged(x,m,s))),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation((x=>x.handleCursorMove()))}clear(){this._runOperation((x=>x.reset()))}_runOperation(x){for(const m of this._renderLayers)x(m)}renderRows(x,m){for(const s of this._renderLayers)s.handleGridChanged(x,m)}clearTextureAtlas(){for(const x of this._renderLayers)x.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const x=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*x),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*x),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._bufferService.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._bufferService.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/x),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/x),this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols}_setCanvasDevicePixelDimensions(x,m){this.dimensions.device.canvas.height=m,this.dimensions.device.canvas.width=x;for(const s of this._renderLayers)s.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}e.CanvasRenderer=d},873:(k,e,l)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRenderLayer=void 0;const _=l(457),a=l(859),r=l(399),c=l(782),C=l(903);class f extends C.BaseRenderLayer{constructor(t,u,d,n,x,m,s,g,o,p){super(t,u,"cursor",d,!0,p,x,m,o,g),this._onRequestRedraw=n,this._coreService=s,this._cursorBlinkStateManager=this.register(new a.MutableDisposable),this._cell=new c.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this),outline:this._renderOutlineCursor.bind(this)},this.register(m.onOptionChange((()=>this._handleOptionsChanged()))),this._handleOptionsChanged()}resize(t){super.resize(t),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var t;this._clearCursor(),(t=this._cursorBlinkStateManager.value)===null||t===void 0||t.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var t;(t=this._cursorBlinkStateManager.value)===null||t===void 0||t.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var t;(t=this._cursorBlinkStateManager.value)===null||t===void 0||t.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}_handleOptionsChanged(){this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager.value||(this._cursorBlinkStateManager.value=new _.CursorBlinkStateManager((()=>this._render(!0)),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var t;(t=this._cursorBlinkStateManager.value)===null||t===void 0||t.restartBlinkAnimation()}handleGridChanged(t,u){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(t){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const u=this._bufferService.buffer.ybase+this._bufferService.buffer.y,d=u-this._bufferService.buffer.ydisp;if(d<0||d>=this._bufferService.rows)return void this._clearCursor();const n=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(u).loadCell(n,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css;const x=this._optionsService.rawOptions.cursorStyle,m=this._optionsService.rawOptions.cursorInactiveStyle;return m&&m!=="none"&&this._cursorRenderers[m](n,d,this._cell),this._ctx.restore(),this._state.x=n,this._state.y=d,this._state.isFocused=!1,this._state.style=x,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===n&&this._state.y===d&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](n,d,this._cell),this._ctx.restore(),this._state.x=n,this._state.y=d,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(r.isFirefox||this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(t,u,d){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(t,u,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(t,u,d){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(t,u,d.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(d,t,u),this._ctx.restore()}_renderUnderlineCursor(t,u,d){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(t,u),this._ctx.restore()}_renderOutlineCursor(t,u,d){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(t,u,d.getWidth(),1),this._ctx.restore()}}e.CursorRenderLayer=f},574:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GridCache=void 0,e.GridCache=class{constructor(){this.cache=[]}resize(l,_){for(let a=0;a<l;a++){this.cache.length<=a&&this.cache.push([]);for(let r=this.cache[a].length;r<_;r++)this.cache[a].push(void 0);this.cache[a].length=_}this.cache.length=l}clear(){for(let l=0;l<this.cache.length;l++)for(let _=0;_<this.cache[l].length;_++)this.cache[l][_]=void 0}}},43:(k,e,l)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkRenderLayer=void 0;const _=l(197),a=l(237),r=l(903);class c extends r.BaseRenderLayer{constructor(f,i,t,u,d,n,x,m,s){super(f,i,"link",t,!0,s,d,n,x,m),this.register(u.onShowLinkUnderline((g=>this._handleShowLinkUnderline(g)))),this.register(u.onHideLinkUnderline((g=>this._handleHideLinkUnderline(g))))}resize(f){super.resize(f),this._state=void 0}reset(){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const f=this._state.y2-this._state.y1-1;f>0&&this._clearCells(0,this._state.y1+1,this._state.cols,f),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(f){if(f.fg===a.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:f.fg&&(0,_.is256Color)(f.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[f.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,f.y1===f.y2)this._fillBottomLineAtCells(f.x1,f.y1,f.x2-f.x1);else{this._fillBottomLineAtCells(f.x1,f.y1,f.cols-f.x1);for(let i=f.y1+1;i<f.y2;i++)this._fillBottomLineAtCells(0,i,f.cols);this._fillBottomLineAtCells(0,f.y2,f.x2)}this._state=f}_handleHideLinkUnderline(f){this._clearCurrentLink()}}e.LinkRenderLayer=c},630:(k,e,l)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRenderLayer=void 0;const _=l(903);class a extends _.BaseRenderLayer{constructor(c,C,f,i,t,u,d,n){super(c,C,"selection",f,!0,n,i,d,u,t),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(c){super.resize(c),this._selectionModel.selectionStart&&this._selectionModel.selectionEnd&&(this._clearState(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode))}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}handleBlur(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleFocus(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleSelectionChanged(c,C,f){super.handleSelectionChanged(c,C,f),this._redrawSelection(c,C,f)}_redrawSelection(c,C,f){if(!this._didStateChange(c,C,f,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!c||!C)return void this._clearState();const i=c[1]-this._bufferService.buffer.ydisp,t=C[1]-this._bufferService.buffer.ydisp,u=Math.max(i,0),d=Math.min(t,this._bufferService.rows-1);if(u>=this._bufferService.rows||d<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._themeService.colors.selectionBackgroundTransparent:this._themeService.colors.selectionInactiveBackgroundTransparent).css,f){const n=c[0],x=C[0]-n,m=d-u+1;this._fillCells(n,u,x,m)}else{const n=i===u?c[0]:0,x=u===t?C[0]:this._bufferService.cols;this._fillCells(n,u,x-n,1);const m=Math.max(d-u-1,0);if(this._fillCells(0,u+1,this._bufferService.cols,m),u!==d){const s=t===d?C[0]:this._bufferService.cols;this._fillCells(0,d,s,1)}}this._state.start=[c[0],c[1]],this._state.end=[C[0],C[1]],this._state.columnSelectMode=f,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(c,C,f,i){return!this._areCoordinatesEqual(c,this._state.start)||!this._areCoordinatesEqual(C,this._state.end)||f!==this._state.columnSelectMode||i!==this._state.ydisp}_areCoordinatesEqual(c,C){return!(!c||!C)&&c[0]===C[0]&&c[1]===C[1]}}e.SelectionRenderLayer=a},744:(k,e,l)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TextRenderLayer=void 0;const _=l(577),a=l(147),r=l(782),c=l(855),C=l(903),f=l(574);class i extends C.BaseRenderLayer{constructor(u,d,n,x,m,s,g,o,p,M){super(u,d,"text",n,x,M,m,s,o,p),this._characterJoinerService=g,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new r.CellData,this._state=new f.GridCache,this.register(s.onSpecificOptionChange("allowTransparency",(h=>this._setTransparency(h))))}resize(u){super.resize(u);const d=this._getFont(!1,!1);this._characterWidth===u.device.char.width&&this._characterFont===d||(this._characterWidth=u.device.char.width,this._characterFont=d,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(u,d,n){for(let x=u;x<=d;x++){const m=x+this._bufferService.buffer.ydisp,s=this._bufferService.buffer.lines.get(m),g=this._characterJoinerService.getJoinedCharacters(m);for(let o=0;o<this._bufferService.cols;o++){s.loadCell(o,this._workCell);let p=this._workCell,M=!1,h=o;if(p.getWidth()!==0){if(g.length>0&&o===g[0][0]){M=!0;const v=g.shift();p=new _.JoinedCellData(this._workCell,s.translateToString(!0,v[0],v[1]),v[1]-v[0]),h=v[1]-1}!M&&this._isOverlapping(p)&&h<s.length-1&&s.getCodePoint(h+1)===c.NULL_CELL_CODE&&(p.content&=-12582913,p.content|=8388608),n(p,o,x),o=h}}}}_drawBackground(u,d){const n=this._ctx,x=this._bufferService.cols;let m=0,s=0,g=null;n.save(),this._forEachCell(u,d,((o,p,M)=>{let h=null;o.isInverse()?h=o.isFgDefault()?this._themeService.colors.foreground.css:o.isFgRGB()?"rgb(".concat(a.AttributeData.toColorRGB(o.getFgColor()).join(","),")"):this._themeService.colors.ansi[o.getFgColor()].css:o.isBgRGB()?h="rgb(".concat(a.AttributeData.toColorRGB(o.getBgColor()).join(","),")"):o.isBgPalette()&&(h=this._themeService.colors.ansi[o.getBgColor()].css);let v=!1;this._decorationService.forEachDecorationAtCell(p,this._bufferService.buffer.ydisp+M,void 0,(w=>{w.options.layer!=="top"&&v||(w.backgroundColorRGB&&(h=w.backgroundColorRGB.css),v=w.options.layer==="top")})),g===null&&(m=p,s=M),M!==s?(n.fillStyle=g||"",this._fillCells(m,s,x-m,1),m=p,s=M):g!==h&&(n.fillStyle=g||"",this._fillCells(m,s,p-m,1),m=p,s=M),g=h})),g!==null&&(n.fillStyle=g,this._fillCells(m,s,x-m,1)),n.restore()}_drawForeground(u,d){this._forEachCell(u,d,((n,x,m)=>this._drawChars(n,x,m)))}handleGridChanged(u,d){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,u,this._bufferService.cols,d-u+1),this._drawBackground(u,d),this._drawForeground(u,d))}_isOverlapping(u){if(u.getWidth()!==1||u.getCode()<256)return!1;const d=u.getChars();if(this._characterOverlapCache.hasOwnProperty(d))return this._characterOverlapCache[d];this._ctx.save(),this._ctx.font=this._characterFont;const n=Math.floor(this._ctx.measureText(d).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[d]=n,n}}e.TextRenderLayer=i},274:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CellColorResolver=void 0;let l,_=0,a=0,r=!1,c=!1,C=!1;e.CellColorResolver=class{constructor(f,i,t,u,d){this._terminal=f,this._selectionRenderModel=i,this._decorationService=t,this._coreBrowserService=u,this._themeService=d,this.result={fg:0,bg:0,ext:0}}resolve(f,i,t){this.result.bg=f.bg,this.result.fg=f.fg,this.result.ext=268435456&f.bg?f.extended.ext:0,a=0,_=0,c=!1,r=!1,C=!1,l=this._themeService.colors,this._decorationService.forEachDecorationAtCell(i,t,"bottom",(u=>{u.backgroundColorRGB&&(a=u.backgroundColorRGB.rgba>>8&16777215,c=!0),u.foregroundColorRGB&&(_=u.foregroundColorRGB.rgba>>8&16777215,r=!0)})),C=this._selectionRenderModel.isCellSelected(this._terminal,i,t),C&&(a=(this._coreBrowserService.isFocused?l.selectionBackgroundOpaque:l.selectionInactiveBackgroundOpaque).rgba>>8&16777215,c=!0,l.selectionForeground&&(_=l.selectionForeground.rgba>>8&16777215,r=!0)),this._decorationService.forEachDecorationAtCell(i,t,"top",(u=>{u.backgroundColorRGB&&(a=u.backgroundColorRGB.rgba>>8&16777215,c=!0),u.foregroundColorRGB&&(_=u.foregroundColorRGB.rgba>>8&16777215,r=!0)})),c&&(a=C?-16777216&f.bg&-134217729|a|50331648:-16777216&f.bg|a|50331648),r&&(_=-16777216&f.fg&-67108865|_|50331648),67108864&this.result.fg&&(c&&!r&&(_=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&l.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,r=!0),!c&&r&&(a=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&l.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,c=!0)),l=void 0,this.result.bg=c?a:this.result.bg,this.result.fg=r?_:this.result.fg}}},627:(k,e,l)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.removeTerminalFromCache=e.acquireTextureAtlas=void 0;const _=l(509),a=l(197),r=[];e.acquireTextureAtlas=function(c,C,f,i,t,u,d,n){const x=(0,a.generateConfig)(i,t,u,d,C,f,n);for(let g=0;g<r.length;g++){const o=r[g],p=o.ownedBy.indexOf(c);if(p>=0){if((0,a.configEquals)(o.config,x))return o.atlas;o.ownedBy.length===1?(o.atlas.dispose(),r.splice(g,1)):o.ownedBy.splice(p,1);break}}for(let g=0;g<r.length;g++){const o=r[g];if((0,a.configEquals)(o.config,x))return o.ownedBy.push(c),o.atlas}const m=c._core,s={atlas:new _.TextureAtlas(document,x,m.unicodeService),config:x,ownedBy:[c]};return r.push(s),s.atlas},e.removeTerminalFromCache=function(c){for(let C=0;C<r.length;C++){const f=r[C].ownedBy.indexOf(c);if(f!==-1){r[C].ownedBy.length===1?(r[C].atlas.dispose(),r.splice(C,1)):r[C].ownedBy.splice(f,1);break}}}},197:(k,e,l)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.is256Color=e.configEquals=e.generateConfig=void 0;const _=l(160);e.generateConfig=function(a,r,c,C,f,i,t){const u={foreground:i.foreground,background:i.background,cursor:_.NULL_COLOR,cursorAccent:_.NULL_COLOR,selectionForeground:_.NULL_COLOR,selectionBackgroundTransparent:_.NULL_COLOR,selectionBackgroundOpaque:_.NULL_COLOR,selectionInactiveBackgroundTransparent:_.NULL_COLOR,selectionInactiveBackgroundOpaque:_.NULL_COLOR,ansi:i.ansi.slice(),contrastCache:i.contrastCache,halfContrastCache:i.halfContrastCache};return{customGlyphs:f.customGlyphs,devicePixelRatio:t,letterSpacing:f.letterSpacing,lineHeight:f.lineHeight,deviceCellWidth:a,deviceCellHeight:r,deviceCharWidth:c,deviceCharHeight:C,fontFamily:f.fontFamily,fontSize:f.fontSize,fontWeight:f.fontWeight,fontWeightBold:f.fontWeightBold,allowTransparency:f.allowTransparency,drawBoldTextInBrightColors:f.drawBoldTextInBrightColors,minimumContrastRatio:f.minimumContrastRatio,colors:u}},e.configEquals=function(a,r){for(let c=0;c<a.colors.ansi.length;c++)if(a.colors.ansi[c].rgba!==r.colors.ansi[c].rgba)return!1;return a.devicePixelRatio===r.devicePixelRatio&&a.customGlyphs===r.customGlyphs&&a.lineHeight===r.lineHeight&&a.letterSpacing===r.letterSpacing&&a.fontFamily===r.fontFamily&&a.fontSize===r.fontSize&&a.fontWeight===r.fontWeight&&a.fontWeightBold===r.fontWeightBold&&a.allowTransparency===r.allowTransparency&&a.deviceCharWidth===r.deviceCharWidth&&a.deviceCharHeight===r.deviceCharHeight&&a.drawBoldTextInBrightColors===r.drawBoldTextInBrightColors&&a.minimumContrastRatio===r.minimumContrastRatio&&a.colors.foreground.rgba===r.colors.foreground.rgba&&a.colors.background.rgba===r.colors.background.rgba},e.is256Color=function(a){return(50331648&a)==16777216||(50331648&a)==33554432}},237:(k,e,l)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TEXT_BASELINE=e.DIM_OPACITY=e.INVERTED_DEFAULT_COLOR=void 0;const _=l(399);e.INVERTED_DEFAULT_COLOR=257,e.DIM_OPACITY=.5,e.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},457:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CursorBlinkStateManager=void 0,e.CursorBlinkStateManager=class{constructor(l,_){this._renderCallback=l,this._coreBrowserService=_,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(l=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const _=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,_>0)return void this._restartInterval(_)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const _=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(_)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),l)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(k,e,l)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryDrawCustomChar=e.powerlineDefinitions=e.boxDrawingDefinitions=e.blockElementDefinitions=void 0;const _=l(374);e.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const a={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};e.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(i,t)=>"M0,".concat(.5-t," L1,").concat(.5-t," M0,").concat(.5+t," L1,").concat(.5+t)},"║":{1:(i,t)=>"M".concat(.5-i,",0 L").concat(.5-i,",1 M").concat(.5+i,",0 L").concat(.5+i,",1")},"╒":{1:(i,t)=>"M.5,1 L.5,".concat(.5-t," L1,").concat(.5-t," M.5,").concat(.5+t," L1,").concat(.5+t)},"╓":{1:(i,t)=>"M".concat(.5-i,",1 L").concat(.5-i,",.5 L1,.5 M").concat(.5+i,",.5 L").concat(.5+i,",1")},"╔":{1:(i,t)=>"M1,".concat(.5-t," L").concat(.5-i,",").concat(.5-t," L").concat(.5-i,",1 M1,").concat(.5+t," L").concat(.5+i,",").concat(.5+t," L").concat(.5+i,",1")},"╕":{1:(i,t)=>"M0,".concat(.5-t," L.5,").concat(.5-t," L.5,1 M0,").concat(.5+t," L.5,").concat(.5+t)},"╖":{1:(i,t)=>"M".concat(.5+i,",1 L").concat(.5+i,",.5 L0,.5 M").concat(.5-i,",.5 L").concat(.5-i,",1")},"╗":{1:(i,t)=>"M0,".concat(.5+t," L").concat(.5-i,",").concat(.5+t," L").concat(.5-i,",1 M0,").concat(.5-t," L").concat(.5+i,",").concat(.5-t," L").concat(.5+i,",1")},"╘":{1:(i,t)=>"M.5,0 L.5,".concat(.5+t," L1,").concat(.5+t," M.5,").concat(.5-t," L1,").concat(.5-t)},"╙":{1:(i,t)=>"M1,.5 L".concat(.5-i,",.5 L").concat(.5-i,",0 M").concat(.5+i,",.5 L").concat(.5+i,",0")},"╚":{1:(i,t)=>"M1,".concat(.5-t," L").concat(.5+i,",").concat(.5-t," L").concat(.5+i,",0 M1,").concat(.5+t," L").concat(.5-i,",").concat(.5+t," L").concat(.5-i,",0")},"╛":{1:(i,t)=>"M0,".concat(.5+t," L.5,").concat(.5+t," L.5,0 M0,").concat(.5-t," L.5,").concat(.5-t)},"╜":{1:(i,t)=>"M0,.5 L".concat(.5+i,",.5 L").concat(.5+i,",0 M").concat(.5-i,",.5 L").concat(.5-i,",0")},"╝":{1:(i,t)=>"M0,".concat(.5-t," L").concat(.5-i,",").concat(.5-t," L").concat(.5-i,",0 M0,").concat(.5+t," L").concat(.5+i,",").concat(.5+t," L").concat(.5+i,",0")},"╞":{1:(i,t)=>"M.5,0 L.5,1 M.5,".concat(.5-t," L1,").concat(.5-t," M.5,").concat(.5+t," L1,").concat(.5+t)},"╟":{1:(i,t)=>"M".concat(.5-i,",0 L").concat(.5-i,",1 M").concat(.5+i,",0 L").concat(.5+i,",1 M").concat(.5+i,",.5 L1,.5")},"╠":{1:(i,t)=>"M".concat(.5-i,",0 L").concat(.5-i,",1 M1,").concat(.5+t," L").concat(.5+i,",").concat(.5+t," L").concat(.5+i,",1 M1,").concat(.5-t," L").concat(.5+i,",").concat(.5-t," L").concat(.5+i,",0")},"╡":{1:(i,t)=>"M.5,0 L.5,1 M0,".concat(.5-t," L.5,").concat(.5-t," M0,").concat(.5+t," L.5,").concat(.5+t)},"╢":{1:(i,t)=>"M0,.5 L".concat(.5-i,",.5 M").concat(.5-i,",0 L").concat(.5-i,",1 M").concat(.5+i,",0 L").concat(.5+i,",1")},"╣":{1:(i,t)=>"M".concat(.5+i,",0 L").concat(.5+i,",1 M0,").concat(.5+t," L").concat(.5-i,",").concat(.5+t," L").concat(.5-i,",1 M0,").concat(.5-t," L").concat(.5-i,",").concat(.5-t," L").concat(.5-i,",0")},"╤":{1:(i,t)=>"M0,".concat(.5-t," L1,").concat(.5-t," M0,").concat(.5+t," L1,").concat(.5+t," M.5,").concat(.5+t," L.5,1")},"╥":{1:(i,t)=>"M0,.5 L1,.5 M".concat(.5-i,",.5 L").concat(.5-i,",1 M").concat(.5+i,",.5 L").concat(.5+i,",1")},"╦":{1:(i,t)=>"M0,".concat(.5-t," L1,").concat(.5-t," M0,").concat(.5+t," L").concat(.5-i,",").concat(.5+t," L").concat(.5-i,",1 M1,").concat(.5+t," L").concat(.5+i,",").concat(.5+t," L").concat(.5+i,",1")},"╧":{1:(i,t)=>"M.5,0 L.5,".concat(.5-t," M0,").concat(.5-t," L1,").concat(.5-t," M0,").concat(.5+t," L1,").concat(.5+t)},"╨":{1:(i,t)=>"M0,.5 L1,.5 M".concat(.5-i,",.5 L").concat(.5-i,",0 M").concat(.5+i,",.5 L").concat(.5+i,",0")},"╩":{1:(i,t)=>"M0,".concat(.5+t," L1,").concat(.5+t," M0,").concat(.5-t," L").concat(.5-i,",").concat(.5-t," L").concat(.5-i,",0 M1,").concat(.5-t," L").concat(.5+i,",").concat(.5-t," L").concat(.5+i,",0")},"╪":{1:(i,t)=>"M.5,0 L.5,1 M0,".concat(.5-t," L1,").concat(.5-t," M0,").concat(.5+t," L1,").concat(.5+t)},"╫":{1:(i,t)=>"M0,.5 L1,.5 M".concat(.5-i,",0 L").concat(.5-i,",1 M").concat(.5+i,",0 L").concat(.5+i,",1")},"╬":{1:(i,t)=>"M0,".concat(.5+t," L").concat(.5-i,",").concat(.5+t," L").concat(.5-i,",1 M1,").concat(.5+t," L").concat(.5+i,",").concat(.5+t," L").concat(.5+i,",1 M0,").concat(.5-t," L").concat(.5-i,",").concat(.5-t," L").concat(.5-i,",0 M1,").concat(.5-t," L").concat(.5+i,",").concat(.5-t," L").concat(.5+i,",0")},"":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(i,t)=>"M.5,1 L.5,".concat(.5+t/.15*.5," C.5,").concat(.5+t/.15*.5,",.5,.5,1,.5")},"╮":{1:(i,t)=>"M.5,1 L.5,".concat(.5+t/.15*.5," C.5,").concat(.5+t/.15*.5,",.5,.5,0,.5")},"╯":{1:(i,t)=>"M.5,0 L.5,".concat(.5-t/.15*.5," C.5,").concat(.5-t/.15*.5,",.5,.5,0,.5")},"╰":{1:(i,t)=>"M.5,0 L.5,".concat(.5-t/.15*.5," C.5,").concat(.5-t/.15*.5,",.5,.5,1,.5")}},e.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},e.powerlineDefinitions[""]=e.powerlineDefinitions[""],e.powerlineDefinitions[""]=e.powerlineDefinitions[""],e.tryDrawCustomChar=function(i,t,u,d,n,x,m,s){const g=e.blockElementDefinitions[t];if(g)return(function(h,v,w,L,S,b){for(let A=0;A<v.length;A++){const D=v[A],R=S/8,y=b/8;h.fillRect(w+D.x*R,L+D.y*y,D.w*R,D.h*y)}})(i,g,u,d,n,x),!0;const o=a[t];if(o)return(function(h,v,w,L,S,b){let A=r.get(v);A||(A=new Map,r.set(v,A));const D=h.fillStyle;if(typeof D!="string")throw new Error('Unexpected fillStyle type "'.concat(D,'"'));let R=A.get(D);if(!R){const y=v[0].length,$=v.length,T=document.createElement("canvas");T.width=y,T.height=$;const H=(0,_.throwIfFalsy)(T.getContext("2d")),W=new ImageData(y,$);let j,G,Q,K;if(D.startsWith("#"))j=parseInt(D.slice(1,3),16),G=parseInt(D.slice(3,5),16),Q=parseInt(D.slice(5,7),16),K=D.length>7&&parseInt(D.slice(7,9),16)||1;else{if(!D.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'.concat(D,'" when drawing pattern glyph'));[j,G,Q,K]=D.substring(5,D.length-1).split(",").map((N=>parseFloat(N)))}for(let N=0;N<$;N++)for(let q=0;q<y;q++)W.data[4*(N*y+q)]=j,W.data[4*(N*y+q)+1]=G,W.data[4*(N*y+q)+2]=Q,W.data[4*(N*y+q)+3]=v[N][q]*(255*K);H.putImageData(W,0,0),R=(0,_.throwIfFalsy)(h.createPattern(T,null)),A.set(D,R)}h.fillStyle=R,h.fillRect(w,L,S,b)})(i,o,u,d,n,x),!0;const p=e.boxDrawingDefinitions[t];if(p)return(function(h,v,w,L,S,b,A){h.strokeStyle=h.fillStyle;for(const[D,R]of Object.entries(v)){let y;h.beginPath(),h.lineWidth=A*Number.parseInt(D),y=typeof R=="function"?R(.15,.15/b*S):R;for(const $ of y.split(" ")){const T=$[0],H=C[T];if(!H){console.error('Could not find drawing instructions for "'.concat(T,'"'));continue}const W=$.substring(1).split(",");W[0]&&W[1]&&H(h,f(W,S,b,w,L,!0,A))}h.stroke(),h.closePath()}})(i,p,u,d,n,x,s),!0;const M=e.powerlineDefinitions[t];return!!M&&((function(h,v,w,L,S,b,A,D){var R,y;const $=new Path2D;$.rect(w,L,S,b),h.clip($),h.beginPath();const T=A/12;h.lineWidth=D*T;for(const H of v.d.split(" ")){const W=H[0],j=C[W];if(!j){console.error('Could not find drawing instructions for "'.concat(W,'"'));continue}const G=H.substring(1).split(",");G[0]&&G[1]&&j(h,f(G,S,b,w,L,!1,D,((R=v.leftPadding)!==null&&R!==void 0?R:0)*(T/2),((y=v.rightPadding)!==null&&y!==void 0?y:0)*(T/2)))}v.type===1?(h.strokeStyle=h.fillStyle,h.stroke()):h.fill(),h.closePath()})(i,M,u,d,n,x,m,s),!0)};const r=new Map;function c(i,t,u=0){return Math.max(Math.min(i,t),u)}const C={C:(i,t)=>i.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]),L:(i,t)=>i.lineTo(t[0],t[1]),M:(i,t)=>i.moveTo(t[0],t[1])};function f(i,t,u,d,n,x,m,s=0,g=0){const o=i.map((p=>parseFloat(p)||parseInt(p)));if(o.length<2)throw new Error("Too few arguments for instruction");for(let p=0;p<o.length;p+=2)o[p]*=t-s*m-g*m,x&&o[p]!==0&&(o[p]=c(Math.round(o[p]+.5)-.5,t,0)),o[p]+=d+s*m;for(let p=1;p<o.length;p+=2)o[p]*=u,x&&o[p]!==0&&(o[p]=c(Math.round(o[p]+.5)-.5,u,0)),o[p]+=n;return o}},56:(k,e,l)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.observeDevicePixelDimensions=void 0;const _=l(859);e.observeDevicePixelDimensions=function(a,r,c){let C=new r.ResizeObserver((f=>{const i=f.find((d=>d.target===a));if(!i)return;if(!("devicePixelContentBoxSize"in i))return C==null||C.disconnect(),void(C=void 0);const t=i.devicePixelContentBoxSize[0].inlineSize,u=i.devicePixelContentBoxSize[0].blockSize;t>0&&u>0&&c(t,u)}));try{C.observe(a,{box:["device-pixel-content-box"]})}catch(f){C.disconnect(),C=void 0}return(0,_.toDisposable)((()=>C==null?void 0:C.disconnect()))}},374:(k,e)=>{function l(_){return 57508<=_&&_<=57558}Object.defineProperty(e,"__esModule",{value:!0}),e.createRenderDimensions=e.excludeFromContrastRatioDemands=e.isRestrictedPowerlineGlyph=e.isPowerlineGlyph=e.throwIfFalsy=void 0,e.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},e.isPowerlineGlyph=l,e.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},e.excludeFromContrastRatioDemands=function(_){return l(_)||(function(a){return 9472<=a&&a<=9631})(_)},e.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}}},296:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSelectionRenderModel=void 0;class l{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(a,r,c,C=!1){if(this.selectionStart=r,this.selectionEnd=c,!r||!c||r[0]===c[0]&&r[1]===c[1])return void this.clear();const f=r[1]-a.buffer.active.viewportY,i=c[1]-a.buffer.active.viewportY,t=Math.max(f,0),u=Math.min(i,a.rows-1);t>=a.rows||u<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=C,this.viewportStartRow=f,this.viewportEndRow=i,this.viewportCappedStartRow=t,this.viewportCappedEndRow=u,this.startCol=r[0],this.endCol=c[0])}isCellSelected(a,r,c){return!!this.hasSelection&&(c-=a.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?r>=this.startCol&&c>=this.viewportCappedStartRow&&r<this.endCol&&c<=this.viewportCappedEndRow:r<this.startCol&&c>=this.viewportCappedStartRow&&r>=this.endCol&&c<=this.viewportCappedEndRow:c>this.viewportStartRow&&c<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&c===this.viewportStartRow&&r>=this.startCol&&r<this.endCol||this.viewportStartRow<this.viewportEndRow&&c===this.viewportEndRow&&r<this.endCol||this.viewportStartRow<this.viewportEndRow&&c===this.viewportStartRow&&r>=this.startCol)}}e.createSelectionRenderModel=function(){return new l}},509:function(k,e,l){var _=this&&this.__decorate||function(M,h,v,w){var L,S=arguments.length,b=S<3?h:w===null?w=Object.getOwnPropertyDescriptor(h,v):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(M,h,v,w);else for(var A=M.length-1;A>=0;A--)(L=M[A])&&(b=(S<3?L(b):S>3?L(h,v,b):L(h,v))||b);return S>3&&b&&Object.defineProperty(h,v,b),b};Object.defineProperty(e,"__esModule",{value:!0}),e.TextureAtlas=void 0;const a=l(237),r=l(860),c=l(374),C=l(160),f=l(345),i=l(485),t=l(385),u=l(147),d=l(855),n=l(776),x={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let m;class s{get pages(){return this._pages}constructor(h,v,w){this._document=h,this._config=v,this._unicodeService=w,this._didWarmUp=!1,this._cacheMap=new i.FourKeyMap,this._cacheMapCombined=new i.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new u.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new f.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new f.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=p(h,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,c.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const h of this.pages)h.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const h=new t.IdleTaskQueue;for(let v=33;v<126;v++)h.enqueue((()=>{if(!this._cacheMap.get(v,d.DEFAULT_COLOR,d.DEFAULT_COLOR,d.DEFAULT_EXT)){const w=this._drawToCache(v,d.DEFAULT_COLOR,d.DEFAULT_COLOR,d.DEFAULT_EXT);this._cacheMap.set(v,d.DEFAULT_COLOR,d.DEFAULT_COLOR,d.DEFAULT_EXT,w)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const h of this._pages)h.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(s.maxAtlasPages&&this._pages.length>=Math.max(4,s.maxAtlasPages)){const v=this._pages.filter((R=>2*R.canvas.width<=(s.maxTextureSize||4096))).sort(((R,y)=>y.canvas.width!==R.canvas.width?y.canvas.width-R.canvas.width:y.percentageUsed-R.percentageUsed));let w=-1,L=0;for(let R=0;R<v.length;R++)if(v[R].canvas.width!==L)w=R,L=v[R].canvas.width;else if(R-w==3)break;const S=v.slice(w,w+4),b=S.map((R=>R.glyphs[0].texturePage)).sort(((R,y)=>R>y?1:-1)),A=this.pages.length-S.length,D=this._mergePages(S,A);D.version++;for(let R=b.length-1;R>=0;R--)this._deletePage(b[R]);this.pages.push(D),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(D.canvas)}const h=new g(this._document,this._textureSize);return this._pages.push(h),this._activePages.push(h),this._onAddTextureAtlasCanvas.fire(h.canvas),h}_mergePages(h,v){const w=2*h[0].canvas.width,L=new g(this._document,w,h);for(const[S,b]of h.entries()){const A=S*b.canvas.width%w,D=Math.floor(S/2)*b.canvas.height;L.ctx.drawImage(b.canvas,A,D);for(const y of b.glyphs)y.texturePage=v,y.sizeClipSpace.x=y.size.x/w,y.sizeClipSpace.y=y.size.y/w,y.texturePosition.x+=A,y.texturePosition.y+=D,y.texturePositionClipSpace.x=y.texturePosition.x/w,y.texturePositionClipSpace.y=y.texturePosition.y/w;this._onRemoveTextureAtlasCanvas.fire(b.canvas);const R=this._activePages.indexOf(b);R!==-1&&this._activePages.splice(R,1)}return L}_deletePage(h){this._pages.splice(h,1);for(let v=h;v<this._pages.length;v++){const w=this._pages[v];for(const L of w.glyphs)L.texturePage--;w.version++}}getRasterizedGlyphCombinedChar(h,v,w,L,S){return this._getFromCacheMap(this._cacheMapCombined,h,v,w,L,S)}getRasterizedGlyph(h,v,w,L,S){return this._getFromCacheMap(this._cacheMap,h,v,w,L,S)}_getFromCacheMap(h,v,w,L,S,b=!1){return m=h.get(v,w,L,S),m||(m=this._drawToCache(v,w,L,S,b),h.set(v,w,L,S,m)),m}_getColorFromAnsiIndex(h){if(h>=this._config.colors.ansi.length)throw new Error("No color found for idx "+h);return this._config.colors.ansi[h]}_getBackgroundColor(h,v,w,L){if(this._config.allowTransparency)return C.NULL_COLOR;let S;switch(h){case 16777216:case 33554432:S=this._getColorFromAnsiIndex(v);break;case 50331648:const b=u.AttributeData.toColorRGB(v);S=C.rgba.toColor(b[0],b[1],b[2]);break;default:S=w?C.color.opaque(this._config.colors.foreground):this._config.colors.background}return S}_getForegroundColor(h,v,w,L,S,b,A,D,R,y){const $=this._getMinimumContrastColor(h,v,w,L,S,b,!1,R,D,y);if($)return $;let T;switch(S){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&R&&b<8&&(b+=8),T=this._getColorFromAnsiIndex(b);break;case 50331648:const H=u.AttributeData.toColorRGB(b);T=C.rgba.toColor(H[0],H[1],H[2]);break;default:T=A?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(T=C.color.opaque(T)),D&&(T=C.color.multiplyOpacity(T,a.DIM_OPACITY)),T}_resolveBackgroundRgba(h,v,w){switch(h){case 16777216:case 33554432:return this._getColorFromAnsiIndex(v).rgba;case 50331648:return v<<8;default:return w?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(h,v,w,L){switch(h){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&L&&v<8&&(v+=8),this._getColorFromAnsiIndex(v).rgba;case 50331648:return v<<8;default:return w?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(h,v,w,L,S,b,A,D,R,y){if(this._config.minimumContrastRatio===1||y)return;const $=this._getContrastCache(R),T=$.getColor(h,L);if(T!==void 0)return T||void 0;const H=this._resolveBackgroundRgba(v,w,A),W=this._resolveForegroundRgba(S,b,A,D),j=C.rgba.ensureContrastRatio(H,W,this._config.minimumContrastRatio/(R?2:1));if(!j)return void $.setColor(h,L,null);const G=C.rgba.toColor(j>>24&255,j>>16&255,j>>8&255);return $.setColor(h,L,G),G}_getContrastCache(h){return h?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(h,v,w,L,S=!1){const b=typeof h=="number"?String.fromCharCode(h):h,A=Math.min(this._config.deviceCellWidth*Math.max(b.length,2)+4,this._textureSize);this._tmpCanvas.width<A&&(this._tmpCanvas.width=A);const D=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<D&&(this._tmpCanvas.height=D),this._tmpCtx.save(),this._workAttributeData.fg=w,this._workAttributeData.bg=v,this._workAttributeData.extended.ext=L,this._workAttributeData.isInvisible())return x;const R=!!this._workAttributeData.isBold(),y=!!this._workAttributeData.isInverse(),$=!!this._workAttributeData.isDim(),T=!!this._workAttributeData.isItalic(),H=!!this._workAttributeData.isUnderline(),W=!!this._workAttributeData.isStrikethrough(),j=!!this._workAttributeData.isOverline();let G=this._workAttributeData.getFgColor(),Q=this._workAttributeData.getFgColorMode(),K=this._workAttributeData.getBgColor(),N=this._workAttributeData.getBgColorMode();if(y){const E=G;G=K,K=E;const O=Q;Q=N,N=O}const q=this._getBackgroundColor(N,K,y,$);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=q.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const me=R?this._config.fontWeightBold:this._config.fontWeight,xe=T?"italic":"";this._tmpCtx.font="".concat(xe," ").concat(me," ").concat(this._config.fontSize*this._config.devicePixelRatio,"px ").concat(this._config.fontFamily),this._tmpCtx.textBaseline=a.TEXT_BASELINE;const Le=b.length===1&&(0,c.isPowerlineGlyph)(b.charCodeAt(0)),ue=b.length===1&&(0,c.isRestrictedPowerlineGlyph)(b.charCodeAt(0)),re=this._getForegroundColor(v,N,K,w,Q,G,y,$,R,(0,c.excludeFromContrastRatioDemands)(b.charCodeAt(0)));this._tmpCtx.fillStyle=re.css;const F=ue?0:4;let oe=!1;this._config.customGlyphs!==!1&&(oe=(0,r.tryDrawCustomChar)(this._tmpCtx,b,F,F,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Z,ee=!Le;if(Z=typeof h=="number"?this._unicodeService.wcwidth(h):this._unicodeService.getStringCellWidth(h),H){this._tmpCtx.save();const E=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),O=E%2==1?.5:0;if(this._tmpCtx.lineWidth=E,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())ee=!1,this._tmpCtx.strokeStyle="rgb(".concat(u.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(","),")");else{ee=!1;let J=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&J<8&&(J+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(J).css}this._tmpCtx.beginPath();const X=F,z=Math.ceil(F+this._config.deviceCharHeight)-O-(S?2*E:0),te=z+E,ie=z+2*E;for(let J=0;J<Z;J++){this._tmpCtx.save();const U=X+J*this._config.deviceCellWidth,V=X+(J+1)*this._config.deviceCellWidth,le=U+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(U,z),this._tmpCtx.lineTo(V,z),this._tmpCtx.moveTo(U,ie),this._tmpCtx.lineTo(V,ie);break;case 3:const ae=E<=1?ie:Math.ceil(F+this._config.deviceCharHeight-E/2)-O,he=E<=1?z:Math.ceil(F+this._config.deviceCharHeight+E/2)-O,fe=new Path2D;fe.rect(U,z,this._config.deviceCellWidth,ie-z),this._tmpCtx.clip(fe),this._tmpCtx.moveTo(U-this._config.deviceCellWidth/2,te),this._tmpCtx.bezierCurveTo(U-this._config.deviceCellWidth/2,he,U,he,U,te),this._tmpCtx.bezierCurveTo(U,ae,le,ae,le,te),this._tmpCtx.bezierCurveTo(le,he,V,he,V,te),this._tmpCtx.bezierCurveTo(V,ae,V+this._config.deviceCellWidth/2,ae,V+this._config.deviceCellWidth/2,te);break;case 4:this._tmpCtx.setLineDash([Math.round(E),Math.round(E)]),this._tmpCtx.moveTo(U,z),this._tmpCtx.lineTo(V,z);break;case 5:this._tmpCtx.setLineDash([4*this._config.devicePixelRatio,3*this._config.devicePixelRatio]),this._tmpCtx.moveTo(U,z),this._tmpCtx.lineTo(V,z);break;default:this._tmpCtx.moveTo(U,z),this._tmpCtx.lineTo(V,z)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!oe&&this._config.fontSize>=12&&!this._config.allowTransparency&&b!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const J=this._tmpCtx.measureText(b);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in J&&J.actualBoundingBoxDescent>0){this._tmpCtx.save();const U=new Path2D;U.rect(X,z-Math.ceil(E/2),this._config.deviceCellWidth*Z,ie-z+Math.ceil(E/2)),this._tmpCtx.clip(U),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=q.css,this._tmpCtx.strokeText(b,F,F+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(j){const E=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),O=E%2==1?.5:0;this._tmpCtx.lineWidth=E,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(F,F+O),this._tmpCtx.lineTo(F+this._config.deviceCharWidth*Z,F+O),this._tmpCtx.stroke()}if(oe||this._tmpCtx.fillText(b,F,F+this._config.deviceCharHeight),b==="_"&&!this._config.allowTransparency){let E=o(this._tmpCtx.getImageData(F,F,this._config.deviceCellWidth,this._config.deviceCellHeight),q,re,ee);if(E)for(let O=1;O<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=q.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(b,F,F+this._config.deviceCharHeight-O),E=o(this._tmpCtx.getImageData(F,F,this._config.deviceCellWidth,this._config.deviceCellHeight),q,re,ee),E);O++);}if(W){const E=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),O=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=E,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(F,F+Math.floor(this._config.deviceCharHeight/2)-O),this._tmpCtx.lineTo(F+this._config.deviceCharWidth*Z,F+Math.floor(this._config.deviceCharHeight/2)-O),this._tmpCtx.stroke()}this._tmpCtx.restore();const ne=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let ge;if(ge=this._config.allowTransparency?(function(E){for(let O=0;O<E.data.length;O+=4)if(E.data[O+3]>0)return!1;return!0})(ne):o(ne,q,re,ee),ge)return x;const I=this._findGlyphBoundingBox(ne,this._workBoundingBox,A,ue,oe,F);let B,P;for(;;){if(this._activePages.length===0){const E=this._createNewPage();B=E,P=E.currentRow,P.height=I.size.y;break}B=this._activePages[this._activePages.length-1],P=B.currentRow;for(const E of this._activePages)I.size.y<=E.currentRow.height&&(B=E,P=E.currentRow);for(let E=this._activePages.length-1;E>=0;E--)for(const O of this._activePages[E].fixedRows)O.height<=P.height&&I.size.y<=O.height&&(B=this._activePages[E],P=O);if(P.y+I.size.y>=B.canvas.height||P.height>I.size.y+2){let E=!1;if(B.currentRow.y+B.currentRow.height+I.size.y>=B.canvas.height){let O;for(const X of this._activePages)if(X.currentRow.y+X.currentRow.height+I.size.y<X.canvas.height){O=X;break}if(O)B=O;else if(s.maxAtlasPages&&this._pages.length>=s.maxAtlasPages&&P.y+I.size.y<=B.canvas.height&&P.height>=I.size.y&&P.x+I.size.x<=B.canvas.width)E=!0;else{const X=this._createNewPage();B=X,P=X.currentRow,P.height=I.size.y,E=!0}}E||(B.currentRow.height>0&&B.fixedRows.push(B.currentRow),P={x:0,y:B.currentRow.y+B.currentRow.height,height:I.size.y},B.fixedRows.push(P),B.currentRow={x:0,y:P.y+P.height,height:0})}if(P.x+I.size.x<=B.canvas.width)break;P===B.currentRow?(P.x=0,P.y+=P.height,P.height=0):B.fixedRows.splice(B.fixedRows.indexOf(P),1)}return I.texturePage=this._pages.indexOf(B),I.texturePosition.x=P.x,I.texturePosition.y=P.y,I.texturePositionClipSpace.x=P.x/B.canvas.width,I.texturePositionClipSpace.y=P.y/B.canvas.height,I.sizeClipSpace.x/=B.canvas.width,I.sizeClipSpace.y/=B.canvas.height,P.height=Math.max(P.height,I.size.y),P.x+=I.size.x,B.ctx.putImageData(ne,I.texturePosition.x-this._workBoundingBox.left,I.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,I.size.x,I.size.y),B.addGlyph(I),B.version++,I}_findGlyphBoundingBox(h,v,w,L,S,b){v.top=0;const A=L?this._config.deviceCellHeight:this._tmpCanvas.height,D=L?this._config.deviceCellWidth:w;let R=!1;for(let y=0;y<A;y++){for(let $=0;$<D;$++){const T=y*this._tmpCanvas.width*4+4*$+3;if(h.data[T]!==0){v.top=y,R=!0;break}}if(R)break}v.left=0,R=!1;for(let y=0;y<b+D;y++){for(let $=0;$<A;$++){const T=$*this._tmpCanvas.width*4+4*y+3;if(h.data[T]!==0){v.left=y,R=!0;break}}if(R)break}v.right=D,R=!1;for(let y=b+D-1;y>=b;y--){for(let $=0;$<A;$++){const T=$*this._tmpCanvas.width*4+4*y+3;if(h.data[T]!==0){v.right=y,R=!0;break}}if(R)break}v.bottom=A,R=!1;for(let y=A-1;y>=0;y--){for(let $=0;$<D;$++){const T=y*this._tmpCanvas.width*4+4*$+3;if(h.data[T]!==0){v.bottom=y,R=!0;break}}if(R)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:v.right-v.left+1,y:v.bottom-v.top+1},sizeClipSpace:{x:v.right-v.left+1,y:v.bottom-v.top+1},offset:{x:-v.left+b+(L||S?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-v.top+b+(L||S?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}e.TextureAtlas=s,_([n.traceCall],s.prototype,"_drawToCache",null);class g{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(h){this._glyphs.push(h),this._usedPixels+=h.size.x*h.size.y}constructor(h,v,w){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],w)for(const L of w)this._glyphs.push(...L.glyphs),this._usedPixels+=L._usedPixels;this.canvas=p(h,v,v),this.ctx=(0,c.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function o(M,h,v,w){const L=h.rgba>>>24,S=h.rgba>>>16&255,b=h.rgba>>>8&255,A=v.rgba>>>24,D=v.rgba>>>16&255,R=v.rgba>>>8&255,y=Math.floor((Math.abs(L-A)+Math.abs(S-D)+Math.abs(b-R))/12);let $=!0;for(let T=0;T<M.data.length;T+=4)M.data[T]===L&&M.data[T+1]===S&&M.data[T+2]===b||w&&Math.abs(M.data[T]-L)+Math.abs(M.data[T+1]-S)+Math.abs(M.data[T+2]-b)<y?M.data[T+3]=0:$=!1;return $}function p(M,h,v){const w=M.createElement("canvas");return w.width=h,w.height=v,w}},577:function(k,e,l){var _=this&&this.__decorate||function(u,d,n,x){var m,s=arguments.length,g=s<3?d:x===null?x=Object.getOwnPropertyDescriptor(d,n):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(u,d,n,x);else for(var o=u.length-1;o>=0;o--)(m=u[o])&&(g=(s<3?m(g):s>3?m(d,n,g):m(d,n))||g);return s>3&&g&&Object.defineProperty(d,n,g),g},a=this&&this.__param||function(u,d){return function(n,x){d(n,x,u)}};Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterJoinerService=e.JoinedCellData=void 0;const r=l(147),c=l(855),C=l(782),f=l(97);class i extends r.AttributeData{constructor(d,n,x){super(),this.content=0,this.combinedData="",this.fg=d.fg,this.bg=d.bg,this.combinedData=n,this._width=x}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(d){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}e.JoinedCellData=i;let t=e.CharacterJoinerService=class Ce{constructor(d){this._bufferService=d,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new C.CellData}register(d){const n={id:this._nextCharacterJoinerId++,handler:d};return this._characterJoiners.push(n),n.id}deregister(d){for(let n=0;n<this._characterJoiners.length;n++)if(this._characterJoiners[n].id===d)return this._characterJoiners.splice(n,1),!0;return!1}getJoinedCharacters(d){if(this._characterJoiners.length===0)return[];const n=this._bufferService.buffer.lines.get(d);if(!n||n.length===0)return[];const x=[],m=n.translateToString(!0);let s=0,g=0,o=0,p=n.getFg(0),M=n.getBg(0);for(let h=0;h<n.getTrimmedLength();h++)if(n.loadCell(h,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==p||this._workCell.bg!==M){if(h-s>1){const v=this._getJoinedRanges(m,o,g,n,s);for(let w=0;w<v.length;w++)x.push(v[w])}s=h,o=g,p=this._workCell.fg,M=this._workCell.bg}g+=this._workCell.getChars().length||c.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-s>1){const h=this._getJoinedRanges(m,o,g,n,s);for(let v=0;v<h.length;v++)x.push(h[v])}return x}_getJoinedRanges(d,n,x,m,s){const g=d.substring(n,x);let o=[];try{o=this._characterJoiners[0].handler(g)}catch(p){console.error(p)}for(let p=1;p<this._characterJoiners.length;p++)try{const M=this._characterJoiners[p].handler(g);for(let h=0;h<M.length;h++)Ce._mergeRanges(o,M[h])}catch(M){console.error(M)}return this._stringRangesToCellRanges(o,m,s),o}_stringRangesToCellRanges(d,n,x){let m=0,s=!1,g=0,o=d[m];if(o){for(let p=x;p<this._bufferService.cols;p++){const M=n.getWidth(p),h=n.getString(p).length||c.WHITESPACE_CELL_CHAR.length;if(M!==0){if(!s&&o[0]<=g&&(o[0]=p,s=!0),o[1]<=g){if(o[1]=p,o=d[++m],!o)break;o[0]<=g?(o[0]=p,s=!0):s=!1}g+=h}}o&&(o[1]=this._bufferService.cols)}}static _mergeRanges(d,n){let x=!1;for(let m=0;m<d.length;m++){const s=d[m];if(x){if(n[1]<=s[0])return d[m-1][1]=n[1],d;if(n[1]<=s[1])return d[m-1][1]=Math.max(n[1],s[1]),d.splice(m,1),d;d.splice(m,1),m--}else{if(n[1]<=s[0])return d.splice(m,0,n),d;if(n[1]<=s[1])return s[0]=Math.min(n[0],s[0]),d;n[0]<s[1]&&(s[0]=Math.min(n[0],s[0]),x=!0)}}return x?d[d.length-1][1]=n[1]:d.push(n),d}};e.CharacterJoinerService=t=_([a(0,f.IBufferService)],t)},160:(k,e,l)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contrastRatio=e.toPaddedHex=e.rgba=e.rgb=e.css=e.color=e.channels=e.NULL_COLOR=void 0;const _=l(399);let a=0,r=0,c=0,C=0;var f,i,t,u,d;function n(m){const s=m.toString(16);return s.length<2?"0"+s:s}function x(m,s){return m<s?(s+.05)/(m+.05):(m+.05)/(s+.05)}e.NULL_COLOR={css:"#00000000",rgba:0},(function(m){m.toCss=function(s,g,o,p){return p!==void 0?"#".concat(n(s)).concat(n(g)).concat(n(o)).concat(n(p)):"#".concat(n(s)).concat(n(g)).concat(n(o))},m.toRgba=function(s,g,o,p=255){return(s<<24|g<<16|o<<8|p)>>>0}})(f||(e.channels=f={})),(function(m){function s(g,o){return C=Math.round(255*o),[a,r,c]=d.toChannels(g.rgba),{css:f.toCss(a,r,c,C),rgba:f.toRgba(a,r,c,C)}}m.blend=function(g,o){if(C=(255&o.rgba)/255,C===1)return{css:o.css,rgba:o.rgba};const p=o.rgba>>24&255,M=o.rgba>>16&255,h=o.rgba>>8&255,v=g.rgba>>24&255,w=g.rgba>>16&255,L=g.rgba>>8&255;return a=v+Math.round((p-v)*C),r=w+Math.round((M-w)*C),c=L+Math.round((h-L)*C),{css:f.toCss(a,r,c),rgba:f.toRgba(a,r,c)}},m.isOpaque=function(g){return(255&g.rgba)==255},m.ensureContrastRatio=function(g,o,p){const M=d.ensureContrastRatio(g.rgba,o.rgba,p);if(M)return d.toColor(M>>24&255,M>>16&255,M>>8&255)},m.opaque=function(g){const o=(255|g.rgba)>>>0;return[a,r,c]=d.toChannels(o),{css:f.toCss(a,r,c),rgba:o}},m.opacity=s,m.multiplyOpacity=function(g,o){return C=255&g.rgba,s(g,C*o/255)},m.toColorRGB=function(g){return[g.rgba>>24&255,g.rgba>>16&255,g.rgba>>8&255]}})(i||(e.color=i={})),(function(m){let s,g;if(!_.isNode){const o=document.createElement("canvas");o.width=1,o.height=1;const p=o.getContext("2d",{willReadFrequently:!0});p&&(s=p,s.globalCompositeOperation="copy",g=s.createLinearGradient(0,0,1,1))}m.toColor=function(o){if(o.match(/#[\da-f]{3,8}/i))switch(o.length){case 4:return a=parseInt(o.slice(1,2).repeat(2),16),r=parseInt(o.slice(2,3).repeat(2),16),c=parseInt(o.slice(3,4).repeat(2),16),d.toColor(a,r,c);case 5:return a=parseInt(o.slice(1,2).repeat(2),16),r=parseInt(o.slice(2,3).repeat(2),16),c=parseInt(o.slice(3,4).repeat(2),16),C=parseInt(o.slice(4,5).repeat(2),16),d.toColor(a,r,c,C);case 7:return{css:o,rgba:(parseInt(o.slice(1),16)<<8|255)>>>0};case 9:return{css:o,rgba:parseInt(o.slice(1),16)>>>0}}const p=o.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(p)return a=parseInt(p[1]),r=parseInt(p[2]),c=parseInt(p[3]),C=Math.round(255*(p[5]===void 0?1:parseFloat(p[5]))),d.toColor(a,r,c,C);if(!s||!g)throw new Error("css.toColor: Unsupported css format");if(s.fillStyle=g,s.fillStyle=o,typeof s.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(s.fillRect(0,0,1,1),[a,r,c,C]=s.getImageData(0,0,1,1).data,C!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:f.toRgba(a,r,c,C),css:o}}})(t||(e.css=t={})),(function(m){function s(g,o,p){const M=g/255,h=o/255,v=p/255;return .2126*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.7152*(h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4))+.0722*(v<=.03928?v/12.92:Math.pow((v+.055)/1.055,2.4))}m.relativeLuminance=function(g){return s(g>>16&255,g>>8&255,255&g)},m.relativeLuminance2=s})(u||(e.rgb=u={})),(function(m){function s(o,p,M){const h=o>>24&255,v=o>>16&255,w=o>>8&255;let L=p>>24&255,S=p>>16&255,b=p>>8&255,A=x(u.relativeLuminance2(L,S,b),u.relativeLuminance2(h,v,w));for(;A<M&&(L>0||S>0||b>0);)L-=Math.max(0,Math.ceil(.1*L)),S-=Math.max(0,Math.ceil(.1*S)),b-=Math.max(0,Math.ceil(.1*b)),A=x(u.relativeLuminance2(L,S,b),u.relativeLuminance2(h,v,w));return(L<<24|S<<16|b<<8|255)>>>0}function g(o,p,M){const h=o>>24&255,v=o>>16&255,w=o>>8&255;let L=p>>24&255,S=p>>16&255,b=p>>8&255,A=x(u.relativeLuminance2(L,S,b),u.relativeLuminance2(h,v,w));for(;A<M&&(L<255||S<255||b<255);)L=Math.min(255,L+Math.ceil(.1*(255-L))),S=Math.min(255,S+Math.ceil(.1*(255-S))),b=Math.min(255,b+Math.ceil(.1*(255-b))),A=x(u.relativeLuminance2(L,S,b),u.relativeLuminance2(h,v,w));return(L<<24|S<<16|b<<8|255)>>>0}m.ensureContrastRatio=function(o,p,M){const h=u.relativeLuminance(o>>8),v=u.relativeLuminance(p>>8);if(x(h,v)<M){if(v<h){const S=s(o,p,M),b=x(h,u.relativeLuminance(S>>8));if(b<M){const A=g(o,p,M);return b>x(h,u.relativeLuminance(A>>8))?S:A}return S}const w=g(o,p,M),L=x(h,u.relativeLuminance(w>>8));if(L<M){const S=s(o,p,M);return L>x(h,u.relativeLuminance(S>>8))?w:S}return w}},m.reduceLuminance=s,m.increaseLuminance=g,m.toChannels=function(o){return[o>>24&255,o>>16&255,o>>8&255,255&o]},m.toColor=function(o,p,M,h){return{css:f.toCss(o,p,M,h),rgba:f.toRgba(o,p,M,h)}}})(d||(e.rgba=d={})),e.toPaddedHex=n,e.contrastRatio=x},345:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.forwardEvent=e.EventEmitter=void 0,e.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=l=>(this._listeners.push(l),{dispose:()=>{if(!this._disposed){for(let _=0;_<this._listeners.length;_++)if(this._listeners[_]===l)return void this._listeners.splice(_,1)}}})),this._event}fire(l,_){const a=[];for(let r=0;r<this._listeners.length;r++)a.push(this._listeners[r]);for(let r=0;r<a.length;r++)a[r].call(void 0,l,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},e.forwardEvent=function(l,_){return l((a=>_.fire(a)))}},859:(k,e)=>{function l(_){for(const a of _)a.dispose();_.length=0}Object.defineProperty(e,"__esModule",{value:!0}),e.getDisposeArrayDisposable=e.disposeArray=e.toDisposable=e.MutableDisposable=e.Disposable=void 0,e.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const a=this._disposables.indexOf(_);a!==-1&&this._disposables.splice(a,1)}},e.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var a;this._isDisposed||_===this._value||((a=this._value)===null||a===void 0||a.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)===null||_===void 0||_.dispose(),this._value=void 0}},e.toDisposable=function(_){return{dispose:_}},e.disposeArray=l,e.getDisposeArrayDisposable=function(_){return{dispose:()=>l(_)}}},485:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FourKeyMap=e.TwoKeyMap=void 0;class l{constructor(){this._data={}}set(a,r,c){this._data[a]||(this._data[a]={}),this._data[a][r]=c}get(a,r){return this._data[a]?this._data[a][r]:void 0}clear(){this._data={}}}e.TwoKeyMap=l,e.FourKeyMap=class{constructor(){this._data=new l}set(_,a,r,c,C){this._data.get(_,a)||this._data.set(_,a,new l),this._data.get(_,a).set(r,c,C)}get(_,a,r,c){var C;return(C=this._data.get(_,a))===null||C===void 0?void 0:C.get(r,c)}clear(){this._data.clear()}}},399:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isChromeOS=e.isLinux=e.isWindows=e.isIphone=e.isIpad=e.isMac=e.getSafariVersion=e.isSafari=e.isLegacyEdge=e.isFirefox=e.isNode=void 0,e.isNode=typeof navigator>"u";const l=e.isNode?"node":navigator.userAgent,_=e.isNode?"node":navigator.platform;e.isFirefox=l.includes("Firefox"),e.isLegacyEdge=l.includes("Edge"),e.isSafari=/^((?!chrome|android).)*safari/i.test(l),e.getSafariVersion=function(){if(!e.isSafari)return 0;const a=l.match(/Version\/(\d+)/);return a===null||a.length<2?0:parseInt(a[1])},e.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),e.isIpad=_==="iPad",e.isIphone=_==="iPhone",e.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),e.isLinux=_.indexOf("Linux")>=0,e.isChromeOS=/\bCrOS\b/.test(l)},385:(k,e,l)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DebouncedIdleTask=e.IdleTaskQueue=e.PriorityTaskQueue=void 0;const _=l(399);class a{constructor(){this._tasks=[],this._i=0}enqueue(C){this._tasks.push(C),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(C){this._idleCallback=void 0;let f=0,i=0,t=C.timeRemaining(),u=0;for(;this._i<this._tasks.length;){if(f=Date.now(),this._tasks[this._i]()||this._i++,f=Math.max(1,Date.now()-f),i=Math.max(f,i),u=C.timeRemaining(),1.5*i>u)return t-f<-20&&console.warn("task queue exceeded allotted deadline by ".concat(Math.abs(Math.round(t-f)),"ms")),void this._start();t=u}this.clear()}}class r extends a{_requestCallback(C){return setTimeout((()=>C(this._createDeadline(16))))}_cancelCallback(C){clearTimeout(C)}_createDeadline(C){const f=Date.now()+C;return{timeRemaining:()=>Math.max(0,f-Date.now())}}}e.PriorityTaskQueue=r,e.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends a{_requestCallback(c){return requestIdleCallback(c)}_cancelCallback(c){cancelIdleCallback(c)}}:r,e.DebouncedIdleTask=class{constructor(){this._queue=new e.IdleTaskQueue}set(c){this._queue.clear(),this._queue.enqueue(c)}flush(){this._queue.flush()}}},147:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedAttrs=e.AttributeData=void 0;class l{constructor(){this.fg=0,this.bg=0,this.extended=new _}static toColorRGB(r){return[r>>>16&255,r>>>8&255,255&r]}static fromColorRGB(r){return(255&r[0])<<16|(255&r[1])<<8|255&r[2]}clone(){const r=new l;return r.fg=this.fg,r.bg=this.bg,r.extended=this.extended.clone(),r}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}e.AttributeData=l;class _{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(r){this._ext=r}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(r){this._ext&=-469762049,this._ext|=r<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(r){this._ext&=-67108864,this._ext|=67108863&r}get urlId(){return this._urlId}set urlId(r){this._urlId=r}constructor(r=0,c=0){this._ext=0,this._urlId=0,this._ext=r,this._urlId=c}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}e.ExtendedAttrs=_},782:(k,e,l)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CellData=void 0;const _=l(133),a=l(855),r=l(147);class c extends r.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new r.ExtendedAttrs,this.combinedData=""}static fromCharData(f){const i=new c;return i.setFromCharData(f),i}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(f){this.fg=f[a.CHAR_DATA_ATTR_INDEX],this.bg=0;let i=!1;if(f[a.CHAR_DATA_CHAR_INDEX].length>2)i=!0;else if(f[a.CHAR_DATA_CHAR_INDEX].length===2){const t=f[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=t&&t<=56319){const u=f[a.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=u&&u<=57343?this.content=1024*(t-55296)+u-56320+65536|f[a.CHAR_DATA_WIDTH_INDEX]<<22:i=!0}else i=!0}else this.content=f[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|f[a.CHAR_DATA_WIDTH_INDEX]<<22;i&&(this.combinedData=f[a.CHAR_DATA_CHAR_INDEX],this.content=2097152|f[a.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}e.CellData=c},855:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WHITESPACE_CELL_CODE=e.WHITESPACE_CELL_WIDTH=e.WHITESPACE_CELL_CHAR=e.NULL_CELL_CODE=e.NULL_CELL_WIDTH=e.NULL_CELL_CHAR=e.CHAR_DATA_CODE_INDEX=e.CHAR_DATA_WIDTH_INDEX=e.CHAR_DATA_CHAR_INDEX=e.CHAR_DATA_ATTR_INDEX=e.DEFAULT_EXT=e.DEFAULT_ATTR=e.DEFAULT_COLOR=void 0,e.DEFAULT_COLOR=0,e.DEFAULT_ATTR=256|e.DEFAULT_COLOR<<9,e.DEFAULT_EXT=0,e.CHAR_DATA_ATTR_INDEX=0,e.CHAR_DATA_CHAR_INDEX=1,e.CHAR_DATA_WIDTH_INDEX=2,e.CHAR_DATA_CODE_INDEX=3,e.NULL_CELL_CHAR="",e.NULL_CELL_WIDTH=1,e.NULL_CELL_CODE=0,e.WHITESPACE_CELL_CHAR=" ",e.WHITESPACE_CELL_WIDTH=1,e.WHITESPACE_CELL_CODE=32},133:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Utf8ToUtf32=e.StringToUtf32=e.utf32ToString=e.stringFromCodePoint=void 0,e.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},e.utf32ToString=function(l,_=0,a=l.length){let r="";for(let c=_;c<a;++c){let C=l[c];C>65535?(C-=65536,r+=String.fromCharCode(55296+(C>>10))+String.fromCharCode(C%1024+56320)):r+=String.fromCharCode(C)}return r},e.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(l,_){const a=l.length;if(!a)return 0;let r=0,c=0;if(this._interim){const C=l.charCodeAt(c++);56320<=C&&C<=57343?_[r++]=1024*(this._interim-55296)+C-56320+65536:(_[r++]=this._interim,_[r++]=C),this._interim=0}for(let C=c;C<a;++C){const f=l.charCodeAt(C);if(55296<=f&&f<=56319){if(++C>=a)return this._interim=f,r;const i=l.charCodeAt(C);56320<=i&&i<=57343?_[r++]=1024*(f-55296)+i-56320+65536:(_[r++]=f,_[r++]=i)}else f!==65279&&(_[r++]=f)}return r}},e.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(l,_){const a=l.length;if(!a)return 0;let r,c,C,f,i=0,t=0,u=0;if(this.interim[0]){let x=!1,m=this.interim[0];m&=(224&m)==192?31:(240&m)==224?15:7;let s,g=0;for(;(s=63&this.interim[++g])&&g<4;)m<<=6,m|=s;const o=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,p=o-g;for(;u<p;){if(u>=a)return 0;if(s=l[u++],(192&s)!=128){u--,x=!0;break}this.interim[g++]=s,m<<=6,m|=63&s}x||(o===2?m<128?u--:_[i++]=m:o===3?m<2048||m>=55296&&m<=57343||m===65279||(_[i++]=m):m<65536||m>1114111||(_[i++]=m)),this.interim.fill(0)}const d=a-4;let n=u;for(;n<a;){for(;!(!(n<d)||128&(r=l[n])||128&(c=l[n+1])||128&(C=l[n+2])||128&(f=l[n+3]));)_[i++]=r,_[i++]=c,_[i++]=C,_[i++]=f,n+=4;if(r=l[n++],r<128)_[i++]=r;else if((224&r)==192){if(n>=a)return this.interim[0]=r,i;if(c=l[n++],(192&c)!=128){n--;continue}if(t=(31&r)<<6|63&c,t<128){n--;continue}_[i++]=t}else if((240&r)==224){if(n>=a)return this.interim[0]=r,i;if(c=l[n++],(192&c)!=128){n--;continue}if(n>=a)return this.interim[0]=r,this.interim[1]=c,i;if(C=l[n++],(192&C)!=128){n--;continue}if(t=(15&r)<<12|(63&c)<<6|63&C,t<2048||t>=55296&&t<=57343||t===65279)continue;_[i++]=t}else if((248&r)==240){if(n>=a)return this.interim[0]=r,i;if(c=l[n++],(192&c)!=128){n--;continue}if(n>=a)return this.interim[0]=r,this.interim[1]=c,i;if(C=l[n++],(192&C)!=128){n--;continue}if(n>=a)return this.interim[0]=r,this.interim[1]=c,this.interim[2]=C,i;if(f=l[n++],(192&f)!=128){n--;continue}if(t=(7&r)<<18|(63&c)<<12|(63&C)<<6|63&f,t<65536||t>1114111)continue;_[i++]=t}}return i}}},776:function(k,e,l){var _=this&&this.__decorate||function(t,u,d,n){var x,m=arguments.length,s=m<3?u:n===null?n=Object.getOwnPropertyDescriptor(u,d):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,u,d,n);else for(var g=t.length-1;g>=0;g--)(x=t[g])&&(s=(m<3?x(s):m>3?x(u,d,s):x(u,d))||s);return m>3&&s&&Object.defineProperty(u,d,s),s},a=this&&this.__param||function(t,u){return function(d,n){u(d,n,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.traceCall=e.setTraceLogger=e.LogService=void 0;const r=l(859),c=l(97),C={trace:c.LogLevelEnum.TRACE,debug:c.LogLevelEnum.DEBUG,info:c.LogLevelEnum.INFO,warn:c.LogLevelEnum.WARN,error:c.LogLevelEnum.ERROR,off:c.LogLevelEnum.OFF};let f,i=e.LogService=class extends r.Disposable{get logLevel(){return this._logLevel}constructor(t){super(),this._optionsService=t,this._logLevel=c.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),f=this}_updateLogLevel(){this._logLevel=C[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(t){for(let u=0;u<t.length;u++)typeof t[u]=="function"&&(t[u]=t[u]())}_log(t,u,d){this._evalLazyOptionalParams(d),t.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+u,...d)}trace(t,...u){var d,n;this._logLevel<=c.LogLevelEnum.TRACE&&this._log((n=(d=this._optionsService.options.logger)===null||d===void 0?void 0:d.trace.bind(this._optionsService.options.logger))!==null&&n!==void 0?n:console.log,t,u)}debug(t,...u){var d,n;this._logLevel<=c.LogLevelEnum.DEBUG&&this._log((n=(d=this._optionsService.options.logger)===null||d===void 0?void 0:d.debug.bind(this._optionsService.options.logger))!==null&&n!==void 0?n:console.log,t,u)}info(t,...u){var d,n;this._logLevel<=c.LogLevelEnum.INFO&&this._log((n=(d=this._optionsService.options.logger)===null||d===void 0?void 0:d.info.bind(this._optionsService.options.logger))!==null&&n!==void 0?n:console.info,t,u)}warn(t,...u){var d,n;this._logLevel<=c.LogLevelEnum.WARN&&this._log((n=(d=this._optionsService.options.logger)===null||d===void 0?void 0:d.warn.bind(this._optionsService.options.logger))!==null&&n!==void 0?n:console.warn,t,u)}error(t,...u){var d,n;this._logLevel<=c.LogLevelEnum.ERROR&&this._log((n=(d=this._optionsService.options.logger)===null||d===void 0?void 0:d.error.bind(this._optionsService.options.logger))!==null&&n!==void 0?n:console.error,t,u)}};e.LogService=i=_([a(0,c.IOptionsService)],i),e.setTraceLogger=function(t){f=t},e.traceCall=function(t,u,d){if(typeof d.value!="function")throw new Error("not supported");const n=d.value;d.value=function(...x){if(f.logLevel!==c.LogLevelEnum.TRACE)return n.apply(this,x);f.trace("GlyphRenderer#".concat(n.name,"(").concat(x.map((s=>JSON.stringify(s))).join(", "),")"));const m=n.apply(this,x);return f.trace("GlyphRenderer#".concat(n.name," return"),m),m}}},726:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createDecorator=e.getServiceDependencies=e.serviceRegistry=void 0;const l="di$target",_="di$dependencies";e.serviceRegistry=new Map,e.getServiceDependencies=function(a){return a[_]||[]},e.createDecorator=function(a){if(e.serviceRegistry.has(a))return e.serviceRegistry.get(a);const r=function(c,C,f){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(i,t,u){t[l]===t?t[_].push({id:i,index:u}):(t[_]=[{id:i,index:u}],t[l]=t)})(r,c,f)};return r.toString=()=>a,e.serviceRegistry.set(a,r),r}},97:(k,e,l)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.IDecorationService=e.IUnicodeService=e.IOscLinkService=e.IOptionsService=e.ILogService=e.LogLevelEnum=e.IInstantiationService=e.ICharsetService=e.ICoreService=e.ICoreMouseService=e.IBufferService=void 0;const _=l(726);var a;e.IBufferService=(0,_.createDecorator)("BufferService"),e.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),e.ICoreService=(0,_.createDecorator)("CoreService"),e.ICharsetService=(0,_.createDecorator)("CharsetService"),e.IInstantiationService=(0,_.createDecorator)("InstantiationService"),(function(r){r[r.TRACE=0]="TRACE",r[r.DEBUG=1]="DEBUG",r[r.INFO=2]="INFO",r[r.WARN=3]="WARN",r[r.ERROR=4]="ERROR",r[r.OFF=5]="OFF"})(a||(e.LogLevelEnum=a={})),e.ILogService=(0,_.createDecorator)("LogService"),e.IOptionsService=(0,_.createDecorator)("OptionsService"),e.IOscLinkService=(0,_.createDecorator)("OscLinkService"),e.IUnicodeService=(0,_.createDecorator)("UnicodeService"),e.IDecorationService=(0,_.createDecorator)("DecorationService")}},se={};function Y(k){var e=se[k];if(e!==void 0)return e.exports;var l=se[k]={exports:{}};return de[k].call(l.exports,l,l.exports,Y),l.exports}var _e={};return(()=>{var k=_e;Object.defineProperty(k,"__esModule",{value:!0}),k.CanvasAddon=void 0;const e=Y(345),l=Y(859),_=Y(776),a=Y(949);class r extends l.Disposable{constructor(){super(...arguments),this._onChangeTextureAtlas=this.register(new e.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new e.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event}get textureAtlas(){var C;return(C=this._renderer)===null||C===void 0?void 0:C.textureAtlas}activate(C){const f=C._core;if(!C.element)return void this.register(f.onWillOpen((()=>this.activate(C))));this._terminal=C;const i=f.coreService,t=f.optionsService,u=f.screenElement,d=f.linkifier2,n=f,x=n._bufferService,m=n._renderService,s=n._characterJoinerService,g=n._charSizeService,o=n._coreBrowserService,p=n._decorationService,M=n._logService,h=n._themeService;(0,_.setTraceLogger)(M),this._renderer=new a.CanvasRenderer(C,u,d,x,g,t,s,i,o,p,h),this.register((0,e.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,e.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),m.setRenderer(this._renderer),m.handleResize(x.cols,x.rows),this.register((0,l.toDisposable)((()=>{var v;m.setRenderer(this._terminal._core._createRenderer()),m.handleResize(C.cols,C.rows),(v=this._renderer)===null||v===void 0||v.dispose(),this._renderer=void 0})))}}k.CanvasAddon=r})(),_e})()))})(ce)),ce.exports}var Me=we();export{Me as x};