{function s(c){return c.replace(/\r?\n/g,"\r")}function a(c,_){return _?"\x1B[200~"+c+"\x1B[201~":c}function l(c,_,v){c=a(c=s(c),v.decPrivateModes.bracketedPasteMode),v.triggerDataEvent(c,!0),_.value=""}function u(c,_,v){var p=v.getBoundingClientRect(),g=c.clientX-p.left-10,b=c.clientY-p.top-10;_.style.width="20px",_.style.height="20px",_.style.left=g+"px",_.style.top=b+"px",_.style.zIndex="1000",_.focus()}Object.defineProperty(i,"__esModule",{value:!0}),i.rightClickHandler=i.moveTextAreaUnderMouseCursor=i.paste=i.handlePasteEvent=i.copyHandler=i.bracketTextForPaste=i.prepareTextForTerminal=void 0,i.prepareTextForTerminal=s,i.bracketTextForPaste=a,i.copyHandler=function(c,_){c.clipboardData&&c.clipboardData.setData("text/plain",_.selectionText),c.preventDefault()},i.handlePasteEvent=function(c,_,v){c.stopPropagation(),c.clipboardData&&l(c.clipboardData.getData("text/plain"),_,v)},i.paste=l,i.moveTextAreaUnderMouseCursor=u,i.rightClickHandler=function(c,_,v,p,g){u(c,_,v),g&&p.rightClickSelect(c),_.value=p.selectionText,_.select()}},4774:(o,i)=>{var s,a,l,u;function c(v){var p=v.toString(16);return p.length<2?"0"+p:p}function _(v,p){return v>>0}}(s=i.channels||(i.channels={})),(a=i.color||(i.color={})).blend=function(v,p){var g=(255&p.rgba)/255;if(g===1)return{css:p.css,rgba:p.rgba};var b=p.rgba>>24&255,m=p.rgba>>16&255,d=p.rgba>>8&255,f=v.rgba>>24&255,h=v.rgba>>16&255,y=v.rgba>>8&255,C=f+Math.round((b-f)*g),w=h+Math.round((m-h)*g),S=y+Math.round((d-y)*g);return{css:s.toCss(C,w,S),rgba:s.toRgba(C,w,S)}},a.isOpaque=function(v){return(255&v.rgba)==255},a.ensureContrastRatio=function(v,p,g){var b=u.ensureContrastRatio(v.rgba,p.rgba,g);if(b)return u.toColor(b>>24&255,b>>16&255,b>>8&255)},a.opaque=function(v){var p=(255|v.rgba)>>>0,g=u.toChannels(p),b=g[0],m=g[1],d=g[2];return{css:s.toCss(b,m,d),rgba:p}},a.opacity=function(v,p){var g=Math.round(255*p),b=u.toChannels(v.rgba),m=b[0],d=b[1],f=b[2];return{css:s.toCss(m,d,f,g),rgba:s.toRgba(m,d,f,g)}},a.toColorRGB=function(v){return[v.rgba>>24&255,v.rgba>>16&255,v.rgba>>8&255]},(i.css||(i.css={})).toColor=function(v){switch(v.length){case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(v){function p(g,b,m){var d=g/255,f=b/255,h=m/255;return .2126*(d<=.03928?d/12.92:Math.pow((d+.055)/1.055,2.4))+.7152*(f<=.03928?f/12.92:Math.pow((f+.055)/1.055,2.4))+.0722*(h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4))}v.relativeLuminance=function(g){return p(g>>16&255,g>>8&255,255&g)},v.relativeLuminance2=p}(l=i.rgb||(i.rgb={})),function(v){function p(b,m,d){for(var f=b>>24&255,h=b>>16&255,y=b>>8&255,C=m>>24&255,w=m>>16&255,S=m>>8&255,E=_(l.relativeLuminance2(C,S,w),l.relativeLuminance2(f,h,y));E0||w>0||S>0);)C-=Math.max(0,Math.ceil(.1*C)),w-=Math.max(0,Math.ceil(.1*w)),S-=Math.max(0,Math.ceil(.1*S)),E=_(l.relativeLuminance2(C,S,w),l.relativeLuminance2(f,h,y));return(C<<24|w<<16|S<<8|255)>>>0}function g(b,m,d){for(var f=b>>24&255,h=b>>16&255,y=b>>8&255,C=m>>24&255,w=m>>16&255,S=m>>8&255,E=_(l.relativeLuminance2(C,S,w),l.relativeLuminance2(f,h,y));E>>0}v.ensureContrastRatio=function(b,m,d){var f=l.relativeLuminance(b>>8),h=l.relativeLuminance(m>>8);if(_(f,h)>24&255,b>>16&255,b>>8&255,255&b]},v.toColor=function(b,m,d){return{css:s.toCss(b,m,d),rgba:s.toRgba(b,m,d)}}}(u=i.rgba||(i.rgba={})),i.toPaddedHex=c,i.contrastRatio=_},7239:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorContrastCache=void 0;var s=function(){function a(){this._color={},this._rgba={}}return a.prototype.clear=function(){this._color={},this._rgba={}},a.prototype.setCss=function(l,u,c){this._rgba[l]||(this._rgba[l]={}),this._rgba[l][u]=c},a.prototype.getCss=function(l,u){return this._rgba[l]?this._rgba[l][u]:void 0},a.prototype.setColor=function(l,u,c){this._color[l]||(this._color[l]={}),this._color[l][u]=c},a.prototype.getColor=function(l,u){return this._color[l]?this._color[l][u]:void 0},a}();i.ColorContrastCache=s},5680:function(o,i,s){var a=this&&this.__spreadArray||function(m,d,f){if(f||arguments.length===2)for(var h,y=0,C=d.length;y{Object.defineProperty(i,"__esModule",{value:!0}),i.removeElementFromParent=void 0,i.removeElementFromParent=function(){for(var s,a=[],l=0;l{Object.defineProperty(i,"__esModule",{value:!0}),i.addDisposableDomListener=void 0,i.addDisposableDomListener=function(s,a,l,u){s.addEventListener(a,l,u);var c=!1;return{dispose:function(){c||(c=!0,s.removeEventListener(a,l,u))}}}},3551:function(o,i,s){var a=this&&this.__decorate||function(p,g,b,m){var d,f=arguments.length,h=f<3?g:m===null?m=Object.getOwnPropertyDescriptor(g,b):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(p,g,b,m);else for(var y=p.length-1;y>=0;y--)(d=p[y])&&(h=(f<3?d(h):f>3?d(g,b,h):d(g,b))||h);return f>3&&h&&Object.defineProperty(g,b,h),h},l=this&&this.__param||function(p,g){return function(b,m){g(b,m,p)}};Object.defineProperty(i,"__esModule",{value:!0}),i.MouseZone=i.Linkifier=void 0;var u=s(8460),c=s(2585),_=function(){function p(g,b,m){this._bufferService=g,this._logService=b,this._unicodeService=m,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new u.EventEmitter,this._onHideLinkUnderline=new u.EventEmitter,this._onLinkTooltip=new u.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(p.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),p.prototype.attachToDom=function(g,b){this._element=g,this._mouseZoneManager=b},p.prototype.linkifyRows=function(g,b){var m=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=g,this._rowsToLinkify.end=b):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,g),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,b)),this._mouseZoneManager.clearAll(g,b),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return m._linkifyRows()},p._timeBeforeLatency))},p.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var g=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var b=g.ydisp+this._rowsToLinkify.start;if(!(b>=g.lines.length)){for(var m=g.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,d=Math.ceil(2e3/this._bufferService.cols),f=this._bufferService.buffer.iterator(!1,b,m,d,d);f.hasNext();)for(var h=f.next(),y=0;y=0;b--)if(g.priority<=this._linkMatchers[b].priority)return void this._linkMatchers.splice(b+1,0,g);this._linkMatchers.splice(0,0,g)}else this._linkMatchers.push(g)},p.prototype.deregisterLinkMatcher=function(g){for(var b=0;b>9&511:void 0;m.validationCallback?m.validationCallback(S,function(L){f._rowsTimeoutId||L&&f._addLink(E[1],E[0]-f._bufferService.buffer.ydisp,S,m,A)}):w._addLink(E[1],E[0]-w._bufferService.buffer.ydisp,S,m,A)},w=this;(d=h.exec(b))!==null&&C()!=="break";);},p.prototype._addLink=function(g,b,m,d,f){var h=this;if(this._mouseZoneManager&&this._element){var y=this._unicodeService.getStringCellWidth(m),C=g%this._bufferService.cols,w=b+Math.floor(g/this._bufferService.cols),S=(C+y)%this._bufferService.cols,E=w+Math.floor((C+y)/this._bufferService.cols);S===0&&(S=this._bufferService.cols,E--),this._mouseZoneManager.add(new v(C+1,w+1,S+1,E+1,function(k){if(d.handler)return d.handler(k,m);var x=window.open();x?(x.opener=null,x.location.href=m):console.warn("Opening link blocked as opener could not be cleared")},function(){h._onShowLinkUnderline.fire(h._createLinkHoverEvent(C,w,S,E,f)),h._element.classList.add("xterm-cursor-pointer")},function(k){h._onLinkTooltip.fire(h._createLinkHoverEvent(C,w,S,E,f)),d.hoverTooltipCallback&&d.hoverTooltipCallback(k,m,{start:{x:C,y:w},end:{x:S,y:E}})},function(){h._onHideLinkUnderline.fire(h._createLinkHoverEvent(C,w,S,E,f)),h._element.classList.remove("xterm-cursor-pointer"),d.hoverLeaveCallback&&d.hoverLeaveCallback()},function(k){return!d.willLinkActivate||d.willLinkActivate(k,m)}))}},p.prototype._createLinkHoverEvent=function(g,b,m,d,f){return{x1:g,y1:b,x2:m,y2:d,cols:this._bufferService.cols,fg:f}},p._timeBeforeLatency=200,p=a([l(0,c.IBufferService),l(1,c.ILogService),l(2,c.IUnicodeService)],p)}();i.Linkifier=_;var v=function(p,g,b,m,d,f,h,y,C){this.x1=p,this.y1=g,this.x2=b,this.y2=m,this.clickCallback=d,this.hoverCallback=f,this.tooltipCallback=h,this.leaveCallback=y,this.willLinkActivate=C};i.MouseZone=v},6465:function(o,i,s){var a,l=this&&this.__extends||(a=function(m,d){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&(f[y]=h[y])},a(m,d)},function(m,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function f(){this.constructor=m}a(m,d),m.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}),u=this&&this.__decorate||function(m,d,f,h){var y,C=arguments.length,w=C<3?d:h===null?h=Object.getOwnPropertyDescriptor(d,f):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(m,d,f,h);else for(var S=m.length-1;S>=0;S--)(y=m[S])&&(w=(C<3?y(w):C>3?y(d,f,w):y(d,f))||w);return C>3&&w&&Object.defineProperty(d,f,w),w},c=this&&this.__param||function(m,d){return function(f,h){d(f,h,m)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Linkifier2=void 0;var _=s(2585),v=s(8460),p=s(844),g=s(3656),b=function(m){function d(f){var h=m.call(this)||this;return h._bufferService=f,h._linkProviders=[],h._linkCacheDisposables=[],h._isMouseOut=!0,h._activeLine=-1,h._onShowLinkUnderline=h.register(new v.EventEmitter),h._onHideLinkUnderline=h.register(new v.EventEmitter),h.register((0,p.getDisposeArrayDisposable)(h._linkCacheDisposables)),h}return l(d,m),Object.defineProperty(d.prototype,"currentLink",{get:function(){return this._currentLink},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),d.prototype.registerLinkProvider=function(f){var h=this;return this._linkProviders.push(f),{dispose:function(){var y=h._linkProviders.indexOf(f);y!==-1&&h._linkProviders.splice(y,1)}}},d.prototype.attachToDom=function(f,h,y){var C=this;this._element=f,this._mouseService=h,this._renderService=y,this.register((0,g.addDisposableDomListener)(this._element,"mouseleave",function(){C._isMouseOut=!0,C._clearCurrentLink()})),this.register((0,g.addDisposableDomListener)(this._element,"mousemove",this._onMouseMove.bind(this))),this.register((0,g.addDisposableDomListener)(this._element,"click",this._onClick.bind(this)))},d.prototype._onMouseMove=function(f){if(this._lastMouseEvent=f,this._element&&this._mouseService){var h=this._positionFromMouseEvent(f,this._element,this._mouseService);if(h){this._isMouseOut=!1;for(var y=f.composedPath(),C=0;Cf?this._bufferService.cols:E.link.range.end.x,A=k;A<=x;A++){if(y.has(A)){w.splice(S--,1);break}y.add(A)}}},d.prototype._checkLinkProviderResult=function(f,h,y){var C,w=this;if(!this._activeProviderReplies)return y;for(var S=this._activeProviderReplies.get(f),E=!1,k=0;k=f&&this._currentLink.link.range.end.y<=h)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,p.disposeArray)(this._linkCacheDisposables))},d.prototype._handleNewLink=function(f){var h=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._linkAtPosition(f.link,y)&&(this._currentLink=f,this._currentLink.state={decorations:{underline:f.link.decorations===void 0||f.link.decorations.underline,pointerCursor:f.link.decorations===void 0||f.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,f.link,this._lastMouseEvent),f.link.decorations={},Object.defineProperties(f.link.decorations,{pointerCursor:{get:function(){var C,w;return(w=(C=h._currentLink)===null||C===void 0?void 0:C.state)===null||w===void 0?void 0:w.decorations.pointerCursor},set:function(C){var w,S;((w=h._currentLink)===null||w===void 0?void 0:w.state)&&h._currentLink.state.decorations.pointerCursor!==C&&(h._currentLink.state.decorations.pointerCursor=C,h._currentLink.state.isHovered&&((S=h._element)===null||S===void 0||S.classList.toggle("xterm-cursor-pointer",C)))}},underline:{get:function(){var C,w;return(w=(C=h._currentLink)===null||C===void 0?void 0:C.state)===null||w===void 0?void 0:w.decorations.underline},set:function(C){var w,S,E;((w=h._currentLink)===null||w===void 0?void 0:w.state)&&((E=(S=h._currentLink)===null||S===void 0?void 0:S.state)===null||E===void 0?void 0:E.decorations.underline)!==C&&(h._currentLink.state.decorations.underline=C,h._currentLink.state.isHovered&&h._fireUnderlineEvent(f.link,C))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(C){var w=C.start===0?0:C.start+1+h._bufferService.buffer.ydisp;h._clearCurrentLink(w,C.end+1+h._bufferService.buffer.ydisp)})))}},d.prototype._linkHover=function(f,h,y){var C;!((C=this._currentLink)===null||C===void 0)&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(h,!0),this._currentLink.state.decorations.pointerCursor&&f.classList.add("xterm-cursor-pointer")),h.hover&&h.hover(y,h.text)},d.prototype._fireUnderlineEvent=function(f,h){var y=f.range,C=this._bufferService.buffer.ydisp,w=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-C-1,y.end.x,y.end.y-C-1,void 0);(h?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(w)},d.prototype._linkLeave=function(f,h,y){var C;!((C=this._currentLink)===null||C===void 0)&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(h,!1),this._currentLink.state.decorations.pointerCursor&&f.classList.remove("xterm-cursor-pointer")),h.leave&&h.leave(y,h.text)},d.prototype._linkAtPosition=function(f,h){var y=f.range.start.y===f.range.end.y,C=f.range.start.yh.y;return(y&&f.range.start.x<=h.x&&f.range.end.x>=h.x||C&&f.range.end.x>=h.x||w&&f.range.start.x<=h.x||C&&w)&&f.range.start.y<=h.y&&f.range.end.y>=h.y},d.prototype._positionFromMouseEvent=function(f,h,y){var C=y.getCoords(f,h,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}},d.prototype._createLinkUnderlineEvent=function(f,h,y,C,w){return{x1:f,y1:h,x2:y,y2:C,cols:this._bufferService.cols,fg:w}},u([c(0,_.IBufferService)],d)}(p.Disposable);i.Linkifier2=b},9042:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.tooMuchOutput=i.promptLabel=void 0,i.promptLabel="Terminal input",i.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},6954:function(o,i,s){var a,l=this&&this.__extends||(a=function(m,d){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&(f[y]=h[y])},a(m,d)},function(m,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function f(){this.constructor=m}a(m,d),m.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}),u=this&&this.__decorate||function(m,d,f,h){var y,C=arguments.length,w=C<3?d:h===null?h=Object.getOwnPropertyDescriptor(d,f):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(m,d,f,h);else for(var S=m.length-1;S>=0;S--)(y=m[S])&&(w=(C<3?y(w):C>3?y(d,f,w):y(d,f))||w);return C>3&&w&&Object.defineProperty(d,f,w),w},c=this&&this.__param||function(m,d){return function(f,h){d(f,h,m)}};Object.defineProperty(i,"__esModule",{value:!0}),i.MouseZoneManager=void 0;var _=s(844),v=s(3656),p=s(4725),g=s(2585),b=function(m){function d(f,h,y,C,w,S){var E=m.call(this)||this;return E._element=f,E._screenElement=h,E._bufferService=y,E._mouseService=C,E._selectionService=w,E._optionsService=S,E._zones=[],E._areZonesActive=!1,E._lastHoverCoords=[void 0,void 0],E._initialSelectionLength=0,E.register((0,v.addDisposableDomListener)(E._element,"mousedown",function(k){return E._onMouseDown(k)})),E._mouseMoveListener=function(k){return E._onMouseMove(k)},E._mouseLeaveListener=function(k){return E._onMouseLeave(k)},E._clickListener=function(k){return E._onClick(k)},E}return l(d,m),d.prototype.dispose=function(){m.prototype.dispose.call(this),this._deactivate()},d.prototype.add=function(f){this._zones.push(f),this._zones.length===1&&this._activate()},d.prototype.clearAll=function(f,h){if(this._zones.length!==0){f&&h||(f=0,h=this._bufferService.rows-1);for(var y=0;yf&&C.y1<=h+1||C.y2>f&&C.y2<=h+1||C.y1h+1)&&(this._currentZone&&this._currentZone===C&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(y--,1))}this._zones.length===0&&this._deactivate()}},d.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},d.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},d.prototype._onMouseMove=function(f){this._lastHoverCoords[0]===f.pageX&&this._lastHoverCoords[1]===f.pageY||(this._onHover(f),this._lastHoverCoords=[f.pageX,f.pageY])},d.prototype._onHover=function(f){var h=this,y=this._findZoneEventAt(f);y!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),y&&(this._currentZone=y,y.hoverCallback&&y.hoverCallback(f),this._tooltipTimeout=window.setTimeout(function(){return h._onTooltip(f)},this._optionsService.rawOptions.linkTooltipHoverDuration)))},d.prototype._onTooltip=function(f){this._tooltipTimeout=void 0;var h=this._findZoneEventAt(f);h==null||h.tooltipCallback(f)},d.prototype._onMouseDown=function(f){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var h=this._findZoneEventAt(f);h!=null&&h.willLinkActivate(f)&&(f.preventDefault(),f.stopImmediatePropagation())}},d.prototype._onMouseLeave=function(f){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},d.prototype._onClick=function(f){var h=this._findZoneEventAt(f),y=this._getSelectionLength();h&&y===this._initialSelectionLength&&(h.clickCallback(f),f.preventDefault(),f.stopImmediatePropagation())},d.prototype._getSelectionLength=function(){var f=this._selectionService.selectionText;return f?f.length:0},d.prototype._findZoneEventAt=function(f){var h=this._mouseService.getCoords(f,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(h)for(var y=h[0],C=h[1],w=0;w=S.x1&&y=S.x1||C===S.y2&&yS.y1&&C{Object.defineProperty(i,"__esModule",{value:!0}),i.RenderDebouncer=void 0;var s=function(){function a(l){this._renderCallback=l}return a.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},a.prototype.refresh=function(l,u,c){var _=this;this._rowCount=c,l=l!==void 0?l:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return _._innerRefresh()}))},a.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var l=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(l,u)}},a}();i.RenderDebouncer=s},5596:function(o,i,s){var a,l=this&&this.__extends||(a=function(c,_){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,p){v.__proto__=p}||function(v,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(v[g]=p[g])},a(c,_)},function(c,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function v(){this.constructor=c}a(c,_),c.prototype=_===null?Object.create(_):(v.prototype=_.prototype,new v)});Object.defineProperty(i,"__esModule",{value:!0}),i.ScreenDprMonitor=void 0;var u=function(c){function _(){var v=c!==null&&c.apply(this,arguments)||this;return v._currentDevicePixelRatio=window.devicePixelRatio,v}return l(_,c),_.prototype.setListener=function(v){var p=this;this._listener&&this.clearListener(),this._listener=v,this._outerListener=function(){p._listener&&(p._listener(window.devicePixelRatio,p._currentDevicePixelRatio),p._updateDpr())},this._updateDpr()},_.prototype.dispose=function(){c.prototype.dispose.call(this),this.clearListener()},_.prototype._updateDpr=function(){var v;this._outerListener&&((v=this._resolutionMediaMatchList)===null||v===void 0||v.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},_.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},_}(s(844).Disposable);i.ScreenDprMonitor=u},3236:function(o,i,s){var a,l=this&&this.__extends||(a=function(B,z){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,D){O.__proto__=D}||function(O,D){for(var F in D)Object.prototype.hasOwnProperty.call(D,F)&&(O[F]=D[F])},a(B,z)},function(B,z){if(typeof z!="function"&&z!==null)throw new TypeError("Class extends value "+String(z)+" is not a constructor or null");function O(){this.constructor=B}a(B,z),B.prototype=z===null?Object.create(z):(O.prototype=z.prototype,new O)});Object.defineProperty(i,"__esModule",{value:!0}),i.Terminal=void 0;var u=s(2950),c=s(1680),_=s(3614),v=s(2584),p=s(5435),g=s(3525),b=s(3551),m=s(9312),d=s(6114),f=s(3656),h=s(9042),y=s(357),C=s(6954),w=s(4567),S=s(1296),E=s(7399),k=s(8460),x=s(8437),A=s(5680),L=s(3230),T=s(4725),H=s(428),P=s(8934),R=s(6465),I=s(5114),M=s(8969),$=s(4774),V=s(4269),U=s(5941),Y=s(7641),Z=typeof window!="undefined"?window.document:null,te=function(B){function z(O){O===void 0&&(O={});var D=B.call(this,O)||this;return D.browser=d,D._keyDownHandled=!1,D._keyPressHandled=!1,D._unprocessedDeadKey=!1,D._onCursorMove=new k.EventEmitter,D._onKey=new k.EventEmitter,D._onRender=new k.EventEmitter,D._onSelectionChange=new k.EventEmitter,D._onTitleChange=new k.EventEmitter,D._onBell=new k.EventEmitter,D._onFocus=new k.EventEmitter,D._onBlur=new k.EventEmitter,D._onA11yCharEmitter=new k.EventEmitter,D._onA11yTabEmitter=new k.EventEmitter,D._setup(),D.linkifier=D._instantiationService.createInstance(b.Linkifier),D.linkifier2=D.register(D._instantiationService.createInstance(R.Linkifier2)),D.decorationService=D.register(D._instantiationService.createInstance(Y.DecorationService)),D.register(D._inputHandler.onRequestBell(function(){return D.bell()})),D.register(D._inputHandler.onRequestRefreshRows(function(F,ue){return D.refresh(F,ue)})),D.register(D._inputHandler.onRequestSendFocus(function(){return D._reportFocus()})),D.register(D._inputHandler.onRequestReset(function(){return D.reset()})),D.register(D._inputHandler.onRequestWindowsOptionsReport(function(F){return D._reportWindowsOptions(F)})),D.register(D._inputHandler.onColor(function(F){return D._handleColorEvent(F)})),D.register((0,k.forwardEvent)(D._inputHandler.onCursorMove,D._onCursorMove)),D.register((0,k.forwardEvent)(D._inputHandler.onTitleChange,D._onTitleChange)),D.register((0,k.forwardEvent)(D._inputHandler.onA11yChar,D._onA11yCharEmitter)),D.register((0,k.forwardEvent)(D._inputHandler.onA11yTab,D._onA11yTabEmitter)),D.register(D._bufferService.onResize(function(F){return D._afterResize(F.cols,F.rows)})),D}return l(z,B),Object.defineProperty(z.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"onBell",{get:function(){return this._onBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),z.prototype._handleColorEvent=function(O){var D,F;if(this._colorManager){for(var ue=0,fe=O;ue4)&&D.coreMouseService.triggerMouseEvent({col:be.x-33,row:be.y-33,button:ae,action:pe,ctrl:ee.ctrlKey,alt:ee.altKey,shift:ee.shiftKey})}var fe={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ge=function(ee){return ue(ee),ee.buttons||(O._document.removeEventListener("mouseup",fe.mouseup),fe.mousedrag&&O._document.removeEventListener("mousemove",fe.mousedrag)),O.cancel(ee)},j=function(ee){return ue(ee),O.cancel(ee,!0)},q=function(ee){ee.buttons&&ue(ee)},ie=function(ee){ee.buttons||ue(ee)};this.register(this.coreMouseService.onProtocolChange(function(ee){ee?(O.optionsService.rawOptions.logLevel==="debug"&&O._logService.debug("Binding to mouse events:",O.coreMouseService.explainEvents(ee)),O.element.classList.add("enable-mouse-events"),O._selectionService.disable()):(O._logService.debug("Unbinding from mouse events."),O.element.classList.remove("enable-mouse-events"),O._selectionService.enable()),8&ee?fe.mousemove||(F.addEventListener("mousemove",ie),fe.mousemove=ie):(F.removeEventListener("mousemove",fe.mousemove),fe.mousemove=null),16&ee?fe.wheel||(F.addEventListener("wheel",j,{passive:!1}),fe.wheel=j):(F.removeEventListener("wheel",fe.wheel),fe.wheel=null),2&ee?fe.mouseup||(fe.mouseup=ge):(O._document.removeEventListener("mouseup",fe.mouseup),fe.mouseup=null),4&ee?fe.mousedrag||(fe.mousedrag=q):(O._document.removeEventListener("mousemove",fe.mousedrag),fe.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,f.addDisposableDomListener)(F,"mousedown",function(ee){if(ee.preventDefault(),O.focus(),O.coreMouseService.areMouseEventsActive&&!O._selectionService.shouldForceSelection(ee))return ue(ee),fe.mouseup&&O._document.addEventListener("mouseup",fe.mouseup),fe.mousedrag&&O._document.addEventListener("mousemove",fe.mousedrag),O.cancel(ee)})),this.register((0,f.addDisposableDomListener)(F,"wheel",function(ee){if(!fe.wheel){if(!O.buffer.hasScrollback){var ae=O.viewport.getLinesScrolled(ee);if(ae===0)return;for(var pe=v.C0.ESC+(O.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ee.deltaY<0?"A":"B"),be="",he=0;he47)},z.prototype._keyUp=function(O){this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1||(function(D){return D.keyCode===16||D.keyCode===17||D.keyCode===18}(O)||this.focus(),this.updateCursorStyle(O),this._keyPressHandled=!1)},z.prototype._keyPress=function(O){var D;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;if(this.cancel(O),O.charCode)D=O.charCode;else if(O.which===null||O.which===void 0)D=O.keyCode;else{if(O.which===0||O.charCode===0)return!1;D=O.which}return!(!D||(O.altKey||O.ctrlKey||O.metaKey)&&!this._isThirdLevelShift(this.browser,O)||(D=String.fromCharCode(D),this._onKey.fire({key:D,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(D,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))},z.prototype._inputEvent=function(O){if(O.data&&O.inputType==="insertText"&&!O.composed&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;var D=O.data;return this.coreService.triggerDataEvent(D,!0),this.cancel(O),!0}return!1},z.prototype.bell=function(){var O;this._soundBell()&&((O=this._soundService)===null||O===void 0||O.playBellSound()),this._onBell.fire()},z.prototype.resize=function(O,D){O!==this.cols||D!==this.rows?B.prototype.resize.call(this,O,D):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},z.prototype._afterResize=function(O,D){var F,ue;(F=this._charSizeService)===null||F===void 0||F.measure(),(ue=this.viewport)===null||ue===void 0||ue.syncScrollArea(!0)},z.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var O=1;O{Object.defineProperty(i,"__esModule",{value:!0}),i.TimeBasedDebouncer=void 0;var s=function(){function a(l,u){u===void 0&&(u=1e3),this._renderCallback=l,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}return a.prototype.dispose=function(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)},a.prototype.refresh=function(l,u,c){var _=this;this._rowCount=c,l=l!==void 0?l:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;var v=Date.now();if(v-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=v,this._innerRefresh();else if(!this._additionalRefreshRequested){var p=v-this._lastRefreshMs,g=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(function(){_._lastRefreshMs=Date.now(),_._innerRefresh(),_._additionalRefreshRequested=!1,_._refreshTimeoutID=void 0},g)}},a.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var l=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,u)}},a}();i.TimeBasedDebouncer=s},1680:function(o,i,s){var a,l=this&&this.__extends||(a=function(m,d){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&(f[y]=h[y])},a(m,d)},function(m,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function f(){this.constructor=m}a(m,d),m.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}),u=this&&this.__decorate||function(m,d,f,h){var y,C=arguments.length,w=C<3?d:h===null?h=Object.getOwnPropertyDescriptor(d,f):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(m,d,f,h);else for(var S=m.length-1;S>=0;S--)(y=m[S])&&(w=(C<3?y(w):C>3?y(d,f,w):y(d,f))||w);return C>3&&w&&Object.defineProperty(d,f,w),w},c=this&&this.__param||function(m,d){return function(f,h){d(f,h,m)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Viewport=void 0;var _=s(844),v=s(3656),p=s(4725),g=s(2585),b=function(m){function d(f,h,y,C,w,S,E,k){var x=m.call(this)||this;return x._scrollLines=f,x._viewportElement=h,x._scrollArea=y,x._element=C,x._bufferService=w,x._optionsService=S,x._charSizeService=E,x._renderService=k,x.scrollBarWidth=0,x._currentRowHeight=0,x._currentScaledCellHeight=0,x._lastRecordedBufferLength=0,x._lastRecordedViewportHeight=0,x._lastRecordedBufferHeight=0,x._lastTouchY=0,x._lastScrollTop=0,x._lastHadScrollBar=!1,x._wheelPartialScroll=0,x._refreshAnimationFrame=null,x._ignoreNextScrollEvent=!1,x.scrollBarWidth=x._viewportElement.offsetWidth-x._scrollArea.offsetWidth||15,x._lastHadScrollBar=!0,x.register((0,v.addDisposableDomListener)(x._viewportElement,"scroll",x._onScroll.bind(x))),x._activeBuffer=x._bufferService.buffer,x.register(x._bufferService.buffers.onBufferActivate(function(A){return x._activeBuffer=A.activeBuffer})),x._renderDimensions=x._renderService.dimensions,x.register(x._renderService.onDimensionsChange(function(A){return x._renderDimensions=A})),setTimeout(function(){return x.syncScrollArea()},0),x}return l(d,m),d.prototype.onThemeChange=function(f){this._viewportElement.style.backgroundColor=f.background.css},d.prototype._refresh=function(f){var h=this;if(f)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return h._innerRefresh()}))},d.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._currentScaledCellHeight=this._renderService.dimensions.scaledCellHeight,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var f=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==f&&(this._lastRecordedBufferHeight=f,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var h=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==h&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=h),this._optionsService.rawOptions.scrollback===0?this.scrollBarWidth=0:this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this._lastHadScrollBar=this.scrollBarWidth>0;var y=window.getComputedStyle(this._element),C=parseInt(y.paddingLeft)+parseInt(y.paddingRight);this._viewportElement.style.width=(this._renderService.dimensions.actualCellWidth*this._bufferService.cols+this.scrollBarWidth+(this._lastHadScrollBar?C:0)).toString()+"px",this._refreshAnimationFrame=null},d.prototype.syncScrollArea=function(f){if(f===void 0&&(f=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(f);this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.scaledCellHeight===this._currentScaledCellHeight?this._lastHadScrollBar!==this._optionsService.rawOptions.scrollback>0&&this._refresh(f):this._refresh(f)},d.prototype._onScroll=function(f){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent){if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._scrollLines(0);var h=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(h)}},d.prototype._bubbleScroll=function(f,h){var y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(h<0&&this._viewportElement.scrollTop!==0||h>0&&y0?1:-1),this._wheelPartialScroll%=1):f.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(h*=this._bufferService.rows),h},d.prototype._applyScrollModifier=function(f,h){var y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&h.altKey||y==="ctrl"&&h.ctrlKey||y==="shift"&&h.shiftKey?f*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:f*this._optionsService.rawOptions.scrollSensitivity},d.prototype.onTouchStart=function(f){this._lastTouchY=f.touches[0].pageY},d.prototype.onTouchMove=function(f){var h=this._lastTouchY-f.touches[0].pageY;return this._lastTouchY=f.touches[0].pageY,h!==0&&(this._viewportElement.scrollTop+=h,this._bubbleScroll(f,h))},u([c(4,g.IBufferService),c(5,g.IOptionsService),c(6,p.ICharSizeService),c(7,p.IRenderService)],d)}(_.Disposable);i.Viewport=b},2950:function(o,i,s){var a=this&&this.__decorate||function(v,p,g,b){var m,d=arguments.length,f=d<3?p:b===null?b=Object.getOwnPropertyDescriptor(p,g):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(v,p,g,b);else for(var h=v.length-1;h>=0;h--)(m=v[h])&&(f=(d<3?m(f):d>3?m(p,g,f):m(p,g))||f);return d>3&&f&&Object.defineProperty(p,g,f),f},l=this&&this.__param||function(v,p){return function(g,b){p(g,b,v)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CompositionHelper=void 0;var u=s(4725),c=s(2585),_=function(){function v(p,g,b,m,d,f){this._textarea=p,this._compositionView=g,this._bufferService=b,this._optionsService=m,this._coreService=d,this._renderService=f,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}return Object.defineProperty(v.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),v.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")},v.prototype.compositionupdate=function(p){var g=this;this._compositionView.textContent=p.data,this.updateCompositionElements(),setTimeout(function(){g._compositionPosition.end=g._textarea.value.length},0)},v.prototype.compositionend=function(){this._finalizeComposition(!0)},v.prototype.keydown=function(p){if(this._isComposing||this._isSendingComposition){if(p.keyCode===229||p.keyCode===16||p.keyCode===17||p.keyCode===18)return!1;this._finalizeComposition(!1)}return p.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},v.prototype._finalizeComposition=function(p){var g=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,p){var b={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(g._isSendingComposition){g._isSendingComposition=!1;var d;b.start+=g._dataAlreadySent.length,(d=g._isComposing?g._textarea.value.substring(b.start,b.end):g._textarea.value.substring(b.start)).length>0&&g._coreService.triggerDataEvent(d,!0)}},0)}else{this._isSendingComposition=!1;var m=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(m,!0)}},v.prototype._handleAnyTextareaChanges=function(){var p=this,g=this._textarea.value;setTimeout(function(){if(!p._isComposing){var b=p._textarea.value.replace(g,"");b.length>0&&(p._dataAlreadySent=b,p._coreService.triggerDataEvent(b,!0))}},0)},v.prototype.updateCompositionElements=function(p){var g=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var b=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),m=this._renderService.dimensions.actualCellHeight,d=this._bufferService.buffer.y*this._renderService.dimensions.actualCellHeight,f=b*this._renderService.dimensions.actualCellWidth;this._compositionView.style.left=f+"px",this._compositionView.style.top=d+"px",this._compositionView.style.height=m+"px",this._compositionView.style.lineHeight=m+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var h=this._compositionView.getBoundingClientRect();this._textarea.style.left=f+"px",this._textarea.style.top=d+"px",this._textarea.style.width=Math.max(h.width,1)+"px",this._textarea.style.height=Math.max(h.height,1)+"px",this._textarea.style.lineHeight=h.height+"px"}p||setTimeout(function(){return g.updateCompositionElements(!0)},0)}},a([l(2,c.IBufferService),l(3,c.IOptionsService),l(4,c.ICoreService),l(5,u.IRenderService)],v)}();i.CompositionHelper=_},9806:(o,i)=>{function s(a,l){var u=l.getBoundingClientRect();return[a.clientX-u.left,a.clientY-u.top]}Object.defineProperty(i,"__esModule",{value:!0}),i.getRawByteCoords=i.getCoords=i.getCoordsRelativeToElement=void 0,i.getCoordsRelativeToElement=s,i.getCoords=function(a,l,u,c,_,v,p,g){if(_){var b=s(a,l);if(b)return b[0]=Math.ceil((b[0]+(g?v/2:0))/v),b[1]=Math.ceil(b[1]/p),b[0]=Math.min(Math.max(b[0],1),u+(g?1:0)),b[1]=Math.min(Math.max(b[1],1),c),b}},i.getRawByteCoords=function(a){if(a)return{x:a[0]+32,y:a[1]+32}}},9504:(o,i,s)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.moveToCellSequence=void 0;var a=s(2584);function l(g,b,m,d){var f=g-u(m,g),h=b-u(m,b),y=Math.abs(f-h)-function(C,w,S){for(var E=0,k=C-u(S,C),x=w-u(S,w),A=0;A=0&&bb?"A":"B"}function _(g,b,m,d,f,h){for(var y=g,C=b,w="";y!==m||C!==d;)y+=f?1:-1,f&&y>h.cols-1?(w+=h.buffer.translateBufferLineToString(C,!1,g,y),y=0,g=0,C++):!f&&y<0&&(w+=h.buffer.translateBufferLineToString(C,!1,0,g+1),g=y=h.cols-1,C--);return w+h.buffer.translateBufferLineToString(C,!1,g,y)}function v(g,b){var m=b?"O":"[";return a.C0.ESC+m+g}function p(g,b){g=Math.floor(g);for(var m="",d=0;d0?k-u(x,k):S;var T=k,H=function(P,R,I,M,$,V){var U;return U=l(I,M,$,V).length>0?M-u($,M):R,P=I&&Ug?"D":"C",p(Math.abs(h-g),v(f,d));f=y>b?"D":"C";var C=Math.abs(y-b);return p(function(w,S){return S.cols-w}(y>b?g:h,m)+(C-1)*m.cols+1+((y>b?h:g)-1),v(f,d))}},4389:function(o,i,s){var a=this&&this.__assign||function(){return a=Object.assign||function(m){for(var d,f=1,h=arguments.length;f{Object.defineProperty(i,"__esModule",{value:!0}),i.BaseRenderLayer=void 0;var a=s(643),l=s(8803),u=s(1420),c=s(3734),_=s(1752),v=s(4774),p=s(9631),g=s(8978),b=function(){function m(d,f,h,y,C,w,S,E){this._container=d,this._alpha=y,this._colors=C,this._rendererId=w,this._bufferService=S,this._optionsService=E,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+f+"-layer"),this._canvas.style.zIndex=h.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return m.prototype.dispose=function(){var d;(0,p.removeElementFromParent)(this._canvas),(d=this._charAtlas)===null||d===void 0||d.dispose()},m.prototype._initCanvas=function(){this._ctx=(0,_.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},m.prototype.onOptionsChanged=function(){},m.prototype.onBlur=function(){},m.prototype.onFocus=function(){},m.prototype.onCursorMove=function(){},m.prototype.onGridChanged=function(d,f){},m.prototype.onSelectionChanged=function(d,f,h){},m.prototype.setColors=function(d){this._refreshCharAtlas(d)},m.prototype._setTransparency=function(d){if(d!==this._alpha){var f=this._canvas;this._alpha=d,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,f),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},m.prototype._refreshCharAtlas=function(d){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,u.acquireCharAtlas)(this._optionsService.rawOptions,this._rendererId,d,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},m.prototype.resize=function(d){this._scaledCellWidth=d.scaledCellWidth,this._scaledCellHeight=d.scaledCellHeight,this._scaledCharWidth=d.scaledCharWidth,this._scaledCharHeight=d.scaledCharHeight,this._scaledCharLeft=d.scaledCharLeft,this._scaledCharTop=d.scaledCharTop,this._canvas.width=d.scaledCanvasWidth,this._canvas.height=d.scaledCanvasHeight,this._canvas.style.width=d.canvasWidth+"px",this._canvas.style.height=d.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},m.prototype.clearTextureAtlas=function(){var d;(d=this._charAtlas)===null||d===void 0||d.clear()},m.prototype._fillCells=function(d,f,h,y){this._ctx.fillRect(d*this._scaledCellWidth,f*this._scaledCellHeight,h*this._scaledCellWidth,y*this._scaledCellHeight)},m.prototype._fillMiddleLineAtCells=function(d,f,h){h===void 0&&(h=1);var y=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(d*this._scaledCellWidth,(f+1)*this._scaledCellHeight-y-window.devicePixelRatio,h*this._scaledCellWidth,window.devicePixelRatio)},m.prototype._fillBottomLineAtCells=function(d,f,h){h===void 0&&(h=1),this._ctx.fillRect(d*this._scaledCellWidth,(f+1)*this._scaledCellHeight-window.devicePixelRatio-1,h*this._scaledCellWidth,window.devicePixelRatio)},m.prototype._fillLeftLineAtCell=function(d,f,h){this._ctx.fillRect(d*this._scaledCellWidth,f*this._scaledCellHeight,window.devicePixelRatio*h,this._scaledCellHeight)},m.prototype._strokeRectAtCell=function(d,f,h,y){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(d*this._scaledCellWidth+window.devicePixelRatio/2,f*this._scaledCellHeight+window.devicePixelRatio/2,h*this._scaledCellWidth-window.devicePixelRatio,y*this._scaledCellHeight-window.devicePixelRatio)},m.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},m.prototype._clearCells=function(d,f,h,y){this._alpha?this._ctx.clearRect(d*this._scaledCellWidth,f*this._scaledCellHeight,h*this._scaledCellWidth,y*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(d*this._scaledCellWidth,f*this._scaledCellHeight,h*this._scaledCellWidth,y*this._scaledCellHeight))},m.prototype._fillCharTrueColor=function(d,f,h){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=l.TEXT_BASELINE,this._clipRow(h);var y=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(y=(0,g.tryDrawCustomChar)(this._ctx,d.getChars(),f*this._scaledCellWidth,h*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),y||this._ctx.fillText(d.getChars(),f*this._scaledCellWidth+this._scaledCharLeft,h*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},m.prototype._drawChars=function(d,f,h){var y,C,w,S=this._getContrastColor(d);S||d.isFgRGB()||d.isBgRGB()?this._drawUncachedChars(d,f,h,S):(d.isInverse()?(C=d.isBgDefault()?l.INVERTED_DEFAULT_COLOR:d.getBgColor(),w=d.isFgDefault()?l.INVERTED_DEFAULT_COLOR:d.getFgColor()):(w=d.isBgDefault()?a.DEFAULT_COLOR:d.getBgColor(),C=d.isFgDefault()?a.DEFAULT_COLOR:d.getFgColor()),C+=this._optionsService.rawOptions.drawBoldTextInBrightColors&&d.isBold()&&C<8?8:0,this._currentGlyphIdentifier.chars=d.getChars()||a.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=d.getCode()||a.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=w,this._currentGlyphIdentifier.fg=C,this._currentGlyphIdentifier.bold=!!d.isBold(),this._currentGlyphIdentifier.dim=!!d.isDim(),this._currentGlyphIdentifier.italic=!!d.isItalic(),!((y=this._charAtlas)===null||y===void 0)&&y.draw(this._ctx,this._currentGlyphIdentifier,f*this._scaledCellWidth+this._scaledCharLeft,h*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(d,f,h))},m.prototype._drawUncachedChars=function(d,f,h,y){if(this._ctx.save(),this._ctx.font=this._getFont(!!d.isBold(),!!d.isItalic()),this._ctx.textBaseline=l.TEXT_BASELINE,d.isInverse())if(y)this._ctx.fillStyle=y.css;else if(d.isBgDefault())this._ctx.fillStyle=v.color.opaque(this._colors.background).css;else if(d.isBgRGB())this._ctx.fillStyle="rgb("+c.AttributeData.toColorRGB(d.getBgColor()).join(",")+")";else{var C=d.getBgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&d.isBold()&&C<8&&(C+=8),this._ctx.fillStyle=this._colors.ansi[C].css}else if(y)this._ctx.fillStyle=y.css;else if(d.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(d.isFgRGB())this._ctx.fillStyle="rgb("+c.AttributeData.toColorRGB(d.getFgColor()).join(",")+")";else{var w=d.getFgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&d.isBold()&&w<8&&(w+=8),this._ctx.fillStyle=this._colors.ansi[w].css}this._clipRow(h),d.isDim()&&(this._ctx.globalAlpha=l.DIM_OPACITY);var S=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(S=(0,g.tryDrawCustomChar)(this._ctx,d.getChars(),f*this._scaledCellWidth,h*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),S||this._ctx.fillText(d.getChars(),f*this._scaledCellWidth+this._scaledCharLeft,h*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()},m.prototype._clipRow=function(d){this._ctx.beginPath(),this._ctx.rect(0,d*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},m.prototype._getFont=function(d,f){return(f?"italic":"")+" "+(d?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight)+" "+this._optionsService.rawOptions.fontSize*window.devicePixelRatio+"px "+this._optionsService.rawOptions.fontFamily},m.prototype._getContrastColor=function(d){if(this._optionsService.rawOptions.minimumContrastRatio!==1){var f=this._colors.contrastCache.getColor(d.bg,d.fg);if(f!==void 0)return f||void 0;var h=d.getFgColor(),y=d.getFgColorMode(),C=d.getBgColor(),w=d.getBgColorMode(),S=!!d.isInverse(),E=!!d.isInverse();if(S){var k=h;h=C,C=k;var x=y;y=w,w=x}var A=this._resolveBackgroundRgba(w,C,S),L=this._resolveForegroundRgba(y,h,S,E),T=v.rgba.ensureContrastRatio(A,L,this._optionsService.rawOptions.minimumContrastRatio);if(T){var H={css:v.channels.toCss(T>>24&255,T>>16&255,T>>8&255),rgba:T};return this._colors.contrastCache.setColor(d.bg,d.fg,H),H}this._colors.contrastCache.setColor(d.bg,d.fg,null)}},m.prototype._resolveBackgroundRgba=function(d,f,h){switch(d){case 16777216:case 33554432:return this._colors.ansi[f].rgba;case 50331648:return f<<8;default:return h?this._colors.foreground.rgba:this._colors.background.rgba}},m.prototype._resolveForegroundRgba=function(d,f,h,y){switch(d){case 16777216:case 33554432:return this._optionsService.rawOptions.drawBoldTextInBrightColors&&y&&f<8&&(f+=8),this._colors.ansi[f].rgba;case 50331648:return f<<8;default:return h?this._colors.background.rgba:this._colors.foreground.rgba}},m}();i.BaseRenderLayer=b},2512:function(o,i,s){var a,l=this&&this.__extends||(a=function(f,h){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,C){y.__proto__=C}||function(y,C){for(var w in C)Object.prototype.hasOwnProperty.call(C,w)&&(y[w]=C[w])},a(f,h)},function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function y(){this.constructor=f}a(f,h),f.prototype=h===null?Object.create(h):(y.prototype=h.prototype,new y)}),u=this&&this.__decorate||function(f,h,y,C){var w,S=arguments.length,E=S<3?h:C===null?C=Object.getOwnPropertyDescriptor(h,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(f,h,y,C);else for(var k=f.length-1;k>=0;k--)(w=f[k])&&(E=(S<3?w(E):S>3?w(h,y,E):w(h,y))||E);return S>3&&E&&Object.defineProperty(h,y,E),E},c=this&&this.__param||function(f,h){return function(y,C){h(y,C,f)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CursorRenderLayer=void 0;var _=s(1546),v=s(511),p=s(2585),g=s(4725),b=600,m=function(f){function h(y,C,w,S,E,k,x,A,L){var T=f.call(this,y,"cursor",C,!0,w,S,k,x)||this;return T._onRequestRedraw=E,T._coreService=A,T._coreBrowserService=L,T._cell=new v.CellData,T._state={x:0,y:0,isFocused:!1,style:"",width:0},T._cursorRenderers={bar:T._renderBarCursor.bind(T),block:T._renderBlockCursor.bind(T),underline:T._renderUnderlineCursor.bind(T)},T}return l(h,f),h.prototype.dispose=function(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),f.prototype.dispose.call(this)},h.prototype.resize=function(y){f.prototype.resize.call(this,y),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},h.prototype.reset=function(){var y;this._clearCursor(),(y=this._cursorBlinkStateManager)===null||y===void 0||y.restartBlinkAnimation(),this.onOptionsChanged()},h.prototype.onBlur=function(){var y;(y=this._cursorBlinkStateManager)===null||y===void 0||y.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},h.prototype.onFocus=function(){var y;(y=this._cursorBlinkStateManager)===null||y===void 0||y.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},h.prototype.onOptionsChanged=function(){var y,C=this;this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new d(this._coreBrowserService.isFocused,function(){C._render(!0)})):((y=this._cursorBlinkStateManager)===null||y===void 0||y.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},h.prototype.onCursorMove=function(){var y;(y=this._cursorBlinkStateManager)===null||y===void 0||y.restartBlinkAnimation()},h.prototype.onGridChanged=function(y,C){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},h.prototype._render=function(y){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var C=this._bufferService.buffer.ybase+this._bufferService.buffer.y,w=C-this._bufferService.buffer.ydisp;if(w<0||w>=this._bufferService.rows)this._clearCursor();else{var S=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(C).loadCell(S,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var E=this._optionsService.rawOptions.cursorStyle;return E&&E!=="block"?this._cursorRenderers[E](S,w,this._cell):this._renderBlurCursor(S,w,this._cell),this._ctx.restore(),this._state.x=S,this._state.y=w,this._state.isFocused=!1,this._state.style=E,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===S&&this._state.y===w&&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"](S,w,this._cell),this._ctx.restore(),this._state.x=S,this._state.y=w,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},h.prototype._clearCursor=function(){this._state&&(window.devicePixelRatio<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})},h.prototype._renderBarCursor=function(y,C,w){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(y,C,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()},h.prototype._renderBlockCursor=function(y,C,w){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(y,C,w.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(w,y,C),this._ctx.restore()},h.prototype._renderUnderlineCursor=function(y,C,w){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(y,C),this._ctx.restore()},h.prototype._renderBlurCursor=function(y,C,w){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(y,C,w.getWidth(),1),this._ctx.restore()},u([c(5,p.IBufferService),c(6,p.IOptionsService),c(7,p.ICoreService),c(8,g.ICoreBrowserService)],h)}(_.BaseRenderLayer);i.CursorRenderLayer=m;var d=function(){function f(h,y){this._renderCallback=y,this.isCursorVisible=!0,h&&this._restartInterval()}return Object.defineProperty(f.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),f.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},f.prototype.restartBlinkAnimation=function(){var h=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){h._renderCallback(),h._animationFrame=void 0})))},f.prototype._restartInterval=function(h){var y=this;h===void 0&&(h=b),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout(function(){if(y._animationTimeRestarted){var C=b-(Date.now()-y._animationTimeRestarted);if(y._animationTimeRestarted=void 0,C>0)return void y._restartInterval(C)}y.isCursorVisible=!1,y._animationFrame=window.requestAnimationFrame(function(){y._renderCallback(),y._animationFrame=void 0}),y._blinkInterval=window.setInterval(function(){if(y._animationTimeRestarted){var w=b-(Date.now()-y._animationTimeRestarted);return y._animationTimeRestarted=void 0,void y._restartInterval(w)}y.isCursorVisible=!y.isCursorVisible,y._animationFrame=window.requestAnimationFrame(function(){y._renderCallback(),y._animationFrame=void 0})},b)},h)},f.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},f.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},f}()},8978:(o,i,s)=>{var a,l,u,c,_,v,p,g,b,m,d,f,h,y,C,w,S,E,k,x,A,L,T,H,P,R,I,M,$,V,U,Y,Z,te,B,z,O,D,F,ue,fe,ge,j,q,ie,ee,ae,pe,be,he,_e,ce,re,ve,Ae,Le,$e,ye,xe,Re,Me,Ke,pt,vt,Ht,st,At,Sr,kn,Mr,Tn,ii,Zi,eo,to,oi,ro,no,si,io,ai,Rt,cr,li,oo,aa,la,ca,ua,fa,da,ha,pa,va,ga,ma,_a,ya,ba,Ca,wa,Sa,xa,Ea,Aa,ka,Ta,La,Ra,Ba,Oa,Ia,$c,jc,Uc,Wc,zc,qc,Vc,Kc,Gc,Yc,Xc,Qc,Jc,Zc,eu,tu;Object.defineProperty(i,"__esModule",{value:!0}),i.tryDrawCustomChar=i.boxDrawingDefinitions=i.blockElementDefinitions=void 0;var ah=s(1752);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:9,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:0,y:0,w:4,h:8}],"\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}]};var n1={"\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":(a={},a[1]="M0,.5 L1,.5",a),"\u2501":(l={},l[3]="M0,.5 L1,.5",l),"\u2502":(u={},u[1]="M.5,0 L.5,1",u),"\u2503":(c={},c[3]="M.5,0 L.5,1",c),"\u250C":(_={},_[1]="M0.5,1 L.5,.5 L1,.5",_),"\u250F":(v={},v[3]="M0.5,1 L.5,.5 L1,.5",v),"\u2510":(p={},p[1]="M0,.5 L.5,.5 L.5,1",p),"\u2513":(g={},g[3]="M0,.5 L.5,.5 L.5,1",g),"\u2514":(b={},b[1]="M.5,0 L.5,.5 L1,.5",b),"\u2517":(m={},m[3]="M.5,0 L.5,.5 L1,.5",m),"\u2518":(d={},d[1]="M.5,0 L.5,.5 L0,.5",d),"\u251B":(f={},f[3]="M.5,0 L.5,.5 L0,.5",f),"\u251C":(h={},h[1]="M.5,0 L.5,1 M.5,.5 L1,.5",h),"\u2523":(y={},y[3]="M.5,0 L.5,1 M.5,.5 L1,.5",y),"\u2524":(C={},C[1]="M.5,0 L.5,1 M.5,.5 L0,.5",C),"\u252B":(w={},w[3]="M.5,0 L.5,1 M.5,.5 L0,.5",w),"\u252C":(S={},S[1]="M0,.5 L1,.5 M.5,.5 L.5,1",S),"\u2533":(E={},E[3]="M0,.5 L1,.5 M.5,.5 L.5,1",E),"\u2534":(k={},k[1]="M0,.5 L1,.5 M.5,.5 L.5,0",k),"\u253B":(x={},x[3]="M0,.5 L1,.5 M.5,.5 L.5,0",x),"\u253C":(A={},A[1]="M0,.5 L1,.5 M.5,0 L.5,1",A),"\u254B":(L={},L[3]="M0,.5 L1,.5 M.5,0 L.5,1",L),"\u2574":(T={},T[1]="M.5,.5 L0,.5",T),"\u2578":(H={},H[3]="M.5,.5 L0,.5",H),"\u2575":(P={},P[1]="M.5,.5 L.5,0",P),"\u2579":(R={},R[3]="M.5,.5 L.5,0",R),"\u2576":(I={},I[1]="M.5,.5 L1,.5",I),"\u257A":(M={},M[3]="M.5,.5 L1,.5",M),"\u2577":($={},$[1]="M.5,.5 L.5,1",$),"\u257B":(V={},V[3]="M.5,.5 L.5,1",V),"\u2550":(U={},U[1]=function(le,oe){return"M0,"+(.5-oe)+" L1,"+(.5-oe)+" M0,"+(.5+oe)+" L1,"+(.5+oe)},U),"\u2551":(Y={},Y[1]=function(le,oe){return"M"+(.5-le)+",0 L"+(.5-le)+",1 M"+(.5+le)+",0 L"+(.5+le)+",1"},Y),"\u2552":(Z={},Z[1]=function(le,oe){return"M.5,1 L.5,"+(.5-oe)+" L1,"+(.5-oe)+" M.5,"+(.5+oe)+" L1,"+(.5+oe)},Z),"\u2553":(te={},te[1]=function(le,oe){return"M"+(.5-le)+",1 L"+(.5-le)+",.5 L1,.5 M"+(.5+le)+",.5 L"+(.5+le)+",1"},te),"\u2554":(B={},B[1]=function(le,oe){return"M1,"+(.5-oe)+" L"+(.5-le)+","+(.5-oe)+" L"+(.5-le)+",1 M1,"+(.5+oe)+" L"+(.5+le)+","+(.5+oe)+" L"+(.5+le)+",1"},B),"\u2555":(z={},z[1]=function(le,oe){return"M0,"+(.5-oe)+" L.5,"+(.5-oe)+" L.5,1 M0,"+(.5+oe)+" L.5,"+(.5+oe)},z),"\u2556":(O={},O[1]=function(le,oe){return"M"+(.5+le)+",1 L"+(.5+le)+",.5 L0,.5 M"+(.5-le)+",.5 L"+(.5-le)+",1"},O),"\u2557":(D={},D[1]=function(le,oe){return"M0,"+(.5+oe)+" L"+(.5-le)+","+(.5+oe)+" L"+(.5-le)+",1 M0,"+(.5-oe)+" L"+(.5+le)+","+(.5-oe)+" L"+(.5+le)+",1"},D),"\u2558":(F={},F[1]=function(le,oe){return"M.5,0 L.5,"+(.5+oe)+" L1,"+(.5+oe)+" M.5,"+(.5-oe)+" L1,"+(.5-oe)},F),"\u2559":(ue={},ue[1]=function(le,oe){return"M1,.5 L"+(.5-le)+",.5 L"+(.5-le)+",0 M"+(.5+le)+",.5 L"+(.5+le)+",0"},ue),"\u255A":(fe={},fe[1]=function(le,oe){return"M1,"+(.5-oe)+" L"+(.5+le)+","+(.5-oe)+" L"+(.5+le)+",0 M1,"+(.5+oe)+" L"+(.5-le)+","+(.5+oe)+" L"+(.5-le)+",0"},fe),"\u255B":(ge={},ge[1]=function(le,oe){return"M0,"+(.5+oe)+" L.5,"+(.5+oe)+" L.5,0 M0,"+(.5-oe)+" L.5,"+(.5-oe)},ge),"\u255C":(j={},j[1]=function(le,oe){return"M0,.5 L"+(.5+le)+",.5 L"+(.5+le)+",0 M"+(.5-le)+",.5 L"+(.5-le)+",0"},j),"\u255D":(q={},q[1]=function(le,oe){return"M0,"+(.5-oe)+" L"+(.5-le)+","+(.5-oe)+" L"+(.5-le)+",0 M0,"+(.5+oe)+" L"+(.5+le)+","+(.5+oe)+" L"+(.5+le)+",0"},q),"\u255E":(ie={},ie[1]=function(le,oe){return"M.5,0 L.5,1 M.5,"+(.5-oe)+" L1,"+(.5-oe)+" M.5,"+(.5+oe)+" L1,"+(.5+oe)},ie),"\u255F":(ee={},ee[1]=function(le,oe){return"M"+(.5-le)+",0 L"+(.5-le)+",1 M"+(.5+le)+",0 L"+(.5+le)+",1 M"+(.5+le)+",.5 L1,.5"},ee),"\u2560":(ae={},ae[1]=function(le,oe){return"M"+(.5-le)+",0 L"+(.5-le)+",1 M1,"+(.5+oe)+" L"+(.5+le)+","+(.5+oe)+" L"+(.5+le)+",1 M1,"+(.5-oe)+" L"+(.5+le)+","+(.5-oe)+" L"+(.5+le)+",0"},ae),"\u2561":(pe={},pe[1]=function(le,oe){return"M.5,0 L.5,1 M0,"+(.5-oe)+" L.5,"+(.5-oe)+" M0,"+(.5+oe)+" L.5,"+(.5+oe)},pe),"\u2562":(be={},be[1]=function(le,oe){return"M0,.5 L"+(.5-le)+",.5 M"+(.5-le)+",0 L"+(.5-le)+",1 M"+(.5+le)+",0 L"+(.5+le)+",1"},be),"\u2563":(he={},he[1]=function(le,oe){return"M"+(.5+le)+",0 L"+(.5+le)+",1 M0,"+(.5+oe)+" L"+(.5-le)+","+(.5+oe)+" L"+(.5-le)+",1 M0,"+(.5-oe)+" L"+(.5-le)+","+(.5-oe)+" L"+(.5-le)+",0"},he),"\u2564":(_e={},_e[1]=function(le,oe){return"M0,"+(.5-oe)+" L1,"+(.5-oe)+" M0,"+(.5+oe)+" L1,"+(.5+oe)+" M.5,"+(.5+oe)+" L.5,1"},_e),"\u2565":(ce={},ce[1]=function(le,oe){return"M0,.5 L1,.5 M"+(.5-le)+",.5 L"+(.5-le)+",1 M"+(.5+le)+",.5 L"+(.5+le)+",1"},ce),"\u2566":(re={},re[1]=function(le,oe){return"M0,"+(.5-oe)+" L1,"+(.5-oe)+" M0,"+(.5+oe)+" L"+(.5-le)+","+(.5+oe)+" L"+(.5-le)+",1 M1,"+(.5+oe)+" L"+(.5+le)+","+(.5+oe)+" L"+(.5+le)+",1"},re),"\u2567":(ve={},ve[1]=function(le,oe){return"M.5,0 L.5,"+(.5-oe)+" M0,"+(.5-oe)+" L1,"+(.5-oe)+" M0,"+(.5+oe)+" L1,"+(.5+oe)},ve),"\u2568":(Ae={},Ae[1]=function(le,oe){return"M0,.5 L1,.5 M"+(.5-le)+",.5 L"+(.5-le)+",0 M"+(.5+le)+",.5 L"+(.5+le)+",0"},Ae),"\u2569":(Le={},Le[1]=function(le,oe){return"M0,"+(.5+oe)+" L1,"+(.5+oe)+" M0,"+(.5-oe)+" L"+(.5-le)+","+(.5-oe)+" L"+(.5-le)+",0 M1,"+(.5-oe)+" L"+(.5+le)+","+(.5-oe)+" L"+(.5+le)+",0"},Le),"\u256A":($e={},$e[1]=function(le,oe){return"M.5,0 L.5,1 M0,"+(.5-oe)+" L1,"+(.5-oe)+" M0,"+(.5+oe)+" L1,"+(.5+oe)},$e),"\u256B":(ye={},ye[1]=function(le,oe){return"M0,.5 L1,.5 M"+(.5-le)+",0 L"+(.5-le)+",1 M"+(.5+le)+",0 L"+(.5+le)+",1"},ye),"\u256C":(xe={},xe[1]=function(le,oe){return"M0,"+(.5+oe)+" L"+(.5-le)+","+(.5+oe)+" L"+(.5-le)+",1 M1,"+(.5+oe)+" L"+(.5+le)+","+(.5+oe)+" L"+(.5+le)+",1 M0,"+(.5-oe)+" L"+(.5-le)+","+(.5-oe)+" L"+(.5-le)+",0 M1,"+(.5-oe)+" L"+(.5+le)+","+(.5-oe)+" L"+(.5+le)+",0"},xe),"\u2571":(Re={},Re[1]="M1,0 L0,1",Re),"\u2572":(Me={},Me[1]="M0,0 L1,1",Me),"\u2573":(Ke={},Ke[1]="M1,0 L0,1 M0,0 L1,1",Ke),"\u257C":(pt={},pt[1]="M.5,.5 L0,.5",pt[3]="M.5,.5 L1,.5",pt),"\u257D":(vt={},vt[1]="M.5,.5 L.5,0",vt[3]="M.5,.5 L.5,1",vt),"\u257E":(Ht={},Ht[1]="M.5,.5 L1,.5",Ht[3]="M.5,.5 L0,.5",Ht),"\u257F":(st={},st[1]="M.5,.5 L.5,1",st[3]="M.5,.5 L.5,0",st),"\u250D":(At={},At[1]="M.5,.5 L.5,1",At[3]="M.5,.5 L1,.5",At),"\u250E":(Sr={},Sr[1]="M.5,.5 L1,.5",Sr[3]="M.5,.5 L.5,1",Sr),"\u2511":(kn={},kn[1]="M.5,.5 L.5,1",kn[3]="M.5,.5 L0,.5",kn),"\u2512":(Mr={},Mr[1]="M.5,.5 L0,.5",Mr[3]="M.5,.5 L.5,1",Mr),"\u2515":(Tn={},Tn[1]="M.5,.5 L.5,0",Tn[3]="M.5,.5 L1,.5",Tn),"\u2516":(ii={},ii[1]="M.5,.5 L1,.5",ii[3]="M.5,.5 L.5,0",ii),"\u2519":(Zi={},Zi[1]="M.5,.5 L.5,0",Zi[3]="M.5,.5 L0,.5",Zi),"\u251A":(eo={},eo[1]="M.5,.5 L0,.5",eo[3]="M.5,.5 L.5,0",eo),"\u251D":(to={},to[1]="M.5,0 L.5,1",to[3]="M.5,.5 L1,.5",to),"\u251E":(oi={},oi[1]="M0.5,1 L.5,.5 L1,.5",oi[3]="M.5,.5 L.5,0",oi),"\u251F":(ro={},ro[1]="M.5,0 L.5,.5 L1,.5",ro[3]="M.5,.5 L.5,1",ro),"\u2520":(no={},no[1]="M.5,.5 L1,.5",no[3]="M.5,0 L.5,1",no),"\u2521":(si={},si[1]="M.5,.5 L.5,1",si[3]="M.5,0 L.5,.5 L1,.5",si),"\u2522":(io={},io[1]="M.5,.5 L.5,0",io[3]="M0.5,1 L.5,.5 L1,.5",io),"\u2525":(ai={},ai[1]="M.5,0 L.5,1",ai[3]="M.5,.5 L0,.5",ai),"\u2526":(Rt={},Rt[1]="M0,.5 L.5,.5 L.5,1",Rt[3]="M.5,.5 L.5,0",Rt),"\u2527":(cr={},cr[1]="M.5,0 L.5,.5 L0,.5",cr[3]="M.5,.5 L.5,1",cr),"\u2528":(li={},li[1]="M.5,.5 L0,.5",li[3]="M.5,0 L.5,1",li),"\u2529":(oo={},oo[1]="M.5,.5 L.5,1",oo[3]="M.5,0 L.5,.5 L0,.5",oo),"\u252A":(aa={},aa[1]="M.5,.5 L.5,0",aa[3]="M0,.5 L.5,.5 L.5,1",aa),"\u252D":(la={},la[1]="M0.5,1 L.5,.5 L1,.5",la[3]="M.5,.5 L0,.5",la),"\u252E":(ca={},ca[1]="M0,.5 L.5,.5 L.5,1",ca[3]="M.5,.5 L1,.5",ca),"\u252F":(ua={},ua[1]="M.5,.5 L.5,1",ua[3]="M0,.5 L1,.5",ua),"\u2530":(fa={},fa[1]="M0,.5 L1,.5",fa[3]="M.5,.5 L.5,1",fa),"\u2531":(da={},da[1]="M.5,.5 L1,.5",da[3]="M0,.5 L.5,.5 L.5,1",da),"\u2532":(ha={},ha[1]="M.5,.5 L0,.5",ha[3]="M0.5,1 L.5,.5 L1,.5",ha),"\u2535":(pa={},pa[1]="M.5,0 L.5,.5 L1,.5",pa[3]="M.5,.5 L0,.5",pa),"\u2536":(va={},va[1]="M.5,0 L.5,.5 L0,.5",va[3]="M.5,.5 L1,.5",va),"\u2537":(ga={},ga[1]="M.5,.5 L.5,0",ga[3]="M0,.5 L1,.5",ga),"\u2538":(ma={},ma[1]="M0,.5 L1,.5",ma[3]="M.5,.5 L.5,0",ma),"\u2539":(_a={},_a[1]="M.5,.5 L1,.5",_a[3]="M.5,0 L.5,.5 L0,.5",_a),"\u253A":(ya={},ya[1]="M.5,.5 L0,.5",ya[3]="M.5,0 L.5,.5 L1,.5",ya),"\u253D":(ba={},ba[1]="M.5,0 L.5,1 M.5,.5 L1,.5",ba[3]="M.5,.5 L0,.5",ba),"\u253E":(Ca={},Ca[1]="M.5,0 L.5,1 M.5,.5 L0,.5",Ca[3]="M.5,.5 L1,.5",Ca),"\u253F":(wa={},wa[1]="M.5,0 L.5,1",wa[3]="M0,.5 L1,.5",wa),"\u2540":(Sa={},Sa[1]="M0,.5 L1,.5 M.5,.5 L.5,1",Sa[3]="M.5,.5 L.5,0",Sa),"\u2541":(xa={},xa[1]="M.5,.5 L.5,0 M0,.5 L1,.5",xa[3]="M.5,.5 L.5,1",xa),"\u2542":(Ea={},Ea[1]="M0,.5 L1,.5",Ea[3]="M.5,0 L.5,1",Ea),"\u2543":(Aa={},Aa[1]="M0.5,1 L.5,.5 L1,.5",Aa[3]="M.5,0 L.5,.5 L0,.5",Aa),"\u2544":(ka={},ka[1]="M0,.5 L.5,.5 L.5,1",ka[3]="M.5,0 L.5,.5 L1,.5",ka),"\u2545":(Ta={},Ta[1]="M.5,0 L.5,.5 L1,.5",Ta[3]="M0,.5 L.5,.5 L.5,1",Ta),"\u2546":(La={},La[1]="M.5,0 L.5,.5 L0,.5",La[3]="M0.5,1 L.5,.5 L1,.5",La),"\u2547":(Ra={},Ra[1]="M.5,.5 L.5,1",Ra[3]="M.5,.5 L.5,0 M0,.5 L1,.5",Ra),"\u2548":(Ba={},Ba[1]="M.5,.5 L.5,0",Ba[3]="M0,.5 L1,.5 M.5,.5 L.5,1",Ba),"\u2549":(Oa={},Oa[1]="M.5,.5 L1,.5",Oa[3]="M.5,0 L.5,1 M.5,.5 L0,.5",Oa),"\u254A":(Ia={},Ia[1]="M.5,.5 L0,.5",Ia[3]="M.5,0 L.5,1 M.5,.5 L1,.5",Ia),"\u254C":($c={},$c[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",$c),"\u254D":(jc={},jc[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",jc),"\u2504":(Uc={},Uc[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",Uc),"\u2505":(Wc={},Wc[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",Wc),"\u2508":(zc={},zc[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",zc),"\u2509":(qc={},qc[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",qc),"\u254E":(Vc={},Vc[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",Vc),"\u254F":(Kc={},Kc[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",Kc),"\u2506":(Gc={},Gc[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",Gc),"\u2507":(Yc={},Yc[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",Yc),"\u250A":(Xc={},Xc[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",Xc),"\u250B":(Qc={},Qc[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",Qc),"\u256D":(Jc={},Jc[1]="C.5,1,.5,.5,1,.5",Jc),"\u256E":(Zc={},Zc[1]="C.5,1,.5,.5,0,.5",Zc),"\u256F":(eu={},eu[1]="C.5,0,.5,.5,0,.5",eu),"\u2570":(tu={},tu[1]="C.5,0,.5,.5,1,.5",tu)},i.tryDrawCustomChar=function(le,oe,Gr,ts,rs,Bt){var Yr=i.blockElementDefinitions[oe];if(Yr)return function(Qt,Qr,is,os,so,ao){for(var xr=0;xr7&&parseInt(St.substr(7,2),16)||1;else{if(!St.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+St+'" when drawing pattern glyph');lo=(xr=St.substring(5,St.length-1).split(",").map(function(s1){return parseFloat(s1)}))[0],fi=xr[1],ru=xr[2],nu=xr[3]}for(var di=0;di{Object.defineProperty(i,"__esModule",{value:!0}),i.GridCache=void 0;var s=function(){function a(){this.cache=[]}return a.prototype.resize=function(l,u){for(var c=0;c=0;S--)(y=m[S])&&(w=(C<3?y(w):C>3?y(d,f,w):y(d,f))||w);return C>3&&w&&Object.defineProperty(d,f,w),w},c=this&&this.__param||function(m,d){return function(f,h){d(f,h,m)}};Object.defineProperty(i,"__esModule",{value:!0}),i.LinkRenderLayer=void 0;var _=s(1546),v=s(8803),p=s(2040),g=s(2585),b=function(m){function d(f,h,y,C,w,S,E,k){var x=m.call(this,f,"link",h,!0,y,C,E,k)||this;return w.onShowLinkUnderline(function(A){return x._onShowLinkUnderline(A)}),w.onHideLinkUnderline(function(A){return x._onHideLinkUnderline(A)}),S.onShowLinkUnderline(function(A){return x._onShowLinkUnderline(A)}),S.onHideLinkUnderline(function(A){return x._onHideLinkUnderline(A)}),x}return l(d,m),d.prototype.resize=function(f){m.prototype.resize.call(this,f),this._state=void 0},d.prototype.reset=function(){this._clearCurrentLink()},d.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var f=this._state.y2-this._state.y1-1;f>0&&this._clearCells(0,this._state.y1+1,this._state.cols,f),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},d.prototype._onShowLinkUnderline=function(f){if(f.fg===v.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:f.fg&&(0,p.is256Color)(f.fg)?this._ctx.fillStyle=this._colors.ansi[f.fg].css:this._ctx.fillStyle=this._colors.foreground.css,f.y1===f.y2)this._fillBottomLineAtCells(f.x1,f.y1,f.x2-f.x1);else{this._fillBottomLineAtCells(f.x1,f.y1,f.cols-f.x1);for(var h=f.y1+1;h=0;T--)(x=w[T])&&(L=(A<3?x(L):A>3?x(S,E,L):x(S,E))||L);return A>3&&L&&Object.defineProperty(S,E,L),L},c=this&&this.__param||function(w,S){return function(E,k){S(E,k,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Renderer=void 0;var _=s(9596),v=s(4149),p=s(2512),g=s(5098),b=s(844),m=s(4725),d=s(2585),f=s(1420),h=s(8460),y=1,C=function(w){function S(E,k,x,A,L,T,H,P){var R=w.call(this)||this;R._colors=E,R._screenElement=k,R._bufferService=T,R._charSizeService=H,R._optionsService=P,R._id=y++,R._onRequestRedraw=new h.EventEmitter;var I=R._optionsService.rawOptions.allowTransparency;return R._renderLayers=[L.createInstance(_.TextRenderLayer,R._screenElement,0,R._colors,I,R._id),L.createInstance(v.SelectionRenderLayer,R._screenElement,1,R._colors,R._id),L.createInstance(g.LinkRenderLayer,R._screenElement,2,R._colors,R._id,x,A),L.createInstance(p.CursorRenderLayer,R._screenElement,3,R._colors,R._id,R._onRequestRedraw)],R.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},R._devicePixelRatio=window.devicePixelRatio,R._updateDimensions(),R.onOptionsChanged(),R}return l(S,w),Object.defineProperty(S.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),S.prototype.dispose=function(){for(var E=0,k=this._renderLayers;E{Object.defineProperty(i,"__esModule",{value:!0}),i.throwIfFalsy=void 0,i.throwIfFalsy=function(s){if(!s)throw new Error("value must not be falsy");return s}},4149:function(o,i,s){var a,l=this&&this.__extends||(a=function(g,b){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,d){m.__proto__=d}||function(m,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(m[f]=d[f])},a(g,b)},function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function m(){this.constructor=g}a(g,b),g.prototype=b===null?Object.create(b):(m.prototype=b.prototype,new m)}),u=this&&this.__decorate||function(g,b,m,d){var f,h=arguments.length,y=h<3?b:d===null?d=Object.getOwnPropertyDescriptor(b,m):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(g,b,m,d);else for(var C=g.length-1;C>=0;C--)(f=g[C])&&(y=(h<3?f(y):h>3?f(b,m,y):f(b,m))||y);return h>3&&y&&Object.defineProperty(b,m,y),y},c=this&&this.__param||function(g,b){return function(m,d){b(m,d,g)}};Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionRenderLayer=void 0;var _=s(1546),v=s(2585),p=function(g){function b(m,d,f,h,y,C){var w=g.call(this,m,"selection",d,!0,f,h,y,C)||this;return w._clearState(),w}return l(b,g),b.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},b.prototype.resize=function(m){g.prototype.resize.call(this,m),this._clearState()},b.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},b.prototype.onSelectionChanged=function(m,d,f){if(this._didStateChange(m,d,f,this._bufferService.buffer.ydisp))if(this._clearAll(),m&&d){var h=m[1]-this._bufferService.buffer.ydisp,y=d[1]-this._bufferService.buffer.ydisp,C=Math.max(h,0),w=Math.min(y,this._bufferService.rows-1);if(C>=this._bufferService.rows||w<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=this._colors.selectionTransparent.css,f){var S=m[0],E=d[0]-S,k=w-C+1;this._fillCells(S,C,E,k)}else{S=h===C?m[0]:0;var x=C===y?d[0]:this._bufferService.cols;this._fillCells(S,C,x-S,1);var A=Math.max(w-C-1,0);if(this._fillCells(0,C+1,this._bufferService.cols,A),C!==w){var L=y===w?d[0]:this._bufferService.cols;this._fillCells(0,w,L,1)}}this._state.start=[m[0],m[1]],this._state.end=[d[0],d[1]],this._state.columnSelectMode=f,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},b.prototype._didStateChange=function(m,d,f,h){return!this._areCoordinatesEqual(m,this._state.start)||!this._areCoordinatesEqual(d,this._state.end)||f!==this._state.columnSelectMode||h!==this._state.ydisp},b.prototype._areCoordinatesEqual=function(m,d){return!(!m||!d)&&m[0]===d[0]&&m[1]===d[1]},u([c(4,v.IBufferService),c(5,v.IOptionsService)],b)}(_.BaseRenderLayer);i.SelectionRenderLayer=p},9596:function(o,i,s){var a,l=this&&this.__extends||(a=function(y,C){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,S){w.__proto__=S}||function(w,S){for(var E in S)Object.prototype.hasOwnProperty.call(S,E)&&(w[E]=S[E])},a(y,C)},function(y,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");function w(){this.constructor=y}a(y,C),y.prototype=C===null?Object.create(C):(w.prototype=C.prototype,new w)}),u=this&&this.__decorate||function(y,C,w,S){var E,k=arguments.length,x=k<3?C:S===null?S=Object.getOwnPropertyDescriptor(C,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(y,C,w,S);else for(var A=y.length-1;A>=0;A--)(E=y[A])&&(x=(k<3?E(x):k>3?E(C,w,x):E(C,w))||x);return k>3&&x&&Object.defineProperty(C,w,x),x},c=this&&this.__param||function(y,C){return function(w,S){C(w,S,y)}};Object.defineProperty(i,"__esModule",{value:!0}),i.TextRenderLayer=void 0;var _=s(3700),v=s(1546),p=s(3734),g=s(643),b=s(511),m=s(2585),d=s(4725),f=s(4269),h=function(y){function C(w,S,E,k,x,A,L,T){var H=y.call(this,w,"text",S,k,E,x,A,L)||this;return H._characterJoinerService=T,H._characterWidth=0,H._characterFont="",H._characterOverlapCache={},H._workCell=new b.CellData,H._state=new _.GridCache,H}return l(C,y),C.prototype.resize=function(w){y.prototype.resize.call(this,w);var S=this._getFont(!1,!1);this._characterWidth===w.scaledCharWidth&&this._characterFont===S||(this._characterWidth=w.scaledCharWidth,this._characterFont=S,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},C.prototype.reset=function(){this._state.clear(),this._clearAll()},C.prototype._forEachCell=function(w,S,E){for(var k=w;k<=S;k++)for(var x=k+this._bufferService.buffer.ydisp,A=this._bufferService.buffer.lines.get(x),L=this._characterJoinerService.getJoinedCharacters(x),T=0;T0&&T===L[0][0]){P=!0;var I=L.shift();H=new f.JoinedCellData(this._workCell,A.translateToString(!0,I[0],I[1]),I[1]-I[0]),R=I[1]-1}!P&&this._isOverlapping(H)&&Rthis._characterWidth;return this._ctx.restore(),this._characterOverlapCache[S]=E,E},u([c(5,m.IBufferService),c(6,m.IOptionsService),c(7,d.ICharacterJoinerService)],C)}(v.BaseRenderLayer);i.TextRenderLayer=h},9616:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BaseCharAtlas=void 0;var s=function(){function a(){this._didWarmUp=!1}return a.prototype.dispose=function(){},a.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},a.prototype._doWarmUp=function(){},a.prototype.clear=function(){},a.prototype.beginFrame=function(){},a}();i.BaseCharAtlas=s},1420:(o,i,s)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.removeTerminalFromCache=i.acquireCharAtlas=void 0;var a=s(2040),l=s(1906),u=[];i.acquireCharAtlas=function(c,_,v,p,g){for(var b=(0,a.generateConfig)(p,g,c,v),m=0;m=0){if((0,a.configEquals)(f.config,b))return f.atlas;f.ownedBy.length===1?(f.atlas.dispose(),u.splice(m,1)):f.ownedBy.splice(d,1);break}}for(m=0;m{Object.defineProperty(i,"__esModule",{value:!0}),i.CHAR_ATLAS_CELL_SPACING=i.TEXT_BASELINE=i.DIM_OPACITY=i.INVERTED_DEFAULT_COLOR=void 0;var a=s(6114);i.INVERTED_DEFAULT_COLOR=257,i.DIM_OPACITY=.5,i.TEXT_BASELINE=a.isFirefox||a.isLegacyEdge?"bottom":"ideographic",i.CHAR_ATLAS_CELL_SPACING=1},1906:function(o,i,s){var a,l=this&&this.__extends||(a=function(S,E){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,x){k.__proto__=x}||function(k,x){for(var A in x)Object.prototype.hasOwnProperty.call(x,A)&&(k[A]=x[A])},a(S,E)},function(S,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function k(){this.constructor=S}a(S,E),S.prototype=E===null?Object.create(E):(k.prototype=E.prototype,new k)});Object.defineProperty(i,"__esModule",{value:!0}),i.NoneCharAtlas=i.DynamicCharAtlas=i.getGlyphCacheKey=void 0;var u=s(8803),c=s(9616),_=s(5680),v=s(7001),p=s(6114),g=s(1752),b=s(4774),m=1024,d=1024,f={css:"rgba(0, 0, 0, 0)",rgba:0};function h(S){return S.code<<21|S.bg<<12|S.fg<<3|(S.bold?0:4)+(S.dim?0:2)+(S.italic?0:1)}i.getGlyphCacheKey=h;var y=function(S){function E(k,x){var A=S.call(this)||this;A._config=x,A._drawToCacheCount=0,A._glyphsWaitingOnBitmap=[],A._bitmapCommitTimeout=null,A._bitmap=null,A._cacheCanvas=k.createElement("canvas"),A._cacheCanvas.width=m,A._cacheCanvas.height=d,A._cacheCtx=(0,g.throwIfFalsy)(A._cacheCanvas.getContext("2d",{alpha:!0}));var L=k.createElement("canvas");L.width=A._config.scaledCharWidth,L.height=A._config.scaledCharHeight,A._tmpCtx=(0,g.throwIfFalsy)(L.getContext("2d",{alpha:A._config.allowTransparency})),A._width=Math.floor(m/A._config.scaledCharWidth),A._height=Math.floor(d/A._config.scaledCharHeight);var T=A._width*A._height;return A._cacheMap=new v.LRUMap(T),A._cacheMap.prealloc(T),A}return l(E,S),E.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},E.prototype.beginFrame=function(){this._drawToCacheCount=0},E.prototype.clear=function(){if(this._cacheMap.size>0){var k=this._width*this._height;this._cacheMap=new v.LRUMap(k),this._cacheMap.prealloc(k)}this._cacheCtx.clearRect(0,0,m,d),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)},E.prototype.draw=function(k,x,A,L){if(x.code===32)return!0;if(!this._canCache(x))return!1;var T=h(x),H=this._cacheMap.get(T);if(H!=null)return this._drawFromCache(k,H,A,L),!0;if(this._drawToCacheCount<100){var P;P=this._cacheMap.size>>24,A=E.rgba>>>16&255,L=E.rgba>>>8&255,T=0;T{Object.defineProperty(i,"__esModule",{value:!0}),i.LRUMap=void 0;var s=function(){function a(l){this.capacity=l,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return a.prototype._unlinkNode=function(l){var u=l.prev,c=l.next;l===this._head&&(this._head=c),l===this._tail&&(this._tail=u),u!==null&&(u.next=c),c!==null&&(c.prev=u)},a.prototype._appendNode=function(l){var u=this._tail;u!==null&&(u.next=l),l.prev=u,l.next=null,this._tail=l,this._head===null&&(this._head=l)},a.prototype.prealloc=function(l){for(var u=this._nodePool,c=0;c=this.capacity)c=this._head,this._unlinkNode(c),delete this._map[c.key],c.key=l,c.value=u,this._map[l]=c;else{var _=this._nodePool;_.length>0?((c=_.pop()).key=l,c.value=u):c={prev:null,next:null,key:l,value:u},this._map[l]=c,this.size++}this._appendNode(c)},a}();i.LRUMap=s},1296:function(o,i,s){var a,l=this&&this.__extends||(a=function(k,x){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,L){A.__proto__=L}||function(A,L){for(var T in L)Object.prototype.hasOwnProperty.call(L,T)&&(A[T]=L[T])},a(k,x)},function(k,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");function A(){this.constructor=k}a(k,x),k.prototype=x===null?Object.create(x):(A.prototype=x.prototype,new A)}),u=this&&this.__decorate||function(k,x,A,L){var T,H=arguments.length,P=H<3?x:L===null?L=Object.getOwnPropertyDescriptor(x,A):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(k,x,A,L);else for(var R=k.length-1;R>=0;R--)(T=k[R])&&(P=(H<3?T(P):H>3?T(x,A,P):T(x,A))||P);return H>3&&P&&Object.defineProperty(x,A,P),P},c=this&&this.__param||function(k,x){return function(A,L){x(A,L,k)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRenderer=void 0;var _=s(3787),v=s(8803),p=s(844),g=s(4725),b=s(2585),m=s(8460),d=s(4774),f=s(9631),h="xterm-dom-renderer-owner-",y="xterm-fg-",C="xterm-bg-",w="xterm-focus",S=1,E=function(k){function x(A,L,T,H,P,R,I,M,$,V){var U=k.call(this)||this;return U._colors=A,U._element=L,U._screenElement=T,U._viewportElement=H,U._linkifier=P,U._linkifier2=R,U._charSizeService=M,U._optionsService=$,U._bufferService=V,U._terminalClass=S++,U._rowElements=[],U._rowContainer=document.createElement("div"),U._rowContainer.classList.add("xterm-rows"),U._rowContainer.style.lineHeight="normal",U._rowContainer.setAttribute("aria-hidden","true"),U._refreshRowElements(U._bufferService.cols,U._bufferService.rows),U._selectionContainer=document.createElement("div"),U._selectionContainer.classList.add("xterm-selection"),U._selectionContainer.setAttribute("aria-hidden","true"),U.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},U._updateDimensions(),U._injectCss(),U._rowFactory=I.createInstance(_.DomRendererRowFactory,document,U._colors),U._element.classList.add(h+U._terminalClass),U._screenElement.appendChild(U._rowContainer),U._screenElement.appendChild(U._selectionContainer),U._linkifier.onShowLinkUnderline(function(Y){return U._onLinkHover(Y)}),U._linkifier.onHideLinkUnderline(function(Y){return U._onLinkLeave(Y)}),U._linkifier2.onShowLinkUnderline(function(Y){return U._onLinkHover(Y)}),U._linkifier2.onHideLinkUnderline(function(Y){return U._onLinkLeave(Y)}),U}return l(x,k),Object.defineProperty(x.prototype,"onRequestRedraw",{get:function(){return new m.EventEmitter().event},enumerable:!1,configurable:!0}),x.prototype.dispose=function(){this._element.classList.remove(h+this._terminalClass),(0,f.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),k.prototype.dispose.call(this)},x.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var A=0,L=this._rowElements;AL;)this._rowContainer.removeChild(this._rowElements.pop())},x.prototype.onResize=function(A,L){this._refreshRowElements(A,L),this._updateDimensions()},x.prototype.onCharSizeChanged=function(){this._updateDimensions()},x.prototype.onBlur=function(){this._rowContainer.classList.remove(w)},x.prototype.onFocus=function(){this._rowContainer.classList.add(w)},x.prototype.onSelectionChanged=function(A,L,T){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(A&&L){var H=A[1]-this._bufferService.buffer.ydisp,P=L[1]-this._bufferService.buffer.ydisp,R=Math.max(H,0),I=Math.min(P,this._bufferService.rows-1);if(!(R>=this._bufferService.rows||I<0)){var M=document.createDocumentFragment();if(T)M.appendChild(this._createSelectionElement(R,A[0],L[0],I-R+1));else{var $=H===R?A[0]:0,V=R===P?L[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(R,$,V));var U=I-R-1;if(M.appendChild(this._createSelectionElement(R+1,0,this._bufferService.cols,U)),R!==I){var Y=P===I?L[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(I,0,Y))}}this._selectionContainer.appendChild(M)}}},x.prototype._createSelectionElement=function(A,L,T,H){H===void 0&&(H=1);var P=document.createElement("div");return P.style.height=H*this.dimensions.actualCellHeight+"px",P.style.top=A*this.dimensions.actualCellHeight+"px",P.style.left=L*this.dimensions.actualCellWidth+"px",P.style.width=this.dimensions.actualCellWidth*(T-L)+"px",P},x.prototype.onCursorMove=function(){},x.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},x.prototype.clear=function(){for(var A=0,L=this._rowElements;A=P&&(A=0,T++)}},u([c(6,b.IInstantiationService),c(7,g.ICharSizeService),c(8,b.IOptionsService),c(9,b.IBufferService)],x)}(p.Disposable);i.DomRenderer=E},3787:function(o,i,s){var a=this&&this.__decorate||function(f,h,y,C){var w,S=arguments.length,E=S<3?h:C===null?C=Object.getOwnPropertyDescriptor(h,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(f,h,y,C);else for(var k=f.length-1;k>=0;k--)(w=f[k])&&(E=(S<3?w(E):S>3?w(h,y,E):w(h,y))||E);return S>3&&E&&Object.defineProperty(h,y,E),E},l=this&&this.__param||function(f,h){return function(y,C){h(y,C,f)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRendererRowFactory=i.CURSOR_STYLE_UNDERLINE_CLASS=i.CURSOR_STYLE_BAR_CLASS=i.CURSOR_STYLE_BLOCK_CLASS=i.CURSOR_BLINK_CLASS=i.CURSOR_CLASS=i.STRIKETHROUGH_CLASS=i.UNDERLINE_CLASS=i.ITALIC_CLASS=i.DIM_CLASS=i.BOLD_CLASS=void 0;var u=s(8803),c=s(643),_=s(511),v=s(2585),p=s(4774),g=s(4725),b=s(4269);i.BOLD_CLASS="xterm-bold",i.DIM_CLASS="xterm-dim",i.ITALIC_CLASS="xterm-italic",i.UNDERLINE_CLASS="xterm-underline",i.STRIKETHROUGH_CLASS="xterm-strikethrough",i.CURSOR_CLASS="xterm-cursor",i.CURSOR_BLINK_CLASS="xterm-cursor-blink",i.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",i.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",i.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var m=function(){function f(h,y,C,w,S){this._document=h,this._colors=y,this._characterJoinerService=C,this._optionsService=w,this._coreService=S,this._workCell=new _.CellData}return f.prototype.setColors=function(h){this._colors=h},f.prototype.createRow=function(h,y,C,w,S,E,k,x){for(var A=this._document.createDocumentFragment(),L=this._characterJoinerService.getJoinedCharacters(y),T=0,H=Math.min(h.length,x)-1;H>=0;H--)if(h.loadCell(H,this._workCell).getCode()!==c.NULL_CELL_CODE||C&&H===S){T=H+1;break}for(H=0;H0&&H===L[0][0]){R=!0;var $=L.shift();M=new b.JoinedCellData(this._workCell,h.translateToString(!0,$[0],$[1]),$[1]-$[0]),I=$[1]-1,P=M.getWidth()}var V=this._document.createElement("span");if(P>1&&(V.style.width=k*P+"px"),R&&(V.style.display="inline",S>=H&&S<=I&&(S=H)),!this._coreService.isCursorHidden&&C&&H===S)switch(V.classList.add(i.CURSOR_CLASS),E&&V.classList.add(i.CURSOR_BLINK_CLASS),w){case"bar":V.classList.add(i.CURSOR_STYLE_BAR_CLASS);break;case"underline":V.classList.add(i.CURSOR_STYLE_UNDERLINE_CLASS);break;default:V.classList.add(i.CURSOR_STYLE_BLOCK_CLASS)}M.isBold()&&V.classList.add(i.BOLD_CLASS),M.isItalic()&&V.classList.add(i.ITALIC_CLASS),M.isDim()&&V.classList.add(i.DIM_CLASS),M.isUnderline()&&V.classList.add(i.UNDERLINE_CLASS),M.isInvisible()?V.textContent=c.WHITESPACE_CELL_CHAR:V.textContent=M.getChars()||c.WHITESPACE_CELL_CHAR,M.isStrikethrough()&&V.classList.add(i.STRIKETHROUGH_CLASS);var U=M.getFgColor(),Y=M.getFgColorMode(),Z=M.getBgColor(),te=M.getBgColorMode(),B=!!M.isInverse();if(B){var z=U;U=Z,Z=z;var O=Y;Y=te,te=O}switch(Y){case 16777216:case 33554432:M.isBold()&&U<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(U+=8),this._applyMinimumContrast(V,this._colors.background,this._colors.ansi[U])||V.classList.add("xterm-fg-"+U);break;case 50331648:var D=p.rgba.toColor(U>>16&255,U>>8&255,255&U);this._applyMinimumContrast(V,this._colors.background,D)||this._addStyle(V,"color:#"+d(U.toString(16),"0",6));break;default:this._applyMinimumContrast(V,this._colors.background,this._colors.foreground)||B&&V.classList.add("xterm-fg-"+u.INVERTED_DEFAULT_COLOR)}switch(te){case 16777216:case 33554432:V.classList.add("xterm-bg-"+Z);break;case 50331648:this._addStyle(V,"background-color:#"+d(Z.toString(16),"0",6));break;default:B&&V.classList.add("xterm-bg-"+u.INVERTED_DEFAULT_COLOR)}A.appendChild(V),H=I}}return A},f.prototype._applyMinimumContrast=function(h,y,C){if(this._optionsService.rawOptions.minimumContrastRatio===1)return!1;var w=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return w===void 0&&(w=p.color.ensureContrastRatio(y,C,this._optionsService.rawOptions.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,w!=null?w:null)),!!w&&(this._addStyle(h,"color:"+w.css),!0)},f.prototype._addStyle=function(h,y){h.setAttribute("style",""+(h.getAttribute("style")||"")+y+";")},a([l(2,g.ICharacterJoinerService),l(3,v.IOptionsService),l(4,v.ICoreService)],f)}();function d(f,h,y){for(;f.length{Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionModel=void 0;var s=function(){function a(l){this._bufferService=l,this.isSelectAllActive=!1,this.selectionStartLength=0}return a.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(a.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?l%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)-1]:[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[l,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),a.prototype.areSelectionValuesReversed=function(){var l=this.selectionStart,u=this.selectionEnd;return!(!l||!u)&&(l[1]>u[1]||l[1]===u[1]&&l[0]>u[0])},a.prototype.onTrim=function(l){return this.selectionStart&&(this.selectionStart[1]-=l),this.selectionEnd&&(this.selectionEnd[1]-=l),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},a}();i.SelectionModel=s},428:function(o,i,s){var a=this&&this.__decorate||function(p,g,b,m){var d,f=arguments.length,h=f<3?g:m===null?m=Object.getOwnPropertyDescriptor(g,b):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(p,g,b,m);else for(var y=p.length-1;y>=0;y--)(d=p[y])&&(h=(f<3?d(h):f>3?d(g,b,h):d(g,b))||h);return f>3&&h&&Object.defineProperty(g,b,h),h},l=this&&this.__param||function(p,g){return function(b,m){g(b,m,p)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharSizeService=void 0;var u=s(2585),c=s(8460),_=function(){function p(g,b,m){this._optionsService=m,this.width=0,this.height=0,this._onCharSizeChange=new c.EventEmitter,this._measureStrategy=new v(g,b,this._optionsService)}return Object.defineProperty(p.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),p.prototype.measure=function(){var g=this._measureStrategy.measure();g.width===this.width&&g.height===this.height||(this.width=g.width,this.height=g.height,this._onCharSizeChange.fire())},a([l(2,u.IOptionsService)],p)}();i.CharSizeService=_;var v=function(){function p(g,b,m){this._document=g,this._parentElement=b,this._optionsService=m,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return p.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var g=this._measureElement.getBoundingClientRect();return g.width!==0&&g.height!==0&&(this._result.width=g.width,this._result.height=Math.ceil(g.height)),this._result},p}()},4269:function(o,i,s){var a,l=this&&this.__extends||(a=function(d,f){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,y){h.__proto__=y}||function(h,y){for(var C in y)Object.prototype.hasOwnProperty.call(y,C)&&(h[C]=y[C])},a(d,f)},function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");function h(){this.constructor=d}a(d,f),d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}),u=this&&this.__decorate||function(d,f,h,y){var C,w=arguments.length,S=w<3?f:y===null?y=Object.getOwnPropertyDescriptor(f,h):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(d,f,h,y);else for(var E=d.length-1;E>=0;E--)(C=d[E])&&(S=(w<3?C(S):w>3?C(f,h,S):C(f,h))||S);return w>3&&S&&Object.defineProperty(f,h,S),S},c=this&&this.__param||function(d,f){return function(h,y){f(h,y,d)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharacterJoinerService=i.JoinedCellData=void 0;var _=s(3734),v=s(643),p=s(511),g=s(2585),b=function(d){function f(h,y,C){var w=d.call(this)||this;return w.content=0,w.combinedData="",w.fg=h.fg,w.bg=h.bg,w.combinedData=y,w._width=C,w}return l(f,d),f.prototype.isCombined=function(){return 2097152},f.prototype.getWidth=function(){return this._width},f.prototype.getChars=function(){return this.combinedData},f.prototype.getCode=function(){return 2097151},f.prototype.setFromCharData=function(h){throw new Error("not implemented")},f.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},f}(_.AttributeData);i.JoinedCellData=b;var m=function(){function d(f){this._bufferService=f,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new p.CellData}return d.prototype.register=function(f){var h={id:this._nextCharacterJoinerId++,handler:f};return this._characterJoiners.push(h),h.id},d.prototype.deregister=function(f){for(var h=0;h1)for(var L=this._getJoinedRanges(C,E,S,h,w),T=0;T1)for(L=this._getJoinedRanges(C,E,S,h,w),T=0;T{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreBrowserService=void 0;var s=function(){function a(l){this._textarea=l}return Object.defineProperty(a.prototype,"isFocused",{get:function(){return(this._textarea.getRootNode?this._textarea.getRootNode():document).activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),a}();i.CoreBrowserService=s},7641:function(o,i,s){var a,l=this&&this.__extends||(a=function(m,d){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&(f[y]=h[y])},a(m,d)},function(m,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function f(){this.constructor=m}a(m,d),m.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}),u=this&&this.__decorate||function(m,d,f,h){var y,C=arguments.length,w=C<3?d:h===null?h=Object.getOwnPropertyDescriptor(d,f):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(m,d,f,h);else for(var S=m.length-1;S>=0;S--)(y=m[S])&&(w=(C<3?y(w):C>3?y(d,f,w):y(d,f))||w);return C>3&&w&&Object.defineProperty(d,f,w),w},c=this&&this.__param||function(m,d){return function(f,h){d(f,h,m)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Decoration=i.DecorationService=void 0;var _=s(8460),v=s(844),p=s(2585),g=function(m){function d(f){var h=m.call(this)||this;return h._instantiationService=f,h._decorations=[],h}return l(d,m),d.prototype.attachToDom=function(f,h){var y=this;this._renderService=h,this._screenElement=f,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),f.appendChild(this._container),this.register(this._renderService.onRenderedBufferChange(function(){return y.refresh()})),this.register(this._renderService.onDimensionsChange(function(){return y.refresh(!0)}))},d.prototype.registerDecoration=function(f){var h=this;if(!f.marker.isDisposed&&this._container){var y=this._instantiationService.createInstance(b,f,this._container);return this._decorations.push(y),y.onDispose(function(){return h._decorations.splice(h._decorations.indexOf(y),1)}),this._queueRefresh(),y}},d.prototype._queueRefresh=function(){var f=this;this._animationFrame===void 0&&(this._animationFrame=window.requestAnimationFrame(function(){f.refresh(),f._animationFrame=void 0}))},d.prototype.refresh=function(f){if(this._renderService)for(var h=0,y=this._decorations;hthis._bufferService.cols&&(this._element.style.display="none"),this.anchor==="right"?this._element.style.right=this.x?this.x*f.dimensions.actualCellWidth+"px":"":this._element.style.left=this.x?this.x*f.dimensions.actualCellWidth+"px":""},d.prototype._refreshStyle=function(f){if(this._element){var h=this.marker.line-this._bufferService.buffers.active.ydisp;h<0||h>this._bufferService.rows?this._element.style.display="none":(this._element.style.top=h*f.dimensions.actualCellHeight+"px",this._element.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block")}},d.prototype.dispose=function(){this.isDisposed||(this._element&&this._container.contains(this._element)&&this._container.removeChild(this._element),this.isDisposed=!0,this._onDispose.fire())},u([c(2,p.IBufferService)],d)}(v.Disposable);i.Decoration=b},8934:function(o,i,s){var a=this&&this.__decorate||function(v,p,g,b){var m,d=arguments.length,f=d<3?p:b===null?b=Object.getOwnPropertyDescriptor(p,g):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(v,p,g,b);else for(var h=v.length-1;h>=0;h--)(m=v[h])&&(f=(d<3?m(f):d>3?m(p,g,f):m(p,g))||f);return d>3&&f&&Object.defineProperty(p,g,f),f},l=this&&this.__param||function(v,p){return function(g,b){p(g,b,v)}};Object.defineProperty(i,"__esModule",{value:!0}),i.MouseService=void 0;var u=s(4725),c=s(9806),_=function(){function v(p,g){this._renderService=p,this._charSizeService=g}return v.prototype.getCoords=function(p,g,b,m,d){return(0,c.getCoords)(p,g,b,m,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,d)},v.prototype.getRawByteCoords=function(p,g,b,m){var d=this.getCoords(p,g,b,m);return(0,c.getRawByteCoords)(d)},a([l(0,u.IRenderService),l(1,u.ICharSizeService)],v)}();i.MouseService=_},3230:function(o,i,s){var a,l=this&&this.__extends||(a=function(h,y){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,w){C.__proto__=w}||function(C,w){for(var S in w)Object.prototype.hasOwnProperty.call(w,S)&&(C[S]=w[S])},a(h,y)},function(h,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function C(){this.constructor=h}a(h,y),h.prototype=y===null?Object.create(y):(C.prototype=y.prototype,new C)}),u=this&&this.__decorate||function(h,y,C,w){var S,E=arguments.length,k=E<3?y:w===null?w=Object.getOwnPropertyDescriptor(y,C):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(h,y,C,w);else for(var x=h.length-1;x>=0;x--)(S=h[x])&&(k=(E<3?S(k):E>3?S(y,C,k):S(y,C))||k);return E>3&&k&&Object.defineProperty(y,C,k),k},c=this&&this.__param||function(h,y){return function(C,w){y(C,w,h)}};Object.defineProperty(i,"__esModule",{value:!0}),i.RenderService=void 0;var _=s(6193),v=s(8460),p=s(844),g=s(5596),b=s(3656),m=s(2585),d=s(4725),f=function(h){function y(C,w,S,E,k,x){var A=h.call(this)||this;if(A._renderer=C,A._rowCount=w,A._charSizeService=k,A._isPaused=!1,A._needsFullRefresh=!1,A._isNextRenderRedrawOnly=!0,A._needsSelectionRefresh=!1,A._canvasWidth=0,A._canvasHeight=0,A._selectionState={start:void 0,end:void 0,columnSelectMode:!1},A._onDimensionsChange=new v.EventEmitter,A._onRender=new v.EventEmitter,A._onRefreshRequest=new v.EventEmitter,A.register({dispose:function(){return A._renderer.dispose()}}),A._renderDebouncer=new _.RenderDebouncer(function(T,H){return A._renderRows(T,H)}),A.register(A._renderDebouncer),A._screenDprMonitor=new g.ScreenDprMonitor,A._screenDprMonitor.setListener(function(){return A.onDevicePixelRatioChange()}),A.register(A._screenDprMonitor),A.register(x.onResize(function(){return A._fullRefresh()})),A.register(x.buffers.onBufferActivate(function(){var T;return(T=A._renderer)===null||T===void 0?void 0:T.clear()})),A.register(E.onOptionChange(function(){return A._renderer.onOptionsChanged()})),A.register(A._charSizeService.onCharSizeChange(function(){return A.onCharSizeChanged()})),A._renderer.onRequestRedraw(function(T){return A.refreshRows(T.start,T.end,!0)}),A.register((0,b.addDisposableDomListener)(window,"resize",function(){return A.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var L=new IntersectionObserver(function(T){return A._onIntersectionChange(T[T.length-1])},{threshold:0});L.observe(S),A.register({dispose:function(){return L.disconnect()}})}return A}return l(y,h),Object.defineProperty(y.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),y.prototype._onIntersectionChange=function(C){this._isPaused=C.isIntersecting===void 0?C.intersectionRatio===0:!C.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},y.prototype.refreshRows=function(C,w,S){S===void 0&&(S=!1),this._isPaused?this._needsFullRefresh=!0:(S||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(C,w,this._rowCount))},y.prototype._renderRows=function(C,w){this._renderer.renderRows(C,w),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:C,end:w}),this._isNextRenderRedrawOnly=!0},y.prototype.resize=function(C,w){this._rowCount=w,this._fireOnCanvasResize()},y.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},y.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},y.prototype.dispose=function(){h.prototype.dispose.call(this)},y.prototype.setRenderer=function(C){var w=this;this._renderer.dispose(),this._renderer=C,this._renderer.onRequestRedraw(function(S){return w.refreshRows(S.start,S.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},y.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},y.prototype.clearTextureAtlas=function(){var C,w;(w=(C=this._renderer)===null||C===void 0?void 0:C.clearTextureAtlas)===null||w===void 0||w.call(C),this._fullRefresh()},y.prototype.setColors=function(C){this._renderer.setColors(C),this._fullRefresh()},y.prototype.onDevicePixelRatioChange=function(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},y.prototype.onResize=function(C,w){this._renderer.onResize(C,w),this._fullRefresh()},y.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},y.prototype.onBlur=function(){this._renderer.onBlur()},y.prototype.onFocus=function(){this._renderer.onFocus()},y.prototype.onSelectionChanged=function(C,w,S){this._selectionState.start=C,this._selectionState.end=w,this._selectionState.columnSelectMode=S,this._renderer.onSelectionChanged(C,w,S)},y.prototype.onCursorMove=function(){this._renderer.onCursorMove()},y.prototype.clear=function(){this._renderer.clear()},u([c(3,m.IOptionsService),c(4,d.ICharSizeService),c(5,m.IBufferService)],y)}(p.Disposable);i.RenderService=f},9312:function(o,i,s){var a,l=this&&this.__extends||(a=function(E,k){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,A){x.__proto__=A}||function(x,A){for(var L in A)Object.prototype.hasOwnProperty.call(A,L)&&(x[L]=A[L])},a(E,k)},function(E,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");function x(){this.constructor=E}a(E,k),E.prototype=k===null?Object.create(k):(x.prototype=k.prototype,new x)}),u=this&&this.__decorate||function(E,k,x,A){var L,T=arguments.length,H=T<3?k:A===null?A=Object.getOwnPropertyDescriptor(k,x):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(E,k,x,A);else for(var P=E.length-1;P>=0;P--)(L=E[P])&&(H=(T<3?L(H):T>3?L(k,x,H):L(k,x))||H);return T>3&&H&&Object.defineProperty(k,x,H),H},c=this&&this.__param||function(E,k){return function(x,A){k(x,A,E)}};Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionService=void 0;var _=s(6114),v=s(456),p=s(511),g=s(8460),b=s(4725),m=s(2585),d=s(9806),f=s(9504),h=s(844),y=s(4841),C=String.fromCharCode(160),w=new RegExp(C,"g"),S=function(E){function k(x,A,L,T,H,P,R,I){var M=E.call(this)||this;return M._element=x,M._screenElement=A,M._linkifier=L,M._bufferService=T,M._coreService=H,M._mouseService=P,M._optionsService=R,M._renderService=I,M._dragScrollAmount=0,M._enabled=!0,M._workCell=new p.CellData,M._mouseDownTimeStamp=0,M._oldHasSelection=!1,M._oldSelectionStart=void 0,M._oldSelectionEnd=void 0,M._onLinuxMouseSelection=M.register(new g.EventEmitter),M._onRedrawRequest=M.register(new g.EventEmitter),M._onSelectionChange=M.register(new g.EventEmitter),M._onRequestScrollLines=M.register(new g.EventEmitter),M._mouseMoveListener=function($){return M._onMouseMove($)},M._mouseUpListener=function($){return M._onMouseUp($)},M._coreService.onUserInput(function(){M.hasSelection&&M.clearSelection()}),M._trimListener=M._bufferService.buffer.lines.onTrim(function($){return M._onTrim($)}),M.register(M._bufferService.buffers.onBufferActivate(function($){return M._onBufferActivate($)})),M.enable(),M._model=new v.SelectionModel(M._bufferService),M._activeSelectionMode=0,M}return l(k,E),Object.defineProperty(k.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),k.prototype.dispose=function(){this._removeMouseDownListeners()},k.prototype.reset=function(){this.clearSelection()},k.prototype.disable=function(){this.clearSelection(),this._enabled=!1},k.prototype.enable=function(){this._enabled=!0},Object.defineProperty(k.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"hasSelection",{get:function(){var x=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!(!x||!A||x[0]===A[0]&&x[1]===A[1])},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"selectionText",{get:function(){var x=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;if(!x||!A)return"";var L=this._bufferService.buffer,T=[];if(this._activeSelectionMode===3){if(x[0]===A[0])return"";for(var H=x[1];H<=A[1];H++){var P=L.translateBufferLineToString(H,!0,x[0],A[0]);T.push(P)}}else{var R=x[1]===A[1]?A[0]:void 0;for(T.push(L.translateBufferLineToString(x[1],!0,x[0],R)),H=x[1]+1;H<=A[1]-1;H++){var I=L.lines.get(H);P=L.translateBufferLineToString(H,!0),I!=null&&I.isWrapped?T[T.length-1]+=P:T.push(P)}x[1]!==A[1]&&(I=L.lines.get(A[1]),P=L.translateBufferLineToString(A[1],!0,0,A[0]),I&&I.isWrapped?T[T.length-1]+=P:T.push(P))}return T.map(function(M){return M.replace(w," ")}).join(_.isWindows?`\r
-`:`
-`)},enumerable:!1,configurable:!0}),k.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},k.prototype.refresh=function(x){var A=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return A._refresh()})),_.isLinux&&x&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},k.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},k.prototype._isClickInSelection=function(x){var A=this._getMouseBufferCoords(x),L=this._model.finalSelectionStart,T=this._model.finalSelectionEnd;return!!(L&&T&&A)&&this._areCoordsInSelection(A,L,T)},k.prototype._areCoordsInSelection=function(x,A,L){return x[1]>A[1]&&x[1]=A[0]&&x[0]=A[0]},k.prototype._selectWordAtCursor=function(x,A){var L,T,H=(T=(L=this._linkifier.currentLink)===null||L===void 0?void 0:L.link)===null||T===void 0?void 0:T.range;if(H)return this._model.selectionStart=[H.start.x-1,H.start.y-1],this._model.selectionStartLength=(0,y.getRangeLength)(H,this._bufferService.cols),this._model.selectionEnd=void 0,!0;var P=this._getMouseBufferCoords(x);return!!P&&(this._selectWordAt(P,A),this._model.selectionEnd=void 0,!0)},k.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},k.prototype.selectLines=function(x,A){this._model.clearSelection(),x=Math.max(x,0),A=Math.min(A,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,x],this._model.selectionEnd=[this._bufferService.cols,A],this.refresh(),this._onSelectionChange.fire()},k.prototype._onTrim=function(x){this._model.onTrim(x)&&this.refresh()},k.prototype._getMouseBufferCoords=function(x){var A=this._mouseService.getCoords(x,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(A)return A[0]--,A[1]--,A[1]+=this._bufferService.buffer.ydisp,A},k.prototype._getMouseEventScrollAmount=function(x){var A=(0,d.getCoordsRelativeToElement)(x,this._screenElement)[1],L=this._renderService.dimensions.canvasHeight;return A>=0&&A<=L?0:(A>L&&(A-=L),A=Math.min(Math.max(A,-50),50),(A/=50)/Math.abs(A)+Math.round(14*A))},k.prototype.shouldForceSelection=function(x){return _.isMac?x.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:x.shiftKey},k.prototype.onMouseDown=function(x){if(this._mouseDownTimeStamp=x.timeStamp,(x.button!==2||!this.hasSelection)&&x.button===0){if(!this._enabled){if(!this.shouldForceSelection(x))return;x.stopPropagation()}x.preventDefault(),this._dragScrollAmount=0,this._enabled&&x.shiftKey?this._onIncrementalClick(x):x.detail===1?this._onSingleClick(x):x.detail===2?this._onDoubleClick(x):x.detail===3&&this._onTripleClick(x),this._addMouseDownListeners(),this.refresh(!0)}},k.prototype._addMouseDownListeners=function(){var x=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return x._dragScroll()},50)},k.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},k.prototype._onIncrementalClick=function(x){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(x))},k.prototype._onSingleClick=function(x){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(x)?3:0,this._model.selectionStart=this._getMouseBufferCoords(x),this._model.selectionStart){this._model.selectionEnd=void 0;var A=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);A&&A.length!==this._model.selectionStart[0]&&A.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},k.prototype._onDoubleClick=function(x){this._selectWordAtCursor(x,!0)&&(this._activeSelectionMode=1)},k.prototype._onTripleClick=function(x){var A=this._getMouseBufferCoords(x);A&&(this._activeSelectionMode=2,this._selectLineAt(A[1]))},k.prototype.shouldColumnSelect=function(x){return x.altKey&&!(_.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)},k.prototype._onMouseMove=function(x){if(x.stopImmediatePropagation(),this._model.selectionStart){var A=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(x),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var L=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(x.ydisp+this._bufferService.rows,x.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=x.ydisp),this.refresh()}},k.prototype._onMouseUp=function(x){var A=x.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&A<500&&x.altKey&&this._optionsService.getOption("altClickMovesCursor")){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var L=this._mouseService.getCoords(x,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){var T=(0,f.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(T,!0)}}}else this._fireEventIfSelectionChanged()},k.prototype._fireEventIfSelectionChanged=function(){var x=this._model.finalSelectionStart,A=this._model.finalSelectionEnd,L=!(!x||!A||x[0]===A[0]&&x[1]===A[1]);L?x&&A&&(this._oldSelectionStart&&this._oldSelectionEnd&&x[0]===this._oldSelectionStart[0]&&x[1]===this._oldSelectionStart[1]&&A[0]===this._oldSelectionEnd[0]&&A[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(x,A,L)):this._oldHasSelection&&this._fireOnSelectionChange(x,A,L)},k.prototype._fireOnSelectionChange=function(x,A,L){this._oldSelectionStart=x,this._oldSelectionEnd=A,this._oldHasSelection=L,this._onSelectionChange.fire()},k.prototype._onBufferActivate=function(x){var A=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=x.activeBuffer.lines.onTrim(function(L){return A._onTrim(L)})},k.prototype._convertViewportColToCharacterIndex=function(x,A){for(var L=A[0],T=0;A[0]>=T;T++){var H=x.loadCell(T,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:H>1&&A[0]!==T&&(L+=H-1)}return L},k.prototype.setSelection=function(x,A,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[x,A],this._model.selectionStartLength=L,this.refresh()},k.prototype.rightClickSelect=function(x){this._isClickInSelection(x)||(this._selectWordAtCursor(x,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())},k.prototype._getWordAt=function(x,A,L,T){if(L===void 0&&(L=!0),T===void 0&&(T=!0),!(x[0]>=this._bufferService.cols)){var H=this._bufferService.buffer,P=H.lines.get(x[1]);if(P){var R=H.translateBufferLineToString(x[1],!1),I=this._convertViewportColToCharacterIndex(P,x),M=I,$=x[0]-I,V=0,U=0,Y=0,Z=0;if(R.charAt(I)===" "){for(;I>0&&R.charAt(I-1)===" ";)I--;for(;M1&&(Z+=z-1,M+=z-1);te>0&&I>0&&!this._isCharWordSeparator(P.loadCell(te-1,this._workCell));){P.loadCell(te-1,this._workCell);var O=this._workCell.getChars().length;this._workCell.getWidth()===0?(V++,te--):O>1&&(Y+=O-1,I-=O-1),I--,te--}for(;B1&&(Z+=D-1,M+=D-1),M++,B++}}M++;var F=I+$-V+Y,ue=Math.min(this._bufferService.cols,M-I+V+U-Y-Z);if(A||R.slice(I,M).trim()!==""){if(L&&F===0&&P.getCodePoint(0)!==32){var fe=H.lines.get(x[1]-1);if(fe&&P.isWrapped&&fe.getCodePoint(this._bufferService.cols-1)!==32){var ge=this._getWordAt([this._bufferService.cols-1,x[1]-1],!1,!0,!1);if(ge){var j=this._bufferService.cols-ge.start;F-=j,ue+=j}}}if(T&&F+ue===this._bufferService.cols&&P.getCodePoint(this._bufferService.cols-1)!==32){var q=H.lines.get(x[1]+1);if((q==null?void 0:q.isWrapped)&&q.getCodePoint(0)!==32){var ie=this._getWordAt([0,x[1]+1],!1,!1,!0);ie&&(ue+=ie.length)}}return{start:F,length:ue}}}}},k.prototype._selectWordAt=function(x,A){var L=this._getWordAt(x,A);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,x[1]--;this._model.selectionStart=[L.start,x[1]],this._model.selectionStartLength=L.length}},k.prototype._selectToWordAt=function(x){var A=this._getWordAt(x,!0);if(A){for(var L=x[1];A.start<0;)A.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;A.start+A.length>this._bufferService.cols;)A.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?A.start:A.start+A.length,L]}},k.prototype._isCharWordSeparator=function(x){return x.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(x.getChars())>=0},k.prototype._selectLineAt=function(x){var A=this._bufferService.buffer.getWrappedRangeForLine(x);this._model.selectionStart=[0,A.first],this._model.selectionEnd=[this._bufferService.cols,A.last],this._model.selectionStartLength=0},u([c(3,m.IBufferService),c(4,m.ICoreService),c(5,b.IMouseService),c(6,m.IOptionsService),c(7,b.IRenderService)],k)}(h.Disposable);i.SelectionService=S},4725:(o,i,s)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.IDecorationService=i.ICharacterJoinerService=i.ISoundService=i.ISelectionService=i.IRenderService=i.IMouseService=i.ICoreBrowserService=i.ICharSizeService=void 0;var a=s(8343);i.ICharSizeService=(0,a.createDecorator)("CharSizeService"),i.ICoreBrowserService=(0,a.createDecorator)("CoreBrowserService"),i.IMouseService=(0,a.createDecorator)("MouseService"),i.IRenderService=(0,a.createDecorator)("RenderService"),i.ISelectionService=(0,a.createDecorator)("SelectionService"),i.ISoundService=(0,a.createDecorator)("SoundService"),i.ICharacterJoinerService=(0,a.createDecorator)("CharacterJoinerService"),i.IDecorationService=(0,a.createDecorator)("DecorationService")},357:function(o,i,s){var a=this&&this.__decorate||function(_,v,p,g){var b,m=arguments.length,d=m<3?v:g===null?g=Object.getOwnPropertyDescriptor(v,p):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(_,v,p,g);else for(var f=_.length-1;f>=0;f--)(b=_[f])&&(d=(m<3?b(d):m>3?b(v,p,d):b(v,p))||d);return m>3&&d&&Object.defineProperty(v,p,d),d},l=this&&this.__param||function(_,v){return function(p,g){v(p,g,_)}};Object.defineProperty(i,"__esModule",{value:!0}),i.SoundService=void 0;var u=s(2585),c=function(){function _(v){this._optionsService=v}return Object.defineProperty(_,"audioContext",{get:function(){if(!_._audioContext){var v=window.AudioContext||window.webkitAudioContext;if(!v)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;_._audioContext=new v}return _._audioContext},enumerable:!1,configurable:!0}),_.prototype.playBellSound=function(){var v=_.audioContext;if(v){var p=v.createBufferSource();v.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.rawOptions.bellSound)),function(g){p.buffer=g,p.connect(v.destination),p.start(0)})}},_.prototype._base64ToArrayBuffer=function(v){for(var p=window.atob(v),g=p.length,b=new Uint8Array(g),m=0;m{Object.defineProperty(i,"__esModule",{value:!0}),i.CircularList=void 0;var a=s(8460),l=function(){function u(c){this._maxLength=c,this.onDeleteEmitter=new a.EventEmitter,this.onInsertEmitter=new a.EventEmitter,this.onTrimEmitter=new a.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(u.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"maxLength",{get:function(){return this._maxLength},set:function(c){if(this._maxLength!==c){for(var _=new Array(c),v=0;vthis._length)for(var _=this._length;_=c;g--)this._array[this._getCyclicIndex(g+v.length)]=this._array[this._getCyclicIndex(g)];for(g=0;gthis._maxLength){var b=this._length+v.length-this._maxLength;this._startIndex+=b,this._length=this._maxLength,this.onTrimEmitter.fire(b)}else this._length+=v.length},u.prototype.trimStart=function(c){c>this._length&&(c=this._length),this._startIndex+=c,this._length-=c,this.onTrimEmitter.fire(c)},u.prototype.shiftElements=function(c,_,v){if(!(_<=0)){if(c<0||c>=this._length)throw new Error("start argument out of range");if(c+v<0)throw new Error("Cannot shift elements in list beyond index 0");if(v>0){for(var p=_-1;p>=0;p--)this.set(c+p+v,this.get(c+p));var g=c+_+v-this._length;if(g>0)for(this._length+=g;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(p=0;p<_;p++)this.set(c+p+v,this.get(c+p))}},u.prototype._getCyclicIndex=function(c){return(this._startIndex+c)%this._maxLength},u}();i.CircularList=l},1439:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.clone=void 0,i.clone=function s(a,l){if(l===void 0&&(l=5),typeof a!="object")return a;var u=Array.isArray(a)?[]:{};for(var c in a)u[c]=l<=1?a[c]:a[c]&&s(a[c],l-1);return u}},8969:function(o,i,s){var a,l=this&&this.__extends||(a=function(x,A){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,T){L.__proto__=T}||function(L,T){for(var H in T)Object.prototype.hasOwnProperty.call(T,H)&&(L[H]=T[H])},a(x,A)},function(x,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function L(){this.constructor=x}a(x,A),x.prototype=A===null?Object.create(A):(L.prototype=A.prototype,new L)});Object.defineProperty(i,"__esModule",{value:!0}),i.CoreTerminal=void 0;var u=s(844),c=s(2585),_=s(4348),v=s(7866),p=s(744),g=s(7302),b=s(6975),m=s(8460),d=s(1753),f=s(3730),h=s(1480),y=s(7994),C=s(9282),w=s(5435),S=s(5981),E=!1,k=function(x){function A(L){var T=x.call(this)||this;return T._onBinary=new m.EventEmitter,T._onData=new m.EventEmitter,T._onLineFeed=new m.EventEmitter,T._onResize=new m.EventEmitter,T._onScroll=new m.EventEmitter,T._instantiationService=new _.InstantiationService,T.optionsService=new g.OptionsService(L),T._instantiationService.setService(c.IOptionsService,T.optionsService),T._bufferService=T.register(T._instantiationService.createInstance(p.BufferService)),T._instantiationService.setService(c.IBufferService,T._bufferService),T._logService=T._instantiationService.createInstance(v.LogService),T._instantiationService.setService(c.ILogService,T._logService),T.coreService=T.register(T._instantiationService.createInstance(b.CoreService,function(){return T.scrollToBottom()})),T._instantiationService.setService(c.ICoreService,T.coreService),T.coreMouseService=T._instantiationService.createInstance(d.CoreMouseService),T._instantiationService.setService(c.ICoreMouseService,T.coreMouseService),T._dirtyRowService=T._instantiationService.createInstance(f.DirtyRowService),T._instantiationService.setService(c.IDirtyRowService,T._dirtyRowService),T.unicodeService=T._instantiationService.createInstance(h.UnicodeService),T._instantiationService.setService(c.IUnicodeService,T.unicodeService),T._charsetService=T._instantiationService.createInstance(y.CharsetService),T._instantiationService.setService(c.ICharsetService,T._charsetService),T._inputHandler=new w.InputHandler(T._bufferService,T._charsetService,T.coreService,T._dirtyRowService,T._logService,T.optionsService,T.coreMouseService,T.unicodeService),T.register((0,m.forwardEvent)(T._inputHandler.onLineFeed,T._onLineFeed)),T.register(T._inputHandler),T.register((0,m.forwardEvent)(T._bufferService.onResize,T._onResize)),T.register((0,m.forwardEvent)(T.coreService.onData,T._onData)),T.register((0,m.forwardEvent)(T.coreService.onBinary,T._onBinary)),T.register(T.optionsService.onOptionChange(function(H){return T._updateOptions(H)})),T.register(T._bufferService.onScroll(function(H){T._onScroll.fire({position:T._bufferService.buffer.ydisp,source:0}),T._dirtyRowService.markRangeDirty(T._bufferService.buffer.scrollTop,T._bufferService.buffer.scrollBottom)})),T.register(T._inputHandler.onScroll(function(H){T._onScroll.fire({position:T._bufferService.buffer.ydisp,source:0}),T._dirtyRowService.markRangeDirty(T._bufferService.buffer.scrollTop,T._bufferService.buffer.scrollBottom)})),T._writeBuffer=new S.WriteBuffer(function(H,P){return T._inputHandler.parse(H,P)}),T}return l(A,x),Object.defineProperty(A.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onScroll",{get:function(){var L=this;return this._onScrollApi||(this._onScrollApi=new m.EventEmitter,this.register(this._onScroll.event(function(T){var H;(H=L._onScrollApi)===null||H===void 0||H.fire(T.position)}))),this._onScrollApi.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"options",{get:function(){return this.optionsService.options},set:function(L){for(var T in L)this.optionsService.options[T]=L[T]},enumerable:!1,configurable:!0}),A.prototype.dispose=function(){var L;this._isDisposed||(x.prototype.dispose.call(this),(L=this._windowsMode)===null||L===void 0||L.dispose(),this._windowsMode=void 0)},A.prototype.write=function(L,T){this._writeBuffer.write(L,T)},A.prototype.writeSync=function(L,T){this._logService.logLevel<=c.LogLevelEnum.WARN&&!E&&(this._logService.warn("writeSync is unreliable and will be removed soon."),E=!0),this._writeBuffer.writeSync(L,T)},A.prototype.resize=function(L,T){isNaN(L)||isNaN(T)||(L=Math.max(L,p.MINIMUM_COLS),T=Math.max(T,p.MINIMUM_ROWS),this._bufferService.resize(L,T))},A.prototype.scroll=function(L,T){T===void 0&&(T=!1),this._bufferService.scroll(L,T)},A.prototype.scrollLines=function(L,T,H){this._bufferService.scrollLines(L,T,H)},A.prototype.scrollPages=function(L){this._bufferService.scrollPages(L)},A.prototype.scrollToTop=function(){this._bufferService.scrollToTop()},A.prototype.scrollToBottom=function(){this._bufferService.scrollToBottom()},A.prototype.scrollToLine=function(L){this._bufferService.scrollToLine(L)},A.prototype.registerEscHandler=function(L,T){return this._inputHandler.registerEscHandler(L,T)},A.prototype.registerDcsHandler=function(L,T){return this._inputHandler.registerDcsHandler(L,T)},A.prototype.registerCsiHandler=function(L,T){return this._inputHandler.registerCsiHandler(L,T)},A.prototype.registerOscHandler=function(L,T){return this._inputHandler.registerOscHandler(L,T)},A.prototype._setup=function(){this.optionsService.rawOptions.windowsMode&&this._enableWindowsMode()},A.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()},A.prototype._updateOptions=function(L){var T;switch(L){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.rawOptions.windowsMode?this._enableWindowsMode():((T=this._windowsMode)===null||T===void 0||T.dispose(),this._windowsMode=void 0)}},A.prototype._enableWindowsMode=function(){var L=this;if(!this._windowsMode){var T=[];T.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),T.push(this.registerCsiHandler({final:"H"},function(){return(0,C.updateWindowsModeWrappedState)(L._bufferService),!1})),this._windowsMode={dispose:function(){for(var H=0,P=T;H{Object.defineProperty(i,"__esModule",{value:!0}),i.forwardEvent=i.EventEmitter=void 0;var s=function(){function a(){this._listeners=[],this._disposed=!1}return Object.defineProperty(a.prototype,"event",{get:function(){var l=this;return this._event||(this._event=function(u){return l._listeners.push(u),{dispose:function(){if(!l._disposed){for(var c=0;c24)return P.setWinLines||!1;switch(H){case 1:return!!P.restoreWin;case 2:return!!P.minimizeWin;case 3:return!!P.setWinPosition;case 4:return!!P.setWinSizePixels;case 5:return!!P.raiseWin;case 6:return!!P.lowerWin;case 7:return!!P.refreshWin;case 8:return!!P.setWinSizeChars;case 9:return!!P.maximizeWin;case 10:return!!P.fullscreenWin;case 11:return!!P.getWinState;case 13:return!!P.getWinPosition;case 14:return!!P.getWinSizePixels;case 15:return!!P.getScreenSizePixels;case 16:return!!P.getCellSizePixels;case 18:return!!P.getWinSizeChars;case 19:return!!P.getScreenSizeChars;case 20:return!!P.getIconTitle;case 21:return!!P.getWinTitle;case 22:return!!P.pushTitle;case 23:return!!P.popTitle;case 24:return!!P.setWinLines}return!1}(function(H){H[H.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",H[H.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(u=i.WindowsOptionsReportType||(i.WindowsOptionsReportType={}));var L=function(){function H(P,R,I,M){this._bufferService=P,this._coreService=R,this._logService=I,this._optionsService=M,this._data=new Uint32Array(0)}return H.prototype.hook=function(P){this._data=new Uint32Array(0)},H.prototype.put=function(P,R,I){this._data=(0,g.concat)(this._data,P.subarray(R,I))},H.prototype.unhook=function(P){if(!P)return this._data=new Uint32Array(0),!0;var R=(0,b.utf32ToString)(this._data);switch(this._data=new Uint32Array(0),R){case'"q':this._coreService.triggerDataEvent(c.C0.ESC+'P1$r0"q'+c.C0.ESC+"\\");break;case'"p':this._coreService.triggerDataEvent(c.C0.ESC+'P1$r61;1"p'+c.C0.ESC+"\\");break;case"r":var I=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";this._coreService.triggerDataEvent(c.C0.ESC+"P1$r"+I+c.C0.ESC+"\\");break;case"m":this._coreService.triggerDataEvent(c.C0.ESC+"P1$r0m"+c.C0.ESC+"\\");break;case" q":var M={block:2,underline:4,bar:6}[this._optionsService.rawOptions.cursorStyle];M-=this._optionsService.rawOptions.cursorBlink?1:0,this._coreService.triggerDataEvent(c.C0.ESC+"P1$r"+M+" q"+c.C0.ESC+"\\");break;default:this._logService.debug("Unknown DCS $q %s",R),this._coreService.triggerDataEvent(c.C0.ESC+"P0$r"+c.C0.ESC+"\\")}return!0},H}(),T=function(H){function P(R,I,M,$,V,U,Y,Z,te){te===void 0&&(te=new v.EscapeSequenceParser);var B=H.call(this)||this;B._bufferService=R,B._charsetService=I,B._coreService=M,B._dirtyRowService=$,B._logService=V,B._optionsService=U,B._coreMouseService=Y,B._unicodeService=Z,B._parser=te,B._parseBuffer=new Uint32Array(4096),B._stringDecoder=new b.StringToUtf32,B._utf8Decoder=new b.Utf8ToUtf32,B._workCell=new h.CellData,B._windowTitle="",B._iconName="",B._windowTitleStack=[],B._iconNameStack=[],B._curAttrData=m.DEFAULT_ATTR_DATA.clone(),B._eraseAttrDataInternal=m.DEFAULT_ATTR_DATA.clone(),B._onRequestBell=new d.EventEmitter,B._onRequestRefreshRows=new d.EventEmitter,B._onRequestReset=new d.EventEmitter,B._onRequestSendFocus=new d.EventEmitter,B._onRequestSyncScrollBar=new d.EventEmitter,B._onRequestWindowsOptionsReport=new d.EventEmitter,B._onA11yChar=new d.EventEmitter,B._onA11yTab=new d.EventEmitter,B._onCursorMove=new d.EventEmitter,B._onLineFeed=new d.EventEmitter,B._onScroll=new d.EventEmitter,B._onTitleChange=new d.EventEmitter,B._onColor=new d.EventEmitter,B._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},B._specialColors=[256,257,258],B.register(B._parser),B._activeBuffer=B._bufferService.buffer,B.register(B._bufferService.buffers.onBufferActivate(function(F){return B._activeBuffer=F.activeBuffer})),B._parser.setCsiHandlerFallback(function(F,ue){B._logService.debug("Unknown CSI code: ",{identifier:B._parser.identToString(F),params:ue.toArray()})}),B._parser.setEscHandlerFallback(function(F){B._logService.debug("Unknown ESC code: ",{identifier:B._parser.identToString(F)})}),B._parser.setExecuteHandlerFallback(function(F){B._logService.debug("Unknown EXECUTE code: ",{code:F})}),B._parser.setOscHandlerFallback(function(F,ue,fe){B._logService.debug("Unknown OSC code: ",{identifier:F,action:ue,data:fe})}),B._parser.setDcsHandlerFallback(function(F,ue,fe){ue==="HOOK"&&(fe=fe.toArray()),B._logService.debug("Unknown DCS code: ",{identifier:B._parser.identToString(F),action:ue,payload:fe})}),B._parser.setPrintHandler(function(F,ue,fe){return B.print(F,ue,fe)}),B._parser.registerCsiHandler({final:"@"},function(F){return B.insertChars(F)}),B._parser.registerCsiHandler({intermediates:" ",final:"@"},function(F){return B.scrollLeft(F)}),B._parser.registerCsiHandler({final:"A"},function(F){return B.cursorUp(F)}),B._parser.registerCsiHandler({intermediates:" ",final:"A"},function(F){return B.scrollRight(F)}),B._parser.registerCsiHandler({final:"B"},function(F){return B.cursorDown(F)}),B._parser.registerCsiHandler({final:"C"},function(F){return B.cursorForward(F)}),B._parser.registerCsiHandler({final:"D"},function(F){return B.cursorBackward(F)}),B._parser.registerCsiHandler({final:"E"},function(F){return B.cursorNextLine(F)}),B._parser.registerCsiHandler({final:"F"},function(F){return B.cursorPrecedingLine(F)}),B._parser.registerCsiHandler({final:"G"},function(F){return B.cursorCharAbsolute(F)}),B._parser.registerCsiHandler({final:"H"},function(F){return B.cursorPosition(F)}),B._parser.registerCsiHandler({final:"I"},function(F){return B.cursorForwardTab(F)}),B._parser.registerCsiHandler({final:"J"},function(F){return B.eraseInDisplay(F)}),B._parser.registerCsiHandler({prefix:"?",final:"J"},function(F){return B.eraseInDisplay(F)}),B._parser.registerCsiHandler({final:"K"},function(F){return B.eraseInLine(F)}),B._parser.registerCsiHandler({prefix:"?",final:"K"},function(F){return B.eraseInLine(F)}),B._parser.registerCsiHandler({final:"L"},function(F){return B.insertLines(F)}),B._parser.registerCsiHandler({final:"M"},function(F){return B.deleteLines(F)}),B._parser.registerCsiHandler({final:"P"},function(F){return B.deleteChars(F)}),B._parser.registerCsiHandler({final:"S"},function(F){return B.scrollUp(F)}),B._parser.registerCsiHandler({final:"T"},function(F){return B.scrollDown(F)}),B._parser.registerCsiHandler({final:"X"},function(F){return B.eraseChars(F)}),B._parser.registerCsiHandler({final:"Z"},function(F){return B.cursorBackwardTab(F)}),B._parser.registerCsiHandler({final:"`"},function(F){return B.charPosAbsolute(F)}),B._parser.registerCsiHandler({final:"a"},function(F){return B.hPositionRelative(F)}),B._parser.registerCsiHandler({final:"b"},function(F){return B.repeatPrecedingCharacter(F)}),B._parser.registerCsiHandler({final:"c"},function(F){return B.sendDeviceAttributesPrimary(F)}),B._parser.registerCsiHandler({prefix:">",final:"c"},function(F){return B.sendDeviceAttributesSecondary(F)}),B._parser.registerCsiHandler({final:"d"},function(F){return B.linePosAbsolute(F)}),B._parser.registerCsiHandler({final:"e"},function(F){return B.vPositionRelative(F)}),B._parser.registerCsiHandler({final:"f"},function(F){return B.hVPosition(F)}),B._parser.registerCsiHandler({final:"g"},function(F){return B.tabClear(F)}),B._parser.registerCsiHandler({final:"h"},function(F){return B.setMode(F)}),B._parser.registerCsiHandler({prefix:"?",final:"h"},function(F){return B.setModePrivate(F)}),B._parser.registerCsiHandler({final:"l"},function(F){return B.resetMode(F)}),B._parser.registerCsiHandler({prefix:"?",final:"l"},function(F){return B.resetModePrivate(F)}),B._parser.registerCsiHandler({final:"m"},function(F){return B.charAttributes(F)}),B._parser.registerCsiHandler({final:"n"},function(F){return B.deviceStatus(F)}),B._parser.registerCsiHandler({prefix:"?",final:"n"},function(F){return B.deviceStatusPrivate(F)}),B._parser.registerCsiHandler({intermediates:"!",final:"p"},function(F){return B.softReset(F)}),B._parser.registerCsiHandler({intermediates:" ",final:"q"},function(F){return B.setCursorStyle(F)}),B._parser.registerCsiHandler({final:"r"},function(F){return B.setScrollRegion(F)}),B._parser.registerCsiHandler({final:"s"},function(F){return B.saveCursor(F)}),B._parser.registerCsiHandler({final:"t"},function(F){return B.windowOptions(F)}),B._parser.registerCsiHandler({final:"u"},function(F){return B.restoreCursor(F)}),B._parser.registerCsiHandler({intermediates:"'",final:"}"},function(F){return B.insertColumns(F)}),B._parser.registerCsiHandler({intermediates:"'",final:"~"},function(F){return B.deleteColumns(F)}),B._parser.setExecuteHandler(c.C0.BEL,function(){return B.bell()}),B._parser.setExecuteHandler(c.C0.LF,function(){return B.lineFeed()}),B._parser.setExecuteHandler(c.C0.VT,function(){return B.lineFeed()}),B._parser.setExecuteHandler(c.C0.FF,function(){return B.lineFeed()}),B._parser.setExecuteHandler(c.C0.CR,function(){return B.carriageReturn()}),B._parser.setExecuteHandler(c.C0.BS,function(){return B.backspace()}),B._parser.setExecuteHandler(c.C0.HT,function(){return B.tab()}),B._parser.setExecuteHandler(c.C0.SO,function(){return B.shiftOut()}),B._parser.setExecuteHandler(c.C0.SI,function(){return B.shiftIn()}),B._parser.setExecuteHandler(c.C1.IND,function(){return B.index()}),B._parser.setExecuteHandler(c.C1.NEL,function(){return B.nextLine()}),B._parser.setExecuteHandler(c.C1.HTS,function(){return B.tabSet()}),B._parser.registerOscHandler(0,new w.OscHandler(function(F){return B.setTitle(F),B.setIconName(F),!0})),B._parser.registerOscHandler(1,new w.OscHandler(function(F){return B.setIconName(F)})),B._parser.registerOscHandler(2,new w.OscHandler(function(F){return B.setTitle(F)})),B._parser.registerOscHandler(4,new w.OscHandler(function(F){return B.setOrReportIndexedColor(F)})),B._parser.registerOscHandler(10,new w.OscHandler(function(F){return B.setOrReportFgColor(F)})),B._parser.registerOscHandler(11,new w.OscHandler(function(F){return B.setOrReportBgColor(F)})),B._parser.registerOscHandler(12,new w.OscHandler(function(F){return B.setOrReportCursorColor(F)})),B._parser.registerOscHandler(104,new w.OscHandler(function(F){return B.restoreIndexedColor(F)})),B._parser.registerOscHandler(110,new w.OscHandler(function(F){return B.restoreFgColor(F)})),B._parser.registerOscHandler(111,new w.OscHandler(function(F){return B.restoreBgColor(F)})),B._parser.registerOscHandler(112,new w.OscHandler(function(F){return B.restoreCursorColor(F)})),B._parser.registerEscHandler({final:"7"},function(){return B.saveCursor()}),B._parser.registerEscHandler({final:"8"},function(){return B.restoreCursor()}),B._parser.registerEscHandler({final:"D"},function(){return B.index()}),B._parser.registerEscHandler({final:"E"},function(){return B.nextLine()}),B._parser.registerEscHandler({final:"H"},function(){return B.tabSet()}),B._parser.registerEscHandler({final:"M"},function(){return B.reverseIndex()}),B._parser.registerEscHandler({final:"="},function(){return B.keypadApplicationMode()}),B._parser.registerEscHandler({final:">"},function(){return B.keypadNumericMode()}),B._parser.registerEscHandler({final:"c"},function(){return B.fullReset()}),B._parser.registerEscHandler({final:"n"},function(){return B.setgLevel(2)}),B._parser.registerEscHandler({final:"o"},function(){return B.setgLevel(3)}),B._parser.registerEscHandler({final:"|"},function(){return B.setgLevel(3)}),B._parser.registerEscHandler({final:"}"},function(){return B.setgLevel(2)}),B._parser.registerEscHandler({final:"~"},function(){return B.setgLevel(1)}),B._parser.registerEscHandler({intermediates:"%",final:"@"},function(){return B.selectDefaultCharset()}),B._parser.registerEscHandler({intermediates:"%",final:"G"},function(){return B.selectDefaultCharset()});var z=function(F){O._parser.registerEscHandler({intermediates:"(",final:F},function(){return B.selectCharset("("+F)}),O._parser.registerEscHandler({intermediates:")",final:F},function(){return B.selectCharset(")"+F)}),O._parser.registerEscHandler({intermediates:"*",final:F},function(){return B.selectCharset("*"+F)}),O._parser.registerEscHandler({intermediates:"+",final:F},function(){return B.selectCharset("+"+F)}),O._parser.registerEscHandler({intermediates:"-",final:F},function(){return B.selectCharset("-"+F)}),O._parser.registerEscHandler({intermediates:".",final:F},function(){return B.selectCharset("."+F)}),O._parser.registerEscHandler({intermediates:"/",final:F},function(){return B.selectCharset("/"+F)})},O=this;for(var D in _.CHARSETS)z(D);return B._parser.registerEscHandler({intermediates:"#",final:"8"},function(){return B.screenAlignmentPattern()}),B._parser.setErrorHandler(function(F){return B._logService.error("Parsing error: ",F),F}),B._parser.registerDcsHandler({intermediates:"$",final:"q"},new L(B._bufferService,B._coreService,B._logService,B._optionsService)),B}return l(P,H),Object.defineProperty(P.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onRequestSendFocus",{get:function(){return this._onRequestSendFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onColor",{get:function(){return this._onColor.event},enumerable:!1,configurable:!0}),P.prototype.dispose=function(){H.prototype.dispose.call(this)},P.prototype._preserveStack=function(R,I,M,$){this._parseStack.paused=!0,this._parseStack.cursorStartX=R,this._parseStack.cursorStartY=I,this._parseStack.decodedLength=M,this._parseStack.position=$},P.prototype._logSlowResolvingAsync=function(R){this._logService.logLevel<=C.LogLevelEnum.WARN&&Promise.race([R,new Promise(function(I,M){return setTimeout(function(){return M("#SLOW_TIMEOUT")},5e3)})]).catch(function(I){if(I!=="#SLOW_TIMEOUT")throw I;console.warn("async parser handler taking longer than 5000 ms")})},P.prototype.parse=function(R,I){var M,$=this._activeBuffer.x,V=this._activeBuffer.y,U=0,Y=this._parseStack.paused;if(Y){if(M=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,I))return this._logSlowResolvingAsync(M),M;$=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,R.length>x&&(U=this._parseStack.position+x)}if(this._logService.logLevel<=C.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof R=="string"?' "'+R+'"':' "'+Array.prototype.map.call(R,function(z){return String.fromCharCode(z)}).join("")+'"'),typeof R=="string"?R.split("").map(function(z){return z.charCodeAt(0)}):R),this._parseBuffer.lengthx)for(var Z=U;Z0&&O.getWidth(this._activeBuffer.x-1)===2&&O.setCellFromCodePoint(this._activeBuffer.x-1,0,1,z.fg,z.bg,z.extended);for(var D=I;D=Z){if(te){for(;this._activeBuffer.x=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=Z-1,V===2)continue}if(B&&(O.insertCells(this._activeBuffer.x,V,this._activeBuffer.getNullCell(z),z),O.getWidth(Z-1)===2&&O.setCellFromCodePoint(Z-1,f.NULL_CELL_CODE,f.NULL_CELL_WIDTH,z.fg,z.bg,z.extended)),O.setCellFromCodePoint(this._activeBuffer.x++,$,V,z.fg,z.bg,z.extended),V>0)for(;--V;)O.setCellFromCodePoint(this._activeBuffer.x++,0,0,z.fg,z.bg,z.extended)}else O.getWidth(this._activeBuffer.x-1)?O.addCodepointToCell(this._activeBuffer.x-1,$):O.addCodepointToCell(this._activeBuffer.x-2,$)}M-I>0&&(O.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x0&&O.getWidth(this._activeBuffer.x)===0&&!O.hasContent(this._activeBuffer.x)&&O.setCellFromCodePoint(this._activeBuffer.x,0,1,z.fg,z.bg,z.extended),this._dirtyRowService.markDirty(this._activeBuffer.y)},P.prototype.registerCsiHandler=function(R,I){var M=this;return R.final!=="t"||R.prefix||R.intermediates?this._parser.registerCsiHandler(R,I):this._parser.registerCsiHandler(R,function($){return!A($.params[0],M._optionsService.rawOptions.windowOptions)||I($)})},P.prototype.registerDcsHandler=function(R,I){return this._parser.registerDcsHandler(R,new S.DcsHandler(I))},P.prototype.registerEscHandler=function(R,I){return this._parser.registerEscHandler(R,I)},P.prototype.registerOscHandler=function(R,I){return this._parser.registerOscHandler(R,new w.OscHandler(I))},P.prototype.bell=function(){return this._onRequestBell.fire(),!0},P.prototype.lineFeed=function(){return this._dirtyRowService.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowService.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0},P.prototype.carriageReturn=function(){return this._activeBuffer.x=0,!0},P.prototype.backspace=function(){var R;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((R=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||R===void 0?void 0:R.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;var I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);I.hasWidth(this._activeBuffer.x)&&!I.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0},P.prototype.tab=function(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;var R=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-R),!0},P.prototype.shiftOut=function(){return this._charsetService.setgLevel(1),!0},P.prototype.shiftIn=function(){return this._charsetService.setgLevel(0),!0},P.prototype._restrictCursor=function(R){R===void 0&&(R=this._bufferService.cols-1),this._activeBuffer.x=Math.min(R,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowService.markDirty(this._activeBuffer.y)},P.prototype._setCursor=function(R,I){this._dirtyRowService.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=R,this._activeBuffer.y=this._activeBuffer.scrollTop+I):(this._activeBuffer.x=R,this._activeBuffer.y=I),this._restrictCursor(),this._dirtyRowService.markDirty(this._activeBuffer.y)},P.prototype._moveCursor=function(R,I){this._restrictCursor(),this._setCursor(this._activeBuffer.x+R,this._activeBuffer.y+I)},P.prototype.cursorUp=function(R){var I=this._activeBuffer.y-this._activeBuffer.scrollTop;return I>=0?this._moveCursor(0,-Math.min(I,R.params[0]||1)):this._moveCursor(0,-(R.params[0]||1)),!0},P.prototype.cursorDown=function(R){var I=this._activeBuffer.scrollBottom-this._activeBuffer.y;return I>=0?this._moveCursor(0,Math.min(I,R.params[0]||1)):this._moveCursor(0,R.params[0]||1),!0},P.prototype.cursorForward=function(R){return this._moveCursor(R.params[0]||1,0),!0},P.prototype.cursorBackward=function(R){return this._moveCursor(-(R.params[0]||1),0),!0},P.prototype.cursorNextLine=function(R){return this.cursorDown(R),this._activeBuffer.x=0,!0},P.prototype.cursorPrecedingLine=function(R){return this.cursorUp(R),this._activeBuffer.x=0,!0},P.prototype.cursorCharAbsolute=function(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0},P.prototype.cursorPosition=function(R){return this._setCursor(R.length>=2?(R.params[1]||1)-1:0,(R.params[0]||1)-1),!0},P.prototype.charPosAbsolute=function(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0},P.prototype.hPositionRelative=function(R){return this._moveCursor(R.params[0]||1,0),!0},P.prototype.linePosAbsolute=function(R){return this._setCursor(this._activeBuffer.x,(R.params[0]||1)-1),!0},P.prototype.vPositionRelative=function(R){return this._moveCursor(0,R.params[0]||1),!0},P.prototype.hVPosition=function(R){return this.cursorPosition(R),!0},P.prototype.tabClear=function(R){var I=R.params[0];return I===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:I===3&&(this._activeBuffer.tabs={}),!0},P.prototype.cursorForwardTab=function(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var I=R.params[0]||1;I--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0},P.prototype.cursorBackwardTab=function(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var I=R.params[0]||1;I--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0},P.prototype._eraseInBufferLine=function(R,I,M,$){$===void 0&&($=!1);var V=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);V.replaceCells(I,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),$&&(V.isWrapped=!1)},P.prototype._resetBufferLine=function(R){var I=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);I.fill(this._activeBuffer.getNullCell(this._eraseAttrData())),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+R),I.isWrapped=!1},P.prototype.eraseInDisplay=function(R){var I;switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:for(I=this._activeBuffer.y,this._dirtyRowService.markDirty(I),this._eraseInBufferLine(I++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);I=this._bufferService.cols&&(this._activeBuffer.lines.get(I+1).isWrapped=!1);I--;)this._resetBufferLine(I);this._dirtyRowService.markDirty(0);break;case 2:for(I=this._bufferService.rows,this._dirtyRowService.markDirty(I-1);I--;)this._resetBufferLine(I);this._dirtyRowService.markDirty(0);break;case 3:var M=this._activeBuffer.lines.length-this._bufferService.rows;M>0&&(this._activeBuffer.lines.trimStart(M),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-M,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-M,0),this._onScroll.fire(0))}return!0},P.prototype.eraseInLine=function(R){switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0)}return this._dirtyRowService.markDirty(this._activeBuffer.y),!0},P.prototype.insertLines=function(R){this._restrictCursor();var I=R.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(c.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(c.C0.ESC+"[?6c")),!0},P.prototype.sendDeviceAttributesSecondary=function(R){return R.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(c.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(c.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(R.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(c.C0.ESC+"[>83;40003;0c")),!0},P.prototype._is=function(R){return(this._optionsService.rawOptions.termName+"").indexOf(R)===0},P.prototype.setMode=function(R){for(var I=0;I=2||$[1]===2&&U+V>=5)break;$[1]&&(V=1)}while(++U+I5)&&(R=1),I.extended.underlineStyle=R,I.fg|=268435456,R===0&&(I.fg&=-268435457),I.updateExtended()},P.prototype.charAttributes=function(R){if(R.length===1&&R.params[0]===0)return this._curAttrData.fg=m.DEFAULT_ATTR_DATA.fg,this._curAttrData.bg=m.DEFAULT_ATTR_DATA.bg,!0;for(var I,M=R.length,$=this._curAttrData,V=0;V=30&&I<=37?($.fg&=-50331904,$.fg|=16777216|I-30):I>=40&&I<=47?($.bg&=-50331904,$.bg|=16777216|I-40):I>=90&&I<=97?($.fg&=-50331904,$.fg|=16777224|I-90):I>=100&&I<=107?($.bg&=-50331904,$.bg|=16777224|I-100):I===0?($.fg=m.DEFAULT_ATTR_DATA.fg,$.bg=m.DEFAULT_ATTR_DATA.bg):I===1?$.fg|=134217728:I===3?$.bg|=67108864:I===4?($.fg|=268435456,this._processUnderline(R.hasSubParams(V)?R.getSubParams(V)[0]:1,$)):I===5?$.fg|=536870912:I===7?$.fg|=67108864:I===8?$.fg|=1073741824:I===9?$.fg|=2147483648:I===2?$.bg|=134217728:I===21?this._processUnderline(2,$):I===22?($.fg&=-134217729,$.bg&=-134217729):I===23?$.bg&=-67108865:I===24?$.fg&=-268435457:I===25?$.fg&=-536870913:I===27?$.fg&=-67108865:I===28?$.fg&=-1073741825:I===29?$.fg&=2147483647:I===39?($.fg&=-67108864,$.fg|=16777215&m.DEFAULT_ATTR_DATA.fg):I===49?($.bg&=-67108864,$.bg|=16777215&m.DEFAULT_ATTR_DATA.bg):I===38||I===48||I===58?V+=this._extractColor(R,V,$):I===59?($.extended=$.extended.clone(),$.extended.underlineColor=-1,$.updateExtended()):I===100?($.fg&=-67108864,$.fg|=16777215&m.DEFAULT_ATTR_DATA.fg,$.bg&=-67108864,$.bg|=16777215&m.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",I);return!0},P.prototype.deviceStatus=function(R){switch(R.params[0]){case 5:this._coreService.triggerDataEvent(c.C0.ESC+"[0n");break;case 6:var I=this._activeBuffer.y+1,M=this._activeBuffer.x+1;this._coreService.triggerDataEvent(c.C0.ESC+"["+I+";"+M+"R")}return!0},P.prototype.deviceStatusPrivate=function(R){if(R.params[0]===6){var I=this._activeBuffer.y+1,M=this._activeBuffer.x+1;this._coreService.triggerDataEvent(c.C0.ESC+"[?"+I+";"+M+"R")}return!0},P.prototype.softReset=function(R){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=m.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0},P.prototype.setCursorStyle=function(R){var I=R.params[0]||1;switch(I){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var M=I%2==1;return this._optionsService.options.cursorBlink=M,!0},P.prototype.setScrollRegion=function(R){var I,M=R.params[0]||1;return(R.length<2||(I=R.params[1])>this._bufferService.rows||I===0)&&(I=this._bufferService.rows),I>M&&(this._activeBuffer.scrollTop=M-1,this._activeBuffer.scrollBottom=I-1,this._setCursor(0,0)),!0},P.prototype.windowOptions=function(R){if(!A(R.params[0],this._optionsService.rawOptions.windowOptions))return!0;var I=R.length>1?R.params[1]:0;switch(R.params[0]){case 14:I!==2&&this._onRequestWindowsOptionsReport.fire(u.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(u.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(c.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:I!==0&&I!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),I!==0&&I!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:I!==0&&I!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),I!==0&&I!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0},P.prototype.saveCursor=function(R){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0},P.prototype.restoreCursor=function(R){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0},P.prototype.setTitle=function(R){return this._windowTitle=R,this._onTitleChange.fire(R),!0},P.prototype.setIconName=function(R){return this._iconName=R,!0},P.prototype.setOrReportIndexedColor=function(R){for(var I=[],M=R.split(";");M.length>1;){var $=M.shift(),V=M.shift();if(/^\d+$/.exec($)){var U=parseInt($);if(0<=U&&U<256)if(V==="?")I.push({type:0,index:U});else{var Y=(0,E.parseColor)(V);Y&&I.push({type:1,index:U,color:Y})}}}return I.length&&this._onColor.fire(I),!0},P.prototype._setOrReportSpecialColor=function(R,I){for(var M=R.split(";"),$=0;$=this._specialColors.length);++$,++I)if(M[$]==="?")this._onColor.fire([{type:0,index:this._specialColors[I]}]);else{var V=(0,E.parseColor)(M[$]);V&&this._onColor.fire([{type:1,index:this._specialColors[I],color:V}])}return!0},P.prototype.setOrReportFgColor=function(R){return this._setOrReportSpecialColor(R,0)},P.prototype.setOrReportBgColor=function(R){return this._setOrReportSpecialColor(R,1)},P.prototype.setOrReportCursorColor=function(R){return this._setOrReportSpecialColor(R,2)},P.prototype.restoreIndexedColor=function(R){if(!R)return this._onColor.fire([{type:2}]),!0;for(var I=[],M=R.split(";"),$=0;$=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0},P.prototype.tabSet=function(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0},P.prototype.reverseIndex=function(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){var R=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,R,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0},P.prototype.fullReset=function(){return this._parser.reset(),this._onRequestReset.fire(),!0},P.prototype.reset=function(){this._curAttrData=m.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=m.DEFAULT_ATTR_DATA.clone()},P.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},P.prototype.setgLevel=function(R){return this._charsetService.setgLevel(R),!0},P.prototype.screenAlignmentPattern=function(){var R=new h.CellData;R.content=1<<22|"E".charCodeAt(0),R.fg=this._curAttrData.fg,R.bg=this._curAttrData.bg,this._setCursor(0,0);for(var I=0;I{Object.defineProperty(i,"__esModule",{value:!0}),i.getDisposeArrayDisposable=i.disposeArray=i.Disposable=void 0;var s=function(){function l(){this._disposables=[],this._isDisposed=!1}return l.prototype.dispose=function(){this._isDisposed=!0;for(var u=0,c=this._disposables;u{Object.defineProperty(i,"__esModule",{value:!0}),i.isLinux=i.isWindows=i.isIphone=i.isIpad=i.isMac=i.isSafari=i.isLegacyEdge=i.isFirefox=void 0;var s=typeof navigator=="undefined",a=s?"node":navigator.userAgent,l=s?"node":navigator.platform;i.isFirefox=a.includes("Firefox"),i.isLegacyEdge=a.includes("Edge"),i.isSafari=/^((?!chrome|android).)*safari/i.test(a),i.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(l),i.isIpad=l==="iPad",i.isIphone=l==="iPhone",i.isWindows=["Windows","Win16","Win32","WinCE"].includes(l),i.isLinux=l.indexOf("Linux")>=0},8273:(o,i)=>{function s(a,l,u,c){if(u===void 0&&(u=0),c===void 0&&(c=a.length),u>=a.length)return a;u=(a.length+u)%a.length,c=c>=a.length?a.length:(a.length+c)%a.length;for(var _=u;_{Object.defineProperty(i,"__esModule",{value:!0}),i.updateWindowsModeWrappedState=void 0;var a=s(643);i.updateWindowsModeWrappedState=function(l){var u=l.buffer.lines.get(l.buffer.ybase+l.buffer.y-1),c=u==null?void 0:u.get(l.cols-1),_=l.buffer.lines.get(l.buffer.ybase+l.buffer.y);_&&c&&(_.isWrapped=c[a.CHAR_DATA_CODE_INDEX]!==a.NULL_CELL_CODE&&c[a.CHAR_DATA_CODE_INDEX]!==a.WHITESPACE_CELL_CODE)}},3734:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ExtendedAttrs=i.AttributeData=void 0;var s=function(){function l(){this.fg=0,this.bg=0,this.extended=new a}return l.toColorRGB=function(u){return[u>>>16&255,u>>>8&255,255&u]},l.fromColorRGB=function(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]},l.prototype.clone=function(){var u=new l;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u},l.prototype.isInverse=function(){return 67108864&this.fg},l.prototype.isBold=function(){return 134217728&this.fg},l.prototype.isUnderline=function(){return 268435456&this.fg},l.prototype.isBlink=function(){return 536870912&this.fg},l.prototype.isInvisible=function(){return 1073741824&this.fg},l.prototype.isItalic=function(){return 67108864&this.bg},l.prototype.isDim=function(){return 134217728&this.bg},l.prototype.isStrikethrough=function(){return 2147483648&this.fg},l.prototype.getFgColorMode=function(){return 50331648&this.fg},l.prototype.getBgColorMode=function(){return 50331648&this.bg},l.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},l.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},l.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},l.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},l.prototype.isFgDefault=function(){return(50331648&this.fg)==0},l.prototype.isBgDefault=function(){return(50331648&this.bg)==0},l.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},l.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},l.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},l.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},l.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},l.prototype.getUnderlineColor=function(){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()},l.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},l.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},l.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},l.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},l.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},l}();i.AttributeData=s;var a=function(){function l(u,c){u===void 0&&(u=0),c===void 0&&(c=-1),this.underlineStyle=u,this.underlineColor=c}return l.prototype.clone=function(){return new l(this.underlineStyle,this.underlineColor)},l.prototype.isEmpty=function(){return this.underlineStyle===0},l}();i.ExtendedAttrs=a},9092:(o,i,s)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferStringIterator=i.Buffer=i.MAX_BUFFER_SIZE=void 0;var a=s(6349),l=s(8437),u=s(511),c=s(643),_=s(4634),v=s(4863),p=s(7116),g=s(3734);i.MAX_BUFFER_SIZE=4294967295;var b=function(){function d(f,h,y){this._hasScrollback=f,this._optionsService=h,this._bufferService=y,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=l.DEFAULT_ATTR_DATA.clone(),this.savedCharset=p.DEFAULT_CHARSET,this.markers=[],this._nullCell=u.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]),this._whitespaceCell=u.CellData.fromCharData([0,c.WHITESPACE_CELL_CHAR,c.WHITESPACE_CELL_WIDTH,c.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new a.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return d.prototype.getNullCell=function(f){return f?(this._nullCell.fg=f.fg,this._nullCell.bg=f.bg,this._nullCell.extended=f.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new g.ExtendedAttrs),this._nullCell},d.prototype.getWhitespaceCell=function(f){return f?(this._whitespaceCell.fg=f.fg,this._whitespaceCell.bg=f.bg,this._whitespaceCell.extended=f.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new g.ExtendedAttrs),this._whitespaceCell},d.prototype.getBlankLine=function(f,h){return new l.BufferLine(this._bufferService.cols,this.getNullCell(f),h)},Object.defineProperty(d.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isCursorInViewport",{get:function(){var f=this.ybase+this.y-this.ydisp;return f>=0&&fi.MAX_BUFFER_SIZE?i.MAX_BUFFER_SIZE:h},d.prototype.fillViewportRows=function(f){if(this.lines.length===0){f===void 0&&(f=l.DEFAULT_ATTR_DATA);for(var h=this._rows;h--;)this.lines.push(this.getBlankLine(f))}},d.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new a.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},d.prototype.resize=function(f,h){var y=this.getNullCell(l.DEFAULT_ATTR_DATA),C=this._getCorrectBufferLength(h);if(C>this.lines.maxLength&&(this.lines.maxLength=C),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+S+1?(this.ybase--,S++,this.ydisp>0&&this.ydisp--):this.lines.push(new l.BufferLine(f,y)));else for(E=this._rows;E>h;E--)this.lines.length>h+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(C0&&(this.lines.trimStart(k),this.ybase=Math.max(this.ybase-k,0),this.ydisp=Math.max(this.ydisp-k,0),this.savedY=Math.max(this.savedY-k,0)),this.lines.maxLength=C}this.x=Math.min(this.x,f-1),this.y=Math.min(this.y,h-1),S&&(this.y+=S),this.savedX=Math.min(this.savedX,f-1),this.scrollTop=0}if(this.scrollBottom=h-1,this._isReflowEnabled&&(this._reflow(f,h),this._cols>f))for(w=0;wthis._cols?this._reflowLarger(f,h):this._reflowSmaller(f,h))},d.prototype._reflowLarger=function(f,h){var y=(0,_.reflowLargerGetLinesToRemove)(this.lines,this._cols,f,this.ybase+this.y,this.getNullCell(l.DEFAULT_ATTR_DATA));if(y.length>0){var C=(0,_.reflowLargerCreateNewLayout)(this.lines,y);(0,_.reflowLargerApplyNewLayout)(this.lines,C.layout),this._reflowLargerAdjustViewport(f,h,C.countRemoved)}},d.prototype._reflowLargerAdjustViewport=function(f,h,y){for(var C=this.getNullCell(l.DEFAULT_ATTR_DATA),w=y;w-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;S--){var E=this.lines.get(S);if(!(!E||!E.isWrapped&&E.getTrimmedLength()<=f)){for(var k=[E];E.isWrapped&&S>0;)E=this.lines.get(--S),k.unshift(E);var x=this.ybase+this.y;if(!(x>=S&&x0&&(C.push({start:S+k.length+w,newLines:P}),w+=P.length),k.push.apply(k,P);var M=T.length-1,$=T[M];$===0&&($=T[--M]);for(var V=k.length-H-1,U=L;V>=0;){var Y=Math.min(U,$);if(k[M]===void 0)break;if(k[M].copyCellsFrom(k[V],U-Y,$-Y,Y,!0),($-=Y)==0&&($=T[--M]),(U-=Y)==0){V--;var Z=Math.max(V,0);U=(0,_.getWrappedLineTrimmedLength)(k,Z,this._cols)}}for(R=0;R0;)this.ybase===0?this.y0){var B=[],z=[];for(R=0;R=0;R--)if(ue&&ue.start>D+fe){for(var ge=ue.newLines.length-1;ge>=0;ge--)this.lines.set(R--,ue.newLines[ge]);R++,B.push({index:D+1,amount:ue.newLines.length}),fe+=ue.newLines.length,ue=C[++F]}else this.lines.set(R,z[D--]);var j=0;for(R=B.length-1;R>=0;R--)B[R].index+=j,this.lines.onInsertEmitter.fire(B[R]),j+=B[R].amount;var q=Math.max(0,O+w-this.lines.maxLength);q>0&&this.lines.onTrimEmitter.fire(q)}},d.prototype.stringIndexToBufferIndex=function(f,h,y){for(y===void 0&&(y=!1);h;){var C=this.lines.get(f);if(!C)return[-1,-1];for(var w=y?C.getTrimmedLength():C.length,S=0;S0&&this.lines.get(h).isWrapped;)h--;for(;y+10;);return f>=this._cols?this._cols-1:f<0?0:f},d.prototype.nextStop=function(f){for(f==null&&(f=this.x);!this.tabs[++f]&&f=this._cols?this._cols-1:f<0?0:f},d.prototype.clearMarkers=function(f){if(this._isClearing=!0,f!==void 0)for(var h=0;h=C.index&&(y.line+=C.amount)})),y.register(this.lines.onDelete(function(C){y.line>=C.index&&y.lineC.index&&(y.line-=C.amount)})),y.register(y.onDispose(function(){return h._removeMarker(y)})),y},d.prototype._removeMarker=function(f){this._isClearing||this.markers.splice(this.markers.indexOf(f),1)},d.prototype.iterator=function(f,h,y,C,w){return new m(this,f,h,y,C,w)},d}();i.Buffer=b;var m=function(){function d(f,h,y,C,w,S){y===void 0&&(y=0),C===void 0&&(C=f.lines.length),w===void 0&&(w=0),S===void 0&&(S=0),this._buffer=f,this._trimRight=h,this._startIndex=y,this._endIndex=C,this._startOverscan=w,this._endOverscan=S,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return d.prototype.hasNext=function(){return this._currentthis._endIndex+this._endOverscan&&(f.last=this._endIndex+this._endOverscan),f.first=Math.max(f.first,0),f.last=Math.min(f.last,this._buffer.lines.length);for(var h="",y=f.first;y<=f.last;++y)h+=this._buffer.translateBufferLineToString(y,this._trimRight);return this._current=f.last+1,{range:f,content:h}},d}();i.BufferStringIterator=m},8437:(o,i,s)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLine=i.DEFAULT_ATTR_DATA=void 0;var a=s(482),l=s(643),u=s(511),c=s(3734);i.DEFAULT_ATTR_DATA=Object.freeze(new c.AttributeData);var _=function(){function v(p,g,b){b===void 0&&(b=!1),this.isWrapped=b,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*p);for(var m=g||u.CellData.fromCharData([0,l.NULL_CELL_CHAR,l.NULL_CELL_WIDTH,l.NULL_CELL_CODE]),d=0;d>22,2097152&g?this._combined[p].charCodeAt(this._combined[p].length-1):b]},v.prototype.set=function(p,g){this._data[3*p+1]=g[l.CHAR_DATA_ATTR_INDEX],g[l.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[p]=g[1],this._data[3*p+0]=2097152|p|g[l.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*p+0]=g[l.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|g[l.CHAR_DATA_WIDTH_INDEX]<<22},v.prototype.getWidth=function(p){return this._data[3*p+0]>>22},v.prototype.hasWidth=function(p){return 12582912&this._data[3*p+0]},v.prototype.getFg=function(p){return this._data[3*p+1]},v.prototype.getBg=function(p){return this._data[3*p+2]},v.prototype.hasContent=function(p){return 4194303&this._data[3*p+0]},v.prototype.getCodePoint=function(p){var g=this._data[3*p+0];return 2097152&g?this._combined[p].charCodeAt(this._combined[p].length-1):2097151&g},v.prototype.isCombined=function(p){return 2097152&this._data[3*p+0]},v.prototype.getString=function(p){var g=this._data[3*p+0];return 2097152&g?this._combined[p]:2097151&g?(0,a.stringFromCodePoint)(2097151&g):""},v.prototype.loadCell=function(p,g){var b=3*p;return g.content=this._data[b+0],g.fg=this._data[b+1],g.bg=this._data[b+2],2097152&g.content&&(g.combinedData=this._combined[p]),268435456&g.bg&&(g.extended=this._extendedAttrs[p]),g},v.prototype.setCell=function(p,g){2097152&g.content&&(this._combined[p]=g.combinedData),268435456&g.bg&&(this._extendedAttrs[p]=g.extended),this._data[3*p+0]=g.content,this._data[3*p+1]=g.fg,this._data[3*p+2]=g.bg},v.prototype.setCellFromCodePoint=function(p,g,b,m,d,f){268435456&d&&(this._extendedAttrs[p]=f),this._data[3*p+0]=g|b<<22,this._data[3*p+1]=m,this._data[3*p+2]=d},v.prototype.addCodepointToCell=function(p,g){var b=this._data[3*p+0];2097152&b?this._combined[p]+=(0,a.stringFromCodePoint)(g):(2097151&b?(this._combined[p]=(0,a.stringFromCodePoint)(2097151&b)+(0,a.stringFromCodePoint)(g),b&=-2097152,b|=2097152):b=g|1<<22,this._data[3*p+0]=b)},v.prototype.insertCells=function(p,g,b,m){if((p%=this.length)&&this.getWidth(p-1)===2&&this.setCellFromCodePoint(p-1,0,1,(m==null?void 0:m.fg)||0,(m==null?void 0:m.bg)||0,(m==null?void 0:m.extended)||new c.ExtendedAttrs),g=0;--f)this.setCell(p+g+f,this.loadCell(p+f,d));for(f=0;fthis.length){var b=new Uint32Array(3*p);this.length&&(3*p=p&&delete this._combined[f]}}else this._data=new Uint32Array(0),this._combined={};this.length=p}},v.prototype.fill=function(p){this._combined={},this._extendedAttrs={};for(var g=0;g=0;--p)if(4194303&this._data[3*p+0])return p+(this._data[3*p+0]>>22);return 0},v.prototype.copyCellsFrom=function(p,g,b,m,d){var f=p._data;if(d)for(var h=m-1;h>=0;h--)for(var y=0;y<3;y++)this._data[3*(b+h)+y]=f[3*(g+h)+y];else for(h=0;h=g&&(this._combined[w-g+b]=p._combined[w])}},v.prototype.translateToString=function(p,g,b){p===void 0&&(p=!1),g===void 0&&(g=0),b===void 0&&(b=this.length),p&&(b=Math.min(b,this.getTrimmedLength()));for(var m="";g>22||1}return m},v}();i.BufferLine=_},4841:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.getRangeLength=void 0,i.getRangeLength=function(s,a){if(s.start.y>s.end.y)throw new Error("Buffer range end ("+s.end.x+", "+s.end.y+") cannot be before start ("+s.start.x+", "+s.start.y+")");return a*(s.end.y-s.start.y)+(s.end.x-s.start.x+1)}},4634:(o,i)=>{function s(a,l,u){if(l===a.length-1)return a[l].getTrimmedLength();var c=!a[l].hasContent(u-1)&&a[l].getWidth(u-1)===1,_=a[l+1].getWidth(0)===2;return c&&_?u-1:u}Object.defineProperty(i,"__esModule",{value:!0}),i.getWrappedLineTrimmedLength=i.reflowSmallerGetNewLineLengths=i.reflowLargerApplyNewLayout=i.reflowLargerCreateNewLayout=i.reflowLargerGetLinesToRemove=void 0,i.reflowLargerGetLinesToRemove=function(a,l,u,c,_){for(var v=[],p=0;p=p&&c0&&(x>d||m[x].getTrimmedLength()===0);x--)k++;k>0&&(v.push(p+m.length-k),v.push(k)),p+=m.length-1}}}return v},i.reflowLargerCreateNewLayout=function(a,l){for(var u=[],c=0,_=l[c],v=0,p=0;pb&&(v-=b,p++);var m=a[p].getWidth(v-1)===2;m&&v--;var d=m?u-1:u;c.push(d),g+=d}return c},i.getWrappedLineTrimmedLength=s},5295:function(o,i,s){var a,l=this&&this.__extends||(a=function(v,p){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,b){g.__proto__=b}||function(g,b){for(var m in b)Object.prototype.hasOwnProperty.call(b,m)&&(g[m]=b[m])},a(v,p)},function(v,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function g(){this.constructor=v}a(v,p),v.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)});Object.defineProperty(i,"__esModule",{value:!0}),i.BufferSet=void 0;var u=s(9092),c=s(8460),_=function(v){function p(g,b){var m=v.call(this)||this;return m._optionsService=g,m._bufferService=b,m._onBufferActivate=m.register(new c.EventEmitter),m.reset(),m}return l(p,v),Object.defineProperty(p.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),p.prototype.reset=function(){this._normal=new u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()},Object.defineProperty(p.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),p.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},p.prototype.activateAltBuffer=function(g){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(g),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},p.prototype.resize=function(g,b){this._normal.resize(g,b),this._alt.resize(g,b)},p.prototype.setupTabStops=function(g){this._normal.setupTabStops(g),this._alt.setupTabStops(g)},p}(s(844).Disposable);i.BufferSet=_},511:function(o,i,s){var a,l=this&&this.__extends||(a=function(p,g){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,m){b.__proto__=m}||function(b,m){for(var d in m)Object.prototype.hasOwnProperty.call(m,d)&&(b[d]=m[d])},a(p,g)},function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function b(){this.constructor=p}a(p,g),p.prototype=g===null?Object.create(g):(b.prototype=g.prototype,new b)});Object.defineProperty(i,"__esModule",{value:!0}),i.CellData=void 0;var u=s(482),c=s(643),_=s(3734),v=function(p){function g(){var b=p!==null&&p.apply(this,arguments)||this;return b.content=0,b.fg=0,b.bg=0,b.extended=new _.ExtendedAttrs,b.combinedData="",b}return l(g,p),g.fromCharData=function(b){var m=new g;return m.setFromCharData(b),m},g.prototype.isCombined=function(){return 2097152&this.content},g.prototype.getWidth=function(){return this.content>>22},g.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""},g.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},g.prototype.setFromCharData=function(b){this.fg=b[c.CHAR_DATA_ATTR_INDEX],this.bg=0;var m=!1;if(b[c.CHAR_DATA_CHAR_INDEX].length>2)m=!0;else if(b[c.CHAR_DATA_CHAR_INDEX].length===2){var d=b[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=d&&d<=56319){var f=b[c.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=f&&f<=57343?this.content=1024*(d-55296)+f-56320+65536|b[c.CHAR_DATA_WIDTH_INDEX]<<22:m=!0}else m=!0}else this.content=b[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[c.CHAR_DATA_WIDTH_INDEX]<<22;m&&(this.combinedData=b[c.CHAR_DATA_CHAR_INDEX],this.content=2097152|b[c.CHAR_DATA_WIDTH_INDEX]<<22)},g.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},g}(_.AttributeData);i.CellData=v},643:(o,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_ATTR=i.DEFAULT_COLOR=void 0,i.DEFAULT_COLOR=256,i.DEFAULT_ATTR=256|i.DEFAULT_COLOR<<9,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},4863:function(o,i,s){var a,l=this&&this.__extends||(a=function(_,v){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&(p[b]=g[b])},a(_,v)},function(_,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function p(){this.constructor=_}a(_,v),_.prototype=v===null?Object.create(v):(p.prototype=v.prototype,new p)});Object.defineProperty(i,"__esModule",{value:!0}),i.Marker=void 0;var u=s(8460),c=function(_){function v(p){var g=_.call(this)||this;return g.line=p,g._id=v._nextId++,g.isDisposed=!1,g._onDispose=new u.EventEmitter,g}return l(v,_),Object.defineProperty(v.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),v.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),_.prototype.dispose.call(this))},v._nextId=1,v}(s(844).Disposable);i.Marker=c},7116:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_CHARSET=i.CHARSETS=void 0,i.CHARSETS={},i.DEFAULT_CHARSET=i.CHARSETS.B,i.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},i.CHARSETS.A={"#":"\xA3"},i.CHARSETS.B=void 0,i.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},i.CHARSETS.C=i.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},i.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},i.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},i.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},i.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},i.CHARSETS.E=i.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},i.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},i.CHARSETS.H=i.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},i.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},2584:(o,i)=>{var s,a;Object.defineProperty(i,"__esModule",{value:!0}),i.C1=i.C0=void 0,(a=i.C0||(i.C0={})).NUL="\0",a.SOH="",a.STX="",a.ETX="",a.EOT="",a.ENQ="",a.ACK="",a.BEL="\x07",a.BS="\b",a.HT=" ",a.LF=`
-`,a.VT="\v",a.FF="\f",a.CR="\r",a.SO="",a.SI="",a.DLE="",a.DC1="",a.DC2="",a.DC3="",a.DC4="",a.NAK="",a.SYN="",a.ETB="",a.CAN="",a.EM="",a.SUB="",a.ESC="\x1B",a.FS="",a.GS="",a.RS="",a.US="",a.SP=" ",a.DEL="\x7F",(s=i.C1||(i.C1={})).PAD="\x80",s.HOP="\x81",s.BPH="\x82",s.NBH="\x83",s.IND="\x84",s.NEL="\x85",s.SSA="\x86",s.ESA="\x87",s.HTS="\x88",s.HTJ="\x89",s.VTS="\x8A",s.PLD="\x8B",s.PLU="\x8C",s.RI="\x8D",s.SS2="\x8E",s.SS3="\x8F",s.DCS="\x90",s.PU1="\x91",s.PU2="\x92",s.STS="\x93",s.CCH="\x94",s.MW="\x95",s.SPA="\x96",s.EPA="\x97",s.SOS="\x98",s.SGCI="\x99",s.SCI="\x9A",s.CSI="\x9B",s.ST="\x9C",s.OSC="\x9D",s.PM="\x9E",s.APC="\x9F"},7399:(o,i,s)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.evaluateKeyboardEvent=void 0;var a=s(2584),l={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};i.evaluateKeyboardEvent=function(u,c,_,v){var p={type:0,cancel:!1,key:void 0},g=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?p.key=c?a.C0.ESC+"OA":a.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?p.key=c?a.C0.ESC+"OD":a.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?p.key=c?a.C0.ESC+"OC":a.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(p.key=c?a.C0.ESC+"OB":a.C0.ESC+"[B");break;case 8:if(u.shiftKey){p.key=a.C0.BS;break}if(u.altKey){p.key=a.C0.ESC+a.C0.DEL;break}p.key=a.C0.DEL;break;case 9:if(u.shiftKey){p.key=a.C0.ESC+"[Z";break}p.key=a.C0.HT,p.cancel=!0;break;case 13:p.key=u.altKey?a.C0.ESC+a.C0.CR:a.C0.CR,p.cancel=!0;break;case 27:p.key=a.C0.ESC,u.altKey&&(p.key=a.C0.ESC+a.C0.ESC),p.cancel=!0;break;case 37:if(u.metaKey)break;g?(p.key=a.C0.ESC+"[1;"+(g+1)+"D",p.key===a.C0.ESC+"[1;3D"&&(p.key=a.C0.ESC+(_?"b":"[1;5D"))):p.key=c?a.C0.ESC+"OD":a.C0.ESC+"[D";break;case 39:if(u.metaKey)break;g?(p.key=a.C0.ESC+"[1;"+(g+1)+"C",p.key===a.C0.ESC+"[1;3C"&&(p.key=a.C0.ESC+(_?"f":"[1;5C"))):p.key=c?a.C0.ESC+"OC":a.C0.ESC+"[C";break;case 38:if(u.metaKey)break;g?(p.key=a.C0.ESC+"[1;"+(g+1)+"A",_||p.key!==a.C0.ESC+"[1;3A"||(p.key=a.C0.ESC+"[1;5A")):p.key=c?a.C0.ESC+"OA":a.C0.ESC+"[A";break;case 40:if(u.metaKey)break;g?(p.key=a.C0.ESC+"[1;"+(g+1)+"B",_||p.key!==a.C0.ESC+"[1;3B"||(p.key=a.C0.ESC+"[1;5B")):p.key=c?a.C0.ESC+"OB":a.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(p.key=a.C0.ESC+"[2~");break;case 46:p.key=g?a.C0.ESC+"[3;"+(g+1)+"~":a.C0.ESC+"[3~";break;case 36:p.key=g?a.C0.ESC+"[1;"+(g+1)+"H":c?a.C0.ESC+"OH":a.C0.ESC+"[H";break;case 35:p.key=g?a.C0.ESC+"[1;"+(g+1)+"F":c?a.C0.ESC+"OF":a.C0.ESC+"[F";break;case 33:u.shiftKey?p.type=2:p.key=a.C0.ESC+"[5~";break;case 34:u.shiftKey?p.type=3:p.key=a.C0.ESC+"[6~";break;case 112:p.key=g?a.C0.ESC+"[1;"+(g+1)+"P":a.C0.ESC+"OP";break;case 113:p.key=g?a.C0.ESC+"[1;"+(g+1)+"Q":a.C0.ESC+"OQ";break;case 114:p.key=g?a.C0.ESC+"[1;"+(g+1)+"R":a.C0.ESC+"OR";break;case 115:p.key=g?a.C0.ESC+"[1;"+(g+1)+"S":a.C0.ESC+"OS";break;case 116:p.key=g?a.C0.ESC+"[15;"+(g+1)+"~":a.C0.ESC+"[15~";break;case 117:p.key=g?a.C0.ESC+"[17;"+(g+1)+"~":a.C0.ESC+"[17~";break;case 118:p.key=g?a.C0.ESC+"[18;"+(g+1)+"~":a.C0.ESC+"[18~";break;case 119:p.key=g?a.C0.ESC+"[19;"+(g+1)+"~":a.C0.ESC+"[19~";break;case 120:p.key=g?a.C0.ESC+"[20;"+(g+1)+"~":a.C0.ESC+"[20~";break;case 121:p.key=g?a.C0.ESC+"[21;"+(g+1)+"~":a.C0.ESC+"[21~";break;case 122:p.key=g?a.C0.ESC+"[23;"+(g+1)+"~":a.C0.ESC+"[23~";break;case 123:p.key=g?a.C0.ESC+"[24;"+(g+1)+"~":a.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(_&&!v||!u.altKey||u.metaKey)!_||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?p.key=u.key:u.key&&u.ctrlKey&&u.key==="_"&&(p.key=a.C0.US):u.keyCode===65&&(p.type=1);else{var b=l[u.keyCode],m=b==null?void 0:b[u.shiftKey?1:0];if(m)p.key=a.C0.ESC+m;else if(u.keyCode>=65&&u.keyCode<=90){var d=u.ctrlKey?u.keyCode-64:u.keyCode+32;p.key=a.C0.ESC+String.fromCharCode(d)}}else u.keyCode>=65&&u.keyCode<=90?p.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?p.key=a.C0.NUL:u.keyCode>=51&&u.keyCode<=55?p.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?p.key=a.C0.DEL:u.keyCode===219?p.key=a.C0.ESC:u.keyCode===220?p.key=a.C0.FS:u.keyCode===221&&(p.key=a.C0.GS)}return p}},482:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Utf8ToUtf32=i.StringToUtf32=i.utf32ToString=i.stringFromCodePoint=void 0,i.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},i.utf32ToString=function(l,u,c){u===void 0&&(u=0),c===void 0&&(c=l.length);for(var _="",v=u;v65535?(p-=65536,_+=String.fromCharCode(55296+(p>>10))+String.fromCharCode(p%1024+56320)):_+=String.fromCharCode(p)}return _};var s=function(){function l(){this._interim=0}return l.prototype.clear=function(){this._interim=0},l.prototype.decode=function(u,c){var _=u.length;if(!_)return 0;var v=0,p=0;this._interim&&(56320<=(m=u.charCodeAt(p++))&&m<=57343?c[v++]=1024*(this._interim-55296)+m-56320+65536:(c[v++]=this._interim,c[v++]=m),this._interim=0);for(var g=p;g<_;++g){var b=u.charCodeAt(g);if(55296<=b&&b<=56319){if(++g>=_)return this._interim=b,v;var m;56320<=(m=u.charCodeAt(g))&&m<=57343?c[v++]=1024*(b-55296)+m-56320+65536:(c[v++]=b,c[v++]=m)}else b!==65279&&(c[v++]=b)}return v},l}();i.StringToUtf32=s;var a=function(){function l(){this.interim=new Uint8Array(3)}return l.prototype.clear=function(){this.interim.fill(0)},l.prototype.decode=function(u,c){var _=u.length;if(!_)return 0;var v,p,g,b,m=0,d=0,f=0;if(this.interim[0]){var h=!1,y=this.interim[0];y&=(224&y)==192?31:(240&y)==224?15:7;for(var C=0,w=void 0;(w=63&this.interim[++C])&&C<4;)y<<=6,y|=w;for(var S=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,E=S-C;f=_)return 0;if((192&(w=u[f++]))!=128){f--,h=!0;break}this.interim[C++]=w,y<<=6,y|=63&w}h||(S===2?y<128?f--:c[m++]=y:S===3?y<2048||y>=55296&&y<=57343||y===65279||(c[m++]=y):y<65536||y>1114111||(c[m++]=y)),this.interim.fill(0)}for(var k=_-4,x=f;x<_;){for(;!(!(x=_)return this.interim[0]=v,m;if((192&(p=u[x++]))!=128){x--;continue}if((d=(31&v)<<6|63&p)<128){x--;continue}c[m++]=d}else if((240&v)==224){if(x>=_)return this.interim[0]=v,m;if((192&(p=u[x++]))!=128){x--;continue}if(x>=_)return this.interim[0]=v,this.interim[1]=p,m;if((192&(g=u[x++]))!=128){x--;continue}if((d=(15&v)<<12|(63&p)<<6|63&g)<2048||d>=55296&&d<=57343||d===65279)continue;c[m++]=d}else if((248&v)==240){if(x>=_)return this.interim[0]=v,m;if((192&(p=u[x++]))!=128){x--;continue}if(x>=_)return this.interim[0]=v,this.interim[1]=p,m;if((192&(g=u[x++]))!=128){x--;continue}if(x>=_)return this.interim[0]=v,this.interim[1]=p,this.interim[2]=g,m;if((192&(b=u[x++]))!=128){x--;continue}if((d=(7&v)<<18|(63&p)<<12|(63&g)<<6|63&b)<65536||d>1114111)continue;c[m++]=d}}return m},l}();i.Utf8ToUtf32=a},225:(o,i,s)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeV6=void 0;var a,l=s(8273),u=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],c=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],_=function(){function v(){if(this.version="6",!a){a=new Uint8Array(65536),(0,l.fill)(a,1),a[0]=0,(0,l.fill)(a,0,1,32),(0,l.fill)(a,0,127,160),(0,l.fill)(a,2,4352,4448),a[9001]=2,a[9002]=2,(0,l.fill)(a,2,11904,42192),a[12351]=1,(0,l.fill)(a,2,44032,55204),(0,l.fill)(a,2,63744,64256),(0,l.fill)(a,2,65040,65050),(0,l.fill)(a,2,65072,65136),(0,l.fill)(a,2,65280,65377),(0,l.fill)(a,2,65504,65511);for(var p=0;pb[f][1])return!1;for(;f>=d;)if(g>b[m=d+f>>1][1])d=m+1;else{if(!(g=131072&&p<=196605||p>=196608&&p<=262141?2:1},v}();i.UnicodeV6=_},5981:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WriteBuffer=void 0;var s=typeof queueMicrotask=="undefined"?function(l){Promise.resolve().then(l)}:queueMicrotask,a=function(){function l(u){this._action=u,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0}return l.prototype.writeSync=function(u,c){if(c!==void 0&&this._syncCalls>c)this._syncCalls=0;else if(this._pendingData+=u.length,this._writeBuffer.push(u),this._callbacks.push(void 0),this._syncCalls++,!this._isSyncWriting){var _;for(this._isSyncWriting=!0;_=this._writeBuffer.shift();){this._action(_);var v=this._callbacks.shift();v&&v()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}},l.prototype.write=function(u,c){var _=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return _._innerWrite()})),this._pendingData+=u.length,this._writeBuffer.push(u),this._callbacks.push(c)},l.prototype._innerWrite=function(u,c){var _=this;u===void 0&&(u=0),c===void 0&&(c=!0);for(var v=u||Date.now();this._writeBuffer.length>this._bufferOffset;){var p=this._writeBuffer[this._bufferOffset],g=this._action(p,c);if(g)return void g.catch(function(m){return s(function(){throw m}),Promise.resolve(!1)}).then(function(m){return Date.now()-v>=12?setTimeout(function(){return _._innerWrite(0,m)}):_._innerWrite(v,m)});var b=this._callbacks[this._bufferOffset];if(b&&b(),this._bufferOffset++,this._pendingData-=p.length,Date.now()-v>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return _._innerWrite()})):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0)},l}();i.WriteBuffer=a},5941:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.toRgbString=i.parseColor=void 0;var s=/^([\da-f]{1})\/([\da-f]{1})\/([\da-f]{1})$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,a=/^[\da-f]+$/;function l(u,c){var _=u.toString(16),v=_.length<2?"0"+_:_;switch(c){case 4:return _[0];case 8:return v;case 12:return(v+v).slice(0,3);default:return v+v}}i.parseColor=function(u){if(u){var c=u.toLowerCase();if(c.indexOf("rgb:")===0){c=c.slice(4);var _=s.exec(c);if(_){var v=_[1]?15:_[4]?255:_[7]?4095:65535;return[Math.round(parseInt(_[1]||_[4]||_[7]||_[10],16)/v*255),Math.round(parseInt(_[2]||_[5]||_[8]||_[11],16)/v*255),Math.round(parseInt(_[3]||_[6]||_[9]||_[12],16)/v*255)]}}else if(c.indexOf("#")===0&&(c=c.slice(1),a.exec(c)&&[3,6,9,12].includes(c.length))){for(var p=c.length/3,g=[0,0,0],b=0;b<3;++b){var m=parseInt(c.slice(p*b,p*b+p),16);g[b]=p===1?m<<4:p===2?m:p===3?m>>4:m>>8}return g}}},i.toRgbString=function(u,c){c===void 0&&(c=16);var _=u[0],v=u[1],p=u[2];return"rgb:"+l(_,c)+"/"+l(v,c)+"/"+l(p,c)}},5770:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.PAYLOAD_LIMIT=void 0,i.PAYLOAD_LIMIT=1e7},6351:(o,i,s)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DcsHandler=i.DcsParser=void 0;var a=s(482),l=s(8742),u=s(5770),c=[],_=function(){function g(){this._handlers=Object.create(null),this._active=c,this._ident=0,this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return g.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=c},g.prototype.registerHandler=function(b,m){this._handlers[b]===void 0&&(this._handlers[b]=[]);var d=this._handlers[b];return d.push(m),{dispose:function(){var f=d.indexOf(m);f!==-1&&d.splice(f,1)}}},g.prototype.clearHandler=function(b){this._handlers[b]&&delete this._handlers[b]},g.prototype.setHandlerFallback=function(b){this._handlerFb=b},g.prototype.reset=function(){if(this._active.length)for(var b=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;b>=0;--b)this._active[b].unhook(!1);this._stack.paused=!1,this._active=c,this._ident=0},g.prototype.hook=function(b,m){if(this.reset(),this._ident=b,this._active=this._handlers[b]||c,this._active.length)for(var d=this._active.length-1;d>=0;d--)this._active[d].hook(m);else this._handlerFb(this._ident,"HOOK",m)},g.prototype.put=function(b,m,d){if(this._active.length)for(var f=this._active.length-1;f>=0;f--)this._active[f].put(b,m,d);else this._handlerFb(this._ident,"PUT",(0,a.utf32ToString)(b,m,d))},g.prototype.unhook=function(b,m){if(m===void 0&&(m=!0),this._active.length){var d=!1,f=this._active.length-1,h=!1;if(this._stack.paused&&(f=this._stack.loopPosition-1,d=m,h=this._stack.fallThrough,this._stack.paused=!1),!h&&d===!1){for(;f>=0&&(d=this._active[f].unhook(b))!==!0;f--)if(d instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=f,this._stack.fallThrough=!1,d;f--}for(;f>=0;f--)if((d=this._active[f].unhook(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=f,this._stack.fallThrough=!0,d}else this._handlerFb(this._ident,"UNHOOK",b);this._active=c,this._ident=0},g}();i.DcsParser=_;var v=new l.Params;v.addParam(0);var p=function(){function g(b){this._handler=b,this._data="",this._params=v,this._hitLimit=!1}return g.prototype.hook=function(b){this._params=b.length>1||b.params[0]?b.clone():v,this._data="",this._hitLimit=!1},g.prototype.put=function(b,m,d){this._hitLimit||(this._data+=(0,a.utf32ToString)(b,m,d),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},g.prototype.unhook=function(b){var m=this,d=!1;if(this._hitLimit)d=!1;else if(b&&(d=this._handler(this._data,this._params))instanceof Promise)return d.then(function(f){return m._params=v,m._data="",m._hitLimit=!1,f});return this._params=v,this._data="",this._hitLimit=!1,d},g}();i.DcsHandler=p},2015:function(o,i,s){var a,l=this&&this.__extends||(a=function(d,f){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,y){h.__proto__=y}||function(h,y){for(var C in y)Object.prototype.hasOwnProperty.call(y,C)&&(h[C]=y[C])},a(d,f)},function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");function h(){this.constructor=d}a(d,f),d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)});Object.defineProperty(i,"__esModule",{value:!0}),i.EscapeSequenceParser=i.VT500_TRANSITION_TABLE=i.TransitionTable=void 0;var u=s(844),c=s(8273),_=s(8742),v=s(6242),p=s(6351),g=function(){function d(f){this.table=new Uint8Array(f)}return d.prototype.setDefault=function(f,h){(0,c.fill)(this.table,f<<4|h)},d.prototype.add=function(f,h,y,C){this.table[h<<8|f]=y<<4|C},d.prototype.addMany=function(f,h,y,C){for(var w=0;w1)throw new Error("only one byte as prefix supported");if((C=h.prefix.charCodeAt(0))&&60>C||C>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(h.intermediates){if(h.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var w=0;wS||S>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");C<<=8,C|=S}}if(h.final.length!==1)throw new Error("final must be a single byte");var E=h.final.charCodeAt(0);if(y[0]>E||E>y[1])throw new Error("final must be in range "+y[0]+" .. "+y[1]);return(C<<=8)|E},f.prototype.identToString=function(h){for(var y=[];h;)y.push(String.fromCharCode(255&h)),h>>=8;return y.reverse().join("")},f.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},f.prototype.setPrintHandler=function(h){this._printHandler=h},f.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},f.prototype.registerEscHandler=function(h,y){var C=this._identifier(h,[48,126]);this._escHandlers[C]===void 0&&(this._escHandlers[C]=[]);var w=this._escHandlers[C];return w.push(y),{dispose:function(){var S=w.indexOf(y);S!==-1&&w.splice(S,1)}}},f.prototype.clearEscHandler=function(h){this._escHandlers[this._identifier(h,[48,126])]&&delete this._escHandlers[this._identifier(h,[48,126])]},f.prototype.setEscHandlerFallback=function(h){this._escHandlerFb=h},f.prototype.setExecuteHandler=function(h,y){this._executeHandlers[h.charCodeAt(0)]=y},f.prototype.clearExecuteHandler=function(h){this._executeHandlers[h.charCodeAt(0)]&&delete this._executeHandlers[h.charCodeAt(0)]},f.prototype.setExecuteHandlerFallback=function(h){this._executeHandlerFb=h},f.prototype.registerCsiHandler=function(h,y){var C=this._identifier(h);this._csiHandlers[C]===void 0&&(this._csiHandlers[C]=[]);var w=this._csiHandlers[C];return w.push(y),{dispose:function(){var S=w.indexOf(y);S!==-1&&w.splice(S,1)}}},f.prototype.clearCsiHandler=function(h){this._csiHandlers[this._identifier(h)]&&delete this._csiHandlers[this._identifier(h)]},f.prototype.setCsiHandlerFallback=function(h){this._csiHandlerFb=h},f.prototype.registerDcsHandler=function(h,y){return this._dcsParser.registerHandler(this._identifier(h),y)},f.prototype.clearDcsHandler=function(h){this._dcsParser.clearHandler(this._identifier(h))},f.prototype.setDcsHandlerFallback=function(h){this._dcsParser.setHandlerFallback(h)},f.prototype.registerOscHandler=function(h,y){return this._oscParser.registerHandler(h,y)},f.prototype.clearOscHandler=function(h){this._oscParser.clearHandler(h)},f.prototype.setOscHandlerFallback=function(h){this._oscParser.setHandlerFallback(h)},f.prototype.setErrorHandler=function(h){this._errorHandler=h},f.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},f.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])},f.prototype._preserveStack=function(h,y,C,w,S){this._parseStack.state=h,this._parseStack.handlers=y,this._parseStack.handlerPos=C,this._parseStack.transition=w,this._parseStack.chunkPos=S},f.prototype.parse=function(h,y,C){var w,S=0,E=0,k=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,k=this._parseStack.chunkPos+1;else{if(C===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");var x=this._parseStack.handlers,A=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(C===!1&&A>-1){for(;A>=0&&(w=x[A](this._params))!==!0;A--)if(w instanceof Promise)return this._parseStack.handlerPos=A,w}this._parseStack.handlers=[];break;case 4:if(C===!1&&A>-1){for(;A>=0&&(w=x[A]())!==!0;A--)if(w instanceof Promise)return this._parseStack.handlerPos=A,w}this._parseStack.handlers=[];break;case 6:if(S=h[this._parseStack.chunkPos],w=this._dcsParser.unhook(S!==24&&S!==26,C))return w;S===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(S=h[this._parseStack.chunkPos],w=this._oscParser.end(S!==24&&S!==26,C))return w;S===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,k=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(var L=k;L>4){case 2:for(var T=L+1;;++T){if(T>=y||(S=h[T])<32||S>126&&S=y||(S=h[T])<32||S>126&&S=y||(S=h[T])<32||S>126&&S=y||(S=h[T])<32||S>126&&S=0&&(w=x[H](this._params))!==!0;H--)if(w instanceof Promise)return this._preserveStack(3,x,H,E,L),w;H<0&&this._csiHandlerFb(this._collect<<8|S,this._params),this.precedingCodepoint=0;break;case 8:do switch(S){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(S-48)}while(++L47&&S<60);L--;break;case 9:this._collect<<=8,this._collect|=S;break;case 10:for(var P=this._escHandlers[this._collect<<8|S],R=P?P.length-1:-1;R>=0&&(w=P[R]())!==!0;R--)if(w instanceof Promise)return this._preserveStack(4,P,R,E,L),w;R<0&&this._escHandlerFb(this._collect<<8|S),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|S,this._params);break;case 13:for(var I=L+1;;++I)if(I>=y||(S=h[I])===24||S===26||S===27||S>127&&S=y||(S=h[M])<32||S>127&&S{Object.defineProperty(i,"__esModule",{value:!0}),i.OscHandler=i.OscParser=void 0;var a=s(5770),l=s(482),u=[],c=function(){function v(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return v.prototype.registerHandler=function(p,g){this._handlers[p]===void 0&&(this._handlers[p]=[]);var b=this._handlers[p];return b.push(g),{dispose:function(){var m=b.indexOf(g);m!==-1&&b.splice(m,1)}}},v.prototype.clearHandler=function(p){this._handlers[p]&&delete this._handlers[p]},v.prototype.setHandlerFallback=function(p){this._handlerFb=p},v.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=u},v.prototype.reset=function(){if(this._state===2)for(var p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0},v.prototype._start=function(){if(this._active=this._handlers[this._id]||u,this._active.length)for(var p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")},v.prototype._put=function(p,g,b){if(this._active.length)for(var m=this._active.length-1;m>=0;m--)this._active[m].put(p,g,b);else this._handlerFb(this._id,"PUT",(0,l.utf32ToString)(p,g,b))},v.prototype.start=function(){this.reset(),this._state=1},v.prototype.put=function(p,g,b){if(this._state!==3){if(this._state===1)for(;g0&&this._put(p,g,b)}},v.prototype.end=function(p,g){if(g===void 0&&(g=!0),this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){var b=!1,m=this._active.length-1,d=!1;if(this._stack.paused&&(m=this._stack.loopPosition-1,b=g,d=this._stack.fallThrough,this._stack.paused=!1),!d&&b===!1){for(;m>=0&&(b=this._active[m].end(p))!==!0;m--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!1,b;m--}for(;m>=0;m--)if((b=this._active[m].end(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!0,b}else this._handlerFb(this._id,"END",p);this._active=u,this._id=-1,this._state=0}},v}();i.OscParser=c;var _=function(){function v(p){this._handler=p,this._data="",this._hitLimit=!1}return v.prototype.start=function(){this._data="",this._hitLimit=!1},v.prototype.put=function(p,g,b){this._hitLimit||(this._data+=(0,l.utf32ToString)(p,g,b),this._data.length>a.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},v.prototype.end=function(p){var g=this,b=!1;if(this._hitLimit)b=!1;else if(p&&(b=this._handler(this._data))instanceof Promise)return b.then(function(m){return g._data="",g._hitLimit=!1,m});return this._data="",this._hitLimit=!1,b},v}();i.OscHandler=_},8742:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Params=void 0;var s=2147483647,a=function(){function l(u,c){if(u===void 0&&(u=32),c===void 0&&(c=32),this.maxLength=u,this.maxSubParamsLength=c,c>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(c),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return l.fromArray=function(u){var c=new l;if(!u.length)return c;for(var _=Array.isArray(u[0])?1:0;_>8,v=255&this._subParamsIdx[c];v-_>0&&u.push(Array.prototype.slice.call(this._subParams,_,v))}return u},l.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},l.prototype.addParam=function(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>s?s:u}},l.prototype.addSubParam=function(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>s?s:u,this._subParamsIdx[this.length-1]++}},l.prototype.hasSubParams=function(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0},l.prototype.getSubParams=function(u){var c=this._subParamsIdx[u]>>8,_=255&this._subParamsIdx[u];return _-c>0?this._subParams.subarray(c,_):null},l.prototype.getSubParamsAll=function(){for(var u={},c=0;c>8,v=255&this._subParamsIdx[c];v-_>0&&(u[c]=this._subParams.slice(_,v))}return u},l.prototype.addDigit=function(u){var c;if(!(this._rejectDigits||!(c=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var _=this._digitIsSub?this._subParams:this.params,v=_[c-1];_[c-1]=~v?Math.min(10*v+u,s):u}},l}();i.Params=a},5741:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.AddonManager=void 0;var s=function(){function a(){this._addons=[]}return a.prototype.dispose=function(){for(var l=this._addons.length-1;l>=0;l--)this._addons[l].instance.dispose()},a.prototype.loadAddon=function(l,u){var c=this,_={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(_),u.dispose=function(){return c._wrappedAddonDispose(_)},u.activate(l)},a.prototype._wrappedAddonDispose=function(l){if(!l.isDisposed){for(var u=-1,c=0;c{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferApiView=void 0;var a=s(3785),l=s(511),u=function(){function c(_,v){this._buffer=_,this.type=v}return c.prototype.init=function(_){return this._buffer=_,this},Object.defineProperty(c.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),c.prototype.getLine=function(_){var v=this._buffer.lines.get(_);if(v)return new a.BufferLineApiView(v)},c.prototype.getNullCell=function(){return new l.CellData},c}();i.BufferApiView=u},3785:(o,i,s)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLineApiView=void 0;var a=s(511),l=function(){function u(c){this._line=c}return Object.defineProperty(u.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),u.prototype.getCell=function(c,_){if(!(c<0||c>=this._line.length))return _?(this._line.loadCell(c,_),_):this._line.loadCell(c,new a.CellData)},u.prototype.translateToString=function(c,_,v){return this._line.translateToString(c,_,v)},u}();i.BufferLineApiView=l},8285:(o,i,s)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferNamespaceApi=void 0;var a=s(8771),l=s(8460),u=function(){function c(_){var v=this;this._core=_,this._onBufferChange=new l.EventEmitter,this._normal=new a.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new a.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(function(){return v._onBufferChange.fire(v.active)})}return Object.defineProperty(c.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"active",{get:function(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"normal",{get:function(){return this._normal.init(this._core.buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"alternate",{get:function(){return this._alternate.init(this._core.buffers.alt)},enumerable:!1,configurable:!0}),c}();i.BufferNamespaceApi=u},7975:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ParserApi=void 0;var s=function(){function a(l){this._core=l}return a.prototype.registerCsiHandler=function(l,u){return this._core.registerCsiHandler(l,function(c){return u(c.toArray())})},a.prototype.addCsiHandler=function(l,u){return this.registerCsiHandler(l,u)},a.prototype.registerDcsHandler=function(l,u){return this._core.registerDcsHandler(l,function(c,_){return u(c,_.toArray())})},a.prototype.addDcsHandler=function(l,u){return this.registerDcsHandler(l,u)},a.prototype.registerEscHandler=function(l,u){return this._core.registerEscHandler(l,u)},a.prototype.addEscHandler=function(l,u){return this.registerEscHandler(l,u)},a.prototype.registerOscHandler=function(l,u){return this._core.registerOscHandler(l,u)},a.prototype.addOscHandler=function(l,u){return this.registerOscHandler(l,u)},a}();i.ParserApi=s},7090:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeApi=void 0;var s=function(){function a(l){this._core=l}return a.prototype.register=function(l){this._core.unicodeService.register(l)},Object.defineProperty(a.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(l){this._core.unicodeService.activeVersion=l},enumerable:!1,configurable:!0}),a}();i.UnicodeApi=s},744:function(o,i,s){var a,l=this&&this.__extends||(a=function(m,d){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&(f[y]=h[y])},a(m,d)},function(m,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function f(){this.constructor=m}a(m,d),m.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}),u=this&&this.__decorate||function(m,d,f,h){var y,C=arguments.length,w=C<3?d:h===null?h=Object.getOwnPropertyDescriptor(d,f):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(m,d,f,h);else for(var S=m.length-1;S>=0;S--)(y=m[S])&&(w=(C<3?y(w):C>3?y(d,f,w):y(d,f))||w);return C>3&&w&&Object.defineProperty(d,f,w),w},c=this&&this.__param||function(m,d){return function(f,h){d(f,h,m)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferService=i.MINIMUM_ROWS=i.MINIMUM_COLS=void 0;var _=s(2585),v=s(5295),p=s(8460),g=s(844);i.MINIMUM_COLS=2,i.MINIMUM_ROWS=1;var b=function(m){function d(f){var h=m.call(this)||this;return h._optionsService=f,h.isUserScrolling=!1,h._onResize=new p.EventEmitter,h._onScroll=new p.EventEmitter,h.cols=Math.max(f.rawOptions.cols||0,i.MINIMUM_COLS),h.rows=Math.max(f.rawOptions.rows||0,i.MINIMUM_ROWS),h.buffers=new v.BufferSet(f,h),h}return l(d,m),Object.defineProperty(d.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),d.prototype.dispose=function(){m.prototype.dispose.call(this),this.buffers.dispose()},d.prototype.resize=function(f,h){this.cols=f,this.rows=h,this.buffers.resize(f,h),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:f,rows:h})},d.prototype.reset=function(){this.buffers.reset(),this.isUserScrolling=!1},d.prototype.scroll=function(f,h){h===void 0&&(h=!1);var y,C=this.buffer;(y=this._cachedBlankLine)&&y.length===this.cols&&y.getFg(0)===f.fg&&y.getBg(0)===f.bg||(y=C.getBlankLine(f,h),this._cachedBlankLine=y),y.isWrapped=h;var w=C.ybase+C.scrollTop,S=C.ybase+C.scrollBottom;if(C.scrollTop===0){var E=C.lines.isFull;S===C.lines.length-1?E?C.lines.recycle().copyFrom(y):C.lines.push(y.clone()):C.lines.splice(S+1,0,y.clone()),E?this.isUserScrolling&&(C.ydisp=Math.max(C.ydisp-1,0)):(C.ybase++,this.isUserScrolling||C.ydisp++)}else{var k=S-w+1;C.lines.shiftElements(w+1,k-1,-1),C.lines.set(S,y.clone())}this.isUserScrolling||(C.ydisp=C.ybase),this._onScroll.fire(C.ydisp)},d.prototype.scrollLines=function(f,h,y){var C=this.buffer;if(f<0){if(C.ydisp===0)return;this.isUserScrolling=!0}else f+C.ydisp>=C.ybase&&(this.isUserScrolling=!1);var w=C.ydisp;C.ydisp=Math.max(Math.min(C.ydisp+f,C.ybase),0),w!==C.ydisp&&(h||this._onScroll.fire(C.ydisp))},d.prototype.scrollPages=function(f){this.scrollLines(f*(this.rows-1))},d.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},d.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},d.prototype.scrollToLine=function(f){var h=f-this.buffer.ydisp;h!==0&&this.scrollLines(h)},u([c(0,_.IOptionsService)],d)}(g.Disposable);i.BufferService=b},7994:(o,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CharsetService=void 0;var s=function(){function a(){this.glevel=0,this._charsets=[]}return a.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},a.prototype.setgLevel=function(l){this.glevel=l,this.charset=this._charsets[l]},a.prototype.setgCharset=function(l,u){this._charsets[l]=u,this.glevel===l&&(this.charset=u)},a}();i.CharsetService=s},1753:function(o,i,s){var a=this&&this.__decorate||function(m,d,f,h){var y,C=arguments.length,w=C<3?d:h===null?h=Object.getOwnPropertyDescriptor(d,f):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(m,d,f,h);else for(var S=m.length-1;S>=0;S--)(y=m[S])&&(w=(C<3?y(w):C>3?y(d,f,w):y(d,f))||w);return C>3&&w&&Object.defineProperty(d,f,w),w},l=this&&this.__param||function(m,d){return function(f,h){d(f,h,m)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreMouseService=void 0;var u=s(2585),c=s(8460),_={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(m){return m.button!==4&&m.action===1&&(m.ctrl=!1,m.alt=!1,m.shift=!1,!0)}},VT200:{events:19,restrict:function(m){return m.action!==32}},DRAG:{events:23,restrict:function(m){return m.action!==32||m.button!==3}},ANY:{events:31,restrict:function(m){return!0}}};function v(m,d){var f=(m.ctrl?16:0)|(m.shift?4:0)|(m.alt?8:0);return m.button===4?(f|=64,f|=m.action):(f|=3&m.button,4&m.button&&(f|=64),8&m.button&&(f|=128),m.action===32?f|=32:m.action!==0||d||(f|=3)),f}var p=String.fromCharCode,g={DEFAULT:function(m){var d=[v(m,!1)+32,m.col+32,m.row+32];return d[0]>255||d[1]>255||d[2]>255?"":"\x1B[M"+p(d[0])+p(d[1])+p(d[2])},SGR:function(m){var d=m.action===0&&m.button!==4?"m":"M";return"\x1B[<"+v(m,!0)+";"+m.col+";"+m.row+d}},b=function(){function m(d,f){this._bufferService=d,this._coreService=f,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new c.EventEmitter,this._lastEvent=null;for(var h=0,y=Object.keys(_);h=this._bufferService.cols||d.row<0||d.row>=this._bufferService.rows||d.button===4&&d.action===32||d.button===3&&d.action!==32||d.button!==4&&(d.action===2||d.action===3)||(d.col++,d.row++,d.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,d))||!this._protocols[this._activeProtocol].restrict(d))return!1;var f=this._encodings[this._activeEncoding](d);return f&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(f):this._coreService.triggerDataEvent(f,!0)),this._lastEvent=d,!0},m.prototype.explainEvents=function(d){return{down:!!(1&d),up:!!(2&d),drag:!!(4&d),move:!!(8&d),wheel:!!(16&d)}},m.prototype._compareEvents=function(d,f){return d.col===f.col&&d.row===f.row&&d.button===f.button&&d.action===f.action&&d.ctrl===f.ctrl&&d.alt===f.alt&&d.shift===f.shift},a([l(0,u.IBufferService),l(1,u.ICoreService)],m)}();i.CoreMouseService=b},6975:function(o,i,s){var a,l=this&&this.__extends||(a=function(f,h){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,C){y.__proto__=C}||function(y,C){for(var w in C)Object.prototype.hasOwnProperty.call(C,w)&&(y[w]=C[w])},a(f,h)},function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function y(){this.constructor=f}a(f,h),f.prototype=h===null?Object.create(h):(y.prototype=h.prototype,new y)}),u=this&&this.__decorate||function(f,h,y,C){var w,S=arguments.length,E=S<3?h:C===null?C=Object.getOwnPropertyDescriptor(h,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(f,h,y,C);else for(var k=f.length-1;k>=0;k--)(w=f[k])&&(E=(S<3?w(E):S>3?w(h,y,E):w(h,y))||E);return S>3&&E&&Object.defineProperty(h,y,E),E},c=this&&this.__param||function(f,h){return function(y,C){h(y,C,f)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreService=void 0;var _=s(2585),v=s(8460),p=s(1439),g=s(844),b=Object.freeze({insertMode:!1}),m=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),d=function(f){function h(y,C,w,S){var E=f.call(this)||this;return E._bufferService=C,E._logService=w,E._optionsService=S,E.isCursorInitialized=!1,E.isCursorHidden=!1,E._onData=E.register(new v.EventEmitter),E._onUserInput=E.register(new v.EventEmitter),E._onBinary=E.register(new v.EventEmitter),E._scrollToBottom=y,E.register({dispose:function(){return E._scrollToBottom=void 0}}),E.modes=(0,p.clone)(b),E.decPrivateModes=(0,p.clone)(m),E}return l(h,f),Object.defineProperty(h.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),h.prototype.reset=function(){this.modes=(0,p.clone)(b),this.decPrivateModes=(0,p.clone)(m)},h.prototype.triggerDataEvent=function(y,C){if(C===void 0&&(C=!1),!this._optionsService.rawOptions.disableStdin){var w=this._bufferService.buffer;w.ybase!==w.ydisp&&this._scrollToBottom(),C&&this._onUserInput.fire(),this._logService.debug('sending data "'+y+'"',function(){return y.split("").map(function(S){return S.charCodeAt(0)})}),this._onData.fire(y)}},h.prototype.triggerBinaryEvent=function(y){this._optionsService.rawOptions.disableStdin||(this._logService.debug('sending binary "'+y+'"',function(){return y.split("").map(function(C){return C.charCodeAt(0)})}),this._onBinary.fire(y))},u([c(1,_.IBufferService),c(2,_.ILogService),c(3,_.IOptionsService)],h)}(g.Disposable);i.CoreService=d},3730:function(o,i,s){var a=this&&this.__decorate||function(_,v,p,g){var b,m=arguments.length,d=m<3?v:g===null?g=Object.getOwnPropertyDescriptor(v,p):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(_,v,p,g);else for(var f=_.length-1;f>=0;f--)(b=_[f])&&(d=(m<3?b(d):m>3?b(v,p,d):b(v,p))||d);return m>3&&d&&Object.defineProperty(v,p,d),d},l=this&&this.__param||function(_,v){return function(p,g){v(p,g,_)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DirtyRowService=void 0;var u=s(2585),c=function(){function _(v){this._bufferService=v,this.clearRange()}return Object.defineProperty(_.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),_.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},_.prototype.markDirty=function(v){vthis._end&&(this._end=v)},_.prototype.markRangeDirty=function(v,p){if(v>p){var g=v;v=p,p=g}vthis._end&&(this._end=p)},_.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},a([l(0,u.IBufferService)],_)}();i.DirtyRowService=c},4348:function(o,i,s){var a=this&&this.__spreadArray||function(v,p,g){if(g||arguments.length===2)for(var b,m=0,d=p.length;m0?m[0].index:g.length;if(g.length!==w)throw new Error("[createInstance] First service dependency of "+p.name+" at position "+(w+1)+" conflicts with "+g.length+" static arguments");return new(p.bind.apply(p,a([void 0],a(a([],g,!0),d,!0),!1)))},v}();i.InstantiationService=_},7866:function(o,i,s){var a=this&&this.__decorate||function(p,g,b,m){var d,f=arguments.length,h=f<3?g:m===null?m=Object.getOwnPropertyDescriptor(g,b):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(p,g,b,m);else for(var y=p.length-1;y>=0;y--)(d=p[y])&&(h=(f<3?d(h):f>3?d(g,b,h):d(g,b))||h);return f>3&&h&&Object.defineProperty(g,b,h),h},l=this&&this.__param||function(p,g){return function(b,m){g(b,m,p)}},u=this&&this.__spreadArray||function(p,g,b){if(b||arguments.length===2)for(var m,d=0,f=g.length;d