988-b2a4e89c1f2d51ef.js 110 KB

12
  1. (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[988],{1714:function(){},8126:function(module){!function(){"use strict";var e={114:function(e){function assertPath(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function normalizeStringPosix(e,r){for(var f,t="",i=0,n=-1,a=0,l=0;l<=e.length;++l){if(l<e.length)f=e.charCodeAt(l);else if(47===f)break;else f=47;if(47===f){if(n===l-1||1===a);else if(n!==l-1&&2===a){if(t.length<2||2!==i||46!==t.charCodeAt(t.length-1)||46!==t.charCodeAt(t.length-2)){if(t.length>2){var s=t.lastIndexOf("/");if(s!==t.length-1){-1===s?(t="",i=0):i=(t=t.slice(0,s)).length-1-t.lastIndexOf("/"),n=l,a=0;continue}}else if(2===t.length||1===t.length){t="",i=0,n=l,a=0;continue}}r&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+="/"+e.slice(n+1,l):t=e.slice(n+1,l),i=l-n-1;n=l,a=0}else 46===f&&-1!==a?++a:a=-1}return t}var r={resolve:function(){for(var t,n,e="",r=!1,i=arguments.length-1;i>=-1&&!r;i--)i>=0?n=arguments[i]:(void 0===t&&(t=""),n=t),assertPath(n),0!==n.length&&(e=n+"/"+e,r=47===n.charCodeAt(0));return(e=normalizeStringPosix(e,!r),r)?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(assertPath(e),0===e.length)return".";var r=47===e.charCodeAt(0),t=47===e.charCodeAt(e.length-1);return(0!==(e=normalizeStringPosix(e,!r)).length||r||(e="."),e.length>0&&t&&(e+="/"),r)?"/"+e:e},isAbsolute:function(e){return assertPath(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0==arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var i=arguments[t];assertPath(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,t){if(assertPath(e),assertPath(t),e===t||(e=r.resolve(e))===(t=r.resolve(t)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var n=e.length,a=n-i,f=1;f<t.length&&47===t.charCodeAt(f);++f);for(var s=t.length-f,o=a<s?a:s,u=-1,h=0;h<=o;++h){if(h===o){if(s>o){if(47===t.charCodeAt(f+h))return t.slice(f+h+1);if(0===h)return t.slice(f+h)}else a>o&&(47===e.charCodeAt(i+h)?u=h:0===h&&(u=0));break}var c=e.charCodeAt(i+h);if(c!==t.charCodeAt(f+h))break;47===c&&(u=h)}var g="";for(h=i+u+1;h<=n;++h)(h===n||47===e.charCodeAt(h))&&(0===g.length?g+="..":g+="/..");return g.length>0?g+t.slice(f+u):(f+=u,47===t.charCodeAt(f)&&++f,t.slice(f))},_makeLong:function(e){return e},dirname:function(e){if(assertPath(e),0===e.length)return".";for(var r=e.charCodeAt(0),t=47===r,i=-1,n=!0,a=e.length-1;a>=1;--a)if(47===(r=e.charCodeAt(a))){if(!n){i=a;break}}else n=!1;return -1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw TypeError('"ext" argument must be a string');assertPath(e);var a,t=0,i=-1,n=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var f=r.length-1,l=-1;for(a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47===s){if(!n){t=a+1;break}}else -1===l&&(n=!1,l=a+1),f>=0&&(s===r.charCodeAt(f)?-1==--f&&(i=a):(f=-1,i=l))}return t===i?i=l:-1===i&&(i=e.length),e.slice(t,i)}for(a=e.length-1;a>=0;--a)if(47===e.charCodeAt(a)){if(!n){t=a+1;break}}else -1===i&&(n=!1,i=a+1);return -1===i?"":e.slice(t,i)},extname:function(e){assertPath(e);for(var r=-1,t=0,i=-1,n=!0,a=0,f=e.length-1;f>=0;--f){var l=e.charCodeAt(f);if(47===l){if(!n){t=f+1;break}continue}-1===i&&(n=!1,i=f+1),46===l?-1===r?r=f:1!==a&&(a=1):-1!==r&&(a=-1)}return -1===r||-1===i||0===a||1===a&&r===i-1&&r===t+1?"":e.slice(r,i)},format:function(e){var t,i;if(null===e||"object"!=typeof e)throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return t=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||""),t?t===e.root?t+i:t+"/"+i:i},parse:function(e){assertPath(e);var n,r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var t=e.charCodeAt(0),i=47===t;i?(r.root="/",n=1):n=0;for(var a=-1,f=0,l=-1,s=!0,o=e.length-1,u=0;o>=n;--o){if(47===(t=e.charCodeAt(o))){if(!s){f=o+1;break}continue}-1===l&&(s=!1,l=o+1),46===t?-1===a?a=o:1!==u&&(u=1):-1!==a&&(u=-1)}return -1===a||-1===l||0===u||1===u&&a===l-1&&a===f+1?-1!==l&&(0===f&&i?r.base=r.name=e.slice(1,l):r.base=r.name=e.slice(f,l)):(0===f&&i?(r.name=e.slice(1,a),r.base=e.slice(1,l)):(r.name=e.slice(f,a),r.base=e.slice(f,l)),r.ext=e.slice(a,l)),f>0?r.dir=e.slice(0,f-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},r={};function __nccwpck_require__(t){var i=r[t];if(void 0!==i)return i.exports;var n=r[t]={exports:{}},a=!0;try{e[t](n,n.exports,__nccwpck_require__),a=!1}finally{a&&delete r[t]}return n.exports}__nccwpck_require__.ab="//";var t=__nccwpck_require__(114);module.exports=t}()},7162:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{R:function(){return SearchBox}});var styled=__webpack_require__(3513),tslib_es6=__webpack_require__(3499),react=__webpack_require__(3370),classNamesFunction=__webpack_require__(3568),properties=__webpack_require__(784),KeyCodes=__webpack_require__(7218),useControllableValue=__webpack_require__(4169),useMergedRefs=__webpack_require__(6355),useId=__webpack_require__(4976),IconButton=__webpack_require__(1197),Icon=__webpack_require__(8415),COMPONENT_NAME="SearchBox",iconButtonStyles={root:{height:"auto"},icon:{fontSize:"12px"}},iconButtonProps={iconName:"Clear"},defaultClearButtonProps={ariaLabel:"Clear text"},getClassNames=(0,classNamesFunction.y)(),useComponentRef=function(componentRef,inputElementRef,hasFocus){react.useImperativeHandle(componentRef,function(){return{focus:function(){var _a;return null===(_a=inputElementRef.current)||void 0===_a?void 0:_a.focus()},hasFocus:function(){return hasFocus}}},[inputElementRef,hasFocus])},SearchBoxBase=react.forwardRef(function(props,forwardedRef){var ariaLabel=props.ariaLabel,className=props.className,_a=props.defaultValue,disabled=props.disabled,underlined=props.underlined,styles=props.styles,labelText=props.labelText,_b=props.placeholder,theme=props.theme,_c=props.clearButtonProps,clearButtonProps=void 0===_c?defaultClearButtonProps:_c,_d=props.disableAnimation,_e=props.showIcon,customOnClear=props.onClear,customOnBlur=props.onBlur,customOnEscape=props.onEscape,customOnSearch=props.onSearch,customOnKeyDown=props.onKeyDown,iconProps=props.iconProps,role=props.role,onChange=props.onChange,onChanged=props.onChanged,_f=react.useState(!1),hasFocus=_f[0],setHasFocus=_f[1],prevChangeTimestamp=react.useRef(),_g=(0,useControllableValue.G)(props.value,void 0===_a?"":_a,function(ev,newValue){ev&&ev.timeStamp===prevChangeTimestamp.current||(prevChangeTimestamp.current=null==ev?void 0:ev.timeStamp,null==onChange||onChange(ev,newValue),null==onChanged||onChanged(newValue))}),uncastValue=_g[0],setValue=_g[1],value=String(uncastValue),rootElementRef=react.useRef(null),inputElementRef=react.useRef(null),mergedRootRef=(0,useMergedRefs.r)(rootElementRef,forwardedRef),id=(0,useId.M)(COMPONENT_NAME,props.id),customOnClearClick=clearButtonProps.onClick,classNames=getClassNames(styles,{theme:theme,className:className,underlined:underlined,hasFocus:hasFocus,disabled:disabled,hasInput:value.length>0,disableAnimation:void 0!==_d&&_d,showIcon:void 0!==_e&&_e}),nativeProps=(0,properties.pq)(props,properties.Gg,["className","placeholder","onFocus","onBlur","value","role"]),onClear=react.useCallback(function(ev){var _a;null==customOnClear||customOnClear(ev),ev.defaultPrevented||(setValue(""),null===(_a=inputElementRef.current)||void 0===_a||_a.focus(),ev.stopPropagation(),ev.preventDefault())},[customOnClear,setValue]),onClearClick=react.useCallback(function(ev){null==customOnClearClick||customOnClearClick(ev),ev.defaultPrevented||onClear(ev)},[customOnClearClick,onClear]),onBlur=react.useCallback(function(ev){setHasFocus(!1),null==customOnBlur||customOnBlur(ev)},[customOnBlur]),onInputChange=function(ev){setValue(ev.target.value,ev)};return useComponentRef(props.componentRef,inputElementRef,hasFocus),react.createElement("div",{role:role,ref:mergedRootRef,className:classNames.root,onFocusCapture:function(ev){var _a;setHasFocus(!0),null===(_a=props.onFocus)||void 0===_a||_a.call(props,ev)}},react.createElement("div",{className:classNames.iconContainer,onClick:function(){inputElementRef.current&&(inputElementRef.current.focus(),inputElementRef.current.selectionStart=inputElementRef.current.selectionEnd=0)},"aria-hidden":!0},react.createElement(Icon.J,(0,tslib_es6.pi)({iconName:"Search"},iconProps,{className:classNames.icon}))),react.createElement("input",(0,tslib_es6.pi)({},nativeProps,{id:id,className:classNames.field,placeholder:void 0===_b?labelText:_b,onChange:onInputChange,onInput:onInputChange,onBlur:onBlur,onKeyDown:function(ev){switch(ev.which){case KeyCodes.m.escape:null==customOnEscape||customOnEscape(ev),value&&!ev.defaultPrevented&&onClear(ev);break;case KeyCodes.m.enter:customOnSearch&&(customOnSearch(value),ev.preventDefault(),ev.stopPropagation());break;default:null==customOnKeyDown||customOnKeyDown(ev),ev.defaultPrevented&&ev.stopPropagation()}},value:value,disabled:disabled,role:"searchbox","aria-label":ariaLabel,ref:inputElementRef})),value.length>0&&react.createElement("div",{className:classNames.clearButton},react.createElement(IconButton.h,(0,tslib_es6.pi)({onBlur:onBlur,styles:iconButtonStyles,iconProps:iconButtonProps},clearButtonProps,{onClick:onClearClick}))))});SearchBoxBase.displayName=COMPONENT_NAME;var lib=__webpack_require__(3349),rtl=__webpack_require__(327),GlobalClassNames={root:"ms-SearchBox",iconContainer:"ms-SearchBox-iconContainer",icon:"ms-SearchBox-icon",clearButton:"ms-SearchBox-clearButton",field:"ms-SearchBox-field"},SearchBox=(0,styled.z)(SearchBoxBase,function(props){var _a,_b,_c,_d,_e,theme=props.theme,underlined=props.underlined,disabled=props.disabled,hasFocus=props.hasFocus,className=props.className,hasInput=props.hasInput,disableAnimation=props.disableAnimation,showIcon=props.showIcon,palette=theme.palette,fonts=theme.fonts,semanticColors=theme.semanticColors,effects=theme.effects,classNames=(0,lib.Cn)(GlobalClassNames,theme),placeholderStyles={color:semanticColors.inputPlaceholderText,opacity:1},inputIconAlt=palette.neutralSecondary,inputIconAltHovered=palette.neutralPrimary,inputBorderDisabled=palette.neutralLighter,inputBackgroundHovered=palette.neutralLighter,inputBackgroundDisabled=palette.neutralLighter;return{root:[classNames.root,fonts.medium,lib.Fv,{color:semanticColors.inputText,backgroundColor:semanticColors.inputBackground,display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"stretch",padding:"1px 0 1px 4px",borderRadius:effects.roundedCorner2,border:"1px solid "+semanticColors.inputBorder,height:32,selectors:((_a={})[lib.qJ]={borderColor:"WindowText"},_a[":hover"]={borderColor:semanticColors.inputBorderHovered,selectors:((_b={})[lib.qJ]={borderColor:"Highlight"},_b)},_a[":hover ."+classNames.iconContainer]={color:semanticColors.inputIconHovered},_a)},!hasFocus&&hasInput&&{selectors:((_c={})[":hover ."+classNames.iconContainer]={width:4},_c[":hover ."+classNames.icon]={opacity:0,pointerEvents:"none"},_c)},hasFocus&&["is-active",{position:"relative"},(0,lib.$Y)(semanticColors.inputFocusBorderAlt,underlined?0:effects.roundedCorner2,underlined?"borderBottom":"border")],showIcon&&[{selectors:((_d={})[":hover ."+classNames.iconContainer]={width:32},_d[":hover ."+classNames.icon]={opacity:1},_d)}],disabled&&["is-disabled",{borderColor:inputBorderDisabled,backgroundColor:inputBackgroundDisabled,pointerEvents:"none",cursor:"default",selectors:((_e={})[lib.qJ]={borderColor:"GrayText"},_e)}],underlined&&["is-underlined",{borderWidth:"0 0 1px 0",borderRadius:0,padding:"1px 0 1px 8px"}],underlined&&disabled&&{backgroundColor:"transparent"},hasInput&&"can-clear",className],iconContainer:[classNames.iconContainer,{display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,fontSize:16,width:32,textAlign:"center",color:semanticColors.inputIcon,cursor:"text"},hasFocus&&{width:4},disabled&&{color:semanticColors.inputIconDisabled},!disableAnimation&&{transition:"width "+lib.D1.durationValue1},showIcon&&hasFocus&&{width:32}],icon:[classNames.icon,{opacity:1},hasFocus&&{opacity:0,pointerEvents:"none"},!disableAnimation&&{transition:"opacity "+lib.D1.durationValue1+" 0s"},showIcon&&hasFocus&&{opacity:1}],clearButton:[classNames.clearButton,{display:"flex",flexDirection:"row",alignItems:"stretch",cursor:"pointer",flexBasis:"32px",flexShrink:0,padding:0,margin:"-1px 0px",selectors:{"&:hover .ms-Button":{backgroundColor:inputBackgroundHovered},"&:hover .ms-Button-icon":{color:inputIconAltHovered},".ms-Button":{borderRadius:(0,rtl.zg)(theme)?"1px 0 0 1px":"0 1px 1px 0"},".ms-Button-icon":{color:inputIconAlt}}}],field:[classNames.field,lib.Fv,(0,lib.Sv)(placeholderStyles),{backgroundColor:"transparent",border:"none",outline:"none",fontWeight:"inherit",fontFamily:"inherit",fontSize:"inherit",color:semanticColors.inputText,flex:"1 1 0px",minWidth:"0px",overflow:"hidden",textOverflow:"ellipsis",paddingBottom:.5,selectors:{"::-ms-clear":{display:"none"}}},disabled&&{color:semanticColors.disabledText}]}},void 0,{scope:"SearchBox"})},8711:function(module){var e,t;self,module.exports=(Object.defineProperty(t=e={},"__esModule",{value:!0}),t.FitAddon=void 0,t.FitAddon=class{constructor(){}activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core;if(0===e._renderService.dimensions.actualCellWidth||0===e._renderService.dimensions.actualCellHeight)return;let t=0===this._terminal.options.scrollback?0:e.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),i=parseInt(r.getPropertyValue("height")),n=Math.max(0,parseInt(r.getPropertyValue("width"))),o=window.getComputedStyle(this._terminal.element),s=i-(parseInt(o.getPropertyValue("padding-top"))+parseInt(o.getPropertyValue("padding-bottom"))),a=n-(parseInt(o.getPropertyValue("padding-right"))+parseInt(o.getPropertyValue("padding-left")))-t;return{cols:Math.max(2,Math.floor(a/e._renderService.dimensions.actualCellWidth)),rows:Math.max(1,Math.floor(s/e._renderService.dimensions.actualCellHeight))}}},e)},2923:function(module){var e,t,s;self,module.exports=(e={345(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.forwardEvent=t.EventEmitter=void 0,t.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=e=>(this._listeners.push(e),{dispose:()=>{if(!this._disposed){for(let t=0;t<this._listeners.length;t++)if(this._listeners[t]===e)return void this._listeners.splice(t,1)}}})),this._event}fire(e,t){let i=[];for(let e1=0;e1<this._listeners.length;e1++)i.push(this._listeners[e1]);for(let s=0;s<i.length;s++)i[s].call(void 0,e,t)}dispose(){this._listeners&&(this._listeners.length=0),this._disposed=!0}},t.forwardEvent=function(e,t){return e(e=>t.fire(e))}}},t={},s={},(()=>{var e1=s;Object.defineProperty(e1,"__esModule",{value:!0}),e1.SearchAddon=void 0;let t1=function i(s){var r=t[s];if(void 0!==r)return r.exports;var n=t[s]={exports:{}};return e[s](n,n.exports,i),n.exports}(345),r=" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?";e1.SearchAddon=class{constructor(){this._linesCacheTimeoutId=0,this._onDidChangeResults=new t1.EventEmitter,this.onDidChangeResults=this._onDidChangeResults.event}activate(e){this._terminal=e,this._onDataDisposable=this._terminal.onWriteParsed(()=>this._updateMatches()),this._onResizeDisposable=this._terminal.onResize(()=>this._updateMatches())}_updateMatches(){var e;this._highlightTimeout&&window.clearTimeout(this._highlightTimeout),this._cachedSearchTerm&&(null===(e=this._lastSearchOptions)||void 0===e?void 0:e.decorations)&&(this._highlightTimeout=setTimeout(()=>{var e,t;this.findPrevious(this._cachedSearchTerm,Object.assign(Object.assign({},this._lastSearchOptions),{incremental:!0,noScroll:!0})),this._resultIndex=this._searchResults?this._searchResults.size-1:-1,this._onDidChangeResults.fire({resultIndex:this._resultIndex,resultCount:null!==(t=null===(e=this._searchResults)||void 0===e?void 0:e.size)&&void 0!==t?t:-1})},200))}dispose(){var e,t;this.clearDecorations(),null===(e=this._onDataDisposable)||void 0===e||e.dispose(),null===(t=this._onResizeDisposable)||void 0===t||t.dispose()}clearDecorations(e){var t,i,s,r;null===(t=this._selectedDecoration)||void 0===t||t.dispose(),null===(i=this._searchResults)||void 0===i||i.clear(),null===(s=this._resultDecorations)||void 0===s||s.forEach(e=>{for(let t of e)t.dispose()}),null===(r=this._resultDecorations)||void 0===r||r.clear(),this._searchResults=void 0,this._resultDecorations=void 0,e||(this._cachedSearchTerm=void 0)}clearActiveDecoration(){var e;null===(e=this._selectedDecoration)||void 0===e||e.dispose(),this._selectedDecoration=void 0}findNext(e,t){if(!this._terminal)throw Error("Cannot use addon until it has been loaded");return this._lastSearchOptions=t,(null==t?void 0:t.decorations)&&(void 0===this._resultIndex&&void 0!==this._cachedSearchTerm&&e===this._cachedSearchTerm||this._highlightAllMatches(e,t)),this._fireResults(e,this._findNextAndSelect(e,t),t)}_highlightAllMatches(e,t){if(!this._terminal)throw Error("Cannot use addon until it has been loaded");if(!e||0===e.length)return void this.clearDecorations();t=t||{},this.clearDecorations(!0),this._searchResults=new Map,this._resultDecorations=new Map;let i=this._resultDecorations,s=this._find(e,0,0,t);for(;s&&!this._searchResults.get(`${s.row}-${s.col}`);)if(this._searchResults.set(`${s.row}-${s.col}`,s),s=this._find(e,s.col+s.term.length>=this._terminal.cols?s.row+1:s.row,s.col+s.term.length>=this._terminal.cols?0:s.col+1,t),this._searchResults.size>1e3)return this.clearDecorations(),void(this._resultIndex=void 0);this._searchResults.forEach(e=>{let s=this._createResultDecoration(e,t.decorations);if(s){let e1=i.get(s.marker.line)||[];e1.push(s),i.set(s.marker.line,e1)}})}_find(e,t,i,s){var r;let n;if(!this._terminal||!e||0===e.length)return null===(r=this._terminal)||void 0===r||r.clearSelection(),void this.clearDecorations();if(i>this._terminal.cols)throw Error(`Invalid col: ${i} to search in terminal of ${this._terminal.cols} cols`);this._initLinesCache();let o={startRow:t,startCol:i};if(!(n=this._findInLine(e,o,s)))for(let i1=t+1;i1<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=i1,o.startCol=0,!(n=this._findInLine(e,o,s)));i1++);return n}_findNextAndSelect(e,t){var i;if(!this._terminal||!e||0===e.length)return null===(i=this._terminal)||void 0===i||i.clearSelection(),this.clearDecorations(),this._cachedSearchTerm=void 0,this._resultIndex=-1,!1;this._cachedSearchTerm!==e&&(this._resultIndex=void 0,this._terminal.clearSelection());let s,r=0,n=0;if(this._terminal.hasSelection()){let e1=!!t&&t.incremental;s=this._terminal.getSelectionPosition(),n=e1?s.start.y:s.end.y,r=e1?s.start.x:s.end.x}this._initLinesCache();let o={startRow:n,startCol:r},l=this._findInLine(e,o,t);if(!l)for(let i1=n+1;i1<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=i1,o.startCol=0,!(l=this._findInLine(e,o,t)));i1++);if(!l&&0!==n)for(let i2=0;i2<n&&(o.startRow=i2,o.startCol=0,!(l=this._findInLine(e,o,t)));i2++);return!l&&s&&(o.startRow=s.start.y,o.startCol=0,l=this._findInLine(e,o,t)),this._searchResults&&(0===this._searchResults.size?this._resultIndex=-1:void 0===this._resultIndex?this._resultIndex=0:(this._resultIndex++,this._resultIndex>=this._searchResults.size&&(this._resultIndex=0))),this._selectResult(l,null==t?void 0:t.decorations,null==t?void 0:t.noScroll)}findPrevious(e,t){if(!this._terminal)throw Error("Cannot use addon until it has been loaded");return this._lastSearchOptions=t,(null==t?void 0:t.decorations)&&(void 0===this._resultIndex&&void 0!==this._cachedSearchTerm&&e===this._cachedSearchTerm||this._highlightAllMatches(e,t)),this._fireResults(e,this._findPreviousAndSelect(e,t),t)}_fireResults(e,t,i){var s;return(null==i?void 0:i.decorations)&&(void 0!==this._resultIndex&&void 0!==(null===(s=this._searchResults)||void 0===s?void 0:s.size)?this._onDidChangeResults.fire({resultIndex:this._resultIndex,resultCount:this._searchResults.size}):this._onDidChangeResults.fire(void 0)),this._cachedSearchTerm=e,t}_findPreviousAndSelect(e,t){var i;let s,h;if(!this._terminal)throw Error("Cannot use addon until it has been loaded");if(!this._terminal||!e||0===e.length)return s=void 0,null===(i=this._terminal)||void 0===i||i.clearSelection(),this.clearDecorations(),this._resultIndex=-1,!1;this._cachedSearchTerm!==e&&(this._resultIndex=void 0,this._terminal.clearSelection());let r=this._terminal.buffer.active.baseY+this._terminal.rows,n=this._terminal.cols,l=!!t&&t.incremental;this._terminal.hasSelection()&&(r=(h=this._terminal.getSelectionPosition()).start.y,n=h.start.x),this._initLinesCache();let a={startRow:r,startCol:n};if(l?(s=this._findInLine(e,a,t,!1))&&s.row===r&&s.col===n||(h&&(a.startRow=h.end.y,a.startCol=h.end.x),s=this._findInLine(e,a,t,!0)):s=this._findInLine(e,a,t,!0),!s){a.startCol=Math.max(a.startCol,this._terminal.cols);for(let i1=r-1;i1>=0&&(a.startRow=i1,!(s=this._findInLine(e,a,t,!0)));i1--);}if(!s&&r!==this._terminal.buffer.active.baseY+this._terminal.rows)for(let i2=this._terminal.buffer.active.baseY+this._terminal.rows;i2>=r&&(a.startRow=i2,!(s=this._findInLine(e,a,t,!0)));i2--);return this._searchResults&&(0===this._searchResults.size?this._resultIndex=-1:void 0===this._resultIndex||this._resultIndex<0?this._resultIndex=this._searchResults.size-1:(this._resultIndex--,-1===this._resultIndex&&(this._resultIndex=this._searchResults.size-1))),!(s||!h)||this._selectResult(s,null==t?void 0:t.decorations,null==t?void 0:t.noScroll)}_initLinesCache(){let e=this._terminal;this._linesCache||(this._linesCache=Array(e.buffer.active.length),this._cursorMoveListener=e.onCursorMove(()=>this._destroyLinesCache()),this._resizeListener=e.onResize(()=>this._destroyLinesCache())),window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=window.setTimeout(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._cursorMoveListener&&(this._cursorMoveListener.dispose(),this._cursorMoveListener=void 0),this._resizeListener&&(this._resizeListener.dispose(),this._resizeListener=void 0),this._linesCacheTimeoutId&&(window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=0)}_isWholeWord(e,t,i){return(0===e||r.includes(t[e-1]))&&(e+i.length===t.length||r.includes(t[e+i.length]))}_findInLine(e,t,i={},s=!1){var r;let n=this._terminal,o=t.startRow,l=t.startCol,h=n.buffer.active.getLine(o);if(null==h?void 0:h.isWrapped)return s?void(t.startCol+=n.cols):(t.startRow--,t.startCol+=n.cols,this._findInLine(e,t,i));let a=null===(r=this._linesCache)||void 0===r?void 0:r[o];a||(a=this._translateBufferLineToStringWithWrap(o,!0),this._linesCache&&(this._linesCache[o]=a));let[c,d]=a,u=this._bufferColsToStringOffset(o,l),_=i.caseSensitive?e:e.toLowerCase(),f=i.caseSensitive?c:c.toLowerCase(),v=-1;if(i.regex){let i1;let t1=RegExp(_,"g");if(s)for(;i1=t1.exec(f.slice(0,u));)v=t1.lastIndex-i1[0].length,e=i1[0],t1.lastIndex-=e.length-1;else(i1=t1.exec(f.slice(u)))&&i1[0].length>0&&(v=u+(t1.lastIndex-i1[0].length),e=i1[0])}else s?u-_.length>=0&&(v=f.lastIndexOf(_,u-_.length)):v=f.indexOf(_,u);if(v>=0){if(i.wholeWord&&!this._isWholeWord(v,f,e))return;let t2=0;for(;t2<d.length-1&&v>=d[t2+1];)t2++;let s1=t2;for(;s1<d.length-1&&v+e.length>=d[s1+1];)s1++;let r1=v-d[t2],l1=v+e.length-d[s1],h1=this._stringLengthToBufferSize(o+t2,r1);return{term:e,col:h1,row:o+t2,size:this._stringLengthToBufferSize(o+s1,l1)-h1+n.cols*(s1-t2)}}}_stringLengthToBufferSize(e,t){let i=this._terminal.buffer.active.getLine(e);if(!i)return 0;for(let e1=0;e1<t;e1++){let s=i.getCell(e1);if(!s)break;let r=s.getChars();r.length>1&&(t-=r.length-1);let n=i.getCell(e1+1);n&&0===n.getWidth()&&t++}return t}_bufferColsToStringOffset(e,t){let i=this._terminal,s=e,r=0,n=i.buffer.active.getLine(s);for(;t>0&&n;){for(let e1=0;e1<t&&e1<i.cols;e1++){let t1=n.getCell(e1);if(!t1)break;t1.getWidth()&&(r+=0===t1.getCode()?1:t1.getChars().length)}if(s++,(n=i.buffer.active.getLine(s))&&!n.isWrapped)break;t-=i.cols}return r}_translateBufferLineToStringWithWrap(e,t){var i;let s=this._terminal,r=[],n=[0],o=s.buffer.active.getLine(e);for(;o;){let l=s.buffer.active.getLine(e+1),h=!!l&&l.isWrapped,a=o.translateToString(!h&&t);if(h&&l){let e1=o.getCell(o.length-1);e1&&0===e1.getCode()&&1===e1.getWidth()&&2===(null===(i=l.getCell(0))||void 0===i?void 0:i.getWidth())&&(a=a.slice(0,-1))}if(r.push(a),!h)break;n.push(n[n.length-1]+a.length),e++,o=l}return[r.join(""),n]}_selectResult(e,t,i){var s,r;let n=this._terminal;if(this.clearActiveDecoration(),!e)return n.clearSelection(),!1;if(n.select(e.col,e.row,e.size),t){let i1=n.registerMarker(-n.buffer.active.baseY-n.buffer.active.cursorY+e.row);i1&&(this._selectedDecoration=n.registerDecoration({marker:i1,x:e.col,width:e.size,backgroundColor:t.activeMatchBackground,layer:"top",overviewRulerOptions:{color:t.activeMatchColorOverviewRuler}}),null===(s=this._selectedDecoration)||void 0===s||s.onRender(e=>this._applyStyles(e,t.activeMatchBorder,!0)),null===(r=this._selectedDecoration)||void 0===r||r.onDispose(()=>i1.dispose()))}if(!i&&(e.row>=n.buffer.active.viewportY+n.rows||e.row<n.buffer.active.viewportY)){let t1=e.row-n.buffer.active.viewportY;t1-=Math.floor(n.rows/2),n.scrollLines(t1)}return!0}_applyStyles(e,t,i){e.clientWidth<=0||(e.classList.contains("xterm-find-result-decoration")||(e.classList.add("xterm-find-result-decoration"),t&&(e.style.outline=`1px solid ${t}`)),i&&e.classList.add("xterm-find-active-result-decoration"))}_createResultDecoration(e,t){var i;let s=this._terminal,r=s.registerMarker(-s.buffer.active.baseY-s.buffer.active.cursorY+e.row);if(!r)return;let n=s.registerDecoration({marker:r,x:e.col,width:e.size,backgroundColor:t.matchBackground,overviewRulerOptions:(null===(i=this._resultDecorations)||void 0===i?void 0:i.get(r.line))?void 0:{color:t.matchOverviewRuler,position:"center"}});return null==n||n.onRender(e=>this._applyStyles(e,t.matchBorder,!1)),null==n||n.onDispose(()=>r.dispose()),n}}})(),s)},8874:function(module){self,module.exports=(()=>{"use strict";var t={965(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphRenderer=void 0;let s=i(381),r=i(455),o=i(855),n=i(859),l=10*Float32Array.BYTES_PER_ELEMENT,h={i:0,glyph:void 0,leftCellPadding:0,clippedPixels:0};class c extends n.Disposable{constructor(t,e,i,r){super(),this._terminal=t,this._colors=e,this._gl=i,this._dimensions=r,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};let o=this._gl;this._program=(0,s.throwIfFalsy)((0,s.createProgram)(o,"#version 300 es\nlayout (location = 0) in vec2 a_unitquad;\nlayout (location = 1) in vec2 a_cellpos;\nlayout (location = 2) in vec2 a_offset;\nlayout (location = 3) in vec2 a_size;\nlayout (location = 4) in vec2 a_texcoord;\nlayout (location = 5) in vec2 a_texsize;\n\nuniform mat4 u_projection;\nuniform vec2 u_resolution;\n\nout vec2 v_texcoord;\n\nvoid main() {\n vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);\n gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);\n v_texcoord = a_texcoord + a_unitquad * a_texsize;\n}","#version 300 es\nprecision lowp float;\n\nin vec2 v_texcoord;\n\nuniform sampler2D u_texture;\n\nout vec4 outColor;\n\nvoid main() {\n outColor = texture(u_texture, v_texcoord);\n}")),this.register((0,n.toDisposable)(()=>o.deleteProgram(this._program))),this._projectionLocation=(0,s.throwIfFalsy)(o.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,s.throwIfFalsy)(o.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,s.throwIfFalsy)(o.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=o.createVertexArray(),o.bindVertexArray(this._vertexArrayObject);let a=new Float32Array([0,0,1,0,0,1,1,1]),h=o.createBuffer();this.register((0,n.toDisposable)(()=>o.deleteBuffer(h))),o.bindBuffer(o.ARRAY_BUFFER,h),o.bufferData(o.ARRAY_BUFFER,a,o.STATIC_DRAW),o.enableVertexAttribArray(0),o.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);let c=new Uint8Array([0,1,3,0,2,3]),_=o.createBuffer();this.register((0,n.toDisposable)(()=>o.deleteBuffer(_))),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,_),o.bufferData(o.ELEMENT_ARRAY_BUFFER,c,o.STATIC_DRAW),this._attributesBuffer=(0,s.throwIfFalsy)(o.createBuffer()),this.register((0,n.toDisposable)(()=>o.deleteBuffer(this._attributesBuffer))),o.bindBuffer(o.ARRAY_BUFFER,this._attributesBuffer),o.enableVertexAttribArray(2),o.vertexAttribPointer(2,2,o.FLOAT,!1,l,0),o.vertexAttribDivisor(2,1),o.enableVertexAttribArray(3),o.vertexAttribPointer(3,2,o.FLOAT,!1,l,2*Float32Array.BYTES_PER_ELEMENT),o.vertexAttribDivisor(3,1),o.enableVertexAttribArray(4),o.vertexAttribPointer(4,2,o.FLOAT,!1,l,4*Float32Array.BYTES_PER_ELEMENT),o.vertexAttribDivisor(4,1),o.enableVertexAttribArray(5),o.vertexAttribPointer(5,2,o.FLOAT,!1,l,6*Float32Array.BYTES_PER_ELEMENT),o.vertexAttribDivisor(5,1),o.enableVertexAttribArray(1),o.vertexAttribPointer(1,2,o.FLOAT,!1,l,8*Float32Array.BYTES_PER_ELEMENT),o.vertexAttribDivisor(1,1),this._atlasTexture=(0,s.throwIfFalsy)(o.createTexture()),this.register((0,n.toDisposable)(()=>o.deleteTexture(this._atlasTexture))),o.bindTexture(o.TEXTURE_2D,this._atlasTexture),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,1,1,0,o.RGBA,o.UNSIGNED_BYTE,new Uint8Array([0,0,255,255])),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.enable(o.BLEND),o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),this.onResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(t,e,i,s,r,o,n,a){this._updateCell(this._vertices.attributes,t,e,i,s,r,o,n,a)}_updateCell(t,e,i,s,n,l,c,_,d){h.i=(i*this._terminal.cols+e)*10,s!==o.NULL_CELL_CODE&&void 0!==s?this._atlas&&(_&&_.length>1?h.glyph=this._atlas.getRasterizedGlyphCombinedChar(_,n,l,c):h.glyph=this._atlas.getRasterizedGlyph(s,n,l,c),h.leftCellPadding=Math.floor((this._dimensions.scaledCellWidth-this._dimensions.scaledCharWidth)/2),n!==d&&h.glyph.offset.x>h.leftCellPadding?(h.clippedPixels=h.glyph.offset.x-h.leftCellPadding,t[h.i]=-(h.glyph.offset.x-h.clippedPixels)+this._dimensions.scaledCharLeft,t[h.i+1]=-h.glyph.offset.y+this._dimensions.scaledCharTop,t[h.i+2]=(h.glyph.size.x-h.clippedPixels)/this._dimensions.scaledCanvasWidth,t[h.i+3]=h.glyph.size.y/this._dimensions.scaledCanvasHeight,t[h.i+4]=h.glyph.texturePositionClipSpace.x+h.clippedPixels/this._atlas.cacheCanvas.width,t[h.i+5]=h.glyph.texturePositionClipSpace.y,t[h.i+6]=h.glyph.sizeClipSpace.x-h.clippedPixels/this._atlas.cacheCanvas.width,t[h.i+7]=h.glyph.sizeClipSpace.y):(t[h.i]=-h.glyph.offset.x+this._dimensions.scaledCharLeft,t[h.i+1]=-h.glyph.offset.y+this._dimensions.scaledCharTop,t[h.i+2]=h.glyph.size.x/this._dimensions.scaledCanvasWidth,t[h.i+3]=h.glyph.size.y/this._dimensions.scaledCanvasHeight,t[h.i+4]=h.glyph.texturePositionClipSpace.x,t[h.i+5]=h.glyph.texturePositionClipSpace.y,t[h.i+6]=h.glyph.sizeClipSpace.x,t[h.i+7]=h.glyph.sizeClipSpace.y)):(0,r.fill)(t,0,h.i,h.i+10-1-2)}clear(){let t=this._terminal,e=t.cols*t.rows*10;this._vertices.count!==e?this._vertices.attributes=new Float32Array(e):this._vertices.attributes.fill(0);for(let t1=0;t1<this._vertices.attributesBuffers.length;t1++)this._vertices.count!==e?this._vertices.attributesBuffers[t1]=new Float32Array(e):this._vertices.attributesBuffers[t1].fill(0);this._vertices.count=e;let i=0;for(let e1=0;e1<t.rows;e1++)for(let s=0;s<t.cols;s++)this._vertices.attributes[i+8]=s/t.cols,this._vertices.attributes[i+9]=e1/t.rows,i+=10}onResize(){let t=this._gl;t.viewport(0,0,t.canvas.width,t.canvas.height),this.clear()}render(t){if(!this._atlas)return;let e=this._gl;e.useProgram(this._program),e.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;let i=this._vertices.attributesBuffers[this._activeBuffer],r=0;for(let e1=0;e1<t.lineLengths.length;e1++){let s1=e1*this._terminal.cols*10,o=this._vertices.attributes.subarray(s1,s1+10*t.lineLengths[e1]);i.set(o,r),r+=o.length}e.bindBuffer(e.ARRAY_BUFFER,this._attributesBuffer),e.bufferData(e.ARRAY_BUFFER,i.subarray(0,r),e.STREAM_DRAW),this._atlas.hasCanvasChanged&&(this._atlas.hasCanvasChanged=!1,e.uniform1i(this._textureLocation,0),e.activeTexture(e.TEXTURE0+0),e.bindTexture(e.TEXTURE_2D,this._atlasTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this._atlas.cacheCanvas),e.generateMipmap(e.TEXTURE_2D)),e.uniformMatrix4fv(this._projectionLocation,!1,s.PROJECTION_MATRIX),e.uniform2f(this._resolutionLocation,e.canvas.width,e.canvas.height),e.drawElementsInstanced(e.TRIANGLES,6,e.UNSIGNED_BYTE,0,r/10)}setAtlas(t){let e=this._gl;this._atlas=t,e.bindTexture(e.TEXTURE_2D,this._atlasTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.cacheCanvas),e.generateMipmap(e.TEXTURE_2D)}setDimensions(t){this._dimensions=t}}e.GlyphRenderer=c},742(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.RectangleRenderer=void 0;let s=i(381),r=i(310),o=i(859),n=i(302),a=8*Float32Array.BYTES_PER_ELEMENT,l={rgba:0,isDefault:!1,x1:0,y1:0,r:0,g:0,b:0,a:0};class h extends o.Disposable{constructor(t,e,i,r){super(),this._terminal=t,this._colors=e,this._gl=i,this._dimensions=r,this._vertices={count:0,attributes:new Float32Array(160)};let n=this._gl;this._program=(0,s.throwIfFalsy)((0,s.createProgram)(n,"#version 300 es\nlayout (location = 0) in vec2 a_position;\nlayout (location = 1) in vec2 a_size;\nlayout (location = 2) in vec4 a_color;\nlayout (location = 3) in vec2 a_unitquad;\n\nuniform mat4 u_projection;\n\nout vec4 v_color;\n\nvoid main() {\n vec2 zeroToOne = a_position + (a_unitquad * a_size);\n gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);\n v_color = a_color;\n}","#version 300 es\nprecision lowp float;\n\nin vec4 v_color;\n\nout vec4 outColor;\n\nvoid main() {\n outColor = v_color;\n}")),this.register((0,o.toDisposable)(()=>n.deleteProgram(this._program))),this._projectionLocation=(0,s.throwIfFalsy)(n.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=n.createVertexArray(),n.bindVertexArray(this._vertexArrayObject);let l=new Float32Array([0,0,1,0,0,1,1,1]),h=n.createBuffer();this.register((0,o.toDisposable)(()=>n.deleteBuffer(h))),n.bindBuffer(n.ARRAY_BUFFER,h),n.bufferData(n.ARRAY_BUFFER,l,n.STATIC_DRAW),n.enableVertexAttribArray(3),n.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let c=new Uint8Array([0,1,3,0,2,3]),_=n.createBuffer();this.register((0,o.toDisposable)(()=>n.deleteBuffer(_))),n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,_),n.bufferData(n.ELEMENT_ARRAY_BUFFER,c,n.STATIC_DRAW),this._attributesBuffer=(0,s.throwIfFalsy)(n.createBuffer()),this.register((0,o.toDisposable)(()=>n.deleteBuffer(this._attributesBuffer))),n.bindBuffer(n.ARRAY_BUFFER,this._attributesBuffer),n.enableVertexAttribArray(0),n.vertexAttribPointer(0,2,n.FLOAT,!1,a,0),n.vertexAttribDivisor(0,1),n.enableVertexAttribArray(1),n.vertexAttribPointer(1,2,n.FLOAT,!1,a,2*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(1,1),n.enableVertexAttribArray(2),n.vertexAttribPointer(2,4,n.FLOAT,!1,a,4*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(2,1),this._updateCachedColors()}render(){let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,s.PROJECTION_MATRIX),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,this._vertices.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLES,6,t.UNSIGNED_BYTE,0,this._vertices.count)}onResize(){this._updateViewportRectangle()}setColors(){this._updateCachedColors(),this._updateViewportRectangle()}setDimensions(t){this._dimensions=t}_updateCachedColors(){this._bgFloat=this._colorToFloat32Array(this._colors.background)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.scaledCellWidth,this._terminal.rows*this._dimensions.scaledCellHeight,this._bgFloat)}updateBackgrounds(t){let e=this._terminal,i=this._vertices,s,o,n,a,l,h,c,_,d,u,g,f=1;for(s=0;s<e.rows;s++){for(n=-1,a=0,l=0,h=!1,o=0;o<e.cols;o++)c=(s*e.cols+o)*r.RENDER_MODEL_INDICIES_PER_CELL,_=t.cells[c+r.RENDER_MODEL_BG_OFFSET],u=!!(67108864&(d=t.cells[c+r.RENDER_MODEL_FG_OFFSET])),(_!==a||d!==l&&(h||u))&&((0!==a||h&&0!==l)&&(g=8*f++,this._updateRectangle(i,g,l,a,n,o,s)),n=o,a=_,l=d,h=u);(0!==a||h&&0!==l)&&(g=8*f++,this._updateRectangle(i,g,l,a,n,e.cols,s))}i.count=f}_updateRectangle(t,e,i,r,o,a,h){if(l.isDefault=!1,67108864&i)switch(50331648&i){case 16777216:case 33554432:l.rgba=this._colors.ansi[255&i].rgba;break;case 50331648:l.rgba=(16777215&i)<<8;break;default:l.rgba=this._colors.foreground.rgba}else switch(50331648&r){case 16777216:case 33554432:l.rgba=this._colors.ansi[255&r].rgba;break;case 50331648:l.rgba=(16777215&r)<<8;break;default:l.rgba=this._colors.background.rgba,l.isDefault=!0}t.attributes.length<e+4&&(t.attributes=(0,s.expandFloat32Array)(t.attributes,this._terminal.rows*this._terminal.cols*8)),l.x1=o*this._dimensions.scaledCellWidth,l.y1=h*this._dimensions.scaledCellHeight,l.r=(l.rgba>>24&255)/255,l.g=(l.rgba>>16&255)/255,l.b=(l.rgba>>8&255)/255,l.a=!l.isDefault&&134217728&r?n.DIM_OPACITY:1,this._addRectangle(t.attributes,e,l.x1,l.y1,(a-o)*this._dimensions.scaledCellWidth,this._dimensions.scaledCellHeight,l.r,l.g,l.b,l.a)}_addRectangle(t,e,i,s,r,o,n,a,l,h){t[e]=i/this._dimensions.scaledCanvasWidth,t[e+1]=s/this._dimensions.scaledCanvasHeight,t[e+2]=r/this._dimensions.scaledCanvasWidth,t[e+3]=o/this._dimensions.scaledCanvasHeight,t[e+4]=n,t[e+5]=a,t[e+6]=l,t[e+7]=h}_addRectangleFloat(t,e,i,s,r,o,n){t[e]=i/this._dimensions.scaledCanvasWidth,t[e+1]=s/this._dimensions.scaledCanvasHeight,t[e+2]=r/this._dimensions.scaledCanvasWidth,t[e+3]=o/this._dimensions.scaledCanvasHeight,t[e+4]=n[0],t[e+5]=n[1],t[e+6]=n[2],t[e+7]=n[3]}_colorToFloat32Array(t){return new Float32Array([(t.rgba>>24&255)/255,(t.rgba>>16&255)/255,(t.rgba>>8&255)/255,(255&t.rgba)/255])}}e.RectangleRenderer=h},310(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.RenderModel=e.COMBINED_CHAR_BIT_MASK=e.RENDER_MODEL_EXT_OFFSET=e.RENDER_MODEL_FG_OFFSET=e.RENDER_MODEL_BG_OFFSET=e.RENDER_MODEL_INDICIES_PER_CELL=void 0;let s=i(455);e.RENDER_MODEL_INDICIES_PER_CELL=4,e.RENDER_MODEL_BG_OFFSET=1,e.RENDER_MODEL_FG_OFFSET=2,e.RENDER_MODEL_EXT_OFFSET=3,e.COMBINED_CHAR_BIT_MASK=2147483648,e.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection={hasSelection:!1,columnSelectMode:!1,viewportStartRow:0,viewportEndRow:0,viewportCappedStartRow:0,viewportCappedEndRow:0,startCol:0,endCol:0}}resize(t,i){let s=t*i*e.RENDER_MODEL_INDICIES_PER_CELL;s!==this.cells.length&&(this.cells=new Uint32Array(s),this.lineLengths=new Uint32Array(i))}clear(){(0,s.fill)(this.cells,0,0),(0,s.fill)(this.lineLengths,0,0)}clearSelection(){this.selection.hasSelection=!1,this.selection.viewportStartRow=0,this.selection.viewportEndRow=0,this.selection.viewportCappedStartRow=0,this.selection.viewportCappedEndRow=0,this.selection.startCol=0,this.selection.endCol=0}}},666(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.JoinedCellData=e.WebglRenderer=void 0;let s=i(965),r=i(733),o=i(461),n=i(713),a=i(742),l=i(310),h=i(859),c=i(855),_=i(476),d=i(345),u=i(782),g=i(820),f=i(147),C={fg:0,bg:0,hasFg:!1,hasBg:!1,isSelected:!1};class p extends h.Disposable{constructor(t,e,i,s,a,h,c){if(super(),this._terminal=t,this._colors=e,this._characterJoinerService=i,this._coreBrowserService=s,this._decorationService=h,this._model=new l.RenderModel,this._workCell=new u.CellData,this._workColors={fg:0,bg:0,ext:0},this._onChangeTextureAtlas=new d.EventEmitter,this._onRequestRedraw=new d.EventEmitter,this._onContextLoss=new d.EventEmitter,this._core=this._terminal._core,this._renderLayers=[new r.LinkRenderLayer(this._core.screenElement,2,this._colors,this._core,this._coreBrowserService),new o.CursorRenderLayer(t,this._core.screenElement,3,this._colors,this._onRequestRedraw,this._coreBrowserService,a)],this.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},this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._canvas=document.createElement("canvas"),this._gl=this._canvas.getContext("webgl2",{antialias:!1,depth:!1,preserveDrawingBuffer:c}),!this._gl)throw Error("WebGL2 not supported "+this._gl);this.register((0,g.addDisposableDomListener)(this._canvas,"webglcontextlost",t=>{console.log("webglcontextlost event received"),t.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(t)},3e3)})),this.register((0,g.addDisposableDomListener)(this._canvas,"webglcontextrestored",t=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,n.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this.register((0,_.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(t,e)=>this._setCanvasDevicePixelDimensions(t,e))),this._core.screenElement.appendChild(this._canvas),this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement)}get onChangeTextureAtlas(){return this._onChangeTextureAtlas.event}get onRequestRedraw(){return this._onRequestRedraw.event}get onContextLoss(){return this._onContextLoss.event}dispose(){var t;for(let t1 of this._renderLayers)t1.dispose();null===(t=this._canvas.parentElement)||void 0===t||t.removeChild(this._canvas),(0,n.removeTerminalFromCache)(this._terminal),super.dispose()}get textureAtlas(){var t;return null===(t=this._charAtlas)||void 0===t?void 0:t.cacheCanvas}setColors(t){for(let t1 of(this._colors=t,this._renderLayers))t1.setColors(this._terminal,this._colors),t1.reset(this._terminal);this._rectangleRenderer.setColors(),this._refreshCharAtlas(),this._clearModel(!0)}onDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.onResize(this._terminal.cols,this._terminal.rows))}onResize(t,e){for(let t1 of(this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows),this._renderLayers))t1.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.scaledCanvasWidth,this._canvas.height=this.dimensions.scaledCanvasHeight,this._canvas.style.width=`${this.dimensions.canvasWidth}px`,this._canvas.style.height=`${this.dimensions.canvasHeight}px`,this._core.screenElement.style.width=`${this.dimensions.canvasWidth}px`,this._core.screenElement.style.height=`${this.dimensions.canvasHeight}px`,this._rectangleRenderer.setDimensions(this.dimensions),this._rectangleRenderer.onResize(),this._glyphRenderer.setDimensions(this.dimensions),this._glyphRenderer.onResize(),this._refreshCharAtlas(),this._clearModel(!1)}onCharSizeChanged(){this.onResize(this._terminal.cols,this._terminal.rows)}onBlur(){for(let t of this._renderLayers)t.onBlur(this._terminal);this._requestRedrawViewport()}onFocus(){for(let t of this._renderLayers)t.onFocus(this._terminal);this._requestRedrawViewport()}onSelectionChanged(t,e,i){for(let s of this._renderLayers)s.onSelectionChanged(this._terminal,t,e,i);this._updateSelectionModel(t,e,i),this._requestRedrawViewport()}onCursorMove(){for(let t of this._renderLayers)t.onCursorMove(this._terminal)}onOptionsChanged(){for(let t of this._renderLayers)t.onOptionsChanged(this._terminal);this._updateDimensions(),this._refreshCharAtlas()}_initializeWebGLState(){var t,e;null===(t=this._rectangleRenderer)||void 0===t||t.dispose(),null===(e=this._glyphRenderer)||void 0===e||e.dispose(),this._rectangleRenderer=new a.RectangleRenderer(this._terminal,this._colors,this._gl,this.dimensions),this._glyphRenderer=new s.GlyphRenderer(this._terminal,this._colors,this._gl,this.dimensions),this.onCharSizeChanged()}_refreshCharAtlas(){if(this.dimensions.scaledCharWidth<=0&&this.dimensions.scaledCharHeight<=0)return void(this._isAttached=!1);let t=(0,n.acquireCharAtlas)(this._terminal,this._colors,this.dimensions.scaledCellWidth,this.dimensions.scaledCellHeight,this.dimensions.scaledCharWidth,this.dimensions.scaledCharHeight,this._coreBrowserService.dpr);if(!("getRasterizedGlyph"in t))throw Error("The webgl renderer only works with the webgl char atlas");this._charAtlas!==t&&this._onChangeTextureAtlas.fire(t.cacheCanvas),this._charAtlas=t,this._charAtlas.warmUp(),this._glyphRenderer.setAtlas(this._charAtlas)}_clearModel(t){this._model.clear(),t&&this._glyphRenderer.clear()}clearCharAtlas(){var t;null===(t=this._charAtlas)||void 0===t||t.clearTexture(),this._clearModel(!0),this._updateModel(0,this._terminal.rows-1),this._requestRedrawViewport()}clear(){for(let t of(this._clearModel(!0),this._renderLayers))t.reset(this._terminal)}registerCharacterJoiner(t){return -1}deregisterCharacterJoiner(t){return!1}renderRows(t,e){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._core._charSizeService.width&&this._core._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(let i of this._renderLayers)i.onGridChanged(this._terminal,t,e);this._glyphRenderer.beginFrame()&&(this._clearModel(!0),this._updateSelectionModel(void 0,void 0)),this._updateModel(t,e),this._rectangleRenderer.render(),this._glyphRenderer.render(this._model)}_updateModel(t,e){let i=this._core,s,r,o,n,a,h,_,d,u,g,f,C,p,v=this._workCell;for(r=t;r<=e;r++)for(o=r+i.buffer.ydisp,n=i.buffer.lines.get(o),this._model.lineLengths[r]=0,a=this._characterJoinerService.getJoinedCharacters(o),C=0;C<i.cols;C++)if(s=this._workColors.bg,n.loadCell(C,v),0===C&&(s=this._workColors.bg),h=!1,_=C,a.length>0&&C===a[0][0]&&(h=!0,d=a.shift(),v=new m(v,n.translateToString(!0,d[0],d[1]),d[1]-d[0]),_=d[1]-1),u=v.getChars(),g=v.getCode(),f=(r*i.cols+C)*l.RENDER_MODEL_INDICIES_PER_CELL,this._loadColorsForCell(C,o),g!==c.NULL_CELL_CODE&&(this._model.lineLengths[r]=C+1),(this._model.cells[f]!==g||this._model.cells[f+l.RENDER_MODEL_BG_OFFSET]!==this._workColors.bg||this._model.cells[f+l.RENDER_MODEL_FG_OFFSET]!==this._workColors.fg||this._model.cells[f+l.RENDER_MODEL_EXT_OFFSET]!==this._workColors.ext)&&(u.length>1&&(g|=l.COMBINED_CHAR_BIT_MASK),this._model.cells[f]=g,this._model.cells[f+l.RENDER_MODEL_BG_OFFSET]=this._workColors.bg,this._model.cells[f+l.RENDER_MODEL_FG_OFFSET]=this._workColors.fg,this._model.cells[f+l.RENDER_MODEL_EXT_OFFSET]=this._workColors.ext,this._glyphRenderer.updateCell(C,r,g,this._workColors.bg,this._workColors.fg,this._workColors.ext,u,s),h))for(v=this._workCell,C++;C<_;C++)p=(r*i.cols+C)*l.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.updateCell(C,r,c.NULL_CELL_CODE,0,0,0,c.NULL_CELL_CHAR,0),this._model.cells[p]=c.NULL_CELL_CODE,this._model.cells[p+l.RENDER_MODEL_BG_OFFSET]=this._workColors.bg,this._model.cells[p+l.RENDER_MODEL_FG_OFFSET]=this._workColors.fg,this._model.cells[p+l.RENDER_MODEL_EXT_OFFSET]=this._workColors.ext;this._rectangleRenderer.updateBackgrounds(this._model)}_loadColorsForCell(t,e){this._workColors.bg=this._workCell.bg,this._workColors.fg=this._workCell.fg,this._workColors.ext=268435456&this._workCell.bg?this._workCell.extended.ext:0,C.bg=0,C.fg=0,C.hasBg=!1,C.hasFg=!1,C.isSelected=!1,this._decorationService.forEachDecorationAtCell(t,e,"bottom",t=>{t.backgroundColorRGB&&(C.bg=t.backgroundColorRGB.rgba>>8&16777215,C.hasBg=!0),t.foregroundColorRGB&&(C.fg=t.foregroundColorRGB.rgba>>8&16777215,C.hasFg=!0)}),C.isSelected=this._isCellSelected(t,e),C.isSelected&&(C.bg=(this._coreBrowserService.isFocused?this._colors.selectionBackgroundOpaque:this._colors.selectionInactiveBackgroundOpaque).rgba>>8&16777215,C.hasBg=!0,this._colors.selectionForeground&&(C.fg=this._colors.selectionForeground.rgba>>8&16777215,C.hasFg=!0)),this._decorationService.forEachDecorationAtCell(t,e,"top",t=>{t.backgroundColorRGB&&(C.bg=t.backgroundColorRGB.rgba>>8&16777215,C.hasBg=!0),t.foregroundColorRGB&&(C.fg=t.foregroundColorRGB.rgba>>8&16777215,C.hasFg=!0)}),C.hasBg&&(C.isSelected?C.bg=-16777216&this._workCell.bg&-134217729|C.bg|50331648:C.bg=-16777216&this._workCell.bg|C.bg|50331648),C.hasFg&&(C.fg=-16777216&this._workCell.fg&-67108865|C.fg|50331648),67108864&this._workColors.fg&&(C.hasBg&&!C.hasFg&&(0==(50331648&this._workColors.bg)?C.fg=-134217728&this._workColors.fg|16777215&this._colors.background.rgba>>8|50331648:C.fg=-134217728&this._workColors.fg|67108863&this._workColors.bg,C.hasFg=!0),!C.hasBg&&C.hasFg&&(0==(50331648&this._workColors.fg)?C.bg=-67108864&this._workColors.bg|16777215&this._colors.foreground.rgba>>8|50331648:C.bg=-67108864&this._workColors.bg|67108863&this._workColors.fg,C.hasBg=!0)),this._workColors.bg=C.hasBg?C.bg:this._workColors.bg,this._workColors.fg=C.hasFg?C.fg:this._workColors.fg}_isCellSelected(t,e){return!!this._model.selection.hasSelection&&(e-=this._terminal.buffer.active.viewportY,this._model.selection.columnSelectMode?this._model.selection.startCol<=this._model.selection.endCol?t>=this._model.selection.startCol&&e>=this._model.selection.viewportCappedStartRow&&t<this._model.selection.endCol&&e<=this._model.selection.viewportCappedEndRow:t<this._model.selection.startCol&&e>=this._model.selection.viewportCappedStartRow&&t>=this._model.selection.endCol&&e<=this._model.selection.viewportCappedEndRow:e>this._model.selection.viewportStartRow&&e<this._model.selection.viewportEndRow||this._model.selection.viewportStartRow===this._model.selection.viewportEndRow&&e===this._model.selection.viewportStartRow&&t>=this._model.selection.startCol&&t<this._model.selection.endCol||this._model.selection.viewportStartRow<this._model.selection.viewportEndRow&&e===this._model.selection.viewportEndRow&&t<this._model.selection.endCol||this._model.selection.viewportStartRow<this._model.selection.viewportEndRow&&e===this._model.selection.viewportStartRow&&t>=this._model.selection.startCol)}_updateSelectionModel(t,e,i=!1){let s=this._terminal;if(!t||!e||t[0]===e[0]&&t[1]===e[1])return void this._model.clearSelection();let r=t[1]-s.buffer.active.viewportY,o=e[1]-s.buffer.active.viewportY,n=Math.max(r,0),a=Math.min(o,s.rows-1);n>=s.rows||a<0?this._model.clearSelection():(this._model.selection.hasSelection=!0,this._model.selection.columnSelectMode=i,this._model.selection.viewportStartRow=r,this._model.selection.viewportEndRow=o,this._model.selection.viewportCappedStartRow=n,this._model.selection.viewportCappedEndRow=a,this._model.selection.startCol=t[0],this._model.selection.endCol=e[0])}_updateDimensions(){this._core._charSizeService.width&&this._core._charSizeService.height&&(this.dimensions.scaledCharWidth=Math.floor(this._core._charSizeService.width*this._devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._core._charSizeService.height*this._devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._terminal.options.lineHeight),this.dimensions.scaledCharTop=1===this._terminal.options.lineHeight?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._terminal.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._terminal.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._terminal.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._terminal.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/this._devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/this._devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.scaledCellHeight/this._devicePixelRatio,this.dimensions.actualCellWidth=this.dimensions.scaledCellWidth/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(t,e){this._canvas.width===t&&this._canvas.height===e||(this._canvas.width=t,this._canvas.height=e,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}}e.WebglRenderer=p;class m extends f.AttributeData{constructor(t,e,i){super(),this.content=0,this.combinedData="",this.fg=t.fg,this.bg=t.bg,this.combinedData=e,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(t){throw Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}e.JoinedCellData=m},381(t,e){function i(t,e,i){let r=s(t.createShader(e));if(t.shaderSource(r,i),t.compileShader(r),t.getShaderParameter(r,t.COMPILE_STATUS))return r;console.error(t.getShaderInfoLog(r)),t.deleteShader(r)}function s(t){if(!t)throw Error("value must not be falsy");return t}Object.defineProperty(e,"__esModule",{value:!0}),e.throwIfFalsy=e.expandFloat32Array=e.createShader=e.createProgram=e.PROJECTION_MATRIX=void 0,e.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),e.createProgram=function(t,e,r){let o=s(t.createProgram());if(t.attachShader(o,s(i(t,t.VERTEX_SHADER,e))),t.attachShader(o,s(i(t,t.FRAGMENT_SHADER,r))),t.linkProgram(o),t.getProgramParameter(o,t.LINK_STATUS))return o;console.error(t.getProgramInfoLog(o)),t.deleteProgram(o)},e.createShader=i,e.expandFloat32Array=function(t,e){let i=Math.min(2*t.length,e),s=new Float32Array(i);for(let e1=0;e1<t.length;e1++)s[e1]=t[e1];return s},e.throwIfFalsy=s},713(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.removeTerminalFromCache=e.acquireCharAtlas=void 0;let s=i(433),r=i(167),o=[];e.acquireCharAtlas=function(t,e,i,n,a,l,h){let c=(0,s.generateConfig)(i,n,a,l,t,e,h);for(let e1=0;e1<o.length;e1++){let i1=o[e1],r1=i1.ownedBy.indexOf(t);if(r1>=0){if((0,s.configEquals)(i1.config,c))return i1.atlas;1===i1.ownedBy.length?(i1.atlas.dispose(),o.splice(e1,1)):i1.ownedBy.splice(r1,1);break}}for(let e2=0;e2<o.length;e2++){let i2=o[e2];if((0,s.configEquals)(i2.config,c))return i2.ownedBy.push(t),i2.atlas}let _=t._core,d={atlas:new r.WebglCharAtlas(document,c,_.unicodeService),config:c,ownedBy:[t]};return o.push(d),d.atlas},e.removeTerminalFromCache=function(t){for(let e=0;e<o.length;e++){let i=o[e].ownedBy.indexOf(t);if(-1!==i){1===o[e].ownedBy.length?(o[e].atlas.dispose(),o.splice(e,1)):o[e].ownedBy.splice(i,1);break}}}},433(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.is256Color=e.configEquals=e.generateConfig=void 0;let i={css:"",rgba:0};e.generateConfig=function(t,e,s,r,o,n,a){let l={foreground:n.foreground,background:n.background,cursor:i,cursorAccent:i,selectionForeground:i,selectionBackgroundTransparent:i,selectionBackgroundOpaque:i,selectionInactiveBackgroundTransparent:i,selectionInactiveBackgroundOpaque:i,ansi:n.ansi.slice(),contrastCache:n.contrastCache};return{customGlyphs:o.options.customGlyphs,devicePixelRatio:a,letterSpacing:o.options.letterSpacing,lineHeight:o.options.lineHeight,scaledCellWidth:t,scaledCellHeight:e,scaledCharWidth:s,scaledCharHeight:r,fontFamily:o.options.fontFamily,fontSize:o.options.fontSize,fontWeight:o.options.fontWeight,fontWeightBold:o.options.fontWeightBold,allowTransparency:o.options.allowTransparency,drawBoldTextInBrightColors:o.options.drawBoldTextInBrightColors,minimumContrastRatio:o.options.minimumContrastRatio,colors:l}},e.configEquals=function(t,e){for(let i=0;i<t.colors.ansi.length;i++)if(t.colors.ansi[i].rgba!==e.colors.ansi[i].rgba)return!1;return t.devicePixelRatio===e.devicePixelRatio&&t.customGlyphs===e.customGlyphs&&t.lineHeight===e.lineHeight&&t.letterSpacing===e.letterSpacing&&t.fontFamily===e.fontFamily&&t.fontSize===e.fontSize&&t.fontWeight===e.fontWeight&&t.fontWeightBold===e.fontWeightBold&&t.allowTransparency===e.allowTransparency&&t.scaledCharWidth===e.scaledCharWidth&&t.scaledCharHeight===e.scaledCharHeight&&t.drawBoldTextInBrightColors===e.drawBoldTextInBrightColors&&t.minimumContrastRatio===e.minimumContrastRatio&&t.colors.foreground===e.colors.foreground&&t.colors.background===e.colors.background},e.is256Color=function(t){return 16777216==(50331648&t)||33554432==(50331648&t)}},167(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.WebglCharAtlas=void 0;let s=i(302),r=i(855),o=i(381),n=i(147),a=i(160),l=i(14),h=i(634),c=i(485),u=Math.floor(819.2),g={css:"rgba(0, 0, 0, 0)",rgba:0},f={offset:{x:0,y:0},texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}},C={glyph:void 0};function p(t,e,i,s){let r=e.rgba>>>24,o=e.rgba>>>16&255,n=e.rgba>>>8&255,a=i.rgba>>>24,l=i.rgba>>>16&255,h=i.rgba>>>8&255,c=Math.floor((Math.abs(r-a)+Math.abs(o-l)+Math.abs(n-h))/12),_=!0;for(let e1=0;e1<t.data.length;e1+=4)t.data[e1]===r&&t.data[e1+1]===o&&t.data[e1+2]===n||s&&Math.abs(t.data[e1]-r)+Math.abs(t.data[e1+1]-o)+Math.abs(t.data[e1+2]-n)<c?t.data[e1+3]=0:_=!1;return _}e.WebglCharAtlas=class{constructor(t,e,i){this._config=e,this._unicodeService=i,this._didWarmUp=!1,this._cacheMap=new c.FourKeyMap,this._cacheMapCombined=new c.FourKeyMap,this._currentRow={x:0,y:0,height:0},this._fixedRows=[],this.hasCanvasChanged=!1,this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new n.AttributeData,this.cacheCanvas=t.createElement("canvas"),this.cacheCanvas.width=1024,this.cacheCanvas.height=1024,this._cacheCtx=(0,o.throwIfFalsy)(this.cacheCanvas.getContext("2d",{alpha:!0})),this._tmpCanvas=t.createElement("canvas"),this._tmpCanvas.width=4*this._config.scaledCellWidth+4,this._tmpCanvas.height=this._config.scaledCellHeight+4,this._tmpCtx=(0,o.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency}))}dispose(){this.cacheCanvas.parentElement&&this.cacheCanvas.parentElement.removeChild(this.cacheCanvas)}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){for(let t=33;t<126;t++){let e=this._drawToCache(t,r.DEFAULT_COLOR,r.DEFAULT_COLOR,r.DEFAULT_EXT);this._cacheMap.set(t,r.DEFAULT_COLOR,r.DEFAULT_COLOR,r.DEFAULT_EXT,e)}}beginFrame(){return this._currentRow.y>u&&(this.clearTexture(),this.warmUp(),!0)}clearTexture(){0===this._currentRow.x&&0===this._currentRow.y||(this._cacheCtx.clearRect(0,0,1024,1024),this._cacheMap.clear(),this._cacheMapCombined.clear(),this._currentRow.x=0,this._currentRow.y=0,this._currentRow.height=0,this._fixedRows.length=0,this._didWarmUp=!1)}getRasterizedGlyphCombinedChar(t,e,i,s){return this._getFromCacheMap(this._cacheMapCombined,t,e,i,s)}getRasterizedGlyph(t,e,i,s){return this._getFromCacheMap(this._cacheMap,t,e,i,s)}_getFromCacheMap(t,e,i,s,r){return C.glyph=t.get(e,i,s,r),C.glyph||(C.glyph=this._drawToCache(e,i,s,r),t.set(e,i,s,r,C.glyph)),C.glyph}_getColorFromAnsiIndex(t){if(t>=this._config.colors.ansi.length)throw Error("No color found for idx "+t);return this._config.colors.ansi[t]}_getBackgroundColor(t,e,i,r){let o;if(this._config.allowTransparency)return g;switch(t){case 16777216:case 33554432:o=this._getColorFromAnsiIndex(e);break;case 50331648:let t1=n.AttributeData.toColorRGB(e);o=a.rgba.toColor(t1[0],t1[1],t1[2]);break;default:o=i?this._config.colors.foreground:this._config.colors.background}return r&&(o=a.color.blend(this._config.colors.background,a.color.multiplyOpacity(o,s.DIM_OPACITY))),o}_getForegroundColor(t,e,i,r,o,l,h,c,_,d){let g;let u=this._getMinimumContrastColor(t,e,i,r,o,l,!1,_,d);if(u)return u;switch(o){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&_&&l<8&&(l+=8),g=this._getColorFromAnsiIndex(l);break;case 50331648:let t1=n.AttributeData.toColorRGB(l);g=a.rgba.toColor(t1[0],t1[1],t1[2]);break;default:g=h?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(g=a.color.opaque(g)),c&&(g=a.color.multiplyOpacity(g,s.DIM_OPACITY)),g}_resolveBackgroundRgba(t,e,i){switch(t){case 16777216:case 33554432:return this._getColorFromAnsiIndex(e).rgba;case 50331648:return e<<8;default:return i?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(t,e,i,s){switch(t){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&s&&e<8&&(e+=8),this._getColorFromAnsiIndex(e).rgba;case 50331648:return e<<8;default:return i?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(t,e,i,s,r,o,n,l,h){if(1===this._config.minimumContrastRatio||h)return;let c=this._config.colors.contrastCache.getColor(t,s);if(void 0!==c)return c||void 0;let _=this._resolveBackgroundRgba(e,i,n),d=this._resolveForegroundRgba(r,o,n,l),u=a.rgba.ensureContrastRatio(_,d,this._config.minimumContrastRatio);if(!u)return void this._config.colors.contrastCache.setColor(t,s,null);let g=a.rgba.toColor(u>>24&255,u>>16&255,u>>8&255);return this._config.colors.contrastCache.setColor(t,s,g),g}_drawToCache(t,e,i,r){let O;let o="number"==typeof t?String.fromCharCode(t):t;this.hasCanvasChanged=!0;let a=this._config.scaledCellWidth*Math.max(o.length,2)+4;this._tmpCanvas.width<a&&(this._tmpCanvas.width=a);let c=this._config.scaledCellHeight+8;if(this._tmpCanvas.height<c&&(this._tmpCanvas.height=c),this._tmpCtx.save(),this._workAttributeData.fg=i,this._workAttributeData.bg=e,this._workAttributeData.extended.ext=r,this._workAttributeData.isInvisible())return f;let u=!!this._workAttributeData.isBold(),g=!!this._workAttributeData.isInverse(),C=!!this._workAttributeData.isDim(),m=!!this._workAttributeData.isItalic(),v=!!this._workAttributeData.isUnderline(),L=!!this._workAttributeData.isStrikethrough(),w=this._workAttributeData.getFgColor(),x=this._workAttributeData.getFgColorMode(),b=this._workAttributeData.getBgColor(),M=this._workAttributeData.getBgColorMode();if(g){let t1=w;w=b,b=t1;let e1=x;x=M,M=e1}let y=this._getBackgroundColor(M,b,g,C);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=y.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";let R=u?this._config.fontWeightBold:this._config.fontWeight;this._tmpCtx.font=`${m?"italic":""} ${R} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=s.TEXT_BASELINE;let A=1===o.length&&(0,h.isPowerlineGlyph)(o.charCodeAt(0)),D=1===o.length&&(0,h.isRestrictedPowerlineGlyph)(o.charCodeAt(0)),T=this._getForegroundColor(e,M,b,i,x,w,g,C,u,(0,h.excludeFromContrastRatioDemands)(o.charCodeAt(0)));this._tmpCtx.fillStyle=T.css;let S=D?0:4,B=!1;!1!==this._config.customGlyphs&&(B=(0,l.tryDrawCustomChar)(this._tmpCtx,o,S,S,this._config.scaledCellWidth,this._config.scaledCellHeight,this._config.fontSize,this._config.devicePixelRatio));let F,k=!A;if(F="number"==typeof t?this._unicodeService.wcwidth(t):this._unicodeService.getStringCellWidth(t),v){this._tmpCtx.save();let t2=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),e2=t2%2==1?.5:0;if(this._tmpCtx.lineWidth=t2,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())k=!1,this._tmpCtx.strokeStyle=`rgb(${n.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{k=!1;let t3=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&t3<8&&(t3+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(t3).css}this._tmpCtx.beginPath();let s1=Math.ceil(S+this._config.scaledCharHeight)-e2,r1=S+this._config.scaledCharHeight+t2-e2,a1=Math.ceil(S+this._config.scaledCharHeight+2*t2)-e2;for(let o1=0;o1<F;o1++){this._tmpCtx.save();let n1=S+o1*this._config.scaledCellWidth,l1=S+(o1+1)*this._config.scaledCellWidth,h1=n1+this._config.scaledCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(n1,s1),this._tmpCtx.lineTo(l1,s1),this._tmpCtx.moveTo(n1,a1),this._tmpCtx.lineTo(l1,a1);break;case 3:let i1=t2<=1?a1:Math.ceil(S+this._config.scaledCharHeight-t2/2)-e2,o2=t2<=1?s1:Math.ceil(S+this._config.scaledCharHeight+t2/2)-e2,c1=new Path2D;c1.rect(n1,s1,this._config.scaledCellWidth,a1-s1),this._tmpCtx.clip(c1),this._tmpCtx.moveTo(n1-this._config.scaledCellWidth/2,r1),this._tmpCtx.bezierCurveTo(n1-this._config.scaledCellWidth/2,o2,n1,o2,n1,r1),this._tmpCtx.bezierCurveTo(n1,i1,h1,i1,h1,r1),this._tmpCtx.bezierCurveTo(h1,o2,l1,o2,l1,r1),this._tmpCtx.bezierCurveTo(l1,i1,l1+this._config.scaledCellWidth/2,i1,l1+this._config.scaledCellWidth/2,r1);break;case 4:this._tmpCtx.setLineDash([2*this._config.devicePixelRatio,this._config.devicePixelRatio]),this._tmpCtx.moveTo(n1,s1),this._tmpCtx.lineTo(l1,s1);break;case 5:this._tmpCtx.setLineDash([4*this._config.devicePixelRatio,3*this._config.devicePixelRatio]),this._tmpCtx.moveTo(n1,s1),this._tmpCtx.lineTo(l1,s1);break;default:this._tmpCtx.moveTo(n1,s1),this._tmpCtx.lineTo(l1,s1)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!B&&this._config.fontSize>=12&&!this._config.allowTransparency&&" "!==o){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";let e3=this._tmpCtx.measureText(o);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in e3&&e3.actualBoundingBoxDescent>0){this._tmpCtx.save();let e4=new Path2D;e4.rect(S,s1-Math.ceil(t2/2),this._config.scaledCellWidth,a1-s1+Math.ceil(t2/2)),this._tmpCtx.clip(e4),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=y.css,this._tmpCtx.strokeText(o,S,S+this._config.scaledCharHeight),this._tmpCtx.restore()}}}if(B||this._tmpCtx.fillText(o,S,S+this._config.scaledCharHeight),"_"===o&&!this._config.allowTransparency){let t4=p(this._tmpCtx.getImageData(S,S,this._config.scaledCellWidth,this._config.scaledCellHeight),y,T,k);if(t4)for(let e5=1;e5<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=y.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(o,S,S+this._config.scaledCharHeight-e5),t4=p(this._tmpCtx.getImageData(S,S,this._config.scaledCellWidth,this._config.scaledCellHeight),y,T,k));e5++);}if(L){let t5=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),e6=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=t5,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(S,S+Math.floor(this._config.scaledCharHeight/2)-e6),this._tmpCtx.lineTo(S+this._config.scaledCharWidth*F,S+Math.floor(this._config.scaledCharHeight/2)-e6),this._tmpCtx.stroke()}this._tmpCtx.restore();let I=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);if(this._config.allowTransparency?function(t){for(let e=0;e<t.data.length;e+=4)if(t.data[e+3]>0)return!1;return!0}(I):p(I,y,T,k))return f;let P=this._findGlyphBoundingBox(I,this._workBoundingBox,a,D,B,S),W=this._clipImageData(I,this._workBoundingBox);for(;;){for(let t6 of(O=this._currentRow,this._fixedRows))(O===this._currentRow||t6.height<O.height)&&P.size.y<=t6.height&&(O=t6);if(O.height>2*P.size.y&&(this._currentRow.height>0&&this._fixedRows.push(this._currentRow),O={x:0,y:this._currentRow.y+this._currentRow.height,height:P.size.y},this._fixedRows.push(O),this._currentRow={x:0,y:O.y+O.height,height:0}),O.x+P.size.x<=1024)break;O===this._currentRow?(O.x=0,O.y+=O.height,O.height=0):this._fixedRows.splice(this._fixedRows.indexOf(O),1)}return P.texturePosition.x=O.x,P.texturePosition.y=O.y,P.texturePositionClipSpace.x=O.x/1024,P.texturePositionClipSpace.y=O.y/1024,O.height=Math.max(O.height,P.size.y),O.x+=P.size.x,this._cacheCtx.putImageData(W,P.texturePosition.x,P.texturePosition.y),P}_findGlyphBoundingBox(t,e,i,s,r,o){e.top=0;let n=s?this._config.scaledCellHeight:this._tmpCanvas.height,a=s?this._config.scaledCellWidth:i,l=!1;for(let i1=0;i1<n;i1++){for(let s1=0;s1<a;s1++){let r1=i1*this._tmpCanvas.width*4+4*s1+3;if(0!==t.data[r1]){e.top=i1,l=!0;break}}if(l)break}e.left=0,l=!1;for(let i2=0;i2<a;i2++){for(let s2=0;s2<n;s2++){let r2=s2*this._tmpCanvas.width*4+4*i2+3;if(0!==t.data[r2]){e.left=i2,l=!0;break}}if(l)break}e.right=a,l=!1;for(let i3=a-1;i3>=0;i3--){for(let s3=0;s3<n;s3++){let r3=s3*this._tmpCanvas.width*4+4*i3+3;if(0!==t.data[r3]){e.right=i3,l=!0;break}}if(l)break}e.bottom=n,l=!1;for(let i4=n-1;i4>=0;i4--){for(let s4=0;s4<a;s4++){let r4=i4*this._tmpCanvas.width*4+4*s4+3;if(0!==t.data[r4]){e.bottom=i4,l=!0;break}}if(l)break}return{texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:e.right-e.left+1,y:e.bottom-e.top+1},sizeClipSpace:{x:(e.right-e.left+1)/1024,y:(e.bottom-e.top+1)/1024},offset:{x:-e.left+o+(s||r?Math.floor((this._config.scaledCellWidth-this._config.scaledCharWidth)/2):0),y:-e.top+o+(s||r?1===this._config.lineHeight?0:Math.round((this._config.scaledCellHeight-this._config.scaledCharHeight)/2):0)}}}_clipImageData(t,e){let i=e.right-e.left+1,s=e.bottom-e.top+1,r=new Uint8ClampedArray(i*s*4);for(let s1=e.top;s1<=e.bottom;s1++)for(let o=e.left;o<=e.right;o++){let n=s1*this._tmpCanvas.width*4+4*o,a=(s1-e.top)*i*4+4*(o-e.left);r[a]=t.data[n],r[a+1]=t.data[n+1],r[a+2]=t.data[n+2],r[a+3]=t.data[n+3]}return new ImageData(r,i,s)}}},592(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.BaseRenderLayer=void 0;let s=i(713),r=i(302),o=i(381);e.BaseRenderLayer=class{constructor(t,e,i,s,r,o){this._container=t,this._alpha=s,this._colors=r,this._coreBrowserService=o,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._canvas=document.createElement("canvas"),this._canvas.classList.add(`xterm-${e}-layer`),this._canvas.style.zIndex=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}dispose(){this._canvas.remove(),this._charAtlas&&this._charAtlas.dispose()}_initCanvas(){this._ctx=(0,o.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}onOptionsChanged(t){}onBlur(t){}onFocus(t){}onCursorMove(t){}onGridChanged(t,e,i){}onSelectionChanged(t,e,i,s=!1){}setColors(t,e){this._refreshCharAtlas(t,e)}_setTransparency(t,e){if(e===this._alpha)return;let i=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,i),this._refreshCharAtlas(t,this._colors),this.onGridChanged(t,0,t.rows-1)}_refreshCharAtlas(t,e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,s.acquireCharAtlas)(t,e,this._scaledCellWidth,this._scaledCellHeight,this._scaledCharWidth,this._scaledCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(t,e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=`${e.canvasWidth}px`,this._canvas.style.height=`${e.canvasHeight}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(t,this._colors)}_fillCells(t,e,i,s){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,s*this._scaledCellHeight)}_fillBottomLineAtCells(t,e,i=1){this._ctx.fillRect(t*this._scaledCellWidth,(e+1)*this._scaledCellHeight-this._coreBrowserService.dpr-1,i*this._scaledCellWidth,this._coreBrowserService.dpr)}_fillLeftLineAtCell(t,e,i){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,this._coreBrowserService.dpr*i,this._scaledCellHeight)}_strokeRectAtCell(t,e,i,s){this._ctx.lineWidth=this._coreBrowserService.dpr,this._ctx.strokeRect(t*this._scaledCellWidth+this._coreBrowserService.dpr/2,e*this._scaledCellHeight+this._coreBrowserService.dpr/2,i*this._scaledCellWidth-this._coreBrowserService.dpr,s*this._scaledCellHeight-this._coreBrowserService.dpr)}_clearAll(){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))}_clearCells(t,e,i,s){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,s*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,s*this._scaledCellHeight))}_fillCharTrueColor(t,e,i,s){this._ctx.font=this._getFont(t,!1,!1),this._ctx.textBaseline=r.TEXT_BASELINE,this._clipCell(i,s,e.getWidth()),this._ctx.fillText(e.getChars(),i*this._scaledCellWidth+this._scaledCharLeft,s*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)}_clipCell(t,e,i){this._ctx.beginPath(),this._ctx.rect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()}_getFont(t,e,i){return`${i?"italic":""} ${e?t.options.fontWeightBold:t.options.fontWeight} ${t.options.fontSize*this._coreBrowserService.dpr}px ${t.options.fontFamily}`}}},461(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRenderLayer=void 0;let s=i(592),r=i(782);class o extends s.BaseRenderLayer{constructor(t,e,i,s,o,n,a){super(e,"cursor",i,!0,s,n),this._onRequestRefreshRowsEvent=o,this._coreService=a,this._cell=new r.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this)},this.onOptionsChanged(t)}dispose(){var t;null===(t=this._cursorBlinkStateManager)||void 0===t||t.dispose(),this._cursorBlinkStateManager=void 0,super.dispose()}resize(t,e){super.resize(t,e),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(t){var e;this._clearCursor(),null===(e=this._cursorBlinkStateManager)||void 0===e||e.restartBlinkAnimation(t),this.onOptionsChanged(t)}onBlur(t){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.pause(),this._onRequestRefreshRowsEvent.fire({start:t.buffer.active.cursorY,end:t.buffer.active.cursorY})}onFocus(t){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.resume(t),this._onRequestRefreshRowsEvent.fire({start:t.buffer.active.cursorY,end:t.buffer.active.cursorY})}onOptionsChanged(t){var e;t.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new n(()=>{this._render(t,!0)},this._coreBrowserService)):(null===(e=this._cursorBlinkStateManager)||void 0===e||e.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRefreshRowsEvent.fire({start:t.buffer.active.cursorY,end:t.buffer.active.cursorY})}onCursorMove(t){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.restartBlinkAnimation(t)}onGridChanged(t,e,i){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(t,!1):this._cursorBlinkStateManager.restartBlinkAnimation(t)}_render(t,e){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();let i=t.buffer.active.baseY+t.buffer.active.cursorY,s=i-t.buffer.active.viewportY,r=Math.min(t.buffer.active.cursorX,t.cols-1);if(s<0||s>=t.rows)this._clearCursor();else if(t._core.buffer.lines.get(i).loadCell(r,this._cell),void 0!==this._cell.content){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;let e1=t.options.cursorStyle;return e1&&"block"!==e1?this._cursorRenderers[e1](t,r,s,this._cell):this._renderBlurCursor(t,r,s,this._cell),this._ctx.restore(),this._state.x=r,this._state.y=s,this._state.isFocused=!1,this._state.style=e1,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===r&&this._state.y===s&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===t.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[t.options.cursorStyle||"block"](t,r,s,this._cell),this._ctx.restore(),this._state.x=r,this._state.y=s,this._state.isFocused=!1,this._state.style=t.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(t,e,i,s){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(e,i,t.options.cursorWidth),this._ctx.restore()}_renderBlockCursor(t,e,i,s){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(e,i,s.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(t,s,e,i),this._ctx.restore()}_renderUnderlineCursor(t,e,i,s){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(e,i),this._ctx.restore()}_renderBlurCursor(t,e,i,s){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(e,i,s.getWidth(),1),this._ctx.restore()}}e.CursorRenderLayer=o;class n{constructor(t,e){this._renderCallback=t,this._coreBrowserService=e,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(t){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(t=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){let t=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,t>0)return void this._restartInterval(t)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){let t=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(t)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},t)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(t){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation(t)}}},733(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkRenderLayer=void 0;let s=i(592),r=i(302),o=i(433);class n extends s.BaseRenderLayer{constructor(t,e,i,s,r){super(t,"link",e,!0,i,r),s.linkifier2.onShowLinkUnderline(t=>this._onShowLinkUnderline(t)),s.linkifier2.onHideLinkUnderline(t=>this._onHideLinkUnderline(t))}resize(t,e){super.resize(t,e),this._state=void 0}reset(t){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let t=this._state.y2-this._state.y1-1;t>0&&this._clearCells(0,this._state.y1+1,this._state.cols,t),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_onShowLinkUnderline(t){if(t.fg===r.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:void 0!==t.fg&&(0,o.is256Color)(t.fg)?this._ctx.fillStyle=this._colors.ansi[t.fg].css:this._ctx.fillStyle=this._colors.foreground.css,t.y1===t.y2)this._fillBottomLineAtCells(t.x1,t.y1,t.x2-t.x1);else{this._fillBottomLineAtCells(t.x1,t.y1,t.cols-t.x1);for(let e=t.y1+1;e<t.y2;e++)this._fillBottomLineAtCells(0,e,t.cols);this._fillBottomLineAtCells(0,t.y2,t.x2)}this._state=t}_onHideLinkUnderline(t){this._clearCurrentLink()}}e.LinkRenderLayer=n},820(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.addDisposableDomListener=void 0,e.addDisposableDomListener=function(t,e,i,s){t.addEventListener(e,i,s);let r=!1;return{dispose(){r||(r=!0,t.removeEventListener(e,i,s))}}}},302(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.TEXT_BASELINE=e.DIM_OPACITY=e.INVERTED_DEFAULT_COLOR=void 0;let s=i(399);e.INVERTED_DEFAULT_COLOR=257,e.DIM_OPACITY=.5,e.TEXT_BASELINE=s.isFirefox||s.isLegacyEdge?"bottom":"ideographic"},14(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.tryDrawCustomChar=e.powerlineDefinitions=e.boxDrawingDefinitions=e.blockElementDefinitions=void 0;let s=i(634);e.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:9,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\uD83E\uDF70":[{x:1,y:0,w:1,h:8}],"\uD83E\uDF71":[{x:2,y:0,w:1,h:8}],"\uD83E\uDF72":[{x:3,y:0,w:1,h:8}],"\uD83E\uDF73":[{x:4,y:0,w:1,h:8}],"\uD83E\uDF74":[{x:5,y:0,w:1,h:8}],"\uD83E\uDF75":[{x:6,y:0,w:1,h:8}],"\uD83E\uDF76":[{x:0,y:1,w:8,h:1}],"\uD83E\uDF77":[{x:0,y:2,w:8,h:1}],"\uD83E\uDF78":[{x:0,y:3,w:8,h:1}],"\uD83E\uDF79":[{x:0,y:4,w:8,h:1}],"\uD83E\uDF7A":[{x:0,y:5,w:8,h:1}],"\uD83E\uDF7B":[{x:0,y:6,w:8,h:1}],"\uD83E\uDF7C":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\uD83E\uDF7D":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\uD83E\uDF7E":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\uD83E\uDF7F":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\uD83E\uDF80":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"\uD83E\uDF81":[{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}],"\uD83E\uDF82":[{x:0,y:0,w:8,h:2}],"\uD83E\uDF83":[{x:0,y:0,w:8,h:3}],"\uD83E\uDF84":[{x:0,y:0,w:8,h:5}],"\uD83E\uDF85":[{x:0,y:0,w:8,h:6}],"\uD83E\uDF86":[{x:0,y:0,w:8,h:7}],"\uD83E\uDF87":[{x:6,y:0,w:2,h:8}],"\uD83E\uDF88":[{x:5,y:0,w:3,h:8}],"\uD83E\uDF89":[{x:3,y:0,w:5,h:8}],"\uD83E\uDF8A":[{x:2,y:0,w:6,h:8}],"\uD83E\uDF8B":[{x:1,y:0,w:7,h:8}],"\uD83E\uDF95":[{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}],"\uD83E\uDF96":[{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}],"\uD83E\uDF97":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};let r={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};e.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(t,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"║":{1:(t,e)=>`M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1`},"╒":{1:(t,e)=>`M.5,1 L.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"╓":{1:(t,e)=>`M${.5-t},1 L${.5-t},.5 L1,.5 M${.5+t},.5 L${.5+t},1`},"╔":{1:(t,e)=>`M1,${.5-e} L${.5-t},${.5-e} L${.5-t},1 M1,${.5+e} L${.5+t},${.5+e} L${.5+t},1`},"╕":{1:(t,e)=>`M0,${.5-e} L.5,${.5-e} L.5,1 M0,${.5+e} L.5,${.5+e}`},"╖":{1:(t,e)=>`M${.5+t},1 L${.5+t},.5 L0,.5 M${.5-t},.5 L${.5-t},1`},"╗":{1:(t,e)=>`M0,${.5+e} L${.5-t},${.5+e} L${.5-t},1 M0,${.5-e} L${.5+t},${.5-e} L${.5+t},1`},"╘":{1:(t,e)=>`M.5,0 L.5,${.5+e} L1,${.5+e} M.5,${.5-e} L1,${.5-e}`},"╙":{1:(t,e)=>`M1,.5 L${.5-t},.5 L${.5-t},0 M${.5+t},.5 L${.5+t},0`},"╚":{1:(t,e)=>`M1,${.5-e} L${.5+t},${.5-e} L${.5+t},0 M1,${.5+e} L${.5-t},${.5+e} L${.5-t},0`},"╛":{1:(t,e)=>`M0,${.5+e} L.5,${.5+e} L.5,0 M0,${.5-e} L.5,${.5-e}`},"╜":{1:(t,e)=>`M0,.5 L${.5+t},.5 L${.5+t},0 M${.5-t},.5 L${.5-t},0`},"╝":{1:(t,e)=>`M0,${.5-e} L${.5-t},${.5-e} L${.5-t},0 M0,${.5+e} L${.5+t},${.5+e} L${.5+t},0`},"╞":{1:(t,e)=>`M.5,0 L.5,1 M.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"╟":{1:(t,e)=>`M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1 M${.5+t},.5 L1,.5`},"╠":{1:(t,e)=>`M${.5-t},0 L${.5-t},1 M1,${.5+e} L${.5+t},${.5+e} L${.5+t},1 M1,${.5-e} L${.5+t},${.5-e} L${.5+t},0`},"╡":{1:(t,e)=>`M.5,0 L.5,1 M0,${.5-e} L.5,${.5-e} M0,${.5+e} L.5,${.5+e}`},"╢":{1:(t,e)=>`M0,.5 L${.5-t},.5 M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1`},"╣":{1:(t,e)=>`M${.5+t},0 L${.5+t},1 M0,${.5+e} L${.5-t},${.5+e} L${.5-t},1 M0,${.5-e} L${.5-t},${.5-e} L${.5-t},0`},"╤":{1:(t,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e} M.5,${.5+e} L.5,1`},"╥":{1:(t,e)=>`M0,.5 L1,.5 M${.5-t},.5 L${.5-t},1 M${.5+t},.5 L${.5+t},1`},"╦":{1:(t,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L${.5-t},${.5+e} L${.5-t},1 M1,${.5+e} L${.5+t},${.5+e} L${.5+t},1`},"╧":{1:(t,e)=>`M.5,0 L.5,${.5-e} M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"╨":{1:(t,e)=>`M0,.5 L1,.5 M${.5-t},.5 L${.5-t},0 M${.5+t},.5 L${.5+t},0`},"╩":{1:(t,e)=>`M0,${.5+e} L1,${.5+e} M0,${.5-e} L${.5-t},${.5-e} L${.5-t},0 M1,${.5-e} L${.5+t},${.5-e} L${.5+t},0`},"╪":{1:(t,e)=>`M.5,0 L.5,1 M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"╫":{1:(t,e)=>`M0,.5 L1,.5 M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1`},"╬":{1:(t,e)=>`M0,${.5+e} L${.5-t},${.5+e} L${.5-t},1 M1,${.5+e} L${.5+t},${.5+e} L${.5+t},1 M0,${.5-e} L${.5-t},${.5-e} L${.5-t},0 M1,${.5-e} L${.5+t},${.5-e} L${.5+t},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(t,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,1,.5`},"╮":{1:(t,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,0,.5`},"╯":{1:(t,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,0,.5`},"╰":{1:(t,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,1,.5`}},e.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:1,leftPadding:1}},e.tryDrawCustomChar=function(t,i,n,h,c,_,d,u){let g=e.blockElementDefinitions[i];if(g)return function(t,e,i,s,r,o){for(let n=0;n<e.length;n++){let a=e[n],l=r/8,h=o/8;t.fillRect(i+a.x*l,s+a.y*h,a.w*l,a.h*h)}}(t,g,n,h,c,_),!0;let f=r[i];if(f)return function(t,e,i,r,n,a){let l=o.get(e);l||(l=new Map,o.set(e,l));let h=t.fillStyle;if("string"!=typeof h)throw Error(`Unexpected fillStyle type "${h}"`);let c=l.get(h);if(!c){let _,d,u,g;let i1=e[0].length,r1=e.length,o1=document.createElement("canvas");o1.width=i1,o1.height=r1;let n1=(0,s.throwIfFalsy)(o1.getContext("2d")),a1=new ImageData(i1,r1);if(h.startsWith("#"))_=parseInt(h.slice(1,3),16),d=parseInt(h.slice(3,5),16),u=parseInt(h.slice(5,7),16),g=h.length>7&&parseInt(h.slice(7,9),16)||1;else{if(!h.startsWith("rgba"))throw Error(`Unexpected fillStyle color format "${h}" when drawing pattern glyph`);[_,d,u,g]=h.substring(5,h.length-1).split(",").map(t=>parseFloat(t))}for(let t1=0;t1<r1;t1++)for(let s1=0;s1<i1;s1++)a1.data[4*(t1*i1+s1)]=_,a1.data[4*(t1*i1+s1)+1]=d,a1.data[4*(t1*i1+s1)+2]=u,a1.data[4*(t1*i1+s1)+3]=e[t1][s1]*(255*g);n1.putImageData(a1,0,0),c=(0,s.throwIfFalsy)(t.createPattern(o1,null)),l.set(h,c)}t.fillStyle=c,t.fillRect(i,r,n,a)}(t,f,n,h,c,_),!0;let C=e.boxDrawingDefinitions[i];if(C)return function(t,e,i,s,r,o,n){for(let[h,c]of(t.strokeStyle=t.fillStyle,Object.entries(e))){for(let h1 of(t.beginPath(),t.lineWidth=n*Number.parseInt(h),("function"==typeof c?c(.15,.15/o*r):c).split(" "))){let e1=h1[0],c1=a[e1];if(!c1){console.error(`Could not find drawing instructions for "${e1}"`);continue}let _=h1.substring(1).split(",");_[0]&&_[1]&&c1(t,l(_,r,o,i,s,!0,n))}t.stroke(),t.closePath()}}(t,C,n,h,c,_,u),!0;let p=e.powerlineDefinitions[i];return!!p&&(function(t,e,i,s,r,o,n,h){var c,_;t.beginPath();let d=n/12;for(let n1 of(t.lineWidth=h*d,e.d.split(" "))){let h1=n1[0],u=a[h1];if(!u){console.error(`Could not find drawing instructions for "${h1}"`);continue}let g=n1.substring(1).split(",");g[0]&&g[1]&&u(t,l(g,r,o,i,s,!1,(null!==(c=e.leftPadding)&&void 0!==c?c:0)*(d/2),(null!==(_=e.rightPadding)&&void 0!==_?_:0)*(d/2)))}1===e.type?(t.strokeStyle=t.fillStyle,t.stroke()):t.fill(),t.closePath()}(t,p,n,h,c,_,d,u),!0)};let o=new Map;function n(t,e,i=0){return Math.max(Math.min(t,e),i)}let a={C:(t,e)=>t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]),L:(t,e)=>t.lineTo(e[0],e[1]),M:(t,e)=>t.moveTo(e[0],e[1])};function l(t,e,i,s,r,o,a,l=0,h=0){let c=t.map(t=>parseFloat(t)||parseInt(t));if(c.length<2)throw Error("Too few arguments for instruction");for(let t1=0;t1<c.length;t1+=2)c[t1]*=e-l*a-h*a,o&&0!==c[t1]&&(c[t1]=n(Math.round(c[t1]+.5)-.5,e,0)),c[t1]+=s+l*a;for(let t2=1;t2<c.length;t2+=2)c[t2]*=i,o&&0!==c[t2]&&(c[t2]=n(Math.round(c[t2]+.5)-.5,i,0)),c[t2]+=r;return c}},476(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.observeDevicePixelDimensions=void 0;let s=i(859);e.observeDevicePixelDimensions=function(t,e,i){let r=new e.ResizeObserver(e=>{let s=e.find(e=>e.target===t);if(!s)return;if(!("devicePixelContentBoxSize"in s))return null==r||r.disconnect(),void(r=void 0);let o=s.devicePixelContentBoxSize[0].inlineSize,n=s.devicePixelContentBoxSize[0].blockSize;o>0&&n>0&&i(o,n)});try{r.observe(t,{box:["device-pixel-content-box"]})}catch(t1){r.disconnect(),r=void 0}return(0,s.toDisposable)(()=>null==r?void 0:r.disconnect())}},634(t,e){function i(t){return 57508<=t&&t<=57558}Object.defineProperty(e,"__esModule",{value:!0}),e.excludeFromContrastRatioDemands=e.isRestrictedPowerlineGlyph=e.isPowerlineGlyph=e.throwIfFalsy=void 0,e.throwIfFalsy=function(t){if(!t)throw Error("value must not be falsy");return t},e.isPowerlineGlyph=i,e.isRestrictedPowerlineGlyph=function(t){return 57520<=t&&t<=57527},e.excludeFromContrastRatioDemands=function(t){return i(t)||9472<=t&&t<=9631}},160(t,e){var i,s,r,t1;function o(t){let e=t.toString(16);return e.length<2?"0"+e:e}function n(t,e){return t<e?(e+.05)/(t+.05):(t+.05)/(e+.05)}Object.defineProperty(e,"__esModule",{value:!0}),e.contrastRatio=e.toPaddedHex=e.rgba=e.rgb=e.css=e.color=e.channels=void 0,(t1=i=e.channels||(e.channels={})).toCss=function(t,e,i,s){return void 0!==s?`#${o(t)}${o(e)}${o(i)}${o(s)}`:`#${o(t)}${o(e)}${o(i)}`},t1.toRgba=function(t,e,i,s=255){return(t<<24|e<<16|i<<8|s)>>>0},function(t){function e(t,e){let s=Math.round(255*e),[o,n,a]=r.toChannels(t.rgba);return{css:i.toCss(o,n,a,s),rgba:i.toRgba(o,n,a,s)}}t.blend=function(t,e){let s=(255&e.rgba)/255;if(1===s)return{css:e.css,rgba:e.rgba};let r=e.rgba>>24&255,o=e.rgba>>16&255,n=e.rgba>>8&255,a=t.rgba>>24&255,l=t.rgba>>16&255,h=t.rgba>>8&255,c=a+Math.round((r-a)*s),_=l+Math.round((o-l)*s),d=h+Math.round((n-h)*s);return{css:i.toCss(c,_,d),rgba:i.toRgba(c,_,d)}},t.isOpaque=function(t){return 255==(255&t.rgba)},t.ensureContrastRatio=function(t,e,i){let s=r.ensureContrastRatio(t.rgba,e.rgba,i);if(s)return r.toColor(s>>24&255,s>>16&255,s>>8&255)},t.opaque=function(t){let e=(255|t.rgba)>>>0,[s,o,n]=r.toChannels(e);return{css:i.toCss(s,o,n),rgba:e}},t.opacity=e,t.multiplyOpacity=function(t,i){return e(t,(255&t.rgba)*i/255)},t.toColorRGB=function(t){return[t.rgba>>24&255,t.rgba>>16&255,t.rgba>>8&255]}}(e.color||(e.color={})),(e.css||(e.css={})).toColor=function(t){if(t.match(/#[0-9a-f]{3,8}/i))switch(t.length){case 4:{let e=parseInt(t.slice(1,2).repeat(2),16),i=parseInt(t.slice(2,3).repeat(2),16),s=parseInt(t.slice(3,4).repeat(2),16);return r.toColor(e,i,s)}case 5:{let e1=parseInt(t.slice(1,2).repeat(2),16),i1=parseInt(t.slice(2,3).repeat(2),16),s1=parseInt(t.slice(3,4).repeat(2),16),o=parseInt(t.slice(4,5).repeat(2),16);return r.toColor(e1,i1,s1,o)}case 7:return{css:t,rgba:(parseInt(t.slice(1),16)<<8|255)>>>0};case 9:return{css:t,rgba:parseInt(t.slice(1),16)>>>0}}let e2=t.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(e2){let t1=parseInt(e2[1]),i2=parseInt(e2[2]),s2=parseInt(e2[3]),o1=Math.round(255*(void 0===e2[5]?1:parseFloat(e2[5])));return r.toColor(t1,i2,s2,o1)}throw Error("css.toColor: Unsupported css format")},function(t){function e(t,e,i){let s=t/255,r=e/255,o=i/255;return .2126*(s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))}t.relativeLuminance=function(t){return e(t>>16&255,t>>8&255,255&t)},t.relativeLuminance2=e}(s=e.rgb||(e.rgb={})),function(t){function e(t,e,i){let r=t>>24&255,o=t>>16&255,a=t>>8&255,l=e>>24&255,h=e>>16&255,c=e>>8&255,_=n(s.relativeLuminance2(l,h,c),s.relativeLuminance2(r,o,a));for(;_<i&&(l>0||h>0||c>0);)l-=Math.max(0,Math.ceil(.1*l)),h-=Math.max(0,Math.ceil(.1*h)),c-=Math.max(0,Math.ceil(.1*c)),_=n(s.relativeLuminance2(l,h,c),s.relativeLuminance2(r,o,a));return(l<<24|h<<16|c<<8|255)>>>0}function r(t,e,i){let r=t>>24&255,o=t>>16&255,a=t>>8&255,l=e>>24&255,h=e>>16&255,c=e>>8&255,_=n(s.relativeLuminance2(l,h,c),s.relativeLuminance2(r,o,a));for(;_<i&&(l<255||h<255||c<255);)l=Math.min(255,l+Math.ceil(.1*(255-l))),h=Math.min(255,h+Math.ceil(.1*(255-h))),c=Math.min(255,c+Math.ceil(.1*(255-c))),_=n(s.relativeLuminance2(l,h,c),s.relativeLuminance2(r,o,a));return(l<<24|h<<16|c<<8|255)>>>0}t.ensureContrastRatio=function(t,i,o){let a=s.relativeLuminance(t>>8),l=s.relativeLuminance(i>>8);if(n(a,l)<o){if(l<a){let l1=e(t,i,o),h=n(a,s.relativeLuminance(l1>>8));if(h<o){let e1=r(t,i,o);return h>n(a,s.relativeLuminance(e1>>8))?l1:e1}return l1}let h1=r(t,i,o),c=n(a,s.relativeLuminance(h1>>8));if(c<o){let r1=e(t,i,o);return c>n(a,s.relativeLuminance(r1>>8))?h1:r1}return h1}},t.reduceLuminance=e,t.increaseLuminance=r,t.toChannels=function(t){return[t>>24&255,t>>16&255,t>>8&255,255&t]},t.toColor=function(t,e,s,r){return{css:i.toCss(t,e,s,r),rgba:i.toRgba(t,e,s,r)}}}(r=e.rgba||(e.rgba={})),e.toPaddedHex=o,e.contrastRatio=n},345(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.forwardEvent=e.EventEmitter=void 0,e.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=t=>(this._listeners.push(t),{dispose:()=>{if(!this._disposed){for(let e=0;e<this._listeners.length;e++)if(this._listeners[e]===t)return void this._listeners.splice(e,1)}}})),this._event}fire(t,e){let i=[];for(let t1=0;t1<this._listeners.length;t1++)i.push(this._listeners[t1]);for(let s=0;s<i.length;s++)i[s].call(void 0,t,e)}dispose(){this._listeners&&(this._listeners.length=0),this._disposed=!0}},e.forwardEvent=function(t,e){return t(t=>e.fire(t))}},859(t,e){function i(t){for(let e of t)e.dispose();t.length=0}Object.defineProperty(e,"__esModule",{value:!0}),e.getDisposeArrayDisposable=e.disposeArray=e.toDisposable=e.Disposable=void 0,e.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){for(let t of(this._isDisposed=!0,this._disposables))t.dispose();this._disposables.length=0}register(t){return this._disposables.push(t),t}unregister(t){let e=this._disposables.indexOf(t);-1!==e&&this._disposables.splice(e,1)}},e.toDisposable=function(t){return{dispose:t}},e.disposeArray=i,e.getDisposeArrayDisposable=function(t){return{dispose:()=>i(t)}}},485(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.FourKeyMap=e.TwoKeyMap=void 0;class i{constructor(){this._data={}}set(t,e,i){this._data[t]||(this._data[t]={}),this._data[t][e]=i}get(t,e){return this._data[t]?this._data[t][e]:void 0}clear(){this._data={}}}e.TwoKeyMap=i,e.FourKeyMap=class{constructor(){this._data=new i}set(t,e,s,r,o){this._data.get(t,e)||this._data.set(t,e,new i),this._data.get(t,e).set(s,r,o)}get(t,e,i,s){var r;return null===(r=this._data.get(t,e))||void 0===r?void 0:r.get(i,s)}clear(){this._data.clear()}}},399(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.isLinux=e.isWindows=e.isIphone=e.isIpad=e.isMac=e.isSafari=e.isLegacyEdge=e.isFirefox=void 0;let i="undefined"==typeof navigator,s=i?"node":navigator.userAgent,r=i?"node":navigator.platform;e.isFirefox=s.includes("Firefox"),e.isLegacyEdge=s.includes("Edge"),e.isSafari=/^((?!chrome|android).)*safari/i.test(s),e.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(r),e.isIpad="iPad"===r,e.isIphone="iPhone"===r,e.isWindows=["Windows","Win16","Win32","WinCE"].includes(r),e.isLinux=r.indexOf("Linux")>=0},455(t,e){function i(t,e,i=0,s=t.length){if(i>=t.length)return t;i=(t.length+i)%t.length,s=s>=t.length?t.length:(t.length+s)%t.length;for(let r=i;r<s;++r)t[r]=e;return t}Object.defineProperty(e,"__esModule",{value:!0}),e.concat=e.fillFallback=e.fill=void 0,e.fill=function(t,e,s,r){return t.fill?t.fill(e,s,r):i(t,e,s,r)},e.fillFallback=i,e.concat=function(t,e){let i=new t.constructor(t.length+e.length);return i.set(t),i.set(e,t.length),i}},147(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedAttrs=e.AttributeData=void 0;class i{constructor(){this.fg=0,this.bg=0,this.extended=new s}static toColorRGB(t){return[t>>>16&255,t>>>8&255,255&t]}static fromColorRGB(t){return(255&t[0])<<16|(255&t[1])<<8|255&t[2]}clone(){let t=new i;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&0!==this.extended.underlineStyle?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return 50331648==(50331648&this.fg)}isBgRGB(){return 50331648==(50331648&this.bg)}isFgPalette(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)}isBgPalette(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)}isFgDefault(){return 0==(50331648&this.fg)}isBgDefault(){return 0==(50331648&this.bg)}isAttributeDefault(){return 0===this.fg&&0===this.bg}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return -1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return -1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?50331648==(50331648&this.extended.underlineColor):this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?16777216==(50331648&this.extended.underlineColor)||33554432==(50331648&this.extended.underlineColor):this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?0==(50331648&this.extended.underlineColor):this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}e.AttributeData=i;class s{constructor(t=0,e=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=e}get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(t){this._ext&=-67108864,this._ext|=67108863&t}get urlId(){return this._urlId}set urlId(t){this._urlId=t}clone(){return new s(this._ext,this._urlId)}isEmpty(){return 0===this.underlineStyle&&0===this._urlId}}e.ExtendedAttrs=s},782(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.CellData=void 0;let s=i(133),r=i(855),o=i(147);class n extends o.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new o.ExtendedAttrs,this.combinedData=""}static fromCharData(t){let e=new n;return e.setFromCharData(t),e}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,s.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(t){this.fg=t[r.CHAR_DATA_ATTR_INDEX],this.bg=0;let e=!1;if(t[r.CHAR_DATA_CHAR_INDEX].length>2)e=!0;else if(2===t[r.CHAR_DATA_CHAR_INDEX].length){let i=t[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=i&&i<=56319){let s=t[r.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=s&&s<=57343?this.content=1024*(i-55296)+s-56320+65536|t[r.CHAR_DATA_WIDTH_INDEX]<<22:e=!0}else e=!0}else this.content=t[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|t[r.CHAR_DATA_WIDTH_INDEX]<<22;e&&(this.combinedData=t[r.CHAR_DATA_CHAR_INDEX],this.content=2097152|t[r.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}e.CellData=n},855(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.WHITESPACE_CELL_CODE=e.WHITESPACE_CELL_WIDTH=e.WHITESPACE_CELL_CHAR=e.NULL_CELL_CODE=e.NULL_CELL_WIDTH=e.NULL_CELL_CHAR=e.CHAR_DATA_CODE_INDEX=e.CHAR_DATA_WIDTH_INDEX=e.CHAR_DATA_CHAR_INDEX=e.CHAR_DATA_ATTR_INDEX=e.DEFAULT_EXT=e.DEFAULT_ATTR=e.DEFAULT_COLOR=void 0,e.DEFAULT_COLOR=256,e.DEFAULT_ATTR=256|e.DEFAULT_COLOR<<9,e.DEFAULT_EXT=0,e.CHAR_DATA_ATTR_INDEX=0,e.CHAR_DATA_CHAR_INDEX=1,e.CHAR_DATA_WIDTH_INDEX=2,e.CHAR_DATA_CODE_INDEX=3,e.NULL_CELL_CHAR="",e.NULL_CELL_WIDTH=1,e.NULL_CELL_CODE=0,e.WHITESPACE_CELL_CHAR=" ",e.WHITESPACE_CELL_WIDTH=1,e.WHITESPACE_CELL_CODE=32},133(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Utf8ToUtf32=e.StringToUtf32=e.utf32ToString=e.stringFromCodePoint=void 0,e.stringFromCodePoint=function(t){return t>65535?String.fromCharCode(55296+((t-=65536)>>10))+String.fromCharCode(t%1024+56320):String.fromCharCode(t)},e.utf32ToString=function(t,e=0,i=t.length){let s="";for(let r=e;r<i;++r){let e1=t[r];e1>65535?(e1-=65536,s+=String.fromCharCode(55296+(e1>>10))+String.fromCharCode(e1%1024+56320)):s+=String.fromCharCode(e1)}return s},e.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(t,e){let i=t.length;if(!i)return 0;let s=0,r=0;if(this._interim){let i1=t.charCodeAt(r++);56320<=i1&&i1<=57343?e[s++]=1024*(this._interim-55296)+i1-56320+65536:(e[s++]=this._interim,e[s++]=i1),this._interim=0}for(let o=r;o<i;++o){let r1=t.charCodeAt(o);if(55296<=r1&&r1<=56319){if(++o>=i)return this._interim=r1,s;let n=t.charCodeAt(o);56320<=n&&n<=57343?e[s++]=1024*(r1-55296)+n-56320+65536:(e[s++]=r1,e[s++]=n)}else 65279!==r1&&(e[s++]=r1)}return s}},e.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(t,e){let i=t.length;if(!i)return 0;let s,r,o,n,a=0,l=0,h=0;if(this.interim[0]){let s1=!1,r1=this.interim[0];r1&=192==(224&r1)?31:224==(240&r1)?15:7;let o1,n1=0;for(;(o1=63&this.interim[++n1])&&n1<4;)r1<<=6,r1|=o1;let l1=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,c=l1-n1;for(;h<c;){if(h>=i)return 0;if(128!=(192&(o1=t[h++]))){h--,s1=!0;break}this.interim[n1++]=o1,r1<<=6,r1|=63&o1}s1||(2===l1?r1<128?h--:e[a++]=r1:3===l1?r1<2048||r1>=55296&&r1<=57343||65279===r1||(e[a++]=r1):r1<65536||r1>1114111||(e[a++]=r1)),this.interim.fill(0)}let c1=i-4,_=h;for(;_<i;){for(;!(!(_<c1)||128&(s=t[_])||128&(r=t[_+1])||128&(o=t[_+2])||128&(n=t[_+3]));)e[a++]=s,e[a++]=r,e[a++]=o,e[a++]=n,_+=4;if((s=t[_++])<128)e[a++]=s;else if(192==(224&s)){if(_>=i)return this.interim[0]=s,a;if(128!=(192&(r=t[_++]))||(l=(31&s)<<6|63&r)<128){_--;continue}e[a++]=l}else if(224==(240&s)){if(_>=i)return this.interim[0]=s,a;if(128!=(192&(r=t[_++]))){_--;continue}if(_>=i)return this.interim[0]=s,this.interim[1]=r,a;if(128!=(192&(o=t[_++]))){_--;continue}if((l=(15&s)<<12|(63&r)<<6|63&o)<2048||l>=55296&&l<=57343||65279===l)continue;e[a++]=l}else if(240==(248&s)){if(_>=i)return this.interim[0]=s,a;if(128!=(192&(r=t[_++]))){_--;continue}if(_>=i)return this.interim[0]=s,this.interim[1]=r,a;if(128!=(192&(o=t[_++]))){_--;continue}if(_>=i)return this.interim[0]=s,this.interim[1]=r,this.interim[2]=o,a;if(128!=(192&(n=t[_++]))){_--;continue}if((l=(7&s)<<18|(63&r)<<12|(63&o)<<6|63&n)<65536||l>1114111)continue;e[a++]=l}}return a}}}},e={};function i(s){var r=e[s];if(void 0!==r)return r.exports;var o=e[s]={exports:{}};return t[s](o,o.exports,i),o.exports}var s={};return(()=>{var t=s;Object.defineProperty(t,"__esModule",{value:!0}),t.WebglAddon=void 0;let e=i(666),r=i(345),o=i(399);t.WebglAddon=class{constructor(t){this._preserveDrawingBuffer=t,this._onChangeTextureAtlas=new r.EventEmitter,this._onContextLoss=new r.EventEmitter}get onChangeTextureAtlas(){return this._onChangeTextureAtlas.event}get onContextLoss(){return this._onContextLoss.event}activate(t){if(!t.element)throw Error("Cannot activate WebglAddon before Terminal.open");if(o.isSafari)throw Error("Webgl is not currently supported on Safari");this._terminal=t;let i=t._core._renderService,s=t._core._characterJoinerService,n=t._core._coreBrowserService,a=t._core.coreService,l=t._core._decorationService,h=t._core._colorManager.colors;this._renderer=new e.WebglRenderer(t,h,s,n,a,l,this._preserveDrawingBuffer),(0,r.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss),(0,r.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas),i.setRenderer(this._renderer)}dispose(){var t;if(!this._terminal)throw Error("Cannot dispose WebglAddon because it is activated");let e=this._terminal._core._renderService;e.setRenderer(this._terminal._core._createRenderer()),e.onResize(this._terminal.cols,this._terminal.rows),null===(t=this._renderer)||void 0===t||t.dispose(),this._renderer=void 0}get textureAtlas(){var t;return null===(t=this._renderer)||void 0===t?void 0:t.textureAtlas}clearTextureAtlas(){var t;null===(t=this._renderer)||void 0===t||t.clearCharAtlas()}}})(),s})()}}]);
  2. //# sourceMappingURL=988-b2a4e89c1f2d51ef.js.map