@opensumi/cli-engine 3.4.6-next-1730692409.0 → 3.4.6-next-1733744589.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/238.browser.js +11 -0
- package/lib/browser/296.browser.js +1 -0
- package/lib/browser/382.browser.js +58 -0
- package/lib/browser/412.browser.js +1 -0
- package/lib/browser/412.main.css +1 -0
- package/lib/browser/454.browser.js +259 -0
- package/lib/browser/582.browser.js +1 -0
- package/lib/browser/622.browser.js +1 -0
- package/lib/browser/622.main.css +1 -0
- package/lib/browser/assets.json +92 -0
- package/lib/browser/browser.js +28685 -0
- package/lib/browser/f86e6127667de32bbd4f.png +0 -0
- package/lib/browser/fd3be59fe5f76327c48f.png +0 -0
- package/lib/browser/fonts/codicon.ttf +0 -0
- package/lib/browser/images/background-logo-icon.svg +19 -0
- package/lib/browser/images/boolean-dark.svg +3 -0
- package/lib/browser/images/boolean-light.svg +3 -0
- package/lib/browser/images/breakpoint-conditional-disabled.svg +4 -0
- package/lib/browser/images/breakpoint-conditional-unverified.svg +4 -0
- package/lib/browser/images/breakpoint-conditional.svg +4 -0
- package/lib/browser/images/breakpoint-disabled.svg +4 -0
- package/lib/browser/images/breakpoint-hint.svg +4 -0
- package/lib/browser/images/breakpoint-log-disabled.svg +4 -0
- package/lib/browser/images/breakpoint-log-unverified.svg +4 -0
- package/lib/browser/images/breakpoint-log.svg +4 -0
- package/lib/browser/images/breakpoint-unsupported.svg +4 -0
- package/lib/browser/images/breakpoint-unverified.svg +4 -0
- package/lib/browser/images/breakpoint.svg +4 -0
- package/lib/browser/images/class-dark.svg +3 -0
- package/lib/browser/images/class-light.svg +3 -0
- package/lib/browser/images/constant-dark.svg +4 -0
- package/lib/browser/images/constant-light.svg +4 -0
- package/lib/browser/images/current-and-breakpoint.svg +4 -0
- package/lib/browser/images/current-arrow.svg +4 -0
- package/lib/browser/images/enumerator-dark.svg +3 -0
- package/lib/browser/images/enumerator-item-dark.svg +3 -0
- package/lib/browser/images/enumerator-item-light.svg +3 -0
- package/lib/browser/images/enumerator-light.svg +3 -0
- package/lib/browser/images/event-dark.svg +3 -0
- package/lib/browser/images/event-light.svg +3 -0
- package/lib/browser/images/field-dark.svg +3 -0
- package/lib/browser/images/field-light.svg +3 -0
- package/lib/browser/images/file-dark.svg +3 -0
- package/lib/browser/images/file-light.svg +3 -0
- package/lib/browser/images/indexer-dark.svg +3 -0
- package/lib/browser/images/indexer-light.svg +3 -0
- package/lib/browser/images/interface-dark.svg +3 -0
- package/lib/browser/images/interface-light.svg +3 -0
- package/lib/browser/images/keyword-dark.svg +3 -0
- package/lib/browser/images/keyword-light.svg +3 -0
- package/lib/browser/images/loading-dark.svg +52 -0
- package/lib/browser/images/loading-hc.svg +52 -0
- package/lib/browser/images/loading.svg +52 -0
- package/lib/browser/images/logo.svg +1 -0
- package/lib/browser/images/method-dark.svg +3 -0
- package/lib/browser/images/method-light.svg +3 -0
- package/lib/browser/images/namespace-dark.svg +3 -0
- package/lib/browser/images/namespace-light.svg +3 -0
- package/lib/browser/images/numeric-dark.svg +3 -0
- package/lib/browser/images/numeric-light.svg +3 -0
- package/lib/browser/images/operator-dark.svg +3 -0
- package/lib/browser/images/operator-light.svg +3 -0
- package/lib/browser/images/property-dark.svg +3 -0
- package/lib/browser/images/property-light.svg +3 -0
- package/lib/browser/images/snippet-dark.svg +3 -0
- package/lib/browser/images/snippet-light.svg +3 -0
- package/lib/browser/images/stackframe-and-breakpoint.svg +4 -0
- package/lib/browser/images/stackframe-arrow.svg +4 -0
- package/lib/browser/images/string-dark.svg +3 -0
- package/lib/browser/images/string-light.svg +3 -0
- package/lib/browser/images/structure-dark.svg +3 -0
- package/lib/browser/images/structure-light.svg +3 -0
- package/lib/browser/images/template-dark.svg +3 -0
- package/lib/browser/images/template-light.svg +3 -0
- package/lib/browser/images/variable-dark.svg +3 -0
- package/lib/browser/images/variable-light.svg +3 -0
- package/lib/browser/index.html +42 -0
- package/lib/browser/loader.js +3 -0
- package/lib/browser/main.css +1 -0
- package/lib/browser/worker-host.js +1 -1
- package/lib/hosted/ext.process.js +1 -1
- package/package.json +10 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_opensumi_cli_engine=self.webpackChunk_opensumi_cli_engine||[]).push([[296],{86296:ve=>{(function(ce,ie){ve.exports=ie()})(self,()=>(()=>{"use strict";var ce={903:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BaseRenderLayer=void 0;const d=h(627),n=h(237),o=h(860),a=h(374),f=h(296),g=h(855),i=h(274),t=h(859),x=h(399),v=h(345);class c extends t.Disposable{constructor(s,_,l,r,u,C,w,b,L,R){super(),this._terminal=s,this._container=_,this._alpha=u,this._themeService=C,this._bufferService=w,this._optionsService=b,this._decorationService=L,this._coreBrowserService=R,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._onAddTextureAtlasCanvas=this.register(new v.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new i.CellColorResolver(this._terminal,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=document.createElement("canvas"),this._canvas.classList.add(`xterm-${l}-layer`),this._canvas.style.zIndex=r.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors(A=>{this._refreshCharAtlas(A),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)})),this.register((0,t.toDisposable)(()=>{var A;this._canvas.remove(),(A=this._charAtlas)===null||A===void 0||A.dispose()}))}get canvas(){return this._canvas}get cacheCanvas(){var s;return(s=this._charAtlas)===null||s===void 0?void 0:s.pages[0].canvas}_initCanvas(){this._ctx=(0,a.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(s,_){}handleSelectionChanged(s,_,l=!1){this._selectionModel.update(this._terminal,s,_,l)}_setTransparency(s){if(s===this._alpha)return;const _=this._canvas;this._alpha=s,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,_),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(s){var _;if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){(_=this._charAtlasDisposable)===null||_===void 0||_.dispose(),this._charAtlas=(0,d.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,s,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable=(0,v.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let l=0;l<this._charAtlas.pages.length;l++)this._bitmapGenerator[l]=new p(this._charAtlas.pages[l].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=`${s.css.canvas.width}px`,this._canvas.style.height=`${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,_,l,r){this._ctx.fillRect(s*this._deviceCellWidth,_*this._deviceCellHeight,l*this._deviceCellWidth,r*this._deviceCellHeight)}_fillMiddleLineAtCells(s,_,l=1){const r=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(s*this._deviceCellWidth,(_+1)*this._deviceCellHeight-r-this._coreBrowserService.dpr,l*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(s,_,l=1,r=0){this._ctx.fillRect(s*this._deviceCellWidth,(_+1)*this._deviceCellHeight+r-this._coreBrowserService.dpr-1,l*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(s,_,l=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const r=this._coreBrowserService.dpr;this._ctx.lineWidth=r;for(let u=0;u<l;u++){const C=(s+u)*this._deviceCellWidth,w=(s+u+.5)*this._deviceCellWidth,b=(s+u+1)*this._deviceCellWidth,L=(_+1)*this._deviceCellHeight-r-1,R=L-r,A=L+r;this._ctx.moveTo(C,L),this._ctx.bezierCurveTo(C,R,w,R,w,L),this._ctx.bezierCurveTo(w,A,b,A,b,L)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(s,_,l=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const r=this._coreBrowserService.dpr;this._ctx.lineWidth=r,this._ctx.setLineDash([2*r,r]);const u=s*this._deviceCellWidth,C=(_+1)*this._deviceCellHeight-r-1;this._ctx.moveTo(u,C);for(let w=0;w<l;w++){const b=(s+l+w)*this._deviceCellWidth;this._ctx.lineTo(b,C)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(s,_,l=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const r=this._coreBrowserService.dpr;this._ctx.lineWidth=r,this._ctx.setLineDash([4*r,3*r]);const u=s*this._deviceCellWidth,C=(s+l)*this._deviceCellWidth,w=(_+1)*this._deviceCellHeight-r-1;this._ctx.moveTo(u,w),this._ctx.lineTo(C,w),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(s,_,l){this._ctx.fillRect(s*this._deviceCellWidth,_*this._deviceCellHeight,this._coreBrowserService.dpr*l,this._deviceCellHeight)}_strokeRectAtCell(s,_,l,r){const u=this._coreBrowserService.dpr;this._ctx.lineWidth=u,this._ctx.strokeRect(s*this._deviceCellWidth+u/2,_*this._deviceCellHeight+u/2,l*this._deviceCellWidth-u,r*this._deviceCellHeight-u)}_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,_,l,r){this._alpha?this._ctx.clearRect(s*this._deviceCellWidth,_*this._deviceCellHeight,l*this._deviceCellWidth,r*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(s*this._deviceCellWidth,_*this._deviceCellHeight,l*this._deviceCellWidth,r*this._deviceCellHeight))}_fillCharTrueColor(s,_,l){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=n.TEXT_BASELINE,this._clipRow(l);let r=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(r=(0,o.tryDrawCustomChar)(this._ctx,s.getChars(),_*this._deviceCellWidth,l*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),r||this._ctx.fillText(s.getChars(),_*this._deviceCellWidth+this._deviceCharLeft,l*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(s,_,l){var r,u,C,w;const b=s.getChars();let L;this._cellColorResolver.resolve(s,_,this._bufferService.buffer.ydisp+l),L=b&&b.length>1?this._charAtlas.getRasterizedGlyphCombinedChar(b,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext):this._charAtlas.getRasterizedGlyph(s.getCode()||g.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext),L.size.x&&L.size.y&&(this._ctx.save(),this._clipRow(l),this._bitmapGenerator[L.texturePage]&&this._charAtlas.pages[L.texturePage].canvas!==this._bitmapGenerator[L.texturePage].canvas&&((u=(r=this._bitmapGenerator[L.texturePage])===null||r===void 0?void 0:r.bitmap)===null||u===void 0||u.close(),delete this._bitmapGenerator[L.texturePage]),this._charAtlas.pages[L.texturePage].version!==((C=this._bitmapGenerator[L.texturePage])===null||C===void 0?void 0:C.version)&&(this._bitmapGenerator[L.texturePage]||(this._bitmapGenerator[L.texturePage]=new p(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(((w=this._bitmapGenerator[L.texturePage])===null||w===void 0?void 0:w.bitmap)||this._charAtlas.pages[L.texturePage].canvas,L.texturePosition.x,L.texturePosition.y,L.size.x,L.size.y,_*this._deviceCellWidth+this._deviceCharLeft-L.offset.x,l*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,_){return`${_?"italic":""} ${s?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}e.BaseRenderLayer=c;class p{constructor(s){this.canvas=s,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}get bitmap(){return this._bitmap}refresh(){var s;(s=this._bitmap)===null||s===void 0||s.close(),this._bitmap=void 0,x.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(_=>{this._state===2?this.refresh():this._bitmap=_,this._state=0}),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CanvasRenderer=void 0;const d=h(627),n=h(56),o=h(374),a=h(345),f=h(859),g=h(873),i=h(43),t=h(630),x=h(744);class v extends f.Disposable{constructor(p,m,s,_,l,r,u,C,w,b,L){super(),this._terminal=p,this._screenElement=m,this._bufferService=_,this._charSizeService=l,this._optionsService=r,this._coreBrowserService=w,this._themeService=L,this._onRequestRedraw=this.register(new a.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new a.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new a.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const R=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new x.TextRenderLayer(this._terminal,this._screenElement,0,R,this._bufferService,this._optionsService,u,b,this._coreBrowserService,L),new t.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,b,this._optionsService,L),new i.LinkRenderLayer(this._terminal,this._screenElement,2,s,this._bufferService,this._optionsService,b,this._coreBrowserService,L),new g.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,C,this._coreBrowserService,b,L)];for(const A of this._renderLayers)(0,a.forwardEvent)(A.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,o.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this.register((0,n.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,(A,S)=>this._setCanvasDevicePixelDimensions(A,S))),this.register((0,f.toDisposable)(()=>{for(const A of this._renderLayers)A.dispose();(0,d.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(p,m){this._updateDimensions();for(const s of this._renderLayers)s.resize(this.dimensions);this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}handleCharSizeChanged(){this.handleResize(this._bufferService.cols,this._bufferService.rows)}handleBlur(){this._runOperation(p=>p.handleBlur())}handleFocus(){this._runOperation(p=>p.handleFocus())}handleSelectionChanged(p,m,s=!1){this._runOperation(_=>_.handleSelectionChanged(p,m,s)),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation(p=>p.handleCursorMove())}clear(){this._runOperation(p=>p.reset())}_runOperation(p){for(const m of this._renderLayers)p(m)}renderRows(p,m){for(const s of this._renderLayers)s.handleGridChanged(p,m)}clearTextureAtlas(){for(const p of this._renderLayers)p.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const p=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*p),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*p),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/p),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/p),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(p,m){this.dimensions.device.canvas.height=m,this.dimensions.device.canvas.width=p;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=v},873:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRenderLayer=void 0;const d=h(903),n=h(782),o=h(859),a=h(399);class f extends d.BaseRenderLayer{constructor(t,x,v,c,p,m,s,_,l,r){super(t,x,"cursor",v,!0,r,p,m,l,_),this._onRequestRedraw=c,this._coreService=s,this._cell=new n.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)},this.register(m.onOptionChange(()=>this._handleOptionsChanged())),this.register((0,o.toDisposable)(()=>{var u;(u=this._cursorBlinkStateManager)===null||u===void 0||u.dispose(),this._cursorBlinkStateManager=void 0}))}resize(t){super.resize(t),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var t;this._clearCursor(),(t=this._cursorBlinkStateManager)===null||t===void 0||t.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var t;(t=this._cursorBlinkStateManager)===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)===null||t===void 0||t.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}_handleOptionsChanged(){var t;this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new g(this._coreBrowserService.isFocused,()=>{this._render(!0)},this._coreBrowserService)):((t=this._cursorBlinkStateManager)===null||t===void 0||t.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var t;(t=this._cursorBlinkStateManager)===null||t===void 0||t.restartBlinkAnimation()}handleGridChanged(t,x){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()}_render(t){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const x=this._bufferService.buffer.ybase+this._bufferService.buffer.y,v=x-this._bufferService.buffer.ydisp;if(v<0||v>=this._bufferService.rows)return void this._clearCursor();const c=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(x).loadCell(c,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 p=this._optionsService.rawOptions.cursorStyle;return this._renderBlurCursor(c,v,this._cell),this._ctx.restore(),this._state.x=c,this._state.y=v,this._state.isFocused=!1,this._state.style=p,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===c&&this._state.y===v&&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"](c,v,this._cell),this._ctx.restore(),this._state.x=c,this._state.y=v,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(a.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,x,v){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(t,x,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(t,x,v){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(t,x,v.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(v,t,x),this._ctx.restore()}_renderUnderlineCursor(t,x,v){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(t,x),this._ctx.restore()}_renderBlurCursor(t,x,v){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(t,x,v.getWidth(),1),this._ctx.restore()}}e.CursorRenderLayer=f;class g{constructor(t,x,v){this._renderCallback=x,this._coreBrowserService=v,this.isCursorVisible=!0,t&&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(t=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const x=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,x>0)return void this._restartInterval(x)}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 x=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(x)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},t)}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()}}},574:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GridCache=void 0,e.GridCache=class{constructor(){this.cache=[]}resize(h,d){for(let n=0;n<h;n++){this.cache.length<=n&&this.cache.push([]);for(let o=this.cache[n].length;o<d;o++)this.cache[n].push(void 0);this.cache[n].length=d}this.cache.length=h}clear(){for(let h=0;h<this.cache.length;h++)for(let d=0;d<this.cache[h].length;d++)this.cache[h][d]=void 0}}},43:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkRenderLayer=void 0;const d=h(903),n=h(237),o=h(197);class a extends d.BaseRenderLayer{constructor(g,i,t,x,v,c,p,m,s){super(g,i,"link",t,!0,s,v,c,p,m),this.register(x.onShowLinkUnderline(_=>this._handleShowLinkUnderline(_))),this.register(x.onHideLinkUnderline(_=>this._handleHideLinkUnderline(_)))}resize(g){super.resize(g),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 g=this._state.y2-this._state.y1-1;g>0&&this._clearCells(0,this._state.y1+1,this._state.cols,g),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(g){if(g.fg===n.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:g.fg&&(0,o.is256Color)(g.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[g.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,g.y1===g.y2)this._fillBottomLineAtCells(g.x1,g.y1,g.x2-g.x1);else{this._fillBottomLineAtCells(g.x1,g.y1,g.cols-g.x1);for(let i=g.y1+1;i<g.y2;i++)this._fillBottomLineAtCells(0,i,g.cols);this._fillBottomLineAtCells(0,g.y2,g.x2)}this._state=g}_handleHideLinkUnderline(g){this._clearCurrentLink()}}e.LinkRenderLayer=a},630:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRenderLayer=void 0;const d=h(903);class n extends d.BaseRenderLayer{constructor(a,f,g,i,t,x,v,c){super(a,f,"selection",g,!0,c,i,v,x,t),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(a){super.resize(a),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(a,f,g){super.handleSelectionChanged(a,f,g),this._redrawSelection(a,f,g)}_redrawSelection(a,f,g){if(!this._didStateChange(a,f,g,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!a||!f)return void this._clearState();const i=a[1]-this._bufferService.buffer.ydisp,t=f[1]-this._bufferService.buffer.ydisp,x=Math.max(i,0),v=Math.min(t,this._bufferService.rows-1);if(x>=this._bufferService.rows||v<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,g){const c=a[0],p=f[0]-c,m=v-x+1;this._fillCells(c,x,p,m)}else{const c=i===x?a[0]:0,p=x===t?f[0]:this._bufferService.cols;this._fillCells(c,x,p-c,1);const m=Math.max(v-x-1,0);if(this._fillCells(0,x+1,this._bufferService.cols,m),x!==v){const s=t===v?f[0]:this._bufferService.cols;this._fillCells(0,v,s,1)}}this._state.start=[a[0],a[1]],this._state.end=[f[0],f[1]],this._state.columnSelectMode=g,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(a,f,g,i){return!this._areCoordinatesEqual(a,this._state.start)||!this._areCoordinatesEqual(f,this._state.end)||g!==this._state.columnSelectMode||i!==this._state.ydisp}_areCoordinatesEqual(a,f){return!(!a||!f)&&a[0]===f[0]&&a[1]===f[1]}}e.SelectionRenderLayer=n},744:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TextRenderLayer=void 0;const d=h(574),n=h(903),o=h(147),a=h(855),f=h(782),g=h(577);class i extends n.BaseRenderLayer{constructor(x,v,c,p,m,s,_,l,r,u){super(x,v,"text",c,p,u,m,s,l,r),this._characterJoinerService=_,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new f.CellData,this._state=new d.GridCache,this.register(s.onSpecificOptionChange("allowTransparency",C=>this._setTransparency(C)))}resize(x){super.resize(x);const v=this._getFont(!1,!1);this._characterWidth===x.device.char.width&&this._characterFont===v||(this._characterWidth=x.device.char.width,this._characterFont=v,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(x,v,c){for(let p=x;p<=v;p++){const m=p+this._bufferService.buffer.ydisp,s=this._bufferService.buffer.lines.get(m),_=this._characterJoinerService.getJoinedCharacters(m);for(let l=0;l<this._bufferService.cols;l++){s.loadCell(l,this._workCell);let r=this._workCell,u=!1,C=l;if(r.getWidth()!==0){if(_.length>0&&l===_[0][0]){u=!0;const w=_.shift();r=new g.JoinedCellData(this._workCell,s.translateToString(!0,w[0],w[1]),w[1]-w[0]),C=w[1]-1}!u&&this._isOverlapping(r)&&C<s.length-1&&s.getCodePoint(C+1)===a.NULL_CELL_CODE&&(r.content&=-12582913,r.content|=8388608),c(r,l,p),l=C}}}}_drawBackground(x,v){const c=this._ctx,p=this._bufferService.cols;let m=0,s=0,_=null;c.save(),this._forEachCell(x,v,(l,r,u)=>{let C=null;l.isInverse()?C=l.isFgDefault()?this._themeService.colors.foreground.css:l.isFgRGB()?`rgb(${o.AttributeData.toColorRGB(l.getFgColor()).join(",")})`:this._themeService.colors.ansi[l.getFgColor()].css:l.isBgRGB()?C=`rgb(${o.AttributeData.toColorRGB(l.getBgColor()).join(",")})`:l.isBgPalette()&&(C=this._themeService.colors.ansi[l.getBgColor()].css);let w=!1;this._decorationService.forEachDecorationAtCell(r,this._bufferService.buffer.ydisp+u,void 0,b=>{b.options.layer!=="top"&&w||(b.backgroundColorRGB&&(C=b.backgroundColorRGB.css),w=b.options.layer==="top")}),_===null&&(m=r,s=u),u!==s?(c.fillStyle=_||"",this._fillCells(m,s,p-m,1),m=r,s=u):_!==C&&(c.fillStyle=_||"",this._fillCells(m,s,r-m,1),m=r,s=u),_=C}),_!==null&&(c.fillStyle=_,this._fillCells(m,s,p-m,1)),c.restore()}_drawForeground(x,v){this._forEachCell(x,v,(c,p,m)=>this._drawChars(c,p,m))}handleGridChanged(x,v){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,x,this._bufferService.cols,v-x+1),this._drawBackground(x,v),this._drawForeground(x,v))}_isOverlapping(x){if(x.getWidth()!==1||x.getCode()<256)return!1;const v=x.getChars();if(this._characterOverlapCache.hasOwnProperty(v))return this._characterOverlapCache[v];this._ctx.save(),this._ctx.font=this._characterFont;const c=Math.floor(this._ctx.measureText(v).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[v]=c,c}}e.TextRenderLayer=i},274:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CellColorResolver=void 0;let h,d=0,n=0,o=!1,a=!1,f=!1;e.CellColorResolver=class{constructor(g,i,t,x,v){this._terminal=g,this._selectionRenderModel=i,this._decorationService=t,this._coreBrowserService=x,this._themeService=v,this.result={fg:0,bg:0,ext:0}}resolve(g,i,t){this.result.bg=g.bg,this.result.fg=g.fg,this.result.ext=268435456&g.bg?g.extended.ext:0,n=0,d=0,a=!1,o=!1,f=!1,h=this._themeService.colors,this._decorationService.forEachDecorationAtCell(i,t,"bottom",x=>{x.backgroundColorRGB&&(n=x.backgroundColorRGB.rgba>>8&16777215,a=!0),x.foregroundColorRGB&&(d=x.foregroundColorRGB.rgba>>8&16777215,o=!0)}),f=this._selectionRenderModel.isCellSelected(this._terminal,i,t),f&&(n=(this._coreBrowserService.isFocused?h.selectionBackgroundOpaque:h.selectionInactiveBackgroundOpaque).rgba>>8&16777215,a=!0,h.selectionForeground&&(d=h.selectionForeground.rgba>>8&16777215,o=!0)),this._decorationService.forEachDecorationAtCell(i,t,"top",x=>{x.backgroundColorRGB&&(n=x.backgroundColorRGB.rgba>>8&16777215,a=!0),x.foregroundColorRGB&&(d=x.foregroundColorRGB.rgba>>8&16777215,o=!0)}),a&&(n=f?-16777216&g.bg&-134217729|n|50331648:-16777216&g.bg|n|50331648),o&&(d=-16777216&g.fg&-67108865|d|50331648),67108864&this.result.fg&&(a&&!o&&(d=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&h.background.rgba>>8|50331648,o=!0),!a&&o&&(n=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&h.foreground.rgba>>8|50331648,a=!0)),h=void 0,this.result.bg=a?n:this.result.bg,this.result.fg=o?d:this.result.fg}}},627:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.removeTerminalFromCache=e.acquireTextureAtlas=void 0;const d=h(509),n=h(197),o=[];e.acquireTextureAtlas=function(a,f,g,i,t,x,v,c){const p=(0,n.generateConfig)(i,t,x,v,f,g,c);for(let _=0;_<o.length;_++){const l=o[_],r=l.ownedBy.indexOf(a);if(r>=0){if((0,n.configEquals)(l.config,p))return l.atlas;l.ownedBy.length===1?(l.atlas.dispose(),o.splice(_,1)):l.ownedBy.splice(r,1);break}}for(let _=0;_<o.length;_++){const l=o[_];if((0,n.configEquals)(l.config,p))return l.ownedBy.push(a),l.atlas}const m=a._core,s={atlas:new d.TextureAtlas(document,p,m.unicodeService),config:p,ownedBy:[a]};return o.push(s),s.atlas},e.removeTerminalFromCache=function(a){for(let f=0;f<o.length;f++){const g=o[f].ownedBy.indexOf(a);if(g!==-1){o[f].ownedBy.length===1?(o[f].atlas.dispose(),o.splice(f,1)):o[f].ownedBy.splice(g,1);break}}}},197:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.is256Color=e.configEquals=e.generateConfig=void 0;const d=h(160);e.generateConfig=function(n,o,a,f,g,i,t){const x={foreground:i.foreground,background:i.background,cursor:d.NULL_COLOR,cursorAccent:d.NULL_COLOR,selectionForeground:d.NULL_COLOR,selectionBackgroundTransparent:d.NULL_COLOR,selectionBackgroundOpaque:d.NULL_COLOR,selectionInactiveBackgroundTransparent:d.NULL_COLOR,selectionInactiveBackgroundOpaque:d.NULL_COLOR,ansi:i.ansi.slice(),contrastCache:i.contrastCache};return{customGlyphs:g.customGlyphs,devicePixelRatio:t,letterSpacing:g.letterSpacing,lineHeight:g.lineHeight,deviceCellWidth:n,deviceCellHeight:o,deviceCharWidth:a,deviceCharHeight:f,fontFamily:g.fontFamily,fontSize:g.fontSize,fontWeight:g.fontWeight,fontWeightBold:g.fontWeightBold,allowTransparency:g.allowTransparency,drawBoldTextInBrightColors:g.drawBoldTextInBrightColors,minimumContrastRatio:g.minimumContrastRatio,colors:x}},e.configEquals=function(n,o){for(let a=0;a<n.colors.ansi.length;a++)if(n.colors.ansi[a].rgba!==o.colors.ansi[a].rgba)return!1;return n.devicePixelRatio===o.devicePixelRatio&&n.customGlyphs===o.customGlyphs&&n.lineHeight===o.lineHeight&&n.letterSpacing===o.letterSpacing&&n.fontFamily===o.fontFamily&&n.fontSize===o.fontSize&&n.fontWeight===o.fontWeight&&n.fontWeightBold===o.fontWeightBold&&n.allowTransparency===o.allowTransparency&&n.deviceCharWidth===o.deviceCharWidth&&n.deviceCharHeight===o.deviceCharHeight&&n.drawBoldTextInBrightColors===o.drawBoldTextInBrightColors&&n.minimumContrastRatio===o.minimumContrastRatio&&n.colors.foreground.rgba===o.colors.foreground.rgba&&n.colors.background.rgba===o.colors.background.rgba},e.is256Color=function(n){return(50331648&n)==16777216||(50331648&n)==33554432}},237:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TEXT_BASELINE=e.DIM_OPACITY=e.INVERTED_DEFAULT_COLOR=void 0;const d=h(399);e.INVERTED_DEFAULT_COLOR=257,e.DIM_OPACITY=.5,e.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},860:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryDrawCustomChar=e.powerlineDefinitions=e.boxDrawingDefinitions=e.blockElementDefinitions=void 0;const d=h(374);e.blockElementDefinitions={"\u2580":[{x:0,y:0,w:8,h:4}],"\u2581":[{x:0,y:7,w:8,h:1}],"\u2582":[{x:0,y:6,w:8,h:2}],"\u2583":[{x:0,y:5,w:8,h:3}],"\u2584":[{x:0,y:4,w:8,h:4}],"\u2585":[{x:0,y:3,w:8,h:5}],"\u2586":[{x:0,y:2,w:8,h:6}],"\u2587":[{x:0,y:1,w:8,h:7}],"\u2588":[{x:0,y:0,w:8,h:8}],"\u2589":[{x:0,y:0,w:7,h:8}],"\u258A":[{x:0,y:0,w:6,h:8}],"\u258B":[{x:0,y:0,w:5,h:8}],"\u258C":[{x:0,y:0,w:4,h:8}],"\u258D":[{x:0,y:0,w:3,h:8}],"\u258E":[{x:0,y:0,w:2,h:8}],"\u258F":[{x:0,y:0,w:1,h:8}],"\u2590":[{x:4,y:0,w:4,h:8}],"\u2594":[{x:0,y:0,w:8,h:1}],"\u2595":[{x:7,y:0,w:1,h:8}],"\u2596":[{x:0,y:4,w:4,h:4}],"\u2597":[{x:4,y:4,w:4,h:4}],"\u2598":[{x:0,y:0,w:4,h:4}],"\u2599":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u259A":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"\u259B":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"\u259C":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"\u259D":[{x:4,y:0,w:4,h:4}],"\u259E":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"\u259F":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u{1FB70}":[{x:1,y:0,w:1,h:8}],"\u{1FB71}":[{x:2,y:0,w:1,h:8}],"\u{1FB72}":[{x:3,y:0,w:1,h:8}],"\u{1FB73}":[{x:4,y:0,w:1,h:8}],"\u{1FB74}":[{x:5,y:0,w:1,h:8}],"\u{1FB75}":[{x:6,y:0,w:1,h:8}],"\u{1FB76}":[{x:0,y:1,w:8,h:1}],"\u{1FB77}":[{x:0,y:2,w:8,h:1}],"\u{1FB78}":[{x:0,y:3,w:8,h:1}],"\u{1FB79}":[{x:0,y:4,w:8,h:1}],"\u{1FB7A}":[{x:0,y:5,w:8,h:1}],"\u{1FB7B}":[{x:0,y:6,w:8,h:1}],"\u{1FB7C}":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB7D}":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7E}":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7F}":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB80}":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB81}":[{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}],"\u{1FB82}":[{x:0,y:0,w:8,h:2}],"\u{1FB83}":[{x:0,y:0,w:8,h:3}],"\u{1FB84}":[{x:0,y:0,w:8,h:5}],"\u{1FB85}":[{x:0,y:0,w:8,h:6}],"\u{1FB86}":[{x:0,y:0,w:8,h:7}],"\u{1FB87}":[{x:6,y:0,w:2,h:8}],"\u{1FB88}":[{x:5,y:0,w:3,h:8}],"\u{1FB89}":[{x:3,y:0,w:5,h:8}],"\u{1FB8A}":[{x:2,y:0,w:6,h:8}],"\u{1FB8B}":[{x:1,y:0,w:7,h:8}],"\u{1FB95}":[{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}],"\u{1FB96}":[{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}],"\u{1FB97}":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const n={"\u2591":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"\u2592":[[1,0],[0,0],[0,1],[0,0]],"\u2593":[[0,1],[1,1],[1,0],[1,1]]};e.boxDrawingDefinitions={"\u2500":{1:"M0,.5 L1,.5"},"\u2501":{3:"M0,.5 L1,.5"},"\u2502":{1:"M.5,0 L.5,1"},"\u2503":{3:"M.5,0 L.5,1"},"\u250C":{1:"M0.5,1 L.5,.5 L1,.5"},"\u250F":{3:"M0.5,1 L.5,.5 L1,.5"},"\u2510":{1:"M0,.5 L.5,.5 L.5,1"},"\u2513":{3:"M0,.5 L.5,.5 L.5,1"},"\u2514":{1:"M.5,0 L.5,.5 L1,.5"},"\u2517":{3:"M.5,0 L.5,.5 L1,.5"},"\u2518":{1:"M.5,0 L.5,.5 L0,.5"},"\u251B":{3:"M.5,0 L.5,.5 L0,.5"},"\u251C":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u2523":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u2524":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u252B":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u252C":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2533":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2534":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"\u253B":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"\u253C":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"\u254B":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"\u2574":{1:"M.5,.5 L0,.5"},"\u2578":{3:"M.5,.5 L0,.5"},"\u2575":{1:"M.5,.5 L.5,0"},"\u2579":{3:"M.5,.5 L.5,0"},"\u2576":{1:"M.5,.5 L1,.5"},"\u257A":{3:"M.5,.5 L1,.5"},"\u2577":{1:"M.5,.5 L.5,1"},"\u257B":{3:"M.5,.5 L.5,1"},"\u2550":{1:(i,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"\u2551":{1:(i,t)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"\u2552":{1:(i,t)=>`M.5,1 L.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"\u2553":{1:(i,t)=>`M${.5-i},1 L${.5-i},.5 L1,.5 M${.5+i},.5 L${.5+i},1`},"\u2554":{1:(i,t)=>`M1,${.5-t} L${.5-i},${.5-t} L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1`},"\u2555":{1:(i,t)=>`M0,${.5-t} L.5,${.5-t} L.5,1 M0,${.5+t} L.5,${.5+t}`},"\u2556":{1:(i,t)=>`M${.5+i},1 L${.5+i},.5 L0,.5 M${.5-i},.5 L${.5-i},1`},"\u2557":{1:(i,t)=>`M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M0,${.5-t} L${.5+i},${.5-t} L${.5+i},1`},"\u2558":{1:(i,t)=>`M.5,0 L.5,${.5+t} L1,${.5+t} M.5,${.5-t} L1,${.5-t}`},"\u2559":{1:(i,t)=>`M1,.5 L${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`},"\u255A":{1:(i,t)=>`M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0 M1,${.5+t} L${.5-i},${.5+t} L${.5-i},0`},"\u255B":{1:(i,t)=>`M0,${.5+t} L.5,${.5+t} L.5,0 M0,${.5-t} L.5,${.5-t}`},"\u255C":{1:(i,t)=>`M0,.5 L${.5+i},.5 L${.5+i},0 M${.5-i},.5 L${.5-i},0`},"\u255D":{1:(i,t)=>`M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0 M0,${.5+t} L${.5+i},${.5+t} L${.5+i},0`},"\u255E":{1:(i,t)=>`M.5,0 L.5,1 M.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"\u255F":{1:(i,t)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1 M${.5+i},.5 L1,.5`},"\u2560":{1:(i,t)=>`M${.5-i},0 L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1 M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0`},"\u2561":{1:(i,t)=>`M.5,0 L.5,1 M0,${.5-t} L.5,${.5-t} M0,${.5+t} L.5,${.5+t}`},"\u2562":{1:(i,t)=>`M0,.5 L${.5-i},.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"\u2563":{1:(i,t)=>`M${.5+i},0 L${.5+i},1 M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0`},"\u2564":{1:(i,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t} M.5,${.5+t} L.5,1`},"\u2565":{1:(i,t)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},1 M${.5+i},.5 L${.5+i},1`},"\u2566":{1:(i,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1`},"\u2567":{1:(i,t)=>`M.5,0 L.5,${.5-t} M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"\u2568":{1:(i,t)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`},"\u2569":{1:(i,t)=>`M0,${.5+t} L1,${.5+t} M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0 M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0`},"\u256A":{1:(i,t)=>`M.5,0 L.5,1 M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"\u256B":{1:(i,t)=>`M0,.5 L1,.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"\u256C":{1:(i,t)=>`M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1 M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0 M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0`},"\u2571":{1:"M1,0 L0,1"},"\u2572":{1:"M0,0 L1,1"},"\u2573":{1:"M1,0 L0,1 M0,0 L1,1"},"\u257C":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u257D":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"\u257E":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u257F":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u250D":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"\u250E":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2511":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"\u2512":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"\u2515":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"\u2516":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u2519":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"\u251A":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"\u251D":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"\u251E":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u251F":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2520":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"\u2521":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"\u2522":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"\u2525":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"\u2526":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u2527":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"\u2528":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"\u2529":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"\u252A":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"\u252D":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u252E":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"\u252F":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"\u2530":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2531":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"\u2532":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"\u2535":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u2536":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u2537":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"\u2538":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u2539":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"\u253A":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"\u253D":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u253E":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u253F":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"\u2540":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u2541":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2542":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"\u2543":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"\u2544":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"\u2545":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"\u2546":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"\u2547":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"\u2548":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2549":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u254A":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u254C":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"\u254D":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"\u2504":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"\u2505":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"\u2508":{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"},"\u2509":{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"},"\u254E":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"\u254F":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"\u2506":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"\u2507":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"\u250A":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"\u250B":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"\u256D":{1:(i,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,1,.5`},"\u256E":{1:(i,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,0,.5`},"\u256F":{1:(i,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,0,.5`},"\u2570":{1:(i,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,1,.5`}},e.powerlineDefinitions={"\uE0B0":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"\uE0B1":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0B2":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"\uE0B3":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0B4":{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},"\uE0B5":{d:"M0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:1,rightPadding:1},"\uE0B6":{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},"\uE0B7":{d:"M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:1,leftPadding:1},"\uE0B8":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"\uE0B9":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0BA":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"\uE0BC":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"\uE0BD":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0BE":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},e.powerlineDefinitions["\uE0BB"]=e.powerlineDefinitions["\uE0BD"],e.powerlineDefinitions["\uE0BF"]=e.powerlineDefinitions["\uE0B9"],e.tryDrawCustomChar=function(i,t,x,v,c,p,m,s){const _=e.blockElementDefinitions[t];if(_)return function(C,w,b,L,R,A){for(let S=0;S<w.length;S++){const M=w[S],T=R/8,y=A/8;C.fillRect(b+M.x*T,L+M.y*y,M.w*T,M.h*y)}}(i,_,x,v,c,p),!0;const l=n[t];if(l)return function(C,w,b,L,R,A){let S=o.get(w);S||(S=new Map,o.set(w,S));const M=C.fillStyle;if(typeof M!="string")throw new Error(`Unexpected fillStyle type "${M}"`);let T=S.get(M);if(!T){const y=w[0].length,O=w.length,F=document.createElement("canvas");F.width=y,F.height=O;const G=(0,d.throwIfFalsy)(F.getContext("2d")),W=new ImageData(y,O);let N,U,J,Q;if(M.startsWith("#"))N=parseInt(M.slice(1,3),16),U=parseInt(M.slice(3,5),16),J=parseInt(M.slice(5,7),16),Q=M.length>7&&parseInt(M.slice(7,9),16)||1;else{if(!M.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${M}" when drawing pattern glyph`);[N,U,J,Q]=M.substring(5,M.length-1).split(",").map(q=>parseFloat(q))}for(let q=0;q<O;q++)for(let K=0;K<y;K++)W.data[4*(q*y+K)]=N,W.data[4*(q*y+K)+1]=U,W.data[4*(q*y+K)+2]=J,W.data[4*(q*y+K)+3]=w[q][K]*(255*Q);G.putImageData(W,0,0),T=(0,d.throwIfFalsy)(C.createPattern(F,null)),S.set(M,T)}C.fillStyle=T,C.fillRect(b,L,R,A)}(i,l,x,v,c,p),!0;const r=e.boxDrawingDefinitions[t];if(r)return function(C,w,b,L,R,A,S){C.strokeStyle=C.fillStyle;for(const[M,T]of Object.entries(w)){let y;C.beginPath(),C.lineWidth=S*Number.parseInt(M),y=typeof T=="function"?T(.15,.15/A*R):T;for(const O of y.split(" ")){const F=O[0],G=f[F];if(!G){console.error(`Could not find drawing instructions for "${F}"`);continue}const W=O.substring(1).split(",");W[0]&&W[1]&&G(C,g(W,R,A,b,L,!0,S))}C.stroke(),C.closePath()}}(i,r,x,v,c,p,s),!0;const u=e.powerlineDefinitions[t];return!!u&&(function(C,w,b,L,R,A,S,M){var T,y;const O=new Path2D;O.rect(b,L,R,A),C.clip(O),C.beginPath();const F=S/12;C.lineWidth=M*F;for(const G of w.d.split(" ")){const W=G[0],N=f[W];if(!N){console.error(`Could not find drawing instructions for "${W}"`);continue}const U=G.substring(1).split(",");U[0]&&U[1]&&N(C,g(U,R,A,b,L,!1,M,((T=w.leftPadding)!==null&&T!==void 0?T:0)*(F/2),((y=w.rightPadding)!==null&&y!==void 0?y:0)*(F/2)))}w.type===1?(C.strokeStyle=C.fillStyle,C.stroke()):C.fill(),C.closePath()}(i,u,x,v,c,p,m,s),!0)};const o=new Map;function a(i,t,x=0){return Math.max(Math.min(i,t),x)}const f={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 g(i,t,x,v,c,p,m,s=0,_=0){const l=i.map(r=>parseFloat(r)||parseInt(r));if(l.length<2)throw new Error("Too few arguments for instruction");for(let r=0;r<l.length;r+=2)l[r]*=t-s*m-_*m,p&&l[r]!==0&&(l[r]=a(Math.round(l[r]+.5)-.5,t,0)),l[r]+=v+s*m;for(let r=1;r<l.length;r+=2)l[r]*=x,p&&l[r]!==0&&(l[r]=a(Math.round(l[r]+.5)-.5,x,0)),l[r]+=c;return l}},56:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.observeDevicePixelDimensions=void 0;const d=h(859);e.observeDevicePixelDimensions=function(n,o,a){let f=new o.ResizeObserver(g=>{const i=g.find(v=>v.target===n);if(!i)return;if(!("devicePixelContentBoxSize"in i))return f?.disconnect(),void(f=void 0);const t=i.devicePixelContentBoxSize[0].inlineSize,x=i.devicePixelContentBoxSize[0].blockSize;t>0&&x>0&&a(t,x)});try{f.observe(n,{box:["device-pixel-content-box"]})}catch{f.disconnect(),f=void 0}return(0,d.toDisposable)(()=>f?.disconnect())}},374:(k,e)=>{function h(d){return 57508<=d&&d<=57558}Object.defineProperty(e,"__esModule",{value:!0}),e.createRenderDimensions=e.excludeFromContrastRatioDemands=e.isRestrictedPowerlineGlyph=e.isPowerlineGlyph=e.throwIfFalsy=void 0,e.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d},e.isPowerlineGlyph=h,e.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},e.excludeFromContrastRatioDemands=function(d){return h(d)||function(n){return 9472<=n&&n<=9631}(d)},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 h{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(n,o,a,f=!1){if(this.selectionStart=o,this.selectionEnd=a,!o||!a||o[0]===a[0]&&o[1]===a[1])return void this.clear();const g=o[1]-n.buffer.active.viewportY,i=a[1]-n.buffer.active.viewportY,t=Math.max(g,0),x=Math.min(i,n.rows-1);t>=n.rows||x<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=f,this.viewportStartRow=g,this.viewportEndRow=i,this.viewportCappedStartRow=t,this.viewportCappedEndRow=x,this.startCol=o[0],this.endCol=a[0])}isCellSelected(n,o,a){return!!this.hasSelection&&(a-=n.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?o>=this.startCol&&a>=this.viewportCappedStartRow&&o<this.endCol&&a<=this.viewportCappedEndRow:o<this.startCol&&a>=this.viewportCappedStartRow&&o>=this.endCol&&a<=this.viewportCappedEndRow:a>this.viewportStartRow&&a<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&a===this.viewportStartRow&&o>=this.startCol&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&a===this.viewportEndRow&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&a===this.viewportStartRow&&o>=this.startCol)}}e.createSelectionRenderModel=function(){return new h}},509:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TextureAtlas=void 0;const d=h(237),n=h(855),o=h(147),a=h(160),f=h(860),g=h(374),i=h(485),t=h(385),x=h(345),v={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 c;class p{constructor(r,u,C){this._document=r,this._config=u,this._unicodeService=C,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 o.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new x.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new x.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=_(r,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,g.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}get pages(){return this._pages}dispose(){for(const r of this.pages)r.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const r=new t.IdleTaskQueue;for(let u=33;u<126;u++)r.enqueue(()=>{if(!this._cacheMap.get(u,n.DEFAULT_COLOR,n.DEFAULT_COLOR,n.DEFAULT_EXT)){const C=this._drawToCache(u,n.DEFAULT_COLOR,n.DEFAULT_COLOR,n.DEFAULT_EXT);this._cacheMap.set(u,n.DEFAULT_COLOR,n.DEFAULT_COLOR,n.DEFAULT_EXT,C)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const r of this._pages)r.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){p.maxAtlasPages&&this._pages.length>=Math.max(4,p.maxAtlasPages/2)&&queueMicrotask(()=>{const u=this._pages.filter(S=>2*S.canvas.width<=(p.maxTextureSize||4096)).sort((S,M)=>M.canvas.width!==S.canvas.width?M.canvas.width-S.canvas.width:M.percentageUsed-S.percentageUsed);let C=-1,w=0;for(let S=0;S<u.length;S++)if(u[S].canvas.width!==w)C=S,w=u[S].canvas.width;else if(S-C==3)break;const b=u.slice(C,C+4),L=b.map(S=>S.glyphs[0].texturePage).sort((S,M)=>S>M?1:-1),R=L[0],A=this._mergePages(b,R);A.version++,this._pages[R]=A;for(let S=L.length-1;S>=1;S--)this._deletePage(L[S]);this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(A.canvas)});const r=new m(this._document,this._textureSize);return this._pages.push(r),this._activePages.push(r),this._onAddTextureAtlasCanvas.fire(r.canvas),r}_mergePages(r,u){const C=2*r[0].canvas.width,w=new m(this._document,C,r);for(const[b,L]of r.entries()){const R=b*L.canvas.width%C,A=Math.floor(b/2)*L.canvas.height;w.ctx.drawImage(L.canvas,R,A);for(const M of L.glyphs)M.texturePage=u,M.sizeClipSpace.x=M.size.x/C,M.sizeClipSpace.y=M.size.y/C,M.texturePosition.x+=R,M.texturePosition.y+=A,M.texturePositionClipSpace.x=M.texturePosition.x/C,M.texturePositionClipSpace.y=M.texturePosition.y/C;this._onRemoveTextureAtlasCanvas.fire(L.canvas);const S=this._activePages.indexOf(L);S!==-1&&this._activePages.splice(S,1)}return w}_deletePage(r){this._pages.splice(r,1);for(let u=r;u<this._pages.length;u++){const C=this._pages[u];for(const w of C.glyphs)w.texturePage--;C.version++}}getRasterizedGlyphCombinedChar(r,u,C,w){return this._getFromCacheMap(this._cacheMapCombined,r,u,C,w)}getRasterizedGlyph(r,u,C,w){return this._getFromCacheMap(this._cacheMap,r,u,C,w)}_getFromCacheMap(r,u,C,w,b){return c=r.get(u,C,w,b),c||(c=this._drawToCache(u,C,w,b),r.set(u,C,w,b,c)),c}_getColorFromAnsiIndex(r){if(r>=this._config.colors.ansi.length)throw new Error("No color found for idx "+r);return this._config.colors.ansi[r]}_getBackgroundColor(r,u,C,w){if(this._config.allowTransparency)return a.NULL_COLOR;let b;switch(r){case 16777216:case 33554432:b=this._getColorFromAnsiIndex(u);break;case 50331648:const L=o.AttributeData.toColorRGB(u);b=a.rgba.toColor(L[0],L[1],L[2]);break;default:b=C?this._config.colors.foreground:this._config.colors.background}return b}_getForegroundColor(r,u,C,w,b,L,R,A,S,M){const T=this._getMinimumContrastColor(r,u,C,w,b,L,!1,S,M);if(T)return T;let y;switch(b){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&S&&L<8&&(L+=8),y=this._getColorFromAnsiIndex(L);break;case 50331648:const O=o.AttributeData.toColorRGB(L);y=a.rgba.toColor(O[0],O[1],O[2]);break;default:y=R?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(y=a.color.opaque(y)),A&&(y=a.color.multiplyOpacity(y,d.DIM_OPACITY)),y}_resolveBackgroundRgba(r,u,C){switch(r){case 16777216:case 33554432:return this._getColorFromAnsiIndex(u).rgba;case 50331648:return u<<8;default:return C?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(r,u,C,w){switch(r){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&w&&u<8&&(u+=8),this._getColorFromAnsiIndex(u).rgba;case 50331648:return u<<8;default:return C?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(r,u,C,w,b,L,R,A,S){if(this._config.minimumContrastRatio===1||S)return;const M=this._config.colors.contrastCache.getColor(r,w);if(M!==void 0)return M||void 0;const T=this._resolveBackgroundRgba(u,C,R),y=this._resolveForegroundRgba(b,L,R,A),O=a.rgba.ensureContrastRatio(T,y,this._config.minimumContrastRatio);if(!O)return void this._config.colors.contrastCache.setColor(r,w,null);const F=a.rgba.toColor(O>>24&255,O>>16&255,O>>8&255);return this._config.colors.contrastCache.setColor(r,w,F),F}_drawToCache(r,u,C,w){const b=typeof r=="number"?String.fromCharCode(r):r,L=Math.min(this._config.deviceCellWidth*Math.max(b.length,2)+4,this._textureSize);this._tmpCanvas.width<L&&(this._tmpCanvas.width=L);const R=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<R&&(this._tmpCanvas.height=R),this._tmpCtx.save(),this._workAttributeData.fg=C,this._workAttributeData.bg=u,this._workAttributeData.extended.ext=w,this._workAttributeData.isInvisible())return v;const A=!!this._workAttributeData.isBold(),S=!!this._workAttributeData.isInverse(),M=!!this._workAttributeData.isDim(),T=!!this._workAttributeData.isItalic(),y=!!this._workAttributeData.isUnderline(),O=!!this._workAttributeData.isStrikethrough(),F=!!this._workAttributeData.isOverline();let G=this._workAttributeData.getFgColor(),W=this._workAttributeData.getFgColorMode(),N=this._workAttributeData.getBgColor(),U=this._workAttributeData.getBgColorMode();if(S){const D=G;G=N,N=D;const B=W;W=U,U=B}const J=this._getBackgroundColor(U,N,S,M);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=J.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const Q=A?this._config.fontWeightBold:this._config.fontWeight,q=T?"italic":"";this._tmpCtx.font=`${q} ${Q} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=d.TEXT_BASELINE;const K=b.length===1&&(0,g.isPowerlineGlyph)(b.charCodeAt(0)),_e=b.length===1&&(0,g.isRestrictedPowerlineGlyph)(b.charCodeAt(0)),re=this._getForegroundColor(u,U,N,C,W,G,S,M,A,(0,g.excludeFromContrastRatioDemands)(b.charCodeAt(0)));this._tmpCtx.fillStyle=re.css;const P=_e?0:4;let oe=!1;this._config.customGlyphs!==!1&&(oe=(0,f.tryDrawCustomChar)(this._tmpCtx,b,P,P,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Y,Z=!K;if(Y=typeof r=="number"?this._unicodeService.wcwidth(r):this._unicodeService.getStringCellWidth(r),y){this._tmpCtx.save();const D=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),B=D%2==1?.5:0;if(this._tmpCtx.lineWidth=D,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())Z=!1,this._tmpCtx.strokeStyle=`rgb(${o.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{Z=!1;let X=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&X<8&&(X+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(X).css}this._tmpCtx.beginPath();const j=P,z=Math.ceil(P+this._config.deviceCharHeight)-B,ee=P+this._config.deviceCharHeight+D-B,te=Math.ceil(P+this._config.deviceCharHeight+2*D)-B;for(let X=0;X<Y;X++){this._tmpCtx.save();const H=j+X*this._config.deviceCellWidth,V=j+(X+1)*this._config.deviceCellWidth,le=H+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(H,z),this._tmpCtx.lineTo(V,z),this._tmpCtx.moveTo(H,te),this._tmpCtx.lineTo(V,te);break;case 3:const ae=D<=1?te:Math.ceil(P+this._config.deviceCharHeight-D/2)-B,he=D<=1?z:Math.ceil(P+this._config.deviceCharHeight+D/2)-B,ge=new Path2D;ge.rect(H,z,this._config.deviceCellWidth,te-z),this._tmpCtx.clip(ge),this._tmpCtx.moveTo(H-this._config.deviceCellWidth/2,ee),this._tmpCtx.bezierCurveTo(H-this._config.deviceCellWidth/2,he,H,he,H,ee),this._tmpCtx.bezierCurveTo(H,ae,le,ae,le,ee),this._tmpCtx.bezierCurveTo(le,he,V,he,V,ee),this._tmpCtx.bezierCurveTo(V,ae,V+this._config.deviceCellWidth/2,ae,V+this._config.deviceCellWidth/2,ee);break;case 4:this._tmpCtx.setLineDash([Math.round(D),Math.round(D)]),this._tmpCtx.moveTo(H,z),this._tmpCtx.lineTo(V,z);break;case 5:this._tmpCtx.setLineDash([4*this._config.devicePixelRatio,3*this._config.devicePixelRatio]),this._tmpCtx.moveTo(H,z),this._tmpCtx.lineTo(V,z);break;default:this._tmpCtx.moveTo(H,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 X=this._tmpCtx.measureText(b);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in X&&X.actualBoundingBoxDescent>0){this._tmpCtx.save();const H=new Path2D;H.rect(j,z-Math.ceil(D/2),this._config.deviceCellWidth*Y,te-z+Math.ceil(D/2)),this._tmpCtx.clip(H),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=J.css,this._tmpCtx.strokeText(b,P,P+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(F){const D=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),B=D%2==1?.5:0;this._tmpCtx.lineWidth=D,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(P,P+B),this._tmpCtx.lineTo(P+this._config.deviceCharWidth*Y,P+B),this._tmpCtx.stroke()}if(oe||this._tmpCtx.fillText(b,P,P+this._config.deviceCharHeight),b==="_"&&!this._config.allowTransparency){let D=s(this._tmpCtx.getImageData(P,P,this._config.deviceCellWidth,this._config.deviceCellHeight),J,re,Z);if(D)for(let B=1;B<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=J.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(b,P,P+this._config.deviceCharHeight-B),D=s(this._tmpCtx.getImageData(P,P,this._config.deviceCellWidth,this._config.deviceCellHeight),J,re,Z),D);B++);}if(O){const D=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),B=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=D,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(P,P+Math.floor(this._config.deviceCharHeight/2)-B),this._tmpCtx.lineTo(P+this._config.deviceCharWidth*Y,P+Math.floor(this._config.deviceCharHeight/2)-B),this._tmpCtx.stroke()}this._tmpCtx.restore();const ne=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let ue;if(ue=this._config.allowTransparency?function(D){for(let B=0;B<D.data.length;B+=4)if(D.data[B+3]>0)return!1;return!0}(ne):s(ne,J,re,Z),ue)return v;const I=this._findGlyphBoundingBox(ne,this._workBoundingBox,L,_e,oe,P);let $,E;for(;;){if(this._activePages.length===0){const D=this._createNewPage();$=D,E=D.currentRow,E.height=I.size.y;break}$=this._activePages[this._activePages.length-1],E=$.currentRow;for(const D of this._activePages)I.size.y<=D.currentRow.height&&($=D,E=D.currentRow);for(let D=this._activePages.length-1;D>=0;D--)for(const B of this._activePages[D].fixedRows)B.height<=E.height&&I.size.y<=B.height&&($=this._activePages[D],E=B);if(E.y+I.size.y>=$.canvas.height||E.height>I.size.y+2){let D=!1;if($.currentRow.y+$.currentRow.height+I.size.y>=$.canvas.height){let B;for(const j of this._activePages)if(j.currentRow.y+j.currentRow.height+I.size.y<j.canvas.height){B=j;break}if(B)$=B;else{const j=this._createNewPage();$=j,E=j.currentRow,E.height=I.size.y,D=!0}}D||($.currentRow.height>0&&$.fixedRows.push($.currentRow),E={x:0,y:$.currentRow.y+$.currentRow.height,height:I.size.y},$.fixedRows.push(E),$.currentRow={x:0,y:E.y+E.height,height:0})}if(E.x+I.size.x<=$.canvas.width)break;E===$.currentRow?(E.x=0,E.y+=E.height,E.height=0):$.fixedRows.splice($.fixedRows.indexOf(E),1)}return I.texturePage=this._pages.indexOf($),I.texturePosition.x=E.x,I.texturePosition.y=E.y,I.texturePositionClipSpace.x=E.x/$.canvas.width,I.texturePositionClipSpace.y=E.y/$.canvas.height,I.sizeClipSpace.x/=$.canvas.width,I.sizeClipSpace.y/=$.canvas.height,E.height=Math.max(E.height,I.size.y),E.x+=I.size.x,$.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),$.addGlyph(I),$.version++,I}_findGlyphBoundingBox(r,u,C,w,b,L){u.top=0;const R=w?this._config.deviceCellHeight:this._tmpCanvas.height,A=w?this._config.deviceCellWidth:C;let S=!1;for(let M=0;M<R;M++){for(let T=0;T<A;T++){const y=M*this._tmpCanvas.width*4+4*T+3;if(r.data[y]!==0){u.top=M,S=!0;break}}if(S)break}u.left=0,S=!1;for(let M=0;M<L+A;M++){for(let T=0;T<R;T++){const y=T*this._tmpCanvas.width*4+4*M+3;if(r.data[y]!==0){u.left=M,S=!0;break}}if(S)break}u.right=A,S=!1;for(let M=L+A-1;M>=L;M--){for(let T=0;T<R;T++){const y=T*this._tmpCanvas.width*4+4*M+3;if(r.data[y]!==0){u.right=M,S=!0;break}}if(S)break}u.bottom=R,S=!1;for(let M=R-1;M>=0;M--){for(let T=0;T<A;T++){const y=M*this._tmpCanvas.width*4+4*T+3;if(r.data[y]!==0){u.bottom=M,S=!0;break}}if(S)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:u.right-u.left+1,y:u.bottom-u.top+1},sizeClipSpace:{x:u.right-u.left+1,y:u.bottom-u.top+1},offset:{x:-u.left+L+(w||b?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-u.top+L+(w||b?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}e.TextureAtlas=p;class m{constructor(r,u,C){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],C)for(const w of C)this._glyphs.push(...w.glyphs),this._usedPixels+=w._usedPixels;this.canvas=_(r,u,u),this.ctx=(0,g.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(r){this._glyphs.push(r),this._usedPixels+=r.size.x*r.size.y}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 s(l,r,u,C){const w=r.rgba>>>24,b=r.rgba>>>16&255,L=r.rgba>>>8&255,R=u.rgba>>>24,A=u.rgba>>>16&255,S=u.rgba>>>8&255,M=Math.floor((Math.abs(w-R)+Math.abs(b-A)+Math.abs(L-S))/12);let T=!0;for(let y=0;y<l.data.length;y+=4)l.data[y]===w&&l.data[y+1]===b&&l.data[y+2]===L||C&&Math.abs(l.data[y]-w)+Math.abs(l.data[y+1]-b)+Math.abs(l.data[y+2]-L)<M?l.data[y+3]=0:T=!1;return T}function _(l,r,u){const C=l.createElement("canvas");return C.width=r,C.height=u,C}},577:function(k,e,h){var d=this&&this.__decorate||function(x,v,c,p){var m,s=arguments.length,_=s<3?v:p===null?p=Object.getOwnPropertyDescriptor(v,c):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(x,v,c,p);else for(var l=x.length-1;l>=0;l--)(m=x[l])&&(_=(s<3?m(_):s>3?m(v,c,_):m(v,c))||_);return s>3&&_&&Object.defineProperty(v,c,_),_},n=this&&this.__param||function(x,v){return function(c,p){v(c,p,x)}};Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterJoinerService=e.JoinedCellData=void 0;const o=h(147),a=h(855),f=h(782),g=h(97);class i extends o.AttributeData{constructor(v,c,p){super(),this.content=0,this.combinedData="",this.fg=v.fg,this.bg=v.bg,this.combinedData=c,this._width=p}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(v){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}e.JoinedCellData=i;let t=class fe{constructor(v){this._bufferService=v,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new f.CellData}register(v){const c={id:this._nextCharacterJoinerId++,handler:v};return this._characterJoiners.push(c),c.id}deregister(v){for(let c=0;c<this._characterJoiners.length;c++)if(this._characterJoiners[c].id===v)return this._characterJoiners.splice(c,1),!0;return!1}getJoinedCharacters(v){if(this._characterJoiners.length===0)return[];const c=this._bufferService.buffer.lines.get(v);if(!c||c.length===0)return[];const p=[],m=c.translateToString(!0);let s=0,_=0,l=0,r=c.getFg(0),u=c.getBg(0);for(let C=0;C<c.getTrimmedLength();C++)if(c.loadCell(C,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==r||this._workCell.bg!==u){if(C-s>1){const w=this._getJoinedRanges(m,l,_,c,s);for(let b=0;b<w.length;b++)p.push(w[b])}s=C,l=_,r=this._workCell.fg,u=this._workCell.bg}_+=this._workCell.getChars().length||a.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-s>1){const C=this._getJoinedRanges(m,l,_,c,s);for(let w=0;w<C.length;w++)p.push(C[w])}return p}_getJoinedRanges(v,c,p,m,s){const _=v.substring(c,p);let l=[];try{l=this._characterJoiners[0].handler(_)}catch(r){console.error(r)}for(let r=1;r<this._characterJoiners.length;r++)try{const u=this._characterJoiners[r].handler(_);for(let C=0;C<u.length;C++)fe._mergeRanges(l,u[C])}catch(u){console.error(u)}return this._stringRangesToCellRanges(l,m,s),l}_stringRangesToCellRanges(v,c,p){let m=0,s=!1,_=0,l=v[m];if(l){for(let r=p;r<this._bufferService.cols;r++){const u=c.getWidth(r),C=c.getString(r).length||a.WHITESPACE_CELL_CHAR.length;if(u!==0){if(!s&&l[0]<=_&&(l[0]=r,s=!0),l[1]<=_){if(l[1]=r,l=v[++m],!l)break;l[0]<=_?(l[0]=r,s=!0):s=!1}_+=C}}l&&(l[1]=this._bufferService.cols)}}static _mergeRanges(v,c){let p=!1;for(let m=0;m<v.length;m++){const s=v[m];if(p){if(c[1]<=s[0])return v[m-1][1]=c[1],v;if(c[1]<=s[1])return v[m-1][1]=Math.max(c[1],s[1]),v.splice(m,1),v;v.splice(m,1),m--}else{if(c[1]<=s[0])return v.splice(m,0,c),v;if(c[1]<=s[1])return s[0]=Math.min(c[0],s[0]),v;c[0]<s[1]&&(s[0]=Math.min(c[0],s[0]),p=!0)}}return p?v[v.length-1][1]=c[1]:v.push(c),v}};t=d([n(0,g.IBufferService)],t),e.CharacterJoinerService=t},160:(k,e,h)=>{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 d=h(399);let n=0,o=0,a=0,f=0;var g,i,t;function x(c){const p=c.toString(16);return p.length<2?"0"+p:p}function v(c,p){return c<p?(p+.05)/(c+.05):(c+.05)/(p+.05)}e.NULL_COLOR={css:"#00000000",rgba:0},function(c){c.toCss=function(p,m,s,_){return _!==void 0?`#${x(p)}${x(m)}${x(s)}${x(_)}`:`#${x(p)}${x(m)}${x(s)}`},c.toRgba=function(p,m,s,_=255){return(p<<24|m<<16|s<<8|_)>>>0}}(g=e.channels||(e.channels={})),function(c){function p(m,s){return f=Math.round(255*s),[n,o,a]=t.toChannels(m.rgba),{css:g.toCss(n,o,a,f),rgba:g.toRgba(n,o,a,f)}}c.blend=function(m,s){if(f=(255&s.rgba)/255,f===1)return{css:s.css,rgba:s.rgba};const _=s.rgba>>24&255,l=s.rgba>>16&255,r=s.rgba>>8&255,u=m.rgba>>24&255,C=m.rgba>>16&255,w=m.rgba>>8&255;return n=u+Math.round((_-u)*f),o=C+Math.round((l-C)*f),a=w+Math.round((r-w)*f),{css:g.toCss(n,o,a),rgba:g.toRgba(n,o,a)}},c.isOpaque=function(m){return(255&m.rgba)==255},c.ensureContrastRatio=function(m,s,_){const l=t.ensureContrastRatio(m.rgba,s.rgba,_);if(l)return t.toColor(l>>24&255,l>>16&255,l>>8&255)},c.opaque=function(m){const s=(255|m.rgba)>>>0;return[n,o,a]=t.toChannels(s),{css:g.toCss(n,o,a),rgba:s}},c.opacity=p,c.multiplyOpacity=function(m,s){return f=255&m.rgba,p(m,f*s/255)},c.toColorRGB=function(m){return[m.rgba>>24&255,m.rgba>>16&255,m.rgba>>8&255]}}(e.color||(e.color={})),function(c){let p,m;if(!d.isNode){const s=document.createElement("canvas");s.width=1,s.height=1;const _=s.getContext("2d",{willReadFrequently:!0});_&&(p=_,p.globalCompositeOperation="copy",m=p.createLinearGradient(0,0,1,1))}c.toColor=function(s){if(s.match(/#[\da-f]{3,8}/i))switch(s.length){case 4:return n=parseInt(s.slice(1,2).repeat(2),16),o=parseInt(s.slice(2,3).repeat(2),16),a=parseInt(s.slice(3,4).repeat(2),16),t.toColor(n,o,a);case 5:return n=parseInt(s.slice(1,2).repeat(2),16),o=parseInt(s.slice(2,3).repeat(2),16),a=parseInt(s.slice(3,4).repeat(2),16),f=parseInt(s.slice(4,5).repeat(2),16),t.toColor(n,o,a,f);case 7:return{css:s,rgba:(parseInt(s.slice(1),16)<<8|255)>>>0};case 9:return{css:s,rgba:parseInt(s.slice(1),16)>>>0}}const _=s.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(_)return n=parseInt(_[1]),o=parseInt(_[2]),a=parseInt(_[3]),f=Math.round(255*(_[5]===void 0?1:parseFloat(_[5]))),t.toColor(n,o,a,f);if(!p||!m)throw new Error("css.toColor: Unsupported css format");if(p.fillStyle=m,p.fillStyle=s,typeof p.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(p.fillRect(0,0,1,1),[n,o,a,f]=p.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(n,o,a,f),css:s}}}(e.css||(e.css={})),function(c){function p(m,s,_){const l=m/255,r=s/255,u=_/255;return .2126*(l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4))}c.relativeLuminance=function(m){return p(m>>16&255,m>>8&255,255&m)},c.relativeLuminance2=p}(i=e.rgb||(e.rgb={})),function(c){function p(s,_,l){const r=s>>24&255,u=s>>16&255,C=s>>8&255;let w=_>>24&255,b=_>>16&255,L=_>>8&255,R=v(i.relativeLuminance2(w,b,L),i.relativeLuminance2(r,u,C));for(;R<l&&(w>0||b>0||L>0);)w-=Math.max(0,Math.ceil(.1*w)),b-=Math.max(0,Math.ceil(.1*b)),L-=Math.max(0,Math.ceil(.1*L)),R=v(i.relativeLuminance2(w,b,L),i.relativeLuminance2(r,u,C));return(w<<24|b<<16|L<<8|255)>>>0}function m(s,_,l){const r=s>>24&255,u=s>>16&255,C=s>>8&255;let w=_>>24&255,b=_>>16&255,L=_>>8&255,R=v(i.relativeLuminance2(w,b,L),i.relativeLuminance2(r,u,C));for(;R<l&&(w<255||b<255||L<255);)w=Math.min(255,w+Math.ceil(.1*(255-w))),b=Math.min(255,b+Math.ceil(.1*(255-b))),L=Math.min(255,L+Math.ceil(.1*(255-L))),R=v(i.relativeLuminance2(w,b,L),i.relativeLuminance2(r,u,C));return(w<<24|b<<16|L<<8|255)>>>0}c.ensureContrastRatio=function(s,_,l){const r=i.relativeLuminance(s>>8),u=i.relativeLuminance(_>>8);if(v(r,u)<l){if(u<r){const b=p(s,_,l),L=v(r,i.relativeLuminance(b>>8));if(L<l){const R=m(s,_,l);return L>v(r,i.relativeLuminance(R>>8))?b:R}return b}const C=m(s,_,l),w=v(r,i.relativeLuminance(C>>8));if(w<l){const b=p(s,_,l);return w>v(r,i.relativeLuminance(b>>8))?C:b}return C}},c.reduceLuminance=p,c.increaseLuminance=m,c.toChannels=function(s){return[s>>24&255,s>>16&255,s>>8&255,255&s]},c.toColor=function(s,_,l,r){return{css:g.toCss(s,_,l,r),rgba:g.toRgba(s,_,l,r)}}}(t=e.rgba||(e.rgba={})),e.toPaddedHex=x,e.contrastRatio=v},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=h=>(this._listeners.push(h),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===h)return void this._listeners.splice(d,1)}}})),this._event}fire(h,d){const n=[];for(let o=0;o<this._listeners.length;o++)n.push(this._listeners[o]);for(let o=0;o<n.length;o++)n[o].call(void 0,h,d)}dispose(){this._listeners&&(this._listeners.length=0),this._disposed=!0}},e.forwardEvent=function(h,d){return h(n=>d.fire(n))}},859:(k,e)=>{function h(d){for(const n of d)n.dispose();d.length=0}Object.defineProperty(e,"__esModule",{value:!0}),e.getDisposeArrayDisposable=e.disposeArray=e.toDisposable=e.Disposable=void 0,e.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const n=this._disposables.indexOf(d);n!==-1&&this._disposables.splice(n,1)}},e.toDisposable=function(d){return{dispose:d}},e.disposeArray=h,e.getDisposeArrayDisposable=function(d){return{dispose:()=>h(d)}}},485:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FourKeyMap=e.TwoKeyMap=void 0;class h{constructor(){this._data={}}set(n,o,a){this._data[n]||(this._data[n]={}),this._data[n][o]=a}get(n,o){return this._data[n]?this._data[n][o]:void 0}clear(){this._data={}}}e.TwoKeyMap=h,e.FourKeyMap=class{constructor(){this._data=new h}set(d,n,o,a,f){this._data.get(d,n)||this._data.set(d,n,new h),this._data.get(d,n).set(o,a,f)}get(d,n,o,a){var f;return(f=this._data.get(d,n))===null||f===void 0?void 0:f.get(o,a)}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 h=e.isNode?"node":navigator.userAgent,d=e.isNode?"node":navigator.platform;e.isFirefox=h.includes("Firefox"),e.isLegacyEdge=h.includes("Edge"),e.isSafari=/^((?!chrome|android).)*safari/i.test(h),e.getSafariVersion=function(){if(!e.isSafari)return 0;const n=h.match(/Version\/(\d+)/);return n===null||n.length<2?0:parseInt(n[1])},e.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),e.isIpad=d==="iPad",e.isIphone=d==="iPhone",e.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),e.isLinux=d.indexOf("Linux")>=0,e.isChromeOS=/\bCrOS\b/.test(h)},385:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DebouncedIdleTask=e.IdleTaskQueue=e.PriorityTaskQueue=void 0;const d=h(399);class n{constructor(){this._tasks=[],this._i=0}enqueue(f){this._tasks.push(f),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(f){this._idleCallback=void 0;let g=0,i=0,t=f.timeRemaining(),x=0;for(;this._i<this._tasks.length;){if(g=Date.now(),this._tasks[this._i]()||this._i++,g=Math.max(1,Date.now()-g),i=Math.max(g,i),x=f.timeRemaining(),1.5*i>x)return t-g<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(t-g))}ms`),void this._start();t=x}this.clear()}}class o extends n{_requestCallback(f){return setTimeout(()=>f(this._createDeadline(16)))}_cancelCallback(f){clearTimeout(f)}_createDeadline(f){const g=Date.now()+f;return{timeRemaining:()=>Math.max(0,g-Date.now())}}}e.PriorityTaskQueue=o,e.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends n{_requestCallback(a){return requestIdleCallback(a)}_cancelCallback(a){cancelIdleCallback(a)}}:o,e.DebouncedIdleTask=class{constructor(){this._queue=new e.IdleTaskQueue}set(a){this._queue.clear(),this._queue.enqueue(a)}flush(){this._queue.flush()}}},147:(k,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedAttrs=e.AttributeData=void 0;class h{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(o){return[o>>>16&255,o>>>8&255,255&o]}static fromColorRGB(o){return(255&o[0])<<16|(255&o[1])<<8|255&o[2]}clone(){const o=new h;return o.fg=this.fg,o.bg=this.bg,o.extended=this.extended.clone(),o}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=h;class d{constructor(o=0,a=0){this._ext=0,this._urlId=0,this._ext=o,this._urlId=a}get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(o){this._ext=o}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(o){this._ext&=-469762049,this._ext|=o<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(o){this._ext&=-67108864,this._ext|=67108863&o}get urlId(){return this._urlId}set urlId(o){this._urlId=o}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}e.ExtendedAttrs=d},782:(k,e,h)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CellData=void 0;const d=h(133),n=h(855),o=h(147);class a extends o.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new o.ExtendedAttrs,this.combinedData=""}static fromCharData(g){const i=new a;return i.setFromCharData(g),i}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(g){this.fg=g[n.CHAR_DATA_ATTR_INDEX],this.bg=0;let i=!1;if(g[n.CHAR_DATA_CHAR_INDEX].length>2)i=!0;else if(g[n.CHAR_DATA_CHAR_INDEX].length===2){const t=g[n.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=t&&t<=56319){const x=g[n.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=x&&x<=57343?this.content=1024*(t-55296)+x-56320+65536|g[n.CHAR_DATA_WIDTH_INDEX]<<22:i=!0}else i=!0}else this.content=g[n.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|g[n.CHAR_DATA_WIDTH_INDEX]<<22;i&&(this.combinedData=g[n.CHAR_DATA_CHAR_INDEX],this.content=2097152|g[n.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}e.CellData=a},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(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},e.utf32ToString=function(h,d=0,n=h.length){let o="";for(let a=d;a<n;++a){let f=h[a];f>65535?(f-=65536,o+=String.fromCharCode(55296+(f>>10))+String.fromCharCode(f%1024+56320)):o+=String.fromCharCode(f)}return o},e.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(h,d){const n=h.length;if(!n)return 0;let o=0,a=0;if(this._interim){const f=h.charCodeAt(a++);56320<=f&&f<=57343?d[o++]=1024*(this._interim-55296)+f-56320+65536:(d[o++]=this._interim,d[o++]=f),this._interim=0}for(let f=a;f<n;++f){const g=h.charCodeAt(f);if(55296<=g&&g<=56319){if(++f>=n)return this._interim=g,o;const i=h.charCodeAt(f);56320<=i&&i<=57343?d[o++]=1024*(g-55296)+i-56320+65536:(d[o++]=g,d[o++]=i)}else g!==65279&&(d[o++]=g)}return o}},e.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(h,d){const n=h.length;if(!n)return 0;let o,a,f,g,i=0,t=0,x=0;if(this.interim[0]){let p=!1,m=this.interim[0];m&=(224&m)==192?31:(240&m)==224?15:7;let s,_=0;for(;(s=63&this.interim[++_])&&_<4;)m<<=6,m|=s;const l=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,r=l-_;for(;x<r;){if(x>=n)return 0;if(s=h[x++],(192&s)!=128){x--,p=!0;break}this.interim[_++]=s,m<<=6,m|=63&s}p||(l===2?m<128?x--:d[i++]=m:l===3?m<2048||m>=55296&&m<=57343||m===65279||(d[i++]=m):m<65536||m>1114111||(d[i++]=m)),this.interim.fill(0)}const v=n-4;let c=x;for(;c<n;){for(;!(!(c<v)||128&(o=h[c])||128&(a=h[c+1])||128&(f=h[c+2])||128&(g=h[c+3]));)d[i++]=o,d[i++]=a,d[i++]=f,d[i++]=g,c+=4;if(o=h[c++],o<128)d[i++]=o;else if((224&o)==192){if(c>=n)return this.interim[0]=o,i;if(a=h[c++],(192&a)!=128){c--;continue}if(t=(31&o)<<6|63&a,t<128){c--;continue}d[i++]=t}else if((240&o)==224){if(c>=n)return this.interim[0]=o,i;if(a=h[c++],(192&a)!=128){c--;continue}if(c>=n)return this.interim[0]=o,this.interim[1]=a,i;if(f=h[c++],(192&f)!=128){c--;continue}if(t=(15&o)<<12|(63&a)<<6|63&f,t<2048||t>=55296&&t<=57343||t===65279)continue;d[i++]=t}else if((248&o)==240){if(c>=n)return this.interim[0]=o,i;if(a=h[c++],(192&a)!=128){c--;continue}if(c>=n)return this.interim[0]=o,this.interim[1]=a,i;if(f=h[c++],(192&f)!=128){c--;continue}if(c>=n)return this.interim[0]=o,this.interim[1]=a,this.interim[2]=f,i;if(g=h[c++],(192&g)!=128){c--;continue}if(t=(7&o)<<18|(63&a)<<12|(63&f)<<6|63&g,t<65536||t>1114111)continue;d[i++]=t}}return i}}},726:(k,e)=>{function h(d,n,o){n.di$target===n?n.di$dependencies.push({id:d,index:o}):(n.di$dependencies=[{id:d,index:o}],n.di$target=n)}Object.defineProperty(e,"__esModule",{value:!0}),e.createDecorator=e.getServiceDependencies=e.serviceRegistry=void 0,e.serviceRegistry=new Map,e.getServiceDependencies=function(d){return d.di$dependencies||[]},e.createDecorator=function(d){if(e.serviceRegistry.has(d))return e.serviceRegistry.get(d);const n=function(o,a,f){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");h(n,o,f)};return n.toString=()=>d,e.serviceRegistry.set(d,n),n}},97:(k,e,h)=>{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 d=h(726);var n;e.IBufferService=(0,d.createDecorator)("BufferService"),e.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),e.ICoreService=(0,d.createDecorator)("CoreService"),e.ICharsetService=(0,d.createDecorator)("CharsetService"),e.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(n=e.LogLevelEnum||(e.LogLevelEnum={}))[n.DEBUG=0]="DEBUG",n[n.INFO=1]="INFO",n[n.WARN=2]="WARN",n[n.ERROR=3]="ERROR",n[n.OFF=4]="OFF",e.ILogService=(0,d.createDecorator)("LogService"),e.IOptionsService=(0,d.createDecorator)("OptionsService"),e.IOscLinkService=(0,d.createDecorator)("OscLinkService"),e.IUnicodeService=(0,d.createDecorator)("UnicodeService"),e.IDecorationService=(0,d.createDecorator)("DecorationService")}},ie={};function se(k){var e=ie[k];if(e!==void 0)return e.exports;var h=ie[k]={exports:{}};return ce[k].call(h.exports,h,h.exports,se),h.exports}var de={};return(()=>{var k=de;Object.defineProperty(k,"__esModule",{value:!0}),k.CanvasAddon=void 0;const e=se(949),h=se(345),d=se(859);class n extends d.Disposable{constructor(){super(...arguments),this._onChangeTextureAtlas=this.register(new h.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new h.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event}get textureAtlas(){var a;return(a=this._renderer)===null||a===void 0?void 0:a.textureAtlas}activate(a){const f=a._core;if(!a.element)return void this.register(f.onWillOpen(()=>this.activate(a)));this._terminal=a;const g=f.coreService,i=f.optionsService,t=f.screenElement,x=f.linkifier2,v=f,c=v._bufferService,p=v._renderService,m=v._characterJoinerService,s=v._charSizeService,_=v._coreBrowserService,l=v._decorationService,r=v._themeService;this._renderer=new e.CanvasRenderer(a,t,x,c,s,i,m,g,_,l,r),this.register((0,h.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,h.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),p.setRenderer(this._renderer),p.handleResize(c.cols,c.rows),this.register((0,d.toDisposable)(()=>{var u;p.setRenderer(this._terminal._core._createRenderer()),p.handleResize(a.cols,a.rows),(u=this._renderer)===null||u===void 0||u.dispose(),this._renderer=void 0}))}}k.CanvasAddon=n})(),de})())}}]);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
(self.webpackChunk_opensumi_cli_engine=self.webpackChunk_opensumi_cli_engine||[]).push([[382],{90382:ve=>{(function(ce,se){ve.exports=se()})(self,()=>(()=>{"use strict";var ce={965:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.GlyphRenderer=void 0;const u=d(381),h=d(855),r=d(859),_=d(374),g=d(509),a=11,t=a*Float32Array.BYTES_PER_ELEMENT;let e,n=0,y=0,x=0;class R extends r.Disposable{constructor(l,m,c){super(),this._terminal=l,this._gl=m,this._dimensions=c,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const s=this._gl;g.TextureAtlas.maxAtlasPages===void 0&&(g.TextureAtlas.maxAtlasPages=Math.min(32,(0,_.throwIfFalsy)(s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS))),g.TextureAtlas.maxTextureSize=(0,_.throwIfFalsy)(s.getParameter(s.MAX_TEXTURE_SIZE))),this._program=(0,_.throwIfFalsy)((0,u.createProgram)(s,`#version 300 es
|
|
2
|
+
layout (location = 0) in vec2 a_unitquad;
|
|
3
|
+
layout (location = 1) in vec2 a_cellpos;
|
|
4
|
+
layout (location = 2) in vec2 a_offset;
|
|
5
|
+
layout (location = 3) in vec2 a_size;
|
|
6
|
+
layout (location = 4) in float a_texpage;
|
|
7
|
+
layout (location = 5) in vec2 a_texcoord;
|
|
8
|
+
layout (location = 6) in vec2 a_texsize;
|
|
9
|
+
|
|
10
|
+
uniform mat4 u_projection;
|
|
11
|
+
uniform vec2 u_resolution;
|
|
12
|
+
|
|
13
|
+
out vec2 v_texcoord;
|
|
14
|
+
flat out int v_texpage;
|
|
15
|
+
|
|
16
|
+
void main() {
|
|
17
|
+
vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
|
|
18
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
19
|
+
v_texpage = int(a_texpage);
|
|
20
|
+
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
|
21
|
+
}`,function(M){let A="";for(let w=1;w<M;w++)A+=` else if (v_texpage == ${w}) { outColor = texture(u_texture[${w}], v_texcoord); }`;return`#version 300 es
|
|
22
|
+
precision lowp float;
|
|
23
|
+
|
|
24
|
+
in vec2 v_texcoord;
|
|
25
|
+
flat in int v_texpage;
|
|
26
|
+
|
|
27
|
+
uniform sampler2D u_texture[${M}];
|
|
28
|
+
|
|
29
|
+
out vec4 outColor;
|
|
30
|
+
|
|
31
|
+
void main() {
|
|
32
|
+
if (v_texpage == 0) {
|
|
33
|
+
outColor = texture(u_texture[0], v_texcoord);
|
|
34
|
+
} ${A}
|
|
35
|
+
}`}(g.TextureAtlas.maxAtlasPages))),this.register((0,r.toDisposable)(()=>s.deleteProgram(this._program))),this._projectionLocation=(0,_.throwIfFalsy)(s.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,_.throwIfFalsy)(s.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,_.throwIfFalsy)(s.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=s.createVertexArray(),s.bindVertexArray(this._vertexArrayObject);const v=new Float32Array([0,0,1,0,0,1,1,1]),C=s.createBuffer();this.register((0,r.toDisposable)(()=>s.deleteBuffer(C))),s.bindBuffer(s.ARRAY_BUFFER,C),s.bufferData(s.ARRAY_BUFFER,v,s.STATIC_DRAW),s.enableVertexAttribArray(0),s.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const o=new Uint8Array([0,1,2,3]),f=s.createBuffer();this.register((0,r.toDisposable)(()=>s.deleteBuffer(f))),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,f),s.bufferData(s.ELEMENT_ARRAY_BUFFER,o,s.STATIC_DRAW),this._attributesBuffer=(0,_.throwIfFalsy)(s.createBuffer()),this.register((0,r.toDisposable)(()=>s.deleteBuffer(this._attributesBuffer))),s.bindBuffer(s.ARRAY_BUFFER,this._attributesBuffer),s.enableVertexAttribArray(2),s.vertexAttribPointer(2,2,s.FLOAT,!1,t,0),s.vertexAttribDivisor(2,1),s.enableVertexAttribArray(3),s.vertexAttribPointer(3,2,s.FLOAT,!1,t,2*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(3,1),s.enableVertexAttribArray(4),s.vertexAttribPointer(4,1,s.FLOAT,!1,t,4*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(4,1),s.enableVertexAttribArray(5),s.vertexAttribPointer(5,2,s.FLOAT,!1,t,5*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(5,1),s.enableVertexAttribArray(6),s.vertexAttribPointer(6,2,s.FLOAT,!1,t,7*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(6,1),s.enableVertexAttribArray(1),s.vertexAttribPointer(1,2,s.FLOAT,!1,t,9*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(1,1),s.useProgram(this._program);const p=new Int32Array(g.TextureAtlas.maxAtlasPages);for(let M=0;M<g.TextureAtlas.maxAtlasPages;M++)p[M]=M;s.uniform1iv(this._textureLocation,p),s.uniformMatrix4fv(this._projectionLocation,!1,u.PROJECTION_MATRIX),this._atlasTextures=[];for(let M=0;M<g.TextureAtlas.maxAtlasPages;M++){const A=new u.GLTexture((0,_.throwIfFalsy)(s.createTexture()));this.register((0,r.toDisposable)(()=>s.deleteTexture(A.texture))),s.activeTexture(s.TEXTURE0+M),s.bindTexture(s.TEXTURE_2D,A.texture),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[M]=A}s.enable(s.BLEND),s.blendFunc(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(l,m,c,s,v,C,o,f){this._updateCell(this._vertices.attributes,l,m,c,s,v,C,o,f)}_updateCell(l,m,c,s,v,C,o,f,p){n=(c*this._terminal.cols+m)*a,s!==h.NULL_CELL_CODE&&s!==void 0?this._atlas&&(e=f&&f.length>1?this._atlas.getRasterizedGlyphCombinedChar(f,v,C,o):this._atlas.getRasterizedGlyph(s,v,C,o),y=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),v!==p&&e.offset.x>y?(x=e.offset.x-y,l[n]=-(e.offset.x-x)+this._dimensions.device.char.left,l[n+1]=-e.offset.y+this._dimensions.device.char.top,l[n+2]=(e.size.x-x)/this._dimensions.device.canvas.width,l[n+3]=e.size.y/this._dimensions.device.canvas.height,l[n+4]=e.texturePage,l[n+5]=e.texturePositionClipSpace.x+x/this._atlas.pages[e.texturePage].canvas.width,l[n+6]=e.texturePositionClipSpace.y,l[n+7]=e.sizeClipSpace.x-x/this._atlas.pages[e.texturePage].canvas.width,l[n+8]=e.sizeClipSpace.y):(l[n]=-e.offset.x+this._dimensions.device.char.left,l[n+1]=-e.offset.y+this._dimensions.device.char.top,l[n+2]=e.size.x/this._dimensions.device.canvas.width,l[n+3]=e.size.y/this._dimensions.device.canvas.height,l[n+4]=e.texturePage,l[n+5]=e.texturePositionClipSpace.x,l[n+6]=e.texturePositionClipSpace.y,l[n+7]=e.sizeClipSpace.x,l[n+8]=e.sizeClipSpace.y)):l.fill(0,n,n+a-1-2)}clear(){const l=this._terminal,m=l.cols*l.rows*a;this._vertices.count!==m?this._vertices.attributes=new Float32Array(m):this._vertices.attributes.fill(0);let c=0;for(;c<this._vertices.attributesBuffers.length;c++)this._vertices.count!==m?this._vertices.attributesBuffers[c]=new Float32Array(m):this._vertices.attributesBuffers[c].fill(0);this._vertices.count=m,c=0;for(let s=0;s<l.rows;s++)for(let v=0;v<l.cols;v++)this._vertices.attributes[c+9]=v/l.cols,this._vertices.attributes[c+10]=s/l.rows,c+=a}handleResize(){const l=this._gl;l.viewport(0,0,l.canvas.width,l.canvas.height),l.uniform2f(this._resolutionLocation,l.canvas.width,l.canvas.height),this.clear()}render(l){if(!this._atlas)return;const m=this._gl;m.useProgram(this._program),m.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const c=this._vertices.attributesBuffers[this._activeBuffer];let s=0;for(let v=0;v<l.lineLengths.length;v++){const C=v*this._terminal.cols*a,o=this._vertices.attributes.subarray(C,C+l.lineLengths[v]*a);c.set(o,s),s+=o.length}m.bindBuffer(m.ARRAY_BUFFER,this._attributesBuffer),m.bufferData(m.ARRAY_BUFFER,c.subarray(0,s),m.STREAM_DRAW);for(let v=0;v<this._atlas.pages.length;v++)this._atlas.pages[v].version!==this._atlasTextures[v].version&&this._bindAtlasPageTexture(m,this._atlas,v);m.drawElementsInstanced(m.TRIANGLE_STRIP,4,m.UNSIGNED_BYTE,0,s/a)}setAtlas(l){this._atlas=l;for(const m of this._atlasTextures)m.version=-1}_bindAtlasPageTexture(l,m,c){l.activeTexture(l.TEXTURE0+c),l.bindTexture(l.TEXTURE_2D,this._atlasTextures[c].texture),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),l.texImage2D(l.TEXTURE_2D,0,l.RGBA,l.RGBA,l.UNSIGNED_BYTE,m.pages[c].canvas),l.generateMipmap(l.TEXTURE_2D),this._atlasTextures[c].version=m.pages[c].version}setDimensions(l){this._dimensions=l}}i.GlyphRenderer=R},742:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.RectangleRenderer=void 0;const u=d(381),h=d(310),r=d(859),_=d(374),g=8*Float32Array.BYTES_PER_ELEMENT;let a=0,t=!1,e=0,n=0,y=0,x=0,R=0,b=0;class l extends r.Disposable{constructor(c,s,v,C){super(),this._terminal=c,this._gl=s,this._dimensions=v,this._themeService=C,this._vertices={count:0,attributes:new Float32Array(160)};const o=this._gl;this._program=(0,_.throwIfFalsy)((0,u.createProgram)(o,`#version 300 es
|
|
36
|
+
layout (location = 0) in vec2 a_position;
|
|
37
|
+
layout (location = 1) in vec2 a_size;
|
|
38
|
+
layout (location = 2) in vec4 a_color;
|
|
39
|
+
layout (location = 3) in vec2 a_unitquad;
|
|
40
|
+
|
|
41
|
+
uniform mat4 u_projection;
|
|
42
|
+
|
|
43
|
+
out vec4 v_color;
|
|
44
|
+
|
|
45
|
+
void main() {
|
|
46
|
+
vec2 zeroToOne = a_position + (a_unitquad * a_size);
|
|
47
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
48
|
+
v_color = a_color;
|
|
49
|
+
}`,`#version 300 es
|
|
50
|
+
precision lowp float;
|
|
51
|
+
|
|
52
|
+
in vec4 v_color;
|
|
53
|
+
|
|
54
|
+
out vec4 outColor;
|
|
55
|
+
|
|
56
|
+
void main() {
|
|
57
|
+
outColor = v_color;
|
|
58
|
+
}`)),this.register((0,r.toDisposable)(()=>o.deleteProgram(this._program))),this._projectionLocation=(0,_.throwIfFalsy)(o.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=o.createVertexArray(),o.bindVertexArray(this._vertexArrayObject);const f=new Float32Array([0,0,1,0,0,1,1,1]),p=o.createBuffer();this.register((0,r.toDisposable)(()=>o.deleteBuffer(p))),o.bindBuffer(o.ARRAY_BUFFER,p),o.bufferData(o.ARRAY_BUFFER,f,o.STATIC_DRAW),o.enableVertexAttribArray(3),o.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const M=new Uint8Array([0,1,2,3]),A=o.createBuffer();this.register((0,r.toDisposable)(()=>o.deleteBuffer(A))),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,A),o.bufferData(o.ELEMENT_ARRAY_BUFFER,M,o.STATIC_DRAW),this._attributesBuffer=(0,_.throwIfFalsy)(o.createBuffer()),this.register((0,r.toDisposable)(()=>o.deleteBuffer(this._attributesBuffer))),o.bindBuffer(o.ARRAY_BUFFER,this._attributesBuffer),o.enableVertexAttribArray(0),o.vertexAttribPointer(0,2,o.FLOAT,!1,g,0),o.vertexAttribDivisor(0,1),o.enableVertexAttribArray(1),o.vertexAttribPointer(1,2,o.FLOAT,!1,g,2*Float32Array.BYTES_PER_ELEMENT),o.vertexAttribDivisor(1,1),o.enableVertexAttribArray(2),o.vertexAttribPointer(2,4,o.FLOAT,!1,g,4*Float32Array.BYTES_PER_ELEMENT),o.vertexAttribDivisor(2,1),this._updateCachedColors(C.colors),this.register(this._themeService.onChangeColors(w=>{this._updateCachedColors(w),this._updateViewportRectangle()}))}render(){const c=this._gl;c.useProgram(this._program),c.bindVertexArray(this._vertexArrayObject),c.uniformMatrix4fv(this._projectionLocation,!1,u.PROJECTION_MATRIX),c.bindBuffer(c.ARRAY_BUFFER,this._attributesBuffer),c.bufferData(c.ARRAY_BUFFER,this._vertices.attributes,c.DYNAMIC_DRAW),c.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,c.UNSIGNED_BYTE,0,this._vertices.count)}handleResize(){this._updateViewportRectangle()}setDimensions(c){this._dimensions=c}_updateCachedColors(c){this._bgFloat=this._colorToFloat32Array(c.background)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(c){const s=this._terminal,v=this._vertices;let C,o,f,p,M,A,w,L,T,E,P,D=1;for(C=0;C<s.rows;C++){for(f=-1,p=0,M=0,A=!1,o=0;o<s.cols;o++)w=(C*s.cols+o)*h.RENDER_MODEL_INDICIES_PER_CELL,L=c.cells[w+h.RENDER_MODEL_BG_OFFSET],T=c.cells[w+h.RENDER_MODEL_FG_OFFSET],E=!!(67108864&T),(L!==p||T!==M&&(A||E))&&((p!==0||A&&M!==0)&&(P=8*D++,this._updateRectangle(v,P,M,p,f,o,C)),f=o,p=L,M=T,A=E);(p!==0||A&&M!==0)&&(P=8*D++,this._updateRectangle(v,P,M,p,f,s.cols,C))}v.count=D}_updateRectangle(c,s,v,C,o,f,p){if(t=!1,67108864&v)switch(50331648&v){case 16777216:case 33554432:a=this._themeService.colors.ansi[255&v].rgba;break;case 50331648:a=(16777215&v)<<8;break;default:a=this._themeService.colors.foreground.rgba}else switch(50331648&C){case 16777216:case 33554432:a=this._themeService.colors.ansi[255&C].rgba;break;case 50331648:a=(16777215&C)<<8;break;default:a=this._themeService.colors.background.rgba,t=!0}c.attributes.length<s+4&&(c.attributes=(0,u.expandFloat32Array)(c.attributes,this._terminal.rows*this._terminal.cols*8)),e=o*this._dimensions.device.cell.width,n=p*this._dimensions.device.cell.height,y=(a>>24&255)/255,x=(a>>16&255)/255,R=(a>>8&255)/255,b=1,this._addRectangle(c.attributes,s,e,n,(f-o)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,y,x,R,b)}_addRectangle(c,s,v,C,o,f,p,M,A,w){c[s]=v/this._dimensions.device.canvas.width,c[s+1]=C/this._dimensions.device.canvas.height,c[s+2]=o/this._dimensions.device.canvas.width,c[s+3]=f/this._dimensions.device.canvas.height,c[s+4]=p,c[s+5]=M,c[s+6]=A,c[s+7]=w}_addRectangleFloat(c,s,v,C,o,f,p){c[s]=v/this._dimensions.device.canvas.width,c[s+1]=C/this._dimensions.device.canvas.height,c[s+2]=o/this._dimensions.device.canvas.width,c[s+3]=f/this._dimensions.device.canvas.height,c[s+4]=p[0],c[s+5]=p[1],c[s+6]=p[2],c[s+7]=p[3]}_colorToFloat32Array(c){return new Float32Array([(c.rgba>>24&255)/255,(c.rgba>>16&255)/255,(c.rgba>>8&255)/255,(255&c.rgba)/255])}}i.RectangleRenderer=l},310:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.RenderModel=i.COMBINED_CHAR_BIT_MASK=i.RENDER_MODEL_EXT_OFFSET=i.RENDER_MODEL_FG_OFFSET=i.RENDER_MODEL_BG_OFFSET=i.RENDER_MODEL_INDICIES_PER_CELL=void 0;const u=d(296);i.RENDER_MODEL_INDICIES_PER_CELL=4,i.RENDER_MODEL_BG_OFFSET=1,i.RENDER_MODEL_FG_OFFSET=2,i.RENDER_MODEL_EXT_OFFSET=3,i.COMBINED_CHAR_BIT_MASK=2147483648,i.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,u.createSelectionRenderModel)()}resize(h,r){const _=h*r*i.RENDER_MODEL_INDICIES_PER_CELL;_!==this.cells.length&&(this.cells=new Uint32Array(_),this.lineLengths=new Uint32Array(r))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.JoinedCellData=i.WebglRenderer=void 0;const u=d(820),h=d(274),r=d(627),_=d(56),g=d(374),a=d(147),t=d(782),e=d(855),n=d(345),y=d(859),x=d(965),R=d(742),b=d(461),l=d(733),m=d(310);class c extends y.Disposable{constructor(o,f,p,M,A,w,L,T,E){super(),this._terminal=o,this._characterJoinerService=f,this._charSizeService=p,this._coreBrowserService=M,this._decorationService=w,this._optionsService=L,this._themeService=T,this._model=new m.RenderModel,this._workCell=new t.CellData,this._onChangeTextureAtlas=this.register(new n.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new n.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new n.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new n.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new n.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new h.CellColorResolver(this._terminal,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new l.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier2,this._coreBrowserService,L,this._themeService),new b.CursorRenderLayer(o,this._core.screenElement,3,this._onRequestRedraw,this._coreBrowserService,A,L,this._themeService)],this.dimensions=(0,g.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this.register(L.onOptionChange(()=>this._handleOptionsChanged())),this._canvas=document.createElement("canvas");const P={antialias:!1,depth:!1,preserveDrawingBuffer:E};if(this._gl=this._canvas.getContext("webgl2",P),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,u.addDisposableDomListener)(this._canvas,"webglcontextlost",D=>{console.log("webglcontextlost event received"),D.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(D)},3e3)})),this.register((0,u.addDisposableDomListener)(this._canvas,"webglcontextrestored",D=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,r.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this.register((0,_.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(D,H)=>this._setCanvasDevicePixelDimensions(D,H))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer,this._glyphRenderer]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,y.toDisposable)(()=>{var D;for(const H of this._renderLayers)H.dispose();(D=this._canvas.parentElement)===null||D===void 0||D.removeChild(this._canvas),(0,r.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){var o;return(o=this._charAtlas)===null||o===void 0?void 0:o.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(o,f){var p,M,A,w;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const L of this._renderLayers)L.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(p=this._rectangleRenderer)===null||p===void 0||p.setDimensions(this.dimensions),(M=this._rectangleRenderer)===null||M===void 0||M.handleResize(),(A=this._glyphRenderer)===null||A===void 0||A.setDimensions(this.dimensions),(w=this._glyphRenderer)===null||w===void 0||w.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(const o of this._renderLayers)o.handleBlur(this._terminal);this._requestRedrawViewport()}handleFocus(){for(const o of this._renderLayers)o.handleFocus(this._terminal);this._requestRedrawViewport()}handleSelectionChanged(o,f,p){for(const M of this._renderLayers)M.handleSelectionChanged(this._terminal,o,f,p);this._model.selection.update(this._terminal,o,f,p),this._requestRedrawViewport()}handleCursorMove(){for(const o of this._renderLayers)o.handleCursorMove(this._terminal)}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas()}_initializeWebGLState(){var o,f;return(o=this._rectangleRenderer)===null||o===void 0||o.dispose(),(f=this._glyphRenderer)===null||f===void 0||f.dispose(),this._rectangleRenderer=this.register(new R.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService)),this._glyphRenderer=this.register(new x.GlyphRenderer(this._terminal,this._gl,this.dimensions)),this.handleCharSizeChanged(),[this._rectangleRenderer,this._glyphRenderer]}_refreshCharAtlas(){var o,f;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const p=(0,r.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==p&&((o=this._charAtlasDisposable)===null||o===void 0||o.dispose(),this._onChangeTextureAtlas.fire(p.pages[0].canvas),this._charAtlasDisposable=(0,y.getDisposeArrayDisposable)([(0,n.forwardEvent)(p.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,n.forwardEvent)(p.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=p,this._charAtlas.warmUp(),(f=this._glyphRenderer)===null||f===void 0||f.setAtlas(this._charAtlas)}_clearModel(o){var f;this._model.clear(),o&&((f=this._glyphRenderer)===null||f===void 0||f.clear())}clearTextureAtlas(){var o;(o=this._charAtlas)===null||o===void 0||o.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(const o of this._renderLayers)o.reset(this._terminal)}registerCharacterJoiner(o){return-1}deregisterCharacterJoiner(o){return!1}renderRows(o,f){var p,M;if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const A of this._renderLayers)A.handleGridChanged(this._terminal,o,f);this._glyphRenderer&&this._rectangleRenderer&&(this._glyphRenderer.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(o,f),(p=this._rectangleRenderer)===null||p===void 0||p.render(),(M=this._glyphRenderer)===null||M===void 0||M.render(this._model))}_updateModel(o,f){const p=this._core;let M,A,w,L,T,E,P,D,H,W,N,I,z,q=this._workCell;for(o=v(o,p.rows-1,0),f=v(f,p.rows-1,0),A=o;A<=f;A++)for(w=A+p.buffer.ydisp,L=p.buffer.lines.get(w),this._model.lineLengths[A]=0,T=this._characterJoinerService.getJoinedCharacters(w),I=0;I<p.cols;I++)if(M=this._cellColorResolver.result.bg,L.loadCell(I,q),I===0&&(M=this._cellColorResolver.result.bg),E=!1,P=I,T.length>0&&I===T[0][0]&&(E=!0,D=T.shift(),q=new s(q,L.translateToString(!0,D[0],D[1]),D[1]-D[0]),P=D[1]-1),H=q.getChars(),W=q.getCode(),N=(A*p.cols+I)*m.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(q,I,w),W!==e.NULL_CELL_CODE&&(this._model.lineLengths[A]=I+1),(this._model.cells[N]!==W||this._model.cells[N+m.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[N+m.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[N+m.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(H.length>1&&(W|=m.COMBINED_CHAR_BIT_MASK),this._model.cells[N]=W,this._model.cells[N+m.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[N+m.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[N+m.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,this._glyphRenderer.updateCell(I,A,W,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,H,M),E))for(q=this._workCell,I++;I<P;I++)z=(A*p.cols+I)*m.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.updateCell(I,A,e.NULL_CELL_CODE,0,0,0,e.NULL_CELL_CHAR,0),this._model.cells[z]=e.NULL_CELL_CODE,this._model.cells[z+m.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[z+m.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[z+m.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;this._rectangleRenderer.updateBackgrounds(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),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._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(o,f){this._canvas.width===o&&this._canvas.height===f||(this._canvas.width=o,this._canvas.height=f,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}}i.WebglRenderer=c;class s extends a.AttributeData{constructor(o,f,p){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=f,this._width=p}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function v(C,o,f=0){return Math.max(Math.min(C,o),f)}i.JoinedCellData=s},381:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.GLTexture=i.expandFloat32Array=i.createShader=i.createProgram=i.PROJECTION_MATRIX=void 0;const u=d(374);function h(r,_,g){const a=(0,u.throwIfFalsy)(r.createShader(_));if(r.shaderSource(a,g),r.compileShader(a),r.getShaderParameter(a,r.COMPILE_STATUS))return a;console.error(r.getShaderInfoLog(a)),r.deleteShader(a)}i.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),i.createProgram=function(r,_,g){const a=(0,u.throwIfFalsy)(r.createProgram());if(r.attachShader(a,(0,u.throwIfFalsy)(h(r,r.VERTEX_SHADER,_))),r.attachShader(a,(0,u.throwIfFalsy)(h(r,r.FRAGMENT_SHADER,g))),r.linkProgram(a),r.getProgramParameter(a,r.LINK_STATUS))return a;console.error(r.getProgramInfoLog(a)),r.deleteProgram(a)},i.createShader=h,i.expandFloat32Array=function(r,_){const g=Math.min(2*r.length,_),a=new Float32Array(g);for(let t=0;t<r.length;t++)a[t]=r[t];return a},i.GLTexture=class{constructor(r){this.texture=r,this.version=-1}}},592:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BaseRenderLayer=void 0;const u=d(627),h=d(237),r=d(374),_=d(859);class g extends _.Disposable{constructor(t,e,n,y,x,R,b,l){super(),this._container=e,this._alpha=x,this._coreBrowserService=R,this._optionsService=b,this._themeService=l,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=document.createElement("canvas"),this._canvas.classList.add(`xterm-${n}-layer`),this._canvas.style.zIndex=y.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors(m=>{this._refreshCharAtlas(t,m),this.reset(t)})),this.register((0,_.toDisposable)(()=>{var m;this._canvas.remove(),(m=this._charAtlas)===null||m===void 0||m.dispose()}))}_initCanvas(){this._ctx=(0,r.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(t){}handleFocus(t){}handleCursorMove(t){}handleGridChanged(t,e,n){}handleSelectionChanged(t,e,n,y=!1){}_setTransparency(t,e){if(e===this._alpha)return;const n=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,n),this._refreshCharAtlas(t,this._themeService.colors),this.handleGridChanged(t,0,t.rows-1)}_refreshCharAtlas(t,e){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,u.acquireTextureAtlas)(t,this._optionsService.rawOptions,e,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(t,e){this._deviceCellWidth=e.device.cell.width,this._deviceCellHeight=e.device.cell.height,this._deviceCharWidth=e.device.char.width,this._deviceCharHeight=e.device.char.height,this._deviceCharLeft=e.device.char.left,this._deviceCharTop=e.device.char.top,this._canvas.width=e.device.canvas.width,this._canvas.height=e.device.canvas.height,this._canvas.style.width=`${e.css.canvas.width}px`,this._canvas.style.height=`${e.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(t,this._themeService.colors)}_fillCells(t,e,n,y){this._ctx.fillRect(t*this._deviceCellWidth,e*this._deviceCellHeight,n*this._deviceCellWidth,y*this._deviceCellHeight)}_fillBottomLineAtCells(t,e,n=1){this._ctx.fillRect(t*this._deviceCellWidth,(e+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,n*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillLeftLineAtCell(t,e,n){this._ctx.fillRect(t*this._deviceCellWidth,e*this._deviceCellHeight,this._coreBrowserService.dpr*n,this._deviceCellHeight)}_strokeRectAtCell(t,e,n,y){this._ctx.lineWidth=this._coreBrowserService.dpr,this._ctx.strokeRect(t*this._deviceCellWidth+this._coreBrowserService.dpr/2,e*this._deviceCellHeight+this._coreBrowserService.dpr/2,n*this._deviceCellWidth-this._coreBrowserService.dpr,y*this._deviceCellHeight-this._coreBrowserService.dpr)}_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(t,e,n,y){this._alpha?this._ctx.clearRect(t*this._deviceCellWidth,e*this._deviceCellHeight,n*this._deviceCellWidth,y*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(t*this._deviceCellWidth,e*this._deviceCellHeight,n*this._deviceCellWidth,y*this._deviceCellHeight))}_fillCharTrueColor(t,e,n,y){this._ctx.font=this._getFont(t,!1,!1),this._ctx.textBaseline=h.TEXT_BASELINE,this._clipCell(n,y,e.getWidth()),this._ctx.fillText(e.getChars(),n*this._deviceCellWidth+this._deviceCharLeft,y*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(t,e,n){this._ctx.beginPath(),this._ctx.rect(t*this._deviceCellWidth,e*this._deviceCellHeight,n*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(t,e,n){return`${n?"italic":""} ${e?t.options.fontWeightBold:t.options.fontWeight} ${t.options.fontSize*this._coreBrowserService.dpr}px ${t.options.fontFamily}`}}i.BaseRenderLayer=g},461:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CursorRenderLayer=void 0;const u=d(592),h=d(782),r=d(859),_=d(399);class g extends u.BaseRenderLayer{constructor(e,n,y,x,R,b,l,m){super(e,n,"cursor",y,!0,R,l,m),this._onRequestRefreshRowsEvent=x,this._coreService=b,this._cell=new h.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)},this._handleOptionsChanged(e),this.register(l.onOptionChange(()=>this._handleOptionsChanged(e))),this.register((0,r.toDisposable)(()=>{var c;(c=this._cursorBlinkStateManager)===null||c===void 0||c.dispose(),this._cursorBlinkStateManager=void 0}))}resize(e,n){super.resize(e,n),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(e){var n;this._clearCursor(),(n=this._cursorBlinkStateManager)===null||n===void 0||n.restartBlinkAnimation(e),this._handleOptionsChanged(e)}handleBlur(e){var n;(n=this._cursorBlinkStateManager)===null||n===void 0||n.pause(),this._onRequestRefreshRowsEvent.fire({start:e.buffer.active.cursorY,end:e.buffer.active.cursorY})}handleFocus(e){var n;(n=this._cursorBlinkStateManager)===null||n===void 0||n.resume(e),this._onRequestRefreshRowsEvent.fire({start:e.buffer.active.cursorY,end:e.buffer.active.cursorY})}_handleOptionsChanged(e){var n;e.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new a(()=>{this._render(e,!0)},this._coreBrowserService)):((n=this._cursorBlinkStateManager)===null||n===void 0||n.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRefreshRowsEvent.fire({start:e.buffer.active.cursorY,end:e.buffer.active.cursorY})}handleCursorMove(e){var n;(n=this._cursorBlinkStateManager)===null||n===void 0||n.restartBlinkAnimation(e)}handleGridChanged(e,n,y){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(e,!1):this._cursorBlinkStateManager.restartBlinkAnimation(e)}_render(e,n){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const y=e.buffer.active.baseY+e.buffer.active.cursorY,x=y-e.buffer.active.viewportY,R=Math.min(e.buffer.active.cursorX,e.cols-1);if(x<0||x>=e.rows)this._clearCursor();else if(e._core.buffer.lines.get(y).loadCell(R,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 b=e.options.cursorStyle;return this._renderBlurCursor(e,R,x,this._cell),this._ctx.restore(),this._state.x=R,this._state.y=x,this._state.isFocused=!1,this._state.style=b,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===R&&this._state.y===x&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===e.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[e.options.cursorStyle||"block"](e,R,x,this._cell),this._ctx.restore(),this._state.x=R,this._state.y=x,this._state.isFocused=!1,this._state.style=e.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(_.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(e,n,y,x){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(n,y,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(e,n,y,x){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(n,y,x.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(e,x,n,y),this._ctx.restore()}_renderUnderlineCursor(e,n,y,x){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(n,y),this._ctx.restore()}_renderBlurCursor(e,n,y,x){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(n,y,x.getWidth(),1),this._ctx.restore()}}i.CursorRenderLayer=g;class a{constructor(e,n){this._renderCallback=e,this._coreBrowserService=n,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(e){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(e=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const n=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,n>0)return void this._restartInterval(n)}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 n=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(n)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},e)}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(e){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation(e)}}},733:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.LinkRenderLayer=void 0;const u=d(197),h=d(237),r=d(592);class _ extends r.BaseRenderLayer{constructor(a,t,e,n,y,x,R){super(e,a,"link",t,!0,y,x,R),this.register(n.onShowLinkUnderline(b=>this._handleShowLinkUnderline(b))),this.register(n.onHideLinkUnderline(b=>this._handleHideLinkUnderline(b)))}resize(a,t){super.resize(a,t),this._state=void 0}reset(a){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const a=this._state.y2-this._state.y1-1;a>0&&this._clearCells(0,this._state.y1+1,this._state.cols,a),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(a){if(a.fg===h.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:a.fg!==void 0&&(0,u.is256Color)(a.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[a.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,a.y1===a.y2)this._fillBottomLineAtCells(a.x1,a.y1,a.x2-a.x1);else{this._fillBottomLineAtCells(a.x1,a.y1,a.cols-a.x1);for(let t=a.y1+1;t<a.y2;t++)this._fillBottomLineAtCells(0,t,a.cols);this._fillBottomLineAtCells(0,a.y2,a.x2)}this._state=a}_handleHideLinkUnderline(a){this._clearCurrentLink()}}i.LinkRenderLayer=_},820:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.addDisposableDomListener=void 0,i.addDisposableDomListener=function(d,u,h,r){d.addEventListener(u,h,r);let _=!1;return{dispose:()=>{_||(_=!0,d.removeEventListener(u,h,r))}}}},274:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CellColorResolver=void 0;let d,u=0,h=0,r=!1,_=!1,g=!1;i.CellColorResolver=class{constructor(a,t,e,n,y){this._terminal=a,this._selectionRenderModel=t,this._decorationService=e,this._coreBrowserService=n,this._themeService=y,this.result={fg:0,bg:0,ext:0}}resolve(a,t,e){this.result.bg=a.bg,this.result.fg=a.fg,this.result.ext=268435456&a.bg?a.extended.ext:0,h=0,u=0,_=!1,r=!1,g=!1,d=this._themeService.colors,this._decorationService.forEachDecorationAtCell(t,e,"bottom",n=>{n.backgroundColorRGB&&(h=n.backgroundColorRGB.rgba>>8&16777215,_=!0),n.foregroundColorRGB&&(u=n.foregroundColorRGB.rgba>>8&16777215,r=!0)}),g=this._selectionRenderModel.isCellSelected(this._terminal,t,e),g&&(h=(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba>>8&16777215,_=!0,d.selectionForeground&&(u=d.selectionForeground.rgba>>8&16777215,r=!0)),this._decorationService.forEachDecorationAtCell(t,e,"top",n=>{n.backgroundColorRGB&&(h=n.backgroundColorRGB.rgba>>8&16777215,_=!0),n.foregroundColorRGB&&(u=n.foregroundColorRGB.rgba>>8&16777215,r=!0)}),_&&(h=g?-16777216&a.bg&-134217729|h|50331648:-16777216&a.bg|h|50331648),r&&(u=-16777216&a.fg&-67108865|u|50331648),67108864&this.result.fg&&(_&&!r&&(u=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&d.background.rgba>>8|50331648,r=!0),!_&&r&&(h=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&d.foreground.rgba>>8|50331648,_=!0)),d=void 0,this.result.bg=_?h:this.result.bg,this.result.fg=r?u:this.result.fg}}},627:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.removeTerminalFromCache=i.acquireTextureAtlas=void 0;const u=d(509),h=d(197),r=[];i.acquireTextureAtlas=function(_,g,a,t,e,n,y,x){const R=(0,h.generateConfig)(t,e,n,y,g,a,x);for(let m=0;m<r.length;m++){const c=r[m],s=c.ownedBy.indexOf(_);if(s>=0){if((0,h.configEquals)(c.config,R))return c.atlas;c.ownedBy.length===1?(c.atlas.dispose(),r.splice(m,1)):c.ownedBy.splice(s,1);break}}for(let m=0;m<r.length;m++){const c=r[m];if((0,h.configEquals)(c.config,R))return c.ownedBy.push(_),c.atlas}const b=_._core,l={atlas:new u.TextureAtlas(document,R,b.unicodeService),config:R,ownedBy:[_]};return r.push(l),l.atlas},i.removeTerminalFromCache=function(_){for(let g=0;g<r.length;g++){const a=r[g].ownedBy.indexOf(_);if(a!==-1){r[g].ownedBy.length===1?(r[g].atlas.dispose(),r.splice(g,1)):r[g].ownedBy.splice(a,1);break}}}},197:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.is256Color=i.configEquals=i.generateConfig=void 0;const u=d(160);i.generateConfig=function(h,r,_,g,a,t,e){const n={foreground:t.foreground,background:t.background,cursor:u.NULL_COLOR,cursorAccent:u.NULL_COLOR,selectionForeground:u.NULL_COLOR,selectionBackgroundTransparent:u.NULL_COLOR,selectionBackgroundOpaque:u.NULL_COLOR,selectionInactiveBackgroundTransparent:u.NULL_COLOR,selectionInactiveBackgroundOpaque:u.NULL_COLOR,ansi:t.ansi.slice(),contrastCache:t.contrastCache};return{customGlyphs:a.customGlyphs,devicePixelRatio:e,letterSpacing:a.letterSpacing,lineHeight:a.lineHeight,deviceCellWidth:h,deviceCellHeight:r,deviceCharWidth:_,deviceCharHeight:g,fontFamily:a.fontFamily,fontSize:a.fontSize,fontWeight:a.fontWeight,fontWeightBold:a.fontWeightBold,allowTransparency:a.allowTransparency,drawBoldTextInBrightColors:a.drawBoldTextInBrightColors,minimumContrastRatio:a.minimumContrastRatio,colors:n}},i.configEquals=function(h,r){for(let _=0;_<h.colors.ansi.length;_++)if(h.colors.ansi[_].rgba!==r.colors.ansi[_].rgba)return!1;return h.devicePixelRatio===r.devicePixelRatio&&h.customGlyphs===r.customGlyphs&&h.lineHeight===r.lineHeight&&h.letterSpacing===r.letterSpacing&&h.fontFamily===r.fontFamily&&h.fontSize===r.fontSize&&h.fontWeight===r.fontWeight&&h.fontWeightBold===r.fontWeightBold&&h.allowTransparency===r.allowTransparency&&h.deviceCharWidth===r.deviceCharWidth&&h.deviceCharHeight===r.deviceCharHeight&&h.drawBoldTextInBrightColors===r.drawBoldTextInBrightColors&&h.minimumContrastRatio===r.minimumContrastRatio&&h.colors.foreground.rgba===r.colors.foreground.rgba&&h.colors.background.rgba===r.colors.background.rgba},i.is256Color=function(h){return(50331648&h)==16777216||(50331648&h)==33554432}},237:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.TEXT_BASELINE=i.DIM_OPACITY=i.INVERTED_DEFAULT_COLOR=void 0;const u=d(399);i.INVERTED_DEFAULT_COLOR=257,i.DIM_OPACITY=.5,i.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},860:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.tryDrawCustomChar=i.powerlineDefinitions=i.boxDrawingDefinitions=i.blockElementDefinitions=void 0;const u=d(374);i.blockElementDefinitions={"\u2580":[{x:0,y:0,w:8,h:4}],"\u2581":[{x:0,y:7,w:8,h:1}],"\u2582":[{x:0,y:6,w:8,h:2}],"\u2583":[{x:0,y:5,w:8,h:3}],"\u2584":[{x:0,y:4,w:8,h:4}],"\u2585":[{x:0,y:3,w:8,h:5}],"\u2586":[{x:0,y:2,w:8,h:6}],"\u2587":[{x:0,y:1,w:8,h:7}],"\u2588":[{x:0,y:0,w:8,h:8}],"\u2589":[{x:0,y:0,w:7,h:8}],"\u258A":[{x:0,y:0,w:6,h:8}],"\u258B":[{x:0,y:0,w:5,h:8}],"\u258C":[{x:0,y:0,w:4,h:8}],"\u258D":[{x:0,y:0,w:3,h:8}],"\u258E":[{x:0,y:0,w:2,h:8}],"\u258F":[{x:0,y:0,w:1,h:8}],"\u2590":[{x:4,y:0,w:4,h:8}],"\u2594":[{x:0,y:0,w:8,h:1}],"\u2595":[{x:7,y:0,w:1,h:8}],"\u2596":[{x:0,y:4,w:4,h:4}],"\u2597":[{x:4,y:4,w:4,h:4}],"\u2598":[{x:0,y:0,w:4,h:4}],"\u2599":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u259A":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"\u259B":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"\u259C":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"\u259D":[{x:4,y:0,w:4,h:4}],"\u259E":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"\u259F":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u{1FB70}":[{x:1,y:0,w:1,h:8}],"\u{1FB71}":[{x:2,y:0,w:1,h:8}],"\u{1FB72}":[{x:3,y:0,w:1,h:8}],"\u{1FB73}":[{x:4,y:0,w:1,h:8}],"\u{1FB74}":[{x:5,y:0,w:1,h:8}],"\u{1FB75}":[{x:6,y:0,w:1,h:8}],"\u{1FB76}":[{x:0,y:1,w:8,h:1}],"\u{1FB77}":[{x:0,y:2,w:8,h:1}],"\u{1FB78}":[{x:0,y:3,w:8,h:1}],"\u{1FB79}":[{x:0,y:4,w:8,h:1}],"\u{1FB7A}":[{x:0,y:5,w:8,h:1}],"\u{1FB7B}":[{x:0,y:6,w:8,h:1}],"\u{1FB7C}":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB7D}":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7E}":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7F}":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB80}":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB81}":[{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}],"\u{1FB82}":[{x:0,y:0,w:8,h:2}],"\u{1FB83}":[{x:0,y:0,w:8,h:3}],"\u{1FB84}":[{x:0,y:0,w:8,h:5}],"\u{1FB85}":[{x:0,y:0,w:8,h:6}],"\u{1FB86}":[{x:0,y:0,w:8,h:7}],"\u{1FB87}":[{x:6,y:0,w:2,h:8}],"\u{1FB88}":[{x:5,y:0,w:3,h:8}],"\u{1FB89}":[{x:3,y:0,w:5,h:8}],"\u{1FB8A}":[{x:2,y:0,w:6,h:8}],"\u{1FB8B}":[{x:1,y:0,w:7,h:8}],"\u{1FB95}":[{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}],"\u{1FB96}":[{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}],"\u{1FB97}":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const h={"\u2591":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"\u2592":[[1,0],[0,0],[0,1],[0,0]],"\u2593":[[0,1],[1,1],[1,0],[1,1]]};i.boxDrawingDefinitions={"\u2500":{1:"M0,.5 L1,.5"},"\u2501":{3:"M0,.5 L1,.5"},"\u2502":{1:"M.5,0 L.5,1"},"\u2503":{3:"M.5,0 L.5,1"},"\u250C":{1:"M0.5,1 L.5,.5 L1,.5"},"\u250F":{3:"M0.5,1 L.5,.5 L1,.5"},"\u2510":{1:"M0,.5 L.5,.5 L.5,1"},"\u2513":{3:"M0,.5 L.5,.5 L.5,1"},"\u2514":{1:"M.5,0 L.5,.5 L1,.5"},"\u2517":{3:"M.5,0 L.5,.5 L1,.5"},"\u2518":{1:"M.5,0 L.5,.5 L0,.5"},"\u251B":{3:"M.5,0 L.5,.5 L0,.5"},"\u251C":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u2523":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u2524":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u252B":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u252C":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2533":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2534":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"\u253B":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"\u253C":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"\u254B":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"\u2574":{1:"M.5,.5 L0,.5"},"\u2578":{3:"M.5,.5 L0,.5"},"\u2575":{1:"M.5,.5 L.5,0"},"\u2579":{3:"M.5,.5 L.5,0"},"\u2576":{1:"M.5,.5 L1,.5"},"\u257A":{3:"M.5,.5 L1,.5"},"\u2577":{1:"M.5,.5 L.5,1"},"\u257B":{3:"M.5,.5 L.5,1"},"\u2550":{1:(t,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"\u2551":{1:(t,e)=>`M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1`},"\u2552":{1:(t,e)=>`M.5,1 L.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"\u2553":{1:(t,e)=>`M${.5-t},1 L${.5-t},.5 L1,.5 M${.5+t},.5 L${.5+t},1`},"\u2554":{1:(t,e)=>`M1,${.5-e} L${.5-t},${.5-e} L${.5-t},1 M1,${.5+e} L${.5+t},${.5+e} L${.5+t},1`},"\u2555":{1:(t,e)=>`M0,${.5-e} L.5,${.5-e} L.5,1 M0,${.5+e} L.5,${.5+e}`},"\u2556":{1:(t,e)=>`M${.5+t},1 L${.5+t},.5 L0,.5 M${.5-t},.5 L${.5-t},1`},"\u2557":{1:(t,e)=>`M0,${.5+e} L${.5-t},${.5+e} L${.5-t},1 M0,${.5-e} L${.5+t},${.5-e} L${.5+t},1`},"\u2558":{1:(t,e)=>`M.5,0 L.5,${.5+e} L1,${.5+e} M.5,${.5-e} L1,${.5-e}`},"\u2559":{1:(t,e)=>`M1,.5 L${.5-t},.5 L${.5-t},0 M${.5+t},.5 L${.5+t},0`},"\u255A":{1:(t,e)=>`M1,${.5-e} L${.5+t},${.5-e} L${.5+t},0 M1,${.5+e} L${.5-t},${.5+e} L${.5-t},0`},"\u255B":{1:(t,e)=>`M0,${.5+e} L.5,${.5+e} L.5,0 M0,${.5-e} L.5,${.5-e}`},"\u255C":{1:(t,e)=>`M0,.5 L${.5+t},.5 L${.5+t},0 M${.5-t},.5 L${.5-t},0`},"\u255D":{1:(t,e)=>`M0,${.5-e} L${.5-t},${.5-e} L${.5-t},0 M0,${.5+e} L${.5+t},${.5+e} L${.5+t},0`},"\u255E":{1:(t,e)=>`M.5,0 L.5,1 M.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"\u255F":{1:(t,e)=>`M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1 M${.5+t},.5 L1,.5`},"\u2560":{1:(t,e)=>`M${.5-t},0 L${.5-t},1 M1,${.5+e} L${.5+t},${.5+e} L${.5+t},1 M1,${.5-e} L${.5+t},${.5-e} L${.5+t},0`},"\u2561":{1:(t,e)=>`M.5,0 L.5,1 M0,${.5-e} L.5,${.5-e} M0,${.5+e} L.5,${.5+e}`},"\u2562":{1:(t,e)=>`M0,.5 L${.5-t},.5 M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1`},"\u2563":{1:(t,e)=>`M${.5+t},0 L${.5+t},1 M0,${.5+e} L${.5-t},${.5+e} L${.5-t},1 M0,${.5-e} L${.5-t},${.5-e} L${.5-t},0`},"\u2564":{1:(t,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e} M.5,${.5+e} L.5,1`},"\u2565":{1:(t,e)=>`M0,.5 L1,.5 M${.5-t},.5 L${.5-t},1 M${.5+t},.5 L${.5+t},1`},"\u2566":{1:(t,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L${.5-t},${.5+e} L${.5-t},1 M1,${.5+e} L${.5+t},${.5+e} L${.5+t},1`},"\u2567":{1:(t,e)=>`M.5,0 L.5,${.5-e} M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"\u2568":{1:(t,e)=>`M0,.5 L1,.5 M${.5-t},.5 L${.5-t},0 M${.5+t},.5 L${.5+t},0`},"\u2569":{1:(t,e)=>`M0,${.5+e} L1,${.5+e} M0,${.5-e} L${.5-t},${.5-e} L${.5-t},0 M1,${.5-e} L${.5+t},${.5-e} L${.5+t},0`},"\u256A":{1:(t,e)=>`M.5,0 L.5,1 M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"\u256B":{1:(t,e)=>`M0,.5 L1,.5 M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1`},"\u256C":{1:(t,e)=>`M0,${.5+e} L${.5-t},${.5+e} L${.5-t},1 M1,${.5+e} L${.5+t},${.5+e} L${.5+t},1 M0,${.5-e} L${.5-t},${.5-e} L${.5-t},0 M1,${.5-e} L${.5+t},${.5-e} L${.5+t},0`},"\u2571":{1:"M1,0 L0,1"},"\u2572":{1:"M0,0 L1,1"},"\u2573":{1:"M1,0 L0,1 M0,0 L1,1"},"\u257C":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u257D":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"\u257E":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u257F":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u250D":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"\u250E":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2511":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"\u2512":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"\u2515":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"\u2516":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u2519":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"\u251A":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"\u251D":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"\u251E":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u251F":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2520":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"\u2521":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"\u2522":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"\u2525":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"\u2526":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u2527":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"\u2528":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"\u2529":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"\u252A":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"\u252D":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u252E":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"\u252F":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"\u2530":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2531":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"\u2532":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"\u2535":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u2536":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u2537":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"\u2538":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u2539":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"\u253A":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"\u253D":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u253E":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u253F":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"\u2540":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u2541":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2542":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"\u2543":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"\u2544":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"\u2545":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"\u2546":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"\u2547":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"\u2548":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2549":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u254A":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u254C":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"\u254D":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"\u2504":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"\u2505":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"\u2508":{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"},"\u2509":{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"},"\u254E":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"\u254F":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"\u2506":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"\u2507":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"\u250A":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"\u250B":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"\u256D":{1:(t,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,1,.5`},"\u256E":{1:(t,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,0,.5`},"\u256F":{1:(t,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,0,.5`},"\u2570":{1:(t,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,1,.5`}},i.powerlineDefinitions={"\uE0B0":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"\uE0B1":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0B2":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"\uE0B3":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0B4":{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},"\uE0B5":{d:"M0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:1,rightPadding:1},"\uE0B6":{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},"\uE0B7":{d:"M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:1,leftPadding:1},"\uE0B8":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"\uE0B9":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0BA":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"\uE0BC":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"\uE0BD":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0BE":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},i.powerlineDefinitions["\uE0BB"]=i.powerlineDefinitions["\uE0BD"],i.powerlineDefinitions["\uE0BF"]=i.powerlineDefinitions["\uE0B9"],i.tryDrawCustomChar=function(t,e,n,y,x,R,b,l){const m=i.blockElementDefinitions[e];if(m)return function(C,o,f,p,M,A){for(let w=0;w<o.length;w++){const L=o[w],T=M/8,E=A/8;C.fillRect(f+L.x*T,p+L.y*E,L.w*T,L.h*E)}}(t,m,n,y,x,R),!0;const c=h[e];if(c)return function(C,o,f,p,M,A){let w=r.get(o);w||(w=new Map,r.set(o,w));const L=C.fillStyle;if(typeof L!="string")throw new Error(`Unexpected fillStyle type "${L}"`);let T=w.get(L);if(!T){const E=o[0].length,P=o.length,D=document.createElement("canvas");D.width=E,D.height=P;const H=(0,u.throwIfFalsy)(D.getContext("2d")),W=new ImageData(E,P);let N,I,z,q;if(L.startsWith("#"))N=parseInt(L.slice(1,3),16),I=parseInt(L.slice(3,5),16),z=parseInt(L.slice(5,7),16),q=L.length>7&&parseInt(L.slice(7,9),16)||1;else{if(!L.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${L}" when drawing pattern glyph`);[N,I,z,q]=L.substring(5,L.length-1).split(",").map(j=>parseFloat(j))}for(let j=0;j<P;j++)for(let K=0;K<E;K++)W.data[4*(j*E+K)]=N,W.data[4*(j*E+K)+1]=I,W.data[4*(j*E+K)+2]=z,W.data[4*(j*E+K)+3]=o[j][K]*(255*q);H.putImageData(W,0,0),T=(0,u.throwIfFalsy)(C.createPattern(D,null)),w.set(L,T)}C.fillStyle=T,C.fillRect(f,p,M,A)}(t,c,n,y,x,R),!0;const s=i.boxDrawingDefinitions[e];if(s)return function(C,o,f,p,M,A,w){C.strokeStyle=C.fillStyle;for(const[L,T]of Object.entries(o)){let E;C.beginPath(),C.lineWidth=w*Number.parseInt(L),E=typeof T=="function"?T(.15,.15/A*M):T;for(const P of E.split(" ")){const D=P[0],H=g[D];if(!H){console.error(`Could not find drawing instructions for "${D}"`);continue}const W=P.substring(1).split(",");W[0]&&W[1]&&H(C,a(W,M,A,f,p,!0,w))}C.stroke(),C.closePath()}}(t,s,n,y,x,R,l),!0;const v=i.powerlineDefinitions[e];return!!v&&(function(C,o,f,p,M,A,w,L){var T,E;const P=new Path2D;P.rect(f,p,M,A),C.clip(P),C.beginPath();const D=w/12;C.lineWidth=L*D;for(const H of o.d.split(" ")){const W=H[0],N=g[W];if(!N){console.error(`Could not find drawing instructions for "${W}"`);continue}const I=H.substring(1).split(",");I[0]&&I[1]&&N(C,a(I,M,A,f,p,!1,L,((T=o.leftPadding)!==null&&T!==void 0?T:0)*(D/2),((E=o.rightPadding)!==null&&E!==void 0?E:0)*(D/2)))}o.type===1?(C.strokeStyle=C.fillStyle,C.stroke()):C.fill(),C.closePath()}(t,v,n,y,x,R,b,l),!0)};const r=new Map;function _(t,e,n=0){return Math.max(Math.min(t,e),n)}const g={C:(t,e)=>t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]),L:(t,e)=>t.lineTo(e[0],e[1]),M:(t,e)=>t.moveTo(e[0],e[1])};function a(t,e,n,y,x,R,b,l=0,m=0){const c=t.map(s=>parseFloat(s)||parseInt(s));if(c.length<2)throw new Error("Too few arguments for instruction");for(let s=0;s<c.length;s+=2)c[s]*=e-l*b-m*b,R&&c[s]!==0&&(c[s]=_(Math.round(c[s]+.5)-.5,e,0)),c[s]+=y+l*b;for(let s=1;s<c.length;s+=2)c[s]*=n,R&&c[s]!==0&&(c[s]=_(Math.round(c[s]+.5)-.5,n,0)),c[s]+=x;return c}},56:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.observeDevicePixelDimensions=void 0;const u=d(859);i.observeDevicePixelDimensions=function(h,r,_){let g=new r.ResizeObserver(a=>{const t=a.find(y=>y.target===h);if(!t)return;if(!("devicePixelContentBoxSize"in t))return g?.disconnect(),void(g=void 0);const e=t.devicePixelContentBoxSize[0].inlineSize,n=t.devicePixelContentBoxSize[0].blockSize;e>0&&n>0&&_(e,n)});try{g.observe(h,{box:["device-pixel-content-box"]})}catch{g.disconnect(),g=void 0}return(0,u.toDisposable)(()=>g?.disconnect())}},374:(B,i)=>{function d(u){return 57508<=u&&u<=57558}Object.defineProperty(i,"__esModule",{value:!0}),i.createRenderDimensions=i.excludeFromContrastRatioDemands=i.isRestrictedPowerlineGlyph=i.isPowerlineGlyph=i.throwIfFalsy=void 0,i.throwIfFalsy=function(u){if(!u)throw new Error("value must not be falsy");return u},i.isPowerlineGlyph=d,i.isRestrictedPowerlineGlyph=function(u){return 57520<=u&&u<=57527},i.excludeFromContrastRatioDemands=function(u){return d(u)||function(h){return 9472<=h&&h<=9631}(u)},i.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:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createSelectionRenderModel=void 0;class d{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(h,r,_,g=!1){if(this.selectionStart=r,this.selectionEnd=_,!r||!_||r[0]===_[0]&&r[1]===_[1])return void this.clear();const a=r[1]-h.buffer.active.viewportY,t=_[1]-h.buffer.active.viewportY,e=Math.max(a,0),n=Math.min(t,h.rows-1);e>=h.rows||n<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=g,this.viewportStartRow=a,this.viewportEndRow=t,this.viewportCappedStartRow=e,this.viewportCappedEndRow=n,this.startCol=r[0],this.endCol=_[0])}isCellSelected(h,r,_){return!!this.hasSelection&&(_-=h.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?r>=this.startCol&&_>=this.viewportCappedStartRow&&r<this.endCol&&_<=this.viewportCappedEndRow:r<this.startCol&&_>=this.viewportCappedStartRow&&r>=this.endCol&&_<=this.viewportCappedEndRow:_>this.viewportStartRow&&_<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&_===this.viewportStartRow&&r>=this.startCol&&r<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportEndRow&&r<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportStartRow&&r>=this.startCol)}}i.createSelectionRenderModel=function(){return new d}},509:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.TextureAtlas=void 0;const u=d(237),h=d(855),r=d(147),_=d(160),g=d(860),a=d(374),t=d(485),e=d(385),n=d(345),y={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 x;class R{constructor(s,v,C){this._document=s,this._config=v,this._unicodeService=C,this._didWarmUp=!1,this._cacheMap=new t.FourKeyMap,this._cacheMapCombined=new t.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new r.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new n.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new n.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=m(s,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,a.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}get pages(){return this._pages}dispose(){for(const s of this.pages)s.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const s=new e.IdleTaskQueue;for(let v=33;v<126;v++)s.enqueue(()=>{if(!this._cacheMap.get(v,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const C=this._drawToCache(v,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT);this._cacheMap.set(v,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT,C)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const s of this._pages)s.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){R.maxAtlasPages&&this._pages.length>=Math.max(4,R.maxAtlasPages/2)&&queueMicrotask(()=>{const v=this._pages.filter(w=>2*w.canvas.width<=(R.maxTextureSize||4096)).sort((w,L)=>L.canvas.width!==w.canvas.width?L.canvas.width-w.canvas.width:L.percentageUsed-w.percentageUsed);let C=-1,o=0;for(let w=0;w<v.length;w++)if(v[w].canvas.width!==o)C=w,o=v[w].canvas.width;else if(w-C==3)break;const f=v.slice(C,C+4),p=f.map(w=>w.glyphs[0].texturePage).sort((w,L)=>w>L?1:-1),M=p[0],A=this._mergePages(f,M);A.version++,this._pages[M]=A;for(let w=p.length-1;w>=1;w--)this._deletePage(p[w]);this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(A.canvas)});const s=new b(this._document,this._textureSize);return this._pages.push(s),this._activePages.push(s),this._onAddTextureAtlasCanvas.fire(s.canvas),s}_mergePages(s,v){const C=2*s[0].canvas.width,o=new b(this._document,C,s);for(const[f,p]of s.entries()){const M=f*p.canvas.width%C,A=Math.floor(f/2)*p.canvas.height;o.ctx.drawImage(p.canvas,M,A);for(const L of p.glyphs)L.texturePage=v,L.sizeClipSpace.x=L.size.x/C,L.sizeClipSpace.y=L.size.y/C,L.texturePosition.x+=M,L.texturePosition.y+=A,L.texturePositionClipSpace.x=L.texturePosition.x/C,L.texturePositionClipSpace.y=L.texturePosition.y/C;this._onRemoveTextureAtlasCanvas.fire(p.canvas);const w=this._activePages.indexOf(p);w!==-1&&this._activePages.splice(w,1)}return o}_deletePage(s){this._pages.splice(s,1);for(let v=s;v<this._pages.length;v++){const C=this._pages[v];for(const o of C.glyphs)o.texturePage--;C.version++}}getRasterizedGlyphCombinedChar(s,v,C,o){return this._getFromCacheMap(this._cacheMapCombined,s,v,C,o)}getRasterizedGlyph(s,v,C,o){return this._getFromCacheMap(this._cacheMap,s,v,C,o)}_getFromCacheMap(s,v,C,o,f){return x=s.get(v,C,o,f),x||(x=this._drawToCache(v,C,o,f),s.set(v,C,o,f,x)),x}_getColorFromAnsiIndex(s){if(s>=this._config.colors.ansi.length)throw new Error("No color found for idx "+s);return this._config.colors.ansi[s]}_getBackgroundColor(s,v,C,o){if(this._config.allowTransparency)return _.NULL_COLOR;let f;switch(s){case 16777216:case 33554432:f=this._getColorFromAnsiIndex(v);break;case 50331648:const p=r.AttributeData.toColorRGB(v);f=_.rgba.toColor(p[0],p[1],p[2]);break;default:f=C?this._config.colors.foreground:this._config.colors.background}return f}_getForegroundColor(s,v,C,o,f,p,M,A,w,L){const T=this._getMinimumContrastColor(s,v,C,o,f,p,!1,w,L);if(T)return T;let E;switch(f){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&w&&p<8&&(p+=8),E=this._getColorFromAnsiIndex(p);break;case 50331648:const P=r.AttributeData.toColorRGB(p);E=_.rgba.toColor(P[0],P[1],P[2]);break;default:E=M?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(E=_.color.opaque(E)),A&&(E=_.color.multiplyOpacity(E,u.DIM_OPACITY)),E}_resolveBackgroundRgba(s,v,C){switch(s){case 16777216:case 33554432:return this._getColorFromAnsiIndex(v).rgba;case 50331648:return v<<8;default:return C?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(s,v,C,o){switch(s){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&o&&v<8&&(v+=8),this._getColorFromAnsiIndex(v).rgba;case 50331648:return v<<8;default:return C?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(s,v,C,o,f,p,M,A,w){if(this._config.minimumContrastRatio===1||w)return;const L=this._config.colors.contrastCache.getColor(s,o);if(L!==void 0)return L||void 0;const T=this._resolveBackgroundRgba(v,C,M),E=this._resolveForegroundRgba(f,p,M,A),P=_.rgba.ensureContrastRatio(T,E,this._config.minimumContrastRatio);if(!P)return void this._config.colors.contrastCache.setColor(s,o,null);const D=_.rgba.toColor(P>>24&255,P>>16&255,P>>8&255);return this._config.colors.contrastCache.setColor(s,o,D),D}_drawToCache(s,v,C,o){const f=typeof s=="number"?String.fromCharCode(s):s,p=Math.min(this._config.deviceCellWidth*Math.max(f.length,2)+4,this._textureSize);this._tmpCanvas.width<p&&(this._tmpCanvas.width=p);const M=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<M&&(this._tmpCanvas.height=M),this._tmpCtx.save(),this._workAttributeData.fg=C,this._workAttributeData.bg=v,this._workAttributeData.extended.ext=o,this._workAttributeData.isInvisible())return y;const A=!!this._workAttributeData.isBold(),w=!!this._workAttributeData.isInverse(),L=!!this._workAttributeData.isDim(),T=!!this._workAttributeData.isItalic(),E=!!this._workAttributeData.isUnderline(),P=!!this._workAttributeData.isStrikethrough(),D=!!this._workAttributeData.isOverline();let H=this._workAttributeData.getFgColor(),W=this._workAttributeData.getFgColorMode(),N=this._workAttributeData.getBgColor(),I=this._workAttributeData.getBgColorMode();if(w){const S=H;H=N,N=S;const k=W;W=I,I=k}const z=this._getBackgroundColor(I,N,w,L);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const q=A?this._config.fontWeightBold:this._config.fontWeight,j=T?"italic":"";this._tmpCtx.font=`${j} ${q} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=u.TEXT_BASELINE;const K=f.length===1&&(0,a.isPowerlineGlyph)(f.charCodeAt(0)),_e=f.length===1&&(0,a.isRestrictedPowerlineGlyph)(f.charCodeAt(0)),re=this._getForegroundColor(v,I,N,C,W,H,w,L,A,(0,a.excludeFromContrastRatioDemands)(f.charCodeAt(0)));this._tmpCtx.fillStyle=re.css;const O=_e?0:4;let oe=!1;this._config.customGlyphs!==!1&&(oe=(0,g.tryDrawCustomChar)(this._tmpCtx,f,O,O,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Z,ee=!K;if(Z=typeof s=="number"?this._unicodeService.wcwidth(s):this._unicodeService.getStringCellWidth(s),E){this._tmpCtx.save();const S=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),k=S%2==1?.5:0;if(this._tmpCtx.lineWidth=S,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())ee=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{ee=!1;let V=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&V<8&&(V+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(V).css}this._tmpCtx.beginPath();const Y=O,X=Math.ceil(O+this._config.deviceCharHeight)-k,te=O+this._config.deviceCharHeight+S-k,ie=Math.ceil(O+this._config.deviceCharHeight+2*S)-k;for(let V=0;V<Z;V++){this._tmpCtx.save();const G=Y+V*this._config.deviceCellWidth,J=Y+(V+1)*this._config.deviceCellWidth,le=G+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(G,X),this._tmpCtx.lineTo(J,X),this._tmpCtx.moveTo(G,ie),this._tmpCtx.lineTo(J,ie);break;case 3:const ae=S<=1?ie:Math.ceil(O+this._config.deviceCharHeight-S/2)-k,he=S<=1?X:Math.ceil(O+this._config.deviceCharHeight+S/2)-k,ge=new Path2D;ge.rect(G,X,this._config.deviceCellWidth,ie-X),this._tmpCtx.clip(ge),this._tmpCtx.moveTo(G-this._config.deviceCellWidth/2,te),this._tmpCtx.bezierCurveTo(G-this._config.deviceCellWidth/2,he,G,he,G,te),this._tmpCtx.bezierCurveTo(G,ae,le,ae,le,te),this._tmpCtx.bezierCurveTo(le,he,J,he,J,te),this._tmpCtx.bezierCurveTo(J,ae,J+this._config.deviceCellWidth/2,ae,J+this._config.deviceCellWidth/2,te);break;case 4:this._tmpCtx.setLineDash([Math.round(S),Math.round(S)]),this._tmpCtx.moveTo(G,X),this._tmpCtx.lineTo(J,X);break;case 5:this._tmpCtx.setLineDash([4*this._config.devicePixelRatio,3*this._config.devicePixelRatio]),this._tmpCtx.moveTo(G,X),this._tmpCtx.lineTo(J,X);break;default:this._tmpCtx.moveTo(G,X),this._tmpCtx.lineTo(J,X)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!oe&&this._config.fontSize>=12&&!this._config.allowTransparency&&f!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const V=this._tmpCtx.measureText(f);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in V&&V.actualBoundingBoxDescent>0){this._tmpCtx.save();const G=new Path2D;G.rect(Y,X-Math.ceil(S/2),this._config.deviceCellWidth*Z,ie-X+Math.ceil(S/2)),this._tmpCtx.clip(G),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=z.css,this._tmpCtx.strokeText(f,O,O+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(D){const S=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),k=S%2==1?.5:0;this._tmpCtx.lineWidth=S,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(O,O+k),this._tmpCtx.lineTo(O+this._config.deviceCharWidth*Z,O+k),this._tmpCtx.stroke()}if(oe||this._tmpCtx.fillText(f,O,O+this._config.deviceCharHeight),f==="_"&&!this._config.allowTransparency){let S=l(this._tmpCtx.getImageData(O,O,this._config.deviceCellWidth,this._config.deviceCellHeight),z,re,ee);if(S)for(let k=1;k<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(f,O,O+this._config.deviceCharHeight-k),S=l(this._tmpCtx.getImageData(O,O,this._config.deviceCellWidth,this._config.deviceCellHeight),z,re,ee),S);k++);}if(P){const S=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),k=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=S,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(O,O+Math.floor(this._config.deviceCharHeight/2)-k),this._tmpCtx.lineTo(O+this._config.deviceCharWidth*Z,O+Math.floor(this._config.deviceCharHeight/2)-k),this._tmpCtx.stroke()}this._tmpCtx.restore();const ne=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let ue;if(ue=this._config.allowTransparency?function(S){for(let k=0;k<S.data.length;k+=4)if(S.data[k+3]>0)return!1;return!0}(ne):l(ne,z,re,ee),ue)return y;const U=this._findGlyphBoundingBox(ne,this._workBoundingBox,p,_e,oe,O);let F,$;for(;;){if(this._activePages.length===0){const S=this._createNewPage();F=S,$=S.currentRow,$.height=U.size.y;break}F=this._activePages[this._activePages.length-1],$=F.currentRow;for(const S of this._activePages)U.size.y<=S.currentRow.height&&(F=S,$=S.currentRow);for(let S=this._activePages.length-1;S>=0;S--)for(const k of this._activePages[S].fixedRows)k.height<=$.height&&U.size.y<=k.height&&(F=this._activePages[S],$=k);if($.y+U.size.y>=F.canvas.height||$.height>U.size.y+2){let S=!1;if(F.currentRow.y+F.currentRow.height+U.size.y>=F.canvas.height){let k;for(const Y of this._activePages)if(Y.currentRow.y+Y.currentRow.height+U.size.y<Y.canvas.height){k=Y;break}if(k)F=k;else{const Y=this._createNewPage();F=Y,$=Y.currentRow,$.height=U.size.y,S=!0}}S||(F.currentRow.height>0&&F.fixedRows.push(F.currentRow),$={x:0,y:F.currentRow.y+F.currentRow.height,height:U.size.y},F.fixedRows.push($),F.currentRow={x:0,y:$.y+$.height,height:0})}if($.x+U.size.x<=F.canvas.width)break;$===F.currentRow?($.x=0,$.y+=$.height,$.height=0):F.fixedRows.splice(F.fixedRows.indexOf($),1)}return U.texturePage=this._pages.indexOf(F),U.texturePosition.x=$.x,U.texturePosition.y=$.y,U.texturePositionClipSpace.x=$.x/F.canvas.width,U.texturePositionClipSpace.y=$.y/F.canvas.height,U.sizeClipSpace.x/=F.canvas.width,U.sizeClipSpace.y/=F.canvas.height,$.height=Math.max($.height,U.size.y),$.x+=U.size.x,F.ctx.putImageData(ne,U.texturePosition.x-this._workBoundingBox.left,U.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,U.size.x,U.size.y),F.addGlyph(U),F.version++,U}_findGlyphBoundingBox(s,v,C,o,f,p){v.top=0;const M=o?this._config.deviceCellHeight:this._tmpCanvas.height,A=o?this._config.deviceCellWidth:C;let w=!1;for(let L=0;L<M;L++){for(let T=0;T<A;T++){const E=L*this._tmpCanvas.width*4+4*T+3;if(s.data[E]!==0){v.top=L,w=!0;break}}if(w)break}v.left=0,w=!1;for(let L=0;L<p+A;L++){for(let T=0;T<M;T++){const E=T*this._tmpCanvas.width*4+4*L+3;if(s.data[E]!==0){v.left=L,w=!0;break}}if(w)break}v.right=A,w=!1;for(let L=p+A-1;L>=p;L--){for(let T=0;T<M;T++){const E=T*this._tmpCanvas.width*4+4*L+3;if(s.data[E]!==0){v.right=L,w=!0;break}}if(w)break}v.bottom=M,w=!1;for(let L=M-1;L>=0;L--){for(let T=0;T<A;T++){const E=L*this._tmpCanvas.width*4+4*T+3;if(s.data[E]!==0){v.bottom=L,w=!0;break}}if(w)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+p+(o||f?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-v.top+p+(o||f?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}i.TextureAtlas=R;class b{constructor(s,v,C){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],C)for(const o of C)this._glyphs.push(...o.glyphs),this._usedPixels+=o._usedPixels;this.canvas=m(s,v,v),this.ctx=(0,a.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(s){this._glyphs.push(s),this._usedPixels+=s.size.x*s.size.y}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 l(c,s,v,C){const o=s.rgba>>>24,f=s.rgba>>>16&255,p=s.rgba>>>8&255,M=v.rgba>>>24,A=v.rgba>>>16&255,w=v.rgba>>>8&255,L=Math.floor((Math.abs(o-M)+Math.abs(f-A)+Math.abs(p-w))/12);let T=!0;for(let E=0;E<c.data.length;E+=4)c.data[E]===o&&c.data[E+1]===f&&c.data[E+2]===p||C&&Math.abs(c.data[E]-o)+Math.abs(c.data[E+1]-f)+Math.abs(c.data[E+2]-p)<L?c.data[E+3]=0:T=!1;return T}function m(c,s,v){const C=c.createElement("canvas");return C.width=s,C.height=v,C}},160:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.contrastRatio=i.toPaddedHex=i.rgba=i.rgb=i.css=i.color=i.channels=i.NULL_COLOR=void 0;const u=d(399);let h=0,r=0,_=0,g=0;var a,t,e;function n(x){const R=x.toString(16);return R.length<2?"0"+R:R}function y(x,R){return x<R?(R+.05)/(x+.05):(x+.05)/(R+.05)}i.NULL_COLOR={css:"#00000000",rgba:0},function(x){x.toCss=function(R,b,l,m){return m!==void 0?`#${n(R)}${n(b)}${n(l)}${n(m)}`:`#${n(R)}${n(b)}${n(l)}`},x.toRgba=function(R,b,l,m=255){return(R<<24|b<<16|l<<8|m)>>>0}}(a=i.channels||(i.channels={})),function(x){function R(b,l){return g=Math.round(255*l),[h,r,_]=e.toChannels(b.rgba),{css:a.toCss(h,r,_,g),rgba:a.toRgba(h,r,_,g)}}x.blend=function(b,l){if(g=(255&l.rgba)/255,g===1)return{css:l.css,rgba:l.rgba};const m=l.rgba>>24&255,c=l.rgba>>16&255,s=l.rgba>>8&255,v=b.rgba>>24&255,C=b.rgba>>16&255,o=b.rgba>>8&255;return h=v+Math.round((m-v)*g),r=C+Math.round((c-C)*g),_=o+Math.round((s-o)*g),{css:a.toCss(h,r,_),rgba:a.toRgba(h,r,_)}},x.isOpaque=function(b){return(255&b.rgba)==255},x.ensureContrastRatio=function(b,l,m){const c=e.ensureContrastRatio(b.rgba,l.rgba,m);if(c)return e.toColor(c>>24&255,c>>16&255,c>>8&255)},x.opaque=function(b){const l=(255|b.rgba)>>>0;return[h,r,_]=e.toChannels(l),{css:a.toCss(h,r,_),rgba:l}},x.opacity=R,x.multiplyOpacity=function(b,l){return g=255&b.rgba,R(b,g*l/255)},x.toColorRGB=function(b){return[b.rgba>>24&255,b.rgba>>16&255,b.rgba>>8&255]}}(i.color||(i.color={})),function(x){let R,b;if(!u.isNode){const l=document.createElement("canvas");l.width=1,l.height=1;const m=l.getContext("2d",{willReadFrequently:!0});m&&(R=m,R.globalCompositeOperation="copy",b=R.createLinearGradient(0,0,1,1))}x.toColor=function(l){if(l.match(/#[\da-f]{3,8}/i))switch(l.length){case 4:return h=parseInt(l.slice(1,2).repeat(2),16),r=parseInt(l.slice(2,3).repeat(2),16),_=parseInt(l.slice(3,4).repeat(2),16),e.toColor(h,r,_);case 5:return h=parseInt(l.slice(1,2).repeat(2),16),r=parseInt(l.slice(2,3).repeat(2),16),_=parseInt(l.slice(3,4).repeat(2),16),g=parseInt(l.slice(4,5).repeat(2),16),e.toColor(h,r,_,g);case 7:return{css:l,rgba:(parseInt(l.slice(1),16)<<8|255)>>>0};case 9:return{css:l,rgba:parseInt(l.slice(1),16)>>>0}}const m=l.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(m)return h=parseInt(m[1]),r=parseInt(m[2]),_=parseInt(m[3]),g=Math.round(255*(m[5]===void 0?1:parseFloat(m[5]))),e.toColor(h,r,_,g);if(!R||!b)throw new Error("css.toColor: Unsupported css format");if(R.fillStyle=b,R.fillStyle=l,typeof R.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(R.fillRect(0,0,1,1),[h,r,_,g]=R.getImageData(0,0,1,1).data,g!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:a.toRgba(h,r,_,g),css:l}}}(i.css||(i.css={})),function(x){function R(b,l,m){const c=b/255,s=l/255,v=m/255;return .2126*(c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4))+.7152*(s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4))+.0722*(v<=.03928?v/12.92:Math.pow((v+.055)/1.055,2.4))}x.relativeLuminance=function(b){return R(b>>16&255,b>>8&255,255&b)},x.relativeLuminance2=R}(t=i.rgb||(i.rgb={})),function(x){function R(l,m,c){const s=l>>24&255,v=l>>16&255,C=l>>8&255;let o=m>>24&255,f=m>>16&255,p=m>>8&255,M=y(t.relativeLuminance2(o,f,p),t.relativeLuminance2(s,v,C));for(;M<c&&(o>0||f>0||p>0);)o-=Math.max(0,Math.ceil(.1*o)),f-=Math.max(0,Math.ceil(.1*f)),p-=Math.max(0,Math.ceil(.1*p)),M=y(t.relativeLuminance2(o,f,p),t.relativeLuminance2(s,v,C));return(o<<24|f<<16|p<<8|255)>>>0}function b(l,m,c){const s=l>>24&255,v=l>>16&255,C=l>>8&255;let o=m>>24&255,f=m>>16&255,p=m>>8&255,M=y(t.relativeLuminance2(o,f,p),t.relativeLuminance2(s,v,C));for(;M<c&&(o<255||f<255||p<255);)o=Math.min(255,o+Math.ceil(.1*(255-o))),f=Math.min(255,f+Math.ceil(.1*(255-f))),p=Math.min(255,p+Math.ceil(.1*(255-p))),M=y(t.relativeLuminance2(o,f,p),t.relativeLuminance2(s,v,C));return(o<<24|f<<16|p<<8|255)>>>0}x.ensureContrastRatio=function(l,m,c){const s=t.relativeLuminance(l>>8),v=t.relativeLuminance(m>>8);if(y(s,v)<c){if(v<s){const f=R(l,m,c),p=y(s,t.relativeLuminance(f>>8));if(p<c){const M=b(l,m,c);return p>y(s,t.relativeLuminance(M>>8))?f:M}return f}const C=b(l,m,c),o=y(s,t.relativeLuminance(C>>8));if(o<c){const f=R(l,m,c);return o>y(s,t.relativeLuminance(f>>8))?C:f}return C}},x.reduceLuminance=R,x.increaseLuminance=b,x.toChannels=function(l){return[l>>24&255,l>>16&255,l>>8&255,255&l]},x.toColor=function(l,m,c,s){return{css:a.toCss(l,m,c,s),rgba:a.toRgba(l,m,c,s)}}}(e=i.rgba||(i.rgba={})),i.toPaddedHex=n,i.contrastRatio=y},345:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.forwardEvent=i.EventEmitter=void 0,i.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let u=0;u<this._listeners.length;u++)if(this._listeners[u]===d)return void this._listeners.splice(u,1)}}})),this._event}fire(d,u){const h=[];for(let r=0;r<this._listeners.length;r++)h.push(this._listeners[r]);for(let r=0;r<h.length;r++)h[r].call(void 0,d,u)}dispose(){this._listeners&&(this._listeners.length=0),this._disposed=!0}},i.forwardEvent=function(d,u){return d(h=>u.fire(h))}},859:(B,i)=>{function d(u){for(const h of u)h.dispose();u.length=0}Object.defineProperty(i,"__esModule",{value:!0}),i.getDisposeArrayDisposable=i.disposeArray=i.toDisposable=i.Disposable=void 0,i.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const h=this._disposables.indexOf(u);h!==-1&&this._disposables.splice(h,1)}},i.toDisposable=function(u){return{dispose:u}},i.disposeArray=d,i.getDisposeArrayDisposable=function(u){return{dispose:()=>d(u)}}},485:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.FourKeyMap=i.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(h,r,_){this._data[h]||(this._data[h]={}),this._data[h][r]=_}get(h,r){return this._data[h]?this._data[h][r]:void 0}clear(){this._data={}}}i.TwoKeyMap=d,i.FourKeyMap=class{constructor(){this._data=new d}set(u,h,r,_,g){this._data.get(u,h)||this._data.set(u,h,new d),this._data.get(u,h).set(r,_,g)}get(u,h,r,_){var g;return(g=this._data.get(u,h))===null||g===void 0?void 0:g.get(r,_)}clear(){this._data.clear()}}},399:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.isChromeOS=i.isLinux=i.isWindows=i.isIphone=i.isIpad=i.isMac=i.getSafariVersion=i.isSafari=i.isLegacyEdge=i.isFirefox=i.isNode=void 0,i.isNode=typeof navigator>"u";const d=i.isNode?"node":navigator.userAgent,u=i.isNode?"node":navigator.platform;i.isFirefox=d.includes("Firefox"),i.isLegacyEdge=d.includes("Edge"),i.isSafari=/^((?!chrome|android).)*safari/i.test(d),i.getSafariVersion=function(){if(!i.isSafari)return 0;const h=d.match(/Version\/(\d+)/);return h===null||h.length<2?0:parseInt(h[1])},i.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),i.isIpad=u==="iPad",i.isIphone=u==="iPhone",i.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),i.isLinux=u.indexOf("Linux")>=0,i.isChromeOS=/\bCrOS\b/.test(d)},385:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DebouncedIdleTask=i.IdleTaskQueue=i.PriorityTaskQueue=void 0;const u=d(399);class h{constructor(){this._tasks=[],this._i=0}enqueue(g){this._tasks.push(g),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(g){this._idleCallback=void 0;let a=0,t=0,e=g.timeRemaining(),n=0;for(;this._i<this._tasks.length;){if(a=Date.now(),this._tasks[this._i]()||this._i++,a=Math.max(1,Date.now()-a),t=Math.max(a,t),n=g.timeRemaining(),1.5*t>n)return e-a<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(e-a))}ms`),void this._start();e=n}this.clear()}}class r extends h{_requestCallback(g){return setTimeout(()=>g(this._createDeadline(16)))}_cancelCallback(g){clearTimeout(g)}_createDeadline(g){const a=Date.now()+g;return{timeRemaining:()=>Math.max(0,a-Date.now())}}}i.PriorityTaskQueue=r,i.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends h{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:r,i.DebouncedIdleTask=class{constructor(){this._queue=new i.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},147:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ExtendedAttrs=i.AttributeData=void 0;class d{constructor(){this.fg=0,this.bg=0,this.extended=new u}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 d;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}}i.AttributeData=d;class u{constructor(r=0,_=0){this._ext=0,this._urlId=0,this._ext=r,this._urlId=_}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}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}i.ExtendedAttrs=u},782:(B,i,d)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CellData=void 0;const u=d(133),h=d(855),r=d(147);class _ extends r.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new r.ExtendedAttrs,this.combinedData=""}static fromCharData(a){const t=new _;return t.setFromCharData(a),t}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(a){this.fg=a[h.CHAR_DATA_ATTR_INDEX],this.bg=0;let t=!1;if(a[h.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(a[h.CHAR_DATA_CHAR_INDEX].length===2){const e=a[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=e&&e<=56319){const n=a[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=n&&n<=57343?this.content=1024*(e-55296)+n-56320+65536|a[h.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=a[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|a[h.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=a[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|a[h.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.CellData=_},855:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WHITESPACE_CELL_CODE=i.WHITESPACE_CELL_WIDTH=i.WHITESPACE_CELL_CHAR=i.NULL_CELL_CODE=i.NULL_CELL_WIDTH=i.NULL_CELL_CHAR=i.CHAR_DATA_CODE_INDEX=i.CHAR_DATA_WIDTH_INDEX=i.CHAR_DATA_CHAR_INDEX=i.CHAR_DATA_ATTR_INDEX=i.DEFAULT_EXT=i.DEFAULT_ATTR=i.DEFAULT_COLOR=void 0,i.DEFAULT_COLOR=0,i.DEFAULT_ATTR=256|i.DEFAULT_COLOR<<9,i.DEFAULT_EXT=0,i.CHAR_DATA_ATTR_INDEX=0,i.CHAR_DATA_CHAR_INDEX=1,i.CHAR_DATA_WIDTH_INDEX=2,i.CHAR_DATA_CODE_INDEX=3,i.NULL_CELL_CHAR="",i.NULL_CELL_WIDTH=1,i.NULL_CELL_CODE=0,i.WHITESPACE_CELL_CHAR=" ",i.WHITESPACE_CELL_WIDTH=1,i.WHITESPACE_CELL_CODE=32},133:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Utf8ToUtf32=i.StringToUtf32=i.utf32ToString=i.stringFromCodePoint=void 0,i.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},i.utf32ToString=function(d,u=0,h=d.length){let r="";for(let _=u;_<h;++_){let g=d[_];g>65535?(g-=65536,r+=String.fromCharCode(55296+(g>>10))+String.fromCharCode(g%1024+56320)):r+=String.fromCharCode(g)}return r},i.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(d,u){const h=d.length;if(!h)return 0;let r=0,_=0;if(this._interim){const g=d.charCodeAt(_++);56320<=g&&g<=57343?u[r++]=1024*(this._interim-55296)+g-56320+65536:(u[r++]=this._interim,u[r++]=g),this._interim=0}for(let g=_;g<h;++g){const a=d.charCodeAt(g);if(55296<=a&&a<=56319){if(++g>=h)return this._interim=a,r;const t=d.charCodeAt(g);56320<=t&&t<=57343?u[r++]=1024*(a-55296)+t-56320+65536:(u[r++]=a,u[r++]=t)}else a!==65279&&(u[r++]=a)}return r}},i.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(d,u){const h=d.length;if(!h)return 0;let r,_,g,a,t=0,e=0,n=0;if(this.interim[0]){let R=!1,b=this.interim[0];b&=(224&b)==192?31:(240&b)==224?15:7;let l,m=0;for(;(l=63&this.interim[++m])&&m<4;)b<<=6,b|=l;const c=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,s=c-m;for(;n<s;){if(n>=h)return 0;if(l=d[n++],(192&l)!=128){n--,R=!0;break}this.interim[m++]=l,b<<=6,b|=63&l}R||(c===2?b<128?n--:u[t++]=b:c===3?b<2048||b>=55296&&b<=57343||b===65279||(u[t++]=b):b<65536||b>1114111||(u[t++]=b)),this.interim.fill(0)}const y=h-4;let x=n;for(;x<h;){for(;!(!(x<y)||128&(r=d[x])||128&(_=d[x+1])||128&(g=d[x+2])||128&(a=d[x+3]));)u[t++]=r,u[t++]=_,u[t++]=g,u[t++]=a,x+=4;if(r=d[x++],r<128)u[t++]=r;else if((224&r)==192){if(x>=h)return this.interim[0]=r,t;if(_=d[x++],(192&_)!=128){x--;continue}if(e=(31&r)<<6|63&_,e<128){x--;continue}u[t++]=e}else if((240&r)==224){if(x>=h)return this.interim[0]=r,t;if(_=d[x++],(192&_)!=128){x--;continue}if(x>=h)return this.interim[0]=r,this.interim[1]=_,t;if(g=d[x++],(192&g)!=128){x--;continue}if(e=(15&r)<<12|(63&_)<<6|63&g,e<2048||e>=55296&&e<=57343||e===65279)continue;u[t++]=e}else if((248&r)==240){if(x>=h)return this.interim[0]=r,t;if(_=d[x++],(192&_)!=128){x--;continue}if(x>=h)return this.interim[0]=r,this.interim[1]=_,t;if(g=d[x++],(192&g)!=128){x--;continue}if(x>=h)return this.interim[0]=r,this.interim[1]=_,this.interim[2]=g,t;if(a=d[x++],(192&a)!=128){x--;continue}if(e=(7&r)<<18|(63&_)<<12|(63&g)<<6|63&a,e<65536||e>1114111)continue;u[t++]=e}}return t}}}},se={};function Q(B){var i=se[B];if(i!==void 0)return i.exports;var d=se[B]={exports:{}};return ce[B](d,d.exports,Q),d.exports}var de={};return(()=>{var B=de;Object.defineProperty(B,"__esModule",{value:!0}),B.WebglAddon=void 0;const i=Q(345),d=Q(859),u=Q(399),h=Q(666);class r extends d.Disposable{constructor(g){if(u.isSafari&&(0,u.getSafariVersion)()<16)throw new Error("Webgl2 is only supported on Safari 16 and above");super(),this._preserveDrawingBuffer=g,this._onChangeTextureAtlas=this.register(new i.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new i.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new i.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new i.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(g){const a=g._core;if(!g.element)return void this.register(a.onWillOpen(()=>this.activate(g)));this._terminal=g;const t=a.coreService,e=a.optionsService,n=a,y=n._renderService,x=n._characterJoinerService,R=n._charSizeService,b=n._coreBrowserService,l=n._decorationService,m=n._themeService;this._renderer=this.register(new h.WebglRenderer(g,x,R,b,t,l,e,m,this._preserveDrawingBuffer)),this.register((0,i.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,i.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,i.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,i.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),y.setRenderer(this._renderer),this.register((0,d.toDisposable)(()=>{const c=this._terminal._core._renderService;c.setRenderer(this._terminal._core._createRenderer()),c.handleResize(g.cols,g.rows)}))}get textureAtlas(){var g;return(g=this._renderer)===null||g===void 0?void 0:g.textureAtlas}clearTextureAtlas(){var g;(g=this._renderer)===null||g===void 0||g.clearTextureAtlas()}}B.WebglAddon=r})(),de})())}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_opensumi_cli_engine=self.webpackChunk_opensumi_cli_engine||[]).push([[412],{50412:(n,e,_)=>{_.r(e)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.hljs-comment,.hljs-quote{color:#696969}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#d91e18}.hljs-attribute,.hljs-built_in,.hljs-builtin-name,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#aa5d00}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:green}.hljs-section,.hljs-title{color:#007faa}.hljs-keyword,.hljs-selector-tag{color:#7928a1}.hljs{background:#fefefe;color:#545454;display:block;overflow-x:auto;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-builtin-name,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}
|