homebridge-config-ui-x
Version:
A web based management, configuration and control platform for Homebridge.
3 lines • 390 kB
JavaScript
import{e as pr}from"./chunk-QSPBB6EE.js";var yr=pr((Pt,ar)=>{(function(Ae,ue){if(typeof Pt=="object"&&typeof ar=="object")ar.exports=ue();else if(typeof define=="function"&&define.amd)define([],ue);else{var W=ue();for(var c in W)(typeof Pt=="object"?Pt:Ae)[c]=W[c]}})(self,function(){return(()=>{"use strict";var Ae={4567:function(W,c,w){var _,u=this&&this.__extends||(_=function(r,e){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},_(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}_(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)});Object.defineProperty(c,"__esModule",{value:!0}),c.AccessibilityManager=void 0;var f=w(9042),d=w(6114),m=w(9924),v=w(3656),a=w(844),s=w(5596),p=w(9631),h=function(r){function e(t,i){var n=r.call(this)||this;n._terminal=t,n._renderService=i,n._liveRegionLineCount=0,n._charsToConsume=[],n._charsToAnnounce="",n._accessibilityTreeRoot=document.createElement("div"),n._accessibilityTreeRoot.classList.add("xterm-accessibility"),n._accessibilityTreeRoot.tabIndex=0,n._rowContainer=document.createElement("div"),n._rowContainer.setAttribute("role","list"),n._rowContainer.classList.add("xterm-accessibility-tree"),n._rowElements=[];for(var l=0;l<n._terminal.rows;l++)n._rowElements[l]=n._createAccessibilityTreeNode(),n._rowContainer.appendChild(n._rowElements[l]);if(n._topBoundaryFocusListener=function(o){return n._onBoundaryFocus(o,0)},n._bottomBoundaryFocusListener=function(o){return n._onBoundaryFocus(o,1)},n._rowElements[0].addEventListener("focus",n._topBoundaryFocusListener),n._rowElements[n._rowElements.length-1].addEventListener("focus",n._bottomBoundaryFocusListener),n._refreshRowsDimensions(),n._accessibilityTreeRoot.appendChild(n._rowContainer),n._renderRowsDebouncer=new m.TimeBasedDebouncer(n._renderRows.bind(n)),n._refreshRows(),n._liveRegion=document.createElement("div"),n._liveRegion.classList.add("live-region"),n._liveRegion.setAttribute("aria-live","assertive"),n._accessibilityTreeRoot.appendChild(n._liveRegion),!n._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return n._terminal.element.insertAdjacentElement("afterbegin",n._accessibilityTreeRoot),n.register(n._renderRowsDebouncer),n.register(n._terminal.onResize(function(o){return n._onResize(o.rows)})),n.register(n._terminal.onRender(function(o){return n._refreshRows(o.start,o.end)})),n.register(n._terminal.onScroll(function(){return n._refreshRows()})),n.register(n._terminal.onA11yChar(function(o){return n._onChar(o)})),n.register(n._terminal.onLineFeed(function(){return n._onChar(`
`)})),n.register(n._terminal.onA11yTab(function(o){return n._onTab(o)})),n.register(n._terminal.onKey(function(o){return n._onKey(o.key)})),n.register(n._terminal.onBlur(function(){return n._clearLiveRegion()})),n.register(n._renderService.onDimensionsChange(function(){return n._refreshRowsDimensions()})),n._screenDprMonitor=new s.ScreenDprMonitor,n.register(n._screenDprMonitor),n._screenDprMonitor.setListener(function(){return n._refreshRowsDimensions()}),n.register((0,v.addDisposableDomListener)(window,"resize",function(){return n._refreshRowsDimensions()})),n}return u(e,r),e.prototype.dispose=function(){r.prototype.dispose.call(this),(0,p.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0},e.prototype._onBoundaryFocus=function(t,i){var n=t.target,l=this._rowElements[i===0?1:this._rowElements.length-2];if(n.getAttribute("aria-posinset")!==(i===0?"1":""+this._terminal.buffer.lines.length)&&t.relatedTarget===l){var o,y;if(i===0?(o=n,y=this._rowElements.pop(),this._rowContainer.removeChild(y)):(o=this._rowElements.shift(),y=n,this._rowContainer.removeChild(o)),o.removeEventListener("focus",this._topBoundaryFocusListener),y.removeEventListener("focus",this._bottomBoundaryFocusListener),i===0){var b=this._createAccessibilityTreeNode();this._rowElements.unshift(b),this._rowContainer.insertAdjacentElement("afterbegin",b)}else b=this._createAccessibilityTreeNode(),this._rowElements.push(b),this._rowContainer.appendChild(b);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(i===0?-1:1),this._rowElements[i===0?1:this._rowElements.length-2].focus(),t.preventDefault(),t.stopImmediatePropagation()}},e.prototype._onResize=function(t){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var i=this._rowContainer.children.length;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var t=document.createElement("div");return t.setAttribute("role","listitem"),t.tabIndex=-1,this._refreshRowDimensions(t),t},e.prototype._onTab=function(t){for(var i=0;i<t;i++)this._onChar(" ")},e.prototype._onChar=function(t){var i=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==t&&(this._charsToAnnounce+=t):this._charsToAnnounce+=t,t===`
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)),d.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){i._accessibilityTreeRoot.appendChild(i._liveRegion)},0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,d.isMac&&(0,p.removeElementFromParent)(this._liveRegion)},e.prototype._onKey=function(t){this._clearLiveRegion(),this._charsToConsume.push(t)},e.prototype._refreshRows=function(t,i){this._renderRowsDebouncer.refresh(t,i,this._terminal.rows)},e.prototype._renderRows=function(t,i){for(var n=this._terminal.buffer,l=n.lines.length.toString(),o=t;o<=i;o++){var y=n.translateBufferLineToString(n.ydisp+o,!0),b=(n.ydisp+o+1).toString(),g=this._rowElements[o];g&&(y.length===0?g.innerText="\xA0":g.textContent=y,g.setAttribute("aria-posinset",b),g.setAttribute("aria-setsize",l))}this._announceCharacters()},e.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var t=0;t<this._terminal.rows;t++)this._refreshRowDimensions(this._rowElements[t])}},e.prototype._refreshRowDimensions=function(t){t.style.height=this._renderService.dimensions.actualCellHeight+"px"},e.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},e}(a.Disposable);c.AccessibilityManager=h},3614:(W,c)=>{function w(d){return d.replace(/\r?\n/g,"\r")}function _(d,m){return m?"\x1B[200~"+d+"\x1B[201~":d}function u(d,m,v){d=_(d=w(d),v.decPrivateModes.bracketedPasteMode),v.triggerDataEvent(d,!0),m.value=""}function f(d,m,v){var a=v.getBoundingClientRect(),s=d.clientX-a.left-10,p=d.clientY-a.top-10;m.style.width="20px",m.style.height="20px",m.style.left=s+"px",m.style.top=p+"px",m.style.zIndex="1000",m.focus()}Object.defineProperty(c,"__esModule",{value:!0}),c.rightClickHandler=c.moveTextAreaUnderMouseCursor=c.paste=c.handlePasteEvent=c.copyHandler=c.bracketTextForPaste=c.prepareTextForTerminal=void 0,c.prepareTextForTerminal=w,c.bracketTextForPaste=_,c.copyHandler=function(d,m){d.clipboardData&&d.clipboardData.setData("text/plain",m.selectionText),d.preventDefault()},c.handlePasteEvent=function(d,m,v){d.stopPropagation(),d.clipboardData&&u(d.clipboardData.getData("text/plain"),m,v)},c.paste=u,c.moveTextAreaUnderMouseCursor=f,c.rightClickHandler=function(d,m,v,a,s){f(d,m,v),s&&a.rightClickSelect(d),m.value=a.selectionText,m.select()}},7239:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ColorContrastCache=void 0;var w=function(){function _(){this._color={},this._rgba={}}return _.prototype.clear=function(){this._color={},this._rgba={}},_.prototype.setCss=function(u,f,d){this._rgba[u]||(this._rgba[u]={}),this._rgba[u][f]=d},_.prototype.getCss=function(u,f){return this._rgba[u]?this._rgba[u][f]:void 0},_.prototype.setColor=function(u,f,d){this._color[u]||(this._color[u]={}),this._color[u][f]=d},_.prototype.getColor=function(u,f){return this._color[u]?this._color[u][f]:void 0},_}();c.ColorContrastCache=w},5680:function(W,c,w){var _=this&&this.__read||function(h,r){var e=typeof Symbol=="function"&&h[Symbol.iterator];if(!e)return h;var t,i,n=e.call(h),l=[];try{for(;(r===void 0||r-- >0)&&!(t=n.next()).done;)l.push(t.value)}catch(o){i={error:o}}finally{try{t&&!t.done&&(e=n.return)&&e.call(n)}finally{if(i)throw i.error}}return l};Object.defineProperty(c,"__esModule",{value:!0}),c.ColorManager=c.DEFAULT_ANSI_COLORS=void 0;var u=w(8055),f=w(7239),d=u.css.toColor("#ffffff"),m=u.css.toColor("#000000"),v=u.css.toColor("#ffffff"),a=u.css.toColor("#000000"),s={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};c.DEFAULT_ANSI_COLORS=Object.freeze(function(){for(var h=[u.css.toColor("#2e3436"),u.css.toColor("#cc0000"),u.css.toColor("#4e9a06"),u.css.toColor("#c4a000"),u.css.toColor("#3465a4"),u.css.toColor("#75507b"),u.css.toColor("#06989a"),u.css.toColor("#d3d7cf"),u.css.toColor("#555753"),u.css.toColor("#ef2929"),u.css.toColor("#8ae234"),u.css.toColor("#fce94f"),u.css.toColor("#729fcf"),u.css.toColor("#ad7fa8"),u.css.toColor("#34e2e2"),u.css.toColor("#eeeeec")],r=[0,95,135,175,215,255],e=0;e<216;e++){var t=r[e/36%6|0],i=r[e/6%6|0],n=r[e%6];h.push({css:u.channels.toCss(t,i,n),rgba:u.channels.toRgba(t,i,n)})}for(e=0;e<24;e++){var l=8+10*e;h.push({css:u.channels.toCss(l,l,l),rgba:u.channels.toRgba(l,l,l)})}return h}());var p=function(){function h(r,e){this.allowTransparency=e;var t=r.createElement("canvas");t.width=1,t.height=1;var i=t.getContext("2d");if(!i)throw new Error("Could not get rendering context");this._ctx=i,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new f.ColorContrastCache,this.colors={foreground:d,background:m,cursor:v,cursorAccent:a,selectionTransparent:s,selectionOpaque:u.color.blend(m,s),selectionForeground:void 0,ansi:c.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache},this._updateRestoreColors()}return h.prototype.onOptionsChange=function(r){r==="minimumContrastRatio"&&this._contrastCache.clear()},h.prototype.setTheme=function(r){r===void 0&&(r={}),this.colors.foreground=this._parseColor(r.foreground,d),this.colors.background=this._parseColor(r.background,m),this.colors.cursor=this._parseColor(r.cursor,v,!0),this.colors.cursorAccent=this._parseColor(r.cursorAccent,a,!0),this.colors.selectionTransparent=this._parseColor(r.selection,s,!0),this.colors.selectionOpaque=u.color.blend(this.colors.background,this.colors.selectionTransparent);var e={css:"",rgba:0};this.colors.selectionForeground=r.selectionForeground?this._parseColor(r.selectionForeground,e):void 0,this.colors.selectionForeground===e&&(this.colors.selectionForeground=void 0),u.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=u.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(r.black,c.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(r.red,c.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(r.green,c.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(r.yellow,c.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(r.blue,c.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(r.magenta,c.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(r.cyan,c.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(r.white,c.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(r.brightBlack,c.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(r.brightRed,c.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(r.brightGreen,c.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(r.brightYellow,c.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(r.brightBlue,c.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(r.brightMagenta,c.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(r.brightCyan,c.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(r.brightWhite,c.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear(),this._updateRestoreColors()},h.prototype.restoreColor=function(r){if(r!==void 0)switch(r){case 256:this.colors.foreground=this._restoreColors.foreground;break;case 257:this.colors.background=this._restoreColors.background;break;case 258:this.colors.cursor=this._restoreColors.cursor;break;default:this.colors.ansi[r]=this._restoreColors.ansi[r]}else for(var e=0;e<this._restoreColors.ansi.length;++e)this.colors.ansi[e]=this._restoreColors.ansi[e]},h.prototype._updateRestoreColors=function(){this._restoreColors={foreground:this.colors.foreground,background:this.colors.background,cursor:this.colors.cursor,ansi:this.colors.ansi.slice()}},h.prototype._parseColor=function(r,e,t){if(t===void 0&&(t=this.allowTransparency),r===void 0)return e;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=r,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+r+" is invalid using fallback "+e.css),e;this._ctx.fillRect(0,0,1,1);var i=this._ctx.getImageData(0,0,1,1).data;if(i[3]!==255){if(!t)return console.warn("Color: "+r+" is using transparency, but allowTransparency is false. Using fallback "+e.css+"."),e;var n=_(this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(S){return Number(S)}),4),l=n[0],o=n[1],y=n[2],b=n[3],g=Math.round(255*b);return{rgba:u.channels.toRgba(l,o,y,g),css:r}}return{css:this._ctx.fillStyle,rgba:u.channels.toRgba(i[0],i[1],i[2],i[3])}},h}();c.ColorManager=p},9631:function(W,c){var w=this&&this.__values||function(_){var u=typeof Symbol=="function"&&Symbol.iterator,f=u&&_[u],d=0;if(f)return f.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&d>=_.length&&(_=void 0),{value:_&&_[d++],done:!_}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.removeElementFromParent=void 0,c.removeElementFromParent=function(){for(var _,u,f,d=[],m=0;m<arguments.length;m++)d[m]=arguments[m];try{for(var v=w(d),a=v.next();!a.done;a=v.next()){var s=a.value;(f=s?.parentElement)===null||f===void 0||f.removeChild(s)}}catch(p){_={error:p}}finally{try{a&&!a.done&&(u=v.return)&&u.call(v)}finally{if(_)throw _.error}}}},3656:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.addDisposableDomListener=void 0,c.addDisposableDomListener=function(w,_,u,f){w.addEventListener(_,u,f);var d=!1;return{dispose:function(){d||(d=!0,w.removeEventListener(_,u,f))}}}},3551:function(W,c,w){var _=this&&this.__decorate||function(a,s,p,h){var r,e=arguments.length,t=e<3?s:h===null?h=Object.getOwnPropertyDescriptor(s,p):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(a,s,p,h);else for(var i=a.length-1;i>=0;i--)(r=a[i])&&(t=(e<3?r(t):e>3?r(s,p,t):r(s,p))||t);return e>3&&t&&Object.defineProperty(s,p,t),t},u=this&&this.__param||function(a,s){return function(p,h){s(p,h,a)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseZone=c.Linkifier=void 0;var f=w(8460),d=w(2585),m=function(){function a(s,p,h){this._bufferService=s,this._logService=p,this._unicodeService=h,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new f.EventEmitter,this._onHideLinkUnderline=new f.EventEmitter,this._onLinkTooltip=new f.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(a.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),a.prototype.attachToDom=function(s,p){this._element=s,this._mouseZoneManager=p},a.prototype.linkifyRows=function(s,p){var h=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=s,this._rowsToLinkify.end=p):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,s),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,p)),this._mouseZoneManager.clearAll(s,p),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return h._linkifyRows()},a._timeBeforeLatency))},a.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var s=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var p=s.ydisp+this._rowsToLinkify.start;if(!(p>=s.lines.length)){for(var h=s.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,r=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,p,h,r,r);e.hasNext();)for(var t=e.next(),i=0;i<this._linkMatchers.length;i++)this._doLinkifyRow(t.range.first,t.content,this._linkMatchers[i]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},a.prototype.registerLinkMatcher=function(s,p,h){if(h===void 0&&(h={}),!p)throw new Error("handler must be defined");var r={id:this._nextLinkMatcherId++,regex:s,handler:p,matchIndex:h.matchIndex,validationCallback:h.validationCallback,hoverTooltipCallback:h.tooltipCallback,hoverLeaveCallback:h.leaveCallback,willLinkActivate:h.willLinkActivate,priority:h.priority||0};return this._addLinkMatcherToList(r),r.id},a.prototype._addLinkMatcherToList=function(s){if(this._linkMatchers.length!==0){for(var p=this._linkMatchers.length-1;p>=0;p--)if(s.priority<=this._linkMatchers[p].priority)return void this._linkMatchers.splice(p+1,0,s);this._linkMatchers.splice(0,0,s)}else this._linkMatchers.push(s)},a.prototype.deregisterLinkMatcher=function(s){for(var p=0;p<this._linkMatchers.length;p++)if(this._linkMatchers[p].id===s)return this._linkMatchers.splice(p,1),!0;return!1},a.prototype._doLinkifyRow=function(s,p,h){for(var r,e=this,t=new RegExp(h.regex.source,(h.regex.flags||"")+"g"),i=-1,n=function(){var o=r[typeof h.matchIndex!="number"?0:h.matchIndex];if(!o)return l._logService.debug("match found without corresponding matchIndex",r,h),"break";if(i=p.indexOf(o,i+1),t.lastIndex=i+o.length,i<0)return"break";var y=l._bufferService.buffer.stringIndexToBufferIndex(s,i);if(y[0]<0)return"break";var b=l._bufferService.buffer.lines.get(y[0]);if(!b)return"break";var g=b.getFg(y[1]),S=g?g>>9&511:void 0;h.validationCallback?h.validationCallback(o,function(C){e._rowsTimeoutId||C&&e._addLink(y[1],y[0]-e._bufferService.buffer.ydisp,o,h,S)}):l._addLink(y[1],y[0]-l._bufferService.buffer.ydisp,o,h,S)},l=this;(r=t.exec(p))!==null&&n()!=="break";);},a.prototype._addLink=function(s,p,h,r,e){var t=this;if(this._mouseZoneManager&&this._element){var i=this._unicodeService.getStringCellWidth(h),n=s%this._bufferService.cols,l=p+Math.floor(s/this._bufferService.cols),o=(n+i)%this._bufferService.cols,y=l+Math.floor((n+i)/this._bufferService.cols);o===0&&(o=this._bufferService.cols,y--),this._mouseZoneManager.add(new v(n+1,l+1,o+1,y+1,function(b){if(r.handler)return r.handler(b,h);var g=window.open();g?(g.opener=null,g.location.href=h):console.warn("Opening link blocked as opener could not be cleared")},function(){t._onShowLinkUnderline.fire(t._createLinkHoverEvent(n,l,o,y,e)),t._element.classList.add("xterm-cursor-pointer")},function(b){t._onLinkTooltip.fire(t._createLinkHoverEvent(n,l,o,y,e)),r.hoverTooltipCallback&&r.hoverTooltipCallback(b,h,{start:{x:n,y:l},end:{x:o,y}})},function(){t._onHideLinkUnderline.fire(t._createLinkHoverEvent(n,l,o,y,e)),t._element.classList.remove("xterm-cursor-pointer"),r.hoverLeaveCallback&&r.hoverLeaveCallback()},function(b){return!r.willLinkActivate||r.willLinkActivate(b,h)}))}},a.prototype._createLinkHoverEvent=function(s,p,h,r,e){return{x1:s,y1:p,x2:h,y2:r,cols:this._bufferService.cols,fg:e}},a._timeBeforeLatency=200,a=_([u(0,d.IBufferService),u(1,d.ILogService),u(2,d.IUnicodeService)],a)}();c.Linkifier=m;var v=function(a,s,p,h,r,e,t,i,n){this.x1=a,this.y1=s,this.x2=p,this.y2=h,this.clickCallback=r,this.hoverCallback=e,this.tooltipCallback=t,this.leaveCallback=i,this.willLinkActivate=n};c.MouseZone=v},6465:function(W,c,w){var _,u=this&&this.__extends||(_=function(e,t){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])},_(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}_(e,t),e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}),f=this&&this.__decorate||function(e,t,i,n){var l,o=arguments.length,y=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(e,t,i,n);else for(var b=e.length-1;b>=0;b--)(l=e[b])&&(y=(o<3?l(y):o>3?l(t,i,y):l(t,i))||y);return o>3&&y&&Object.defineProperty(t,i,y),y},d=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}},m=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},v=this&&this.__read||function(e,t){var i=typeof Symbol=="function"&&e[Symbol.iterator];if(!i)return e;var n,l,o=i.call(e),y=[];try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)y.push(n.value)}catch(b){l={error:b}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(l)throw l.error}}return y};Object.defineProperty(c,"__esModule",{value:!0}),c.Linkifier2=void 0;var a=w(2585),s=w(8460),p=w(844),h=w(3656),r=function(e){function t(i){var n=e.call(this)||this;return n._bufferService=i,n._linkProviders=[],n._linkCacheDisposables=[],n._isMouseOut=!0,n._activeLine=-1,n._onShowLinkUnderline=n.register(new s.EventEmitter),n._onHideLinkUnderline=n.register(new s.EventEmitter),n.register((0,p.getDisposeArrayDisposable)(n._linkCacheDisposables)),n}return u(t,e),Object.defineProperty(t.prototype,"currentLink",{get:function(){return this._currentLink},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),t.prototype.registerLinkProvider=function(i){var n=this;return this._linkProviders.push(i),{dispose:function(){var l=n._linkProviders.indexOf(i);l!==-1&&n._linkProviders.splice(l,1)}}},t.prototype.attachToDom=function(i,n,l){var o=this;this._element=i,this._mouseService=n,this._renderService=l,this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",function(){o._isMouseOut=!0,o._clearCurrentLink()})),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._onMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))},t.prototype._onMouseMove=function(i){if(this._lastMouseEvent=i,this._element&&this._mouseService){var n=this._positionFromMouseEvent(i,this._element,this._mouseService);if(n){this._isMouseOut=!1;for(var l=i.composedPath(),o=0;o<l.length;o++){var y=l[o];if(y.classList.contains("xterm"))break;if(y.classList.contains("xterm-hover"))return}this._lastBufferCell&&n.x===this._lastBufferCell.x&&n.y===this._lastBufferCell.y||(this._onHover(n),this._lastBufferCell=n)}}},t.prototype._onHover=function(i){if(this._activeLine!==i.y)return this._clearCurrentLink(),void this._askForLink(i,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,i)||(this._clearCurrentLink(),this._askForLink(i,!0))},t.prototype._askForLink=function(i,n){var l,o,y,b,g=this;this._activeProviderReplies&&n||((y=this._activeProviderReplies)===null||y===void 0||y.forEach(function(E){E?.forEach(function(A){A.link.dispose&&A.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=i.y);var S=!1,C=function(E,A){n?!((b=k._activeProviderReplies)===null||b===void 0)&&b.get(E)&&(S=k._checkLinkProviderResult(E,i,S)):A.provideLinks(i.y,function(T){var U,q;if(!g._isMouseOut){var j=T?.map(function(z){return{link:z}});(U=g._activeProviderReplies)===null||U===void 0||U.set(E,j),S=g._checkLinkProviderResult(E,i,S),((q=g._activeProviderReplies)===null||q===void 0?void 0:q.size)===g._linkProviders.length&&g._removeIntersectingLinks(i.y,g._activeProviderReplies)}})},k=this;try{for(var L=m(this._linkProviders.entries()),R=L.next();!R.done;R=L.next()){var x=v(R.value,2);C(x[0],x[1])}}catch(E){l={error:E}}finally{try{R&&!R.done&&(o=L.return)&&o.call(L)}finally{if(l)throw l.error}}},t.prototype._removeIntersectingLinks=function(i,n){for(var l=new Set,o=0;o<n.size;o++){var y=n.get(o);if(y)for(var b=0;b<y.length;b++)for(var g=y[b],S=g.link.range.start.y<i?0:g.link.range.start.x,C=g.link.range.end.y>i?this._bufferService.cols:g.link.range.end.x,k=S;k<=C;k++){if(l.has(k)){y.splice(b--,1);break}l.add(k)}}},t.prototype._checkLinkProviderResult=function(i,n,l){var o,y=this;if(!this._activeProviderReplies)return l;for(var b=this._activeProviderReplies.get(i),g=!1,S=0;S<i;S++)this._activeProviderReplies.has(S)&&!this._activeProviderReplies.get(S)||(g=!0);if(!g&&b){var C=b.find(function(L){return y._linkAtPosition(L.link,n)});C&&(l=!0,this._handleNewLink(C))}if(this._activeProviderReplies.size===this._linkProviders.length&&!l)for(S=0;S<this._activeProviderReplies.size;S++){var k=(o=this._activeProviderReplies.get(S))===null||o===void 0?void 0:o.find(function(L){return y._linkAtPosition(L.link,n)});if(k){l=!0,this._handleNewLink(k);break}}return l},t.prototype._handleMouseDown=function(){this._mouseDownLink=this._currentLink},t.prototype._handleMouseUp=function(i){if(this._element&&this._mouseService&&this._currentLink){var n=this._positionFromMouseEvent(i,this._element,this._mouseService);n&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,n)&&this._currentLink.link.activate(i,this._currentLink.link.text)}},t.prototype._clearCurrentLink=function(i,n){this._element&&this._currentLink&&this._lastMouseEvent&&(!i||!n||this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=n)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,p.disposeArray)(this._linkCacheDisposables))},t.prototype._handleNewLink=function(i){var n=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._linkAtPosition(i.link,l)&&(this._currentLink=i,this._currentLink.state={decorations:{underline:i.link.decorations===void 0||i.link.decorations.underline,pointerCursor:i.link.decorations===void 0||i.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,i.link,this._lastMouseEvent),i.link.decorations={},Object.defineProperties(i.link.decorations,{pointerCursor:{get:function(){var o,y;return(y=(o=n._currentLink)===null||o===void 0?void 0:o.state)===null||y===void 0?void 0:y.decorations.pointerCursor},set:function(o){var y,b;!((y=n._currentLink)===null||y===void 0)&&y.state&&n._currentLink.state.decorations.pointerCursor!==o&&(n._currentLink.state.decorations.pointerCursor=o,n._currentLink.state.isHovered&&((b=n._element)===null||b===void 0||b.classList.toggle("xterm-cursor-pointer",o)))}},underline:{get:function(){var o,y;return(y=(o=n._currentLink)===null||o===void 0?void 0:o.state)===null||y===void 0?void 0:y.decorations.underline},set:function(o){var y,b,g;!((y=n._currentLink)===null||y===void 0)&&y.state&&((g=(b=n._currentLink)===null||b===void 0?void 0:b.state)===null||g===void 0?void 0:g.decorations.underline)!==o&&(n._currentLink.state.decorations.underline=o,n._currentLink.state.isHovered&&n._fireUnderlineEvent(i.link,o))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(function(o){var y=o.start===0?0:o.start+1+n._bufferService.buffer.ydisp;n._clearCurrentLink(y,o.end+1+n._bufferService.buffer.ydisp)})))}},t.prototype._linkHover=function(i,n,l){var o;!((o=this._currentLink)===null||o===void 0)&&o.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!0),this._currentLink.state.decorations.pointerCursor&&i.classList.add("xterm-cursor-pointer")),n.hover&&n.hover(l,n.text)},t.prototype._fireUnderlineEvent=function(i,n){var l=i.range,o=this._bufferService.buffer.ydisp,y=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-o-1,l.end.x,l.end.y-o-1,void 0);(n?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(y)},t.prototype._linkLeave=function(i,n,l){var o;!((o=this._currentLink)===null||o===void 0)&&o.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!1),this._currentLink.state.decorations.pointerCursor&&i.classList.remove("xterm-cursor-pointer")),n.leave&&n.leave(l,n.text)},t.prototype._linkAtPosition=function(i,n){var l=i.range.start.y===i.range.end.y,o=i.range.start.y<n.y,y=i.range.end.y>n.y;return(l&&i.range.start.x<=n.x&&i.range.end.x>=n.x||o&&i.range.end.x>=n.x||y&&i.range.start.x<=n.x||o&&y)&&i.range.start.y<=n.y&&i.range.end.y>=n.y},t.prototype._positionFromMouseEvent=function(i,n,l){var o=l.getCoords(i,n,this._bufferService.cols,this._bufferService.rows);if(o)return{x:o[0],y:o[1]+this._bufferService.buffer.ydisp}},t.prototype._createLinkUnderlineEvent=function(i,n,l,o,y){return{x1:i,y1:n,x2:l,y2:o,cols:this._bufferService.cols,fg:y}},f([d(0,a.IBufferService)],t)}(p.Disposable);c.Linkifier2=r},9042:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.tooMuchOutput=c.promptLabel=void 0,c.promptLabel="Terminal input",c.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},6954:function(W,c,w){var _,u=this&&this.__extends||(_=function(h,r){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},_(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}_(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),f=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var o=h.length-1;o>=0;o--)(i=h[o])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},d=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseZoneManager=void 0;var m=w(844),v=w(3656),a=w(4725),s=w(2585),p=function(h){function r(e,t,i,n,l,o){var y=h.call(this)||this;return y._element=e,y._screenElement=t,y._bufferService=i,y._mouseService=n,y._selectionService=l,y._optionsService=o,y._zones=[],y._areZonesActive=!1,y._lastHoverCoords=[void 0,void 0],y._initialSelectionLength=0,y.register((0,v.addDisposableDomListener)(y._element,"mousedown",function(b){return y._onMouseDown(b)})),y._mouseMoveListener=function(b){return y._onMouseMove(b)},y._mouseLeaveListener=function(b){return y._onMouseLeave(b)},y._clickListener=function(b){return y._onClick(b)},y}return u(r,h),r.prototype.dispose=function(){h.prototype.dispose.call(this),this._deactivate()},r.prototype.add=function(e){this._zones.push(e),this._zones.length===1&&this._activate()},r.prototype.clearAll=function(e,t){if(this._zones.length!==0){e&&t||(e=0,t=this._bufferService.rows-1);for(var i=0;i<this._zones.length;i++){var n=this._zones[i];(n.y1>e&&n.y1<=t+1||n.y2>e&&n.y2<=t+1||n.y1<e&&n.y2>t+1)&&(this._currentZone&&this._currentZone===n&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(i--,1))}this._zones.length===0&&this._deactivate()}},r.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))},r.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))},r.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},r.prototype._onHover=function(e){var t=this,i=this._findZoneEventAt(e);i!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),i&&(this._currentZone=i,i.hoverCallback&&i.hoverCallback(e),this._tooltipTimeout=window.setTimeout(function(){return t._onTooltip(e)},this._optionsService.rawOptions.linkTooltipHoverDuration)))},r.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var t=this._findZoneEventAt(e);t?.tooltipCallback(e)},r.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var t=this._findZoneEventAt(e);t?.willLinkActivate(e)&&(e.preventDefault(),e.stopImmediatePropagation())}},r.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},r.prototype._onClick=function(e){var t=this._findZoneEventAt(e),i=this._getSelectionLength();t&&i===this._initialSelectionLength&&(t.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},r.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},r.prototype._findZoneEventAt=function(e){var t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(t)for(var i=t[0],n=t[1],l=0;l<this._zones.length;l++){var o=this._zones[l];if(o.y1===o.y2){if(n===o.y1&&i>=o.x1&&i<o.x2)return o}else if(n===o.y1&&i>=o.x1||n===o.y2&&i<o.x2||n>o.y1&&n<o.y2)return o}},f([d(2,s.IBufferService),d(3,a.IMouseService),d(4,a.ISelectionService),d(5,s.IOptionsService)],r)}(m.Disposable);c.MouseZoneManager=p},6193:function(W,c){var w=this&&this.__values||function(u){var f=typeof Symbol=="function"&&Symbol.iterator,d=f&&u[f],m=0;if(d)return d.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&m>=u.length&&(u=void 0),{value:u&&u[m++],done:!u}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.RenderDebouncer=void 0;var _=function(){function u(f){this._renderCallback=f,this._refreshCallbacks=[]}return u.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},u.prototype.addRefreshCallback=function(f){var d=this;return this._refreshCallbacks.push(f),this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return d._innerRefresh()})),this._animationFrame},u.prototype.refresh=function(f,d,m){var v=this;this._rowCount=m,f=f!==void 0?f:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return v._innerRefresh()}))},u.prototype._innerRefresh=function(){if(this._animationFrame=void 0,this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var f=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,d),this._runRefreshCallbacks()}else this._runRefreshCallbacks()},u.prototype._runRefreshCallbacks=function(){var f,d;try{for(var m=w(this._refreshCallbacks),v=m.next();!v.done;v=m.next())(0,v.value)(0)}catch(a){f={error:a}}finally{try{v&&!v.done&&(d=m.return)&&d.call(m)}finally{if(f)throw f.error}}this._refreshCallbacks=[]},u}();c.RenderDebouncer=_},5596:function(W,c,w){var _,u=this&&this.__extends||(_=function(d,m){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,a){v.__proto__=a}||function(v,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(v[s]=a[s])},_(d,m)},function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function v(){this.constructor=d}_(d,m),d.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)});Object.defineProperty(c,"__esModule",{value:!0}),c.ScreenDprMonitor=void 0;var f=function(d){function m(){var v=d!==null&&d.apply(this,arguments)||this;return v._currentDevicePixelRatio=window.devicePixelRatio,v}return u(m,d),m.prototype.setListener=function(v){var a=this;this._listener&&this.clearListener(),this._listener=v,this._outerListener=function(){a._listener&&(a._listener(window.devicePixelRatio,a._currentDevicePixelRatio),a._updateDpr())},this._updateDpr()},m.prototype.dispose=function(){d.prototype.dispose.call(this),this.clearListener()},m.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))},m.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)},m}(w(844).Disposable);c.ScreenDprMonitor=f},3236:function(W,c,w){var _,u=this&&this.__extends||(_=function(X,F){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,D){O.__proto__=D}||function(O,D){for(var H in D)Object.prototype.hasOwnProperty.call(D,H)&&(O[H]=D[H])},_(X,F)},function(X,F){if(typeof F!="function"&&F!==null)throw new TypeError("Class extends value "+String(F)+" is not a constructor or null");function O(){this.constructor=X}_(X,F),X.prototype=F===null?Object.create(F):(O.prototype=F.prototype,new O)}),f=this&&this.__values||function(X){var F=typeof Symbol=="function"&&Symbol.iterator,O=F&&X[F],D=0;if(O)return O.call(X);if(X&&typeof X.length=="number")return{next:function(){return X&&D>=X.length&&(X=void 0),{value:X&&X[D++],done:!X}}};throw new TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")},d=this&&this.__read||function(X,F){var O=typeof Symbol=="function"&&X[Symbol.iterator];if(!O)return X;var D,H,G=O.call(X),V=[];try{for(;(F===void 0||F-- >0)&&!(D=G.next()).done;)V.push(D.value)}catch(J){H={error:J}}finally{try{D&&!D.done&&(O=G.return)&&O.call(G)}finally{if(H)throw H.error}}return V},m=this&&this.__spreadArray||function(X,F,O){if(O||arguments.length===2)for(var D,H=0,G=F.length;H<G;H++)!D&&H in F||(D||(D=Array.prototype.slice.call(F,0,H)),D[H]=F[H]);return X.concat(D||Array.prototype.slice.call(F))};Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;var v=w(2950),a=w(1680),s=w(3614),p=w(2584),h=w(5435),r=w(3525),e=w(3551),t=w(9312),i=w(6114),n=w(3656),l=w(9042),o=w(357),y=w(6954),b=w(4567),g=w(1296),S=w(7399),C=w(8460),k=w(8437),L=w(5680),R=w(3230),x=w(4725),E=w(428),A=w(8934),T=w(6465),U=w(5114),q=w(8969),j=w(8055),z=w(4269),N=w(5941),M=w(3107),Y=w(5744),Z=w(9074),ee=w(2585),B=typeof window<"u"?window.document:null,Q=function(X){function F(O){O===void 0&&(O={});var D=X.call(this,O)||this;return D.browser=i,D._keyDownHandled=!1,D._keyDownSeen=!1,D._keyPressHandled=!1,D._unprocessedDeadKey=!1,D._onCursorMove=new C.EventEmitter,D._onKey=new C.EventEmitter,D._onRender=new C.EventEmitter,D._onSelectionChange=new C.EventEmitter,D._onTitleChange=new C.EventEmitter,D._onBell=new C.EventEmitter,D._onFocus=new C.EventEmitter,D._onBlur=new C.EventEmitter,D._onA11yCharEmitter=new C.EventEmitter,D._onA11yTabEmitter=new C.EventEmitter,D._setup(),D.linkifier=D._instantiationService.createInstance(e.Linkifier),D.linkifier2=D.register(D._instantiationService.createInstance(T.Linkifier2)),D._decorationService=D._instantiationService.createInstance(Z.DecorationService),D._instantiationService.setService(ee.IDecorationService,D._decorationService),D.register(D._inputHandler.onRequestBell(function(){return D.bell()})),D.register(D._inputHandler.onRequestRefreshRows(function(H,G){return D.refresh(H,G)})),D.register(D._inputHandler.onRequestSendFocus(function(){return D._reportFocus()})),D.register(D._inputHandler.onRequestReset(function(){return D.reset()})),D.register(D._inputHandler.onRequestWindowsOptionsReport(function(H){return D._reportWindowsOptions(H)})),D.register(D._inputHandler.onColor(function(H){return D._handleColorEvent(H)})),D.register((0,C.forwardEvent)(D._inputHandler.onCursorMove,D._onCursorMove)),D.register((0,C.forwardEvent)(D._inputHandler.onTitleChange,D._onTitleChange)),D.register((0,C.forwardEvent)(D._inputHandler.onA11yChar,D._onA11yCharEmitter)),D.register((0,C.forwardEvent)(D._inputHandler.onA11yTab,D._onA11yTabEmitter)),D.register(D._bufferService.onResize(function(H){return D._afterResize(H.cols,H.rows)})),D}return u(F,X),Object.defineProperty(F.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onBell",{get:function(){return this._onBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),F.prototype._handleColorEvent=function(O){var D,H,G,V;if(this._colorManager){try{for(var J=f(O),re=J.next();!re.done;re=J.next()){var oe=re.value,se=void 0,K="";switch(oe.index){case 256:se="foreground",K="10";break;case 257:se="background",K="11";break;case 258:se="cursor",K="12";break;default:se="ansi",K="4;"+oe.index}if(se)switch(oe.type){case 0:var ae=j.color.toColorRGB(se==="ansi"?this._colorManager.colors.ansi[oe.index]:this._colorManager.colors[se]);this.coreService.triggerDataEvent(p.C0.ESC+"]"+K+";"+(0,N.toRgbString)(ae)+p.C1_ESCAPED.ST);break;case 1:se==="ansi"?this._colorManager.colors.ansi[oe.index]=j.rgba.toColor.apply(j.rgba,m([],d(oe.color),!1)):this._colorManager.colors[se]=j.rgba.toColor.apply(j.rgba,m([],d(oe.color),!1));break;case 2:this._colorManager.restoreColor(oe.index)}}}catch(de){D={error:de}}finally{try{re&&!re.done&&(H=J.return)&&H.call(J)}finally{if(D)throw D.error}}(G=this._renderService)===null||G===void 0||G.setColors(this._colorManager.colors),(V=this.viewport)===null||V===void 0||V.onThemeChange(this._colorManager.colors)}},F.prototype.dispose=function(){var O,D,H;this._isDisposed||(X.prototype.dispose.call(this),(O=this._renderService)===null||O===void 0||O.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(H=(D=this.element)===null||D===void 0?void 0:D.parentNode)===null||H===void 0||H.removeChild(this.element))},F.prototype._setup=function(){X.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(F.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),F.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},F.prototype._updateOptions=function(O){var D,H,G,V;switch(X.prototype._updateOptions.call(this,O),O){case"fontFamily":case"fontSize":(D=this._renderService)===null||D===void 0||D.clear(),(H=this._charSizeService)===null||H===void 0||H.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"customGlyphs":case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(G=this.viewport)===null||G===void 0||G.syncScrollArea();break;case"screenReaderMode":this.optionsService.rawOptions.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new b.AccessibilityManager(this,this._renderService)):((V=this._accessibilityManager)===null||V===void 0||V.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.rawOptions.theme)}},F.prototype._onTextAreaFocus=function(O){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(p.C0.ESC+"[I"),this.updateCursorStyle(O),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},F.prototype.blur=function(){var O;return(O=this.textarea)===null||O===void 0?void 0:O.blur()},F.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(p.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},F.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing&&this._renderService){var O=this.buffer.ybase+this.buffer.y,D=this.buffer.lines.get(O);if(D){var H=Math.min(this.buffer.x,this.cols-1),G=this._renderService.dimensions.actualCellHeight,V=D.getWidth(H),J=this._renderService.dimensions.actualCellWidth*V,re=this.buffer.y*this._renderService.dimensions.actualCellHeight,oe=H*this._renderService.dimensions.actualCellWidth;this.textarea.style.left=oe+"px",this.textarea.style.top=re+"px",this.textarea.style.width=J+"px",this.textarea.style.height=G+"px",this.textarea.style.lineHeight=G+"px",this.textarea.style.zIndex="-5"}}},F.prototype._initGlobal=function(){var O=this;this._bindKeys(),this.register((0,n.addDisposableDomListener)(this.element,"copy",function(H){O.hasSelection()&&(0,s.copyHandler)(H,O._selectionService)}));var D=function(H){return(0,s.handlePasteEvent)(H,O.textarea,O.coreService)};this.register((0,n.addDisposableDomListener)(this.textarea,"paste",D)),this.register((0,n.addDisposableDomListener)(this.element,"paste",D)),i.isFirefox?this.register((0,n.addDisposableDomListener)(this.element,"mousedown",function(H){H.button===2&&(0,s.rightClickHandler)(H,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})):this.register((0,n.addDisposableDomListener)(this.element,"contextmenu",function(H){(0,s.rightClickHandler)(H,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})),i.isLinux&&this.register((0,n.addDisposableDomListener)(this.element,"auxclick",function(H){H.button===1&&(0,s.moveTextAreaUnderMouseCursor)(H,O.textarea,O.screenElement)}))},F.prototype._bindKeys=function(){var O=this;this.register((0,n.addDisposableDomListener)(this.textarea,"keyup",function(D){return O._keyUp(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"keydown",function(D){return O._keyDown(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"keypress",function(D){return O._keyPress(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionstart",function(){return O._compositionHelper.compositionstart()})),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionupdate",function(D){return O._composit